@gofynd/fdk-client-javascript 1.4.15-beta.13 → 1.4.15-beta.15

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 (278) hide show
  1. package/README.md +23 -26
  2. package/package.json +5 -1
  3. package/sdk/application/ApplicationClient.d.ts +5 -6
  4. package/sdk/application/ApplicationClient.js +24 -20
  5. package/sdk/application/Cart/CartApplicationClient.d.ts +133 -83
  6. package/sdk/application/Cart/CartApplicationClient.js +444 -76
  7. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +132 -114
  8. package/sdk/application/Catalog/CatalogApplicationClient.js +209 -126
  9. package/sdk/application/Common/CommonApplicationClient.d.ts +4 -4
  10. package/sdk/application/Common/CommonApplicationClient.js +4 -4
  11. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +3 -3
  12. package/sdk/application/Communication/CommunicationApplicationClient.js +3 -3
  13. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +58 -36
  14. package/sdk/application/Configuration/ConfigurationApplicationClient.js +73 -29
  15. package/sdk/application/Content/ContentApplicationClient.d.ts +95 -66
  16. package/sdk/application/Content/ContentApplicationClient.js +274 -111
  17. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +11 -11
  18. package/sdk/application/FileStorage/FileStorageApplicationClient.js +10 -10
  19. package/sdk/application/Finance/FinanceApplicationClient.d.ts +29 -0
  20. package/sdk/application/Finance/FinanceApplicationClient.js +111 -0
  21. package/sdk/application/Lead/LeadApplicationClient.d.ts +7 -7
  22. package/sdk/application/Lead/LeadApplicationClient.js +6 -6
  23. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +37 -57
  24. package/sdk/application/Logistic/LogisticApplicationClient.js +117 -180
  25. package/sdk/application/Order/OrderApplicationClient.d.ts +63 -21
  26. package/sdk/application/Order/OrderApplicationClient.js +217 -17
  27. package/sdk/application/Payment/PaymentApplicationClient.d.ts +179 -149
  28. package/sdk/application/Payment/PaymentApplicationClient.js +301 -167
  29. package/sdk/application/Share/ShareApplicationClient.d.ts +7 -7
  30. package/sdk/application/Share/ShareApplicationClient.js +7 -7
  31. package/sdk/application/Theme/ThemeApplicationClient.d.ts +7 -7
  32. package/sdk/application/Theme/ThemeApplicationClient.js +10 -6
  33. package/sdk/application/User/UserApplicationClient.d.ts +103 -53
  34. package/sdk/application/User/UserApplicationClient.js +308 -49
  35. package/sdk/common/AxiosHelper.js +11 -4
  36. package/sdk/common/Constant.d.ts +27 -4
  37. package/sdk/common/Constant.js +33 -6
  38. package/sdk/common/utils.d.ts +10 -0
  39. package/sdk/common/utils.js +24 -3
  40. package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +46 -16
  41. package/sdk/partner/FileStorage/FileStoragePartnerClient.js +266 -40
  42. package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +163 -19
  43. package/sdk/partner/FileStorage/FileStoragePartnerModel.js +158 -14
  44. package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +5 -2
  45. package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +23 -7
  46. package/sdk/partner/Lead/LeadPartnerClient.d.ts +9 -9
  47. package/sdk/partner/Lead/LeadPartnerClient.js +9 -9
  48. package/sdk/partner/Lead/LeadPartnerModel.d.ts +14 -9
  49. package/sdk/partner/Lead/LeadPartnerModel.js +19 -17
  50. package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +264 -49
  51. package/sdk/partner/Logistics/LogisticsPartnerClient.js +2116 -252
  52. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +2256 -258
  53. package/sdk/partner/Logistics/LogisticsPartnerModel.js +1187 -230
  54. package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +21 -1
  55. package/sdk/partner/Logistics/LogisticsPartnerValidator.js +218 -13
  56. package/sdk/partner/PartnerClient.d.ts +5 -2
  57. package/sdk/partner/PartnerClient.js +21 -7
  58. package/sdk/partner/Theme/ThemePartnerClient.d.ts +32 -34
  59. package/sdk/partner/Theme/ThemePartnerClient.js +42 -44
  60. package/sdk/partner/Theme/ThemePartnerModel.d.ts +142 -43
  61. package/sdk/partner/Theme/ThemePartnerModel.js +129 -44
  62. package/sdk/partner/Theme/ThemePartnerValidator.js +4 -4
  63. package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +83 -27
  64. package/sdk/partner/Webhook/WebhookPartnerClient.js +446 -27
  65. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +920 -185
  66. package/sdk/partner/Webhook/WebhookPartnerModel.js +462 -154
  67. package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +5 -0
  68. package/sdk/partner/Webhook/WebhookPartnerValidator.js +41 -3
  69. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +8 -7
  70. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +17 -11
  71. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +4 -1
  72. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
  73. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +68 -13
  74. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +44 -6
  75. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +3 -33
  76. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +4 -244
  77. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +49 -145
  78. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +20 -171
  79. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -39
  80. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +0 -35
  81. package/sdk/platform/Billing/BillingPlatformClient.d.ts +15 -15
  82. package/sdk/platform/Billing/BillingPlatformClient.js +18 -18
  83. package/sdk/platform/Billing/BillingPlatformModel.d.ts +443 -388
  84. package/sdk/platform/Billing/BillingPlatformModel.js +280 -263
  85. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +16 -18
  86. package/sdk/platform/Billing/BillingPlatformValidator.js +8 -9
  87. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +266 -203
  88. package/sdk/platform/Cart/CartPlatformApplicationClient.js +1446 -500
  89. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +729 -100
  90. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +446 -82
  91. package/sdk/platform/Cart/CartPlatformModel.d.ts +6927 -1396
  92. package/sdk/platform/Cart/CartPlatformModel.js +3065 -1316
  93. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +433 -248
  94. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1662 -559
  95. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +464 -159
  96. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +304 -87
  97. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +383 -234
  98. package/sdk/platform/Catalog/CatalogPlatformClient.js +2475 -1557
  99. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +9571 -2674
  100. package/sdk/platform/Catalog/CatalogPlatformModel.js +5081 -2019
  101. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +364 -117
  102. package/sdk/platform/Catalog/CatalogPlatformValidator.js +281 -104
  103. package/sdk/platform/Common/CommonPlatformClient.d.ts +5 -4
  104. package/sdk/platform/Common/CommonPlatformClient.js +6 -5
  105. package/sdk/platform/Common/CommonPlatformModel.d.ts +36 -25
  106. package/sdk/platform/Common/CommonPlatformModel.js +25 -14
  107. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +80 -153
  108. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +102 -541
  109. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +36 -49
  110. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +20 -60
  111. package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +1 -1
  112. package/sdk/platform/Communication/CommunicationPlatformClient.js +1 -1
  113. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +189 -43
  114. package/sdk/platform/Communication/CommunicationPlatformModel.js +165 -42
  115. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +58 -81
  116. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +68 -116
  117. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +291 -249
  118. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +243 -234
  119. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +12 -12
  120. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +12 -12
  121. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +78 -65
  122. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +101 -88
  123. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +20 -20
  124. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +19 -19
  125. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +68 -34
  126. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +174 -41
  127. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +667 -244
  128. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +474 -155
  129. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +37 -9
  130. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +27 -8
  131. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +366 -280
  132. package/sdk/platform/Content/ContentPlatformApplicationClient.js +1435 -753
  133. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +323 -223
  134. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +335 -205
  135. package/sdk/platform/Content/ContentPlatformClient.d.ts +304 -106
  136. package/sdk/platform/Content/ContentPlatformClient.js +1842 -450
  137. package/sdk/platform/Content/ContentPlatformModel.d.ts +2582 -566
  138. package/sdk/platform/Content/ContentPlatformModel.js +1426 -558
  139. package/sdk/platform/Content/ContentPlatformValidator.d.ts +293 -114
  140. package/sdk/platform/Content/ContentPlatformValidator.js +328 -101
  141. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +59 -23
  142. package/sdk/platform/Discount/DiscountPlatformClient.js +84 -23
  143. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +403 -110
  144. package/sdk/platform/Discount/DiscountPlatformModel.js +121 -107
  145. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +56 -36
  146. package/sdk/platform/Discount/DiscountPlatformValidator.js +29 -19
  147. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +12 -110
  148. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +14 -684
  149. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +5 -94
  150. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +4 -115
  151. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +20 -20
  152. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +22 -22
  153. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +90 -920
  154. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +53 -949
  155. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
  156. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
  157. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +10 -10
  158. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +10 -10
  159. package/sdk/platform/Lead/LeadPlatformClient.d.ts +11 -11
  160. package/sdk/platform/Lead/LeadPlatformClient.js +11 -11
  161. package/sdk/platform/Lead/LeadPlatformModel.d.ts +14 -9
  162. package/sdk/platform/Lead/LeadPlatformModel.js +20 -18
  163. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +56 -9
  164. package/sdk/platform/Order/OrderPlatformApplicationClient.js +340 -10
  165. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +128 -24
  166. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +81 -19
  167. package/sdk/platform/Order/OrderPlatformClient.d.ts +517 -160
  168. package/sdk/platform/Order/OrderPlatformClient.js +1623 -384
  169. package/sdk/platform/Order/OrderPlatformModel.d.ts +10372 -1587
  170. package/sdk/platform/Order/OrderPlatformModel.js +5726 -1512
  171. package/sdk/platform/Order/OrderPlatformValidator.d.ts +539 -123
  172. package/sdk/platform/Order/OrderPlatformValidator.js +323 -92
  173. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +8 -6
  174. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +11 -9
  175. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +6 -4
  176. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +3 -2
  177. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +77 -25
  178. package/sdk/platform/Partner/PartnerPlatformModel.js +32 -21
  179. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +144 -219
  180. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +307 -796
  181. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +86 -121
  182. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +80 -138
  183. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +30 -30
  184. package/sdk/platform/Payment/PaymentPlatformClient.js +30 -30
  185. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +901 -761
  186. package/sdk/platform/Payment/PaymentPlatformModel.js +663 -583
  187. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +8 -8
  188. package/sdk/platform/Payment/PaymentPlatformValidator.js +8 -8
  189. package/sdk/platform/PlatformApplicationClient.d.ts +0 -2
  190. package/sdk/platform/PlatformApplicationClient.js +0 -4
  191. package/sdk/platform/PlatformClient.d.ts +5 -4
  192. package/sdk/platform/PlatformClient.js +32 -22
  193. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +526 -69
  194. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +3337 -337
  195. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +603 -38
  196. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +529 -32
  197. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +184 -133
  198. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +780 -491
  199. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +9408 -1666
  200. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +5720 -1765
  201. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +257 -180
  202. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +185 -127
  203. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +7 -7
  204. package/sdk/platform/Share/SharePlatformApplicationClient.js +7 -7
  205. package/sdk/platform/Share/SharePlatformModel.d.ts +45 -9
  206. package/sdk/platform/Share/SharePlatformModel.js +31 -6
  207. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +26 -26
  208. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +38 -29
  209. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +18 -3
  210. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +10 -2
  211. package/sdk/platform/Theme/ThemePlatformClient.d.ts +4 -4
  212. package/sdk/platform/Theme/ThemePlatformClient.js +4 -4
  213. package/sdk/platform/Theme/ThemePlatformModel.d.ts +103 -17
  214. package/sdk/platform/Theme/ThemePlatformModel.js +92 -23
  215. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +167 -45
  216. package/sdk/platform/User/UserPlatformApplicationClient.js +950 -67
  217. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +189 -3
  218. package/sdk/platform/User/UserPlatformApplicationValidator.js +157 -3
  219. package/sdk/platform/User/UserPlatformModel.d.ts +880 -47
  220. package/sdk/platform/User/UserPlatformModel.js +607 -46
  221. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +33 -86
  222. package/sdk/platform/Webhook/WebhookPlatformClient.js +79 -474
  223. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +861 -422
  224. package/sdk/platform/Webhook/WebhookPlatformModel.js +469 -391
  225. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -55
  226. package/sdk/platform/Webhook/WebhookPlatformValidator.js +12 -72
  227. package/sdk/platform/index.d.ts +0 -2
  228. package/sdk/platform/index.js +0 -4
  229. package/sdk/public/Catalog/CatalogPublicClient.d.ts +22 -0
  230. package/sdk/public/Catalog/CatalogPublicClient.js +133 -0
  231. package/sdk/public/Catalog/CatalogPublicModel.d.ts +158 -0
  232. package/sdk/public/Catalog/CatalogPublicModel.js +116 -0
  233. package/sdk/public/Catalog/CatalogPublicValidator.d.ts +55 -0
  234. package/sdk/public/Catalog/CatalogPublicValidator.js +35 -0
  235. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +5 -4
  236. package/sdk/public/Configuration/ConfigurationPublicClient.js +9 -8
  237. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +41 -21
  238. package/sdk/public/Configuration/ConfigurationPublicModel.js +28 -12
  239. package/sdk/public/Content/ContentPublicClient.d.ts +145 -2
  240. package/sdk/public/Content/ContentPublicClient.js +1067 -17
  241. package/sdk/public/Content/ContentPublicModel.d.ts +704 -3
  242. package/sdk/public/Content/ContentPublicModel.js +751 -3
  243. package/sdk/public/Content/ContentPublicValidator.d.ts +94 -3
  244. package/sdk/public/Content/ContentPublicValidator.js +119 -2
  245. package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
  246. package/sdk/public/Partner/PartnerPublicClient.js +1 -1
  247. package/sdk/public/Partner/PartnerPublicModel.d.ts +248 -72
  248. package/sdk/public/Partner/PartnerPublicModel.js +81 -71
  249. package/sdk/public/Partner/PartnerPublicValidator.d.ts +2 -2
  250. package/sdk/public/Partner/PartnerPublicValidator.js +1 -1
  251. package/sdk/public/PublicClient.d.ts +5 -2
  252. package/sdk/public/PublicClient.js +16 -6
  253. package/sdk/public/Webhook/WebhookPublicClient.d.ts +13 -13
  254. package/sdk/public/Webhook/WebhookPublicClient.js +13 -13
  255. package/sdk/public/Webhook/WebhookPublicModel.d.ts +249 -67
  256. package/sdk/public/Webhook/WebhookPublicModel.js +81 -61
  257. package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
  258. package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
  259. package/sdk/public/index.d.ts +1 -0
  260. package/sdk/public/index.js +2 -0
  261. package/utility.d.ts +3 -0
  262. package/utility.js +7 -0
  263. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +0 -79
  264. package/sdk/application/Rewards/RewardsApplicationClient.js +0 -315
  265. package/sdk/application/Webhook/WebhookApplicationClient.d.ts +0 -19
  266. package/sdk/application/Webhook/WebhookApplicationClient.js +0 -72
  267. package/sdk/platform/Finance/FinancePlatformClient.d.ts +0 -320
  268. package/sdk/platform/Finance/FinancePlatformClient.js +0 -2333
  269. package/sdk/platform/Finance/FinancePlatformModel.d.ts +0 -2890
  270. package/sdk/platform/Finance/FinancePlatformModel.js +0 -2148
  271. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +0 -284
  272. package/sdk/platform/Finance/FinancePlatformValidator.js +0 -354
  273. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +0 -136
  274. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +0 -976
  275. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +0 -152
  276. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +0 -157
  277. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +0 -382
  278. package/sdk/platform/Rewards/RewardsPlatformModel.js +0 -408
