@gofynd/fdk-client-javascript 1.1.6 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (348) hide show
  1. package/README.md +52 -3
  2. package/index.js +0 -3
  3. package/package.json +1 -2
  4. package/sdk/application/ApplicationAPIClient.d.ts +15 -1
  5. package/sdk/application/ApplicationAPIClient.js +12 -3
  6. package/sdk/application/ApplicationClient.d.ts +36 -6
  7. package/sdk/application/ApplicationClient.js +30 -43
  8. package/sdk/application/ApplicationConfig.d.ts +92 -12
  9. package/sdk/application/ApplicationConfig.js +48 -14
  10. package/sdk/application/Cart/CartApplicationClient.d.ts +200 -357
  11. package/sdk/application/Cart/CartApplicationClient.js +711 -483
  12. package/sdk/application/Cart/CartApplicationModel.d.ts +2054 -96
  13. package/sdk/application/Cart/CartApplicationModel.js +1224 -93
  14. package/sdk/application/Cart/CartApplicationValidator.d.ts +508 -30
  15. package/sdk/application/Cart/CartApplicationValidator.js +270 -15
  16. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +274 -422
  17. package/sdk/application/Catalog/CatalogApplicationClient.js +865 -630
  18. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +2320 -117
  19. package/sdk/application/Catalog/CatalogApplicationModel.js +1566 -172
  20. package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +798 -31
  21. package/sdk/application/Catalog/CatalogApplicationValidator.js +318 -3
  22. package/sdk/application/Common/CommonApplicationClient.d.ts +16 -21
  23. package/sdk/application/Common/CommonApplicationClient.js +52 -33
  24. package/sdk/application/Common/CommonApplicationModel.d.ts +368 -19
  25. package/sdk/application/Common/CommonApplicationModel.js +192 -40
  26. package/sdk/application/Common/CommonApplicationValidator.d.ts +42 -4
  27. package/sdk/application/Common/CommonApplicationValidator.js +21 -3
  28. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +31 -18
  29. package/sdk/application/Communication/CommunicationApplicationClient.js +86 -47
  30. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +157 -14
  31. package/sdk/application/Communication/CommunicationApplicationModel.js +104 -23
  32. package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +27 -4
  33. package/sdk/application/Communication/CommunicationApplicationValidator.js +21 -5
  34. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +149 -118
  35. package/sdk/application/Configuration/ConfigurationApplicationClient.js +457 -260
  36. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +2235 -110
  37. package/sdk/application/Configuration/ConfigurationApplicationModel.js +1113 -193
  38. package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +160 -8
  39. package/sdk/application/Configuration/ConfigurationApplicationValidator.js +88 -4
  40. package/sdk/application/Content/ContentApplicationClient.d.ts +149 -139
  41. package/sdk/application/Content/ContentApplicationClient.js +489 -278
  42. package/sdk/application/Content/ContentApplicationModel.d.ts +1010 -105
  43. package/sdk/application/Content/ContentApplicationModel.js +737 -396
  44. package/sdk/application/Content/ContentApplicationValidator.d.ts +214 -12
  45. package/sdk/application/Content/ContentApplicationValidator.js +113 -3
  46. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +23 -29
  47. package/sdk/application/FileStorage/FileStorageApplicationClient.js +74 -47
  48. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +148 -20
  49. package/sdk/application/FileStorage/FileStorageApplicationModel.js +100 -87
  50. package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +55 -5
  51. package/sdk/application/FileStorage/FileStorageApplicationValidator.js +33 -6
  52. package/sdk/application/Lead/LeadApplicationClient.d.ts +57 -53
  53. package/sdk/application/Lead/LeadApplicationClient.js +188 -103
  54. package/sdk/application/Lead/LeadApplicationModel.d.ts +686 -54
  55. package/sdk/application/Lead/LeadApplicationModel.js +330 -244
  56. package/sdk/application/Lead/LeadApplicationValidator.d.ts +91 -9
  57. package/sdk/application/Lead/LeadApplicationValidator.js +51 -6
  58. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +40 -33
  59. package/sdk/application/Logistic/LogisticApplicationClient.js +131 -73
  60. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +399 -28
  61. package/sdk/application/Logistic/LogisticApplicationModel.js +293 -24
  62. package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +48 -6
  63. package/sdk/application/Logistic/LogisticApplicationValidator.js +34 -6
  64. package/sdk/application/Order/OrderApplicationClient.d.ts +93 -133
  65. package/sdk/application/Order/OrderApplicationClient.js +329 -217
  66. package/sdk/application/Order/OrderApplicationModel.d.ts +1101 -66
  67. package/sdk/application/Order/OrderApplicationModel.js +776 -57
  68. package/sdk/application/Order/OrderApplicationValidator.d.ts +249 -14
  69. package/sdk/application/Order/OrderApplicationValidator.js +114 -5
  70. package/sdk/application/Payment/PaymentApplicationClient.d.ts +400 -366
  71. package/sdk/application/Payment/PaymentApplicationClient.js +1176 -703
  72. package/sdk/application/Payment/PaymentApplicationModel.d.ts +3125 -99
  73. package/sdk/application/Payment/PaymentApplicationModel.js +1158 -62
  74. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +494 -41
  75. package/sdk/application/Payment/PaymentApplicationValidator.js +297 -25
  76. package/sdk/application/PosCart/PosCartApplicationClient.d.ts +205 -350
  77. package/sdk/application/PosCart/PosCartApplicationClient.js +720 -491
  78. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1823 -89
  79. package/sdk/application/PosCart/PosCartApplicationModel.js +1117 -85
  80. package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +480 -29
  81. package/sdk/application/PosCart/PosCartApplicationValidator.js +262 -15
  82. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +58 -47
  83. package/sdk/application/Rewards/RewardsApplicationClient.js +187 -102
  84. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +343 -22
  85. package/sdk/application/Rewards/RewardsApplicationModel.js +230 -15
  86. package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +70 -7
  87. package/sdk/application/Rewards/RewardsApplicationValidator.js +45 -6
  88. package/sdk/application/Share/ShareApplicationClient.d.ts +52 -50
  89. package/sdk/application/Share/ShareApplicationClient.js +185 -97
  90. package/sdk/application/Share/ShareApplicationModel.d.ts +198 -15
  91. package/sdk/application/Share/ShareApplicationModel.js +131 -31
  92. package/sdk/application/Share/ShareApplicationValidator.d.ts +86 -8
  93. package/sdk/application/Share/ShareApplicationValidator.js +48 -4
  94. package/sdk/application/Theme/ThemeApplicationClient.d.ts +30 -27
  95. package/sdk/application/Theme/ThemeApplicationClient.js +102 -56
  96. package/sdk/application/Theme/ThemeApplicationModel.d.ts +1291 -48
  97. package/sdk/application/Theme/ThemeApplicationModel.js +895 -134
  98. package/sdk/application/Theme/ThemeApplicationValidator.d.ts +49 -5
  99. package/sdk/application/Theme/ThemeApplicationValidator.js +26 -3
  100. package/sdk/application/User/UserApplicationClient.d.ts +260 -305
  101. package/sdk/application/User/UserApplicationClient.js +910 -522
  102. package/sdk/application/User/UserApplicationModel.d.ts +992 -101
  103. package/sdk/application/User/UserApplicationModel.js +699 -248
  104. package/sdk/application/User/UserApplicationValidator.d.ts +457 -33
  105. package/sdk/application/User/UserApplicationValidator.js +265 -31
  106. package/sdk/common/AxiosHelper.js +7 -2
  107. package/sdk/common/FDKError.d.ts +3 -0
  108. package/sdk/common/FDKError.js +8 -0
  109. package/sdk/common/Paginator.d.ts +27 -12
  110. package/sdk/common/Paginator.js +15 -0
  111. package/sdk/common/RequestSigner.js +0 -1
  112. package/sdk/common/utils.d.ts +3 -0
  113. package/sdk/common/utils.js +29 -0
  114. package/sdk/partner/PartnerAPIClient.d.ts +16 -1
  115. package/sdk/partner/PartnerAPIClient.js +12 -2
  116. package/sdk/partner/PartnerClient.d.ts +22 -3
  117. package/sdk/partner/PartnerClient.js +20 -0
  118. package/sdk/partner/PartnerConfig.d.ts +40 -14
  119. package/sdk/partner/PartnerConfig.js +31 -6
  120. package/sdk/partner/Theme/ThemePartnerClient.d.ts +299 -0
  121. package/sdk/partner/Theme/ThemePartnerClient.js +768 -0
  122. package/sdk/partner/Theme/ThemePartnerModel.d.ts +1706 -0
  123. package/sdk/partner/Theme/ThemePartnerModel.js +1409 -0
  124. package/sdk/partner/Theme/ThemePartnerValidator.d.ts +22 -0
  125. package/sdk/partner/Theme/ThemePartnerValidator.js +157 -0
  126. package/sdk/partner/index.d.ts +3 -1
  127. package/sdk/partner/index.js +3 -1
  128. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +30 -25
  129. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +104 -53
  130. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +190 -17
  131. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +132 -15
  132. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +52 -5
  133. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +30 -4
  134. package/sdk/platform/Billing/BillingPlatformClient.d.ts +133 -97
  135. package/sdk/platform/Billing/BillingPlatformClient.js +561 -191
  136. package/sdk/platform/Billing/BillingPlatformModel.d.ts +1071 -68
  137. package/sdk/platform/Billing/BillingPlatformModel.js +762 -151
  138. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +175 -12
  139. package/sdk/platform/Billing/BillingPlatformValidator.js +118 -8
  140. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +454 -635
  141. package/sdk/platform/Cart/CartPlatformApplicationClient.js +1646 -957
  142. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +827 -57
  143. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +492 -34
  144. package/sdk/platform/Cart/CartPlatformModel.d.ts +3839 -175
  145. package/sdk/platform/Cart/CartPlatformModel.js +2423 -217
  146. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +528 -638
  147. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1600 -984
  148. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +1081 -49
  149. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +482 -23
  150. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +652 -826
  151. package/sdk/platform/Catalog/CatalogPlatformClient.js +1979 -1264
  152. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6869 -326
  153. package/sdk/platform/Catalog/CatalogPlatformModel.js +4215 -351
  154. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +1361 -71
  155. package/sdk/platform/Catalog/CatalogPlatformValidator.js +624 -30
  156. package/sdk/platform/Common/CommonPlatformClient.d.ts +16 -21
  157. package/sdk/platform/Common/CommonPlatformClient.js +50 -33
  158. package/sdk/platform/Common/CommonPlatformModel.d.ts +423 -19
  159. package/sdk/platform/Common/CommonPlatformModel.js +214 -40
  160. package/sdk/platform/Common/CommonPlatformValidator.d.ts +37 -4
  161. package/sdk/platform/Common/CommonPlatformValidator.js +20 -3
  162. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +731 -303
  163. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +3095 -785
  164. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +699 -41
  165. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +463 -27
  166. package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +19 -5
  167. package/sdk/platform/Communication/CommunicationPlatformClient.js +59 -19
  168. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1708 -102
  169. package/sdk/platform/Communication/CommunicationPlatformModel.js +1360 -235
  170. package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +16 -3
  171. package/sdk/platform/Communication/CommunicationPlatformValidator.js +11 -3
  172. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +127 -111
  173. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +435 -225
  174. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +882 -43
  175. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +666 -78
  176. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +184 -13
  177. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +105 -10
  178. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +327 -240
  179. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +922 -438
  180. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +297 -22
  181. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +191 -17
  182. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +184 -178
  183. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +555 -311
  184. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +4337 -188
  185. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2178 -248
  186. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +332 -19
  187. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +153 -10
  188. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +605 -578
  189. package/sdk/platform/Content/ContentPlatformApplicationClient.js +1996 -987
  190. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +872 -62
  191. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +487 -35
  192. package/sdk/platform/Content/ContentPlatformModel.d.ts +1472 -108
  193. package/sdk/platform/Content/ContentPlatformModel.js +1085 -204
  194. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +85 -82
  195. package/sdk/platform/Discount/DiscountPlatformClient.js +333 -175
  196. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +281 -15
  197. package/sdk/platform/Discount/DiscountPlatformModel.js +189 -10
  198. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +185 -13
  199. package/sdk/platform/Discount/DiscountPlatformValidator.js +88 -8
  200. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +109 -52
  201. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +570 -105
  202. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +141 -6
  203. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +118 -7
  204. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +43 -63
  205. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +153 -135
  206. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +426 -20
  207. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +379 -40
  208. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +106 -8
  209. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +60 -8
  210. package/sdk/platform/Finance/FinancePlatformClient.d.ts +260 -129
  211. package/sdk/platform/Finance/FinancePlatformClient.js +1182 -194
  212. package/sdk/platform/Finance/FinancePlatformModel.d.ts +1267 -50
  213. package/sdk/platform/Finance/FinancePlatformModel.js +1252 -38
  214. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +233 -15
  215. package/sdk/platform/Finance/FinancePlatformValidator.js +229 -16
  216. package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +111 -97
  217. package/sdk/platform/Inventory/InventoryPlatformClient.js +330 -199
  218. package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +1354 -61
  219. package/sdk/platform/Inventory/InventoryPlatformModel.js +916 -83
  220. package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +168 -12
  221. package/sdk/platform/Inventory/InventoryPlatformValidator.js +82 -6
  222. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +100 -106
  223. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +372 -186
  224. package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +180 -14
  225. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +94 -9
  226. package/sdk/platform/Lead/LeadPlatformClient.d.ts +89 -104
  227. package/sdk/platform/Lead/LeadPlatformClient.js +305 -180
  228. package/sdk/platform/Lead/LeadPlatformModel.d.ts +1045 -54
  229. package/sdk/platform/Lead/LeadPlatformModel.js +504 -142
  230. package/sdk/platform/Lead/LeadPlatformValidator.d.ts +173 -12
  231. package/sdk/platform/Lead/LeadPlatformValidator.js +92 -15
  232. package/sdk/platform/OAuthClient.js +6 -2
  233. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +20 -14
  234. package/sdk/platform/Order/OrderPlatformApplicationClient.js +58 -29
  235. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +26 -4
  236. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +16 -3
  237. package/sdk/platform/Order/OrderPlatformClient.d.ts +437 -556
  238. package/sdk/platform/Order/OrderPlatformClient.js +1500 -760
  239. package/sdk/platform/Order/OrderPlatformModel.d.ts +5225 -247
  240. package/sdk/platform/Order/OrderPlatformModel.js +3473 -260
  241. package/sdk/platform/Order/OrderPlatformValidator.d.ts +859 -37
  242. package/sdk/platform/Order/OrderPlatformValidator.js +435 -23
  243. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +16 -42
  244. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +52 -155
  245. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +37 -6
  246. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +19 -17
  247. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +78 -45
  248. package/sdk/platform/Partner/PartnerPlatformModel.js +43 -369
  249. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +418 -288
  250. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +1509 -505
  251. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +438 -30
  252. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +312 -19
  253. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +83 -73
  254. package/sdk/platform/Payment/PaymentPlatformClient.js +259 -154
  255. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +3200 -93
  256. package/sdk/platform/Payment/PaymentPlatformModel.js +1334 -36
  257. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +111 -11
  258. package/sdk/platform/Payment/PaymentPlatformValidator.js +68 -7
  259. package/sdk/platform/PlatformAPIClient.d.ts +16 -1
  260. package/sdk/platform/PlatformAPIClient.js +9 -1
  261. package/sdk/platform/PlatformApplicationClient.d.ts +22 -1798
  262. package/sdk/platform/PlatformApplicationClient.js +17 -1899
  263. package/sdk/platform/PlatformClient.d.ts +31 -12581
  264. package/sdk/platform/PlatformClient.js +30 -15089
  265. package/sdk/platform/PlatformConfig.d.ts +37 -11
  266. package/sdk/platform/PlatformConfig.js +32 -6
  267. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +96 -92
  268. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +344 -177
  269. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +149 -12
  270. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +82 -8
  271. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +360 -23
  272. package/sdk/platform/Rewards/RewardsPlatformModel.js +238 -22
  273. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +159 -92
  274. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +473 -208
  275. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +138 -13
  276. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +100 -14
  277. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +166 -178
  278. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +518 -329
  279. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1408 -96
  280. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1034 -71
  281. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +280 -18
  282. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +134 -11
  283. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +41 -66
  284. package/sdk/platform/Share/SharePlatformApplicationClient.js +149 -116
  285. package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +87 -7
  286. package/sdk/platform/Share/SharePlatformApplicationValidator.js +42 -5
  287. package/sdk/platform/Share/SharePlatformModel.d.ts +250 -16
  288. package/sdk/platform/Share/SharePlatformModel.js +167 -19
  289. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +229 -193
  290. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +976 -352
  291. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +345 -24
  292. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +206 -14
  293. package/sdk/platform/Theme/ThemePlatformClient.d.ts +37 -0
  294. package/sdk/platform/Theme/ThemePlatformClient.js +235 -0
  295. package/sdk/platform/Theme/ThemePlatformModel.d.ts +1527 -48
  296. package/sdk/platform/Theme/ThemePlatformModel.js +1099 -118
  297. package/sdk/platform/Theme/ThemePlatformValidator.d.ts +32 -0
  298. package/sdk/platform/Theme/ThemePlatformValidator.js +38 -0
  299. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +138 -152
  300. package/sdk/platform/User/UserPlatformApplicationClient.js +470 -244
  301. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +242 -18
  302. package/sdk/platform/User/UserPlatformApplicationValidator.js +129 -12
  303. package/sdk/platform/User/UserPlatformModel.d.ts +653 -101
  304. package/sdk/platform/User/UserPlatformModel.js +467 -424
  305. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +153 -49
  306. package/sdk/platform/Webhook/WebhookPlatformClient.js +896 -88
  307. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +632 -16
  308. package/sdk/platform/Webhook/WebhookPlatformModel.js +502 -54
  309. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +170 -7
  310. package/sdk/platform/Webhook/WebhookPlatformValidator.js +157 -7
  311. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +16 -21
  312. package/sdk/public/Configuration/ConfigurationPublicClient.js +48 -33
  313. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +370 -19
  314. package/sdk/public/Configuration/ConfigurationPublicModel.js +191 -40
  315. package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +42 -4
  316. package/sdk/public/Configuration/ConfigurationPublicValidator.js +21 -3
  317. package/sdk/public/Inventory/InventoryPublicClient.d.ts +54 -48
  318. package/sdk/public/Inventory/InventoryPublicClient.js +161 -98
  319. package/sdk/public/Inventory/InventoryPublicModel.d.ts +392 -21
  320. package/sdk/public/Inventory/InventoryPublicModel.js +267 -27
  321. package/sdk/public/Inventory/InventoryPublicValidator.d.ts +90 -8
  322. package/sdk/public/Inventory/InventoryPublicValidator.js +44 -4
  323. package/sdk/public/Partner/PartnerPublicClient.d.ts +22 -0
  324. package/sdk/public/Partner/PartnerPublicClient.js +110 -0
  325. package/sdk/public/Partner/PartnerPublicModel.d.ts +240 -0
  326. package/sdk/public/Partner/PartnerPublicModel.js +280 -0
  327. package/sdk/public/Partner/PartnerPublicValidator.d.ts +18 -0
  328. package/sdk/public/Partner/PartnerPublicValidator.js +19 -0
  329. package/sdk/public/PublicAPIClient.d.ts +14 -1
  330. package/sdk/public/PublicAPIClient.js +7 -1
  331. package/sdk/public/PublicClient.d.ts +21 -3
  332. package/sdk/public/PublicClient.js +20 -0
  333. package/sdk/public/PublicConfig.d.ts +27 -6
  334. package/sdk/public/PublicConfig.js +17 -1
  335. package/sdk/public/Webhook/WebhookPublicClient.d.ts +16 -11
  336. package/sdk/public/Webhook/WebhookPublicClient.js +48 -27
  337. package/sdk/public/Webhook/WebhookPublicModel.d.ts +52 -16
  338. package/sdk/public/Webhook/WebhookPublicModel.js +33 -113
  339. package/sdk/public/Webhook/WebhookPublicValidator.d.ts +18 -3
  340. package/sdk/public/Webhook/WebhookPublicValidator.js +14 -4
  341. package/sdk/public/index.d.ts +1 -0
  342. package/sdk/public/index.js +2 -0
  343. package/sdk/application/ApplicationModels.d.ts +0 -3
  344. package/sdk/application/ApplicationModels.js +0 -20
  345. package/sdk/platform/Partner/PartnerPlatformClient.d.ts +0 -145
  346. package/sdk/platform/Partner/PartnerPlatformClient.js +0 -799
  347. package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +0 -14
  348. package/sdk/platform/Partner/PartnerPlatformValidator.js +0 -87
