@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 ConfigurationValidator = require("./ConfigurationPlatformValidator");
5
- const ConfigurationModel = require("./ConfigurationPlatformModel");
4
+ const ConfigurationPlatformValidator = require("./ConfigurationPlatformValidator");
5
+ const ConfigurationPlatformModel = require("./ConfigurationPlatformModel");
6
6
  const { Logger } = require("./../../common/Logger");
7
7
  const Joi = require("joi");
8
8
 
@@ -12,14 +12,21 @@ class Configuration {
12
12
  }
13
13
 
14
14
  /**
15
- * @param {Object} arg - Arg object.
16
- * @param {CreateApplicationRequest} arg.body
17
- * @returns {Promise<CreateAppResponse>} - Success response
15
+ * @param {ConfigurationPlatformValidator.CreateApplicationParam} arg - Arg object
16
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
17
+ * @param {import("../PlatformAPIClient").Options} - Options
18
+ * @returns {Promise<ConfigurationPlatformModel.CreateAppResponse>} - Success response
19
+ * @name createApplication
18
20
  * @summary: Create a new sales channel
19
- * @description: Applications are sales channel websites which can be configured, personalized and customized. Use this API to create a new application in the current company.
21
+ * @description: Applications are sales channel websites which can be configured, personalized and customized. Use this API to create a new application in the current company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/createApplication/).
20
22
  */
