@gofynd/fdk-client-javascript 1.4.15-beta.3 → 1.4.15-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (238) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/sdk/application/ApplicationClient.d.ts +0 -2
  4. package/sdk/application/ApplicationClient.js +0 -2
  5. package/sdk/application/Cart/CartApplicationClient.d.ts +48 -68
  6. package/sdk/application/Cart/CartApplicationClient.js +27 -114
  7. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +58 -59
  8. package/sdk/application/Catalog/CatalogApplicationClient.js +29 -30
  9. package/sdk/application/Common/CommonApplicationClient.d.ts +2 -2
  10. package/sdk/application/Common/CommonApplicationClient.js +1 -1
  11. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +20 -20
  12. package/sdk/application/Configuration/ConfigurationApplicationClient.js +10 -10
  13. package/sdk/application/Content/ContentApplicationClient.d.ts +30 -19
  14. package/sdk/application/Content/ContentApplicationClient.js +54 -28
  15. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +8 -8
  16. package/sdk/application/FileStorage/FileStorageApplicationClient.js +7 -7
  17. package/sdk/application/Lead/LeadApplicationClient.d.ts +2 -2
  18. package/sdk/application/Lead/LeadApplicationClient.js +1 -1
  19. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +15 -35
  20. package/sdk/application/Logistic/LogisticApplicationClient.js +8 -89
  21. package/sdk/application/Order/OrderApplicationClient.d.ts +12 -22
  22. package/sdk/application/Order/OrderApplicationClient.js +8 -47
  23. package/sdk/application/Payment/PaymentApplicationClient.d.ts +87 -87
  24. package/sdk/application/Payment/PaymentApplicationClient.js +46 -46
  25. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +13 -13
  26. package/sdk/application/Rewards/RewardsApplicationClient.js +7 -7
  27. package/sdk/application/Theme/ThemeApplicationClient.d.ts +2 -2
  28. package/sdk/application/Theme/ThemeApplicationClient.js +2 -4
  29. package/sdk/application/User/UserApplicationClient.d.ts +10 -10
  30. package/sdk/application/User/UserApplicationClient.js +6 -6
  31. package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -4
  32. package/sdk/application/Webhook/WebhookApplicationClient.js +3 -3
  33. package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +12 -86
  34. package/sdk/partner/FileStorage/FileStoragePartnerClient.js +24 -582
  35. package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +19 -116
  36. package/sdk/partner/FileStorage/FileStoragePartnerModel.js +14 -121
  37. package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +1 -8
  38. package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +4 -51
  39. package/sdk/partner/Lead/LeadPartnerClient.d.ts +2 -2
  40. package/sdk/partner/Lead/LeadPartnerClient.js +2 -2
  41. package/sdk/partner/Lead/LeadPartnerModel.d.ts +5 -5
  42. package/sdk/partner/Lead/LeadPartnerModel.js +15 -15
  43. package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +20 -126
  44. package/sdk/partner/Logistics/LogisticsPartnerClient.js +20 -970
  45. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +167 -1200
  46. package/sdk/partner/Logistics/LogisticsPartnerModel.js +160 -571
  47. package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +0 -10
  48. package/sdk/partner/Logistics/LogisticsPartnerValidator.js +7 -121
  49. package/sdk/partner/OAuthClient.js +1 -0
  50. package/sdk/partner/Theme/ThemePartnerClient.d.ts +10 -8
  51. package/sdk/partner/Theme/ThemePartnerClient.js +16 -14
  52. package/sdk/partner/Theme/ThemePartnerModel.d.ts +37 -96
  53. package/sdk/partner/Theme/ThemePartnerModel.js +36 -90
  54. package/sdk/partner/Theme/ThemePartnerValidator.js +4 -4
  55. package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +18 -28
  56. package/sdk/partner/Webhook/WebhookPartnerClient.js +18 -103
  57. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +179 -612
  58. package/sdk/partner/Webhook/WebhookPartnerModel.js +150 -253
  59. package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +0 -1
  60. package/sdk/partner/Webhook/WebhookPartnerValidator.js +3 -11
  61. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +4 -5
  62. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +8 -14
  63. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +9 -59
  64. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +4 -40
  65. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +32 -2
  66. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +243 -3
  67. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +130 -11
  68. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +152 -12
  69. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +39 -1
  70. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +35 -0
  71. package/sdk/platform/Billing/BillingPlatformClient.d.ts +12 -12
  72. package/sdk/platform/Billing/BillingPlatformClient.js +15 -15
  73. package/sdk/platform/Billing/BillingPlatformModel.d.ts +388 -443
  74. package/sdk/platform/Billing/BillingPlatformModel.js +263 -280
  75. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +18 -16
  76. package/sdk/platform/Billing/BillingPlatformValidator.js +9 -8
  77. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +103 -134
  78. package/sdk/platform/Cart/CartPlatformApplicationClient.js +115 -419
  79. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +65 -118
  80. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +44 -109
  81. package/sdk/platform/Cart/CartPlatformModel.d.ts +1298 -5037
  82. package/sdk/platform/Cart/CartPlatformModel.js +1217 -1976
  83. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +183 -209
  84. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +400 -457
  85. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +142 -185
  86. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +78 -96
  87. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +117 -154
  88. package/sdk/platform/Catalog/CatalogPlatformClient.js +172 -292
  89. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1647 -6385
  90. package/sdk/platform/Catalog/CatalogPlatformModel.js +1680 -3217
  91. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +31 -72
  92. package/sdk/platform/Catalog/CatalogPlatformValidator.js +24 -50
  93. package/sdk/platform/Common/CommonPlatformClient.d.ts +2 -3
  94. package/sdk/platform/Common/CommonPlatformClient.js +2 -3
  95. package/sdk/platform/Common/CommonPlatformModel.d.ts +9 -9
  96. package/sdk/platform/Common/CommonPlatformModel.js +6 -6
  97. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +17 -16
  98. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +17 -16
  99. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +8 -8
  100. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +8 -8
  101. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +33 -43
  102. package/sdk/platform/Communication/CommunicationPlatformModel.js +34 -38
  103. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +42 -46
  104. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +43 -47
  105. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +223 -223
  106. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +212 -210
  107. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +12 -12
  108. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +12 -12
  109. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +33 -46
  110. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +54 -67
  111. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +18 -18
  112. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +18 -18
  113. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +24 -45
  114. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +30 -134
  115. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +131 -283
  116. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +97 -219
  117. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +9 -37
  118. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +8 -27
  119. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +141 -124
  120. package/sdk/platform/Content/ContentPlatformApplicationClient.js +422 -449
  121. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +141 -179
  122. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +130 -168
  123. package/sdk/platform/Content/ContentPlatformClient.d.ts +106 -142
  124. package/sdk/platform/Content/ContentPlatformClient.js +336 -523
  125. package/sdk/platform/Content/ContentPlatformModel.d.ts +395 -1241
  126. package/sdk/platform/Content/ContentPlatformModel.js +390 -521
  127. package/sdk/platform/Content/ContentPlatformValidator.d.ts +117 -168
  128. package/sdk/platform/Content/ContentPlatformValidator.js +108 -162
  129. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +12 -14
  130. package/sdk/platform/Discount/DiscountPlatformClient.js +12 -14
  131. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +13 -13
  132. package/sdk/platform/Discount/DiscountPlatformModel.js +12 -12
  133. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +2 -2
  134. package/sdk/platform/Discount/DiscountPlatformValidator.js +2 -2
  135. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +36 -94
  136. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +60 -462
  137. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +15 -62
  138. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +13 -75
  139. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +19 -19
  140. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +21 -21
  141. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +101 -370
  142. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +84 -313
  143. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
  144. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
  145. package/sdk/platform/Finance/FinancePlatformClient.d.ts +320 -0
  146. package/sdk/platform/Finance/FinancePlatformClient.js +2333 -0
  147. package/sdk/platform/Finance/FinancePlatformModel.d.ts +2890 -0
  148. package/sdk/platform/Finance/FinancePlatformModel.js +2148 -0
  149. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +284 -0
  150. package/sdk/platform/Finance/FinancePlatformValidator.js +354 -0
  151. package/sdk/platform/Lead/LeadPlatformClient.d.ts +2 -2
  152. package/sdk/platform/Lead/LeadPlatformClient.js +2 -2
  153. package/sdk/platform/Lead/LeadPlatformModel.d.ts +5 -5
  154. package/sdk/platform/Lead/LeadPlatformModel.js +16 -16
  155. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +6 -17
  156. package/sdk/platform/Order/OrderPlatformApplicationClient.js +7 -85
  157. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +24 -95
  158. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +19 -39
  159. package/sdk/platform/Order/OrderPlatformClient.d.ts +96 -153
  160. package/sdk/platform/Order/OrderPlatformClient.js +198 -416
  161. package/sdk/platform/Order/OrderPlatformModel.d.ts +1286 -7619
  162. package/sdk/platform/Order/OrderPlatformModel.js +1265 -3922
  163. package/sdk/platform/Order/OrderPlatformValidator.d.ts +109 -270
  164. package/sdk/platform/Order/OrderPlatformValidator.js +77 -135
  165. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -6
  166. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +7 -9
  167. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +9 -9
  168. package/sdk/platform/Partner/PartnerPlatformModel.js +8 -8
  169. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +105 -93
  170. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +141 -129
  171. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +48 -48
  172. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +48 -48
  173. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +20 -20
  174. package/sdk/platform/Payment/PaymentPlatformClient.js +20 -20
  175. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +319 -333
  176. package/sdk/platform/Payment/PaymentPlatformModel.js +278 -288
  177. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +8 -8
  178. package/sdk/platform/Payment/PaymentPlatformValidator.js +8 -8
  179. package/sdk/platform/PlatformClient.d.ts +2 -0
  180. package/sdk/platform/PlatformClient.js +4 -0
  181. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +2 -2
  182. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +2 -2
  183. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +2 -2
  184. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +2 -2
  185. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +9 -9
  186. package/sdk/platform/Rewards/RewardsPlatformModel.js +8 -8
  187. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +36 -46
  188. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +41 -132
  189. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +17 -46
  190. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +14 -34
  191. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +46 -40
  192. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +64 -58
  193. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +612 -1845
  194. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +554 -886
  195. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +46 -42
  196. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +28 -26
  197. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +2 -2
  198. package/sdk/platform/Share/SharePlatformApplicationClient.js +2 -2
  199. package/sdk/platform/Share/SharePlatformModel.d.ts +5 -36
  200. package/sdk/platform/Share/SharePlatformModel.js +4 -27
  201. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +3 -3
  202. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +4 -8
  203. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +0 -5
  204. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +0 -2
  205. package/sdk/platform/Theme/ThemePlatformModel.d.ts +11 -37
  206. package/sdk/platform/Theme/ThemePlatformModel.js +15 -33
  207. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +12 -12
  208. package/sdk/platform/User/UserPlatformApplicationClient.js +12 -12
  209. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +2 -2
  210. package/sdk/platform/User/UserPlatformApplicationValidator.js +2 -2
  211. package/sdk/platform/User/UserPlatformModel.d.ts +21 -21
  212. package/sdk/platform/User/UserPlatformModel.js +23 -23
  213. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +78 -25
  214. package/sdk/platform/Webhook/WebhookPlatformClient.js +470 -75
  215. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +427 -720
  216. package/sdk/platform/Webhook/WebhookPlatformModel.js +386 -410
  217. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +55 -10
  218. package/sdk/platform/Webhook/WebhookPlatformValidator.js +72 -12
  219. package/sdk/platform/index.d.ts +1 -0
  220. package/sdk/platform/index.js +2 -0
  221. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +2 -3
  222. package/sdk/public/Configuration/ConfigurationPublicClient.js +5 -6
  223. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +9 -9
  224. package/sdk/public/Configuration/ConfigurationPublicModel.js +6 -6
  225. package/sdk/public/Content/ContentPublicClient.d.ts +2 -112
  226. package/sdk/public/Content/ContentPublicClient.js +5 -791
  227. package/sdk/public/Content/ContentPublicModel.d.ts +3 -549
  228. package/sdk/public/Content/ContentPublicModel.js +3 -649
  229. package/sdk/public/Content/ContentPublicValidator.d.ts +3 -69
  230. package/sdk/public/Content/ContentPublicValidator.js +2 -88
  231. package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
  232. package/sdk/public/Webhook/WebhookPublicClient.js +8 -8
  233. package/sdk/public/Webhook/WebhookPublicModel.d.ts +21 -21
  234. package/sdk/public/Webhook/WebhookPublicModel.js +15 -15
  235. package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
  236. package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
  237. package/sdk/application/Finance/FinanceApplicationClient.d.ts +0 -29
  238. package/sdk/application/Finance/FinanceApplicationClient.js +0 -105
