@gofynd/fdk-client-javascript 1.2.0 → 1.3.0

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 +4 -4
  12. package/sdk/application/Cart/CartApplicationModel.js +4 -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 +96 -9
  234. package/sdk/platform/Webhook/WebhookPlatformValidator.js +117 -5
  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
@@ -11,18 +11,472 @@ class Webhook {
11
11
  this.config = config;
12
12
  }
13
13
 
14
+ /**
15
+ * @param {WebhookPlatformValidator.CancelJobByNameParam} arg - Arg object
16
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
17
+ * @param {import("../PlatformAPIClient").Options} - Options
18
+ * @returns {Promise<WebhookPlatformModel.CancelResponse>} - Success response
19
+ * @name cancelJobByName
20
+ * @summary: Cancel a report export
21
+ * @description: Cancel the export of a specific report for a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/cancelJobByName/).
22
+ */
23
+ async cancelJobByName(
24
+ { filename, requestHeaders } = { requestHeaders: {} },
25
+ { responseHeaders } = { responseHeaders: false }
26
+ ) {
27
+ const { error } = WebhookPlatformValidator.cancelJobByName().validate(
28
+ {
29
+ filename,
30
+ },
31
+ { abortEarly: false, allowUnknown: true }
32
+ );
33
+ if (error) {
34
+ return Promise.reject(new FDKClientValidationError(error));
35
+ }
36
+
37
+ // Showing warrnings if extra unknown parameters are found
38
+ const {
39
+ error: warrning,
40
+ } = WebhookPlatformValidator.cancelJobByName().validate(
41
+ {
42
+ filename,
43
+ },
44
+ { abortEarly: false, allowUnknown: false }
45
+ );
46
+ if (warrning) {
47
+ Logger({
48
+ level: "WARN",
49
+ message: `Parameter Validation warrnings for platform > Webhook > cancelJobByName \n ${warrning}`,
50
+ });
51
+ }
52
+
53
+ const query_params = {};
54
+
55
+ const xHeaders = {};
56
+
57
+ const response = await PlatformAPIClient.execute(
58
+ this.config,
59
+ "get",
60
+ `/service/platform/webhook/v1.0/company/${this.config.companyId}/reports/cancel/file/${filename}`,
61
+ query_params,
62
+ undefined,
63
+ { ...xHeaders, ...requestHeaders },
64
+ { responseHeaders }
65
+ );
66
+
67
+ let responseData = response;
68
+ if (responseHeaders) {
69
+ responseData = response[0];
70
+ }
71
+
72
+ const {
73
+ error: res_error,
74
+ } = WebhookPlatformModel.CancelResponse().validate(responseData, {
75
+ abortEarly: false,
76
+ allowUnknown: false,
77
+ });
78
+
79
+ if (res_error) {
80
+ Logger({
81
+ level: "WARN",
82
+ message: `Response Validation Warnnings for platform > Webhook > cancelJobByName \n ${res_error}`,
83
+ });
84
+ }
85
+
86
+ return response;
87
+ }
88
+
89
+ /**
90
+ * @param {WebhookPlatformValidator.DownloadDeliveryReportParam} arg - Arg object
91
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
92
+ * @param {import("../PlatformAPIClient").Options} - Options
93
+ * @returns {Promise<Object>} - Success response
94
+ * @name downloadDeliveryReport
95
+ * @summary: Download processed events report for a company
96
+ * @description: Download reports for a specific company based on the provided filters. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/downloadDeliveryReport/).
97
+ */
98
+ async downloadDeliveryReport(
99
+ { body, requestHeaders } = { requestHeaders: {} },
100
+ { responseHeaders } = { responseHeaders: false }
101
+ ) {
102
+ const {
103
+ error,
104
+ } = WebhookPlatformValidator.downloadDeliveryReport().validate(
105
+ {
106
+ body,
107
+ },
108
+ { abortEarly: false, allowUnknown: true }
109
+ );
110
+ if (error) {
111
+ return Promise.reject(new FDKClientValidationError(error));
112
+ }
113
+
114
+ // Showing warrnings if extra unknown parameters are found
115
+ const {
116
+ error: warrning,
117
+ } = WebhookPlatformValidator.downloadDeliveryReport().validate(
118
+ {
119
+ body,
120
+ },
121
+ { abortEarly: false, allowUnknown: false }
122
+ );
123
+ if (warrning) {
124
+ Logger({
125
+ level: "WARN",
126
+ message: `Parameter Validation warrnings for platform > Webhook > downloadDeliveryReport \n ${warrning}`,
127
+ });
128
+ }
129
+
130
+ const query_params = {};
131
+
132
+ const xHeaders = {};
133
+
134
+ const response = await PlatformAPIClient.execute(
135
+ this.config,
136
+ "post",
137
+ `/service/platform/webhook/v1.0/company/${this.config.companyId}/reports/download`,
138
+ query_params,
139
+ body,
140
+ { ...xHeaders, ...requestHeaders },
141
+ { responseHeaders }
142
+ );
143
+
144
+ let responseData = response;
145
+ if (responseHeaders) {
146
+ responseData = response[0];
147
+ }
148
+
149
+ const { error: res_error } = Joi.any().validate(responseData, {
150
+ abortEarly: false,
151
+ allowUnknown: false,
152
+ });
153
+
154
+ if (res_error) {
155
+ Logger({
156
+ level: "WARN",
157
+ message: `Response Validation Warnnings for platform > Webhook > downloadDeliveryReport \n ${res_error}`,
158
+ });
159
+ }
160
+
161
+ return response;
162
+ }
163
+
14
164
  /**
15
165
  * @param {WebhookPlatformValidator.FetchAllEventConfigurationsParam} arg - Arg object
166
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
167
+ * @param {import("../PlatformAPIClient").Options} - Options
168
+ * @returns {Promise<WebhookPlatformModel.EventConfigResponse>} - Success response
169
+ * @name fetchAllEventConfigurations
170
+ * @summary:
171
+ * @description: Get All Webhook Events - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/fetchAllEventConfigurations/).
172
+ */
173
+ async fetchAllEventConfigurations(
174
+ { requestHeaders } = { requestHeaders: {} },
175
+ { responseHeaders } = { responseHeaders: false }
176
+ ) {
177
+ const {
178
+ error,
179
+ } = WebhookPlatformValidator.fetchAllEventConfigurations().validate(
180
+ {},
181
+ { abortEarly: false, allowUnknown: true }
182
+ );
183
+ if (error) {
184
+ return Promise.reject(new FDKClientValidationError(error));
185
+ }
186
+
187
+ // Showing warrnings if extra unknown parameters are found
188
+ const {
189
+ error: warrning,
190
+ } = WebhookPlatformValidator.fetchAllEventConfigurations().validate(
191
+ {},
192
+ { abortEarly: false, allowUnknown: false }
193
+ );
194
+ if (warrning) {
195
+ Logger({
196
+ level: "WARN",
197
+ message: `Parameter Validation warrnings for platform > Webhook > fetchAllEventConfigurations \n ${warrning}`,
198
+ });
199
+ }
200
+
201
+ const query_params = {};
202
+
203
+ const xHeaders = {};
204
+
205
+ const response = await PlatformAPIClient.execute(
206
+ this.config,
207
+ "get",
208
+ `/service/platform/webhook/v1.0/company/${this.config.companyId}/events`,
209
+ query_params,
210
+ undefined,
211
+ { ...xHeaders, ...requestHeaders },
212
+ { responseHeaders }
213
+ );
214
+
215
+ let responseData = response;
216
+ if (responseHeaders) {
217
+ responseData = response[0];
218
+ }
219
+
220
+ const {
221
+ error: res_error,
222
+ } = WebhookPlatformModel.EventConfigResponse().validate(responseData, {
223
+ abortEarly: false,
224
+ allowUnknown: false,
225
+ });
226
+
227
+ if (res_error) {
228
+ Logger({
229
+ level: "WARN",
230
+ message: `Response Validation Warnnings for platform > Webhook > fetchAllEventConfigurations \n ${res_error}`,
231
+ });
232
+ }
233
+
234
+ return response;
235
+ }
236
+
237
+ /**
238
+ * @param {WebhookPlatformValidator.GetDeliveryReportsParam} arg - Arg object
239
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
240
+ * @param {import("../PlatformAPIClient").Options} - Options
241
+ * @returns {Promise<WebhookPlatformModel.EventProcessReports>} - Success response
242
+ * @name getDeliveryReports
243
+ * @summary: Get processed events report for a company
244
+ * @description: Retrieve a list of processed events for a specific company based on the provided filters. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/getDeliveryReports/).
245
+ */
246
+ async getDeliveryReports(
247
+ { body, requestHeaders } = { requestHeaders: {} },
248
+ { responseHeaders } = { responseHeaders: false }
249
+ ) {
250
+ const { error } = WebhookPlatformValidator.getDeliveryReports().validate(
251
+ {
252
+ body,
253
+ },
254
+ { abortEarly: false, allowUnknown: true }
255
+ );
256
+ if (error) {
257
+ return Promise.reject(new FDKClientValidationError(error));
258
+ }
259
+
260
+ // Showing warrnings if extra unknown parameters are found
261
+ const {
262
+ error: warrning,
263
+ } = WebhookPlatformValidator.getDeliveryReports().validate(
264
+ {
265
+ body,
266
+ },
267
+ { abortEarly: false, allowUnknown: false }
268
+ );
269
+ if (warrning) {
270
+ Logger({
271
+ level: "WARN",
272
+ message: `Parameter Validation warrnings for platform > Webhook > getDeliveryReports \n ${warrning}`,
273
+ });
274
+ }
275
+
276
+ const query_params = {};
277
+
278
+ const xHeaders = {};
279
+
280
+ const response = await PlatformAPIClient.execute(
281
+ this.config,
282
+ "post",
283
+ `/service/platform/webhook/v1.0/company/${this.config.companyId}/reports/event_processed`,
284
+ query_params,
285
+ body,
286
+ { ...xHeaders, ...requestHeaders },
287
+ { responseHeaders }
288
+ );
289
+
290
+ let responseData = response;
291
+ if (responseHeaders) {
292
+ responseData = response[0];
293
+ }
294
+
295
+ const {
296
+ error: res_error,
297
+ } = WebhookPlatformModel.EventProcessReports().validate(responseData, {
298
+ abortEarly: false,
299
+ allowUnknown: false,
300
+ });
301
+
302
+ if (res_error) {
303
+ Logger({
304
+ level: "WARN",
305
+ message: `Response Validation Warnnings for platform > Webhook > getDeliveryReports \n ${res_error}`,
306
+ });
307
+ }
308
+
309
+ return response;
310
+ }
311
+
312
+ /**
313
+ * @param {WebhookPlatformValidator.GetEventCountsParam} arg - Arg object
314
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
315
+ * @param {import("../PlatformAPIClient").Options} - Options
316
+ * @returns {Promise<WebhookPlatformModel.FailedEventsCountSuccessResponse>}
317
+ * - Success response
318
+ *
319
+ * @name getEventCounts
320
+ * @summary: Get the count of failed events for a company within a specified date range.
321
+ * @description: Retrieves the count of failed events for a specific company within the specified date range. The user can filter the count based on specific event types if provided.
322
+ * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/getEventCounts/).
323
+ */
324
+ async getEventCounts(
325
+ { body, requestHeaders } = { requestHeaders: {} },
326
+ { responseHeaders } = { responseHeaders: false }
327
+ ) {
328
+ const { error } = WebhookPlatformValidator.getEventCounts().validate(
329
+ {
330
+ body,
331
+ },
332
+ { abortEarly: false, allowUnknown: true }
333
+ );
334
+ if (error) {
335
+ return Promise.reject(new FDKClientValidationError(error));
336
+ }
337
+
338
+ // Showing warrnings if extra unknown parameters are found
339
+ const {
340
+ error: warrning,
341
+ } = WebhookPlatformValidator.getEventCounts().validate(
342
+ {
343
+ body,
344
+ },
345
+ { abortEarly: false, allowUnknown: false }
346
+ );
347
+ if (warrning) {
348
+ Logger({
349
+ level: "WARN",
350
+ message: `Parameter Validation warrnings for platform > Webhook > getEventCounts \n ${warrning}`,
351
+ });
352
+ }
353
+
354
+ const query_params = {};
355
+
356
+ const xHeaders = {};
357
+
358
+ const response = await PlatformAPIClient.execute(
359
+ this.config,
360
+ "post",
361
+ `/service/platform/webhook/v1.0/company/${this.config.companyId}/retry/events/counts`,
362
+ query_params,
363
+ body,
364
+ { ...xHeaders, ...requestHeaders },
365
+ { responseHeaders }
366
+ );
367
+
368
+ let responseData = response;
369
+ if (responseHeaders) {
370
+ responseData = response[0];
371
+ }
372
+
373
+ const {
374
+ error: res_error,
375
+ } = WebhookPlatformModel.FailedEventsCountSuccessResponse().validate(
376
+ responseData,
377
+ { abortEarly: false, allowUnknown: false }
378
+ );
379
+
380
+ if (res_error) {
381
+ Logger({
382
+ level: "WARN",
383
+ message: `Response Validation Warnnings for platform > Webhook > getEventCounts \n ${res_error}`,
384
+ });
385
+ }
386
+
387
+ return response;
388
+ }
389
+
390
+ /**
391
+ * @param {WebhookPlatformValidator.GetHistoricalReportsParam} arg - Arg object
392
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
393
+ * @param {import("../PlatformAPIClient").Options} - Options
394
+ * @returns {Promise<WebhookPlatformModel.HistoryResponse>} - Success response
395
+ * @name getHistoricalReports
396
+ * @summary: Get report download history
397
+ * @description: Retrieve history reports for a specific company based on the provided filters. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/getHistoricalReports/).
398
+ */
399
+ async getHistoricalReports(
400
+ { body, requestHeaders } = { requestHeaders: {} },
401
+ { responseHeaders } = { responseHeaders: false }
402
+ ) {
403
+ const { error } = WebhookPlatformValidator.getHistoricalReports().validate(
404
+ {
405
+ body,
406
+ },
407
+ { abortEarly: false, allowUnknown: true }
408
+ );
409
+ if (error) {
410
+ return Promise.reject(new FDKClientValidationError(error));
411
+ }
412
+
413
+ // Showing warrnings if extra unknown parameters are found
414
+ const {
415
+ error: warrning,
416
+ } = WebhookPlatformValidator.getHistoricalReports().validate(
417
+ {
418
+ body,
419
+ },
420
+ { abortEarly: false, allowUnknown: false }
421
+ );
422
+ if (warrning) {
423
+ Logger({
424
+ level: "WARN",
425
+ message: `Parameter Validation warrnings for platform > Webhook > getHistoricalReports \n ${warrning}`,
426
+ });
427
+ }
428
+
429
+ const query_params = {};
430
+
431
+ const xHeaders = {};
432
+
433
+ const response = await PlatformAPIClient.execute(
434
+ this.config,
435
+ "post",
436
+ `/service/platform/webhook/v1.0/company/${this.config.companyId}/reports/history`,
437
+ query_params,
438
+ body,
439
+ { ...xHeaders, ...requestHeaders },
440
+ { responseHeaders }
441
+ );
442
+
443
+ let responseData = response;
444
+ if (responseHeaders) {
445
+ responseData = response[0];
446
+ }
447
+
448
+ const {
449
+ error: res_error,
450
+ } = WebhookPlatformModel.HistoryResponse().validate(responseData, {
451
+ abortEarly: false,
452
+ allowUnknown: false,
453
+ });
454
+
455
+ if (res_error) {
456
+ Logger({
457
+ level: "WARN",
458
+ message: `Response Validation Warnnings for platform > Webhook > getHistoricalReports \n ${res_error}`,
459
+ });
460
+ }
461
+
462
+ return response;
463
+ }
464
+
465
+ /**
466
+ * @param {WebhookPlatformValidator.GetManualRetryStatusParam} arg - Arg object
467
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
16
468
  * @param {import("../PlatformAPIClient").Options} - Options
17
- * @returns {Promise<WebhookPlatformModel.EventConfigResponse>} - Success response
18
- * @name fetchAllEventConfigurations
19
- * @summary:
20
- * @description: Get All Webhook Events - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/fetchAllEventConfigurations/).
469
+ * @returns {Promise<WebhookPlatformModel.RetryStatusResponse>} - Success response
470
+ * @name getManualRetryStatus
471
+ * @summary: Get the retry status for a company's failed events.
472
+ * @description: Retrieves the status of retry for a specific company's failed events. This endpoint returns the total number of events, the count of successfully retried events, the count of failed retry attempts, and the overall status of the retry process.
473
+ * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/getManualRetryStatus/).
21
474
  */
