@gofynd/fdk-client-javascript 1.4.13 → 1.4.14

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 (294) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/sdk/application/ApplicationClient.d.ts +2 -0
  4. package/sdk/application/ApplicationClient.js +2 -0
  5. package/sdk/application/Cart/CartApplicationClient.d.ts +60 -53
  6. package/sdk/application/Cart/CartApplicationClient.js +130 -53
  7. package/sdk/application/Cart/CartApplicationModel.d.ts +489 -143
  8. package/sdk/application/Cart/CartApplicationModel.js +380 -159
  9. package/sdk/application/Cart/CartApplicationValidator.d.ts +38 -19
  10. package/sdk/application/Cart/CartApplicationValidator.js +34 -18
  11. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +88 -68
  12. package/sdk/application/Catalog/CatalogApplicationClient.js +114 -94
  13. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +194 -142
  14. package/sdk/application/Catalog/CatalogApplicationModel.js +171 -133
  15. package/sdk/application/Common/CommonApplicationClient.d.ts +3 -2
  16. package/sdk/application/Common/CommonApplicationClient.js +6 -5
  17. package/sdk/application/Common/CommonApplicationModel.d.ts +9 -9
  18. package/sdk/application/Common/CommonApplicationModel.js +6 -6
  19. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +34 -27
  20. package/sdk/application/Configuration/ConfigurationApplicationClient.js +34 -27
  21. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +45 -57
  22. package/sdk/application/Configuration/ConfigurationApplicationModel.js +35 -47
  23. package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +2 -2
  24. package/sdk/application/Configuration/ConfigurationApplicationValidator.js +2 -2
  25. package/sdk/application/Content/ContentApplicationClient.d.ts +23 -33
  26. package/sdk/application/Content/ContentApplicationClient.js +54 -75
  27. package/sdk/application/Content/ContentApplicationModel.d.ts +93 -37
  28. package/sdk/application/Content/ContentApplicationModel.js +83 -32
  29. package/sdk/application/Content/ContentApplicationValidator.d.ts +23 -17
  30. package/sdk/application/Content/ContentApplicationValidator.js +15 -10
  31. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +9 -8
  32. package/sdk/application/FileStorage/FileStorageApplicationClient.js +14 -13
  33. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +23 -25
  34. package/sdk/application/FileStorage/FileStorageApplicationModel.js +16 -18
  35. package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +6 -6
  36. package/sdk/application/FileStorage/FileStorageApplicationValidator.js +6 -6
  37. package/sdk/application/Finance/FinanceApplicationClient.d.ts +36 -0
  38. package/sdk/application/Finance/FinanceApplicationClient.js +202 -0
  39. package/sdk/application/Finance/FinanceApplicationModel.d.ts +289 -0
  40. package/sdk/application/Finance/FinanceApplicationModel.js +208 -0
  41. package/sdk/application/Finance/FinanceApplicationValidator.d.ts +25 -0
  42. package/sdk/application/Finance/FinanceApplicationValidator.js +31 -0
  43. package/sdk/application/Lead/LeadApplicationClient.d.ts +2 -3
  44. package/sdk/application/Lead/LeadApplicationClient.js +2 -3
  45. package/sdk/application/Lead/LeadApplicationModel.d.ts +11 -11
  46. package/sdk/application/Lead/LeadApplicationModel.js +19 -19
  47. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +39 -16
  48. package/sdk/application/Logistic/LogisticApplicationClient.js +189 -21
  49. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +532 -173
  50. package/sdk/application/Logistic/LogisticApplicationModel.js +409 -139
  51. package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +54 -9
  52. package/sdk/application/Logistic/LogisticApplicationValidator.js +42 -8
  53. package/sdk/application/Order/OrderApplicationClient.d.ts +24 -10
  54. package/sdk/application/Order/OrderApplicationClient.js +96 -13
  55. package/sdk/application/Order/OrderApplicationModel.d.ts +434 -102
  56. package/sdk/application/Order/OrderApplicationModel.js +278 -73
  57. package/sdk/application/Order/OrderApplicationValidator.d.ts +17 -3
  58. package/sdk/application/Order/OrderApplicationValidator.js +15 -2
  59. package/sdk/application/Payment/PaymentApplicationClient.d.ts +96 -99
  60. package/sdk/application/Payment/PaymentApplicationClient.js +111 -114
  61. package/sdk/application/Payment/PaymentApplicationModel.d.ts +293 -289
  62. package/sdk/application/Payment/PaymentApplicationModel.js +243 -241
  63. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +46 -46
  64. package/sdk/application/Payment/PaymentApplicationValidator.js +46 -46
  65. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +13 -16
  66. package/sdk/application/Rewards/RewardsApplicationClient.js +19 -22
  67. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +37 -37
  68. package/sdk/application/Rewards/RewardsApplicationModel.js +29 -29
  69. package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +6 -6
  70. package/sdk/application/Rewards/RewardsApplicationValidator.js +6 -6
  71. package/sdk/application/Share/ShareApplicationModel.js +1 -1
  72. package/sdk/application/Theme/ThemeApplicationClient.d.ts +2 -2
  73. package/sdk/application/Theme/ThemeApplicationClient.js +8 -6
  74. package/sdk/application/Theme/ThemeApplicationModel.d.ts +48 -17
  75. package/sdk/application/Theme/ThemeApplicationModel.js +42 -22
  76. package/sdk/application/Theme/ThemeApplicationValidator.d.ts +16 -3
  77. package/sdk/application/Theme/ThemeApplicationValidator.js +9 -2
  78. package/sdk/application/User/UserApplicationClient.d.ts +10 -10
  79. package/sdk/application/User/UserApplicationClient.js +10 -10
  80. package/sdk/application/User/UserApplicationModel.d.ts +17 -17
  81. package/sdk/application/User/UserApplicationModel.js +16 -16
  82. package/sdk/application/User/UserApplicationValidator.d.ts +2 -2
  83. package/sdk/application/User/UserApplicationValidator.js +2 -2
  84. package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -4
  85. package/sdk/application/Webhook/WebhookApplicationClient.js +4 -4
  86. package/sdk/application/Webhook/WebhookApplicationModel.d.ts +11 -9
  87. package/sdk/application/Webhook/WebhookApplicationModel.js +8 -6
  88. package/sdk/application/Webhook/WebhookApplicationValidator.d.ts +2 -2
  89. package/sdk/application/Webhook/WebhookApplicationValidator.js +2 -2
  90. package/sdk/application/index.d.ts +1 -0
  91. package/sdk/application/index.js +2 -0
  92. package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +86 -12
  93. package/sdk/partner/FileStorage/FileStoragePartnerClient.js +582 -24
  94. package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +116 -19
  95. package/sdk/partner/FileStorage/FileStoragePartnerModel.js +121 -14
  96. package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +8 -1
  97. package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +51 -4
  98. package/sdk/partner/Lead/LeadPartnerClient.d.ts +2 -2
  99. package/sdk/partner/Lead/LeadPartnerClient.js +2 -2
  100. package/sdk/partner/Lead/LeadPartnerModel.d.ts +5 -5
  101. package/sdk/partner/Lead/LeadPartnerModel.js +15 -15
  102. package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +126 -20
  103. package/sdk/partner/Logistics/LogisticsPartnerClient.js +970 -20
  104. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +767 -85
  105. package/sdk/partner/Logistics/LogisticsPartnerModel.js +429 -76
  106. package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +10 -0
  107. package/sdk/partner/Logistics/LogisticsPartnerValidator.js +120 -6
  108. package/sdk/partner/Theme/ThemePartnerClient.d.ts +8 -10
  109. package/sdk/partner/Theme/ThemePartnerClient.js +14 -16
  110. package/sdk/partner/Theme/ThemePartnerModel.d.ts +96 -37
  111. package/sdk/partner/Theme/ThemePartnerModel.js +90 -36
  112. package/sdk/partner/Theme/ThemePartnerValidator.js +4 -4
  113. package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +28 -18
  114. package/sdk/partner/Webhook/WebhookPartnerClient.js +103 -18
  115. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +612 -179
  116. package/sdk/partner/Webhook/WebhookPartnerModel.js +253 -150
  117. package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +1 -0
  118. package/sdk/partner/Webhook/WebhookPartnerValidator.js +11 -3
  119. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +5 -4
  120. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +14 -8
  121. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +59 -9
  122. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +40 -4
  123. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +2 -32
  124. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +3 -243
  125. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +11 -130
  126. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +12 -152
  127. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -39
  128. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +0 -35
  129. package/sdk/platform/Billing/BillingPlatformClient.d.ts +12 -12
  130. package/sdk/platform/Billing/BillingPlatformClient.js +15 -15
  131. package/sdk/platform/Billing/BillingPlatformModel.d.ts +443 -388
  132. package/sdk/platform/Billing/BillingPlatformModel.js +280 -263
  133. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +16 -18
  134. package/sdk/platform/Billing/BillingPlatformValidator.js +8 -9
  135. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +134 -103
  136. package/sdk/platform/Cart/CartPlatformApplicationClient.js +407 -112
  137. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +111 -65
  138. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +106 -44
  139. package/sdk/platform/Cart/CartPlatformModel.d.ts +4978 -1303
  140. package/sdk/platform/Cart/CartPlatformModel.js +1922 -1217
  141. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +208 -183
  142. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +383 -358
  143. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +122 -126
  144. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +66 -68
  145. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +141 -118
  146. package/sdk/platform/Catalog/CatalogPlatformClient.js +193 -170
  147. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1516 -1766
  148. package/sdk/platform/Catalog/CatalogPlatformModel.js +1393 -1224
  149. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +18 -18
  150. package/sdk/platform/Catalog/CatalogPlatformValidator.js +18 -18
  151. package/sdk/platform/Common/CommonPlatformClient.d.ts +3 -2
  152. package/sdk/platform/Common/CommonPlatformClient.js +3 -2
  153. package/sdk/platform/Common/CommonPlatformModel.d.ts +9 -9
  154. package/sdk/platform/Common/CommonPlatformModel.js +6 -6
  155. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +16 -17
  156. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +16 -17
  157. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +8 -8
  158. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +8 -8
  159. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +43 -33
  160. package/sdk/platform/Communication/CommunicationPlatformModel.js +38 -34
  161. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +46 -42
  162. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +47 -43
  163. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +223 -223
  164. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +210 -212
  165. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +12 -12
  166. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +12 -12
  167. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +46 -33
  168. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +67 -54
  169. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +18 -18
  170. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +18 -18
  171. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +45 -24
  172. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +134 -30
  173. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +283 -124
  174. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +219 -94
  175. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +37 -9
  176. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +27 -8
  177. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +124 -141
  178. package/sdk/platform/Content/ContentPlatformApplicationClient.js +449 -422
  179. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +179 -141
  180. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +168 -130
  181. package/sdk/platform/Content/ContentPlatformClient.d.ts +142 -106
  182. package/sdk/platform/Content/ContentPlatformClient.js +523 -336
  183. package/sdk/platform/Content/ContentPlatformModel.d.ts +1241 -395
  184. package/sdk/platform/Content/ContentPlatformModel.js +521 -390
  185. package/sdk/platform/Content/ContentPlatformValidator.d.ts +168 -117
  186. package/sdk/platform/Content/ContentPlatformValidator.js +162 -108
  187. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +14 -12
  188. package/sdk/platform/Discount/DiscountPlatformClient.js +14 -12
  189. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +13 -13
  190. package/sdk/platform/Discount/DiscountPlatformModel.js +12 -12
  191. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +2 -2
  192. package/sdk/platform/Discount/DiscountPlatformValidator.js +2 -2
  193. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +94 -36
  194. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +462 -60
  195. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +62 -15
  196. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +75 -13
  197. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +19 -19
  198. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +21 -21
  199. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +370 -101
  200. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +313 -84
  201. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
  202. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
  203. package/sdk/platform/Lead/LeadPlatformClient.d.ts +2 -2
  204. package/sdk/platform/Lead/LeadPlatformClient.js +2 -2
  205. package/sdk/platform/Lead/LeadPlatformModel.d.ts +5 -5
  206. package/sdk/platform/Lead/LeadPlatformModel.js +16 -16
  207. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +15 -4
  208. package/sdk/platform/Order/OrderPlatformApplicationClient.js +83 -5
  209. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +25 -4
  210. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +16 -3
  211. package/sdk/platform/Order/OrderPlatformClient.d.ts +178 -97
  212. package/sdk/platform/Order/OrderPlatformClient.js +589 -229
  213. package/sdk/platform/Order/OrderPlatformModel.d.ts +5447 -3071
  214. package/sdk/platform/Order/OrderPlatformModel.js +3496 -1653
  215. package/sdk/platform/Order/OrderPlatformValidator.d.ts +241 -176
  216. package/sdk/platform/Order/OrderPlatformValidator.js +153 -97
  217. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +6 -4
  218. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +9 -7
  219. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +9 -9
  220. package/sdk/platform/Partner/PartnerPlatformModel.js +8 -8
  221. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +93 -105
  222. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +129 -141
  223. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +48 -48
  224. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +48 -48
  225. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +20 -20
  226. package/sdk/platform/Payment/PaymentPlatformClient.js +20 -20
  227. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +327 -313
  228. package/sdk/platform/Payment/PaymentPlatformModel.js +283 -273
  229. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +8 -8
  230. package/sdk/platform/Payment/PaymentPlatformValidator.js +8 -8
  231. package/sdk/platform/PlatformClient.d.ts +0 -2
  232. package/sdk/platform/PlatformClient.js +0 -4
  233. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +2 -2
  234. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +2 -2
  235. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +2 -2
  236. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +2 -2
  237. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +9 -9
  238. package/sdk/platform/Rewards/RewardsPlatformModel.js +8 -8
  239. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +45 -35
  240. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +117 -38
  241. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +22 -13
  242. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +24 -12
  243. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +40 -46
  244. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +58 -64
  245. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +602 -341
  246. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +483 -284
  247. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +8 -8
  248. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +8 -8
  249. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +2 -2
  250. package/sdk/platform/Share/SharePlatformApplicationClient.js +2 -2
  251. package/sdk/platform/Share/SharePlatformModel.d.ts +36 -5
  252. package/sdk/platform/Share/SharePlatformModel.js +27 -4
  253. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +3 -3
  254. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +8 -4
  255. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +5 -0
  256. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +2 -0
  257. package/sdk/platform/Theme/ThemePlatformModel.d.ts +37 -11
  258. package/sdk/platform/Theme/ThemePlatformModel.js +33 -15
  259. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +12 -12
  260. package/sdk/platform/User/UserPlatformApplicationClient.js +12 -12
  261. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +2 -2
  262. package/sdk/platform/User/UserPlatformApplicationValidator.js +2 -2
  263. package/sdk/platform/User/UserPlatformModel.d.ts +21 -21
  264. package/sdk/platform/User/UserPlatformModel.js +23 -23
  265. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +25 -78
  266. package/sdk/platform/Webhook/WebhookPlatformClient.js +75 -470
  267. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +720 -427
  268. package/sdk/platform/Webhook/WebhookPlatformModel.js +410 -386
  269. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -55
  270. package/sdk/platform/Webhook/WebhookPlatformValidator.js +12 -72
  271. package/sdk/platform/index.d.ts +0 -1
  272. package/sdk/platform/index.js +0 -2
  273. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +3 -2
  274. package/sdk/public/Configuration/ConfigurationPublicClient.js +6 -5
  275. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +9 -9
  276. package/sdk/public/Configuration/ConfigurationPublicModel.js +6 -6
  277. package/sdk/public/Content/ContentPublicClient.d.ts +112 -2
  278. package/sdk/public/Content/ContentPublicClient.js +791 -5
  279. package/sdk/public/Content/ContentPublicModel.d.ts +549 -3
  280. package/sdk/public/Content/ContentPublicModel.js +649 -3
  281. package/sdk/public/Content/ContentPublicValidator.d.ts +69 -3
  282. package/sdk/public/Content/ContentPublicValidator.js +88 -2
  283. package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
  284. package/sdk/public/Webhook/WebhookPublicClient.js +8 -8
  285. package/sdk/public/Webhook/WebhookPublicModel.d.ts +21 -21
  286. package/sdk/public/Webhook/WebhookPublicModel.js +15 -15
  287. package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
  288. package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
  289. package/sdk/platform/Finance/FinancePlatformClient.d.ts +0 -320
  290. package/sdk/platform/Finance/FinancePlatformClient.js +0 -2333
  291. package/sdk/platform/Finance/FinancePlatformModel.d.ts +0 -2890
  292. package/sdk/platform/Finance/FinancePlatformModel.js +0 -2148
  293. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +0 -284
  294. package/sdk/platform/Finance/FinancePlatformValidator.js +0 -354
