@gofynd/fdk-client-javascript 1.4.2-beta.1 → 1.4.2-beta.10

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 (265) hide show
  1. package/README.md +1 -1
  2. package/package.json +3 -2
  3. package/sdk/application/ApplicationClient.js +20 -0
  4. package/sdk/application/Cart/CartApplicationClient.d.ts +1 -1
  5. package/sdk/application/Cart/CartApplicationClient.js +3 -5
  6. package/sdk/application/Cart/CartApplicationModel.d.ts +1634 -1742
  7. package/sdk/application/Cart/CartApplicationModel.js +1388 -1464
  8. package/sdk/application/Cart/CartApplicationValidator.d.ts +0 -4
  9. package/sdk/application/Cart/CartApplicationValidator.js +0 -4
  10. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +6 -3
  11. package/sdk/application/Catalog/CatalogApplicationClient.js +20 -7
  12. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +1917 -1917
  13. package/sdk/application/Catalog/CatalogApplicationModel.js +1613 -1613
  14. package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +14 -0
  15. package/sdk/application/Catalog/CatalogApplicationValidator.js +6 -0
  16. package/sdk/application/Common/CommonApplicationModel.d.ts +235 -235
  17. package/sdk/application/Common/CommonApplicationModel.js +172 -172
  18. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +72 -72
  19. package/sdk/application/Communication/CommunicationApplicationModel.js +64 -64
  20. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +1492 -1626
  21. package/sdk/application/Configuration/ConfigurationApplicationModel.js +1038 -1180
  22. package/sdk/application/Content/ContentApplicationClient.d.ts +0 -36
  23. package/sdk/application/Content/ContentApplicationClient.js +0 -246
  24. package/sdk/application/Content/ContentApplicationModel.d.ts +546 -753
  25. package/sdk/application/Content/ContentApplicationModel.js +565 -817
  26. package/sdk/application/Content/ContentApplicationValidator.d.ts +1 -40
  27. package/sdk/application/Content/ContentApplicationValidator.js +0 -41
  28. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +79 -79
  29. package/sdk/application/FileStorage/FileStorageApplicationModel.js +84 -84
  30. package/sdk/application/Lead/LeadApplicationModel.d.ts +417 -417
  31. package/sdk/application/Lead/LeadApplicationModel.js +301 -301
  32. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +0 -67
  33. package/sdk/application/Logistic/LogisticApplicationClient.js +0 -547
  34. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +257 -712
  35. package/sdk/application/Logistic/LogisticApplicationModel.js +267 -755
  36. package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +1 -211
  37. package/sdk/application/Logistic/LogisticApplicationValidator.js +0 -131
  38. package/sdk/application/Order/OrderApplicationClient.d.ts +3 -3
  39. package/sdk/application/Order/OrderApplicationClient.js +8 -32
  40. package/sdk/application/Order/OrderApplicationModel.d.ts +845 -853
  41. package/sdk/application/Order/OrderApplicationModel.js +816 -824
  42. package/sdk/application/Order/OrderApplicationValidator.d.ts +0 -20
  43. package/sdk/application/Order/OrderApplicationValidator.js +0 -8
  44. package/sdk/application/Payment/PaymentApplicationClient.d.ts +2 -46
  45. package/sdk/application/Payment/PaymentApplicationClient.js +10 -341
  46. package/sdk/application/Payment/PaymentApplicationModel.d.ts +1892 -2199
  47. package/sdk/application/Payment/PaymentApplicationModel.js +1235 -1506
  48. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +14 -59
  49. package/sdk/application/Payment/PaymentApplicationValidator.js +10 -64
  50. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1396 -1429
  51. package/sdk/application/PosCart/PosCartApplicationModel.js +1233 -1257
  52. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +214 -214
  53. package/sdk/application/Rewards/RewardsApplicationModel.js +211 -211
  54. package/sdk/application/Share/ShareApplicationModel.d.ts +114 -114
  55. package/sdk/application/Share/ShareApplicationModel.js +121 -121
  56. package/sdk/application/Theme/ThemeApplicationClient.d.ts +1 -1
  57. package/sdk/application/Theme/ThemeApplicationClient.js +3 -7
  58. package/sdk/application/Theme/ThemeApplicationModel.d.ts +783 -969
  59. package/sdk/application/Theme/ThemeApplicationModel.js +571 -867
  60. package/sdk/application/Theme/ThemeApplicationValidator.d.ts +0 -10
  61. package/sdk/application/Theme/ThemeApplicationValidator.js +0 -4
  62. package/sdk/application/User/UserApplicationClient.d.ts +0 -33
  63. package/sdk/application/User/UserApplicationClient.js +0 -239
  64. package/sdk/application/User/UserApplicationModel.d.ts +753 -768
  65. package/sdk/application/User/UserApplicationModel.js +731 -755
  66. package/sdk/application/User/UserApplicationValidator.d.ts +1 -34
  67. package/sdk/application/User/UserApplicationValidator.js +0 -36
  68. package/sdk/common/Clickstream.d.ts +1 -0
  69. package/sdk/common/Clickstream.js +254 -0
  70. package/sdk/common/Utility.js +1 -4
  71. package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +72 -60
  72. package/sdk/partner/FileStorage/FileStoragePartnerModel.js +70 -58
  73. package/sdk/partner/PartnerClient.d.ts +0 -6
  74. package/sdk/partner/PartnerClient.js +0 -9
  75. package/sdk/partner/Theme/ThemePartnerClient.d.ts +0 -10
  76. package/sdk/partner/Theme/ThemePartnerClient.js +0 -80
  77. package/sdk/partner/Theme/ThemePartnerModel.d.ts +1178 -1153
  78. package/sdk/partner/Theme/ThemePartnerModel.js +830 -974
  79. package/sdk/partner/Theme/ThemePartnerValidator.d.ts +0 -1
  80. package/sdk/partner/Theme/ThemePartnerValidator.js +0 -9
  81. package/sdk/partner/index.d.ts +0 -3
  82. package/sdk/partner/index.js +0 -6
  83. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +2 -2
  84. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +123 -123
  85. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +109 -109
  86. package/sdk/platform/Billing/BillingPlatformClient.d.ts +1 -11
  87. package/sdk/platform/Billing/BillingPlatformClient.js +3 -110
  88. package/sdk/platform/Billing/BillingPlatformModel.d.ts +734 -800
  89. package/sdk/platform/Billing/BillingPlatformModel.js +732 -810
  90. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +4 -43
  91. package/sdk/platform/Billing/BillingPlatformValidator.js +2 -29
  92. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +11 -1
  93. package/sdk/platform/Cart/CartPlatformApplicationClient.js +81 -7
  94. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +13 -5
  95. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +12 -4
  96. package/sdk/platform/Cart/CartPlatformModel.d.ts +3223 -3328
  97. package/sdk/platform/Cart/CartPlatformModel.js +2875 -2946
  98. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +11 -15
  99. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +21 -52
  100. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +0 -27
  101. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +0 -11
  102. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +15 -27
  103. package/sdk/platform/Catalog/CatalogPlatformClient.js +93 -189
  104. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +617 -920
  105. package/sdk/platform/Catalog/CatalogPlatformModel.js +584 -919
  106. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +27 -41
  107. package/sdk/platform/Catalog/CatalogPlatformValidator.js +19 -31
  108. package/sdk/platform/Common/CommonPlatformModel.d.ts +255 -255
  109. package/sdk/platform/Common/CommonPlatformModel.js +187 -187
  110. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +37 -139
  111. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +52 -737
  112. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +3 -133
  113. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +1 -113
  114. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1079 -1228
  115. package/sdk/platform/Communication/CommunicationPlatformModel.js +1090 -1262
  116. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +2 -8
  117. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +4 -32
  118. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +629 -658
  119. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +641 -675
  120. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +0 -14
  121. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +0 -6
  122. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +8 -8
  123. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +4 -4
  124. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +2992 -3231
  125. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2092 -2303
  126. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +2 -2
  127. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +2 -2
  128. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +0 -391
  129. package/sdk/platform/Content/ContentPlatformApplicationClient.js +1074 -3656
  130. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +1 -351
  131. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +0 -410
  132. package/sdk/platform/Content/ContentPlatformModel.d.ts +972 -2071
  133. package/sdk/platform/Content/ContentPlatformModel.js +1039 -2355
  134. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +2 -2
  135. package/sdk/platform/Discount/DiscountPlatformClient.js +2 -2
  136. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +174 -259
  137. package/sdk/platform/Discount/DiscountPlatformModel.js +163 -257
  138. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +6 -16
  139. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +8 -117
  140. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +4 -55
  141. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +2 -39
  142. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +821 -892
  143. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +833 -901
  144. package/sdk/platform/Finance/FinancePlatformClient.d.ts +0 -33
  145. package/sdk/platform/Finance/FinancePlatformClient.js +0 -240
  146. package/sdk/platform/Finance/FinancePlatformModel.d.ts +910 -1056
  147. package/sdk/platform/Finance/FinancePlatformModel.js +884 -1070
  148. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +1 -38
  149. package/sdk/platform/Finance/FinancePlatformValidator.js +0 -38
  150. package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +942 -942
  151. package/sdk/platform/Inventory/InventoryPlatformModel.js +1003 -1003
  152. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +28 -38
  153. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +56 -137
  154. package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +29 -41
  155. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +21 -33
  156. package/sdk/platform/Lead/LeadPlatformModel.d.ts +601 -610
  157. package/sdk/platform/Lead/LeadPlatformModel.js +457 -471
  158. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +1 -11
  159. package/sdk/platform/Order/OrderPlatformApplicationClient.js +1 -93
  160. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -28
  161. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +0 -18
  162. package/sdk/platform/Order/OrderPlatformClient.d.ts +22 -143
  163. package/sdk/platform/Order/OrderPlatformClient.js +160 -1190
  164. package/sdk/platform/Order/OrderPlatformModel.d.ts +4451 -5275
  165. package/sdk/platform/Order/OrderPlatformModel.js +4039 -4994
  166. package/sdk/platform/Order/OrderPlatformValidator.d.ts +21 -257
  167. package/sdk/platform/Order/OrderPlatformValidator.js +15 -216
  168. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +22 -22
  169. package/sdk/platform/Partner/PartnerPlatformModel.js +22 -22
  170. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +13 -119
  171. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +40 -750
  172. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +7 -143
  173. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +6 -133
  174. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +1 -1
  175. package/sdk/platform/Payment/PaymentPlatformClient.js +1 -1
  176. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2067 -2929
  177. package/sdk/platform/Payment/PaymentPlatformModel.js +1427 -2090
  178. package/sdk/platform/PlatformApplicationClient.d.ts +2 -2
  179. package/sdk/platform/PlatformApplicationClient.js +4 -4
  180. package/sdk/platform/PlatformClient.d.ts +2 -4
  181. package/sdk/platform/PlatformClient.js +4 -8
  182. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +204 -204
  183. package/sdk/platform/Rewards/RewardsPlatformModel.js +199 -199
  184. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +66 -142
  185. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +147 -645
  186. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +63 -131
  187. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +47 -126
  188. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +105 -217
  189. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +349 -1138
  190. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +989 -1588
  191. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +977 -1695
  192. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +133 -382
  193. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +102 -266
  194. package/sdk/platform/Share/SharePlatformModel.d.ts +147 -147
  195. package/sdk/platform/Share/SharePlatformModel.js +139 -139
  196. package/sdk/platform/Theme/ThemePlatformClient.d.ts +1 -11
  197. package/sdk/platform/Theme/ThemePlatformClient.js +3 -87
  198. package/sdk/platform/Theme/ThemePlatformModel.d.ts +765 -1133
  199. package/sdk/platform/Theme/ThemePlatformModel.js +561 -1009
  200. package/sdk/platform/Theme/ThemePlatformValidator.d.ts +4 -28
  201. package/sdk/platform/Theme/ThemePlatformValidator.js +2 -21
  202. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +1 -116
  203. package/sdk/platform/User/UserPlatformApplicationClient.js +86 -932
  204. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +7 -224
  205. package/sdk/platform/User/UserPlatformApplicationValidator.js +5 -173
  206. package/sdk/platform/User/UserPlatformModel.d.ts +428 -765
  207. package/sdk/platform/User/UserPlatformModel.js +428 -679
  208. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +37 -45
  209. package/sdk/platform/Webhook/WebhookPlatformClient.js +57 -61
  210. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +403 -448
  211. package/sdk/platform/Webhook/WebhookPlatformModel.js +309 -369
  212. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -7
  213. package/sdk/platform/Webhook/WebhookPlatformValidator.js +6 -6
  214. package/sdk/platform/index.d.ts +1 -1
  215. package/sdk/platform/index.js +2 -2
  216. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +237 -237
  217. package/sdk/public/Configuration/ConfigurationPublicModel.js +174 -174
  218. package/sdk/public/Inventory/InventoryPublicModel.d.ts +237 -237
  219. package/sdk/public/Inventory/InventoryPublicModel.js +257 -257
  220. package/sdk/public/Partner/PartnerPublicModel.d.ts +104 -104
  221. package/sdk/public/Partner/PartnerPublicModel.js +113 -113
  222. package/sdk/public/PublicClient.d.ts +0 -4
  223. package/sdk/public/PublicClient.js +0 -8
  224. package/sdk/public/Webhook/WebhookPublicClient.d.ts +0 -33
  225. package/sdk/public/Webhook/WebhookPublicClient.js +0 -242
  226. package/sdk/public/Webhook/WebhookPublicModel.d.ts +15 -161
  227. package/sdk/public/Webhook/WebhookPublicModel.js +13 -189
  228. package/sdk/public/Webhook/WebhookPublicValidator.d.ts +1 -23
  229. package/sdk/public/Webhook/WebhookPublicValidator.js +0 -31
  230. package/sdk/public/index.d.ts +0 -2
  231. package/sdk/public/index.js +0 -4
  232. package/sdk/partner/Lead/LeadPartnerClient.d.ts +0 -125
  233. package/sdk/partner/Lead/LeadPartnerClient.js +0 -785
  234. package/sdk/partner/Lead/LeadPartnerModel.d.ts +0 -1127
  235. package/sdk/partner/Lead/LeadPartnerModel.js +0 -896
  236. package/sdk/partner/Lead/LeadPartnerValidator.d.ts +0 -12
  237. package/sdk/partner/Lead/LeadPartnerValidator.js +0 -67
  238. package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +0 -155
  239. package/sdk/partner/Logistics/LogisticsPartnerClient.js +0 -1195
  240. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +0 -372
  241. package/sdk/partner/Logistics/LogisticsPartnerModel.js +0 -442
  242. package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +0 -16
  243. package/sdk/partner/Logistics/LogisticsPartnerValidator.js +0 -123
  244. package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +0 -99
  245. package/sdk/partner/Webhook/WebhookPartnerClient.js +0 -753
  246. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +0 -566
  247. package/sdk/partner/Webhook/WebhookPartnerModel.js +0 -583
  248. package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +0 -12
  249. package/sdk/partner/Webhook/WebhookPartnerValidator.js +0 -74
  250. package/sdk/platform/Content/ContentPlatformClient.d.ts +0 -277
  251. package/sdk/platform/Content/ContentPlatformClient.js +0 -2011
  252. package/sdk/platform/Content/ContentPlatformValidator.d.ts +0 -247
  253. package/sdk/platform/Content/ContentPlatformValidator.js +0 -319
  254. package/sdk/public/Billing/BillingPublicClient.d.ts +0 -23
  255. package/sdk/public/Billing/BillingPublicClient.js +0 -116
  256. package/sdk/public/Billing/BillingPublicModel.d.ts +0 -92
  257. package/sdk/public/Billing/BillingPublicModel.js +0 -96
  258. package/sdk/public/Billing/BillingPublicValidator.d.ts +0 -18
  259. package/sdk/public/Billing/BillingPublicValidator.js +0 -19
  260. package/sdk/public/Content/ContentPublicClient.d.ts +0 -22
  261. package/sdk/public/Content/ContentPublicClient.js +0 -114
  262. package/sdk/public/Content/ContentPublicModel.d.ts +0 -53
  263. package/sdk/public/Content/ContentPublicModel.js +0 -60
  264. package/sdk/public/Content/ContentPublicValidator.d.ts +0 -18
  265. package/sdk/public/Content/ContentPublicValidator.js +0 -19