@@ -1,8 +1,8 @@
1
1
  const PlatformAPIClient = require("../PlatformAPIClient");
2
2
  const { FDKClientValidationError } = require("../../common/FDKError");
3
3
  const Paginator = require("../../common/Paginator");
4
- const RewardsValidator = require("./RewardsPlatformApplicationValidator");
5
- const RewardsModel = require("./RewardsPlatformModel");
4
+ const RewardsPlatformApplicationValidator = require("./RewardsPlatformApplicationValidator");
5
+ const RewardsPlatformModel = require("./RewardsPlatformModel");
6
6
  const { Logger } = require("./../../common/Logger");
7
7
  const Joi = require("joi");
8
8
 
@@ -13,14 +13,21 @@ class Rewards {
13
13
  }
14
14
 
15
15
  /**
16
- * @param {Object} arg - Arg object.
17
- * @param {string} arg.id - Giveaway ID
18
- * @returns {Promise<Giveaway>} - Success response
16
+ * @param {RewardsPlatformApplicationValidator.GetGiveawayByIdParam} arg - Arg object
17
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
18
+ * @param {import("../PlatformAPIClient").Options} - Options
19
+ * @returns {Promise<RewardsPlatformModel.Giveaway>} - Success response
20
+ * @name getGiveawayById
19
21
  * @summary: Get giveaway by ID.
20
- * @description: Retrieve the specific giveaway by giveaway ID. It will show all the details of the requested giveaway.
22
+ * @description: Retrieve the specific giveaway by giveaway ID. It will show all the details of the requested giveaway. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/rewards/getGiveawayById/).
21
23
  */
