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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (278) hide show
  1. package/README.md +23 -26
  2. package/package.json +5 -1
  3. package/sdk/application/ApplicationClient.d.ts +5 -6
  4. package/sdk/application/ApplicationClient.js +24 -20
  5. package/sdk/application/Cart/CartApplicationClient.d.ts +133 -83
  6. package/sdk/application/Cart/CartApplicationClient.js +444 -76
  7. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +132 -114
  8. package/sdk/application/Catalog/CatalogApplicationClient.js +209 -126
  9. package/sdk/application/Common/CommonApplicationClient.d.ts +4 -4
  10. package/sdk/application/Common/CommonApplicationClient.js +4 -4
  11. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +3 -3
  12. package/sdk/application/Communication/CommunicationApplicationClient.js +3 -3
  13. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +58 -36
  14. package/sdk/application/Configuration/ConfigurationApplicationClient.js +73 -29
  15. package/sdk/application/Content/ContentApplicationClient.d.ts +95 -66
  16. package/sdk/application/Content/ContentApplicationClient.js +274 -111
  17. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +11 -11
  18. package/sdk/application/FileStorage/FileStorageApplicationClient.js +10 -10
  19. package/sdk/application/Finance/FinanceApplicationClient.d.ts +29 -0
  20. package/sdk/application/Finance/FinanceApplicationClient.js +111 -0
  21. package/sdk/application/Lead/LeadApplicationClient.d.ts +7 -7
  22. package/sdk/application/Lead/LeadApplicationClient.js +6 -6
  23. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +37 -57
  24. package/sdk/application/Logistic/LogisticApplicationClient.js +117 -180
  25. package/sdk/application/Order/OrderApplicationClient.d.ts +63 -21
  26. package/sdk/application/Order/OrderApplicationClient.js +217 -17
  27. package/sdk/application/Payment/PaymentApplicationClient.d.ts +179 -149
  28. package/sdk/application/Payment/PaymentApplicationClient.js +301 -167
  29. package/sdk/application/Share/ShareApplicationClient.d.ts +7 -7
  30. package/sdk/application/Share/ShareApplicationClient.js +7 -7
  31. package/sdk/application/Theme/ThemeApplicationClient.d.ts +7 -7
  32. package/sdk/application/Theme/ThemeApplicationClient.js +10 -6
  33. package/sdk/application/User/UserApplicationClient.d.ts +103 -53
  34. package/sdk/application/User/UserApplicationClient.js +308 -49
  35. package/sdk/common/AxiosHelper.js +11 -4
  36. package/sdk/common/Constant.d.ts +27 -4
  37. package/sdk/common/Constant.js +33 -6
  38. package/sdk/common/utils.d.ts +10 -0
  39. package/sdk/common/utils.js +24 -3
  40. package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +46 -16
  41. package/sdk/partner/FileStorage/FileStoragePartnerClient.js +266 -40
  42. package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +163 -19
  43. package/sdk/partner/FileStorage/FileStoragePartnerModel.js +158 -14
  44. package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +5 -2
  45. package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +23 -7
  46. package/sdk/partner/Lead/LeadPartnerClient.d.ts +9 -9
  47. package/sdk/partner/Lead/LeadPartnerClient.js +9 -9
  48. package/sdk/partner/Lead/LeadPartnerModel.d.ts +14 -9
  49. package/sdk/partner/Lead/LeadPartnerModel.js +19 -17
  50. package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +264 -49
  51. package/sdk/partner/Logistics/LogisticsPartnerClient.js +2116 -252
  52. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +2256 -258
  53. package/sdk/partner/Logistics/LogisticsPartnerModel.js +1187 -230
  54. package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +21 -1
  55. package/sdk/partner/Logistics/LogisticsPartnerValidator.js +218 -13
  56. package/sdk/partner/PartnerClient.d.ts +5 -2
  57. package/sdk/partner/PartnerClient.js +21 -7
  58. package/sdk/partner/Theme/ThemePartnerClient.d.ts +32 -34
  59. package/sdk/partner/Theme/ThemePartnerClient.js +42 -44
  60. package/sdk/partner/Theme/ThemePartnerModel.d.ts +142 -43
  61. package/sdk/partner/Theme/ThemePartnerModel.js +129 -44
  62. package/sdk/partner/Theme/ThemePartnerValidator.js +4 -4
  63. package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +83 -27
  64. package/sdk/partner/Webhook/WebhookPartnerClient.js +446 -27
  65. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +920 -185
  66. package/sdk/partner/Webhook/WebhookPartnerModel.js +462 -154
  67. package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +5 -0
  68. package/sdk/partner/Webhook/WebhookPartnerValidator.js +41 -3
  69. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +8 -7
  70. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +17 -11
  71. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +4 -1
  72. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
  73. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +68 -13
  74. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +44 -6
  75. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +3 -33
  76. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +4 -244
  77. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +49 -145
  78. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +20 -171
  79. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -39
  80. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +0 -35
  81. package/sdk/platform/Billing/BillingPlatformClient.d.ts +15 -15
  82. package/sdk/platform/Billing/BillingPlatformClient.js +18 -18
  83. package/sdk/platform/Billing/BillingPlatformModel.d.ts +443 -388
  84. package/sdk/platform/Billing/BillingPlatformModel.js +280 -263
  85. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +16 -18
  86. package/sdk/platform/Billing/BillingPlatformValidator.js +8 -9
  87. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +266 -203
  88. package/sdk/platform/Cart/CartPlatformApplicationClient.js +1446 -500
  89. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +729 -100
  90. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +446 -82
  91. package/sdk/platform/Cart/CartPlatformModel.d.ts +6927 -1396
  92. package/sdk/platform/Cart/CartPlatformModel.js +3065 -1316
  93. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +433 -248
  94. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1662 -559
  95. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +464 -159
  96. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +304 -87
  97. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +383 -234
  98. package/sdk/platform/Catalog/CatalogPlatformClient.js +2475 -1557
  99. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +9573 -2678
  100. package/sdk/platform/Catalog/CatalogPlatformModel.js +5033 -1973
  101. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +364 -117
  102. package/sdk/platform/Catalog/CatalogPlatformValidator.js +281 -104
  103. package/sdk/platform/Common/CommonPlatformClient.d.ts +5 -4
  104. package/sdk/platform/Common/CommonPlatformClient.js +6 -5
  105. package/sdk/platform/Common/CommonPlatformModel.d.ts +36 -25
  106. package/sdk/platform/Common/CommonPlatformModel.js +25 -14
  107. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +80 -153
  108. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +102 -541
  109. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +36 -49
  110. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +20 -60
  111. package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +1 -1
  112. package/sdk/platform/Communication/CommunicationPlatformClient.js +1 -1
  113. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +189 -43
  114. package/sdk/platform/Communication/CommunicationPlatformModel.js +165 -42
  115. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +58 -81
  116. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +68 -116
  117. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +291 -249
  118. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +243 -234
  119. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +12 -12
  120. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +12 -12
  121. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +78 -65
  122. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +101 -88
  123. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +20 -20
  124. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +19 -19
  125. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +68 -34
  126. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +174 -41
  127. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +667 -244
  128. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +474 -155
  129. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +37 -9
  130. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +27 -8
  131. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +366 -280
  132. package/sdk/platform/Content/ContentPlatformApplicationClient.js +1435 -753
  133. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +323 -223
  134. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +335 -205
  135. package/sdk/platform/Content/ContentPlatformClient.d.ts +304 -106
  136. package/sdk/platform/Content/ContentPlatformClient.js +1842 -450
  137. package/sdk/platform/Content/ContentPlatformModel.d.ts +2582 -566
  138. package/sdk/platform/Content/ContentPlatformModel.js +1426 -558
  139. package/sdk/platform/Content/ContentPlatformValidator.d.ts +293 -114
  140. package/sdk/platform/Content/ContentPlatformValidator.js +328 -101
  141. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +59 -23
  142. package/sdk/platform/Discount/DiscountPlatformClient.js +84 -23
  143. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +403 -110
  144. package/sdk/platform/Discount/DiscountPlatformModel.js +121 -107
  145. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +56 -36
  146. package/sdk/platform/Discount/DiscountPlatformValidator.js +29 -19
  147. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +12 -110
  148. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +14 -684
  149. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +5 -94
  150. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +4 -115
  151. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +20 -20
  152. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +22 -22
  153. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +90 -920
  154. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +53 -949
  155. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
  156. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
  157. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +10 -10
  158. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +10 -10
  159. package/sdk/platform/Lead/LeadPlatformClient.d.ts +11 -11
  160. package/sdk/platform/Lead/LeadPlatformClient.js +11 -11
  161. package/sdk/platform/Lead/LeadPlatformModel.d.ts +14 -9
  162. package/sdk/platform/Lead/LeadPlatformModel.js +20 -18
  163. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +56 -9
  164. package/sdk/platform/Order/OrderPlatformApplicationClient.js +340 -10
  165. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +128 -24
  166. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +81 -19
  167. package/sdk/platform/Order/OrderPlatformClient.d.ts +517 -160
  168. package/sdk/platform/Order/OrderPlatformClient.js +1623 -384
  169. package/sdk/platform/Order/OrderPlatformModel.d.ts +10372 -1587
  170. package/sdk/platform/Order/OrderPlatformModel.js +5726 -1512
  171. package/sdk/platform/Order/OrderPlatformValidator.d.ts +539 -123
  172. package/sdk/platform/Order/OrderPlatformValidator.js +323 -92
  173. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +8 -6
  174. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +11 -9
  175. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +6 -4
  176. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +3 -2
  177. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +77 -25
  178. package/sdk/platform/Partner/PartnerPlatformModel.js +32 -21
  179. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +144 -219
  180. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +307 -796
  181. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +86 -121
  182. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +80 -138
  183. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +30 -30
  184. package/sdk/platform/Payment/PaymentPlatformClient.js +30 -30
  185. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +901 -761
  186. package/sdk/platform/Payment/PaymentPlatformModel.js +663 -583
  187. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +8 -8
  188. package/sdk/platform/Payment/PaymentPlatformValidator.js +8 -8
  189. package/sdk/platform/PlatformApplicationClient.d.ts +0 -2
  190. package/sdk/platform/PlatformApplicationClient.js +0 -4
  191. package/sdk/platform/PlatformClient.d.ts +5 -4
  192. package/sdk/platform/PlatformClient.js +32 -22
  193. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +526 -69
  194. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +3337 -337
  195. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +603 -38
  196. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +529 -32
  197. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +184 -133
  198. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +780 -491
  199. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +9408 -1666
  200. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +5720 -1765
  201. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +257 -180
  202. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +185 -127
  203. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +7 -7
  204. package/sdk/platform/Share/SharePlatformApplicationClient.js +7 -7
  205. package/sdk/platform/Share/SharePlatformModel.d.ts +45 -9
  206. package/sdk/platform/Share/SharePlatformModel.js +31 -6
  207. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +26 -26
  208. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +38 -29
  209. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +18 -3
  210. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +10 -2
  211. package/sdk/platform/Theme/ThemePlatformClient.d.ts +4 -4
  212. package/sdk/platform/Theme/ThemePlatformClient.js +4 -4
  213. package/sdk/platform/Theme/ThemePlatformModel.d.ts +103 -17
  214. package/sdk/platform/Theme/ThemePlatformModel.js +92 -23
  215. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +167 -45
  216. package/sdk/platform/User/UserPlatformApplicationClient.js +950 -67
  217. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +189 -3
  218. package/sdk/platform/User/UserPlatformApplicationValidator.js +157 -3
  219. package/sdk/platform/User/UserPlatformModel.d.ts +880 -47
  220. package/sdk/platform/User/UserPlatformModel.js +607 -46
  221. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +33 -86
  222. package/sdk/platform/Webhook/WebhookPlatformClient.js +79 -474
  223. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +861 -422
  224. package/sdk/platform/Webhook/WebhookPlatformModel.js +469 -391
  225. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -55
  226. package/sdk/platform/Webhook/WebhookPlatformValidator.js +12 -72
  227. package/sdk/platform/index.d.ts +0 -2
  228. package/sdk/platform/index.js +0 -4
  229. package/sdk/public/Catalog/CatalogPublicClient.d.ts +22 -0
  230. package/sdk/public/Catalog/CatalogPublicClient.js +133 -0
  231. package/sdk/public/Catalog/CatalogPublicModel.d.ts +158 -0
  232. package/sdk/public/Catalog/CatalogPublicModel.js +116 -0
  233. package/sdk/public/Catalog/CatalogPublicValidator.d.ts +55 -0
  234. package/sdk/public/Catalog/CatalogPublicValidator.js +35 -0
  235. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +5 -4
  236. package/sdk/public/Configuration/ConfigurationPublicClient.js +9 -8
  237. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +41 -21
  238. package/sdk/public/Configuration/ConfigurationPublicModel.js +28 -12
  239. package/sdk/public/Content/ContentPublicClient.d.ts +145 -2
  240. package/sdk/public/Content/ContentPublicClient.js +1067 -17
  241. package/sdk/public/Content/ContentPublicModel.d.ts +704 -3
  242. package/sdk/public/Content/ContentPublicModel.js +751 -3
  243. package/sdk/public/Content/ContentPublicValidator.d.ts +94 -3
  244. package/sdk/public/Content/ContentPublicValidator.js +119 -2
  245. package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
  246. package/sdk/public/Partner/PartnerPublicClient.js +1 -1
  247. package/sdk/public/Partner/PartnerPublicModel.d.ts +248 -72
  248. package/sdk/public/Partner/PartnerPublicModel.js +81 -71
  249. package/sdk/public/Partner/PartnerPublicValidator.d.ts +2 -2
  250. package/sdk/public/Partner/PartnerPublicValidator.js +1 -1
  251. package/sdk/public/PublicClient.d.ts +5 -2
  252. package/sdk/public/PublicClient.js +16 -6
  253. package/sdk/public/Webhook/WebhookPublicClient.d.ts +13 -13
  254. package/sdk/public/Webhook/WebhookPublicClient.js +13 -13
  255. package/sdk/public/Webhook/WebhookPublicModel.d.ts +249 -67
  256. package/sdk/public/Webhook/WebhookPublicModel.js +81 -61
  257. package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
  258. package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
  259. package/sdk/public/index.d.ts +1 -0
  260. package/sdk/public/index.js +2 -0
  261. package/utility.d.ts +3 -0
  262. package/utility.js +7 -0
  263. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +0 -79
  264. package/sdk/application/Rewards/RewardsApplicationClient.js +0 -315
  265. package/sdk/application/Webhook/WebhookApplicationClient.d.ts +0 -19
  266. package/sdk/application/Webhook/WebhookApplicationClient.js +0 -72
  267. package/sdk/platform/Finance/FinancePlatformClient.d.ts +0 -320
  268. package/sdk/platform/Finance/FinancePlatformClient.js +0 -2333
  269. package/sdk/platform/Finance/FinancePlatformModel.d.ts +0 -2890
  270. package/sdk/platform/Finance/FinancePlatformModel.js +0 -2148
  271. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +0 -284
  272. package/sdk/platform/Finance/FinancePlatformValidator.js +0 -354
  273. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +0 -136
  274. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +0 -976
  275. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +0 -152
  276. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +0 -157
  277. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +0 -382
  278. package/sdk/platform/Rewards/RewardsPlatformModel.js +0 -408