@@ -1,50 +1,5 @@
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
5
  * @property {number} [item_total] - The total number of items on the page.
@@ -57,309 +12,317 @@ const Joi = require("joi");
57
12
  */
58
13
 
59
14
  /**
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).
15
+ * @typedef BroadcasterConfig
16
+ * @property {string} [topic] - The name of the topic for the broadcaster configuration.
17
+ * @property {string} [queue] - The name of the queue for the broadcaster configuration.
18
+ * @property {string} [event_bridge_name] - The name of the event bridge
19
+ * associated with the broadcaster.
20
+ * @property {string} [workflow_name] - The name of the workflow related to the
21
+ * broadcaster.
22
+ * @property {string} [account_id] - The account ID associated with the broadcaster.
23
+ * @property {string} [detail_type] - The type of detail for the broadcaster
24
+ * configuration.
72
25
  */
73
26
 
74
27
  /**
75
28
  * @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]
29
+ * @property {number} [id] - The unique identifier for the subscriber event mapping.
30
+ * @property {number} [event_id] - The ID of the event associated with the subscriber.
31
+ * @property {number} [subscriber_id] - The ID of the subscriber.
32
+ * @property {BroadcasterConfig} [broadcaster_config]
33
+ * @property {string} [created_on] - The date and time when the subscriber event
34
+ * mapping was created.
81
35
  */
