@gofynd/fdk-client-javascript 1.1.6 → 1.2.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 (321) hide show
  1. package/README.md +12 -0
  2. package/index.js +0 -3
  3. package/package.json +1 -1
  4. package/sdk/application/ApplicationAPIClient.d.ts +15 -1
  5. package/sdk/application/ApplicationAPIClient.js +8 -1
  6. package/sdk/application/ApplicationClient.d.ts +37 -6
  7. package/sdk/application/ApplicationClient.js +31 -0
  8. package/sdk/application/ApplicationConfig.d.ts +52 -12
  9. package/sdk/application/ApplicationConfig.js +37 -2
  10. package/sdk/application/ApplicationModels.d.ts +46 -1
  11. package/sdk/application/ApplicationModels.js +18 -0
  12. package/sdk/application/Cart/CartApplicationClient.d.ts +172 -357
  13. package/sdk/application/Cart/CartApplicationClient.js +620 -483
  14. package/sdk/application/Cart/CartApplicationModel.d.ts +2054 -96
  15. package/sdk/application/Cart/CartApplicationModel.js +1224 -93
  16. package/sdk/application/Cart/CartApplicationValidator.d.ts +508 -30
  17. package/sdk/application/Cart/CartApplicationValidator.js +270 -15
  18. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +234 -413
  19. package/sdk/application/Catalog/CatalogApplicationClient.js +777 -630
  20. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +2218 -117
  21. package/sdk/application/Catalog/CatalogApplicationModel.js +1499 -170
  22. package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +798 -31
  23. package/sdk/application/Catalog/CatalogApplicationValidator.js +318 -3
  24. package/sdk/application/Common/CommonApplicationClient.d.ts +14 -21
  25. package/sdk/application/Common/CommonApplicationClient.js +50 -33
  26. package/sdk/application/Common/CommonApplicationModel.d.ts +448 -19
  27. package/sdk/application/Common/CommonApplicationModel.js +224 -16
  28. package/sdk/application/Common/CommonApplicationValidator.d.ts +42 -4
  29. package/sdk/application/Common/CommonApplicationValidator.js +21 -3
  30. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +25 -18
  31. package/sdk/application/Communication/CommunicationApplicationClient.js +74 -47
  32. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +190 -14
  33. package/sdk/application/Communication/CommunicationApplicationModel.js +124 -7
  34. package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +27 -4
  35. package/sdk/application/Communication/CommunicationApplicationValidator.js +21 -5
  36. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +113 -112
  37. package/sdk/application/Configuration/ConfigurationApplicationClient.js +381 -260
  38. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +2453 -110
  39. package/sdk/application/Configuration/ConfigurationApplicationModel.js +1254 -108
  40. package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +160 -8
  41. package/sdk/application/Configuration/ConfigurationApplicationValidator.js +88 -4
  42. package/sdk/application/Content/ContentApplicationClient.d.ts +120 -138
  43. package/sdk/application/Content/ContentApplicationClient.js +409 -277
  44. package/sdk/application/Content/ContentApplicationModel.d.ts +1627 -105
  45. package/sdk/application/Content/ContentApplicationModel.js +1202 -109
  46. package/sdk/application/Content/ContentApplicationValidator.d.ts +214 -12
  47. package/sdk/application/Content/ContentApplicationValidator.js +113 -3
  48. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +20 -29
  49. package/sdk/application/FileStorage/FileStorageApplicationClient.js +68 -47
  50. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +299 -20
  51. package/sdk/application/FileStorage/FileStorageApplicationModel.js +209 -16
  52. package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +55 -5
  53. package/sdk/application/FileStorage/FileStorageApplicationValidator.js +33 -6
  54. package/sdk/application/Lead/LeadApplicationClient.d.ts +50 -53
  55. package/sdk/application/Lead/LeadApplicationClient.js +169 -103
  56. package/sdk/application/Lead/LeadApplicationModel.d.ts +1405 -54
  57. package/sdk/application/Lead/LeadApplicationModel.js +619 -73
  58. package/sdk/application/Lead/LeadApplicationValidator.d.ts +91 -9
  59. package/sdk/application/Lead/LeadApplicationValidator.js +51 -6
  60. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +34 -33
  61. package/sdk/application/Logistic/LogisticApplicationClient.js +110 -73
  62. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +399 -28
  63. package/sdk/application/Logistic/LogisticApplicationModel.js +293 -24
  64. package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +48 -6
  65. package/sdk/application/Logistic/LogisticApplicationValidator.js +34 -6
  66. package/sdk/application/Order/OrderApplicationClient.d.ts +81 -133
  67. package/sdk/application/Order/OrderApplicationClient.js +297 -217
  68. package/sdk/application/Order/OrderApplicationModel.d.ts +1101 -66
  69. package/sdk/application/Order/OrderApplicationModel.js +776 -57
  70. package/sdk/application/Order/OrderApplicationValidator.d.ts +249 -14
  71. package/sdk/application/Order/OrderApplicationValidator.js +114 -5
  72. package/sdk/application/Payment/PaymentApplicationClient.d.ts +341 -356
  73. package/sdk/application/Payment/PaymentApplicationClient.js +1077 -703
  74. package/sdk/application/Payment/PaymentApplicationModel.d.ts +3125 -99
  75. package/sdk/application/Payment/PaymentApplicationModel.js +1158 -62
  76. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +494 -41
  77. package/sdk/application/Payment/PaymentApplicationValidator.js +297 -25
  78. package/sdk/application/PosCart/PosCartApplicationClient.d.ts +178 -350
  79. package/sdk/application/PosCart/PosCartApplicationClient.js +636 -491
  80. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1823 -89
  81. package/sdk/application/PosCart/PosCartApplicationModel.js +1117 -85
  82. package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +480 -29
  83. package/sdk/application/PosCart/PosCartApplicationValidator.js +262 -15
  84. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +49 -47
  85. package/sdk/application/Rewards/RewardsApplicationClient.js +160 -102
  86. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +343 -22
  87. package/sdk/application/Rewards/RewardsApplicationModel.js +230 -15
  88. package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +70 -7
  89. package/sdk/application/Rewards/RewardsApplicationValidator.js +45 -6
  90. package/sdk/application/Share/ShareApplicationClient.d.ts +44 -50
  91. package/sdk/application/Share/ShareApplicationClient.js +165 -97
  92. package/sdk/application/Share/ShareApplicationModel.d.ts +230 -15
  93. package/sdk/application/Share/ShareApplicationModel.js +154 -16
  94. package/sdk/application/Share/ShareApplicationValidator.d.ts +86 -8
  95. package/sdk/application/Share/ShareApplicationValidator.js +48 -4
  96. package/sdk/application/Theme/ThemeApplicationClient.d.ts +25 -27
  97. package/sdk/application/Theme/ThemeApplicationClient.js +83 -54
  98. package/sdk/application/Theme/ThemeApplicationModel.d.ts +621 -48
  99. package/sdk/application/Theme/ThemeApplicationModel.js +464 -40
  100. package/sdk/application/Theme/ThemeApplicationValidator.d.ts +49 -5
  101. package/sdk/application/Theme/ThemeApplicationValidator.js +26 -3
  102. package/sdk/application/User/UserApplicationClient.d.ts +219 -303
  103. package/sdk/application/User/UserApplicationClient.js +819 -522
  104. package/sdk/application/User/UserApplicationModel.d.ts +1390 -101
  105. package/sdk/application/User/UserApplicationModel.js +983 -44
  106. package/sdk/application/User/UserApplicationValidator.d.ts +457 -33
  107. package/sdk/application/User/UserApplicationValidator.js +265 -31
  108. package/sdk/common/AxiosHelper.js +8 -2
  109. package/sdk/common/Paginator.d.ts +27 -12
  110. package/sdk/common/Paginator.js +15 -0
  111. package/sdk/common/RequestSigner.js +0 -1
  112. package/sdk/partner/PartnerAPIClient.d.ts +15 -1
  113. package/sdk/partner/PartnerAPIClient.js +8 -1
  114. package/sdk/partner/PartnerClient.d.ts +20 -3
  115. package/sdk/partner/PartnerClient.js +17 -0
  116. package/sdk/partner/PartnerConfig.d.ts +40 -14
  117. package/sdk/partner/PartnerConfig.js +31 -6
  118. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +26 -25
  119. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +82 -53
  120. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +202 -17
  121. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +139 -10
  122. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +42 -5
  123. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +26 -4
  124. package/sdk/platform/Billing/BillingPlatformClient.d.ts +88 -97
  125. package/sdk/platform/Billing/BillingPlatformClient.js +310 -191
  126. package/sdk/platform/Billing/BillingPlatformModel.d.ts +1211 -68
  127. package/sdk/platform/Billing/BillingPlatformModel.js +824 -59
  128. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +153 -12
  129. package/sdk/platform/Billing/BillingPlatformValidator.js +87 -8
  130. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +392 -634
  131. package/sdk/platform/Cart/CartPlatformApplicationClient.js +1480 -957
  132. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +827 -57
  133. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +492 -34
  134. package/sdk/platform/Cart/CartPlatformModel.d.ts +3639 -175
  135. package/sdk/platform/Cart/CartPlatformModel.js +2368 -212
  136. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +438 -615
  137. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1449 -984
  138. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +1081 -49
  139. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +482 -23
  140. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +573 -824
  141. package/sdk/platform/Catalog/CatalogPlatformClient.js +1773 -1264
  142. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6871 -326
  143. package/sdk/platform/Catalog/CatalogPlatformModel.js +4215 -349
  144. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +1331 -71
  145. package/sdk/platform/Catalog/CatalogPlatformValidator.js +611 -30
  146. package/sdk/platform/Common/CommonPlatformClient.d.ts +14 -21
  147. package/sdk/platform/Common/CommonPlatformClient.js +48 -33
  148. package/sdk/platform/Common/CommonPlatformModel.d.ts +448 -19
  149. package/sdk/platform/Common/CommonPlatformModel.js +224 -16
  150. package/sdk/platform/Common/CommonPlatformValidator.d.ts +42 -4
  151. package/sdk/platform/Common/CommonPlatformValidator.js +21 -3
  152. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +457 -279
  153. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +1423 -553
  154. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +581 -42
  155. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +294 -22
  156. package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +18 -5
  157. package/sdk/platform/Communication/CommunicationPlatformClient.js +58 -19
  158. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1630 -102
  159. package/sdk/platform/Communication/CommunicationPlatformModel.js +1150 -85
  160. package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +16 -3
  161. package/sdk/platform/Communication/CommunicationPlatformValidator.js +11 -3
  162. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +102 -111
  163. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +321 -225
  164. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +830 -43
  165. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +612 -78
  166. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +180 -13
  167. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +98 -10
  168. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +232 -212
  169. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +737 -438
  170. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +293 -22
  171. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +184 -17
  172. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +166 -178
  173. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +519 -310
  174. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +4504 -188
  175. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2242 -204
  176. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +332 -19
  177. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +153 -10
  178. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +495 -560
  179. package/sdk/platform/Content/ContentPlatformApplicationClient.js +1777 -987
  180. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +872 -62
  181. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +487 -35
  182. package/sdk/platform/Content/ContentPlatformModel.d.ts +1661 -108
  183. package/sdk/platform/Content/ContentPlatformModel.js +1217 -113
  184. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +67 -101
  185. package/sdk/platform/Discount/DiscountPlatformClient.js +240 -176
  186. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +242 -15
  187. package/sdk/platform/Discount/DiscountPlatformModel.js +162 -10
  188. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +185 -13
  189. package/sdk/platform/Discount/DiscountPlatformValidator.js +88 -8
  190. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +32 -41
  191. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +106 -74
  192. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +77 -6
  193. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +41 -6
  194. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +39 -54
  195. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +124 -99
  196. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +299 -20
  197. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +207 -16
  198. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +98 -8
  199. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +54 -7
  200. package/sdk/platform/Finance/FinancePlatformClient.d.ts +85 -91
  201. package/sdk/platform/Finance/FinancePlatformClient.js +272 -180
  202. package/sdk/platform/Finance/FinancePlatformModel.d.ts +619 -50
  203. package/sdk/platform/Finance/FinancePlatformModel.js +458 -30
  204. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +123 -15
  205. package/sdk/platform/Finance/FinancePlatformValidator.js +95 -16
  206. package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +99 -97
  207. package/sdk/platform/Inventory/InventoryPlatformClient.js +288 -199
  208. package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +1354 -61
  209. package/sdk/platform/Inventory/InventoryPlatformModel.js +916 -83
  210. package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +168 -12
  211. package/sdk/platform/Inventory/InventoryPlatformValidator.js +82 -6
  212. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +86 -106
  213. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +326 -186
  214. package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +180 -14
  215. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +94 -9
  216. package/sdk/platform/Lead/LeadPlatformClient.d.ts +75 -101
  217. package/sdk/platform/Lead/LeadPlatformClient.js +240 -174
  218. package/sdk/platform/Lead/LeadPlatformModel.d.ts +1403 -54
  219. package/sdk/platform/Lead/LeadPlatformModel.js +618 -73
  220. package/sdk/platform/Lead/LeadPlatformValidator.d.ts +173 -12
  221. package/sdk/platform/Lead/LeadPlatformValidator.js +85 -8
  222. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +18 -14
  223. package/sdk/platform/Order/OrderPlatformApplicationClient.js +56 -29
  224. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +26 -4
  225. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +16 -3
  226. package/sdk/platform/Order/OrderPlatformClient.d.ts +343 -556
  227. package/sdk/platform/Order/OrderPlatformClient.js +969 -762
  228. package/sdk/platform/Order/OrderPlatformModel.d.ts +4967 -247
  229. package/sdk/platform/Order/OrderPlatformModel.js +3249 -259
  230. package/sdk/platform/Order/OrderPlatformValidator.d.ts +758 -37
  231. package/sdk/platform/Order/OrderPlatformValidator.js +351 -22
  232. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +28 -36
  233. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +103 -59
  234. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +66 -6
  235. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +32 -4
  236. package/sdk/platform/Partner/PartnerPlatformClient.d.ts +68 -107
  237. package/sdk/platform/Partner/PartnerPlatformClient.js +253 -174
  238. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +767 -45
  239. package/sdk/platform/Partner/PartnerPlatformModel.js +524 -41
  240. package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +207 -13
  241. package/sdk/platform/Partner/PartnerPlatformValidator.js +87 -5
  242. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +255 -260
  243. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +860 -504
  244. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +348 -30
  245. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +221 -19
  246. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +73 -73
  247. package/sdk/platform/Payment/PaymentPlatformClient.js +238 -154
  248. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2658 -93
  249. package/sdk/platform/Payment/PaymentPlatformModel.js +1035 -36
  250. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +111 -11
  251. package/sdk/platform/Payment/PaymentPlatformValidator.js +68 -7
  252. package/sdk/platform/PlatformAPIClient.d.ts +16 -1
  253. package/sdk/platform/PlatformAPIClient.js +9 -1
  254. package/sdk/platform/PlatformApplicationClient.d.ts +22 -1798
  255. package/sdk/platform/PlatformApplicationClient.js +17 -1899
  256. package/sdk/platform/PlatformClient.d.ts +29 -12579
  257. package/sdk/platform/PlatformClient.js +26 -15085
  258. package/sdk/platform/PlatformConfig.d.ts +37 -11
  259. package/sdk/platform/PlatformConfig.js +32 -6
  260. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +80 -92
  261. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +307 -177
  262. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +149 -12
  263. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +82 -8
  264. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +371 -23
  265. package/sdk/platform/Rewards/RewardsPlatformModel.js +246 -16
  266. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +120 -89
  267. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +349 -201
  268. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +128 -12
  269. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +85 -11
  270. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +148 -178
  271. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +454 -329
  272. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1399 -96
  273. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1022 -71
  274. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +280 -18
  275. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +134 -11
  276. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +38 -47
  277. package/sdk/platform/Share/SharePlatformApplicationClient.js +137 -73
  278. package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +87 -7
  279. package/sdk/platform/Share/SharePlatformApplicationValidator.js +42 -5
  280. package/sdk/platform/Share/SharePlatformModel.d.ts +250 -16
  281. package/sdk/platform/Share/SharePlatformModel.js +165 -17
  282. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +149 -183
  283. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +579 -330
  284. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +308 -24
  285. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +162 -10
  286. package/sdk/platform/Theme/ThemePlatformModel.d.ts +621 -48
  287. package/sdk/platform/Theme/ThemePlatformModel.js +464 -40
  288. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +119 -151
  289. package/sdk/platform/User/UserPlatformApplicationClient.js +411 -244
  290. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +235 -18
  291. package/sdk/platform/User/UserPlatformApplicationValidator.js +126 -12
  292. package/sdk/platform/User/UserPlatformModel.d.ts +1390 -101
  293. package/sdk/platform/User/UserPlatformModel.js +983 -44
  294. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +38 -47
  295. package/sdk/platform/Webhook/WebhookPlatformClient.js +137 -87
  296. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +242 -16
  297. package/sdk/platform/Webhook/WebhookPlatformModel.js +167 -18
  298. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +83 -7
  299. package/sdk/platform/Webhook/WebhookPlatformValidator.js +43 -5
  300. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +14 -21
  301. package/sdk/public/Configuration/ConfigurationPublicClient.js +46 -33
  302. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +473 -19
  303. package/sdk/public/Configuration/ConfigurationPublicModel.js +224 -16
  304. package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +42 -4
  305. package/sdk/public/Configuration/ConfigurationPublicValidator.js +21 -3
  306. package/sdk/public/Inventory/InventoryPublicClient.d.ts +48 -48
  307. package/sdk/public/Inventory/InventoryPublicClient.js +146 -98
  308. package/sdk/public/Inventory/InventoryPublicModel.d.ts +392 -21
  309. package/sdk/public/Inventory/InventoryPublicModel.js +267 -27
  310. package/sdk/public/Inventory/InventoryPublicValidator.d.ts +90 -8
  311. package/sdk/public/Inventory/InventoryPublicValidator.js +44 -4
  312. package/sdk/public/PublicClient.d.ts +19 -3
  313. package/sdk/public/PublicClient.js +16 -0
  314. package/sdk/public/PublicConfig.d.ts +27 -6
  315. package/sdk/public/PublicConfig.js +17 -1
  316. package/sdk/public/Webhook/WebhookPublicClient.d.ts +13 -11
  317. package/sdk/public/Webhook/WebhookPublicClient.js +42 -27
  318. package/sdk/public/Webhook/WebhookPublicModel.d.ts +242 -16
  319. package/sdk/public/Webhook/WebhookPublicModel.js +167 -18
  320. package/sdk/public/Webhook/WebhookPublicValidator.d.ts +18 -3
  321. package/sdk/public/Webhook/WebhookPublicValidator.js +14 -4