@@ -1,89 +1,222 @@
1
1
  const Joi = require("joi");
2
2
 
3
3
  /**
4
- * @typedef UpdateSubscriberRequest
5
- * @property {string} [status]
4
+ * @typedef ReportDownloadPayload
5
+ * @property {string} end_date - The end date and time for the report, in ISO 8601 format.
6
+ * @property {string} start_date - The start date and time for the report, in
7
+ * ISO 8601 format.
6
8
  */
7
9
 
8
10
  /**
9
- * @typedef UpdateSubscriberResponse
10
- * @property {string} [message]
11
+ * @typedef DownloadReportResult
12
+ * @property {string} [file_name] - The generated report file name.
13
+ */
14
+
15
+ /**
16
+ * @typedef FilterValidationPayload
17
+ * @property {Object} sample_data - Sample payload used to validate the filter logic.
18
+ * @property {FilterValidationSchema} filters
19
+ */
20
+
21
+ /**
22
+ * @typedef ReducerValidationPayload
23
+ * @property {Object} sample_data - Sample payload used to validate the reducer mapping.
24
+ * @property {Object} reducer - The reducer property allows users to customize
25
+ * the JSON structure of the webhook payload using JSONPath queries.
26
+ */
27
+
28
+ /**
29
+ * @typedef FilterReducerSave
30
+ * @property {FilterSaveSchema} [filter_configuration]
31
+ * @property {Object} [reducer_configuration] - The reducer property allows
32
+ * users to customize the JSON structure of the webhook payload using JSONPath queries.
33
+ * @property {string} event_slug - Event slug for which filter/reducer is being
34
+ * configured.
35
+ */
36
+
37
+ /**
38
+ * @typedef FilterValidationSchema
39
+ * @property {string} [query] - JSONPath expression to extract a value from
40
+ * sample payload.
41
+ * @property {string} [condition] - JavaScript condition function evaluated for
42
+ * the extracted value.
43
+ * @property {string} [logic] - Logical operator for combining nested filter conditions.
44
+ * @property {Object[]} [conditions] - Nested filter conditions evaluated with
45
+ * the selected logical operator.
46
+ */
47
+
48
+ /**
49
+ * @typedef FilterSaveSchema
50
+ * @property {string} [query] - JSONPath expression to extract a value from event payload.
51
+ * @property {string} [condition] - JavaScript condition function evaluated for
52
+ * the extracted value.
53
+ * @property {string} [logic] - Logical operator for combining nested filter conditions.
54
+ * @property {Object[]} [conditions] - Nested filter conditions evaluated with
55
+ * the selected logical operator.
56
+ */
57
+
58
+ /**
59
+ * @typedef FilterValidationResult
60
+ * @property {boolean} [success] - Indicates if the filter validation succeeded.
61
+ * @property {string} [message] - Additional details about filter validation result.
62
+ * @property {boolean} [filter_result] - Evaluated result of the filter condition.
63
+ */
64
+
65
+ /**
66
+ * @typedef ReducerValidationResult
67
+ * @property {boolean} [success] - Indicates if the reducer validation succeeded.
68
+ * @property {string} [message] - Additional details about reducer validation result.
69
+ * @property {Object} [reducer_result] - Result produced by applying reducer
70
+ * mapping on sample data.
71
+ */
72
+
73
+ /**
74
+ * @typedef FilterReducerSaveResult
75
+ * @property {boolean} [success] - Indicates if filter/reducer configuration was
76
+ * saved successfully.
77
+ * @property {string} [message] - Additional details about save operation result.
78
+ * @property {Object} [data] - Additional response payload returned by the save operation.
79
+ */
80
+
81
+ /**
82
+ * @typedef SubscriberUpdate
83
+ * @property {string} [status] - Represents the status of the subscriber update operation.
84
+ */
85
+
86
+ /**
87
+ * @typedef SubscriberUpdateResult
88
+ * @property {string} [message] - Provides a message describing the result of
89
+ * the subscriber update operation.
11
90
  */