@@ -1,5 +1,50 @@
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
+
3
48
  /**
4
49
  * @typedef Page
5
50
  * @property {number} [item_total] - The total number of items on the page.
@@ -12,317 +57,309 @@ const Joi = require("joi");
12
57
  */
13
58
 
14
59
  /**
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.
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).
25
72
  */
26
73
 
27
74
  /**
28
75
  * @typedef SubscriberEventMapping
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.
76
+ * @property {number} [id]
77
+ * @property {number} [event_id]
78
+ * @property {number} [subscriber_id]
79
+ * @property {string} [topic]
80
+ * @property {string} [created_on]
35
81
  */
36
82
 
37
83
  /**
38
84
  * @typedef EventConfig
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.
85
+ * @property {number} [id]
86
+ * @property {string} [event_name]
87
+ * @property {string} [event_type]
88
+ * @property {string} [event_category]
46
89
  * @property {SubscriberEventMapping} [subscriber_event_mapping]
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]
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]
64
97
  */
65
98
 
66
99
  /**
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".
100
+ * @typedef EventConfigResponse
101
+ * @property {EventConfig[]} [event_configs]
73
102
  */
74
103
 
75
104
  /**
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".
105
+ * @typedef ReportFiltersPayload
106
+ * @property {number[]} subscriber_ids - An array of subscriber IDs for
107
+ * filtering filters (optional).
83
108
  */
