@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 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,19 @@ 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 {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
18
+ * @param {import("../PlatformAPIClient").Options} - Options
19
+ * @returns {Promise<UserPlatformModel.ArchiveUserSuccess>} - Success response
20
+ * @name archiveUser
19
21
  * @summary: archive user
20
- * @description: archive user
22
+ * @description: archive user - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/archiveUser/).
21
23
  */
22
- async archiveUser({ body } = {}) {
23
- const { error } = UserValidator.archiveUser().validate(
24
+ async archiveUser(
25
+ { body, requestHeaders } = { requestHeaders: {} },
26
+ { responseHeaders } = { responseHeaders: false }
27
+ ) {
28
+ const { error } = UserPlatformApplicationValidator.archiveUser().validate(
24
29
  {
25
30
  body,
26
31
  },
@@ -31,7 +36,9 @@ class User {
31
36
  }
32
37
 
33
38
  // Showing warrnings if extra unknown parameters are found
34
- const { error: warrning } = UserValidator.archiveUser().validate(
39
+ const {
40
+ error: warrning,
41
+ } = UserPlatformApplicationValidator.archiveUser().validate(
35
42
  {
36
43
  body,
37
44
  },
@@ -40,9 +47,8 @@ class User {
40
47
  if (warrning) {
41
48
  Logger({
42
49
  level: "WARN",
43
- message: "Parameter Validation warrnings for archiveUser",
50
+ message: `Parameter Validation warrnings for platform > User > archiveUser \n ${warrning}`,
44
51
  });
45
- Logger({ level: "WARN", message: warrning });
46
52
  }
47
53
 
48
54
  const query_params = {};
@@ -52,12 +58,19 @@ class User {
52
58
  "put",
53
59
  `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/customers/archive`,
54
60
  query_params,
55
- body
61
+ body,
62
+ requestHeaders,
63
+ { responseHeaders }
56
64
  );
57
65
 
66
+ let responseData = response;
67
+ if (responseHeaders) {
68
+ responseData = response[0];
69
+ }
70
+
58
71
  const {
59
72
  error: res_error,
60
- } = UserModel.ArchiveUserSuccess().validate(response, {
73
+ } = UserPlatformModel.ArchiveUserSuccess().validate(responseData, {
61
74
  abortEarly: false,
62
75
  allowUnknown: false,
63
76
  });
@@ -65,23 +78,29 @@ class User {
65
78
  if (res_error) {
66
79
  Logger({
67
80
  level: "WARN",
68
- message: "Response Validation Warnnings for archiveUser",
81
+ message: `Response Validation Warnnings for platform > User > archiveUser \n ${res_error}`,
69
82
  });
70
- Logger({ level: "WARN", message: res_error });
71
83
  }
72
84
 
73
85
  return response;
74
86
  }
75
87
 
76
88
  /**
77
- * @param {Object} arg - Arg object.
78
- * @param {BlockUserRequestSchema} arg.body
79
- * @returns {Promise<BlockUserSuccess>} - Success response
89
+ * @param {UserPlatformApplicationValidator.BlockOrUnblockUsersParam} arg - Arg object
90
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
91
+ * @param {import("../PlatformAPIClient").Options} - Options
92
+ * @returns {Promise<UserPlatformModel.BlockUserSuccess>} - Success response
93
+ * @name blockOrUnblockUsers
80
94
  * @summary: Block/Unblock user
81
- * @description: Block/Unblock user
95
+ * @description: Block/Unblock user - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/blockOrUnblockUsers/).
82
96
  */
83
- async blockOrUnblockUsers({ body } = {}) {
84
- const { error } = UserValidator.blockOrUnblockUsers().validate(
97
+ async blockOrUnblockUsers(
98
+ { body, requestHeaders } = { requestHeaders: {} },
99
+ { responseHeaders } = { responseHeaders: false }
100
+ ) {
101
+ const {
102
+ error,
103
+ } = UserPlatformApplicationValidator.blockOrUnblockUsers().validate(
85
104
  {
86
105
  body,
87
106
  },
@@ -92,7 +111,9 @@ class User {
92
111
  }
93
112
 
94
113
  // Showing warrnings if extra unknown parameters are found
95
- const { error: warrning } = UserValidator.blockOrUnblockUsers().validate(
114
+ const {
115
+ error: warrning,
116
+ } = UserPlatformApplicationValidator.blockOrUnblockUsers().validate(
96
117
  {
97
118
  body,
98
119
  },
@@ -101,9 +122,8 @@ class User {
101
122
  if (warrning) {
102
123
  Logger({
103
124
  level: "WARN",
104
- message: "Parameter Validation warrnings for blockOrUnblockUsers",
125
+ message: `Parameter Validation warrnings for platform > User > blockOrUnblockUsers \n ${warrning}`,
105
126
  });
106
- Logger({ level: "WARN", message: warrning });
107
127
  }
108
128
 
109
129
  const query_params = {};
@@ -113,34 +133,47 @@ class User {
113
133
  "put",
114
134
  `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/customers/activation`,
115
135
  query_params,
116
- body
136
+ body,
137
+ requestHeaders,
138
+ { responseHeaders }
117
139
  );
118
140
 
119
- const { error: res_error } = UserModel.BlockUserSuccess().validate(
120
- response,
121
- { abortEarly: false, allowUnknown: false }
122
- );
141
+ let responseData = response;
142
+ if (responseHeaders) {
143
+ responseData = response[0];
144
+ }
145
+
146
+ const {
147
+ error: res_error,
148
+ } = UserPlatformModel.BlockUserSuccess().validate(responseData, {
149
+ abortEarly: false,
150
+ allowUnknown: false,
151
+ });
123
152
 
124
153
  if (res_error) {
125
154
  Logger({
126
155
  level: "WARN",
127
- message: "Response Validation Warnnings for blockOrUnblockUsers",
156
+ message: `Response Validation Warnnings for platform > User > blockOrUnblockUsers \n ${res_error}`,
128
157
  });
129
- Logger({ level: "WARN", message: res_error });
130
158
  }
131
159
 
132
160
  return response;
133
161
  }
134
162
 
135
163
  /**
136
- * @param {Object} arg - Arg object.
137
- * @param {CreateUserRequestSchema} arg.body
138
- * @returns {Promise<CreateUserResponseSchema>} - Success response
164
+ * @param {UserPlatformApplicationValidator.CreateUserParam} arg - Arg object
165
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
166
+ * @param {import("../PlatformAPIClient").Options} - Options
167
+ * @returns {Promise<UserPlatformModel.CreateUserResponseSchema>} - Success response
168
+ * @name createUser
139
169
  * @summary: Create user
140
- * @description: Create user
170
+ * @description: Create user - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/createUser/).
141
171
  */
142
- async createUser({ body } = {}) {
143
- const { error } = UserValidator.createUser().validate(
172
+ async createUser(
173
+ { body, requestHeaders } = { requestHeaders: {} },
174
+ { responseHeaders } = { responseHeaders: false }
175
+ ) {
176
+ const { error } = UserPlatformApplicationValidator.createUser().validate(
144
177
  {
145
178
  body,
146
179
  },
@@ -151,7 +184,9 @@ class User {
151
184
  }
152
185
 
153
186
  // Showing warrnings if extra unknown parameters are found
154
- const { error: warrning } = UserValidator.createUser().validate(
187
+ const {
188
+ error: warrning,
189
+ } = UserPlatformApplicationValidator.createUser().validate(
155
190
  {
156
191
  body,
157
192
  },
@@ -160,9 +195,8 @@ class User {
160
195
  if (warrning) {
161
196
  Logger({
162
197
  level: "WARN",
163
- message: "Parameter Validation warrnings for createUser",
198
+ message: `Parameter Validation warrnings for platform > User > createUser \n ${warrning}`,
164
199
  });
165
- Logger({ level: "WARN", message: warrning });
166
200
  }
167
201
 
168
202
  const query_params = {};
@@ -172,12 +206,19 @@ class User {
172
206
  "post",
173
207
  `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/customers`,
174
208
  query_params,
175
- body
209
+ body,
210
+ requestHeaders,
211
+ { responseHeaders }
176
212
  );
177
213
 
214
+ let responseData = response;
215
+ if (responseHeaders) {
216
+ responseData = response[0];
217
+ }
218
+
178
219
  const {
179
220
  error: res_error,
180
- } = UserModel.CreateUserResponseSchema().validate(response, {
221
+ } = UserPlatformModel.CreateUserResponseSchema().validate(responseData, {
181
222
  abortEarly: false,
182
223
  allowUnknown: false,
183
224
  });
@@ -185,23 +226,29 @@ class User {
185
226
  if (res_error) {
186
227
  Logger({
187
228
  level: "WARN",
188
- message: "Response Validation Warnnings for createUser",
229
+ message: `Response Validation Warnnings for platform > User > createUser \n ${res_error}`,
189
230
  });
190
- Logger({ level: "WARN", message: res_error });
191
231
  }
192
232
 
193
233
  return response;
194
234
  }
195
235
 
196
236
  /**
197
- * @param {Object} arg - Arg object.
198
- * @param {CreateUserGroupSchema} arg.body
199
- * @returns {Promise<UserGroupResponseSchema>} - Success response
237
+ * @param {UserPlatformApplicationValidator.CreateUserGroupParam} arg - Arg object
238
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
239
+ * @param {import("../PlatformAPIClient").Options} - Options
240
+ * @returns {Promise<UserPlatformModel.UserGroupResponseSchema>} - Success response
241
+ * @name createUserGroup
200
242
  * @summary: Create an User Group
201
- * @description: Use this API to create new user Group
243
+ * @description: Use this API to create new user Group - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/createUserGroup/).
202
244
  */
203
- async createUserGroup({ body } = {}) {
204
- const { error } = UserValidator.createUserGroup().validate(
245
+ async createUserGroup(
246
+ { body, requestHeaders } = { requestHeaders: {} },
247
+ { responseHeaders } = { responseHeaders: false }
248
+ ) {
249
+ const {
250
+ error,
251
+ } = UserPlatformApplicationValidator.createUserGroup().validate(
205
252
  {
206
253
  body,
207
254
  },
@@ -212,7 +259,9 @@ class User {
212
259
  }
213
260
 
214
261
  // Showing warrnings if extra unknown parameters are found
215
- const { error: warrning } = UserValidator.createUserGroup().validate(
262
+ const {
263
+ error: warrning,
264
+ } = UserPlatformApplicationValidator.createUserGroup().validate(
216
265
  {
217
266
  body,
218
267
  },
@@ -221,9 +270,8 @@ class User {
221
270
  if (warrning) {
222
271
  Logger({
223
272
  level: "WARN",
224
- message: "Parameter Validation warrnings for createUserGroup",
273
+ message: `Parameter Validation warrnings for platform > User > createUserGroup \n ${warrning}`,
225
274
  });
226
- Logger({ level: "WARN", message: warrning });
227
275
  }
228
276
 
229
277
  const query_params = {};
@@ -233,12 +281,19 @@ class User {
233
281
  "post",
234
282
  `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/user_group`,
235
283
  query_params,
236
- body
284
+ body,
285
+ requestHeaders,
286
+ { responseHeaders }
237
287
  );
238
288
 
289
+ let responseData = response;
290
+ if (responseHeaders) {
291
+ responseData = response[0];
292
+ }
293
+
239
294
  const {
240
295
  error: res_error,
241
- } = UserModel.UserGroupResponseSchema().validate(response, {
296
+ } = UserPlatformModel.UserGroupResponseSchema().validate(responseData, {
242
297
  abortEarly: false,
243
298
  allowUnknown: false,
244
299
  });
@@ -246,23 +301,30 @@ class User {
246
301
  if (res_error) {
247
302
  Logger({
248
303
  level: "WARN",
249
- message: "Response Validation Warnnings for createUserGroup",
304
+ message: `Response Validation Warnnings for platform > User > createUserGroup \n ${res_error}`,
250
305
  });
251
- Logger({ level: "WARN", message: res_error });
252
306
  }
253
307
 
254
308
  return response;
255
309
  }
256
310
 
257
311
  /**
258
- * @param {Object} arg - Arg object.
259
- * @param {CreateUserSessionRequestSchema} arg.body
260
- * @returns {Promise<CreateUserSessionResponseSchema>} - Success response
312
+ * @param {UserPlatformApplicationValidator.CreateUserSessionParam} arg - Arg object
313
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
314
+ * @param {import("../PlatformAPIClient").Options} - Options
315
+ * @returns {Promise<UserPlatformModel.CreateUserSessionResponseSchema>} -
316
+ * Success response
317
+ * @name createUserSession
261
318
  * @summary: Create user session
262
- * @description: Create user session
319
+ * @description: Create user session - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/createUserSession/).
263
320
  */
264
- async createUserSession({ body } = {}) {
265
- const { error } = UserValidator.createUserSession().validate(
321
+ async createUserSession(
322
+ { body, requestHeaders } = { requestHeaders: {} },
323
+ { responseHeaders } = { responseHeaders: false }
324
+ ) {
325
+ const {
326
+ error,
327
+ } = UserPlatformApplicationValidator.createUserSession().validate(
266
328
  {
267
329
  body,
268
330
  },
@@ -273,7 +335,9 @@ class User {
273
335
  }
274
336
 
275
337
  // Showing warrnings if extra unknown parameters are found
276
- const { error: warrning } = UserValidator.createUserSession().validate(
338
+ const {
339
+ error: warrning,
340
+ } = UserPlatformApplicationValidator.createUserSession().validate(
277
341
  {
278
342
  body,
279
343
  },
@@ -282,9 +346,8 @@ class User {
282
346
  if (warrning) {
283
347
  Logger({
284
348
  level: "WARN",
285
- message: "Parameter Validation warrnings for createUserSession",
349
+ message: `Parameter Validation warrnings for platform > User > createUserSession \n ${warrning}`,
286
350
  });
287
- Logger({ level: "WARN", message: warrning });
288
351
  }
289
352
 
290
353
  const query_params = {};
@@ -294,37 +357,52 @@ class User {
294
357
  "post",
295
358
  `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/customers/session`,
296
359
  query_params,
297
- body
360
+ body,
361
+ requestHeaders,
362
+ { responseHeaders }
298
363
  );
299
364
 
365
+ let responseData = response;
366
+ if (responseHeaders) {
367
+ responseData = response[0];
368
+ }
369
+
300
370
  const {
301
371
  error: res_error,
302
- } = UserModel.CreateUserSessionResponseSchema().validate(response, {
303
- abortEarly: false,
304
- allowUnknown: false,
305
- });
372
+ } = UserPlatformModel.CreateUserSessionResponseSchema().validate(
373
+ responseData,
374
+ { abortEarly: false, allowUnknown: false }
375
+ );
306
376
 
307
377
  if (res_error) {
308
378
  Logger({
309
379
  level: "WARN",
310
- message: "Response Validation Warnnings for createUserSession",
380
+ message: `Response Validation Warnnings for platform > User > createUserSession \n ${res_error}`,
311
381
  });
312
- Logger({ level: "WARN", message: res_error });
313
382
  }
314
383
 
315
384
  return response;
316
385
  }
317
386
 
318
387
  /**
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
388
+ * @param {UserPlatformApplicationValidator.DeleteActiveSessionsParam} arg
389
+ * - Arg object
390
+ *
391
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
392
+ * @param {import("../PlatformAPIClient").Options} - Options
393
+ * @returns {Promise<UserPlatformModel.SessionDeleteResponseSchema>} -
394
+ * Success response
395
+ * @name deleteActiveSessions
323
396
  * @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.
397
+ * @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
398
  */
326
- async deleteActiveSessions({ id, reason } = {}) {
327
- const { error } = UserValidator.deleteActiveSessions().validate(
399
+ async deleteActiveSessions(
400
+ { id, reason, requestHeaders } = { requestHeaders: {} },
401
+ { responseHeaders } = { responseHeaders: false }
402
+ ) {
403
+ const {
404
+ error,
405
+ } = UserPlatformApplicationValidator.deleteActiveSessions().validate(
328
406
  {
329
407
  id,
330
408
  reason,
@@ -336,7 +414,9 @@ class User {
336
414
  }
337
415
 
338
416
  // Showing warrnings if extra unknown parameters are found
339
- const { error: warrning } = UserValidator.deleteActiveSessions().validate(
417
+ const {
418
+ error: warrning,
419
+ } = UserPlatformApplicationValidator.deleteActiveSessions().validate(
340
420
  {
341
421
  id,
342
422
  reason,
@@ -346,9 +426,8 @@ class User {
346
426
  if (warrning) {
347
427
  Logger({
348
428
  level: "WARN",
349
- message: "Parameter Validation warrnings for deleteActiveSessions",
429
+ message: `Parameter Validation warrnings for platform > User > deleteActiveSessions \n ${warrning}`,
350
430
  });
351
- Logger({ level: "WARN", message: warrning });
352
431
  }
353
432
 
354
433
  const query_params = {};
@@ -360,12 +439,19 @@ class User {
360
439
  "delete",
361
440
  `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/customers/sessions`,
362
441
  query_params,
363
- undefined
442
+ undefined,
443
+ requestHeaders,
444
+ { responseHeaders }
364
445
  );
365
446
 
447
+ let responseData = response;
448
+ if (responseHeaders) {
449
+ responseData = response[0];
450
+ }
451
+
366
452
  const {
367
453
  error: res_error,
368
- } = UserModel.SessionDeleteResponseSchema().validate(response, {
454
+ } = UserPlatformModel.SessionDeleteResponseSchema().validate(responseData, {
369
455
  abortEarly: false,
370
456
  allowUnknown: false,
371
457
  });
@@ -373,25 +459,28 @@ class User {
373
459
  if (res_error) {
374
460
  Logger({
375
461
  level: "WARN",
376
- message: "Response Validation Warnnings for deleteActiveSessions",
462
+ message: `Response Validation Warnnings for platform > User > deleteActiveSessions \n ${res_error}`,
377
463
  });
378
- Logger({ level: "WARN", message: res_error });
379
464
  }
380
465
 
381
466
  return response;
382
467
  }
383
468
 
384
469
  /**
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
470
+ * @param {UserPlatformApplicationValidator.DeleteSessionParam} arg - Arg object
471
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
472
+ * @param {import("../PlatformAPIClient").Options} - Options
473
+ * @returns {Promise<UserPlatformModel.SessionDeleteResponseSchema>} -
474
+ * Success response
475
+ * @name deleteSession
390
476
  * @summary: Delete a session for a user
391
- * @description: Use this API to Delete a session of customers who have registered in the application.
477
+ * @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
478
  */
393
- async deleteSession({ id, sessionId, reason } = {}) {
394
- const { error } = UserValidator.deleteSession().validate(
479
+ async deleteSession(
480
+ { id, sessionId, reason, requestHeaders } = { requestHeaders: {} },
481
+ { responseHeaders } = { responseHeaders: false }
482
+ ) {
483
+ const { error } = UserPlatformApplicationValidator.deleteSession().validate(
395
484
  {
396
485
  id,
397
486
  sessionId,
@@ -404,7 +493,9 @@ class User {
404
493
  }
405
494
 
406
495
  // Showing warrnings if extra unknown parameters are found
407
- const { error: warrning } = UserValidator.deleteSession().validate(
496
+ const {
497
+ error: warrning,
498
+ } = UserPlatformApplicationValidator.deleteSession().validate(
408
499
  {
409
500
  id,
410
501
  sessionId,
@@ -415,9 +506,8 @@ class User {
415
506
  if (warrning) {
416
507
  Logger({
417
508
  level: "WARN",
418
- message: "Parameter Validation warrnings for deleteSession",
509
+ message: `Parameter Validation warrnings for platform > User > deleteSession \n ${warrning}`,
419
510
  });
420
- Logger({ level: "WARN", message: warrning });
421
511
  }
422
512
 
423
513
  const query_params = {};
@@ -430,12 +520,19 @@ class User {
430
520
  "delete",
431
521
  `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/customers/session`,
432
522
  query_params,
433
- undefined
523
+ undefined,
524
+ requestHeaders,
525
+ { responseHeaders }
434
526
  );
435
527
 
528
+ let responseData = response;
529
+ if (responseHeaders) {
530
+ responseData = response[0];
531
+ }
532
+
436
533
  const {
437
534
  error: res_error,
438
- } = UserModel.SessionDeleteResponseSchema().validate(response, {
535
+ } = UserPlatformModel.SessionDeleteResponseSchema().validate(responseData, {
439
536
  abortEarly: false,
440
537
  allowUnknown: false,
441
538
  });
@@ -443,23 +540,29 @@ class User {
443
540
  if (res_error) {
444
541
  Logger({
445
542
  level: "WARN",
446
- message: "Response Validation Warnnings for deleteSession",
543
+ message: `Response Validation Warnnings for platform > User > deleteSession \n ${res_error}`,
447
544
  });
448
- Logger({ level: "WARN", message: res_error });
449
545
  }
450
546
 
451
547
  return response;
452
548
  }
453
549
 
454
550
  /**
455
- * @param {Object} arg - Arg object.
456
- * @param {string} arg.id - ID of a customer.
457
- * @returns {Promise<SessionListResponseSchema>} - Success response
551
+ * @param {UserPlatformApplicationValidator.GetActiveSessionsParam} arg - Arg object
552
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
553
+ * @param {import("../PlatformAPIClient").Options} - Options
554
+ * @returns {Promise<UserPlatformModel.SessionListResponseSchema>} - Success response
555
+ * @name getActiveSessions
458
556
  * @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.
557
+ * @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
558
  */
461
- async getActiveSessions({ id } = {}) {
462
- const { error } = UserValidator.getActiveSessions().validate(
559
+ async getActiveSessions(
560
+ { id, requestHeaders } = { requestHeaders: {} },
561
+ { responseHeaders } = { responseHeaders: false }
562
+ ) {
563
+ const {
564
+ error,
565
+ } = UserPlatformApplicationValidator.getActiveSessions().validate(
463
566
  {
464
567
  id,
465
568
  },
@@ -470,7 +573,9 @@ class User {
470
573
  }
471
574
 
472
575
  // Showing warrnings if extra unknown parameters are found
473
- const { error: warrning } = UserValidator.getActiveSessions().validate(
576
+ const {
577
+ error: warrning,
578
+ } = UserPlatformApplicationValidator.getActiveSessions().validate(
474
579
  {
475
580
  id,
476
581
  },
@@ -479,9 +584,8 @@ class User {
479
584
  if (warrning) {
480
585
  Logger({
481
586
  level: "WARN",
482
- message: "Parameter Validation warrnings for getActiveSessions",
587
+ message: `Parameter Validation warrnings for platform > User > getActiveSessions \n ${warrning}`,
483
588
  });
484
- Logger({ level: "WARN", message: warrning });
485
589
  }
486
590
 
487
591
  const query_params = {};
@@ -492,12 +596,19 @@ class User {
492
596
  "get",
493
597
  `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/customers/sessions`,
494
598
  query_params,
495
- undefined
599
+ undefined,
600
+ requestHeaders,
601
+ { responseHeaders }
496
602
  );
497
603
 
604
+ let responseData = response;
605
+ if (responseHeaders) {
606
+ responseData = response[0];
607
+ }
608
+
498
609
  const {
499
610
  error: res_error,
500
- } = UserModel.SessionListResponseSchema().validate(response, {
611
+ } = UserPlatformModel.SessionListResponseSchema().validate(responseData, {
501
612
  abortEarly: false,
502
613
  allowUnknown: false,
503
614
  });
@@ -505,28 +616,27 @@ class User {
505
616
  if (res_error) {
506
617
  Logger({
507
618
  level: "WARN",
508
- message: "Response Validation Warnnings for getActiveSessions",
619
+ message: `Response Validation Warnnings for platform > User > getActiveSessions \n ${res_error}`,
509
620
  });
510
- Logger({ level: "WARN", message: res_error });
511
621
  }
512
622
 
513
623
  return response;
514
624
  }
515
625
 
516
626
  /**
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
627
+ * @param {UserPlatformApplicationValidator.GetCustomersParam} arg - Arg object
628
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
629
+ * @param {import("../PlatformAPIClient").Options} - Options
630
+ * @returns {Promise<UserPlatformModel.CustomerListResponseSchema>} - Success response
631
+ * @name getCustomers
525
632
  * @summary: Get a list of customers
526
- * @description: Use this API to retrieve a list of customers who have registered in the application.
633
+ * @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
634
  */
528
- async getCustomers({ q, pageSize, pageNo } = {}) {
529
- const { error } = UserValidator.getCustomers().validate(
635
+ async getCustomers(
636
+ { q, pageSize, pageNo, requestHeaders } = { requestHeaders: {} },
637
+ { responseHeaders } = { responseHeaders: false }
638
+ ) {
639
+ const { error } = UserPlatformApplicationValidator.getCustomers().validate(
530
640
  {
531
641
  q,
532
642
  pageSize,
@@ -539,7 +649,9 @@ class User {
539
649
  }
540
650
 
541
651
  // Showing warrnings if extra unknown parameters are found
542
- const { error: warrning } = UserValidator.getCustomers().validate(
652
+ const {
653
+ error: warrning,
654
+ } = UserPlatformApplicationValidator.getCustomers().validate(
543
655
  {
544
656
  q,
545
657
  pageSize,
@@ -550,9 +662,8 @@ class User {
550
662
  if (warrning) {
551
663
  Logger({
552
664
  level: "WARN",
553
- message: "Parameter Validation warrnings for getCustomers",
665
+ message: `Parameter Validation warrnings for platform > User > getCustomers \n ${warrning}`,
554
666
  });
555
- Logger({ level: "WARN", message: warrning });
556
667
  }
557
668
 
558
669
  const query_params = {};
@@ -565,12 +676,19 @@ class User {
565
676
  "get",
566
677
  `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/customers/list`,
567
678
  query_params,
568
- undefined
679
+ undefined,
680
+ requestHeaders,
681
+ { responseHeaders }
569
682
  );
570
683
 
684
+ let responseData = response;
685
+ if (responseHeaders) {
686
+ responseData = response[0];
687
+ }
688
+
571
689
  const {
572
690
  error: res_error,
573
- } = UserModel.CustomerListResponseSchema().validate(response, {
691
+ } = UserPlatformModel.CustomerListResponseSchema().validate(responseData, {
574
692
  abortEarly: false,
575
693
  allowUnknown: false,
576
694
  });
@@ -578,22 +696,29 @@ class User {
578
696
  if (res_error) {
579
697
  Logger({
580
698
  level: "WARN",
581
- message: "Response Validation Warnnings for getCustomers",
699
+ message: `Response Validation Warnnings for platform > User > getCustomers \n ${res_error}`,
582
700
  });
583
- Logger({ level: "WARN", message: res_error });
584
701
  }
585
702
 
586
703
  return response;
587
704
  }
588
705
 
589
706
  /**
590
- * @param {Object} arg - Arg object.
591
- * @returns {Promise<PlatformSchema>} - Success response
707
+ * @param {UserPlatformApplicationValidator.GetPlatformConfigParam} arg - Arg object
708
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
709
+ * @param {import("../PlatformAPIClient").Options} - Options
710
+ * @returns {Promise<UserPlatformModel.PlatformSchema>} - Success response
711
+ * @name getPlatformConfig
592
712
  * @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.
713
+ * @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
714
  */
595
- async getPlatformConfig({} = {}) {
596
- const { error } = UserValidator.getPlatformConfig().validate(
715
+ async getPlatformConfig(
716
+ { requestHeaders } = { requestHeaders: {} },
717
+ { responseHeaders } = { responseHeaders: false }
718
+ ) {
719
+ const {
720
+ error,
721
+ } = UserPlatformApplicationValidator.getPlatformConfig().validate(
597
722
  {},
598
723
  { abortEarly: false, allowUnknown: true }
599
724
  );
@@ -602,16 +727,17 @@ class User {
602
727
  }
603
728
 
604
729
  // Showing warrnings if extra unknown parameters are found
605
- const { error: warrning } = UserValidator.getPlatformConfig().validate(
730
+ const {
731
+ error: warrning,
732
+ } = UserPlatformApplicationValidator.getPlatformConfig().validate(
606
733
  {},
607
734
  { abortEarly: false, allowUnknown: false }
608
735
  );
609
736
  if (warrning) {
610
737
  Logger({
611
738
  level: "WARN",
612
- message: "Parameter Validation warrnings for getPlatformConfig",
739
+ message: `Parameter Validation warrnings for platform > User > getPlatformConfig \n ${warrning}`,
613
740
  });
614
- Logger({ level: "WARN", message: warrning });
615
741
  }
616
742
 
617
743
  const query_params = {};
@@ -621,10 +747,19 @@ class User {
621
747
  "get",
622
748
  `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/platform/config`,
623
749
  query_params,
624
- undefined
750
+ undefined,
751
+ requestHeaders,
752
+ { responseHeaders }
625
753
  );
626
754
 
627
- const { error: res_error } = UserModel.PlatformSchema().validate(response, {
755
+ let responseData = response;
756
+ if (responseHeaders) {
757
+ responseData = response[0];
758
+ }
759
+
760
+ const {
761
+ error: res_error,
762
+ } = UserPlatformModel.PlatformSchema().validate(responseData, {
628
763
  abortEarly: false,
629
764
  allowUnknown: false,
630
765
  });
@@ -632,23 +767,29 @@ class User {
632
767
  if (res_error) {
633
768
  Logger({
634
769
  level: "WARN",
635
- message: "Response Validation Warnnings for getPlatformConfig",
770
+ message: `Response Validation Warnnings for platform > User > getPlatformConfig \n ${res_error}`,
636
771
  });
637
- Logger({ level: "WARN", message: res_error });
638
772
  }
639
773
 
640
774
  return response;
641
775
  }
642
776
 
643
777
  /**
644
- * @param {Object} arg - Arg object.
645
- * @param {string} arg.groupId - Numeric ID allotted to a User Group
646
- * @returns {Promise<UserGroupResponseSchema>} - Success response
778
+ * @param {UserPlatformApplicationValidator.GetUserGroupByIdParam} arg - Arg object
779
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
780
+ * @param {import("../PlatformAPIClient").Options} - Options
781
+ * @returns {Promise<UserPlatformModel.UserGroupResponseSchema>} - Success response
782
+ * @name getUserGroupById
647
783
  * @summary: Get an User Group by Id
648
- * @description: Use this API to get details of an existing user Group
784
+ * @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
785
  */
650
- async getUserGroupById({ groupId } = {}) {
651
- const { error } = UserValidator.getUserGroupById().validate(
786
+ async getUserGroupById(
787
+ { groupId, requestHeaders } = { requestHeaders: {} },
788
+ { responseHeaders } = { responseHeaders: false }
789
+ ) {
790
+ const {
791
+ error,
792
+ } = UserPlatformApplicationValidator.getUserGroupById().validate(
652
793
  {
653
794
  groupId,
654
795
  },
@@ -659,7 +800,9 @@ class User {
659
800
  }
660
801
 
661
802
  // Showing warrnings if extra unknown parameters are found
662
- const { error: warrning } = UserValidator.getUserGroupById().validate(
803
+ const {
804
+ error: warrning,
805
+ } = UserPlatformApplicationValidator.getUserGroupById().validate(
663
806
  {
664
807
  groupId,
665
808
  },
@@ -668,9 +811,8 @@ class User {
668
811
  if (warrning) {
669
812
  Logger({
670
813
  level: "WARN",
671
- message: "Parameter Validation warrnings for getUserGroupById",
814
+ message: `Parameter Validation warrnings for platform > User > getUserGroupById \n ${warrning}`,
672
815
  });
673
- Logger({ level: "WARN", message: warrning });
674
816
  }
675
817
 
676
818
  const query_params = {};
@@ -680,12 +822,19 @@ class User {
680
822
  "get",
681
823
  `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/user_group/${groupId}`,
682
824
  query_params,
683
- undefined
825
+ undefined,
826
+ requestHeaders,
827
+ { responseHeaders }
684
828
  );
685
829
 
830
+ let responseData = response;
831
+ if (responseHeaders) {
832
+ responseData = response[0];
833
+ }
834
+
686
835
  const {
687
836
  error: res_error,
688
- } = UserModel.UserGroupResponseSchema().validate(response, {
837
+ } = UserPlatformModel.UserGroupResponseSchema().validate(responseData, {
689
838
  abortEarly: false,
690
839
  allowUnknown: false,
691
840
  });
@@ -693,28 +842,30 @@ class User {
693
842
  if (res_error) {
694
843
  Logger({
695
844
  level: "WARN",
696
- message: "Response Validation Warnnings for getUserGroupById",
845
+ message: `Response Validation Warnnings for platform > User > getUserGroupById \n ${res_error}`,
697
846
  });
698
- Logger({ level: "WARN", message: res_error });
699
847
  }
700
848
 
701
849
  return response;
702
850
  }
703
851
 
704
852
  /**
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
853
+ * @param {UserPlatformApplicationValidator.GetUserGroupsParam} arg - Arg object
854
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
855
+ * @param {import("../PlatformAPIClient").Options} - Options
856
+ * @returns {Promise<UserPlatformModel.UserGroupListResponseSchema>} -
857
+ * Success response
858
+ * @name getUserGroups
713
859
  * @summary: Get User Groups mathcing criteria
714
- * @description: Use this API to get User Groups mathing criteria passed in query
860
+ * @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
861
  */
716
- async getUserGroups({ pageNo, pageSize, name, status, groupUid } = {}) {
717
- const { error } = UserValidator.getUserGroups().validate(
862
+ async getUserGroups(
863
+ { pageNo, pageSize, name, status, groupUid, requestHeaders } = {
864
+ requestHeaders: {},
865
+ },
866
+ { responseHeaders } = { responseHeaders: false }
867
+ ) {
868
+ const { error } = UserPlatformApplicationValidator.getUserGroups().validate(
718
869
  {
719
870
  pageNo,
720
871
  pageSize,
@@ -729,7 +880,9 @@ class User {
729
880
  }
730
881
 
731
882
  // Showing warrnings if extra unknown parameters are found
732
- const { error: warrning } = UserValidator.getUserGroups().validate(
883
+ const {
884
+ error: warrning,
885
+ } = UserPlatformApplicationValidator.getUserGroups().validate(
733
886
  {
734
887
  pageNo,
735
888
  pageSize,
@@ -742,9 +895,8 @@ class User {
742
895
  if (warrning) {
743
896
  Logger({
744
897
  level: "WARN",
745
- message: "Parameter Validation warrnings for getUserGroups",
898
+ message: `Parameter Validation warrnings for platform > User > getUserGroups \n ${warrning}`,
746
899
  });
747
- Logger({ level: "WARN", message: warrning });
748
900
  }
749
901
 
750
902
  const query_params = {};
@@ -759,12 +911,19 @@ class User {
759
911
  "get",
760
912
  `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/user_group`,
761
913
  query_params,
762
- undefined
914
+ undefined,
915
+ requestHeaders,
916
+ { responseHeaders }
763
917
  );
764
918
 
919
+ let responseData = response;
920
+ if (responseHeaders) {
921
+ responseData = response[0];
922
+ }
923
+
765
924
  const {
766
925
  error: res_error,
767
- } = UserModel.UserGroupListResponseSchema().validate(response, {
926
+ } = UserPlatformModel.UserGroupListResponseSchema().validate(responseData, {
768
927
  abortEarly: false,
769
928
  allowUnknown: false,
770
929
  });
@@ -772,26 +931,30 @@ class User {
772
931
  if (res_error) {
773
932
  Logger({
774
933
  level: "WARN",
775
- message: "Response Validation Warnnings for getUserGroups",
934
+ message: `Response Validation Warnnings for platform > User > getUserGroups \n ${res_error}`,
776
935
  });
777
- Logger({ level: "WARN", message: res_error });
778
936
  }
779
937
 
780
938
  return response;
781
939
  }
782
940
 
783
941
  /**
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
942
+ * @param {UserPlatformApplicationValidator.SearchUsersParam} arg - Arg object
943
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
944
+ * @param {import("../PlatformAPIClient").Options} - Options
945
+ * @returns {Promise<UserPlatformModel.UserSearchResponseSchema>} - Success response
946
+ * @name searchUsers
788
947
  * @summary: Search an existing user.
789
- * @description: Use this API to retrieve an existing user from a list.
948
+ * @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
949
  */
791
- async searchUsers({ q } = {}) {
792
- const { error } = UserValidator.searchUsers().validate(
950
+ async searchUsers(
951
+ { q, query, requestHeaders } = { requestHeaders: {} },
952
+ { responseHeaders } = { responseHeaders: false }
953
+ ) {
954
+ const { error } = UserPlatformApplicationValidator.searchUsers().validate(
793
955
  {
794
956
  q,
957
+ query,
795
958
  },
796
959
  { abortEarly: false, allowUnknown: true }
797
960
  );
@@ -800,34 +963,44 @@ class User {
800
963
  }
801
964
 
802
965
  // Showing warrnings if extra unknown parameters are found
803
- const { error: warrning } = UserValidator.searchUsers().validate(
966
+ const {
967
+ error: warrning,
968
+ } = UserPlatformApplicationValidator.searchUsers().validate(
804
969
  {
805
970
  q,
971
+ query,
806
972
  },
807
973
  { abortEarly: false, allowUnknown: false }
808
974
  );
809
975
  if (warrning) {
810
976
  Logger({
811
977
  level: "WARN",
812
- message: "Parameter Validation warrnings for searchUsers",
978
+ message: `Parameter Validation warrnings for platform > User > searchUsers \n ${warrning}`,
813
979
  });
814
- Logger({ level: "WARN", message: warrning });
815
980
  }
816
981
 
817
982
  const query_params = {};
818
983
  query_params["q"] = q;
984
+ query_params["query"] = query;
819
985
 
820
986
  const response = await PlatformAPIClient.execute(
821
987
  this.config,
822
988
  "get",
823
989
  `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/customers/search`,
824
990
  query_params,
825
- undefined
991
+ undefined,
992
+ requestHeaders,
993
+ { responseHeaders }
826
994
  );
827
995
 
996
+ let responseData = response;
997
+ if (responseHeaders) {
998
+ responseData = response[0];
999
+ }
1000
+
828
1001
  const {
829
1002
  error: res_error,
830
- } = UserModel.UserSearchResponseSchema().validate(response, {
1003
+ } = UserPlatformModel.UserSearchResponseSchema().validate(responseData, {
831
1004
  abortEarly: false,
832
1005
  allowUnknown: false,
833
1006
  });
@@ -835,23 +1008,27 @@ class User {
835
1008
  if (res_error) {
836
1009
  Logger({
837
1010
  level: "WARN",
838
- message: "Response Validation Warnnings for searchUsers",
1011
+ message: `Response Validation Warnnings for platform > User > searchUsers \n ${res_error}`,
839
1012
  });
840
- Logger({ level: "WARN", message: res_error });
841
1013
  }
842
1014
 
843
1015
  return response;
844
1016
  }
845
1017
 
846
1018
  /**
847
- * @param {Object} arg - Arg object.
848
- * @param {UnDeleteUserRequestSchema} arg.body
849
- * @returns {Promise<UnDeleteUserSuccess>} - Success response
1019
+ * @param {UserPlatformApplicationValidator.UnDeleteUserParam} arg - Arg object
1020
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1021
+ * @param {import("../PlatformAPIClient").Options} - Options
1022
+ * @returns {Promise<UserPlatformModel.UnDeleteUserSuccess>} - Success response
1023
+ * @name unDeleteUser
850
1024
  * @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
1025
+ * @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
1026
  */
853
- async unDeleteUser({ body } = {}) {
854
- const { error } = UserValidator.unDeleteUser().validate(
1027
+ async unDeleteUser(
1028
+ { body, requestHeaders } = { requestHeaders: {} },
1029
+ { responseHeaders } = { responseHeaders: false }
1030
+ ) {
1031
+ const { error } = UserPlatformApplicationValidator.unDeleteUser().validate(
855
1032
  {
856
1033
  body,
857
1034
  },
@@ -862,7 +1039,9 @@ class User {
862
1039
  }
863
1040
 
864
1041
  // Showing warrnings if extra unknown parameters are found
865
- const { error: warrning } = UserValidator.unDeleteUser().validate(
1042
+ const {
1043
+ error: warrning,
1044
+ } = UserPlatformApplicationValidator.unDeleteUser().validate(
866
1045
  {
867
1046
  body,
868
1047
  },
@@ -871,9 +1050,8 @@ class User {
871
1050
  if (warrning) {
872
1051
  Logger({
873
1052
  level: "WARN",
874
- message: "Parameter Validation warrnings for unDeleteUser",
1053
+ message: `Parameter Validation warrnings for platform > User > unDeleteUser \n ${warrning}`,
875
1054
  });
876
- Logger({ level: "WARN", message: warrning });
877
1055
  }
878
1056
 
879
1057
  const query_params = {};
@@ -883,12 +1061,19 @@ class User {
883
1061
  "put",
884
1062
  `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/customers/undelete`,
885
1063
  query_params,
886
- body
1064
+ body,
1065
+ requestHeaders,
1066
+ { responseHeaders }
887
1067
  );
888
1068
 
1069
+ let responseData = response;
1070
+ if (responseHeaders) {
1071
+ responseData = response[0];
1072
+ }
1073
+
889
1074
  const {
890
1075
  error: res_error,
891
- } = UserModel.UnDeleteUserSuccess().validate(response, {
1076
+ } = UserPlatformModel.UnDeleteUserSuccess().validate(responseData, {
892
1077
  abortEarly: false,
893
1078
  allowUnknown: false,
894
1079
  });
@@ -896,23 +1081,31 @@ class User {
896
1081
  if (res_error) {
897
1082
  Logger({
898
1083
  level: "WARN",
899
- message: "Response Validation Warnnings for unDeleteUser",
1084
+ message: `Response Validation Warnnings for platform > User > unDeleteUser \n ${res_error}`,
900
1085
  });
901
- Logger({ level: "WARN", message: res_error });
902
1086
  }
903
1087
 
904
1088
  return response;
905
1089
  }
906
1090
 
907
1091
  /**
908
- * @param {Object} arg - Arg object.
909
- * @param {PlatformSchema} arg.body
910
- * @returns {Promise<PlatformSchema>} - Success response
1092
+ * @param {UserPlatformApplicationValidator.UpdatePlatformConfigParam} arg
1093
+ * - Arg object
1094
+ *
1095
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1096
+ * @param {import("../PlatformAPIClient").Options} - Options
1097
+ * @returns {Promise<UserPlatformModel.PlatformSchema>} - Success response
1098
+ * @name updatePlatformConfig
911
1099
  * @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.
1100
+ * @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
1101
  */
914
- async updatePlatformConfig({ body } = {}) {
915
- const { error } = UserValidator.updatePlatformConfig().validate(
1102
+ async updatePlatformConfig(
1103
+ { body, requestHeaders } = { requestHeaders: {} },
1104
+ { responseHeaders } = { responseHeaders: false }
1105
+ ) {
1106
+ const {
1107
+ error,
1108
+ } = UserPlatformApplicationValidator.updatePlatformConfig().validate(
916
1109
  {
917
1110
  body,
918
1111
  },
@@ -923,7 +1116,9 @@ class User {
923
1116
  }
924
1117
 
925
1118
  // Showing warrnings if extra unknown parameters are found
926
- const { error: warrning } = UserValidator.updatePlatformConfig().validate(
1119
+ const {
1120
+ error: warrning,
1121
+ } = UserPlatformApplicationValidator.updatePlatformConfig().validate(
927
1122
  {
928
1123
  body,
929
1124
  },
@@ -932,9 +1127,8 @@ class User {
932
1127
  if (warrning) {
933
1128
  Logger({
934
1129
  level: "WARN",
935
- message: "Parameter Validation warrnings for updatePlatformConfig",
1130
+ message: `Parameter Validation warrnings for platform > User > updatePlatformConfig \n ${warrning}`,
936
1131
  });
937
- Logger({ level: "WARN", message: warrning });
938
1132
  }
939
1133
 
940
1134
  const query_params = {};
@@ -944,10 +1138,19 @@ class User {
944
1138
  "post",
945
1139
  `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/platform/config`,
946
1140
  query_params,
947
- body
1141
+ body,
1142
+ requestHeaders,
1143
+ { responseHeaders }
948
1144
  );
949
1145
 
950
- const { error: res_error } = UserModel.PlatformSchema().validate(response, {
1146
+ let responseData = response;
1147
+ if (responseHeaders) {
1148
+ responseData = response[0];
1149
+ }
1150
+
1151
+ const {
1152
+ error: res_error,
1153
+ } = UserPlatformModel.PlatformSchema().validate(responseData, {
951
1154
  abortEarly: false,
952
1155
  allowUnknown: false,
953
1156
  });
@@ -955,24 +1158,27 @@ class User {
955
1158
  if (res_error) {
956
1159
  Logger({
957
1160
  level: "WARN",
958
- message: "Response Validation Warnnings for updatePlatformConfig",
1161
+ message: `Response Validation Warnnings for platform > User > updatePlatformConfig \n ${res_error}`,
959
1162
  });
960
- Logger({ level: "WARN", message: res_error });
961
1163
  }
962
1164
 
963
1165
  return response;
964
1166
  }
965
1167
 
966
1168
  /**
967
- * @param {Object} arg - Arg object.
968
- * @param {string} arg.userId - User ID
969
- * @param {UpdateUserRequestSchema} arg.body
970
- * @returns {Promise<CreateUserResponseSchema>} - Success response
1169
+ * @param {UserPlatformApplicationValidator.UpdateUserParam} arg - Arg object
1170
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1171
+ * @param {import("../PlatformAPIClient").Options} - Options
1172
+ * @returns {Promise<UserPlatformModel.CreateUserResponseSchema>} - Success response
1173
+ * @name updateUser
971
1174
  * @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.
1175
+ * @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
1176
  */
974
- async updateUser({ userId, body } = {}) {
975
- const { error } = UserValidator.updateUser().validate(
1177
+ async updateUser(
1178
+ { userId, body, requestHeaders } = { requestHeaders: {} },
1179
+ { responseHeaders } = { responseHeaders: false }
1180
+ ) {
1181
+ const { error } = UserPlatformApplicationValidator.updateUser().validate(
976
1182
  {
977
1183
  userId,
978
1184
  body,
@@ -984,7 +1190,9 @@ class User {
984
1190
  }
985
1191
 
986
1192
  // Showing warrnings if extra unknown parameters are found
987
- const { error: warrning } = UserValidator.updateUser().validate(
1193
+ const {
1194
+ error: warrning,
1195
+ } = UserPlatformApplicationValidator.updateUser().validate(
988
1196
  {
989
1197
  userId,
990
1198
  body,
@@ -994,9 +1202,8 @@ class User {
994
1202
  if (warrning) {
995
1203
  Logger({
996
1204
  level: "WARN",
997
- message: "Parameter Validation warrnings for updateUser",
1205
+ message: `Parameter Validation warrnings for platform > User > updateUser \n ${warrning}`,
998
1206
  });
999
- Logger({ level: "WARN", message: warrning });
1000
1207
  }
1001
1208
 
1002
1209
  const query_params = {};
@@ -1006,12 +1213,19 @@ class User {
1006
1213
  "put",
1007
1214
  `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/customers/${userId}`,
1008
1215
  query_params,
1009
- body
1216
+ body,
1217
+ requestHeaders,
1218
+ { responseHeaders }
1010
1219
  );
1011
1220
 
1221
+ let responseData = response;
1222
+ if (responseHeaders) {
1223
+ responseData = response[0];
1224
+ }
1225
+
1012
1226
  const {
1013
1227
  error: res_error,
1014
- } = UserModel.CreateUserResponseSchema().validate(response, {
1228
+ } = UserPlatformModel.CreateUserResponseSchema().validate(responseData, {
1015
1229
  abortEarly: false,
1016
1230
  allowUnknown: false,
1017
1231
  });
@@ -1019,24 +1233,29 @@ class User {
1019
1233
  if (res_error) {
1020
1234
  Logger({
1021
1235
  level: "WARN",
1022
- message: "Response Validation Warnnings for updateUser",
1236
+ message: `Response Validation Warnnings for platform > User > updateUser \n ${res_error}`,
1023
1237
  });
1024
- Logger({ level: "WARN", message: res_error });
1025
1238
  }
1026
1239
 
1027
1240
  return response;
1028
1241
  }
1029
1242
 
1030
1243
  /**
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
1244
+ * @param {UserPlatformApplicationValidator.UpdateUserGroupParam} arg - Arg object
1245
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1246
+ * @param {import("../PlatformAPIClient").Options} - Options
1247
+ * @returns {Promise<UserPlatformModel.UserGroupResponseSchema>} - Success response
1248
+ * @name updateUserGroup
1035
1249
  * @summary: Update an User Group
1036
- * @description: Use this API to update an existing user Group
1250
+ * @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
1251
  */
1038
- async updateUserGroup({ groupId, body } = {}) {
1039
- const { error } = UserValidator.updateUserGroup().validate(
1252
+ async updateUserGroup(
1253
+ { groupId, body, requestHeaders } = { requestHeaders: {} },
1254
+ { responseHeaders } = { responseHeaders: false }
1255
+ ) {
1256
+ const {
1257
+ error,
1258
+ } = UserPlatformApplicationValidator.updateUserGroup().validate(
1040
1259
  {
1041
1260
  groupId,
1042
1261
  body,
@@ -1048,7 +1267,9 @@ class User {
1048
1267
  }
1049
1268
 
1050
1269
  // Showing warrnings if extra unknown parameters are found
1051
- const { error: warrning } = UserValidator.updateUserGroup().validate(
1270
+ const {
1271
+ error: warrning,
1272
+ } = UserPlatformApplicationValidator.updateUserGroup().validate(
1052
1273
  {
1053
1274
  groupId,
1054
1275
  body,
@@ -1058,9 +1279,8 @@ class User {
1058
1279
  if (warrning) {
1059
1280
  Logger({
1060
1281
  level: "WARN",
1061
- message: "Parameter Validation warrnings for updateUserGroup",
1282
+ message: `Parameter Validation warrnings for platform > User > updateUserGroup \n ${warrning}`,
1062
1283
  });
1063
- Logger({ level: "WARN", message: warrning });
1064
1284
  }
1065
1285
 
1066
1286
  const query_params = {};
@@ -1070,12 +1290,19 @@ class User {
1070
1290
  "put",
1071
1291
  `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/user_group/${groupId}`,
1072
1292
  query_params,
1073
- body
1293
+ body,
1294
+ requestHeaders,
1295
+ { responseHeaders }
1074
1296
  );
1075
1297
 
1298
+ let responseData = response;
1299
+ if (responseHeaders) {
1300
+ responseData = response[0];
1301
+ }
1302
+
1076
1303
  const {
1077
1304
  error: res_error,
1078
- } = UserModel.UserGroupResponseSchema().validate(response, {
1305
+ } = UserPlatformModel.UserGroupResponseSchema().validate(responseData, {
1079
1306
  abortEarly: false,
1080
1307
  allowUnknown: false,
1081
1308
  });
@@ -1083,9 +1310,8 @@ class User {
1083
1310
  if (res_error) {
1084
1311
  Logger({
1085
1312
  level: "WARN",
1086
- message: "Response Validation Warnnings for updateUserGroup",
1313
+ message: `Response Validation Warnnings for platform > User > updateUserGroup \n ${res_error}`,
1087
1314
  });
1088
- Logger({ level: "WARN", message: res_error });
1089
1315
  }
1090
1316
 
1091
1317
  return response;