@@ -1,645 +1,585 @@
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]
4
+ * @typedef CancelResponse
5
+ * @property {number} [code] - The HTTP status code of the response (e.g., 200).
9
6
  */
10
7
 
11
8
  /**
12
- * @typedef AuthMeta
13
- * @property {string} [secret]
14
- * @property {string} [type]
9
+ * @typedef EventProcessRequest
10
+ * @property {string} [search_text]
11
+ * @property {string} [end_date]
12
+ * @property {string} [start_date]
13
+ * @property {number[]} [subscriber_ids]
14
+ * @property {Event[]} [event]
15
15
  */
16
16
 
17
17
  /**
18
- * @typedef CancelResponse
19
- * @property {string} [message] - The HTTP status code of the response (e.g., 200).
18
+ * @typedef Event
19
+ * @property {string} [event_name]
20
+ * @property {string} [event_type]
21
+ * @property {string} [event_category]
22
+ * @property {string} [version]
20
23
  */
21
24
 
22
25
  /**
23
- * @typedef CdnObject
24
- * @property {Url[]} [urls]
26
+ * @typedef ManualRetryFailedResponse
27
+ * @property {boolean} [success]
28
+ * @property {string} [message]
29
+ * @property {string} [request_id]
30
+ * @property {Object} [meta]
31
+ * @property {string} [stack_trace]
25
32
  */
