@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
@@ -2,8 +2,8 @@ const ApplicationAPIClient = require("../ApplicationAPIClient");
2
2
  const { FDKClientValidationError } = require("../../common/FDKError");
3
3
  const constructUrl = require("../constructUrl");
4
4
  const Paginator = require("../../common/Paginator");
5
- const UserValidator = require("./UserApplicationValidator");
6
- const UserModel = require("./UserApplicationModel");
5
+ const UserApplicationValidator = require("./UserApplicationValidator");
6
+ const UserApplicationModel = require("./UserApplicationModel");
7
7
  const { Logger } = require("./../../common/Logger");
8
8
  const Joi = require("joi");
9
9
 
@@ -85,15 +85,19 @@ class User {
85
85
  }
86
86
 
87
87
  /**
88
- * @param {Object} arg - Arg object.
89
- * @param {string} [arg.platform] - ID of the application
90
- * @param {EditEmailRequestSchema} arg.body
91
- * @returns {Promise<VerifyEmailOTPSuccess>} - Success response
88
+ * @param {UserApplicationValidator.AddEmailParam} arg - Arg object.
89
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
90
+ * @param {import("../ApplicationAPIClient").Options} - Options
91
+ * @returns {Promise<UserApplicationModel.VerifyEmailOTPSuccess>} - Success response
92
+ * @name addEmail
92
93
  * @summary: Add email to profile
93
- * @description: Use this API to add a new email address to a profile
94
+ * @description: Use this API to add a new email address to a profile - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/addEmail/).
94
95
  */