@@ -1,8 +1,8 @@
1
1
  const PlatformAPIClient = require("../PlatformAPIClient");
2
2
  const { FDKClientValidationError } = require("../../common/FDKError");
3
3
  const Paginator = require("../../common/Paginator");
4
- const BillingValidator = require("./BillingPlatformValidator");
5
- const BillingModel = require("./BillingPlatformModel");
4
+ const BillingPlatformValidator = require("./BillingPlatformValidator");
5
+ const BillingPlatformModel = require("./BillingPlatformModel");
6
6
  const { Logger } = require("./../../common/Logger");
7
7
  const Joi = require("joi");
8
8
 
@@ -12,14 +12,20 @@ class Billing {
12
12
  }
13
13
 
14
14
  /**
15
- * @param {Object} arg - Arg object.
16
- * @param {SubscriptionActivateReq} arg.body
17
- * @returns {Promise<SubscriptionActivateRes>} - Success response
15
+ * @param {BillingPlatformValidator.ActivateSubscriptionPlanParam} arg - Arg object
16
+ * @param {import("../PlatformAPIClient").Options} - Options
17
+ * @returns {Promise<BillingPlatformModel.SubscriptionActivateRes>} - Success response
18
+ * @name activateSubscriptionPlan
18
19
  * @summary: Activate subscription
19
- * @description: It will activate subscription plan for customer
20
+ * @description: It will activate subscription plan for customer - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/activateSubscriptionPlan/).
20
21
  */
