@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.
Files changed (106) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/sdk/application/Cart/CartApplicationModel.d.ts +1742 -1726
  4. package/sdk/application/Cart/CartApplicationModel.js +1497 -1481
  5. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +1917 -1917
  6. package/sdk/application/Catalog/CatalogApplicationModel.js +1611 -1611
  7. package/sdk/application/Common/CommonApplicationModel.d.ts +235 -235
  8. package/sdk/application/Common/CommonApplicationModel.js +172 -172
  9. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +72 -72
  10. package/sdk/application/Communication/CommunicationApplicationModel.js +64 -64
  11. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +1614 -1614
  12. package/sdk/application/Configuration/ConfigurationApplicationModel.js +1151 -1151
  13. package/sdk/application/Content/ContentApplicationModel.d.ts +797 -797
  14. package/sdk/application/Content/ContentApplicationModel.js +757 -757
  15. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +79 -79
  16. package/sdk/application/FileStorage/FileStorageApplicationModel.js +84 -84
  17. package/sdk/application/Lead/LeadApplicationModel.d.ts +417 -417
  18. package/sdk/application/Lead/LeadApplicationModel.js +301 -301
  19. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +666 -666
  20. package/sdk/application/Logistic/LogisticApplicationModel.js +601 -601
  21. package/sdk/application/Order/OrderApplicationModel.d.ts +846 -846
  22. package/sdk/application/Order/OrderApplicationModel.js +822 -822
  23. package/sdk/application/Payment/PaymentApplicationClient.d.ts +5 -5
  24. package/sdk/application/Payment/PaymentApplicationClient.js +10 -10
  25. package/sdk/application/Payment/PaymentApplicationModel.d.ts +2155 -2150
  26. package/sdk/application/Payment/PaymentApplicationModel.js +1460 -1458
  27. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +5 -5
  28. package/sdk/application/Payment/PaymentApplicationValidator.js +3 -3
  29. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1462 -1462
  30. package/sdk/application/PosCart/PosCartApplicationModel.js +1260 -1260
  31. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +214 -214
  32. package/sdk/application/Rewards/RewardsApplicationModel.js +211 -211
  33. package/sdk/application/Share/ShareApplicationModel.d.ts +114 -114
  34. package/sdk/application/Share/ShareApplicationModel.js +121 -121
  35. package/sdk/application/Theme/ThemeApplicationModel.d.ts +895 -895
  36. package/sdk/application/Theme/ThemeApplicationModel.js +684 -684
  37. package/sdk/application/User/UserApplicationModel.d.ts +762 -762
  38. package/sdk/application/User/UserApplicationModel.js +738 -738
  39. package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +63 -63
  40. package/sdk/partner/FileStorage/FileStoragePartnerModel.js +65 -65
  41. package/sdk/partner/Lead/LeadPartnerModel.d.ts +661 -661
  42. package/sdk/partner/Lead/LeadPartnerModel.js +491 -491
  43. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +223 -223
  44. package/sdk/partner/Logistics/LogisticsPartnerModel.js +235 -235
  45. package/sdk/partner/Theme/ThemePartnerModel.d.ts +1087 -1087
  46. package/sdk/partner/Theme/ThemePartnerModel.js +819 -819
  47. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +386 -386
  48. package/sdk/partner/Webhook/WebhookPartnerModel.js +342 -342
  49. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +123 -123
  50. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +109 -109
  51. package/sdk/platform/Billing/BillingPlatformModel.d.ts +801 -801
  52. package/sdk/platform/Billing/BillingPlatformModel.js +783 -783
  53. package/sdk/platform/Cart/CartPlatformModel.d.ts +3333 -3317
  54. package/sdk/platform/Cart/CartPlatformModel.js +2936 -2920
  55. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1013 -1013
  56. package/sdk/platform/Catalog/CatalogPlatformModel.js +923 -923
  57. package/sdk/platform/Common/CommonPlatformModel.d.ts +255 -255
  58. package/sdk/platform/Common/CommonPlatformModel.js +187 -187
  59. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1238 -1238
  60. package/sdk/platform/Communication/CommunicationPlatformModel.js +1273 -1273
  61. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +661 -661
  62. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +692 -692
  63. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +3198 -3198
  64. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2247 -2247
  65. package/sdk/platform/Content/ContentPlatformModel.d.ts +1833 -1833
  66. package/sdk/platform/Content/ContentPlatformModel.js +1837 -1837
  67. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +245 -245
  68. package/sdk/platform/Discount/DiscountPlatformModel.js +248 -248
  69. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +865 -865
  70. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +877 -877
  71. package/sdk/platform/Finance/FinancePlatformModel.d.ts +1044 -1044
  72. package/sdk/platform/Finance/FinancePlatformModel.js +974 -974
  73. package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +942 -942
  74. package/sdk/platform/Inventory/InventoryPlatformModel.js +1003 -1003
  75. package/sdk/platform/Lead/LeadPlatformModel.d.ts +608 -608
  76. package/sdk/platform/Lead/LeadPlatformModel.js +465 -465
  77. package/sdk/platform/Order/OrderPlatformModel.d.ts +5180 -5176
  78. package/sdk/platform/Order/OrderPlatformModel.js +4740 -4736
  79. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +22 -22
  80. package/sdk/platform/Partner/PartnerPlatformModel.js +22 -22
  81. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2670 -2660
  82. package/sdk/platform/Payment/PaymentPlatformModel.js +1831 -1827
  83. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +204 -204
  84. package/sdk/platform/Rewards/RewardsPlatformModel.js +199 -199
  85. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1505 -1507
  86. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1532 -1536
  87. package/sdk/platform/Share/SharePlatformModel.d.ts +147 -147
  88. package/sdk/platform/Share/SharePlatformModel.js +139 -139
  89. package/sdk/platform/Theme/ThemePlatformModel.d.ts +1046 -1046
  90. package/sdk/platform/Theme/ThemePlatformModel.js +789 -789
  91. package/sdk/platform/User/UserPlatformModel.d.ts +758 -758
  92. package/sdk/platform/User/UserPlatformModel.js +643 -643
  93. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +439 -439
  94. package/sdk/platform/Webhook/WebhookPlatformModel.js +364 -364
  95. package/sdk/public/Billing/BillingPublicModel.d.ts +55 -55
  96. package/sdk/public/Billing/BillingPublicModel.js +51 -51
  97. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +237 -237
  98. package/sdk/public/Configuration/ConfigurationPublicModel.js +174 -174
  99. package/sdk/public/Content/ContentPublicModel.d.ts +26 -26
  100. package/sdk/public/Content/ContentPublicModel.js +28 -28
  101. package/sdk/public/Inventory/InventoryPublicModel.d.ts +237 -237
  102. package/sdk/public/Inventory/InventoryPublicModel.js +257 -257
  103. package/sdk/public/Partner/PartnerPublicModel.d.ts +104 -104
  104. package/sdk/public/Partner/PartnerPublicModel.js +113 -113
  105. package/sdk/public/Webhook/WebhookPublicModel.d.ts +87 -87
  106. package/sdk/public/Webhook/WebhookPublicModel.js +93 -93