@@ -1,365 +1,364 @@
1
1
  const Joi = require("joi");
2
2
 
3
- /**
4
- * @typedef Event
5
- * @property {string} [event_name]
6
- * @property {string} [event_type]
7
- * @property {string} [event_category]
8
- * @property {string} [version]
9
- */
10
-
11
- /**
12
- * @typedef EventProcessRequest
13
- * @property {string} [search_text]
14
- * @property {string} end_date
15
- * @property {string} start_date
16
- * @property {number[]} [subscriber_ids]
17
- * @property {string} [status]
18
- * @property {Event[]} [event]
19
- */
20
-
21
- /**
22
- * @typedef DownloadReportResponse
23
- * @property {string} [file_name]
24
- */
25
-
26
- /**
27
- * @typedef EventProcessReports
28
- * @property {EventProcessReportObject[]} [rows]
29
- * @property {Page} [page]
30
- */
31
-
32
- /**
33
- * @typedef EventProcessReportObject
34
- * @property {string} [event_name] - The name of the processed event.
35
- * @property {number} [response_code] - The response code of the event.
36
- * @property {string} [response_message] - The response message of the event.
37
- * @property {string} [data] - The data associated with the event.
38
- * @property {number} [attempt] - The attempt number of the event.
39
- * @property {number} [last_attempted_on] - The timestamp of the last attempted event.
40
- * @property {string} [status] - The status of the event (e.g., "FAILED").
41
- * @property {string} [name] - The name of the event.
42
- * @property {string} [webhook_url] - The webhook URL associated with the event.
43
- * @property {number} [response_time] - The response time of the event.
44
- * @property {string} [message_id]
45
- * @property {string} [event_trace_id]
46
- */
47
-
48
3
  /**
49
4
  * @typedef Page
50
- * @property {number} [item_total] - The total number of items on the page.
5
+ * @property {number} [item_total] - The total number of all items across all pages.
51
6
  * @property {string} [next_id] - The identifier for the next page.
52
7
  * @property {boolean} [has_previous] - Indicates whether there is a previous page.
53
8
  * @property {boolean} [has_next] - Indicates whether there is a next page.
54
9
  * @property {number} [current] - The current page number.
55
- * @property {string} type - The type of the page, such as 'PageType'.
10
+ * @property {string} type - The type of the page, can be 'cursor' or 'number'.
56
11
  * @property {number} [size] - The number of items per page.
12
+ * @property {number} [page_size] - The number of items per page.
57
13
  */