82
36
 
83
37
  /**
84
38
  * @typedef EventConfig
85
- * @property {number} [id]
86
- * @property {string} [event_name]
87
- * @property {string} [event_type]
88
- * @property {string} [event_category]
39
+ * @property {number} [id] - The unique identifier for the event configuration.
40
+ * @property {string} [type] - The type of event configuration, which may be null.
41
+ * @property {string} [event_name] - The name of the event.
42
+ * @property {string} [event_type] - The type of the event.
43
+ * @property {string} [event_category] - The category of the event.
44
+ * @property {string} [modified_by] - The identifier of the user who last
45
+ * modified the event configuration.
89
46
  * @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]
47
+ * @property {Object} [event_schema] - The schema for the event, allowing for
48
+ * additional properties and may be null.
49
+ * @property {string} [group] - The group associated with the event
50
+ * configuration, which may be null.
51
+ * @property {string} [version] - The version of the event configuration.
52
+ * @property {string} [display_name] - The display name of the event configuration.
53
+ * @property {string} [description] - A description of the event configuration,
54
+ * which may be null.
55
+ * @property {string} [created_on] - The date and time when the event
56
+ * configuration was created.
57
+ * @property {string} [updated_on] - The date and time when the event
58
+ * configuration was last updated.
59
+ */
60
+
61
+ /**
62
+ * @typedef EventConfigResult
63
+ * @property {EventConfig[]} [event_configs]
97
64
  */