12
91
 
13
92
  /**
14
93
  * @typedef Association
15
- * @property {number} [company_id]
16
- * @property {string[]} [application_id]
17
- * @property {string} [extension_id]
18
- * @property {string} [criteria]
94
+ * @property {number} [company_id] - The identifier for the company associated
95
+ * with the configuration.
96
+ * @property {string[]} [application_id] - A list of application identifiers
97
+ * associated with the configuration.
98
+ * @property {string} [extension_id] - The identifier for the extension related
99
+ * to the configuration.
100
+ * @property {string} [criteria] - Defines the criteria for the association,
101
+ * including options for all events, empty criteria, or specific events.
19
102
  */
20
103
 
21
104
  /**
22
105
  * @typedef AuthMeta
23
- * @property {string} [type]
24
- * @property {string} [secret]
106
+ * @property {string} [type] - Specifies the type of authentication used.
107
+ * @property {string} [secret] - Contains the key or token used for authentication.
108
+ */
109
+
110
+ /**
111
+ * @typedef BroadcasterConfig
112
+ * @property {string} [topic] - The topic associated with the broadcaster configuration.
113
+ * @property {string} [queue] - The queue name used by the broadcaster.
114
+ * @property {string} [event_bridge_name] - The name of the event bridge used in
115
+ * the broadcaster configuration.
116
+ * @property {string} [workflow_name] - The name of the workflow related to the
117
+ * broadcaster.
118
+ * @property {string} [account_id] - The account ID associated with the
119
+ * broadcaster configuration.
120
+ * @property {string} [detail_type] - Specifies the type of detail for the
121
+ * broadcaster, allowing for custom or non-enumerated values.
25
122
  */