58
14
 
59
15
  /**
60
- * @typedef PingWebhook
61
- * @property {string} webhook_url - The URL of the subscriber's webhook to ping.
62
- * @property {Object} [auth_meta] - Authentication metadata (if required by the
63
- * subscriber).
64
- * @property {Object} [custom_headers] - Custom headers to include in the ping request.
65
- */
66
-
67
- /**
68
- * @typedef PingWebhookResponse
69
- * @property {string} [status] - The status of the ping (e.g., "SUCCESS").
70
- * @property {string} [message] - An optional message related to the ping.
71
- * @property {number} [code] - The HTTP status code of the ping response (e.g., 200).
16
+ * @typedef BroadcasterConfig
17
+ * @property {string} [topic] - The name of the topic for the broadcaster configuration.
18
+ * @property {string} [queue] - The name of the queue for the broadcaster configuration.
19
+ * @property {string} [event_bridge_name] - The name of the event bridge
20
+ * associated with the broadcaster.
21
+ * @property {string} [workflow_name] - The name of the workflow related to the
22
+ * broadcaster.
23
+ * @property {string} [account_id] - The account ID associated with the broadcaster.
24
+ * @property {string} [detail_type] - The type of detail for the broadcaster
25
+ * configuration.
72
26
  */
73
27
 
74
28
  /**
75
29
  * @typedef SubscriberEventMapping
76
- * @property {number} [id]
77
- * @property {number} [event_id]
78
- * @property {number} [subscriber_id]
79
- * @property {string} [topic]
80
- * @property {string} [created_on]
30
+ * @property {number} [id] - The unique identifier for the subscriber event mapping.
31
+ * @property {number} [event_id] - The ID of the event associated with the subscriber.
32
+ * @property {number} [subscriber_id] - The ID of the subscriber.
33
+ * @property {FilterSchema} [filters]
34
+ * @property {Object} [reducer] - The reducer property allows users to customize
35
+ * the JSON structure of the webhook payload using JSONPath queries. They can
36
+ * also create new properties by mapping existing ones. Note that it overrides
37
+ * the entire JSON structure of the webhook payload sent via the webhook. See
38
+ * the partner documentation's filter and reducer section for details.
39
+ * @property {BroadcasterConfig} [broadcaster_config]
40
+ * @property {string} [created_on] - The date and time when the subscriber event
41
+ * mapping was created.
42
+ */
43
+
44
+ /**
45
+ * @typedef FilterSchema
46
+ * @property {string} [query] - JSONPath expression that specifies the property
47
+ * in the webhook payload to filter on. This enables targeting specific data
48
+ * within the payload.
49
+ * @property {string} [condition] - JavaScript function used to evaluate the
50
+ * specified property in the webhook payload against a condition. This
51
+ * function determines whether the filter passes based on its return value.
52
+ * @property {string} [logic] - Logical operator used to combine multiple
53
+ * conditions in the `conditions` array. Supported values are `AND` and `OR`.
54
+ * @property {Object[]} [conditions] - An array of filter objects to be
55
+ * evaluated using the specified logical operator. This array will contain
56
+ * more filters including a combination of single condition mode and logical
57
+ * group mode filters.
81
58
  */
82
59
 
83
60
  /**
84
61
  * @typedef EventConfig
85
- * @property {number} [id]
86
- * @property {string} [event_name]
87
- * @property {string} [event_type]
88
- * @property {string} [event_category]
62
+ * @property {number} [id] - The unique identifier for the event configuration.
63
+ * @property {string} [type] - The type of event configuration, which may be null.
64
+ * @property {string} [event_name] - The name of the event.
65
+ * @property {string} [event_type] - The type of the event.
66
+ * @property {string} [event_category] - The category of the event.
67
+ * @property {string} [modified_by] - The identifier of the user who last
68
+ * modified the event configuration.
89
69
  * @property {SubscriberEventMapping} [subscriber_event_mapping]
90
- * @property {Object} [event_schema]
91
- * @property {string} [group]
92
- * @property {string} [version]
93
- * @property {string} [display_name]
94
- * @property {string} [description]
95
- * @property {string} [created_on]
96
- * @property {string} [updated_on]
70
+ * @property {Object} [event_schema] - The schema for the event, allowing for
71
+ * additional properties and may be null.
72
+ * @property {string} [sunset_date] - The date and time after which the event is
73
+ * considered sunset. After this timestamp, the entity should no longer be
74
+ * actively used, referenced, or offered for new operations, even if it still exists.
75
+ * @property {string} [announcement_date] - The date and time when the
76
+ * deprecation of the event is officially announced. This marks the start of
77
+ * the deprecation notice period and indicates that the entity is planned to
78
+ * be retired in the future, but may still remain available until the sunset date.
79
+ * @property {string} [support_end_date] - The date and time after which
80
+ * official support for the event ends. Beyond this point, no guarantees are
81
+ * made for maintenance, updates, fixes, or issue resolution.
82
+ * @property {string} [group] - The group associated with the event
83
+ * configuration, which may be null.
84
+ * @property {string} [version] - The version of the event configuration.
85
+ * @property {string} [display_name] - The display name of the event configuration.
86
+ * @property {string} [description] - A description of the event configuration,
87
+ * which may be null.
88
+ * @property {string} [created_on] - The date and time when the event
89
+ * configuration was created.
90
+ * @property {string} [updated_on] - The date and time when the event
91
+ * configuration was last updated.
92
+ */
93
+
94
+ /**
95
+ * @typedef EventConfigResult
96
+ * @property {EventConfig[]} [event_configs] - List of event configurations.
97
97
  */