22
- async getGiveawayById({ id } = {}) {
23
- const { error } = RewardsValidator.getGiveawayById().validate(
24
+ async getGiveawayById(
25
+ { id, requestHeaders } = { requestHeaders: {} },
26
+ { responseHeaders } = { responseHeaders: false }
27
+ ) {
28
+ const {
29
+ error,
30
+ } = RewardsPlatformApplicationValidator.getGiveawayById().validate(
24
31
  {
25
32
  id,
26
33
  },
@@ -31,7 +38,9 @@ class Rewards {
31
38
  }
32
39
 
33
40
  // Showing warrnings if extra unknown parameters are found
34
- const { error: warrning } = RewardsValidator.getGiveawayById().validate(
41
+ const {
42
+ error: warrning,
43
+ } = RewardsPlatformApplicationValidator.getGiveawayById().validate(
35
44
  {
36
45
  id,
37
46
  },
@@ -40,9 +49,8 @@ class Rewards {
40
49
  if (warrning) {
41
50
  Logger({
42
51
  level: "WARN",
43
- message: "Parameter Validation warrnings for getGiveawayById",
52
+ message: `Parameter Validation warrnings for platform > Rewards > getGiveawayById \n ${warrning}`,
44
53
  });
45
- Logger({ level: "WARN", message: warrning });
46
54
  }
47
55
 
48
56
  const query_params = {};
@@ -52,10 +60,19 @@ class Rewards {
52
60
  "get",
53
61
  `/service/platform/rewards/v1.0/company/${this.config.companyId}/application/${this.applicationId}/giveaways/${id}`,
54
62
  query_params,
55
- undefined
63
+ undefined,
64
+ requestHeaders,
65
+ { responseHeaders }
56
66
  );
57
67
 
58
- const { error: res_error } = RewardsModel.Giveaway().validate(response, {
68
+ let responseData = response;
69
+ if (responseHeaders) {
70
+ responseData = response[0];
71
+ }
72
+
73
+ const {
74
+ error: res_error,
75
+ } = RewardsPlatformModel.Giveaway().validate(responseData, {
59
76
  abortEarly: false,
60
77
  allowUnknown: false,
61
78
  });
@@ -63,23 +80,29 @@ class Rewards {
63
80
  if (res_error) {
64
81
  Logger({
65
82
  level: "WARN",
66
- message: "Response Validation Warnnings for getGiveawayById",
83
+ message: `Response Validation Warnnings for platform > Rewards > getGiveawayById \n ${res_error}`,
67
84
  });
68
- Logger({ level: "WARN", message: res_error });
69
85
  }
70
86
 
71
87
  return response;
72
88
  }
73
89
 
74
90
  /**
75
- * @param {Object} arg - Arg object.
76
- * @param {string} arg.name - The name given to the offer.
77
- * @returns {Promise<Offer>} - Success response
91
+ * @param {RewardsPlatformApplicationValidator.GetOfferByNameParam} arg - Arg object
92
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
93
+ * @param {import("../PlatformAPIClient").Options} - Options
94
+ * @returns {Promise<RewardsPlatformModel.Offer>} - Success response
95
+ * @name getOfferByName
78
96
  * @summary: Fetch a offer by its name
79
- * @description: Fetch the specific offer details and configuration by the name of the offer.
97
+ * @description: Fetch the specific offer details and configuration by the name of the offer. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/rewards/getOfferByName/).
80
98
  */
81
- async getOfferByName({ name } = {}) {
82
- const { error } = RewardsValidator.getOfferByName().validate(
99
+ async getOfferByName(
100
+ { name, requestHeaders } = { requestHeaders: {} },
101
+ { responseHeaders } = { responseHeaders: false }
102
+ ) {
103
+ const {
104
+ error,
105
+ } = RewardsPlatformApplicationValidator.getOfferByName().validate(
83
106
  { name },
84
107
  { abortEarly: false, allowUnknown: true }
85
108
  );
@@ -88,16 +111,17 @@ class Rewards {
88
111
  }
89
112
 
90
113
  // Showing warrnings if extra unknown parameters are found
91
- const { error: warrning } = RewardsValidator.getOfferByName().validate(
114
+ const {
115
+ error: warrning,
116
+ } = RewardsPlatformApplicationValidator.getOfferByName().validate(
92
117
  { name },
93
118
  { abortEarly: false, allowUnknown: false }
94
119
  );
95
120
  if (warrning) {
96
121
  Logger({
97
122
  level: "WARN",
98
- message: "Parameter Validation warrnings for getOfferByName",
123
+ message: `Parameter Validation warrnings for platform > Rewards > getOfferByName \n ${warrning}`,
99
124
  });
100
- Logger({ level: "WARN", message: warrning });
101
125
  }
102
126
 
103
127
  const query_params = {};
@@ -107,10 +131,19 @@ class Rewards {
107
131
  "get",
108
132
  `/service/platform/rewards/v1.0/company/${this.config.companyId}/application/${this.applicationId}/offers/${name}/`,
109
133
  query_params,
110
- undefined
134
+ undefined,
135
+ requestHeaders,
136
+ { responseHeaders }
111
137
  );
112
138
 
113
- const { error: res_error } = RewardsModel.Offer().validate(response, {
139
+ let responseData = response;
140
+ if (responseHeaders) {
141
+ responseData = response[0];
142
+ }
143
+
144
+ const {
145
+ error: res_error,
146
+ } = RewardsPlatformModel.Offer().validate(responseData, {
114
147
  abortEarly: false,
115
148
  allowUnknown: false,
116
149
  });
@@ -118,22 +151,31 @@ class Rewards {
118
151
  if (res_error) {
119
152
  Logger({
120
153
  level: "WARN",
121
- message: "Response Validation Warnnings for getOfferByName",
154
+ message: `Response Validation Warnnings for platform > Rewards > getOfferByName \n ${res_error}`,
122
155
  });
123
- Logger({ level: "WARN", message: res_error });
124
156
  }
125
157
 
126
158
  return response;
127
159
  }
128
160
 
129
161
  /**
130
- * @param {Object} arg - Arg object.
131
- * @returns {Promise<ConfigurationRes>} - Success response
162
+ * @param {RewardsPlatformApplicationValidator.GetRewardsConfigurationParam} arg
163
+ * - Arg object
164
+ *
165
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
166
+ * @param {import("../PlatformAPIClient").Options} - Options
167
+ * @returns {Promise<RewardsPlatformModel.ConfigurationRes>} - Success response
168
+ * @name getRewardsConfiguration
132
169
  * @summary: Get all valid android paths
133
- * @description: Use this API to get a list of valid android paths required by the Rewards INIT API to validate a fraudulent device.
170
+ * @description: Use this API to get a list of valid android paths required by the Rewards INIT API to validate a fraudulent device. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/rewards/getRewardsConfiguration/).
134
171
  */
135
- async getRewardsConfiguration({} = {}) {
136
- const { error } = RewardsValidator.getRewardsConfiguration().validate(
172
+ async getRewardsConfiguration(
173
+ { requestHeaders } = { requestHeaders: {} },
174
+ { responseHeaders } = { responseHeaders: false }
175
+ ) {
176
+ const {
177
+ error,
178
+ } = RewardsPlatformApplicationValidator.getRewardsConfiguration().validate(
137
179
  {},
138
180
  { abortEarly: false, allowUnknown: true }
139
181
  );
@@ -144,16 +186,15 @@ class Rewards {
144
186
  // Showing warrnings if extra unknown parameters are found
145
187
  const {
146
188
  error: warrning,
147
- } = RewardsValidator.getRewardsConfiguration().validate(
189
+ } = RewardsPlatformApplicationValidator.getRewardsConfiguration().validate(
148
190
  {},
149
191
  { abortEarly: false, allowUnknown: false }
150
192
  );
151
193
  if (warrning) {
152
194
  Logger({
153
195
  level: "WARN",
154
- message: "Parameter Validation warrnings for getRewardsConfiguration",
196
+ message: `Parameter Validation warrnings for platform > Rewards > getRewardsConfiguration \n ${warrning}`,
155
197
  });
156
- Logger({ level: "WARN", message: warrning });
157
198
  }
158
199
 
159
200
  const query_params = {};
@@ -163,12 +204,19 @@ class Rewards {
163
204
  "get",
164
205
  `/service/platform/rewards/v1.0/company/${this.config.companyId}/application/${this.applicationId}/configuration/`,
165
206
  query_params,
166
- undefined
207
+ undefined,
208
+ requestHeaders,
209
+ { responseHeaders }
167
210
  );
168
211
 
212
+ let responseData = response;
213
+ if (responseHeaders) {
214
+ responseData = response[0];
215
+ }
216
+
169
217
  const {
170
218
  error: res_error,
171
- } = RewardsModel.ConfigurationRes().validate(response, {
219
+ } = RewardsPlatformModel.ConfigurationRes().validate(responseData, {
172
220
  abortEarly: false,
173
221
  allowUnknown: false,
174
222
  });
@@ -176,23 +224,29 @@ class Rewards {
176
224
  if (res_error) {
177
225
  Logger({
178
226
  level: "WARN",
179
- message: "Response Validation Warnnings for getRewardsConfiguration",
227
+ message: `Response Validation Warnnings for platform > Rewards > getRewardsConfiguration \n ${res_error}`,
180
228
  });
181
- Logger({ level: "WARN", message: res_error });
182
229
  }
183
230
 
184
231
  return response;
185
232
  }
186
233
 
187
234
  /**
188
- * @param {Object} arg - Arg object.
189
- * @param {string} arg.userId - User id
190
- * @returns {Promise<UserRes>} - Success response
235
+ * @param {RewardsPlatformApplicationValidator.GetUserDetailsParam} arg - Arg object
236
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
237
+ * @param {import("../PlatformAPIClient").Options} - Options
238
+ * @returns {Promise<RewardsPlatformModel.UserRes>} - Success response
239
+ * @name getUserDetails
191
240
  * @summary: Get user reward details
192
- * @description: Fetches the user details and the user reward details with their current reward points for the specific user.
241
+ * @description: Fetches the user details and the user reward details with their current reward points for the specific user. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/rewards/getUserDetails/).
193
242
  */
194
- async getUserDetails({ userId } = {}) {
195
- const { error } = RewardsValidator.getUserDetails().validate(
243
+ async getUserDetails(
244
+ { userId, requestHeaders } = { requestHeaders: {} },
245
+ { responseHeaders } = { responseHeaders: false }
246
+ ) {
247
+ const {
248
+ error,
249
+ } = RewardsPlatformApplicationValidator.getUserDetails().validate(
196
250
  { userId },
197
251
  { abortEarly: false, allowUnknown: true }
198
252
  );
@@ -201,16 +255,17 @@ class Rewards {
201
255
  }
202
256
 
203
257
  // Showing warrnings if extra unknown parameters are found
204
- const { error: warrning } = RewardsValidator.getUserDetails().validate(
258
+ const {
259
+ error: warrning,
260
+ } = RewardsPlatformApplicationValidator.getUserDetails().validate(
205
261
  { userId },
206
262
  { abortEarly: false, allowUnknown: false }
207
263
  );
208
264
  if (warrning) {
209
265
  Logger({
210
266
  level: "WARN",
211
- message: "Parameter Validation warrnings for getUserDetails",
267
+ message: `Parameter Validation warrnings for platform > Rewards > getUserDetails \n ${warrning}`,
212
268
  });
213
- Logger({ level: "WARN", message: warrning });
214
269
  }
215
270
 
216
271
  const query_params = {};
@@ -220,10 +275,19 @@ class Rewards {
220
275
  "get",
221
276
  `/service/platform/rewards/v1.0/company/${this.config.companyId}/application/${this.applicationId}/users/${userId}/`,
222
277
  query_params,
223
- undefined
278
+ undefined,
279
+ requestHeaders,
280
+ { responseHeaders }
224
281
  );
225
282
 
226
- const { error: res_error } = RewardsModel.UserRes().validate(response, {
283
+ let responseData = response;
284
+ if (responseHeaders) {
285
+ responseData = response[0];
286
+ }
287
+
288
+ const {
289
+ error: res_error,
290
+ } = RewardsPlatformModel.UserRes().validate(responseData, {
227
291
  abortEarly: false,
228
292
  allowUnknown: false,
229
293
  });
@@ -231,31 +295,31 @@ class Rewards {
231
295
  if (res_error) {
232
296
  Logger({
233
297
  level: "WARN",
234
- message: "Response Validation Warnnings for getUserDetails",
298
+ message: `Response Validation Warnnings for platform > Rewards > getUserDetails \n ${res_error}`,
235
299
  });
236
- Logger({ level: "WARN", message: res_error });
237
300
  }
238
301
 
239
302
  return response;
240
303
  }
241
304
 
242
305
  /**
243
- * @param {Object} arg - Arg object.
244
- * @param {string} arg.userId - User id
245
- * @param {string} [arg.pageId] - PageID is the ID of the requested page.
246
- * For first request it should be kept empty.
247
- * @param {number} [arg.pageSize] - The number of items to retrieve in each page.
248
- * @returns {Promise<HistoryRes>} - Success response
306
+ * @param {RewardsPlatformApplicationValidator.GetUserPointsHistoryParam} arg
307
+ * - Arg object
308
+ *
309
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
310
+ * @param {import("../PlatformAPIClient").Options} - Options
311
+ * @returns {Promise<RewardsPlatformModel.HistoryRes>} - Success response
312
+ * @name getUserPointsHistory
249
313
  * @summary: Get all transactions of reward points
250
- * @description: Fetches a list of points transactions like giveaway points, signup points, referral points, order earn points, redeem points and expired points.
314
+ * @description: Fetches a list of points transactions like giveaway points, signup points, referral points, order earn points, redeem points and expired points. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/rewards/getUserPointsHistory/).
251
315
  */
252
- async getUserPointsHistory({
253
- userId,
254
-
255
- pageId,
256
- pageSize,
257
- } = {}) {
258
- const { error } = RewardsValidator.getUserPointsHistory().validate(
316
+ async getUserPointsHistory(
317
+ { userId, pageId, pageSize, requestHeaders } = { requestHeaders: {} },
318
+ { responseHeaders } = { responseHeaders: false }
319
+ ) {
320
+ const {
321
+ error,
322
+ } = RewardsPlatformApplicationValidator.getUserPointsHistory().validate(
259
323
  {
260
324
  userId,
261
325
 
@@ -271,7 +335,7 @@ class Rewards {
271
335
  // Showing warrnings if extra unknown parameters are found
272
336
  const {
273
337
  error: warrning,
274
- } = RewardsValidator.getUserPointsHistory().validate(
338
+ } = RewardsPlatformApplicationValidator.getUserPointsHistory().validate(
275
339
  {
276
340
  userId,
277
341
 
@@ -283,9 +347,8 @@ class Rewards {
283
347
  if (warrning) {
284
348
  Logger({
285
349
  level: "WARN",
286
- message: "Parameter Validation warrnings for getUserPointsHistory",
350
+ message: `Parameter Validation warrnings for platform > Rewards > getUserPointsHistory \n ${warrning}`,
287
351
  });
288
- Logger({ level: "WARN", message: warrning });
289
352
  }
290
353
 
291
354
  const query_params = {};
@@ -297,10 +360,19 @@ class Rewards {
297
360
  "get",
298
361
  `/service/platform/rewards/v1.0/company/${this.config.companyId}/application/${this.applicationId}/users/${userId}/points/history/`,
299
362
  query_params,
300
- undefined
363
+ undefined,
364
+ requestHeaders,
365
+ { responseHeaders }
301
366
  );
302
367
 
303
- const { error: res_error } = RewardsModel.HistoryRes().validate(response, {
368
+ let responseData = response;
369
+ if (responseHeaders) {
370
+ responseData = response[0];
371
+ }
372
+
373
+ const {
374
+ error: res_error,
375
+ } = RewardsPlatformModel.HistoryRes().validate(responseData, {
304
376
  abortEarly: false,
305
377
  allowUnknown: false,
306
378
  });
@@ -308,9 +380,8 @@ class Rewards {
308
380
  if (res_error) {
309
381
  Logger({
310
382
  level: "WARN",
311
- message: "Response Validation Warnnings for getUserPointsHistory",
383
+ message: `Response Validation Warnnings for platform > Rewards > getUserPointsHistory \n ${res_error}`,
312
384
  });
313
- Logger({ level: "WARN", message: res_error });
314
385
  }
315
386
 
316
387
  return response;
@@ -322,6 +393,7 @@ class Rewards {
322
393
  * @param {string} arg.companyId - Company id
323
394
  * @param {string} arg.applicationId - Application id
324
395
  * @param {number} [arg.pageSize] - The number of items to retrieve in each page.
396
+ * @returns {Paginator<RewardsPlatformModel.HistoryRes>}
325
397
  * @summary: Get all transactions of reward points
326
398
  * @description: Fetches a list of points transactions like giveaway points, signup points, referral points, order earn points, redeem points and expired points.
327
399
  */
@@ -354,14 +426,21 @@ class Rewards {
354
426
  }
355
427
 
356
428
  /**
357
- * @param {Object} arg - Arg object.
358
- * @param {Giveaway} arg.body
359
- * @returns {Promise<Giveaway>} - Success response
429
+ * @param {RewardsPlatformApplicationValidator.SaveGiveAwayParam} arg - Arg object
430
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
431
+ * @param {import("../PlatformAPIClient").Options} - Options
432
+ * @returns {Promise<RewardsPlatformModel.Giveaway>} - Success response
433
+ * @name saveGiveAway
360
434
  * @summary: List of giveaways of the current application.
361
- * @description: Creates a new giveaway in the current application, specifying the target audience, points allocation, as well as the name and display name of the giveaway.
435
+ * @description: Creates a new giveaway in the current application, specifying the target audience, points allocation, as well as the name and display name of the giveaway. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/rewards/saveGiveAway/).
362
436
  */
363
- async saveGiveAway({ body } = {}) {
364
- const { error } = RewardsValidator.saveGiveAway().validate(
437
+ async saveGiveAway(
438
+ { body, requestHeaders } = { requestHeaders: {} },
439
+ { responseHeaders } = { responseHeaders: false }
440
+ ) {
441
+ const {
442
+ error,
443
+ } = RewardsPlatformApplicationValidator.saveGiveAway().validate(
365
444
  {
366
445
  body,
367
446
  },
@@ -372,7 +451,9 @@ class Rewards {
372
451
  }
373
452
 
374
453
  // Showing warrnings if extra unknown parameters are found
375
- const { error: warrning } = RewardsValidator.saveGiveAway().validate(
454
+ const {
455
+ error: warrning,
456
+ } = RewardsPlatformApplicationValidator.saveGiveAway().validate(
376
457
  {
377
458
  body,
378
459
  },
@@ -381,9 +462,8 @@ class Rewards {
381
462
  if (warrning) {
382
463
  Logger({
383
464
  level: "WARN",
384
- message: "Parameter Validation warrnings for saveGiveAway",
465
+ message: `Parameter Validation warrnings for platform > Rewards > saveGiveAway \n ${warrning}`,
385
466
  });
386
- Logger({ level: "WARN", message: warrning });
387
467
  }
388
468
 
389
469
  const query_params = {};
@@ -393,10 +473,19 @@ class Rewards {
393
473
  "post",
394
474
  `/service/platform/rewards/v1.0/company/${this.config.companyId}/application/${this.applicationId}/giveaways`,
395
475
  query_params,
396
- body
476
+ body,
477
+ requestHeaders,
478
+ { responseHeaders }
397
479
  );
398
480
 
399
- const { error: res_error } = RewardsModel.Giveaway().validate(response, {
481
+ let responseData = response;
482
+ if (responseHeaders) {
483
+ responseData = response[0];
484
+ }
485
+
486
+ const {
487
+ error: res_error,
488
+ } = RewardsPlatformModel.Giveaway().validate(responseData, {
400
489
  abortEarly: false,
401
490
  allowUnknown: false,
402
491
  });
@@ -404,23 +493,31 @@ class Rewards {
404
493
  if (res_error) {
405
494
  Logger({
406
495
  level: "WARN",
407
- message: "Response Validation Warnnings for saveGiveAway",
496
+ message: `Response Validation Warnnings for platform > Rewards > saveGiveAway \n ${res_error}`,
408
497
  });
409
- Logger({ level: "WARN", message: res_error });
410
498
  }
411
499
 
412
500
  return response;
413
501
  }
414
502
 
415
503
  /**
416
- * @param {Object} arg - Arg object.
417
- * @param {ConfigurationRequest} arg.body
418
- * @returns {Promise<SetConfigurationRes>} - Success response
504
+ * @param {RewardsPlatformApplicationValidator.SetRewardsConfigurationParam} arg
505
+ * - Arg object
506
+ *
507
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
508
+ * @param {import("../PlatformAPIClient").Options} - Options
509
+ * @returns {Promise<RewardsPlatformModel.SetConfigurationRes>} - Success response
510
+ * @name setRewardsConfiguration
419
511
  * @summary: Updates the collection with given android paths.
420
- * @description: Updates the configuration or inserts new records with the given android paths.
512
+ * @description: Updates the configuration or inserts new records with the given android paths. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/rewards/setRewardsConfiguration/).
421
513
  */
422
- async setRewardsConfiguration({ body } = {}) {
423
- const { error } = RewardsValidator.setRewardsConfiguration().validate(
514
+ async setRewardsConfiguration(
515
+ { body, requestHeaders } = { requestHeaders: {} },
516
+ { responseHeaders } = { responseHeaders: false }
517
+ ) {
518
+ const {
519
+ error,
520
+ } = RewardsPlatformApplicationValidator.setRewardsConfiguration().validate(
424
521
  {
425
522
  body,
426
523
  },
@@ -433,7 +530,7 @@ class Rewards {
433
530
  // Showing warrnings if extra unknown parameters are found
434
531
  const {
435
532
  error: warrning,
436
- } = RewardsValidator.setRewardsConfiguration().validate(
533
+ } = RewardsPlatformApplicationValidator.setRewardsConfiguration().validate(
437
534
  {
438
535
  body,
439
536
  },
@@ -442,9 +539,8 @@ class Rewards {
442
539
  if (warrning) {
443
540
  Logger({
444
541
  level: "WARN",
445
- message: "Parameter Validation warrnings for setRewardsConfiguration",
542
+ message: `Parameter Validation warrnings for platform > Rewards > setRewardsConfiguration \n ${warrning}`,
446
543
  });
447
- Logger({ level: "WARN", message: warrning });
448
544
  }
449
545
 
450
546
  const query_params = {};
@@ -454,12 +550,19 @@ class Rewards {
454
550
  "post",
455
551
  `/service/platform/rewards/v1.0/company/${this.config.companyId}/application/${this.applicationId}/configuration/`,
456
552
  query_params,
457
- body
553
+ body,
554
+ requestHeaders,
555
+ { responseHeaders }
458
556
  );
459
557
 
558
+ let responseData = response;
559
+ if (responseHeaders) {
560
+ responseData = response[0];
561
+ }
562
+
460
563
  const {
461
564
  error: res_error,
462
- } = RewardsModel.SetConfigurationRes().validate(response, {
565
+ } = RewardsPlatformModel.SetConfigurationRes().validate(responseData, {
463
566
  abortEarly: false,
464
567
  allowUnknown: false,
465
568
  });
@@ -467,24 +570,29 @@ class Rewards {
467
570
  if (res_error) {
468
571
  Logger({
469
572
  level: "WARN",
470
- message: "Response Validation Warnnings for setRewardsConfiguration",
573
+ message: `Response Validation Warnnings for platform > Rewards > setRewardsConfiguration \n ${res_error}`,
471
574
  });
472
- Logger({ level: "WARN", message: res_error });
473
575
  }
474
576
 
475
577
  return response;
476
578
  }
477
579
 
478
580
  /**
479
- * @param {Object} arg - Arg object.
480
- * @param {string} arg.pageId - Pagination page id
481
- * @param {number} arg.pageSize - Pagination page size
482
- * @returns {Promise<GiveawayResponse>} - Success response
581
+ * @param {RewardsPlatformApplicationValidator.ShowGiveawaysParam} arg - Arg object
582
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
583
+ * @param {import("../PlatformAPIClient").Options} - Options
584
+ * @returns {Promise<RewardsPlatformModel.GiveawayResponse>} - Success response
585
+ * @name showGiveaways
483
586
  * @summary: List of giveaways of the current application.
484
- * @description: Fetch the detailed compilation of live, completed, and scheduled point-based giveaways created.
587
+ * @description: Fetch the detailed compilation of live, completed, and scheduled point-based giveaways created. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/rewards/showGiveaways/).
485
588
  */
486
- async showGiveaways({ pageId, pageSize } = {}) {
487
- const { error } = RewardsValidator.showGiveaways().validate(
589
+ async showGiveaways(
590
+ { pageId, pageSize, requestHeaders } = { requestHeaders: {} },
591
+ { responseHeaders } = { responseHeaders: false }
592
+ ) {
593
+ const {
594
+ error,
595
+ } = RewardsPlatformApplicationValidator.showGiveaways().validate(
488
596
  {
489
597
  pageId,
490
598
  pageSize,
@@ -496,7 +604,9 @@ class Rewards {
496
604
  }
497
605
 
498
606
  // Showing warrnings if extra unknown parameters are found
499
- const { error: warrning } = RewardsValidator.showGiveaways().validate(
607
+ const {
608
+ error: warrning,
609
+ } = RewardsPlatformApplicationValidator.showGiveaways().validate(
500
610
  {
501
611
  pageId,
502
612
  pageSize,
@@ -506,9 +616,8 @@ class Rewards {
506
616
  if (warrning) {
507
617
  Logger({
508
618
  level: "WARN",
509
- message: "Parameter Validation warrnings for showGiveaways",
619
+ message: `Parameter Validation warrnings for platform > Rewards > showGiveaways \n ${warrning}`,
510
620
  });
511
- Logger({ level: "WARN", message: warrning });
512
621
  }
513
622
 
514
623
  const query_params = {};
@@ -520,12 +629,19 @@ class Rewards {
520
629
  "get",
521
630
  `/service/platform/rewards/v1.0/company/${this.config.companyId}/application/${this.applicationId}/giveaways`,
522
631
  query_params,
523
- undefined
632
+ undefined,
633
+ requestHeaders,
634
+ { responseHeaders }
524
635
  );
525
636
 
637
+ let responseData = response;
638
+ if (responseHeaders) {
639
+ responseData = response[0];
640
+ }
641
+
526
642
  const {
527
643
  error: res_error,
528
- } = RewardsModel.GiveawayResponse().validate(response, {
644
+ } = RewardsPlatformModel.GiveawayResponse().validate(responseData, {
529
645
  abortEarly: false,
530
646
  allowUnknown: false,
531
647
  });
@@ -533,22 +649,27 @@ class Rewards {
533
649
  if (res_error) {
534
650
  Logger({
535
651
  level: "WARN",
536
- message: "Response Validation Warnnings for showGiveaways",
652
+ message: `Response Validation Warnnings for platform > Rewards > showGiveaways \n ${res_error}`,
537
653
  });
538
- Logger({ level: "WARN", message: res_error });
539
654
  }
540
655
 
541
656
  return response;
542
657
  }
543
658
 
544
659
  /**
545
- * @param {Object} arg - Arg object.
546
- * @returns {Promise<Offer[]>} - Success response
660
+ * @param {RewardsPlatformApplicationValidator.ShowOffersParam} arg - Arg object
661
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
662
+ * @param {import("../PlatformAPIClient").Options} - Options
663
+ * @returns {Promise<RewardsPlatformModel.Offer[]>} - Success response
664
+ * @name showOffers
547
665
  * @summary: List of offers of the current application.
548
- * @description: Retrieve the list of offers within the current application, including order_discount, order, sign_up, and referral, along with their respective details.
666
+ * @description: Retrieve the list of offers within the current application, including order_discount, order, sign_up, and referral, along with their respective details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/rewards/showOffers/).
549
667
  */
550
- async showOffers({} = {}) {
551
- const { error } = RewardsValidator.showOffers().validate(
668
+ async showOffers(
669
+ { requestHeaders } = { requestHeaders: {} },
670
+ { responseHeaders } = { responseHeaders: false }
671
+ ) {
672
+ const { error } = RewardsPlatformApplicationValidator.showOffers().validate(
552
673
  {},
553
674
  { abortEarly: false, allowUnknown: true }
554
675
  );
@@ -557,16 +678,17 @@ class Rewards {
557
678
  }
558
679
 
559
680
  // Showing warrnings if extra unknown parameters are found
560
- const { error: warrning } = RewardsValidator.showOffers().validate(
681
+ const {
682
+ error: warrning,
683
+ } = RewardsPlatformApplicationValidator.showOffers().validate(
561
684
  {},
562
685
  { abortEarly: false, allowUnknown: false }
563
686
  );
564
687
  if (warrning) {
565
688
  Logger({
566
689
  level: "WARN",
567
- message: "Parameter Validation warrnings for showOffers",
690
+ message: `Parameter Validation warrnings for platform > Rewards > showOffers \n ${warrning}`,
568
691
  });
569
- Logger({ level: "WARN", message: warrning });
570
692
  }
571
693
 
572
694
  const query_params = {};
@@ -576,34 +698,46 @@ class Rewards {
576
698
  "get",
577
699
  `/service/platform/rewards/v1.0/company/${this.config.companyId}/application/${this.applicationId}/offers/`,
578
700
  query_params,
579
- undefined
701
+ undefined,
702
+ requestHeaders,
703
+ { responseHeaders }
580
704
  );
581
705
 
706
+ let responseData = response;
707
+ if (responseHeaders) {
708
+ responseData = response[0];
709
+ }
710
+
582
711
  const { error: res_error } = Joi.array()
583
- .items(RewardsModel.Offer())
584
- .validate(response, { abortEarly: false, allowUnknown: false });
712
+ .items(RewardsPlatformModel.Offer())
713
+ .validate(responseData, { abortEarly: false, allowUnknown: false });
585
714
 
586
715
  if (res_error) {
587
716
  Logger({
588
717
  level: "WARN",
589
- message: "Response Validation Warnnings for showOffers",
718
+ message: `Response Validation Warnnings for platform > Rewards > showOffers \n ${res_error}`,
590
719
  });
591
- Logger({ level: "WARN", message: res_error });
592
720
  }
593
721
 
594
722
  return response;
595
723
  }
596
724
 
597
725
  /**
598
- * @param {Object} arg - Arg object.
599
- * @param {string} arg.id - Giveaway ID
600
- * @param {Giveaway} arg.body
601
- * @returns {Promise<Giveaway>} - Success response
726
+ * @param {RewardsPlatformApplicationValidator.UpdateGiveAwayParam} arg - Arg object
727
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
728
+ * @param {import("../PlatformAPIClient").Options} - Options
729
+ * @returns {Promise<RewardsPlatformModel.Giveaway>} - Success response
730
+ * @name updateGiveAway
602
731
  * @summary: Updates the giveaway by it's ID.
603
- * @description: Make the necessary updates to the giveaway based on its giveaway ID.
732
+ * @description: Make the necessary updates to the giveaway based on its giveaway ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/rewards/updateGiveAway/).
604
733
  */
605
- async updateGiveAway({ id, body } = {}) {
606
- const { error } = RewardsValidator.updateGiveAway().validate(
734
+ async updateGiveAway(
735
+ { id, body, requestHeaders } = { requestHeaders: {} },
736
+ { responseHeaders } = { responseHeaders: false }
737
+ ) {
738
+ const {
739
+ error,
740
+ } = RewardsPlatformApplicationValidator.updateGiveAway().validate(
607
741
  {
608
742
  id,
609
743
  body,
@@ -615,7 +749,9 @@ class Rewards {
615
749
  }
616
750
 
617
751
  // Showing warrnings if extra unknown parameters are found
618
- const { error: warrning } = RewardsValidator.updateGiveAway().validate(
752
+ const {
753
+ error: warrning,
754
+ } = RewardsPlatformApplicationValidator.updateGiveAway().validate(
619
755
  {
620
756
  id,
621
757
  body,
@@ -625,9 +761,8 @@ class Rewards {
625
761
  if (warrning) {
626
762
  Logger({
627
763
  level: "WARN",
628
- message: "Parameter Validation warrnings for updateGiveAway",
764
+ message: `Parameter Validation warrnings for platform > Rewards > updateGiveAway \n ${warrning}`,
629
765
  });
630
- Logger({ level: "WARN", message: warrning });
631
766
  }
632
767
 
633
768
  const query_params = {};
@@ -637,10 +772,19 @@ class Rewards {
637
772
  "put",
638
773
  `/service/platform/rewards/v1.0/company/${this.config.companyId}/application/${this.applicationId}/giveaways/${id}`,
639
774
  query_params,
640
- body
775
+ body,
776
+ requestHeaders,
777
+ { responseHeaders }
641
778
  );
642
779
 
643
- const { error: res_error } = RewardsModel.Giveaway().validate(response, {
780
+ let responseData = response;
781
+ if (responseHeaders) {
782
+ responseData = response[0];
783
+ }
784
+
785
+ const {
786
+ error: res_error,
787
+ } = RewardsPlatformModel.Giveaway().validate(responseData, {
644
788
  abortEarly: false,
645
789
  allowUnknown: false,
646
790
  });
@@ -648,28 +792,31 @@ class Rewards {
648
792
  if (res_error) {
649
793
  Logger({
650
794
  level: "WARN",
651
- message: "Response Validation Warnnings for updateGiveAway",
795
+ message: `Response Validation Warnnings for platform > Rewards > updateGiveAway \n ${res_error}`,
652
796
  });
653
- Logger({ level: "WARN", message: res_error });
654
797
  }
655
798
 
656
799
  return response;
657
800
  }
658
801
 
659
802
  /**
660
- * @param {Object} arg - Arg object.
661
- * @param {string} arg.name - The name given to the offer.
662
- * @param {Offer} arg.body
663
- * @returns {Promise<Offer>} - Success response
803
+ * @param {RewardsPlatformApplicationValidator.UpdateOfferByNameParam} arg
804
+ * - Arg object
805
+ *
806
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
807
+ * @param {import("../PlatformAPIClient").Options} - Options
808
+ * @returns {Promise<RewardsPlatformModel.Offer>} - Success response
809
+ * @name updateOfferByName
664
810
  * @summary: Update offer by name
665
- * @description: Update the specific offer details and its configuration by offer name.
811
+ * @description: Update the specific offer details and its configuration by offer name. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/rewards/updateOfferByName/).
666
812
  */
667
- async updateOfferByName({
668
- name,
669
-
670
- body,
671
- } = {}) {
672
- const { error } = RewardsValidator.updateOfferByName().validate(
813
+ async updateOfferByName(
814
+ { name, body, requestHeaders } = { requestHeaders: {} },
815
+ { responseHeaders } = { responseHeaders: false }
816
+ ) {
817
+ const {
818
+ error,
819
+ } = RewardsPlatformApplicationValidator.updateOfferByName().validate(
673
820
  {
674
821
  name,
675
822
 
@@ -682,7 +829,9 @@ class Rewards {
682
829
  }
683
830
 
684
831
  // Showing warrnings if extra unknown parameters are found
685
- const { error: warrning } = RewardsValidator.updateOfferByName().validate(
832
+ const {
833
+ error: warrning,
834
+ } = RewardsPlatformApplicationValidator.updateOfferByName().validate(
686
835
  {
687
836
  name,
688
837
 
@@ -693,9 +842,8 @@ class Rewards {
693
842
  if (warrning) {
694
843
  Logger({
695
844
  level: "WARN",
696
- message: "Parameter Validation warrnings for updateOfferByName",
845
+ message: `Parameter Validation warrnings for platform > Rewards > updateOfferByName \n ${warrning}`,
697
846
  });
698
- Logger({ level: "WARN", message: warrning });
699
847
  }
700
848
 
701
849
  const query_params = {};
@@ -705,10 +853,19 @@ class Rewards {
705
853
  "put",
706
854
  `/service/platform/rewards/v1.0/company/${this.config.companyId}/application/${this.applicationId}/offers/${name}/`,
707
855
  query_params,
708
- body
856
+ body,
857
+ requestHeaders,
858
+ { responseHeaders }
709
859
  );
710
860
 
711
- const { error: res_error } = RewardsModel.Offer().validate(response, {
861
+ let responseData = response;
862
+ if (responseHeaders) {
863
+ responseData = response[0];
864
+ }
865
+
866
+ const {
867
+ error: res_error,
868
+ } = RewardsPlatformModel.Offer().validate(responseData, {
712
869
  abortEarly: false,
713
870
  allowUnknown: false,
714
871
  });
@@ -716,28 +873,29 @@ class Rewards {
716
873
  if (res_error) {
717
874
  Logger({
718
875
  level: "WARN",
719
- message: "Response Validation Warnnings for updateOfferByName",
876
+ message: `Response Validation Warnnings for platform > Rewards > updateOfferByName \n ${res_error}`,
720
877
  });
721
- Logger({ level: "WARN", message: res_error });
722
878
  }
723
879
 
724
880
  return response;
725
881
  }
726
882
 
727
883
  /**
728
- * @param {Object} arg - Arg object.
729
- * @param {string} arg.userId - User id
730
- * @param {AppUser} arg.body
731
- * @returns {Promise<AppUser>} - Success response
884
+ * @param {RewardsPlatformApplicationValidator.UpdateUserStatusParam} arg - Arg object
885
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
886
+ * @param {import("../PlatformAPIClient").Options} - Options
887
+ * @returns {Promise<RewardsPlatformModel.AppUser>} - Success response
888
+ * @name updateUserStatus
732
889
  * @summary: Update user status
733
- * @description: Update the user status by marking them as a block or unblock. It can be done by changing the active flag in request body.
890
+ * @description: Update the user status by marking them as a block or unblock. It can be done by changing the active flag in request body. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/rewards/updateUserStatus/).
734
891
  */
735
- async updateUserStatus({
736
- userId,
737
-
738
- body,
739
- } = {}) {
740
- const { error } = RewardsValidator.updateUserStatus().validate(
892
+ async updateUserStatus(
893
+ { userId, body, requestHeaders } = { requestHeaders: {} },
894
+ { responseHeaders } = { responseHeaders: false }
895
+ ) {
896
+ const {
897
+ error,
898
+ } = RewardsPlatformApplicationValidator.updateUserStatus().validate(
741
899
  {
742
900
  userId,
743
901
 
@@ -750,7 +908,9 @@ class Rewards {
750
908
  }
751
909
 
752
910
  // Showing warrnings if extra unknown parameters are found
753
- const { error: warrning } = RewardsValidator.updateUserStatus().validate(
911
+ const {
912
+ error: warrning,
913
+ } = RewardsPlatformApplicationValidator.updateUserStatus().validate(
754
914
  {
755
915
  userId,
756
916
 
@@ -761,9 +921,8 @@ class Rewards {
761
921
  if (warrning) {
762
922
  Logger({
763
923
  level: "WARN",
764
- message: "Parameter Validation warrnings for updateUserStatus",
924
+ message: `Parameter Validation warrnings for platform > Rewards > updateUserStatus \n ${warrning}`,
765
925
  });
766
- Logger({ level: "WARN", message: warrning });
767
926
  }
768
927
 
769
928
  const query_params = {};
@@ -773,10 +932,19 @@ class Rewards {
773
932
  "patch",
774
933
  `/service/platform/rewards/v1.0/company/${this.config.companyId}/application/${this.applicationId}/users/${userId}/`,
775
934
  query_params,
776
- body
935
+ body,
936
+ requestHeaders,
937
+ { responseHeaders }
777
938
  );
778
939
 
779
- const { error: res_error } = RewardsModel.AppUser().validate(response, {
940
+ let responseData = response;
941
+ if (responseHeaders) {
942
+ responseData = response[0];
943
+ }
944
+
945
+ const {
946
+ error: res_error,
947
+ } = RewardsPlatformModel.AppUser().validate(responseData, {
780
948
  abortEarly: false,
781
949
  allowUnknown: false,
782
950
  });
@@ -784,9 +952,8 @@ class Rewards {
784
952
  if (res_error) {
785
953
  Logger({
786
954
  level: "WARN",
787
- message: "Response Validation Warnnings for updateUserStatus",
955
+ message: `Response Validation Warnnings for platform > Rewards > updateUserStatus \n ${res_error}`,
788
956
  });
789
- Logger({ level: "WARN", message: res_error });
790
957
  }
791
958
 
792
959
  return response;