26
123
 
27
124
  /**
28
125
  * @typedef SubscriberEventMapping
29
- * @property {number} [id]
30
- * @property {number} [event_id]
31
- * @property {number} [subscriber_id]
32
- * @property {string} [topic]
33
- * @property {string} [created_on]
34
- */
35
-
36
- /**
37
- * @typedef EventConfigResponse
38
- * @property {number} [id]
39
- * @property {string} [event_name]
40
- * @property {string} [event_type]
41
- * @property {string} [event_category]
42
- * @property {Object} [event_schema]
43
- * @property {string} [version]
44
- * @property {string} [display_name]
45
- * @property {string} [description]
46
- * @property {string} [created_on]
47
- * @property {string} [updated_on]
48
- * @property {string} [group]
126
+ * @property {number} [id] - The unique identifier for the subscriber event mapping.
127
+ * @property {number} [event_id] - The identifier for the event associated with
128
+ * the subscriber.
129
+ * @property {number} [subscriber_id] - The identifier for the subscriber
130
+ * involved in the mapping.
131
+ * @property {FilterSchema} [filters]
132
+ * @property {Object} [reducer] - The reducer property allows users to customize
133
+ * the JSON structure of the webhook payload using JSONPath queries. They can
134
+ * also create new properties by mapping existing ones. Note that it overrides
135
+ * the entire JSON structure of the webhook payload sent via the webhook. See
136
+ * the partner documentation's filter and reducer section for details.
137
+ * @property {BroadcasterConfig} [broadcaster_config]
138
+ * @property {string} [created_on] - The timestamp indicating when the
139
+ * subscriber event mapping was created.
140
+ */
141
+
142
+ /**
143
+ * @typedef FilterSchema
144
+ * @property {string} [query] - JSONPath expression that specifies the property
145
+ * in the webhook payload to filter on. This enables targeting specific data
146
+ * within the payload.
147
+ * @property {string} [condition] - JavaScript function used to evaluate the
148
+ * specified property in the webhook payload against a condition. This
149
+ * function determines whether the filter passes based on its return value.
150
+ * @property {string} [logic] - Logical operator used to combine multiple
151
+ * conditions in the `conditions` array. Supported values are `AND` and `OR`.
152
+ * @property {Object[]} [conditions] - An array of filter objects to be
153
+ * evaluated using the specified logical operator. This array will contain
154
+ * more filters including a combination of single condition mode and logical
155
+ * group mode filters.
156
+ */
157
+
158
+ /**
159
+ * @typedef EventConfigDetails
160
+ * @property {number} [id] - The unique identifier for the event configuration.
161
+ * @property {string} [event_name] - The name assigned to the event configuration.
162
+ * @property {string} [event_type] - Specifies the type of event, allowing for
163
+ * custom or non-enumerated values.
164
+ * @property {string} [event_category] - Defines the category of the event,
165
+ * allowing for custom or non-enumerated values.
166
+ * @property {Object} [event_schema] - Contains the schema details for the
167
+ * event, allowing for flexible or dynamic schemas.
168
+ * @property {string} [version] - The version number of the event configuration.
169
+ * @property {string} [display_name] - The display name for the event configuration.
170
+ * @property {string} [description] - A description of the event configuration,
171
+ * if provided.
172
+ * @property {string} [created_on] - The timestamp indicating when the event
173
+ * configuration was created.
174
+ * @property {string} [updated_on] - The timestamp indicating when the event
175
+ * configuration was last updated.
176
+ * @property {string} [group] - The group to which the event configuration
177
+ * belongs, if applicable.
49
178
  * @property {SubscriberEventMapping} [subscriber_event_mapping]
50
179
  */
51
180
 
52
181
  /**
53
- * @typedef SubscriberConfigResponse
54
- * @property {ItemSchema[]} [items]
182
+ * @typedef SubscriberConfigDetails
183
+ * @property {ItemSchema[]} [items] - A list of items representing subscriber
184
+ * configurations.
55
185
  * @property {Page} [page]
56
186
  */
57
187
 
58
188
  /**
59
- * @typedef InvalidEventsRequest
60
- * @property {string} [event_name]
61
- * @property {string} [version]
62
- * @property {string} [category]
63
- * @property {string} [start_date]
64
- * @property {string} [end_date]
189
+ * @typedef InvalidEventsPayload
190
+ * @property {string} [event_name] - The name of the event that is considered invalid.
191
+ * @property {string} [version] - The version of the event that is considered invalid.
192
+ * @property {string} [category] - The category of the event that is considered invalid.
193
+ * @property {string} [start_date] - The start date and time for the period
194
+ * during which events were considered invalid.
195
+ * @property {string} [end_date] - The end date and time for the period during
196
+ * which events were considered invalid.
65
197
  */
66
198
 
67
199
  /**
68
- * @typedef InvalidEventsResponse
69
- * @property {string} [event_name]
70
- * @property {string} [event_type]
71
- * @property {string} [version]
72
- * @property {string} [category]
73
- * @property {number} [count]
200
+ * @typedef InvalidEventsResult
201
+ * @property {string} [event_name] - The name of the event that was found to be invalid.
202
+ * @property {string} [event_type] - The type of the invalid event, allowing for
203
+ * custom or non-enumerated values.
204
+ * @property {string} [version] - The version of the invalid event.
205
+ * @property {string} [category] - The category of the invalid event.
206
+ * @property {number} [count] - The number of occurrences of the invalid event.
74
207
  */
75
208
 