84
109
 
85
110
  /**
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.
111
+ * @typedef ReportFilterResponse
112
+ * @property {string} [filter_name] - The name of the filter.
113
+ * @property {Object[]} [values]
89
114
  */
90
115
 
91
116
  /**
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]
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.
109
121
  */
110
122
 
111
123
  /**
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.
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).
122
134
  */
123
135
 
124
136
  /**
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.
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.
136
140
  */
137
141
 
138
142
  /**
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.
143
+ * @typedef CdnObject
144
+ * @property {Url[]} [urls]
151
145
  */
152
146
 
153
147
  /**
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.
148
+ * @typedef UploadServiceObject
149
+ * @property {CdnObject} [cdn]
164
150
  */
165
151
 
166
152
  /**
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.
153
+ * @typedef HistoryAssociation
154
+ * @property {number} [company_id]
155
+ * @property {number[]} [subscriber_ids]
178
156
  */
179
157
 
180
158
  /**
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.
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.
198
171
  */
199
172
 
200
173
  /**
201
- * @typedef SubscriberConfigList
202
- * @property {SubscriberDetails[]} [items]
174
+ * @typedef HistoryResponse
175
+ * @property {HistoryItems[]} [items]
203
176
  * @property {Page} [page]
204
177
  */
205
178
 