95
- async addEmail({ body, platform } = {}) {
96
- const { error } = UserValidator.addEmail().validate(
96
+ async addEmail(
97
+ { body, platform, requestHeaders } = { requestHeaders: {} },
98
+ { responseHeaders } = { responseHeaders: false }
99
+ ) {
100
+ const { error } = UserApplicationValidator.addEmail().validate(
97
101
  { body, platform },
98
102
  { abortEarly: false, allowUnknown: true }
99
103
  );
@@ -102,16 +106,15 @@ class User {
102
106
  }
103
107
 
104
108
  // Showing warrnings if extra unknown parameters are found
105
- const { error: warrning } = UserValidator.addEmail().validate(
109
+ const { error: warrning } = UserApplicationValidator.addEmail().validate(
106
110
  { body, platform },
107
111
  { abortEarly: false, allowUnknown: false }
108
112
  );
109
113
  if (warrning) {
110
114
  Logger({
111
115
  level: "WARN",
112
- message: "Parameter Validation warrnings for addEmail",
116
+ message: `Parameter Validation warrnings for application > User > addEmail \n ${warrning}`,
113
117
  });
114
- Logger({ level: "WARN", message: warrning });
115
118
  }
116
119
 
117
120
  const query_params = {};
@@ -128,12 +131,18 @@ class User {
128
131
  }),
129
132
  query_params,
130
133
  body,
131
- xHeaders
134
+ { ...xHeaders, ...requestHeaders },
135
+ { responseHeaders }
132
136
  );
133
137
 
138
+ let responseData = response;
139
+ if (responseHeaders) {
140
+ responseData = response[0];
141
+ }
142
+
134
143
  const {
135
144
  error: res_error,
136
- } = UserModel.VerifyEmailOTPSuccess().validate(response, {
145
+ } = UserApplicationModel.VerifyEmailOTPSuccess().validate(responseData, {
137
146
  abortEarly: false,
138
147
  allowUnknown: false,
139
148
  });
@@ -141,24 +150,27 @@ class User {
141
150
  if (res_error) {
142
151
  Logger({
143
152
  level: "WARN",
144
- message: "Response Validation Warnnings for addEmail",
153
+ message: `Response Validation Warnnings for application > User > addEmail \n ${res_error}`,
145
154
  });
146
- Logger({ level: "WARN", message: res_error });
147
155
  }
148
156
 
149
157
  return response;
150
158
  }
151
159
 
152
160
  /**
153
- * @param {Object} arg - Arg object.
154
- * @param {string} [arg.platform] - ID of the application
155
- * @param {EditMobileRequestSchema} arg.body
156
- * @returns {Promise<VerifyMobileOTPSuccess>} - Success response
161
+ * @param {UserApplicationValidator.AddMobileNumberParam} arg - Arg object.
162
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
163
+ * @param {import("../ApplicationAPIClient").Options} - Options
164
+ * @returns {Promise<UserApplicationModel.VerifyMobileOTPSuccess>} - Success response
165
+ * @name addMobileNumber
157
166
  * @summary: Add mobile number to profile
158
- * @description: Use this API to add a new mobile number to a profile.
167
+ * @description: Use this API to add a new mobile number to a profile. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/addMobileNumber/).
159
168
  */
160
- async addMobileNumber({ body, platform } = {}) {
161
- const { error } = UserValidator.addMobileNumber().validate(
169
+ async addMobileNumber(
170
+ { body, platform, requestHeaders } = { requestHeaders: {} },
171
+ { responseHeaders } = { responseHeaders: false }
172
+ ) {
173
+ const { error } = UserApplicationValidator.addMobileNumber().validate(
162
174
  { body, platform },
163
175
  { abortEarly: false, allowUnknown: true }
164
176
  );
@@ -167,16 +179,17 @@ class User {
167
179
  }
168
180
 
169
181
  // Showing warrnings if extra unknown parameters are found
170
- const { error: warrning } = UserValidator.addMobileNumber().validate(
182
+ const {
183
+ error: warrning,
184
+ } = UserApplicationValidator.addMobileNumber().validate(
171
185
  { body, platform },
172
186
  { abortEarly: false, allowUnknown: false }
173
187
  );
174
188
  if (warrning) {
175
189
  Logger({
176
190
  level: "WARN",
177
- message: "Parameter Validation warrnings for addMobileNumber",
191
+ message: `Parameter Validation warrnings for application > User > addMobileNumber \n ${warrning}`,
178
192
  });
179
- Logger({ level: "WARN", message: warrning });
180
193
  }
181
194
 
182
195
  const query_params = {};
@@ -193,12 +206,18 @@ class User {
193
206
  }),
194
207
  query_params,
195
208
  body,
196
- xHeaders
209
+ { ...xHeaders, ...requestHeaders },
210
+ { responseHeaders }
197
211
  );
198
212
 
213
+ let responseData = response;
214
+ if (responseHeaders) {
215
+ responseData = response[0];
216
+ }
217
+
199
218
  const {
200
219
  error: res_error,
201
- } = UserModel.VerifyMobileOTPSuccess().validate(response, {
220
+ } = UserApplicationModel.VerifyMobileOTPSuccess().validate(responseData, {
202
221
  abortEarly: false,
203
222
  allowUnknown: false,
204
223
  });
@@ -206,32 +225,29 @@ class User {
206
225
  if (res_error) {
207
226
  Logger({
208
227
  level: "WARN",
209
- message: "Response Validation Warnnings for addMobileNumber",
228
+ message: `Response Validation Warnnings for application > User > addMobileNumber \n ${res_error}`,
210
229
  });
211
- Logger({ level: "WARN", message: res_error });
212
230
  }
213
231
 
214
232
  return response;
215
233
  }
216
234
 
217
235
  /**
218
- * @param {Object} arg - Arg object.
219
- * @param {string} [arg.platform] - ID of the application
220
- * @param {boolean} arg.active - This is a boolean value to check if email
221
- * ID is active 1. True - Email ID is active 2.False - Email ID is inactive
222
- * @param {boolean} arg.primary - This is a boolean value to check if email
223
- * ID is primary (main email ID) 1. True - Email ID is primary 2.False -
224
- * Email ID is not primary
225
- * @param {boolean} arg.verified - This is a boolean value to check if email
226
- * ID is verified 1. True - Email ID is verified 2.False - Email ID is not
227
- * verified yet
228
- * @param {string} arg.email - The email ID to delete
229
- * @returns {Promise<LoginSuccess>} - Success response
236
+ * @param {UserApplicationValidator.DeleteEmailParam} arg - Arg object.
237
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
238
+ * @param {import("../ApplicationAPIClient").Options} - Options
239
+ * @returns {Promise<UserApplicationModel.LoginSuccess>} - Success response
240
+ * @name deleteEmail
230
241
  * @summary: Delete email from profile
231
- * @description: Use this API to delete an email address from a profile
242
+ * @description: Use this API to delete an email address from a profile - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/deleteEmail/).
232
243
  */
233
- async deleteEmail({ active, primary, verified, email, platform } = {}) {
234
- const { error } = UserValidator.deleteEmail().validate(
244
+ async deleteEmail(
245
+ { active, primary, verified, email, platform, requestHeaders } = {
246
+ requestHeaders: {},
247
+ },
248
+ { responseHeaders } = { responseHeaders: false }
249
+ ) {
250
+ const { error } = UserApplicationValidator.deleteEmail().validate(
235
251
  { active, primary, verified, email, platform },
236
252
  { abortEarly: false, allowUnknown: true }
237
253
  );
@@ -240,16 +256,15 @@ class User {
240
256
  }
241
257
 
242
258
  // Showing warrnings if extra unknown parameters are found
243
- const { error: warrning } = UserValidator.deleteEmail().validate(
259
+ const { error: warrning } = UserApplicationValidator.deleteEmail().validate(
244
260
  { active, primary, verified, email, platform },
245
261
  { abortEarly: false, allowUnknown: false }
246
262
  );
247
263
  if (warrning) {
248
264
  Logger({
249
265
  level: "WARN",
250
- message: "Parameter Validation warrnings for deleteEmail",
266
+ message: `Parameter Validation warrnings for application > User > deleteEmail \n ${warrning}`,
251
267
  });
252
- Logger({ level: "WARN", message: warrning });
253
268
  }
254
269
 
255
270
  const query_params = {};
@@ -270,10 +285,18 @@ class User {
270
285
  }),
271
286
  query_params,
272
287
  undefined,
273
- xHeaders
288
+ { ...xHeaders, ...requestHeaders },
289
+ { responseHeaders }
274
290
  );
275
291
 
276
- const { error: res_error } = UserModel.LoginSuccess().validate(response, {
292
+ let responseData = response;
293
+ if (responseHeaders) {
294
+ responseData = response[0];
295
+ }
296
+
297
+ const {
298
+ error: res_error,
299
+ } = UserApplicationModel.LoginSuccess().validate(responseData, {
277
300
  abortEarly: false,
278
301
  allowUnknown: false,
279
302
  });
@@ -281,40 +304,35 @@ class User {
281
304
  if (res_error) {
282
305
  Logger({
283
306
  level: "WARN",
284
- message: "Response Validation Warnnings for deleteEmail",
307
+ message: `Response Validation Warnnings for application > User > deleteEmail \n ${res_error}`,
285
308
  });
286
- Logger({ level: "WARN", message: res_error });
287
309
  }
288
310
 
289
311
  return response;
290
312
  }
291
313
 
292
314
  /**
293
- * @param {Object} arg - Arg object.
294
- * @param {string} [arg.platform] - ID of the application
295
- * @param {boolean} arg.active - This is a boolean value to check if mobile
296
- * number is active 1.True - Number is active 2. False - Number is inactive
297
- * @param {boolean} arg.primary - This is a boolean value to check if mobile
298
- * number is primary number (main number) 1. True - Number is primary 2.
299
- * False - Number is not primary
300
- * @param {boolean} arg.verified - This is a boolean value to check if
301
- * mobile number is verified 1. True - Number is verified 2.False - Number
302
- * is not verified yet
303
- * @param {string} arg.countryCode - Country code of the phone number, e.g. 91
304
- * @param {string} arg.phone - Phone number
305
- * @returns {Promise<LoginSuccess>} - Success response
315
+ * @param {UserApplicationValidator.DeleteMobileNumberParam} arg - Arg object.
316
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
317
+ * @param {import("../ApplicationAPIClient").Options} - Options
318
+ * @returns {Promise<UserApplicationModel.LoginSuccess>} - Success response
319
+ * @name deleteMobileNumber
306
320
  * @summary: Delete mobile number from profile
307
- * @description: Use this API to delete a mobile number from a profile.
321
+ * @description: Use this API to delete a mobile number from a profile. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/deleteMobileNumber/).
308
322
  */
309
- async deleteMobileNumber({
310
- active,
311
- primary,
312
- verified,
313
- countryCode,
314
- phone,
315
- platform,
316
- } = {}) {
317
- const { error } = UserValidator.deleteMobileNumber().validate(
323
+ async deleteMobileNumber(
324
+ {
325
+ active,
326
+ primary,
327
+ verified,
328
+ countryCode,
329
+ phone,
330
+ platform,
331
+ requestHeaders,
332
+ } = { requestHeaders: {} },
333
+ { responseHeaders } = { responseHeaders: false }
334
+ ) {
335
+ const { error } = UserApplicationValidator.deleteMobileNumber().validate(
318
336
  { active, primary, verified, countryCode, phone, platform },
319
337
  { abortEarly: false, allowUnknown: true }
320
338
  );
@@ -323,16 +341,17 @@ class User {
323
341
  }
324
342
 
325
343
  // Showing warrnings if extra unknown parameters are found
326
- const { error: warrning } = UserValidator.deleteMobileNumber().validate(
344
+ const {
345
+ error: warrning,
346
+ } = UserApplicationValidator.deleteMobileNumber().validate(
327
347
  { active, primary, verified, countryCode, phone, platform },
328
348
  { abortEarly: false, allowUnknown: false }
329
349
  );
330
350
  if (warrning) {
331
351
  Logger({
332
352
  level: "WARN",
333
- message: "Parameter Validation warrnings for deleteMobileNumber",
353
+ message: `Parameter Validation warrnings for application > User > deleteMobileNumber \n ${warrning}`,
334
354
  });
335
- Logger({ level: "WARN", message: warrning });
336
355
  }
337
356
 
338
357
  const query_params = {};
@@ -354,10 +373,18 @@ class User {
354
373
  }),
355
374
  query_params,
356
375
  undefined,
357
- xHeaders
376
+ { ...xHeaders, ...requestHeaders },
377
+ { responseHeaders }
358
378
  );
359
379
 
360
- const { error: res_error } = UserModel.LoginSuccess().validate(response, {
380
+ let responseData = response;
381
+ if (responseHeaders) {
382
+ responseData = response[0];
383
+ }
384
+
385
+ const {
386
+ error: res_error,
387
+ } = UserApplicationModel.LoginSuccess().validate(responseData, {
361
388
  abortEarly: false,
362
389
  allowUnknown: false,
363
390
  });
@@ -365,23 +392,27 @@ class User {
365
392
  if (res_error) {
366
393
  Logger({
367
394
  level: "WARN",
368
- message: "Response Validation Warnnings for deleteMobileNumber",
395
+ message: `Response Validation Warnnings for application > User > deleteMobileNumber \n ${res_error}`,
369
396
  });
370
- Logger({ level: "WARN", message: res_error });
371
397
  }
372
398
 
373
399
  return response;
374
400
  }
375
401
 
376
402
  /**
377
- * @param {Object} arg - Arg object.
378
- * @param {DeleteApplicationUserRequestSchema} arg.body
379
- * @returns {Promise<DeleteUserSuccess>} - Success response
403
+ * @param {UserApplicationValidator.DeleteUserParam} arg - Arg object.
404
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
405
+ * @param {import("../ApplicationAPIClient").Options} - Options
406
+ * @returns {Promise<UserApplicationModel.DeleteUserSuccess>} - Success response
407
+ * @name deleteUser
380
408
  * @summary: verify otp and delete user
381
- * @description: verify otp and delete user
409
+ * @description: verify otp and delete user - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/deleteUser/).
382
410
  */
383
- async deleteUser({ body } = {}) {
384
- const { error } = UserValidator.deleteUser().validate(
411
+ async deleteUser(
412
+ { body, requestHeaders } = { requestHeaders: {} },
413
+ { responseHeaders } = { responseHeaders: false }
414
+ ) {
415
+ const { error } = UserApplicationValidator.deleteUser().validate(
385
416
  { body },
386
417
  { abortEarly: false, allowUnknown: true }
387
418
  );
@@ -390,16 +421,15 @@ class User {
390
421
  }
391
422
 
392
423
  // Showing warrnings if extra unknown parameters are found
393
- const { error: warrning } = UserValidator.deleteUser().validate(
424
+ const { error: warrning } = UserApplicationValidator.deleteUser().validate(
394
425
  { body },
395
426
  { abortEarly: false, allowUnknown: false }
396
427
  );
397
428
  if (warrning) {
398
429
  Logger({
399
430
  level: "WARN",
400
- message: "Parameter Validation warrnings for deleteUser",
431
+ message: `Parameter Validation warrnings for application > User > deleteUser \n ${warrning}`,
401
432
  });
402
- Logger({ level: "WARN", message: warrning });
403
433
  }
404
434
 
405
435
  const query_params = {};
@@ -415,12 +445,18 @@ class User {
415
445
  }),
416
446
  query_params,
417
447
  body,
418
- xHeaders
448
+ { ...xHeaders, ...requestHeaders },
449
+ { responseHeaders }
419
450
  );
420
451
 
452
+ let responseData = response;
453
+ if (responseHeaders) {
454
+ responseData = response[0];
455
+ }
456
+
421
457
  const {
422
458
  error: res_error,
423
- } = UserModel.DeleteUserSuccess().validate(response, {
459
+ } = UserApplicationModel.DeleteUserSuccess().validate(responseData, {
424
460
  abortEarly: false,
425
461
  allowUnknown: false,
426
462
  });
@@ -428,23 +464,27 @@ class User {
428
464
  if (res_error) {
429
465
  Logger({
430
466
  level: "WARN",
431
- message: "Response Validation Warnnings for deleteUser",
467
+ message: `Response Validation Warnnings for application > User > deleteUser \n ${res_error}`,
432
468
  });
433
- Logger({ level: "WARN", message: res_error });
434
469
  }
435
470
 
436
471
  return response;
437
472
  }
438
473
 
439
474
  /**
440
- * @param {Object} arg - Arg object.
441
- * @param {ForgotPasswordRequestSchema} arg.body
442
- * @returns {Promise<LoginSuccess>} - Success response
475
+ * @param {UserApplicationValidator.ForgotPasswordParam} arg - Arg object.
476
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
477
+ * @param {import("../ApplicationAPIClient").Options} - Options
478
+ * @returns {Promise<UserApplicationModel.LoginSuccess>} - Success response
479
+ * @name forgotPassword
443
480
  * @summary: Forgot Password
444
- * @description: Use this API to reset a password using the code sent on email or SMS.
481
+ * @description: Use this API to reset a password using the code sent on email or SMS. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/forgotPassword/).
445
482
  */
446
- async forgotPassword({ body } = {}) {
447
- const { error } = UserValidator.forgotPassword().validate(
483
+ async forgotPassword(
484
+ { body, requestHeaders } = { requestHeaders: {} },
485
+ { responseHeaders } = { responseHeaders: false }
486
+ ) {
487
+ const { error } = UserApplicationValidator.forgotPassword().validate(
448
488
  { body },
449
489
  { abortEarly: false, allowUnknown: true }
450
490
  );
@@ -453,16 +493,17 @@ class User {
453
493
  }
454
494
 
455
495
  // Showing warrnings if extra unknown parameters are found
456
- const { error: warrning } = UserValidator.forgotPassword().validate(
496
+ const {
497
+ error: warrning,
498
+ } = UserApplicationValidator.forgotPassword().validate(
457
499
  { body },
458
500
  { abortEarly: false, allowUnknown: false }
459
501
  );
460
502
  if (warrning) {
461
503
  Logger({
462
504
  level: "WARN",
463
- message: "Parameter Validation warrnings for forgotPassword",
505
+ message: `Parameter Validation warrnings for application > User > forgotPassword \n ${warrning}`,
464
506
  });
465
- Logger({ level: "WARN", message: warrning });
466
507
  }
467
508
 
468
509
  const query_params = {};
@@ -478,10 +519,18 @@ class User {
478
519
  }),
479
520
  query_params,
480
521
  body,
481
- xHeaders
522
+ { ...xHeaders, ...requestHeaders },
523
+ { responseHeaders }
482
524
  );
483
525
 
484
- const { error: res_error } = UserModel.LoginSuccess().validate(response, {
526
+ let responseData = response;
527
+ if (responseHeaders) {
528
+ responseData = response[0];
529
+ }
530
+
531
+ const {
532
+ error: res_error,
533
+ } = UserApplicationModel.LoginSuccess().validate(responseData, {
485
534
  abortEarly: false,
486
535
  allowUnknown: false,
487
536
  });
@@ -489,22 +538,29 @@ class User {
489
538
  if (res_error) {
490
539
  Logger({
491
540
  level: "WARN",
492
- message: "Response Validation Warnnings for forgotPassword",
541
+ message: `Response Validation Warnnings for application > User > forgotPassword \n ${res_error}`,
493
542
  });
494
- Logger({ level: "WARN", message: res_error });
495
543
  }
496
544
 
497
545
  return response;
498
546
  }
499
547
 
500
548
  /**
501
- * @param {Object} arg - Arg object.
502
- * @returns {Promise<SessionListSuccess>} - Success response
549
+ * @param {UserApplicationValidator.GetListOfActiveSessionsParam} arg - Arg object.
550
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
551
+ * @param {import("../ApplicationAPIClient").Options} - Options
552
+ * @returns {Promise<UserApplicationModel.SessionListSuccess>} - Success response
553
+ * @name getListOfActiveSessions
503
554
  * @summary: Get list of sessions
504
- * @description: Use this API to retrieve all active sessions of a user.
555
+ * @description: Use this API to retrieve all active sessions of a user. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/getListOfActiveSessions/).
505
556
  */
506
- async getListOfActiveSessions({} = {}) {
507
- const { error } = UserValidator.getListOfActiveSessions().validate(
557
+ async getListOfActiveSessions(
558
+ { requestHeaders } = { requestHeaders: {} },
559
+ { responseHeaders } = { responseHeaders: false }
560
+ ) {
561
+ const {
562
+ error,
563
+ } = UserApplicationValidator.getListOfActiveSessions().validate(
508
564
  {},
509
565
  { abortEarly: false, allowUnknown: true }
510
566
  );
@@ -515,16 +571,15 @@ class User {
515
571
  // Showing warrnings if extra unknown parameters are found
516
572
  const {
517
573
  error: warrning,
518
- } = UserValidator.getListOfActiveSessions().validate(
574
+ } = UserApplicationValidator.getListOfActiveSessions().validate(
519
575
  {},
520
576
  { abortEarly: false, allowUnknown: false }
521
577
  );
522
578
  if (warrning) {
523
579
  Logger({
524
580
  level: "WARN",
525
- message: "Parameter Validation warrnings for getListOfActiveSessions",
581
+ message: `Parameter Validation warrnings for application > User > getListOfActiveSessions \n ${warrning}`,
526
582
  });
527
- Logger({ level: "WARN", message: warrning });
528
583
  }
529
584
 
530
585
  const query_params = {};
@@ -540,12 +595,18 @@ class User {
540
595
  }),
541
596
  query_params,
542
597
  undefined,
543
- xHeaders
598
+ { ...xHeaders, ...requestHeaders },
599
+ { responseHeaders }
544
600
  );
545
601
 
602
+ let responseData = response;
603
+ if (responseHeaders) {
604
+ responseData = response[0];
605
+ }
606
+
546
607
  const {
547
608
  error: res_error,
548
- } = UserModel.SessionListSuccess().validate(response, {
609
+ } = UserApplicationModel.SessionListSuccess().validate(responseData, {
549
610
  abortEarly: false,
550
611
  allowUnknown: false,
551
612
  });
@@ -553,22 +614,27 @@ class User {
553
614
  if (res_error) {
554
615
  Logger({
555
616
  level: "WARN",
556
- message: "Response Validation Warnnings for getListOfActiveSessions",
617
+ message: `Response Validation Warnnings for application > User > getListOfActiveSessions \n ${res_error}`,
557
618
  });
558
- Logger({ level: "WARN", message: res_error });
559
619
  }
560
620
 
561
621
  return response;
562
622
  }
563
623
 
564
624
  /**
565
- * @param {Object} arg - Arg object.
566
- * @returns {Promise<UserObjectSchema>} - Success response
625
+ * @param {UserApplicationValidator.GetLoggedInUserParam} arg - Arg object.
626
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
627
+ * @param {import("../ApplicationAPIClient").Options} - Options
628
+ * @returns {Promise<UserApplicationModel.UserObjectSchema>} - Success response
629
+ * @name getLoggedInUser
567
630
  * @summary: Get logged in user
568
- * @description: Use this API to get the details of a logged in user.
631
+ * @description: Use this API to get the details of a logged in user. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/getLoggedInUser/).
569
632
  */
570
- async getLoggedInUser({} = {}) {
571
- const { error } = UserValidator.getLoggedInUser().validate(
633
+ async getLoggedInUser(
634
+ { requestHeaders } = { requestHeaders: {} },
635
+ { responseHeaders } = { responseHeaders: false }
636
+ ) {
637
+ const { error } = UserApplicationValidator.getLoggedInUser().validate(
572
638
  {},
573
639
  { abortEarly: false, allowUnknown: true }
574
640
  );
@@ -577,16 +643,17 @@ class User {
577
643
  }
578
644
 
579
645
  // Showing warrnings if extra unknown parameters are found
580
- const { error: warrning } = UserValidator.getLoggedInUser().validate(
646
+ const {
647
+ error: warrning,
648
+ } = UserApplicationValidator.getLoggedInUser().validate(
581
649
  {},
582
650
  { abortEarly: false, allowUnknown: false }
583
651
  );
584
652
  if (warrning) {
585
653
  Logger({
586
654
  level: "WARN",
587
- message: "Parameter Validation warrnings for getLoggedInUser",
655
+ message: `Parameter Validation warrnings for application > User > getLoggedInUser \n ${warrning}`,
588
656
  });
589
- Logger({ level: "WARN", message: warrning });
590
657
  }
591
658
 
592
659
  const query_params = {};
@@ -602,34 +669,46 @@ class User {
602
669
  }),
603
670
  query_params,
604
671
  undefined,
605
- xHeaders
672
+ { ...xHeaders, ...requestHeaders },
673
+ { responseHeaders }
606
674
  );
607
675
 
608
- const { error: res_error } = UserModel.UserObjectSchema().validate(
609
- response,
610
- { abortEarly: false, allowUnknown: false }
611
- );
676
+ let responseData = response;
677
+ if (responseHeaders) {
678
+ responseData = response[0];
679
+ }
680
+
681
+ const {
682
+ error: res_error,
683
+ } = UserApplicationModel.UserObjectSchema().validate(responseData, {
684
+ abortEarly: false,
685
+ allowUnknown: false,
686
+ });
612
687
 
613
688
  if (res_error) {
614
689
  Logger({
615
690
  level: "WARN",
616
- message: "Response Validation Warnnings for getLoggedInUser",
691
+ message: `Response Validation Warnnings for application > User > getLoggedInUser \n ${res_error}`,
617
692
  });
618
- Logger({ level: "WARN", message: res_error });
619
693
  }
620
694
 
621
695
  return response;
622
696
  }
623
697
 
624
698
  /**
625
- * @param {Object} arg - Arg object.
626
- * @param {string} [arg.name] - Name of the application, e.g. Fynd
627
- * @returns {Promise<PlatformSchema>} - Success response
699
+ * @param {UserApplicationValidator.GetPlatformConfigParam} arg - Arg object.
700
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
701
+ * @param {import("../ApplicationAPIClient").Options} - Options
702
+ * @returns {Promise<UserApplicationModel.PlatformSchema>} - Success response
703
+ * @name getPlatformConfig
628
704
  * @summary: Get platform configurations
629
- * @description: Use this API to get all the platform configurations such as mobile image, desktop image, social logins, and all other text.
705
+ * @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/application/user/getPlatformConfig/).
630
706
  */
631
- async getPlatformConfig({ name } = {}) {
632
- const { error } = UserValidator.getPlatformConfig().validate(
707
+ async getPlatformConfig(
708
+ { name, requestHeaders } = { requestHeaders: {} },
709
+ { responseHeaders } = { responseHeaders: false }
710
+ ) {
711
+ const { error } = UserApplicationValidator.getPlatformConfig().validate(
633
712
  { name },
634
713
  { abortEarly: false, allowUnknown: true }
635
714
  );
@@ -638,16 +717,17 @@ class User {
638
717
  }
639
718
 
640
719
  // Showing warrnings if extra unknown parameters are found
641
- const { error: warrning } = UserValidator.getPlatformConfig().validate(
720
+ const {
721
+ error: warrning,
722
+ } = UserApplicationValidator.getPlatformConfig().validate(
642
723
  { name },
643
724
  { abortEarly: false, allowUnknown: false }
644
725
  );
645
726
  if (warrning) {
646
727
  Logger({
647
728
  level: "WARN",
648
- message: "Parameter Validation warrnings for getPlatformConfig",
729
+ message: `Parameter Validation warrnings for application > User > getPlatformConfig \n ${warrning}`,
649
730
  });
650
- Logger({ level: "WARN", message: warrning });
651
731
  }
652
732
 
653
733
  const query_params = {};
@@ -664,10 +744,18 @@ class User {
664
744
  }),
665
745
  query_params,
666
746
  undefined,
667
- xHeaders
747
+ { ...xHeaders, ...requestHeaders },
748
+ { responseHeaders }
668
749
  );
669
750
 
670
- const { error: res_error } = UserModel.PlatformSchema().validate(response, {
751
+ let responseData = response;
752
+ if (responseHeaders) {
753
+ responseData = response[0];
754
+ }
755
+
756
+ const {
757
+ error: res_error,
758
+ } = UserApplicationModel.PlatformSchema().validate(responseData, {
671
759
  abortEarly: false,
672
760
  allowUnknown: false,
673
761
  });
@@ -675,22 +763,27 @@ class User {
675
763
  if (res_error) {
676
764
  Logger({
677
765
  level: "WARN",
678
- message: "Response Validation Warnnings for getPlatformConfig",
766
+ message: `Response Validation Warnnings for application > User > getPlatformConfig \n ${res_error}`,
679
767
  });
680
- Logger({ level: "WARN", message: res_error });
681
768
  }
682
769
 
683
770
  return response;
684
771
  }
685
772
 
686
773
  /**
687
- * @param {Object} arg - Arg object.
688
- * @returns {Promise<HasPasswordSuccess>} - Success response
774
+ * @param {UserApplicationValidator.HasPasswordParam} arg - Arg object.
775
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
776
+ * @param {import("../ApplicationAPIClient").Options} - Options
777
+ * @returns {Promise<UserApplicationModel.HasPasswordSuccess>} - Success response
778
+ * @name hasPassword
689
779
  * @summary: Check password
690
- * @description: Use this API to check if user has created a password for login.
780
+ * @description: Use this API to check if user has created a password for login. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/hasPassword/).
691
781
  */
692
- async hasPassword({} = {}) {
693
- const { error } = UserValidator.hasPassword().validate(
782
+ async hasPassword(
783
+ { requestHeaders } = { requestHeaders: {} },
784
+ { responseHeaders } = { responseHeaders: false }
785
+ ) {
786
+ const { error } = UserApplicationValidator.hasPassword().validate(
694
787
  {},
695
788
  { abortEarly: false, allowUnknown: true }
696
789
  );
@@ -699,16 +792,15 @@ class User {
699
792
  }
700
793
 
701
794
  // Showing warrnings if extra unknown parameters are found
702
- const { error: warrning } = UserValidator.hasPassword().validate(
795
+ const { error: warrning } = UserApplicationValidator.hasPassword().validate(
703
796
  {},
704
797
  { abortEarly: false, allowUnknown: false }
705
798
  );
706
799
  if (warrning) {
707
800
  Logger({
708
801
  level: "WARN",
709
- message: "Parameter Validation warrnings for hasPassword",
802
+ message: `Parameter Validation warrnings for application > User > hasPassword \n ${warrning}`,
710
803
  });
711
- Logger({ level: "WARN", message: warrning });
712
804
  }
713
805
 
714
806
  const query_params = {};
@@ -724,12 +816,18 @@ class User {
724
816
  }),
725
817
  query_params,
726
818
  undefined,
727
- xHeaders
819
+ { ...xHeaders, ...requestHeaders },
820
+ { responseHeaders }
728
821
  );
729
822
 
823
+ let responseData = response;
824
+ if (responseHeaders) {
825
+ responseData = response[0];
826
+ }
827
+
730
828
  const {
731
829
  error: res_error,
732
- } = UserModel.HasPasswordSuccess().validate(response, {
830
+ } = UserApplicationModel.HasPasswordSuccess().validate(responseData, {
733
831
  abortEarly: false,
734
832
  allowUnknown: false,
735
833
  });
@@ -737,24 +835,27 @@ class User {
737
835
  if (res_error) {
738
836
  Logger({
739
837
  level: "WARN",
740
- message: "Response Validation Warnnings for hasPassword",
838
+ message: `Response Validation Warnnings for application > User > hasPassword \n ${res_error}`,
741
839
  });
742
- Logger({ level: "WARN", message: res_error });
743
840
  }
744
841
 
745
842
  return response;
746
843
  }
747
844
 
748
845
  /**
749
- * @param {Object} arg - Arg object.
750
- * @param {string} [arg.platform] - ID of the application
751
- * @param {OAuthRequestAppleSchema} arg.body
752
- * @returns {Promise<AuthSuccess>} - Success response
846
+ * @param {UserApplicationValidator.LoginWithAppleIOSParam} arg - Arg object.
847
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
848
+ * @param {import("../ApplicationAPIClient").Options} - Options
849
+ * @returns {Promise<UserApplicationModel.AuthSuccess>} - Success response
850
+ * @name loginWithAppleIOS
753
851
  * @summary: Login or Register using Apple on iOS
754
- * @description: Use this API to login or register in iOS app using Apple Account credentials.
852
+ * @description: Use this API to login or register in iOS app using Apple Account credentials. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/loginWithAppleIOS/).
755
853
  */
756
- async loginWithAppleIOS({ body, platform } = {}) {
757
- const { error } = UserValidator.loginWithAppleIOS().validate(
854
+ async loginWithAppleIOS(
855
+ { body, platform, requestHeaders } = { requestHeaders: {} },
856
+ { responseHeaders } = { responseHeaders: false }
857
+ ) {
858
+ const { error } = UserApplicationValidator.loginWithAppleIOS().validate(
758
859
  { body, platform },
759
860
  { abortEarly: false, allowUnknown: true }
760
861
  );
@@ -763,16 +864,17 @@ class User {
763
864
  }
764
865
 
765
866
  // Showing warrnings if extra unknown parameters are found
766
- const { error: warrning } = UserValidator.loginWithAppleIOS().validate(
867
+ const {
868
+ error: warrning,
869
+ } = UserApplicationValidator.loginWithAppleIOS().validate(
767
870
  { body, platform },
768
871
  { abortEarly: false, allowUnknown: false }
769
872
  );
770
873
  if (warrning) {
771
874
  Logger({
772
875
  level: "WARN",
773
- message: "Parameter Validation warrnings for loginWithAppleIOS",
876
+ message: `Parameter Validation warrnings for application > User > loginWithAppleIOS \n ${warrning}`,
774
877
  });
775
- Logger({ level: "WARN", message: warrning });
776
878
  }
777
879
 
778
880
  const query_params = {};
@@ -789,10 +891,18 @@ class User {
789
891
  }),
790
892
  query_params,
791
893
  body,
792
- xHeaders
894
+ { ...xHeaders, ...requestHeaders },
895
+ { responseHeaders }
793
896
  );
794
897
 
795
- const { error: res_error } = UserModel.AuthSuccess().validate(response, {
898
+ let responseData = response;
899
+ if (responseHeaders) {
900
+ responseData = response[0];
901
+ }
902
+
903
+ const {
904
+ error: res_error,
905
+ } = UserApplicationModel.AuthSuccess().validate(responseData, {
796
906
  abortEarly: false,
797
907
  allowUnknown: false,
798
908
  });
@@ -800,23 +910,29 @@ class User {
800
910
  if (res_error) {
801
911
  Logger({
802
912
  level: "WARN",
803
- message: "Response Validation Warnnings for loginWithAppleIOS",
913
+ message: `Response Validation Warnnings for application > User > loginWithAppleIOS \n ${res_error}`,
804
914
  });
805
- Logger({ level: "WARN", message: res_error });
806
915
  }
807
916
 
808
917
  return response;
809
918
  }
810
919
 
811
920
  /**
812
- * @param {Object} arg - Arg object.
813
- * @param {PasswordLoginRequestSchema} arg.body
814
- * @returns {Promise<LoginSuccess>} - Success response
921
+ * @param {UserApplicationValidator.LoginWithEmailAndPasswordParam} arg - Arg object.
922
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
923
+ * @param {import("../ApplicationAPIClient").Options} - Options
924
+ * @returns {Promise<UserApplicationModel.LoginSuccess>} - Success response
925
+ * @name loginWithEmailAndPassword
815
926
  * @summary: Login or Register with password
816
- * @description: Use this API to login or register using an email address and password.
927
+ * @description: Use this API to login or register using an email address and password. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/loginWithEmailAndPassword/).
817
928
  */
818
- async loginWithEmailAndPassword({ body } = {}) {
819
- const { error } = UserValidator.loginWithEmailAndPassword().validate(
929
+ async loginWithEmailAndPassword(
930
+ { body, requestHeaders } = { requestHeaders: {} },
931
+ { responseHeaders } = { responseHeaders: false }
932
+ ) {
933
+ const {
934
+ error,
935
+ } = UserApplicationValidator.loginWithEmailAndPassword().validate(
820
936
  { body },
821
937
  { abortEarly: false, allowUnknown: true }
822
938
  );
@@ -827,16 +943,15 @@ class User {
827
943
  // Showing warrnings if extra unknown parameters are found
828
944
  const {
829
945
  error: warrning,
830
- } = UserValidator.loginWithEmailAndPassword().validate(
946
+ } = UserApplicationValidator.loginWithEmailAndPassword().validate(
831
947
  { body },
832
948
  { abortEarly: false, allowUnknown: false }
833
949
  );
834
950
  if (warrning) {
835
951
  Logger({
836
952
  level: "WARN",
837
- message: "Parameter Validation warrnings for loginWithEmailAndPassword",
953
+ message: `Parameter Validation warrnings for application > User > loginWithEmailAndPassword \n ${warrning}`,
838
954
  });
839
- Logger({ level: "WARN", message: warrning });
840
955
  }
841
956
 
842
957
  const query_params = {};
@@ -852,10 +967,18 @@ class User {
852
967
  }),
853
968
  query_params,
854
969
  body,
855
- xHeaders
970
+ { ...xHeaders, ...requestHeaders },
971
+ { responseHeaders }
856
972
  );
857
973
 
858
- const { error: res_error } = UserModel.LoginSuccess().validate(response, {
974
+ let responseData = response;
975
+ if (responseHeaders) {
976
+ responseData = response[0];
977
+ }
978
+
979
+ const {
980
+ error: res_error,
981
+ } = UserApplicationModel.LoginSuccess().validate(responseData, {
859
982
  abortEarly: false,
860
983
  allowUnknown: false,
861
984
  });
@@ -863,24 +986,27 @@ class User {
863
986
  if (res_error) {
864
987
  Logger({
865
988
  level: "WARN",
866
- message: "Response Validation Warnnings for loginWithEmailAndPassword",
989
+ message: `Response Validation Warnnings for application > User > loginWithEmailAndPassword \n ${res_error}`,
867
990
  });
868
- Logger({ level: "WARN", message: res_error });
869
991
  }
870
992
 
871
993
  return response;
872
994
  }
873
995
 
874
996
  /**
875
- * @param {Object} arg - Arg object.
876
- * @param {string} [arg.platform] - ID of the application
877
- * @param {OAuthRequestSchema} arg.body
878
- * @returns {Promise<AuthSuccess>} - Success response
997
+ * @param {UserApplicationValidator.LoginWithFacebookParam} arg - Arg object.
998
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
999
+ * @param {import("../ApplicationAPIClient").Options} - Options
1000
+ * @returns {Promise<UserApplicationModel.AuthSuccess>} - Success response
1001
+ * @name loginWithFacebook
879
1002
  * @summary: Login or Register using Facebook
880
- * @description: Use this API to login or register using Facebook credentials.
1003
+ * @description: Use this API to login or register using Facebook credentials. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/loginWithFacebook/).
881
1004
  */
882
- async loginWithFacebook({ body, platform } = {}) {
883
- const { error } = UserValidator.loginWithFacebook().validate(
1005
+ async loginWithFacebook(
1006
+ { body, platform, requestHeaders } = { requestHeaders: {} },
1007
+ { responseHeaders } = { responseHeaders: false }
1008
+ ) {
1009
+ const { error } = UserApplicationValidator.loginWithFacebook().validate(
884
1010
  { body, platform },
885
1011
  { abortEarly: false, allowUnknown: true }
886
1012
  );
@@ -889,16 +1015,17 @@ class User {
889
1015
  }
890
1016
 
891
1017
  // Showing warrnings if extra unknown parameters are found
892
- const { error: warrning } = UserValidator.loginWithFacebook().validate(
1018
+ const {
1019
+ error: warrning,
1020
+ } = UserApplicationValidator.loginWithFacebook().validate(
893
1021
  { body, platform },
894
1022
  { abortEarly: false, allowUnknown: false }
895
1023
  );
896
1024
  if (warrning) {
897
1025
  Logger({
898
1026
  level: "WARN",
899
- message: "Parameter Validation warrnings for loginWithFacebook",
1027
+ message: `Parameter Validation warrnings for application > User > loginWithFacebook \n ${warrning}`,
900
1028
  });
901
- Logger({ level: "WARN", message: warrning });
902
1029
  }
903
1030
 
904
1031
  const query_params = {};
@@ -915,10 +1042,18 @@ class User {
915
1042
  }),
916
1043
  query_params,
917
1044
  body,
918
- xHeaders
1045
+ { ...xHeaders, ...requestHeaders },
1046
+ { responseHeaders }
919
1047
  );
920
1048
 
921
- const { error: res_error } = UserModel.AuthSuccess().validate(response, {
1049
+ let responseData = response;
1050
+ if (responseHeaders) {
1051
+ responseData = response[0];
1052
+ }
1053
+
1054
+ const {
1055
+ error: res_error,
1056
+ } = UserApplicationModel.AuthSuccess().validate(responseData, {
922
1057
  abortEarly: false,
923
1058
  allowUnknown: false,
924
1059
  });
@@ -926,24 +1061,27 @@ class User {
926
1061
  if (res_error) {
927
1062
  Logger({
928
1063
  level: "WARN",
929
- message: "Response Validation Warnnings for loginWithFacebook",
1064
+ message: `Response Validation Warnnings for application > User > loginWithFacebook \n ${res_error}`,
930
1065
  });
931
- Logger({ level: "WARN", message: res_error });
932
1066
  }
933
1067
 
934
1068
  return response;
935
1069
  }
936
1070
 
937
1071
  /**
938
- * @param {Object} arg - Arg object.
939
- * @param {string} [arg.platform] - ID of the application
940
- * @param {OAuthRequestSchema} arg.body
941
- * @returns {Promise<AuthSuccess>} - Success response
1072
+ * @param {UserApplicationValidator.LoginWithGoogleParam} arg - Arg object.
1073
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1074
+ * @param {import("../ApplicationAPIClient").Options} - Options
1075
+ * @returns {Promise<UserApplicationModel.AuthSuccess>} - Success response
1076
+ * @name loginWithGoogle
942
1077
  * @summary: Login or Register using Google
943
- * @description: Use this API to login or register using Google Account credentials.
1078
+ * @description: Use this API to login or register using Google Account credentials. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/loginWithGoogle/).
944
1079
  */
945
- async loginWithGoogle({ body, platform } = {}) {
946
- const { error } = UserValidator.loginWithGoogle().validate(
1080
+ async loginWithGoogle(
1081
+ { body, platform, requestHeaders } = { requestHeaders: {} },
1082
+ { responseHeaders } = { responseHeaders: false }
1083
+ ) {
1084
+ const { error } = UserApplicationValidator.loginWithGoogle().validate(
947
1085
  { body, platform },
948
1086
  { abortEarly: false, allowUnknown: true }
949
1087
  );
@@ -952,16 +1090,17 @@ class User {
952
1090
  }
953
1091
 
954
1092
  // Showing warrnings if extra unknown parameters are found
955
- const { error: warrning } = UserValidator.loginWithGoogle().validate(
1093
+ const {
1094
+ error: warrning,
1095
+ } = UserApplicationValidator.loginWithGoogle().validate(
956
1096
  { body, platform },
957
1097
  { abortEarly: false, allowUnknown: false }
958
1098
  );
959
1099
  if (warrning) {
960
1100
  Logger({
961
1101
  level: "WARN",
962
- message: "Parameter Validation warrnings for loginWithGoogle",
1102
+ message: `Parameter Validation warrnings for application > User > loginWithGoogle \n ${warrning}`,
963
1103
  });
964
- Logger({ level: "WARN", message: warrning });
965
1104
  }
966
1105
 
967
1106
  const query_params = {};
@@ -978,10 +1117,18 @@ class User {
978
1117
  }),
979
1118
  query_params,
980
1119
  body,
981
- xHeaders
1120
+ { ...xHeaders, ...requestHeaders },
1121
+ { responseHeaders }
982
1122
  );
983
1123
 
984
- const { error: res_error } = UserModel.AuthSuccess().validate(response, {
1124
+ let responseData = response;
1125
+ if (responseHeaders) {
1126
+ responseData = response[0];
1127
+ }
1128
+
1129
+ const {
1130
+ error: res_error,
1131
+ } = UserApplicationModel.AuthSuccess().validate(responseData, {
985
1132
  abortEarly: false,
986
1133
  allowUnknown: false,
987
1134
  });
@@ -989,24 +1136,29 @@ class User {
989
1136
  if (res_error) {
990
1137
  Logger({
991
1138
  level: "WARN",
992
- message: "Response Validation Warnnings for loginWithGoogle",
1139
+ message: `Response Validation Warnnings for application > User > loginWithGoogle \n ${res_error}`,
993
1140
  });
994
- Logger({ level: "WARN", message: res_error });
995
1141
  }
996
1142
 
997
1143
  return response;
998
1144
  }
999
1145
 
1000
1146
  /**
1001
- * @param {Object} arg - Arg object.
1002
- * @param {string} [arg.platform] - ID of the application
1003
- * @param {OAuthRequestSchema} arg.body
1004
- * @returns {Promise<AuthSuccess>} - Success response
1147
+ * @param {UserApplicationValidator.LoginWithGoogleAndroidParam} arg - Arg object.
1148
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1149
+ * @param {import("../ApplicationAPIClient").Options} - Options
1150
+ * @returns {Promise<UserApplicationModel.AuthSuccess>} - Success response
1151
+ * @name loginWithGoogleAndroid
1005
1152
  * @summary: Login or Register using Google on Android
1006
- * @description: Use this API to login or register in Android app using Google Account credentials.
1153
+ * @description: Use this API to login or register in Android app using Google Account credentials. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/loginWithGoogleAndroid/).
1007
1154
  */
1008
- async loginWithGoogleAndroid({ body, platform } = {}) {
1009
- const { error } = UserValidator.loginWithGoogleAndroid().validate(
1155
+ async loginWithGoogleAndroid(
1156
+ { body, platform, requestHeaders } = { requestHeaders: {} },
1157
+ { responseHeaders } = { responseHeaders: false }
1158
+ ) {
1159
+ const {
1160
+ error,
1161
+ } = UserApplicationValidator.loginWithGoogleAndroid().validate(
1010
1162
  { body, platform },
1011
1163
  { abortEarly: false, allowUnknown: true }
1012
1164
  );
@@ -1015,16 +1167,17 @@ class User {
1015
1167
  }
1016
1168
 
1017
1169
  // Showing warrnings if extra unknown parameters are found
1018
- const { error: warrning } = UserValidator.loginWithGoogleAndroid().validate(
1170
+ const {
1171
+ error: warrning,
1172
+ } = UserApplicationValidator.loginWithGoogleAndroid().validate(
1019
1173
  { body, platform },
1020
1174
  { abortEarly: false, allowUnknown: false }
1021
1175
  );
1022
1176
  if (warrning) {
1023
1177
  Logger({
1024
1178
  level: "WARN",
1025
- message: "Parameter Validation warrnings for loginWithGoogleAndroid",
1179
+ message: `Parameter Validation warrnings for application > User > loginWithGoogleAndroid \n ${warrning}`,
1026
1180
  });
1027
- Logger({ level: "WARN", message: warrning });
1028
1181
  }
1029
1182
 
1030
1183
  const query_params = {};
@@ -1041,10 +1194,18 @@ class User {
1041
1194
  }),
1042
1195
  query_params,
1043
1196
  body,
1044
- xHeaders
1197
+ { ...xHeaders, ...requestHeaders },
1198
+ { responseHeaders }
1045
1199
  );
1046
1200
 
1047
- const { error: res_error } = UserModel.AuthSuccess().validate(response, {
1201
+ let responseData = response;
1202
+ if (responseHeaders) {
1203
+ responseData = response[0];
1204
+ }
1205
+
1206
+ const {
1207
+ error: res_error,
1208
+ } = UserApplicationModel.AuthSuccess().validate(responseData, {
1048
1209
  abortEarly: false,
1049
1210
  allowUnknown: false,
1050
1211
  });
@@ -1052,24 +1213,27 @@ class User {
1052
1213
  if (res_error) {
1053
1214
  Logger({
1054
1215
  level: "WARN",
1055
- message: "Response Validation Warnnings for loginWithGoogleAndroid",
1216
+ message: `Response Validation Warnnings for application > User > loginWithGoogleAndroid \n ${res_error}`,
1056
1217
  });
1057
- Logger({ level: "WARN", message: res_error });
1058
1218
  }
1059
1219
 
1060
1220
  return response;
1061
1221
  }
1062
1222
 
1063
1223
  /**
1064
- * @param {Object} arg - Arg object.
1065
- * @param {string} [arg.platform] - ID of the application
1066
- * @param {OAuthRequestSchema} arg.body
1067
- * @returns {Promise<AuthSuccess>} - Success response
1224
+ * @param {UserApplicationValidator.LoginWithGoogleIOSParam} arg - Arg object.
1225
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1226
+ * @param {import("../ApplicationAPIClient").Options} - Options
1227
+ * @returns {Promise<UserApplicationModel.AuthSuccess>} - Success response
1228
+ * @name loginWithGoogleIOS
1068
1229
  * @summary: Login or Register using Google on iOS
1069
- * @description: Use this API to login or register in iOS app using Google Account credentials.
1230
+ * @description: Use this API to login or register in iOS app using Google Account credentials. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/loginWithGoogleIOS/).
1070
1231
  */
1071
- async loginWithGoogleIOS({ body, platform } = {}) {
1072
- const { error } = UserValidator.loginWithGoogleIOS().validate(
1232
+ async loginWithGoogleIOS(
1233
+ { body, platform, requestHeaders } = { requestHeaders: {} },
1234
+ { responseHeaders } = { responseHeaders: false }
1235
+ ) {
1236
+ const { error } = UserApplicationValidator.loginWithGoogleIOS().validate(
1073
1237
  { body, platform },
1074
1238
  { abortEarly: false, allowUnknown: true }
1075
1239
  );
@@ -1078,16 +1242,17 @@ class User {
1078
1242
  }
1079
1243
 
1080
1244
  // Showing warrnings if extra unknown parameters are found
1081
- const { error: warrning } = UserValidator.loginWithGoogleIOS().validate(
1245
+ const {
1246
+ error: warrning,
1247
+ } = UserApplicationValidator.loginWithGoogleIOS().validate(
1082
1248
  { body, platform },
1083
1249
  { abortEarly: false, allowUnknown: false }
1084
1250
  );
1085
1251
  if (warrning) {
1086
1252
  Logger({
1087
1253
  level: "WARN",
1088
- message: "Parameter Validation warrnings for loginWithGoogleIOS",
1254
+ message: `Parameter Validation warrnings for application > User > loginWithGoogleIOS \n ${warrning}`,
1089
1255
  });
1090
- Logger({ level: "WARN", message: warrning });
1091
1256
  }
1092
1257
 
1093
1258
  const query_params = {};
@@ -1104,10 +1269,18 @@ class User {
1104
1269
  }),
1105
1270
  query_params,
1106
1271
  body,
1107
- xHeaders
1272
+ { ...xHeaders, ...requestHeaders },
1273
+ { responseHeaders }
1108
1274
  );
1109
1275
 
1110
- const { error: res_error } = UserModel.AuthSuccess().validate(response, {
1276
+ let responseData = response;
1277
+ if (responseHeaders) {
1278
+ responseData = response[0];
1279
+ }
1280
+
1281
+ const {
1282
+ error: res_error,
1283
+ } = UserApplicationModel.AuthSuccess().validate(responseData, {
1111
1284
  abortEarly: false,
1112
1285
  allowUnknown: false,
1113
1286
  });
@@ -1115,24 +1288,27 @@ class User {
1115
1288
  if (res_error) {
1116
1289
  Logger({
1117
1290
  level: "WARN",
1118
- message: "Response Validation Warnnings for loginWithGoogleIOS",
1291
+ message: `Response Validation Warnnings for application > User > loginWithGoogleIOS \n ${res_error}`,
1119
1292
  });
1120
- Logger({ level: "WARN", message: res_error });
1121
1293
  }
1122
1294
 
1123
1295
  return response;
1124
1296
  }
1125
1297
 
1126
1298
  /**
1127
- * @param {Object} arg - Arg object.
1128
- * @param {string} [arg.platform] - ID of the application
1129
- * @param {SendOtpRequestSchema} arg.body
1130
- * @returns {Promise<SendOtpResponse>} - Success response
1299
+ * @param {UserApplicationValidator.LoginWithOTPParam} arg - Arg object.
1300
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1301
+ * @param {import("../ApplicationAPIClient").Options} - Options
1302
+ * @returns {Promise<UserApplicationModel.SendOtpResponse>} - Success response
1303
+ * @name loginWithOTP
1131
1304
  * @summary: Login or Register with OTP
1132
- * @description: Use this API to login or register with a One-time Password (OTP) sent via Email or SMS.
1305
+ * @description: Use this API to login or register with a One-time Password (OTP) sent via Email or SMS. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/loginWithOTP/).
1133
1306
  */
1134
- async loginWithOTP({ body, platform } = {}) {
1135
- const { error } = UserValidator.loginWithOTP().validate(
1307
+ async loginWithOTP(
1308
+ { body, platform, requestHeaders } = { requestHeaders: {} },
1309
+ { responseHeaders } = { responseHeaders: false }
1310
+ ) {
1311
+ const { error } = UserApplicationValidator.loginWithOTP().validate(
1136
1312
  { body, platform },
1137
1313
  { abortEarly: false, allowUnknown: true }
1138
1314
  );
@@ -1141,16 +1317,17 @@ class User {
1141
1317
  }
1142
1318
 
1143
1319
  // Showing warrnings if extra unknown parameters are found
1144
- const { error: warrning } = UserValidator.loginWithOTP().validate(
1320
+ const {
1321
+ error: warrning,
1322
+ } = UserApplicationValidator.loginWithOTP().validate(
1145
1323
  { body, platform },
1146
1324
  { abortEarly: false, allowUnknown: false }
1147
1325
  );
1148
1326
  if (warrning) {
1149
1327
  Logger({
1150
1328
  level: "WARN",
1151
- message: "Parameter Validation warrnings for loginWithOTP",
1329
+ message: `Parameter Validation warrnings for application > User > loginWithOTP \n ${warrning}`,
1152
1330
  });
1153
- Logger({ level: "WARN", message: warrning });
1154
1331
  }
1155
1332
 
1156
1333
  const query_params = {};
@@ -1167,34 +1344,46 @@ class User {
1167
1344
  }),
1168
1345
  query_params,
1169
1346
  body,
1170
- xHeaders
1347
+ { ...xHeaders, ...requestHeaders },
1348
+ { responseHeaders }
1171
1349
  );
1172
1350
 
1173
- const { error: res_error } = UserModel.SendOtpResponse().validate(
1174
- response,
1175
- { abortEarly: false, allowUnknown: false }
1176
- );
1351
+ let responseData = response;
1352
+ if (responseHeaders) {
1353
+ responseData = response[0];
1354
+ }
1355
+
1356
+ const {
1357
+ error: res_error,
1358
+ } = UserApplicationModel.SendOtpResponse().validate(responseData, {
1359
+ abortEarly: false,
1360
+ allowUnknown: false,
1361
+ });
1177
1362
 
1178
1363
  if (res_error) {
1179
1364
  Logger({
1180
1365
  level: "WARN",
1181
- message: "Response Validation Warnnings for loginWithOTP",
1366
+ message: `Response Validation Warnnings for application > User > loginWithOTP \n ${res_error}`,
1182
1367
  });
1183
- Logger({ level: "WARN", message: res_error });
1184
1368
  }
1185
1369
 
1186
1370
  return response;
1187
1371
  }
1188
1372
 
1189
1373
  /**
1190
- * @param {Object} arg - Arg object.
1191
- * @param {TokenRequestBodySchema} arg.body
1192
- * @returns {Promise<LoginSuccess>} - Success response
1374
+ * @param {UserApplicationValidator.LoginWithTokenParam} arg - Arg object.
1375
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1376
+ * @param {import("../ApplicationAPIClient").Options} - Options
1377
+ * @returns {Promise<UserApplicationModel.LoginSuccess>} - Success response
1378
+ * @name loginWithToken
1193
1379
  * @summary: Login or Register with token
1194
- * @description: Use this API to login or register using a token for authentication.
1380
+ * @description: Use this API to login or register using a token for authentication. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/loginWithToken/).
1195
1381
  */
1196
- async loginWithToken({ body } = {}) {
1197
- const { error } = UserValidator.loginWithToken().validate(
1382
+ async loginWithToken(
1383
+ { body, requestHeaders } = { requestHeaders: {} },
1384
+ { responseHeaders } = { responseHeaders: false }
1385
+ ) {
1386
+ const { error } = UserApplicationValidator.loginWithToken().validate(
1198
1387
  { body },
1199
1388
  { abortEarly: false, allowUnknown: true }
1200
1389
  );
@@ -1203,16 +1392,17 @@ class User {
1203
1392
  }
1204
1393
 
1205
1394
  // Showing warrnings if extra unknown parameters are found
1206
- const { error: warrning } = UserValidator.loginWithToken().validate(
1395
+ const {
1396
+ error: warrning,
1397
+ } = UserApplicationValidator.loginWithToken().validate(
1207
1398
  { body },
1208
1399
  { abortEarly: false, allowUnknown: false }
1209
1400
  );
1210
1401
  if (warrning) {
1211
1402
  Logger({
1212
1403
  level: "WARN",
1213
- message: "Parameter Validation warrnings for loginWithToken",
1404
+ message: `Parameter Validation warrnings for application > User > loginWithToken \n ${warrning}`,
1214
1405
  });
1215
- Logger({ level: "WARN", message: warrning });
1216
1406
  }
1217
1407
 
1218
1408
  const query_params = {};
@@ -1228,10 +1418,18 @@ class User {
1228
1418
  }),
1229
1419
  query_params,
1230
1420
  body,
1231
- xHeaders
1421
+ { ...xHeaders, ...requestHeaders },
1422
+ { responseHeaders }
1232
1423
  );
1233
1424
 
1234
- const { error: res_error } = UserModel.LoginSuccess().validate(response, {
1425
+ let responseData = response;
1426
+ if (responseHeaders) {
1427
+ responseData = response[0];
1428
+ }
1429
+
1430
+ const {
1431
+ error: res_error,
1432
+ } = UserApplicationModel.LoginSuccess().validate(responseData, {
1235
1433
  abortEarly: false,
1236
1434
  allowUnknown: false,
1237
1435
  });
@@ -1239,22 +1437,27 @@ class User {
1239
1437
  if (res_error) {
1240
1438
  Logger({
1241
1439
  level: "WARN",
1242
- message: "Response Validation Warnnings for loginWithToken",
1440
+ message: `Response Validation Warnnings for application > User > loginWithToken \n ${res_error}`,
1243
1441
  });
1244
- Logger({ level: "WARN", message: res_error });
1245
1442
  }
1246
1443
 
1247
1444
  return response;
1248
1445
  }
1249
1446
 
1250
1447
  /**
1251
- * @param {Object} arg - Arg object.
1252
- * @returns {Promise<LogoutSuccess>} - Success response
1448
+ * @param {UserApplicationValidator.LogoutParam} arg - Arg object.
1449
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1450
+ * @param {import("../ApplicationAPIClient").Options} - Options
1451
+ * @returns {Promise<UserApplicationModel.LogoutSuccess>} - Success response
1452
+ * @name logout
1253
1453
  * @summary: Logs out currently logged in user
1254
- * @description: Use this API to check to logout a user from the app.
1454
+ * @description: Use this API to check to logout a user from the app. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/logout/).
1255
1455
  */
1256
- async logout({} = {}) {
1257
- const { error } = UserValidator.logout().validate(
1456
+ async logout(
1457
+ { requestHeaders } = { requestHeaders: {} },
1458
+ { responseHeaders } = { responseHeaders: false }
1459
+ ) {
1460
+ const { error } = UserApplicationValidator.logout().validate(
1258
1461
  {},
1259
1462
  { abortEarly: false, allowUnknown: true }
1260
1463
  );
@@ -1263,16 +1466,15 @@ class User {
1263
1466
  }
1264
1467
 
1265
1468
  // Showing warrnings if extra unknown parameters are found
1266
- const { error: warrning } = UserValidator.logout().validate(
1469
+ const { error: warrning } = UserApplicationValidator.logout().validate(
1267
1470
  {},
1268
1471
  { abortEarly: false, allowUnknown: false }
1269
1472
  );
1270
1473
  if (warrning) {
1271
1474
  Logger({
1272
1475
  level: "WARN",
1273
- message: "Parameter Validation warrnings for logout",
1476
+ message: `Parameter Validation warrnings for application > User > logout \n ${warrning}`,
1274
1477
  });
1275
- Logger({ level: "WARN", message: warrning });
1276
1478
  }
1277
1479
 
1278
1480
  const query_params = {};
@@ -1288,10 +1490,18 @@ class User {
1288
1490
  }),
1289
1491
  query_params,
1290
1492
  undefined,
1291
- xHeaders
1493
+ { ...xHeaders, ...requestHeaders },
1494
+ { responseHeaders }
1292
1495
  );
1293
1496
 
1294
- const { error: res_error } = UserModel.LogoutSuccess().validate(response, {
1497
+ let responseData = response;
1498
+ if (responseHeaders) {
1499
+ responseData = response[0];
1500
+ }
1501
+
1502
+ const {
1503
+ error: res_error,
1504
+ } = UserApplicationModel.LogoutSuccess().validate(responseData, {
1295
1505
  abortEarly: false,
1296
1506
  allowUnknown: false,
1297
1507
  });
@@ -1299,24 +1509,27 @@ class User {
1299
1509
  if (res_error) {
1300
1510
  Logger({
1301
1511
  level: "WARN",
1302
- message: "Response Validation Warnnings for logout",
1512
+ message: `Response Validation Warnnings for application > User > logout \n ${res_error}`,
1303
1513
  });
1304
- Logger({ level: "WARN", message: res_error });
1305
1514
  }
1306
1515
 
1307
1516
  return response;
1308
1517
  }
1309
1518
 
1310
1519
  /**
1311
- * @param {Object} arg - Arg object.
1312
- * @param {string} [arg.platform] - ID of the application
1313
- * @param {FormRegisterRequestSchema} arg.body
1314
- * @returns {Promise<RegisterFormSuccess>} - Success response
1520
+ * @param {UserApplicationValidator.RegisterWithFormParam} arg - Arg object.
1521
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1522
+ * @param {import("../ApplicationAPIClient").Options} - Options
1523
+ * @returns {Promise<UserApplicationModel.RegisterFormSuccess>} - Success response
1524
+ * @name registerWithForm
1315
1525
  * @summary: Registration using a form
1316
- * @description: Use this API to perform user registration by sending form data in the request body.
1526
+ * @description: Use this API to perform user registration by sending form data in the request body. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/registerWithForm/).
1317
1527
  */
1318
- async registerWithForm({ body, platform } = {}) {
1319
- const { error } = UserValidator.registerWithForm().validate(
1528
+ async registerWithForm(
1529
+ { body, platform, requestHeaders } = { requestHeaders: {} },
1530
+ { responseHeaders } = { responseHeaders: false }
1531
+ ) {
1532
+ const { error } = UserApplicationValidator.registerWithForm().validate(
1320
1533
  { body, platform },
1321
1534
  { abortEarly: false, allowUnknown: true }
1322
1535
  );
@@ -1325,16 +1538,17 @@ class User {
1325
1538
  }
1326
1539
 
1327
1540
  // Showing warrnings if extra unknown parameters are found
1328
- const { error: warrning } = UserValidator.registerWithForm().validate(
1541
+ const {
1542
+ error: warrning,
1543
+ } = UserApplicationValidator.registerWithForm().validate(
1329
1544
  { body, platform },
1330
1545
  { abortEarly: false, allowUnknown: false }
1331
1546
  );
1332
1547
  if (warrning) {
1333
1548
  Logger({
1334
1549
  level: "WARN",
1335
- message: "Parameter Validation warrnings for registerWithForm",
1550
+ message: `Parameter Validation warrnings for application > User > registerWithForm \n ${warrning}`,
1336
1551
  });
1337
- Logger({ level: "WARN", message: warrning });
1338
1552
  }
1339
1553
 
1340
1554
  const query_params = {};
@@ -1351,12 +1565,18 @@ class User {
1351
1565
  }),
1352
1566
  query_params,
1353
1567
  body,
1354
- xHeaders
1568
+ { ...xHeaders, ...requestHeaders },
1569
+ { responseHeaders }
1355
1570
  );
1356
1571
 
1572
+ let responseData = response;
1573
+ if (responseHeaders) {
1574
+ responseData = response[0];
1575
+ }
1576
+
1357
1577
  const {
1358
1578
  error: res_error,
1359
- } = UserModel.RegisterFormSuccess().validate(response, {
1579
+ } = UserApplicationModel.RegisterFormSuccess().validate(responseData, {
1360
1580
  abortEarly: false,
1361
1581
  allowUnknown: false,
1362
1582
  });
@@ -1364,24 +1584,27 @@ class User {
1364
1584
  if (res_error) {
1365
1585
  Logger({
1366
1586
  level: "WARN",
1367
- message: "Response Validation Warnnings for registerWithForm",
1587
+ message: `Response Validation Warnnings for application > User > registerWithForm \n ${res_error}`,
1368
1588
  });
1369
- Logger({ level: "WARN", message: res_error });
1370
1589
  }
1371
1590
 
1372
1591
  return response;
1373
1592
  }
1374
1593
 
1375
1594
  /**
1376
- * @param {Object} arg - Arg object.
1377
- * @param {string} [arg.platform] - ID of the application
1378
- * @param {SendEmailOtpRequestSchema} arg.body
1379
- * @returns {Promise<EmailOtpSuccess>} - Success response
1595
+ * @param {UserApplicationValidator.SendOTPOnEmailParam} arg - Arg object.
1596
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1597
+ * @param {import("../ApplicationAPIClient").Options} - Options
1598
+ * @returns {Promise<UserApplicationModel.EmailOtpSuccess>} - Success response
1599
+ * @name sendOTPOnEmail
1380
1600
  * @summary: Send OTP on email
1381
- * @description: Use this API to send an OTP to an email ID.
1601
+ * @description: Use this API to send an OTP to an email ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/sendOTPOnEmail/).
1382
1602
  */
1383
- async sendOTPOnEmail({ body, platform } = {}) {
1384
- const { error } = UserValidator.sendOTPOnEmail().validate(
1603
+ async sendOTPOnEmail(
1604
+ { body, platform, requestHeaders } = { requestHeaders: {} },
1605
+ { responseHeaders } = { responseHeaders: false }
1606
+ ) {
1607
+ const { error } = UserApplicationValidator.sendOTPOnEmail().validate(
1385
1608
  { body, platform },
1386
1609
  { abortEarly: false, allowUnknown: true }
1387
1610
  );
@@ -1390,16 +1613,17 @@ class User {
1390
1613
  }
1391
1614
 
1392
1615
  // Showing warrnings if extra unknown parameters are found
1393
- const { error: warrning } = UserValidator.sendOTPOnEmail().validate(
1616
+ const {
1617
+ error: warrning,
1618
+ } = UserApplicationValidator.sendOTPOnEmail().validate(
1394
1619
  { body, platform },
1395
1620
  { abortEarly: false, allowUnknown: false }
1396
1621
  );
1397
1622
  if (warrning) {
1398
1623
  Logger({
1399
1624
  level: "WARN",
1400
- message: "Parameter Validation warrnings for sendOTPOnEmail",
1625
+ message: `Parameter Validation warrnings for application > User > sendOTPOnEmail \n ${warrning}`,
1401
1626
  });
1402
- Logger({ level: "WARN", message: warrning });
1403
1627
  }
1404
1628
 
1405
1629
  const query_params = {};
@@ -1416,35 +1640,46 @@ class User {
1416
1640
  }),
1417
1641
  query_params,
1418
1642
  body,
1419
- xHeaders
1643
+ { ...xHeaders, ...requestHeaders },
1644
+ { responseHeaders }
1420
1645
  );
1421
1646
 
1422
- const { error: res_error } = UserModel.EmailOtpSuccess().validate(
1423
- response,
1424
- { abortEarly: false, allowUnknown: false }
1425
- );
1647
+ let responseData = response;
1648
+ if (responseHeaders) {
1649
+ responseData = response[0];
1650
+ }
1651
+
1652
+ const {
1653
+ error: res_error,
1654
+ } = UserApplicationModel.EmailOtpSuccess().validate(responseData, {
1655
+ abortEarly: false,
1656
+ allowUnknown: false,
1657
+ });
1426
1658
 
1427
1659
  if (res_error) {
1428
1660
  Logger({
1429
1661
  level: "WARN",
1430
- message: "Response Validation Warnnings for sendOTPOnEmail",
1662
+ message: `Response Validation Warnnings for application > User > sendOTPOnEmail \n ${res_error}`,
1431
1663
  });
1432
- Logger({ level: "WARN", message: res_error });
1433
1664
  }
1434
1665
 
1435
1666
  return response;
1436
1667
  }
1437
1668
 
1438
1669
  /**
1439
- * @param {Object} arg - Arg object.
1440
- * @param {string} [arg.platform] - ID of the application
1441
- * @param {SendMobileOtpRequestSchema} arg.body
1442
- * @returns {Promise<OtpSuccess>} - Success response
1670
+ * @param {UserApplicationValidator.SendOTPOnMobileParam} arg - Arg object.
1671
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1672
+ * @param {import("../ApplicationAPIClient").Options} - Options
1673
+ * @returns {Promise<UserApplicationModel.OtpSuccess>} - Success response
1674
+ * @name sendOTPOnMobile
1443
1675
  * @summary: Send OTP on mobile
1444
- * @description: Use this API to send an OTP to a mobile number.
1676
+ * @description: Use this API to send an OTP to a mobile number. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/sendOTPOnMobile/).
1445
1677
  */
1446
- async sendOTPOnMobile({ body, platform } = {}) {
1447
- const { error } = UserValidator.sendOTPOnMobile().validate(
1678
+ async sendOTPOnMobile(
1679
+ { body, platform, requestHeaders } = { requestHeaders: {} },
1680
+ { responseHeaders } = { responseHeaders: false }
1681
+ ) {
1682
+ const { error } = UserApplicationValidator.sendOTPOnMobile().validate(
1448
1683
  { body, platform },
1449
1684
  { abortEarly: false, allowUnknown: true }
1450
1685
  );
@@ -1453,16 +1688,17 @@ class User {
1453
1688
  }
1454
1689
 
1455
1690
  // Showing warrnings if extra unknown parameters are found
1456
- const { error: warrning } = UserValidator.sendOTPOnMobile().validate(
1691
+ const {
1692
+ error: warrning,
1693
+ } = UserApplicationValidator.sendOTPOnMobile().validate(
1457
1694
  { body, platform },
1458
1695
  { abortEarly: false, allowUnknown: false }
1459
1696
  );
1460
1697
  if (warrning) {
1461
1698
  Logger({
1462
1699
  level: "WARN",
1463
- message: "Parameter Validation warrnings for sendOTPOnMobile",
1700
+ message: `Parameter Validation warrnings for application > User > sendOTPOnMobile \n ${warrning}`,
1464
1701
  });
1465
- Logger({ level: "WARN", message: warrning });
1466
1702
  }
1467
1703
 
1468
1704
  const query_params = {};
@@ -1479,10 +1715,18 @@ class User {
1479
1715
  }),
1480
1716
  query_params,
1481
1717
  body,
1482
- xHeaders
1718
+ { ...xHeaders, ...requestHeaders },
1719
+ { responseHeaders }
1483
1720
  );
1484
1721
 
1485
- const { error: res_error } = UserModel.OtpSuccess().validate(response, {
1722
+ let responseData = response;
1723
+ if (responseHeaders) {
1724
+ responseData = response[0];
1725
+ }
1726
+
1727
+ const {
1728
+ error: res_error,
1729
+ } = UserApplicationModel.OtpSuccess().validate(responseData, {
1486
1730
  abortEarly: false,
1487
1731
  allowUnknown: false,
1488
1732
  });
@@ -1490,24 +1734,29 @@ class User {
1490
1734
  if (res_error) {
1491
1735
  Logger({
1492
1736
  level: "WARN",
1493
- message: "Response Validation Warnnings for sendOTPOnMobile",
1737
+ message: `Response Validation Warnnings for application > User > sendOTPOnMobile \n ${res_error}`,
1494
1738
  });
1495
- Logger({ level: "WARN", message: res_error });
1496
1739
  }
1497
1740
 
1498
1741
  return response;
1499
1742
  }
1500
1743
 
1501
1744
  /**
1502
- * @param {Object} arg - Arg object.
1503
- * @param {string} [arg.platform] - ID of the application
1504
- * @param {SendResetPasswordEmailRequestSchema} arg.body
1505
- * @returns {Promise<ResetPasswordSuccess>} - Success response
1745
+ * @param {UserApplicationValidator.SendResetPasswordEmailParam} arg - Arg object.
1746
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1747
+ * @param {import("../ApplicationAPIClient").Options} - Options
1748
+ * @returns {Promise<UserApplicationModel.ResetPasswordSuccess>} - Success response
1749
+ * @name sendResetPasswordEmail
1506
1750
  * @summary: Reset Password
1507
- * @description: Use this API to reset a password using the link sent on email.
1751
+ * @description: Use this API to reset a password using the link sent on email. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/sendResetPasswordEmail/).
1508
1752
  */
1509
- async sendResetPasswordEmail({ body, platform } = {}) {
1510
- const { error } = UserValidator.sendResetPasswordEmail().validate(
1753
+ async sendResetPasswordEmail(
1754
+ { body, platform, requestHeaders } = { requestHeaders: {} },
1755
+ { responseHeaders } = { responseHeaders: false }
1756
+ ) {
1757
+ const {
1758
+ error,
1759
+ } = UserApplicationValidator.sendResetPasswordEmail().validate(
1511
1760
  { body, platform },
1512
1761
  { abortEarly: false, allowUnknown: true }
1513
1762
  );
@@ -1516,16 +1765,17 @@ class User {
1516
1765
  }
1517
1766
 
1518
1767
  // Showing warrnings if extra unknown parameters are found
1519
- const { error: warrning } = UserValidator.sendResetPasswordEmail().validate(
1768
+ const {
1769
+ error: warrning,
1770
+ } = UserApplicationValidator.sendResetPasswordEmail().validate(
1520
1771
  { body, platform },
1521
1772
  { abortEarly: false, allowUnknown: false }
1522
1773
  );
1523
1774
  if (warrning) {
1524
1775
  Logger({
1525
1776
  level: "WARN",
1526
- message: "Parameter Validation warrnings for sendResetPasswordEmail",
1777
+ message: `Parameter Validation warrnings for application > User > sendResetPasswordEmail \n ${warrning}`,
1527
1778
  });
1528
- Logger({ level: "WARN", message: warrning });
1529
1779
  }
1530
1780
 
1531
1781
  const query_params = {};
@@ -1542,12 +1792,18 @@ class User {
1542
1792
  }),
1543
1793
  query_params,
1544
1794
  body,
1545
- xHeaders
1795
+ { ...xHeaders, ...requestHeaders },
1796
+ { responseHeaders }
1546
1797
  );
1547
1798
 
1799
+ let responseData = response;
1800
+ if (responseHeaders) {
1801
+ responseData = response[0];
1802
+ }
1803
+
1548
1804
  const {
1549
1805
  error: res_error,
1550
- } = UserModel.ResetPasswordSuccess().validate(response, {
1806
+ } = UserApplicationModel.ResetPasswordSuccess().validate(responseData, {
1551
1807
  abortEarly: false,
1552
1808
  allowUnknown: false,
1553
1809
  });
@@ -1555,24 +1811,29 @@ class User {
1555
1811
  if (res_error) {
1556
1812
  Logger({
1557
1813
  level: "WARN",
1558
- message: "Response Validation Warnnings for sendResetPasswordEmail",
1814
+ message: `Response Validation Warnnings for application > User > sendResetPasswordEmail \n ${res_error}`,
1559
1815
  });
1560
- Logger({ level: "WARN", message: res_error });
1561
1816
  }
1562
1817
 
1563
1818
  return response;
1564
1819
  }
1565
1820
 
1566
1821
  /**
1567
- * @param {Object} arg - Arg object.
1568
- * @param {string} [arg.platform] - ID of the application
1569
- * @param {SendResetPasswordMobileRequestSchema} arg.body
1570
- * @returns {Promise<ResetPasswordSuccess>} - Success response
1822
+ * @param {UserApplicationValidator.SendResetPasswordMobileParam} arg - Arg object.
1823
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1824
+ * @param {import("../ApplicationAPIClient").Options} - Options
1825
+ * @returns {Promise<UserApplicationModel.ResetPasswordSuccess>} - Success response
1826
+ * @name sendResetPasswordMobile
1571
1827
  * @summary: Reset Password
1572
- * @description: Use this API to reset a password using the link sent on mobile.
1828
+ * @description: Use this API to reset a password using the link sent on mobile. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/sendResetPasswordMobile/).
1573
1829
  */
1574
- async sendResetPasswordMobile({ body, platform } = {}) {
1575
- const { error } = UserValidator.sendResetPasswordMobile().validate(
1830
+ async sendResetPasswordMobile(
1831
+ { body, platform, requestHeaders } = { requestHeaders: {} },
1832
+ { responseHeaders } = { responseHeaders: false }
1833
+ ) {
1834
+ const {
1835
+ error,
1836
+ } = UserApplicationValidator.sendResetPasswordMobile().validate(
1576
1837
  { body, platform },
1577
1838
  { abortEarly: false, allowUnknown: true }
1578
1839
  );
@@ -1583,16 +1844,15 @@ class User {
1583
1844
  // Showing warrnings if extra unknown parameters are found
1584
1845
  const {
1585
1846
  error: warrning,
1586
- } = UserValidator.sendResetPasswordMobile().validate(
1847
+ } = UserApplicationValidator.sendResetPasswordMobile().validate(
1587
1848
  { body, platform },
1588
1849
  { abortEarly: false, allowUnknown: false }
1589
1850
  );
1590
1851
  if (warrning) {
1591
1852
  Logger({
1592
1853
  level: "WARN",
1593
- message: "Parameter Validation warrnings for sendResetPasswordMobile",
1854
+ message: `Parameter Validation warrnings for application > User > sendResetPasswordMobile \n ${warrning}`,
1594
1855
  });
1595
- Logger({ level: "WARN", message: warrning });
1596
1856
  }
1597
1857
 
1598
1858
  const query_params = {};
@@ -1609,12 +1869,18 @@ class User {
1609
1869
  }),
1610
1870
  query_params,
1611
1871
  body,
1612
- xHeaders
1872
+ { ...xHeaders, ...requestHeaders },
1873
+ { responseHeaders }
1613
1874
  );
1614
1875
 
1876
+ let responseData = response;
1877
+ if (responseHeaders) {
1878
+ responseData = response[0];
1879
+ }
1880
+
1615
1881
  const {
1616
1882
  error: res_error,
1617
- } = UserModel.ResetPasswordSuccess().validate(response, {
1883
+ } = UserApplicationModel.ResetPasswordSuccess().validate(responseData, {
1618
1884
  abortEarly: false,
1619
1885
  allowUnknown: false,
1620
1886
  });
@@ -1622,23 +1888,27 @@ class User {
1622
1888
  if (res_error) {
1623
1889
  Logger({
1624
1890
  level: "WARN",
1625
- message: "Response Validation Warnnings for sendResetPasswordMobile",
1891
+ message: `Response Validation Warnnings for application > User > sendResetPasswordMobile \n ${res_error}`,
1626
1892
  });
1627
- Logger({ level: "WARN", message: res_error });
1628
1893
  }
1629
1894
 
1630
1895
  return response;
1631
1896
  }
1632
1897
 
1633
1898
  /**
1634
- * @param {Object} arg - Arg object.
1635
- * @param {CodeRequestBodySchema} arg.body
1636
- * @returns {Promise<ResetPasswordSuccess>} - Success response
1899
+ * @param {UserApplicationValidator.SendResetTokenParam} arg - Arg object.
1900
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1901
+ * @param {import("../ApplicationAPIClient").Options} - Options
1902
+ * @returns {Promise<UserApplicationModel.ResetPasswordSuccess>} - Success response
1903
+ * @name sendResetToken
1637
1904
  * @summary: Reset Password using token
1638
- * @description: Use this API to send code to reset password.
1905
+ * @description: Use this API to send code to reset password. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/sendResetToken/).
1639
1906
  */
1640
- async sendResetToken({ body } = {}) {
1641
- const { error } = UserValidator.sendResetToken().validate(
1907
+ async sendResetToken(
1908
+ { body, requestHeaders } = { requestHeaders: {} },
1909
+ { responseHeaders } = { responseHeaders: false }
1910
+ ) {
1911
+ const { error } = UserApplicationValidator.sendResetToken().validate(
1642
1912
  { body },
1643
1913
  { abortEarly: false, allowUnknown: true }
1644
1914
  );
@@ -1647,16 +1917,17 @@ class User {
1647
1917
  }
1648
1918
 
1649
1919
  // Showing warrnings if extra unknown parameters are found
1650
- const { error: warrning } = UserValidator.sendResetToken().validate(
1920
+ const {
1921
+ error: warrning,
1922
+ } = UserApplicationValidator.sendResetToken().validate(
1651
1923
  { body },
1652
1924
  { abortEarly: false, allowUnknown: false }
1653
1925
  );
1654
1926
  if (warrning) {
1655
1927
  Logger({
1656
1928
  level: "WARN",
1657
- message: "Parameter Validation warrnings for sendResetToken",
1929
+ message: `Parameter Validation warrnings for application > User > sendResetToken \n ${warrning}`,
1658
1930
  });
1659
- Logger({ level: "WARN", message: warrning });
1660
1931
  }
1661
1932
 
1662
1933
  const query_params = {};
@@ -1672,12 +1943,18 @@ class User {
1672
1943
  }),
1673
1944
  query_params,
1674
1945
  body,
1675
- xHeaders
1946
+ { ...xHeaders, ...requestHeaders },
1947
+ { responseHeaders }
1676
1948
  );
1677
1949
 
1950
+ let responseData = response;
1951
+ if (responseHeaders) {
1952
+ responseData = response[0];
1953
+ }
1954
+
1678
1955
  const {
1679
1956
  error: res_error,
1680
- } = UserModel.ResetPasswordSuccess().validate(response, {
1957
+ } = UserApplicationModel.ResetPasswordSuccess().validate(responseData, {
1681
1958
  abortEarly: false,
1682
1959
  allowUnknown: false,
1683
1960
  });
@@ -1685,24 +1962,31 @@ class User {
1685
1962
  if (res_error) {
1686
1963
  Logger({
1687
1964
  level: "WARN",
1688
- message: "Response Validation Warnnings for sendResetToken",
1965
+ message: `Response Validation Warnnings for application > User > sendResetToken \n ${res_error}`,
1689
1966
  });
1690
- Logger({ level: "WARN", message: res_error });
1691
1967
  }
1692
1968
 
1693
1969
  return response;
1694
1970
  }
1695
1971
 
1696
1972
  /**
1697
- * @param {Object} arg - Arg object.
1698
- * @param {string} [arg.platform] - ID of the application
1699
- * @param {EditEmailRequestSchema} arg.body
1700
- * @returns {Promise<SendEmailVerifyLinkSuccess>} - Success response
1973
+ * @param {UserApplicationValidator.SendVerificationLinkToEmailParam} arg -
1974
+ * Arg object.
1975
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1976
+ * @param {import("../ApplicationAPIClient").Options} - Options
1977
+ * @returns {Promise<UserApplicationModel.SendEmailVerifyLinkSuccess>} -
1978
+ * Success response
1979
+ * @name sendVerificationLinkToEmail
1701
1980
  * @summary: Send verification link to email
1702
- * @description: Use this API to send verification link to an email address.
1981
+ * @description: Use this API to send verification link to an email address. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/sendVerificationLinkToEmail/).
1703
1982
  */
1704
- async sendVerificationLinkToEmail({ body, platform } = {}) {
1705
- const { error } = UserValidator.sendVerificationLinkToEmail().validate(
1983
+ async sendVerificationLinkToEmail(
1984
+ { body, platform, requestHeaders } = { requestHeaders: {} },
1985
+ { responseHeaders } = { responseHeaders: false }
1986
+ ) {
1987
+ const {
1988
+ error,
1989
+ } = UserApplicationValidator.sendVerificationLinkToEmail().validate(
1706
1990
  { body, platform },
1707
1991
  { abortEarly: false, allowUnknown: true }
1708
1992
  );
@@ -1713,17 +1997,15 @@ class User {
1713
1997
  // Showing warrnings if extra unknown parameters are found
1714
1998
  const {
1715
1999
  error: warrning,
1716
- } = UserValidator.sendVerificationLinkToEmail().validate(
2000
+ } = UserApplicationValidator.sendVerificationLinkToEmail().validate(
1717
2001
  { body, platform },
1718
2002
  { abortEarly: false, allowUnknown: false }
1719
2003
  );
1720
2004
  if (warrning) {
1721
2005
  Logger({
1722
2006
  level: "WARN",
1723
- message:
1724
- "Parameter Validation warrnings for sendVerificationLinkToEmail",
2007
+ message: `Parameter Validation warrnings for application > User > sendVerificationLinkToEmail \n ${warrning}`,
1725
2008
  });
1726
- Logger({ level: "WARN", message: warrning });
1727
2009
  }
1728
2010
 
1729
2011
  const query_params = {};
@@ -1740,38 +2022,51 @@ class User {
1740
2022
  }),
1741
2023
  query_params,
1742
2024
  body,
1743
- xHeaders
2025
+ { ...xHeaders, ...requestHeaders },
2026
+ { responseHeaders }
1744
2027
  );
1745
2028
 
2029
+ let responseData = response;
2030
+ if (responseHeaders) {
2031
+ responseData = response[0];
2032
+ }
2033
+
1746
2034
  const {
1747
2035
  error: res_error,
1748
- } = UserModel.SendEmailVerifyLinkSuccess().validate(response, {
1749
- abortEarly: false,
1750
- allowUnknown: false,
1751
- });
2036
+ } = UserApplicationModel.SendEmailVerifyLinkSuccess().validate(
2037
+ responseData,
2038
+ { abortEarly: false, allowUnknown: false }
2039
+ );
1752
2040
 
1753
2041
  if (res_error) {
1754
2042
  Logger({
1755
2043
  level: "WARN",
1756
- message:
1757
- "Response Validation Warnnings for sendVerificationLinkToEmail",
2044
+ message: `Response Validation Warnnings for application > User > sendVerificationLinkToEmail \n ${res_error}`,
1758
2045
  });
1759
- Logger({ level: "WARN", message: res_error });
1760
2046
  }
1761
2047
 
1762
2048
  return response;
1763
2049
  }
1764
2050
 
1765
2051
  /**
1766
- * @param {Object} arg - Arg object.
1767
- * @param {string} [arg.platform] - ID of the application
1768
- * @param {SendVerificationLinkMobileRequestSchema} arg.body
1769
- * @returns {Promise<SendMobileVerifyLinkSuccess>} - Success response
2052
+ * @param {UserApplicationValidator.SendVerificationLinkToMobileParam} arg
2053
+ * - Arg object.
2054
+ *
2055
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2056
+ * @param {import("../ApplicationAPIClient").Options} - Options
2057
+ * @returns {Promise<UserApplicationModel.SendMobileVerifyLinkSuccess>} -
2058
+ * Success response
2059
+ * @name sendVerificationLinkToMobile
1770
2060
  * @summary: Send verification link to mobile
1771
- * @description: Use this API to send a verification link to a mobile number
2061
+ * @description: Use this API to send a verification link to a mobile number - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/sendVerificationLinkToMobile/).
1772
2062
  */
1773
- async sendVerificationLinkToMobile({ body, platform } = {}) {
1774
- const { error } = UserValidator.sendVerificationLinkToMobile().validate(
2063
+ async sendVerificationLinkToMobile(
2064
+ { body, platform, requestHeaders } = { requestHeaders: {} },
2065
+ { responseHeaders } = { responseHeaders: false }
2066
+ ) {
2067
+ const {
2068
+ error,
2069
+ } = UserApplicationValidator.sendVerificationLinkToMobile().validate(
1775
2070
  { body, platform },
1776
2071
  { abortEarly: false, allowUnknown: true }
1777
2072
  );
@@ -1782,17 +2077,15 @@ class User {
1782
2077
  // Showing warrnings if extra unknown parameters are found
1783
2078
  const {
1784
2079
  error: warrning,
1785
- } = UserValidator.sendVerificationLinkToMobile().validate(
2080
+ } = UserApplicationValidator.sendVerificationLinkToMobile().validate(
1786
2081
  { body, platform },
1787
2082
  { abortEarly: false, allowUnknown: false }
1788
2083
  );
1789
2084
  if (warrning) {
1790
2085
  Logger({
1791
2086
  level: "WARN",
1792
- message:
1793
- "Parameter Validation warrnings for sendVerificationLinkToMobile",
2087
+ message: `Parameter Validation warrnings for application > User > sendVerificationLinkToMobile \n ${warrning}`,
1794
2088
  });
1795
- Logger({ level: "WARN", message: warrning });
1796
2089
  }
1797
2090
 
1798
2091
  const query_params = {};
@@ -1809,37 +2102,46 @@ class User {
1809
2102
  }),
1810
2103
  query_params,
1811
2104
  body,
1812
- xHeaders
2105
+ { ...xHeaders, ...requestHeaders },
2106
+ { responseHeaders }
1813
2107
  );
1814
2108
 
2109
+ let responseData = response;
2110
+ if (responseHeaders) {
2111
+ responseData = response[0];
2112
+ }
2113
+
1815
2114
  const {
1816
2115
  error: res_error,
1817
- } = UserModel.SendMobileVerifyLinkSuccess().validate(response, {
1818
- abortEarly: false,
1819
- allowUnknown: false,
1820
- });
2116
+ } = UserApplicationModel.SendMobileVerifyLinkSuccess().validate(
2117
+ responseData,
2118
+ { abortEarly: false, allowUnknown: false }
2119
+ );
1821
2120
 
1822
2121
  if (res_error) {
1823
2122
  Logger({
1824
2123
  level: "WARN",
1825
- message:
1826
- "Response Validation Warnnings for sendVerificationLinkToMobile",
2124
+ message: `Response Validation Warnnings for application > User > sendVerificationLinkToMobile \n ${res_error}`,
1827
2125
  });
1828
- Logger({ level: "WARN", message: res_error });
1829
2126
  }
1830
2127
 
1831
2128
  return response;
1832
2129
  }
1833
2130
 
1834
2131
  /**
1835
- * @param {Object} arg - Arg object.
1836
- * @param {EditEmailRequestSchema} arg.body
1837
- * @returns {Promise<LoginSuccess>} - Success response
2132
+ * @param {UserApplicationValidator.SetEmailAsPrimaryParam} arg - Arg object.
2133
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2134
+ * @param {import("../ApplicationAPIClient").Options} - Options
2135
+ * @returns {Promise<UserApplicationModel.LoginSuccess>} - Success response
2136
+ * @name setEmailAsPrimary
1838
2137
  * @summary: Set email as primary
1839
- * @description: Use this API to set an email address as primary. Primary email ID is a email address used for all future communications.
2138
+ * @description: Use this API to set an email address as primary. Primary email ID is a email address used for all future communications. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/setEmailAsPrimary/).
1840
2139
  */
1841
- async setEmailAsPrimary({ body } = {}) {
1842
- const { error } = UserValidator.setEmailAsPrimary().validate(
2140
+ async setEmailAsPrimary(
2141
+ { body, requestHeaders } = { requestHeaders: {} },
2142
+ { responseHeaders } = { responseHeaders: false }
2143
+ ) {
2144
+ const { error } = UserApplicationValidator.setEmailAsPrimary().validate(
1843
2145
  { body },
1844
2146
  { abortEarly: false, allowUnknown: true }
1845
2147
  );
@@ -1848,16 +2150,17 @@ class User {
1848
2150
  }
1849
2151
 
1850
2152
  // Showing warrnings if extra unknown parameters are found
1851
- const { error: warrning } = UserValidator.setEmailAsPrimary().validate(
2153
+ const {
2154
+ error: warrning,
2155
+ } = UserApplicationValidator.setEmailAsPrimary().validate(
1852
2156
  { body },
1853
2157
  { abortEarly: false, allowUnknown: false }
1854
2158
  );
1855
2159
  if (warrning) {
1856
2160
  Logger({
1857
2161
  level: "WARN",
1858
- message: "Parameter Validation warrnings for setEmailAsPrimary",
2162
+ message: `Parameter Validation warrnings for application > User > setEmailAsPrimary \n ${warrning}`,
1859
2163
  });
1860
- Logger({ level: "WARN", message: warrning });
1861
2164
  }
1862
2165
 
1863
2166
  const query_params = {};
@@ -1873,10 +2176,18 @@ class User {
1873
2176
  }),
1874
2177
  query_params,
1875
2178
  body,
1876
- xHeaders
2179
+ { ...xHeaders, ...requestHeaders },
2180
+ { responseHeaders }
1877
2181
  );
1878
2182
 
1879
- const { error: res_error } = UserModel.LoginSuccess().validate(response, {
2183
+ let responseData = response;
2184
+ if (responseHeaders) {
2185
+ responseData = response[0];
2186
+ }
2187
+
2188
+ const {
2189
+ error: res_error,
2190
+ } = UserApplicationModel.LoginSuccess().validate(responseData, {
1880
2191
  abortEarly: false,
1881
2192
  allowUnknown: false,
1882
2193
  });
@@ -1884,23 +2195,29 @@ class User {
1884
2195
  if (res_error) {
1885
2196
  Logger({
1886
2197
  level: "WARN",
1887
- message: "Response Validation Warnnings for setEmailAsPrimary",
2198
+ message: `Response Validation Warnnings for application > User > setEmailAsPrimary \n ${res_error}`,
1888
2199
  });
1889
- Logger({ level: "WARN", message: res_error });
1890
2200
  }
1891
2201
 
1892
2202
  return response;
1893
2203
  }
1894
2204
 
1895
2205
  /**
1896
- * @param {Object} arg - Arg object.
1897
- * @param {SendVerificationLinkMobileRequestSchema} arg.body
1898
- * @returns {Promise<LoginSuccess>} - Success response
2206
+ * @param {UserApplicationValidator.SetMobileNumberAsPrimaryParam} arg - Arg object.
2207
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2208
+ * @param {import("../ApplicationAPIClient").Options} - Options
2209
+ * @returns {Promise<UserApplicationModel.LoginSuccess>} - Success response
2210
+ * @name setMobileNumberAsPrimary
1899
2211
  * @summary: Set mobile as primary
1900
- * @description: Use this API to set a mobile number as primary. Primary number is a verified number used for all future communications.
2212
+ * @description: Use this API to set a mobile number as primary. Primary number is a verified number used for all future communications. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/setMobileNumberAsPrimary/).
1901
2213
  */
1902
- async setMobileNumberAsPrimary({ body } = {}) {
1903
- const { error } = UserValidator.setMobileNumberAsPrimary().validate(
2214
+ async setMobileNumberAsPrimary(
2215
+ { body, requestHeaders } = { requestHeaders: {} },
2216
+ { responseHeaders } = { responseHeaders: false }
2217
+ ) {
2218
+ const {
2219
+ error,
2220
+ } = UserApplicationValidator.setMobileNumberAsPrimary().validate(
1904
2221
  { body },
1905
2222
  { abortEarly: false, allowUnknown: true }
1906
2223
  );
@@ -1911,16 +2228,15 @@ class User {
1911
2228
  // Showing warrnings if extra unknown parameters are found
1912
2229
  const {
1913
2230
  error: warrning,
1914
- } = UserValidator.setMobileNumberAsPrimary().validate(
2231
+ } = UserApplicationValidator.setMobileNumberAsPrimary().validate(
1915
2232
  { body },
1916
2233
  { abortEarly: false, allowUnknown: false }
1917
2234
  );
1918
2235
  if (warrning) {
1919
2236
  Logger({
1920
2237
  level: "WARN",
1921
- message: "Parameter Validation warrnings for setMobileNumberAsPrimary",
2238
+ message: `Parameter Validation warrnings for application > User > setMobileNumberAsPrimary \n ${warrning}`,
1922
2239
  });
1923
- Logger({ level: "WARN", message: warrning });
1924
2240
  }
1925
2241
 
1926
2242
  const query_params = {};
@@ -1936,10 +2252,18 @@ class User {
1936
2252
  }),
1937
2253
  query_params,
1938
2254
  body,
1939
- xHeaders
2255
+ { ...xHeaders, ...requestHeaders },
2256
+ { responseHeaders }
1940
2257
  );
1941
2258
 
1942
- const { error: res_error } = UserModel.LoginSuccess().validate(response, {
2259
+ let responseData = response;
2260
+ if (responseHeaders) {
2261
+ responseData = response[0];
2262
+ }
2263
+
2264
+ const {
2265
+ error: res_error,
2266
+ } = UserApplicationModel.LoginSuccess().validate(responseData, {
1943
2267
  abortEarly: false,
1944
2268
  allowUnknown: false,
1945
2269
  });
@@ -1947,23 +2271,27 @@ class User {
1947
2271
  if (res_error) {
1948
2272
  Logger({
1949
2273
  level: "WARN",
1950
- message: "Response Validation Warnnings for setMobileNumberAsPrimary",
2274
+ message: `Response Validation Warnnings for application > User > setMobileNumberAsPrimary \n ${res_error}`,
1951
2275
  });
1952
- Logger({ level: "WARN", message: res_error });
1953
2276
  }
1954
2277
 
1955
2278
  return response;
1956
2279
  }
1957
2280
 
1958
2281
  /**
1959
- * @param {Object} arg - Arg object.
1960
- * @param {UpdatePasswordRequestSchema} arg.body
1961
- * @returns {Promise<VerifyEmailSuccess>} - Success response
2282
+ * @param {UserApplicationValidator.UpdatePasswordParam} arg - Arg object.
2283
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2284
+ * @param {import("../ApplicationAPIClient").Options} - Options
2285
+ * @returns {Promise<UserApplicationModel.VerifyEmailSuccess>} - Success response
2286
+ * @name updatePassword
1962
2287
  * @summary: Update user password
1963
- * @description: Use this API to update the password.
2288
+ * @description: Use this API to update the password. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/updatePassword/).
1964
2289
  */
1965
- async updatePassword({ body } = {}) {
1966
- const { error } = UserValidator.updatePassword().validate(
2290
+ async updatePassword(
2291
+ { body, requestHeaders } = { requestHeaders: {} },
2292
+ { responseHeaders } = { responseHeaders: false }
2293
+ ) {
2294
+ const { error } = UserApplicationValidator.updatePassword().validate(
1967
2295
  { body },
1968
2296
  { abortEarly: false, allowUnknown: true }
1969
2297
  );
@@ -1972,16 +2300,17 @@ class User {
1972
2300
  }
1973
2301
 
1974
2302
  // Showing warrnings if extra unknown parameters are found
1975
- const { error: warrning } = UserValidator.updatePassword().validate(
2303
+ const {
2304
+ error: warrning,
2305
+ } = UserApplicationValidator.updatePassword().validate(
1976
2306
  { body },
1977
2307
  { abortEarly: false, allowUnknown: false }
1978
2308
  );
1979
2309
  if (warrning) {
1980
2310
  Logger({
1981
2311
  level: "WARN",
1982
- message: "Parameter Validation warrnings for updatePassword",
2312
+ message: `Parameter Validation warrnings for application > User > updatePassword \n ${warrning}`,
1983
2313
  });
1984
- Logger({ level: "WARN", message: warrning });
1985
2314
  }
1986
2315
 
1987
2316
  const query_params = {};
@@ -1997,12 +2326,18 @@ class User {
1997
2326
  }),
1998
2327
  query_params,
1999
2328
  body,
2000
- xHeaders
2329
+ { ...xHeaders, ...requestHeaders },
2330
+ { responseHeaders }
2001
2331
  );
2002
2332
 
2333
+ let responseData = response;
2334
+ if (responseHeaders) {
2335
+ responseData = response[0];
2336
+ }
2337
+
2003
2338
  const {
2004
2339
  error: res_error,
2005
- } = UserModel.VerifyEmailSuccess().validate(response, {
2340
+ } = UserApplicationModel.VerifyEmailSuccess().validate(responseData, {
2006
2341
  abortEarly: false,
2007
2342
  allowUnknown: false,
2008
2343
  });
@@ -2010,24 +2345,27 @@ class User {
2010
2345
  if (res_error) {
2011
2346
  Logger({
2012
2347
  level: "WARN",
2013
- message: "Response Validation Warnnings for updatePassword",
2348
+ message: `Response Validation Warnnings for application > User > updatePassword \n ${res_error}`,
2014
2349
  });
2015
- Logger({ level: "WARN", message: res_error });
2016
2350
  }
2017
2351
 
2018
2352
  return response;
2019
2353
  }
2020
2354
 
2021
2355
  /**
2022
- * @param {Object} arg - Arg object.
2023
- * @param {string} [arg.platform] - ID of the application
2024
- * @param {EditProfileRequestSchema} arg.body
2025
- * @returns {Promise<ProfileEditSuccess>} - Success response
2356
+ * @param {UserApplicationValidator.UpdateProfileParam} arg - Arg object.
2357
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2358
+ * @param {import("../ApplicationAPIClient").Options} - Options
2359
+ * @returns {Promise<UserApplicationModel.ProfileEditSuccess>} - Success response
2360
+ * @name updateProfile
2026
2361
  * @summary: Edit Profile Details
2027
- * @description: Use this API to update details in the user profile. Details can be first name, last name, gender, email, phone number, or profile picture.
2362
+ * @description: Use this API to update details in the user profile. Details can be first name, last name, gender, email, phone number, or profile picture. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/updateProfile/).
2028
2363
  */
2029
- async updateProfile({ body, platform } = {}) {
2030
- const { error } = UserValidator.updateProfile().validate(
2364
+ async updateProfile(
2365
+ { body, platform, requestHeaders } = { requestHeaders: {} },
2366
+ { responseHeaders } = { responseHeaders: false }
2367
+ ) {
2368
+ const { error } = UserApplicationValidator.updateProfile().validate(
2031
2369
  { body, platform },
2032
2370
  { abortEarly: false, allowUnknown: true }
2033
2371
  );
@@ -2036,16 +2374,17 @@ class User {
2036
2374
  }
2037
2375
 
2038
2376
  // Showing warrnings if extra unknown parameters are found
2039
- const { error: warrning } = UserValidator.updateProfile().validate(
2377
+ const {
2378
+ error: warrning,
2379
+ } = UserApplicationValidator.updateProfile().validate(
2040
2380
  { body, platform },
2041
2381
  { abortEarly: false, allowUnknown: false }
2042
2382
  );
2043
2383
  if (warrning) {
2044
2384
  Logger({
2045
2385
  level: "WARN",
2046
- message: "Parameter Validation warrnings for updateProfile",
2386
+ message: `Parameter Validation warrnings for application > User > updateProfile \n ${warrning}`,
2047
2387
  });
2048
- Logger({ level: "WARN", message: warrning });
2049
2388
  }
2050
2389
 
2051
2390
  const query_params = {};
@@ -2062,12 +2401,18 @@ class User {
2062
2401
  }),
2063
2402
  query_params,
2064
2403
  body,
2065
- xHeaders
2404
+ { ...xHeaders, ...requestHeaders },
2405
+ { responseHeaders }
2066
2406
  );
2067
2407
 
2408
+ let responseData = response;
2409
+ if (responseHeaders) {
2410
+ responseData = response[0];
2411
+ }
2412
+
2068
2413
  const {
2069
2414
  error: res_error,
2070
- } = UserModel.ProfileEditSuccess().validate(response, {
2415
+ } = UserApplicationModel.ProfileEditSuccess().validate(responseData, {
2071
2416
  abortEarly: false,
2072
2417
  allowUnknown: false,
2073
2418
  });
@@ -2075,23 +2420,27 @@ class User {
2075
2420
  if (res_error) {
2076
2421
  Logger({
2077
2422
  level: "WARN",
2078
- message: "Response Validation Warnnings for updateProfile",
2423
+ message: `Response Validation Warnnings for application > User > updateProfile \n ${res_error}`,
2079
2424
  });
2080
- Logger({ level: "WARN", message: res_error });
2081
2425
  }
2082
2426
 
2083
2427
  return response;
2084
2428
  }
2085
2429
 
2086
2430
  /**
2087
- * @param {Object} arg - Arg object.
2088
- * @param {CodeRequestBodySchema} arg.body
2089
- * @returns {Promise<VerifyEmailSuccess>} - Success response
2431
+ * @param {UserApplicationValidator.VerifyEmailParam} arg - Arg object.
2432
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2433
+ * @param {import("../ApplicationAPIClient").Options} - Options
2434
+ * @returns {Promise<UserApplicationModel.VerifyEmailSuccess>} - Success response
2435
+ * @name verifyEmail
2090
2436
  * @summary: Verify email
2091
- * @description: Use this API to send a verification code to verify an email.
2437
+ * @description: Use this API to send a verification code to verify an email. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/verifyEmail/).
2092
2438
  */
2093
- async verifyEmail({ body } = {}) {
2094
- const { error } = UserValidator.verifyEmail().validate(
2439
+ async verifyEmail(
2440
+ { body, requestHeaders } = { requestHeaders: {} },
2441
+ { responseHeaders } = { responseHeaders: false }
2442
+ ) {
2443
+ const { error } = UserApplicationValidator.verifyEmail().validate(
2095
2444
  { body },
2096
2445
  { abortEarly: false, allowUnknown: true }
2097
2446
  );
@@ -2100,16 +2449,15 @@ class User {
2100
2449
  }
2101
2450
 
2102
2451
  // Showing warrnings if extra unknown parameters are found
2103
- const { error: warrning } = UserValidator.verifyEmail().validate(
2452
+ const { error: warrning } = UserApplicationValidator.verifyEmail().validate(
2104
2453
  { body },
2105
2454
  { abortEarly: false, allowUnknown: false }
2106
2455
  );
2107
2456
  if (warrning) {
2108
2457
  Logger({
2109
2458
  level: "WARN",
2110
- message: "Parameter Validation warrnings for verifyEmail",
2459
+ message: `Parameter Validation warrnings for application > User > verifyEmail \n ${warrning}`,
2111
2460
  });
2112
- Logger({ level: "WARN", message: warrning });
2113
2461
  }
2114
2462
 
2115
2463
  const query_params = {};
@@ -2125,12 +2473,18 @@ class User {
2125
2473
  }),
2126
2474
  query_params,
2127
2475
  body,
2128
- xHeaders
2476
+ { ...xHeaders, ...requestHeaders },
2477
+ { responseHeaders }
2129
2478
  );
2130
2479
 
2480
+ let responseData = response;
2481
+ if (responseHeaders) {
2482
+ responseData = response[0];
2483
+ }
2484
+
2131
2485
  const {
2132
2486
  error: res_error,
2133
- } = UserModel.VerifyEmailSuccess().validate(response, {
2487
+ } = UserApplicationModel.VerifyEmailSuccess().validate(responseData, {
2134
2488
  abortEarly: false,
2135
2489
  allowUnknown: false,
2136
2490
  });
@@ -2138,24 +2492,27 @@ class User {
2138
2492
  if (res_error) {
2139
2493
  Logger({
2140
2494
  level: "WARN",
2141
- message: "Response Validation Warnnings for verifyEmail",
2495
+ message: `Response Validation Warnnings for application > User > verifyEmail \n ${res_error}`,
2142
2496
  });
2143
- Logger({ level: "WARN", message: res_error });
2144
2497
  }
2145
2498
 
2146
2499
  return response;
2147
2500
  }
2148
2501
 
2149
2502
  /**
2150
- * @param {Object} arg - Arg object.
2151
- * @param {string} [arg.platform] - ID of the application
2152
- * @param {VerifyEmailOtpRequestSchema} arg.body
2153
- * @returns {Promise<VerifyOtpSuccess>} - Success response
2503
+ * @param {UserApplicationValidator.VerifyEmailOTPParam} arg - Arg object.
2504
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2505
+ * @param {import("../ApplicationAPIClient").Options} - Options
2506
+ * @returns {Promise<UserApplicationModel.VerifyOtpSuccess>} - Success response
2507
+ * @name verifyEmailOTP
2154
2508
  * @summary: Verify OTP on email
2155
- * @description: Use this API to verify the OTP received on an email ID.
2509
+ * @description: Use this API to verify the OTP received on an email ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/verifyEmailOTP/).
2156
2510
  */
2157
- async verifyEmailOTP({ body, platform } = {}) {
2158
- const { error } = UserValidator.verifyEmailOTP().validate(
2511
+ async verifyEmailOTP(
2512
+ { body, platform, requestHeaders } = { requestHeaders: {} },
2513
+ { responseHeaders } = { responseHeaders: false }
2514
+ ) {
2515
+ const { error } = UserApplicationValidator.verifyEmailOTP().validate(
2159
2516
  { body, platform },
2160
2517
  { abortEarly: false, allowUnknown: true }
2161
2518
  );
@@ -2164,16 +2521,17 @@ class User {
2164
2521
  }
2165
2522
 
2166
2523
  // Showing warrnings if extra unknown parameters are found
2167
- const { error: warrning } = UserValidator.verifyEmailOTP().validate(
2524
+ const {
2525
+ error: warrning,
2526
+ } = UserApplicationValidator.verifyEmailOTP().validate(
2168
2527
  { body, platform },
2169
2528
  { abortEarly: false, allowUnknown: false }
2170
2529
  );
2171
2530
  if (warrning) {
2172
2531
  Logger({
2173
2532
  level: "WARN",
2174
- message: "Parameter Validation warrnings for verifyEmailOTP",
2533
+ message: `Parameter Validation warrnings for application > User > verifyEmailOTP \n ${warrning}`,
2175
2534
  });
2176
- Logger({ level: "WARN", message: warrning });
2177
2535
  }
2178
2536
 
2179
2537
  const query_params = {};
@@ -2190,34 +2548,46 @@ class User {
2190
2548
  }),
2191
2549
  query_params,
2192
2550
  body,
2193
- xHeaders
2551
+ { ...xHeaders, ...requestHeaders },
2552
+ { responseHeaders }
2194
2553
  );
2195
2554
 
2196
- const { error: res_error } = UserModel.VerifyOtpSuccess().validate(
2197
- response,
2198
- { abortEarly: false, allowUnknown: false }
2199
- );
2555
+ let responseData = response;
2556
+ if (responseHeaders) {
2557
+ responseData = response[0];
2558
+ }
2559
+
2560
+ const {
2561
+ error: res_error,
2562
+ } = UserApplicationModel.VerifyOtpSuccess().validate(responseData, {
2563
+ abortEarly: false,
2564
+ allowUnknown: false,
2565
+ });
2200
2566
 
2201
2567
  if (res_error) {
2202
2568
  Logger({
2203
2569
  level: "WARN",
2204
- message: "Response Validation Warnnings for verifyEmailOTP",
2570
+ message: `Response Validation Warnnings for application > User > verifyEmailOTP \n ${res_error}`,
2205
2571
  });
2206
- Logger({ level: "WARN", message: res_error });
2207
2572
  }
2208
2573
 
2209
2574
  return response;
2210
2575
  }
2211
2576
 
2212
2577
  /**
2213
- * @param {Object} arg - Arg object.
2214
- * @param {CodeRequestBodySchema} arg.body
2215
- * @returns {Promise<VerifyEmailSuccess>} - Success response
2578
+ * @param {UserApplicationValidator.VerifyMobileParam} arg - Arg object.
2579
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2580
+ * @param {import("../ApplicationAPIClient").Options} - Options
2581
+ * @returns {Promise<UserApplicationModel.VerifyEmailSuccess>} - Success response
2582
+ * @name verifyMobile
2216
2583
  * @summary: Verify mobile
2217
- * @description: Use this API to send a verification code to verify a mobile number.
2584
+ * @description: Use this API to send a verification code to verify a mobile number. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/verifyMobile/).
2218
2585
  */
2219
- async verifyMobile({ body } = {}) {
2220
- const { error } = UserValidator.verifyMobile().validate(
2586
+ async verifyMobile(
2587
+ { body, requestHeaders } = { requestHeaders: {} },
2588
+ { responseHeaders } = { responseHeaders: false }
2589
+ ) {
2590
+ const { error } = UserApplicationValidator.verifyMobile().validate(
2221
2591
  { body },
2222
2592
  { abortEarly: false, allowUnknown: true }
2223
2593
  );
@@ -2226,16 +2596,17 @@ class User {
2226
2596
  }
2227
2597
 
2228
2598
  // Showing warrnings if extra unknown parameters are found
2229
- const { error: warrning } = UserValidator.verifyMobile().validate(
2599
+ const {
2600
+ error: warrning,
2601
+ } = UserApplicationValidator.verifyMobile().validate(
2230
2602
  { body },
2231
2603
  { abortEarly: false, allowUnknown: false }
2232
2604
  );
2233
2605
  if (warrning) {
2234
2606
  Logger({
2235
2607
  level: "WARN",
2236
- message: "Parameter Validation warrnings for verifyMobile",
2608
+ message: `Parameter Validation warrnings for application > User > verifyMobile \n ${warrning}`,
2237
2609
  });
2238
- Logger({ level: "WARN", message: warrning });
2239
2610
  }
2240
2611
 
2241
2612
  const query_params = {};
@@ -2251,12 +2622,18 @@ class User {
2251
2622
  }),
2252
2623
  query_params,
2253
2624
  body,
2254
- xHeaders
2625
+ { ...xHeaders, ...requestHeaders },
2626
+ { responseHeaders }
2255
2627
  );
2256
2628
 
2629
+ let responseData = response;
2630
+ if (responseHeaders) {
2631
+ responseData = response[0];
2632
+ }
2633
+
2257
2634
  const {
2258
2635
  error: res_error,
2259
- } = UserModel.VerifyEmailSuccess().validate(response, {
2636
+ } = UserApplicationModel.VerifyEmailSuccess().validate(responseData, {
2260
2637
  abortEarly: false,
2261
2638
  allowUnknown: false,
2262
2639
  });
@@ -2264,24 +2641,27 @@ class User {
2264
2641
  if (res_error) {
2265
2642
  Logger({
2266
2643
  level: "WARN",
2267
- message: "Response Validation Warnnings for verifyMobile",
2644
+ message: `Response Validation Warnnings for application > User > verifyMobile \n ${res_error}`,
2268
2645
  });
2269
- Logger({ level: "WARN", message: res_error });
2270
2646
  }
2271
2647
 
2272
2648
  return response;
2273
2649
  }
2274
2650
 
2275
2651
  /**
2276
- * @param {Object} arg - Arg object.
2277
- * @param {string} [arg.platform] - ID of the application
2278
- * @param {VerifyOtpRequestSchema} arg.body
2279
- * @returns {Promise<VerifyOtpSuccess>} - Success response
2652
+ * @param {UserApplicationValidator.VerifyMobileOTPParam} arg - Arg object.
2653
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2654
+ * @param {import("../ApplicationAPIClient").Options} - Options
2655
+ * @returns {Promise<UserApplicationModel.VerifyOtpSuccess>} - Success response
2656
+ * @name verifyMobileOTP
2280
2657
  * @summary: Verify OTP on mobile
2281
- * @description: Use this API to verify the OTP received on a mobile number.
2658
+ * @description: Use this API to verify the OTP received on a mobile number. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/verifyMobileOTP/).
2282
2659
  */
2283
- async verifyMobileOTP({ body, platform } = {}) {
2284
- const { error } = UserValidator.verifyMobileOTP().validate(
2660
+ async verifyMobileOTP(
2661
+ { body, platform, requestHeaders } = { requestHeaders: {} },
2662
+ { responseHeaders } = { responseHeaders: false }
2663
+ ) {
2664
+ const { error } = UserApplicationValidator.verifyMobileOTP().validate(
2285
2665
  { body, platform },
2286
2666
  { abortEarly: false, allowUnknown: true }
2287
2667
  );
@@ -2290,16 +2670,17 @@ class User {
2290
2670
  }
2291
2671
 
2292
2672
  // Showing warrnings if extra unknown parameters are found
2293
- const { error: warrning } = UserValidator.verifyMobileOTP().validate(
2673
+ const {
2674
+ error: warrning,
2675
+ } = UserApplicationValidator.verifyMobileOTP().validate(
2294
2676
  { body, platform },
2295
2677
  { abortEarly: false, allowUnknown: false }
2296
2678
  );
2297
2679
  if (warrning) {
2298
2680
  Logger({
2299
2681
  level: "WARN",
2300
- message: "Parameter Validation warrnings for verifyMobileOTP",
2682
+ message: `Parameter Validation warrnings for application > User > verifyMobileOTP \n ${warrning}`,
2301
2683
  });
2302
- Logger({ level: "WARN", message: warrning });
2303
2684
  }
2304
2685
 
2305
2686
  const query_params = {};
@@ -2316,20 +2697,27 @@ class User {
2316
2697
  }),
2317
2698
  query_params,
2318
2699
  body,
2319
- xHeaders
2700
+ { ...xHeaders, ...requestHeaders },
2701
+ { responseHeaders }
2320
2702
  );
2321
2703
 
2322
- const { error: res_error } = UserModel.VerifyOtpSuccess().validate(
2323
- response,
2324
- { abortEarly: false, allowUnknown: false }
2325
- );
2704
+ let responseData = response;
2705
+ if (responseHeaders) {
2706
+ responseData = response[0];
2707
+ }
2708
+
2709
+ const {
2710
+ error: res_error,
2711
+ } = UserApplicationModel.VerifyOtpSuccess().validate(responseData, {
2712
+ abortEarly: false,
2713
+ allowUnknown: false,
2714
+ });
2326
2715
 
2327
2716
  if (res_error) {
2328
2717
  Logger({
2329
2718
  level: "WARN",
2330
- message: "Response Validation Warnnings for verifyMobileOTP",
2719
+ message: `Response Validation Warnnings for application > User > verifyMobileOTP \n ${res_error}`,
2331
2720
  });
2332
- Logger({ level: "WARN", message: res_error });
2333
2721
  }
2334
2722
 
2335
2723
  return response;