@gofynd/fdk-client-javascript 1.4.2-beta.1 → 1.4.2-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/sdk/application/Cart/CartApplicationModel.d.ts +1742 -1726
- package/sdk/application/Cart/CartApplicationModel.js +1497 -1481
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +1917 -1917
- package/sdk/application/Catalog/CatalogApplicationModel.js +1611 -1611
- package/sdk/application/Common/CommonApplicationModel.d.ts +235 -235
- package/sdk/application/Common/CommonApplicationModel.js +172 -172
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +72 -72
- package/sdk/application/Communication/CommunicationApplicationModel.js +64 -64
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +1614 -1614
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +1151 -1151
- package/sdk/application/Content/ContentApplicationModel.d.ts +797 -797
- package/sdk/application/Content/ContentApplicationModel.js +757 -757
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +79 -79
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +84 -84
- package/sdk/application/Lead/LeadApplicationModel.d.ts +417 -417
- package/sdk/application/Lead/LeadApplicationModel.js +301 -301
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +666 -666
- package/sdk/application/Logistic/LogisticApplicationModel.js +601 -601
- package/sdk/application/Order/OrderApplicationModel.d.ts +846 -846
- package/sdk/application/Order/OrderApplicationModel.js +822 -822
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +5 -5
- package/sdk/application/Payment/PaymentApplicationClient.js +10 -10
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +2155 -2150
- package/sdk/application/Payment/PaymentApplicationModel.js +1460 -1458
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +5 -5
- package/sdk/application/Payment/PaymentApplicationValidator.js +3 -3
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1462 -1462
- package/sdk/application/PosCart/PosCartApplicationModel.js +1260 -1260
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +214 -214
- package/sdk/application/Rewards/RewardsApplicationModel.js +211 -211
- package/sdk/application/Share/ShareApplicationModel.d.ts +114 -114
- package/sdk/application/Share/ShareApplicationModel.js +121 -121
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +895 -895
- package/sdk/application/Theme/ThemeApplicationModel.js +684 -684
- package/sdk/application/User/UserApplicationModel.d.ts +762 -762
- package/sdk/application/User/UserApplicationModel.js +738 -738
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +63 -63
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +65 -65
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +661 -661
- package/sdk/partner/Lead/LeadPartnerModel.js +491 -491
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +223 -223
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +235 -235
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +1087 -1087
- package/sdk/partner/Theme/ThemePartnerModel.js +819 -819
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +386 -386
- package/sdk/partner/Webhook/WebhookPartnerModel.js +342 -342
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +123 -123
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +109 -109
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +801 -801
- package/sdk/platform/Billing/BillingPlatformModel.js +783 -783
- package/sdk/platform/Cart/CartPlatformModel.d.ts +3333 -3317
- package/sdk/platform/Cart/CartPlatformModel.js +2936 -2920
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1013 -1013
- package/sdk/platform/Catalog/CatalogPlatformModel.js +923 -923
- package/sdk/platform/Common/CommonPlatformModel.d.ts +255 -255
- package/sdk/platform/Common/CommonPlatformModel.js +187 -187
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1238 -1238
- package/sdk/platform/Communication/CommunicationPlatformModel.js +1273 -1273
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +661 -661
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +692 -692
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +3198 -3198
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2247 -2247
- package/sdk/platform/Content/ContentPlatformModel.d.ts +1833 -1833
- package/sdk/platform/Content/ContentPlatformModel.js +1837 -1837
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +245 -245
- package/sdk/platform/Discount/DiscountPlatformModel.js +248 -248
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +865 -865
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +877 -877
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +1044 -1044
- package/sdk/platform/Finance/FinancePlatformModel.js +974 -974
- package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +942 -942
- package/sdk/platform/Inventory/InventoryPlatformModel.js +1003 -1003
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +608 -608
- package/sdk/platform/Lead/LeadPlatformModel.js +465 -465
- package/sdk/platform/Order/OrderPlatformModel.d.ts +5180 -5176
- package/sdk/platform/Order/OrderPlatformModel.js +4740 -4736
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +22 -22
- package/sdk/platform/Partner/PartnerPlatformModel.js +22 -22
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2670 -2660
- package/sdk/platform/Payment/PaymentPlatformModel.js +1831 -1827
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +204 -204
- package/sdk/platform/Rewards/RewardsPlatformModel.js +199 -199
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1505 -1507
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1532 -1536
- package/sdk/platform/Share/SharePlatformModel.d.ts +147 -147
- package/sdk/platform/Share/SharePlatformModel.js +139 -139
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +1046 -1046
- package/sdk/platform/Theme/ThemePlatformModel.js +789 -789
- package/sdk/platform/User/UserPlatformModel.d.ts +758 -758
- package/sdk/platform/User/UserPlatformModel.js +643 -643
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +439 -439
- package/sdk/platform/Webhook/WebhookPlatformModel.js +364 -364
- package/sdk/public/Billing/BillingPublicModel.d.ts +55 -55
- package/sdk/public/Billing/BillingPublicModel.js +51 -51
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +237 -237
- package/sdk/public/Configuration/ConfigurationPublicModel.js +174 -174
- package/sdk/public/Content/ContentPublicModel.d.ts +26 -26
- package/sdk/public/Content/ContentPublicModel.js +28 -28
- package/sdk/public/Inventory/InventoryPublicModel.d.ts +237 -237
- package/sdk/public/Inventory/InventoryPublicModel.js +257 -257
- package/sdk/public/Partner/PartnerPublicModel.d.ts +104 -104
- package/sdk/public/Partner/PartnerPublicModel.js +113 -113
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +87 -87
- package/sdk/public/Webhook/WebhookPublicModel.js +93 -93
|
@@ -1,344 +1,296 @@
|
|
|
1
1
|
const Joi = require("joi");
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @typedef
|
|
5
|
-
* @property {string
|
|
6
|
-
* @property {number} [company_id]
|
|
7
|
-
* @property {string} [criteria]
|
|
8
|
-
* @property {string} [extension_id]
|
|
4
|
+
* @typedef Error
|
|
5
|
+
* @property {string} [error] - Error message describing the reason for the failure.
|
|
9
6
|
*/
|
|
10
7
|
|
|
11
8
|
/**
|
|
12
|
-
* @typedef
|
|
13
|
-
* @property {string} [
|
|
14
|
-
* @property {string} [
|
|
9
|
+
* @typedef Event
|
|
10
|
+
* @property {string} [event_name]
|
|
11
|
+
* @property {string} [event_type]
|
|
12
|
+
* @property {string} [event_category]
|
|
13
|
+
* @property {string} [version]
|
|
15
14
|
*/
|
|
16
15
|
|
|
17
16
|
/**
|
|
18
|
-
* @typedef
|
|
19
|
-
* @property {string} [
|
|
17
|
+
* @typedef RetryEventRequest
|
|
18
|
+
* @property {string} [search_text]
|
|
19
|
+
* @property {string} [end_date]
|
|
20
|
+
* @property {string} [start_date]
|
|
21
|
+
* @property {number[]} [subscriber_ids]
|
|
22
|
+
* @property {Event[]} [event]
|
|
23
|
+
* @property {string} [status]
|
|
20
24
|
*/
|
|
21
25
|
|
|
22
26
|
/**
|
|
23
|
-
* @typedef
|
|
24
|
-
* @property {
|
|
27
|
+
* @typedef Item
|
|
28
|
+
* @property {string} [status]
|
|
29
|
+
* @property {number} [count]
|
|
25
30
|
*/
|
|
26
31
|
|
|
27
32
|
/**
|
|
28
|
-
* @typedef
|
|
29
|
-
* @property {
|
|
33
|
+
* @typedef RetryCountResponse
|
|
34
|
+
* @property {Item[]} [items]
|
|
35
|
+
*/
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @typedef RetrySuccessResponse
|
|
39
|
+
* @property {boolean} [success]
|
|
40
|
+
* @property {string} [message]
|
|
30
41
|
*/
|
|
31
42
|
|
|
32
43
|
/**
|
|
33
44
|
* @typedef Err
|
|
34
|
-
* @property {string} [location]
|
|
35
45
|
* @property {string} [msg]
|
|
36
46
|
* @property {string} [param]
|
|
47
|
+
* @property {string} [location]
|
|
37
48
|
*/
|
|
38
49
|
|
|
39
50
|
/**
|
|
40
|
-
* @typedef
|
|
41
|
-
* @property {
|
|
51
|
+
* @typedef RetryFailureResponse
|
|
52
|
+
* @property {Err[]} [err]
|
|
42
53
|
*/
|
|
43
54
|
|
|
44
55
|
/**
|
|
45
|
-
* @typedef
|
|
46
|
-
* @property {
|
|
47
|
-
* @property {
|
|
48
|
-
* @property {
|
|
49
|
-
* @property {string} [
|
|
56
|
+
* @typedef RetryStatusResponse
|
|
57
|
+
* @property {number} [total_event] - The total number of events that require retry.
|
|
58
|
+
* @property {number} [success_count] - The count of successfully retried events.
|
|
59
|
+
* @property {number} [failure_count] - The count of failed retry attempts.
|
|
60
|
+
* @property {string} [status] - The overall status of the retry process (e.g.,
|
|
61
|
+
* "completed").
|
|
50
62
|
*/
|
|
51
63
|
|
|
52
64
|
/**
|
|
53
|
-
* @typedef
|
|
54
|
-
* @property {string} [
|
|
55
|
-
* @property {string} [
|
|
56
|
-
* @property {string} [
|
|
57
|
-
* @property {
|
|
58
|
-
* @property {string} [
|
|
59
|
-
* @property {
|
|
60
|
-
* @property {string} [event_type]
|
|
61
|
-
* @property {number} [id]
|
|
62
|
-
* @property {string} [updated_on]
|
|
63
|
-
* @property {string} [version]
|
|
65
|
+
* @typedef EventProcessRequest
|
|
66
|
+
* @property {string} [search_text]
|
|
67
|
+
* @property {string} [end_date]
|
|
68
|
+
* @property {string} [start_date]
|
|
69
|
+
* @property {number[]} [subscriber_ids]
|
|
70
|
+
* @property {string} [status]
|
|
71
|
+
* @property {Event[]} [event]
|
|
64
72
|
*/
|
|
65
73
|
|
|
66
74
|
/**
|
|
67
|
-
* @typedef
|
|
68
|
-
* @property {
|
|
75
|
+
* @typedef DownloadReportResponse
|
|
76
|
+
* @property {string} [file_name]
|
|
77
|
+
*/
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* @typedef EventProcessReports
|
|
81
|
+
* @property {EventProcessReportObject[]} [rows]
|
|
82
|
+
* @property {Page} [page]
|
|
69
83
|
*/
|
|
70
84
|
|
|
71
85
|
/**
|
|
72
86
|
* @typedef EventProcessReportObject
|
|
73
|
-
* @property {number} [attempt] - The attempt number of the event.
|
|
74
|
-
* @property {Object} [data] - The data associated with the event.
|
|
75
87
|
* @property {string} [event_name] - The name of the processed event.
|
|
76
|
-
* @property {string} [event_trace_id]
|
|
77
|
-
* @property {number} [last_attempted_on] - The timestamp of the last attempted event.
|
|
78
|
-
* @property {string} [message_id]
|
|
79
|
-
* @property {string} [name] - The name of the event.
|
|
80
88
|
* @property {number} [response_code] - The response code of the event.
|
|
81
89
|
* @property {string} [response_message] - The response message of the event.
|
|
82
|
-
* @property {
|
|
90
|
+
* @property {Object} [data] - The data associated with the event.
|
|
91
|
+
* @property {number} [attempt] - The attempt number of the event.
|
|
92
|
+
* @property {number} [last_attempted_on] - The timestamp of the last attempted event.
|
|
83
93
|
* @property {string} [status] - The status of the event (e.g., "FAILED").
|
|
94
|
+
* @property {string} [name] - The name of the event.
|
|
84
95
|
* @property {string} [webhook_url] - The webhook URL associated with the event.
|
|
96
|
+
* @property {number} [response_time] - The response time of the event.
|
|
97
|
+
* @property {string} [message_id]
|
|
98
|
+
* @property {string} [event_trace_id]
|
|
85
99
|
*/
|
|
86
100
|
|
|
87
101
|
/**
|
|
88
|
-
* @typedef
|
|
89
|
-
* @property {
|
|
90
|
-
* @property {
|
|
102
|
+
* @typedef Page
|
|
103
|
+
* @property {number} [item_total]
|
|
104
|
+
* @property {string} [next_id]
|
|
105
|
+
* @property {boolean} [has_previous]
|
|
106
|
+
* @property {boolean} [has_next]
|
|
107
|
+
* @property {number} [current]
|
|
108
|
+
* @property {string} type
|
|
109
|
+
* @property {number} [size]
|
|
91
110
|
*/
|
|
92
111
|
|
|
93
112
|
/**
|
|
94
|
-
* @typedef
|
|
95
|
-
* @property {string} [
|
|
96
|
-
* @property {
|
|
97
|
-
*
|
|
98
|
-
* @property {
|
|
99
|
-
* @property {string} [status]
|
|
100
|
-
* @property {number[]} [subscriber_ids]
|
|
113
|
+
* @typedef PingWebhook
|
|
114
|
+
* @property {string} [webhook_url] - The URL of the subscriber's webhook to ping.
|
|
115
|
+
* @property {Object} [auth_meta] - Authentication metadata (if required by the
|
|
116
|
+
* subscriber).
|
|
117
|
+
* @property {Object} [custom_headers] - Custom headers to include in the ping request.
|
|
101
118
|
*/
|
|
102
119
|
|
|
103
120
|
/**
|
|
104
|
-
* @typedef
|
|
105
|
-
* @property {
|
|
106
|
-
* @property {
|
|
121
|
+
* @typedef PingWebhookResponse
|
|
122
|
+
* @property {string} [status] - The status of the ping (e.g., "SUCCESS").
|
|
123
|
+
* @property {string} [message] - An optional message related to the ping.
|
|
124
|
+
* @property {number} [code] - The HTTP status code of the ping response (e.g., 200).
|
|
107
125
|
*/
|
|
108
126
|
|
|
109
127
|
/**
|
|
110
|
-
* @typedef
|
|
111
|
-
* @property {
|
|
112
|
-
* @property {string
|
|
113
|
-
* @property {string} [
|
|
114
|
-
* @property {string} [
|
|
115
|
-
* @property {
|
|
116
|
-
* @property {
|
|
117
|
-
*
|
|
128
|
+
* @typedef EventConfig
|
|
129
|
+
* @property {number} [id]
|
|
130
|
+
* @property {string} [event_name]
|
|
131
|
+
* @property {string} [event_type]
|
|
132
|
+
* @property {string} [event_category]
|
|
133
|
+
* @property {Object} [event_schema]
|
|
134
|
+
* @property {string} [version]
|
|
135
|
+
* @property {string} [display_name]
|
|
136
|
+
* @property {string} [description]
|
|
137
|
+
* @property {string} [created_on]
|
|
138
|
+
* @property {string} [updated_on]
|
|
118
139
|
*/
|
|
119
140
|
|
|
120
141
|
/**
|
|
121
|
-
* @typedef
|
|
122
|
-
* @property {
|
|
123
|
-
* @property {string} [created_on] - The date and time when the history report
|
|
124
|
-
* was created.
|
|
125
|
-
* @property {string} [filename] - The filename of the history report.
|
|
126
|
-
* @property {HistoryFilters} [filters]
|
|
127
|
-
* @property {number} [id] - The ID of the history report.
|
|
128
|
-
* @property {string} [message] - A message related to the history report.
|
|
129
|
-
* @property {string} [status] - The status of the history report (e.g., "COMPLETED").
|
|
130
|
-
* @property {string} [updated_on] - The date and time when the history report
|
|
131
|
-
* was last updated.
|
|
132
|
-
* @property {UploadServiceObject} [upload_service_response]
|
|
142
|
+
* @typedef EventConfigResponse
|
|
143
|
+
* @property {EventConfig[]} [event_configs]
|
|
133
144
|
*/
|
|
134
145
|
|
|
135
146
|
/**
|
|
136
|
-
* @typedef
|
|
137
|
-
* @property {number} [
|
|
138
|
-
*
|
|
139
|
-
* @property {string} [type] - The type of history report (e.g., "platform").
|
|
147
|
+
* @typedef ReportFiltersPayload
|
|
148
|
+
* @property {number[]} [subscriber_ids] - An array of subscriber IDs for
|
|
149
|
+
* filtering filters (optional).
|
|
140
150
|
*/
|
|
141
151
|
|
|
142
152
|
/**
|
|
143
|
-
* @typedef
|
|
144
|
-
* @property {
|
|
145
|
-
* @property {
|
|
153
|
+
* @typedef ReportFilterResponse
|
|
154
|
+
* @property {string} [filter_name] - The name of the filter.
|
|
155
|
+
* @property {Object[]} [values]
|
|
146
156
|
*/
|
|
147
157
|
|
|
148
158
|
/**
|
|
149
|
-
* @typedef
|
|
150
|
-
* @property {
|
|
151
|
-
* @property {
|
|
159
|
+
* @typedef HistoryPayload
|
|
160
|
+
* @property {string} [type] - The type of history report (e.g., "platform").
|
|
161
|
+
* @property {number} [page_no] - The page number of the history report.
|
|
162
|
+
* @property {number} [page_size] - The number of records per page.
|
|
152
163
|
*/
|
|
153
164
|
|
|
154
165
|
/**
|
|
155
|
-
* @typedef
|
|
156
|
-
* @property {
|
|
157
|
-
* @property {
|
|
158
|
-
* @property {
|
|
159
|
-
* @property {
|
|
160
|
-
* @property {string} [
|
|
161
|
-
* @property {number} [
|
|
162
|
-
*
|
|
166
|
+
* @typedef HistoryFilters
|
|
167
|
+
* @property {string[]} [events]
|
|
168
|
+
* @property {string} [search_text]
|
|
169
|
+
* @property {string} [status] - The status of the history report (e.g., "FAILED").
|
|
170
|
+
* @property {string} [end_date] - The end date and time of the history report.
|
|
171
|
+
* @property {string} [start_date] - The start date and time of the history report.
|
|
172
|
+
* @property {number[]} [subscribers] - An array of subscriber IDs associated
|
|
173
|
+
* with the history report.
|
|
163
174
|
*/
|
|
164
175
|
|
|
165
176
|
/**
|
|
166
|
-
* @typedef
|
|
167
|
-
* @property {
|
|
168
|
-
*
|
|
169
|
-
* @property {Object} [custom_headers] - Custom headers to include in the ping request.
|
|
170
|
-
* @property {string} [webhook_url] - The URL of the subscriber's webhook to ping.
|
|
177
|
+
* @typedef Url
|
|
178
|
+
* @property {string} [url] - The URL of the uploaded report file.
|
|
179
|
+
* @property {string} [name] - The name of the uploaded report file.
|
|
171
180
|
*/
|
|
172
181
|
|
|
173
182
|
/**
|
|
174
|
-
* @typedef
|
|
175
|
-
* @property {
|
|
176
|
-
* @property {string} [message] - An optional message related to the ping.
|
|
177
|
-
* @property {string} [status] - The status of the ping (e.g., "SUCCESS").
|
|
183
|
+
* @typedef CdnObject
|
|
184
|
+
* @property {Url[]} [urls]
|
|
178
185
|
*/
|
|
179
186
|
|
|
180
187
|
/**
|
|
181
|
-
* @typedef
|
|
182
|
-
* @property {
|
|
183
|
-
* @property {Object[]} [values]
|
|
188
|
+
* @typedef UploadServiceObject
|
|
189
|
+
* @property {CdnObject} [cdn]
|
|
184
190
|
*/
|
|
185
191
|
|
|
186
192
|
/**
|
|
187
|
-
* @typedef
|
|
188
|
-
* @property {number
|
|
189
|
-
*
|
|
193
|
+
* @typedef HistoryAssociation
|
|
194
|
+
* @property {number} [company_id]
|
|
195
|
+
* @property {number[]} [subscriber_ids]
|
|
190
196
|
*/
|
|
191
197
|
|
|
192
198
|
/**
|
|
193
|
-
* @typedef
|
|
194
|
-
* @property {
|
|
199
|
+
* @typedef HistoryItems
|
|
200
|
+
* @property {number} [id] - The ID of the history report.
|
|
201
|
+
* @property {HistoryAssociation} [association]
|
|
202
|
+
* @property {HistoryFilters} [filters]
|
|
203
|
+
* @property {string} [filename] - The filename of the history report.
|
|
204
|
+
* @property {string} [status] - The status of the history report (e.g., "COMPLETED").
|
|
205
|
+
* @property {UploadServiceObject} [upload_service_response]
|
|
206
|
+
* @property {string} [created_on] - The date and time when the history report
|
|
207
|
+
* was created.
|
|
208
|
+
* @property {string} [updated_on] - The date and time when the history report
|
|
209
|
+
* was last updated.
|
|
210
|
+
* @property {string} [message] - A message related to the history report.
|
|
195
211
|
*/
|
|
196
212
|
|
|
197
213
|
/**
|
|
198
|
-
* @typedef
|
|
199
|
-
* @property {
|
|
200
|
-
* @property {
|
|
201
|
-
* @property {string} [search_text]
|
|
202
|
-
* @property {string} [start_date]
|
|
203
|
-
* @property {string} [status]
|
|
204
|
-
* @property {number[]} [subscriber_ids]
|
|
214
|
+
* @typedef HistoryResponse
|
|
215
|
+
* @property {HistoryItems[]} [items]
|
|
216
|
+
* @property {Page} [page]
|
|
205
217
|
*/
|
|
206
218
|
|
|
207
219
|
/**
|
|
208
|
-
* @typedef
|
|
209
|
-
* @property {
|
|
220
|
+
* @typedef CancelResponse
|
|
221
|
+
* @property {string} [message] - The HTTP status code of the response (e.g., 200).
|
|
210
222
|
*/
|
|
211
223
|
|
|
212
224
|
/**
|
|
213
|
-
* @typedef
|
|
214
|
-
* @property {number} [
|
|
215
|
-
* @property {string} [
|
|
216
|
-
*
|
|
217
|
-
* @property {
|
|
218
|
-
* @property {number} [total_event] - The total number of events that require retry.
|
|
225
|
+
* @typedef Association
|
|
226
|
+
* @property {number} [company_id]
|
|
227
|
+
* @property {string[]} [application_id]
|
|
228
|
+
* @property {string} [extension_id]
|
|
229
|
+
* @property {string} [criteria]
|
|
219
230
|
*/
|
|
220
231
|
|
|
221
232
|
/**
|
|
222
|
-
* @typedef
|
|
223
|
-
* @property {string} [
|
|
224
|
-
* @property {
|
|
233
|
+
* @typedef AuthMeta
|
|
234
|
+
* @property {string} [type]
|
|
235
|
+
* @property {string} [secret]
|
|
225
236
|
*/
|
|
226
237
|
|
|
227
238
|
/**
|
|
228
|
-
* @typedef
|
|
229
|
-
* @property {Association} [association]
|
|
230
|
-
* @property {AuthMeta} [auth_meta]
|
|
231
|
-
* @property {Object} [custom_headers]
|
|
232
|
-
* @property {string} [email_id]
|
|
233
|
-
* @property {number[]} [event_id]
|
|
239
|
+
* @typedef SubscriberResponse
|
|
234
240
|
* @property {number} [id]
|
|
241
|
+
* @property {string} [modified_by]
|
|
235
242
|
* @property {string} [name]
|
|
236
|
-
* @property {SubscriberStatus} [status]
|
|
237
243
|
* @property {string} [webhook_url]
|
|
238
|
-
*/
|
|
239
|
-
|
|
240
|
-
/**
|
|
241
|
-
* @typedef SubscriberConfigList
|
|
242
|
-
* @property {SubscriberResponse[]} [items]
|
|
243
|
-
* @property {Page} [page]
|
|
244
|
-
*/
|
|
245
|
-
|
|
246
|
-
/**
|
|
247
|
-
* @typedef SubscriberConfigResponse
|
|
248
244
|
* @property {Association} [association]
|
|
249
|
-
* @property {AuthMeta} [auth_meta]
|
|
250
|
-
* @property {string} [created_on]
|
|
251
245
|
* @property {Object} [custom_headers]
|
|
252
|
-
* @property {string} [email_id]
|
|
253
|
-
* @property {number[]} [event_id]
|
|
254
|
-
* @property {number} [id]
|
|
255
|
-
* @property {string} [modified_by]
|
|
256
|
-
* @property {string} [name]
|
|
257
246
|
* @property {SubscriberStatus} [status]
|
|
258
|
-
* @property {string} [
|
|
247
|
+
* @property {string} [email_id]
|
|
259
248
|
* @property {string} [updated_on]
|
|
260
|
-
* @property {string} [
|
|
249
|
+
* @property {string} [created_on]
|
|
250
|
+
* @property {string} [type]
|
|
251
|
+
* @property {AuthMeta} [auth_meta]
|
|
252
|
+
* @property {EventConfig[]} [event_configs]
|
|
261
253
|
*/
|
|
262
254
|
|
|
263
255
|
/**
|
|
264
|
-
* @typedef
|
|
256
|
+
* @typedef SubscriberConfig
|
|
257
|
+
* @property {number} [id]
|
|
258
|
+
* @property {string} [name]
|
|
259
|
+
* @property {string} [webhook_url]
|
|
265
260
|
* @property {Association} [association]
|
|
266
|
-
* @property {AuthMeta} [auth_meta]
|
|
267
|
-
* @property {string} [created_on]
|
|
268
261
|
* @property {Object} [custom_headers]
|
|
262
|
+
* @property {SubscriberStatus} [status]
|
|
269
263
|
* @property {string} [email_id]
|
|
270
|
-
* @property {
|
|
264
|
+
* @property {AuthMeta} [auth_meta]
|
|
265
|
+
* @property {number[]} [event_id]
|
|
266
|
+
*/
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* @typedef SubscriberConfigResponse
|
|
271
270
|
* @property {number} [id]
|
|
272
271
|
* @property {string} [modified_by]
|
|
273
272
|
* @property {string} [name]
|
|
273
|
+
* @property {string} [webhook_url]
|
|
274
|
+
* @property {Association} [association]
|
|
275
|
+
* @property {Object} [custom_headers]
|
|
274
276
|
* @property {SubscriberStatus} [status]
|
|
275
|
-
* @property {string} [
|
|
277
|
+
* @property {string} [email_id]
|
|
276
278
|
* @property {string} [updated_on]
|
|
277
|
-
* @property {string} [
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
* @typedef UploadServiceObject
|
|
282
|
-
* @property {CdnObject} [cdn]
|
|
279
|
+
* @property {string} [created_on]
|
|
280
|
+
* @property {string} [type]
|
|
281
|
+
* @property {AuthMeta} [auth_meta]
|
|
282
|
+
* @property {number[]} [event_id]
|
|
283
283
|
*/
|
|
284
284
|
|
|
285
285
|
/**
|
|
286
|
-
* @typedef
|
|
287
|
-
* @property {
|
|
288
|
-
* @property {
|
|
286
|
+
* @typedef SubscriberConfigList
|
|
287
|
+
* @property {SubscriberResponse[]} [items]
|
|
288
|
+
* @property {Page} [page]
|
|
289
289
|
*/
|
|
290
290
|
|
|
291
291
|
/** @typedef {"active" | "inactive" | "blocked"} SubscriberStatus */
|
|
292
292
|
|
|
293
293
|
class WebhookPlatformModel {
|
|
294
|
-
/** @returns {Association} */
|
|
295
|
-
static Association() {
|
|
296
|
-
return Joi.object({
|
|
297
|
-
application_id: Joi.array().items(Joi.string().allow("")),
|
|
298
|
-
company_id: Joi.number(),
|
|
299
|
-
criteria: Joi.string().allow(""),
|
|
300
|
-
extension_id: Joi.string().allow(""),
|
|
301
|
-
});
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
/** @returns {AuthMeta} */
|
|
305
|
-
static AuthMeta() {
|
|
306
|
-
return Joi.object({
|
|
307
|
-
secret: Joi.string().allow(""),
|
|
308
|
-
type: Joi.string().allow(""),
|
|
309
|
-
});
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
/** @returns {CancelResponse} */
|
|
313
|
-
static CancelResponse() {
|
|
314
|
-
return Joi.object({
|
|
315
|
-
message: Joi.string().allow(""),
|
|
316
|
-
});
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
/** @returns {CdnObject} */
|
|
320
|
-
static CdnObject() {
|
|
321
|
-
return Joi.object({
|
|
322
|
-
urls: Joi.array().items(WebhookPlatformModel.Url()),
|
|
323
|
-
});
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
/** @returns {DownloadReportResponse} */
|
|
327
|
-
static DownloadReportResponse() {
|
|
328
|
-
return Joi.object({
|
|
329
|
-
file_name: Joi.string().allow(""),
|
|
330
|
-
});
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
/** @returns {Err} */
|
|
334
|
-
static Err() {
|
|
335
|
-
return Joi.object({
|
|
336
|
-
location: Joi.string().allow(""),
|
|
337
|
-
msg: Joi.string().allow(""),
|
|
338
|
-
param: Joi.string().allow(""),
|
|
339
|
-
});
|
|
340
|
-
}
|
|
341
|
-
|
|
342
294
|
/** @returns {Error} */
|
|
343
295
|
static Error() {
|
|
344
296
|
return Joi.object({
|
|
@@ -349,170 +301,170 @@ class WebhookPlatformModel {
|
|
|
349
301
|
/** @returns {Event} */
|
|
350
302
|
static Event() {
|
|
351
303
|
return Joi.object({
|
|
352
|
-
event_category: Joi.string().allow(""),
|
|
353
304
|
event_name: Joi.string().allow(""),
|
|
354
305
|
event_type: Joi.string().allow(""),
|
|
306
|
+
event_category: Joi.string().allow(""),
|
|
355
307
|
version: Joi.string().allow(""),
|
|
356
308
|
});
|
|
357
309
|
}
|
|
358
310
|
|
|
359
|
-
/** @returns {
|
|
360
|
-
static
|
|
311
|
+
/** @returns {RetryEventRequest} */
|
|
312
|
+
static RetryEventRequest() {
|
|
361
313
|
return Joi.object({
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
event_type: Joi.string().allow(""),
|
|
369
|
-
id: Joi.number(),
|
|
370
|
-
updated_on: Joi.string().allow(""),
|
|
371
|
-
version: Joi.string().allow(""),
|
|
314
|
+
search_text: Joi.string().allow(""),
|
|
315
|
+
end_date: Joi.string().allow(""),
|
|
316
|
+
start_date: Joi.string().allow(""),
|
|
317
|
+
subscriber_ids: Joi.array().items(Joi.number()),
|
|
318
|
+
event: Joi.array().items(WebhookPlatformModel.Event()),
|
|
319
|
+
status: Joi.string().allow(""),
|
|
372
320
|
});
|
|
373
321
|
}
|
|
374
322
|
|
|
375
|
-
/** @returns {
|
|
376
|
-
static
|
|
323
|
+
/** @returns {Item} */
|
|
324
|
+
static Item() {
|
|
377
325
|
return Joi.object({
|
|
378
|
-
|
|
326
|
+
status: Joi.string().allow(""),
|
|
327
|
+
count: Joi.number(),
|
|
379
328
|
});
|
|
380
329
|
}
|
|
381
330
|
|
|
382
|
-
/** @returns {
|
|
383
|
-
static
|
|
331
|
+
/** @returns {RetryCountResponse} */
|
|
332
|
+
static RetryCountResponse() {
|
|
384
333
|
return Joi.object({
|
|
385
|
-
|
|
386
|
-
data: Joi.object().pattern(/\S/, Joi.any()),
|
|
387
|
-
event_name: Joi.string().allow(""),
|
|
388
|
-
event_trace_id: Joi.string().allow(""),
|
|
389
|
-
last_attempted_on: Joi.number(),
|
|
390
|
-
message_id: Joi.string().allow(""),
|
|
391
|
-
name: Joi.string().allow(""),
|
|
392
|
-
response_code: Joi.number(),
|
|
393
|
-
response_message: Joi.string().allow(""),
|
|
394
|
-
response_time: Joi.number(),
|
|
395
|
-
status: Joi.string().allow(""),
|
|
396
|
-
webhook_url: Joi.string().allow(""),
|
|
334
|
+
items: Joi.array().items(WebhookPlatformModel.Item()),
|
|
397
335
|
});
|
|
398
336
|
}
|
|
399
337
|
|
|
400
|
-
/** @returns {
|
|
401
|
-
static
|
|
338
|
+
/** @returns {RetrySuccessResponse} */
|
|
339
|
+
static RetrySuccessResponse() {
|
|
402
340
|
return Joi.object({
|
|
403
|
-
|
|
404
|
-
|
|
341
|
+
success: Joi.boolean(),
|
|
342
|
+
message: Joi.string().allow(""),
|
|
405
343
|
});
|
|
406
344
|
}
|
|
407
345
|
|
|
408
|
-
/** @returns {
|
|
409
|
-
static
|
|
346
|
+
/** @returns {Err} */
|
|
347
|
+
static Err() {
|
|
410
348
|
return Joi.object({
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
start_date: Joi.string().allow(""),
|
|
415
|
-
status: Joi.string().allow(""),
|
|
416
|
-
subscriber_ids: Joi.array().items(Joi.number()),
|
|
349
|
+
msg: Joi.string().allow(""),
|
|
350
|
+
param: Joi.string().allow(""),
|
|
351
|
+
location: Joi.string().allow(""),
|
|
417
352
|
});
|
|
418
353
|
}
|
|
419
354
|
|
|
420
|
-
/** @returns {
|
|
421
|
-
static
|
|
355
|
+
/** @returns {RetryFailureResponse} */
|
|
356
|
+
static RetryFailureResponse() {
|
|
422
357
|
return Joi.object({
|
|
423
|
-
|
|
424
|
-
subscriber_ids: Joi.array().items(Joi.number()),
|
|
358
|
+
err: Joi.array().items(WebhookPlatformModel.Err()),
|
|
425
359
|
});
|
|
426
360
|
}
|
|
427
361
|
|
|
428
|
-
/** @returns {
|
|
429
|
-
static
|
|
362
|
+
/** @returns {RetryStatusResponse} */
|
|
363
|
+
static RetryStatusResponse() {
|
|
430
364
|
return Joi.object({
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
start_date: Joi.string().allow(""),
|
|
365
|
+
total_event: Joi.number(),
|
|
366
|
+
success_count: Joi.number(),
|
|
367
|
+
failure_count: Joi.number(),
|
|
435
368
|
status: Joi.string().allow(""),
|
|
436
|
-
subscribers: Joi.array().items(Joi.number()),
|
|
437
369
|
});
|
|
438
370
|
}
|
|
439
371
|
|
|
440
|
-
/** @returns {
|
|
441
|
-
static
|
|
372
|
+
/** @returns {EventProcessRequest} */
|
|
373
|
+
static EventProcessRequest() {
|
|
442
374
|
return Joi.object({
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
id: Joi.number(),
|
|
448
|
-
message: Joi.string().allow(""),
|
|
375
|
+
search_text: Joi.string().allow(""),
|
|
376
|
+
end_date: Joi.string().allow(""),
|
|
377
|
+
start_date: Joi.string().allow(""),
|
|
378
|
+
subscriber_ids: Joi.array().items(Joi.number()),
|
|
449
379
|
status: Joi.string().allow(""),
|
|
450
|
-
|
|
451
|
-
upload_service_response: WebhookPlatformModel.UploadServiceObject(),
|
|
380
|
+
event: Joi.array().items(WebhookPlatformModel.Event()),
|
|
452
381
|
});
|
|
453
382
|
}
|
|
454
383
|
|
|
455
|
-
/** @returns {
|
|
456
|
-
static
|
|
384
|
+
/** @returns {DownloadReportResponse} */
|
|
385
|
+
static DownloadReportResponse() {
|
|
457
386
|
return Joi.object({
|
|
458
|
-
|
|
459
|
-
page_size: Joi.number(),
|
|
460
|
-
type: Joi.string().allow(""),
|
|
387
|
+
file_name: Joi.string().allow(""),
|
|
461
388
|
});
|
|
462
389
|
}
|
|
463
390
|
|
|
464
|
-
/** @returns {
|
|
465
|
-
static
|
|
391
|
+
/** @returns {EventProcessReports} */
|
|
392
|
+
static EventProcessReports() {
|
|
466
393
|
return Joi.object({
|
|
467
|
-
|
|
394
|
+
rows: Joi.array().items(WebhookPlatformModel.EventProcessReportObject()),
|
|
468
395
|
page: WebhookPlatformModel.Page(),
|
|
469
396
|
});
|
|
470
397
|
}
|
|
471
398
|
|
|
472
|
-
/** @returns {
|
|
473
|
-
static
|
|
399
|
+
/** @returns {EventProcessReportObject} */
|
|
400
|
+
static EventProcessReportObject() {
|
|
474
401
|
return Joi.object({
|
|
475
|
-
|
|
402
|
+
event_name: Joi.string().allow(""),
|
|
403
|
+
response_code: Joi.number(),
|
|
404
|
+
response_message: Joi.string().allow(""),
|
|
405
|
+
data: Joi.object().pattern(/\S/, Joi.any()),
|
|
406
|
+
attempt: Joi.number(),
|
|
407
|
+
last_attempted_on: Joi.number(),
|
|
476
408
|
status: Joi.string().allow(""),
|
|
409
|
+
name: Joi.string().allow(""),
|
|
410
|
+
webhook_url: Joi.string().allow(""),
|
|
411
|
+
response_time: Joi.number(),
|
|
412
|
+
message_id: Joi.string().allow(""),
|
|
413
|
+
event_trace_id: Joi.string().allow(""),
|
|
477
414
|
});
|
|
478
415
|
}
|
|
479
416
|
|
|
480
417
|
/** @returns {Page} */
|
|
481
418
|
static Page() {
|
|
482
419
|
return Joi.object({
|
|
483
|
-
current: Joi.number(),
|
|
484
|
-
has_next: Joi.boolean(),
|
|
485
|
-
has_previous: Joi.boolean(),
|
|
486
420
|
item_total: Joi.number(),
|
|
487
421
|
next_id: Joi.string().allow(""),
|
|
488
|
-
|
|
422
|
+
has_previous: Joi.boolean(),
|
|
423
|
+
has_next: Joi.boolean(),
|
|
424
|
+
current: Joi.number(),
|
|
489
425
|
type: Joi.string().allow("").required(),
|
|
426
|
+
size: Joi.number(),
|
|
490
427
|
});
|
|
491
428
|
}
|
|
492
429
|
|
|
493
430
|
/** @returns {PingWebhook} */
|
|
494
431
|
static PingWebhook() {
|
|
495
432
|
return Joi.object({
|
|
433
|
+
webhook_url: Joi.string().allow(""),
|
|
496
434
|
auth_meta: Joi.any(),
|
|
497
435
|
custom_headers: Joi.any(),
|
|
498
|
-
webhook_url: Joi.string().allow(""),
|
|
499
436
|
});
|
|
500
437
|
}
|
|
501
438
|
|
|
502
439
|
/** @returns {PingWebhookResponse} */
|
|
503
440
|
static PingWebhookResponse() {
|
|
504
441
|
return Joi.object({
|
|
505
|
-
code: Joi.number(),
|
|
506
|
-
message: Joi.string().allow(""),
|
|
507
442
|
status: Joi.string().allow(""),
|
|
443
|
+
message: Joi.string().allow(""),
|
|
444
|
+
code: Joi.number(),
|
|
508
445
|
});
|
|
509
446
|
}
|
|
510
447
|
|
|
511
|
-
/** @returns {
|
|
512
|
-
static
|
|
448
|
+
/** @returns {EventConfig} */
|
|
449
|
+
static EventConfig() {
|
|
513
450
|
return Joi.object({
|
|
514
|
-
|
|
515
|
-
|
|
451
|
+
id: Joi.number(),
|
|
452
|
+
event_name: Joi.string().allow(""),
|
|
453
|
+
event_type: Joi.string().allow(""),
|
|
454
|
+
event_category: Joi.string().allow(""),
|
|
455
|
+
event_schema: Joi.object().pattern(/\S/, Joi.any()),
|
|
456
|
+
version: Joi.string().allow(""),
|
|
457
|
+
display_name: Joi.string().allow(""),
|
|
458
|
+
description: Joi.string().allow("").allow(null),
|
|
459
|
+
created_on: Joi.string().allow(""),
|
|
460
|
+
updated_on: Joi.string().allow(""),
|
|
461
|
+
});
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
/** @returns {EventConfigResponse} */
|
|
465
|
+
static EventConfigResponse() {
|
|
466
|
+
return Joi.object({
|
|
467
|
+
event_configs: Joi.array().items(WebhookPlatformModel.EventConfig()),
|
|
516
468
|
});
|
|
517
469
|
}
|
|
518
470
|
|
|
@@ -523,123 +475,171 @@ class WebhookPlatformModel {
|
|
|
523
475
|
});
|
|
524
476
|
}
|
|
525
477
|
|
|
526
|
-
/** @returns {
|
|
527
|
-
static
|
|
478
|
+
/** @returns {ReportFilterResponse} */
|
|
479
|
+
static ReportFilterResponse() {
|
|
528
480
|
return Joi.object({
|
|
529
|
-
|
|
481
|
+
filter_name: Joi.string().allow(""),
|
|
482
|
+
values: Joi.array().items(Joi.object().pattern(/\S/, Joi.any())),
|
|
530
483
|
});
|
|
531
484
|
}
|
|
532
485
|
|
|
533
|
-
/** @returns {
|
|
534
|
-
static
|
|
486
|
+
/** @returns {HistoryPayload} */
|
|
487
|
+
static HistoryPayload() {
|
|
535
488
|
return Joi.object({
|
|
536
|
-
|
|
537
|
-
|
|
489
|
+
type: Joi.string().allow(""),
|
|
490
|
+
page_no: Joi.number(),
|
|
491
|
+
page_size: Joi.number(),
|
|
492
|
+
});
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
/** @returns {HistoryFilters} */
|
|
496
|
+
static HistoryFilters() {
|
|
497
|
+
return Joi.object({
|
|
498
|
+
events: Joi.array().items(Joi.string().allow("")),
|
|
538
499
|
search_text: Joi.string().allow(""),
|
|
539
|
-
start_date: Joi.string().allow(""),
|
|
540
500
|
status: Joi.string().allow(""),
|
|
541
|
-
|
|
501
|
+
end_date: Joi.string().allow(""),
|
|
502
|
+
start_date: Joi.string().allow(""),
|
|
503
|
+
subscribers: Joi.array().items(Joi.number()),
|
|
542
504
|
});
|
|
543
505
|
}
|
|
544
506
|
|
|
545
|
-
/** @returns {
|
|
546
|
-
static
|
|
507
|
+
/** @returns {Url} */
|
|
508
|
+
static Url() {
|
|
547
509
|
return Joi.object({
|
|
548
|
-
|
|
510
|
+
url: Joi.string().allow(""),
|
|
511
|
+
name: Joi.string().allow(""),
|
|
549
512
|
});
|
|
550
513
|
}
|
|
551
514
|
|
|
552
|
-
/** @returns {
|
|
553
|
-
static
|
|
515
|
+
/** @returns {CdnObject} */
|
|
516
|
+
static CdnObject() {
|
|
554
517
|
return Joi.object({
|
|
555
|
-
|
|
556
|
-
status: Joi.string().allow(""),
|
|
557
|
-
success_count: Joi.number(),
|
|
558
|
-
total_event: Joi.number(),
|
|
518
|
+
urls: Joi.array().items(WebhookPlatformModel.Url()),
|
|
559
519
|
});
|
|
560
520
|
}
|
|
561
521
|
|
|
562
|
-
/** @returns {
|
|
563
|
-
static
|
|
522
|
+
/** @returns {UploadServiceObject} */
|
|
523
|
+
static UploadServiceObject() {
|
|
564
524
|
return Joi.object({
|
|
565
|
-
|
|
566
|
-
success: Joi.boolean(),
|
|
525
|
+
cdn: WebhookPlatformModel.CdnObject(),
|
|
567
526
|
});
|
|
568
527
|
}
|
|
569
528
|
|
|
570
|
-
/** @returns {
|
|
571
|
-
static
|
|
529
|
+
/** @returns {HistoryAssociation} */
|
|
530
|
+
static HistoryAssociation() {
|
|
531
|
+
return Joi.object({
|
|
532
|
+
company_id: Joi.number(),
|
|
533
|
+
subscriber_ids: Joi.array().items(Joi.number()),
|
|
534
|
+
});
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
/** @returns {HistoryItems} */
|
|
538
|
+
static HistoryItems() {
|
|
572
539
|
return Joi.object({
|
|
573
|
-
association: WebhookPlatformModel.Association(),
|
|
574
|
-
auth_meta: WebhookPlatformModel.AuthMeta(),
|
|
575
|
-
custom_headers: Joi.any(),
|
|
576
|
-
email_id: Joi.string().allow(""),
|
|
577
|
-
event_id: Joi.array().items(Joi.number()),
|
|
578
540
|
id: Joi.number(),
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
541
|
+
association: WebhookPlatformModel.HistoryAssociation(),
|
|
542
|
+
filters: WebhookPlatformModel.HistoryFilters(),
|
|
543
|
+
filename: Joi.string().allow(""),
|
|
544
|
+
status: Joi.string().allow(""),
|
|
545
|
+
upload_service_response: WebhookPlatformModel.UploadServiceObject(),
|
|
546
|
+
created_on: Joi.string().allow(""),
|
|
547
|
+
updated_on: Joi.string().allow("").allow(null),
|
|
548
|
+
message: Joi.string().allow(""),
|
|
582
549
|
});
|
|
583
550
|
}
|
|
584
551
|
|
|
585
|
-
/** @returns {
|
|
586
|
-
static
|
|
552
|
+
/** @returns {HistoryResponse} */
|
|
553
|
+
static HistoryResponse() {
|
|
587
554
|
return Joi.object({
|
|
588
|
-
items: Joi.array().items(WebhookPlatformModel.
|
|
555
|
+
items: Joi.array().items(WebhookPlatformModel.HistoryItems()),
|
|
589
556
|
page: WebhookPlatformModel.Page(),
|
|
590
557
|
});
|
|
591
558
|
}
|
|
592
559
|
|
|
593
|
-
/** @returns {
|
|
594
|
-
static
|
|
560
|
+
/** @returns {CancelResponse} */
|
|
561
|
+
static CancelResponse() {
|
|
595
562
|
return Joi.object({
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
563
|
+
message: Joi.string().allow(""),
|
|
564
|
+
});
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
/** @returns {Association} */
|
|
568
|
+
static Association() {
|
|
569
|
+
return Joi.object({
|
|
570
|
+
company_id: Joi.number(),
|
|
571
|
+
application_id: Joi.array().items(Joi.string().allow("")),
|
|
572
|
+
extension_id: Joi.string().allow(""),
|
|
573
|
+
criteria: Joi.string().allow(""),
|
|
574
|
+
});
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
/** @returns {AuthMeta} */
|
|
578
|
+
static AuthMeta() {
|
|
579
|
+
return Joi.object({
|
|
580
|
+
type: Joi.string().allow(""),
|
|
581
|
+
secret: Joi.string().allow(""),
|
|
609
582
|
});
|
|
610
583
|
}
|
|
611
584
|
|
|
612
585
|
/** @returns {SubscriberResponse} */
|
|
613
586
|
static SubscriberResponse() {
|
|
614
587
|
return Joi.object({
|
|
588
|
+
id: Joi.number(),
|
|
589
|
+
modified_by: Joi.string().allow(""),
|
|
590
|
+
name: Joi.string().allow(""),
|
|
591
|
+
webhook_url: Joi.string().allow(""),
|
|
615
592
|
association: WebhookPlatformModel.Association(),
|
|
616
|
-
auth_meta: WebhookPlatformModel.AuthMeta(),
|
|
617
|
-
created_on: Joi.string().allow(""),
|
|
618
593
|
custom_headers: Joi.any(),
|
|
594
|
+
status: WebhookPlatformModel.SubscriberStatus(),
|
|
619
595
|
email_id: Joi.string().allow(""),
|
|
596
|
+
updated_on: Joi.string().allow(""),
|
|
597
|
+
created_on: Joi.string().allow(""),
|
|
598
|
+
type: Joi.string().allow("").allow(null),
|
|
599
|
+
auth_meta: WebhookPlatformModel.AuthMeta(),
|
|
620
600
|
event_configs: Joi.array().items(WebhookPlatformModel.EventConfig()),
|
|
601
|
+
});
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
/** @returns {SubscriberConfig} */
|
|
605
|
+
static SubscriberConfig() {
|
|
606
|
+
return Joi.object({
|
|
621
607
|
id: Joi.number(),
|
|
622
|
-
modified_by: Joi.string().allow(""),
|
|
623
608
|
name: Joi.string().allow(""),
|
|
624
|
-
status: WebhookPlatformModel.SubscriberStatus(),
|
|
625
|
-
type: Joi.string().allow("").allow(null),
|
|
626
|
-
updated_on: Joi.string().allow(""),
|
|
627
609
|
webhook_url: Joi.string().allow(""),
|
|
610
|
+
association: WebhookPlatformModel.Association(),
|
|
611
|
+
custom_headers: Joi.any(),
|
|
612
|
+
status: WebhookPlatformModel.SubscriberStatus(),
|
|
613
|
+
email_id: Joi.string().allow(""),
|
|
614
|
+
auth_meta: WebhookPlatformModel.AuthMeta(),
|
|
615
|
+
event_id: Joi.array().items(Joi.number()),
|
|
628
616
|
});
|
|
629
617
|
}
|
|
630
618
|
|
|
631
|
-
/** @returns {
|
|
632
|
-
static
|
|
619
|
+
/** @returns {SubscriberConfigResponse} */
|
|
620
|
+
static SubscriberConfigResponse() {
|
|
633
621
|
return Joi.object({
|
|
634
|
-
|
|
622
|
+
id: Joi.number(),
|
|
623
|
+
modified_by: Joi.string().allow(""),
|
|
624
|
+
name: Joi.string().allow(""),
|
|
625
|
+
webhook_url: Joi.string().allow(""),
|
|
626
|
+
association: WebhookPlatformModel.Association(),
|
|
627
|
+
custom_headers: Joi.any(),
|
|
628
|
+
status: WebhookPlatformModel.SubscriberStatus(),
|
|
629
|
+
email_id: Joi.string().allow(""),
|
|
630
|
+
updated_on: Joi.string().allow(""),
|
|
631
|
+
created_on: Joi.string().allow(""),
|
|
632
|
+
type: Joi.string().allow("").allow(null),
|
|
633
|
+
auth_meta: WebhookPlatformModel.AuthMeta(),
|
|
634
|
+
event_id: Joi.array().items(Joi.number()),
|
|
635
635
|
});
|
|
636
636
|
}
|
|
637
637
|
|
|
638
|
-
/** @returns {
|
|
639
|
-
static
|
|
638
|
+
/** @returns {SubscriberConfigList} */
|
|
639
|
+
static SubscriberConfigList() {
|
|
640
640
|
return Joi.object({
|
|
641
|
-
|
|
642
|
-
|
|
641
|
+
items: Joi.array().items(WebhookPlatformModel.SubscriberResponse()),
|
|
642
|
+
page: WebhookPlatformModel.Page(),
|
|
643
643
|
});
|
|
644
644
|
}
|
|
645
645
|
|