@@ -1,83 +1,74 @@
1
1
  const Joi = require("joi");
2
2
 
3
3
  /**
4
- * @typedef Association
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 CdnObject
25
- * @property {Url[]} [urls]
9
+ * @typedef UpdateSubscriberRequest
10
+ * @property {string} [status]
26
11
  */
27
12
 
28
13
  /**
29
- * @typedef DeliveryDetailsRequest
30
- * @property {string} [company_id]
31
- * @property {string} [end_date]
32
- * @property {EventDeliveryDetailSchema[]} [event]
33
- * @property {number} [page_no]
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 DeliveryDetailsResponse
41
- * @property {Page} [page]
42
- * @property {EventProcessReportObject[]} [rows]
22
+ * @typedef AuthMeta
23
+ * @property {string} [type]
24
+ * @property {string} [secret]
43
25
  */
44
26
 
45
27
  /**
46
- * @typedef DeliveryEventLevelSchema
47
- * @property {string} [event]
48
- * @property {number} [failed]
49
- * @property {number} [failed_percentage]
50
- * @property {number} [removed_webhooks]
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 DeliverySummaryResponse
58
- * @property {DeliveryEventLevelSchema[]} [delivery_event_level]
59
- * @property {DeliverySummarySchema} [delivery_summary]
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 DeliverySummarySchema
64
- * @property {number} [failed_percentage]
65
- * @property {number} [removed_webhooks]
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 DeliveryTsResponse
72
- * @property {DeliveryTsSchema[]} [delivery_ts]
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 DeliveryTsSchema
77
- * @property {number} [failed]
78
- * @property {number} [removed_webhooks]
79
- * @property {number} [success]
80
- * @property {string} [timestamp]
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 EventConfigResponse
90
- * @property {string} [created_on]
91
- * @property {string} [description]
92
- * @property {string} [display_name]
93
- * @property {string} [event_category]
94
- * @property {string} [event_name]
95
- * @property {Object} [event_schema]
96
- * @property {string} [event_type]
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 EventDeliveryDetailSchema
105
- * @property {string} [event_category]
106
- * @property {string} [event_name]
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 EventProcessReportObject
113
- * @property {number} [attempt] - The attempt number of the event.
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 FilterReportResponse
129
- * @property {string} [filter_name]
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 {number} [id] - The ID of the history report.
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 {UploadServiceObject} [upload_service_response]
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 HistoryResponse
175
- * @property {HistoryItems[]} [items]
176
- * @property {Page} [page]
142
+ * @typedef CancelDownloadResponse
143
+ * @property {string} [message]
144
+ * @property {string} [result]
177
145
  */