26
33
 
27
34
  /**
28
- * @typedef DownloadReportResponse
29
- * @property {string} [file_name]
35
+ * @typedef FailedEventsCountSuccessResponse
36
+ * @property {EventCountItem[]} [items]
30
37
  */
31
38
 
32
39
  /**
33
- * @typedef Err
34
- * @property {string} [location]
35
- * @property {string} [msg]
36
- * @property {string} [param]
40
+ * @typedef EventCountItem
41
+ * @property {string} [status] - The status of the event (e.g., "FAILED").
42
+ * @property {number} [count] - The count of events with the specified status
37
43
  */
38
44
 
39
45
  /**
40
- * @typedef Error
41
- * @property {string} [error] - Error message describing the reason for the failure.
46
+ * @typedef RetryStatusResponse
47
+ * @property {number} [total_event] - The total number of events that require retry.
48
+ * @property {number} [success_count] - The count of successfully retried events.
49
+ * @property {number} [failure_count] - The count of failed retry attempts.
50
+ * @property {string} [status] - The overall status of the retry process (e.g.,
51
+ * "completed").
42
52
  */
43
53
 
44
54
  /**
45
- * @typedef Event
46
- * @property {string} [event_category]
47
- * @property {string} [event_name]
48
- * @property {string} [event_type]
49
- * @property {string} [version]
55
+ * @typedef EventSuccessResponse
56
+ * @property {boolean} [success]
57
+ * @property {string} [message]
50
58
  */
51
59
 
52
60
  /**
53
- * @typedef EventConfig
54
- * @property {string} [created_on]
55
- * @property {string} [description]
56
- * @property {string} [display_name]
57
- * @property {string} [event_category]
58
- * @property {string} [event_name]
59
- * @property {Object} [event_schema]
60
- * @property {string} [event_type]
61
- * @property {number} [id]
62
- * @property {string} [updated_on]
63
- * @property {string} [version]
61
+ * @typedef EventProcessedSuccessResponse
62
+ * @property {boolean} [success]
63
+ * @property {string} [message]
64
64
  */
