@gofynd/fdk-client-javascript 1.1.6 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (321) hide show
  1. package/README.md +12 -0
  2. package/index.js +0 -3
  3. package/package.json +1 -1
  4. package/sdk/application/ApplicationAPIClient.d.ts +15 -1
  5. package/sdk/application/ApplicationAPIClient.js +8 -1
  6. package/sdk/application/ApplicationClient.d.ts +37 -6
  7. package/sdk/application/ApplicationClient.js +31 -0
  8. package/sdk/application/ApplicationConfig.d.ts +52 -12
  9. package/sdk/application/ApplicationConfig.js +37 -2
  10. package/sdk/application/ApplicationModels.d.ts +46 -1
  11. package/sdk/application/ApplicationModels.js +18 -0
  12. package/sdk/application/Cart/CartApplicationClient.d.ts +172 -357
  13. package/sdk/application/Cart/CartApplicationClient.js +620 -483
  14. package/sdk/application/Cart/CartApplicationModel.d.ts +2054 -96
  15. package/sdk/application/Cart/CartApplicationModel.js +1224 -93
  16. package/sdk/application/Cart/CartApplicationValidator.d.ts +508 -30
  17. package/sdk/application/Cart/CartApplicationValidator.js +270 -15
  18. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +234 -413
  19. package/sdk/application/Catalog/CatalogApplicationClient.js +777 -630
  20. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +2218 -117
  21. package/sdk/application/Catalog/CatalogApplicationModel.js +1499 -170
  22. package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +798 -31
  23. package/sdk/application/Catalog/CatalogApplicationValidator.js +318 -3
  24. package/sdk/application/Common/CommonApplicationClient.d.ts +14 -21
  25. package/sdk/application/Common/CommonApplicationClient.js +50 -33
  26. package/sdk/application/Common/CommonApplicationModel.d.ts +448 -19
  27. package/sdk/application/Common/CommonApplicationModel.js +224 -16
  28. package/sdk/application/Common/CommonApplicationValidator.d.ts +42 -4
  29. package/sdk/application/Common/CommonApplicationValidator.js +21 -3
  30. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +25 -18
  31. package/sdk/application/Communication/CommunicationApplicationClient.js +74 -47
  32. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +190 -14
  33. package/sdk/application/Communication/CommunicationApplicationModel.js +124 -7
  34. package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +27 -4
  35. package/sdk/application/Communication/CommunicationApplicationValidator.js +21 -5
  36. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +113 -112
  37. package/sdk/application/Configuration/ConfigurationApplicationClient.js +381 -260
  38. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +2453 -110
  39. package/sdk/application/Configuration/ConfigurationApplicationModel.js +1254 -108
  40. package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +160 -8
  41. package/sdk/application/Configuration/ConfigurationApplicationValidator.js +88 -4
  42. package/sdk/application/Content/ContentApplicationClient.d.ts +120 -138
  43. package/sdk/application/Content/ContentApplicationClient.js +409 -277
  44. package/sdk/application/Content/ContentApplicationModel.d.ts +1627 -105
  45. package/sdk/application/Content/ContentApplicationModel.js +1202 -109
  46. package/sdk/application/Content/ContentApplicationValidator.d.ts +214 -12
  47. package/sdk/application/Content/ContentApplicationValidator.js +113 -3
  48. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +20 -29
  49. package/sdk/application/FileStorage/FileStorageApplicationClient.js +68 -47
  50. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +299 -20
  51. package/sdk/application/FileStorage/FileStorageApplicationModel.js +209 -16
  52. package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +55 -5
  53. package/sdk/application/FileStorage/FileStorageApplicationValidator.js +33 -6
  54. package/sdk/application/Lead/LeadApplicationClient.d.ts +50 -53
  55. package/sdk/application/Lead/LeadApplicationClient.js +169 -103
  56. package/sdk/application/Lead/LeadApplicationModel.d.ts +1405 -54
  57. package/sdk/application/Lead/LeadApplicationModel.js +619 -73
  58. package/sdk/application/Lead/LeadApplicationValidator.d.ts +91 -9
  59. package/sdk/application/Lead/LeadApplicationValidator.js +51 -6
  60. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +34 -33
  61. package/sdk/application/Logistic/LogisticApplicationClient.js +110 -73
  62. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +399 -28
  63. package/sdk/application/Logistic/LogisticApplicationModel.js +293 -24
  64. package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +48 -6
  65. package/sdk/application/Logistic/LogisticApplicationValidator.js +34 -6
  66. package/sdk/application/Order/OrderApplicationClient.d.ts +81 -133
  67. package/sdk/application/Order/OrderApplicationClient.js +297 -217
  68. package/sdk/application/Order/OrderApplicationModel.d.ts +1101 -66
  69. package/sdk/application/Order/OrderApplicationModel.js +776 -57
  70. package/sdk/application/Order/OrderApplicationValidator.d.ts +249 -14
  71. package/sdk/application/Order/OrderApplicationValidator.js +114 -5
  72. package/sdk/application/Payment/PaymentApplicationClient.d.ts +341 -356
  73. package/sdk/application/Payment/PaymentApplicationClient.js +1077 -703
  74. package/sdk/application/Payment/PaymentApplicationModel.d.ts +3125 -99
  75. package/sdk/application/Payment/PaymentApplicationModel.js +1158 -62
  76. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +494 -41
  77. package/sdk/application/Payment/PaymentApplicationValidator.js +297 -25
  78. package/sdk/application/PosCart/PosCartApplicationClient.d.ts +178 -350
  79. package/sdk/application/PosCart/PosCartApplicationClient.js +636 -491
  80. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1823 -89
  81. package/sdk/application/PosCart/PosCartApplicationModel.js +1117 -85
  82. package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +480 -29
  83. package/sdk/application/PosCart/PosCartApplicationValidator.js +262 -15
  84. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +49 -47
  85. package/sdk/application/Rewards/RewardsApplicationClient.js +160 -102
  86. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +343 -22
  87. package/sdk/application/Rewards/RewardsApplicationModel.js +230 -15
  88. package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +70 -7
  89. package/sdk/application/Rewards/RewardsApplicationValidator.js +45 -6
  90. package/sdk/application/Share/ShareApplicationClient.d.ts +44 -50
  91. package/sdk/application/Share/ShareApplicationClient.js +165 -97
  92. package/sdk/application/Share/ShareApplicationModel.d.ts +230 -15
  93. package/sdk/application/Share/ShareApplicationModel.js +154 -16
  94. package/sdk/application/Share/ShareApplicationValidator.d.ts +86 -8
  95. package/sdk/application/Share/ShareApplicationValidator.js +48 -4
  96. package/sdk/application/Theme/ThemeApplicationClient.d.ts +25 -27
  97. package/sdk/application/Theme/ThemeApplicationClient.js +83 -54
  98. package/sdk/application/Theme/ThemeApplicationModel.d.ts +621 -48
  99. package/sdk/application/Theme/ThemeApplicationModel.js +464 -40
  100. package/sdk/application/Theme/ThemeApplicationValidator.d.ts +49 -5
  101. package/sdk/application/Theme/ThemeApplicationValidator.js +26 -3
  102. package/sdk/application/User/UserApplicationClient.d.ts +219 -303
  103. package/sdk/application/User/UserApplicationClient.js +819 -522
  104. package/sdk/application/User/UserApplicationModel.d.ts +1390 -101
  105. package/sdk/application/User/UserApplicationModel.js +983 -44
  106. package/sdk/application/User/UserApplicationValidator.d.ts +457 -33
  107. package/sdk/application/User/UserApplicationValidator.js +265 -31
  108. package/sdk/common/AxiosHelper.js +8 -2
  109. package/sdk/common/Paginator.d.ts +27 -12
  110. package/sdk/common/Paginator.js +15 -0
  111. package/sdk/common/RequestSigner.js +0 -1
  112. package/sdk/partner/PartnerAPIClient.d.ts +15 -1
  113. package/sdk/partner/PartnerAPIClient.js +8 -1
  114. package/sdk/partner/PartnerClient.d.ts +20 -3
  115. package/sdk/partner/PartnerClient.js +17 -0
  116. package/sdk/partner/PartnerConfig.d.ts +40 -14
  117. package/sdk/partner/PartnerConfig.js +31 -6
  118. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +26 -25
  119. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +82 -53
  120. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +202 -17
  121. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +139 -10
  122. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +42 -5
  123. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +26 -4
  124. package/sdk/platform/Billing/BillingPlatformClient.d.ts +88 -97
  125. package/sdk/platform/Billing/BillingPlatformClient.js +310 -191
  126. package/sdk/platform/Billing/BillingPlatformModel.d.ts +1211 -68
  127. package/sdk/platform/Billing/BillingPlatformModel.js +824 -59
  128. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +153 -12
  129. package/sdk/platform/Billing/BillingPlatformValidator.js +87 -8
  130. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +392 -634
  131. package/sdk/platform/Cart/CartPlatformApplicationClient.js +1480 -957
  132. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +827 -57
  133. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +492 -34
  134. package/sdk/platform/Cart/CartPlatformModel.d.ts +3639 -175
  135. package/sdk/platform/Cart/CartPlatformModel.js +2368 -212
  136. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +438 -615
  137. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1449 -984
  138. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +1081 -49
  139. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +482 -23
  140. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +573 -824
  141. package/sdk/platform/Catalog/CatalogPlatformClient.js +1773 -1264
  142. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6871 -326
  143. package/sdk/platform/Catalog/CatalogPlatformModel.js +4215 -349
  144. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +1331 -71
  145. package/sdk/platform/Catalog/CatalogPlatformValidator.js +611 -30
  146. package/sdk/platform/Common/CommonPlatformClient.d.ts +14 -21
  147. package/sdk/platform/Common/CommonPlatformClient.js +48 -33
  148. package/sdk/platform/Common/CommonPlatformModel.d.ts +448 -19
  149. package/sdk/platform/Common/CommonPlatformModel.js +224 -16
  150. package/sdk/platform/Common/CommonPlatformValidator.d.ts +42 -4
  151. package/sdk/platform/Common/CommonPlatformValidator.js +21 -3
  152. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +457 -279
  153. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +1423 -553
  154. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +581 -42
  155. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +294 -22
  156. package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +18 -5
  157. package/sdk/platform/Communication/CommunicationPlatformClient.js +58 -19
  158. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1630 -102
  159. package/sdk/platform/Communication/CommunicationPlatformModel.js +1150 -85
  160. package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +16 -3
  161. package/sdk/platform/Communication/CommunicationPlatformValidator.js +11 -3
  162. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +102 -111
  163. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +321 -225
  164. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +830 -43
  165. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +612 -78
  166. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +180 -13
  167. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +98 -10
  168. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +232 -212
  169. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +737 -438
  170. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +293 -22
  171. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +184 -17
  172. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +166 -178
  173. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +519 -310
  174. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +4504 -188
  175. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2242 -204
  176. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +332 -19
  177. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +153 -10
  178. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +495 -560
  179. package/sdk/platform/Content/ContentPlatformApplicationClient.js +1777 -987
  180. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +872 -62
  181. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +487 -35
  182. package/sdk/platform/Content/ContentPlatformModel.d.ts +1661 -108
  183. package/sdk/platform/Content/ContentPlatformModel.js +1217 -113
  184. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +67 -101
  185. package/sdk/platform/Discount/DiscountPlatformClient.js +240 -176
  186. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +242 -15
  187. package/sdk/platform/Discount/DiscountPlatformModel.js +162 -10
  188. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +185 -13
  189. package/sdk/platform/Discount/DiscountPlatformValidator.js +88 -8
  190. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +32 -41
  191. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +106 -74
  192. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +77 -6
  193. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +41 -6
  194. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +39 -54
  195. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +124 -99
  196. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +299 -20
  197. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +207 -16
  198. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +98 -8
  199. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +54 -7
  200. package/sdk/platform/Finance/FinancePlatformClient.d.ts +85 -91
  201. package/sdk/platform/Finance/FinancePlatformClient.js +272 -180
  202. package/sdk/platform/Finance/FinancePlatformModel.d.ts +619 -50
  203. package/sdk/platform/Finance/FinancePlatformModel.js +458 -30
  204. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +123 -15
  205. package/sdk/platform/Finance/FinancePlatformValidator.js +95 -16
  206. package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +99 -97
  207. package/sdk/platform/Inventory/InventoryPlatformClient.js +288 -199
  208. package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +1354 -61
  209. package/sdk/platform/Inventory/InventoryPlatformModel.js +916 -83
  210. package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +168 -12
  211. package/sdk/platform/Inventory/InventoryPlatformValidator.js +82 -6
  212. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +86 -106
  213. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +326 -186
  214. package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +180 -14
  215. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +94 -9
  216. package/sdk/platform/Lead/LeadPlatformClient.d.ts +75 -101
  217. package/sdk/platform/Lead/LeadPlatformClient.js +240 -174
  218. package/sdk/platform/Lead/LeadPlatformModel.d.ts +1403 -54
  219. package/sdk/platform/Lead/LeadPlatformModel.js +618 -73
  220. package/sdk/platform/Lead/LeadPlatformValidator.d.ts +173 -12
  221. package/sdk/platform/Lead/LeadPlatformValidator.js +85 -8
  222. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +18 -14
  223. package/sdk/platform/Order/OrderPlatformApplicationClient.js +56 -29
  224. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +26 -4
  225. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +16 -3
  226. package/sdk/platform/Order/OrderPlatformClient.d.ts +343 -556
  227. package/sdk/platform/Order/OrderPlatformClient.js +969 -762
  228. package/sdk/platform/Order/OrderPlatformModel.d.ts +4967 -247
  229. package/sdk/platform/Order/OrderPlatformModel.js +3249 -259
  230. package/sdk/platform/Order/OrderPlatformValidator.d.ts +758 -37
  231. package/sdk/platform/Order/OrderPlatformValidator.js +351 -22
  232. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +28 -36
  233. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +103 -59
  234. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +66 -6
  235. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +32 -4
  236. package/sdk/platform/Partner/PartnerPlatformClient.d.ts +68 -107
  237. package/sdk/platform/Partner/PartnerPlatformClient.js +253 -174
  238. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +767 -45
  239. package/sdk/platform/Partner/PartnerPlatformModel.js +524 -41
  240. package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +207 -13
  241. package/sdk/platform/Partner/PartnerPlatformValidator.js +87 -5
  242. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +255 -260
  243. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +860 -504
  244. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +348 -30
  245. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +221 -19
  246. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +73 -73
  247. package/sdk/platform/Payment/PaymentPlatformClient.js +238 -154
  248. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2658 -93
  249. package/sdk/platform/Payment/PaymentPlatformModel.js +1035 -36
  250. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +111 -11
  251. package/sdk/platform/Payment/PaymentPlatformValidator.js +68 -7
  252. package/sdk/platform/PlatformAPIClient.d.ts +16 -1
  253. package/sdk/platform/PlatformAPIClient.js +9 -1
  254. package/sdk/platform/PlatformApplicationClient.d.ts +22 -1798
  255. package/sdk/platform/PlatformApplicationClient.js +17 -1899
  256. package/sdk/platform/PlatformClient.d.ts +29 -12579
  257. package/sdk/platform/PlatformClient.js +26 -15085
  258. package/sdk/platform/PlatformConfig.d.ts +37 -11
  259. package/sdk/platform/PlatformConfig.js +32 -6
  260. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +80 -92
  261. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +307 -177
  262. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +149 -12
  263. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +82 -8
  264. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +371 -23
  265. package/sdk/platform/Rewards/RewardsPlatformModel.js +246 -16
  266. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +120 -89
  267. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +349 -201
  268. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +128 -12
  269. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +85 -11
  270. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +148 -178
  271. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +454 -329
  272. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1399 -96
  273. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1022 -71
  274. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +280 -18
  275. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +134 -11
  276. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +38 -47
  277. package/sdk/platform/Share/SharePlatformApplicationClient.js +137 -73
  278. package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +87 -7
  279. package/sdk/platform/Share/SharePlatformApplicationValidator.js +42 -5
  280. package/sdk/platform/Share/SharePlatformModel.d.ts +250 -16
  281. package/sdk/platform/Share/SharePlatformModel.js +165 -17
  282. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +149 -183
  283. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +579 -330
  284. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +308 -24
  285. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +162 -10
  286. package/sdk/platform/Theme/ThemePlatformModel.d.ts +621 -48
  287. package/sdk/platform/Theme/ThemePlatformModel.js +464 -40
  288. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +119 -151
  289. package/sdk/platform/User/UserPlatformApplicationClient.js +411 -244
  290. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +235 -18
  291. package/sdk/platform/User/UserPlatformApplicationValidator.js +126 -12
  292. package/sdk/platform/User/UserPlatformModel.d.ts +1390 -101
  293. package/sdk/platform/User/UserPlatformModel.js +983 -44
  294. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +38 -47
  295. package/sdk/platform/Webhook/WebhookPlatformClient.js +137 -87
  296. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +242 -16
  297. package/sdk/platform/Webhook/WebhookPlatformModel.js +167 -18
  298. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +83 -7
  299. package/sdk/platform/Webhook/WebhookPlatformValidator.js +43 -5
  300. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +14 -21
  301. package/sdk/public/Configuration/ConfigurationPublicClient.js +46 -33
  302. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +473 -19
  303. package/sdk/public/Configuration/ConfigurationPublicModel.js +224 -16
  304. package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +42 -4
  305. package/sdk/public/Configuration/ConfigurationPublicValidator.js +21 -3
  306. package/sdk/public/Inventory/InventoryPublicClient.d.ts +48 -48
  307. package/sdk/public/Inventory/InventoryPublicClient.js +146 -98
  308. package/sdk/public/Inventory/InventoryPublicModel.d.ts +392 -21
  309. package/sdk/public/Inventory/InventoryPublicModel.js +267 -27
  310. package/sdk/public/Inventory/InventoryPublicValidator.d.ts +90 -8
  311. package/sdk/public/Inventory/InventoryPublicValidator.js +44 -4
  312. package/sdk/public/PublicClient.d.ts +19 -3
  313. package/sdk/public/PublicClient.js +16 -0
  314. package/sdk/public/PublicConfig.d.ts +27 -6
  315. package/sdk/public/PublicConfig.js +17 -1
  316. package/sdk/public/Webhook/WebhookPublicClient.d.ts +13 -11
  317. package/sdk/public/Webhook/WebhookPublicClient.js +42 -27
  318. package/sdk/public/Webhook/WebhookPublicModel.d.ts +242 -16
  319. package/sdk/public/Webhook/WebhookPublicModel.js +167 -18
  320. package/sdk/public/Webhook/WebhookPublicValidator.d.ts +18 -3
  321. package/sdk/public/Webhook/WebhookPublicValidator.js +14 -4