98
98
 
99
99
  /**
100
- * @typedef EventConfigResponse
101
- * @property {EventConfig[]} [event_configs]
100
+ * @typedef Association
101
+ * @property {string[]} [application_id] - A list of application IDs associated
102
+ * with the association.
103
+ * @property {string} [extension_id] - The extension ID associated with the association.
104
+ * @property {string} [criteria] - The criteria for the association, such as
105
+ * "ALL", "EMPTY", or "SPECIFIC-EVENTS".
102
106
  */
103
107
 
104
108
  /**
105
- * @typedef ReportFiltersPayload
106
- * @property {number[]} subscriber_ids - An array of subscriber IDs for
107
- * filtering filters (optional).
109
+ * @typedef AssociationResp
110
+ * @property {number} [company_id] - The ID of the company associated with the response.
111
+ * @property {string[]} [application_id] - A list of application IDs associated
112
+ * with the response.
113
+ * @property {string} [extension_id] - The extension ID associated with the response.
114
+ * @property {string} [criteria] - The criteria for the response, such as "ALL",
115
+ * "EMPTY", or "SPECIFIC-EVENTS".
108
116
  */
109
117
 
110
118
  /**
111
- * @typedef ReportFilterResponse
112
- * @property {string} [filter_name] - The name of the filter.
113
- * @property {Object[]} [values]
119
+ * @typedef AuthMeta
120
+ * @property {string} [type] - The type of authentication method used.
121
+ * @property {string} [secret] - The secret key or token used for authentication.
114
122
  */
115
123
 
116
124
  /**
117
- * @typedef HistoryPayload
118
- * @property {string} type - The type of history report (e.g., "platform").
119
- * @property {number} [page_no] - The page number of the history report.
120
- * @property {number} [page_size] - The number of records per page.
125
+ * @typedef SubscriberDetails
126
+ * @property {number} [id] - The unique identifier of the subscriber.
127
+ * @property {string} [modified_by] - The identifier of the user who last
128
+ * modified the subscriber details.
129
+ * @property {string} [name] - The name of the subscriber.
130
+ * @property {string} [provider] - The provider of the subscriber.
131
+ * @property {string} [webhook_url] - The URL for the subscriber's webhook.
132
+ * @property {string} [source] - Source that subscriber belongs to.
133
+ * @property {AssociationResp} [association]
134
+ * @property {Object} [custom_headers] - Custom headers for the subscriber.
135
+ * @property {SubscriberStatus} [status]
136
+ * @property {string} [email_id] - The email ID associated with the subscriber.
137
+ * @property {string} [updated_on] - The date and time when the subscriber
138
+ * details were last updated.
139
+ * @property {string} [created_on] - The date and time when the subscriber was created.
140
+ * @property {string} [type] - The type of subscriber, which can either be passed as null.
141
+ * @property {AuthMeta} [auth_meta]
142
+ * @property {EventConfig[]} [event_configs] - List of event configurations.
121
143
  */
122
144
 
123
145
  /**
124
- * @typedef HistoryFilters
125
- * @property {string[]} [events]
126
- * @property {string} [search_text]
127
- * @property {string} [status] - The status of the history report (e.g., "FAILED").
128
- * @property {string} [end_date] - The end date and time of the history report.
129
- * @property {string} [start_date] - The start date and time of the history report.
130
- * @property {number[]} [subscribers] - An array of subscriber IDs associated
131
- * with the history report.
132
- * @property {string[]} [webhook_type] - An array of webhook type to identify
133
- * thetype of subscriber i.e (KAFKA or REST).
146
+ * @typedef Events
147
+ * @property {string} [slug] - The slug or identifier for the event.
148
+ * @property {string} [topic] - The topic associated with the event.
149
+ * @property {string} [queue] - The queue associated with the event in case of
150
+ * provider as Pub/Sub.
151
+ * @property {string} [event_bridge_name] - The name of the event bridge
152
+ * associated with the event in case of provider as AWS event bridge.
153
+ * @property {string} [workflow_name] - The name of the workflow related to the
154
+ * event in case of provider as temporal.
155
+ * @property {string} [detail_type] - The type of detail for the event.
134
156
  */
135
157
 
136
158
  /**
137
- * @typedef Url
138
- * @property {string} [url] - The URL of the uploaded report file.
139
- * @property {string} [name] - The name of the uploaded report file.
159
+ * @typedef SubscriberConfigPostRequestV2
160
+ * @property {string} name - The name of the subscriber.
161
+ * @property {string} [type] - The type of the subscriber, which may be null.
162
+ * @property {string} [webhook_url] - The URL for the subscriber's webhook.
163
+ * @property {string} provider - The provider of the subscriber.
164
+ * @property {Association} association
165
+ * @property {Object} [custom_headers] - Custom headers for the subscriber.
166
+ * @property {SubscriberStatus} status
167
+ * @property {string} email_id - The email ID associated with the subscriber.
168
+ * @property {AuthMeta} [auth_meta]
169
+ * @property {Events[]} events - The list of events associated with the subscriber.
140
170
  */
141
171
 
142
172
  /**
143
- * @typedef CdnObject
144
- * @property {Url[]} [urls]
173
+ * @typedef SubscriberConfigUpdateRequestV2
174
+ * @property {number} id - The unique identifier of the subscriber to be updated.
175
+ * @property {string} [name] - The name of the subscriber.
176
+ * @property {string} [type] - The type of the subscriber, which may be null.
177
+ * @property {string} [webhook_url] - The URL for the subscriber's webhook.
178
+ * @property {string} provider - The provider of the subscriber.
179
+ * @property {Association} [association]
180
+ * @property {Object} [custom_headers] - Custom headers for the subscriber.
181
+ * @property {SubscriberStatus} status
182
+ * @property {string} [email_id] - The email ID associated with the subscriber.
183
+ * @property {AuthMeta} [auth_meta]
184
+ * @property {Events[]} [events] - The list of events associated with the subscriber.
145
185
  */
146
186
 
147
187
  /**
148
- * @typedef UploadServiceObject
149
- * @property {CdnObject} [cdn]
188
+ * @typedef SubscriberConfigPost
189
+ * @property {string} name - The name of the subscriber.
190
+ * @property {string} [type] - The type of the subscriber, which can be null.
191
+ * @property {string} webhook_url - The URL for the subscriber's webhook.
192
+ * @property {Association} association
193
+ * @property {Object} [custom_headers] - Custom headers for the subscriber.
194
+ * @property {SubscriberStatus} status
195
+ * @property {string} email_id - The email ID associated with the subscriber.
196
+ * @property {AuthMeta} [auth_meta]
197
+ * @property {number[]} event_id - The list of event IDs associated with the subscriber.
150
198
  */
151
199
 
152
200
  /**
153
- * @typedef HistoryAssociation
154
- * @property {number} [company_id]
155
- * @property {number[]} [subscriber_ids]
201
+ * @typedef SubscriberConfigUpdate
202
+ * @property {number} id - The unique identifier of the subscriber to be updated.
203
+ * @property {string} [name] - The name of the subscriber.
204
+ * @property {string} [type] - The type of the subscriber, which can be null.
205
+ * @property {string} [webhook_url] - The URL for the subscriber's webhook.
206
+ * @property {Association} [association]
207
+ * @property {Object} [custom_headers] - Custom headers for the subscriber.
208
+ * @property {SubscriberStatus} [status]
209
+ * @property {string} [email_id] - The email ID associated with the subscriber.
210
+ * @property {AuthMeta} [auth_meta]
211
+ * @property {number[]} event_id - The list of event IDs associated with the subscriber.
156
212
  */
157
213
 
