@gofynd/fdk-client-javascript 1.2.0 → 1.3.1-beta.1

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 (262) hide show
  1. package/README.md +44 -7
  2. package/package.json +1 -2
  3. package/sdk/application/ApplicationAPIClient.d.ts +3 -3
  4. package/sdk/application/ApplicationAPIClient.js +6 -4
  5. package/sdk/application/ApplicationClient.d.ts +2 -3
  6. package/sdk/application/ApplicationClient.js +1 -45
  7. package/sdk/application/ApplicationConfig.d.ts +46 -6
  8. package/sdk/application/ApplicationConfig.js +15 -16
  9. package/sdk/application/Cart/CartApplicationClient.d.ts +61 -33
  10. package/sdk/application/Cart/CartApplicationClient.js +225 -134
  11. package/sdk/application/Cart/CartApplicationModel.d.ts +6 -4
  12. package/sdk/application/Cart/CartApplicationModel.js +6 -4
  13. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +61 -30
  14. package/sdk/application/Catalog/CatalogApplicationClient.js +234 -146
  15. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +115 -13
  16. package/sdk/application/Catalog/CatalogApplicationModel.js +77 -12
  17. package/sdk/application/Common/CommonApplicationClient.d.ts +5 -3
  18. package/sdk/application/Common/CommonApplicationClient.js +13 -11
  19. package/sdk/application/Common/CommonApplicationModel.d.ts +3 -83
  20. package/sdk/application/Common/CommonApplicationModel.js +2 -58
  21. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +9 -3
  22. package/sdk/application/Communication/CommunicationApplicationClient.js +25 -13
  23. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +1 -34
  24. package/sdk/application/Communication/CommunicationApplicationModel.js +0 -36
  25. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +46 -16
  26. package/sdk/application/Configuration/ConfigurationApplicationClient.js +144 -68
  27. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +1 -219
  28. package/sdk/application/Configuration/ConfigurationApplicationModel.js +0 -226
  29. package/sdk/application/Content/ContentApplicationClient.d.ts +49 -21
  30. package/sdk/application/Content/ContentApplicationClient.js +159 -80
  31. package/sdk/application/Content/ContentApplicationModel.d.ts +5 -622
  32. package/sdk/application/Content/ContentApplicationModel.js +11 -763
  33. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +6 -3
  34. package/sdk/application/FileStorage/FileStorageApplicationClient.js +20 -14
  35. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +1 -152
  36. package/sdk/application/FileStorage/FileStorageApplicationModel.js +0 -180
  37. package/sdk/application/Lead/LeadApplicationClient.d.ts +14 -7
  38. package/sdk/application/Lead/LeadApplicationClient.js +50 -31
  39. package/sdk/application/Lead/LeadApplicationModel.d.ts +22 -741
  40. package/sdk/application/Lead/LeadApplicationModel.js +21 -481
  41. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +11 -5
  42. package/sdk/application/Logistic/LogisticApplicationClient.js +41 -20
  43. package/sdk/application/Order/OrderApplicationClient.d.ts +24 -12
  44. package/sdk/application/Order/OrderApplicationClient.js +88 -56
  45. package/sdk/application/Payment/PaymentApplicationClient.d.ts +91 -42
  46. package/sdk/application/Payment/PaymentApplicationClient.js +293 -194
  47. package/sdk/application/Payment/PaymentApplicationModel.d.ts +36 -36
  48. package/sdk/application/Payment/PaymentApplicationModel.js +36 -36
  49. package/sdk/application/PosCart/PosCartApplicationClient.d.ts +59 -32
  50. package/sdk/application/PosCart/PosCartApplicationClient.js +214 -130
  51. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +2 -2
  52. package/sdk/application/PosCart/PosCartApplicationModel.js +2 -2
  53. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +16 -7
  54. package/sdk/application/Rewards/RewardsApplicationClient.js +56 -29
  55. package/sdk/application/Share/ShareApplicationClient.d.ts +15 -7
  56. package/sdk/application/Share/ShareApplicationClient.js +51 -31
  57. package/sdk/application/Share/ShareApplicationModel.d.ts +1 -33
  58. package/sdk/application/Share/ShareApplicationModel.js +0 -38
  59. package/sdk/application/Theme/ThemeApplicationClient.d.ts +9 -4
  60. package/sdk/application/Theme/ThemeApplicationClient.js +35 -18
  61. package/sdk/application/Theme/ThemeApplicationModel.d.ts +982 -312
  62. package/sdk/application/Theme/ThemeApplicationModel.js +621 -284
  63. package/sdk/application/User/UserApplicationClient.d.ts +74 -35
  64. package/sdk/application/User/UserApplicationClient.js +252 -161
  65. package/sdk/application/User/UserApplicationModel.d.ts +3 -401
  66. package/sdk/application/User/UserApplicationModel.js +2 -490
  67. package/sdk/common/AxiosHelper.js +1 -2
  68. package/sdk/common/FDKError.d.ts +3 -0
  69. package/sdk/common/FDKError.js +8 -0
  70. package/sdk/common/utils.d.ts +3 -0
  71. package/sdk/common/utils.js +29 -0
  72. package/sdk/partner/PartnerAPIClient.d.ts +5 -4
  73. package/sdk/partner/PartnerAPIClient.js +7 -4
  74. package/sdk/partner/PartnerClient.d.ts +2 -0
  75. package/sdk/partner/PartnerClient.js +3 -0
  76. package/sdk/partner/Theme/ThemePartnerClient.d.ts +299 -0
  77. package/sdk/partner/Theme/ThemePartnerClient.js +768 -0
  78. package/sdk/partner/Theme/ThemePartnerModel.d.ts +1706 -0
  79. package/sdk/partner/Theme/ThemePartnerModel.js +1409 -0
  80. package/sdk/partner/Theme/ThemePartnerValidator.d.ts +22 -0
  81. package/sdk/partner/Theme/ThemePartnerValidator.js +157 -0
  82. package/sdk/partner/index.d.ts +3 -1
  83. package/sdk/partner/index.js +3 -1
  84. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +8 -4
  85. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +38 -16
  86. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +1 -13
  87. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +0 -12
  88. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +10 -0
  89. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +4 -0
  90. package/sdk/platform/Billing/BillingPlatformClient.d.ts +59 -14
  91. package/sdk/platform/Billing/BillingPlatformClient.js +315 -64
  92. package/sdk/platform/Billing/BillingPlatformModel.d.ts +56 -196
  93. package/sdk/platform/Billing/BillingPlatformModel.js +63 -217
  94. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +23 -1
  95. package/sdk/platform/Billing/BillingPlatformValidator.js +31 -0
  96. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +124 -63
  97. package/sdk/platform/Cart/CartPlatformApplicationClient.js +431 -265
  98. package/sdk/platform/Cart/CartPlatformModel.d.ts +253 -53
  99. package/sdk/platform/Cart/CartPlatformModel.js +104 -54
  100. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +120 -53
  101. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +398 -247
  102. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +155 -78
  103. package/sdk/platform/Catalog/CatalogPlatformClient.js +561 -355
  104. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +10 -12
  105. package/sdk/platform/Catalog/CatalogPlatformModel.js +10 -12
  106. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +30 -0
  107. package/sdk/platform/Catalog/CatalogPlatformValidator.js +13 -0
  108. package/sdk/platform/Common/CommonPlatformClient.d.ts +5 -3
  109. package/sdk/platform/Common/CommonPlatformClient.js +13 -11
  110. package/sdk/platform/Common/CommonPlatformModel.d.ts +39 -64
  111. package/sdk/platform/Common/CommonPlatformModel.js +23 -57
  112. package/sdk/platform/Common/CommonPlatformValidator.d.ts +5 -10
  113. package/sdk/platform/Common/CommonPlatformValidator.js +3 -4
  114. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +370 -120
  115. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +2328 -888
  116. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +143 -24
  117. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +179 -15
  118. package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +2 -1
  119. package/sdk/platform/Communication/CommunicationPlatformClient.js +6 -5
  120. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +386 -308
  121. package/sdk/platform/Communication/CommunicationPlatformModel.js +415 -355
  122. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +38 -13
  123. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +171 -57
  124. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +53 -1
  125. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +54 -0
  126. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +5 -1
  127. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +7 -0
  128. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +96 -29
  129. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +311 -126
  130. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +5 -1
  131. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +7 -0
  132. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +36 -18
  133. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +121 -86
  134. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +13 -180
  135. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +5 -113
  136. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +162 -70
  137. package/sdk/platform/Content/ContentPlatformApplicationClient.js +528 -309
  138. package/sdk/platform/Content/ContentPlatformModel.d.ts +9 -198
  139. package/sdk/platform/Content/ContentPlatformModel.js +8 -231
  140. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +48 -11
  141. package/sdk/platform/Discount/DiscountPlatformClient.js +142 -48
  142. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +40 -1
  143. package/sdk/platform/Discount/DiscountPlatformModel.js +27 -0
  144. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +84 -18
  145. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +486 -53
  146. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +71 -7
  147. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +81 -5
  148. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +13 -18
  149. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +58 -65
  150. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +198 -71
  151. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +212 -64
  152. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +18 -10
  153. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +11 -6
  154. package/sdk/platform/Finance/FinancePlatformClient.d.ts +177 -40
  155. package/sdk/platform/Finance/FinancePlatformClient.js +1028 -132
  156. package/sdk/platform/Finance/FinancePlatformModel.d.ts +670 -22
  157. package/sdk/platform/Finance/FinancePlatformModel.js +809 -23
  158. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +111 -1
  159. package/sdk/platform/Finance/FinancePlatformValidator.js +134 -0
  160. package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +24 -12
  161. package/sdk/platform/Inventory/InventoryPlatformClient.js +94 -52
  162. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +27 -13
  163. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +101 -55
  164. package/sdk/platform/Lead/LeadPlatformClient.d.ts +50 -39
  165. package/sdk/platform/Lead/LeadPlatformClient.js +171 -112
  166. package/sdk/platform/Lead/LeadPlatformModel.d.ts +32 -390
  167. package/sdk/platform/Lead/LeadPlatformModel.js +31 -214
  168. package/sdk/platform/Lead/LeadPlatformValidator.d.ts +33 -33
  169. package/sdk/platform/Lead/LeadPlatformValidator.js +23 -23
  170. package/sdk/platform/OAuthClient.js +6 -2
  171. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +4 -2
  172. package/sdk/platform/Order/OrderPlatformApplicationClient.js +12 -10
  173. package/sdk/platform/Order/OrderPlatformClient.d.ts +165 -71
  174. package/sdk/platform/Order/OrderPlatformClient.js +738 -205
  175. package/sdk/platform/Order/OrderPlatformModel.d.ts +261 -3
  176. package/sdk/platform/Order/OrderPlatformModel.js +225 -2
  177. package/sdk/platform/Order/OrderPlatformValidator.d.ts +104 -3
  178. package/sdk/platform/Order/OrderPlatformValidator.js +85 -2
  179. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -22
  180. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +12 -159
  181. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +1 -30
  182. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +0 -26
  183. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +1 -690
  184. package/sdk/platform/Partner/PartnerPlatformModel.js +0 -809
  185. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +167 -32
  186. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +793 -145
  187. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +91 -1
  188. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +91 -0
  189. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +20 -10
  190. package/sdk/platform/Payment/PaymentPlatformClient.js +68 -47
  191. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +549 -7
  192. package/sdk/platform/Payment/PaymentPlatformModel.js +305 -6
  193. package/sdk/platform/PlatformAPIClient.d.ts +3 -3
  194. package/sdk/platform/PlatformAPIClient.js +2 -2
  195. package/sdk/platform/PlatformClient.d.ts +2 -2
  196. package/sdk/platform/PlatformClient.js +4 -4
  197. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +28 -12
  198. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +90 -53
  199. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +1 -12
  200. package/sdk/platform/Rewards/RewardsPlatformModel.js +0 -14
  201. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +62 -26
  202. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +210 -93
  203. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +20 -11
  204. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +23 -11
  205. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +36 -18
  206. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +142 -78
  207. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +12 -3
  208. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +14 -2
  209. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +10 -26
  210. package/sdk/platform/Share/SharePlatformApplicationClient.js +36 -67
  211. package/sdk/platform/Share/SharePlatformModel.d.ts +4 -4
  212. package/sdk/platform/Share/SharePlatformModel.js +4 -4
  213. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +127 -57
  214. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +564 -189
  215. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +63 -26
  216. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +62 -22
  217. package/sdk/platform/Theme/ThemePlatformClient.d.ts +37 -0
  218. package/sdk/platform/Theme/ThemePlatformClient.js +235 -0
  219. package/sdk/platform/Theme/ThemePlatformModel.d.ts +1167 -261
  220. package/sdk/platform/Theme/ThemePlatformModel.js +801 -244
  221. package/sdk/platform/Theme/ThemePlatformValidator.d.ts +32 -0
  222. package/sdk/platform/Theme/ThemePlatformValidator.js +38 -0
  223. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +35 -17
  224. package/sdk/platform/User/UserPlatformApplicationClient.js +132 -73
  225. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +7 -0
  226. package/sdk/platform/User/UserPlatformApplicationValidator.js +3 -0
  227. package/sdk/platform/User/UserPlatformModel.d.ts +1 -738
  228. package/sdk/platform/User/UserPlatformModel.js +3 -899
  229. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +120 -7
  230. package/sdk/platform/Webhook/WebhookPlatformClient.js +799 -41
  231. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +476 -86
  232. package/sdk/platform/Webhook/WebhookPlatformModel.js +388 -89
  233. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +90 -7
  234. package/sdk/platform/Webhook/WebhookPlatformValidator.js +113 -3
  235. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +5 -3
  236. package/sdk/public/Configuration/ConfigurationPublicClient.js +13 -11
  237. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +3 -106
  238. package/sdk/public/Configuration/ConfigurationPublicModel.js +2 -59
  239. package/sdk/public/Inventory/InventoryPublicClient.d.ts +12 -6
  240. package/sdk/public/Inventory/InventoryPublicClient.js +42 -27
  241. package/sdk/public/Partner/PartnerPublicClient.d.ts +22 -0
  242. package/sdk/public/Partner/PartnerPublicClient.js +110 -0
  243. package/sdk/public/Partner/PartnerPublicModel.d.ts +240 -0
  244. package/sdk/public/Partner/PartnerPublicModel.js +280 -0
  245. package/sdk/public/Partner/PartnerPublicValidator.d.ts +18 -0
  246. package/sdk/public/Partner/PartnerPublicValidator.js +19 -0
  247. package/sdk/public/PublicAPIClient.d.ts +14 -1
  248. package/sdk/public/PublicAPIClient.js +7 -1
  249. package/sdk/public/PublicClient.d.ts +2 -0
  250. package/sdk/public/PublicClient.js +4 -0
  251. package/sdk/public/Webhook/WebhookPublicClient.d.ts +5 -2
  252. package/sdk/public/Webhook/WebhookPublicClient.js +15 -9
  253. package/sdk/public/Webhook/WebhookPublicModel.d.ts +1 -191
  254. package/sdk/public/Webhook/WebhookPublicModel.js +0 -229
  255. package/sdk/public/index.d.ts +1 -0
  256. package/sdk/public/index.js +2 -0
  257. package/sdk/application/ApplicationModels.d.ts +0 -48
  258. package/sdk/application/ApplicationModels.js +0 -38
  259. package/sdk/platform/Partner/PartnerPlatformClient.d.ts +0 -106
  260. package/sdk/platform/Partner/PartnerPlatformClient.js +0 -878
  261. package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +0 -208
  262. package/sdk/platform/Partner/PartnerPlatformValidator.js +0 -169