65
65
 
66
66
  /**
67
- * @typedef EventConfigResponse
68
- * @property {EventConfig[]} [event_configs]
67
+ * @typedef Error
68
+ * @property {string} [error] - Error message describing the reason for the failure.
69
69
  */
70
70
 
71
71
  /**
72
72
  * @typedef EventProcessReportObject
73
- * @property {number} [attempt] - The attempt number of the event.
74
- * @property {Object} [data] - The data associated with the event.
75
73
  * @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
74
  * @property {number} [response_code] - The response code of the event.
81
75
  * @property {string} [response_message] - The response message of the event.
82
- * @property {number} [response_time] - The response time of the event.
76
+ * @property {string} [data] - The data associated with the event.
77
+ * @property {number} [attempt] - The attempt number of the event.
78
+ * @property {number} [last_attempted_on] - The timestamp of the last attempted event.
83
79
  * @property {string} [status] - The status of the event (e.g., "FAILED").
80
+ * @property {string} [name] - The name of the event.
84
81
  * @property {string} [webhook_url] - The webhook URL associated with the event.
82
+ * @property {number} [response_time] - The response time of the event.
85
83
  */
86
84
 
87
85
  /**
88
86
  * @typedef EventProcessReports
89
- * @property {Page} [page]
90
87
  * @property {EventProcessReportObject[]} [rows]
88
+ * @property {Page} [page]
91
89
  */
92
90
 
93
91
  /**
94
- * @typedef EventProcessRequest
95
- * @property {string} [end_date]
96
- * @property {Event[]} [event]
97
- * @property {string} [search_text]
98
- * @property {string} [start_date]
99
- * @property {string} [status]
100
- * @property {number[]} [subscriber_ids]
92
+ * @typedef PingWebhook
93
+ * @property {string} [webhook_url] - The URL of the subscriber's webhook to ping.
94
+ * @property {Object} [auth_meta] - Authentication metadata (if required by the
95
+ * subscriber).
96
+ * @property {Object} [custom_headers] - Custom headers to include in the ping request.
101
97
  */
102
98
 
103
99
  /**
104
- * @typedef HistoryAssociation
105
- * @property {number} [company_id]
106
- * @property {number[]} [subscriber_ids]
100
+ * @typedef PingWebhookResponse
101
+ * @property {string} [status] - The status of the ping (e.g., "SUCCESS").
102
+ * @property {string} [message] - An optional message related to the ping.
103
+ * @property {number} [code] - The HTTP status code of the ping response (e.g., 200).
107
104
  */
108
105
 
109
106
  /**
110
- * @typedef HistoryFilters
111
- * @property {string} [end_date] - The end date and time of the history report.
112
- * @property {string[]} [events]
113
- * @property {string} [search_text]
114
- * @property {string} [start_date] - The start date and time of the history report.
115
- * @property {string} [status] - The status of the history report (e.g., "FAILED").
116
- * @property {number[]} [subscribers] - An array of subscriber IDs associated
117
- * with the history report.
107
+ * @typedef ReportFiltersPayload
108
+ * @property {number[]} [subscriber_ids] - An array of subscriber IDs for
109
+ * filtering filters (optional).
118
110
  */
119
111
 
120
112
  /**
121
- * @typedef HistoryItems
122
- * @property {HistoryAssociation} [association]
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]
113
+ * @typedef FilterValues
114
+ * @property {string} [text] - The display text for the filter value.
115
+ * @property {Object} [value] - The value associated with the filter value.
133
116
  */
134
117
 
135
118
  /**
136
- * @typedef HistoryPayload
137
- * @property {number} [page_no] - The page number of the history report.
138
- * @property {number} [page_size] - The number of records per page.
139
- * @property {string} [type] - The type of history report (e.g., "platform").
119
+ * @typedef FilterResponseObject
120
+ * @property {string} [filter_name] - The name of the filter.
121
+ * @property {FilterValues[]} [values]
140
122
  */
141
123
 
142
124
  /**
143
- * @typedef HistoryResponse
144
- * @property {HistoryItems[]} [items]
145
- * @property {Page} [page]
125
+ * @typedef EventConfigResponse
126
+ * @property {EventConfig[]} [event_configs]
146
127
  */
147
128
 
148
129
  /**
149
- * @typedef Item
150
- * @property {number} [count]
151
- * @property {string} [status]
130
+ * @typedef EventConfig
131
+ * @property {number} [id]
132
+ * @property {string} [event_name]
133
+ * @property {string} [event_type]
134
+ * @property {string} [event_category]
135
+ * @property {string} [version]
136
+ * @property {string} [display_name]
137
+ * @property {string} [description]
138
+ * @property {string} [created_on]
152
139
  */
153
140
 
154
141
  /**
155
- * @typedef Page
156
- * @property {number} [current]
157
- * @property {boolean} [has_next]
158
- * @property {boolean} [has_previous]
159
- * @property {number} [item_total]
160
- * @property {string} [next_id]
161
- * @property {number} [size]
162
- * @property {string} type
142
+ * @typedef ReportFilterResponse
143
+ * @property {FilterResponseObject[]} [items]
163
144
  */
164
145
 
165
146
  /**
166
- * @typedef PingWebhook
167
- * @property {Object} [auth_meta] - Authentication metadata (if required by the
168
- * subscriber).
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.
147
+ * @typedef HistoryPayload
148
+ * @property {string} [type] - The type of history report (e.g., "platform").
149
+ * @property {number} [page_no] - The page number of the history report.
150
+ * @property {number} [page_size] - The number of records per page.
171
151
  */
172
152
 
173
153
  /**
174
- * @typedef PingWebhookResponse
175
- * @property {number} [code] - The HTTP status code of the ping response (e.g., 200).
176
- * @property {string} [message] - An optional message related to the ping.
177
- * @property {string} [status] - The status of the ping (e.g., "SUCCESS").
154
+ * @typedef HistoryFilters
155
+ * @property {string} [status] - The status of the history report (e.g., "FAILED").
156
+ * @property {string} [end_date] - The end date and time of the history report.
157
+ * @property {string} [start_date] - The start date and time of the history report.
158
+ * @property {number[]} [subscribers] - An array of subscriber IDs associated
159
+ * with the history report.
178
160
  */
179
161
 
180
162
  /**
181
- * @typedef ReportFilterResponse
182
- * @property {string} [filter_name] - The name of the filter.
183
- * @property {Object[]} [values]
163
+ * @typedef Url
164
+ * @property {string} [url] - The URL of the uploaded report file.
165
+ * @property {string} [name] - The name of the uploaded report file.
184
166
  */
185
167
 
