@gofynd/fdk-client-javascript 1.6.3 → 3.0.0-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 (298) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/sdk/application/ApplicationClient.d.ts +0 -2
  4. package/sdk/application/ApplicationClient.js +0 -2
  5. package/sdk/application/Cart/CartApplicationClient.d.ts +113 -93
  6. package/sdk/application/Cart/CartApplicationClient.js +270 -139
  7. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +110 -110
  8. package/sdk/application/Catalog/CatalogApplicationClient.js +122 -138
  9. package/sdk/application/Common/CommonApplicationClient.d.ts +4 -4
  10. package/sdk/application/Common/CommonApplicationClient.js +3 -3
  11. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +43 -3
  12. package/sdk/application/Communication/CommunicationApplicationClient.js +190 -3
  13. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +71 -36
  14. package/sdk/application/Configuration/ConfigurationApplicationClient.js +103 -29
  15. package/sdk/application/Content/ContentApplicationClient.d.ts +51 -21
  16. package/sdk/application/Content/ContentApplicationClient.js +197 -36
  17. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +6 -6
  18. package/sdk/application/FileStorage/FileStorageApplicationClient.js +3 -3
  19. package/sdk/application/Lead/LeadApplicationClient.d.ts +3 -3
  20. package/sdk/application/Lead/LeadApplicationClient.js +3 -3
  21. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +79 -64
  22. package/sdk/application/Logistic/LogisticApplicationClient.js +246 -264
  23. package/sdk/application/Order/OrderApplicationClient.d.ts +44 -24
  24. package/sdk/application/Order/OrderApplicationClient.js +140 -21
  25. package/sdk/application/Payment/PaymentApplicationClient.d.ts +211 -111
  26. package/sdk/application/Payment/PaymentApplicationClient.js +610 -109
  27. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +13 -13
  28. package/sdk/application/Rewards/RewardsApplicationClient.js +7 -7
  29. package/sdk/application/Share/ShareApplicationClient.d.ts +7 -7
  30. package/sdk/application/Share/ShareApplicationClient.js +14 -14
  31. package/sdk/application/Theme/ThemeApplicationClient.d.ts +23 -3
  32. package/sdk/application/Theme/ThemeApplicationClient.js +103 -5
  33. package/sdk/application/User/UserApplicationClient.d.ts +13 -23
  34. package/sdk/application/User/UserApplicationClient.js +9 -57
  35. package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -4
  36. package/sdk/application/Webhook/WebhookApplicationClient.js +3 -3
  37. package/sdk/partner/Authorization/AuthorizationPartnerClient.d.ts +66 -0
  38. package/sdk/partner/Authorization/AuthorizationPartnerClient.js +431 -0
  39. package/sdk/partner/Authorization/AuthorizationPartnerModel.d.ts +231 -0
  40. package/sdk/partner/Authorization/AuthorizationPartnerModel.js +152 -0
  41. package/sdk/partner/Authorization/AuthorizationPartnerValidator.d.ts +8 -0
  42. package/sdk/partner/Authorization/AuthorizationPartnerValidator.js +39 -0
  43. package/sdk/partner/Catalog/CatalogPartnerClient.d.ts +26 -0
  44. package/sdk/partner/Catalog/CatalogPartnerClient.js +173 -0
  45. package/sdk/partner/Catalog/CatalogPartnerModel.d.ts +238 -0
  46. package/sdk/partner/Catalog/CatalogPartnerModel.js +248 -0
  47. package/sdk/partner/Catalog/CatalogPartnerValidator.d.ts +5 -0
  48. package/sdk/partner/Catalog/CatalogPartnerValidator.js +19 -0
  49. package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +12 -22
  50. package/sdk/partner/FileStorage/FileStoragePartnerClient.js +12 -87
  51. package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +33 -99
  52. package/sdk/partner/FileStorage/FileStoragePartnerModel.js +25 -84
  53. package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +0 -1
  54. package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +4 -10
  55. package/sdk/partner/Lead/LeadPartnerClient.d.ts +5 -5
  56. package/sdk/partner/Lead/LeadPartnerClient.js +4 -4
  57. package/sdk/partner/Lead/LeadPartnerModel.d.ts +100 -49
  58. package/sdk/partner/Lead/LeadPartnerModel.js +100 -74
  59. package/sdk/partner/Lead/LeadPartnerValidator.js +1 -1
  60. package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +33 -160
  61. package/sdk/partner/Logistics/LogisticsPartnerClient.js +66 -1180
  62. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +288 -1685
  63. package/sdk/partner/Logistics/LogisticsPartnerModel.js +226 -824
  64. package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +1 -13
  65. package/sdk/partner/Logistics/LogisticsPartnerValidator.js +14 -141
  66. package/sdk/partner/PartnerClient.d.ts +6 -0
  67. package/sdk/partner/PartnerClient.js +9 -0
  68. package/sdk/partner/Payment/PaymentPartnerClient.d.ts +116 -0
  69. package/sdk/partner/Payment/PaymentPartnerClient.js +857 -0
  70. package/sdk/partner/Payment/PaymentPartnerModel.d.ts +388 -0
  71. package/sdk/partner/Payment/PaymentPartnerModel.js +442 -0
  72. package/sdk/partner/Payment/PaymentPartnerValidator.d.ts +14 -0
  73. package/sdk/partner/Payment/PaymentPartnerValidator.js +74 -0
  74. package/sdk/partner/Theme/ThemePartnerClient.d.ts +63 -21
  75. package/sdk/partner/Theme/ThemePartnerClient.js +396 -71
  76. package/sdk/partner/Theme/ThemePartnerModel.d.ts +104 -72
  77. package/sdk/partner/Theme/ThemePartnerModel.js +101 -75
  78. package/sdk/partner/Theme/ThemePartnerValidator.d.ts +5 -1
  79. package/sdk/partner/Theme/ThemePartnerValidator.js +42 -12
  80. package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +18 -18
  81. package/sdk/partner/Webhook/WebhookPartnerClient.js +18 -18
  82. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +191 -612
  83. package/sdk/partner/Webhook/WebhookPartnerModel.js +159 -234
  84. package/sdk/partner/Webhook/WebhookPartnerValidator.js +3 -3
  85. package/sdk/partner/index.d.ts +3 -0
  86. package/sdk/partner/index.js +6 -0
  87. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +1 -4
  88. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
  89. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +5 -0
  90. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +3 -1
  91. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +32 -2
  92. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +243 -3
  93. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +145 -49
  94. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +171 -20
  95. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +39 -1
  96. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +35 -0
  97. package/sdk/platform/Billing/BillingPlatformClient.d.ts +406 -15
  98. package/sdk/platform/Billing/BillingPlatformClient.js +3214 -76
  99. package/sdk/platform/Billing/BillingPlatformModel.d.ts +3798 -459
  100. package/sdk/platform/Billing/BillingPlatformModel.js +2577 -342
  101. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +465 -24
  102. package/sdk/platform/Billing/BillingPlatformValidator.js +490 -14
  103. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +284 -205
  104. package/sdk/platform/Cart/CartPlatformApplicationClient.js +671 -553
  105. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +165 -165
  106. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +108 -132
  107. package/sdk/platform/Cart/CartPlatformModel.d.ts +3136 -4788
  108. package/sdk/platform/Cart/CartPlatformModel.js +2850 -2031
  109. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +1015 -419
  110. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +6450 -2010
  111. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +1121 -230
  112. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +919 -127
  113. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +372 -574
  114. package/sdk/platform/Catalog/CatalogPlatformClient.js +1238 -1317
  115. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +8351 -9825
  116. package/sdk/platform/Catalog/CatalogPlatformModel.js +9662 -6881
  117. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +288 -235
  118. package/sdk/platform/Catalog/CatalogPlatformValidator.js +241 -183
  119. package/sdk/platform/Common/CommonPlatformClient.d.ts +5 -6
  120. package/sdk/platform/Common/CommonPlatformClient.js +5 -6
  121. package/sdk/platform/Common/CommonPlatformModel.d.ts +9 -9
  122. package/sdk/platform/Common/CommonPlatformModel.js +6 -6
  123. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +374 -234
  124. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +875 -583
  125. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +170 -139
  126. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +145 -126
  127. package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +56 -3
  128. package/sdk/platform/Communication/CommunicationPlatformClient.js +307 -4
  129. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +424 -252
  130. package/sdk/platform/Communication/CommunicationPlatformModel.js +540 -320
  131. package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +62 -3
  132. package/sdk/platform/Communication/CommunicationPlatformValidator.js +48 -2
  133. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +68 -99
  134. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +84 -140
  135. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +238 -256
  136. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +222 -244
  137. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +20 -20
  138. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +20 -20
  139. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +333 -118
  140. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +1470 -409
  141. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +158 -55
  142. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +163 -41
  143. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +151 -61
  144. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +595 -101
  145. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +1199 -462
  146. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +1008 -321
  147. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +80 -34
  148. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +79 -24
  149. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +253 -140
  150. package/sdk/platform/Content/ContentPlatformApplicationClient.js +1087 -458
  151. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +221 -178
  152. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +220 -157
  153. package/sdk/platform/Content/ContentPlatformClient.d.ts +124 -123
  154. package/sdk/platform/Content/ContentPlatformClient.js +459 -379
  155. package/sdk/platform/Content/ContentPlatformModel.d.ts +833 -1307
  156. package/sdk/platform/Content/ContentPlatformModel.js +893 -582
  157. package/sdk/platform/Content/ContentPlatformValidator.d.ts +140 -150
  158. package/sdk/platform/Content/ContentPlatformValidator.js +131 -135
  159. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +60 -36
  160. package/sdk/platform/Discount/DiscountPlatformClient.js +85 -36
  161. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +46 -47
  162. package/sdk/platform/Discount/DiscountPlatformModel.js +42 -46
  163. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +2 -2
  164. package/sdk/platform/Discount/DiscountPlatformValidator.js +2 -2
  165. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +18 -15
  166. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +24 -22
  167. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +4 -4
  168. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +4 -4
  169. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +8 -8
  170. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +8 -8
  171. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +75 -86
  172. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +60 -74
  173. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
  174. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
  175. package/sdk/platform/Finance/FinancePlatformClient.d.ts +320 -0
  176. package/sdk/platform/Finance/FinancePlatformClient.js +2333 -0
  177. package/sdk/platform/Finance/FinancePlatformModel.d.ts +2895 -0
  178. package/sdk/platform/Finance/FinancePlatformModel.js +2150 -0
  179. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +284 -0
  180. package/sdk/platform/Finance/FinancePlatformValidator.js +354 -0
  181. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +17 -17
  182. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +33 -33
  183. package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +19 -19
  184. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +14 -14
  185. package/sdk/platform/Lead/LeadPlatformClient.d.ts +4 -24
  186. package/sdk/platform/Lead/LeadPlatformClient.js +4 -160
  187. package/sdk/platform/Lead/LeadPlatformModel.d.ts +142 -57
  188. package/sdk/platform/Lead/LeadPlatformModel.js +162 -79
  189. package/sdk/platform/Lead/LeadPlatformValidator.d.ts +3 -29
  190. package/sdk/platform/Lead/LeadPlatformValidator.js +2 -28
  191. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +94 -25
  192. package/sdk/platform/Order/OrderPlatformApplicationClient.js +600 -57
  193. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +115 -115
  194. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +120 -43
  195. package/sdk/platform/Order/OrderPlatformClient.d.ts +502 -293
  196. package/sdk/platform/Order/OrderPlatformClient.js +1466 -913
  197. package/sdk/platform/Order/OrderPlatformModel.d.ts +4111 -9093
  198. package/sdk/platform/Order/OrderPlatformModel.js +3202 -4230
  199. package/sdk/platform/Order/OrderPlatformValidator.d.ts +445 -612
  200. package/sdk/platform/Order/OrderPlatformValidator.js +316 -326
  201. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -6
  202. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +7 -9
  203. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +9 -9
  204. package/sdk/platform/Partner/PartnerPlatformModel.js +7 -7
  205. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +382 -135
  206. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +2453 -935
  207. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +306 -93
  208. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +305 -70
  209. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +66 -56
  210. package/sdk/platform/Payment/PaymentPlatformClient.js +269 -124
  211. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +3525 -1313
  212. package/sdk/platform/Payment/PaymentPlatformModel.js +3813 -1511
  213. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +64 -35
  214. package/sdk/platform/Payment/PaymentPlatformValidator.js +60 -34
  215. package/sdk/platform/PlatformClient.d.ts +2 -0
  216. package/sdk/platform/PlatformClient.js +4 -0
  217. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +2 -2
  218. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +2 -2
  219. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +2 -2
  220. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +2 -2
  221. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +14 -9
  222. package/sdk/platform/Rewards/RewardsPlatformModel.js +10 -8
  223. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +344 -56
  224. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +2180 -302
  225. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +380 -54
  226. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +336 -37
  227. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +127 -213
  228. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +538 -1306
  229. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +3429 -2979
  230. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +3642 -1785
  231. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +218 -392
  232. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +151 -290
  233. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +4 -16
  234. package/sdk/platform/Share/SharePlatformApplicationClient.js +8 -86
  235. package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +6 -23
  236. package/sdk/platform/Share/SharePlatformApplicationValidator.js +3 -16
  237. package/sdk/platform/Share/SharePlatformModel.d.ts +6 -50
  238. package/sdk/platform/Share/SharePlatformModel.js +3 -43
  239. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +26 -4
  240. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +157 -10
  241. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +21 -10
  242. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +23 -6
  243. package/sdk/platform/Theme/ThemePlatformClient.d.ts +18 -8
  244. package/sdk/platform/Theme/ThemePlatformClient.js +85 -8
  245. package/sdk/platform/Theme/ThemePlatformModel.d.ts +425 -17
  246. package/sdk/platform/Theme/ThemePlatformModel.js +329 -23
  247. package/sdk/platform/Theme/ThemePlatformValidator.d.ts +7 -3
  248. package/sdk/platform/Theme/ThemePlatformValidator.js +9 -2
  249. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +22 -12
  250. package/sdk/platform/User/UserPlatformApplicationClient.js +91 -12
  251. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +15 -3
  252. package/sdk/platform/User/UserPlatformApplicationValidator.js +14 -2
  253. package/sdk/platform/User/UserPlatformModel.d.ts +223 -59
  254. package/sdk/platform/User/UserPlatformModel.js +204 -65
  255. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +78 -25
  256. package/sdk/platform/Webhook/WebhookPlatformClient.js +470 -75
  257. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +434 -758
  258. package/sdk/platform/Webhook/WebhookPlatformModel.js +395 -410
  259. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +55 -10
  260. package/sdk/platform/Webhook/WebhookPlatformValidator.js +72 -12
  261. package/sdk/platform/index.d.ts +1 -0
  262. package/sdk/platform/index.js +2 -0
  263. package/sdk/public/Billing/BillingPublicClient.d.ts +56 -0
  264. package/sdk/public/Billing/BillingPublicClient.js +397 -0
  265. package/sdk/public/Billing/BillingPublicModel.d.ts +919 -0
  266. package/sdk/public/Billing/BillingPublicModel.js +560 -0
  267. package/sdk/public/Billing/BillingPublicValidator.d.ts +43 -0
  268. package/sdk/public/Billing/BillingPublicValidator.js +50 -0
  269. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +14 -4
  270. package/sdk/public/Configuration/ConfigurationPublicClient.js +97 -9
  271. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +102 -40
  272. package/sdk/public/Configuration/ConfigurationPublicModel.js +111 -29
  273. package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +11 -1
  274. package/sdk/public/Configuration/ConfigurationPublicValidator.js +12 -0
  275. package/sdk/public/Content/ContentPublicClient.d.ts +22 -0
  276. package/sdk/public/Content/ContentPublicClient.js +183 -0
  277. package/sdk/public/Content/ContentPublicModel.d.ts +38 -1
  278. package/sdk/public/Content/ContentPublicModel.js +47 -1
  279. package/sdk/public/Content/ContentPublicValidator.d.ts +17 -1
  280. package/sdk/public/Content/ContentPublicValidator.js +19 -0
  281. package/sdk/public/PublicClient.d.ts +2 -2
  282. package/sdk/public/PublicClient.js +2 -2
  283. package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
  284. package/sdk/public/Webhook/WebhookPublicClient.js +8 -8
  285. package/sdk/public/Webhook/WebhookPublicModel.d.ts +67 -215
  286. package/sdk/public/Webhook/WebhookPublicModel.js +61 -66
  287. package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
  288. package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
  289. package/sdk/public/index.d.ts +1 -1
  290. package/sdk/public/index.js +1 -1
  291. package/sdk/application/Finance/FinanceApplicationClient.d.ts +0 -29
  292. package/sdk/application/Finance/FinanceApplicationClient.js +0 -126
  293. package/sdk/public/Catalog/CatalogPublicClient.d.ts +0 -22
  294. package/sdk/public/Catalog/CatalogPublicClient.js +0 -138
  295. package/sdk/public/Catalog/CatalogPublicModel.d.ts +0 -155
  296. package/sdk/public/Catalog/CatalogPublicModel.js +0 -116
  297. package/sdk/public/Catalog/CatalogPublicValidator.d.ts +0 -55
  298. package/sdk/public/Catalog/CatalogPublicValidator.js +0 -35
