@gofynd/fdk-client-javascript 1.1.6 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (348) hide show
  1. package/README.md +52 -3
  2. package/index.js +0 -3
  3. package/package.json +1 -2
  4. package/sdk/application/ApplicationAPIClient.d.ts +15 -1
  5. package/sdk/application/ApplicationAPIClient.js +12 -3
  6. package/sdk/application/ApplicationClient.d.ts +36 -6
  7. package/sdk/application/ApplicationClient.js +30 -43
  8. package/sdk/application/ApplicationConfig.d.ts +92 -12
  9. package/sdk/application/ApplicationConfig.js +48 -14
  10. package/sdk/application/Cart/CartApplicationClient.d.ts +200 -357
  11. package/sdk/application/Cart/CartApplicationClient.js +711 -483
  12. package/sdk/application/Cart/CartApplicationModel.d.ts +2054 -96
  13. package/sdk/application/Cart/CartApplicationModel.js +1224 -93
  14. package/sdk/application/Cart/CartApplicationValidator.d.ts +508 -30
  15. package/sdk/application/Cart/CartApplicationValidator.js +270 -15
  16. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +274 -422
  17. package/sdk/application/Catalog/CatalogApplicationClient.js +865 -630
  18. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +2320 -117
  19. package/sdk/application/Catalog/CatalogApplicationModel.js +1566 -172
  20. package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +798 -31
  21. package/sdk/application/Catalog/CatalogApplicationValidator.js +318 -3
  22. package/sdk/application/Common/CommonApplicationClient.d.ts +16 -21
  23. package/sdk/application/Common/CommonApplicationClient.js +52 -33
  24. package/sdk/application/Common/CommonApplicationModel.d.ts +368 -19
  25. package/sdk/application/Common/CommonApplicationModel.js +192 -40
  26. package/sdk/application/Common/CommonApplicationValidator.d.ts +42 -4
  27. package/sdk/application/Common/CommonApplicationValidator.js +21 -3
  28. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +31 -18
  29. package/sdk/application/Communication/CommunicationApplicationClient.js +86 -47
  30. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +157 -14
  31. package/sdk/application/Communication/CommunicationApplicationModel.js +104 -23
  32. package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +27 -4
  33. package/sdk/application/Communication/CommunicationApplicationValidator.js +21 -5
  34. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +149 -118
  35. package/sdk/application/Configuration/ConfigurationApplicationClient.js +457 -260
  36. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +2235 -110
  37. package/sdk/application/Configuration/ConfigurationApplicationModel.js +1113 -193
  38. package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +160 -8
  39. package/sdk/application/Configuration/ConfigurationApplicationValidator.js +88 -4
  40. package/sdk/application/Content/ContentApplicationClient.d.ts +149 -139
  41. package/sdk/application/Content/ContentApplicationClient.js +489 -278
  42. package/sdk/application/Content/ContentApplicationModel.d.ts +1010 -105
  43. package/sdk/application/Content/ContentApplicationModel.js +737 -396
  44. package/sdk/application/Content/ContentApplicationValidator.d.ts +214 -12
  45. package/sdk/application/Content/ContentApplicationValidator.js +113 -3
  46. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +23 -29
  47. package/sdk/application/FileStorage/FileStorageApplicationClient.js +74 -47
  48. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +148 -20
  49. package/sdk/application/FileStorage/FileStorageApplicationModel.js +100 -87
  50. package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +55 -5
  51. package/sdk/application/FileStorage/FileStorageApplicationValidator.js +33 -6
  52. package/sdk/application/Lead/LeadApplicationClient.d.ts +57 -53
  53. package/sdk/application/Lead/LeadApplicationClient.js +188 -103
  54. package/sdk/application/Lead/LeadApplicationModel.d.ts +686 -54
  55. package/sdk/application/Lead/LeadApplicationModel.js +330 -244
  56. package/sdk/application/Lead/LeadApplicationValidator.d.ts +91 -9
  57. package/sdk/application/Lead/LeadApplicationValidator.js +51 -6
  58. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +40 -33
  59. package/sdk/application/Logistic/LogisticApplicationClient.js +131 -73
  60. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +399 -28
  61. package/sdk/application/Logistic/LogisticApplicationModel.js +293 -24
  62. package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +48 -6
  63. package/sdk/application/Logistic/LogisticApplicationValidator.js +34 -6
  64. package/sdk/application/Order/OrderApplicationClient.d.ts +93 -133
  65. package/sdk/application/Order/OrderApplicationClient.js +329 -217
  66. package/sdk/application/Order/OrderApplicationModel.d.ts +1101 -66
  67. package/sdk/application/Order/OrderApplicationModel.js +776 -57
  68. package/sdk/application/Order/OrderApplicationValidator.d.ts +249 -14
  69. package/sdk/application/Order/OrderApplicationValidator.js +114 -5
  70. package/sdk/application/Payment/PaymentApplicationClient.d.ts +400 -366
  71. package/sdk/application/Payment/PaymentApplicationClient.js +1176 -703
  72. package/sdk/application/Payment/PaymentApplicationModel.d.ts +3125 -99
  73. package/sdk/application/Payment/PaymentApplicationModel.js +1158 -62
  74. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +494 -41
  75. package/sdk/application/Payment/PaymentApplicationValidator.js +297 -25
  76. package/sdk/application/PosCart/PosCartApplicationClient.d.ts +205 -350
  77. package/sdk/application/PosCart/PosCartApplicationClient.js +720 -491
  78. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1823 -89
  79. package/sdk/application/PosCart/PosCartApplicationModel.js +1117 -85
  80. package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +480 -29
  81. package/sdk/application/PosCart/PosCartApplicationValidator.js +262 -15
  82. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +58 -47
  83. package/sdk/application/Rewards/RewardsApplicationClient.js +187 -102
  84. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +343 -22
  85. package/sdk/application/Rewards/RewardsApplicationModel.js +230 -15
  86. package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +70 -7
  87. package/sdk/application/Rewards/RewardsApplicationValidator.js +45 -6
  88. package/sdk/application/Share/ShareApplicationClient.d.ts +52 -50
  89. package/sdk/application/Share/ShareApplicationClient.js +185 -97
  90. package/sdk/application/Share/ShareApplicationModel.d.ts +198 -15
  91. package/sdk/application/Share/ShareApplicationModel.js +131 -31
  92. package/sdk/application/Share/ShareApplicationValidator.d.ts +86 -8
  93. package/sdk/application/Share/ShareApplicationValidator.js +48 -4
  94. package/sdk/application/Theme/ThemeApplicationClient.d.ts +30 -27
  95. package/sdk/application/Theme/ThemeApplicationClient.js +102 -56
  96. package/sdk/application/Theme/ThemeApplicationModel.d.ts +1291 -48
  97. package/sdk/application/Theme/ThemeApplicationModel.js +895 -134
  98. package/sdk/application/Theme/ThemeApplicationValidator.d.ts +49 -5
  99. package/sdk/application/Theme/ThemeApplicationValidator.js +26 -3
  100. package/sdk/application/User/UserApplicationClient.d.ts +260 -305
  101. package/sdk/application/User/UserApplicationClient.js +910 -522
  102. package/sdk/application/User/UserApplicationModel.d.ts +992 -101
  103. package/sdk/application/User/UserApplicationModel.js +699 -248
  104. package/sdk/application/User/UserApplicationValidator.d.ts +457 -33
  105. package/sdk/application/User/UserApplicationValidator.js +265 -31
  106. package/sdk/common/AxiosHelper.js +7 -2
  107. package/sdk/common/FDKError.d.ts +3 -0
  108. package/sdk/common/FDKError.js +8 -0
  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/common/utils.d.ts +3 -0
  113. package/sdk/common/utils.js +29 -0
  114. package/sdk/partner/PartnerAPIClient.d.ts +16 -1
  115. package/sdk/partner/PartnerAPIClient.js +12 -2
  116. package/sdk/partner/PartnerClient.d.ts +22 -3
  117. package/sdk/partner/PartnerClient.js +20 -0
  118. package/sdk/partner/PartnerConfig.d.ts +40 -14
  119. package/sdk/partner/PartnerConfig.js +31 -6
  120. package/sdk/partner/Theme/ThemePartnerClient.d.ts +299 -0
  121. package/sdk/partner/Theme/ThemePartnerClient.js +768 -0
  122. package/sdk/partner/Theme/ThemePartnerModel.d.ts +1706 -0
  123. package/sdk/partner/Theme/ThemePartnerModel.js +1409 -0
  124. package/sdk/partner/Theme/ThemePartnerValidator.d.ts +22 -0
  125. package/sdk/partner/Theme/ThemePartnerValidator.js +157 -0
  126. package/sdk/partner/index.d.ts +3 -1
  127. package/sdk/partner/index.js +3 -1
  128. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +30 -25
  129. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +104 -53
  130. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +190 -17
  131. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +132 -15
  132. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +52 -5
  133. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +30 -4
  134. package/sdk/platform/Billing/BillingPlatformClient.d.ts +133 -97
  135. package/sdk/platform/Billing/BillingPlatformClient.js +561 -191
  136. package/sdk/platform/Billing/BillingPlatformModel.d.ts +1071 -68
  137. package/sdk/platform/Billing/BillingPlatformModel.js +762 -151
  138. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +175 -12
  139. package/sdk/platform/Billing/BillingPlatformValidator.js +118 -8
  140. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +454 -635
  141. package/sdk/platform/Cart/CartPlatformApplicationClient.js +1646 -957
  142. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +827 -57
  143. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +492 -34
  144. package/sdk/platform/Cart/CartPlatformModel.d.ts +3839 -175
  145. package/sdk/platform/Cart/CartPlatformModel.js +2423 -217
  146. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +528 -638
  147. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1600 -984
  148. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +1081 -49
  149. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +482 -23
  150. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +652 -826
  151. package/sdk/platform/Catalog/CatalogPlatformClient.js +1979 -1264
  152. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6869 -326
  153. package/sdk/platform/Catalog/CatalogPlatformModel.js +4215 -351
  154. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +1361 -71
  155. package/sdk/platform/Catalog/CatalogPlatformValidator.js +624 -30
  156. package/sdk/platform/Common/CommonPlatformClient.d.ts +16 -21
  157. package/sdk/platform/Common/CommonPlatformClient.js +50 -33
  158. package/sdk/platform/Common/CommonPlatformModel.d.ts +423 -19
  159. package/sdk/platform/Common/CommonPlatformModel.js +214 -40
  160. package/sdk/platform/Common/CommonPlatformValidator.d.ts +37 -4
  161. package/sdk/platform/Common/CommonPlatformValidator.js +20 -3
  162. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +731 -303
  163. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +3095 -785
  164. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +699 -41
  165. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +463 -27
  166. package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +19 -5
  167. package/sdk/platform/Communication/CommunicationPlatformClient.js +59 -19
  168. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1708 -102
  169. package/sdk/platform/Communication/CommunicationPlatformModel.js +1360 -235
  170. package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +16 -3
  171. package/sdk/platform/Communication/CommunicationPlatformValidator.js +11 -3
  172. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +127 -111
  173. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +435 -225
  174. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +882 -43
  175. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +666 -78
  176. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +184 -13
  177. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +105 -10
  178. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +327 -240
  179. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +922 -438
  180. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +297 -22
  181. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +191 -17
  182. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +184 -178
  183. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +555 -311
  184. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +4337 -188
  185. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2178 -248
  186. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +332 -19
  187. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +153 -10
  188. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +605 -578
  189. package/sdk/platform/Content/ContentPlatformApplicationClient.js +1996 -987
  190. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +872 -62
  191. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +487 -35
  192. package/sdk/platform/Content/ContentPlatformModel.d.ts +1472 -108
  193. package/sdk/platform/Content/ContentPlatformModel.js +1085 -204
  194. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +85 -82
  195. package/sdk/platform/Discount/DiscountPlatformClient.js +333 -175
  196. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +281 -15
  197. package/sdk/platform/Discount/DiscountPlatformModel.js +189 -10
  198. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +185 -13
  199. package/sdk/platform/Discount/DiscountPlatformValidator.js +88 -8
  200. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +109 -52
  201. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +570 -105
  202. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +141 -6
  203. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +118 -7
  204. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +43 -63
  205. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +153 -135
  206. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +426 -20
  207. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +379 -40
  208. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +106 -8
  209. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +60 -8
  210. package/sdk/platform/Finance/FinancePlatformClient.d.ts +260 -129
  211. package/sdk/platform/Finance/FinancePlatformClient.js +1182 -194
  212. package/sdk/platform/Finance/FinancePlatformModel.d.ts +1267 -50
  213. package/sdk/platform/Finance/FinancePlatformModel.js +1252 -38
  214. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +233 -15
  215. package/sdk/platform/Finance/FinancePlatformValidator.js +229 -16
  216. package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +111 -97
  217. package/sdk/platform/Inventory/InventoryPlatformClient.js +330 -199
  218. package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +1354 -61
  219. package/sdk/platform/Inventory/InventoryPlatformModel.js +916 -83
  220. package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +168 -12
  221. package/sdk/platform/Inventory/InventoryPlatformValidator.js +82 -6
  222. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +100 -106
  223. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +372 -186
  224. package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +180 -14
  225. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +94 -9
  226. package/sdk/platform/Lead/LeadPlatformClient.d.ts +89 -104
  227. package/sdk/platform/Lead/LeadPlatformClient.js +305 -180
  228. package/sdk/platform/Lead/LeadPlatformModel.d.ts +1045 -54
  229. package/sdk/platform/Lead/LeadPlatformModel.js +504 -142
  230. package/sdk/platform/Lead/LeadPlatformValidator.d.ts +173 -12
  231. package/sdk/platform/Lead/LeadPlatformValidator.js +92 -15
  232. package/sdk/platform/OAuthClient.js +6 -2
  233. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +20 -14
  234. package/sdk/platform/Order/OrderPlatformApplicationClient.js +58 -29
  235. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +26 -4
  236. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +16 -3
  237. package/sdk/platform/Order/OrderPlatformClient.d.ts +437 -556
  238. package/sdk/platform/Order/OrderPlatformClient.js +1500 -760
  239. package/sdk/platform/Order/OrderPlatformModel.d.ts +5225 -247
  240. package/sdk/platform/Order/OrderPlatformModel.js +3473 -260
  241. package/sdk/platform/Order/OrderPlatformValidator.d.ts +859 -37
  242. package/sdk/platform/Order/OrderPlatformValidator.js +435 -23
  243. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +16 -42
  244. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +52 -155
  245. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +37 -6
  246. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +19 -17
  247. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +78 -45
  248. package/sdk/platform/Partner/PartnerPlatformModel.js +43 -369
  249. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +418 -288
  250. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +1509 -505
  251. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +438 -30
  252. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +312 -19
  253. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +83 -73
  254. package/sdk/platform/Payment/PaymentPlatformClient.js +259 -154
  255. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +3200 -93
  256. package/sdk/platform/Payment/PaymentPlatformModel.js +1334 -36
  257. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +111 -11
  258. package/sdk/platform/Payment/PaymentPlatformValidator.js +68 -7
  259. package/sdk/platform/PlatformAPIClient.d.ts +16 -1
  260. package/sdk/platform/PlatformAPIClient.js +9 -1
  261. package/sdk/platform/PlatformApplicationClient.d.ts +22 -1798
  262. package/sdk/platform/PlatformApplicationClient.js +17 -1899
  263. package/sdk/platform/PlatformClient.d.ts +31 -12581
  264. package/sdk/platform/PlatformClient.js +30 -15089
  265. package/sdk/platform/PlatformConfig.d.ts +37 -11
  266. package/sdk/platform/PlatformConfig.js +32 -6
  267. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +96 -92
  268. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +344 -177
  269. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +149 -12
  270. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +82 -8
  271. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +360 -23
  272. package/sdk/platform/Rewards/RewardsPlatformModel.js +238 -22
  273. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +159 -92
  274. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +473 -208
  275. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +138 -13
  276. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +100 -14
  277. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +166 -178
  278. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +518 -329
  279. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1408 -96
  280. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1034 -71
  281. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +280 -18
  282. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +134 -11
  283. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +41 -66
  284. package/sdk/platform/Share/SharePlatformApplicationClient.js +149 -116
  285. package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +87 -7
  286. package/sdk/platform/Share/SharePlatformApplicationValidator.js +42 -5
  287. package/sdk/platform/Share/SharePlatformModel.d.ts +250 -16
  288. package/sdk/platform/Share/SharePlatformModel.js +167 -19
  289. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +229 -193
  290. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +976 -352
  291. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +345 -24
  292. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +206 -14
  293. package/sdk/platform/Theme/ThemePlatformClient.d.ts +37 -0
  294. package/sdk/platform/Theme/ThemePlatformClient.js +235 -0
  295. package/sdk/platform/Theme/ThemePlatformModel.d.ts +1527 -48
  296. package/sdk/platform/Theme/ThemePlatformModel.js +1099 -118
  297. package/sdk/platform/Theme/ThemePlatformValidator.d.ts +32 -0
  298. package/sdk/platform/Theme/ThemePlatformValidator.js +38 -0
  299. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +138 -152
  300. package/sdk/platform/User/UserPlatformApplicationClient.js +470 -244
  301. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +242 -18
  302. package/sdk/platform/User/UserPlatformApplicationValidator.js +129 -12
  303. package/sdk/platform/User/UserPlatformModel.d.ts +653 -101
  304. package/sdk/platform/User/UserPlatformModel.js +467 -424
  305. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +153 -49
  306. package/sdk/platform/Webhook/WebhookPlatformClient.js +896 -88
  307. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +632 -16
  308. package/sdk/platform/Webhook/WebhookPlatformModel.js +502 -54
  309. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +170 -7
  310. package/sdk/platform/Webhook/WebhookPlatformValidator.js +157 -7
  311. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +16 -21
  312. package/sdk/public/Configuration/ConfigurationPublicClient.js +48 -33
  313. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +370 -19
  314. package/sdk/public/Configuration/ConfigurationPublicModel.js +191 -40
  315. package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +42 -4
  316. package/sdk/public/Configuration/ConfigurationPublicValidator.js +21 -3
  317. package/sdk/public/Inventory/InventoryPublicClient.d.ts +54 -48
  318. package/sdk/public/Inventory/InventoryPublicClient.js +161 -98
  319. package/sdk/public/Inventory/InventoryPublicModel.d.ts +392 -21
  320. package/sdk/public/Inventory/InventoryPublicModel.js +267 -27
  321. package/sdk/public/Inventory/InventoryPublicValidator.d.ts +90 -8
  322. package/sdk/public/Inventory/InventoryPublicValidator.js +44 -4
  323. package/sdk/public/Partner/PartnerPublicClient.d.ts +22 -0
  324. package/sdk/public/Partner/PartnerPublicClient.js +110 -0
  325. package/sdk/public/Partner/PartnerPublicModel.d.ts +240 -0
  326. package/sdk/public/Partner/PartnerPublicModel.js +280 -0
  327. package/sdk/public/Partner/PartnerPublicValidator.d.ts +18 -0
  328. package/sdk/public/Partner/PartnerPublicValidator.js +19 -0
  329. package/sdk/public/PublicAPIClient.d.ts +14 -1
  330. package/sdk/public/PublicAPIClient.js +7 -1
  331. package/sdk/public/PublicClient.d.ts +21 -3
  332. package/sdk/public/PublicClient.js +20 -0
  333. package/sdk/public/PublicConfig.d.ts +27 -6
  334. package/sdk/public/PublicConfig.js +17 -1
  335. package/sdk/public/Webhook/WebhookPublicClient.d.ts +16 -11
  336. package/sdk/public/Webhook/WebhookPublicClient.js +48 -27
  337. package/sdk/public/Webhook/WebhookPublicModel.d.ts +52 -16
  338. package/sdk/public/Webhook/WebhookPublicModel.js +33 -113
  339. package/sdk/public/Webhook/WebhookPublicValidator.d.ts +18 -3
  340. package/sdk/public/Webhook/WebhookPublicValidator.js +14 -4
  341. package/sdk/public/index.d.ts +1 -0
  342. package/sdk/public/index.js +2 -0
  343. package/sdk/application/ApplicationModels.d.ts +0 -3
  344. package/sdk/application/ApplicationModels.js +0 -20
  345. package/sdk/platform/Partner/PartnerPlatformClient.d.ts +0 -145
  346. package/sdk/platform/Partner/PartnerPlatformClient.js +0 -799
  347. package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +0 -14
  348. package/sdk/platform/Partner/PartnerPlatformValidator.js +0 -87