@@ -1,8 +1,8 @@
1
1
  const PlatformAPIClient = require("../PlatformAPIClient");
2
2
  const { FDKClientValidationError } = require("../../common/FDKError");
3
3
  const Paginator = require("../../common/Paginator");
4
- const UserValidator = require("./UserPlatformApplicationValidator");
5
- const UserModel = require("./UserPlatformModel");
4
+ const UserPlatformApplicationValidator = require("./UserPlatformApplicationValidator");
5
+ const UserPlatformModel = require("./UserPlatformModel");
6
6
  const { Logger } = require("./../../common/Logger");
7
7
  const Joi = require("joi");
8
8
 
@@ -13,14 +13,15 @@ class User {
13
13
  }
14
14
 
15
15
  /**
16
- * @param {Object} arg - Arg object.
17
- * @param {ArchiveUserRequestSchema} arg.body
18
- * @returns {Promise<ArchiveUserSuccess>} - Success response
16
+ * @param {UserPlatformApplicationValidator.ArchiveUserParam} arg - Arg object
17
+ * @param {import("../PlatformAPIClient").Options} - Options
18
+ * @returns {Promise<UserPlatformModel.ArchiveUserSuccess>} - Success response
19
+ * @name archiveUser
19
20
  * @summary: archive user
20
- * @description: archive user
21
+ * @description: archive user - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/archiveUser/).
21
22
  */