22
- async fetchAllEventConfigurations({ headers } = { headers: false }) {
23
- const {
24
- error,
25
- } = WebhookPlatformValidator.fetchAllEventConfigurations().validate(
475
+ async getManualRetryStatus(
476
+ { requestHeaders } = { requestHeaders: {} },
477
+ { responseHeaders } = { responseHeaders: false }
478
+ ) {
479
+ const { error } = WebhookPlatformValidator.getManualRetryStatus().validate(
26
480
  {},
27
481
  { abortEarly: false, allowUnknown: true }
28
482
  );
@@ -33,14 +487,14 @@ class Webhook {
33
487
  // Showing warrnings if extra unknown parameters are found
34
488
  const {
35
489
  error: warrning,
36
- } = WebhookPlatformValidator.fetchAllEventConfigurations().validate(
490
+ } = WebhookPlatformValidator.getManualRetryStatus().validate(
37
491
  {},
38
492
  { abortEarly: false, allowUnknown: false }
39
493
  );
40
494
  if (warrning) {
41
495
  Logger({
42
496
  level: "WARN",
43
- message: `Parameter Validation warrnings for platform > Webhook > fetchAllEventConfigurations \n ${warrning}`,
497
+ message: `Parameter Validation warrnings for platform > Webhook > getManualRetryStatus \n ${warrning}`,
44
498
  });
45
499
  }
46
500
 
@@ -51,21 +505,21 @@ class Webhook {
51
505
  const response = await PlatformAPIClient.execute(
52
506
  this.config,
53
507
  "get",
54
- `/service/platform/webhook/v1.0/company/${this.config.companyId}/events`,
508
+ `/service/platform/webhook/v1.0/company/${this.config.companyId}/retry/status`,
55
509
  query_params,
56
510
  undefined,
57
- xHeaders,
58
- { headers }
511
+ { ...xHeaders, ...requestHeaders },
512
+ { responseHeaders }
59
513
  );
60
514
 
61
515
  let responseData = response;
62
- if (headers) {
516
+ if (responseHeaders) {
63
517
  responseData = response[0];
64
518
  }
65
519
 
66
520
  const {
67
521
  error: res_error,
68
- } = WebhookPlatformModel.EventConfigResponse().validate(responseData, {
522
+ } = WebhookPlatformModel.RetryStatusResponse().validate(responseData, {
69
523
  abortEarly: false,
70
524
  allowUnknown: false,
71
525
  });
@@ -73,7 +527,82 @@ class Webhook {
73
527
  if (res_error) {
74
528
  Logger({
75
529
  level: "WARN",
76
- message: `Response Validation Warnnings for platform > Webhook > fetchAllEventConfigurations \n ${res_error}`,
530
+ message: `Response Validation Warnnings for platform > Webhook > getManualRetryStatus \n ${res_error}`,
531
+ });
532
+ }
533
+
534
+ return response;
535
+ }
536
+
537
+ /**
538
+ * @param {WebhookPlatformValidator.GetReportFiltersParam} arg - Arg object
539
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
540
+ * @param {import("../PlatformAPIClient").Options} - Options
541
+ * @returns {Promise<WebhookPlatformModel.ReportFilterResponse>} - Success response
542
+ * @name getReportFilters
543
+ * @summary: Get filters for a company
544
+ * @description: Retrieve filters for a specific company based on the provided subscriber IDs. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/getReportFilters/).
545
+ */
546
+ async getReportFilters(
547
+ { body, requestHeaders } = { requestHeaders: {} },
548
+ { responseHeaders } = { responseHeaders: false }
549
+ ) {
550
+ const { error } = WebhookPlatformValidator.getReportFilters().validate(
551
+ {
552
+ body,
553
+ },
554
+ { abortEarly: false, allowUnknown: true }
555
+ );
556
+ if (error) {
557
+ return Promise.reject(new FDKClientValidationError(error));
558
+ }
559
+
560
+ // Showing warrnings if extra unknown parameters are found
561
+ const {
562
+ error: warrning,
563
+ } = WebhookPlatformValidator.getReportFilters().validate(
564
+ {
565
+ body,
566
+ },
567
+ { abortEarly: false, allowUnknown: false }
568
+ );
569
+ if (warrning) {
570
+ Logger({
571
+ level: "WARN",
572
+ message: `Parameter Validation warrnings for platform > Webhook > getReportFilters \n ${warrning}`,
573
+ });
574
+ }
575
+
576
+ const query_params = {};
577
+
578
+ const xHeaders = {};
579
+
580
+ const response = await PlatformAPIClient.execute(
581
+ this.config,
582
+ "post",
583
+ `/service/platform/webhook/v1.0/company/${this.config.companyId}/filters`,
584
+ query_params,
585
+ body,
586
+ { ...xHeaders, ...requestHeaders },
587
+ { responseHeaders }
588
+ );
589
+
590
+ let responseData = response;
591
+ if (responseHeaders) {
592
+ responseData = response[0];
593
+ }
594
+
595
+ const {
596
+ error: res_error,
597
+ } = WebhookPlatformModel.ReportFilterResponse().validate(responseData, {
598
+ abortEarly: false,
599
+ allowUnknown: false,
600
+ });
601
+
602
+ if (res_error) {
603
+ Logger({
604
+ level: "WARN",
605
+ message: `Response Validation Warnnings for platform > Webhook > getReportFilters \n ${res_error}`,
77
606
  });
78
607
  }
79
608
 
@@ -82,6 +611,7 @@ class Webhook {
82
611
 
83
612
  /**
84
613
  * @param {WebhookPlatformValidator.GetSubscriberByIdParam} arg - Arg object
614
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
85
615
  * @param {import("../PlatformAPIClient").Options} - Options
86
616
  * @returns {Promise<WebhookPlatformModel.SubscriberResponse>} - Success response
87
617
  * @name getSubscriberById
@@ -89,8 +619,8 @@ class Webhook {
89
619
  * @description: Get Subscriber By Subscriber ID - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/getSubscriberById/).
90
620
  */
91
621
  async getSubscriberById(
92
- { subscriberId } = {},
93
- { headers } = { headers: false }
622
+ { subscriberId, requestHeaders } = { requestHeaders: {} },
623
+ { responseHeaders } = { responseHeaders: false }
94
624
  ) {
95
625
  const { error } = WebhookPlatformValidator.getSubscriberById().validate(
96
626
  {
@@ -128,12 +658,12 @@ class Webhook {
128
658
  `/service/platform/webhook/v1.0/company/${this.config.companyId}/subscriber/${subscriberId}`,
129
659
  query_params,
130
660
  undefined,
131
- xHeaders,
132
- { headers }
661
+ { ...xHeaders, ...requestHeaders },
662
+ { responseHeaders }
133
663
  );
134
664
 
135
665
  let responseData = response;
136
- if (headers) {
666
+ if (responseHeaders) {
137
667
  responseData = response[0];
138
668
  }
139
669
 
@@ -156,6 +686,7 @@ class Webhook {
156
686
 
157
687
  /**
158
688
  * @param {WebhookPlatformValidator.GetSubscribersByCompanyParam} arg - Arg object
689
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
159
690
  * @param {import("../PlatformAPIClient").Options} - Options
160
691
  * @returns {Promise<WebhookPlatformModel.SubscriberResponse>} - Success response
161
692
  * @name getSubscribersByCompany
@@ -163,8 +694,8 @@ class Webhook {
163
694
  * @description: Get Subscribers By CompanyId - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/getSubscribersByCompany/).
164
695
  */
165
696
  async getSubscribersByCompany(
166
- { pageNo, pageSize, extensionId } = {},
167
- { headers } = { headers: false }
697
+ { pageNo, pageSize, extensionId, requestHeaders } = { requestHeaders: {} },
698
+ { responseHeaders } = { responseHeaders: false }
168
699
  ) {
169
700
  const {
170
701
  error,
@@ -211,12 +742,12 @@ class Webhook {
211
742
  `/service/platform/webhook/v1.0/company/${this.config.companyId}/subscriber`,
212
743
  query_params,
213
744
  undefined,
214
- xHeaders,
215
- { headers }
745
+ { ...xHeaders, ...requestHeaders },
746
+ { responseHeaders }
216
747
  );
217
748
 
218
749
  let responseData = response;
219
- if (headers) {
750
+ if (responseHeaders) {
220
751
  responseData = response[0];
221
752
  }
222
753
 
@@ -239,6 +770,7 @@ class Webhook {
239
770
 
240
771
  /**
241
772
  * @param {WebhookPlatformValidator.GetSubscribersByExtensionIdParam} arg - Arg object
773
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
242
774
  * @param {import("../PlatformAPIClient").Options} - Options
243
775
  * @returns {Promise<WebhookPlatformModel.SubscriberConfigList>} - Success response
244
776
  * @name getSubscribersByExtensionId
@@ -246,8 +778,8 @@ class Webhook {
246
778
  * @description: Get Subscribers By ExtensionID - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/getSubscribersByExtensionId/).
247
779
  */
248
780
  async getSubscribersByExtensionId(
249
- { extensionId, pageNo, pageSize } = {},
250
- { headers } = { headers: false }
781
+ { extensionId, pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
782
+ { responseHeaders } = { responseHeaders: false }
251
783
  ) {
252
784
  const {
253
785
  error,
@@ -293,12 +825,12 @@ class Webhook {
293
825
  `/service/platform/webhook/v1.0/company/${this.config.companyId}/extension/${extensionId}/subscriber`,
294
826
  query_params,
295
827
  undefined,
296
- xHeaders,
297
- { headers }
828
+ { ...xHeaders, ...requestHeaders },
829
+ { responseHeaders }
298
830
  );
299
831
 
300
832
  let responseData = response;
301
- if (headers) {
833
+ if (responseHeaders) {
302
834
  responseData = response[0];
303
835
  }
304
836
 
@@ -319,8 +851,233 @@ class Webhook {
319
851
  return response;
320
852
  }
321
853
 
854
+ /**
855
+ * @param {WebhookPlatformValidator.ManualRetryCancelParam} arg - Arg object
856
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
857
+ * @param {import("../PlatformAPIClient").Options} - Options
858
+ * @returns {Promise<WebhookPlatformModel.EventSuccessResponse>} - Success response
859
+ * @name manualRetryCancel
860
+ * @summary: Cancel the active manual retry for a company's failed events.
861
+ * @description: Cancels the active manual retry for a specific company's failed events. If a manual retry is currently in progress, it will be cancelled.
862
+ * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/manualRetryCancel/).
863
+ */
864
+ async manualRetryCancel(
865
+ { requestHeaders } = { requestHeaders: {} },
866
+ { responseHeaders } = { responseHeaders: false }
867
+ ) {
868
+ const { error } = WebhookPlatformValidator.manualRetryCancel().validate(
869
+ {},
870
+ { abortEarly: false, allowUnknown: true }
871
+ );
872
+ if (error) {
873
+ return Promise.reject(new FDKClientValidationError(error));
874
+ }
875
+
876
+ // Showing warrnings if extra unknown parameters are found
877
+ const {
878
+ error: warrning,
879
+ } = WebhookPlatformValidator.manualRetryCancel().validate(
880
+ {},
881
+ { abortEarly: false, allowUnknown: false }
882
+ );
883
+ if (warrning) {
884
+ Logger({
885
+ level: "WARN",
886
+ message: `Parameter Validation warrnings for platform > Webhook > manualRetryCancel \n ${warrning}`,
887
+ });
888
+ }
889
+
890
+ const query_params = {};
891
+
892
+ const xHeaders = {};
893
+
894
+ const response = await PlatformAPIClient.execute(
895
+ this.config,
896
+ "delete",
897
+ `/service/platform/webhook/v1.0/company/${this.config.companyId}/retry/cancel`,
898
+ query_params,
899
+ undefined,
900
+ { ...xHeaders, ...requestHeaders },
901
+ { responseHeaders }
902
+ );
903
+
904
+ let responseData = response;
905
+ if (responseHeaders) {
906
+ responseData = response[0];
907
+ }
908
+
909
+ const {
910
+ error: res_error,
911
+ } = WebhookPlatformModel.EventSuccessResponse().validate(responseData, {
912
+ abortEarly: false,
913
+ allowUnknown: false,
914
+ });
915
+
916
+ if (res_error) {
917
+ Logger({
918
+ level: "WARN",
919
+ message: `Response Validation Warnnings for platform > Webhook > manualRetryCancel \n ${res_error}`,
920
+ });
921
+ }
922
+
923
+ return response;
924
+ }
925
+
926
+ /**
927
+ * @param {WebhookPlatformValidator.ManualRetryOfFailedEventParam} arg - Arg object
928
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
929
+ * @param {import("../PlatformAPIClient").Options} - Options
930
+ * @returns {Promise<WebhookPlatformModel.EventProcessedSuccessResponse>} -
931
+ * Success response
932
+ * @name manualRetryOfFailedEvent
933
+ * @summary: Initiate a manual retry for event processing.
934
+ * @description: Initiates a manual retry for event processing for a specific company. This endpoint allows the user to specify the date range (start_date and end_date) within which the events should be retried.
935
+ * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/manualRetryOfFailedEvent/).
936
+ */
937
+ async manualRetryOfFailedEvent(
938
+ { body, requestHeaders } = { requestHeaders: {} },
939
+ { responseHeaders } = { responseHeaders: false }
940
+ ) {
941
+ const {
942
+ error,
943
+ } = WebhookPlatformValidator.manualRetryOfFailedEvent().validate(
944
+ {
945
+ body,
946
+ },
947
+ { abortEarly: false, allowUnknown: true }
948
+ );
949
+ if (error) {
950
+ return Promise.reject(new FDKClientValidationError(error));
951
+ }
952
+
953
+ // Showing warrnings if extra unknown parameters are found
954
+ const {
955
+ error: warrning,
956
+ } = WebhookPlatformValidator.manualRetryOfFailedEvent().validate(
957
+ {
958
+ body,
959
+ },
960
+ { abortEarly: false, allowUnknown: false }
961
+ );
962
+ if (warrning) {
963
+ Logger({
964
+ level: "WARN",
965
+ message: `Parameter Validation warrnings for platform > Webhook > manualRetryOfFailedEvent \n ${warrning}`,
966
+ });
967
+ }
968
+
969
+ const query_params = {};
970
+
971
+ const xHeaders = {};
972
+
973
+ const response = await PlatformAPIClient.execute(
974
+ this.config,
975
+ "post",
976
+ `/service/platform/webhook/v1.0/company/${this.config.companyId}/retry`,
977
+ query_params,
978
+ body,
979
+ { ...xHeaders, ...requestHeaders },
980
+ { responseHeaders }
981
+ );
982
+
983
+ let responseData = response;
984
+ if (responseHeaders) {
985
+ responseData = response[0];
986
+ }
987
+
988
+ const {
989
+ error: res_error,
990
+ } = WebhookPlatformModel.EventProcessedSuccessResponse().validate(
991
+ responseData,
992
+ { abortEarly: false, allowUnknown: false }
993
+ );
994
+
995
+ if (res_error) {
996
+ Logger({
997
+ level: "WARN",
998
+ message: `Response Validation Warnnings for platform > Webhook > manualRetryOfFailedEvent \n ${res_error}`,
999
+ });
1000
+ }
1001
+
1002
+ return response;
1003
+ }
1004
+
1005
+ /**
1006
+ * @param {WebhookPlatformValidator.PingWebhookParam} arg - Arg object
1007
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1008
+ * @param {import("../PlatformAPIClient").Options} - Options
1009
+ * @returns {Promise<WebhookPlatformModel.PingWebhookResponse>} - Success response
1010
+ * @name pingWebhook
1011
+ * @summary: Ping and validate webhook url
1012
+ * @description: Ping and validate webhook url - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/pingWebhook/).
1013
+ */
1014
+ async pingWebhook(
1015
+ { body, requestHeaders } = { requestHeaders: {} },
1016
+ { responseHeaders } = { responseHeaders: false }
1017
+ ) {
1018
+ const { error } = WebhookPlatformValidator.pingWebhook().validate(
1019
+ {
1020
+ body,
1021
+ },
1022
+ { abortEarly: false, allowUnknown: true }
1023
+ );
1024
+ if (error) {
1025
+ return Promise.reject(new FDKClientValidationError(error));
1026
+ }
1027
+
1028
+ // Showing warrnings if extra unknown parameters are found
1029
+ const { error: warrning } = WebhookPlatformValidator.pingWebhook().validate(
1030
+ {
1031
+ body,
1032
+ },
1033
+ { abortEarly: false, allowUnknown: false }
1034
+ );
1035
+ if (warrning) {
1036
+ Logger({
1037
+ level: "WARN",
1038
+ message: `Parameter Validation warrnings for platform > Webhook > pingWebhook \n ${warrning}`,
1039
+ });
1040
+ }
1041
+
1042
+ const query_params = {};
1043
+
1044
+ const xHeaders = {};
1045
+
1046
+ const response = await PlatformAPIClient.execute(
1047
+ this.config,
1048
+ "post",
1049
+ `/service/platform/webhook/v1.0/company/${this.config.companyId}/subscriber/ping`,
1050
+ query_params,
1051
+ body,
1052
+ { ...xHeaders, ...requestHeaders },
1053
+ { responseHeaders }
1054
+ );
1055
+
1056
+ let responseData = response;
1057
+ if (responseHeaders) {
1058
+ responseData = response[0];
1059
+ }
1060
+
1061
+ const {
1062
+ error: res_error,
1063
+ } = WebhookPlatformModel.PingWebhookResponse().validate(responseData, {
1064
+ abortEarly: false,
1065
+ allowUnknown: false,
1066
+ });
1067
+
1068
+ if (res_error) {
1069
+ Logger({
1070
+ level: "WARN",
1071
+ message: `Response Validation Warnnings for platform > Webhook > pingWebhook \n ${res_error}`,
1072
+ });
1073
+ }
1074
+
1075
+ return response;
1076
+ }
1077
+
322
1078
  /**
323
1079
  * @param {WebhookPlatformValidator.RegisterSubscriberToEventParam} arg - Arg object
1080
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
324
1081
  * @param {import("../PlatformAPIClient").Options} - Options
325
1082
  * @returns {Promise<WebhookPlatformModel.SubscriberConfig>} - Success response
326
1083
  * @name registerSubscriberToEvent
@@ -328,8 +1085,8 @@ class Webhook {
328
1085
  * @description: Register Subscriber - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/registerSubscriberToEvent/).
329
1086
  */
330
1087
  async registerSubscriberToEvent(
331
- { body } = {},
332
- { headers } = { headers: false }
1088
+ { body, requestHeaders } = { requestHeaders: {} },
1089
+ { responseHeaders } = { responseHeaders: false }
333
1090
  ) {
334
1091
  const {
335
1092
  error,
@@ -369,12 +1126,12 @@ class Webhook {
369
1126
  `/service/platform/webhook/v1.0/company/${this.config.companyId}/subscriber`,
370
1127
  query_params,
371
1128
  body,
372
- xHeaders,
373
- { headers }
1129
+ { ...xHeaders, ...requestHeaders },
1130
+ { responseHeaders }
374
1131
  );
375
1132
 
376
1133
  let responseData = response;
377
- if (headers) {
1134
+ if (responseHeaders) {
378
1135
  responseData = response[0];
379
1136
  }
380
1137
 
@@ -397,6 +1154,7 @@ class Webhook {
397
1154
 
398
1155
  /**
399
1156
  * @param {WebhookPlatformValidator.UpdateSubscriberConfigParam} arg - Arg object
1157
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
400
1158
  * @param {import("../PlatformAPIClient").Options} - Options
401
1159
  * @returns {Promise<WebhookPlatformModel.SubscriberConfig>} - Success response
402
1160
  * @name updateSubscriberConfig
@@ -404,8 +1162,8 @@ class Webhook {
404
1162
  * @description: Update Subscriber - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/updateSubscriberConfig/).
405
1163
  */
406
1164
  async updateSubscriberConfig(
407
- { body } = {},
408
- { headers } = { headers: false }
1165
+ { body, requestHeaders } = { requestHeaders: {} },
1166
+ { responseHeaders } = { responseHeaders: false }
409
1167
  ) {
410
1168
  const {
411
1169
  error,
@@ -445,12 +1203,12 @@ class Webhook {
445
1203
  `/service/platform/webhook/v1.0/company/${this.config.companyId}/subscriber`,
446
1204
  query_params,
447
1205
  body,
448
- xHeaders,
449
- { headers }
1206
+ { ...xHeaders, ...requestHeaders },
1207
+ { responseHeaders }
450
1208
  );
451
1209
 
452
1210
  let responseData = response;
453
- if (headers) {
1211
+ if (responseHeaders) {
454
1212
  responseData = response[0];
455
1213
  }
456
1214