98
65
 
99
66
  /**
100
- * @typedef EventConfigResponse
101
- * @property {EventConfig[]} [event_configs]
67
+ * @typedef Association
68
+ * @property {string[]} [application_id] - A list of application IDs associated
69
+ * with the association.
70
+ * @property {string} [extension_id] - The extension ID associated with the association.
71
+ * @property {string} [criteria] - The criteria for the association, such as
72
+ * "ALL", "EMPTY", or "SPECIFIC-EVENTS".
102
73
  */
103
74
 
104
75
  /**
105
- * @typedef ReportFiltersPayload
106
- * @property {number[]} subscriber_ids - An array of subscriber IDs for
107
- * filtering filters (optional).
76
+ * @typedef AssociationResp
77
+ * @property {number} [company_id] - The ID of the company associated with the response.
78
+ * @property {string[]} [application_id] - A list of application IDs associated
79
+ * with the response.
80
+ * @property {string} [extension_id] - The extension ID associated with the response.
81
+ * @property {string} [criteria] - The criteria for the response, such as "ALL",
82
+ * "EMPTY", or "SPECIFIC-EVENTS".
108
83
  */
109
84
 
110
85
  /**
111
- * @typedef ReportFilterResponse
112
- * @property {string} [filter_name] - The name of the filter.
113
- * @property {Object[]} [values]
86
+ * @typedef AuthMeta
87
+ * @property {string} [type] - The type of authentication method used.
88
+ * @property {string} [secret] - The secret key or token used for authentication.
114
89
  */
115
90
 
116
91
  /**
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.
92
+ * @typedef SubscriberDetails
93
+ * @property {number} [id] - The unique identifier of the subscriber.
94
+ * @property {string} [modified_by] - The identifier of the user who last
95
+ * modified the subscriber details.
96
+ * @property {string} [name] - The name of the subscriber.
97
+ * @property {string} [provider] - The provider of the subscriber.
98
+ * @property {string} [webhook_url] - The URL for the subscriber's webhook.
99
+ * @property {AssociationResp} [association]
100
+ * @property {Object} [custom_headers] - Custom headers for the subscriber.
101
+ * @property {SubscriberStatus} [status]
102
+ * @property {string} [email_id] - The email ID associated with the subscriber.
103
+ * @property {string} [updated_on] - The date and time when the subscriber
104
+ * details were last updated.
105
+ * @property {string} [created_on] - The date and time when the subscriber was created.
106
+ * @property {string} [type] - The type of subscriber, which can either be passed as null.
107
+ * @property {AuthMeta} [auth_meta]
108
+ * @property {EventConfig[]} [event_configs]
121
109
  */
122
110
 
123
111
  /**
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).
112
+ * @typedef Events
113
+ * @property {string} [slug] - The slug or identifier for the event.
114
+ * @property {string} [topic] - The topic associated with the event.
115
+ * @property {string} [queue] - The queue associated with the event in case of
116
+ * provider as Pub/Sub.
117
+ * @property {string} [event_bridge_name] - The name of the event bridge
118
+ * associated with the event in case of provider as AWS event bridge.
119
+ * @property {string} [workflow_name] - The name of the workflow related to the
120
+ * event in case of provider as temporal.
121
+ * @property {string} [detail_type] - The type of detail for the event.
134
122
  */
135
123
 
136
124
  /**
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.
125
+ * @typedef SubscriberConfigPostRequestV2
126
+ * @property {string} name - The name of the subscriber.
127
+ * @property {string} [type] - The type of the subscriber, which may be null.
128
+ * @property {string} [webhook_url] - The URL for the subscriber's webhook.
129
+ * @property {string} provider - The provider of the subscriber.
130
+ * @property {Association} association
131
+ * @property {Object} [custom_headers] - Custom headers for the subscriber.
132
+ * @property {SubscriberStatus} status
133
+ * @property {string} email_id - The email ID associated with the subscriber.
134
+ * @property {AuthMeta} [auth_meta]
135
+ * @property {Events[]} events - The list of events associated with the subscriber.
140
136
  */
141
137
 