@@ -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,21 @@ 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 {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
17
+ * @param {import("../PlatformAPIClient").Options} - Options
18
+ * @returns {Promise<CompanyProfilePlatformModel.GetCompanyProfileSerializerResponse>}
19
+ * - Success response
20
+ *
21
+ * @name cbsOnboardGet
17
22
  * @summary: Get company profile
18
- * @description: This API allows to view the company profile of the seller account.
23
+ * @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
24
  */
20
- async cbsOnboardGet({} = {}) {
21
- const { error } = CompanyProfileValidator.cbsOnboardGet().validate(
25
+ async cbsOnboardGet(
26
+ { requestHeaders } = { requestHeaders: {} },
27
+ { responseHeaders } = { responseHeaders: false }
28
+ ) {
29
+ const { error } = CompanyProfilePlatformValidator.cbsOnboardGet().validate(
22
30
  {},
23
31
  { abortEarly: false, allowUnknown: true }
24
32
  );
@@ -29,16 +37,15 @@ class CompanyProfile {
29
37
  // Showing warrnings if extra unknown parameters are found
30
38
  const {
31
39
  error: warrning,
32
- } = CompanyProfileValidator.cbsOnboardGet().validate(
40
+ } = CompanyProfilePlatformValidator.cbsOnboardGet().validate(
33
41
  {},
34
42
  { abortEarly: false, allowUnknown: false }
35
43
  );
36
44
  if (warrning) {
37
45
  Logger({
38
46
  level: "WARN",
39
- message: "Parameter Validation warrnings for cbsOnboardGet",
47
+ message: `Parameter Validation warrnings for platform > CompanyProfile > cbsOnboardGet \n ${warrning}`,
40
48
  });
41
- Logger({ level: "WARN", message: warrning });
42
49
  }
43
50
 
44
51
  const query_params = {};
@@ -51,36 +58,47 @@ class CompanyProfile {
51
58
  `/service/platform/company-profile/v1.0/company/${this.config.companyId}`,
52
59
  query_params,
53
60
  undefined,
54
- xHeaders
61
+ { ...xHeaders, ...requestHeaders },
62
+ { responseHeaders }
55
63
  );
56
64
 
65
+ let responseData = response;
66
+ if (responseHeaders) {
67
+ responseData = response[0];
68
+ }
69
+
57
70
  const {
58
71
  error: res_error,
59
- } = CompanyProfileModel.GetCompanyProfileSerializerResponse().validate(
60
- response,
72
+ } = CompanyProfilePlatformModel.GetCompanyProfileSerializerResponse().validate(
73
+ responseData,
61
74
  { abortEarly: false, allowUnknown: false }
62
75
  );
63
76
 
64
77
  if (res_error) {
65
78
  Logger({
66
79
  level: "WARN",
67
- message: "Response Validation Warnnings for cbsOnboardGet",
80
+ message: `Response Validation Warnnings for platform > CompanyProfile > cbsOnboardGet \n ${res_error}`,
68
81
  });
69
- Logger({ level: "WARN", message: res_error });
70
82
  }
71
83
 
72
84
  return response;
73
85
  }
74
86
 
75
87
  /**
76
- * @param {Object} arg - Arg object.
77
- * @param {CreateUpdateBrandRequestSerializer} arg.body
78
- * @returns {Promise<ProfileSuccessResponse>} - Success response
88
+ * @param {CompanyProfilePlatformValidator.CreateBrandParam} arg - Arg object
89
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
90
+ * @param {import("../PlatformAPIClient").Options} - Options
91
+ * @returns {Promise<CompanyProfilePlatformModel.ProfileSuccessResponse>} -
92
+ * Success response
93
+ * @name createBrand
79
94
  * @summary: Create a Brand.
80
- * @description: This API allows to create a brand associated to a company.
95
+ * @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
96
  */
82
- async createBrand({ body } = {}) {
83
- const { error } = CompanyProfileValidator.createBrand().validate(
97
+ async createBrand(
98
+ { body, requestHeaders } = { requestHeaders: {} },
99
+ { responseHeaders } = { responseHeaders: false }
100
+ ) {
101
+ const { error } = CompanyProfilePlatformValidator.createBrand().validate(
84
102
  {
85
103
  body,
86
104
  },
@@ -91,7 +109,9 @@ class CompanyProfile {
91
109
  }
92
110
 
93
111
  // Showing warrnings if extra unknown parameters are found
94
- const { error: warrning } = CompanyProfileValidator.createBrand().validate(
112
+ const {
113
+ error: warrning,
114
+ } = CompanyProfilePlatformValidator.createBrand().validate(
95
115
  {
96
116
  body,
97
117
  },
@@ -100,9 +120,8 @@ class CompanyProfile {
100
120
  if (warrning) {
101
121
  Logger({
102
122
  level: "WARN",
103
- message: "Parameter Validation warrnings for createBrand",
123
+ message: `Parameter Validation warrnings for platform > CompanyProfile > createBrand \n ${warrning}`,
104
124
  });
105
- Logger({ level: "WARN", message: warrning });
106
125
  }
107
126
 
108
127
  const query_params = {};
@@ -115,38 +134,51 @@ class CompanyProfile {
115
134
  `/service/platform/company-profile/v1.0/company/${this.config.companyId}/brand/`,
116
135
  query_params,
117
136
  body,
118
- xHeaders
137
+ { ...xHeaders, ...requestHeaders },
138
+ { responseHeaders }
119
139
  );
120
140
 
141
+ let responseData = response;
142
+ if (responseHeaders) {
143
+ responseData = response[0];
144
+ }
145
+
121
146
  const {
122
147
  error: res_error,
123
- } = CompanyProfileModel.ProfileSuccessResponse().validate(response, {
124
- abortEarly: false,
125
- allowUnknown: false,
126
- });
148
+ } = CompanyProfilePlatformModel.ProfileSuccessResponse().validate(
149
+ responseData,
150
+ { abortEarly: false, allowUnknown: false }
151
+ );
127
152
 
128
153
  if (res_error) {
129
154
  Logger({
130
155
  level: "WARN",
131
- message: "Response Validation Warnnings for createBrand",
156
+ message: `Response Validation Warnnings for platform > CompanyProfile > createBrand \n ${res_error}`,
132
157
  });
133
- Logger({ level: "WARN", message: res_error });
134
158
  }
135
159
 
136
160
  return response;
137
161
  }
138
162
 
139
163
  /**
140
- * @param {Object} arg - Arg object.
141
- * @param {CompanyBrandPostRequestSerializer} arg.body
142
- * @returns {Promise<ProfileSuccessResponse>} - Success response
164
+ * @param {CompanyProfilePlatformValidator.CreateCompanyBrandMappingParam} arg
165
+ * - Arg object
166
+ *
167
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
168
+ * @param {import("../PlatformAPIClient").Options} - Options
169
+ * @returns {Promise<CompanyProfilePlatformModel.ProfileSuccessResponse>} -
170
+ * Success response
171
+ * @name createCompanyBrandMapping
143
172
  * @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.
173
+ * @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
174
  */
146
- async createCompanyBrandMapping({ body } = {}) {
175
+ async createCompanyBrandMapping(
176
+ { body, requestHeaders } = { requestHeaders: {} },
177
+ { responseHeaders } = { responseHeaders: false }
178
+ ) {
147
179
  const {
148
180
  error,
149
- } = CompanyProfileValidator.createCompanyBrandMapping().validate(
181
+ } = CompanyProfilePlatformValidator.createCompanyBrandMapping().validate(
150
182
  {
151
183
  body,
152
184
  },
@@ -159,7 +191,7 @@ class CompanyProfile {
159
191
  // Showing warrnings if extra unknown parameters are found
160
192
  const {
161
193
  error: warrning,
162
- } = CompanyProfileValidator.createCompanyBrandMapping().validate(
194
+ } = CompanyProfilePlatformValidator.createCompanyBrandMapping().validate(
163
195
  {
164
196
  body,
165
197
  },
@@ -168,9 +200,8 @@ class CompanyProfile {
168
200
  if (warrning) {
169
201
  Logger({
170
202
  level: "WARN",
171
- message: "Parameter Validation warrnings for createCompanyBrandMapping",
203
+ message: `Parameter Validation warrnings for platform > CompanyProfile > createCompanyBrandMapping \n ${warrning}`,
172
204
  });
173
- Logger({ level: "WARN", message: warrning });
174
205
  }
175
206
 
176
207
  const query_params = {};
@@ -183,36 +214,47 @@ class CompanyProfile {
183
214
  `/service/platform/company-profile/v1.0/company/${this.config.companyId}/company-brand`,
184
215
  query_params,
185
216
  body,
186
- xHeaders
217
+ { ...xHeaders, ...requestHeaders },
218
+ { responseHeaders }
187
219
  );
188
220
 
221
+ let responseData = response;
222
+ if (responseHeaders) {
223
+ responseData = response[0];
224
+ }
225
+
189
226
  const {
190
227
  error: res_error,
191
- } = CompanyProfileModel.ProfileSuccessResponse().validate(response, {
192
- abortEarly: false,
193
- allowUnknown: false,
194
- });
228
+ } = CompanyProfilePlatformModel.ProfileSuccessResponse().validate(
229
+ responseData,
230
+ { abortEarly: false, allowUnknown: false }
231
+ );
195
232
 
196
233
  if (res_error) {
197
234
  Logger({
198
235
  level: "WARN",
199
- message: "Response Validation Warnnings for createCompanyBrandMapping",
236
+ message: `Response Validation Warnnings for platform > CompanyProfile > createCompanyBrandMapping \n ${res_error}`,
200
237
  });
201
- Logger({ level: "WARN", message: res_error });
202
238
  }
203
239
 
204
240
  return response;
205
241
  }
206
242
 
207
243
  /**
208
- * @param {Object} arg - Arg object.
209
- * @param {LocationSerializer} arg.body
210
- * @returns {Promise<ProfileSuccessResponse>} - Success response
244
+ * @param {CompanyProfilePlatformValidator.CreateLocationParam} arg - Arg object
245
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
246
+ * @param {import("../PlatformAPIClient").Options} - Options
247
+ * @returns {Promise<CompanyProfilePlatformModel.ProfileSuccessResponse>} -
248
+ * Success response
249
+ * @name createLocation
211
250
  * @summary: Create a location associated to a company.
212
- * @description: This API allows to edit a location associated to a company.
251
+ * @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
252
  */
214
- async createLocation({ body } = {}) {
215
- const { error } = CompanyProfileValidator.createLocation().validate(
253
+ async createLocation(
254
+ { body, requestHeaders } = { requestHeaders: {} },
255
+ { responseHeaders } = { responseHeaders: false }
256
+ ) {
257
+ const { error } = CompanyProfilePlatformValidator.createLocation().validate(
216
258
  {
217
259
  body,
218
260
  },
@@ -225,7 +267,7 @@ class CompanyProfile {
225
267
  // Showing warrnings if extra unknown parameters are found
226
268
  const {
227
269
  error: warrning,
228
- } = CompanyProfileValidator.createLocation().validate(
270
+ } = CompanyProfilePlatformValidator.createLocation().validate(
229
271
  {
230
272
  body,
231
273
  },
@@ -234,9 +276,8 @@ class CompanyProfile {
234
276
  if (warrning) {
235
277
  Logger({
236
278
  level: "WARN",
237
- message: "Parameter Validation warrnings for createLocation",
279
+ message: `Parameter Validation warrnings for platform > CompanyProfile > createLocation \n ${warrning}`,
238
280
  });
239
- Logger({ level: "WARN", message: warrning });
240
281
  }
241
282
 
242
283
  const query_params = {};
@@ -249,36 +290,49 @@ class CompanyProfile {
249
290
  `/service/platform/company-profile/v1.0/company/${this.config.companyId}/location`,
250
291
  query_params,
251
292
  body,
252
- xHeaders
293
+ { ...xHeaders, ...requestHeaders },
294
+ { responseHeaders }
253
295
  );
254
296
 
297
+ let responseData = response;
298
+ if (responseHeaders) {
299
+ responseData = response[0];
300
+ }
301
+
255
302
  const {
256
303
  error: res_error,
257
- } = CompanyProfileModel.ProfileSuccessResponse().validate(response, {
258
- abortEarly: false,
259
- allowUnknown: false,
260
- });
304
+ } = CompanyProfilePlatformModel.ProfileSuccessResponse().validate(
305
+ responseData,
306
+ { abortEarly: false, allowUnknown: false }
307
+ );
261
308
 
262
309
  if (res_error) {
263
310
  Logger({
264
311
  level: "WARN",
265
- message: "Response Validation Warnnings for createLocation",
312
+ message: `Response Validation Warnnings for platform > CompanyProfile > createLocation \n ${res_error}`,
266
313
  });
267
- Logger({ level: "WARN", message: res_error });
268
314
  }
269
315
 
270
316
  return response;
271
317
  }
272
318
 
273
319
  /**
274
- * @param {Object} arg - Arg object.
275
- * @param {BulkLocationSerializer} arg.body
276
- * @returns {Promise<ProfileSuccessResponse>} - Success response
320
+ * @param {CompanyProfilePlatformValidator.CreateLocationBulkParam} arg - Arg object
321
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
322
+ * @param {import("../PlatformAPIClient").Options} - Options
323
+ * @returns {Promise<CompanyProfilePlatformModel.ProfileSuccessResponse>} -
324
+ * Success response
325
+ * @name createLocationBulk
277
326
  * @summary: Create a location asscoiated to a company in bulk.
278
- * @description: This API allows to create a location associated to a company.
327
+ * @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
328
  */
280
- async createLocationBulk({ body } = {}) {
281
- const { error } = CompanyProfileValidator.createLocationBulk().validate(
329
+ async createLocationBulk(
330
+ { body, requestHeaders } = { requestHeaders: {} },
331
+ { responseHeaders } = { responseHeaders: false }
332
+ ) {
333
+ const {
334
+ error,
335
+ } = CompanyProfilePlatformValidator.createLocationBulk().validate(
282
336
  {
283
337
  body,
284
338
  },
@@ -291,7 +345,7 @@ class CompanyProfile {
291
345
  // Showing warrnings if extra unknown parameters are found
292
346
  const {
293
347
  error: warrning,
294
- } = CompanyProfileValidator.createLocationBulk().validate(
348
+ } = CompanyProfilePlatformValidator.createLocationBulk().validate(
295
349
  {
296
350
  body,
297
351
  },
@@ -300,9 +354,8 @@ class CompanyProfile {
300
354
  if (warrning) {
301
355
  Logger({
302
356
  level: "WARN",
303
- message: "Parameter Validation warrnings for createLocationBulk",
357
+ message: `Parameter Validation warrnings for platform > CompanyProfile > createLocationBulk \n ${warrning}`,
304
358
  });
305
- Logger({ level: "WARN", message: warrning });
306
359
  }
307
360
 
308
361
  const query_params = {};
@@ -315,37 +368,47 @@ class CompanyProfile {
315
368
  `/service/platform/company-profile/v1.0/company/${this.config.companyId}/location/bulk`,
316
369
  query_params,
317
370
  body,
318
- xHeaders
371
+ { ...xHeaders, ...requestHeaders },
372
+ { responseHeaders }
319
373
  );
320
374
 
375
+ let responseData = response;
376
+ if (responseHeaders) {
377
+ responseData = response[0];
378
+ }
379
+
321
380
  const {
322
381
  error: res_error,
323
- } = CompanyProfileModel.ProfileSuccessResponse().validate(response, {
324
- abortEarly: false,
325
- allowUnknown: false,
326
- });
382
+ } = CompanyProfilePlatformModel.ProfileSuccessResponse().validate(
383
+ responseData,
384
+ { abortEarly: false, allowUnknown: false }
385
+ );
327
386
 
328
387
  if (res_error) {
329
388
  Logger({
330
389
  level: "WARN",
331
- message: "Response Validation Warnnings for createLocationBulk",
390
+ message: `Response Validation Warnnings for platform > CompanyProfile > createLocationBulk \n ${res_error}`,
332
391
  });
333
- Logger({ level: "WARN", message: res_error });
334
392
  }
335
393
 
336
394
  return response;
337
395
  }
338
396
 
339
397
  /**
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
398
+ * @param {CompanyProfilePlatformValidator.EditBrandParam} arg - Arg object
399
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
400
+ * @param {import("../PlatformAPIClient").Options} - Options
401
+ * @returns {Promise<CompanyProfilePlatformModel.ProfileSuccessResponse>} -
402
+ * Success response
403
+ * @name editBrand
344
404
  * @summary: Edit a brand.
345
- * @description: This API allows to edit meta of a brand.
405
+ * @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
406
  */
347
- async editBrand({ brandId, body } = {}) {
348
- const { error } = CompanyProfileValidator.editBrand().validate(
407
+ async editBrand(
408
+ { brandId, body, requestHeaders } = { requestHeaders: {} },
409
+ { responseHeaders } = { responseHeaders: false }
410
+ ) {
411
+ const { error } = CompanyProfilePlatformValidator.editBrand().validate(
349
412
  {
350
413
  brandId,
351
414
  body,
@@ -357,7 +420,9 @@ class CompanyProfile {
357
420
  }
358
421
 
359
422
  // Showing warrnings if extra unknown parameters are found
360
- const { error: warrning } = CompanyProfileValidator.editBrand().validate(
423
+ const {
424
+ error: warrning,
425
+ } = CompanyProfilePlatformValidator.editBrand().validate(
361
426
  {
362
427
  brandId,
363
428
  body,
@@ -367,9 +432,8 @@ class CompanyProfile {
367
432
  if (warrning) {
368
433
  Logger({
369
434
  level: "WARN",
370
- message: "Parameter Validation warrnings for editBrand",
435
+ message: `Parameter Validation warrnings for platform > CompanyProfile > editBrand \n ${warrning}`,
371
436
  });
372
- Logger({ level: "WARN", message: warrning });
373
437
  }
374
438
 
375
439
  const query_params = {};
@@ -382,36 +446,48 @@ class CompanyProfile {
382
446
  `/service/platform/company-profile/v1.0/company/${this.config.companyId}/brand/${brandId}`,
383
447
  query_params,
384
448
  body,
385
- xHeaders
449
+ { ...xHeaders, ...requestHeaders },
450
+ { responseHeaders }
386
451
  );
387
452
 
453
+ let responseData = response;
454
+ if (responseHeaders) {
455
+ responseData = response[0];
456
+ }
457
+
388
458
  const {
389
459
  error: res_error,
390
- } = CompanyProfileModel.ProfileSuccessResponse().validate(response, {
391
- abortEarly: false,
392
- allowUnknown: false,
393
- });
460
+ } = CompanyProfilePlatformModel.ProfileSuccessResponse().validate(
461
+ responseData,
462
+ { abortEarly: false, allowUnknown: false }
463
+ );
394
464
 
395
465
  if (res_error) {
396
466
  Logger({
397
467
  level: "WARN",
398
- message: "Response Validation Warnnings for editBrand",
468
+ message: `Response Validation Warnnings for platform > CompanyProfile > editBrand \n ${res_error}`,
399
469
  });
400
- Logger({ level: "WARN", message: res_error });
401
470
  }
402
471
 
403
472
  return response;
404
473
  }
405
474
 
406
475
  /**
407
- * @param {Object} arg - Arg object.
408
- * @param {string} arg.brandId - Id of the brand to be viewed.
409
- * @returns {Promise<GetBrandResponseSerializer>} - Success response
476
+ * @param {CompanyProfilePlatformValidator.GetBrandParam} arg - Arg object
477
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
478
+ * @param {import("../PlatformAPIClient").Options} - Options
479
+ * @returns {Promise<CompanyProfilePlatformModel.GetBrandResponseSerializer>}
480
+ * - Success response
481
+ *
482
+ * @name getBrand
410
483
  * @summary: Get a single company brand.
411
- * @description: This API helps to get data associated to a particular company brand.
484
+ * @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
485
  */
413
- async getBrand({ brandId } = {}) {
414
- const { error } = CompanyProfileValidator.getBrand().validate(
486
+ async getBrand(
487
+ { brandId, requestHeaders } = { requestHeaders: {} },
488
+ { responseHeaders } = { responseHeaders: false }
489
+ ) {
490
+ const { error } = CompanyProfilePlatformValidator.getBrand().validate(
415
491
  {
416
492
  brandId,
417
493
  },
@@ -422,7 +498,9 @@ class CompanyProfile {
422
498
  }
423
499
 
424
500
  // Showing warrnings if extra unknown parameters are found
425
- const { error: warrning } = CompanyProfileValidator.getBrand().validate(
501
+ const {
502
+ error: warrning,
503
+ } = CompanyProfilePlatformValidator.getBrand().validate(
426
504
  {
427
505
  brandId,
428
506
  },
@@ -431,9 +509,8 @@ class CompanyProfile {
431
509
  if (warrning) {
432
510
  Logger({
433
511
  level: "WARN",
434
- message: "Parameter Validation warrnings for getBrand",
512
+ message: `Parameter Validation warrnings for platform > CompanyProfile > getBrand \n ${warrning}`,
435
513
  });
436
- Logger({ level: "WARN", message: warrning });
437
514
  }
438
515
 
439
516
  const query_params = {};
@@ -446,40 +523,48 @@ class CompanyProfile {
446
523
  `/service/platform/company-profile/v1.0/company/${this.config.companyId}/brand/${brandId}`,
447
524
  query_params,
448
525
  undefined,
449
- xHeaders
526
+ { ...xHeaders, ...requestHeaders },
527
+ { responseHeaders }
450
528
  );
451
529
 
530
+ let responseData = response;
531
+ if (responseHeaders) {
532
+ responseData = response[0];
533
+ }
534
+
452
535
  const {
453
536
  error: res_error,
454
- } = CompanyProfileModel.GetBrandResponseSerializer().validate(response, {
455
- abortEarly: false,
456
- allowUnknown: false,
457
- });
537
+ } = CompanyProfilePlatformModel.GetBrandResponseSerializer().validate(
538
+ responseData,
539
+ { abortEarly: false, allowUnknown: false }
540
+ );
458
541
 
459
542
  if (res_error) {
460
543
  Logger({
461
544
  level: "WARN",
462
- message: "Response Validation Warnnings for getBrand",
545
+ message: `Response Validation Warnnings for platform > CompanyProfile > getBrand \n ${res_error}`,
463
546
  });
464
- Logger({ level: "WARN", message: res_error });
465
547
  }
466
548
 
467
549
  return response;
468
550
  }
469
551
 
470
552
  /**
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
553
+ * @param {CompanyProfilePlatformValidator.GetBrandsParam} arg - Arg object
554
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
555
+ * @param {import("../PlatformAPIClient").Options} - Options
556
+ * @returns {Promise<CompanyProfilePlatformModel.CompanyBrandListSerializer>}
557
+ * - Success response
558
+ *
559
+ * @name getBrands
478
560
  * @summary: Get brands associated to a company
479
- * @description: This API helps to get view brands associated to a particular company.
561
+ * @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
562
  */
481
- async getBrands({ pageNo, pageSize, q } = {}) {
482
- const { error } = CompanyProfileValidator.getBrands().validate(
563
+ async getBrands(
564
+ { pageNo, pageSize, q, requestHeaders } = { requestHeaders: {} },
565
+ { responseHeaders } = { responseHeaders: false }
566
+ ) {
567
+ const { error } = CompanyProfilePlatformValidator.getBrands().validate(
483
568
  {
484
569
  pageNo,
485
570
  pageSize,
@@ -492,7 +577,9 @@ class CompanyProfile {
492
577
  }
493
578
 
494
579
  // Showing warrnings if extra unknown parameters are found
495
- const { error: warrning } = CompanyProfileValidator.getBrands().validate(
580
+ const {
581
+ error: warrning,
582
+ } = CompanyProfilePlatformValidator.getBrands().validate(
496
583
  {
497
584
  pageNo,
498
585
  pageSize,
@@ -503,9 +590,8 @@ class CompanyProfile {
503
590
  if (warrning) {
504
591
  Logger({
505
592
  level: "WARN",
506
- message: "Parameter Validation warrnings for getBrands",
593
+ message: `Parameter Validation warrnings for platform > CompanyProfile > getBrands \n ${warrning}`,
507
594
  });
508
- Logger({ level: "WARN", message: warrning });
509
595
  }
510
596
 
511
597
  const query_params = {};
@@ -521,22 +607,27 @@ class CompanyProfile {
521
607
  `/service/platform/company-profile/v1.0/company/${this.config.companyId}/company-brand`,
522
608
  query_params,
523
609
  undefined,
524
- xHeaders
610
+ { ...xHeaders, ...requestHeaders },
611
+ { responseHeaders }
525
612
  );
526
613
 
614
+ let responseData = response;
615
+ if (responseHeaders) {
616
+ responseData = response[0];
617
+ }
618
+
527
619
  const {
528
620
  error: res_error,
529
- } = CompanyProfileModel.CompanyBrandListSerializer().validate(response, {
530
- abortEarly: false,
531
- allowUnknown: false,
532
- });
621
+ } = CompanyProfilePlatformModel.CompanyBrandListSerializer().validate(
622
+ responseData,
623
+ { abortEarly: false, allowUnknown: false }
624
+ );
533
625
 
534
626
  if (res_error) {
535
627
  Logger({
536
628
  level: "WARN",
537
- message: "Response Validation Warnnings for getBrands",
629
+ message: `Response Validation Warnnings for platform > CompanyProfile > getBrands \n ${res_error}`,
538
630
  });
539
- Logger({ level: "WARN", message: res_error });
540
631
  }
541
632
 
542
633
  return response;
@@ -547,6 +638,7 @@ class CompanyProfile {
547
638
  * @param {number} [arg.pageSize] - Number of items to retrieve in each
548
639
  * page. Default is 10.
549
640
  * @param {string} [arg.q] - Search term for name.
641
+ * @returns {Paginator<CompanyProfilePlatformModel.CompanyBrandListSerializer>}
550
642
  * @summary: Get brands associated to a company
551
643
  * @description: This API helps to get view brands associated to a particular company.
552
644
  */
@@ -572,13 +664,22 @@ class CompanyProfile {
572
664
  }
573
665
 
574
666
  /**
575
- * @param {Object} arg - Arg object.
576
- * @returns {Promise<MetricsSerializer>} - Success response
667
+ * @param {CompanyProfilePlatformValidator.GetCompanyMetricsParam} arg - Arg object
668
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
669
+ * @param {import("../PlatformAPIClient").Options} - Options
670
+ * @returns {Promise<CompanyProfilePlatformModel.MetricsSerializer>} -
671
+ * Success response
672
+ * @name getCompanyMetrics
577
673
  * @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.
674
+ * @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
675
  */
580
- async getCompanyMetrics({} = {}) {
581
- const { error } = CompanyProfileValidator.getCompanyMetrics().validate(
676
+ async getCompanyMetrics(
677
+ { requestHeaders } = { requestHeaders: {} },
678
+ { responseHeaders } = { responseHeaders: false }
679
+ ) {
680
+ const {
681
+ error,
682
+ } = CompanyProfilePlatformValidator.getCompanyMetrics().validate(
582
683
  {},
583
684
  { abortEarly: false, allowUnknown: true }
584
685
  );
@@ -589,16 +690,15 @@ class CompanyProfile {
589
690
  // Showing warrnings if extra unknown parameters are found
590
691
  const {
591
692
  error: warrning,
592
- } = CompanyProfileValidator.getCompanyMetrics().validate(
693
+ } = CompanyProfilePlatformValidator.getCompanyMetrics().validate(
593
694
  {},
594
695
  { abortEarly: false, allowUnknown: false }
595
696
  );
596
697
  if (warrning) {
597
698
  Logger({
598
699
  level: "WARN",
599
- message: "Parameter Validation warrnings for getCompanyMetrics",
700
+ message: `Parameter Validation warrnings for platform > CompanyProfile > getCompanyMetrics \n ${warrning}`,
600
701
  });
601
- Logger({ level: "WARN", message: warrning });
602
702
  }
603
703
 
604
704
  const query_params = {};
@@ -611,12 +711,18 @@ class CompanyProfile {
611
711
  `/service/platform/company-profile/v1.0/company/${this.config.companyId}/metrics`,
612
712
  query_params,
613
713
  undefined,
614
- xHeaders
714
+ { ...xHeaders, ...requestHeaders },
715
+ { responseHeaders }
615
716
  );
616
717
 
718
+ let responseData = response;
719
+ if (responseHeaders) {
720
+ responseData = response[0];
721
+ }
722
+
617
723
  const {
618
724
  error: res_error,
619
- } = CompanyProfileModel.MetricsSerializer().validate(response, {
725
+ } = CompanyProfilePlatformModel.MetricsSerializer().validate(responseData, {
620
726
  abortEarly: false,
621
727
  allowUnknown: false,
622
728
  });
@@ -624,23 +730,30 @@ class CompanyProfile {
624
730
  if (res_error) {
625
731
  Logger({
626
732
  level: "WARN",
627
- message: "Response Validation Warnnings for getCompanyMetrics",
733
+ message: `Response Validation Warnnings for platform > CompanyProfile > getCompanyMetrics \n ${res_error}`,
628
734
  });
629
- Logger({ level: "WARN", message: res_error });
630
735
  }
631
736
 
632
737
  return response;
633
738
  }
634
739
 
635
740
  /**
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
741
+ * @param {CompanyProfilePlatformValidator.GetLocationDetailParam} arg - Arg object
742
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
743
+ * @param {import("../PlatformAPIClient").Options} - Options
744
+ * @returns {Promise<CompanyProfilePlatformModel.GetLocationSerializer>} -
745
+ * Success response
746
+ * @name getLocationDetail
639
747
  * @summary: Get details of a specific location.
640
- * @description: This API helps to get data associated to a specific location.
748
+ * @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
749
  */
642
- async getLocationDetail({ locationId } = {}) {
643
- const { error } = CompanyProfileValidator.getLocationDetail().validate(
750
+ async getLocationDetail(
751
+ { locationId, requestHeaders } = { requestHeaders: {} },
752
+ { responseHeaders } = { responseHeaders: false }
753
+ ) {
754
+ const {
755
+ error,
756
+ } = CompanyProfilePlatformValidator.getLocationDetail().validate(
644
757
  {
645
758
  locationId,
646
759
  },
@@ -653,7 +766,7 @@ class CompanyProfile {
653
766
  // Showing warrnings if extra unknown parameters are found
654
767
  const {
655
768
  error: warrning,
656
- } = CompanyProfileValidator.getLocationDetail().validate(
769
+ } = CompanyProfilePlatformValidator.getLocationDetail().validate(
657
770
  {
658
771
  locationId,
659
772
  },
@@ -662,9 +775,8 @@ class CompanyProfile {
662
775
  if (warrning) {
663
776
  Logger({
664
777
  level: "WARN",
665
- message: "Parameter Validation warrnings for getLocationDetail",
778
+ message: `Parameter Validation warrnings for platform > CompanyProfile > getLocationDetail \n ${warrning}`,
666
779
  });
667
- Logger({ level: "WARN", message: warrning });
668
780
  }
669
781
 
670
782
  const query_params = {};
@@ -677,52 +789,124 @@ class CompanyProfile {
677
789
  `/service/platform/company-profile/v1.0/company/${this.config.companyId}/location/${locationId}`,
678
790
  query_params,
679
791
  undefined,
680
- xHeaders
792
+ { ...xHeaders, ...requestHeaders },
793
+ { responseHeaders }
681
794
  );
682
795
 
796
+ let responseData = response;
797
+ if (responseHeaders) {
798
+ responseData = response[0];
799
+ }
800
+
683
801
  const {
684
802
  error: res_error,
685
- } = CompanyProfileModel.GetLocationSerializer().validate(response, {
686
- abortEarly: false,
687
- allowUnknown: false,
688
- });
803
+ } = CompanyProfilePlatformModel.GetLocationSerializer().validate(
804
+ responseData,
805
+ { abortEarly: false, allowUnknown: false }
806
+ );
689
807
 
690
808
  if (res_error) {
691
809
  Logger({
692
810
  level: "WARN",
693
- message: "Response Validation Warnnings for getLocationDetail",
811
+ message: `Response Validation Warnnings for platform > CompanyProfile > getLocationDetail \n ${res_error}`,
694
812
  });
695
- Logger({ level: "WARN", message: res_error });
696
813
  }
697
814
 
698
815
  return response;
699
816
  }
700
817
 
701
818
  /**
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
819
+ * @param {CompanyProfilePlatformValidator.GetLocationTagsParam} arg - Arg object
820
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
821
+ * @param {import("../PlatformAPIClient").Options} - Options
822
+ * @returns {Promise<CompanyProfilePlatformModel.StoreTagsResponseSchema>}
823
+ * - Success response
824
+ *
825
+ * @name getLocationTags
826
+ * @summary: Get tags associated with locations for a company.
827
+ * @description: This API fetches all the tags associated to a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/getLocationTags/).
828
+ */
829
+ async getLocationTags(
830
+ { requestHeaders } = { requestHeaders: {} },
831
+ { responseHeaders } = { responseHeaders: false }
832
+ ) {
833
+ const {
834
+ error,
835
+ } = CompanyProfilePlatformValidator.getLocationTags().validate(
836
+ {},
837
+ { abortEarly: false, allowUnknown: true }
838
+ );
839
+ if (error) {
840
+ return Promise.reject(new FDKClientValidationError(error));
841
+ }
842
+
843
+ // Showing warrnings if extra unknown parameters are found
844
+ const {
845
+ error: warrning,
846
+ } = CompanyProfilePlatformValidator.getLocationTags().validate(
847
+ {},
848
+ { abortEarly: false, allowUnknown: false }
849
+ );
850
+ if (warrning) {
851
+ Logger({
852
+ level: "WARN",
853
+ message: `Parameter Validation warrnings for platform > CompanyProfile > getLocationTags \n ${warrning}`,
854
+ });
855
+ }
856
+
857
+ const query_params = {};
858
+
859
+ const xHeaders = {};
860
+
861
+ const response = await PlatformAPIClient.execute(
862
+ this.config,
863
+ "get",
864
+ `/service/platform/company-profile/v1.0/company/${this.config.companyId}/location/tags`,
865
+ query_params,
866
+ undefined,
867
+ { ...xHeaders, ...requestHeaders },
868
+ { responseHeaders }
869
+ );
870
+
871
+ let responseData = response;
872
+ if (responseHeaders) {
873
+ responseData = response[0];
874
+ }
875
+
876
+ const {
877
+ error: res_error,
878
+ } = CompanyProfilePlatformModel.StoreTagsResponseSchema().validate(
879
+ responseData,
880
+ { abortEarly: false, allowUnknown: false }
881
+ );
882
+
883
+ if (res_error) {
884
+ Logger({
885
+ level: "WARN",
886
+ message: `Response Validation Warnnings for platform > CompanyProfile > getLocationTags \n ${res_error}`,
887
+ });
888
+ }
889
+
890
+ return response;
891
+ }
892
+
893
+ /**
894
+ * @param {CompanyProfilePlatformValidator.GetLocationsParam} arg - Arg object
895
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
896
+ * @param {import("../PlatformAPIClient").Options} - Options
897
+ * @returns {Promise<CompanyProfilePlatformModel.LocationListSerializer>} -
898
+ * Success response
899
+ * @name getLocations
714
900
  * @summary: Get list of locations
715
- * @description: This API allows to view all the locations associated to a company.
901
+ * @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
902
  */
717
- async getLocations({
718
- storeType,
719
- q,
720
- stage,
721
- pageNo,
722
- pageSize,
723
- locationIds,
724
- } = {}) {
725
- const { error } = CompanyProfileValidator.getLocations().validate(
903
+ async getLocations(
904
+ { storeType, q, stage, pageNo, pageSize, locationIds, requestHeaders } = {
905
+ requestHeaders: {},
906
+ },
907
+ { responseHeaders } = { responseHeaders: false }
908
+ ) {
909
+ const { error } = CompanyProfilePlatformValidator.getLocations().validate(
726
910
  {
727
911
  storeType,
728
912
  q,
@@ -738,7 +922,9 @@ class CompanyProfile {
738
922
  }
739
923
 
740
924
  // Showing warrnings if extra unknown parameters are found
741
- const { error: warrning } = CompanyProfileValidator.getLocations().validate(
925
+ const {
926
+ error: warrning,
927
+ } = CompanyProfilePlatformValidator.getLocations().validate(
742
928
  {
743
929
  storeType,
744
930
  q,
@@ -752,9 +938,8 @@ class CompanyProfile {
752
938
  if (warrning) {
753
939
  Logger({
754
940
  level: "WARN",
755
- message: "Parameter Validation warrnings for getLocations",
941
+ message: `Parameter Validation warrnings for platform > CompanyProfile > getLocations \n ${warrning}`,
756
942
  });
757
- Logger({ level: "WARN", message: warrning });
758
943
  }
759
944
 
760
945
  const query_params = {};
@@ -773,22 +958,27 @@ class CompanyProfile {
773
958
  `/service/platform/company-profile/v1.0/company/${this.config.companyId}/location`,
774
959
  query_params,
775
960
  undefined,
776
- xHeaders
961
+ { ...xHeaders, ...requestHeaders },
962
+ { responseHeaders }
777
963
  );
778
964
 
965
+ let responseData = response;
966
+ if (responseHeaders) {
967
+ responseData = response[0];
968
+ }
969
+
779
970
  const {
780
971
  error: res_error,
781
- } = CompanyProfileModel.LocationListSerializer().validate(response, {
782
- abortEarly: false,
783
- allowUnknown: false,
784
- });
972
+ } = CompanyProfilePlatformModel.LocationListSerializer().validate(
973
+ responseData,
974
+ { abortEarly: false, allowUnknown: false }
975
+ );
785
976
 
786
977
  if (res_error) {
787
978
  Logger({
788
979
  level: "WARN",
789
- message: "Response Validation Warnnings for getLocations",
980
+ message: `Response Validation Warnnings for platform > CompanyProfile > getLocations \n ${res_error}`,
790
981
  });
791
- Logger({ level: "WARN", message: res_error });
792
982
  }
793
983
 
794
984
  return response;
@@ -804,6 +994,7 @@ class CompanyProfile {
804
994
  * @param {number} [arg.pageSize] - Number of items to retrieve in each
805
995
  * page. Default is 10.
806
996
  * @param {number[]} [arg.locationIds] - Helps to filter stores on the basis of uids.
997
+ * @returns {Paginator<CompanyProfilePlatformModel.LocationListSerializer>}
807
998
  * @summary: Get list of locations
808
999
  * @description: This API allows to view all the locations associated to a company.
809
1000
  */
@@ -832,14 +1023,20 @@ class CompanyProfile {
832
1023
  }
833
1024
 
834
1025
  /**
835
- * @param {Object} arg - Arg object.
836
- * @param {UpdateCompany} arg.body
837
- * @returns {Promise<ProfileSuccessResponse>} - Success response
1026
+ * @param {CompanyProfilePlatformValidator.UpdateCompanyParam} arg - Arg object
1027
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1028
+ * @param {import("../PlatformAPIClient").Options} - Options
1029
+ * @returns {Promise<CompanyProfilePlatformModel.ProfileSuccessResponse>} -
1030
+ * Success response
1031
+ * @name updateCompany
838
1032
  * @summary: Edit company profile
839
- * @description: This API allows to edit the company profile of the seller account.
1033
+ * @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
1034
  */
841
- async updateCompany({ body } = {}) {
842
- const { error } = CompanyProfileValidator.updateCompany().validate(
1035
+ async updateCompany(
1036
+ { body, requestHeaders } = { requestHeaders: {} },
1037
+ { responseHeaders } = { responseHeaders: false }
1038
+ ) {
1039
+ const { error } = CompanyProfilePlatformValidator.updateCompany().validate(
843
1040
  {
844
1041
  body,
845
1042
  },
@@ -852,7 +1049,7 @@ class CompanyProfile {
852
1049
  // Showing warrnings if extra unknown parameters are found
853
1050
  const {
854
1051
  error: warrning,
855
- } = CompanyProfileValidator.updateCompany().validate(
1052
+ } = CompanyProfilePlatformValidator.updateCompany().validate(
856
1053
  {
857
1054
  body,
858
1055
  },
@@ -861,9 +1058,8 @@ class CompanyProfile {
861
1058
  if (warrning) {
862
1059
  Logger({
863
1060
  level: "WARN",
864
- message: "Parameter Validation warrnings for updateCompany",
1061
+ message: `Parameter Validation warrnings for platform > CompanyProfile > updateCompany \n ${warrning}`,
865
1062
  });
866
- Logger({ level: "WARN", message: warrning });
867
1063
  }
868
1064
 
869
1065
  const query_params = {};
@@ -876,37 +1072,47 @@ class CompanyProfile {
876
1072
  `/service/platform/company-profile/v1.0/company/${this.config.companyId}`,
877
1073
  query_params,
878
1074
  body,
879
- xHeaders
1075
+ { ...xHeaders, ...requestHeaders },
1076
+ { responseHeaders }
880
1077
  );
881
1078
 
1079
+ let responseData = response;
1080
+ if (responseHeaders) {
1081
+ responseData = response[0];
1082
+ }
1083
+
882
1084
  const {
883
1085
  error: res_error,
884
- } = CompanyProfileModel.ProfileSuccessResponse().validate(response, {
885
- abortEarly: false,
886
- allowUnknown: false,
887
- });
1086
+ } = CompanyProfilePlatformModel.ProfileSuccessResponse().validate(
1087
+ responseData,
1088
+ { abortEarly: false, allowUnknown: false }
1089
+ );
888
1090
 
889
1091
  if (res_error) {
890
1092
  Logger({
891
1093
  level: "WARN",
892
- message: "Response Validation Warnnings for updateCompany",
1094
+ message: `Response Validation Warnnings for platform > CompanyProfile > updateCompany \n ${res_error}`,
893
1095
  });
894
- Logger({ level: "WARN", message: res_error });
895
1096
  }
896
1097
 
897
1098
  return response;
898
1099
  }
899
1100
 
900
1101
  /**
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
1102
+ * @param {CompanyProfilePlatformValidator.UpdateLocationParam} arg - Arg object
1103
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1104
+ * @param {import("../PlatformAPIClient").Options} - Options
1105
+ * @returns {Promise<CompanyProfilePlatformModel.ProfileSuccessResponse>} -
1106
+ * Success response
1107
+ * @name updateLocation
905
1108
  * @summary: Edit a location asscoiated to a company.
906
- * @description: This API allows to edit a location associated to a company.
1109
+ * @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
1110
  */
908
- async updateLocation({ locationId, body } = {}) {
909
- const { error } = CompanyProfileValidator.updateLocation().validate(
1111
+ async updateLocation(
1112
+ { locationId, body, requestHeaders } = { requestHeaders: {} },
1113
+ { responseHeaders } = { responseHeaders: false }
1114
+ ) {
1115
+ const { error } = CompanyProfilePlatformValidator.updateLocation().validate(
910
1116
  {
911
1117
  locationId,
912
1118
  body,
@@ -920,7 +1126,7 @@ class CompanyProfile {
920
1126
  // Showing warrnings if extra unknown parameters are found
921
1127
  const {
922
1128
  error: warrning,
923
- } = CompanyProfileValidator.updateLocation().validate(
1129
+ } = CompanyProfilePlatformValidator.updateLocation().validate(
924
1130
  {
925
1131
  locationId,
926
1132
  body,
@@ -930,9 +1136,8 @@ class CompanyProfile {
930
1136
  if (warrning) {
931
1137
  Logger({
932
1138
  level: "WARN",
933
- message: "Parameter Validation warrnings for updateLocation",
1139
+ message: `Parameter Validation warrnings for platform > CompanyProfile > updateLocation \n ${warrning}`,
934
1140
  });
935
- Logger({ level: "WARN", message: warrning });
936
1141
  }
937
1142
 
938
1143
  const query_params = {};
@@ -945,22 +1150,27 @@ class CompanyProfile {
945
1150
  `/service/platform/company-profile/v1.0/company/${this.config.companyId}/location/${locationId}`,
946
1151
  query_params,
947
1152
  body,
948
- xHeaders
1153
+ { ...xHeaders, ...requestHeaders },
1154
+ { responseHeaders }
949
1155
  );
950
1156
 
1157
+ let responseData = response;
1158
+ if (responseHeaders) {
1159
+ responseData = response[0];
1160
+ }
1161
+
951
1162
  const {
952
1163
  error: res_error,
953
- } = CompanyProfileModel.ProfileSuccessResponse().validate(response, {
954
- abortEarly: false,
955
- allowUnknown: false,
956
- });
1164
+ } = CompanyProfilePlatformModel.ProfileSuccessResponse().validate(
1165
+ responseData,
1166
+ { abortEarly: false, allowUnknown: false }
1167
+ );
957
1168
 
958
1169
  if (res_error) {
959
1170
  Logger({
960
1171
  level: "WARN",
961
- message: "Response Validation Warnnings for updateLocation",
1172
+ message: `Response Validation Warnnings for platform > CompanyProfile > updateLocation \n ${res_error}`,
962
1173
  });
963
- Logger({ level: "WARN", message: res_error });
964
1174
  }
965
1175
 
966
1176
  return response;