@@ -8,12 +8,40 @@ const Joi = require("joi");
8
8
  * @property {string} [extension_id]
9
9
  */
10
10
 
11
+ /**
12
+ * @typedef AssociationDetails
13
+ * @property {number} [company_id]
14
+ */
15
+
11
16
  /**
12
17
  * @typedef AuthMeta
13
18
  * @property {string} [secret]
14
19
  * @property {string} [type]
15
20
  */
16
21
 
22
+ /**
23
+ * @typedef CancelResponse
24
+ * @property {number} [code] - The HTTP status code of the response (e.g., 200).
25
+ */
26
+
27
+ /**
28
+ * @typedef CdnObject
29
+ * @property {Url[]} [urls]
30
+ */
31
+
32
+ /**
33
+ * @typedef Error
34
+ * @property {string} [error] - Error message describing the reason for the failure.
35
+ */
36
+
37
+ /**
38
+ * @typedef Event
39
+ * @property {string} [event_category]
40
+ * @property {string} [event_name]
41
+ * @property {string} [event_type]
42
+ * @property {string} [version]
43
+ */
44
+
17
45
  /**
18
46
  * @typedef EventConfig
19
47
  * @property {string} [created_on]
@@ -27,45 +55,117 @@ const Joi = require("joi");
27
55
  */
