@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 CompanyProfileValidator = require("./CompanyProfilePlatformValidator");
5
- const CompanyProfileModel = require("./CompanyProfilePlatformModel");
4
+ const CompanyProfilePlatformValidator = require("./CompanyProfilePlatformValidator");
5
+ const CompanyProfilePlatformModel = require("./CompanyProfilePlatformModel");
6
6
  const { Logger } = require("./../../common/Logger");
7
7
  const Joi = require("joi");
8
8
 
@@ -12,13 +12,17 @@ class CompanyProfile {
12
12
  }
13
13
 
14
14
  /**
15
- * @param {Object} arg - Arg object.
16
- * @returns {Promise<GetCompanyProfileSerializerResponse>} - Success response
15
+ * @param {CompanyProfilePlatformValidator.CbsOnboardGetParam} arg - Arg object
16
+ * @param {import("../PlatformAPIClient").Options} - Options
17
+ * @returns {Promise<CompanyProfilePlatformModel.GetCompanyProfileSerializerResponse>}
18
+ * - Success response
19
+ *
20
+ * @name cbsOnboardGet
17
21
  * @summary: Get company profile
18
- * @description: This API allows to view the company profile of the seller account.
22
+ * @description: This API allows to view the company profile of the seller account. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/cbsOnboardGet/).
19
23
  */
