@gofynd/fdk-client-javascript 1.4.2-beta.2 → 1.4.2-beta.4
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 +852 -846
- package/sdk/application/Order/OrderApplicationModel.js +828 -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 +2176 -2145
- package/sdk/application/Payment/PaymentApplicationModel.js +1474 -1453
- 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/UserApplicationClient.d.ts +2 -2
- package/sdk/application/User/UserApplicationClient.js +4 -7
- package/sdk/application/User/UserApplicationModel.d.ts +769 -764
- package/sdk/application/User/UserApplicationModel.js +731 -741
- 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/CatalogPlatformApplicationClient.d.ts +26 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +182 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +70 -1
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +44 -0
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1013 -980
- package/sdk/platform/Catalog/CatalogPlatformModel.js +977 -933
- 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 +1842 -1825
- package/sdk/platform/Content/ContentPlatformModel.js +1868 -1848
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +245 -245
- package/sdk/platform/Discount/DiscountPlatformModel.js +248 -248
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +4 -1
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +2 -0
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +2 -0
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +2 -2
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +7 -4
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +882 -869
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +894 -878
- 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 +5192 -5176
- package/sdk/platform/Order/OrderPlatformModel.js +4752 -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 +2693 -2657
- package/sdk/platform/Payment/PaymentPlatformModel.js +1842 -1819
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +204 -204
- package/sdk/platform/Rewards/RewardsPlatformModel.js +199 -199
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +7 -6
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +11 -10
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1674 -1539
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1663 -1534
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +4 -4
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +4 -4
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/Share/SharePlatformApplicationClient.js +19 -6
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +13 -3
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +6 -2
- 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 +823 -753
- package/sdk/platform/User/UserPlatformModel.js +731 -661
- 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,83 +1,74 @@
|
|
|
1
1
|
const Joi = require("joi");
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @typedef
|
|
5
|
-
* @property {string[]} [application_id]
|
|
6
|
-
* @property {number} [company_id]
|
|
7
|
-
* @property {string} [criteria]
|
|
8
|
-
* @property {string} [extension_id]
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* @typedef AuthMeta
|
|
13
|
-
* @property {string} [secret]
|
|
14
|
-
* @property {string} [type]
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* @typedef CancelDownloadResponse
|
|
4
|
+
* @typedef UpdateSubscriberResponse
|
|
19
5
|
* @property {string} [message]
|
|
20
|
-
* @property {string} [result]
|
|
21
6
|
*/
|
|
22
7
|
|
|
23
8
|
/**
|
|
24
|
-
* @typedef
|
|
25
|
-
* @property {
|
|
9
|
+
* @typedef UpdateSubscriberRequest
|
|
10
|
+
* @property {string} [status]
|
|
26
11
|
*/
|
|
27
12
|
|
|
28
13
|
/**
|
|
29
|
-
* @typedef
|
|
30
|
-
* @property {
|
|
31
|
-
* @property {string} [
|
|
32
|
-
* @property {
|
|
33
|
-
* @property {
|
|
34
|
-
* @property {number} [page_size]
|
|
35
|
-
* @property {string} [start_date]
|
|
36
|
-
* @property {string} [status]
|
|
14
|
+
* @typedef Association
|
|
15
|
+
* @property {number} [company_id]
|
|
16
|
+
* @property {string[]} [application_id]
|
|
17
|
+
* @property {string} [extension_id]
|
|
18
|
+
* @property {string} [criteria]
|
|
37
19
|
*/
|
|
38
20
|
|
|
39
21
|
/**
|
|
40
|
-
* @typedef
|
|
41
|
-
* @property {
|
|
42
|
-
* @property {
|
|
22
|
+
* @typedef AuthMeta
|
|
23
|
+
* @property {string} [type]
|
|
24
|
+
* @property {string} [secret]
|
|
43
25
|
*/
|
|
44
26
|
|
|
45
27
|
/**
|
|
46
|
-
* @typedef
|
|
47
|
-
* @property {
|
|
48
|
-
* @property {number} [
|
|
49
|
-
* @property {number} [
|
|
50
|
-
* @property {
|
|
51
|
-
* @property {number} [response_time]
|
|
52
|
-
* @property {number} [success]
|
|
53
|
-
* @property {number} [total]
|
|
28
|
+
* @typedef SubscriberEventMapping
|
|
29
|
+
* @property {number} [id]
|
|
30
|
+
* @property {number} [event_id]
|
|
31
|
+
* @property {number} [subscriber_id]
|
|
32
|
+
* @property {string} [created_on]
|
|
54
33
|
*/
|
|
55
34
|
|
|
56
35
|
/**
|
|
57
|
-
* @typedef
|
|
58
|
-
* @property {
|
|
59
|
-
* @property {
|
|
36
|
+
* @typedef EventConfigResponse
|
|
37
|
+
* @property {number} [id]
|
|
38
|
+
* @property {string} [event_name]
|
|
39
|
+
* @property {string} [event_type]
|
|
40
|
+
* @property {string} [event_category]
|
|
41
|
+
* @property {Object} [event_schema]
|
|
42
|
+
* @property {string} [version]
|
|
43
|
+
* @property {string} [display_name]
|
|
44
|
+
* @property {string} [description]
|
|
45
|
+
* @property {string} [created_on]
|
|
46
|
+
* @property {string} [updated_on]
|
|
47
|
+
* @property {SubscriberEventMapping} [subscriber_event_mapping]
|
|
60
48
|
*/
|
|
61
49
|
|
|
62
50
|
/**
|
|
63
|
-
* @typedef
|
|
64
|
-
* @property {
|
|
65
|
-
* @property {
|
|
66
|
-
* @property {number} [response_time]
|
|
67
|
-
* @property {number} [success]
|
|
51
|
+
* @typedef SubscriberConfigResponse
|
|
52
|
+
* @property {ItemSchema[]} [items]
|
|
53
|
+
* @property {Page} [page]
|
|
68
54
|
*/
|
|
69
55
|
|
|
70
56
|
/**
|
|
71
|
-
* @typedef
|
|
72
|
-
* @property {
|
|
57
|
+
* @typedef InvalidEventsRequest
|
|
58
|
+
* @property {string} [event_name]
|
|
59
|
+
* @property {string} [version]
|
|
60
|
+
* @property {string} [category]
|
|
61
|
+
* @property {string} [start_date]
|
|
62
|
+
* @property {string} [end_date]
|
|
73
63
|
*/
|
|
74
64
|
|
|
75
65
|
/**
|
|
76
|
-
* @typedef
|
|
77
|
-
* @property {
|
|
78
|
-
* @property {
|
|
79
|
-
* @property {
|
|
80
|
-
* @property {string} [
|
|
66
|
+
* @typedef InvalidEventsResponse
|
|
67
|
+
* @property {string} [event_name]
|
|
68
|
+
* @property {string} [event_type]
|
|
69
|
+
* @property {string} [version]
|
|
70
|
+
* @property {string} [category]
|
|
71
|
+
* @property {number} [count]
|
|
81
72
|
*/
|
|
82
73
|
|
|
83
74
|
/**
|
|
@@ -86,48 +77,30 @@ const Joi = require("joi");
|
|
|
86
77
|
*/
|
|
87
78
|
|
|
88
79
|
/**
|
|
89
|
-
* @typedef
|
|
90
|
-
* @property {string} [
|
|
91
|
-
* @property {string} [
|
|
92
|
-
* @property {string} [
|
|
93
|
-
* @property {string} [
|
|
94
|
-
* @property {string} [
|
|
95
|
-
* @property {
|
|
96
|
-
*
|
|
97
|
-
* @property {number} [id]
|
|
98
|
-
* @property {SubscriberEventMapping} [subscriber_event_mapping]
|
|
99
|
-
* @property {string} [updated_on]
|
|
100
|
-
* @property {string} [version]
|
|
80
|
+
* @typedef HistoryFilters
|
|
81
|
+
* @property {string[]} [events]
|
|
82
|
+
* @property {string} [search_text]
|
|
83
|
+
* @property {string} [status] - The status of the history report (e.g., "FAILED").
|
|
84
|
+
* @property {string} [end_date] - The end date and time of the history report.
|
|
85
|
+
* @property {string} [start_date] - The start date and time of the history report.
|
|
86
|
+
* @property {number[]} [subscribers] - An array of subscriber IDs associated
|
|
87
|
+
* with the history report.
|
|
101
88
|
*/
|
|
102
89
|
|
|
103
90
|
/**
|
|
104
|
-
* @typedef
|
|
105
|
-
* @property {string} [
|
|
106
|
-
* @property {string} [
|
|
107
|
-
* @property {string} [event_type]
|
|
108
|
-
* @property {string} [version]
|
|
91
|
+
* @typedef Url
|
|
92
|
+
* @property {string} [url] - The URL of the uploaded report file.
|
|
93
|
+
* @property {string} [name] - The name of the uploaded report file.
|
|
109
94
|
*/
|
|
110
95
|
|
|
111
96
|
/**
|
|
112
|
-
* @typedef
|
|
113
|
-
* @property {
|
|
114
|
-
* @property {Object} [data] - The data associated with the event.
|
|
115
|
-
* @property {string} [event_name] - The name of the processed event.
|
|
116
|
-
* @property {string} [event_trace_id]
|
|
117
|
-
* @property {number} [last_attempted_on] - The timestamp of the last attempted event.
|
|
118
|
-
* @property {string} [message_id]
|
|
119
|
-
* @property {string} [name] - The name of the event.
|
|
120
|
-
* @property {number} [response_code] - The response code of the event.
|
|
121
|
-
* @property {string} [response_message] - The response message of the event.
|
|
122
|
-
* @property {number} [response_time] - The response time of the event.
|
|
123
|
-
* @property {string} [status] - The status of the event (e.g., "FAILED").
|
|
124
|
-
* @property {string} [webhook_url] - The webhook URL associated with the event.
|
|
97
|
+
* @typedef CdnObject
|
|
98
|
+
* @property {Url[]} [urls]
|
|
125
99
|
*/
|
|
126
100
|
|
|
127
101
|
/**
|
|
128
|
-
* @typedef
|
|
129
|
-
* @property {
|
|
130
|
-
* @property {Object[]} [values]
|
|
102
|
+
* @typedef UploadServiceObject
|
|
103
|
+
* @property {CdnObject} [cdn]
|
|
131
104
|
*/
|
|
132
105
|
|
|
133
106
|
/**
|
|
@@ -136,230 +109,242 @@ const Joi = require("joi");
|
|
|
136
109
|
* @property {number[]} [subscriber_ids]
|
|
137
110
|
*/
|
|
138
111
|
|
|
139
|
-
/**
|
|
140
|
-
* @typedef HistoryFilters
|
|
141
|
-
* @property {string} [end_date] - The end date and time of the history report.
|
|
142
|
-
* @property {string[]} [events]
|
|
143
|
-
* @property {string} [search_text]
|
|
144
|
-
* @property {string} [start_date] - The start date and time of the history report.
|
|
145
|
-
* @property {string} [status] - The status of the history report (e.g., "FAILED").
|
|
146
|
-
* @property {number[]} [subscribers] - An array of subscriber IDs associated
|
|
147
|
-
* with the history report.
|
|
148
|
-
*/
|
|
149
|
-
|
|
150
112
|
/**
|
|
151
113
|
* @typedef HistoryItems
|
|
114
|
+
* @property {number} [id] - The ID of the history report.
|
|
152
115
|
* @property {HistoryAssociation} [association]
|
|
153
|
-
* @property {string} [created_on] - The date and time when the history report
|
|
154
|
-
* was created.
|
|
155
|
-
* @property {string} [filename] - The filename of the history report.
|
|
156
116
|
* @property {HistoryFilters} [filters]
|
|
157
|
-
* @property {
|
|
158
|
-
* @property {string} [message] - A message related to the history report.
|
|
117
|
+
* @property {string} [filename] - The filename of the history report.
|
|
159
118
|
* @property {string} [status] - The status of the history report (e.g., "COMPLETED").
|
|
119
|
+
* @property {UploadServiceObject} [upload_service_response]
|
|
120
|
+
* @property {string} [created_on] - The date and time when the history report
|
|
121
|
+
* was created.
|
|
160
122
|
* @property {string} [updated_on] - The date and time when the history report
|
|
161
123
|
* was last updated.
|
|
162
|
-
* @property {
|
|
124
|
+
* @property {string} [message] - A message related to the history report.
|
|
125
|
+
*/
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* @typedef HistoryResponse
|
|
129
|
+
* @property {HistoryItems[]} [items]
|
|
130
|
+
* @property {Page} [page]
|
|
163
131
|
*/
|
|
164
132
|
|
|
165
133
|
/**
|
|
166
134
|
* @typedef HistoryPayload
|
|
167
135
|
* @property {number} [company_id]
|
|
136
|
+
* @property {string} [type] - The type of history report (e.g., "platform").
|
|
168
137
|
* @property {number} [page_no] - The page number of the history report.
|
|
169
138
|
* @property {number} [page_size] - The number of records per page.
|
|
170
|
-
* @property {string} [type] - The type of history report (e.g., "platform").
|
|
171
139
|
*/
|
|
172
140
|
|
|
173
141
|
/**
|
|
174
|
-
* @typedef
|
|
175
|
-
* @property {
|
|
176
|
-
* @property {
|
|
142
|
+
* @typedef CancelDownloadResponse
|
|
143
|
+
* @property {string} [message]
|
|
144
|
+
* @property {string} [result]
|
|
177
145
|
*/
|
|
178
146
|
|
|
179
147
|
/**
|
|
180
|
-
* @typedef
|
|
181
|
-
* @property {string} [
|
|
182
|
-
* @property {
|
|
183
|
-
* @property {string} [event_name]
|
|
184
|
-
* @property {string} [start_date]
|
|
185
|
-
* @property {string} [version]
|
|
148
|
+
* @typedef FilterReportResponse
|
|
149
|
+
* @property {string} [filter_name]
|
|
150
|
+
* @property {Object[]} [values]
|
|
186
151
|
*/
|
|
187
152
|
|
|
188
153
|
/**
|
|
189
|
-
* @typedef
|
|
190
|
-
* @property {
|
|
191
|
-
* @property {number} [count]
|
|
192
|
-
* @property {string} [event_name]
|
|
193
|
-
* @property {string} [event_type]
|
|
194
|
-
* @property {string} [version]
|
|
154
|
+
* @typedef DeliveryTsResponse
|
|
155
|
+
* @property {DeliveryTsSchema[]} [delivery_ts]
|
|
195
156
|
*/
|
|
196
157
|
|
|
197
158
|
/**
|
|
198
|
-
* @typedef
|
|
199
|
-
* @property {
|
|
200
|
-
* @property {
|
|
201
|
-
* @property {
|
|
202
|
-
* @property {
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
* @
|
|
207
|
-
* @property {string} [
|
|
208
|
-
* @property {
|
|
159
|
+
* @typedef DeliveryTsSchema
|
|
160
|
+
* @property {string} [timestamp]
|
|
161
|
+
* @property {number} [failed]
|
|
162
|
+
* @property {number} [removed_webhooks]
|
|
163
|
+
* @property {number} [success]
|
|
164
|
+
*/
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* @typedef DeliveryDetailsRequest
|
|
168
|
+
* @property {string} [company_id]
|
|
169
|
+
* @property {number} [page_no]
|
|
170
|
+
* @property {number} [page_size]
|
|
171
|
+
* @property {string} [start_date]
|
|
172
|
+
* @property {string} [end_date]
|
|
173
|
+
* @property {EventDeliveryDetailSchema[]} [event]
|
|
209
174
|
* @property {string} [status]
|
|
210
|
-
* @property {string} [type]
|
|
211
|
-
* @property {string} [updated_on]
|
|
212
|
-
* @property {string} [webhook_url]
|
|
213
175
|
*/
|
|
214
176
|
|
|
215
177
|
/**
|
|
216
|
-
* @typedef
|
|
217
|
-
* @property {
|
|
218
|
-
* @property {
|
|
219
|
-
* @property {
|
|
220
|
-
* @property {
|
|
221
|
-
* @property {string} [next_id]
|
|
222
|
-
* @property {number} [size]
|
|
223
|
-
* @property {string} type
|
|
178
|
+
* @typedef EventDeliveryDetailSchema
|
|
179
|
+
* @property {string} [event_name]
|
|
180
|
+
* @property {string} [event_type]
|
|
181
|
+
* @property {string} [event_category]
|
|
182
|
+
* @property {string} [version]
|
|
224
183
|
*/
|
|
225
184
|
|
|
226
185
|
/**
|
|
227
|
-
* @typedef
|
|
228
|
-
* @property {
|
|
186
|
+
* @typedef DeliveryDetailsResponse
|
|
187
|
+
* @property {EventProcessReportObject[]} [rows]
|
|
229
188
|
* @property {Page} [page]
|
|
230
189
|
*/
|
|
231
190
|
|
|
232
191
|
/**
|
|
233
|
-
* @typedef
|
|
234
|
-
* @property {string} [
|
|
235
|
-
* @property {number} [
|
|
236
|
-
* @property {
|
|
237
|
-
* @property {
|
|
192
|
+
* @typedef EventProcessReportObject
|
|
193
|
+
* @property {string} [event_name] - The name of the processed event.
|
|
194
|
+
* @property {number} [response_code] - The response code of the event.
|
|
195
|
+
* @property {string} [response_message] - The response message of the event.
|
|
196
|
+
* @property {Object} [data] - The data associated with the event.
|
|
197
|
+
* @property {number} [attempt] - The attempt number of the event.
|
|
198
|
+
* @property {number} [last_attempted_on] - The timestamp of the last attempted event.
|
|
199
|
+
* @property {string} [status] - The status of the event (e.g., "FAILED").
|
|
200
|
+
* @property {string} [name] - The name of the event.
|
|
201
|
+
* @property {string} [webhook_url] - The webhook URL associated with the event.
|
|
202
|
+
* @property {number} [response_time] - The response time of the event.
|
|
203
|
+
* @property {string} [message_id]
|
|
204
|
+
* @property {string} [event_trace_id]
|
|
238
205
|
*/
|
|
239
206
|
|
|
240
207
|
/**
|
|
241
|
-
* @typedef
|
|
242
|
-
* @property {
|
|
208
|
+
* @typedef Page
|
|
209
|
+
* @property {number} [item_total]
|
|
210
|
+
* @property {string} [next_id]
|
|
211
|
+
* @property {boolean} [has_previous]
|
|
212
|
+
* @property {boolean} [has_next]
|
|
213
|
+
* @property {number} [current]
|
|
214
|
+
* @property {string} type
|
|
215
|
+
* @property {number} [size]
|
|
243
216
|
*/
|
|
244
217
|
|
|
245
218
|
/**
|
|
246
|
-
* @typedef
|
|
247
|
-
* @property {string} [
|
|
219
|
+
* @typedef DeliveryEventLevelSchema
|
|
220
|
+
* @property {string} [event]
|
|
221
|
+
* @property {number} [success]
|
|
222
|
+
* @property {number} [failed]
|
|
223
|
+
* @property {number} [failed_percentage]
|
|
224
|
+
* @property {number} [removed_webhooks]
|
|
225
|
+
* @property {number} [total]
|
|
226
|
+
* @property {number} [response_time]
|
|
248
227
|
*/
|
|
249
228
|
|
|
250
229
|
/**
|
|
251
|
-
* @typedef
|
|
252
|
-
* @property {
|
|
230
|
+
* @typedef DeliverySummaryResponse
|
|
231
|
+
* @property {DeliveryEventLevelSchema[]} [delivery_event_level]
|
|
232
|
+
* @property {DeliverySummarySchema} [delivery_summary]
|
|
253
233
|
*/
|
|
254
234
|
|
|
255
235
|
/**
|
|
256
|
-
* @typedef
|
|
257
|
-
* @property {
|
|
258
|
-
* @property {
|
|
236
|
+
* @typedef DeliverySummarySchema
|
|
237
|
+
* @property {number} [success]
|
|
238
|
+
* @property {number} [response_time]
|
|
239
|
+
* @property {number} [failed_percentage]
|
|
240
|
+
* @property {number} [removed_webhooks]
|
|
259
241
|
*/
|
|
260
242
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
}
|
|
243
|
+
/**
|
|
244
|
+
* @typedef ItemSchema
|
|
245
|
+
* @property {number} [id]
|
|
246
|
+
* @property {string} [modified_by]
|
|
247
|
+
* @property {string} [name]
|
|
248
|
+
* @property {string} [webhook_url]
|
|
249
|
+
* @property {Association} [association]
|
|
250
|
+
* @property {Object} [custom_headers]
|
|
251
|
+
* @property {string} [status]
|
|
252
|
+
* @property {string} [email_id]
|
|
253
|
+
* @property {string} [updated_on]
|
|
254
|
+
* @property {string} [created_on]
|
|
255
|
+
* @property {string} [type]
|
|
256
|
+
* @property {AuthMeta} [auth_meta]
|
|
257
|
+
* @property {EventConfigResponse[]} [event_configs]
|
|
258
|
+
* @property {number[]} [event_id]
|
|
259
|
+
*/
|
|
279
260
|
|
|
280
|
-
|
|
281
|
-
|
|
261
|
+
class WebhookPartnerModel {
|
|
262
|
+
/** @returns {UpdateSubscriberResponse} */
|
|
263
|
+
static UpdateSubscriberResponse() {
|
|
282
264
|
return Joi.object({
|
|
283
265
|
message: Joi.string().allow(""),
|
|
284
|
-
result: Joi.string().allow(""),
|
|
285
266
|
});
|
|
286
267
|
}
|
|
287
268
|
|
|
288
|
-
/** @returns {
|
|
289
|
-
static
|
|
269
|
+
/** @returns {UpdateSubscriberRequest} */
|
|
270
|
+
static UpdateSubscriberRequest() {
|
|
290
271
|
return Joi.object({
|
|
291
|
-
|
|
272
|
+
status: Joi.string().allow(""),
|
|
292
273
|
});
|
|
293
274
|
}
|
|
294
275
|
|
|
295
|
-
/** @returns {
|
|
296
|
-
static
|
|
276
|
+
/** @returns {Association} */
|
|
277
|
+
static Association() {
|
|
297
278
|
return Joi.object({
|
|
298
|
-
company_id: Joi.
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
page_size: Joi.number(),
|
|
303
|
-
start_date: Joi.string().allow(""),
|
|
304
|
-
status: Joi.string().allow(""),
|
|
279
|
+
company_id: Joi.number(),
|
|
280
|
+
application_id: Joi.array().items(Joi.string().allow("")),
|
|
281
|
+
extension_id: Joi.string().allow(""),
|
|
282
|
+
criteria: Joi.string().allow(""),
|
|
305
283
|
});
|
|
306
284
|
}
|
|
307
285
|
|
|
308
|
-
/** @returns {
|
|
309
|
-
static
|
|
286
|
+
/** @returns {AuthMeta} */
|
|
287
|
+
static AuthMeta() {
|
|
310
288
|
return Joi.object({
|
|
311
|
-
|
|
312
|
-
|
|
289
|
+
type: Joi.string().allow(""),
|
|
290
|
+
secret: Joi.string().allow(""),
|
|
313
291
|
});
|
|
314
292
|
}
|
|
315
293
|
|
|
316
|
-
/** @returns {
|
|
317
|
-
static
|
|
294
|
+
/** @returns {SubscriberEventMapping} */
|
|
295
|
+
static SubscriberEventMapping() {
|
|
318
296
|
return Joi.object({
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
response_time: Joi.number(),
|
|
324
|
-
success: Joi.number(),
|
|
325
|
-
total: Joi.number(),
|
|
297
|
+
id: Joi.number(),
|
|
298
|
+
event_id: Joi.number(),
|
|
299
|
+
subscriber_id: Joi.number(),
|
|
300
|
+
created_on: Joi.string().allow(""),
|
|
326
301
|
});
|
|
327
302
|
}
|
|
328
303
|
|
|
329
|
-
/** @returns {
|
|
330
|
-
static
|
|
304
|
+
/** @returns {EventConfigResponse} */
|
|
305
|
+
static EventConfigResponse() {
|
|
331
306
|
return Joi.object({
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
),
|
|
335
|
-
|
|
307
|
+
id: Joi.number(),
|
|
308
|
+
event_name: Joi.string().allow(""),
|
|
309
|
+
event_type: Joi.string().allow(""),
|
|
310
|
+
event_category: Joi.string().allow(""),
|
|
311
|
+
event_schema: Joi.object().pattern(/\S/, Joi.any()),
|
|
312
|
+
version: Joi.string().allow(""),
|
|
313
|
+
display_name: Joi.string().allow(""),
|
|
314
|
+
description: Joi.string().allow("").allow(null),
|
|
315
|
+
created_on: Joi.string().allow(""),
|
|
316
|
+
updated_on: Joi.string().allow(""),
|
|
317
|
+
subscriber_event_mapping: WebhookPartnerModel.SubscriberEventMapping(),
|
|
336
318
|
});
|
|
337
319
|
}
|
|
338
320
|
|
|
339
|
-
/** @returns {
|
|
340
|
-
static
|
|
321
|
+
/** @returns {SubscriberConfigResponse} */
|
|
322
|
+
static SubscriberConfigResponse() {
|
|
341
323
|
return Joi.object({
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
response_time: Joi.number(),
|
|
345
|
-
success: Joi.number(),
|
|
324
|
+
items: Joi.array().items(WebhookPartnerModel.ItemSchema()),
|
|
325
|
+
page: WebhookPartnerModel.Page(),
|
|
346
326
|
});
|
|
347
327
|
}
|
|
348
328
|
|
|
349
|
-
/** @returns {
|
|
350
|
-
static
|
|
329
|
+
/** @returns {InvalidEventsRequest} */
|
|
330
|
+
static InvalidEventsRequest() {
|
|
351
331
|
return Joi.object({
|
|
352
|
-
|
|
332
|
+
event_name: Joi.string().allow(""),
|
|
333
|
+
version: Joi.string().allow(""),
|
|
334
|
+
category: Joi.string().allow(""),
|
|
335
|
+
start_date: Joi.string().allow(""),
|
|
336
|
+
end_date: Joi.string().allow(""),
|
|
353
337
|
});
|
|
354
338
|
}
|
|
355
339
|
|
|
356
|
-
/** @returns {
|
|
357
|
-
static
|
|
340
|
+
/** @returns {InvalidEventsResponse} */
|
|
341
|
+
static InvalidEventsResponse() {
|
|
358
342
|
return Joi.object({
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
343
|
+
event_name: Joi.string().allow(""),
|
|
344
|
+
event_type: Joi.string().allow(""),
|
|
345
|
+
version: Joi.string().allow(""),
|
|
346
|
+
category: Joi.string().allow(""),
|
|
347
|
+
count: Joi.number(),
|
|
363
348
|
});
|
|
364
349
|
}
|
|
365
350
|
|
|
@@ -370,56 +355,37 @@ class WebhookPartnerModel {
|
|
|
370
355
|
});
|
|
371
356
|
}
|
|
372
357
|
|
|
373
|
-
/** @returns {
|
|
374
|
-
static
|
|
358
|
+
/** @returns {HistoryFilters} */
|
|
359
|
+
static HistoryFilters() {
|
|
375
360
|
return Joi.object({
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
event_type: Joi.string().allow(""),
|
|
383
|
-
id: Joi.number(),
|
|
384
|
-
subscriber_event_mapping: WebhookPartnerModel.SubscriberEventMapping(),
|
|
385
|
-
updated_on: Joi.string().allow(""),
|
|
386
|
-
version: Joi.string().allow(""),
|
|
361
|
+
events: Joi.array().items(Joi.string().allow("")),
|
|
362
|
+
search_text: Joi.string().allow(""),
|
|
363
|
+
status: Joi.string().allow(""),
|
|
364
|
+
end_date: Joi.string().allow(""),
|
|
365
|
+
start_date: Joi.string().allow(""),
|
|
366
|
+
subscribers: Joi.array().items(Joi.number()),
|
|
387
367
|
});
|
|
388
368
|
}
|
|
389
369
|
|
|
390
|
-
/** @returns {
|
|
391
|
-
static
|
|
370
|
+
/** @returns {Url} */
|
|
371
|
+
static Url() {
|
|
392
372
|
return Joi.object({
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
event_type: Joi.string().allow(""),
|
|
396
|
-
version: Joi.string().allow(""),
|
|
373
|
+
url: Joi.string().allow(""),
|
|
374
|
+
name: Joi.string().allow(""),
|
|
397
375
|
});
|
|
398
376
|
}
|
|
399
377
|
|
|
400
|
-
/** @returns {
|
|
401
|
-
static
|
|
378
|
+
/** @returns {CdnObject} */
|
|
379
|
+
static CdnObject() {
|
|
402
380
|
return Joi.object({
|
|
403
|
-
|
|
404
|
-
data: Joi.object().pattern(/\S/, Joi.any()),
|
|
405
|
-
event_name: Joi.string().allow(""),
|
|
406
|
-
event_trace_id: Joi.string().allow(""),
|
|
407
|
-
last_attempted_on: Joi.number(),
|
|
408
|
-
message_id: Joi.string().allow(""),
|
|
409
|
-
name: Joi.string().allow(""),
|
|
410
|
-
response_code: Joi.number(),
|
|
411
|
-
response_message: Joi.string().allow(""),
|
|
412
|
-
response_time: Joi.number(),
|
|
413
|
-
status: Joi.string().allow(""),
|
|
414
|
-
webhook_url: Joi.string().allow(""),
|
|
381
|
+
urls: Joi.array().items(WebhookPartnerModel.Url()),
|
|
415
382
|
});
|
|
416
383
|
}
|
|
417
384
|
|
|
418
|
-
/** @returns {
|
|
419
|
-
static
|
|
385
|
+
/** @returns {UploadServiceObject} */
|
|
386
|
+
static UploadServiceObject() {
|
|
420
387
|
return Joi.object({
|
|
421
|
-
|
|
422
|
-
values: Joi.array().items(Joi.object().pattern(/\S/, Joi.any())),
|
|
388
|
+
cdn: WebhookPartnerModel.CdnObject(),
|
|
423
389
|
});
|
|
424
390
|
}
|
|
425
391
|
|
|
@@ -431,30 +397,26 @@ class WebhookPartnerModel {
|
|
|
431
397
|
});
|
|
432
398
|
}
|
|
433
399
|
|
|
434
|
-
/** @returns {HistoryFilters} */
|
|
435
|
-
static HistoryFilters() {
|
|
436
|
-
return Joi.object({
|
|
437
|
-
end_date: Joi.string().allow(""),
|
|
438
|
-
events: Joi.array().items(Joi.string().allow("")),
|
|
439
|
-
search_text: Joi.string().allow(""),
|
|
440
|
-
start_date: Joi.string().allow(""),
|
|
441
|
-
status: Joi.string().allow(""),
|
|
442
|
-
subscribers: Joi.array().items(Joi.number()),
|
|
443
|
-
});
|
|
444
|
-
}
|
|
445
|
-
|
|
446
400
|
/** @returns {HistoryItems} */
|
|
447
401
|
static HistoryItems() {
|
|
448
402
|
return Joi.object({
|
|
403
|
+
id: Joi.number(),
|
|
449
404
|
association: WebhookPartnerModel.HistoryAssociation(),
|
|
450
|
-
created_on: Joi.string().allow(""),
|
|
451
|
-
filename: Joi.string().allow(""),
|
|
452
405
|
filters: WebhookPartnerModel.HistoryFilters(),
|
|
453
|
-
|
|
454
|
-
message: Joi.string().allow(""),
|
|
406
|
+
filename: Joi.string().allow(""),
|
|
455
407
|
status: Joi.string().allow(""),
|
|
456
|
-
updated_on: Joi.string().allow("").allow(null),
|
|
457
408
|
upload_service_response: WebhookPartnerModel.UploadServiceObject(),
|
|
409
|
+
created_on: Joi.string().allow(""),
|
|
410
|
+
updated_on: Joi.string().allow("").allow(null),
|
|
411
|
+
message: Joi.string().allow(""),
|
|
412
|
+
});
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
/** @returns {HistoryResponse} */
|
|
416
|
+
static HistoryResponse() {
|
|
417
|
+
return Joi.object({
|
|
418
|
+
items: Joi.array().items(WebhookPartnerModel.HistoryItems()),
|
|
419
|
+
page: WebhookPartnerModel.Page(),
|
|
458
420
|
});
|
|
459
421
|
}
|
|
460
422
|
|
|
@@ -462,121 +424,159 @@ class WebhookPartnerModel {
|
|
|
462
424
|
static HistoryPayload() {
|
|
463
425
|
return Joi.object({
|
|
464
426
|
company_id: Joi.number(),
|
|
427
|
+
type: Joi.string().allow(""),
|
|
465
428
|
page_no: Joi.number(),
|
|
466
429
|
page_size: Joi.number(),
|
|
467
|
-
type: Joi.string().allow(""),
|
|
468
430
|
});
|
|
469
431
|
}
|
|
470
432
|
|
|
471
|
-
/** @returns {
|
|
472
|
-
static
|
|
433
|
+
/** @returns {CancelDownloadResponse} */
|
|
434
|
+
static CancelDownloadResponse() {
|
|
473
435
|
return Joi.object({
|
|
474
|
-
|
|
475
|
-
|
|
436
|
+
message: Joi.string().allow(""),
|
|
437
|
+
result: Joi.string().allow(""),
|
|
476
438
|
});
|
|
477
439
|
}
|
|
478
440
|
|
|
479
|
-
/** @returns {
|
|
480
|
-
static
|
|
441
|
+
/** @returns {FilterReportResponse} */
|
|
442
|
+
static FilterReportResponse() {
|
|
481
443
|
return Joi.object({
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
444
|
+
filter_name: Joi.string().allow(""),
|
|
445
|
+
values: Joi.array().items(Joi.object().pattern(/\S/, Joi.any())),
|
|
446
|
+
});
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
/** @returns {DeliveryTsResponse} */
|
|
450
|
+
static DeliveryTsResponse() {
|
|
451
|
+
return Joi.object({
|
|
452
|
+
delivery_ts: Joi.array().items(WebhookPartnerModel.DeliveryTsSchema()),
|
|
453
|
+
});
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
/** @returns {DeliveryTsSchema} */
|
|
457
|
+
static DeliveryTsSchema() {
|
|
458
|
+
return Joi.object({
|
|
459
|
+
timestamp: Joi.string().allow(""),
|
|
460
|
+
failed: Joi.number(),
|
|
461
|
+
removed_webhooks: Joi.number(),
|
|
462
|
+
success: Joi.number(),
|
|
463
|
+
});
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
/** @returns {DeliveryDetailsRequest} */
|
|
467
|
+
static DeliveryDetailsRequest() {
|
|
468
|
+
return Joi.object({
|
|
469
|
+
company_id: Joi.string().allow(""),
|
|
470
|
+
page_no: Joi.number(),
|
|
471
|
+
page_size: Joi.number(),
|
|
485
472
|
start_date: Joi.string().allow(""),
|
|
486
|
-
|
|
473
|
+
end_date: Joi.string().allow(""),
|
|
474
|
+
event: Joi.array().items(WebhookPartnerModel.EventDeliveryDetailSchema()),
|
|
475
|
+
status: Joi.string().allow(""),
|
|
487
476
|
});
|
|
488
477
|
}
|
|
489
478
|
|
|
490
|
-
/** @returns {
|
|
491
|
-
static
|
|
479
|
+
/** @returns {EventDeliveryDetailSchema} */
|
|
480
|
+
static EventDeliveryDetailSchema() {
|
|
492
481
|
return Joi.object({
|
|
493
|
-
category: Joi.string().allow(""),
|
|
494
|
-
count: Joi.number(),
|
|
495
482
|
event_name: Joi.string().allow(""),
|
|
496
483
|
event_type: Joi.string().allow(""),
|
|
484
|
+
event_category: Joi.string().allow(""),
|
|
497
485
|
version: Joi.string().allow(""),
|
|
498
486
|
});
|
|
499
487
|
}
|
|
500
488
|
|
|
501
|
-
/** @returns {
|
|
502
|
-
static
|
|
489
|
+
/** @returns {DeliveryDetailsResponse} */
|
|
490
|
+
static DeliveryDetailsResponse() {
|
|
503
491
|
return Joi.object({
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
492
|
+
rows: Joi.array().items(WebhookPartnerModel.EventProcessReportObject()),
|
|
493
|
+
page: WebhookPartnerModel.Page(),
|
|
494
|
+
});
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
/** @returns {EventProcessReportObject} */
|
|
498
|
+
static EventProcessReportObject() {
|
|
499
|
+
return Joi.object({
|
|
500
|
+
event_name: Joi.string().allow(""),
|
|
501
|
+
response_code: Joi.number(),
|
|
502
|
+
response_message: Joi.string().allow(""),
|
|
503
|
+
data: Joi.object().pattern(/\S/, Joi.any()),
|
|
504
|
+
attempt: Joi.number(),
|
|
505
|
+
last_attempted_on: Joi.number(),
|
|
516
506
|
status: Joi.string().allow(""),
|
|
517
|
-
|
|
518
|
-
updated_on: Joi.string().allow(""),
|
|
507
|
+
name: Joi.string().allow(""),
|
|
519
508
|
webhook_url: Joi.string().allow(""),
|
|
509
|
+
response_time: Joi.number(),
|
|
510
|
+
message_id: Joi.string().allow(""),
|
|
511
|
+
event_trace_id: Joi.string().allow(""),
|
|
520
512
|
});
|
|
521
513
|
}
|
|
522
514
|
|
|
523
515
|
/** @returns {Page} */
|
|
524
516
|
static Page() {
|
|
525
517
|
return Joi.object({
|
|
526
|
-
current: Joi.number(),
|
|
527
|
-
has_next: Joi.boolean(),
|
|
528
|
-
has_previous: Joi.boolean(),
|
|
529
518
|
item_total: Joi.number(),
|
|
530
519
|
next_id: Joi.string().allow(""),
|
|
531
|
-
|
|
520
|
+
has_previous: Joi.boolean(),
|
|
521
|
+
has_next: Joi.boolean(),
|
|
522
|
+
current: Joi.number(),
|
|
532
523
|
type: Joi.string().allow("").required(),
|
|
524
|
+
size: Joi.number(),
|
|
533
525
|
});
|
|
534
526
|
}
|
|
535
527
|
|
|
536
|
-
/** @returns {
|
|
537
|
-
static
|
|
538
|
-
return Joi.object({
|
|
539
|
-
items: Joi.array().items(WebhookPartnerModel.ItemSchema()),
|
|
540
|
-
page: WebhookPartnerModel.Page(),
|
|
541
|
-
});
|
|
542
|
-
}
|
|
543
|
-
|
|
544
|
-
/** @returns {SubscriberEventMapping} */
|
|
545
|
-
static SubscriberEventMapping() {
|
|
546
|
-
return Joi.object({
|
|
547
|
-
created_on: Joi.string().allow(""),
|
|
548
|
-
event_id: Joi.number(),
|
|
549
|
-
id: Joi.number(),
|
|
550
|
-
subscriber_id: Joi.number(),
|
|
551
|
-
});
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
/** @returns {UpdateSubscriberRequest} */
|
|
555
|
-
static UpdateSubscriberRequest() {
|
|
528
|
+
/** @returns {DeliveryEventLevelSchema} */
|
|
529
|
+
static DeliveryEventLevelSchema() {
|
|
556
530
|
return Joi.object({
|
|
557
|
-
|
|
531
|
+
event: Joi.string().allow(""),
|
|
532
|
+
success: Joi.number(),
|
|
533
|
+
failed: Joi.number(),
|
|
534
|
+
failed_percentage: Joi.number(),
|
|
535
|
+
removed_webhooks: Joi.number(),
|
|
536
|
+
total: Joi.number(),
|
|
537
|
+
response_time: Joi.number(),
|
|
558
538
|
});
|
|
559
539
|
}
|
|
560
540
|
|
|
561
|
-
/** @returns {
|
|
562
|
-
static
|
|
541
|
+
/** @returns {DeliverySummaryResponse} */
|
|
542
|
+
static DeliverySummaryResponse() {
|
|
563
543
|
return Joi.object({
|
|
564
|
-
|
|
544
|
+
delivery_event_level: Joi.array().items(
|
|
545
|
+
WebhookPartnerModel.DeliveryEventLevelSchema()
|
|
546
|
+
),
|
|
547
|
+
delivery_summary: WebhookPartnerModel.DeliverySummarySchema(),
|
|
565
548
|
});
|
|
566
549
|
}
|
|
567
550
|
|
|
568
|
-
/** @returns {
|
|
569
|
-
static
|
|
551
|
+
/** @returns {DeliverySummarySchema} */
|
|
552
|
+
static DeliverySummarySchema() {
|
|
570
553
|
return Joi.object({
|
|
571
|
-
|
|
554
|
+
success: Joi.number(),
|
|
555
|
+
response_time: Joi.number(),
|
|
556
|
+
failed_percentage: Joi.number(),
|
|
557
|
+
removed_webhooks: Joi.number(),
|
|
572
558
|
});
|
|
573
559
|
}
|
|
574
560
|
|
|
575
|
-
/** @returns {
|
|
576
|
-
static
|
|
561
|
+
/** @returns {ItemSchema} */
|
|
562
|
+
static ItemSchema() {
|
|
577
563
|
return Joi.object({
|
|
564
|
+
id: Joi.number(),
|
|
565
|
+
modified_by: Joi.string().allow(""),
|
|
578
566
|
name: Joi.string().allow(""),
|
|
579
|
-
|
|
567
|
+
webhook_url: Joi.string().allow(""),
|
|
568
|
+
association: WebhookPartnerModel.Association(),
|
|
569
|
+
custom_headers: Joi.any(),
|
|
570
|
+
status: Joi.string().allow(""),
|
|
571
|
+
email_id: Joi.string().allow(""),
|
|
572
|
+
updated_on: Joi.string().allow(""),
|
|
573
|
+
created_on: Joi.string().allow(""),
|
|
574
|
+
type: Joi.string().allow("").allow(null),
|
|
575
|
+
auth_meta: WebhookPartnerModel.AuthMeta(),
|
|
576
|
+
event_configs: Joi.array().items(
|
|
577
|
+
WebhookPartnerModel.EventConfigResponse()
|
|
578
|
+
),
|
|
579
|
+
event_id: Joi.array().items(Joi.number()),
|
|
580
580
|
});
|
|
581
581
|
}
|
|
582
582
|
}
|