28
56
 
29
57
  /**
30
- * @typedef EventConfigBase
31
- * @property {string} [event_category]
32
- * @property {string} [event_name]
33
- * @property {string} [event_type]
34
- * @property {string} [version]
58
+ * @typedef EventConfigResponse
59
+ * @property {EventConfig[]} [event_configs]
35
60
  */
36
61
 
37
62
  /**
38
- * @typedef EventConfigList
39
- * @property {EventConfig[]} [items]
63
+ * @typedef EventCountItem
64
+ * @property {number} [count] - The count of events with the specified status
65
+ * @property {string} [status] - The status of the event (e.g., "FAILED").
66
+ */
67
+
68
+ /**
69
+ * @typedef EventProcessedSuccessResponse
70
+ * @property {string} [message]
71
+ * @property {boolean} [success]
72
+ */
73
+
74
+ /**
75
+ * @typedef EventProcessReportObject
76
+ * @property {number} [attempt] - The attempt number of the event.
77
+ * @property {string} [data] - The data associated with the event.
78
+ * @property {string} [event_name] - The name of the processed event.
79
+ * @property {number} [last_attempted_on] - The timestamp of the last attempted event.
80
+ * @property {string} [name] - The name of the event.
81
+ * @property {number} [response_code] - The response code of the event.
82
+ * @property {string} [response_message] - The response message of the event.
83
+ * @property {number} [response_time] - The response time of the event.
84
+ * @property {string} [status] - The status of the event (e.g., "FAILED").
85
+ * @property {string} [webhook_url] - The webhook URL associated with the event.
86
+ */
87
+
88
+ /**
89
+ * @typedef EventProcessReports
40
90
  * @property {Page} [page]
91
+ * @property {EventProcessReportObject[]} [rows]
41
92
  */