20
- async cbsOnboardGet({} = {}) {
21
- const { error } = CompanyProfileValidator.cbsOnboardGet().validate(
24
+ async cbsOnboardGet({ headers } = { headers: false }) {
25
+ const { error } = CompanyProfilePlatformValidator.cbsOnboardGet().validate(
22
26
  {},
23
27
  { abortEarly: false, allowUnknown: true }
24
28
  );
@@ -29,16 +33,15 @@ class CompanyProfile {
29
33
  // Showing warrnings if extra unknown parameters are found
30
34
  const {
31
35
  error: warrning,
32
- } = CompanyProfileValidator.cbsOnboardGet().validate(
36
+ } = CompanyProfilePlatformValidator.cbsOnboardGet().validate(
33
37
  {},
34
38
  { abortEarly: false, allowUnknown: false }
35
39
  );
36
40
  if (warrning) {
37
41
  Logger({
38
42
  level: "WARN",
39
- message: "Parameter Validation warrnings for cbsOnboardGet",
43
+ message: `Parameter Validation warrnings for platform > CompanyProfile > cbsOnboardGet \n ${warrning}`,
40
44
  });
41
- Logger({ level: "WARN", message: warrning });
42
45
  }
43
46
 
44
47
  const query_params = {};
@@ -51,36 +54,43 @@ class CompanyProfile {
51
54
  `/service/platform/company-profile/v1.0/company/${this.config.companyId}`,
52
55
  query_params,
53
56
  undefined,
54
- xHeaders
57
+ xHeaders,
58
+ { headers }
55
59
  );
56
60
 
61
+ let responseData = response;
62
+ if (headers) {
63
+ responseData = response[0];
64
+ }
65
+
57
66
  const {
58
67
  error: res_error,
59
- } = CompanyProfileModel.GetCompanyProfileSerializerResponse().validate(
60
- response,
68
+ } = CompanyProfilePlatformModel.GetCompanyProfileSerializerResponse().validate(
69
+ responseData,
61
70
  { abortEarly: false, allowUnknown: false }
62
71
  );
63
72
 
64
73
  if (res_error) {
65
74
  Logger({
66
75
  level: "WARN",
67
- message: "Response Validation Warnnings for cbsOnboardGet",
76
+ message: `Response Validation Warnnings for platform > CompanyProfile > cbsOnboardGet \n ${res_error}`,
68
77
  });
69
- Logger({ level: "WARN", message: res_error });
70
78
  }
71
79
 
72
80
  return response;
73
81
  }
74
82
 
75
83
  /**
76
- * @param {Object} arg - Arg object.
77
- * @param {CreateUpdateBrandRequestSerializer} arg.body
78
- * @returns {Promise<ProfileSuccessResponse>} - Success response
84
+ * @param {CompanyProfilePlatformValidator.CreateBrandParam} arg - Arg object
85
+ * @param {import("../PlatformAPIClient").Options} - Options
86
+ * @returns {Promise<CompanyProfilePlatformModel.ProfileSuccessResponse>} -
87
+ * Success response
88
+ * @name createBrand
79
89
  * @summary: Create a Brand.
80
- * @description: This API allows to create a brand associated to a company.
90
+ * @description: This API allows to create a brand associated to a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/createBrand/).
81
91
  */
82
- async createBrand({ body } = {}) {
83
- const { error } = CompanyProfileValidator.createBrand().validate(
92
+ async createBrand({ body } = {}, { headers } = { headers: false }) {
93
+ const { error } = CompanyProfilePlatformValidator.createBrand().validate(
84
94
  {
85
95
  body,
86
96
  },
@@ -91,7 +101,9 @@ class CompanyProfile {
91
101
  }
92
102
 
93
103
  // Showing warrnings if extra unknown parameters are found
94
- const { error: warrning } = CompanyProfileValidator.createBrand().validate(
104
+ const {
105
+ error: warrning,
106
+ } = CompanyProfilePlatformValidator.createBrand().validate(
95
107
  {
96
108
  body,
97
109
  },
@@ -100,9 +112,8 @@ class CompanyProfile {
100
112
  if (warrning) {
101
113
  Logger({
102
114
  level: "WARN",
103
- message: "Parameter Validation warrnings for createBrand",
115
+ message: `Parameter Validation warrnings for platform > CompanyProfile > createBrand \n ${warrning}`,
104
116
  });
105
- Logger({ level: "WARN", message: warrning });
106
117
  }
107
118
 
108
119
  const query_params = {};
@@ -115,38 +126,50 @@ class CompanyProfile {
115
126
  `/service/platform/company-profile/v1.0/company/${this.config.companyId}/brand/`,
116
127
  query_params,
117
128
  body,
118
- xHeaders
129
+ xHeaders,
130
+ { headers }
119
131
  );
120
132
 
133
+ let responseData = response;
134
+ if (headers) {
135
+ responseData = response[0];
136
+ }
137
+
121
138
  const {
122
139
  error: res_error,
123
- } = CompanyProfileModel.ProfileSuccessResponse().validate(response, {
124
- abortEarly: false,
125
- allowUnknown: false,
126
- });
140
+ } = CompanyProfilePlatformModel.ProfileSuccessResponse().validate(
141
+ responseData,
142
+ { abortEarly: false, allowUnknown: false }
143
+ );
127
144
 
128
145
  if (res_error) {
129
146
  Logger({
130
147
  level: "WARN",
131
- message: "Response Validation Warnnings for createBrand",
148
+ message: `Response Validation Warnnings for platform > CompanyProfile > createBrand \n ${res_error}`,
132
149
  });
133
- Logger({ level: "WARN", message: res_error });
134
150
  }
135
151
 
136
152
  return response;
137
153
  }
138
154
 
139
155
  /**
140
- * @param {Object} arg - Arg object.
141
- * @param {CompanyBrandPostRequestSerializer} arg.body
142
- * @returns {Promise<ProfileSuccessResponse>} - Success response
156
+ * @param {CompanyProfilePlatformValidator.CreateCompanyBrandMappingParam} arg
157
+ * - Arg object
158
+ *
159
+ * @param {import("../PlatformAPIClient").Options} - Options
160
+ * @returns {Promise<CompanyProfilePlatformModel.ProfileSuccessResponse>} -
161
+ * Success response
162
+ * @name createCompanyBrandMapping
143
163
  * @summary: Create a company brand mapping.
144
- * @description: This API allows to create a company brand mapping, for a already existing brand in the system.
164
+ * @description: This API allows to create a company brand mapping, for a already existing brand in the system. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/createCompanyBrandMapping/).
145
165
  */
146
- async createCompanyBrandMapping({ body } = {}) {
166
+ async createCompanyBrandMapping(
167
+ { body } = {},
168
+ { headers } = { headers: false }
169
+ ) {
147
170
  const {
148
171
  error,
149
- } = CompanyProfileValidator.createCompanyBrandMapping().validate(
172
+ } = CompanyProfilePlatformValidator.createCompanyBrandMapping().validate(
150
173
  {
151
174
  body,
152
175
  },
@@ -159,7 +182,7 @@ class CompanyProfile {
159
182
  // Showing warrnings if extra unknown parameters are found
160
183
  const {
161
184
  error: warrning,
162
- } = CompanyProfileValidator.createCompanyBrandMapping().validate(
185
+ } = CompanyProfilePlatformValidator.createCompanyBrandMapping().validate(
163
186
  {
164
187
  body,
165
188
  },
@@ -168,9 +191,8 @@ class CompanyProfile {
168
191
  if (warrning) {
169
192
  Logger({
170
193
  level: "WARN",
171
- message: "Parameter Validation warrnings for createCompanyBrandMapping",
194
+ message: `Parameter Validation warrnings for platform > CompanyProfile > createCompanyBrandMapping \n ${warrning}`,
172
195
  });
173
- Logger({ level: "WARN", message: warrning });
174
196
  }
175
197
 
176
198
  const query_params = {};
@@ -183,36 +205,43 @@ class CompanyProfile {
183
205
  `/service/platform/company-profile/v1.0/company/${this.config.companyId}/company-brand`,
184
206
  query_params,
185
207
  body,
186
- xHeaders
208
+ xHeaders,
209
+ { headers }
187
210
  );
188
211
 
212
+ let responseData = response;
213
+ if (headers) {
214
+ responseData = response[0];
215
+ }
216
+
189
217
  const {
190
218
  error: res_error,
191
- } = CompanyProfileModel.ProfileSuccessResponse().validate(response, {
192
- abortEarly: false,
193
- allowUnknown: false,
194
- });
219
+ } = CompanyProfilePlatformModel.ProfileSuccessResponse().validate(
220
+ responseData,
221
+ { abortEarly: false, allowUnknown: false }
222
+ );
195
223
 
196
224
  if (res_error) {
197
225
  Logger({
198
226
  level: "WARN",
199
- message: "Response Validation Warnnings for createCompanyBrandMapping",
227
+ message: `Response Validation Warnnings for platform > CompanyProfile > createCompanyBrandMapping \n ${res_error}`,
200
228
  });
201
- Logger({ level: "WARN", message: res_error });
202
229
  }
203
230
 
204
231
  return response;
205
232
  }
206
233
 
207
234
  /**
208
- * @param {Object} arg - Arg object.
209
- * @param {LocationSerializer} arg.body
210
- * @returns {Promise<ProfileSuccessResponse>} - Success response
235
+ * @param {CompanyProfilePlatformValidator.CreateLocationParam} arg - Arg object
236
+ * @param {import("../PlatformAPIClient").Options} - Options
237
+ * @returns {Promise<CompanyProfilePlatformModel.ProfileSuccessResponse>} -
238
+ * Success response
239
+ * @name createLocation
211
240
  * @summary: Create a location associated to a company.
212
- * @description: This API allows to edit a location associated to a company.
241
+ * @description: This API allows to edit a location associated to a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/createLocation/).
213
242
  */
214
- async createLocation({ body } = {}) {
215
- const { error } = CompanyProfileValidator.createLocation().validate(
243
+ async createLocation({ body } = {}, { headers } = { headers: false }) {
244
+ const { error } = CompanyProfilePlatformValidator.createLocation().validate(
216
245
  {
217
246
  body,
218
247
  },
@@ -225,7 +254,7 @@ class CompanyProfile {
225
254
  // Showing warrnings if extra unknown parameters are found
226
255
  const {
227
256
  error: warrning,
228
- } = CompanyProfileValidator.createLocation().validate(
257
+ } = CompanyProfilePlatformValidator.createLocation().validate(
229
258
  {
230
259
  body,
231
260
  },
@@ -234,9 +263,8 @@ class CompanyProfile {
234
263
  if (warrning) {
235
264
  Logger({
236
265
  level: "WARN",
237
- message: "Parameter Validation warrnings for createLocation",
266
+ message: `Parameter Validation warrnings for platform > CompanyProfile > createLocation \n ${warrning}`,
238
267
  });
239
- Logger({ level: "WARN", message: warrning });
240
268
  }
241
269
 
242
270
  const query_params = {};
@@ -249,36 +277,45 @@ class CompanyProfile {
249
277
  `/service/platform/company-profile/v1.0/company/${this.config.companyId}/location`,
250
278
  query_params,
251
279
  body,
252
- xHeaders
280
+ xHeaders,
281
+ { headers }
253
282
  );
254
283
 
284
+ let responseData = response;
285
+ if (headers) {
286
+ responseData = response[0];
287
+ }
288
+
255
289
  const {
256
290
  error: res_error,
257
- } = CompanyProfileModel.ProfileSuccessResponse().validate(response, {
258
- abortEarly: false,
259
- allowUnknown: false,
260
- });
291
+ } = CompanyProfilePlatformModel.ProfileSuccessResponse().validate(
292
+ responseData,
293
+ { abortEarly: false, allowUnknown: false }
294
+ );
261
295
 
262
296
  if (res_error) {
263
297
  Logger({
264
298
  level: "WARN",
265
- message: "Response Validation Warnnings for createLocation",
299
+ message: `Response Validation Warnnings for platform > CompanyProfile > createLocation \n ${res_error}`,
266
300
  });
267
- Logger({ level: "WARN", message: res_error });
268
301
  }
269
302
 
270
303
  return response;
271
304
  }
272
305
 
273
306
  /**
274
- * @param {Object} arg - Arg object.
275
- * @param {BulkLocationSerializer} arg.body
276
- * @returns {Promise<ProfileSuccessResponse>} - Success response
307
+ * @param {CompanyProfilePlatformValidator.CreateLocationBulkParam} arg - Arg object
308
+ * @param {import("../PlatformAPIClient").Options} - Options
309
+ * @returns {Promise<CompanyProfilePlatformModel.ProfileSuccessResponse>} -
310
+ * Success response
311
+ * @name createLocationBulk
277
312
  * @summary: Create a location asscoiated to a company in bulk.
278
- * @description: This API allows to create a location associated to a company.
313
+ * @description: This API allows to create a location associated to a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/createLocationBulk/).
279
314
  */
280
- async createLocationBulk({ body } = {}) {
281
- const { error } = CompanyProfileValidator.createLocationBulk().validate(
315
+ async createLocationBulk({ body } = {}, { headers } = { headers: false }) {
316
+ const {
317
+ error,
318
+ } = CompanyProfilePlatformValidator.createLocationBulk().validate(
282
319
  {
283
320
  body,
284
321
  },
@@ -291,7 +328,7 @@ class CompanyProfile {
291
328
  // Showing warrnings if extra unknown parameters are found
292
329
  const {
293
330
  error: warrning,
294
- } = CompanyProfileValidator.createLocationBulk().validate(
331
+ } = CompanyProfilePlatformValidator.createLocationBulk().validate(
295
332
  {
296
333
  body,
297
334
  },
@@ -300,9 +337,8 @@ class CompanyProfile {
300
337
  if (warrning) {
301
338
  Logger({
302
339
  level: "WARN",
303
- message: "Parameter Validation warrnings for createLocationBulk",
340
+ message: `Parameter Validation warrnings for platform > CompanyProfile > createLocationBulk \n ${warrning}`,
304
341
  });
305
- Logger({ level: "WARN", message: warrning });
306
342
  }
307
343
 
308
344
  const query_params = {};
@@ -315,37 +351,43 @@ class CompanyProfile {
315
351
  `/service/platform/company-profile/v1.0/company/${this.config.companyId}/location/bulk`,
316
352
  query_params,
317
353
  body,
318
- xHeaders
354
+ xHeaders,
355
+ { headers }
319
356
  );
320
357
 
358
+ let responseData = response;
359
+ if (headers) {
360
+ responseData = response[0];
361
+ }
362
+
321
363
  const {
322
364
  error: res_error,
323
- } = CompanyProfileModel.ProfileSuccessResponse().validate(response, {
324
- abortEarly: false,
325
- allowUnknown: false,
326
- });
365
+ } = CompanyProfilePlatformModel.ProfileSuccessResponse().validate(
366
+ responseData,
367
+ { abortEarly: false, allowUnknown: false }
368
+ );
327
369
 
328
370
  if (res_error) {
329
371
  Logger({
330
372
  level: "WARN",
331
- message: "Response Validation Warnnings for createLocationBulk",
373
+ message: `Response Validation Warnnings for platform > CompanyProfile > createLocationBulk \n ${res_error}`,
332
374
  });
333
- Logger({ level: "WARN", message: res_error });
334
375
  }
335
376
 
336
377
  return response;
337
378
  }
338
379
 
339
380
  /**
340
- * @param {Object} arg - Arg object.
341
- * @param {string} arg.brandId - Id of the brand to be viewed.
342
- * @param {CreateUpdateBrandRequestSerializer} arg.body
343
- * @returns {Promise<ProfileSuccessResponse>} - Success response
381
+ * @param {CompanyProfilePlatformValidator.EditBrandParam} arg - Arg object
382
+ * @param {import("../PlatformAPIClient").Options} - Options
383
+ * @returns {Promise<CompanyProfilePlatformModel.ProfileSuccessResponse>} -
384
+ * Success response
385
+ * @name editBrand
344
386
  * @summary: Edit a brand.
345
- * @description: This API allows to edit meta of a brand.
387
+ * @description: This API allows to edit meta of a brand. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/editBrand/).
346
388
  */
347
- async editBrand({ brandId, body } = {}) {
348
- const { error } = CompanyProfileValidator.editBrand().validate(
389
+ async editBrand({ brandId, body } = {}, { headers } = { headers: false }) {
390
+ const { error } = CompanyProfilePlatformValidator.editBrand().validate(
349
391
  {
350
392
  brandId,
351
393
  body,
@@ -357,7 +399,9 @@ class CompanyProfile {
357
399
  }
358
400
 
359
401
  // Showing warrnings if extra unknown parameters are found
360
- const { error: warrning } = CompanyProfileValidator.editBrand().validate(
402
+ const {
403
+ error: warrning,
404
+ } = CompanyProfilePlatformValidator.editBrand().validate(
361
405
  {
362
406
  brandId,
363
407
  body,
@@ -367,9 +411,8 @@ class CompanyProfile {
367
411
  if (warrning) {
368
412
  Logger({
369
413
  level: "WARN",
370
- message: "Parameter Validation warrnings for editBrand",
414
+ message: `Parameter Validation warrnings for platform > CompanyProfile > editBrand \n ${warrning}`,
371
415
  });
372
- Logger({ level: "WARN", message: warrning });
373
416
  }
374
417
 
375
418
  const query_params = {};
@@ -382,36 +425,44 @@ class CompanyProfile {
382
425
  `/service/platform/company-profile/v1.0/company/${this.config.companyId}/brand/${brandId}`,
383
426
  query_params,
384
427
  body,
385
- xHeaders
428
+ xHeaders,
429
+ { headers }
386
430
  );
387
431
 
432
+ let responseData = response;
433
+ if (headers) {
434
+ responseData = response[0];
435
+ }
436
+
388
437
  const {
389
438
  error: res_error,
390
- } = CompanyProfileModel.ProfileSuccessResponse().validate(response, {
391
- abortEarly: false,
392
- allowUnknown: false,
393
- });
439
+ } = CompanyProfilePlatformModel.ProfileSuccessResponse().validate(
440
+ responseData,
441
+ { abortEarly: false, allowUnknown: false }
442
+ );
394
443
 
395
444
  if (res_error) {
396
445
  Logger({
397
446
  level: "WARN",
398
- message: "Response Validation Warnnings for editBrand",
447
+ message: `Response Validation Warnnings for platform > CompanyProfile > editBrand \n ${res_error}`,
399
448
  });
400
- Logger({ level: "WARN", message: res_error });
401
449
  }
402
450
 
403
451
  return response;
404
452
  }
405
453
 
406
454
  /**
407
- * @param {Object} arg - Arg object.
408
- * @param {string} arg.brandId - Id of the brand to be viewed.
409
- * @returns {Promise<GetBrandResponseSerializer>} - Success response
455
+ * @param {CompanyProfilePlatformValidator.GetBrandParam} arg - Arg object
456
+ * @param {import("../PlatformAPIClient").Options} - Options
457
+ * @returns {Promise<CompanyProfilePlatformModel.GetBrandResponseSerializer>}
458
+ * - Success response
459
+ *
460
+ * @name getBrand
410
461
  * @summary: Get a single company brand.
411
- * @description: This API helps to get data associated to a particular company brand.
462
+ * @description: This API helps to get data associated to a particular company brand. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/getBrand/).
412
463
  */
413
- async getBrand({ brandId } = {}) {
414
- const { error } = CompanyProfileValidator.getBrand().validate(
464
+ async getBrand({ brandId } = {}, { headers } = { headers: false }) {
465
+ const { error } = CompanyProfilePlatformValidator.getBrand().validate(
415
466
  {
416
467
  brandId,
417
468
  },
@@ -422,7 +473,9 @@ class CompanyProfile {
422
473
  }
423
474
 
424
475
  // Showing warrnings if extra unknown parameters are found
425
- const { error: warrning } = CompanyProfileValidator.getBrand().validate(
476
+ const {
477
+ error: warrning,
478
+ } = CompanyProfilePlatformValidator.getBrand().validate(
426
479
  {
427
480
  brandId,
428
481
  },
@@ -431,9 +484,8 @@ class CompanyProfile {
431
484
  if (warrning) {
432
485
  Logger({
433
486
  level: "WARN",
434
- message: "Parameter Validation warrnings for getBrand",
487
+ message: `Parameter Validation warrnings for platform > CompanyProfile > getBrand \n ${warrning}`,
435
488
  });
436
- Logger({ level: "WARN", message: warrning });
437
489
  }
438
490
 
439
491
  const query_params = {};
@@ -446,40 +498,47 @@ class CompanyProfile {
446
498
  `/service/platform/company-profile/v1.0/company/${this.config.companyId}/brand/${brandId}`,
447
499
  query_params,
448
500
  undefined,
449
- xHeaders
501
+ xHeaders,
502
+ { headers }
450
503
  );
451
504
 
505
+ let responseData = response;
506
+ if (headers) {
507
+ responseData = response[0];
508
+ }
509
+
452
510
  const {
453
511
  error: res_error,
454
- } = CompanyProfileModel.GetBrandResponseSerializer().validate(response, {
455
- abortEarly: false,
456
- allowUnknown: false,
457
- });
512
+ } = CompanyProfilePlatformModel.GetBrandResponseSerializer().validate(
513
+ responseData,
514
+ { abortEarly: false, allowUnknown: false }
515
+ );
458
516
 
459
517
  if (res_error) {
460
518
  Logger({
461
519
  level: "WARN",
462
- message: "Response Validation Warnnings for getBrand",
520
+ message: `Response Validation Warnnings for platform > CompanyProfile > getBrand \n ${res_error}`,
463
521
  });
464
- Logger({ level: "WARN", message: res_error });
465
522
  }
466
523
 
467
524
  return response;
468
525
  }
469
526
 
470
527
  /**
471
- * @param {Object} arg - Arg object.
472
- * @param {number} [arg.pageNo] - The page number to navigate through the
473
- * given set of results
474
- * @param {number} [arg.pageSize] - Number of items to retrieve in each
475
- * page. Default is 10.
476
- * @param {string} [arg.q] - Search term for name.
477
- * @returns {Promise<CompanyBrandListSerializer>} - Success response
528
+ * @param {CompanyProfilePlatformValidator.GetBrandsParam} arg - Arg object
529
+ * @param {import("../PlatformAPIClient").Options} - Options
530
+ * @returns {Promise<CompanyProfilePlatformModel.CompanyBrandListSerializer>}
531
+ * - Success response
532
+ *
533
+ * @name getBrands
478
534
  * @summary: Get brands associated to a company
479
- * @description: This API helps to get view brands associated to a particular company.
535
+ * @description: This API helps to get view brands associated to a particular company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/getBrands/).
480
536
  */
481
- async getBrands({ pageNo, pageSize, q } = {}) {
482
- const { error } = CompanyProfileValidator.getBrands().validate(
537
+ async getBrands(
538
+ { pageNo, pageSize, q } = {},
539
+ { headers } = { headers: false }
540
+ ) {
541
+ const { error } = CompanyProfilePlatformValidator.getBrands().validate(
483
542
  {
484
543
  pageNo,
485
544
  pageSize,
@@ -492,7 +551,9 @@ class CompanyProfile {
492
551
  }
493
552
 
494
553
  // Showing warrnings if extra unknown parameters are found
495
- const { error: warrning } = CompanyProfileValidator.getBrands().validate(
554
+ const {
555
+ error: warrning,
556
+ } = CompanyProfilePlatformValidator.getBrands().validate(
496
557
  {
497
558
  pageNo,
498
559
  pageSize,
@@ -503,9 +564,8 @@ class CompanyProfile {
503
564
  if (warrning) {
504
565
  Logger({
505
566
  level: "WARN",
506
- message: "Parameter Validation warrnings for getBrands",
567
+ message: `Parameter Validation warrnings for platform > CompanyProfile > getBrands \n ${warrning}`,
507
568
  });
508
- Logger({ level: "WARN", message: warrning });
509
569
  }
510
570
 
511
571
  const query_params = {};
@@ -521,22 +581,27 @@ class CompanyProfile {
521
581
  `/service/platform/company-profile/v1.0/company/${this.config.companyId}/company-brand`,
522
582
  query_params,
523
583
  undefined,
524
- xHeaders
584
+ xHeaders,
585
+ { headers }
525
586
  );
526
587
 
588
+ let responseData = response;
589
+ if (headers) {
590
+ responseData = response[0];
591
+ }
592
+
527
593
  const {
528
594
  error: res_error,
529
- } = CompanyProfileModel.CompanyBrandListSerializer().validate(response, {
530
- abortEarly: false,
531
- allowUnknown: false,
532
- });
595
+ } = CompanyProfilePlatformModel.CompanyBrandListSerializer().validate(
596
+ responseData,
597
+ { abortEarly: false, allowUnknown: false }
598
+ );
533
599
 
534
600
  if (res_error) {
535
601
  Logger({
536
602
  level: "WARN",
537
- message: "Response Validation Warnnings for getBrands",
603
+ message: `Response Validation Warnnings for platform > CompanyProfile > getBrands \n ${res_error}`,
538
604
  });
539
- Logger({ level: "WARN", message: res_error });
540
605
  }
541
606
 
542
607
  return response;
@@ -547,6 +612,7 @@ class CompanyProfile {
547
612
  * @param {number} [arg.pageSize] - Number of items to retrieve in each
548
613
  * page. Default is 10.
549
614
  * @param {string} [arg.q] - Search term for name.
615
+ * @returns {Paginator<CompanyProfilePlatformModel.CompanyBrandListSerializer>}
550
616
  * @summary: Get brands associated to a company
551
617
  * @description: This API helps to get view brands associated to a particular company.
552
618
  */
@@ -572,13 +638,18 @@ class CompanyProfile {
572
638
  }
573
639
 
574
640
  /**
575
- * @param {Object} arg - Arg object.
576
- * @returns {Promise<MetricsSerializer>} - Success response
641
+ * @param {CompanyProfilePlatformValidator.GetCompanyMetricsParam} arg - Arg object
642
+ * @param {import("../PlatformAPIClient").Options} - Options
643
+ * @returns {Promise<CompanyProfilePlatformModel.MetricsSerializer>} -
644
+ * Success response
645
+ * @name getCompanyMetrics
577
646
  * @summary: Get company metrics
578
- * @description: This API allows to view the company metrics, i.e. the status of its brand and stores. Also its allows to view the number of products, company documents & store documents which are verified and unverified.
647
+ * @description: This API allows to view the company metrics, i.e. the status of its brand and stores. Also its allows to view the number of products, company documents & store documents which are verified and unverified. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/getCompanyMetrics/).
579
648
  */
580
- async getCompanyMetrics({} = {}) {
581
- const { error } = CompanyProfileValidator.getCompanyMetrics().validate(
649
+ async getCompanyMetrics({ headers } = { headers: false }) {
650
+ const {
651
+ error,
652
+ } = CompanyProfilePlatformValidator.getCompanyMetrics().validate(
582
653
  {},
583
654
  { abortEarly: false, allowUnknown: true }
584
655
  );
@@ -589,16 +660,15 @@ class CompanyProfile {
589
660
  // Showing warrnings if extra unknown parameters are found
590
661
  const {
591
662
  error: warrning,
592
- } = CompanyProfileValidator.getCompanyMetrics().validate(
663
+ } = CompanyProfilePlatformValidator.getCompanyMetrics().validate(
593
664
  {},
594
665
  { abortEarly: false, allowUnknown: false }
595
666
  );
596
667
  if (warrning) {
597
668
  Logger({
598
669
  level: "WARN",
599
- message: "Parameter Validation warrnings for getCompanyMetrics",
670
+ message: `Parameter Validation warrnings for platform > CompanyProfile > getCompanyMetrics \n ${warrning}`,
600
671
  });
601
- Logger({ level: "WARN", message: warrning });
602
672
  }
603
673
 
604
674
  const query_params = {};
@@ -611,12 +681,18 @@ class CompanyProfile {
611
681
  `/service/platform/company-profile/v1.0/company/${this.config.companyId}/metrics`,
612
682
  query_params,
613
683
  undefined,
614
- xHeaders
684
+ xHeaders,
685
+ { headers }
615
686
  );
616
687
 
688
+ let responseData = response;
689
+ if (headers) {
690
+ responseData = response[0];
691
+ }
692
+
617
693
  const {
618
694
  error: res_error,
619
- } = CompanyProfileModel.MetricsSerializer().validate(response, {
695
+ } = CompanyProfilePlatformModel.MetricsSerializer().validate(responseData, {
620
696
  abortEarly: false,
621
697
  allowUnknown: false,
622
698
  });
@@ -624,23 +700,29 @@ class CompanyProfile {
624
700
  if (res_error) {
625
701
  Logger({
626
702
  level: "WARN",
627
- message: "Response Validation Warnnings for getCompanyMetrics",
703
+ message: `Response Validation Warnnings for platform > CompanyProfile > getCompanyMetrics \n ${res_error}`,
628
704
  });
629
- Logger({ level: "WARN", message: res_error });
630
705
  }
631
706
 
632
707
  return response;
633
708
  }
634
709
 
635
710
  /**
636
- * @param {Object} arg - Arg object.
637
- * @param {string} arg.locationId - Id of the location which you want to view.
638
- * @returns {Promise<GetLocationSerializer>} - Success response
711
+ * @param {CompanyProfilePlatformValidator.GetLocationDetailParam} arg - Arg object
712
+ * @param {import("../PlatformAPIClient").Options} - Options
713
+ * @returns {Promise<CompanyProfilePlatformModel.GetLocationSerializer>} -
714
+ * Success response
715
+ * @name getLocationDetail
639
716
  * @summary: Get details of a specific location.
640
- * @description: This API helps to get data associated to a specific location.
717
+ * @description: This API helps to get data associated to a specific location. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/getLocationDetail/).
641
718
  */
642
- async getLocationDetail({ locationId } = {}) {
643
- const { error } = CompanyProfileValidator.getLocationDetail().validate(
719
+ async getLocationDetail(
720
+ { locationId } = {},
721
+ { headers } = { headers: false }
722
+ ) {
723
+ const {
724
+ error,
725
+ } = CompanyProfilePlatformValidator.getLocationDetail().validate(
644
726
  {
645
727
  locationId,
646
728
  },
@@ -653,7 +735,7 @@ class CompanyProfile {
653
735
  // Showing warrnings if extra unknown parameters are found
654
736
  const {
655
737
  error: warrning,
656
- } = CompanyProfileValidator.getLocationDetail().validate(
738
+ } = CompanyProfilePlatformValidator.getLocationDetail().validate(
657
739
  {
658
740
  locationId,
659
741
  },
@@ -662,9 +744,8 @@ class CompanyProfile {
662
744
  if (warrning) {
663
745
  Logger({
664
746
  level: "WARN",
665
- message: "Parameter Validation warrnings for getLocationDetail",
747
+ message: `Parameter Validation warrnings for platform > CompanyProfile > getLocationDetail \n ${warrning}`,
666
748
  });
667
- Logger({ level: "WARN", message: warrning });
668
749
  }
669
750
 
670
751
  const query_params = {};
@@ -677,52 +758,46 @@ class CompanyProfile {
677
758
  `/service/platform/company-profile/v1.0/company/${this.config.companyId}/location/${locationId}`,
678
759
  query_params,
679
760
  undefined,
680
- xHeaders
761
+ xHeaders,
762
+ { headers }
681
763
  );
682
764
 
765
+ let responseData = response;
766
+ if (headers) {
767
+ responseData = response[0];
768
+ }
769
+
683
770
  const {
684
771
  error: res_error,
685
- } = CompanyProfileModel.GetLocationSerializer().validate(response, {
686
- abortEarly: false,
687
- allowUnknown: false,
688
- });
772
+ } = CompanyProfilePlatformModel.GetLocationSerializer().validate(
773
+ responseData,
774
+ { abortEarly: false, allowUnknown: false }
775
+ );
689
776
 
690
777
  if (res_error) {
691
778
  Logger({
692
779
  level: "WARN",
693
- message: "Response Validation Warnnings for getLocationDetail",
780
+ message: `Response Validation Warnnings for platform > CompanyProfile > getLocationDetail \n ${res_error}`,
694
781
  });
695
- Logger({ level: "WARN", message: res_error });
696
782
  }
697
783
 
698
784
  return response;
699
785
  }
700
786
 
701
787
  /**
702
- * @param {Object} arg - Arg object.
703
- * @param {string} [arg.storeType] - Helps to sort the location list on the
704
- * basis of location type.
705
- * @param {string} [arg.q] - Query that is to be searched.
706
- * @param {string} [arg.stage] - To filter companies on basis of verified or
707
- * unverified companies.
708
- * @param {number} [arg.pageNo] - The page number to navigate through the
709
- * given set of results
710
- * @param {number} [arg.pageSize] - Number of items to retrieve in each
711
- * page. Default is 10.
712
- * @param {number[]} [arg.locationIds] - Helps to filter stores on the basis of uids.
713
- * @returns {Promise<LocationListSerializer>} - Success response
788
+ * @param {CompanyProfilePlatformValidator.GetLocationsParam} arg - Arg object
789
+ * @param {import("../PlatformAPIClient").Options} - Options
790
+ * @returns {Promise<CompanyProfilePlatformModel.LocationListSerializer>} -
791
+ * Success response
792
+ * @name getLocations
714
793
  * @summary: Get list of locations
715
- * @description: This API allows to view all the locations associated to a company.
794
+ * @description: This API allows to view all the locations associated to a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/getLocations/).
716
795
  */
717
- async getLocations({
718
- storeType,
719
- q,
720
- stage,
721
- pageNo,
722
- pageSize,
723
- locationIds,
724
- } = {}) {
725
- const { error } = CompanyProfileValidator.getLocations().validate(
796
+ async getLocations(
797
+ { storeType, q, stage, pageNo, pageSize, locationIds } = {},
798
+ { headers } = { headers: false }
799
+ ) {
800
+ const { error } = CompanyProfilePlatformValidator.getLocations().validate(
726
801
  {
727
802
  storeType,
728
803
  q,
@@ -738,7 +813,9 @@ class CompanyProfile {
738
813
  }
739
814
 
740
815
  // Showing warrnings if extra unknown parameters are found
741
- const { error: warrning } = CompanyProfileValidator.getLocations().validate(
816
+ const {
817
+ error: warrning,
818
+ } = CompanyProfilePlatformValidator.getLocations().validate(
742
819
  {
743
820
  storeType,
744
821
  q,
@@ -752,9 +829,8 @@ class CompanyProfile {
752
829
  if (warrning) {
753
830
  Logger({
754
831
  level: "WARN",
755
- message: "Parameter Validation warrnings for getLocations",
832
+ message: `Parameter Validation warrnings for platform > CompanyProfile > getLocations \n ${warrning}`,
756
833
  });
757
- Logger({ level: "WARN", message: warrning });
758
834
  }
759
835
 
760
836
  const query_params = {};
@@ -773,22 +849,27 @@ class CompanyProfile {
773
849
  `/service/platform/company-profile/v1.0/company/${this.config.companyId}/location`,
774
850
  query_params,
775
851
  undefined,
776
- xHeaders
852
+ xHeaders,
853
+ { headers }
777
854
  );
778
855
 
856
+ let responseData = response;
857
+ if (headers) {
858
+ responseData = response[0];
859
+ }
860
+
779
861
  const {
780
862
  error: res_error,
781
- } = CompanyProfileModel.LocationListSerializer().validate(response, {
782
- abortEarly: false,
783
- allowUnknown: false,
784
- });
863
+ } = CompanyProfilePlatformModel.LocationListSerializer().validate(
864
+ responseData,
865
+ { abortEarly: false, allowUnknown: false }
866
+ );
785
867
 
786
868
  if (res_error) {
787
869
  Logger({
788
870
  level: "WARN",
789
- message: "Response Validation Warnnings for getLocations",
871
+ message: `Response Validation Warnnings for platform > CompanyProfile > getLocations \n ${res_error}`,
790
872
  });
791
- Logger({ level: "WARN", message: res_error });
792
873
  }
793
874
 
794
875
  return response;
@@ -804,6 +885,7 @@ class CompanyProfile {
804
885
  * @param {number} [arg.pageSize] - Number of items to retrieve in each
805
886
  * page. Default is 10.
806
887
  * @param {number[]} [arg.locationIds] - Helps to filter stores on the basis of uids.
888
+ * @returns {Paginator<CompanyProfilePlatformModel.LocationListSerializer>}
807
889
  * @summary: Get list of locations
808
890
  * @description: This API allows to view all the locations associated to a company.
809
891
  */
@@ -832,14 +914,16 @@ class CompanyProfile {
832
914
  }
833
915
 
834
916
  /**
835
- * @param {Object} arg - Arg object.
836
- * @param {UpdateCompany} arg.body
837
- * @returns {Promise<ProfileSuccessResponse>} - Success response
917
+ * @param {CompanyProfilePlatformValidator.UpdateCompanyParam} arg - Arg object
918
+ * @param {import("../PlatformAPIClient").Options} - Options
919
+ * @returns {Promise<CompanyProfilePlatformModel.ProfileSuccessResponse>} -
920
+ * Success response
921
+ * @name updateCompany
838
922
  * @summary: Edit company profile
839
- * @description: This API allows to edit the company profile of the seller account.
923
+ * @description: This API allows to edit the company profile of the seller account. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/updateCompany/).
840
924
  */
841
- async updateCompany({ body } = {}) {
842
- const { error } = CompanyProfileValidator.updateCompany().validate(
925
+ async updateCompany({ body } = {}, { headers } = { headers: false }) {
926
+ const { error } = CompanyProfilePlatformValidator.updateCompany().validate(
843
927
  {
844
928
  body,
845
929
  },
@@ -852,7 +936,7 @@ class CompanyProfile {
852
936
  // Showing warrnings if extra unknown parameters are found
853
937
  const {
854
938
  error: warrning,
855
- } = CompanyProfileValidator.updateCompany().validate(
939
+ } = CompanyProfilePlatformValidator.updateCompany().validate(
856
940
  {
857
941
  body,
858
942
  },
@@ -861,9 +945,8 @@ class CompanyProfile {
861
945
  if (warrning) {
862
946
  Logger({
863
947
  level: "WARN",
864
- message: "Parameter Validation warrnings for updateCompany",
948
+ message: `Parameter Validation warrnings for platform > CompanyProfile > updateCompany \n ${warrning}`,
865
949
  });
866
- Logger({ level: "WARN", message: warrning });
867
950
  }
868
951
 
869
952
  const query_params = {};
@@ -876,37 +959,46 @@ class CompanyProfile {
876
959
  `/service/platform/company-profile/v1.0/company/${this.config.companyId}`,
877
960
  query_params,
878
961
  body,
879
- xHeaders
962
+ xHeaders,
963
+ { headers }
880
964
  );
881
965
 
966
+ let responseData = response;
967
+ if (headers) {
968
+ responseData = response[0];
969
+ }
970
+
882
971
  const {
883
972
  error: res_error,
884
- } = CompanyProfileModel.ProfileSuccessResponse().validate(response, {
885
- abortEarly: false,
886
- allowUnknown: false,
887
- });
973
+ } = CompanyProfilePlatformModel.ProfileSuccessResponse().validate(
974
+ responseData,
975
+ { abortEarly: false, allowUnknown: false }
976
+ );
888
977
 
889
978
  if (res_error) {
890
979
  Logger({
891
980
  level: "WARN",
892
- message: "Response Validation Warnnings for updateCompany",
981
+ message: `Response Validation Warnnings for platform > CompanyProfile > updateCompany \n ${res_error}`,
893
982
  });
894
- Logger({ level: "WARN", message: res_error });
895
983
  }
896
984
 
897
985
  return response;
898
986
  }
899
987
 
900
988
  /**
901
- * @param {Object} arg - Arg object.
902
- * @param {string} arg.locationId - Id of the location which you want to edit.
903
- * @param {LocationSerializer} arg.body
904
- * @returns {Promise<ProfileSuccessResponse>} - Success response
989
+ * @param {CompanyProfilePlatformValidator.UpdateLocationParam} arg - Arg object
990
+ * @param {import("../PlatformAPIClient").Options} - Options
991
+ * @returns {Promise<CompanyProfilePlatformModel.ProfileSuccessResponse>} -
992
+ * Success response
993
+ * @name updateLocation
905
994
  * @summary: Edit a location asscoiated to a company.
906
- * @description: This API allows to edit a location associated to a company.
995
+ * @description: This API allows to edit a location associated to a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/updateLocation/).
907
996
  */
908
- async updateLocation({ locationId, body } = {}) {
909
- const { error } = CompanyProfileValidator.updateLocation().validate(
997
+ async updateLocation(
998
+ { locationId, body } = {},
999
+ { headers } = { headers: false }
1000
+ ) {
1001
+ const { error } = CompanyProfilePlatformValidator.updateLocation().validate(
910
1002
  {
911
1003
  locationId,
912
1004
  body,
@@ -920,7 +1012,7 @@ class CompanyProfile {
920
1012
  // Showing warrnings if extra unknown parameters are found
921
1013
  const {
922
1014
  error: warrning,
923
- } = CompanyProfileValidator.updateLocation().validate(
1015
+ } = CompanyProfilePlatformValidator.updateLocation().validate(
924
1016
  {
925
1017
  locationId,
926
1018
  body,
@@ -930,9 +1022,8 @@ class CompanyProfile {
930
1022
  if (warrning) {
931
1023
  Logger({
932
1024
  level: "WARN",
933
- message: "Parameter Validation warrnings for updateLocation",
1025
+ message: `Parameter Validation warrnings for platform > CompanyProfile > updateLocation \n ${warrning}`,
934
1026
  });
935
- Logger({ level: "WARN", message: warrning });
936
1027
  }
937
1028
 
938
1029
  const query_params = {};
@@ -945,22 +1036,27 @@ class CompanyProfile {
945
1036
  `/service/platform/company-profile/v1.0/company/${this.config.companyId}/location/${locationId}`,
946
1037
  query_params,
947
1038
  body,
948
- xHeaders
1039
+ xHeaders,
1040
+ { headers }
949
1041
  );
950
1042
 
1043
+ let responseData = response;
1044
+ if (headers) {
1045
+ responseData = response[0];
1046
+ }
1047
+
951
1048
  const {
952
1049
  error: res_error,
953
- } = CompanyProfileModel.ProfileSuccessResponse().validate(response, {
954
- abortEarly: false,
955
- allowUnknown: false,
956
- });
1050
+ } = CompanyProfilePlatformModel.ProfileSuccessResponse().validate(
1051
+ responseData,
1052
+ { abortEarly: false, allowUnknown: false }
1053
+ );
957
1054
 
958
1055
  if (res_error) {
959
1056
  Logger({
960
1057
  level: "WARN",
961
- message: "Response Validation Warnnings for updateLocation",
1058
+ message: `Response Validation Warnnings for platform > CompanyProfile > updateLocation \n ${res_error}`,
962
1059
  });
963
- Logger({ level: "WARN", message: res_error });
964
1060
  }
965
1061
 
966
1062
  return response;