21
- async createApplication({ body } = {}) {
22
- const { error } = ConfigurationValidator.createApplication().validate(
23
+ async createApplication(
24
+ { body, requestHeaders } = { requestHeaders: {} },
25
+ { responseHeaders } = { responseHeaders: false }
26
+ ) {
27
+ const {
28
+ error,
29
+ } = ConfigurationPlatformValidator.createApplication().validate(
23
30
  {
24
31
  body,
25
32
  },
@@ -32,7 +39,7 @@ class Configuration {
32
39
  // Showing warrnings if extra unknown parameters are found
33
40
  const {
34
41
  error: warrning,
35
- } = ConfigurationValidator.createApplication().validate(
42
+ } = ConfigurationPlatformValidator.createApplication().validate(
36
43
  {
37
44
  body,
38
45
  },
@@ -41,9 +48,8 @@ class Configuration {
41
48
  if (warrning) {
42
49
  Logger({
43
50
  level: "WARN",
44
- message: "Parameter Validation warrnings for createApplication",
51
+ message: `Parameter Validation warrnings for platform > Configuration > createApplication \n ${warrning}`,
45
52
  });
46
- Logger({ level: "WARN", message: warrning });
47
53
  }
48
54
 
49
55
  const query_params = {};
@@ -56,12 +62,18 @@ class Configuration {
56
62
  `/service/platform/configuration/v1.0/company/${this.config.companyId}/application`,
57
63
  query_params,
58
64
  body,
59
- xHeaders
65
+ { ...xHeaders, ...requestHeaders },
66
+ { responseHeaders }
60
67
  );
61
68
 
69
+ let responseData = response;
70
+ if (responseHeaders) {
71
+ responseData = response[0];
72
+ }
73
+
62
74
  const {
63
75
  error: res_error,
64
- } = ConfigurationModel.CreateAppResponse().validate(response, {
76
+ } = ConfigurationPlatformModel.CreateAppResponse().validate(responseData, {
65
77
  abortEarly: false,
66
78
  allowUnknown: false,
67
79
  });
@@ -69,25 +81,28 @@ class Configuration {
69
81
  if (res_error) {
70
82
  Logger({
71
83
  level: "WARN",
72
- message: "Response Validation Warnnings for createApplication",
84
+ message: `Response Validation Warnnings for platform > Configuration > createApplication \n ${res_error}`,
73
85
  });
74
- Logger({ level: "WARN", message: res_error });
75
86
  }
76
87
 
77
88
  return response;
78
89
  }
79
90
 
80
91
  /**
81
- * @param {Object} arg - Arg object.
82
- * @param {number} [arg.pageNo] -
83
- * @param {number} [arg.pageSize] -
84
- * @param {string} [arg.q] - Search param by name or domain
85
- * @returns {Promise<ApplicationsResponse>} - Success response
92
+ * @param {ConfigurationPlatformValidator.GetApplicationsParam} arg - Arg object
93
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
94
+ * @param {import("../PlatformAPIClient").Options} - Options
95
+ * @returns {Promise<ConfigurationPlatformModel.ApplicationsResponse>} -
96
+ * Success response
97
+ * @name getApplications
86
98
  * @summary: Get list of registered sales channels under company
87
- * @description: Applications are sales channel websites which can be configured, personalized and customised. Use this API to fetch a list of applications created within a company.
99
+ * @description: Applications are sales channel websites which can be configured, personalized and customised. Use this API to fetch a list of applications created within a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getApplications/).
88
100
  */
89
- async getApplications({ pageNo, pageSize, q } = {}) {
90
- const { error } = ConfigurationValidator.getApplications().validate(
101
+ async getApplications(
102
+ { pageNo, pageSize, q, requestHeaders } = { requestHeaders: {} },
103
+ { responseHeaders } = { responseHeaders: false }
104
+ ) {
105
+ const { error } = ConfigurationPlatformValidator.getApplications().validate(
91
106
  {
92
107
  pageNo,
93
108
  pageSize,
@@ -102,7 +117,7 @@ class Configuration {
102
117
  // Showing warrnings if extra unknown parameters are found
103
118
  const {
104
119
  error: warrning,
105
- } = ConfigurationValidator.getApplications().validate(
120
+ } = ConfigurationPlatformValidator.getApplications().validate(
106
121
  {
107
122
  pageNo,
108
123
  pageSize,
@@ -113,9 +128,8 @@ class Configuration {
113
128
  if (warrning) {
114
129
  Logger({
115
130
  level: "WARN",
116
- message: "Parameter Validation warrnings for getApplications",
131
+ message: `Parameter Validation warrnings for platform > Configuration > getApplications \n ${warrning}`,
117
132
  });
118
- Logger({ level: "WARN", message: warrning });
119
133
  }
120
134
 
121
135
  const query_params = {};
@@ -131,22 +145,27 @@ class Configuration {
131
145
  `/service/platform/configuration/v1.0/company/${this.config.companyId}/application`,
132
146
  query_params,
133
147
  undefined,
134
- xHeaders
148
+ { ...xHeaders, ...requestHeaders },
149
+ { responseHeaders }
135
150
  );
136
151
 
152
+ let responseData = response;
153
+ if (responseHeaders) {
154
+ responseData = response[0];
155
+ }
156
+
137
157
  const {
138
158
  error: res_error,
139
- } = ConfigurationModel.ApplicationsResponse().validate(response, {
140
- abortEarly: false,
141
- allowUnknown: false,
142
- });
159
+ } = ConfigurationPlatformModel.ApplicationsResponse().validate(
160
+ responseData,
161
+ { abortEarly: false, allowUnknown: false }
162
+ );
143
163
 
144
164
  if (res_error) {
145
165
  Logger({
146
166
  level: "WARN",
147
- message: "Response Validation Warnnings for getApplications",
167
+ message: `Response Validation Warnnings for platform > Configuration > getApplications \n ${res_error}`,
148
168
  });
149
- Logger({ level: "WARN", message: res_error });
150
169
  }
151
170
 
152
171
  return response;
@@ -156,6 +175,7 @@ class Configuration {
156
175
  * @param {Object} arg - Arg object.
157
176
  * @param {number} [arg.pageSize] -
158
177
  * @param {string} [arg.q] - Search param by name or domain
178
+ * @returns {Paginator<ConfigurationPlatformModel.ApplicationsResponse>}
159
179
  * @summary: Get list of registered sales channels under company
160
180
  * @description: Applications are sales channel websites which can be configured, personalized and customised. Use this API to fetch a list of applications created within a company.
161
181
  */
@@ -181,17 +201,23 @@ class Configuration {
181
201
  }
182
202
 
183
203
  /**
184
- * @param {Object} arg - Arg object.
185
- * @param {number} [arg.pageNo] - The page number to navigate through the
186
- * given set of results. Default value is 1.
187
- * @param {number} [arg.pageSize] - The number of items to retrieve in each
188
- * page. Default value is 10.
189
- * @returns {Promise<GetIntegrationsOptInsResponse>} - Success response
204
+ * @param {ConfigurationPlatformValidator.GetAvailableOptInsParam} arg - Arg object
205
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
206
+ * @param {import("../PlatformAPIClient").Options} - Options
207
+ * @returns {Promise<ConfigurationPlatformModel.GetIntegrationsOptInsResponse>}
208
+ * - Success response
209
+ *
210
+ * @name getAvailableOptIns
190
211
  * @summary: Get all available integration opt-ins
191
- * @description: Use this API to get a list of all available integrations in a company
212
+ * @description: Use this API to get a list of all available integrations in a company - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getAvailableOptIns/).
192
213
  */
193
- async getAvailableOptIns({ pageNo, pageSize } = {}) {
194
- const { error } = ConfigurationValidator.getAvailableOptIns().validate(
214
+ async getAvailableOptIns(
215
+ { pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
216
+ { responseHeaders } = { responseHeaders: false }
217
+ ) {
218
+ const {
219
+ error,
220
+ } = ConfigurationPlatformValidator.getAvailableOptIns().validate(
195
221
  {
196
222
  pageNo,
197
223
  pageSize,
@@ -205,7 +231,7 @@ class Configuration {
205
231
  // Showing warrnings if extra unknown parameters are found
206
232
  const {
207
233
  error: warrning,
208
- } = ConfigurationValidator.getAvailableOptIns().validate(
234
+ } = ConfigurationPlatformValidator.getAvailableOptIns().validate(
209
235
  {
210
236
  pageNo,
211
237
  pageSize,
@@ -215,9 +241,8 @@ class Configuration {
215
241
  if (warrning) {
216
242
  Logger({
217
243
  level: "WARN",
218
- message: "Parameter Validation warrnings for getAvailableOptIns",
244
+ message: `Parameter Validation warrnings for platform > Configuration > getAvailableOptIns \n ${warrning}`,
219
245
  });
220
- Logger({ level: "WARN", message: warrning });
221
246
  }
222
247
 
223
248
  const query_params = {};
@@ -232,22 +257,27 @@ class Configuration {
232
257
  `/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/available`,
233
258
  query_params,
234
259
  undefined,
235
- xHeaders
260
+ { ...xHeaders, ...requestHeaders },
261
+ { responseHeaders }
236
262
  );
237
263
 
264
+ let responseData = response;
265
+ if (responseHeaders) {
266
+ responseData = response[0];
267
+ }
268
+
238
269
  const {
239
270
  error: res_error,
240
- } = ConfigurationModel.GetIntegrationsOptInsResponse().validate(response, {
241
- abortEarly: false,
242
- allowUnknown: false,
243
- });
271
+ } = ConfigurationPlatformModel.GetIntegrationsOptInsResponse().validate(
272
+ responseData,
273
+ { abortEarly: false, allowUnknown: false }
274
+ );
244
275
 
245
276
  if (res_error) {
246
277
  Logger({
247
278
  level: "WARN",
248
- message: "Response Validation Warnnings for getAvailableOptIns",
279
+ message: `Response Validation Warnnings for platform > Configuration > getAvailableOptIns \n ${res_error}`,
249
280
  });
250
- Logger({ level: "WARN", message: res_error });
251
281
  }
252
282
 
253
283
  return response;
@@ -255,13 +285,49 @@ class Configuration {
255
285
 
256
286
  /**
257
287
  * @param {Object} arg - Arg object.
258
- * @param {string} [arg.q] - Search text for brand name
259
- * @returns {Promise<BrandsByCompanyResponse>} - Success response
288
+ * @param {number} [arg.pageSize] - The number of items to retrieve in each
289
+ * page. Default value is 10.
290
+ * @returns {Paginator<ConfigurationPlatformModel.GetIntegrationsOptInsResponse>}
291
+ * @summary: Get all available integration opt-ins
292
+ * @description: Use this API to get a list of all available integrations in a company
293
+ */
294
+ getAvailableOptInsPaginator({ pageSize } = {}) {
295
+ const paginator = new Paginator();
296
+ const callback = async () => {
297
+ const pageId = paginator.nextId;
298
+ const pageNo = paginator.pageNo;
299
+ const pageType = "number";
300
+ const data = await this.getAvailableOptIns({
301
+ pageNo: pageNo,
302
+ pageSize: pageSize,
303
+ });
304
+ paginator.setPaginator({
305
+ hasNext: data.page.has_next ? true : false,
306
+ nextId: data.page.next_id,
307
+ });
308
+ return data;
309
+ };
310
+ paginator.setCallback(callback.bind(this));
311
+ return paginator;
312
+ }
313
+
314
+ /**
315
+ * @param {ConfigurationPlatformValidator.GetBrandsByCompanyParam} arg - Arg object
316
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
317
+ * @param {import("../PlatformAPIClient").Options} - Options
318
+ * @returns {Promise<ConfigurationPlatformModel.BrandsByCompanyResponse>} -
319
+ * Success response
320
+ * @name getBrandsByCompany
260
321
  * @summary: Get brands by company.
261
- * @description: Use this API to get all the brands added in a company. Get all the brand names, along with URLs of their logo, banner, and portrait image.
322
+ * @description: Use this API to get all the brands added in a company. Get all the brand names, along with URLs of their logo, banner, and portrait image. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getBrandsByCompany/).
262
323
  */
263
- async getBrandsByCompany({ q } = {}) {
264
- const { error } = ConfigurationValidator.getBrandsByCompany().validate(
324
+ async getBrandsByCompany(
325
+ { q, requestHeaders } = { requestHeaders: {} },
326
+ { responseHeaders } = { responseHeaders: false }
327
+ ) {
328
+ const {
329
+ error,
330
+ } = ConfigurationPlatformValidator.getBrandsByCompany().validate(
265
331
  {
266
332
  q,
267
333
  },
@@ -274,7 +340,7 @@ class Configuration {
274
340
  // Showing warrnings if extra unknown parameters are found
275
341
  const {
276
342
  error: warrning,
277
- } = ConfigurationValidator.getBrandsByCompany().validate(
343
+ } = ConfigurationPlatformValidator.getBrandsByCompany().validate(
278
344
  {
279
345
  q,
280
346
  },
@@ -283,9 +349,8 @@ class Configuration {
283
349
  if (warrning) {
284
350
  Logger({
285
351
  level: "WARN",
286
- message: "Parameter Validation warrnings for getBrandsByCompany",
352
+ message: `Parameter Validation warrnings for platform > Configuration > getBrandsByCompany \n ${warrning}`,
287
353
  });
288
- Logger({ level: "WARN", message: warrning });
289
354
  }
290
355
 
291
356
  const query_params = {};
@@ -299,40 +364,49 @@ class Configuration {
299
364
  `/service/platform/configuration/v1.0/company/${this.config.companyId}/inventory/brands-by-companies`,
300
365
  query_params,
301
366
  undefined,
302
- xHeaders
367
+ { ...xHeaders, ...requestHeaders },
368
+ { responseHeaders }
303
369
  );
304
370
 
371
+ let responseData = response;
372
+ if (responseHeaders) {
373
+ responseData = response[0];
374
+ }
375
+
305
376
  const {
306
377
  error: res_error,
307
- } = ConfigurationModel.BrandsByCompanyResponse().validate(response, {
308
- abortEarly: false,
309
- allowUnknown: false,
310
- });
378
+ } = ConfigurationPlatformModel.BrandsByCompanyResponse().validate(
379
+ responseData,
380
+ { abortEarly: false, allowUnknown: false }
381
+ );
311
382
 
312
383
  if (res_error) {
313
384
  Logger({
314
385
  level: "WARN",
315
- message: "Response Validation Warnnings for getBrandsByCompany",
386
+ message: `Response Validation Warnnings for platform > Configuration > getBrandsByCompany \n ${res_error}`,
316
387
  });
317
- Logger({ level: "WARN", message: res_error });
318
388
  }
319
389
 
320
390
  return response;
321
391
  }
322
392
 
323
393
  /**
324
- * @param {Object} arg - Arg object.
325
- * @param {number} [arg.pageNo] - The page number to navigate through the
326
- * given set of results. Default value is 1.
327
- * @param {number} [arg.pageSize] - The number of items to retrieve in each
328
- * page. Default value is 10.
329
- * @param {CompanyByBrandsRequest} arg.body
330
- * @returns {Promise<CompanyByBrandsResponse>} - Success response
394
+ * @param {ConfigurationPlatformValidator.GetCompanyByBrandsParam} arg - Arg object
395
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
396
+ * @param {import("../PlatformAPIClient").Options} - Options
397
+ * @returns {Promise<ConfigurationPlatformModel.CompanyByBrandsResponse>} -
398
+ * Success response
399
+ * @name getCompanyByBrands
331
400
  * @summary: Get company by brand uids
332
- * @description: Use this API to get a list of companies by the brands they deal
401
+ * @description: Use this API to get a list of companies by the brands they deal - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getCompanyByBrands/).
333
402
  */
334
- async getCompanyByBrands({ body, pageNo, pageSize } = {}) {
335
- const { error } = ConfigurationValidator.getCompanyByBrands().validate(
403
+ async getCompanyByBrands(
404
+ { body, pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
405
+ { responseHeaders } = { responseHeaders: false }
406
+ ) {
407
+ const {
408
+ error,
409
+ } = ConfigurationPlatformValidator.getCompanyByBrands().validate(
336
410
  {
337
411
  body,
338
412
  pageNo,
@@ -347,7 +421,7 @@ class Configuration {
347
421
  // Showing warrnings if extra unknown parameters are found
348
422
  const {
349
423
  error: warrning,
350
- } = ConfigurationValidator.getCompanyByBrands().validate(
424
+ } = ConfigurationPlatformValidator.getCompanyByBrands().validate(
351
425
  {
352
426
  body,
353
427
  pageNo,
@@ -358,9 +432,8 @@ class Configuration {
358
432
  if (warrning) {
359
433
  Logger({
360
434
  level: "WARN",
361
- message: "Parameter Validation warrnings for getCompanyByBrands",
435
+ message: `Parameter Validation warrnings for platform > Configuration > getCompanyByBrands \n ${warrning}`,
362
436
  });
363
- Logger({ level: "WARN", message: warrning });
364
437
  }
365
438
 
366
439
  const query_params = {};
@@ -375,22 +448,27 @@ class Configuration {
375
448
  `/service/platform/configuration/v1.0/company/${this.config.companyId}/inventory/companies-by-brands`,
376
449
  query_params,
377
450
  body,
378
- xHeaders
451
+ { ...xHeaders, ...requestHeaders },
452
+ { responseHeaders }
379
453
  );
380
454
 
455
+ let responseData = response;
456
+ if (responseHeaders) {
457
+ responseData = response[0];
458
+ }
459
+
381
460
  const {
382
461
  error: res_error,
383
- } = ConfigurationModel.CompanyByBrandsResponse().validate(response, {
384
- abortEarly: false,
385
- allowUnknown: false,
386
- });
462
+ } = ConfigurationPlatformModel.CompanyByBrandsResponse().validate(
463
+ responseData,
464
+ { abortEarly: false, allowUnknown: false }
465
+ );
387
466
 
388
467
  if (res_error) {
389
468
  Logger({
390
469
  level: "WARN",
391
- message: "Response Validation Warnnings for getCompanyByBrands",
470
+ message: `Response Validation Warnnings for platform > Configuration > getCompanyByBrands \n ${res_error}`,
392
471
  });
393
- Logger({ level: "WARN", message: res_error });
394
472
  }
395
473
 
396
474
  return response;
@@ -400,7 +478,8 @@ class Configuration {
400
478
  * @param {Object} arg - Arg object.
401
479
  * @param {number} [arg.pageSize] - The number of items to retrieve in each
402
480
  * page. Default value is 10.
403
- * @param {CompanyByBrandsRequest} arg.body
481
+ * @param {ConfigurationPlatformModel.CompanyByBrandsRequest} arg.body
482
+ * @returns {Paginator<ConfigurationPlatformModel.CompanyByBrandsResponse>}
404
483
  * @summary: Get company by brand uids
405
484
  * @description: Use this API to get a list of companies by the brands they deal
406
485
  */
@@ -426,13 +505,20 @@ class Configuration {
426
505
  }
427
506
 
428
507
  /**
429
- * @param {Object} arg - Arg object.
430
- * @returns {Promise<CurrenciesResponse>} - Success response
508
+ * @param {ConfigurationPlatformValidator.GetCurrenciesParam} arg - Arg object
509
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
510
+ * @param {import("../PlatformAPIClient").Options} - Options
511
+ * @returns {Promise<ConfigurationPlatformModel.CurrenciesResponse>} -
512
+ * Success response
513
+ * @name getCurrencies
431
514
  * @summary: Get all currencies
432
- * @description: Use this API to get a list of currencies allowed in the company. Moreover, get the name, code, symbol, and the decimal digits of the currencies.
515
+ * @description: Use this API to get a list of currencies allowed in the company. Moreover, get the name, code, symbol, and the decimal digits of the currencies. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getCurrencies/).
433
516
  */
434
- async getCurrencies({} = {}) {
435
- const { error } = ConfigurationValidator.getCurrencies().validate(
517
+ async getCurrencies(
518
+ { requestHeaders } = { requestHeaders: {} },
519
+ { responseHeaders } = { responseHeaders: false }
520
+ ) {
521
+ const { error } = ConfigurationPlatformValidator.getCurrencies().validate(
436
522
  {},
437
523
  { abortEarly: false, allowUnknown: true }
438
524
  );
@@ -441,16 +527,17 @@ class Configuration {
441
527
  }
442
528
 
443
529
  // Showing warrnings if extra unknown parameters are found
444
- const { error: warrning } = ConfigurationValidator.getCurrencies().validate(
530
+ const {
531
+ error: warrning,
532
+ } = ConfigurationPlatformValidator.getCurrencies().validate(
445
533
  {},
446
534
  { abortEarly: false, allowUnknown: false }
447
535
  );
448
536
  if (warrning) {
449
537
  Logger({
450
538
  level: "WARN",
451
- message: "Parameter Validation warrnings for getCurrencies",
539
+ message: `Parameter Validation warrnings for platform > Configuration > getCurrencies \n ${warrning}`,
452
540
  });
453
- Logger({ level: "WARN", message: warrning });
454
541
  }
455
542
 
456
543
  const query_params = {};
@@ -463,12 +550,18 @@ class Configuration {
463
550
  `/service/platform/configuration/v1.0/company/${this.config.companyId}/currencies`,
464
551
  query_params,
465
552
  undefined,
466
- xHeaders
553
+ { ...xHeaders, ...requestHeaders },
554
+ { responseHeaders }
467
555
  );
468
556
 
557
+ let responseData = response;
558
+ if (responseHeaders) {
559
+ responseData = response[0];
560
+ }
561
+
469
562
  const {
470
563
  error: res_error,
471
- } = ConfigurationModel.CurrenciesResponse().validate(response, {
564
+ } = ConfigurationPlatformModel.CurrenciesResponse().validate(responseData, {
472
565
  abortEarly: false,
473
566
  allowUnknown: false,
474
567
  });
@@ -476,23 +569,31 @@ class Configuration {
476
569
  if (res_error) {
477
570
  Logger({
478
571
  level: "WARN",
479
- message: "Response Validation Warnnings for getCurrencies",
572
+ message: `Response Validation Warnnings for platform > Configuration > getCurrencies \n ${res_error}`,
480
573
  });
481
- Logger({ level: "WARN", message: res_error });
482
574
  }
483
575
 
484
576
  return response;
485
577
  }
486
578
 
487
579
  /**
488
- * @param {Object} arg - Arg object.
489
- * @param {DomainSuggestionsRequest} arg.body
490
- * @returns {Promise<DomainSuggestionsResponse>} - Success response
580
+ * @param {ConfigurationPlatformValidator.GetDomainAvailibilityParam} arg - Arg object
581
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
582
+ * @param {import("../PlatformAPIClient").Options} - Options
583
+ * @returns {Promise<ConfigurationPlatformModel.DomainSuggestionsResponse>}
584
+ * - Success response
585
+ *
586
+ * @name getDomainAvailibility
491
587
  * @summary: Check domain availability before linking to application
492
- * @description: Use this API to check the domain availability before linking it to application. Also sends domain suggestions that are similar to the queried domain. Note - Custom domain search is currently powered by GoDaddy provider.
588
+ * @description: Use this API to check the domain availability before linking it to application. Also sends domain suggestions that are similar to the queried domain. Note - Custom domain search is currently powered by GoDaddy provider. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getDomainAvailibility/).
493
589
  */
494
- async getDomainAvailibility({ body } = {}) {
495
- const { error } = ConfigurationValidator.getDomainAvailibility().validate(
590
+ async getDomainAvailibility(
591
+ { body, requestHeaders } = { requestHeaders: {} },
592
+ { responseHeaders } = { responseHeaders: false }
593
+ ) {
594
+ const {
595
+ error,
596
+ } = ConfigurationPlatformValidator.getDomainAvailibility().validate(
496
597
  {
497
598
  body,
498
599
  },
@@ -505,7 +606,7 @@ class Configuration {
505
606
  // Showing warrnings if extra unknown parameters are found
506
607
  const {
507
608
  error: warrning,
508
- } = ConfigurationValidator.getDomainAvailibility().validate(
609
+ } = ConfigurationPlatformValidator.getDomainAvailibility().validate(
509
610
  {
510
611
  body,
511
612
  },
@@ -514,9 +615,8 @@ class Configuration {
514
615
  if (warrning) {
515
616
  Logger({
516
617
  level: "WARN",
517
- message: "Parameter Validation warrnings for getDomainAvailibility",
618
+ message: `Parameter Validation warrnings for platform > Configuration > getDomainAvailibility \n ${warrning}`,
518
619
  });
519
- Logger({ level: "WARN", message: warrning });
520
620
  }
521
621
 
522
622
  const query_params = {};
@@ -529,36 +629,48 @@ class Configuration {
529
629
  `/service/platform/configuration/v1.0/company/${this.config.companyId}/domain/suggestions`,
530
630
  query_params,
531
631
  body,
532
- xHeaders
632
+ { ...xHeaders, ...requestHeaders },
633
+ { responseHeaders }
533
634
  );
534
635
 
636
+ let responseData = response;
637
+ if (responseHeaders) {
638
+ responseData = response[0];
639
+ }
640
+
535
641
  const {
536
642
  error: res_error,
537
- } = ConfigurationModel.DomainSuggestionsResponse().validate(response, {
538
- abortEarly: false,
539
- allowUnknown: false,
540
- });
643
+ } = ConfigurationPlatformModel.DomainSuggestionsResponse().validate(
644
+ responseData,
645
+ { abortEarly: false, allowUnknown: false }
646
+ );
541
647
 
542
648
  if (res_error) {
543
649
  Logger({
544
650
  level: "WARN",
545
- message: "Response Validation Warnnings for getDomainAvailibility",
651
+ message: `Response Validation Warnnings for platform > Configuration > getDomainAvailibility \n ${res_error}`,
546
652
  });
547
- Logger({ level: "WARN", message: res_error });
548
653
  }
549
654
 
550
655
  return response;
551
656
  }
552
657
 
553
658
  /**
554
- * @param {Object} arg - Arg object.
555
- * @param {number} arg.id - Integration id
556
- * @returns {Promise<Integration>} - Success response
659
+ * @param {ConfigurationPlatformValidator.GetIntegrationByIdParam} arg - Arg object
660
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
661
+ * @param {import("../PlatformAPIClient").Options} - Options
662
+ * @returns {Promise<ConfigurationPlatformModel.Integration>} - Success response
663
+ * @name getIntegrationById
557
664
  * @summary: Get integration data by its ID
558
- * @description: Use this API to fetch the details of an integration (such as Ginesys, SAP, etc.) using its ID
665
+ * @description: Use this API to fetch the details of an integration (such as Ginesys, SAP, etc.) using its ID - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getIntegrationById/).
559
666
  */
560
- async getIntegrationById({ id } = {}) {
561
- const { error } = ConfigurationValidator.getIntegrationById().validate(
667
+ async getIntegrationById(
668
+ { id, requestHeaders } = { requestHeaders: {} },
669
+ { responseHeaders } = { responseHeaders: false }
670
+ ) {
671
+ const {
672
+ error,
673
+ } = ConfigurationPlatformValidator.getIntegrationById().validate(
562
674
  {
563
675
  id,
564
676
  },
@@ -571,7 +683,7 @@ class Configuration {
571
683
  // Showing warrnings if extra unknown parameters are found
572
684
  const {
573
685
  error: warrning,
574
- } = ConfigurationValidator.getIntegrationById().validate(
686
+ } = ConfigurationPlatformValidator.getIntegrationById().validate(
575
687
  {
576
688
  id,
577
689
  },
@@ -580,9 +692,8 @@ class Configuration {
580
692
  if (warrning) {
581
693
  Logger({
582
694
  level: "WARN",
583
- message: "Parameter Validation warrnings for getIntegrationById",
695
+ message: `Parameter Validation warrnings for platform > Configuration > getIntegrationById \n ${warrning}`,
584
696
  });
585
- Logger({ level: "WARN", message: warrning });
586
697
  }
587
698
 
588
699
  const query_params = {};
@@ -595,12 +706,18 @@ class Configuration {
595
706
  `/service/platform/configuration/v1.0/company/${this.config.companyId}/integration/${id}`,
596
707
  query_params,
597
708
  undefined,
598
- xHeaders
709
+ { ...xHeaders, ...requestHeaders },
710
+ { responseHeaders }
599
711
  );
600
712
 
713
+ let responseData = response;
714
+ if (responseHeaders) {
715
+ responseData = response[0];
716
+ }
717
+
601
718
  const {
602
719
  error: res_error,
603
- } = ConfigurationModel.Integration().validate(response, {
720
+ } = ConfigurationPlatformModel.Integration().validate(responseData, {
604
721
  abortEarly: false,
605
722
  allowUnknown: false,
606
723
  });
@@ -608,25 +725,31 @@ class Configuration {
608
725
  if (res_error) {
609
726
  Logger({
610
727
  level: "WARN",
611
- message: "Response Validation Warnnings for getIntegrationById",
728
+ message: `Response Validation Warnnings for platform > Configuration > getIntegrationById \n ${res_error}`,
612
729
  });
613
- Logger({ level: "WARN", message: res_error });
614
730
  }
615
731
 
616
732
  return response;
617
733
  }
618
734
 
619
735
  /**
620
- * @param {Object} arg - Arg object.
621
- * @param {string} arg.id - Integration ID (24-digit Mongo Object ID)
622
- * @param {string} arg.level - Integration level, `store` or `company`
623
- * @param {number} arg.uid - Unique identifier of integration level (store/company)
624
- * @returns {Promise<IntegrationLevel>} - Success response
736
+ * @param {ConfigurationPlatformValidator.GetIntegrationByLevelIdParam} arg
737
+ * - Arg object
738
+ *
739
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
740
+ * @param {import("../PlatformAPIClient").Options} - Options
741
+ * @returns {Promise<ConfigurationPlatformModel.IntegrationLevel>} - Success response
742
+ * @name getIntegrationByLevelId
625
743
  * @summary: Get integration config at a particular level (store/company)
626
- * @description: Use this API to get the configuration details of an integration such as token, permissions, level, opted value, uid, meta, location ID, etc. at a particular level (store/company).
744
+ * @description: Use this API to get the configuration details of an integration such as token, permissions, level, opted value, uid, meta, location ID, etc. at a particular level (store/company). - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getIntegrationByLevelId/).
627
745
  */
628
- async getIntegrationByLevelId({ id, level, uid } = {}) {
629
- const { error } = ConfigurationValidator.getIntegrationByLevelId().validate(
746
+ async getIntegrationByLevelId(
747
+ { id, level, uid, requestHeaders } = { requestHeaders: {} },
748
+ { responseHeaders } = { responseHeaders: false }
749
+ ) {
750
+ const {
751
+ error,
752
+ } = ConfigurationPlatformValidator.getIntegrationByLevelId().validate(
630
753
  {
631
754
  id,
632
755
  level,
@@ -641,7 +764,7 @@ class Configuration {
641
764
  // Showing warrnings if extra unknown parameters are found
642
765
  const {
643
766
  error: warrning,
644
- } = ConfigurationValidator.getIntegrationByLevelId().validate(
767
+ } = ConfigurationPlatformValidator.getIntegrationByLevelId().validate(
645
768
  {
646
769
  id,
647
770
  level,
@@ -652,9 +775,8 @@ class Configuration {
652
775
  if (warrning) {
653
776
  Logger({
654
777
  level: "WARN",
655
- message: "Parameter Validation warrnings for getIntegrationByLevelId",
778
+ message: `Parameter Validation warrnings for platform > Configuration > getIntegrationByLevelId \n ${warrning}`,
656
779
  });
657
- Logger({ level: "WARN", message: warrning });
658
780
  }
659
781
 
660
782
  const query_params = {};
@@ -667,12 +789,18 @@ class Configuration {
667
789
  `/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/configuration/${id}/${level}/${uid}`,
668
790
  query_params,
669
791
  undefined,
670
- xHeaders
792
+ { ...xHeaders, ...requestHeaders },
793
+ { responseHeaders }
671
794
  );
672
795
 
796
+ let responseData = response;
797
+ if (responseHeaders) {
798
+ responseData = response[0];
799
+ }
800
+
673
801
  const {
674
802
  error: res_error,
675
- } = ConfigurationModel.IntegrationLevel().validate(response, {
803
+ } = ConfigurationPlatformModel.IntegrationLevel().validate(responseData, {
676
804
  abortEarly: false,
677
805
  allowUnknown: false,
678
806
  });
@@ -680,30 +808,35 @@ class Configuration {
680
808
  if (res_error) {
681
809
  Logger({
682
810
  level: "WARN",
683
- message: "Response Validation Warnnings for getIntegrationByLevelId",
811
+ message: `Response Validation Warnnings for platform > Configuration > getIntegrationByLevelId \n ${res_error}`,
684
812
  });
685
- Logger({ level: "WARN", message: res_error });
686
813
  }
687
814
 
688
815
  return response;
689
816
  }
690
817
 
691
818
  /**
692
- * @param {Object} arg - Arg object.
693
- * @param {string} arg.id - Integration ID (24-digit Mongo Object ID)
694
- * @param {string} arg.level - Store or company
695
- * @param {boolean} [arg.opted] - True means get the opted stores. False
696
- * means get the stores that aren't opted.
697
- * @param {boolean} [arg.checkPermission] - Filter on if permissions (for
698
- * inventory/order) are present
699
- * @returns {Promise<IntegrationConfigResponse>} - Success response
819
+ * @param {ConfigurationPlatformValidator.GetIntegrationLevelConfigParam} arg
820
+ * - Arg object
821
+ *
822
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
823
+ * @param {import("../PlatformAPIClient").Options} - Options
824
+ * @returns {Promise<ConfigurationPlatformModel.IntegrationConfigResponse>}
825
+ * - Success response
826
+ *
827
+ * @name getIntegrationLevelConfig
700
828
  * @summary: Get integration level config
701
- * @description: Use this API to get the configuration details of an integration such as token, permissions, level, opted value, uid, meta, location ID, etc.
829
+ * @description: Use this API to get the configuration details of an integration such as token, permissions, level, opted value, uid, meta, location ID, etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getIntegrationLevelConfig/).
702
830
  */
703
- async getIntegrationLevelConfig({ id, level, opted, checkPermission } = {}) {
831
+ async getIntegrationLevelConfig(
832
+ { id, level, opted, checkPermission, requestHeaders } = {
833
+ requestHeaders: {},
834
+ },
835
+ { responseHeaders } = { responseHeaders: false }
836
+ ) {
704
837
  const {
705
838
  error,
706
- } = ConfigurationValidator.getIntegrationLevelConfig().validate(
839
+ } = ConfigurationPlatformValidator.getIntegrationLevelConfig().validate(
707
840
  {
708
841
  id,
709
842
  level,
@@ -719,7 +852,7 @@ class Configuration {
719
852
  // Showing warrnings if extra unknown parameters are found
720
853
  const {
721
854
  error: warrning,
722
- } = ConfigurationValidator.getIntegrationLevelConfig().validate(
855
+ } = ConfigurationPlatformValidator.getIntegrationLevelConfig().validate(
723
856
  {
724
857
  id,
725
858
  level,
@@ -731,9 +864,8 @@ class Configuration {
731
864
  if (warrning) {
732
865
  Logger({
733
866
  level: "WARN",
734
- message: "Parameter Validation warrnings for getIntegrationLevelConfig",
867
+ message: `Parameter Validation warrnings for platform > Configuration > getIntegrationLevelConfig \n ${warrning}`,
735
868
  });
736
- Logger({ level: "WARN", message: warrning });
737
869
  }
738
870
 
739
871
  const query_params = {};
@@ -748,40 +880,51 @@ class Configuration {
748
880
  `/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/configuration/${id}/${level}`,
749
881
  query_params,
750
882
  undefined,
751
- xHeaders
883
+ { ...xHeaders, ...requestHeaders },
884
+ { responseHeaders }
752
885
  );
753
886
 
887
+ let responseData = response;
888
+ if (responseHeaders) {
889
+ responseData = response[0];
890
+ }
891
+
754
892
  const {
755
893
  error: res_error,
756
- } = ConfigurationModel.IntegrationConfigResponse().validate(response, {
757
- abortEarly: false,
758
- allowUnknown: false,
759
- });
894
+ } = ConfigurationPlatformModel.IntegrationConfigResponse().validate(
895
+ responseData,
896
+ { abortEarly: false, allowUnknown: false }
897
+ );
760
898
 
761
899
  if (res_error) {
762
900
  Logger({
763
901
  level: "WARN",
764
- message: "Response Validation Warnnings for getIntegrationLevelConfig",
902
+ message: `Response Validation Warnnings for platform > Configuration > getIntegrationLevelConfig \n ${res_error}`,
765
903
  });
766
- Logger({ level: "WARN", message: res_error });
767
904
  }
768
905
 
769
906
  return response;
770
907
  }
771
908
 
772
909
  /**
773
- * @param {Object} arg - Arg object.
774
- * @param {string} arg.id - Integration ID (24-digit Mongo Object ID)
775
- * @param {string} arg.level - Integration level, `store` or `company`
776
- * @param {number} arg.uid - Unique identifier of integration level (store/company)
777
- * @returns {Promise<OptedStoreIntegration>} - Success response
910
+ * @param {ConfigurationPlatformValidator.GetLevelActiveIntegrationsParam} arg
911
+ * - Arg object
912
+ *
913
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
914
+ * @param {import("../PlatformAPIClient").Options} - Options
915
+ * @returns {Promise<ConfigurationPlatformModel.OptedStoreIntegration>} -
916
+ * Success response
917
+ * @name getLevelActiveIntegrations
778
918
  * @summary: Check active integration at store
779
- * @description: Use this API to check if a store is already opted-in for any integration
919
+ * @description: Use this API to check if a store is already opted-in for any integration - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getLevelActiveIntegrations/).
780
920
  */
781
- async getLevelActiveIntegrations({ id, level, uid } = {}) {
921
+ async getLevelActiveIntegrations(
922
+ { id, level, uid, requestHeaders } = { requestHeaders: {} },
923
+ { responseHeaders } = { responseHeaders: false }
924
+ ) {
782
925
  const {
783
926
  error,
784
- } = ConfigurationValidator.getLevelActiveIntegrations().validate(
927
+ } = ConfigurationPlatformValidator.getLevelActiveIntegrations().validate(
785
928
  {
786
929
  id,
787
930
  level,
@@ -796,7 +939,7 @@ class Configuration {
796
939
  // Showing warrnings if extra unknown parameters are found
797
940
  const {
798
941
  error: warrning,
799
- } = ConfigurationValidator.getLevelActiveIntegrations().validate(
942
+ } = ConfigurationPlatformValidator.getLevelActiveIntegrations().validate(
800
943
  {
801
944
  id,
802
945
  level,
@@ -807,10 +950,8 @@ class Configuration {
807
950
  if (warrning) {
808
951
  Logger({
809
952
  level: "WARN",
810
- message:
811
- "Parameter Validation warrnings for getLevelActiveIntegrations",
953
+ message: `Parameter Validation warrnings for platform > Configuration > getLevelActiveIntegrations \n ${warrning}`,
812
954
  });
813
- Logger({ level: "WARN", message: warrning });
814
955
  }
815
956
 
816
957
  const query_params = {};
@@ -823,38 +964,52 @@ class Configuration {
823
964
  `/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/check/configuration/${id}/${level}/${uid}`,
824
965
  query_params,
825
966
  undefined,
826
- xHeaders
967
+ { ...xHeaders, ...requestHeaders },
968
+ { responseHeaders }
827
969
  );
828
970
 
971
+ let responseData = response;
972
+ if (responseHeaders) {
973
+ responseData = response[0];
974
+ }
975
+
829
976
  const {
830
977
  error: res_error,
831
- } = ConfigurationModel.OptedStoreIntegration().validate(response, {
832
- abortEarly: false,
833
- allowUnknown: false,
834
- });
978
+ } = ConfigurationPlatformModel.OptedStoreIntegration().validate(
979
+ responseData,
980
+ { abortEarly: false, allowUnknown: false }
981
+ );
835
982
 
836
983
  if (res_error) {
837
984
  Logger({
838
985
  level: "WARN",
839
- message: "Response Validation Warnnings for getLevelActiveIntegrations",
986
+ message: `Response Validation Warnnings for platform > Configuration > getLevelActiveIntegrations \n ${res_error}`,
840
987
  });
841
- Logger({ level: "WARN", message: res_error });
842
988
  }
843
989
 
844
990
  return response;
845
991
  }
846
992
 
847
993
  /**
848
- * @param {Object} arg - Arg object.
849
- * @param {string} arg.id - Application Id
850
- * @returns {Promise<OptedApplicationResponse>} - Success response
994
+ * @param {ConfigurationPlatformValidator.GetOtherSellerApplicationByIdParam} arg
995
+ * - Arg object
996
+ *
997
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
998
+ * @param {import("../PlatformAPIClient").Options} - Options
999
+ * @returns {Promise<ConfigurationPlatformModel.OptedApplicationResponse>}
1000
+ * - Success response
1001
+ *
1002
+ * @name getOtherSellerApplicationById
851
1003
  * @summary: Get other seller's sales channel by ID
852
- * @description: Use application ID to fetch details of a seller application that was not created within the current company. but has opted for the current company's inventory
1004
+ * @description: Use application ID to fetch details of a seller application that was not created within the current company. but has opted for the current company's inventory - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getOtherSellerApplicationById/).
853
1005
  */
854
- async getOtherSellerApplicationById({ id } = {}) {
1006
+ async getOtherSellerApplicationById(
1007
+ { id, requestHeaders } = { requestHeaders: {} },
1008
+ { responseHeaders } = { responseHeaders: false }
1009
+ ) {
855
1010
  const {
856
1011
  error,
857
- } = ConfigurationValidator.getOtherSellerApplicationById().validate(
1012
+ } = ConfigurationPlatformValidator.getOtherSellerApplicationById().validate(
858
1013
  {
859
1014
  id,
860
1015
  },
@@ -867,7 +1022,7 @@ class Configuration {
867
1022
  // Showing warrnings if extra unknown parameters are found
868
1023
  const {
869
1024
  error: warrning,
870
- } = ConfigurationValidator.getOtherSellerApplicationById().validate(
1025
+ } = ConfigurationPlatformValidator.getOtherSellerApplicationById().validate(
871
1026
  {
872
1027
  id,
873
1028
  },
@@ -876,10 +1031,8 @@ class Configuration {
876
1031
  if (warrning) {
877
1032
  Logger({
878
1033
  level: "WARN",
879
- message:
880
- "Parameter Validation warrnings for getOtherSellerApplicationById",
1034
+ message: `Parameter Validation warrnings for platform > Configuration > getOtherSellerApplicationById \n ${warrning}`,
881
1035
  });
882
- Logger({ level: "WARN", message: warrning });
883
1036
  }
884
1037
 
885
1038
  const query_params = {};
@@ -892,42 +1045,51 @@ class Configuration {
892
1045
  `/service/platform/configuration/v1.0/company/${this.config.companyId}/other-seller-applications/${id}`,
893
1046
  query_params,
894
1047
  undefined,
895
- xHeaders
1048
+ { ...xHeaders, ...requestHeaders },
1049
+ { responseHeaders }
896
1050
  );
897
1051
 
1052
+ let responseData = response;
1053
+ if (responseHeaders) {
1054
+ responseData = response[0];
1055
+ }
1056
+
898
1057
  const {
899
1058
  error: res_error,
900
- } = ConfigurationModel.OptedApplicationResponse().validate(response, {
901
- abortEarly: false,
902
- allowUnknown: false,
903
- });
1059
+ } = ConfigurationPlatformModel.OptedApplicationResponse().validate(
1060
+ responseData,
1061
+ { abortEarly: false, allowUnknown: false }
1062
+ );
904
1063
 
905
1064
  if (res_error) {
906
1065
  Logger({
907
1066
  level: "WARN",
908
- message:
909
- "Response Validation Warnnings for getOtherSellerApplicationById",
1067
+ message: `Response Validation Warnnings for platform > Configuration > getOtherSellerApplicationById \n ${res_error}`,
910
1068
  });
911
- Logger({ level: "WARN", message: res_error });
912
1069
  }
913
1070
 
914
1071
  return response;
915
1072
  }
916
1073
 
917
1074
  /**
918
- * @param {Object} arg - Arg object.
919
- * @param {number} [arg.pageNo] - The page number to navigate through the
920
- * given set of results. Default value is 1.
921
- * @param {number} [arg.pageSize] - The number of items to retrieve in each
922
- * page. Default value is 10.
923
- * @returns {Promise<OtherSellerApplications>} - Success response
1075
+ * @param {ConfigurationPlatformValidator.GetOtherSellerApplicationsParam} arg
1076
+ * - Arg object
1077
+ *
1078
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1079
+ * @param {import("../PlatformAPIClient").Options} - Options
1080
+ * @returns {Promise<ConfigurationPlatformModel.OtherSellerApplications>} -
1081
+ * Success response
1082
+ * @name getOtherSellerApplications
924
1083
  * @summary: Get other seller sales channels
925
- * @description: Use this API to fetch all other seller applications that were not created within the current company. but have opted for the current company's inventory
1084
+ * @description: Use this API to fetch all other seller applications that were not created within the current company. but have opted for the current company's inventory - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getOtherSellerApplications/).
926
1085
  */
927
- async getOtherSellerApplications({ pageNo, pageSize } = {}) {
1086
+ async getOtherSellerApplications(
1087
+ { pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
1088
+ { responseHeaders } = { responseHeaders: false }
1089
+ ) {
928
1090
  const {
929
1091
  error,
930
- } = ConfigurationValidator.getOtherSellerApplications().validate(
1092
+ } = ConfigurationPlatformValidator.getOtherSellerApplications().validate(
931
1093
  {
932
1094
  pageNo,
933
1095
  pageSize,
@@ -941,7 +1103,7 @@ class Configuration {
941
1103
  // Showing warrnings if extra unknown parameters are found
942
1104
  const {
943
1105
  error: warrning,
944
- } = ConfigurationValidator.getOtherSellerApplications().validate(
1106
+ } = ConfigurationPlatformValidator.getOtherSellerApplications().validate(
945
1107
  {
946
1108
  pageNo,
947
1109
  pageSize,
@@ -951,10 +1113,8 @@ class Configuration {
951
1113
  if (warrning) {
952
1114
  Logger({
953
1115
  level: "WARN",
954
- message:
955
- "Parameter Validation warrnings for getOtherSellerApplications",
1116
+ message: `Parameter Validation warrnings for platform > Configuration > getOtherSellerApplications \n ${warrning}`,
956
1117
  });
957
- Logger({ level: "WARN", message: warrning });
958
1118
  }
959
1119
 
960
1120
  const query_params = {};
@@ -966,25 +1126,30 @@ class Configuration {
966
1126
  const response = await PlatformAPIClient.execute(
967
1127
  this.config,
968
1128
  "get",
969
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/other-seller-applications/`,
1129
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/other-seller-applications`,
970
1130
  query_params,
971
1131
  undefined,
972
- xHeaders
1132
+ { ...xHeaders, ...requestHeaders },
1133
+ { responseHeaders }
973
1134
  );
974
1135
 
1136
+ let responseData = response;
1137
+ if (responseHeaders) {
1138
+ responseData = response[0];
1139
+ }
1140
+
975
1141
  const {
976
1142
  error: res_error,
977
- } = ConfigurationModel.OtherSellerApplications().validate(response, {
978
- abortEarly: false,
979
- allowUnknown: false,
980
- });
1143
+ } = ConfigurationPlatformModel.OtherSellerApplications().validate(
1144
+ responseData,
1145
+ { abortEarly: false, allowUnknown: false }
1146
+ );
981
1147
 
982
1148
  if (res_error) {
983
1149
  Logger({
984
1150
  level: "WARN",
985
- message: "Response Validation Warnnings for getOtherSellerApplications",
1151
+ message: `Response Validation Warnnings for platform > Configuration > getOtherSellerApplications \n ${res_error}`,
986
1152
  });
987
- Logger({ level: "WARN", message: res_error });
988
1153
  }
989
1154
 
990
1155
  return response;
@@ -994,6 +1159,7 @@ class Configuration {
994
1159
  * @param {Object} arg - Arg object.
995
1160
  * @param {number} [arg.pageSize] - The number of items to retrieve in each
996
1161
  * page. Default value is 10.
1162
+ * @returns {Paginator<ConfigurationPlatformModel.OtherSellerApplications>}
997
1163
  * @summary: Get other seller sales channels
998
1164
  * @description: Use this API to fetch all other seller applications that were not created within the current company. but have opted for the current company's inventory
999
1165
  */
@@ -1018,19 +1184,23 @@ class Configuration {
1018
1184
  }
1019
1185
 
1020
1186
  /**
1021
- * @param {Object} arg - Arg object.
1022
- * @param {string} arg.level - Store or company
1023
- * @param {number} arg.uid - Unique identifier of the selected integration level.
1024
- * @param {number} [arg.pageNo] - The page number to navigate through the
1025
- * given set of results. Default value is 1.
1026
- * @param {number} [arg.pageSize] - The number of items to retrieve in each
1027
- * page. Default value is 10.
1028
- * @returns {Promise<GetIntegrationsOptInsResponse>} - Success response
1187
+ * @param {ConfigurationPlatformValidator.GetSelectedOptInsParam} arg - Arg object
1188
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1189
+ * @param {import("../PlatformAPIClient").Options} - Options
1190
+ * @returns {Promise<ConfigurationPlatformModel.GetIntegrationsOptInsResponse>}
1191
+ * - Success response
1192
+ *
1193
+ * @name getSelectedOptIns
1029
1194
  * @summary: Get company/store level integration opt-ins
1030
- * @description: Use this API to get the store-level/company-level integrations configured in a company
1195
+ * @description: Use this API to get the store-level/company-level integrations configured in a company - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getSelectedOptIns/).
1031
1196
  */
1032
- async getSelectedOptIns({ level, uid, pageNo, pageSize } = {}) {
1033
- const { error } = ConfigurationValidator.getSelectedOptIns().validate(
1197
+ async getSelectedOptIns(
1198
+ { level, uid, pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
1199
+ { responseHeaders } = { responseHeaders: false }
1200
+ ) {
1201
+ const {
1202
+ error,
1203
+ } = ConfigurationPlatformValidator.getSelectedOptIns().validate(
1034
1204
  {
1035
1205
  level,
1036
1206
  uid,
@@ -1046,7 +1216,7 @@ class Configuration {
1046
1216
  // Showing warrnings if extra unknown parameters are found
1047
1217
  const {
1048
1218
  error: warrning,
1049
- } = ConfigurationValidator.getSelectedOptIns().validate(
1219
+ } = ConfigurationPlatformValidator.getSelectedOptIns().validate(
1050
1220
  {
1051
1221
  level,
1052
1222
  uid,
@@ -1058,9 +1228,8 @@ class Configuration {
1058
1228
  if (warrning) {
1059
1229
  Logger({
1060
1230
  level: "WARN",
1061
- message: "Parameter Validation warrnings for getSelectedOptIns",
1231
+ message: `Parameter Validation warrnings for platform > Configuration > getSelectedOptIns \n ${warrning}`,
1062
1232
  });
1063
- Logger({ level: "WARN", message: warrning });
1064
1233
  }
1065
1234
 
1066
1235
  const query_params = {};
@@ -1075,22 +1244,27 @@ class Configuration {
1075
1244
  `/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/selected/${level}/${uid}`,
1076
1245
  query_params,
1077
1246
  undefined,
1078
- xHeaders
1247
+ { ...xHeaders, ...requestHeaders },
1248
+ { responseHeaders }
1079
1249
  );
1080
1250
 
1251
+ let responseData = response;
1252
+ if (responseHeaders) {
1253
+ responseData = response[0];
1254
+ }
1255
+
1081
1256
  const {
1082
1257
  error: res_error,
1083
- } = ConfigurationModel.GetIntegrationsOptInsResponse().validate(response, {
1084
- abortEarly: false,
1085
- allowUnknown: false,
1086
- });
1258
+ } = ConfigurationPlatformModel.GetIntegrationsOptInsResponse().validate(
1259
+ responseData,
1260
+ { abortEarly: false, allowUnknown: false }
1261
+ );
1087
1262
 
1088
1263
  if (res_error) {
1089
1264
  Logger({
1090
1265
  level: "WARN",
1091
- message: "Response Validation Warnnings for getSelectedOptIns",
1266
+ message: `Response Validation Warnnings for platform > Configuration > getSelectedOptIns \n ${res_error}`,
1092
1267
  });
1093
- Logger({ level: "WARN", message: res_error });
1094
1268
  }
1095
1269
 
1096
1270
  return response;
@@ -1098,17 +1272,53 @@ class Configuration {
1098
1272
 
1099
1273
  /**
1100
1274
  * @param {Object} arg - Arg object.
1101
- * @param {number} [arg.pageNo] - The page number to navigate through the
1102
- * given set of results. Default value is 1.
1275
+ * @param {string} arg.level - Store or company
1276
+ * @param {number} arg.uid - Unique identifier of the selected integration level.
1103
1277
  * @param {number} [arg.pageSize] - The number of items to retrieve in each
1104
1278
  * page. Default value is 10.
1105
- * @param {StoreByBrandsRequest} arg.body
1106
- * @returns {Promise<StoreByBrandsResponse>} - Success response
1279
+ * @returns {Paginator<ConfigurationPlatformModel.GetIntegrationsOptInsResponse>}
1280
+ * @summary: Get company/store level integration opt-ins
1281
+ * @description: Use this API to get the store-level/company-level integrations configured in a company
1282
+ */
1283
+ getSelectedOptInsPaginator({ level, uid, pageSize } = {}) {
1284
+ const paginator = new Paginator();
1285
+ const callback = async () => {
1286
+ const pageId = paginator.nextId;
1287
+ const pageNo = paginator.pageNo;
1288
+ const pageType = "number";
1289
+ const data = await this.getSelectedOptIns({
1290
+ level: level,
1291
+ uid: uid,
1292
+ pageNo: pageNo,
1293
+ pageSize: pageSize,
1294
+ });
1295
+ paginator.setPaginator({
1296
+ hasNext: data.page.has_next ? true : false,
1297
+ nextId: data.page.next_id,
1298
+ });
1299
+ return data;
1300
+ };
1301
+ paginator.setCallback(callback.bind(this));
1302
+ return paginator;
1303
+ }
1304
+
1305
+ /**
1306
+ * @param {ConfigurationPlatformValidator.GetStoreByBrandsParam} arg - Arg object
1307
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1308
+ * @param {import("../PlatformAPIClient").Options} - Options
1309
+ * @returns {Promise<ConfigurationPlatformModel.StoreByBrandsResponse>} -
1310
+ * Success response
1311
+ * @name getStoreByBrands
1107
1312
  * @summary: Get stores by brand uids for the current company
1108
- * @description: Use this API to get a list of selling locations (stores) by the brands they deal. Store has information about store name, store type, store code, store address, and company detail.
1313
+ * @description: Use this API to get a list of selling locations (stores) by the brands they deal. Store has information about store name, store type, store code, store address, and company detail. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getStoreByBrands/).
1109
1314
  */
1110
- async getStoreByBrands({ body, pageNo, pageSize } = {}) {
1111
- const { error } = ConfigurationValidator.getStoreByBrands().validate(
1315
+ async getStoreByBrands(
1316
+ { body, pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
1317
+ { responseHeaders } = { responseHeaders: false }
1318
+ ) {
1319
+ const {
1320
+ error,
1321
+ } = ConfigurationPlatformValidator.getStoreByBrands().validate(
1112
1322
  {
1113
1323
  body,
1114
1324
  pageNo,
@@ -1123,7 +1333,7 @@ class Configuration {
1123
1333
  // Showing warrnings if extra unknown parameters are found
1124
1334
  const {
1125
1335
  error: warrning,
1126
- } = ConfigurationValidator.getStoreByBrands().validate(
1336
+ } = ConfigurationPlatformValidator.getStoreByBrands().validate(
1127
1337
  {
1128
1338
  body,
1129
1339
  pageNo,
@@ -1134,9 +1344,8 @@ class Configuration {
1134
1344
  if (warrning) {
1135
1345
  Logger({
1136
1346
  level: "WARN",
1137
- message: "Parameter Validation warrnings for getStoreByBrands",
1347
+ message: `Parameter Validation warrnings for platform > Configuration > getStoreByBrands \n ${warrning}`,
1138
1348
  });
1139
- Logger({ level: "WARN", message: warrning });
1140
1349
  }
1141
1350
 
1142
1351
  const query_params = {};
@@ -1151,22 +1360,27 @@ class Configuration {
1151
1360
  `/service/platform/configuration/v1.0/company/${this.config.companyId}/inventory/stores-by-brands`,
1152
1361
  query_params,
1153
1362
  body,
1154
- xHeaders
1363
+ { ...xHeaders, ...requestHeaders },
1364
+ { responseHeaders }
1155
1365
  );
1156
1366
 
1367
+ let responseData = response;
1368
+ if (responseHeaders) {
1369
+ responseData = response[0];
1370
+ }
1371
+
1157
1372
  const {
1158
1373
  error: res_error,
1159
- } = ConfigurationModel.StoreByBrandsResponse().validate(response, {
1160
- abortEarly: false,
1161
- allowUnknown: false,
1162
- });
1374
+ } = ConfigurationPlatformModel.StoreByBrandsResponse().validate(
1375
+ responseData,
1376
+ { abortEarly: false, allowUnknown: false }
1377
+ );
1163
1378
 
1164
1379
  if (res_error) {
1165
1380
  Logger({
1166
1381
  level: "WARN",
1167
- message: "Response Validation Warnnings for getStoreByBrands",
1382
+ message: `Response Validation Warnnings for platform > Configuration > getStoreByBrands \n ${res_error}`,
1168
1383
  });
1169
- Logger({ level: "WARN", message: res_error });
1170
1384
  }
1171
1385
 
1172
1386
  return response;
@@ -1176,7 +1390,8 @@ class Configuration {
1176
1390
  * @param {Object} arg - Arg object.
1177
1391
  * @param {number} [arg.pageSize] - The number of items to retrieve in each
1178
1392
  * page. Default value is 10.
1179
- * @param {StoreByBrandsRequest} arg.body
1393
+ * @param {ConfigurationPlatformModel.StoreByBrandsRequest} arg.body
1394
+ * @returns {Paginator<ConfigurationPlatformModel.StoreByBrandsResponse>}
1180
1395
  * @summary: Get stores by brand uids for the current company
1181
1396
  * @description: Use this API to get a list of selling locations (stores) by the brands they deal. Store has information about store name, store type, store code, store address, and company detail.
1182
1397
  */
@@ -1202,16 +1417,22 @@ class Configuration {
1202
1417
  }
1203
1418
 
1204
1419
  /**
1205
- * @param {Object} arg - Arg object.
1206
- * @param {string} arg.id - Alphanumeric ID allotted to an application
1207
- * (sales channel website) created within a business account.
1208
- * @param {OptOutInventory} arg.body
1209
- * @returns {Promise<SuccessMessageResponse>} - Success response
1420
+ * @param {ConfigurationPlatformValidator.OptOutFromApplicationParam} arg - Arg object
1421
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1422
+ * @param {import("../PlatformAPIClient").Options} - Options
1423
+ * @returns {Promise<ConfigurationPlatformModel.SuccessMessageResponse>} -
1424
+ * Success response
1425
+ * @name optOutFromApplication
1210
1426
  * @summary: Opt-out company or store from other seller application
1211
- * @description: Use this API to opt-out your company or store from other seller application. The specific seller application will no longer fetch inventory from your company or store.
1427
+ * @description: Use this API to opt-out your company or store from other seller application. The specific seller application will no longer fetch inventory from your company or store. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/optOutFromApplication/).
1212
1428
  */
1213
- async optOutFromApplication({ id, body } = {}) {
1214
- const { error } = ConfigurationValidator.optOutFromApplication().validate(
1429
+ async optOutFromApplication(
1430
+ { id, body, requestHeaders } = { requestHeaders: {} },
1431
+ { responseHeaders } = { responseHeaders: false }
1432
+ ) {
1433
+ const {
1434
+ error,
1435
+ } = ConfigurationPlatformValidator.optOutFromApplication().validate(
1215
1436
  {
1216
1437
  id,
1217
1438
  body,
@@ -1225,7 +1446,7 @@ class Configuration {
1225
1446
  // Showing warrnings if extra unknown parameters are found
1226
1447
  const {
1227
1448
  error: warrning,
1228
- } = ConfigurationValidator.optOutFromApplication().validate(
1449
+ } = ConfigurationPlatformValidator.optOutFromApplication().validate(
1229
1450
  {
1230
1451
  id,
1231
1452
  body,
@@ -1235,9 +1456,8 @@ class Configuration {
1235
1456
  if (warrning) {
1236
1457
  Logger({
1237
1458
  level: "WARN",
1238
- message: "Parameter Validation warrnings for optOutFromApplication",
1459
+ message: `Parameter Validation warrnings for platform > Configuration > optOutFromApplication \n ${warrning}`,
1239
1460
  });
1240
- Logger({ level: "WARN", message: warrning });
1241
1461
  }
1242
1462
 
1243
1463
  const query_params = {};
@@ -1250,38 +1470,50 @@ class Configuration {
1250
1470
  `/service/platform/configuration/v1.0/company/${this.config.companyId}/other-seller-applications/${id}/opt_out`,
1251
1471
  query_params,
1252
1472
  body,
1253
- xHeaders
1473
+ { ...xHeaders, ...requestHeaders },
1474
+ { responseHeaders }
1254
1475
  );
1255
1476
 
1477
+ let responseData = response;
1478
+ if (responseHeaders) {
1479
+ responseData = response[0];
1480
+ }
1481
+
1256
1482
  const {
1257
1483
  error: res_error,
1258
- } = ConfigurationModel.SuccessMessageResponse().validate(response, {
1259
- abortEarly: false,
1260
- allowUnknown: false,
1261
- });
1484
+ } = ConfigurationPlatformModel.SuccessMessageResponse().validate(
1485
+ responseData,
1486
+ { abortEarly: false, allowUnknown: false }
1487
+ );
1262
1488
 
1263
1489
  if (res_error) {
1264
1490
  Logger({
1265
1491
  level: "WARN",
1266
- message: "Response Validation Warnnings for optOutFromApplication",
1492
+ message: `Response Validation Warnnings for platform > Configuration > optOutFromApplication \n ${res_error}`,
1267
1493
  });
1268
- Logger({ level: "WARN", message: res_error });
1269
1494
  }
1270
1495
 
1271
1496
  return response;
1272
1497
  }
1273
1498
 
1274
1499
  /**
1275
- * @param {Object} arg - Arg object.
1276
- * @param {string} arg.id - Integration ID (24-digit Mongo Object ID)
1277
- * @param {string} arg.level - Integration level, `store` or `company`
1278
- * @param {UpdateIntegrationLevelRequest} arg.body
1279
- * @returns {Promise<IntegrationLevel>} - Success response
1500
+ * @param {ConfigurationPlatformValidator.UpdateLevelIntegrationParam} arg
1501
+ * - Arg object
1502
+ *
1503
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1504
+ * @param {import("../PlatformAPIClient").Options} - Options
1505
+ * @returns {Promise<ConfigurationPlatformModel.IntegrationLevel>} - Success response
1506
+ * @name updateLevelIntegration
1280
1507
  * @summary: Update a store level integration you opted
1281
- * @description: Use this API to update the configuration details of an integration such as token, permissions, level, opted value, uid, meta, location ID, etc. at a particular level (store/company).
1508
+ * @description: Use this API to update the configuration details of an integration such as token, permissions, level, opted value, uid, meta, location ID, etc. at a particular level (store/company). - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/updateLevelIntegration/).
1282
1509
  */
1283
- async updateLevelIntegration({ id, level, body } = {}) {
1284
- const { error } = ConfigurationValidator.updateLevelIntegration().validate(
1510
+ async updateLevelIntegration(
1511
+ { id, level, body, requestHeaders } = { requestHeaders: {} },
1512
+ { responseHeaders } = { responseHeaders: false }
1513
+ ) {
1514
+ const {
1515
+ error,
1516
+ } = ConfigurationPlatformValidator.updateLevelIntegration().validate(
1285
1517
  {
1286
1518
  id,
1287
1519
  level,
@@ -1296,7 +1528,7 @@ class Configuration {
1296
1528
  // Showing warrnings if extra unknown parameters are found
1297
1529
  const {
1298
1530
  error: warrning,
1299
- } = ConfigurationValidator.updateLevelIntegration().validate(
1531
+ } = ConfigurationPlatformValidator.updateLevelIntegration().validate(
1300
1532
  {
1301
1533
  id,
1302
1534
  level,
@@ -1307,9 +1539,8 @@ class Configuration {
1307
1539
  if (warrning) {
1308
1540
  Logger({
1309
1541
  level: "WARN",
1310
- message: "Parameter Validation warrnings for updateLevelIntegration",
1542
+ message: `Parameter Validation warrnings for platform > Configuration > updateLevelIntegration \n ${warrning}`,
1311
1543
  });
1312
- Logger({ level: "WARN", message: warrning });
1313
1544
  }
1314
1545
 
1315
1546
  const query_params = {};
@@ -1322,12 +1553,18 @@ class Configuration {
1322
1553
  `/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/configuration/${id}/${level}`,
1323
1554
  query_params,
1324
1555
  body,
1325
- xHeaders
1556
+ { ...xHeaders, ...requestHeaders },
1557
+ { responseHeaders }
1326
1558
  );
1327
1559
 
1560
+ let responseData = response;
1561
+ if (responseHeaders) {
1562
+ responseData = response[0];
1563
+ }
1564
+
1328
1565
  const {
1329
1566
  error: res_error,
1330
- } = ConfigurationModel.IntegrationLevel().validate(response, {
1567
+ } = ConfigurationPlatformModel.IntegrationLevel().validate(responseData, {
1331
1568
  abortEarly: false,
1332
1569
  allowUnknown: false,
1333
1570
  });
@@ -1335,28 +1572,31 @@ class Configuration {
1335
1572
  if (res_error) {
1336
1573
  Logger({
1337
1574
  level: "WARN",
1338
- message: "Response Validation Warnnings for updateLevelIntegration",
1575
+ message: `Response Validation Warnnings for platform > Configuration > updateLevelIntegration \n ${res_error}`,
1339
1576
  });
1340
- Logger({ level: "WARN", message: res_error });
1341
1577
  }
1342
1578
 
1343
1579
  return response;
1344
1580
  }
1345
1581
 
1346
1582
  /**
1347
- * @param {Object} arg - Arg object.
1348
- * @param {string} arg.id - Integration ID (24-digit Mongo Object ID)
1349
- * @param {string} arg.level - Integration level, `store` or `company`
1350
- * @param {number} arg.uid - Unique identifier of integration level (store/company)
1351
- * @param {IntegrationLevel} arg.body
1352
- * @returns {Promise<IntegrationLevel>} - Success response
1583
+ * @param {ConfigurationPlatformValidator.UpdateLevelUidIntegrationParam} arg
1584
+ * - Arg object
1585
+ *
1586
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1587
+ * @param {import("../PlatformAPIClient").Options} - Options
1588
+ * @returns {Promise<ConfigurationPlatformModel.IntegrationLevel>} - Success response
1589
+ * @name updateLevelUidIntegration
1353
1590
  * @summary: Update integration level by store UID
1354
- * @description: Update the level of integration by store UID
1591
+ * @description: Update the level of integration by store UID - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/updateLevelUidIntegration/).
1355
1592
  */
1356
- async updateLevelUidIntegration({ id, level, uid, body } = {}) {
1593
+ async updateLevelUidIntegration(
1594
+ { id, level, uid, body, requestHeaders } = { requestHeaders: {} },
1595
+ { responseHeaders } = { responseHeaders: false }
1596
+ ) {
1357
1597
  const {
1358
1598
  error,
1359
- } = ConfigurationValidator.updateLevelUidIntegration().validate(
1599
+ } = ConfigurationPlatformValidator.updateLevelUidIntegration().validate(
1360
1600
  {
1361
1601
  id,
1362
1602
  level,
@@ -1372,7 +1612,7 @@ class Configuration {
1372
1612
  // Showing warrnings if extra unknown parameters are found
1373
1613
  const {
1374
1614
  error: warrning,
1375
- } = ConfigurationValidator.updateLevelUidIntegration().validate(
1615
+ } = ConfigurationPlatformValidator.updateLevelUidIntegration().validate(
1376
1616
  {
1377
1617
  id,
1378
1618
  level,
@@ -1384,9 +1624,8 @@ class Configuration {
1384
1624
  if (warrning) {
1385
1625
  Logger({
1386
1626
  level: "WARN",
1387
- message: "Parameter Validation warrnings for updateLevelUidIntegration",
1627
+ message: `Parameter Validation warrnings for platform > Configuration > updateLevelUidIntegration \n ${warrning}`,
1388
1628
  });
1389
- Logger({ level: "WARN", message: warrning });
1390
1629
  }
1391
1630
 
1392
1631
  const query_params = {};
@@ -1399,12 +1638,18 @@ class Configuration {
1399
1638
  `/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/configuration/${id}/${level}/${uid}`,
1400
1639
  query_params,
1401
1640
  body,
1402
- xHeaders
1641
+ { ...xHeaders, ...requestHeaders },
1642
+ { responseHeaders }
1403
1643
  );
1404
1644
 
1645
+ let responseData = response;
1646
+ if (responseHeaders) {
1647
+ responseData = response[0];
1648
+ }
1649
+
1405
1650
  const {
1406
1651
  error: res_error,
1407
- } = ConfigurationModel.IntegrationLevel().validate(response, {
1652
+ } = ConfigurationPlatformModel.IntegrationLevel().validate(responseData, {
1408
1653
  abortEarly: false,
1409
1654
  allowUnknown: false,
1410
1655
  });
@@ -1412,9 +1657,8 @@ class Configuration {
1412
1657
  if (res_error) {
1413
1658
  Logger({
1414
1659
  level: "WARN",
1415
- message: "Response Validation Warnnings for updateLevelUidIntegration",
1660
+ message: `Response Validation Warnnings for platform > Configuration > updateLevelUidIntegration \n ${res_error}`,
1416
1661
  });
1417
- Logger({ level: "WARN", message: res_error });
1418
1662
  }
1419
1663
 
1420
1664
  return response;