206
179
  /**
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.
180
+ * @typedef CancelResponse
181
+ * @property {string} [message] - The HTTP status code of the response (e.g., 200).
212
182
  */
213
183
 
214
184
  /**
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
185
+ * @typedef Association
186
+ * @property {string[]} [application_id]
187
+ * @property {string} [extension_id]
188
+ * @property {string} [criteria]
221
189
  */
222
190
 
223
191
  /**
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.
192
+ * @typedef AssociationResp
193
+ * @property {number} [company_id]
194
+ * @property {string[]} [application_id]
195
+ * @property {string} [extension_id]
196
+ * @property {string} [criteria]
230
197
  */
231
198
 
232
199
  /**
233
- * @typedef KafkaConfig
200
+ * @typedef AuthMeta
234
201
  * @property {string} [type]
235
- * @property {QueueEventData[]} events
202
+ * @property {string} [secret]
236
203
  */
237
204
 
238
205
  /**
239
- * @typedef PubSubConfig
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]
240
218
  * @property {string} [type]
241
- * @property {QueueEventData[]} events
219
+ * @property {AuthMeta} [auth_meta]
220
+ * @property {EventConfig[]} [event_configs]
242
221
  */
243
222
 
244
223
  /**
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.
224
+ * @typedef Events
225
+ * @property {string} [slug]
226
+ * @property {string} [topic]
252
227
  */