@@ -14,11 +14,172 @@ class Webhook {
14
14
  this.config = config;
15
15
  }
16
16
 
17
+ /**
18
+ * @param {WebhookPlatformValidator.CancelJobByNameParam} arg - Arg object
19
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
20
+ * @param {import("../PlatformAPIClient").Options} - Options
21
+ * @returns {Promise<WebhookPlatformModel.CancelResponse>} - Success response
22
+ * @name cancelJobByName
23
+ * @summary: Cancel job by name
24
+ * @description: It will cancel export job triggerd by user in order to fetch
25
+ * historical delivery summery - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/cancelJobByName/).
26
+ */
27
+ async cancelJobByName(
28
+ { filename, requestHeaders } = { requestHeaders: {} },
29
+ { responseHeaders } = { responseHeaders: false }
30
+ ) {
31
+ const { error } = WebhookPlatformValidator.cancelJobByName().validate(
32
+ {
33
+ filename,
34
+ },
35
+ { abortEarly: false, allowUnknown: true }
36
+ );
37
+ if (error) {
38
+ return Promise.reject(new FDKClientValidationError(error));
39
+ }
40
+
41
+ // Showing warrnings if extra unknown parameters are found
42
+ const {
43
+ error: warrning,
44
+ } = WebhookPlatformValidator.cancelJobByName().validate(
45
+ {
46
+ filename,
47
+ },
48
+ { abortEarly: false, allowUnknown: false }
49
+ );
50
+ if (warrning) {
51
+ Logger({
52
+ level: "WARN",
53
+ message: `Parameter Validation warrnings for platform > Webhook > cancelJobByName \n ${warrning}`,
54
+ });
55
+ }
56
+
57
+ const query_params = {};
58
+
59
+ const xHeaders = {};
60
+
61
+ const response = await PlatformAPIClient.execute(
62
+ this.config,
63
+ "get",
64
+ `/service/platform/webhook/v1.0/company/${this.config.companyId}/reports/cancel/file/${filename}`,
65
+ query_params,
66
+ undefined,
67
+ { ...xHeaders, ...requestHeaders },
68
+ { responseHeaders }
69
+ );
70
+
71
+ let responseData = response;
72
+ if (responseHeaders) {
73
+ responseData = response[0];
74
+ }
75
+
76
+ const {
77
+ error: res_error,
78
+ } = WebhookPlatformModel.CancelResponse().validate(responseData, {
79
+ abortEarly: false,
80
+ allowUnknown: true,
81
+ });
82
+
83
+ if (res_error) {
84
+ if (this.config.options.strictResponseCheck === true) {
85
+ return Promise.reject(new FDKResponseValidationError(res_error));
86
+ } else {
87
+ Logger({
88
+ level: "WARN",
89
+ message: `Response Validation Warnings for platform > Webhook > cancelJobByName \n ${res_error}`,
90
+ });
91
+ }
92
+ }
93
+
94
+ return response;
95
+ }
96
+
97
+ /**
98
+ * @param {WebhookPlatformValidator.DownloadDeliveryReportParam} arg - Arg object
99
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
100
+ * @param {import("../PlatformAPIClient").Options} - Options
101
+ * @returns {Promise<WebhookPlatformModel.DownloadReportResponse>} - Success response
102
+ * @name downloadDeliveryReport
103
+ * @summary: Download delivery report
104
+ * @description: Download detailed delivery reports for events. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/downloadDeliveryReport/).
105
+ */
106
+ async downloadDeliveryReport(
107
+ { body, requestHeaders } = { requestHeaders: {} },
108
+ { responseHeaders } = { responseHeaders: false }
109
+ ) {
110
+ const {
111
+ error,
112
+ } = WebhookPlatformValidator.downloadDeliveryReport().validate(
113
+ {
114
+ body,
115
+ },
116
+ { abortEarly: false, allowUnknown: true }
117
+ );
118
+ if (error) {
119
+ return Promise.reject(new FDKClientValidationError(error));
120
+ }
121
+
122
+ // Showing warrnings if extra unknown parameters are found
123
+ const {
124
+ error: warrning,
125
+ } = WebhookPlatformValidator.downloadDeliveryReport().validate(
126
+ {
127
+ body,
128
+ },
129
+ { abortEarly: false, allowUnknown: false }
130
+ );
131
+ if (warrning) {
132
+ Logger({
133
+ level: "WARN",
134
+ message: `Parameter Validation warrnings for platform > Webhook > downloadDeliveryReport \n ${warrning}`,
135
+ });
136
+ }
137
+
138
+ const query_params = {};
139
+
140
+ const xHeaders = {};
141
+
142
+ const response = await PlatformAPIClient.execute(
143
+ this.config,
144
+ "post",
145
+ `/service/platform/webhook/v1.0/company/${this.config.companyId}/reports/download`,
146
+ query_params,
147
+ body,
148
+ { ...xHeaders, ...requestHeaders },
149
+ { responseHeaders }
150
+ );
151
+
152
+ let responseData = response;
153
+ if (responseHeaders) {
154
+ responseData = response[0];
155
+ }
156
+
157
+ const {
158
+ error: res_error,
159
+ } = WebhookPlatformModel.DownloadReportResponse().validate(responseData, {
160
+ abortEarly: false,
161
+ allowUnknown: true,
162
+ });
163
+
164
+ if (res_error) {
165
+ if (this.config.options.strictResponseCheck === true) {
166
+ return Promise.reject(new FDKResponseValidationError(res_error));
167
+ } else {
168
+ Logger({
169
+ level: "WARN",
170
+ message: `Response Validation Warnings for platform > Webhook > downloadDeliveryReport \n ${res_error}`,
171
+ });
172
+ }
173
+ }
174
+
175
+ return response;
176
+ }
177
+
17
178
  /**
18
179
  * @param {WebhookPlatformValidator.FetchAllEventConfigurationsParam} arg - Arg object
19
180
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
20
181
  * @param {import("../PlatformAPIClient").Options} - Options
21
- * @returns {Promise<WebhookPlatformModel.EventConfigResult>} - Success response
182
+ * @returns {Promise<WebhookPlatformModel.EventConfigResponse>} - Success response
22
183
  * @name fetchAllEventConfigurations
23
184
  * @summary: List event configurations
24
185
  * @description: Retrieve all configurations for event handling. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/fetchAllEventConfigurations/).
@@ -72,7 +233,7 @@ class Webhook {
72
233
 
73
234
  const {
74
235
  error: res_error,
75
- } = WebhookPlatformModel.EventConfigResult().validate(responseData, {
236
+ } = WebhookPlatformModel.EventConfigResponse().validate(responseData, {
76
237
  abortEarly: false,
77
238
  allowUnknown: true,
78
239
  });
@@ -91,11 +252,245 @@ class Webhook {
91
252
  return response;
92
253
  }
93
254
 
255
+ /**
256
+ * @param {WebhookPlatformValidator.GetDeliveryReportsParam} arg - Arg object
257
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
258
+ * @param {import("../PlatformAPIClient").Options} - Options
259
+ * @returns {Promise<WebhookPlatformModel.EventProcessReports>} - Success response
260
+ * @name getDeliveryReports
261
+ * @summary: Get delivery reports
262
+ * @description: Retrieve reports on the delivery status of events. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/getDeliveryReports/).
263
+ */
264
+ async getDeliveryReports(
265
+ { body, requestHeaders } = { requestHeaders: {} },
266
+ { responseHeaders } = { responseHeaders: false }
267
+ ) {
268
+ const { error } = WebhookPlatformValidator.getDeliveryReports().validate(
269
+ {
270
+ body,
271
+ },
272
+ { abortEarly: false, allowUnknown: true }
273
+ );
274
+ if (error) {
275
+ return Promise.reject(new FDKClientValidationError(error));
276
+ }
277
+
278
+ // Showing warrnings if extra unknown parameters are found
279
+ const {
280
+ error: warrning,
281
+ } = WebhookPlatformValidator.getDeliveryReports().validate(
282
+ {
283
+ body,
284
+ },
285
+ { abortEarly: false, allowUnknown: false }
286
+ );
287
+ if (warrning) {
288
+ Logger({
289
+ level: "WARN",
290
+ message: `Parameter Validation warrnings for platform > Webhook > getDeliveryReports \n ${warrning}`,
291
+ });
292
+ }
293
+
294
+ const query_params = {};
295
+
296
+ const xHeaders = {};
297
+
298
+ const response = await PlatformAPIClient.execute(
299
+ this.config,
300
+ "post",
301
+ `/service/platform/webhook/v1.0/company/${this.config.companyId}/reports/event_processed`,
302
+ query_params,
303
+ body,
304
+ { ...xHeaders, ...requestHeaders },
305
+ { responseHeaders }
306
+ );
307
+
308
+ let responseData = response;
309
+ if (responseHeaders) {
310
+ responseData = response[0];
311
+ }
312
+
313
+ const {
314
+ error: res_error,
315
+ } = WebhookPlatformModel.EventProcessReports().validate(responseData, {
316
+ abortEarly: false,
317
+ allowUnknown: true,
318
+ });
319
+
320
+ if (res_error) {
321
+ if (this.config.options.strictResponseCheck === true) {
322
+ return Promise.reject(new FDKResponseValidationError(res_error));
323
+ } else {
324
+ Logger({
325
+ level: "WARN",
326
+ message: `Response Validation Warnings for platform > Webhook > getDeliveryReports \n ${res_error}`,
327
+ });
328
+ }
329
+ }
330
+
331
+ return response;
332
+ }
333
+
334
+ /**
335
+ * @param {WebhookPlatformValidator.GetHistoricalReportsParam} arg - Arg object
336
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
337
+ * @param {import("../PlatformAPIClient").Options} - Options
338
+ * @returns {Promise<WebhookPlatformModel.HistoryResponse>} - Success response
339
+ * @name getHistoricalReports
340
+ * @summary: Get historical reports
341
+ * @description: Retrieve historical reports of webhook events. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/getHistoricalReports/).
342
+ */
343
+ async getHistoricalReports(
344
+ { body, requestHeaders } = { requestHeaders: {} },
345
+ { responseHeaders } = { responseHeaders: false }
346
+ ) {
347
+ const { error } = WebhookPlatformValidator.getHistoricalReports().validate(
348
+ {
349
+ body,
350
+ },
351
+ { abortEarly: false, allowUnknown: true }
352
+ );
353
+ if (error) {
354
+ return Promise.reject(new FDKClientValidationError(error));
355
+ }
356
+
357
+ // Showing warrnings if extra unknown parameters are found
358
+ const {
359
+ error: warrning,
360
+ } = WebhookPlatformValidator.getHistoricalReports().validate(
361
+ {
362
+ body,
363
+ },
364
+ { abortEarly: false, allowUnknown: false }
365
+ );
366
+ if (warrning) {
367
+ Logger({
368
+ level: "WARN",
369
+ message: `Parameter Validation warrnings for platform > Webhook > getHistoricalReports \n ${warrning}`,
370
+ });
371
+ }
372
+
373
+ const query_params = {};
374
+
375
+ const xHeaders = {};
376
+
377
+ const response = await PlatformAPIClient.execute(
378
+ this.config,
379
+ "post",
380
+ `/service/platform/webhook/v1.0/company/${this.config.companyId}/reports/history`,
381
+ query_params,
382
+ body,
383
+ { ...xHeaders, ...requestHeaders },
384
+ { responseHeaders }
385
+ );
386
+
387
+ let responseData = response;
388
+ if (responseHeaders) {
389
+ responseData = response[0];
390
+ }
391
+
392
+ const {
393
+ error: res_error,
394
+ } = WebhookPlatformModel.HistoryResponse().validate(responseData, {
395
+ abortEarly: false,
396
+ allowUnknown: true,
397
+ });
398
+
399
+ if (res_error) {
400
+ if (this.config.options.strictResponseCheck === true) {
401
+ return Promise.reject(new FDKResponseValidationError(res_error));
402
+ } else {
403
+ Logger({
404
+ level: "WARN",
405
+ message: `Response Validation Warnings for platform > Webhook > getHistoricalReports \n ${res_error}`,
406
+ });
407
+ }
408
+ }
409
+
410
+ return response;
411
+ }
412
+
413
+ /**
414
+ * @param {WebhookPlatformValidator.GetReportFiltersParam} arg - Arg object
415
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
416
+ * @param {import("../PlatformAPIClient").Options} - Options
417
+ * @returns {Promise<WebhookPlatformModel.ReportFilterResponse[]>} - Success response
418
+ * @name getReportFilters
419
+ * @summary: Get report filters
420
+ * @description: Retrieve filters used for generating reports. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/getReportFilters/).
421
+ */
422
+ async getReportFilters(
423
+ { body, requestHeaders } = { requestHeaders: {} },
424
+ { responseHeaders } = { responseHeaders: false }
425
+ ) {
426
+ const { error } = WebhookPlatformValidator.getReportFilters().validate(
427
+ {
428
+ body,
429
+ },
430
+ { abortEarly: false, allowUnknown: true }
431
+ );
432
+ if (error) {
433
+ return Promise.reject(new FDKClientValidationError(error));
434
+ }
435
+
436
+ // Showing warrnings if extra unknown parameters are found
437
+ const {
438
+ error: warrning,
439
+ } = WebhookPlatformValidator.getReportFilters().validate(
440
+ {
441
+ body,
442
+ },
443
+ { abortEarly: false, allowUnknown: false }
444
+ );
445
+ if (warrning) {
446
+ Logger({
447
+ level: "WARN",
448
+ message: `Parameter Validation warrnings for platform > Webhook > getReportFilters \n ${warrning}`,
449
+ });
450
+ }
451
+
452
+ const query_params = {};
453
+
454
+ const xHeaders = {};
455
+
456
+ const response = await PlatformAPIClient.execute(
457
+ this.config,
458
+ "post",
459
+ `/service/platform/webhook/v1.0/company/${this.config.companyId}/filters`,
460
+ query_params,
461
+ body,
462
+ { ...xHeaders, ...requestHeaders },
463
+ { responseHeaders }
464
+ );
465
+
466
+ let responseData = response;
467
+ if (responseHeaders) {
468
+ responseData = response[0];
469
+ }
470
+
471
+ const { error: res_error } = Joi.array()
472
+ .items(WebhookPlatformModel.ReportFilterResponse())
473
+ .validate(responseData, { abortEarly: false, allowUnknown: true });
474
+
475
+ if (res_error) {
476
+ if (this.config.options.strictResponseCheck === true) {
477
+ return Promise.reject(new FDKResponseValidationError(res_error));
478
+ } else {
479
+ Logger({
480
+ level: "WARN",
481
+ message: `Response Validation Warnings for platform > Webhook > getReportFilters \n ${res_error}`,
482
+ });
483
+ }
484
+ }
485
+
486
+ return response;
487
+ }
488
+
94
489
  /**
95
490
  * @param {WebhookPlatformValidator.GetSubscriberByIdParam} arg - Arg object
96
491
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
97
492
  * @param {import("../PlatformAPIClient").Options} - Options
98
- * @returns {Promise<WebhookPlatformModel.SubscriberDetails>} - Success response
493
+ * @returns {Promise<WebhookPlatformModel.SubscriberResponse>} - Success response
99
494
  * @name getSubscriberById
100
495
  * @summary: Get a subscriber
101
496
  * @description: Retrieve a subscriber's details by their unique identifier. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/getSubscriberById/).
@@ -151,7 +546,7 @@ class Webhook {
151
546
 
152
547
  const {
153
548
  error: res_error,
154
- } = WebhookPlatformModel.SubscriberDetails().validate(responseData, {
549
+ } = WebhookPlatformModel.SubscriberResponse().validate(responseData, {
155
550
  abortEarly: false,
156
551
  allowUnknown: true,
157
552
  });
@@ -346,21 +741,19 @@ class Webhook {
346
741
  }
347
742
 
348
743
  /**
349
- * @param {WebhookPlatformValidator.RegisterSubscriberToEventParam} arg - Arg object
744
+ * @param {WebhookPlatformValidator.PingWebhookParam} arg - Arg object
350
745
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
351
746
  * @param {import("../PlatformAPIClient").Options} - Options
352
- * @returns {Promise<WebhookPlatformModel.SubscriberConfigResult>} - Success response
353
- * @name registerSubscriberToEvent
354
- * @summary: Register subscriber to event
355
- * @description: Add a subscriber to receive events of a specific type. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/registerSubscriberToEvent/).
747
+ * @returns {Promise<WebhookPlatformModel.PingWebhookResponse>} - Success response
748
+ * @name pingWebhook
749
+ * @summary: Ping webhook
750
+ * @description: Send a test ping to a webhook for verification. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/pingWebhook/).
356
751
  */