158
214
  /**
159
- * @typedef HistoryItems
160
- * @property {number} [id] - The ID of the history report.
161
- * @property {HistoryAssociation} [association]
162
- * @property {HistoryFilters} [filters]
163
- * @property {string} [filename] - The filename of the history report.
164
- * @property {string} [status] - The status of the history report (e.g., "COMPLETED").
165
- * @property {UploadServiceObject} [upload_service_response]
166
- * @property {string} [created_on] - The date and time when the history report
167
- * was created.
168
- * @property {string} [updated_on] - The date and time when the history report
169
- * was last updated.
170
- * @property {string} [message] - A message related to the history report.
215
+ * @typedef SubscriberConfigResult
216
+ * @property {number} [id] - The unique identifier of the subscriber configuration.
217
+ * @property {string} [modified_by] - The identifier of the user who last
218
+ * modified the subscriber configuration.
219
+ * @property {string} [name] - The name of the subscriber.
220
+ * @property {string} [webhook_url] - The URL for the subscriber's webhook.
221
+ * @property {string} [provider] - The provider of the subscriber.
222
+ * @property {AssociationResp} [association]
223
+ * @property {Object} [custom_headers] - Custom headers for the subscriber.
224
+ * @property {SubscriberStatus} [status]
225
+ * @property {string} [source] - Source that subscriber belongs to.
226
+ * @property {string} [email_id] - The email ID associated with the subscriber.
227
+ * @property {string} [updated_on] - The date and time when the subscriber was
228
+ * last updated.
229
+ * @property {string} [created_on] - The date and time when the subscriber was created.
230
+ * @property {string} [type] - The type of the subscriber, which can be null.
231
+ * @property {AuthMeta} [auth_meta]
232
+ * @property {number[]} [event_id] - The list of event IDs associated with the subscriber.
171
233
  */
172
234
 
173
235
  /**
174
- * @typedef HistoryResponse
175
- * @property {HistoryItems[]} [items]
236
+ * @typedef SubscriberConfigList
237
+ * @property {SubscriberDetails[]} [items] - List of subscriber details.
176
238
  * @property {Page} [page]
177
239
  */
178
240
 
179
241
  /**
180
- * @typedef CancelResponse
181
- * @property {string} [message] - The HTTP status code of the response (e.g., 200).
242
+ * @typedef RestEventData
243
+ * @property {string} event_category - The category of the event.
244
+ * @property {string} event_name - The name of the event.
245
+ * @property {string} event_type - The type of the event.
246
+ * @property {number} version - The version number of the event.
182
247
  */
183
248
 
184
249
  /**
185
- * @typedef Association
186
- * @property {string[]} [application_id]
187
- * @property {string} [extension_id]
188
- * @property {string} [criteria]
250
+ * @typedef RestConfig
251
+ * @property {string} webhook_url - The URL for the webhook.
252
+ * @property {string} type - The type of the configuration.
253
+ * @property {Object} [custom_headers] - Custom headers for the configuration.
254
+ * @property {AuthMeta} [auth_meta]
255
+ * @property {RestEventData[]} events - List of event data for configuration.
189
256
  */
190
257
 
191
258
  /**
192
- * @typedef AssociationResp
193
- * @property {number} [company_id]
194
- * @property {string[]} [application_id]
195
- * @property {string} [extension_id]
196
- * @property {string} [criteria]
259
+ * @typedef QueueEventData
260
+ * @property {string} event_category - The category of the event.
261
+ * @property {string} event_name - The name of the event.
262
+ * @property {string} event_type - The type of the event.
263
+ * @property {number} version - The version number of the event.
264
+ * @property {string} topic - The topic associated with the event.
197
265
  */
198
266
 
199
267
  /**
200
- * @typedef AuthMeta
201
- * @property {string} [type]
202
- * @property {string} [secret]
268
+ * @typedef KafkaConfig
269
+ * @property {string} [type] - Type of Kafka configuration (optional).
270
+ * @property {QueueEventData[]} events - List of event data for configuration.
203
271
  */
204
272
 
205
273
  /**
206
- * @typedef SubscriberResponse
207
- * @property {number} [id]
208
- * @property {string} [modified_by]
209
- * @property {string} [name]
210
- * @property {string} [provider]
211
- * @property {string} [webhook_url]
212
- * @property {AssociationResp} [association]
213
- * @property {Object} [custom_headers]
214
- * @property {SubscriberStatus} [status]
215
- * @property {string} [email_id]
216
- * @property {string} [updated_on]
217
- * @property {string} [created_on]
218
- * @property {string} [type]
219
- * @property {AuthMeta} [auth_meta]
220
- * @property {EventConfig[]} [event_configs]
274
+ * @typedef PubSubConfig
275
+ * @property {string} [type] - Type of Pub/Sub configuration (optional).
276
+ * @property {QueueEventData[]} events - List of event data for configuration.
221
277
  */
222
278
 
223
279
  /**
224
- * @typedef Events
225
- * @property {string} [slug]
226
- * @property {string} [topic]
280
+ * @typedef TemporalEventData
281
+ * @property {string} event_category - The category of the event.
282
+ * @property {string} event_name - The name of the event.
283
+ * @property {string} event_type - The type of the event.
284
+ * @property {number} version - The version number of the event.
285
+ * @property {string} [queue] - The queue associated with the event.
286
+ * @property {string} [workflow_name] - The workflow name related to the event.
227
287
  */
228
288
 
229
289
  /**
230
- * @typedef SubscriberConfigPostRequestV2
231
- * @property {string} name
232
- * @property {string} [webhook_url]
233
- * @property {string} provider
234
- * @property {Association} association
235
- * @property {Object} [custom_headers]
236
- * @property {SubscriberStatus} status
237
- * @property {string} email_id
238
- * @property {AuthMeta} [auth_meta]
239
- * @property {Events[]} events
290
+ * @typedef TemporalConfig
291
+ * @property {string} [type] - Type of Temporal configuration (optional).
292
+ * @property {TemporalEventData[]} events - List of event data for configuration.
240
293
  */
241
294
 
242
295
  /**
243
- * @typedef SubscriberConfigUpdateRequestV2
244
- * @property {number} id
245
- * @property {string} [name]
246
- * @property {string} [webhook_url]
247
- * @property {string} provider
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 {Events[]} [events]
296
+ * @typedef SqsEventData
297
+ * @property {string} event_category - The category of the event.
298
+ * @property {string} event_name - The name of the event.
299
+ * @property {string} event_type - The type of the event.
300
+ * @property {number} version - The version number of the event.
301
+ * @property {string} [queue] - The queue name associated with the event in SQS.
254
302
  */
255
303
 
256
304
  /**
257
- * @typedef SubscriberConfigPost
258
- * @property {string} name
259
- * @property {string} webhook_url
260
- * @property {Association} association
261
- * @property {Object} [custom_headers]
262
- * @property {SubscriberStatus} status
263
- * @property {string} email_id
264
- * @property {AuthMeta} [auth_meta]
265
- * @property {number[]} event_id
305
+ * @typedef SqsConfig
306
+ * @property {string} [type] - Type of SQS configuration (optional).
307
+ * @property {SqsEventData[]} events - List of event data for configuration.
266
308
  */
267
309
 
268
310
  /**
269
- * @typedef SubscriberConfigUpdate
270
- * @property {number} id
271
- * @property {string} [name]
272
- * @property {string} [webhook_url]
273
- * @property {Association} [association]
274
- * @property {Object} [custom_headers]
275
- * @property {SubscriberStatus} [status]
276
- * @property {string} [email_id]
277
- * @property {AuthMeta} [auth_meta]
278
- * @property {number[]} event_id
311
+ * @typedef EventBridgeData
312
+ * @property {string} event_category - The category of the event.
313
+ * @property {string} event_name - The name of the event.
314
+ * @property {string} event_type - The type of the event.
315
+ * @property {number} version - The version number of the event.
316
+ * @property {string} [event_bridge_name] - The name of the event bridge related
317
+ * to the event.
279
318
  */