76
209
  /**
77
210
  * @typedef HistoryFilters
78
- * @property {string[]} [events]
79
- * @property {string} [search_text]
211
+ * @property {string[]} [events] - A list of event types to filter the history report.
212
+ * @property {string} [search_text] - Text used for searching within the history report.
80
213
  * @property {string} [status] - The status of the history report (e.g., "FAILED").
81
214
  * @property {string} [end_date] - The end date and time of the history report.
82
215
  * @property {string} [start_date] - The start date and time of the history report.
83
216
  * @property {number[]} [subscribers] - An array of subscriber IDs associated
84
217
  * with the history report.
85
- * @property {string[]} [webhook_type] - An array of webhook type to identify
86
- * thetype of subscriber i.e (KAFKA or REST).
218
+ * @property {string[]} [webhook_type] - An array of webhook types to identify
219
+ * the type of subscriber.
87
220
  */
88
221
 
89
222
  /**
@@ -94,7 +227,8 @@ const Joi = require("joi");
94
227
 
95
228
  /**
96
229
  * @typedef CdnObject
97
- * @property {Url[]} [urls]
230
+ * @property {Url[]} [urls] - A list of URLs for CDN objects, including the
231
+ * location of the uploaded report files.
98
232
  */
99
233
 
100
234
  /**
@@ -104,170 +238,298 @@ const Joi = require("joi");
104
238
 
105
239
  /**
106
240
  * @typedef HistoryAssociation
107
- * @property {number} [company_id]
108
- * @property {number[]} [subscriber_ids]
241
+ * @property {number} [company_id] - The identifier for the company associated
242
+ * with the history report.
243
+ * @property {number[]} [subscriber_ids] - A list of subscriber IDs related to
244
+ * the history report.
109
245
  */
110
246
 
111
247
  /**
112
248
  * @typedef HistoryItems
113
- * @property {number} [id] - The ID of the history report.
249
+ * @property {number} [id] - The unique identifier for the history report.
114
250
  * @property {HistoryAssociation} [association]
115
251
  * @property {HistoryFilters} [filters]
116
- * @property {string} [filename] - The filename of the history report.
117
- * @property {string} [status] - The status of the history report (e.g., "COMPLETED").
252
+ * @property {string} [filename] - The name of the file containing the history report.
253
+ * @property {string} [status] - The current status of the history report (e.g.,
254
+ * "COMPLETED").
118
255
  * @property {UploadServiceObject} [upload_service_response]
119
256
  * @property {string} [created_on] - The date and time when the history report
120
- * was created.
257
+ * was generated.
121
258
  * @property {string} [updated_on] - The date and time when the history report
122
259
  * was last updated.
123
260
  * @property {string} [message] - A message related to the history report.
124
261
  */
125
262
 
126
263
  /**
127
- * @typedef HistoryResponse
128
- * @property {HistoryItems[]} [items]
264
+ * @typedef HistoryResult
265
+ * @property {HistoryItems[]} [items] - A list of history report items.
129
266
  * @property {Page} [page]
130
267
  */
131
268
 
132
269
  /**
133
270
  * @typedef HistoryPayload
134
- * @property {number} [company_id]
135
- * @property {string} [type] - The type of history report (e.g., "platform").
136
- * @property {number} [page_no] - The page number of the history report.
137
- * @property {number} [page_size] - The number of records per page.
271
+ * @property {number} [company_id] - The identifier for the company requesting
272
+ * the history report.
273
+ * @property {string} [type] - Specifies the type of history report requested
274
+ * (e.g., "platform").
275
+ * @property {number} [page_no] - The page number of the history report results.
276
+ * @property {number} [page_size] - The number of records to display per page in
277
+ * the history report.
138
278
  */
139
279
 
140
280
  /**
141
- * @typedef CancelDownloadResponse
142
- * @property {string} [message]
143
- * @property {string} [result]
281
+ * @typedef CancelDownloadResult
282
+ * @property {string} [message] - A message indicating the result of the cancel
283
+ * download request.
284
+ * @property {string} [result] - The outcome of the cancel download operation.
144
285
  */
145
286
 
146
287
  /**
147
- * @typedef FilterReportResponse
148
- * @property {string} [filter_name]
149
- * @property {Object[]} [values]
288
+ * @typedef FilterReportResult
289
+ * @property {string} [filter_name] - The name of the filter applied in the report.
290
+ * @property {Object[]} [values] - A list of values resulting from the applied filter.
150
291
  */
151
292
 
152
293
  /**
153
- * @typedef DeliveryTsResponse
154
- * @property {DeliveryTsSchema[]} [delivery_ts]
294
+ * @typedef DeliveryTsResult
295
+ * @property {DeliveryTsSchema[]} [delivery_ts] - List of delivery timestamps.
155
296
  */
156
297
 
157
298
  /**
158
299
  * @typedef DeliveryTsSchema
159
- * @property {string} [timestamp]
160
- * @property {number} [failed]
161
- * @property {number} [removed_webhooks]
162
- * @property {number} [success]
300
+ * @property {string} [timestamp] - The timestamp of the delivery event.
301
+ * @property {number} [failed] - The count of failed delivery attempts.
302
+ * @property {number} [removed_webhooks] - The count of removed webhooks during delivery.
303
+ * @property {number} [success] - The count of successful delivery attempts.
163
304
  */
164
305
 
165
306
  /**
166
- * @typedef DeliveryDetailsRequest
167
- * @property {string} [company_id]
168
- * @property {number} [page_no]
169
- * @property {number} [page_size]
170
- * @property {string} [start_date]
171
- * @property {string} [end_date]
172
- * @property {EventDeliveryDetailSchema[]} [event]
173
- * @property {string} [status]
307
+ * @typedef DeliveryDetailsPayload
308
+ * @property {string} [company_id] - The identifier for the company requesting
309
+ * delivery details.
310
+ * @property {number} [page_no] - The page number for the delivery details results.
311
+ * @property {number} [page_size] - The number of records per page for delivery details.
312
+ * @property {string} [start_date] - The start date and time for filtering
313
+ * delivery details.
314
+ * @property {string} [end_date] - The end date and time for filtering delivery details.
315
+ * @property {EventDeliveryDetailSchema[]} [event] - A list of event delivery details.
316
+ * @property {string} [status] - The status of the delivery details request.
174
317
  */
175
318
 
176
319
  /**
177
320
  * @typedef EventDeliveryDetailSchema
178
- * @property {string} [event_name]
179
- * @property {string} [event_type]
180
- * @property {string} [event_category]
181
- * @property {string} [version]
321
+ * @property {string} [event_name] - The name of the event related to the
322
+ * delivery details.
323
+ * @property {string} [event_type] - The type of the event, allowing for custom
324
+ * or non-enumerated values.
325
+ * @property {string} [event_category] - The category of the event, allowing for
326
+ * custom or non-enumerated values.
327
+ * @property {string} [version] - The version of the event related to the
328
+ * delivery details.
182
329
  */