42
93
 
43
94
  /**
44
- * @typedef EventConfigResponse
45
- * @property {EventConfig[]} [event_configs]
95
+ * @typedef EventProcessRequest
96
+ * @property {string} [end_date]
97
+ * @property {Event[]} [event]
98
+ * @property {string} [search_text]
99
+ * @property {string} [start_date]
100
+ * @property {number[]} [subscriber_ids]
46
101
  */
47
102
 
48
103
  /**
49
- * @typedef EventPayload
50
- * @property {string} [event_name]
51
- * @property {string} [event_trace_id]
52
- * @property {string} [event_type]
53
- * @property {number} [id]
54
- * @property {string} [message_id]
55
- * @property {boolean} [status]
56
- * @property {string} [version]
104
+ * @typedef EventSuccessResponse
105
+ * @property {string} [message]
106
+ * @property {boolean} [success]
57
107
  */
58
108
 
59
109
  /**
60
- * @typedef EventProcessedStatus
61
- * @property {number} [attempt]
62
- * @property {string} [created_on]
63
- * @property {number} [id]
64
- * @property {string} [processed_on]
65
- * @property {string} [response_code]
66
- * @property {string} [response_message]
67
- * @property {boolean} [status]
68
- * @property {string} [subscriber_id]
110
+ * @typedef FailedEventsCountSuccessResponse
111
+ * @property {EventCountItem[]} [items]
112
+ */
113
+
114
+ /**
115
+ * @typedef FilterResponseObject
116
+ * @property {string} [filter_name] - The name of the filter.
117
+ * @property {FilterValues[]} [values]
118
+ */
119
+
120
+ /**
121
+ * @typedef FilterValues
122
+ * @property {string} [text] - The display text for the filter value.
123
+ * @property {Object} [value] - The value associated with the filter value.
124
+ */
125
+
126
+ /**
127
+ * @typedef HistoryFilters
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 {string} [status] - The status of the history report (e.g., "FAILED").
131
+ * @property {number[]} [subscribers] - An array of subscriber IDs associated
132
+ * with the history report.
133
+ */
134
+
135
+ /**
136
+ * @typedef HistoryPayload
137
+ * @property {number} [page_no] - The page number of the history report.
138
+ * @property {number} [page_size] - The number of records per page.
139
+ * @property {string} [type] - The type of history report (e.g., "platform").
140
+ */
141
+
142
+ /**
143
+ * @typedef HistoryResponse
144
+ * @property {HistoryResponseObject[]} [items]
145
+ */
146
+
147
+ /**
148
+ * @typedef HistoryResponseObject
149
+ * @property {AssociationDetails} [association]
150
+ * @property {string} [created_on] - The date and time when the history report
151
+ * was created.
152
+ * @property {string} [filename] - The filename of the history report.
153
+ * @property {HistoryFilters} [filters]
154
+ * @property {number} [id] - The ID of the history report.
155
+ * @property {string} [message] - A message related to the history report.
156
+ * @property {string} [status] - The status of the history report (e.g., "COMPLETED").
157
+ * @property {string} [updated_on] - The date and time when the history report
158
+ * was last updated.
159
+ * @property {UploadServiceObject} [upload_service_response]
160
+ */
161
+
162
+ /**
163
+ * @typedef ManualRetryFailedResponse
164
+ * @property {string} [message]
165
+ * @property {Object} [meta]
166
+ * @property {string} [request_id]
167
+ * @property {string} [stack_trace]
168
+ * @property {boolean} [success]
69
169
  */