186
168
  /**
187
- * @typedef ReportFiltersPayload
188
- * @property {number[]} [subscriber_ids] - An array of subscriber IDs for
189
- * filtering filters (optional).
169
+ * @typedef CdnObject
170
+ * @property {Url[]} [urls]
190
171
  */
191
172
 
192
173
  /**
193
- * @typedef RetryCountResponse
194
- * @property {Item[]} [items]
174
+ * @typedef UploadServiceObject
175
+ * @property {CdnObject} [cdn]
195
176
  */
196
177
 
197
178
  /**
198
- * @typedef RetryEventRequest
199
- * @property {string} [end_date]
200
- * @property {Event[]} [event]
201
- * @property {string} [search_text]
202
- * @property {string} [start_date]
203
- * @property {string} [status]
204
- * @property {number[]} [subscriber_ids]
179
+ * @typedef HistoryResponseObject
180
+ * @property {number} [id] - The ID of the history report.
181
+ * @property {AssociationDetails} [association]
182
+ * @property {HistoryFilters} [filters]
183
+ * @property {string} [filename] - The filename of the history report.
184
+ * @property {string} [status] - The status of the history report (e.g., "COMPLETED").
185
+ * @property {UploadServiceObject} [upload_service_response]
186
+ * @property {string} [created_on] - The date and time when the history report
187
+ * was created.
188
+ * @property {string} [updated_on] - The date and time when the history report
189
+ * was last updated.
190
+ * @property {string} [message] - A message related to the history report.
205
191
  */
206
192
 
207
193
  /**
208
- * @typedef RetryFailureResponse
209
- * @property {Err[]} [err]
194
+ * @typedef HistoryResponse
195
+ * @property {HistoryResponseObject[]} [items]
210
196
  */
211
197
 
212
198
  /**
213
- * @typedef RetryStatusResponse
214
- * @property {number} [failure_count] - The count of failed retry attempts.
215
- * @property {string} [status] - The overall status of the retry process (e.g.,
216
- * "completed").
217
- * @property {number} [success_count] - The count of successfully retried events.
218
- * @property {number} [total_event] - The total number of events that require retry.
199
+ * @typedef Page
200
+ * @property {number} [item_total]
201
+ * @property {string} [next_id]
202
+ * @property {boolean} [has_previous]
203
+ * @property {boolean} [has_next]
204
+ * @property {number} [current]
205
+ * @property {string} type
206
+ * @property {number} [size]
219
207
  */
220
208
 
221
209
  /**
222
- * @typedef RetrySuccessResponse
223
- * @property {string} [message]
224
- * @property {boolean} [success]
210
+ * @typedef AssociationDetails
211
+ * @property {number} [company_id]
225
212
  */
226
213
 
227
214
  /**
228
- * @typedef SubscriberConfig
215
+ * @typedef SubscriberResponse
216
+ * @property {number} [id]
217
+ * @property {string} [name]
218
+ * @property {string} [webhook_url]
229
219
  * @property {Association} [association]
230
- * @property {AuthMeta} [auth_meta]
231
220
  * @property {Object} [custom_headers]
232
221
  * @property {string} [email_id]
233
- * @property {number[]} [event_id]
234
- * @property {number} [id]
235
- * @property {string} [name]
236
222
  * @property {SubscriberStatus} [status]
237
- * @property {string} [webhook_url]
223
+ * @property {AuthMeta} [auth_meta]
224
+ * @property {string} [created_on]
225
+ * @property {string} [updated_on]
226
+ * @property {EventConfig[]} [event_configs]
238
227
  */
239
228
 
240
229
  /**
241
- * @typedef SubscriberConfigList
242
- * @property {SubscriberResponse[]} [items]
243
- * @property {Page} [page]
230
+ * @typedef AuthMeta
231
+ * @property {string} [type]
232
+ * @property {string} [secret]
244
233
  */
245
234
 
246
235
  /**
247
- * @typedef SubscriberConfigResponse
248
- * @property {Association} [association]
249
- * @property {AuthMeta} [auth_meta]
250
- * @property {string} [created_on]
251
- * @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
- * @property {SubscriberStatus} [status]
258
- * @property {string} [type]
259
- * @property {string} [updated_on]
260
- * @property {string} [webhook_url]
236
+ * @typedef Association
237
+ * @property {number} [company_id]
238
+ * @property {string[]} [application_id]
239
+ * @property {string} [extension_id]
240
+ * @property {string} [criteria]
261
241
  */
262
242
 
263
243
  /**
264
- * @typedef SubscriberResponse
265
- * @property {Association} [association]
266
- * @property {AuthMeta} [auth_meta]
267
- * @property {string} [created_on]
268
- * @property {Object} [custom_headers]
269
- * @property {string} [email_id]
270
- * @property {EventConfig[]} [event_configs]
244
+ * @typedef SubscriberConfig
271
245
  * @property {number} [id]
272
- * @property {string} [modified_by]
273
246
  * @property {string} [name]
274
- * @property {SubscriberStatus} [status]
275
- * @property {string} [type]
276
- * @property {string} [updated_on]
277
247
  * @property {string} [webhook_url]
248
+ * @property {Association} [association]
249
+ * @property {Object} [custom_headers]
250
+ * @property {SubscriberStatus} [status]
251
+ * @property {string} [email_id]
252
+ * @property {AuthMeta} [auth_meta]
253
+ * @property {number[]} [event_id]
278
254
  */
279
255
 
280
256
  /**
281
- * @typedef UploadServiceObject
282
- * @property {CdnObject} [cdn]
283
- */
284
-
285
- /**
286
- * @typedef Url
287
- * @property {string} [name] - The name of the uploaded report file.
288
- * @property {string} [url] - The URL of the uploaded report file.
257
+ * @typedef SubscriberConfigList
258
+ * @property {SubscriberResponse[]} [items]
259
+ * @property {Page} [page]
289
260
  */
290
261
 
291
262
  /** @typedef {"active" | "inactive" | "blocked"} SubscriberStatus */
292
263
 
293
264
  class WebhookPlatformModel {
294
- /** @returns {Association} */
295
- static Association() {
265
+ /** @returns {CancelResponse} */
266
+ static CancelResponse() {
296
267
  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(""),
268
+ code: Joi.number(),
301
269
  });
302
270
  }
303
271
 