21
- async activateSubscriptionPlan({ body } = {}) {
22
- const { error } = BillingValidator.activateSubscriptionPlan().validate(
22
+ async activateSubscriptionPlan(
23
+ { body } = {},
24
+ { headers } = { headers: false }
25
+ ) {
26
+ const {
27
+ error,
28
+ } = BillingPlatformValidator.activateSubscriptionPlan().validate(
23
29
  {
24
30
  body,
25
31
  },
@@ -32,7 +38,7 @@ class Billing {
32
38
  // Showing warrnings if extra unknown parameters are found
33
39
  const {
34
40
  error: warrning,
35
- } = BillingValidator.activateSubscriptionPlan().validate(
41
+ } = BillingPlatformValidator.activateSubscriptionPlan().validate(
36
42
  {
37
43
  body,
38
44
  },
@@ -41,9 +47,8 @@ class Billing {
41
47
  if (warrning) {
42
48
  Logger({
43
49
  level: "WARN",
44
- message: "Parameter Validation warrnings for activateSubscriptionPlan",
50
+ message: `Parameter Validation warrnings for platform > Billing > activateSubscriptionPlan \n ${warrning}`,
45
51
  });
46
- Logger({ level: "WARN", message: warrning });
47
52
  }
48
53
 
49
54
  const query_params = {};
@@ -56,12 +61,18 @@ class Billing {
56
61
  `/service/platform/billing/v1.0/company/${this.config.companyId}/subscription/activate`,
57
62
  query_params,
58
63
  body,
59
- xHeaders
64
+ xHeaders,
65
+ { headers }
60
66
  );
61
67
 
68
+ let responseData = response;
69
+ if (headers) {
70
+ responseData = response[0];
71
+ }
72
+
62
73
  const {
63
74
  error: res_error,
64
- } = BillingModel.SubscriptionActivateRes().validate(response, {
75
+ } = BillingPlatformModel.SubscriptionActivateRes().validate(responseData, {
65
76
  abortEarly: false,
66
77
  allowUnknown: false,
67
78
  });
@@ -69,24 +80,28 @@ class Billing {
69
80
  if (res_error) {
70
81
  Logger({
71
82
  level: "WARN",
72
- message: "Response Validation Warnnings for activateSubscriptionPlan",
83
+ message: `Response Validation Warnnings for platform > Billing > activateSubscriptionPlan \n ${res_error}`,
73
84
  });
74
- Logger({ level: "WARN", message: res_error });
75
85
  }
76
86
 
77
87
  return response;
78
88
  }
79
89
 
80
90
  /**
81
- * @param {Object} arg - Arg object.
82
- * @param {string} arg.extensionId - Extension _id
83
- * @param {string} arg.subscriptionId - Subscription charge _id
84
- * @returns {Promise<EntitySubscription>} - Success response
91
+ * @param {BillingPlatformValidator.CancelSubscriptionChargeParam} arg - Arg object
92
+ * @param {import("../PlatformAPIClient").Options} - Options
93
+ * @returns {Promise<BillingPlatformModel.EntitySubscription>} - Success response
94
+ * @name cancelSubscriptionCharge
85
95
  * @summary: Cancel subscription charge
86
- * @description: Cancel subscription and attached charges.
96
+ * @description: Cancel subscription and attached charges. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/cancelSubscriptionCharge/).
87
97
  */
88
- async cancelSubscriptionCharge({ extensionId, subscriptionId } = {}) {
89
- const { error } = BillingValidator.cancelSubscriptionCharge().validate(
98
+ async cancelSubscriptionCharge(
99
+ { extensionId, subscriptionId } = {},
100
+ { headers } = { headers: false }
101
+ ) {
102
+ const {
103
+ error,
104
+ } = BillingPlatformValidator.cancelSubscriptionCharge().validate(
90
105
  {
91
106
  extensionId,
92
107
  subscriptionId,
@@ -100,7 +115,7 @@ class Billing {
100
115
  // Showing warrnings if extra unknown parameters are found
101
116
  const {
102
117
  error: warrning,
103
- } = BillingValidator.cancelSubscriptionCharge().validate(
118
+ } = BillingPlatformValidator.cancelSubscriptionCharge().validate(
104
119
  {
105
120
  extensionId,
106
121
  subscriptionId,
@@ -110,9 +125,8 @@ class Billing {
110
125
  if (warrning) {
111
126
  Logger({
112
127
  level: "WARN",
113
- message: "Parameter Validation warrnings for cancelSubscriptionCharge",
128
+ message: `Parameter Validation warrnings for platform > Billing > cancelSubscriptionCharge \n ${warrning}`,
114
129
  });
115
- Logger({ level: "WARN", message: warrning });
116
130
  }
117
131
 
118
132
  const query_params = {};
@@ -125,12 +139,18 @@ class Billing {
125
139
  `/service/platform/billing/v1.0/company/${this.config.companyId}/extension/${extensionId}/subscription/${subscriptionId}/cancel`,
126
140
  query_params,
127
141
  undefined,
128
- xHeaders
142
+ xHeaders,
143
+ { headers }
129
144
  );
130
145
 
146
+ let responseData = response;
147
+ if (headers) {
148
+ responseData = response[0];
149
+ }
150
+
131
151
  const {
132
152
  error: res_error,
133
- } = BillingModel.EntitySubscription().validate(response, {
153
+ } = BillingPlatformModel.EntitySubscription().validate(responseData, {
134
154
  abortEarly: false,
135
155
  allowUnknown: false,
136
156
  });
@@ -138,23 +158,28 @@ class Billing {
138
158
  if (res_error) {
139
159
  Logger({
140
160
  level: "WARN",
141
- message: "Response Validation Warnnings for cancelSubscriptionCharge",
161
+ message: `Response Validation Warnnings for platform > Billing > cancelSubscriptionCharge \n ${res_error}`,
142
162
  });
143
- Logger({ level: "WARN", message: res_error });
144
163
  }
145
164
 
146
165
  return response;
147
166
  }
148
167
 
149
168
  /**
150
- * @param {Object} arg - Arg object.
151
- * @param {CancelSubscriptionReq} arg.body
152
- * @returns {Promise<CancelSubscriptionRes>} - Success response
169
+ * @param {BillingPlatformValidator.CancelSubscriptionPlanParam} arg - Arg object
170
+ * @param {import("../PlatformAPIClient").Options} - Options
171
+ * @returns {Promise<BillingPlatformModel.CancelSubscriptionRes>} - Success response
172
+ * @name cancelSubscriptionPlan
153
173
  * @summary: Cancel subscription
154
- * @description: It will cancel current active subscription.
174
+ * @description: It will cancel current active subscription. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/cancelSubscriptionPlan/).
155
175
  */
156
- async cancelSubscriptionPlan({ body } = {}) {
157
- const { error } = BillingValidator.cancelSubscriptionPlan().validate(
176
+ async cancelSubscriptionPlan(
177
+ { body } = {},
178
+ { headers } = { headers: false }
179
+ ) {
180
+ const {
181
+ error,
182
+ } = BillingPlatformValidator.cancelSubscriptionPlan().validate(
158
183
  {
159
184
  body,
160
185
  },
@@ -167,7 +192,7 @@ class Billing {
167
192
  // Showing warrnings if extra unknown parameters are found
168
193
  const {
169
194
  error: warrning,
170
- } = BillingValidator.cancelSubscriptionPlan().validate(
195
+ } = BillingPlatformValidator.cancelSubscriptionPlan().validate(
171
196
  {
172
197
  body,
173
198
  },
@@ -176,9 +201,8 @@ class Billing {
176
201
  if (warrning) {
177
202
  Logger({
178
203
  level: "WARN",
179
- message: "Parameter Validation warrnings for cancelSubscriptionPlan",
204
+ message: `Parameter Validation warrnings for platform > Billing > cancelSubscriptionPlan \n ${warrning}`,
180
205
  });
181
- Logger({ level: "WARN", message: warrning });
182
206
  }
183
207
 
184
208
  const query_params = {};
@@ -191,12 +215,18 @@ class Billing {
191
215
  `/service/platform/billing/v1.0/company/${this.config.companyId}/subscription/cancel`,
192
216
  query_params,
193
217
  body,
194
- xHeaders
218
+ xHeaders,
219
+ { headers }
195
220
  );
196
221
 
222
+ let responseData = response;
223
+ if (headers) {
224
+ responseData = response[0];
225
+ }
226
+
197
227
  const {
198
228
  error: res_error,
199
- } = BillingModel.CancelSubscriptionRes().validate(response, {
229
+ } = BillingPlatformModel.CancelSubscriptionRes().validate(responseData, {
200
230
  abortEarly: false,
201
231
  allowUnknown: false,
202
232
  });
@@ -204,24 +234,26 @@ class Billing {
204
234
  if (res_error) {
205
235
  Logger({
206
236
  level: "WARN",
207
- message: "Response Validation Warnnings for cancelSubscriptionPlan",
237
+ message: `Response Validation Warnnings for platform > Billing > cancelSubscriptionPlan \n ${res_error}`,
208
238
  });
209
- Logger({ level: "WARN", message: res_error });
210
239
  }
211
240
 
212
241
  return response;
213
242
  }
214
243
 
215
244
  /**
216
- * @param {Object} arg - Arg object.
217
- * @param {string} arg.plan - ID of the plan.
218
- * @param {string} arg.couponCode - Coupon code.
219
- * @returns {Promise<CheckValidityResponse>} - Success response
245
+ * @param {BillingPlatformValidator.CheckCouponValidityParam} arg - Arg object
246
+ * @param {import("../PlatformAPIClient").Options} - Options
247
+ * @returns {Promise<BillingPlatformModel.CheckValidityResponse>} - Success response
248
+ * @name checkCouponValidity
220
249
  * @summary: Check coupon validity
221
- * @description: Check coupon validity.
250
+ * @description: Check coupon validity. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/checkCouponValidity/).
222
251
  */
223
- async checkCouponValidity({ plan, couponCode } = {}) {
224
- const { error } = BillingValidator.checkCouponValidity().validate(
252
+ async checkCouponValidity(
253
+ { plan, couponCode } = {},
254
+ { headers } = { headers: false }
255
+ ) {
256
+ const { error } = BillingPlatformValidator.checkCouponValidity().validate(
225
257
  {
226
258
  plan,
227
259
  couponCode,
@@ -233,7 +265,9 @@ class Billing {
233
265
  }
234
266
 
235
267
  // Showing warrnings if extra unknown parameters are found
236
- const { error: warrning } = BillingValidator.checkCouponValidity().validate(
268
+ const {
269
+ error: warrning,
270
+ } = BillingPlatformValidator.checkCouponValidity().validate(
237
271
  {
238
272
  plan,
239
273
  couponCode,
@@ -243,9 +277,8 @@ class Billing {
243
277
  if (warrning) {
244
278
  Logger({
245
279
  level: "WARN",
246
- message: "Parameter Validation warrnings for checkCouponValidity",
280
+ message: `Parameter Validation warrnings for platform > Billing > checkCouponValidity \n ${warrning}`,
247
281
  });
248
- Logger({ level: "WARN", message: warrning });
249
282
  }
250
283
 
251
284
  const query_params = {};
@@ -260,12 +293,18 @@ class Billing {
260
293
  `/service/platform/billing/v1.0/company/${this.config.companyId}/coupon/check-validity`,
261
294
  query_params,
262
295
  undefined,
263
- xHeaders
296
+ xHeaders,
297
+ { headers }
264
298
  );
265
299
 
300
+ let responseData = response;
301
+ if (headers) {
302
+ responseData = response[0];
303
+ }
304
+
266
305
  const {
267
306
  error: res_error,
268
- } = BillingModel.CheckValidityResponse().validate(response, {
307
+ } = BillingPlatformModel.CheckValidityResponse().validate(responseData, {
269
308
  abortEarly: false,
270
309
  allowUnknown: false,
271
310
  });
@@ -273,24 +312,27 @@ class Billing {
273
312
  if (res_error) {
274
313
  Logger({
275
314
  level: "WARN",
276
- message: "Response Validation Warnnings for checkCouponValidity",
315
+ message: `Response Validation Warnnings for platform > Billing > checkCouponValidity \n ${res_error}`,
277
316
  });
278
- Logger({ level: "WARN", message: res_error });
279
317
  }
280
318
 
281
319
  return response;
282
320
  }
283
321
 
284
322
  /**
285
- * @param {Object} arg - Arg object.
286
- * @param {string} arg.extensionId - Extension _id
287
- * @param {CreateOneTimeCharge} arg.body
288
- * @returns {Promise<CreateOneTimeChargeResponse>} - Success response
323
+ * @param {BillingPlatformValidator.CreateOneTimeChargeParam} arg - Arg object
324
+ * @param {import("../PlatformAPIClient").Options} - Options
325
+ * @returns {Promise<BillingPlatformModel.CreateOneTimeChargeResponse>} -
326
+ * Success response
327
+ * @name createOneTimeCharge
289
328
  * @summary: Create one time subscription charge
290
- * @description: Register one time subscription charge for a seller of your extension.
329
+ * @description: Register one time subscription charge for a seller of your extension. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/createOneTimeCharge/).
291
330
  */
292
- async createOneTimeCharge({ extensionId, body } = {}) {
293
- const { error } = BillingValidator.createOneTimeCharge().validate(
331
+ async createOneTimeCharge(
332
+ { extensionId, body } = {},
333
+ { headers } = { headers: false }
334
+ ) {
335
+ const { error } = BillingPlatformValidator.createOneTimeCharge().validate(
294
336
  {
295
337
  extensionId,
296
338
  body,
@@ -302,7 +344,9 @@ class Billing {
302
344
  }
303
345
 
304
346
  // Showing warrnings if extra unknown parameters are found
305
- const { error: warrning } = BillingValidator.createOneTimeCharge().validate(
347
+ const {
348
+ error: warrning,
349
+ } = BillingPlatformValidator.createOneTimeCharge().validate(
306
350
  {
307
351
  extensionId,
308
352
  body,
@@ -312,9 +356,8 @@ class Billing {
312
356
  if (warrning) {
313
357
  Logger({
314
358
  level: "WARN",
315
- message: "Parameter Validation warrnings for createOneTimeCharge",
359
+ message: `Parameter Validation warrnings for platform > Billing > createOneTimeCharge \n ${warrning}`,
316
360
  });
317
- Logger({ level: "WARN", message: warrning });
318
361
  }
319
362
 
320
363
  const query_params = {};
@@ -327,37 +370,48 @@ class Billing {
327
370
  `/service/platform/billing/v1.0/company/${this.config.companyId}/extension/${extensionId}/one_time_charge`,
328
371
  query_params,
329
372
  body,
330
- xHeaders
373
+ xHeaders,
374
+ { headers }
331
375
  );
332
376
 
377
+ let responseData = response;
378
+ if (headers) {
379
+ responseData = response[0];
380
+ }
381
+
333
382
  const {
334
383
  error: res_error,
335
- } = BillingModel.CreateOneTimeChargeResponse().validate(response, {
336
- abortEarly: false,
337
- allowUnknown: false,
338
- });
384
+ } = BillingPlatformModel.CreateOneTimeChargeResponse().validate(
385
+ responseData,
386
+ { abortEarly: false, allowUnknown: false }
387
+ );
339
388
 
340
389
  if (res_error) {
341
390
  Logger({
342
391
  level: "WARN",
343
- message: "Response Validation Warnnings for createOneTimeCharge",
392
+ message: `Response Validation Warnnings for platform > Billing > createOneTimeCharge \n ${res_error}`,
344
393
  });
345
- Logger({ level: "WARN", message: res_error });
346
394
  }
347
395
 
348
396
  return response;
349
397
  }
350
398
 
351
399
  /**
352
- * @param {Object} arg - Arg object.
353
- * @param {string} arg.extensionId - Extension _id
354
- * @param {CreateSubscriptionCharge} arg.body
355
- * @returns {Promise<CreateSubscriptionResponse>} - Success response
400
+ * @param {BillingPlatformValidator.CreateSubscriptionChargeParam} arg - Arg object
401
+ * @param {import("../PlatformAPIClient").Options} - Options
402
+ * @returns {Promise<BillingPlatformModel.CreateSubscriptionResponse>} -
403
+ * Success response
404
+ * @name createSubscriptionCharge
356
405
  * @summary: Create subscription charge
357
- * @description: Register subscription charge for a seller of your extension.
406
+ * @description: Register subscription charge for a seller of your extension. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/createSubscriptionCharge/).
358
407
  */
359
- async createSubscriptionCharge({ extensionId, body } = {}) {
360
- const { error } = BillingValidator.createSubscriptionCharge().validate(
408
+ async createSubscriptionCharge(
409
+ { extensionId, body } = {},
410
+ { headers } = { headers: false }
411
+ ) {
412
+ const {
413
+ error,
414
+ } = BillingPlatformValidator.createSubscriptionCharge().validate(
361
415
  {
362
416
  extensionId,
363
417
  body,
@@ -371,7 +425,7 @@ class Billing {
371
425
  // Showing warrnings if extra unknown parameters are found
372
426
  const {
373
427
  error: warrning,
374
- } = BillingValidator.createSubscriptionCharge().validate(
428
+ } = BillingPlatformValidator.createSubscriptionCharge().validate(
375
429
  {
376
430
  extensionId,
377
431
  body,
@@ -381,9 +435,8 @@ class Billing {
381
435
  if (warrning) {
382
436
  Logger({
383
437
  level: "WARN",
384
- message: "Parameter Validation warrnings for createSubscriptionCharge",
438
+ message: `Parameter Validation warrnings for platform > Billing > createSubscriptionCharge \n ${warrning}`,
385
439
  });
386
- Logger({ level: "WARN", message: warrning });
387
440
  }
388
441
 
389
442
  const query_params = {};
@@ -396,37 +449,45 @@ class Billing {
396
449
  `/service/platform/billing/v1.0/company/${this.config.companyId}/extension/${extensionId}/subscription`,
397
450
  query_params,
398
451
  body,
399
- xHeaders
452
+ xHeaders,
453
+ { headers }
400
454
  );
401
455
 
456
+ let responseData = response;
457
+ if (headers) {
458
+ responseData = response[0];
459
+ }
460
+
402
461
  const {
403
462
  error: res_error,
404
- } = BillingModel.CreateSubscriptionResponse().validate(response, {
405
- abortEarly: false,
406
- allowUnknown: false,
407
- });
463
+ } = BillingPlatformModel.CreateSubscriptionResponse().validate(
464
+ responseData,
465
+ { abortEarly: false, allowUnknown: false }
466
+ );
408
467
 
409
468
  if (res_error) {
410
469
  Logger({
411
470
  level: "WARN",
412
- message: "Response Validation Warnnings for createSubscriptionCharge",
471
+ message: `Response Validation Warnnings for platform > Billing > createSubscriptionCharge \n ${res_error}`,
413
472
  });
414
- Logger({ level: "WARN", message: res_error });
415
473
  }
416
474
 
417
475
  return response;
418
476
  }
419
477
 
420
478
  /**
421
- * @param {Object} arg - Arg object.
422
- * @param {string} arg.extensionId - Extension _id
423
- * @param {string} arg.chargeId - Standalone charge _id
424
- * @returns {Promise<OneTimeChargeEntity>} - Success response
479
+ * @param {BillingPlatformValidator.GetChargeDetailsParam} arg - Arg object
480
+ * @param {import("../PlatformAPIClient").Options} - Options
481
+ * @returns {Promise<BillingPlatformModel.OneTimeChargeEntity>} - Success response
482
+ * @name getChargeDetails
425
483
  * @summary: Get subscription charge details
426
- * @description: Get created subscription charge details
484
+ * @description: Get created subscription charge details - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/getChargeDetails/).
427
485
  */
428
- async getChargeDetails({ extensionId, chargeId } = {}) {
429
- const { error } = BillingValidator.getChargeDetails().validate(
486
+ async getChargeDetails(
487
+ { extensionId, chargeId } = {},
488
+ { headers } = { headers: false }
489
+ ) {
490
+ const { error } = BillingPlatformValidator.getChargeDetails().validate(
430
491
  {
431
492
  extensionId,
432
493
  chargeId,
@@ -438,7 +499,9 @@ class Billing {
438
499
  }
439
500
 
440
501
  // Showing warrnings if extra unknown parameters are found
441
- const { error: warrning } = BillingValidator.getChargeDetails().validate(
502
+ const {
503
+ error: warrning,
504
+ } = BillingPlatformValidator.getChargeDetails().validate(
442
505
  {
443
506
  extensionId,
444
507
  chargeId,
@@ -448,9 +511,8 @@ class Billing {
448
511
  if (warrning) {
449
512
  Logger({
450
513
  level: "WARN",
451
- message: "Parameter Validation warrnings for getChargeDetails",
514
+ message: `Parameter Validation warrnings for platform > Billing > getChargeDetails \n ${warrning}`,
452
515
  });
453
- Logger({ level: "WARN", message: warrning });
454
516
  }
455
517
 
456
518
  const query_params = {};
@@ -463,12 +525,18 @@ class Billing {
463
525
  `/service/platform/billing/v1.0/company/${this.config.companyId}/extension/${extensionId}/charge/${chargeId}`,
464
526
  query_params,
465
527
  undefined,
466
- xHeaders
528
+ xHeaders,
529
+ { headers }
467
530
  );
468
531
 
532
+ let responseData = response;
533
+ if (headers) {
534
+ responseData = response[0];
535
+ }
536
+
469
537
  const {
470
538
  error: res_error,
471
- } = BillingModel.OneTimeChargeEntity().validate(response, {
539
+ } = BillingPlatformModel.OneTimeChargeEntity().validate(responseData, {
472
540
  abortEarly: false,
473
541
  allowUnknown: false,
474
542
  });
@@ -476,22 +544,23 @@ class Billing {
476
544
  if (res_error) {
477
545
  Logger({
478
546
  level: "WARN",
479
- message: "Response Validation Warnnings for getChargeDetails",
547
+ message: `Response Validation Warnnings for platform > Billing > getChargeDetails \n ${res_error}`,
480
548
  });
481
- Logger({ level: "WARN", message: res_error });
482
549
  }
483
550
 
484
551
  return response;
485
552
  }
486
553
 
487
554
  /**
488
- * @param {Object} arg - Arg object.
489
- * @returns {Promise<SubscriptionCustomer>} - Success response
555
+ * @param {BillingPlatformValidator.GetCustomerDetailParam} arg - Arg object
556
+ * @param {import("../PlatformAPIClient").Options} - Options
557
+ * @returns {Promise<BillingPlatformModel.SubscriptionCustomer>} - Success response
558
+ * @name getCustomerDetail
490
559
  * @summary: Get subscription customer detail
491
- * @description: Get subscription customer detail.
560
+ * @description: Get subscription customer detail. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/getCustomerDetail/).
492
561
  */
493
- async getCustomerDetail({} = {}) {
494
- const { error } = BillingValidator.getCustomerDetail().validate(
562
+ async getCustomerDetail({ headers } = { headers: false }) {
563
+ const { error } = BillingPlatformValidator.getCustomerDetail().validate(
495
564
  {},
496
565
  { abortEarly: false, allowUnknown: true }
497
566
  );
@@ -500,16 +569,17 @@ class Billing {
500
569
  }
501
570
 
502
571
  // Showing warrnings if extra unknown parameters are found
503
- const { error: warrning } = BillingValidator.getCustomerDetail().validate(
572
+ const {
573
+ error: warrning,
574
+ } = BillingPlatformValidator.getCustomerDetail().validate(
504
575
  {},
505
576
  { abortEarly: false, allowUnknown: false }
506
577
  );
507
578
  if (warrning) {
508
579
  Logger({
509
580
  level: "WARN",
510
- message: "Parameter Validation warrnings for getCustomerDetail",
581
+ message: `Parameter Validation warrnings for platform > Billing > getCustomerDetail \n ${warrning}`,
511
582
  });
512
- Logger({ level: "WARN", message: warrning });
513
583
  }
514
584
 
515
585
  const query_params = {};
@@ -522,12 +592,18 @@ class Billing {
522
592
  `/service/platform/billing/v1.0/company/${this.config.companyId}/subscription/customer-detail`,
523
593
  query_params,
524
594
  undefined,
525
- xHeaders
595
+ xHeaders,
596
+ { headers }
526
597
  );
527
598
 
599
+ let responseData = response;
600
+ if (headers) {
601
+ responseData = response[0];
602
+ }
603
+
528
604
  const {
529
605
  error: res_error,
530
- } = BillingModel.SubscriptionCustomer().validate(response, {
606
+ } = BillingPlatformModel.SubscriptionCustomer().validate(responseData, {
531
607
  abortEarly: false,
532
608
  allowUnknown: false,
533
609
  });
@@ -535,22 +611,23 @@ class Billing {
535
611
  if (res_error) {
536
612
  Logger({
537
613
  level: "WARN",
538
- message: "Response Validation Warnnings for getCustomerDetail",
614
+ message: `Response Validation Warnnings for platform > Billing > getCustomerDetail \n ${res_error}`,
539
615
  });
540
- Logger({ level: "WARN", message: res_error });
541
616
  }
542
617
 
543
618
  return response;
544
619
  }
545
620
 
546
621
  /**
547
- * @param {Object} arg - Arg object.
548
- * @returns {Promise<SubscriptionLimit>} - Success response
622
+ * @param {BillingPlatformValidator.GetFeatureLimitConfigParam} arg - Arg object
623
+ * @param {import("../PlatformAPIClient").Options} - Options
624
+ * @returns {Promise<BillingPlatformModel.SubscriptionLimit>} - Success response
625
+ * @name getFeatureLimitConfig
549
626
  * @summary: Get subscription subscription limits
550
- * @description: Get subscription subscription limits.
627
+ * @description: Get subscription subscription limits. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/getFeatureLimitConfig/).
551
628
  */
552
- async getFeatureLimitConfig({} = {}) {
553
- const { error } = BillingValidator.getFeatureLimitConfig().validate(
629
+ async getFeatureLimitConfig({ headers } = { headers: false }) {
630
+ const { error } = BillingPlatformValidator.getFeatureLimitConfig().validate(
554
631
  {},
555
632
  { abortEarly: false, allowUnknown: true }
556
633
  );
@@ -561,16 +638,15 @@ class Billing {
561
638
  // Showing warrnings if extra unknown parameters are found
562
639
  const {
563
640
  error: warrning,
564
- } = BillingValidator.getFeatureLimitConfig().validate(
641
+ } = BillingPlatformValidator.getFeatureLimitConfig().validate(
565
642
  {},
566
643
  { abortEarly: false, allowUnknown: false }
567
644
  );
568
645
  if (warrning) {
569
646
  Logger({
570
647
  level: "WARN",
571
- message: "Parameter Validation warrnings for getFeatureLimitConfig",
648
+ message: `Parameter Validation warrnings for platform > Billing > getFeatureLimitConfig \n ${warrning}`,
572
649
  });
573
- Logger({ level: "WARN", message: warrning });
574
650
  }
575
651
 
576
652
  const query_params = {};
@@ -583,12 +659,18 @@ class Billing {
583
659
  `/service/platform/billing/v1.0/company/${this.config.companyId}/subscription/current-limit`,
584
660
  query_params,
585
661
  undefined,
586
- xHeaders
662
+ xHeaders,
663
+ { headers }
587
664
  );
588
665
 
666
+ let responseData = response;
667
+ if (headers) {
668
+ responseData = response[0];
669
+ }
670
+
589
671
  const {
590
672
  error: res_error,
591
- } = BillingModel.SubscriptionLimit().validate(response, {
673
+ } = BillingPlatformModel.SubscriptionLimit().validate(responseData, {
592
674
  abortEarly: false,
593
675
  allowUnknown: false,
594
676
  });
@@ -596,23 +678,23 @@ class Billing {
596
678
  if (res_error) {
597
679
  Logger({
598
680
  level: "WARN",
599
- message: "Response Validation Warnnings for getFeatureLimitConfig",
681
+ message: `Response Validation Warnnings for platform > Billing > getFeatureLimitConfig \n ${res_error}`,
600
682
  });
601
- Logger({ level: "WARN", message: res_error });
602
683
  }
603
684
 
604
685
  return response;
605
686
  }
606
687
 
607
688
  /**
608
- * @param {Object} arg - Arg object.
609
- * @param {string} arg.invoiceId - Invoice id
610
- * @returns {Promise<Invoice>} - Success response
689
+ * @param {BillingPlatformValidator.GetInvoiceByIdParam} arg - Arg object
690
+ * @param {import("../PlatformAPIClient").Options} - Options
691
+ * @returns {Promise<BillingPlatformModel.Invoice>} - Success response
692
+ * @name getInvoiceById
611
693
  * @summary: Get invoice by id
612
- * @description: Get invoice by id.
694
+ * @description: Get invoice by id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/getInvoiceById/).
613
695
  */
614
- async getInvoiceById({ invoiceId } = {}) {
615
- const { error } = BillingValidator.getInvoiceById().validate(
696
+ async getInvoiceById({ invoiceId } = {}, { headers } = { headers: false }) {
697
+ const { error } = BillingPlatformValidator.getInvoiceById().validate(
616
698
  {
617
699
  invoiceId,
618
700
  },
@@ -623,7 +705,9 @@ class Billing {
623
705
  }
624
706
 
625
707
  // Showing warrnings if extra unknown parameters are found
626
- const { error: warrning } = BillingValidator.getInvoiceById().validate(
708
+ const {
709
+ error: warrning,
710
+ } = BillingPlatformValidator.getInvoiceById().validate(
627
711
  {
628
712
  invoiceId,
629
713
  },
@@ -632,9 +716,8 @@ class Billing {
632
716
  if (warrning) {
633
717
  Logger({
634
718
  level: "WARN",
635
- message: "Parameter Validation warrnings for getInvoiceById",
719
+ message: `Parameter Validation warrnings for platform > Billing > getInvoiceById \n ${warrning}`,
636
720
  });
637
- Logger({ level: "WARN", message: warrning });
638
721
  }
639
722
 
640
723
  const query_params = {};
@@ -647,10 +730,18 @@ class Billing {
647
730
  `/service/platform/billing/v1.0/company/${this.config.companyId}/invoice/${invoiceId}`,
648
731
  query_params,
649
732
  undefined,
650
- xHeaders
733
+ xHeaders,
734
+ { headers }
651
735
  );
652
736
 
653
- const { error: res_error } = BillingModel.Invoice().validate(response, {
737
+ let responseData = response;
738
+ if (headers) {
739
+ responseData = response[0];
740
+ }
741
+
742
+ const {
743
+ error: res_error,
744
+ } = BillingPlatformModel.Invoice().validate(responseData, {
654
745
  abortEarly: false,
655
746
  allowUnknown: false,
656
747
  });
@@ -658,22 +749,23 @@ class Billing {
658
749
  if (res_error) {
659
750
  Logger({
660
751
  level: "WARN",
661
- message: "Response Validation Warnnings for getInvoiceById",
752
+ message: `Response Validation Warnnings for platform > Billing > getInvoiceById \n ${res_error}`,
662
753
  });
663
- Logger({ level: "WARN", message: res_error });
664
754
  }
665
755
 
666
756
  return response;
667
757
  }
668
758
 
669
759
  /**
670
- * @param {Object} arg - Arg object.
671
- * @returns {Promise<Invoices>} - Success response
760
+ * @param {BillingPlatformValidator.GetInvoicesParam} arg - Arg object
761
+ * @param {import("../PlatformAPIClient").Options} - Options
762
+ * @returns {Promise<BillingPlatformModel.Invoices>} - Success response
763
+ * @name getInvoices
672
764
  * @summary: Get invoices
673
- * @description: Get invoices.
765
+ * @description: Get invoices. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/getInvoices/).
674
766
  */
675
- async getInvoices({} = {}) {
676
- const { error } = BillingValidator.getInvoices().validate(
767
+ async getInvoices({ headers } = { headers: false }) {
768
+ const { error } = BillingPlatformValidator.getInvoices().validate(
677
769
  {},
678
770
  { abortEarly: false, allowUnknown: true }
679
771
  );
@@ -682,16 +774,15 @@ class Billing {
682
774
  }
683
775
 
684
776
  // Showing warrnings if extra unknown parameters are found
685
- const { error: warrning } = BillingValidator.getInvoices().validate(
777
+ const { error: warrning } = BillingPlatformValidator.getInvoices().validate(
686
778
  {},
687
779
  { abortEarly: false, allowUnknown: false }
688
780
  );
689
781
  if (warrning) {
690
782
  Logger({
691
783
  level: "WARN",
692
- message: "Parameter Validation warrnings for getInvoices",
784
+ message: `Parameter Validation warrnings for platform > Billing > getInvoices \n ${warrning}`,
693
785
  });
694
- Logger({ level: "WARN", message: warrning });
695
786
  }
696
787
 
697
788
  const query_params = {};
@@ -704,10 +795,18 @@ class Billing {
704
795
  `/service/platform/billing/v1.0/company/${this.config.companyId}/invoice/list`,
705
796
  query_params,
706
797
  undefined,
707
- xHeaders
798
+ xHeaders,
799
+ { headers }
708
800
  );
709
801
 
710
- const { error: res_error } = BillingModel.Invoices().validate(response, {
802
+ let responseData = response;
803
+ if (headers) {
804
+ responseData = response[0];
805
+ }
806
+
807
+ const {
808
+ error: res_error,
809
+ } = BillingPlatformModel.Invoices().validate(responseData, {
711
810
  abortEarly: false,
712
811
  allowUnknown: false,
713
812
  });
@@ -715,22 +814,24 @@ class Billing {
715
814
  if (res_error) {
716
815
  Logger({
717
816
  level: "WARN",
718
- message: "Response Validation Warnnings for getInvoices",
817
+ message: `Response Validation Warnnings for platform > Billing > getInvoices \n ${res_error}`,
719
818
  });
720
- Logger({ level: "WARN", message: res_error });
721
819
  }
722
820
 
723
821
  return response;
724
822
  }
725
823
 
726
824
  /**
727
- * @param {Object} arg - Arg object.
728
- * @returns {Promise<SubscriptionStatus>} - Success response
825
+ * @param {BillingPlatformValidator.GetSubscriptionParam} arg - Arg object
826
+ * @param {import("../PlatformAPIClient").Options} - Options
827
+ * @returns {Promise<BillingPlatformModel.SubscriptionStatus>} - Success response
828
+ * @name getSubscription
729
829
  * @summary: Get current subscription detail
730
830
  * @description: If subscription is active then it will return is_enabled true and return subscription object. If subscription is not active then is_enabled false and message.
831
+ * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/getSubscription/).
731
832
  */
732
- async getSubscription({} = {}) {
733
- const { error } = BillingValidator.getSubscription().validate(
833
+ async getSubscription({ headers } = { headers: false }) {
834
+ const { error } = BillingPlatformValidator.getSubscription().validate(
734
835
  {},
735
836
  { abortEarly: false, allowUnknown: true }
736
837
  );
@@ -739,16 +840,17 @@ class Billing {
739
840
  }
740
841
 
741
842
  // Showing warrnings if extra unknown parameters are found
742
- const { error: warrning } = BillingValidator.getSubscription().validate(
843
+ const {
844
+ error: warrning,
845
+ } = BillingPlatformValidator.getSubscription().validate(
743
846
  {},
744
847
  { abortEarly: false, allowUnknown: false }
745
848
  );
746
849
  if (warrning) {
747
850
  Logger({
748
851
  level: "WARN",
749
- message: "Parameter Validation warrnings for getSubscription",
852
+ message: `Parameter Validation warrnings for platform > Billing > getSubscription \n ${warrning}`,
750
853
  });
751
- Logger({ level: "WARN", message: warrning });
752
854
  }
753
855
 
754
856
  const query_params = {};
@@ -761,12 +863,18 @@ class Billing {
761
863
  `/service/platform/billing/v1.0/company/${this.config.companyId}/subscription/current`,
762
864
  query_params,
763
865
  undefined,
764
- xHeaders
866
+ xHeaders,
867
+ { headers }
765
868
  );
766
869
 
870
+ let responseData = response;
871
+ if (headers) {
872
+ responseData = response[0];
873
+ }
874
+
767
875
  const {
768
876
  error: res_error,
769
- } = BillingModel.SubscriptionStatus().validate(response, {
877
+ } = BillingPlatformModel.SubscriptionStatus().validate(responseData, {
770
878
  abortEarly: false,
771
879
  allowUnknown: false,
772
880
  });
@@ -774,24 +882,26 @@ class Billing {
774
882
  if (res_error) {
775
883
  Logger({
776
884
  level: "WARN",
777
- message: "Response Validation Warnnings for getSubscription",
885
+ message: `Response Validation Warnnings for platform > Billing > getSubscription \n ${res_error}`,
778
886
  });
779
- Logger({ level: "WARN", message: res_error });
780
887
  }
781
888
 
782
889
  return response;
783
890
  }
784
891
 
785
892
  /**
786
- * @param {Object} arg - Arg object.
787
- * @param {string} arg.extensionId - Extension _id
788
- * @param {string} arg.subscriptionId - Subscription charge _id
789
- * @returns {Promise<EntitySubscription>} - Success response
893
+ * @param {BillingPlatformValidator.GetSubscriptionChargeParam} arg - Arg object
894
+ * @param {import("../PlatformAPIClient").Options} - Options
895
+ * @returns {Promise<BillingPlatformModel.EntitySubscription>} - Success response
896
+ * @name getSubscriptionCharge
790
897
  * @summary: Get subscription charge details
791
- * @description: Get created subscription charge details
898
+ * @description: Get created subscription charge details - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/getSubscriptionCharge/).
792
899
  */
793
- async getSubscriptionCharge({ extensionId, subscriptionId } = {}) {
794
- const { error } = BillingValidator.getSubscriptionCharge().validate(
900
+ async getSubscriptionCharge(
901
+ { extensionId, subscriptionId } = {},
902
+ { headers } = { headers: false }
903
+ ) {
904
+ const { error } = BillingPlatformValidator.getSubscriptionCharge().validate(
795
905
  {
796
906
  extensionId,
797
907
  subscriptionId,
@@ -805,7 +915,7 @@ class Billing {
805
915
  // Showing warrnings if extra unknown parameters are found
806
916
  const {
807
917
  error: warrning,
808
- } = BillingValidator.getSubscriptionCharge().validate(
918
+ } = BillingPlatformValidator.getSubscriptionCharge().validate(
809
919
  {
810
920
  extensionId,
811
921
  subscriptionId,
@@ -815,9 +925,8 @@ class Billing {
815
925
  if (warrning) {
816
926
  Logger({
817
927
  level: "WARN",
818
- message: "Parameter Validation warrnings for getSubscriptionCharge",
928
+ message: `Parameter Validation warrnings for platform > Billing > getSubscriptionCharge \n ${warrning}`,
819
929
  });
820
- Logger({ level: "WARN", message: warrning });
821
930
  }
822
931
 
823
932
  const query_params = {};
@@ -830,12 +939,18 @@ class Billing {
830
939
  `/service/platform/billing/v1.0/company/${this.config.companyId}/extension/${extensionId}/subscription/${subscriptionId}`,
831
940
  query_params,
832
941
  undefined,
833
- xHeaders
942
+ xHeaders,
943
+ { headers }
834
944
  );
835
945
 
946
+ let responseData = response;
947
+ if (headers) {
948
+ responseData = response[0];
949
+ }
950
+
836
951
  const {
837
952
  error: res_error,
838
- } = BillingModel.EntitySubscription().validate(response, {
953
+ } = BillingPlatformModel.EntitySubscription().validate(responseData, {
839
954
  abortEarly: false,
840
955
  allowUnknown: false,
841
956
  });
@@ -843,23 +958,23 @@ class Billing {
843
958
  if (res_error) {
844
959
  Logger({
845
960
  level: "WARN",
846
- message: "Response Validation Warnnings for getSubscriptionCharge",
961
+ message: `Response Validation Warnnings for platform > Billing > getSubscriptionCharge \n ${res_error}`,
847
962
  });
848
- Logger({ level: "WARN", message: res_error });
849
963
  }
850
964
 
851
965
  return response;
852
966
  }
853
967
 
854
968
  /**
855
- * @param {Object} arg - Arg object.
856
- * @param {SubscriptionCustomerCreate} arg.body
857
- * @returns {Promise<SubscriptionCustomer>} - Success response
969
+ * @param {BillingPlatformValidator.UpsertCustomerDetailParam} arg - Arg object
970
+ * @param {import("../PlatformAPIClient").Options} - Options
971
+ * @returns {Promise<BillingPlatformModel.SubscriptionCustomer>} - Success response
972
+ * @name upsertCustomerDetail
858
973
  * @summary: Upsert subscription customer detail
859
- * @description: Upsert subscription customer detail.
974
+ * @description: Upsert subscription customer detail. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/upsertCustomerDetail/).
860
975
  */
861
- async upsertCustomerDetail({ body } = {}) {
862
- const { error } = BillingValidator.upsertCustomerDetail().validate(
976
+ async upsertCustomerDetail({ body } = {}, { headers } = { headers: false }) {
977
+ const { error } = BillingPlatformValidator.upsertCustomerDetail().validate(
863
978
  {
864
979
  body,
865
980
  },
@@ -872,7 +987,7 @@ class Billing {
872
987
  // Showing warrnings if extra unknown parameters are found
873
988
  const {
874
989
  error: warrning,
875
- } = BillingValidator.upsertCustomerDetail().validate(
990
+ } = BillingPlatformValidator.upsertCustomerDetail().validate(
876
991
  {
877
992
  body,
878
993
  },
@@ -881,9 +996,8 @@ class Billing {
881
996
  if (warrning) {
882
997
  Logger({
883
998
  level: "WARN",
884
- message: "Parameter Validation warrnings for upsertCustomerDetail",
999
+ message: `Parameter Validation warrnings for platform > Billing > upsertCustomerDetail \n ${warrning}`,
885
1000
  });
886
- Logger({ level: "WARN", message: warrning });
887
1001
  }
888
1002
 
889
1003
  const query_params = {};
@@ -896,12 +1010,18 @@ class Billing {
896
1010
  `/service/platform/billing/v1.0/company/${this.config.companyId}/subscription/customer-detail`,
897
1011
  query_params,
898
1012
  body,
899
- xHeaders
1013
+ xHeaders,
1014
+ { headers }
900
1015
  );
901
1016
 
1017
+ let responseData = response;
1018
+ if (headers) {
1019
+ responseData = response[0];
1020
+ }
1021
+
902
1022
  const {
903
1023
  error: res_error,
904
- } = BillingModel.SubscriptionCustomer().validate(response, {
1024
+ } = BillingPlatformModel.SubscriptionCustomer().validate(responseData, {
905
1025
  abortEarly: false,
906
1026
  allowUnknown: false,
907
1027
  });
@@ -909,9 +1029,8 @@ class Billing {
909
1029
  if (res_error) {
910
1030
  Logger({
911
1031
  level: "WARN",
912
- message: "Response Validation Warnnings for upsertCustomerDetail",
1032
+ message: `Response Validation Warnnings for platform > Billing > upsertCustomerDetail \n ${res_error}`,
913
1033
  });
914
- Logger({ level: "WARN", message: res_error });
915
1034
  }
916
1035
 
917
1036
  return response;