70
170
 
71
171
  /**
@@ -79,6 +179,41 @@ const Joi = require("joi");
79
179
  * @property {string} type
80
180
  */
81
181
 
182
+ /**
183
+ * @typedef PingWebhook
184
+ * @property {Object} [auth_meta] - Authentication metadata (if required by the
185
+ * subscriber).
186
+ * @property {Object} [custom_headers] - Custom headers to include in the ping request.
187
+ * @property {string} [webhook_url] - The URL of the subscriber's webhook to ping.
188
+ */
189
+
190
+ /**
191
+ * @typedef PingWebhookResponse
192
+ * @property {number} [code] - The HTTP status code of the ping response (e.g., 200).
193
+ * @property {string} [message] - An optional message related to the ping.
194
+ * @property {string} [status] - The status of the ping (e.g., "SUCCESS").
195
+ */
196
+
197
+ /**
198
+ * @typedef ReportFilterResponse
199
+ * @property {FilterResponseObject[]} [items]
200
+ */
201
+
202
+ /**
203
+ * @typedef ReportFiltersPayload
204
+ * @property {number[]} [subscriber_ids] - An array of subscriber IDs for
205
+ * filtering filters (optional).
206
+ */
207
+
208
+ /**
209
+ * @typedef RetryStatusResponse
210
+ * @property {number} [failure_count] - The count of failed retry attempts.
211
+ * @property {string} [status] - The overall status of the retry process (e.g.,
212
+ * "completed").
213
+ * @property {number} [success_count] - The count of successfully retried events.
214
+ * @property {number} [total_event] - The total number of events that require retry.
215
+ */
216
+
82
217
  /**
83
218
  * @typedef SubscriberConfig
84
219
  * @property {Association} [association]
@@ -88,7 +223,9 @@ const Joi = require("joi");
88
223
  * @property {number[]} [event_id]
89
224
  * @property {number} [id]
90
225
  * @property {string} [name]
91
- * @property {SubscriberStatus} [status]
226
+ * @property {string} [status] - Active: Status is active inactive: Status is
227
+ * inactive blocked: Subscriber is blocked by system due to multiple failed
228
+ * delivery attempts.
92
229
  * @property {string} [webhook_url]
93
230
  */