253
228
 
254
229
  /**
255
- * @typedef TemporalConfig
256
- * @property {string} [type]
257
- * @property {TemporalEventData[]} events
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
258
240
  */
259
241
 
260
242
  /**
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.
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]
267
254
  */
268
255
 
269
256
  /**
270
- * @typedef SqsConfig
271
- * @property {string} [type]
272
- * @property {SqsEventData[]} events
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
273
266
  */
274
267
 
275
268
  /**
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.
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
283
279
  */
284
280
 
285
281
  /**
286
- * @typedef EventBridgeConfig
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]
287
294
  * @property {string} [type]
288
- * @property {EventBridgeData[]} events
295
+ * @property {AuthMeta} [auth_meta]
296
+ * @property {number[]} [event_id]
289
297
  */
290
298
 
291
299
  /**
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]
300
+ * @typedef SubscriberConfigList
301
+ * @property {SubscriberResponse[]} [items]
302
+ * @property {Page} [page]
299
303
  */
300
304
 
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
- */
305
+ /** @typedef {"active" | "inactive"} SubscriberStatus */
309
306
 
310
- /**
311
- * @typedef UpsertSubscriberConfig
312
- * @property {WebhookConfig} webhook_config
313
- */
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
+ }
314
317
 
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
- */
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
+ }
322
329
 
323
- /** @typedef {"active" | "inactive"} SubscriberStatus */
330
+ /** @returns {DownloadReportResponse} */
331
+ static DownloadReportResponse() {
332
+ return Joi.object({
333
+ file_name: Joi.string().allow(""),
334
+ });
335
+ }
336
+
337
+ /** @returns {EventProcessReports} */
338
+ static EventProcessReports() {
339
+ return Joi.object({
340
+ rows: Joi.array().items(WebhookPlatformModel.EventProcessReportObject()),
341
+ page: WebhookPlatformModel.Page(),
342
+ });
343
+ }
344
+
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
+ }
324
362
 