304
- /** @returns {AuthMeta} */
305
- static AuthMeta() {
272
+ /** @returns {EventProcessRequest} */
273
+ static EventProcessRequest() {
306
274
  return Joi.object({
307
- secret: Joi.string().allow(""),
308
- type: Joi.string().allow(""),
275
+ search_text: Joi.string().allow(""),
276
+ end_date: Joi.string().allow(""),
277
+ start_date: Joi.string().allow(""),
278
+ subscriber_ids: Joi.array().items(Joi.number()),
279
+ event: Joi.array().items(WebhookPlatformModel.Event()),
309
280
  });
310
281
  }
311
282
 
312
- /** @returns {CancelResponse} */
313
- static CancelResponse() {
283
+ /** @returns {Event} */
284
+ static Event() {
314
285
  return Joi.object({
315
- message: Joi.string().allow(""),
286
+ event_name: Joi.string().allow(""),
287
+ event_type: Joi.string().allow(""),
288
+ event_category: Joi.string().allow(""),
289
+ version: Joi.string().allow(""),
316
290
  });
317
291
  }
318
292
 
319
- /** @returns {CdnObject} */
320
- static CdnObject() {
293
+ /** @returns {ManualRetryFailedResponse} */
294
+ static ManualRetryFailedResponse() {
321
295
  return Joi.object({
322
- urls: Joi.array().items(WebhookPlatformModel.Url()),
296
+ success: Joi.boolean(),
297
+ message: Joi.string().allow(""),
298
+ request_id: Joi.string().allow(""),
299
+ meta: Joi.any(),
300
+ stack_trace: Joi.string().allow(""),
323
301
  });
324
302
  }
325
303
 
326
- /** @returns {DownloadReportResponse} */
327
- static DownloadReportResponse() {
304
+ /** @returns {FailedEventsCountSuccessResponse} */
305
+ static FailedEventsCountSuccessResponse() {
328
306
  return Joi.object({
329
- file_name: Joi.string().allow(""),
307
+ items: Joi.array().items(WebhookPlatformModel.EventCountItem()),
330
308
  });
331
309
  }
332
310
 
333
- /** @returns {Err} */
334
- static Err() {
311
+ /** @returns {EventCountItem} */
312
+ static EventCountItem() {
335
313
  return Joi.object({
336
- location: Joi.string().allow(""),
337
- msg: Joi.string().allow(""),
338
- param: Joi.string().allow(""),
314
+ status: Joi.string().allow(""),
315
+ count: Joi.number(),
339
316
  });
340
317
  }
341
-
342
- /** @returns {Error} */
343
- static Error() {
318
+
319
+ /** @returns {RetryStatusResponse} */
320
+ static RetryStatusResponse() {
344
321
  return Joi.object({
345
- error: Joi.string().allow(""),
322
+ total_event: Joi.number(),
323
+ success_count: Joi.number(),
324
+ failure_count: Joi.number(),
325
+ status: Joi.string().allow(""),
346
326
  });
347
327
  }
348
328
 
349
- /** @returns {Event} */
350
- static Event() {
329
+ /** @returns {EventSuccessResponse} */
330
+ static EventSuccessResponse() {
351
331
  return Joi.object({
352
- event_category: Joi.string().allow(""),
353
- event_name: Joi.string().allow(""),
354
- event_type: Joi.string().allow(""),
355
- version: Joi.string().allow(""),
332
+ success: Joi.boolean(),
333
+ message: Joi.string().allow(""),
356
334
  });
357
335
  }
358
336
 
359
- /** @returns {EventConfig} */
360
- static EventConfig() {
337
+ /** @returns {EventProcessedSuccessResponse} */
338
+ static EventProcessedSuccessResponse() {
361
339
  return Joi.object({
362
- created_on: Joi.string().allow(""),
363
- description: Joi.string().allow("").allow(null),
364
- display_name: Joi.string().allow(""),
365
- event_category: Joi.string().allow(""),
366
- event_name: Joi.string().allow(""),
367
- event_schema: Joi.object().pattern(/\S/, Joi.any()),
368
- event_type: Joi.string().allow(""),
369
- id: Joi.number(),
370
- updated_on: Joi.string().allow(""),
371
- version: Joi.string().allow(""),
340
+ success: Joi.boolean(),
341
+ message: Joi.string().allow(""),
372
342
  });
373
343
  }
374
344
 
375
- /** @returns {EventConfigResponse} */
376
- static EventConfigResponse() {
345
+ /** @returns {Error} */
346
+ static Error() {
377
347
  return Joi.object({
378
- event_configs: Joi.array().items(WebhookPlatformModel.EventConfig()),
348
+ error: Joi.string().allow(""),
379
349
  });
380
350
  }
381
351
 
382
352
  /** @returns {EventProcessReportObject} */
383
353
  static EventProcessReportObject() {
384
354
  return Joi.object({
385
- attempt: Joi.number(),
386
- data: Joi.object().pattern(/\S/, Joi.any()),
387
355
  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
356
  response_code: Joi.number(),
393
357
  response_message: Joi.string().allow(""),
394
- response_time: Joi.number(),
358
+ data: Joi.string().allow(""),
359
+ attempt: Joi.number(),
360
+ last_attempted_on: Joi.number(),
395
361
  status: Joi.string().allow(""),
362
+ name: Joi.string().allow(""),
396
363
  webhook_url: Joi.string().allow(""),
364
+ response_time: Joi.number(),
397
365
  });
398
366
  }
399
367
 
400
368
  /** @returns {EventProcessReports} */
401
369
  static EventProcessReports() {
402
370
  return Joi.object({
403
- page: WebhookPlatformModel.Page(),
404
371
  rows: Joi.array().items(WebhookPlatformModel.EventProcessReportObject()),
372
+ page: WebhookPlatformModel.Page(),
405
373
  });
406
374
  }
407
375
 
408
- /** @returns {EventProcessRequest} */
409
- static EventProcessRequest() {
376
+ /** @returns {PingWebhook} */
377
+ static PingWebhook() {
410
378
  return Joi.object({
411
- end_date: Joi.string().allow(""),
412
- event: Joi.array().items(WebhookPlatformModel.Event()),
413
- search_text: Joi.string().allow(""),
414
- start_date: Joi.string().allow(""),
415
- status: Joi.string().allow(""),
416
- subscriber_ids: Joi.array().items(Joi.number()),
379
+ webhook_url: Joi.string().allow(""),
380
+ auth_meta: Joi.any(),
381
+ custom_headers: Joi.any(),
417
382
  });
418
383
  }
419
384
 
420
- /** @returns {HistoryAssociation} */
421
- static HistoryAssociation() {
385
+ /** @returns {PingWebhookResponse} */
386
+ static PingWebhookResponse() {
422
387
  return Joi.object({
423
- company_id: Joi.number(),
424
- subscriber_ids: Joi.array().items(Joi.number()),
388
+ status: Joi.string().allow(""),
389
+ message: Joi.string().allow(""),
390
+ code: Joi.number(),
425
391
  });
426
392
  }
427
393
 
428
- /** @returns {HistoryFilters} */
429
- static HistoryFilters() {
394
+ /** @returns {ReportFiltersPayload} */
395
+ static ReportFiltersPayload() {
430
396
  return Joi.object({
431
- end_date: Joi.string().allow(""),
432
- events: Joi.array().items(Joi.string().allow("")),
433
- search_text: Joi.string().allow(""),
434
- start_date: Joi.string().allow(""),
435
- status: Joi.string().allow(""),
436
- subscribers: Joi.array().items(Joi.number()),
397
+ subscriber_ids: Joi.array().items(Joi.number()),
437
398
  });
438
399
  }
439
400
 
440
- /** @returns {HistoryItems} */
441
- static HistoryItems() {
401
+ /** @returns {FilterValues} */
402
+ static FilterValues() {
442
403
  return Joi.object({
443
- association: WebhookPlatformModel.HistoryAssociation(),
444
- created_on: Joi.string().allow(""),
445
- filename: Joi.string().allow(""),
446
- filters: WebhookPlatformModel.HistoryFilters(),
447
- id: Joi.number(),
448
- message: Joi.string().allow(""),
449
- status: Joi.string().allow(""),
450
- updated_on: Joi.string().allow("").allow(null),
451
- upload_service_response: WebhookPlatformModel.UploadServiceObject(),
404
+ text: Joi.string().allow(""),
405
+ value: Joi.any(),
452
406
  });
453
407
  }
454
408
 
455
- /** @returns {HistoryPayload} */
456
- static HistoryPayload() {
409
+ /** @returns {FilterResponseObject} */
410
+ static FilterResponseObject() {
457
411
  return Joi.object({
458
- page_no: Joi.number(),
459
- page_size: Joi.number(),
460
- type: Joi.string().allow(""),
412
+ filter_name: Joi.string().allow(""),
413
+ values: Joi.array().items(WebhookPlatformModel.FilterValues()),
461
414
  });
462
415
  }
463
416
 
464
- /** @returns {HistoryResponse} */
465
- static HistoryResponse() {
417
+ /** @returns {EventConfigResponse} */
418
+ static EventConfigResponse() {
466
419
  return Joi.object({
467
- items: Joi.array().items(WebhookPlatformModel.HistoryItems()),
468
- page: WebhookPlatformModel.Page(),
420
+ event_configs: Joi.array().items(WebhookPlatformModel.EventConfig()),
469
421
  });
470
422
  }
471
423
 
472
- /** @returns {Item} */
473
- static Item() {
424
+ /** @returns {EventConfig} */
425
+ static EventConfig() {
474
426
  return Joi.object({
475
- count: Joi.number(),
476
- status: Joi.string().allow(""),
427
+ id: Joi.number(),
428
+ event_name: Joi.string().allow(""),
429
+ event_type: Joi.string().allow(""),
430
+ event_category: Joi.string().allow(""),
431
+ version: Joi.string().allow(""),
432
+ display_name: Joi.string().allow(""),
433
+ description: Joi.string().allow(""),
434
+ created_on: Joi.string().allow(""),
477
435
  });
478
436
  }
479
437
 
480
- /** @returns {Page} */
481
- static Page() {
438
+ /** @returns {ReportFilterResponse} */
439
+ static ReportFilterResponse() {
482
440
  return Joi.object({
483
- current: Joi.number(),
484
- has_next: Joi.boolean(),
485
- has_previous: Joi.boolean(),
486
- item_total: Joi.number(),
487
- next_id: Joi.string().allow(""),
488
- size: Joi.number(),
489
- type: Joi.string().allow("").required(),
441
+ items: Joi.array().items(WebhookPlatformModel.FilterResponseObject()),
490
442
  });
491
443
  }
492
444
 
493
- /** @returns {PingWebhook} */
494
- static PingWebhook() {
445
+ /** @returns {HistoryPayload} */
446
+ static HistoryPayload() {
495
447
  return Joi.object({
496
- auth_meta: Joi.any(),
497
- custom_headers: Joi.any(),
498
- webhook_url: Joi.string().allow(""),
448
+ type: Joi.string().allow(""),
449
+ page_no: Joi.number(),
450
+ page_size: Joi.number(),
499
451
  });
500
452
  }
501
453
 
502
- /** @returns {PingWebhookResponse} */
503
- static PingWebhookResponse() {
454
+ /** @returns {HistoryFilters} */
455
+ static HistoryFilters() {
504
456
  return Joi.object({
505
- code: Joi.number(),
506
- message: Joi.string().allow(""),
507
457
  status: Joi.string().allow(""),
458
+ end_date: Joi.string().allow(""),
459
+ start_date: Joi.string().allow(""),
460
+ subscribers: Joi.array().items(Joi.number()),
508
461
  });
509
462
  }
510
463
 
511
- /** @returns {ReportFilterResponse} */
512
- static ReportFilterResponse() {
464
+ /** @returns {Url} */
465
+ static Url() {
513
466
  return Joi.object({
514
- filter_name: Joi.string().allow(""),
515
- values: Joi.array().items(Joi.object().pattern(/\S/, Joi.any())),
467
+ url: Joi.string().allow(""),
468
+ name: Joi.string().allow(""),
516
469
  });
517
470
  }
518
471
 
519
- /** @returns {ReportFiltersPayload} */
520
- static ReportFiltersPayload() {
472
+ /** @returns {CdnObject} */
473
+ static CdnObject() {
521
474
  return Joi.object({
522
- subscriber_ids: Joi.array().items(Joi.number()),
475
+ urls: Joi.array().items(WebhookPlatformModel.Url()),
523
476
  });
524
477
  }
525
478
 
526
- /** @returns {RetryCountResponse} */
527
- static RetryCountResponse() {
479
+ /** @returns {UploadServiceObject} */
480
+ static UploadServiceObject() {
528
481
  return Joi.object({
529
- items: Joi.array().items(WebhookPlatformModel.Item()),
482
+ cdn: WebhookPlatformModel.CdnObject(),
530
483
  });
531
484
  }
532
485
 
533
- /** @returns {RetryEventRequest} */
534
- static RetryEventRequest() {
486
+ /** @returns {HistoryResponseObject} */
487
+ static HistoryResponseObject() {
535
488
  return Joi.object({
536
- end_date: Joi.string().allow(""),
537
- event: Joi.array().items(WebhookPlatformModel.Event()),
538
- search_text: Joi.string().allow(""),
539
- start_date: Joi.string().allow(""),
489
+ id: Joi.number(),
490
+ association: WebhookPlatformModel.AssociationDetails(),
491
+ filters: WebhookPlatformModel.HistoryFilters(),
492
+ filename: Joi.string().allow(""),
540
493
  status: Joi.string().allow(""),
541
- subscriber_ids: Joi.array().items(Joi.number()),
494
+ upload_service_response: WebhookPlatformModel.UploadServiceObject(),
495
+ created_on: Joi.string().allow(""),
496
+ updated_on: Joi.string().allow(""),
497
+ message: Joi.string().allow(""),
542
498
  });
543
499
  }
544
500
 
545
- /** @returns {RetryFailureResponse} */
546
- static RetryFailureResponse() {
501
+ /** @returns {HistoryResponse} */
502
+ static HistoryResponse() {
547
503
  return Joi.object({
548
- err: Joi.array().items(WebhookPlatformModel.Err()),
504
+ items: Joi.array().items(WebhookPlatformModel.HistoryResponseObject()),
549
505
  });
550
506
  }
551
507
 
552
- /** @returns {RetryStatusResponse} */
553
- static RetryStatusResponse() {
508
+ /** @returns {Page} */
509
+ static Page() {
554
510
  return Joi.object({
555
- failure_count: Joi.number(),
556
- status: Joi.string().allow(""),
557
- success_count: Joi.number(),
558
- total_event: Joi.number(),
511
+ item_total: Joi.number(),
512
+ next_id: Joi.string().allow(""),
513
+ has_previous: Joi.boolean(),
514
+ has_next: Joi.boolean(),
515
+ current: Joi.number(),
516
+ type: Joi.string().allow("").required(),
517
+ size: Joi.number(),
559
518
  });
560
519
  }
561
520
 
562
- /** @returns {RetrySuccessResponse} */
563
- static RetrySuccessResponse() {
521
+ /** @returns {AssociationDetails} */
522
+ static AssociationDetails() {
564
523
  return Joi.object({
565
- message: Joi.string().allow(""),
566
- success: Joi.boolean(),
524
+ company_id: Joi.number(),
567
525
  });
568
526
  }
569
527
 
570
- /** @returns {SubscriberConfig} */
571
- static SubscriberConfig() {
528
+ /** @returns {SubscriberResponse} */
529
+ static SubscriberResponse() {
572
530
  return Joi.object({
531
+ id: Joi.number(),
532
+ name: Joi.string().allow(""),
533
+ webhook_url: Joi.string().allow(""),
573
534
  association: WebhookPlatformModel.Association(),
574
- auth_meta: WebhookPlatformModel.AuthMeta(),
575
535
  custom_headers: Joi.any(),
576
536
  email_id: Joi.string().allow(""),
577
- event_id: Joi.array().items(Joi.number()),
578
- id: Joi.number(),
579
- name: Joi.string().allow(""),
580
537
  status: WebhookPlatformModel.SubscriberStatus(),
581
- webhook_url: Joi.string().allow(""),
538
+ auth_meta: WebhookPlatformModel.AuthMeta(),
539
+ created_on: Joi.string().allow(""),
540
+ updated_on: Joi.string().allow(""),
541
+ event_configs: Joi.array().items(WebhookPlatformModel.EventConfig()),
582
542
  });
583
543
  }
584
544
 
585
- /** @returns {SubscriberConfigList} */
586
- static SubscriberConfigList() {
545
+ /** @returns {AuthMeta} */
546
+ static AuthMeta() {
587
547
  return Joi.object({
588
- items: Joi.array().items(WebhookPlatformModel.SubscriberResponse()),
589
- page: WebhookPlatformModel.Page(),
548
+ type: Joi.string().allow(""),
549
+ secret: Joi.string().allow(""),
590
550
  });
591
551
  }
592
552
 
593
- /** @returns {SubscriberConfigResponse} */
594
- static SubscriberConfigResponse() {
553
+ /** @returns {Association} */
554
+ static Association() {
595
555
  return Joi.object({
596
- association: WebhookPlatformModel.Association(),
597
- auth_meta: WebhookPlatformModel.AuthMeta(),
598
- created_on: Joi.string().allow(""),
599
- custom_headers: Joi.any(),
600
- email_id: Joi.string().allow(""),
601
- event_id: Joi.array().items(Joi.number()),
602
- id: Joi.number(),
603
- modified_by: Joi.string().allow(""),
604
- name: Joi.string().allow(""),
605
- status: WebhookPlatformModel.SubscriberStatus(),
606
- type: Joi.string().allow("").allow(null),
607
- updated_on: Joi.string().allow(""),
608
- webhook_url: Joi.string().allow(""),
556
+ company_id: Joi.number(),
557
+ application_id: Joi.array().items(Joi.string().allow("")),
558
+ extension_id: Joi.string().allow(""),
559
+ criteria: Joi.string().allow(""),
609
560
  });
610
561
  }
611
562
 
612
- /** @returns {SubscriberResponse} */
613
- static SubscriberResponse() {
563
+ /** @returns {SubscriberConfig} */
564
+ static SubscriberConfig() {
614
565
  return Joi.object({
615
- association: WebhookPlatformModel.Association(),
616
- auth_meta: WebhookPlatformModel.AuthMeta(),
617
- created_on: Joi.string().allow(""),
618
- custom_headers: Joi.any(),
619
- email_id: Joi.string().allow(""),
620
- event_configs: Joi.array().items(WebhookPlatformModel.EventConfig()),
621
566
  id: Joi.number(),
622
- modified_by: Joi.string().allow(""),
623
567
  name: Joi.string().allow(""),
624
- status: WebhookPlatformModel.SubscriberStatus(),
625
- type: Joi.string().allow("").allow(null),
626
- updated_on: Joi.string().allow(""),
627
568
  webhook_url: Joi.string().allow(""),
569
+ association: WebhookPlatformModel.Association(),
570
+ custom_headers: Joi.any(),
571
+ status: WebhookPlatformModel.SubscriberStatus(),
572
+ email_id: Joi.string().allow(""),
573
+ auth_meta: WebhookPlatformModel.AuthMeta(),
574
+ event_id: Joi.array().items(Joi.number()),
628
575
  });
629
576
  }
630
577
 
631
- /** @returns {UploadServiceObject} */
632
- static UploadServiceObject() {
633
- return Joi.object({
634
- cdn: WebhookPlatformModel.CdnObject(),
635
- });
636
- }
637
-
638
- /** @returns {Url} */
639
- static Url() {
578
+ /** @returns {SubscriberConfigList} */
579
+ static SubscriberConfigList() {
640
580
  return Joi.object({
641
- name: Joi.string().allow(""),
642
- url: Joi.string().allow(""),
581
+ items: Joi.array().items(WebhookPlatformModel.SubscriberResponse()),
582
+ page: WebhookPlatformModel.Page(),
643
583
  });
644
584
  }
645
585