94
231
 
@@ -98,14 +235,6 @@ const Joi = require("joi");
98
235
  * @property {Page} [page]
99
236
  */
100
237
 
101
- /**
102
- * @typedef SubscriberEvent
103
- * @property {string} [created_date]
104
- * @property {number} [event_id]
105
- * @property {number} [id]
106
- * @property {number} [subscriber_id]
107
- */
108
-
109
238
  /**
110
239
  * @typedef SubscriberResponse
111
240
  * @property {Association} [association]
@@ -116,12 +245,23 @@ const Joi = require("joi");
116
245
  * @property {EventConfig[]} [event_configs]
117
246
  * @property {number} [id]
118
247
  * @property {string} [name]
119
- * @property {SubscriberStatus} [status]
248
+ * @property {string} [status] - Active: Status is active inactive: Status is
249
+ * inactive blocked: Subscriber is blocked by system due to multiple failed
250
+ * delivery attempts.
120
251
  * @property {string} [updated_on]
121
252
  * @property {string} [webhook_url]
122
253
  */
123
254
 
124
- /** @typedef {"active" | "inactive" | "blocked"} SubscriberStatus */
255
+ /**
256
+ * @typedef UploadServiceObject
257
+ * @property {CdnObject} [cdn]
258
+ */
259
+
260
+ /**
261
+ * @typedef Url
262
+ * @property {string} [name] - The name of the uploaded report file.
263
+ * @property {string} [url] - The URL of the uploaded report file.
264
+ */
125
265
 
126
266
  class WebhookPlatformModel {
127
267
  /** @returns {Association} */
@@ -134,6 +274,13 @@ class WebhookPlatformModel {
134
274
  });
135
275
  }
136
276
 
277
+ /** @returns {AssociationDetails} */
278
+ static AssociationDetails() {
279
+ return Joi.object({
280
+ company_id: Joi.number(),
281
+ });
282
+ }
283
+
137
284
  /** @returns {AuthMeta} */