357
- async registerSubscriberToEvent(
752
+ async pingWebhook(
358
753
  { body, requestHeaders } = { requestHeaders: {} },
359
754
  { responseHeaders } = { responseHeaders: false }
360
755
  ) {
361
- const {
362
- error,
363
- } = WebhookPlatformValidator.registerSubscriberToEvent().validate(
756
+ const { error } = WebhookPlatformValidator.pingWebhook().validate(
364
757
  {
365
758
  body,
366
759
  },
@@ -371,9 +764,7 @@ class Webhook {
371
764
  }
372
765
 
373
766
  // Showing warrnings if extra unknown parameters are found
374
- const {
375
- error: warrning,
376
- } = WebhookPlatformValidator.registerSubscriberToEvent().validate(
767
+ const { error: warrning } = WebhookPlatformValidator.pingWebhook().validate(
377
768
  {
378
769
  body,
379
770
  },
@@ -382,7 +773,7 @@ class Webhook {
382
773
  if (warrning) {
383
774
  Logger({
384
775
  level: "WARN",
385
- message: `Parameter Validation warrnings for platform > Webhook > registerSubscriberToEvent \n ${warrning}`,
776
+ message: `Parameter Validation warrnings for platform > Webhook > pingWebhook \n ${warrning}`,
386
777
  });
387
778
  }
388
779
 
@@ -393,7 +784,7 @@ class Webhook {
393
784
  const response = await PlatformAPIClient.execute(
394
785
  this.config,
395
786
  "post",
396
- `/service/platform/webhook/v1.0/company/${this.config.companyId}/subscriber/`,
787
+ `/service/platform/webhook/v1.0/company/${this.config.companyId}/subscriber/ping`,
397
788
  query_params,
398
789
  body,
399
790
  { ...xHeaders, ...requestHeaders },
@@ -407,7 +798,7 @@ class Webhook {
407
798
 
408
799
  const {
409
800
  error: res_error,
410
- } = WebhookPlatformModel.SubscriberConfigResult().validate(responseData, {
801
+ } = WebhookPlatformModel.PingWebhookResponse().validate(responseData, {
411
802
  abortEarly: false,
412
803
  allowUnknown: true,
413
804
  });
@@ -418,7 +809,7 @@ class Webhook {
418
809
  } else {
419
810
  Logger({
420
811
  level: "WARN",
421
- message: `Response Validation Warnings for platform > Webhook > registerSubscriberToEvent \n ${res_error}`,
812
+ message: `Response Validation Warnings for platform > Webhook > pingWebhook \n ${res_error}`,
422
813
  });
423
814
  }
424
815
  }
@@ -427,22 +818,22 @@ class Webhook {
427
818
  }
428
819
 
429
820
  /**
430
- * @param {WebhookPlatformValidator.RegisterSubscriberToEventV2Param} arg - Arg object
821
+ * @param {WebhookPlatformValidator.RegisterSubscriberToEventParam} arg - Arg object
431
822
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
432
823
  * @param {import("../PlatformAPIClient").Options} - Options
433
- * @returns {Promise<WebhookPlatformModel.SubscriberConfigResult>} - Success response
434
- * @name registerSubscriberToEventV2
435
- * @summary: Register Subscriber.
436
- * @description: Register Subscriber.
437
- * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/registerSubscriberToEventV2/).
824
+ * @returns {Promise<WebhookPlatformModel.SubscriberConfigResponse>} -
825
+ * Success response
826
+ * @name registerSubscriberToEvent
827
+ * @summary: Register subscriber to event
828
+ * @description: Add a subscriber to receive events of a specific type. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/registerSubscriberToEvent/).
438
829
  */
439
- async registerSubscriberToEventV2(
830
+ async registerSubscriberToEvent(
440
831
  { body, requestHeaders } = { requestHeaders: {} },
441
832
  { responseHeaders } = { responseHeaders: false }
442
833
  ) {
443
834
  const {
444
835
  error,
445
- } = WebhookPlatformValidator.registerSubscriberToEventV2().validate(
836
+ } = WebhookPlatformValidator.registerSubscriberToEvent().validate(
446
837
  {
447
838
  body,
448
839
  },
@@ -455,7 +846,7 @@ class Webhook {
455
846
  // Showing warrnings if extra unknown parameters are found
456
847
  const {
457
848
  error: warrning,
458
- } = WebhookPlatformValidator.registerSubscriberToEventV2().validate(
849
+ } = WebhookPlatformValidator.registerSubscriberToEvent().validate(
459
850
  {
460
851
  body,
461
852
  },
@@ -464,7 +855,7 @@ class Webhook {
464
855
  if (warrning) {
465
856
  Logger({
466
857
  level: "WARN",
467
- message: `Parameter Validation warrnings for platform > Webhook > registerSubscriberToEventV2 \n ${warrning}`,
858
+ message: `Parameter Validation warrnings for platform > Webhook > registerSubscriberToEvent \n ${warrning}`,
468
859
  });
469
860
  }
470
861
 
@@ -475,7 +866,7 @@ class Webhook {
475
866
  const response = await PlatformAPIClient.execute(
476
867
  this.config,
477
868
  "post",
478
- `/service/platform/webhook/v2.0/company/${this.config.companyId}/subscriber/`,
869
+ `/service/platform/webhook/v1.0/company/${this.config.companyId}/subscriber/`,
479
870
  query_params,
480
871
  body,
481
872
  { ...xHeaders, ...requestHeaders },
@@ -489,7 +880,7 @@ class Webhook {
489
880
 
490
881
  const {
491
882
  error: res_error,
492
- } = WebhookPlatformModel.SubscriberConfigResult().validate(responseData, {
883
+ } = WebhookPlatformModel.SubscriberConfigResponse().validate(responseData, {
493
884
  abortEarly: false,
494
885
  allowUnknown: true,
495
886
  });
@@ -500,7 +891,7 @@ class Webhook {
500
891
  } else {
501
892
  Logger({
502
893
  level: "WARN",
503
- message: `Response Validation Warnings for platform > Webhook > registerSubscriberToEventV2 \n ${res_error}`,
894
+ message: `Response Validation Warnings for platform > Webhook > registerSubscriberToEvent \n ${res_error}`,
504
895
  });
505
896
  }
506
897
  }
@@ -509,21 +900,23 @@ class Webhook {
509
900
  }
510
901
 
511
902
  /**
512
- * @param {WebhookPlatformValidator.UpdateSubscriberConfigParam} arg - Arg object
903
+ * @param {WebhookPlatformValidator.RegisterSubscriberToEventV2Param} arg - Arg object
513
904
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
514
905
  * @param {import("../PlatformAPIClient").Options} - Options
515
- * @returns {Promise<WebhookPlatformModel.SubscriberConfigResult>} - Success response
516
- * @name updateSubscriberConfig
517
- * @summary: Update a subscriber config
518
- * @description: Modify and update subscriber configuration settings. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/updateSubscriberConfig/).
906
+ * @returns {Promise<WebhookPlatformModel.SubscriberConfigResponse>} -
907
+ * Success response
908
+ * @name registerSubscriberToEventV2
909
+ * @summary: Register Subscriber.
910
+ * @description: Register Subscriber.
911
+ * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/registerSubscriberToEventV2/).
519
912
  */
520
- async updateSubscriberConfig(
913
+ async registerSubscriberToEventV2(
521
914
  { body, requestHeaders } = { requestHeaders: {} },
522
915
  { responseHeaders } = { responseHeaders: false }
523
916
  ) {
524
917
  const {
525
918
  error,
526
- } = WebhookPlatformValidator.updateSubscriberConfig().validate(
919
+ } = WebhookPlatformValidator.registerSubscriberToEventV2().validate(
527
920
  {
528
921
  body,
529
922
  },
@@ -536,7 +929,7 @@ class Webhook {
536
929
  // Showing warrnings if extra unknown parameters are found
537
930
  const {
538
931
  error: warrning,
539
- } = WebhookPlatformValidator.updateSubscriberConfig().validate(
932
+ } = WebhookPlatformValidator.registerSubscriberToEventV2().validate(
540
933
  {
541
934
  body,
542
935
  },
@@ -545,7 +938,7 @@ class Webhook {
545
938
  if (warrning) {
546
939
  Logger({
547
940
  level: "WARN",
548
- message: `Parameter Validation warrnings for platform > Webhook > updateSubscriberConfig \n ${warrning}`,
941
+ message: `Parameter Validation warrnings for platform > Webhook > registerSubscriberToEventV2 \n ${warrning}`,
549
942
  });
550
943
  }
551
944
 
@@ -555,8 +948,8 @@ class Webhook {
555
948
 
556
949
  const response = await PlatformAPIClient.execute(
557
950
  this.config,
558
- "put",
559
- `/service/platform/webhook/v1.0/company/${this.config.companyId}/subscriber/`,
951
+ "post",
952
+ `/service/platform/webhook/v2.0/company/${this.config.companyId}/subscriber/`,
560
953
  query_params,
561
954
  body,
562
955
  { ...xHeaders, ...requestHeaders },
@@ -570,7 +963,7 @@ class Webhook {
570
963
 
571
964
  const {
572
965
  error: res_error,
573
- } = WebhookPlatformModel.SubscriberConfigResult().validate(responseData, {
966
+ } = WebhookPlatformModel.SubscriberConfigResponse().validate(responseData, {
574
967
  abortEarly: false,
575
968
  allowUnknown: true,
576
969
  });
@@ -581,7 +974,7 @@ class Webhook {
581
974
  } else {
582
975
  Logger({
583
976
  level: "WARN",
584
- message: `Response Validation Warnings for platform > Webhook > updateSubscriberConfig \n ${res_error}`,
977
+ message: `Response Validation Warnings for platform > Webhook > registerSubscriberToEventV2 \n ${res_error}`,
585
978
  });
586
979
  }
587
980
  }
@@ -590,20 +983,22 @@ class Webhook {
590
983
  }
591
984
 
592
985
  /**
593
- * @param {WebhookPlatformValidator.UpdateSubscriberV2Param} arg - Arg object
986
+ * @param {WebhookPlatformValidator.UpdateSubscriberConfigParam} arg - Arg object
594
987
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
595
988
  * @param {import("../PlatformAPIClient").Options} - Options
596
- * @returns {Promise<WebhookPlatformModel.SubscriberConfigResult>} - Success response
597
- * @name updateSubscriberV2
598
- * @summary: Update Subscriber.
599
- * @description: Update Subscriber.
600
- * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/updateSubscriberV2/).
989
+ * @returns {Promise<WebhookPlatformModel.SubscriberConfigResponse>} -
990
+ * Success response
991
+ * @name updateSubscriberConfig
992
+ * @summary: Update a subscriber config
993
+ * @description: Modify and update subscriber configuration settings. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/updateSubscriberConfig/).
601
994
  */
602
- async updateSubscriberV2(
995
+ async updateSubscriberConfig(
603
996
  { body, requestHeaders } = { requestHeaders: {} },
604
997
  { responseHeaders } = { responseHeaders: false }
605
998
  ) {
606
- const { error } = WebhookPlatformValidator.updateSubscriberV2().validate(
999
+ const {
1000
+ error,
1001
+ } = WebhookPlatformValidator.updateSubscriberConfig().validate(
607
1002
  {
608
1003
  body,
609
1004
  },
@@ -616,7 +1011,7 @@ class Webhook {
616
1011
  // Showing warrnings if extra unknown parameters are found
617
1012
  const {
618
1013
  error: warrning,
619
- } = WebhookPlatformValidator.updateSubscriberV2().validate(
1014
+ } = WebhookPlatformValidator.updateSubscriberConfig().validate(
620
1015
  {
621
1016
  body,
622
1017
  },
@@ -625,7 +1020,7 @@ class Webhook {
625
1020
  if (warrning) {
626
1021
  Logger({
627
1022
  level: "WARN",
628
- message: `Parameter Validation warrnings for platform > Webhook > updateSubscriberV2 \n ${warrning}`,
1023
+ message: `Parameter Validation warrnings for platform > Webhook > updateSubscriberConfig \n ${warrning}`,
629
1024
  });
630
1025
  }
631
1026
 
@@ -636,7 +1031,7 @@ class Webhook {
636
1031
  const response = await PlatformAPIClient.execute(
637
1032
  this.config,
638
1033
  "put",
639
- `/service/platform/webhook/v2.0/company/${this.config.companyId}/subscriber/`,
1034
+ `/service/platform/webhook/v1.0/company/${this.config.companyId}/subscriber/`,
640
1035
  query_params,
641
1036
  body,
642
1037
  { ...xHeaders, ...requestHeaders },
@@ -650,7 +1045,7 @@ class Webhook {
650
1045
 
651
1046
  const {
652
1047
  error: res_error,
653
- } = WebhookPlatformModel.SubscriberConfigResult().validate(responseData, {
1048
+ } = WebhookPlatformModel.SubscriberConfigResponse().validate(responseData, {
654
1049
  abortEarly: false,
655
1050
  allowUnknown: true,
656
1051
  });
@@ -661,7 +1056,7 @@ class Webhook {
661
1056
  } else {
662
1057
  Logger({
663
1058
  level: "WARN",
664
- message: `Response Validation Warnings for platform > Webhook > updateSubscriberV2 \n ${res_error}`,
1059
+ message: `Response Validation Warnings for platform > Webhook > updateSubscriberConfig \n ${res_error}`,
665
1060
  });
666
1061
  }
667
1062
  }
@@ -670,21 +1065,21 @@ class Webhook {
670
1065
  }
671
1066
 
672
1067
  /**
673
- * @param {WebhookPlatformValidator.UpsertSubscriberEventParam} arg - Arg object
1068
+ * @param {WebhookPlatformValidator.UpdateSubscriberV2Param} arg - Arg object
674
1069
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
675
1070
  * @param {import("../PlatformAPIClient").Options} - Options
676
- * @returns {Promise<WebhookPlatformModel.UpsertSubscriberConfigResult>} -
1071
+ * @returns {Promise<WebhookPlatformModel.SubscriberConfigResponse>} -
677
1072
  * Success response
678
- * @name upsertSubscriberEvent
679
- * @summary: Register Subscriber.
680
- * @description: Register Subscriber.
681
- * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/upsertSubscriberEvent/).
1073
+ * @name updateSubscriberV2
1074
+ * @summary: Update Subscriber.
1075
+ * @description: Update Subscriber.
1076
+ * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/updateSubscriberV2/).
682
1077
  */
683
- async upsertSubscriberEvent(
1078
+ async updateSubscriberV2(
684
1079
  { body, requestHeaders } = { requestHeaders: {} },
685
1080
  { responseHeaders } = { responseHeaders: false }
686
1081
  ) {
687
- const { error } = WebhookPlatformValidator.upsertSubscriberEvent().validate(
1082
+ const { error } = WebhookPlatformValidator.updateSubscriberV2().validate(
688
1083
  {
689
1084
  body,
690
1085
  },
@@ -697,7 +1092,7 @@ class Webhook {
697
1092
  // Showing warrnings if extra unknown parameters are found
698
1093
  const {
699
1094
  error: warrning,
700
- } = WebhookPlatformValidator.upsertSubscriberEvent().validate(
1095
+ } = WebhookPlatformValidator.updateSubscriberV2().validate(
701
1096
  {
702
1097
  body,
703
1098
  },
@@ -706,7 +1101,7 @@ class Webhook {
706
1101
  if (warrning) {
707
1102
  Logger({
708
1103
  level: "WARN",
709
- message: `Parameter Validation warrnings for platform > Webhook > upsertSubscriberEvent \n ${warrning}`,
1104
+ message: `Parameter Validation warrnings for platform > Webhook > updateSubscriberV2 \n ${warrning}`,
710
1105
  });
711
1106
  }
712
1107
 
@@ -717,7 +1112,7 @@ class Webhook {
717
1112
  const response = await PlatformAPIClient.execute(
718
1113
  this.config,
719
1114
  "put",
720
- `/service/platform/webhook/v3.0/company/${this.config.companyId}/subscriber/`,
1115
+ `/service/platform/webhook/v2.0/company/${this.config.companyId}/subscriber/`,
721
1116
  query_params,
722
1117
  body,
723
1118
  { ...xHeaders, ...requestHeaders },
@@ -731,10 +1126,10 @@ class Webhook {
731
1126
 
732
1127
  const {
733
1128
  error: res_error,
734
- } = WebhookPlatformModel.UpsertSubscriberConfigResult().validate(
735
- responseData,
736
- { abortEarly: false, allowUnknown: true }
737
- );
1129
+ } = WebhookPlatformModel.SubscriberConfigResponse().validate(responseData, {
1130
+ abortEarly: false,
1131
+ allowUnknown: true,
1132
+ });
738
1133
 
739
1134
  if (res_error) {
740
1135
  if (this.config.options.strictResponseCheck === true) {
@@ -742,7 +1137,7 @@ class Webhook {
742
1137
  } else {
743
1138
  Logger({
744
1139
  level: "WARN",
745
- message: `Response Validation Warnings for platform > Webhook > upsertSubscriberEvent \n ${res_error}`,
1140
+ message: `Response Validation Warnings for platform > Webhook > updateSubscriberV2 \n ${res_error}`,
746
1141
  });
747
1142
  }
748
1143
  }