178
146
 
179
147
  /**
180
- * @typedef InvalidEventsRequest
181
- * @property {string} [category]
182
- * @property {string} [end_date]
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 InvalidEventsResponse
190
- * @property {string} [category]
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 ItemSchema
199
- * @property {Association} [association]
200
- * @property {AuthMeta} [auth_meta]
201
- * @property {string} [created_on]
202
- * @property {Object} [custom_headers]
203
- * @property {string} [email_id]
204
- * @property {EventConfigResponse[]} [event_configs]
205
- * @property {number[]} [event_id]
206
- * @property {number} [id]
207
- * @property {string} [modified_by]
208
- * @property {string} [name]
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 Page
217
- * @property {number} [current]
218
- * @property {boolean} [has_next]
219
- * @property {boolean} [has_previous]
220
- * @property {number} [item_total]
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 SubscriberConfigResponse
228
- * @property {ItemSchema[]} [items]
186
+ * @typedef DeliveryDetailsResponse
187
+ * @property {EventProcessReportObject[]} [rows]
229
188
  * @property {Page} [page]
230
189
  */
231
190
 
232
191
  /**
233
- * @typedef SubscriberEventMapping
234
- * @property {string} [created_on]
235
- * @property {number} [event_id]
236
- * @property {number} [id]
237
- * @property {number} [subscriber_id]
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 UpdateSubscriberRequest
242
- * @property {string} [status]
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 UpdateSubscriberResponse
247
- * @property {string} [message]
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 UploadServiceObject
252
- * @property {CdnObject} [cdn]
230
+ * @typedef DeliverySummaryResponse
231
+ * @property {DeliveryEventLevelSchema[]} [delivery_event_level]
232
+ * @property {DeliverySummarySchema} [delivery_summary]
253
233
  */
254
234
 