280
319
 
281
320
  /**
282
- * @typedef SubscriberConfigResponse
283
- * @property {number} [id]
284
- * @property {string} [modified_by]
285
- * @property {string} [name]
286
- * @property {string} [webhook_url]
287
- * @property {string} [provider]
288
- * @property {AssociationResp} [association]
289
- * @property {Object} [custom_headers]
290
- * @property {SubscriberStatus} [status]
291
- * @property {string} [email_id]
292
- * @property {string} [updated_on]
293
- * @property {string} [created_on]
294
- * @property {string} [type]
295
- * @property {AuthMeta} [auth_meta]
296
- * @property {number[]} [event_id]
321
+ * @typedef EventBridgeConfig
322
+ * @property {string} [type] - Type of event configuration (optional).
323
+ * @property {EventBridgeData[]} events - List of event data for EventBridge
324
+ * configuration.
297
325
  */
298
326
 
299
327
  /**
300
- * @typedef SubscriberConfigList
301
- * @property {SubscriberResponse[]} [items]
302
- * @property {Page} [page]
328
+ * @typedef EventMapBody
329
+ * @property {RestConfig} [rest]
330
+ * @property {KafkaConfig} [kafka]
331
+ * @property {PubSubConfig} [pub_sub]
332
+ * @property {TemporalConfig} [temporal]
333
+ * @property {SqsConfig} [sqs]
334
+ * @property {EventBridgeConfig} [event_bridge]
303
335
  */
304
336
 
305
- /** @typedef {"active" | "inactive"} SubscriberStatus */
306
-
307
- class WebhookPlatformModel {
308
- /** @returns {Event} */
309
- static Event() {
310
- return Joi.object({
311
- event_name: Joi.string().allow(""),
312
- event_type: Joi.string().allow(""),
313
- event_category: Joi.string().allow(""),
314
- version: Joi.string().allow(""),
315
- });
316
- }
317
-
318
- /** @returns {EventProcessRequest} */
319
- static EventProcessRequest() {
320
- return Joi.object({
321
- search_text: Joi.string().allow(""),
322
- end_date: Joi.string().allow("").required(),
323
- start_date: Joi.string().allow("").required(),
324
- subscriber_ids: Joi.array().items(Joi.number()),
325
- status: Joi.string().allow(""),
326
- event: Joi.array().items(WebhookPlatformModel.Event()),
327
- });
328
- }
337
+ /**
338
+ * @typedef WebhookConfig
339
+ * @property {string} [notification_email] - The email address for notifications.
340
+ * @property {string} [name] - The name of the webhook configuration.
341
+ * @property {string} [status] - The status of the webhook (e.g., active or inactive).
342
+ * @property {Association} [association]
343
+ * @property {EventMapBody} [event_map]
344
+ */
329
345
 
330
- /** @returns {DownloadReportResponse} */
331
- static DownloadReportResponse() {
332
- return Joi.object({
333
- file_name: Joi.string().allow(""),
334
- });
335
- }
346
+ /**
347
+ * @typedef UpsertSubscriberConfig
348
+ * @property {WebhookConfig} webhook_config
349
+ */
336
350
 
337
- /** @returns {EventProcessReports} */
338
- static EventProcessReports() {
339
- return Joi.object({
340
- rows: Joi.array().items(WebhookPlatformModel.EventProcessReportObject()),
341
- page: WebhookPlatformModel.Page(),
342
- });
343
- }
351
+ /**
352
+ * @typedef UpsertSubscriberConfigResult
353
+ * @property {boolean} [status] - The status of the upsert operation (e.g.,
354
+ * success or failure).
355
+ * @property {string} [message] - A message providing details about the upsert
356
+ * operation result.
357
+ */
344
358
 
345
- /** @returns {EventProcessReportObject} */
346
- static EventProcessReportObject() {
347
- return Joi.object({
348
- event_name: Joi.string().allow(""),
349
- response_code: Joi.number(),
350
- response_message: Joi.string().allow(""),
351
- data: Joi.string().allow(""),
352
- attempt: Joi.number(),
353
- last_attempted_on: Joi.number(),
354
- status: Joi.string().allow(""),
355
- name: Joi.string().allow(""),
356
- webhook_url: Joi.string().allow(""),
357
- response_time: Joi.number(),
358
- message_id: Joi.string().allow(""),
359
- event_trace_id: Joi.string().allow(""),
360
- });
361
- }
359
+ /** @typedef {"active" | "inactive"} SubscriberStatus */
362
360
 
361
+ class WebhookPlatformModel {
363
362
  /** @returns {Page} */
364
363
  static Page() {
365
364
  return Joi.object({
@@ -370,25 +369,20 @@ class WebhookPlatformModel {
370
369
  current: Joi.number(),
371
370
  type: Joi.string().allow("").required(),
372
371
  size: Joi.number(),
372
+ page_size: Joi.number(),
373
373
  });
374
374
  }
375
375
 
376
- /** @returns {PingWebhook} */
377
- static PingWebhook() {
378
- return Joi.object({
379
- webhook_url: Joi.string().allow("").required(),
380
- auth_meta: Joi.any(),
381
- custom_headers: Joi.any(),
382
- });
383
- }
384
-
385
- /** @returns {PingWebhookResponse} */
386
- static PingWebhookResponse() {
376
+ /** @returns {BroadcasterConfig} */
377
+ static BroadcasterConfig() {
387
378
  return Joi.object({
388
- status: Joi.string().allow(""),
389
- message: Joi.string().allow(""),
390
- code: Joi.number(),
391
- });
379
+ topic: Joi.string().allow(""),
380
+ queue: Joi.string().allow(""),
381
+ event_bridge_name: Joi.string().allow(""),
382
+ workflow_name: Joi.string().allow(""),
383
+ account_id: Joi.string().allow(""),
384
+ detail_type: Joi.string().allow(""),
385
+ }).allow(null);
392
386
  }
393
387
 
394
388
  /** @returns {SubscriberEventMapping} */
@@ -397,20 +391,37 @@ class WebhookPlatformModel {
397
391
  id: Joi.number(),
398
392
  event_id: Joi.number(),
399
393
  subscriber_id: Joi.number(),
400
- topic: Joi.string().allow("").allow(null),
394
+ filters: WebhookPlatformModel.FilterSchema(),
395
+ reducer: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
396
+ broadcaster_config: WebhookPlatformModel.BroadcasterConfig(),
401
397
  created_on: Joi.string().allow(""),
402
398
  });
403
399
  }
404
400
 
401
+ /** @returns {FilterSchema} */
402
+ static FilterSchema() {
403
+ return Joi.object({
404
+ query: Joi.string().allow(""),
405
+ condition: Joi.string().allow(""),
406
+ logic: Joi.string().allow(""),
407
+ conditions: Joi.array().items(Joi.object().pattern(/\S/, Joi.any())),
408
+ }).allow(null);
409
+ }
410
+
405
411
  /** @returns {EventConfig} */