142
138
  /**
143
- * @typedef CdnObject
144
- * @property {Url[]} [urls]
139
+ * @typedef SubscriberConfigUpdateRequestV2
140
+ * @property {number} id - The unique identifier of the subscriber to be updated.
141
+ * @property {string} [name] - The name of the subscriber.
142
+ * @property {string} [type] - The type of the subscriber, which may be null.
143
+ * @property {string} [webhook_url] - The URL for the subscriber's webhook.
144
+ * @property {string} provider - The provider of the subscriber.
145
+ * @property {Association} [association]
146
+ * @property {Object} [custom_headers] - Custom headers for the subscriber.
147
+ * @property {SubscriberStatus} status
148
+ * @property {string} [email_id] - The email ID associated with the subscriber.
149
+ * @property {AuthMeta} [auth_meta]
150
+ * @property {Events[]} [events] - The list of events associated with the subscriber.
145
151
  */
146
152
 
147
153
  /**
148
- * @typedef UploadServiceObject
149
- * @property {CdnObject} [cdn]
154
+ * @typedef SubscriberConfigPost
155
+ * @property {string} name - The name of the subscriber.
156
+ * @property {string} [type] - The type of the subscriber, which can be null.
157
+ * @property {string} webhook_url - The URL for the subscriber's webhook.
158
+ * @property {Association} association
159
+ * @property {Object} [custom_headers] - Custom headers for the subscriber.
160
+ * @property {SubscriberStatus} status
161
+ * @property {string} email_id - The email ID associated with the subscriber.
162
+ * @property {AuthMeta} [auth_meta]
163
+ * @property {number[]} event_id - The list of event IDs associated with the subscriber.
150
164
  */
151
165
 
152
166
  /**
153
- * @typedef HistoryAssociation
154
- * @property {number} [company_id]
155
- * @property {number[]} [subscriber_ids]
167
+ * @typedef SubscriberConfigUpdate
168
+ * @property {number} id - The unique identifier of the subscriber to be updated.
169
+ * @property {string} [name] - The name of the subscriber.
170
+ * @property {string} [type] - The type of the subscriber, which can be null.
171
+ * @property {string} [webhook_url] - The URL for the subscriber's webhook.
172
+ * @property {Association} [association]
173
+ * @property {Object} [custom_headers] - Custom headers for the subscriber.
174
+ * @property {SubscriberStatus} [status]
175
+ * @property {string} [email_id] - The email ID associated with the subscriber.
176
+ * @property {AuthMeta} [auth_meta]
177
+ * @property {number[]} event_id - The list of event IDs associated with the subscriber.
156
178
  */
157
179
 
158
180
  /**
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.
181
+ * @typedef SubscriberConfigResult
182
+ * @property {number} [id] - The unique identifier of the subscriber configuration.
183
+ * @property {string} [modified_by] - The identifier of the user who last
184
+ * modified the subscriber configuration.
185
+ * @property {string} [name] - The name of the subscriber.
186
+ * @property {string} [webhook_url] - The URL for the subscriber's webhook.
187
+ * @property {string} [provider] - The provider of the subscriber.
188
+ * @property {AssociationResp} [association]
189
+ * @property {Object} [custom_headers] - Custom headers for the subscriber.
190
+ * @property {SubscriberStatus} [status]
191
+ * @property {string} [email_id] - The email ID associated with the subscriber.
192
+ * @property {string} [updated_on] - The date and time when the subscriber was
193
+ * last updated.
194
+ * @property {string} [created_on] - The date and time when the subscriber was created.
195
+ * @property {string} [type] - The type of the subscriber, which can be null.
196
+ * @property {AuthMeta} [auth_meta]
197
+ * @property {number[]} [event_id] - The list of event IDs associated with the subscriber.
171
198
  */
172
199
 
173
200
  /**
174
- * @typedef HistoryResponse
175
- * @property {HistoryItems[]} [items]
201
+ * @typedef SubscriberConfigList
202
+ * @property {SubscriberDetails[]} [items]
176
203
  * @property {Page} [page]
177
204
  */
178
205
 
179
206
  /**
180
- * @typedef CancelResponse
181
- * @property {string} [message] - The HTTP status code of the response (e.g., 200).
207
+ * @typedef RestEventData
208
+ * @property {string} event_category - The category of the event.
209
+ * @property {string} event_name - The name of the event.
210
+ * @property {string} event_type - The type of the event.
211
+ * @property {number} version - The version number of the event.
182
212
  */
183
213
 
184
214
  /**
185
- * @typedef Association
186
- * @property {string[]} [application_id]
187
- * @property {string} [extension_id]
188
- * @property {string} [criteria]
215
+ * @typedef RestConfig
216
+ * @property {string} webhook_url - The URL for the webhook.
217
+ * @property {string} type - The type of the configuration.
218
+ * @property {Object} [custom_headers] - Custom headers for the configuration.
219
+ * @property {AuthMeta} [auth_meta]
220
+ * @property {RestEventData[]} events
189
221
  */
190
222
 
191
223
  /**
192
- * @typedef AssociationResp
193
- * @property {number} [company_id]
194
- * @property {string[]} [application_id]
195
- * @property {string} [extension_id]
196
- * @property {string} [criteria]
224
+ * @typedef QueueEventData
225
+ * @property {string} event_category - The category of the event.
226
+ * @property {string} event_name - The name of the event.
227
+ * @property {string} event_type - The type of the event.
228
+ * @property {number} version - The version number of the event.
229
+ * @property {string} topic - The topic associated with the event.
197
230
  */
198
231
 
199
232
  /**
200
- * @typedef AuthMeta
233
+ * @typedef KafkaConfig
201
234
  * @property {string} [type]
202
- * @property {string} [secret]
235
+ * @property {QueueEventData[]} events
203
236
  */
204
237
 
205
238
  /**
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]
239
+ * @typedef PubSubConfig
218
240
  * @property {string} [type]
219
- * @property {AuthMeta} [auth_meta]
220
- * @property {EventConfig[]} [event_configs]
241
+ * @property {QueueEventData[]} events
221
242
  */
222
243
 