255
235
  /**
256
- * @typedef Url
257
- * @property {string} [name] - The name of the uploaded report file.
258
- * @property {string} [url] - The URL of the uploaded report file.
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
- class WebhookPartnerModel {
262
- /** @returns {Association} */
263
- static Association() {
264
- return Joi.object({
265
- application_id: Joi.array().items(Joi.string().allow("")),
266
- company_id: Joi.number(),
267
- criteria: Joi.string().allow(""),
268
- extension_id: Joi.string().allow(""),
269
- });
270
- }
271
-
272
- /** @returns {AuthMeta} */
273
- static AuthMeta() {
274
- return Joi.object({
275
- secret: Joi.string().allow(""),
276
- type: Joi.string().allow(""),
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
- /** @returns {CancelDownloadResponse} */
281
- static CancelDownloadResponse() {
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 {CdnObject} */
289
- static CdnObject() {
269
+ /** @returns {UpdateSubscriberRequest} */
270
+ static UpdateSubscriberRequest() {
290
271
  return Joi.object({
291
- urls: Joi.array().items(WebhookPartnerModel.Url()),
272
+ status: Joi.string().allow(""),
292
273
  });
293
274
  }
294
275
 
295
- /** @returns {DeliveryDetailsRequest} */
296
- static DeliveryDetailsRequest() {
276
+ /** @returns {Association} */
277
+ static Association() {
297
278
  return Joi.object({
298
- company_id: Joi.string().allow(""),
299
- end_date: Joi.string().allow(""),
300
- event: Joi.array().items(WebhookPartnerModel.EventDeliveryDetailSchema()),
301
- page_no: Joi.number(),
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 {DeliveryDetailsResponse} */
309
- static DeliveryDetailsResponse() {
286
+ /** @returns {AuthMeta} */
287
+ static AuthMeta() {
310
288
  return Joi.object({
311
- page: WebhookPartnerModel.Page(),
312
- rows: Joi.array().items(WebhookPartnerModel.EventProcessReportObject()),
289
+ type: Joi.string().allow(""),
290
+ secret: Joi.string().allow(""),
313
291
  });
314
292
  }
315
293
 
316
- /** @returns {DeliveryEventLevelSchema} */
317
- static DeliveryEventLevelSchema() {
294
+ /** @returns {SubscriberEventMapping} */
295
+ static SubscriberEventMapping() {
318
296
  return Joi.object({
319
- event: Joi.string().allow(""),
320
- failed: Joi.number(),
321
- failed_percentage: Joi.number(),
322
- removed_webhooks: Joi.number(),
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 {DeliverySummaryResponse} */
330
- static DeliverySummaryResponse() {
304
+ /** @returns {EventConfigResponse} */
305
+ static EventConfigResponse() {
331
306
  return Joi.object({
332
- delivery_event_level: Joi.array().items(
333
- WebhookPartnerModel.DeliveryEventLevelSchema()
334
- ),
335
- delivery_summary: WebhookPartnerModel.DeliverySummarySchema(),
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 {DeliverySummarySchema} */
340
- static DeliverySummarySchema() {
321
+ /** @returns {SubscriberConfigResponse} */
322
+ static SubscriberConfigResponse() {
341
323
  return Joi.object({
342
- failed_percentage: Joi.number(),
343
- removed_webhooks: Joi.number(),
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 {DeliveryTsResponse} */
350
- static DeliveryTsResponse() {
329
+ /** @returns {InvalidEventsRequest} */
330
+ static InvalidEventsRequest() {
351
331
  return Joi.object({
352
- delivery_ts: Joi.array().items(WebhookPartnerModel.DeliveryTsSchema()),
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 {DeliveryTsSchema} */
357
- static DeliveryTsSchema() {
340
+ /** @returns {InvalidEventsResponse} */
341
+ static InvalidEventsResponse() {
358
342
  return Joi.object({
359
- failed: Joi.number(),
360
- removed_webhooks: Joi.number(),
361
- success: Joi.number(),
362
- timestamp: Joi.string().allow(""),
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 {EventConfigResponse} */
374
- static EventConfigResponse() {
358
+ /** @returns {HistoryFilters} */
359
+ static HistoryFilters() {
375
360
  return Joi.object({
376
- created_on: Joi.string().allow(""),
377
- description: Joi.string().allow("").allow(null),
378
- display_name: Joi.string().allow(""),
379
- event_category: Joi.string().allow(""),
380
- event_name: Joi.string().allow(""),
381
- event_schema: Joi.object().pattern(/\S/, Joi.any()),
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 {EventDeliveryDetailSchema} */
391
- static EventDeliveryDetailSchema() {
370
+ /** @returns {Url} */
371
+ static Url() {
392
372
  return Joi.object({
393
- event_category: Joi.string().allow(""),
394
- event_name: Joi.string().allow(""),
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 {EventProcessReportObject} */
401
- static EventProcessReportObject() {
378
+ /** @returns {CdnObject} */
379
+ static CdnObject() {
402
380
  return Joi.object({
403
- attempt: Joi.number(),
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 {FilterReportResponse} */
419
- static FilterReportResponse() {
385
+ /** @returns {UploadServiceObject} */
386
+ static UploadServiceObject() {
420
387
  return Joi.object({
421
- filter_name: Joi.string().allow(""),
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
- id: Joi.number(),
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 {HistoryResponse} */
472
- static HistoryResponse() {
433
+ /** @returns {CancelDownloadResponse} */
434
+ static CancelDownloadResponse() {
473
435
  return Joi.object({
474
- items: Joi.array().items(WebhookPartnerModel.HistoryItems()),
475
- page: WebhookPartnerModel.Page(),
436
+ message: Joi.string().allow(""),
437
+ result: Joi.string().allow(""),
476
438
  });
477
439
  }
478
440
 
479
- /** @returns {InvalidEventsRequest} */
480
- static InvalidEventsRequest() {
441
+ /** @returns {FilterReportResponse} */
442
+ static FilterReportResponse() {
481
443
  return Joi.object({
482
- category: Joi.string().allow(""),
483
- end_date: Joi.string().allow(""),
484
- event_name: Joi.string().allow(""),
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
- version: Joi.string().allow(""),
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 {InvalidEventsResponse} */
491
- static InvalidEventsResponse() {
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 {ItemSchema} */
502
- static ItemSchema() {
489
+ /** @returns {DeliveryDetailsResponse} */
490
+ static DeliveryDetailsResponse() {
503
491
  return Joi.object({
504
- association: WebhookPartnerModel.Association(),
505
- auth_meta: WebhookPartnerModel.AuthMeta(),
506
- created_on: Joi.string().allow(""),
507
- custom_headers: Joi.any(),
508
- email_id: Joi.string().allow(""),
509
- event_configs: Joi.array().items(
510
- WebhookPartnerModel.EventConfigResponse()
511
- ),
512
- event_id: Joi.array().items(Joi.number()),
513
- id: Joi.number(),
514
- modified_by: Joi.string().allow(""),
515
- name: Joi.string().allow(""),
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
- type: Joi.string().allow("").allow(null),
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
- size: Joi.number(),
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 {SubscriberConfigResponse} */
537
- static SubscriberConfigResponse() {
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
- status: Joi.string().allow(""),
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 {UpdateSubscriberResponse} */
562
- static UpdateSubscriberResponse() {
541
+ /** @returns {DeliverySummaryResponse} */
542
+ static DeliverySummaryResponse() {
563
543
  return Joi.object({
564
- message: Joi.string().allow(""),
544
+ delivery_event_level: Joi.array().items(
545
+ WebhookPartnerModel.DeliveryEventLevelSchema()
546
+ ),
547
+ delivery_summary: WebhookPartnerModel.DeliverySummarySchema(),
565
548
  });
566
549
  }
567
550
 
568
- /** @returns {UploadServiceObject} */
569
- static UploadServiceObject() {
551
+ /** @returns {DeliverySummarySchema} */
552
+ static DeliverySummarySchema() {
570
553
  return Joi.object({
571
- cdn: WebhookPartnerModel.CdnObject(),
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 {Url} */
576
- static Url() {
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
- url: Joi.string().allow(""),
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
  }