22
- async archiveUser({ body } = {}) {
23
- const { error } = UserValidator.archiveUser().validate(
23
+ async archiveUser({ body } = {}, { headers } = { headers: false }) {
24
+ const { error } = UserPlatformApplicationValidator.archiveUser().validate(
24
25
  {
25
26
  body,
26
27
  },
@@ -31,7 +32,9 @@ class User {
31
32
  }
32
33
 
33
34
  // Showing warrnings if extra unknown parameters are found
34
- const { error: warrning } = UserValidator.archiveUser().validate(
35
+ const {
36
+ error: warrning,
37
+ } = UserPlatformApplicationValidator.archiveUser().validate(
35
38
  {
36
39
  body,
37
40
  },
@@ -40,9 +43,8 @@ class User {
40
43
  if (warrning) {
41
44
  Logger({
42
45
  level: "WARN",
43
- message: "Parameter Validation warrnings for archiveUser",
46
+ message: `Parameter Validation warrnings for platform > User > archiveUser \n ${warrning}`,
44
47
  });
45
- Logger({ level: "WARN", message: warrning });
46
48
  }
47
49
 
48
50
  const query_params = {};
@@ -52,12 +54,19 @@ class User {
52
54
  "put",
53
55
  `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/customers/archive`,
54
56
  query_params,
55
- body
57
+ body,
58
+ undefined,
59
+ { headers }
56
60
  );
57
61
 
62
+ let responseData = response;
63
+ if (headers) {
64
+ responseData = response[0];
65
+ }
66
+
58
67
  const {
59
68
  error: res_error,
60
- } = UserModel.ArchiveUserSuccess().validate(response, {
69
+ } = UserPlatformModel.ArchiveUserSuccess().validate(responseData, {
61
70
  abortEarly: false,
62
71
  allowUnknown: false,
63
72
  });
@@ -65,23 +74,25 @@ class User {
65
74
  if (res_error) {
66
75
  Logger({
67
76
  level: "WARN",
68
- message: "Response Validation Warnnings for archiveUser",
77
+ message: `Response Validation Warnnings for platform > User > archiveUser \n ${res_error}`,
69
78
  });
70
- Logger({ level: "WARN", message: res_error });
71
79
  }
72
80
 
73
81
  return response;
74
82
  }
75
83
 
76
84
  /**
77
- * @param {Object} arg - Arg object.
78
- * @param {BlockUserRequestSchema} arg.body
79
- * @returns {Promise<BlockUserSuccess>} - Success response
85
+ * @param {UserPlatformApplicationValidator.BlockOrUnblockUsersParam} arg - Arg object
86
+ * @param {import("../PlatformAPIClient").Options} - Options
87
+ * @returns {Promise<UserPlatformModel.BlockUserSuccess>} - Success response
88
+ * @name blockOrUnblockUsers
80
89
  * @summary: Block/Unblock user
81
- * @description: Block/Unblock user
90
+ * @description: Block/Unblock user - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/blockOrUnblockUsers/).
82
91
  */
83
- async blockOrUnblockUsers({ body } = {}) {
84
- const { error } = UserValidator.blockOrUnblockUsers().validate(
92
+ async blockOrUnblockUsers({ body } = {}, { headers } = { headers: false }) {
93
+ const {
94
+ error,
95
+ } = UserPlatformApplicationValidator.blockOrUnblockUsers().validate(
85
96
  {
86
97
  body,
87
98
  },
@@ -92,7 +103,9 @@ class User {
92
103
  }
93
104
 
94
105
  // Showing warrnings if extra unknown parameters are found
95
- const { error: warrning } = UserValidator.blockOrUnblockUsers().validate(
106
+ const {
107
+ error: warrning,
108
+ } = UserPlatformApplicationValidator.blockOrUnblockUsers().validate(
96
109
  {
97
110
  body,
98
111
  },
@@ -101,9 +114,8 @@ class User {
101
114
  if (warrning) {
102
115
  Logger({
103
116
  level: "WARN",
104
- message: "Parameter Validation warrnings for blockOrUnblockUsers",
117
+ message: `Parameter Validation warrnings for platform > User > blockOrUnblockUsers \n ${warrning}`,
105
118
  });
106
- Logger({ level: "WARN", message: warrning });
107
119
  }
108
120
 
109
121
  const query_params = {};
@@ -113,34 +125,43 @@ class User {
113
125
  "put",
114
126
  `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/customers/activation`,
115
127
  query_params,
116
- body
128
+ body,
129
+ undefined,
130
+ { headers }
117
131
  );
118
132
 
119
- const { error: res_error } = UserModel.BlockUserSuccess().validate(
120
- response,
121
- { abortEarly: false, allowUnknown: false }
122
- );
133
+ let responseData = response;
134
+ if (headers) {
135
+ responseData = response[0];
136
+ }
137
+
138
+ const {
139
+ error: res_error,
140
+ } = UserPlatformModel.BlockUserSuccess().validate(responseData, {
141
+ abortEarly: false,
142
+ allowUnknown: false,
143
+ });
123
144
 
124
145
  if (res_error) {
125
146
  Logger({
126
147
  level: "WARN",
127
- message: "Response Validation Warnnings for blockOrUnblockUsers",
148
+ message: `Response Validation Warnnings for platform > User > blockOrUnblockUsers \n ${res_error}`,
128
149
  });
129
- Logger({ level: "WARN", message: res_error });
130
150
  }
131
151
 
132
152
  return response;
133
153
  }
134
154
 
135
155
  /**
136
- * @param {Object} arg - Arg object.
137
- * @param {CreateUserRequestSchema} arg.body
138
- * @returns {Promise<CreateUserResponseSchema>} - Success response
156
+ * @param {UserPlatformApplicationValidator.CreateUserParam} arg - Arg object
157
+ * @param {import("../PlatformAPIClient").Options} - Options
158
+ * @returns {Promise<UserPlatformModel.CreateUserResponseSchema>} - Success response
159
+ * @name createUser
139
160
  * @summary: Create user
140
- * @description: Create user
161
+ * @description: Create user - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/createUser/).
141
162
  */
142
- async createUser({ body } = {}) {
143
- const { error } = UserValidator.createUser().validate(
163
+ async createUser({ body } = {}, { headers } = { headers: false }) {
164
+ const { error } = UserPlatformApplicationValidator.createUser().validate(
144
165
  {
145
166
  body,
146
167
  },
@@ -151,7 +172,9 @@ class User {
151
172
  }
152
173
 
153
174
  // Showing warrnings if extra unknown parameters are found
154
- const { error: warrning } = UserValidator.createUser().validate(
175
+ const {
176
+ error: warrning,
177
+ } = UserPlatformApplicationValidator.createUser().validate(
155
178
  {
156
179
  body,
157
180
  },
@@ -160,9 +183,8 @@ class User {
160
183
  if (warrning) {
161
184
  Logger({
162
185
  level: "WARN",
163
- message: "Parameter Validation warrnings for createUser",
186
+ message: `Parameter Validation warrnings for platform > User > createUser \n ${warrning}`,
164
187
  });
165
- Logger({ level: "WARN", message: warrning });
166
188
  }
167
189
 
168
190
  const query_params = {};
@@ -172,12 +194,19 @@ class User {
172
194
  "post",
173
195
  `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/customers`,
174
196
  query_params,
175
- body
197
+ body,
198
+ undefined,
199
+ { headers }
176
200
  );
177
201
 
202
+ let responseData = response;
203
+ if (headers) {
204
+ responseData = response[0];
205
+ }
206
+
178
207
  const {
179
208
  error: res_error,
180
- } = UserModel.CreateUserResponseSchema().validate(response, {
209
+ } = UserPlatformModel.CreateUserResponseSchema().validate(responseData, {
181
210
  abortEarly: false,
182
211
  allowUnknown: false,
183
212
  });
@@ -185,23 +214,25 @@ class User {
185
214
  if (res_error) {
186
215
  Logger({
187
216
  level: "WARN",
188
- message: "Response Validation Warnnings for createUser",
217
+ message: `Response Validation Warnnings for platform > User > createUser \n ${res_error}`,
189
218
  });
190
- Logger({ level: "WARN", message: res_error });
191
219
  }
192
220
 
193
221
  return response;
194
222
  }
195
223
 
196
224
  /**
197
- * @param {Object} arg - Arg object.
198
- * @param {CreateUserGroupSchema} arg.body
199
- * @returns {Promise<UserGroupResponseSchema>} - Success response
225
+ * @param {UserPlatformApplicationValidator.CreateUserGroupParam} arg - Arg object
226
+ * @param {import("../PlatformAPIClient").Options} - Options
227
+ * @returns {Promise<UserPlatformModel.UserGroupResponseSchema>} - Success response
228
+ * @name createUserGroup
200
229
  * @summary: Create an User Group
201
- * @description: Use this API to create new user Group
230
+ * @description: Use this API to create new user Group - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/createUserGroup/).
202
231
  */
203
- async createUserGroup({ body } = {}) {
204
- const { error } = UserValidator.createUserGroup().validate(
232
+ async createUserGroup({ body } = {}, { headers } = { headers: false }) {
233
+ const {
234
+ error,
235
+ } = UserPlatformApplicationValidator.createUserGroup().validate(
205
236
  {
206
237
  body,
207
238
  },
@@ -212,7 +243,9 @@ class User {
212
243
  }
213
244
 
214
245
  // Showing warrnings if extra unknown parameters are found
215
- const { error: warrning } = UserValidator.createUserGroup().validate(
246
+ const {
247
+ error: warrning,
248
+ } = UserPlatformApplicationValidator.createUserGroup().validate(
216
249
  {
217
250
  body,
218
251
  },
@@ -221,9 +254,8 @@ class User {
221
254
  if (warrning) {
222
255
  Logger({
223
256
  level: "WARN",
224
- message: "Parameter Validation warrnings for createUserGroup",
257
+ message: `Parameter Validation warrnings for platform > User > createUserGroup \n ${warrning}`,
225
258
  });
226
- Logger({ level: "WARN", message: warrning });
227
259
  }
228
260
 
229
261
  const query_params = {};
@@ -233,12 +265,19 @@ class User {
233
265
  "post",
234
266
  `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/user_group`,
235
267
  query_params,
236
- body
268
+ body,
269
+ undefined,
270
+ { headers }
237
271
  );
238
272
 
273
+ let responseData = response;
274
+ if (headers) {
275
+ responseData = response[0];
276
+ }
277
+
239
278
  const {
240
279
  error: res_error,
241
- } = UserModel.UserGroupResponseSchema().validate(response, {
280
+ } = UserPlatformModel.UserGroupResponseSchema().validate(responseData, {
242
281
  abortEarly: false,
243
282
  allowUnknown: false,
244
283
  });
@@ -246,23 +285,26 @@ class User {
246
285
  if (res_error) {
247
286
  Logger({
248
287
  level: "WARN",
249
- message: "Response Validation Warnnings for createUserGroup",
288
+ message: `Response Validation Warnnings for platform > User > createUserGroup \n ${res_error}`,
250
289
  });
251
- Logger({ level: "WARN", message: res_error });
252
290
  }
253
291
 
254
292
  return response;
255
293
  }
256
294
 
257
295
  /**
258
- * @param {Object} arg - Arg object.
259
- * @param {CreateUserSessionRequestSchema} arg.body
260
- * @returns {Promise<CreateUserSessionResponseSchema>} - Success response
296
+ * @param {UserPlatformApplicationValidator.CreateUserSessionParam} arg - Arg object
297
+ * @param {import("../PlatformAPIClient").Options} - Options
298
+ * @returns {Promise<UserPlatformModel.CreateUserSessionResponseSchema>} -
299
+ * Success response
300
+ * @name createUserSession
261
301
  * @summary: Create user session
262
- * @description: Create user session
302
+ * @description: Create user session - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/createUserSession/).
263
303
  */
264
- async createUserSession({ body } = {}) {
265
- const { error } = UserValidator.createUserSession().validate(
304
+ async createUserSession({ body } = {}, { headers } = { headers: false }) {
305
+ const {
306
+ error,
307
+ } = UserPlatformApplicationValidator.createUserSession().validate(
266
308
  {
267
309
  body,
268
310
  },
@@ -273,7 +315,9 @@ class User {
273
315
  }
274
316
 
275
317
  // Showing warrnings if extra unknown parameters are found
276
- const { error: warrning } = UserValidator.createUserSession().validate(
318
+ const {
319
+ error: warrning,
320
+ } = UserPlatformApplicationValidator.createUserSession().validate(
277
321
  {
278
322
  body,
279
323
  },
@@ -282,9 +326,8 @@ class User {
282
326
  if (warrning) {
283
327
  Logger({
284
328
  level: "WARN",
285
- message: "Parameter Validation warrnings for createUserSession",
329
+ message: `Parameter Validation warrnings for platform > User > createUserSession \n ${warrning}`,
286
330
  });
287
- Logger({ level: "WARN", message: warrning });
288
331
  }
289
332
 
290
333
  const query_params = {};
@@ -294,37 +337,51 @@ class User {
294
337
  "post",
295
338
  `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/customers/session`,
296
339
  query_params,
297
- body
340
+ body,
341
+ undefined,
342
+ { headers }
298
343
  );
299
344
 
345
+ let responseData = response;
346
+ if (headers) {
347
+ responseData = response[0];
348
+ }
349
+
300
350
  const {
301
351
  error: res_error,
302
- } = UserModel.CreateUserSessionResponseSchema().validate(response, {
303
- abortEarly: false,
304
- allowUnknown: false,
305
- });
352
+ } = UserPlatformModel.CreateUserSessionResponseSchema().validate(
353
+ responseData,
354
+ { abortEarly: false, allowUnknown: false }
355
+ );
306
356
 
307
357
  if (res_error) {
308
358
  Logger({
309
359
  level: "WARN",
310
- message: "Response Validation Warnnings for createUserSession",
360
+ message: `Response Validation Warnnings for platform > User > createUserSession \n ${res_error}`,
311
361
  });
312
- Logger({ level: "WARN", message: res_error });
313
362
  }
314
363
 
315
364
  return response;
316
365
  }
317
366
 
318
367
  /**
319
- * @param {Object} arg - Arg object.
320
- * @param {string} arg.id - ID of a customer.
321
- * @param {string} arg.reason - Reason to delete sessions.
322
- * @returns {Promise<SessionDeleteResponseSchema>} - Success response
368
+ * @param {UserPlatformApplicationValidator.DeleteActiveSessionsParam} arg
369
+ * - Arg object
370
+ *
371
+ * @param {import("../PlatformAPIClient").Options} - Options
372
+ * @returns {Promise<UserPlatformModel.SessionDeleteResponseSchema>} -
373
+ * Success response
374
+ * @name deleteActiveSessions
323
375
  * @summary: Delete a list of all session for a user
324
- * @description: Use this API to Delete a list of session of customers who have registered in the application.
376
+ * @description: Use this API to Delete a list of session of customers who have registered in the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/deleteActiveSessions/).
325
377
  */
326
- async deleteActiveSessions({ id, reason } = {}) {
327
- const { error } = UserValidator.deleteActiveSessions().validate(
378
+ async deleteActiveSessions(
379
+ { id, reason } = {},
380
+ { headers } = { headers: false }
381
+ ) {
382
+ const {
383
+ error,
384
+ } = UserPlatformApplicationValidator.deleteActiveSessions().validate(
328
385
  {
329
386
  id,
330
387
  reason,
@@ -336,7 +393,9 @@ class User {
336
393
  }
337
394
 
338
395
  // Showing warrnings if extra unknown parameters are found
339
- const { error: warrning } = UserValidator.deleteActiveSessions().validate(
396
+ const {
397
+ error: warrning,
398
+ } = UserPlatformApplicationValidator.deleteActiveSessions().validate(
340
399
  {
341
400
  id,
342
401
  reason,
@@ -346,9 +405,8 @@ class User {
346
405
  if (warrning) {
347
406
  Logger({
348
407
  level: "WARN",
349
- message: "Parameter Validation warrnings for deleteActiveSessions",
408
+ message: `Parameter Validation warrnings for platform > User > deleteActiveSessions \n ${warrning}`,
350
409
  });
351
- Logger({ level: "WARN", message: warrning });
352
410
  }
353
411
 
354
412
  const query_params = {};
@@ -360,12 +418,19 @@ class User {
360
418
  "delete",
361
419
  `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/customers/sessions`,
362
420
  query_params,
363
- undefined
421
+ undefined,
422
+ undefined,
423
+ { headers }
364
424
  );
365
425
 
426
+ let responseData = response;
427
+ if (headers) {
428
+ responseData = response[0];
429
+ }
430
+
366
431
  const {
367
432
  error: res_error,
368
- } = UserModel.SessionDeleteResponseSchema().validate(response, {
433
+ } = UserPlatformModel.SessionDeleteResponseSchema().validate(responseData, {
369
434
  abortEarly: false,
370
435
  allowUnknown: false,
371
436
  });
@@ -373,25 +438,27 @@ class User {
373
438
  if (res_error) {
374
439
  Logger({
375
440
  level: "WARN",
376
- message: "Response Validation Warnnings for deleteActiveSessions",
441
+ message: `Response Validation Warnnings for platform > User > deleteActiveSessions \n ${res_error}`,
377
442
  });
378
- Logger({ level: "WARN", message: res_error });
379
443
  }
380
444
 
381
445
  return response;
382
446
  }
383
447
 
384
448
  /**
385
- * @param {Object} arg - Arg object.
386
- * @param {string} arg.id - ID of a customer.
387
- * @param {string} arg.sessionId - Session ID of a customer.
388
- * @param {string} arg.reason - Reason for deleting session.
389
- * @returns {Promise<SessionDeleteResponseSchema>} - Success response
449
+ * @param {UserPlatformApplicationValidator.DeleteSessionParam} arg - Arg object
450
+ * @param {import("../PlatformAPIClient").Options} - Options
451
+ * @returns {Promise<UserPlatformModel.SessionDeleteResponseSchema>} -
452
+ * Success response
453
+ * @name deleteSession
390
454
  * @summary: Delete a session for a user
391
- * @description: Use this API to Delete a session of customers who have registered in the application.
455
+ * @description: Use this API to Delete a session of customers who have registered in the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/deleteSession/).
392
456
  */
393
- async deleteSession({ id, sessionId, reason } = {}) {
394
- const { error } = UserValidator.deleteSession().validate(
457
+ async deleteSession(
458
+ { id, sessionId, reason } = {},
459
+ { headers } = { headers: false }
460
+ ) {
461
+ const { error } = UserPlatformApplicationValidator.deleteSession().validate(
395
462
  {
396
463
  id,
397
464
  sessionId,
@@ -404,7 +471,9 @@ class User {
404
471
  }
405
472
 
406
473
  // Showing warrnings if extra unknown parameters are found
407
- const { error: warrning } = UserValidator.deleteSession().validate(
474
+ const {
475
+ error: warrning,
476
+ } = UserPlatformApplicationValidator.deleteSession().validate(
408
477
  {
409
478
  id,
410
479
  sessionId,
@@ -415,9 +484,8 @@ class User {
415
484
  if (warrning) {
416
485
  Logger({
417
486
  level: "WARN",
418
- message: "Parameter Validation warrnings for deleteSession",
487
+ message: `Parameter Validation warrnings for platform > User > deleteSession \n ${warrning}`,
419
488
  });
420
- Logger({ level: "WARN", message: warrning });
421
489
  }
422
490
 
423
491
  const query_params = {};
@@ -430,12 +498,19 @@ class User {
430
498
  "delete",
431
499
  `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/customers/session`,
432
500
  query_params,
433
- undefined
501
+ undefined,
502
+ undefined,
503
+ { headers }
434
504
  );
435
505
 
506
+ let responseData = response;
507
+ if (headers) {
508
+ responseData = response[0];
509
+ }
510
+
436
511
  const {
437
512
  error: res_error,
438
- } = UserModel.SessionDeleteResponseSchema().validate(response, {
513
+ } = UserPlatformModel.SessionDeleteResponseSchema().validate(responseData, {
439
514
  abortEarly: false,
440
515
  allowUnknown: false,
441
516
  });
@@ -443,23 +518,25 @@ class User {
443
518
  if (res_error) {
444
519
  Logger({
445
520
  level: "WARN",
446
- message: "Response Validation Warnnings for deleteSession",
521
+ message: `Response Validation Warnnings for platform > User > deleteSession \n ${res_error}`,
447
522
  });
448
- Logger({ level: "WARN", message: res_error });
449
523
  }
450
524
 
451
525
  return response;
452
526
  }
453
527
 
454
528
  /**
455
- * @param {Object} arg - Arg object.
456
- * @param {string} arg.id - ID of a customer.
457
- * @returns {Promise<SessionListResponseSchema>} - Success response
529
+ * @param {UserPlatformApplicationValidator.GetActiveSessionsParam} arg - Arg object
530
+ * @param {import("../PlatformAPIClient").Options} - Options
531
+ * @returns {Promise<UserPlatformModel.SessionListResponseSchema>} - Success response
532
+ * @name getActiveSessions
458
533
  * @summary: Get a list of all session with info for a user
459
- * @description: Use this API to retrieve a list of session with info of customers who have registered in the application.
534
+ * @description: Use this API to retrieve a list of session with info of customers who have registered in the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/getActiveSessions/).
460
535
  */
461
- async getActiveSessions({ id } = {}) {
462
- const { error } = UserValidator.getActiveSessions().validate(
536
+ async getActiveSessions({ id } = {}, { headers } = { headers: false }) {
537
+ const {
538
+ error,
539
+ } = UserPlatformApplicationValidator.getActiveSessions().validate(
463
540
  {
464
541
  id,
465
542
  },
@@ -470,7 +547,9 @@ class User {
470
547
  }
471
548
 
472
549
  // Showing warrnings if extra unknown parameters are found
473
- const { error: warrning } = UserValidator.getActiveSessions().validate(
550
+ const {
551
+ error: warrning,
552
+ } = UserPlatformApplicationValidator.getActiveSessions().validate(
474
553
  {
475
554
  id,
476
555
  },
@@ -479,9 +558,8 @@ class User {
479
558
  if (warrning) {
480
559
  Logger({
481
560
  level: "WARN",
482
- message: "Parameter Validation warrnings for getActiveSessions",
561
+ message: `Parameter Validation warrnings for platform > User > getActiveSessions \n ${warrning}`,
483
562
  });
484
- Logger({ level: "WARN", message: warrning });
485
563
  }
486
564
 
487
565
  const query_params = {};
@@ -492,12 +570,19 @@ class User {
492
570
  "get",
493
571
  `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/customers/sessions`,
494
572
  query_params,
495
- undefined
573
+ undefined,
574
+ undefined,
575
+ { headers }
496
576
  );
497
577
 
578
+ let responseData = response;
579
+ if (headers) {
580
+ responseData = response[0];
581
+ }
582
+
498
583
  const {
499
584
  error: res_error,
500
- } = UserModel.SessionListResponseSchema().validate(response, {
585
+ } = UserPlatformModel.SessionListResponseSchema().validate(responseData, {
501
586
  abortEarly: false,
502
587
  allowUnknown: false,
503
588
  });
@@ -505,28 +590,26 @@ class User {
505
590
  if (res_error) {
506
591
  Logger({
507
592
  level: "WARN",
508
- message: "Response Validation Warnnings for getActiveSessions",
593
+ message: `Response Validation Warnnings for platform > User > getActiveSessions \n ${res_error}`,
509
594
  });
510
- Logger({ level: "WARN", message: res_error });
511
595
  }
512
596
 
513
597
  return response;
514
598
  }
515
599
 
516
600
  /**
517
- * @param {Object} arg - Arg object.
518
- * @param {Object} [arg.q] - The search query. Mobile number or email ID of
519
- * a customer.
520
- * @param {number} [arg.pageSize] - The number of items to retrieve in each
521
- * page. Default value is 10.
522
- * @param {number} [arg.pageNo] - The page number to navigate through the
523
- * given set of results. Default value is 1.
524
- * @returns {Promise<CustomerListResponseSchema>} - Success response
601
+ * @param {UserPlatformApplicationValidator.GetCustomersParam} arg - Arg object
602
+ * @param {import("../PlatformAPIClient").Options} - Options
603
+ * @returns {Promise<UserPlatformModel.CustomerListResponseSchema>} - Success response
604
+ * @name getCustomers
525
605
  * @summary: Get a list of customers
526
- * @description: Use this API to retrieve a list of customers who have registered in the application.
606
+ * @description: Use this API to retrieve a list of customers who have registered in the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/getCustomers/).
527
607
  */
528
- async getCustomers({ q, pageSize, pageNo } = {}) {
529
- const { error } = UserValidator.getCustomers().validate(
608
+ async getCustomers(
609
+ { q, pageSize, pageNo } = {},
610
+ { headers } = { headers: false }
611
+ ) {
612
+ const { error } = UserPlatformApplicationValidator.getCustomers().validate(
530
613
  {
531
614
  q,
532
615
  pageSize,
@@ -539,7 +622,9 @@ class User {
539
622
  }
540
623
 
541
624
  // Showing warrnings if extra unknown parameters are found
542
- const { error: warrning } = UserValidator.getCustomers().validate(
625
+ const {
626
+ error: warrning,
627
+ } = UserPlatformApplicationValidator.getCustomers().validate(
543
628
  {
544
629
  q,
545
630
  pageSize,
@@ -550,9 +635,8 @@ class User {
550
635
  if (warrning) {
551
636
  Logger({
552
637
  level: "WARN",
553
- message: "Parameter Validation warrnings for getCustomers",
638
+ message: `Parameter Validation warrnings for platform > User > getCustomers \n ${warrning}`,
554
639
  });
555
- Logger({ level: "WARN", message: warrning });
556
640
  }
557
641
 
558
642
  const query_params = {};
@@ -565,12 +649,19 @@ class User {
565
649
  "get",
566
650
  `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/customers/list`,
567
651
  query_params,
568
- undefined
652
+ undefined,
653
+ undefined,
654
+ { headers }
569
655
  );
570
656
 
657
+ let responseData = response;
658
+ if (headers) {
659
+ responseData = response[0];
660
+ }
661
+
571
662
  const {
572
663
  error: res_error,
573
- } = UserModel.CustomerListResponseSchema().validate(response, {
664
+ } = UserPlatformModel.CustomerListResponseSchema().validate(responseData, {
574
665
  abortEarly: false,
575
666
  allowUnknown: false,
576
667
  });
@@ -578,22 +669,24 @@ class User {
578
669
  if (res_error) {
579
670
  Logger({
580
671
  level: "WARN",
581
- message: "Response Validation Warnnings for getCustomers",
672
+ message: `Response Validation Warnnings for platform > User > getCustomers \n ${res_error}`,
582
673
  });
583
- Logger({ level: "WARN", message: res_error });
584
674
  }
585
675
 
586
676
  return response;
587
677
  }
588
678
 
589
679
  /**
590
- * @param {Object} arg - Arg object.
591
- * @returns {Promise<PlatformSchema>} - Success response
680
+ * @param {import("../PlatformAPIClient").Options} - Options
681
+ * @returns {Promise<UserPlatformModel.PlatformSchema>} - Success response
682
+ * @name getPlatformConfig
592
683
  * @summary: Get platform configurations
593
- * @description: Use this API to get all the platform configurations such as mobile image, desktop image, social logins, and all other text.
684
+ * @description: Use this API to get all the platform configurations such as mobile image, desktop image, social logins, and all other text. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/getPlatformConfig/).
594
685
  */
595
- async getPlatformConfig({} = {}) {
596
- const { error } = UserValidator.getPlatformConfig().validate(
686
+ async getPlatformConfig({ headers } = { headers: false }) {
687
+ const {
688
+ error,
689
+ } = UserPlatformApplicationValidator.getPlatformConfig().validate(
597
690
  {},
598
691
  { abortEarly: false, allowUnknown: true }
599
692
  );
@@ -602,16 +695,17 @@ class User {
602
695
  }
603
696
 
604
697
  // Showing warrnings if extra unknown parameters are found
605
- const { error: warrning } = UserValidator.getPlatformConfig().validate(
698
+ const {
699
+ error: warrning,
700
+ } = UserPlatformApplicationValidator.getPlatformConfig().validate(
606
701
  {},
607
702
  { abortEarly: false, allowUnknown: false }
608
703
  );
609
704
  if (warrning) {
610
705
  Logger({
611
706
  level: "WARN",
612
- message: "Parameter Validation warrnings for getPlatformConfig",
707
+ message: `Parameter Validation warrnings for platform > User > getPlatformConfig \n ${warrning}`,
613
708
  });
614
- Logger({ level: "WARN", message: warrning });
615
709
  }
616
710
 
617
711
  const query_params = {};
@@ -621,10 +715,19 @@ class User {
621
715
  "get",
622
716
  `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/platform/config`,
623
717
  query_params,
624
- undefined
718
+ undefined,
719
+ undefined,
720
+ { headers }
625
721
  );
626
722
 
627
- const { error: res_error } = UserModel.PlatformSchema().validate(response, {
723
+ let responseData = response;
724
+ if (headers) {
725
+ responseData = response[0];
726
+ }
727
+
728
+ const {
729
+ error: res_error,
730
+ } = UserPlatformModel.PlatformSchema().validate(responseData, {
628
731
  abortEarly: false,
629
732
  allowUnknown: false,
630
733
  });
@@ -632,23 +735,25 @@ class User {
632
735
  if (res_error) {
633
736
  Logger({
634
737
  level: "WARN",
635
- message: "Response Validation Warnnings for getPlatformConfig",
738
+ message: `Response Validation Warnnings for platform > User > getPlatformConfig \n ${res_error}`,
636
739
  });
637
- Logger({ level: "WARN", message: res_error });
638
740
  }
639
741
 
640
742
  return response;
641
743
  }
642
744
 
643
745
  /**
644
- * @param {Object} arg - Arg object.
645
- * @param {string} arg.groupId - Numeric ID allotted to a User Group
646
- * @returns {Promise<UserGroupResponseSchema>} - Success response
746
+ * @param {UserPlatformApplicationValidator.GetUserGroupByIdParam} arg - Arg object
747
+ * @param {import("../PlatformAPIClient").Options} - Options
748
+ * @returns {Promise<UserPlatformModel.UserGroupResponseSchema>} - Success response
749
+ * @name getUserGroupById
647
750
  * @summary: Get an User Group by Id
648
- * @description: Use this API to get details of an existing user Group
751
+ * @description: Use this API to get details of an existing user Group - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/getUserGroupById/).
649
752
  */
650
- async getUserGroupById({ groupId } = {}) {
651
- const { error } = UserValidator.getUserGroupById().validate(
753
+ async getUserGroupById({ groupId } = {}, { headers } = { headers: false }) {
754
+ const {
755
+ error,
756
+ } = UserPlatformApplicationValidator.getUserGroupById().validate(
652
757
  {
653
758
  groupId,
654
759
  },
@@ -659,7 +764,9 @@ class User {
659
764
  }
660
765
 
661
766
  // Showing warrnings if extra unknown parameters are found
662
- const { error: warrning } = UserValidator.getUserGroupById().validate(
767
+ const {
768
+ error: warrning,
769
+ } = UserPlatformApplicationValidator.getUserGroupById().validate(
663
770
  {
664
771
  groupId,
665
772
  },
@@ -668,9 +775,8 @@ class User {
668
775
  if (warrning) {
669
776
  Logger({
670
777
  level: "WARN",
671
- message: "Parameter Validation warrnings for getUserGroupById",
778
+ message: `Parameter Validation warrnings for platform > User > getUserGroupById \n ${warrning}`,
672
779
  });
673
- Logger({ level: "WARN", message: warrning });
674
780
  }
675
781
 
676
782
  const query_params = {};
@@ -680,12 +786,19 @@ class User {
680
786
  "get",
681
787
  `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/user_group/${groupId}`,
682
788
  query_params,
683
- undefined
789
+ undefined,
790
+ undefined,
791
+ { headers }
684
792
  );
685
793
 
794
+ let responseData = response;
795
+ if (headers) {
796
+ responseData = response[0];
797
+ }
798
+
686
799
  const {
687
800
  error: res_error,
688
- } = UserModel.UserGroupResponseSchema().validate(response, {
801
+ } = UserPlatformModel.UserGroupResponseSchema().validate(responseData, {
689
802
  abortEarly: false,
690
803
  allowUnknown: false,
691
804
  });
@@ -693,28 +806,27 @@ class User {
693
806
  if (res_error) {
694
807
  Logger({
695
808
  level: "WARN",
696
- message: "Response Validation Warnnings for getUserGroupById",
809
+ message: `Response Validation Warnnings for platform > User > getUserGroupById \n ${res_error}`,
697
810
  });
698
- Logger({ level: "WARN", message: res_error });
699
811
  }
700
812
 
701
813
  return response;
702
814
  }
703
815
 
704
816
  /**
705
- * @param {Object} arg - Arg object.
706
- * @param {string} [arg.pageNo] - Page number for pagination result
707
- * @param {string} [arg.pageSize] - Page size for pagination result
708
- * @param {string} [arg.name] - To seartch for User Groups which contains
709
- * given string in their name
710
- * @param {string} [arg.status] - To get User Groups with given status
711
- * @param {number} [arg.groupUid] - To get User Groups with given uid
712
- * @returns {Promise<UserGroupListResponseSchema>} - Success response
817
+ * @param {UserPlatformApplicationValidator.GetUserGroupsParam} arg - Arg object
818
+ * @param {import("../PlatformAPIClient").Options} - Options
819
+ * @returns {Promise<UserPlatformModel.UserGroupListResponseSchema>} -
820
+ * Success response
821
+ * @name getUserGroups
713
822
  * @summary: Get User Groups mathcing criteria
714
- * @description: Use this API to get User Groups mathing criteria passed in query
823
+ * @description: Use this API to get User Groups mathing criteria passed in query - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/getUserGroups/).
715
824
  */
716
- async getUserGroups({ pageNo, pageSize, name, status, groupUid } = {}) {
717
- const { error } = UserValidator.getUserGroups().validate(
825
+ async getUserGroups(
826
+ { pageNo, pageSize, name, status, groupUid } = {},
827
+ { headers } = { headers: false }
828
+ ) {
829
+ const { error } = UserPlatformApplicationValidator.getUserGroups().validate(
718
830
  {
719
831
  pageNo,
720
832
  pageSize,
@@ -729,7 +841,9 @@ class User {
729
841
  }
730
842
 
731
843
  // Showing warrnings if extra unknown parameters are found
732
- const { error: warrning } = UserValidator.getUserGroups().validate(
844
+ const {
845
+ error: warrning,
846
+ } = UserPlatformApplicationValidator.getUserGroups().validate(
733
847
  {
734
848
  pageNo,
735
849
  pageSize,
@@ -742,9 +856,8 @@ class User {
742
856
  if (warrning) {
743
857
  Logger({
744
858
  level: "WARN",
745
- message: "Parameter Validation warrnings for getUserGroups",
859
+ message: `Parameter Validation warrnings for platform > User > getUserGroups \n ${warrning}`,
746
860
  });
747
- Logger({ level: "WARN", message: warrning });
748
861
  }
749
862
 
750
863
  const query_params = {};
@@ -759,12 +872,19 @@ class User {
759
872
  "get",
760
873
  `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/user_group`,
761
874
  query_params,
762
- undefined
875
+ undefined,
876
+ undefined,
877
+ { headers }
763
878
  );
764
879
 
880
+ let responseData = response;
881
+ if (headers) {
882
+ responseData = response[0];
883
+ }
884
+
765
885
  const {
766
886
  error: res_error,
767
- } = UserModel.UserGroupListResponseSchema().validate(response, {
887
+ } = UserPlatformModel.UserGroupListResponseSchema().validate(responseData, {
768
888
  abortEarly: false,
769
889
  allowUnknown: false,
770
890
  });
@@ -772,24 +892,23 @@ class User {
772
892
  if (res_error) {
773
893
  Logger({
774
894
  level: "WARN",
775
- message: "Response Validation Warnnings for getUserGroups",
895
+ message: `Response Validation Warnnings for platform > User > getUserGroups \n ${res_error}`,
776
896
  });
777
- Logger({ level: "WARN", message: res_error });
778
897
  }
779
898
 
780
899
  return response;
781
900
  }
782
901
 
783
902
  /**
784
- * @param {Object} arg - Arg object.
785
- * @param {string} [arg.q] - The search query. Mobile number or email ID of
786
- * a customer.
787
- * @returns {Promise<UserSearchResponseSchema>} - Success response
903
+ * @param {UserPlatformApplicationValidator.SearchUsersParam} arg - Arg object
904
+ * @param {import("../PlatformAPIClient").Options} - Options
905
+ * @returns {Promise<UserPlatformModel.UserSearchResponseSchema>} - Success response
906
+ * @name searchUsers
788
907
  * @summary: Search an existing user.
789
- * @description: Use this API to retrieve an existing user from a list.
908
+ * @description: Use this API to retrieve an existing user from a list. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/searchUsers/).
790
909
  */
791
- async searchUsers({ q } = {}) {
792
- const { error } = UserValidator.searchUsers().validate(
910
+ async searchUsers({ q } = {}, { headers } = { headers: false }) {
911
+ const { error } = UserPlatformApplicationValidator.searchUsers().validate(
793
912
  {
794
913
  q,
795
914
  },
@@ -800,7 +919,9 @@ class User {
800
919
  }
801
920
 
802
921
  // Showing warrnings if extra unknown parameters are found
803
- const { error: warrning } = UserValidator.searchUsers().validate(
922
+ const {
923
+ error: warrning,
924
+ } = UserPlatformApplicationValidator.searchUsers().validate(
804
925
  {
805
926
  q,
806
927
  },
@@ -809,9 +930,8 @@ class User {
809
930
  if (warrning) {
810
931
  Logger({
811
932
  level: "WARN",
812
- message: "Parameter Validation warrnings for searchUsers",
933
+ message: `Parameter Validation warrnings for platform > User > searchUsers \n ${warrning}`,
813
934
  });
814
- Logger({ level: "WARN", message: warrning });
815
935
  }
816
936
 
817
937
  const query_params = {};
@@ -822,12 +942,19 @@ class User {
822
942
  "get",
823
943
  `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/customers/search`,
824
944
  query_params,
825
- undefined
945
+ undefined,
946
+ undefined,
947
+ { headers }
826
948
  );
827
949
 
950
+ let responseData = response;
951
+ if (headers) {
952
+ responseData = response[0];
953
+ }
954
+
828
955
  const {
829
956
  error: res_error,
830
- } = UserModel.UserSearchResponseSchema().validate(response, {
957
+ } = UserPlatformModel.UserSearchResponseSchema().validate(responseData, {
831
958
  abortEarly: false,
832
959
  allowUnknown: false,
833
960
  });
@@ -835,23 +962,23 @@ class User {
835
962
  if (res_error) {
836
963
  Logger({
837
964
  level: "WARN",
838
- message: "Response Validation Warnnings for searchUsers",
965
+ message: `Response Validation Warnnings for platform > User > searchUsers \n ${res_error}`,
839
966
  });
840
- Logger({ level: "WARN", message: res_error });
841
967
  }
842
968
 
843
969
  return response;
844
970
  }
845
971
 
846
972
  /**
847
- * @param {Object} arg - Arg object.
848
- * @param {UnDeleteUserRequestSchema} arg.body
849
- * @returns {Promise<UnDeleteUserSuccess>} - Success response
973
+ * @param {UserPlatformApplicationValidator.UnDeleteUserParam} arg - Arg object
974
+ * @param {import("../PlatformAPIClient").Options} - Options
975
+ * @returns {Promise<UserPlatformModel.UnDeleteUserSuccess>} - Success response
976
+ * @name unDeleteUser
850
977
  * @summary: undelete user who deleted from application and have not elapsed the platform configured delete days
851
- * @description: undelete user who deleted from application and have not elapsed the platform configured delete days
978
+ * @description: undelete user who deleted from application and have not elapsed the platform configured delete days - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/unDeleteUser/).
852
979
  */
853
- async unDeleteUser({ body } = {}) {
854
- const { error } = UserValidator.unDeleteUser().validate(
980
+ async unDeleteUser({ body } = {}, { headers } = { headers: false }) {
981
+ const { error } = UserPlatformApplicationValidator.unDeleteUser().validate(
855
982
  {
856
983
  body,
857
984
  },
@@ -862,7 +989,9 @@ class User {
862
989
  }
863
990
 
864
991
  // Showing warrnings if extra unknown parameters are found
865
- const { error: warrning } = UserValidator.unDeleteUser().validate(
992
+ const {
993
+ error: warrning,
994
+ } = UserPlatformApplicationValidator.unDeleteUser().validate(
866
995
  {
867
996
  body,
868
997
  },
@@ -871,9 +1000,8 @@ class User {
871
1000
  if (warrning) {
872
1001
  Logger({
873
1002
  level: "WARN",
874
- message: "Parameter Validation warrnings for unDeleteUser",
1003
+ message: `Parameter Validation warrnings for platform > User > unDeleteUser \n ${warrning}`,
875
1004
  });
876
- Logger({ level: "WARN", message: warrning });
877
1005
  }
878
1006
 
879
1007
  const query_params = {};
@@ -883,12 +1011,19 @@ class User {
883
1011
  "put",
884
1012
  `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/customers/undelete`,
885
1013
  query_params,
886
- body
1014
+ body,
1015
+ undefined,
1016
+ { headers }
887
1017
  );
888
1018
 
1019
+ let responseData = response;
1020
+ if (headers) {
1021
+ responseData = response[0];
1022
+ }
1023
+
889
1024
  const {
890
1025
  error: res_error,
891
- } = UserModel.UnDeleteUserSuccess().validate(response, {
1026
+ } = UserPlatformModel.UnDeleteUserSuccess().validate(responseData, {
892
1027
  abortEarly: false,
893
1028
  allowUnknown: false,
894
1029
  });
@@ -896,23 +1031,27 @@ class User {
896
1031
  if (res_error) {
897
1032
  Logger({
898
1033
  level: "WARN",
899
- message: "Response Validation Warnnings for unDeleteUser",
1034
+ message: `Response Validation Warnnings for platform > User > unDeleteUser \n ${res_error}`,
900
1035
  });
901
- Logger({ level: "WARN", message: res_error });
902
1036
  }
903
1037
 
904
1038
  return response;
905
1039
  }
906
1040
 
907
1041
  /**
908
- * @param {Object} arg - Arg object.
909
- * @param {PlatformSchema} arg.body
910
- * @returns {Promise<PlatformSchema>} - Success response
1042
+ * @param {UserPlatformApplicationValidator.UpdatePlatformConfigParam} arg
1043
+ * - Arg object
1044
+ *
1045
+ * @param {import("../PlatformAPIClient").Options} - Options
1046
+ * @returns {Promise<UserPlatformModel.PlatformSchema>} - Success response
1047
+ * @name updatePlatformConfig
911
1048
  * @summary: Update platform configurations
912
- * @description: Use this API to edit the existing platform configurations such as mobile image, desktop image, social logins, and all other text.
1049
+ * @description: Use this API to edit the existing platform configurations such as mobile image, desktop image, social logins, and all other text. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/updatePlatformConfig/).
913
1050
  */
914
- async updatePlatformConfig({ body } = {}) {
915
- const { error } = UserValidator.updatePlatformConfig().validate(
1051
+ async updatePlatformConfig({ body } = {}, { headers } = { headers: false }) {
1052
+ const {
1053
+ error,
1054
+ } = UserPlatformApplicationValidator.updatePlatformConfig().validate(
916
1055
  {
917
1056
  body,
918
1057
  },
@@ -923,7 +1062,9 @@ class User {
923
1062
  }
924
1063
 
925
1064
  // Showing warrnings if extra unknown parameters are found
926
- const { error: warrning } = UserValidator.updatePlatformConfig().validate(
1065
+ const {
1066
+ error: warrning,
1067
+ } = UserPlatformApplicationValidator.updatePlatformConfig().validate(
927
1068
  {
928
1069
  body,
929
1070
  },
@@ -932,9 +1073,8 @@ class User {
932
1073
  if (warrning) {
933
1074
  Logger({
934
1075
  level: "WARN",
935
- message: "Parameter Validation warrnings for updatePlatformConfig",
1076
+ message: `Parameter Validation warrnings for platform > User > updatePlatformConfig \n ${warrning}`,
936
1077
  });
937
- Logger({ level: "WARN", message: warrning });
938
1078
  }
939
1079
 
940
1080
  const query_params = {};
@@ -944,10 +1084,19 @@ class User {
944
1084
  "post",
945
1085
  `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/platform/config`,
946
1086
  query_params,
947
- body
1087
+ body,
1088
+ undefined,
1089
+ { headers }
948
1090
  );
949
1091
 
950
- const { error: res_error } = UserModel.PlatformSchema().validate(response, {
1092
+ let responseData = response;
1093
+ if (headers) {
1094
+ responseData = response[0];
1095
+ }
1096
+
1097
+ const {
1098
+ error: res_error,
1099
+ } = UserPlatformModel.PlatformSchema().validate(responseData, {
951
1100
  abortEarly: false,
952
1101
  allowUnknown: false,
953
1102
  });
@@ -955,24 +1104,23 @@ class User {
955
1104
  if (res_error) {
956
1105
  Logger({
957
1106
  level: "WARN",
958
- message: "Response Validation Warnnings for updatePlatformConfig",
1107
+ message: `Response Validation Warnnings for platform > User > updatePlatformConfig \n ${res_error}`,
959
1108
  });
960
- Logger({ level: "WARN", message: res_error });
961
1109
  }
962
1110
 
963
1111
  return response;
964
1112
  }
965
1113
 
966
1114
  /**
967
- * @param {Object} arg - Arg object.
968
- * @param {string} arg.userId - User ID
969
- * @param {UpdateUserRequestSchema} arg.body
970
- * @returns {Promise<CreateUserResponseSchema>} - Success response
1115
+ * @param {UserPlatformApplicationValidator.UpdateUserParam} arg - Arg object
1116
+ * @param {import("../PlatformAPIClient").Options} - Options
1117
+ * @returns {Promise<UserPlatformModel.CreateUserResponseSchema>} - Success response
1118
+ * @name updateUser
971
1119
  * @summary: Update user
972
- * @description: Use this API to update user details, Note: Existing emails and phone numbers of user will be replaced directly if phone_numbers or emails field sent in request data.
1120
+ * @description: Use this API to update user details, Note: Existing emails and phone numbers of user will be replaced directly if phone_numbers or emails field sent in request data. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/updateUser/).
973
1121
  */
974
- async updateUser({ userId, body } = {}) {
975
- const { error } = UserValidator.updateUser().validate(
1122
+ async updateUser({ userId, body } = {}, { headers } = { headers: false }) {
1123
+ const { error } = UserPlatformApplicationValidator.updateUser().validate(
976
1124
  {
977
1125
  userId,
978
1126
  body,
@@ -984,7 +1132,9 @@ class User {
984
1132
  }
985
1133
 
986
1134
  // Showing warrnings if extra unknown parameters are found
987
- const { error: warrning } = UserValidator.updateUser().validate(
1135
+ const {
1136
+ error: warrning,
1137
+ } = UserPlatformApplicationValidator.updateUser().validate(
988
1138
  {
989
1139
  userId,
990
1140
  body,
@@ -994,9 +1144,8 @@ class User {
994
1144
  if (warrning) {
995
1145
  Logger({
996
1146
  level: "WARN",
997
- message: "Parameter Validation warrnings for updateUser",
1147
+ message: `Parameter Validation warrnings for platform > User > updateUser \n ${warrning}`,
998
1148
  });
999
- Logger({ level: "WARN", message: warrning });
1000
1149
  }
1001
1150
 
1002
1151
  const query_params = {};
@@ -1006,12 +1155,19 @@ class User {
1006
1155
  "put",
1007
1156
  `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/customers/${userId}`,
1008
1157
  query_params,
1009
- body
1158
+ body,
1159
+ undefined,
1160
+ { headers }
1010
1161
  );
1011
1162
 
1163
+ let responseData = response;
1164
+ if (headers) {
1165
+ responseData = response[0];
1166
+ }
1167
+
1012
1168
  const {
1013
1169
  error: res_error,
1014
- } = UserModel.CreateUserResponseSchema().validate(response, {
1170
+ } = UserPlatformModel.CreateUserResponseSchema().validate(responseData, {
1015
1171
  abortEarly: false,
1016
1172
  allowUnknown: false,
1017
1173
  });
@@ -1019,24 +1175,28 @@ class User {
1019
1175
  if (res_error) {
1020
1176
  Logger({
1021
1177
  level: "WARN",
1022
- message: "Response Validation Warnnings for updateUser",
1178
+ message: `Response Validation Warnnings for platform > User > updateUser \n ${res_error}`,
1023
1179
  });
1024
- Logger({ level: "WARN", message: res_error });
1025
1180
  }
1026
1181
 
1027
1182
  return response;
1028
1183
  }
1029
1184
 
1030
1185
  /**
1031
- * @param {Object} arg - Arg object.
1032
- * @param {string} arg.groupId - Numeric ID allotted to a User Group
1033
- * @param {UpdateUserGroupSchema} arg.body
1034
- * @returns {Promise<UserGroupResponseSchema>} - Success response
1186
+ * @param {UserPlatformApplicationValidator.UpdateUserGroupParam} arg - Arg object
1187
+ * @param {import("../PlatformAPIClient").Options} - Options
1188
+ * @returns {Promise<UserPlatformModel.UserGroupResponseSchema>} - Success response
1189
+ * @name updateUserGroup
1035
1190
  * @summary: Update an User Group
1036
- * @description: Use this API to update an existing user Group
1191
+ * @description: Use this API to update an existing user Group - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/updateUserGroup/).
1037
1192
  */
1038
- async updateUserGroup({ groupId, body } = {}) {
1039
- const { error } = UserValidator.updateUserGroup().validate(
1193
+ async updateUserGroup(
1194
+ { groupId, body } = {},
1195
+ { headers } = { headers: false }
1196
+ ) {
1197
+ const {
1198
+ error,
1199
+ } = UserPlatformApplicationValidator.updateUserGroup().validate(
1040
1200
  {
1041
1201
  groupId,
1042
1202
  body,
@@ -1048,7 +1208,9 @@ class User {
1048
1208
  }
1049
1209
 
1050
1210
  // Showing warrnings if extra unknown parameters are found
1051
- const { error: warrning } = UserValidator.updateUserGroup().validate(
1211
+ const {
1212
+ error: warrning,
1213
+ } = UserPlatformApplicationValidator.updateUserGroup().validate(
1052
1214
  {
1053
1215
  groupId,
1054
1216
  body,
@@ -1058,9 +1220,8 @@ class User {
1058
1220
  if (warrning) {
1059
1221
  Logger({
1060
1222
  level: "WARN",
1061
- message: "Parameter Validation warrnings for updateUserGroup",
1223
+ message: `Parameter Validation warrnings for platform > User > updateUserGroup \n ${warrning}`,
1062
1224
  });
1063
- Logger({ level: "WARN", message: warrning });
1064
1225
  }
1065
1226
 
1066
1227
  const query_params = {};
@@ -1070,12 +1231,19 @@ class User {
1070
1231
  "put",
1071
1232
  `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/user_group/${groupId}`,
1072
1233
  query_params,
1073
- body
1234
+ body,
1235
+ undefined,
1236
+ { headers }
1074
1237
  );
1075
1238
 
1239
+ let responseData = response;
1240
+ if (headers) {
1241
+ responseData = response[0];
1242
+ }
1243
+
1076
1244
  const {
1077
1245
  error: res_error,
1078
- } = UserModel.UserGroupResponseSchema().validate(response, {
1246
+ } = UserPlatformModel.UserGroupResponseSchema().validate(responseData, {
1079
1247
  abortEarly: false,
1080
1248
  allowUnknown: false,
1081
1249
  });
@@ -1083,9 +1251,8 @@ class User {
1083
1251
  if (res_error) {
1084
1252
  Logger({
1085
1253
  level: "WARN",
1086
- message: "Response Validation Warnnings for updateUserGroup",
1254
+ message: `Response Validation Warnnings for platform > User > updateUserGroup \n ${res_error}`,
1087
1255
  });
1088
- Logger({ level: "WARN", message: res_error });
1089
1256
  }
1090
1257
 
1091
1258
  return response;