223
244
  /**
224
- * @typedef Events
225
- * @property {string} [slug]
226
- * @property {string} [topic]
245
+ * @typedef TemporalEventData
246
+ * @property {string} event_category - The category of the event.
247
+ * @property {string} event_name - The name of the event.
248
+ * @property {string} event_type - The type of the event.
249
+ * @property {number} version - The version number of the event.
250
+ * @property {string} [queue] - The queue associated with the event.
251
+ * @property {string} [workflow_name] - The workflow name related to the event.
227
252
  */
228
253
 
229
254
  /**
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
255
+ * @typedef TemporalConfig
256
+ * @property {string} [type]
257
+ * @property {TemporalEventData[]} events
240
258
  */
241
259
 
242
260
  /**
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]
261
+ * @typedef SqsEventData
262
+ * @property {string} event_category - The category of the event.
263
+ * @property {string} event_name - The name of the event.
264
+ * @property {string} event_type - The type of the event.
265
+ * @property {number} version - The version number of the event.
266
+ * @property {string} [queue] - The queue name associated with the event in SQS.
254
267
  */
255
268
 
256
269
  /**
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
270
+ * @typedef SqsConfig
271
+ * @property {string} [type]
272
+ * @property {SqsEventData[]} events
266
273
  */
267
274
 
268
275
  /**
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
276
+ * @typedef EventBridgeData
277
+ * @property {string} event_category - The category of the event.
278
+ * @property {string} event_name - The name of the event.
279
+ * @property {string} event_type - The type of the event.
280
+ * @property {number} version - The version number of the event.
281
+ * @property {string} [event_bridge_name] - The name of the event bridge related
282
+ * to the event.
279
283
  */
280
284
 
281
285
  /**
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]
286
+ * @typedef EventBridgeConfig
294
287
  * @property {string} [type]
295
- * @property {AuthMeta} [auth_meta]
296
- * @property {number[]} [event_id]
288
+ * @property {EventBridgeData[]} events
297
289
  */
298
290
 
299
291
  /**
300
- * @typedef SubscriberConfigList
301
- * @property {SubscriberResponse[]} [items]
302
- * @property {Page} [page]
292
+ * @typedef EventMapBody
293
+ * @property {RestConfig} [rest]
294
+ * @property {KafkaConfig} [kafka]
295
+ * @property {PubSubConfig} [pub_sub]
296
+ * @property {TemporalConfig} [temporal]
297
+ * @property {SqsConfig} [sqs]
298
+ * @property {EventBridgeConfig} [event_bridge]
303
299
  */
304
300
 
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
- }
301
+ /**
302
+ * @typedef WebhookConfig
303
+ * @property {string} [notification_email] - The email address for notifications.
304
+ * @property {string} [name] - The name of the webhook configuration.
305
+ * @property {string} [status] - The status of the webhook (e.g., active or inactive).
306
+ * @property {Association} [association]
307
+ * @property {EventMapBody} [event_map]
308
+ */
329
309
 
330
- /** @returns {DownloadReportResponse} */
331
- static DownloadReportResponse() {
332
- return Joi.object({
333
- file_name: Joi.string().allow(""),
334
- });
335
- }
310
+ /**
311
+ * @typedef UpsertSubscriberConfig
312
+ * @property {WebhookConfig} webhook_config
313
+ */
336
314
 
337
- /** @returns {EventProcessReports} */
338
- static EventProcessReports() {
339
- return Joi.object({
340
- rows: Joi.array().items(WebhookPlatformModel.EventProcessReportObject()),
341
- page: WebhookPlatformModel.Page(),
342
- });
343
- }
315
+ /**
316
+ * @typedef UpsertSubscriberConfigResult
317
+ * @property {boolean} [status] - The status of the upsert operation (e.g.,
318
+ * success or failure).
319
+ * @property {string} [message] - A message providing details about the upsert
320
+ * operation result.
321
+ */
344
322
 
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
- }
323
+ /** @typedef {"active" | "inactive"} SubscriberStatus */
362
324
 
325
+ class WebhookPlatformModel {
363
326
  /** @returns {Page} */
364
327
  static Page() {
365
328
  return Joi.object({
@@ -373,22 +336,16 @@ class WebhookPlatformModel {
373
336
  });
374
337
  }
375
338
 
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() {
339
+ /** @returns {BroadcasterConfig} */
340
+ static BroadcasterConfig() {
387
341
  return Joi.object({
388
- status: Joi.string().allow(""),
389
- message: Joi.string().allow(""),
390
- code: Joi.number(),
391
- });
342
+ topic: Joi.string().allow(""),
343
+ queue: Joi.string().allow(""),
344
+ event_bridge_name: Joi.string().allow(""),
345
+ workflow_name: Joi.string().allow(""),
346
+ account_id: Joi.string().allow(""),
347
+ detail_type: Joi.string().allow(""),
348
+ }).allow(null);
392
349
  }
393
350
 
394
351
  /** @returns {SubscriberEventMapping} */
@@ -397,7 +354,7 @@ class WebhookPlatformModel {
397
354
  id: Joi.number(),
398
355
  event_id: Joi.number(),
399
356
  subscriber_id: Joi.number(),
400
- topic: Joi.string().allow("").allow(null),
357
+ broadcaster_config: WebhookPlatformModel.BroadcasterConfig(),
401
358
  created_on: Joi.string().allow(""),
402
359
  });
403
360
  }