183
330
 
184
331
  /**
185
- * @typedef DeliveryDetailsResponse
186
- * @property {EventProcessReportObject[]} [rows]
332
+ * @typedef DeliveryDetailsResult
333
+ * @property {EventProcessReportObject[]} [rows] - A list of processed event
334
+ * reports with delivery details.
187
335
  * @property {Page} [page]
188
336
  */
189
337
 
190
338
  /**
191
339
  * @typedef EventProcessReportObject
192
340
  * @property {string} [event_name] - The name of the processed event.
193
- * @property {number} [response_code] - The response code of the event.
194
- * @property {string} [response_message] - The response message of the event.
195
- * @property {string} [data] - The data associated with the event.
196
- * @property {number} [attempt] - The attempt number of the event.
197
- * @property {number} [last_attempted_on] - The timestamp of the last attempted event.
198
- * @property {string} [status] - The status of the event (e.g., "FAILED").
341
+ * @property {number} [response_code] - The response code returned for the
342
+ * event, allowing for custom or non-enumerated values.
343
+ * @property {string} [response_message] - The response message associated with the event.
344
+ * @property {string} [data] - The data payload associated with the event.
345
+ * @property {number} [attempt] - The attempt number for processing the event.
346
+ * @property {number} [last_attempted_on] - The timestamp of the last attempt to
347
+ * process the event.
348
+ * @property {string} [status] - The status of the event processing (e.g., "FAILED").
199
349
  * @property {string} [name] - The name of the event.
200
- * @property {string} [webhook_url] - The webhook URL associated with the event.
201
- * @property {number} [response_time] - The response time of the event.
202
- * @property {string} [message_id]
203
- * @property {string} [event_trace_id]
350
+ * @property {string} [webhook_url] - The URL of the webhook associated with the event.
351
+ * @property {number} [response_time] - The time taken to respond to the event.
352
+ * @property {string} [message_id] - The identifier for the event message.
353
+ * @property {string} [event_trace_id] - The trace ID associated with the event.
204
354
  */
205
355
 
206
356
  /**
207
357
  * @typedef Page
208
- * @property {number} [item_total] - The total number of items on the page.
358
+ * @property {number} [item_total] - The total number of all items across all pages.
209
359
  * @property {string} [next_id] - The identifier for the next page.
210
360
  * @property {boolean} [has_previous] - Indicates whether there is a previous page.
211
361
  * @property {boolean} [has_next] - Indicates whether there is a next page.
212
362
  * @property {number} [current] - The current page number.
213
- * @property {string} type - The type of the page, such as 'PageType'.
363
+ * @property {string} type - The type of the page, can be 'cursor' or 'number'.
214
364
  * @property {number} [size] - The number of items per page.
365
+ * @property {number} [page_size] - The number of items per page.
215
366
  */
216
367
 
217
368
  /**
218
369
  * @typedef DeliveryEventLevelSchema
219
- * @property {string} [event]
220
- * @property {number} [success]
221
- * @property {number} [failed]
222
- * @property {number} [failed_percentage]
223
- * @property {number} [removed_webhooks]
224
- * @property {number} [total]
225
- * @property {number} [response_time]
370
+ * @property {string} [event] - The name or identifier of the event.
371
+ * @property {number} [success] - The count of successful deliveries for the event.
372
+ * @property {number} [failed] - The count of failed deliveries for the event.
373
+ * @property {number} [failed_percentage] - The percentage of failed deliveries
374
+ * relative to the total.
375
+ * @property {number} [removed_webhooks] - The count of webhooks that were
376
+ * removed during the delivery.
377
+ * @property {number} [total] - The total number of delivery attempts for the event.
378
+ * @property {number} [response_time] - The average response time for the event
379
+ * deliveries.
226
380
  */
227
381
 
228
382
  /**
229
- * @typedef DeliverySummaryResponse
230
- * @property {DeliveryEventLevelSchema[]} [delivery_event_level]
383
+ * @typedef ResponseTimeTs
384
+ * @property {AvgResponseTime[]} [avg_response_time_ts] - List of average
385
+ * response time timestamps.
386
+ */
387
+
388
+ /**
389
+ * @typedef AvgResponseTime
390
+ * @property {string} [last_attempted_on] - The timestamp of the last attempt,
391
+ * formatted as a string.
392
+ * @property {number} [response_code] - The response code returned for the
393
+ * delivery attempt, allowing for custom or non-enumerated values.
394
+ * @property {string} [response_time] - The response time for the delivery
395
+ * attempt, formatted as a string.
396
+ * @property {number} [attempt] - The attempt number for the delivery.
397
+ * @property {number} [total] - The total count of deliveries attempted.
398
+ */
399
+
400
+ /**
401
+ * @typedef DeliverySummaryResult
402
+ * @property {DeliveryEventLevelSchema[]} [delivery_event_level] - List of
403
+ * delivery event levels.
231
404
  * @property {DeliverySummarySchema} [delivery_summary]
232
405
  */
233
406
 
234
407
  /**
235
408
  * @typedef DeliverySummarySchema
236
- * @property {number} [success]
237
- * @property {number} [response_time]
238
- * @property {number} [failed_percentage]
239
- * @property {number} [removed_webhooks]
409
+ * @property {number} [success] - The total count of successful deliveries.
410
+ * @property {number} [response_time] - The average response time for deliveries.
411
+ * @property {number} [failed_percentage] - The percentage of failed deliveries.
412
+ * @property {number} [removed_webhooks] - The count of webhooks removed during delivery.
240
413
  */
241
414
 
242
415
  /**
243
416
  * @typedef ItemSchema
244
- * @property {number} [id]
245
- * @property {string} [modified_by]
246
- * @property {string} [name]
247
- * @property {string} [webhook_url]
248
- * @property {string} [provider]
417
+ * @property {number} [id] - The unique identifier for the item.
418
+ * @property {string} [modified_by] - The user or system that last modified the item.
419
+ * @property {string} [name] - The name of the item.
420
+ * @property {string} [webhook_url] - The URL of the webhook associated with the item.
421
+ * @property {string} [provider] - The provider of the item.
422
+ * @property {string} [source] - Source that subscriber belongs to.
249
423
  * @property {Association} [association]
250
- * @property {Object} [custom_headers]
251
- * @property {string} [status]
252
- * @property {string} [email_id]
253
- * @property {string} [updated_on]
254
- * @property {string} [created_on]
255
- * @property {string} [type]
424
+ * @property {Object} [custom_headers] - Custom headers associated with the item, if any.
425
+ * @property {string} [status] - The current status of the item.
426
+ * @property {string} [email_id] - The email ID associated with the item, if applicable.
427
+ * @property {string} [updated_on] - The date and time when the item was last updated.
428
+ * @property {string} [created_on] - The date and time when the item was created.
429
+ * @property {string} [type] - The type of the item, if applicable.
256
430
  * @property {AuthMeta} [auth_meta]
257
- * @property {EventConfigResponse[]} [event_configs]
258
- * @property {number[]} [event_id]
431
+ * @property {EventConfigDetails[]} [event_configs] - A list of event
432
+ * configurations associated with the item.
433
+ * @property {number[]} [event_id] - A list of event IDs associated with the item.
259
434
  */