406
412
  static EventConfig() {
407
413
  return Joi.object({
408
414
  id: Joi.number(),
415
+ type: Joi.string().allow("").allow(null),
409
416
  event_name: Joi.string().allow(""),
410
417
  event_type: Joi.string().allow(""),
411
418
  event_category: Joi.string().allow(""),
419
+ modified_by: Joi.string().allow(""),
412
420
  subscriber_event_mapping: WebhookPlatformModel.SubscriberEventMapping(),
413
421
  event_schema: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
422
+ sunset_date: Joi.string().allow("").allow(null),
423
+ announcement_date: Joi.string().allow("").allow(null),
424
+ support_end_date: Joi.string().allow("").allow(null),
414
425
  group: Joi.string().allow("").allow(null),
415
426
  version: Joi.string().allow(""),
416
427
  display_name: Joi.string().allow(""),
@@ -420,110 +431,13 @@ class WebhookPlatformModel {
420
431
  });
421
432
  }
422
433
 
423
- /** @returns {EventConfigResponse} */
424
- static EventConfigResponse() {
434
+ /** @returns {EventConfigResult} */
435
+ static EventConfigResult() {
425
436
  return Joi.object({
426
437
  event_configs: Joi.array().items(WebhookPlatformModel.EventConfig()),
427
438
  });
428
439
  }
429
440
 
430
- /** @returns {ReportFiltersPayload} */
431
- static ReportFiltersPayload() {
432
- return Joi.object({
433
- subscriber_ids: Joi.array().items(Joi.number()).required(),
434
- });
435
- }
436
-
437
- /** @returns {ReportFilterResponse} */
438
- static ReportFilterResponse() {
439
- return Joi.object({
440
- filter_name: Joi.string().allow(""),
441
- values: Joi.array().items(Joi.object().pattern(/\S/, Joi.any())),
442
- });
443
- }
444
-
445
- /** @returns {HistoryPayload} */
446
- static HistoryPayload() {
447
- return Joi.object({
448
- type: Joi.string().allow("").required(),
449
- page_no: Joi.number(),
450
- page_size: Joi.number(),
451
- });
452
- }
453
-
454
- /** @returns {HistoryFilters} */
455
- static HistoryFilters() {
456
- return Joi.object({
457
- events: Joi.array().items(Joi.string().allow("")),
458
- search_text: Joi.string().allow(""),
459
- status: Joi.string().allow(""),
460
- end_date: Joi.string().allow(""),
461
- start_date: Joi.string().allow(""),
462
- subscribers: Joi.array().items(Joi.number()),
463
- webhook_type: Joi.array().items(Joi.string().allow("")),
464
- });
465
- }
466
-
467
- /** @returns {Url} */
468
- static Url() {
469
- return Joi.object({
470
- url: Joi.string().allow(""),
471
- name: Joi.string().allow(""),
472
- });
473
- }
474
-
475
- /** @returns {CdnObject} */
476
- static CdnObject() {
477
- return Joi.object({
478
- urls: Joi.array().items(WebhookPlatformModel.Url()),
479
- });
480
- }
481
-
482
- /** @returns {UploadServiceObject} */
483
- static UploadServiceObject() {
484
- return Joi.object({
485
- cdn: WebhookPlatformModel.CdnObject(),
486
- }).allow(null);
487
- }
488
-
489
- /** @returns {HistoryAssociation} */
490
- static HistoryAssociation() {
491
- return Joi.object({
492
- company_id: Joi.number(),
493
- subscriber_ids: Joi.array().items(Joi.number()),
494
- });
495
- }
496
-
497
- /** @returns {HistoryItems} */
498
- static HistoryItems() {
499
- return Joi.object({
500
- id: Joi.number(),
501
- association: WebhookPlatformModel.HistoryAssociation(),
502
- filters: WebhookPlatformModel.HistoryFilters(),
503
- filename: Joi.string().allow(""),
504
- status: Joi.string().allow(""),
505
- upload_service_response: WebhookPlatformModel.UploadServiceObject(),
506
- created_on: Joi.string().allow(""),
507
- updated_on: Joi.string().allow("").allow(null),
508
- message: Joi.string().allow(""),
509
- });
510
- }
511
-
512
- /** @returns {HistoryResponse} */
513
- static HistoryResponse() {
514
- return Joi.object({
515
- items: Joi.array().items(WebhookPlatformModel.HistoryItems()),
516
- page: WebhookPlatformModel.Page(),
517
- });
518
- }
519
-
520
- /** @returns {CancelResponse} */
521
- static CancelResponse() {
522
- return Joi.object({
523
- message: Joi.string().allow(""),
524
- });
525
- }
526
-
527
441
  /** @returns {Association} */
528
442
  static Association() {
529
443
  return Joi.object({
@@ -551,16 +465,17 @@ class WebhookPlatformModel {
551
465
  });
552
466
  }
553
467
 
554
- /** @returns {SubscriberResponse} */
555
- static SubscriberResponse() {
468
+ /** @returns {SubscriberDetails} */
469
+ static SubscriberDetails() {
556
470
  return Joi.object({
557
471
  id: Joi.number(),
558
472
  modified_by: Joi.string().allow(""),
559
473
  name: Joi.string().allow(""),
560
474
  provider: Joi.string().allow(""),
561
475
  webhook_url: Joi.string().allow(""),
476
+ source: Joi.string().allow("").allow(null),
562
477
  association: WebhookPlatformModel.AssociationResp(),
563
- custom_headers: Joi.any(),
478
+ custom_headers: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
564
479
  status: WebhookPlatformModel.SubscriberStatus(),
565
480
  email_id: Joi.string().allow(""),
566
481
  updated_on: Joi.string().allow(""),
@@ -576,6 +491,10 @@ class WebhookPlatformModel {
576
491
  return Joi.object({
577
492
  slug: Joi.string().allow(""),
578
493
  topic: Joi.string().allow(""),
494
+ queue: Joi.string().allow(""),
495
+ event_bridge_name: Joi.string().allow(""),
496
+ workflow_name: Joi.string().allow(""),
497
+ detail_type: Joi.string().allow(""),
579
498
  });
580
499
  }
581
500
 
@@ -583,10 +502,11 @@ class WebhookPlatformModel {
583
502
  static SubscriberConfigPostRequestV2() {
584
503
  return Joi.object({
585
504
  name: Joi.string().allow("").required(),
505
+ type: Joi.string().allow("").allow(null),
586
506
  webhook_url: Joi.string().allow(""),
587
507
  provider: Joi.string().allow("").required(),
588
508
  association: WebhookPlatformModel.Association().required(),
589
- custom_headers: Joi.any(),
509
+ custom_headers: Joi.object().pattern(/\S/, Joi.any()),
590
510
  status: WebhookPlatformModel.SubscriberStatus().required(),
591
511
  email_id: Joi.string().allow("").required(),
592
512
  auth_meta: WebhookPlatformModel.AuthMeta(),
@@ -599,10 +519,11 @@ class WebhookPlatformModel {
599
519
  return Joi.object({
600
520
  id: Joi.number().required(),
601
521
  name: Joi.string().allow(""),
522
+ type: Joi.string().allow("").allow(null),
602
523
  webhook_url: Joi.string().allow(""),
603
524
  provider: Joi.string().allow("").required(),
604
525
  association: WebhookPlatformModel.Association(),
605
- custom_headers: Joi.any(),
526
+ custom_headers: Joi.object().pattern(/\S/, Joi.any()),
606
527
  status: WebhookPlatformModel.SubscriberStatus().required(),
607
528
  email_id: Joi.string().allow(""),
608
529
  auth_meta: WebhookPlatformModel.AuthMeta(),
@@ -614,9 +535,10 @@ class WebhookPlatformModel {
614
535
  static SubscriberConfigPost() {
615
536
  return Joi.object({
616
537
  name: Joi.string().allow("").required(),
538
+ type: Joi.string().allow("").allow(null),
617
539
  webhook_url: Joi.string().allow("").required(),
618
540
  association: WebhookPlatformModel.Association().required(),
619
- custom_headers: Joi.any(),
541
+ custom_headers: Joi.object().pattern(/\S/, Joi.any()),
620
542
  status: WebhookPlatformModel.SubscriberStatus().required(),
621
543
  email_id: Joi.string().allow("").required(),
622
544
  auth_meta: WebhookPlatformModel.AuthMeta(),
@@ -629,9 +551,10 @@ class WebhookPlatformModel {
629
551
  return Joi.object({
630
552
  id: Joi.number().required(),
631
553
  name: Joi.string().allow(""),
554
+ type: Joi.string().allow("").allow(null),
632
555
  webhook_url: Joi.string().allow(""),
633
556
  association: WebhookPlatformModel.Association(),
634
- custom_headers: Joi.any(),
557
+ custom_headers: Joi.object().pattern(/\S/, Joi.any()),
635
558
  status: WebhookPlatformModel.SubscriberStatus(),
636
559
  email_id: Joi.string().allow(""),
637
560
  auth_meta: WebhookPlatformModel.AuthMeta(),
@@ -639,8 +562,8 @@ class WebhookPlatformModel {
639
562
  });
640
563
  }
641
564
 
642
- /** @returns {SubscriberConfigResponse} */
643
- static SubscriberConfigResponse() {
565
+ /** @returns {SubscriberConfigResult} */
566
+ static SubscriberConfigResult() {
644
567
  return Joi.object({
645
568
  id: Joi.number(),
646
569
  modified_by: Joi.string().allow(""),
@@ -648,8 +571,9 @@ class WebhookPlatformModel {
648
571
  webhook_url: Joi.string().allow(""),
649
572
  provider: Joi.string().allow(""),
650
573
  association: WebhookPlatformModel.AssociationResp(),
651
- custom_headers: Joi.any(),
574
+ custom_headers: Joi.object().pattern(/\S/, Joi.any()),
652
575
  status: WebhookPlatformModel.SubscriberStatus(),
576
+ source: Joi.string().allow("").allow(null),
653
577
  email_id: Joi.string().allow(""),
654
578
  updated_on: Joi.string().allow(""),
655
579
  created_on: Joi.string().allow(""),
@@ -662,11 +586,165 @@ class WebhookPlatformModel {
662
586
  /** @returns {SubscriberConfigList} */
663
587
  static SubscriberConfigList() {
664
588
  return Joi.object({
665
- items: Joi.array().items(WebhookPlatformModel.SubscriberResponse()),
589
+ items: Joi.array().items(WebhookPlatformModel.SubscriberDetails()),
666
590
  page: WebhookPlatformModel.Page(),
667
591
  });
668
592
  }
669
593
 
594
+ /** @returns {RestEventData} */
595
+ static RestEventData() {
596
+ return Joi.object({
597
+ event_category: Joi.string().allow("").required(),
598
+ event_name: Joi.string().allow("").required(),
599
+ event_type: Joi.string().allow("").required(),
600
+ version: Joi.number().required(),
601
+ });
602
+ }
603
+
604
+ /** @returns {RestConfig} */
605
+ static RestConfig() {
606
+ return Joi.object({
607
+ webhook_url: Joi.string().allow("").required(),
608
+ type: Joi.string().allow("").required(),
609
+ custom_headers: Joi.object().pattern(/\S/, Joi.any()),
610
+ auth_meta: WebhookPlatformModel.AuthMeta(),
611
+ events: Joi.array()
612
+ .items(WebhookPlatformModel.RestEventData())
613
+ .required(),
614
+ });
615
+ }
616
+
617
+ /** @returns {QueueEventData} */
618
+ static QueueEventData() {
619
+ return Joi.object({
620
+ event_category: Joi.string().allow("").required(),
621
+ event_name: Joi.string().allow("").required(),
622
+ event_type: Joi.string().allow("").required(),
623
+ version: Joi.number().required(),
624
+ topic: Joi.string().allow("").required(),
625
+ });
626
+ }
627
+
628
+ /** @returns {KafkaConfig} */
629
+ static KafkaConfig() {
630
+ return Joi.object({
631
+ type: Joi.string().allow("").allow(null),
632
+ events: Joi.array()
633
+ .items(WebhookPlatformModel.QueueEventData())
634
+ .required(),
635
+ });
636
+ }
637
+
638
+ /** @returns {PubSubConfig} */
639
+ static PubSubConfig() {
640
+ return Joi.object({
641
+ type: Joi.string().allow("").allow(null),
642
+ events: Joi.array()
643
+ .items(WebhookPlatformModel.QueueEventData())
644
+ .required(),
645
+ });
646
+ }
647
+
648
+ /** @returns {TemporalEventData} */
649
+ static TemporalEventData() {
650
+ return Joi.object({
651
+ event_category: Joi.string().allow("").required(),
652
+ event_name: Joi.string().allow("").required(),
653
+ event_type: Joi.string().allow("").required(),
654
+ version: Joi.number().required(),
655
+ queue: Joi.string().allow(""),
656
+ workflow_name: Joi.string().allow(""),
657
+ });
658
+ }
659
+
660
+ /** @returns {TemporalConfig} */
661
+ static TemporalConfig() {
662
+ return Joi.object({
663
+ type: Joi.string().allow("").allow(null),
664
+ events: Joi.array()
665
+ .items(WebhookPlatformModel.TemporalEventData())
666
+ .required(),
667
+ });
668
+ }
669
+
670
+ /** @returns {SqsEventData} */
671
+ static SqsEventData() {
672
+ return Joi.object({
673
+ event_category: Joi.string().allow("").required(),
674
+ event_name: Joi.string().allow("").required(),
675
+ event_type: Joi.string().allow("").required(),
676
+ version: Joi.number().required(),
677
+ queue: Joi.string().allow(""),
678
+ });
679
+ }
680
+
681
+ /** @returns {SqsConfig} */
682
+ static SqsConfig() {
683
+ return Joi.object({
684
+ type: Joi.string().allow("").allow(null),
685
+ events: Joi.array().items(WebhookPlatformModel.SqsEventData()).required(),
686
+ });
687
+ }
688
+
689
+ /** @returns {EventBridgeData} */
690
+ static EventBridgeData() {
691
+ return Joi.object({
692
+ event_category: Joi.string().allow("").required(),
693
+ event_name: Joi.string().allow("").required(),
694
+ event_type: Joi.string().allow("").required(),
695
+ version: Joi.number().required(),
696
+ event_bridge_name: Joi.string().allow(""),
697
+ });
698
+ }
699
+
700
+ /** @returns {EventBridgeConfig} */
701
+ static EventBridgeConfig() {
702
+ return Joi.object({
703
+ type: Joi.string().allow("").allow(null),
704
+ events: Joi.array()
705
+ .items(WebhookPlatformModel.EventBridgeData())
706
+ .required(),
707
+ });
708
+ }
709
+
710
+ /** @returns {EventMapBody} */
711
+ static EventMapBody() {
712
+ return Joi.object({
713
+ rest: WebhookPlatformModel.RestConfig(),
714
+ kafka: WebhookPlatformModel.KafkaConfig(),
715
+ pub_sub: WebhookPlatformModel.PubSubConfig(),
716
+ temporal: WebhookPlatformModel.TemporalConfig(),
717
+ sqs: WebhookPlatformModel.SqsConfig(),
718
+ event_bridge: WebhookPlatformModel.EventBridgeConfig(),
719
+ });
720
+ }
721
+
722
+ /** @returns {WebhookConfig} */
723
+ static WebhookConfig() {
724
+ return Joi.object({
725
+ notification_email: Joi.string().allow(""),
726
+ name: Joi.string().allow(""),
727
+ status: Joi.string().allow(""),
728
+ association: WebhookPlatformModel.Association(),
729
+ event_map: WebhookPlatformModel.EventMapBody(),
730
+ });
731
+ }
732
+
733
+ /** @returns {UpsertSubscriberConfig} */
734
+ static UpsertSubscriberConfig() {
735
+ return Joi.object({
736
+ webhook_config: WebhookPlatformModel.WebhookConfig().required(),
737
+ });
738
+ }
739
+
740
+ /** @returns {UpsertSubscriberConfigResult} */
741
+ static UpsertSubscriberConfigResult() {
742
+ return Joi.object({
743
+ status: Joi.boolean(),
744
+ message: Joi.string().allow(""),
745
+ });
746
+ }
747
+
670
748
  /**
671
749
  * Enum: SubscriberStatus Used By: Webhook
672
750
  *