138
285
  static AuthMeta() {
139
286
  return Joi.object({
@@ -142,6 +289,37 @@ class WebhookPlatformModel {
142
289
  });
143
290
  }
144
291
 
292
+ /** @returns {CancelResponse} */
293
+ static CancelResponse() {
294
+ return Joi.object({
295
+ code: Joi.number(),
296
+ });
297
+ }
298
+
299
+ /** @returns {CdnObject} */
300
+ static CdnObject() {
301
+ return Joi.object({
302
+ urls: Joi.array().items(WebhookPlatformModel.Url()),
303
+ });
304
+ }
305
+
306
+ /** @returns {Error} */
307
+ static Error() {
308
+ return Joi.object({
309
+ error: Joi.string().allow(""),
310
+ });
311
+ }
312
+
313
+ /** @returns {Event} */
314
+ static Event() {
315
+ return Joi.object({
316
+ event_category: Joi.string().allow(""),
317
+ event_name: Joi.string().allow(""),
318
+ event_type: Joi.string().allow(""),
319
+ version: Joi.string().allow(""),
320
+ });
321
+ }
322
+
145
323
  /** @returns {EventConfig} */
146
324
  static EventConfig() {
147
325
  return Joi.object({
@@ -156,55 +334,144 @@ class WebhookPlatformModel {
156
334
  });
157
335
  }
158
336
 
159
- /** @returns {EventConfigBase} */
160
- static EventConfigBase() {
337
+ /** @returns {EventConfigResponse} */
338
+ static EventConfigResponse() {
161
339
  return Joi.object({
162
- event_category: Joi.string().allow(""),
340
+ event_configs: Joi.array().items(WebhookPlatformModel.EventConfig()),
341
+ });
342
+ }
343
+
344
+ /** @returns {EventCountItem} */
345
+ static EventCountItem() {
346
+ return Joi.object({
347
+ count: Joi.number(),
348
+ status: Joi.string().allow(""),
349
+ });
350
+ }
351
+
352
+ /** @returns {EventProcessedSuccessResponse} */
353
+ static EventProcessedSuccessResponse() {
354
+ return Joi.object({
355
+ message: Joi.string().allow(""),
356
+ success: Joi.boolean(),
357
+ });
358
+ }
359
+
360
+ /** @returns {EventProcessReportObject} */
361
+ static EventProcessReportObject() {
362
+ return Joi.object({
363
+ attempt: Joi.number(),
364
+ data: Joi.string().allow(""),
163
365
  event_name: Joi.string().allow(""),
164
- event_type: Joi.string().allow(""),
165
- version: Joi.string().allow(""),
366
+ last_attempted_on: Joi.number(),
367
+ name: Joi.string().allow(""),
368
+ response_code: Joi.number(),
369
+ response_message: Joi.string().allow(""),
370
+ response_time: Joi.number(),
371
+ status: Joi.string().allow(""),
372
+ webhook_url: Joi.string().allow(""),
166
373
  });
167
374
  }
168
375
 
169
- /** @returns {EventConfigList} */
170
- static EventConfigList() {
376
+ /** @returns {EventProcessReports} */
377
+ static EventProcessReports() {
171
378
  return Joi.object({
172
- items: Joi.array().items(WebhookPlatformModel.EventConfig()),
173
379
  page: WebhookPlatformModel.Page(),
380
+ rows: Joi.array().items(WebhookPlatformModel.EventProcessReportObject()),
174
381
  });
175
382
  }
176
383
 
177
- /** @returns {EventConfigResponse} */
178
- static EventConfigResponse() {
384
+ /** @returns {EventProcessRequest} */
385
+ static EventProcessRequest() {
179
386
  return Joi.object({
180
- event_configs: Joi.array().items(WebhookPlatformModel.EventConfig()),
387
+ end_date: Joi.string().allow(""),
388
+ event: Joi.array().items(WebhookPlatformModel.Event()),
389
+ search_text: Joi.string().allow(""),
390
+ start_date: Joi.string().allow(""),
391
+ subscriber_ids: Joi.array().items(Joi.number()),
181
392
  });
182
393
  }
183
394
 
184
- /** @returns {EventPayload} */
185
- static EventPayload() {
395
+ /** @returns {EventSuccessResponse} */
396
+ static EventSuccessResponse() {
186
397
  return Joi.object({
187
- event_name: Joi.string().allow(""),
188
- event_trace_id: Joi.string().allow(""),
189
- event_type: Joi.string().allow(""),
190
- id: Joi.number(),
191
- message_id: Joi.string().allow(""),
192
- status: Joi.boolean(),
193
- version: Joi.string().allow(""),
398
+ message: Joi.string().allow(""),
399
+ success: Joi.boolean(),
194
400
  });
195
401
  }
196
402
 
197
- /** @returns {EventProcessedStatus} */
198
- static EventProcessedStatus() {
403
+ /** @returns {FailedEventsCountSuccessResponse} */
404
+ static FailedEventsCountSuccessResponse() {
199
405
  return Joi.object({
200
- attempt: Joi.number(),
406
+ items: Joi.array().items(WebhookPlatformModel.EventCountItem()),
407
+ });
408
+ }
409
+
410
+ /** @returns {FilterResponseObject} */
411
+ static FilterResponseObject() {
412
+ return Joi.object({
413
+ filter_name: Joi.string().allow(""),
414
+ values: Joi.array().items(WebhookPlatformModel.FilterValues()),
415
+ });
416
+ }
417
+
418
+ /** @returns {FilterValues} */
419
+ static FilterValues() {
420
+ return Joi.object({
421
+ text: Joi.string().allow(""),
422
+ value: Joi.any(),
423
+ });
424
+ }
425
+
426
+ /** @returns {HistoryFilters} */
427
+ static HistoryFilters() {
428
+ return Joi.object({
429
+ end_date: Joi.string().allow(""),
430
+ start_date: Joi.string().allow(""),
431
+ status: Joi.string().allow(""),
432
+ subscribers: Joi.array().items(Joi.number()),
433
+ });
434
+ }
435
+
436
+ /** @returns {HistoryPayload} */
437
+ static HistoryPayload() {
438
+ return Joi.object({
439
+ page_no: Joi.number(),
440
+ page_size: Joi.number(),
441
+ type: Joi.string().allow(""),
442
+ });
443
+ }
444
+
445
+ /** @returns {HistoryResponse} */
446
+ static HistoryResponse() {
447
+ return Joi.object({
448
+ items: Joi.array().items(WebhookPlatformModel.HistoryResponseObject()),
449
+ });
450
+ }
451
+
452
+ /** @returns {HistoryResponseObject} */
453
+ static HistoryResponseObject() {
454
+ return Joi.object({
455
+ association: WebhookPlatformModel.AssociationDetails(),
201
456
  created_on: Joi.string().allow(""),
457
+ filename: Joi.string().allow(""),
458
+ filters: WebhookPlatformModel.HistoryFilters(),
202
459
  id: Joi.number(),
203
- processed_on: Joi.string().allow(""),
204
- response_code: Joi.string().allow(""),
205
- response_message: Joi.string().allow(""),
206
- status: Joi.boolean(),
207
- subscriber_id: Joi.string().allow(""),
460
+ message: Joi.string().allow(""),
461
+ status: Joi.string().allow(""),
462
+ updated_on: Joi.string().allow(""),
463
+ upload_service_response: WebhookPlatformModel.UploadServiceObject(),
464
+ });
465
+ }
466
+
467
+ /** @returns {ManualRetryFailedResponse} */
468
+ static ManualRetryFailedResponse() {
469
+ return Joi.object({
470
+ message: Joi.string().allow(""),
471
+ meta: Joi.any(),
472
+ request_id: Joi.string().allow(""),
473
+ stack_trace: Joi.string().allow(""),
474
+ success: Joi.boolean(),
208
475
  });
209
476
  }
210
477
 
@@ -221,6 +488,48 @@ class WebhookPlatformModel {
221
488
  });
222
489
  }
223
490
 
491
+ /** @returns {PingWebhook} */
492
+ static PingWebhook() {
493
+ return Joi.object({
494
+ auth_meta: Joi.any(),
495
+ custom_headers: Joi.any(),
496
+ webhook_url: Joi.string().allow(""),
497
+ });
498
+ }
499
+
500
+ /** @returns {PingWebhookResponse} */
501
+ static PingWebhookResponse() {
502
+ return Joi.object({
503
+ code: Joi.number(),
504
+ message: Joi.string().allow(""),
505
+ status: Joi.string().allow(""),
506
+ });
507
+ }
508
+
509
+ /** @returns {ReportFilterResponse} */
510
+ static ReportFilterResponse() {
511
+ return Joi.object({
512
+ items: Joi.array().items(WebhookPlatformModel.FilterResponseObject()),
513
+ });
514
+ }
515
+
516
+ /** @returns {ReportFiltersPayload} */
517
+ static ReportFiltersPayload() {
518
+ return Joi.object({
519
+ subscriber_ids: Joi.array().items(Joi.number()),
520
+ });
521
+ }
522
+
523
+ /** @returns {RetryStatusResponse} */
524
+ static RetryStatusResponse() {
525
+ return Joi.object({
526
+ failure_count: Joi.number(),
527
+ status: Joi.string().allow(""),
528
+ success_count: Joi.number(),
529
+ total_event: Joi.number(),
530
+ });
531
+ }
532
+
224
533
  /** @returns {SubscriberConfig} */
225
534
  static SubscriberConfig() {
226
535
  return Joi.object({
@@ -231,7 +540,7 @@ class WebhookPlatformModel {
231
540
  event_id: Joi.array().items(Joi.number()),
232
541
  id: Joi.number(),
233
542
  name: Joi.string().allow(""),
234
- status: WebhookPlatformModel.SubscriberStatus(),
543
+ status: Joi.string().allow(""),
235
544
  webhook_url: Joi.string().allow(""),
236
545
  });
237
546
  }
@@ -244,16 +553,6 @@ class WebhookPlatformModel {
244
553
  });
245
554
  }
246
555
 
247
- /** @returns {SubscriberEvent} */
248
- static SubscriberEvent() {
249
- return Joi.object({
250
- created_date: Joi.string().allow(""),
251
- event_id: Joi.number(),
252
- id: Joi.number(),
253
- subscriber_id: Joi.number(),
254
- });
255
- }
256
-
257
556
  /** @returns {SubscriberResponse} */
258
557
  static SubscriberResponse() {
259
558
  return Joi.object({
@@ -265,25 +564,25 @@ class WebhookPlatformModel {
265
564
  event_configs: Joi.array().items(WebhookPlatformModel.EventConfig()),
266
565
  id: Joi.number(),
267
566
  name: Joi.string().allow(""),
268
- status: WebhookPlatformModel.SubscriberStatus(),
567
+ status: Joi.string().allow(""),
269
568
  updated_on: Joi.string().allow(""),
270
569
  webhook_url: Joi.string().allow(""),
271
570
  });
272
571
  }
273
572
 
274
- /**
275
- * Enum: SubscriberStatus Used By: Webhook
276
- *
277
- * @returns {SubscriberStatus}
278
- */
279
- static SubscriberStatus() {
280
- return Joi.string().valid(
281
- "active",
282
-
283
- "inactive",
573
+ /** @returns {UploadServiceObject} */
574
+ static UploadServiceObject() {
575
+ return Joi.object({
576
+ cdn: WebhookPlatformModel.CdnObject(),
577
+ });
578
+ }
284
579
 
285
- "blocked"
286
- );
580
+ /** @returns {Url} */
581
+ static Url() {
582
+ return Joi.object({
583
+ name: Joi.string().allow(""),
584
+ url: Joi.string().allow(""),
585
+ });
287
586
  }
288
587
  }
289
588
  module.exports = WebhookPlatformModel;