325
- class WebhookPlatformModel {
326
363
  /** @returns {Page} */
327
364
  static Page() {
328
365
  return Joi.object({
@@ -336,16 +373,22 @@ class WebhookPlatformModel {
336
373
  });
337
374
  }
338
375
 
339
- /** @returns {BroadcasterConfig} */
340
- static BroadcasterConfig() {
376
+ /** @returns {PingWebhook} */
377
+ static PingWebhook() {
341
378
  return Joi.object({
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);
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() {
387
+ return Joi.object({
388
+ status: Joi.string().allow(""),
389
+ message: Joi.string().allow(""),
390
+ code: Joi.number(),
391
+ });
349
392
  }
350
393
 
351
394
  /** @returns {SubscriberEventMapping} */
@@ -354,7 +397,7 @@ class WebhookPlatformModel {
354
397
  id: Joi.number(),
355
398
  event_id: Joi.number(),
356
399
  subscriber_id: Joi.number(),
357
- broadcaster_config: WebhookPlatformModel.BroadcasterConfig(),
400
+ topic: Joi.string().allow("").allow(null),
358
401
  created_on: Joi.string().allow(""),
359
402
  });
360
403
  }
@@ -363,11 +406,9 @@ class WebhookPlatformModel {
363
406
  static EventConfig() {
364
407
  return Joi.object({
365
408
  id: Joi.number(),
366
- type: Joi.string().allow("").allow(null),
367
409
  event_name: Joi.string().allow(""),
368
410
  event_type: Joi.string().allow(""),
369
411
  event_category: Joi.string().allow(""),
370
- modified_by: Joi.string().allow(""),
371
412
  subscriber_event_mapping: WebhookPlatformModel.SubscriberEventMapping(),
372
413
  event_schema: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
373
414
  group: Joi.string().allow("").allow(null),
@@ -379,13 +420,110 @@ class WebhookPlatformModel {
379
420
  });
380
421
  }
381
422
 
382
- /** @returns {EventConfigResult} */
383
- static EventConfigResult() {
423
+ /** @returns {EventConfigResponse} */
424
+ static EventConfigResponse() {
384
425
  return Joi.object({
385
426
  event_configs: Joi.array().items(WebhookPlatformModel.EventConfig()),
386
427
  });
387
428
  }
388
429
 
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
+
389
527
  /** @returns {Association} */
390
528
  static Association() {
391
529
  return Joi.object({
@@ -413,8 +551,8 @@ class WebhookPlatformModel {
413
551
  });
414
552
  }
415
553
 
416
- /** @returns {SubscriberDetails} */
417
- static SubscriberDetails() {
554
+ /** @returns {SubscriberResponse} */
555
+ static SubscriberResponse() {
418
556
  return Joi.object({
419
557
  id: Joi.number(),
420
558
  modified_by: Joi.string().allow(""),
@@ -422,7 +560,7 @@ class WebhookPlatformModel {
422
560
  provider: Joi.string().allow(""),
423
561
  webhook_url: Joi.string().allow(""),
424
562
  association: WebhookPlatformModel.AssociationResp(),
425
- custom_headers: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
563
+ custom_headers: Joi.any(),
426
564
  status: WebhookPlatformModel.SubscriberStatus(),
427
565
  email_id: Joi.string().allow(""),
428
566
  updated_on: Joi.string().allow(""),
@@ -438,10 +576,6 @@ class WebhookPlatformModel {
438
576
  return Joi.object({
439
577
  slug: Joi.string().allow(""),
440
578
  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(""),
445
579
  });
446
580
  }
447
581
 
@@ -449,11 +583,10 @@ class WebhookPlatformModel {
449
583
  static SubscriberConfigPostRequestV2() {
450
584
  return Joi.object({
451
585
  name: Joi.string().allow("").required(),
452
- type: Joi.string().allow("").allow(null),
453
586
  webhook_url: Joi.string().allow(""),
454
587
  provider: Joi.string().allow("").required(),
455
588
  association: WebhookPlatformModel.Association().required(),
456
- custom_headers: Joi.object().pattern(/\S/, Joi.any()),
589
+ custom_headers: Joi.any(),
457
590
  status: WebhookPlatformModel.SubscriberStatus().required(),
458
591
  email_id: Joi.string().allow("").required(),
459
592
  auth_meta: WebhookPlatformModel.AuthMeta(),
@@ -466,11 +599,10 @@ class WebhookPlatformModel {
466
599
  return Joi.object({
467
600
  id: Joi.number().required(),
468
601
  name: Joi.string().allow(""),
469
- type: Joi.string().allow("").allow(null),
470
602
  webhook_url: Joi.string().allow(""),
471
603
  provider: Joi.string().allow("").required(),
472
604
  association: WebhookPlatformModel.Association(),
473
- custom_headers: Joi.object().pattern(/\S/, Joi.any()),
605
+ custom_headers: Joi.any(),
474
606
  status: WebhookPlatformModel.SubscriberStatus().required(),
475
607
  email_id: Joi.string().allow(""),
476
608
  auth_meta: WebhookPlatformModel.AuthMeta(),
@@ -482,10 +614,9 @@ class WebhookPlatformModel {
482
614
  static SubscriberConfigPost() {
483
615
  return Joi.object({
484
616
  name: Joi.string().allow("").required(),
485
- type: Joi.string().allow("").allow(null),
486
617
  webhook_url: Joi.string().allow("").required(),
487
618
  association: WebhookPlatformModel.Association().required(),
488
- custom_headers: Joi.object().pattern(/\S/, Joi.any()),
619
+ custom_headers: Joi.any(),
489
620
  status: WebhookPlatformModel.SubscriberStatus().required(),
490
621
  email_id: Joi.string().allow("").required(),
491
622
  auth_meta: WebhookPlatformModel.AuthMeta(),
@@ -498,10 +629,9 @@ class WebhookPlatformModel {
498
629
  return Joi.object({
499
630
  id: Joi.number().required(),
500
631
  name: Joi.string().allow(""),
501
- type: Joi.string().allow("").allow(null),
502
632
  webhook_url: Joi.string().allow(""),
503
633
  association: WebhookPlatformModel.Association(),
504
- custom_headers: Joi.object().pattern(/\S/, Joi.any()),
634
+ custom_headers: Joi.any(),
505
635
  status: WebhookPlatformModel.SubscriberStatus(),
506
636
  email_id: Joi.string().allow(""),
507
637
  auth_meta: WebhookPlatformModel.AuthMeta(),
@@ -509,8 +639,8 @@ class WebhookPlatformModel {
509
639
  });
510
640
  }
511
641
 
512
- /** @returns {SubscriberConfigResult} */
513
- static SubscriberConfigResult() {
642
+ /** @returns {SubscriberConfigResponse} */
643
+ static SubscriberConfigResponse() {
514
644
  return Joi.object({
515
645
  id: Joi.number(),
516
646
  modified_by: Joi.string().allow(""),
@@ -518,7 +648,7 @@ class WebhookPlatformModel {
518
648
  webhook_url: Joi.string().allow(""),
519
649
  provider: Joi.string().allow(""),
520
650
  association: WebhookPlatformModel.AssociationResp(),
521
- custom_headers: Joi.object().pattern(/\S/, Joi.any()),
651
+ custom_headers: Joi.any(),
522
652
  status: WebhookPlatformModel.SubscriberStatus(),
523
653
  email_id: Joi.string().allow(""),
524
654
  updated_on: Joi.string().allow(""),
@@ -532,165 +662,11 @@ class WebhookPlatformModel {
532
662
  /** @returns {SubscriberConfigList} */
533
663
  static SubscriberConfigList() {
534
664
  return Joi.object({
535
- items: Joi.array().items(WebhookPlatformModel.SubscriberDetails()),
665
+ items: Joi.array().items(WebhookPlatformModel.SubscriberResponse()),
536
666
  page: WebhookPlatformModel.Page(),
537
667
  });
538
668
  }
539
669
 
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
-
694
670
  /**
695
671
  * Enum: SubscriberStatus Used By: Webhook
696
672
  *