260
435
 
261
436
  class WebhookPartnerModel {
262
- /** @returns {UpdateSubscriberRequest} */
263
- static UpdateSubscriberRequest() {
437
+ /** @returns {ReportDownloadPayload} */
438
+ static ReportDownloadPayload() {
439
+ return Joi.object({
440
+ end_date: Joi.string().allow("").required(),
441
+ start_date: Joi.string().allow("").required(),
442
+ });
443
+ }
444
+
445
+ /** @returns {DownloadReportResult} */
446
+ static DownloadReportResult() {
447
+ return Joi.object({
448
+ file_name: Joi.string().allow(""),
449
+ });
450
+ }
451
+
452
+ /** @returns {FilterValidationPayload} */
453
+ static FilterValidationPayload() {
454
+ return Joi.object({
455
+ sample_data: Joi.object().pattern(/\S/, Joi.any()).required(),
456
+ filters: WebhookPartnerModel.FilterValidationSchema().required(),
457
+ });
458
+ }
459
+
460
+ /** @returns {ReducerValidationPayload} */
461
+ static ReducerValidationPayload() {
462
+ return Joi.object({
463
+ sample_data: Joi.object().pattern(/\S/, Joi.any()).required(),
464
+ reducer: Joi.object().pattern(/\S/, Joi.any()).required(),
465
+ });
466
+ }
467
+
468
+ /** @returns {FilterReducerSave} */
469
+ static FilterReducerSave() {
470
+ return Joi.object({
471
+ filter_configuration: WebhookPartnerModel.FilterSaveSchema(),
472
+ reducer_configuration: Joi.object().pattern(/\S/, Joi.any()),
473
+ event_slug: Joi.string().allow("").required(),
474
+ });
475
+ }
476
+
477
+ /** @returns {FilterValidationSchema} */
478
+ static FilterValidationSchema() {
479
+ return Joi.object({
480
+ query: Joi.string().allow(""),
481
+ condition: Joi.string().allow(""),
482
+ logic: Joi.string().allow(""),
483
+ conditions: Joi.array().items(Joi.object().pattern(/\S/, Joi.any())),
484
+ });
485
+ }
486
+
487
+ /** @returns {FilterSaveSchema} */
488
+ static FilterSaveSchema() {
489
+ return Joi.object({
490
+ query: Joi.string().allow(""),
491
+ condition: Joi.string().allow(""),
492
+ logic: Joi.string().allow(""),
493
+ conditions: Joi.array().items(Joi.object().pattern(/\S/, Joi.any())),
494
+ });
495
+ }
496
+
497
+ /** @returns {FilterValidationResult} */
498
+ static FilterValidationResult() {
499
+ return Joi.object({
500
+ success: Joi.boolean(),
501
+ message: Joi.string().allow(""),
502
+ filter_result: Joi.boolean(),
503
+ });
504
+ }
505
+
506
+ /** @returns {ReducerValidationResult} */
507
+ static ReducerValidationResult() {
508
+ return Joi.object({
509
+ success: Joi.boolean(),
510
+ message: Joi.string().allow(""),
511
+ reducer_result: Joi.object().pattern(/\S/, Joi.any()),
512
+ });
513
+ }
514
+
515
+ /** @returns {FilterReducerSaveResult} */
516
+ static FilterReducerSaveResult() {
517
+ return Joi.object({
518
+ success: Joi.boolean(),
519
+ message: Joi.string().allow(""),
520
+ data: Joi.object().pattern(/\S/, Joi.any()),
521
+ });
522
+ }
523
+
524
+ /** @returns {SubscriberUpdate} */
525
+ static SubscriberUpdate() {
264
526
  return Joi.object({
265
527
  status: Joi.string().allow(""),
266
528
  });
267
529
  }
268
530
 
269
- /** @returns {UpdateSubscriberResponse} */
270
- static UpdateSubscriberResponse() {
531
+ /** @returns {SubscriberUpdateResult} */
532
+ static SubscriberUpdateResult() {
271
533
  return Joi.object({
272
534
  message: Joi.string().allow(""),
273
535
  });
@@ -291,19 +553,43 @@ class WebhookPartnerModel {
291
553
  });
292
554
  }
293
555
 
556
+ /** @returns {BroadcasterConfig} */
557
+ static BroadcasterConfig() {
558
+ return Joi.object({
559
+ topic: Joi.string().allow(""),
560
+ queue: Joi.string().allow(""),
561
+ event_bridge_name: Joi.string().allow(""),
562
+ workflow_name: Joi.string().allow(""),
563
+ account_id: Joi.string().allow(""),
564
+ detail_type: Joi.string().allow(""),
565
+ }).allow(null);
566
+ }
567
+
294
568
  /** @returns {SubscriberEventMapping} */
295
569
  static SubscriberEventMapping() {
296
570
  return Joi.object({
297
571
  id: Joi.number(),
298
572
  event_id: Joi.number(),
299
573
  subscriber_id: Joi.number(),
300
- topic: Joi.string().allow("").allow(null),
574
+ filters: WebhookPartnerModel.FilterSchema(),
575
+ reducer: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
576
+ broadcaster_config: WebhookPartnerModel.BroadcasterConfig(),
301
577
  created_on: Joi.string().allow(""),
302
578
  });
303
579
  }
304
580
 
305
- /** @returns {EventConfigResponse} */
306
- static EventConfigResponse() {
581
+ /** @returns {FilterSchema} */
582
+ static FilterSchema() {
583
+ return Joi.object({
584
+ query: Joi.string().allow(""),
585
+ condition: Joi.string().allow(""),
586
+ logic: Joi.string().allow(""),
587
+ conditions: Joi.array().items(Joi.object().pattern(/\S/, Joi.any())),
588
+ }).allow(null);
589
+ }
590
+
591
+ /** @returns {EventConfigDetails} */
592
+ static EventConfigDetails() {
307
593
  return Joi.object({
308
594
  id: Joi.number(),
309
595
  event_name: Joi.string().allow(""),
@@ -320,16 +606,16 @@ class WebhookPartnerModel {
320
606
  });
321
607
  }
322
608
 
323
- /** @returns {SubscriberConfigResponse} */
324
- static SubscriberConfigResponse() {
609
+ /** @returns {SubscriberConfigDetails} */
610
+ static SubscriberConfigDetails() {
325
611
  return Joi.object({
326
612
  items: Joi.array().items(WebhookPartnerModel.ItemSchema()),
327
613
  page: WebhookPartnerModel.Page(),
328
614
  });
329
615
  }
330
616
 
331
- /** @returns {InvalidEventsRequest} */
332
- static InvalidEventsRequest() {
617
+ /** @returns {InvalidEventsPayload} */
618
+ static InvalidEventsPayload() {
333
619
  return Joi.object({
334
620
  event_name: Joi.string().allow(""),
335
621
  version: Joi.string().allow(""),
@@ -339,8 +625,8 @@ class WebhookPartnerModel {
339
625
  });
340
626
  }
341
627
 
342
- /** @returns {InvalidEventsResponse} */
343
- static InvalidEventsResponse() {
628
+ /** @returns {InvalidEventsResult} */
629
+ static InvalidEventsResult() {
344
630
  return Joi.object({
345
631
  event_name: Joi.string().allow(""),
346
632
  event_type: Joi.string().allow(""),
@@ -408,8 +694,8 @@ class WebhookPartnerModel {
408
694
  });
409
695
  }
410
696
 
411
- /** @returns {HistoryResponse} */
412
- static HistoryResponse() {
697
+ /** @returns {HistoryResult} */
698
+ static HistoryResult() {
413
699
  return Joi.object({
414
700
  items: Joi.array().items(WebhookPartnerModel.HistoryItems()),
415
701
  page: WebhookPartnerModel.Page(),
@@ -426,24 +712,24 @@ class WebhookPartnerModel {
426
712
  });
427
713
  }
428
714
 
429
- /** @returns {CancelDownloadResponse} */
430
- static CancelDownloadResponse() {
715
+ /** @returns {CancelDownloadResult} */
716
+ static CancelDownloadResult() {
431
717
  return Joi.object({
432
718
  message: Joi.string().allow(""),
433
719
  result: Joi.string().allow(""),
434
720
  });
435
721
  }
436
722
 
437
- /** @returns {FilterReportResponse} */
438
- static FilterReportResponse() {
723
+ /** @returns {FilterReportResult} */
724
+ static FilterReportResult() {
439
725
  return Joi.object({
440
726
  filter_name: Joi.string().allow(""),
441
727
  values: Joi.array().items(Joi.object().pattern(/\S/, Joi.any())),
442
728
  });
443
729
  }
444
730
 
445
- /** @returns {DeliveryTsResponse} */
446
- static DeliveryTsResponse() {
731
+ /** @returns {DeliveryTsResult} */
732
+ static DeliveryTsResult() {
447
733
  return Joi.object({
448
734
  delivery_ts: Joi.array().items(WebhookPartnerModel.DeliveryTsSchema()),
449
735
  });
@@ -459,8 +745,8 @@ class WebhookPartnerModel {
459
745
  });
460
746
  }
461
747
 
462
- /** @returns {DeliveryDetailsRequest} */
463
- static DeliveryDetailsRequest() {
748
+ /** @returns {DeliveryDetailsPayload} */
749
+ static DeliveryDetailsPayload() {
464
750
  return Joi.object({
465
751
  company_id: Joi.string().allow(""),
466
752
  page_no: Joi.number(),
@@ -482,8 +768,8 @@ class WebhookPartnerModel {
482
768
  });
483
769
  }
484
770
 
485
- /** @returns {DeliveryDetailsResponse} */
486
- static DeliveryDetailsResponse() {
771
+ /** @returns {DeliveryDetailsResult} */
772
+ static DeliveryDetailsResult() {
487
773
  return Joi.object({
488
774
  rows: Joi.array().items(WebhookPartnerModel.EventProcessReportObject()),
489
775
  page: WebhookPartnerModel.Page(),
@@ -518,6 +804,7 @@ class WebhookPartnerModel {
518
804
  current: Joi.number(),
519
805
  type: Joi.string().allow("").required(),
520
806
  size: Joi.number(),
807
+ page_size: Joi.number(),
521
808
  });
522
809
  }
523
810
 
@@ -534,8 +821,28 @@ class WebhookPartnerModel {
534
821
  });
535
822
  }
536
823
 
537
- /** @returns {DeliverySummaryResponse} */
538
- static DeliverySummaryResponse() {
824
+ /** @returns {ResponseTimeTs} */
825
+ static ResponseTimeTs() {
826
+ return Joi.object({
827
+ avg_response_time_ts: Joi.array().items(
828
+ WebhookPartnerModel.AvgResponseTime()
829
+ ),
830
+ });
831
+ }
832
+
833
+ /** @returns {AvgResponseTime} */
834
+ static AvgResponseTime() {
835
+ return Joi.object({
836
+ last_attempted_on: Joi.string().allow(""),
837
+ response_code: Joi.number(),
838
+ response_time: Joi.string().allow(""),
839
+ attempt: Joi.number(),
840
+ total: Joi.number(),
841
+ });
842
+ }
843
+
844
+ /** @returns {DeliverySummaryResult} */
845
+ static DeliverySummaryResult() {
539
846
  return Joi.object({
540
847
  delivery_event_level: Joi.array().items(
541
848
  WebhookPartnerModel.DeliveryEventLevelSchema()
@@ -562,8 +869,9 @@ class WebhookPartnerModel {
562
869
  name: Joi.string().allow(""),
563
870
  webhook_url: Joi.string().allow(""),
564
871
  provider: Joi.string().allow(""),
872
+ source: Joi.string().allow("").allow(null),
565
873
  association: WebhookPartnerModel.Association(),
566
- custom_headers: Joi.any(),
874
+ custom_headers: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
567
875
  status: Joi.string().allow(""),
568
876
  email_id: Joi.string().allow(""),
569
877
  updated_on: Joi.string().allow(""),
@@ -571,7 +879,7 @@ class WebhookPartnerModel {
571
879
  type: Joi.string().allow("").allow(null),
572
880
  auth_meta: WebhookPartnerModel.AuthMeta(),
573
881
  event_configs: Joi.array().items(
574
- WebhookPartnerModel.EventConfigResponse()
882
+ WebhookPartnerModel.EventConfigDetails()
575
883
  ),
576
884
  event_id: Joi.array().items(Joi.number()),
577
885
  });