@@ -406,9 +363,11 @@ class WebhookPlatformModel {
406
363
  static EventConfig() {
407
364
  return Joi.object({
408
365
  id: Joi.number(),
366
+ type: Joi.string().allow("").allow(null),
409
367
  event_name: Joi.string().allow(""),
410
368
  event_type: Joi.string().allow(""),
411
369
  event_category: Joi.string().allow(""),
370
+ modified_by: Joi.string().allow(""),
412
371
  subscriber_event_mapping: WebhookPlatformModel.SubscriberEventMapping(),
413
372
  event_schema: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
414
373
  group: Joi.string().allow("").allow(null),
@@ -420,110 +379,13 @@ class WebhookPlatformModel {
420
379
  });
421
380
  }
422
381
 
423
- /** @returns {EventConfigResponse} */
424
- static EventConfigResponse() {
382
+ /** @returns {EventConfigResult} */
383
+ static EventConfigResult() {
425
384
  return Joi.object({
426
385
  event_configs: Joi.array().items(WebhookPlatformModel.EventConfig()),
427
386
  });
428
387
  }
429
388
 
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
389
  /** @returns {Association} */
528
390
  static Association() {
529
391
  return Joi.object({
@@ -551,8 +413,8 @@ class WebhookPlatformModel {
551
413
  });
552
414
  }
553
415
 
554
- /** @returns {SubscriberResponse} */
555
- static SubscriberResponse() {
416
+ /** @returns {SubscriberDetails} */
417
+ static SubscriberDetails() {
556
418
  return Joi.object({
557
419
  id: Joi.number(),
558
420
  modified_by: Joi.string().allow(""),
@@ -560,7 +422,7 @@ class WebhookPlatformModel {
560
422
  provider: Joi.string().allow(""),
561
423
  webhook_url: Joi.string().allow(""),
562
424
  association: WebhookPlatformModel.AssociationResp(),
563
- custom_headers: Joi.any(),
425
+ custom_headers: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
564
426
  status: WebhookPlatformModel.SubscriberStatus(),
565
427
  email_id: Joi.string().allow(""),
566
428
  updated_on: Joi.string().allow(""),
@@ -576,6 +438,10 @@ class WebhookPlatformModel {
576
438
  return Joi.object({
577
439
  slug: Joi.string().allow(""),
578
440
  topic: Joi.string().allow(""),
441
+ queue: Joi.string().allow(""),
442
+ event_bridge_name: Joi.string().allow(""),
443
+ workflow_name: Joi.string().allow(""),
444
+ detail_type: Joi.string().allow(""),
579
445
  });
580
446
  }
581
447
 
@@ -583,10 +449,11 @@ class WebhookPlatformModel {
583
449
  static SubscriberConfigPostRequestV2() {
584
450
  return Joi.object({
585
451
  name: Joi.string().allow("").required(),
452
+ type: Joi.string().allow("").allow(null),
586
453
  webhook_url: Joi.string().allow(""),
587
454
  provider: Joi.string().allow("").required(),
588
455
  association: WebhookPlatformModel.Association().required(),
589
- custom_headers: Joi.any(),
456
+ custom_headers: Joi.object().pattern(/\S/, Joi.any()),
590
457
  status: WebhookPlatformModel.SubscriberStatus().required(),
591
458
  email_id: Joi.string().allow("").required(),
592
459
  auth_meta: WebhookPlatformModel.AuthMeta(),
@@ -599,10 +466,11 @@ class WebhookPlatformModel {
599
466
  return Joi.object({
600
467
  id: Joi.number().required(),
601
468
  name: Joi.string().allow(""),
469
+ type: Joi.string().allow("").allow(null),
602
470
  webhook_url: Joi.string().allow(""),
603
471
  provider: Joi.string().allow("").required(),
604
472
  association: WebhookPlatformModel.Association(),
605
- custom_headers: Joi.any(),
473
+ custom_headers: Joi.object().pattern(/\S/, Joi.any()),
606
474
  status: WebhookPlatformModel.SubscriberStatus().required(),
607
475
  email_id: Joi.string().allow(""),
608
476
  auth_meta: WebhookPlatformModel.AuthMeta(),
@@ -614,9 +482,10 @@ class WebhookPlatformModel {
614
482
  static SubscriberConfigPost() {
615
483
  return Joi.object({
616
484
  name: Joi.string().allow("").required(),
485
+ type: Joi.string().allow("").allow(null),
617
486
  webhook_url: Joi.string().allow("").required(),
618
487
  association: WebhookPlatformModel.Association().required(),
619
- custom_headers: Joi.any(),
488
+ custom_headers: Joi.object().pattern(/\S/, Joi.any()),
620
489
  status: WebhookPlatformModel.SubscriberStatus().required(),
621
490
  email_id: Joi.string().allow("").required(),
622
491
  auth_meta: WebhookPlatformModel.AuthMeta(),
@@ -629,9 +498,10 @@ class WebhookPlatformModel {
629
498
  return Joi.object({
630
499
  id: Joi.number().required(),
631
500
  name: Joi.string().allow(""),
501
+ type: Joi.string().allow("").allow(null),
632
502
  webhook_url: Joi.string().allow(""),
633
503
  association: WebhookPlatformModel.Association(),
634
- custom_headers: Joi.any(),
504
+ custom_headers: Joi.object().pattern(/\S/, Joi.any()),
635
505
  status: WebhookPlatformModel.SubscriberStatus(),
636
506
  email_id: Joi.string().allow(""),
637
507
  auth_meta: WebhookPlatformModel.AuthMeta(),
@@ -639,8 +509,8 @@ class WebhookPlatformModel {
639
509
  });
640
510
  }
641
511
 
642
- /** @returns {SubscriberConfigResponse} */
643
- static SubscriberConfigResponse() {
512
+ /** @returns {SubscriberConfigResult} */
513
+ static SubscriberConfigResult() {
644
514
  return Joi.object({
645
515
  id: Joi.number(),
646
516
  modified_by: Joi.string().allow(""),
@@ -648,7 +518,7 @@ class WebhookPlatformModel {
648
518
  webhook_url: Joi.string().allow(""),
649
519
  provider: Joi.string().allow(""),
650
520
  association: WebhookPlatformModel.AssociationResp(),
651
- custom_headers: Joi.any(),
521
+ custom_headers: Joi.object().pattern(/\S/, Joi.any()),
652
522
  status: WebhookPlatformModel.SubscriberStatus(),
653
523
  email_id: Joi.string().allow(""),
654
524
  updated_on: Joi.string().allow(""),
@@ -662,11 +532,165 @@ class WebhookPlatformModel {
662
532
  /** @returns {SubscriberConfigList} */
663
533
  static SubscriberConfigList() {
664
534
  return Joi.object({
665
- items: Joi.array().items(WebhookPlatformModel.SubscriberResponse()),
535
+ items: Joi.array().items(WebhookPlatformModel.SubscriberDetails()),
666
536
  page: WebhookPlatformModel.Page(),
667
537
  });
668
538
  }
669
539
 
540
+ /** @returns {RestEventData} */
541
+ static RestEventData() {
542
+ return Joi.object({
543
+ event_category: Joi.string().allow("").required(),
544
+ event_name: Joi.string().allow("").required(),
545
+ event_type: Joi.string().allow("").required(),
546
+ version: Joi.number().required(),
547
+ });
548
+ }
549
+
550
+ /** @returns {RestConfig} */
551
+ static RestConfig() {
552
+ return Joi.object({
553
+ webhook_url: Joi.string().allow("").required(),
554
+ type: Joi.string().allow("").required(),
555
+ custom_headers: Joi.object().pattern(/\S/, Joi.any()),
556
+ auth_meta: WebhookPlatformModel.AuthMeta(),
557
+ events: Joi.array()
558
+ .items(WebhookPlatformModel.RestEventData())
559
+ .required(),
560
+ });
561
+ }
562
+
563
+ /** @returns {QueueEventData} */
564
+ static QueueEventData() {
565
+ return Joi.object({
566
+ event_category: Joi.string().allow("").required(),
567
+ event_name: Joi.string().allow("").required(),
568
+ event_type: Joi.string().allow("").required(),
569
+ version: Joi.number().required(),
570
+ topic: Joi.string().allow("").required(),
571
+ });
572
+ }
573
+
574
+ /** @returns {KafkaConfig} */
575
+ static KafkaConfig() {
576
+ return Joi.object({
577
+ type: Joi.string().allow("").allow(null),
578
+ events: Joi.array()
579
+ .items(WebhookPlatformModel.QueueEventData())
580
+ .required(),
581
+ });
582
+ }
583
+
584
+ /** @returns {PubSubConfig} */
585
+ static PubSubConfig() {
586
+ return Joi.object({
587
+ type: Joi.string().allow("").allow(null),
588
+ events: Joi.array()
589
+ .items(WebhookPlatformModel.QueueEventData())
590
+ .required(),
591
+ });
592
+ }
593
+
594
+ /** @returns {TemporalEventData} */
595
+ static TemporalEventData() {
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
+ queue: Joi.string().allow(""),
602
+ workflow_name: Joi.string().allow(""),
603
+ });
604
+ }
605
+
606
+ /** @returns {TemporalConfig} */
607
+ static TemporalConfig() {
608
+ return Joi.object({
609
+ type: Joi.string().allow("").allow(null),
610
+ events: Joi.array()
611
+ .items(WebhookPlatformModel.TemporalEventData())
612
+ .required(),
613
+ });
614
+ }
615
+
616
+ /** @returns {SqsEventData} */
617
+ static SqsEventData() {
618
+ return Joi.object({
619
+ event_category: Joi.string().allow("").required(),
620
+ event_name: Joi.string().allow("").required(),
621
+ event_type: Joi.string().allow("").required(),
622
+ version: Joi.number().required(),
623
+ queue: Joi.string().allow(""),
624
+ });
625
+ }
626
+
627
+ /** @returns {SqsConfig} */
628
+ static SqsConfig() {
629
+ return Joi.object({
630
+ type: Joi.string().allow("").allow(null),
631
+ events: Joi.array().items(WebhookPlatformModel.SqsEventData()).required(),
632
+ });
633
+ }
634
+
635
+ /** @returns {EventBridgeData} */
636
+ static EventBridgeData() {
637
+ return Joi.object({
638
+ event_category: Joi.string().allow("").required(),
639
+ event_name: Joi.string().allow("").required(),
640
+ event_type: Joi.string().allow("").required(),
641
+ version: Joi.number().required(),
642
+ event_bridge_name: Joi.string().allow(""),
643
+ });
644
+ }
645
+
646
+ /** @returns {EventBridgeConfig} */
647
+ static EventBridgeConfig() {
648
+ return Joi.object({
649
+ type: Joi.string().allow("").allow(null),
650
+ events: Joi.array()
651
+ .items(WebhookPlatformModel.EventBridgeData())
652
+ .required(),
653
+ });
654
+ }
655
+
656
+ /** @returns {EventMapBody} */
657
+ static EventMapBody() {
658
+ return Joi.object({
659
+ rest: WebhookPlatformModel.RestConfig(),
660
+ kafka: WebhookPlatformModel.KafkaConfig(),
661
+ pub_sub: WebhookPlatformModel.PubSubConfig(),
662
+ temporal: WebhookPlatformModel.TemporalConfig(),
663
+ sqs: WebhookPlatformModel.SqsConfig(),
664
+ event_bridge: WebhookPlatformModel.EventBridgeConfig(),
665
+ });
666
+ }
667
+
668
+ /** @returns {WebhookConfig} */
669
+ static WebhookConfig() {
670
+ return Joi.object({
671
+ notification_email: Joi.string().allow(""),
672
+ name: Joi.string().allow(""),
673
+ status: Joi.string().allow(""),
674
+ association: WebhookPlatformModel.Association(),
675
+ event_map: WebhookPlatformModel.EventMapBody(),
676
+ });
677
+ }
678
+
679
+ /** @returns {UpsertSubscriberConfig} */
680
+ static UpsertSubscriberConfig() {
681
+ return Joi.object({
682
+ webhook_config: WebhookPlatformModel.WebhookConfig().required(),
683
+ });
684
+ }
685
+
686
+ /** @returns {UpsertSubscriberConfigResult} */
687
+ static UpsertSubscriberConfigResult() {
688
+ return Joi.object({
689
+ status: Joi.boolean(),
690
+ message: Joi.string().allow(""),
691
+ });
692
+ }
693
+
670
694
  /**
671
695
  * Enum: SubscriberStatus Used By: Webhook
672
696
  *