@gofynd/fdk-client-javascript 1.0.1 → 1.0.3

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 (318) hide show
  1. package/documentation/application/CART.md +5934 -4502
  2. package/documentation/application/CATALOG.md +6338 -7245
  3. package/documentation/application/COMMON.md +95 -222
  4. package/documentation/application/COMMUNICATION.md +106 -186
  5. package/documentation/application/CONFIGURATION.md +903 -1597
  6. package/documentation/application/CONTENT.md +562 -1270
  7. package/documentation/application/FILESTORAGE.md +84 -220
  8. package/documentation/application/LEAD.md +314 -660
  9. package/documentation/application/LOGISTIC.md +229 -305
  10. package/documentation/application/ORDER.md +642 -1137
  11. package/documentation/application/PAYMENT.md +2285 -3031
  12. package/documentation/application/POSCART.md +6079 -4642
  13. package/documentation/application/REWARDS.md +94 -248
  14. package/documentation/application/SHARE.md +152 -250
  15. package/documentation/application/THEME.md +952 -1235
  16. package/documentation/application/USER.md +1228 -1765
  17. package/documentation/platform/ANALYTICS.md +207 -349
  18. package/documentation/platform/AUDITTRAIL.md +121 -204
  19. package/documentation/platform/BILLING.md +865 -1376
  20. package/documentation/platform/CART.md +2814 -3662
  21. package/documentation/platform/CATALOG.md +15266 -17619
  22. package/documentation/platform/COMMON.md +95 -222
  23. package/documentation/platform/COMMUNICATION.md +1632 -2380
  24. package/documentation/platform/COMPANYPROFILE.md +572 -957
  25. package/documentation/platform/CONFIGURATION.md +3050 -4073
  26. package/documentation/platform/CONTENT.md +3509 -4121
  27. package/documentation/platform/DISCOUNT.md +140 -236
  28. package/documentation/platform/FILESTORAGE.md +187 -323
  29. package/documentation/platform/INVENTORY.md +268 -911
  30. package/documentation/platform/LEAD.md +2195 -2541
  31. package/documentation/platform/ORDER.md +3750 -5636
  32. package/documentation/platform/PARTNER.md +9 -36
  33. package/documentation/platform/PAYMENT.md +903 -1213
  34. package/documentation/platform/REWARDS.md +183 -347
  35. package/documentation/platform/SHARE.md +120 -213
  36. package/documentation/platform/THEME.md +12956 -13239
  37. package/documentation/platform/USER.md +975 -1120
  38. package/documentation/platform/WEBHOOK.md +78 -184
  39. package/documentation/public/CONFIGURATION.md +95 -222
  40. package/documentation/public/INVENTORY.md +100 -282
  41. package/documentation/public/WEBHOOK.md +27 -133
  42. package/package.json +1 -1
  43. package/sdk/application/ApplicationConfig.js +1 -1
  44. package/sdk/application/Cart/CartApplicationClient.d.ts +243 -243
  45. package/sdk/application/Cart/CartApplicationClient.js +1058 -547
  46. package/sdk/application/Cart/CartApplicationModel.d.ts +64 -63
  47. package/sdk/application/Cart/CartApplicationModel.js +489 -886
  48. package/sdk/application/Cart/CartApplicationValidator.d.ts +17 -17
  49. package/sdk/application/Cart/CartApplicationValidator.js +98 -98
  50. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +358 -358
  51. package/sdk/application/Catalog/CatalogApplicationClient.js +1545 -949
  52. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +90 -90
  53. package/sdk/application/Catalog/CatalogApplicationModel.js +692 -1258
  54. package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +19 -19
  55. package/sdk/application/Catalog/CatalogApplicationValidator.js +110 -110
  56. package/sdk/application/Common/CommonApplicationClient.d.ts +13 -13
  57. package/sdk/application/Common/CommonApplicationClient.js +76 -36
  58. package/sdk/application/Common/CommonApplicationModel.d.ts +12 -12
  59. package/sdk/application/Common/CommonApplicationModel.js +83 -160
  60. package/sdk/application/Common/CommonApplicationValidator.d.ts +1 -1
  61. package/sdk/application/Common/CommonApplicationValidator.js +6 -6
  62. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +11 -11
  63. package/sdk/application/Communication/CommunicationApplicationClient.js +92 -31
  64. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +6 -6
  65. package/sdk/application/Communication/CommunicationApplicationModel.js +38 -83
  66. package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +1 -1
  67. package/sdk/application/Communication/CommunicationApplicationValidator.js +4 -4
  68. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +116 -116
  69. package/sdk/application/Configuration/ConfigurationApplicationClient.js +638 -312
  70. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +85 -85
  71. package/sdk/application/Configuration/ConfigurationApplicationModel.js +480 -851
  72. package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +8 -8
  73. package/sdk/application/Configuration/ConfigurationApplicationValidator.js +33 -33
  74. package/sdk/application/Content/ContentApplicationClient.d.ts +67 -67
  75. package/sdk/application/Content/ContentApplicationClient.js +581 -213
  76. package/sdk/application/Content/ContentApplicationModel.d.ts +76 -75
  77. package/sdk/application/Content/ContentApplicationModel.js +468 -875
  78. package/sdk/application/Content/ContentApplicationValidator.d.ts +5 -5
  79. package/sdk/application/Content/ContentApplicationValidator.js +24 -24
  80. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +25 -25
  81. package/sdk/application/FileStorage/FileStorageApplicationClient.js +121 -59
  82. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +13 -13
  83. package/sdk/application/FileStorage/FileStorageApplicationModel.js +86 -169
  84. package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +1 -1
  85. package/sdk/application/FileStorage/FileStorageApplicationValidator.js +7 -7
  86. package/sdk/application/Lead/LeadApplicationClient.d.ts +24 -24
  87. package/sdk/application/Lead/LeadApplicationClient.js +230 -96
  88. package/sdk/application/Lead/LeadApplicationModel.d.ts +35 -35
  89. package/sdk/application/Lead/LeadApplicationModel.js +267 -474
  90. package/sdk/application/Lead/LeadApplicationValidator.d.ts +2 -2
  91. package/sdk/application/Lead/LeadApplicationValidator.js +11 -11
  92. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +30 -19
  93. package/sdk/application/Logistic/LogisticApplicationClient.js +196 -47
  94. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +17 -14
  95. package/sdk/application/Logistic/LogisticApplicationModel.js +133 -201
  96. package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +3 -2
  97. package/sdk/application/Logistic/LogisticApplicationValidator.js +14 -8
  98. package/sdk/application/Order/OrderApplicationClient.d.ts +86 -86
  99. package/sdk/application/Order/OrderApplicationClient.js +448 -215
  100. package/sdk/application/Order/OrderApplicationModel.d.ts +50 -50
  101. package/sdk/application/Order/OrderApplicationModel.js +357 -661
  102. package/sdk/application/Order/OrderApplicationValidator.d.ts +7 -7
  103. package/sdk/application/Order/OrderApplicationValidator.js +28 -28
  104. package/sdk/application/Payment/PaymentApplicationClient.d.ts +318 -318
  105. package/sdk/application/Payment/PaymentApplicationClient.js +1525 -750
  106. package/sdk/application/Payment/PaymentApplicationModel.d.ts +72 -72
  107. package/sdk/application/Payment/PaymentApplicationModel.js +565 -1033
  108. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +28 -28
  109. package/sdk/application/Payment/PaymentApplicationValidator.js +107 -107
  110. package/sdk/application/PosCart/PosCartApplicationClient.d.ts +254 -254
  111. package/sdk/application/PosCart/PosCartApplicationClient.js +1137 -606
  112. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +61 -60
  113. package/sdk/application/PosCart/PosCartApplicationModel.js +477 -873
  114. package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +18 -18
  115. package/sdk/application/PosCart/PosCartApplicationValidator.js +103 -103
  116. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +27 -27
  117. package/sdk/application/Rewards/RewardsApplicationClient.js +253 -113
  118. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +14 -14
  119. package/sdk/application/Rewards/RewardsApplicationModel.js +96 -191
  120. package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +3 -3
  121. package/sdk/application/Rewards/RewardsApplicationValidator.js +12 -12
  122. package/sdk/application/Share/ShareApplicationClient.d.ts +37 -37
  123. package/sdk/application/Share/ShareApplicationClient.js +221 -96
  124. package/sdk/application/Share/ShareApplicationModel.d.ts +8 -8
  125. package/sdk/application/Share/ShareApplicationModel.js +63 -123
  126. package/sdk/application/Share/ShareApplicationValidator.d.ts +4 -4
  127. package/sdk/application/Share/ShareApplicationValidator.js +12 -12
  128. package/sdk/application/Theme/ThemeApplicationClient.d.ts +8 -8
  129. package/sdk/application/Theme/ThemeApplicationClient.js +115 -37
  130. package/sdk/application/Theme/ThemeApplicationModel.d.ts +34 -34
  131. package/sdk/application/Theme/ThemeApplicationModel.js +190 -336
  132. package/sdk/application/Theme/ThemeApplicationValidator.d.ts +1 -1
  133. package/sdk/application/Theme/ThemeApplicationValidator.js +4 -4
  134. package/sdk/application/User/UserApplicationClient.d.ts +280 -280
  135. package/sdk/application/User/UserApplicationClient.js +1201 -543
  136. package/sdk/application/User/UserApplicationModel.d.ts +79 -72
  137. package/sdk/application/User/UserApplicationModel.js +440 -689
  138. package/sdk/application/User/UserApplicationValidator.d.ts +24 -24
  139. package/sdk/application/User/UserApplicationValidator.js +89 -89
  140. package/sdk/common/AxiosHelper.js +1 -1
  141. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +55 -47
  142. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +308 -151
  143. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +6 -6
  144. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +20 -20
  145. package/sdk/platform/Analytics/AnalyticsPlatformClient.d.ts +8 -4
  146. package/sdk/platform/Analytics/AnalyticsPlatformClient.js +103 -16
  147. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +11 -11
  148. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +95 -178
  149. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +16 -12
  150. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +131 -44
  151. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +10 -10
  152. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +50 -89
  153. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -1
  154. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +6 -6
  155. package/sdk/platform/Billing/BillingPlatformClient.d.ts +68 -56
  156. package/sdk/platform/Billing/BillingPlatformClient.js +416 -171
  157. package/sdk/platform/Billing/BillingPlatformModel.d.ts +40 -40
  158. package/sdk/platform/Billing/BillingPlatformModel.js +342 -668
  159. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +8 -8
  160. package/sdk/platform/Billing/BillingPlatformValidator.js +25 -25
  161. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +176 -159
  162. package/sdk/platform/Cart/CartPlatformApplicationClient.js +837 -500
  163. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +11 -11
  164. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +63 -63
  165. package/sdk/platform/Cart/CartPlatformModel.d.ts +86 -85
  166. package/sdk/platform/Cart/CartPlatformModel.js +677 -1211
  167. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +582 -529
  168. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +2642 -1533
  169. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +40 -40
  170. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +175 -175
  171. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +708 -590
  172. package/sdk/platform/Catalog/CatalogPlatformClient.js +3103 -1362
  173. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +293 -284
  174. package/sdk/platform/Catalog/CatalogPlatformModel.js +2149 -3660
  175. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +66 -64
  176. package/sdk/platform/Catalog/CatalogPlatformValidator.js +235 -216
  177. package/sdk/platform/Common/CommonPlatformClient.d.ts +14 -12
  178. package/sdk/platform/Common/CommonPlatformClient.js +80 -37
  179. package/sdk/platform/Common/CommonPlatformModel.d.ts +12 -12
  180. package/sdk/platform/Common/CommonPlatformModel.js +83 -160
  181. package/sdk/platform/Common/CommonPlatformValidator.d.ts +1 -1
  182. package/sdk/platform/Common/CommonPlatformValidator.js +6 -6
  183. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +333 -293
  184. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +1687 -855
  185. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +30 -30
  186. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +87 -87
  187. package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +2 -1
  188. package/sdk/platform/Communication/CommunicationPlatformClient.js +28 -4
  189. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +67 -67
  190. package/sdk/platform/Communication/CommunicationPlatformModel.js +522 -974
  191. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +70 -57
  192. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +463 -182
  193. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +28 -28
  194. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +294 -557
  195. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +7 -7
  196. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +24 -24
  197. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +175 -137
  198. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +1168 -521
  199. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +22 -21
  200. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +69 -63
  201. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +137 -119
  202. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +691 -316
  203. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +148 -146
  204. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +854 -1508
  205. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +9 -9
  206. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +38 -38
  207. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +542 -461
  208. package/sdk/platform/Content/ContentPlatformApplicationClient.js +2600 -1160
  209. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +50 -49
  210. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +159 -152
  211. package/sdk/platform/Content/ContentPlatformModel.d.ts +79 -75
  212. package/sdk/platform/Content/ContentPlatformModel.js +486 -867
  213. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +72 -61
  214. package/sdk/platform/Discount/DiscountPlatformClient.js +424 -198
  215. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +7 -7
  216. package/sdk/platform/Discount/DiscountPlatformModel.js +60 -121
  217. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +6 -6
  218. package/sdk/platform/Discount/DiscountPlatformValidator.js +29 -29
  219. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +26 -22
  220. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +145 -59
  221. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +1 -1
  222. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +8 -8
  223. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +58 -52
  224. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +240 -114
  225. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +13 -13
  226. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +86 -169
  227. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +3 -3
  228. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +11 -11
  229. package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +76 -63
  230. package/sdk/platform/Inventory/InventoryPlatformClient.js +461 -197
  231. package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +30 -30
  232. package/sdk/platform/Inventory/InventoryPlatformModel.js +497 -964
  233. package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +7 -7
  234. package/sdk/platform/Inventory/InventoryPlatformValidator.js +28 -28
  235. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +84 -71
  236. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +441 -182
  237. package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +7 -7
  238. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +28 -28
  239. package/sdk/platform/Lead/LeadPlatformClient.d.ts +86 -75
  240. package/sdk/platform/Lead/LeadPlatformClient.js +434 -212
  241. package/sdk/platform/Lead/LeadPlatformModel.d.ts +35 -35
  242. package/sdk/platform/Lead/LeadPlatformModel.js +267 -474
  243. package/sdk/platform/Lead/LeadPlatformValidator.d.ts +6 -6
  244. package/sdk/platform/Lead/LeadPlatformValidator.js +24 -24
  245. package/sdk/platform/OAuthClient.js +8 -8
  246. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +14 -11
  247. package/sdk/platform/Order/OrderPlatformApplicationClient.js +113 -49
  248. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -1
  249. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +6 -6
  250. package/sdk/platform/Order/OrderPlatformClient.d.ts +367 -315
  251. package/sdk/platform/Order/OrderPlatformClient.js +1775 -893
  252. package/sdk/platform/Order/OrderPlatformModel.d.ts +198 -192
  253. package/sdk/platform/Order/OrderPlatformModel.js +1591 -2822
  254. package/sdk/platform/Order/OrderPlatformValidator.d.ts +32 -32
  255. package/sdk/platform/Order/OrderPlatformValidator.js +160 -155
  256. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -2
  257. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +52 -8
  258. package/sdk/platform/Partner/PartnerPlatformModel.js +6 -22
  259. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +65 -54
  260. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +395 -164
  261. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +6 -6
  262. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +23 -23
  263. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +55 -45
  264. package/sdk/platform/Payment/PaymentPlatformClient.js +362 -147
  265. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +27 -27
  266. package/sdk/platform/Payment/PaymentPlatformModel.js +220 -408
  267. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +4 -4
  268. package/sdk/platform/Payment/PaymentPlatformValidator.js +21 -21
  269. package/sdk/platform/PlatformApplicationClient.d.ts +1496 -10153
  270. package/sdk/platform/PlatformApplicationClient.js +1584 -13691
  271. package/sdk/platform/PlatformClient.d.ts +7918 -7666
  272. package/sdk/platform/PlatformClient.js +8701 -9926
  273. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +91 -78
  274. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +507 -253
  275. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +8 -8
  276. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +34 -34
  277. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +15 -15
  278. package/sdk/platform/Rewards/RewardsPlatformModel.js +92 -194
  279. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +16 -12
  280. package/sdk/platform/Share/SharePlatformApplicationClient.js +130 -52
  281. package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +1 -1
  282. package/sdk/platform/Share/SharePlatformApplicationValidator.js +6 -6
  283. package/sdk/platform/Share/SharePlatformModel.d.ts +8 -8
  284. package/sdk/platform/Share/SharePlatformModel.js +60 -118
  285. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +148 -124
  286. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +770 -295
  287. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +15 -15
  288. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +44 -44
  289. package/sdk/platform/Theme/ThemePlatformModel.d.ts +34 -34
  290. package/sdk/platform/Theme/ThemePlatformModel.js +190 -336
  291. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +146 -67
  292. package/sdk/platform/User/UserPlatformApplicationClient.js +742 -155
  293. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +12 -7
  294. package/sdk/platform/User/UserPlatformApplicationValidator.js +61 -23
  295. package/sdk/platform/User/UserPlatformModel.d.ts +79 -72
  296. package/sdk/platform/User/UserPlatformModel.js +440 -689
  297. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +35 -29
  298. package/sdk/platform/Webhook/WebhookPlatformClient.js +218 -91
  299. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +7 -7
  300. package/sdk/platform/Webhook/WebhookPlatformModel.js +68 -136
  301. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +3 -3
  302. package/sdk/platform/Webhook/WebhookPlatformValidator.js +14 -14
  303. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +13 -13
  304. package/sdk/public/Configuration/ConfigurationPublicClient.js +81 -38
  305. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +12 -12
  306. package/sdk/public/Configuration/ConfigurationPublicModel.js +85 -162
  307. package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +1 -1
  308. package/sdk/public/Configuration/ConfigurationPublicValidator.js +6 -6
  309. package/sdk/public/Inventory/InventoryPublicClient.d.ts +34 -34
  310. package/sdk/public/Inventory/InventoryPublicClient.js +228 -105
  311. package/sdk/public/Inventory/InventoryPublicModel.d.ts +10 -10
  312. package/sdk/public/Inventory/InventoryPublicModel.js +119 -245
  313. package/sdk/public/Inventory/InventoryPublicValidator.d.ts +3 -3
  314. package/sdk/public/Inventory/InventoryPublicValidator.js +15 -15
  315. package/sdk/public/Webhook/WebhookPublicClient.js +51 -10
  316. package/sdk/public/Webhook/WebhookPublicModel.d.ts +7 -7
  317. package/sdk/public/Webhook/WebhookPublicModel.js +68 -136
  318. package/tests/application/catalog.spec.js +7 -0
@@ -3,31 +3,33 @@ const constructUrl = require("../constructUrl");
3
3
  const Paginator = require("../../common/Paginator");
4
4
  const { FDKClientValidationError } = require("../../common/FDKError");
5
5
  const ConfigurationValidator = require("./ConfigurationApplicationValidator");
6
+ const ConfigurationModel = require("./ConfigurationApplicationModel");
7
+ const { Logger } = require("./../../common/Logger");
6
8
 
7
9
  class Configuration {
8
10
  constructor(_conf) {
9
11
  this._conf = _conf;
10
12
  this._relativeUrls = {
13
+ getAppCurrencies: "/service/application/configuration/v1.0/currency",
14
+ getAppStaffList: "/service/application/configuration/v1.0/staff/list",
15
+ getAppStaffs: "/service/application/configuration/v1.0/staff",
11
16
  getApplication: "/service/application/configuration/v1.0/application",
12
- getOwnerInfo: "/service/application/configuration/v1.0/about",
13
17
  getBasicDetails: "/service/application/configuration/v1.0/detail",
14
- getIntegrationTokens: "/service/application/configuration/v1.0/token",
15
- getOrderingStores:
16
- "/service/application/configuration/v1.0/ordering-store/stores",
17
- getStoreDetailById:
18
- "/service/application/configuration/v1.0/ordering-store/stores/{store_id}",
19
- getFeatures: "/service/application/configuration/v1.0/feature",
20
18
  getContactInfo: "/service/application/configuration/v1.0/information",
21
19
  getCurrencies: "/service/application/configuration/v1.0/currencies",
22
20
  getCurrencyById: "/service/application/configuration/v1.0/currency/{id}",
23
- getAppCurrencies: "/service/application/configuration/v1.0/currency",
21
+ getFeatures: "/service/application/configuration/v1.0/feature",
22
+ getIntegrationTokens: "/service/application/configuration/v1.0/token",
24
23
  getLanguages: "/service/application/configuration/v1.0/languages",
25
24
  getOrderingStoreCookie:
26
25
  "/service/application/configuration/v1.0/ordering-store/select",
26
+ getOrderingStores:
27
+ "/service/application/configuration/v1.0/ordering-store/stores",
28
+ getOwnerInfo: "/service/application/configuration/v1.0/about",
29
+ getStoreDetailById:
30
+ "/service/application/configuration/v1.0/ordering-store/stores/{store_id}",
27
31
  removeOrderingStoreCookie:
28
32
  "/service/application/configuration/v1.0/ordering-store/select",
29
- getAppStaffList: "/service/application/configuration/v1.0/staff/list",
30
- getAppStaffs: "/service/application/configuration/v1.0/staff",
31
33
  };
32
34
  this._urls = Object.entries(this._relativeUrls).reduce(
33
35
  (urls, [method, relativeUrl]) => {
@@ -47,12 +49,12 @@ class Configuration {
47
49
 
48
50
  /**
49
51
  * @param {Object} arg - Arg object.
50
- * @returns {Promise<Application>} - Success response
51
- * @summary: Get current application details
52
- * @description: Use this API to get the current application details which includes configurations that indicate the status of the website, domain, ID, tokens, images, etc.
52
+ * @returns {Promise<AppCurrencyResponse>} - Success response
53
+ * @summary: Get currencies enabled in the application
54
+ * @description: Use this API to get a list of currencies allowed in the current application. Moreover, get the name, code, symbol, and the decimal digits of the currencies.
53
55
  */
54
- getApplication({} = {}) {
55
- const { error } = ConfigurationValidator.getApplication().validate(
56
+ async getAppCurrencies({} = {}) {
57
+ const { error } = ConfigurationValidator.getAppCurrencies().validate(
56
58
  {},
57
59
  { abortEarly: false, allowUnknown: true }
58
60
  );
@@ -63,41 +65,75 @@ class Configuration {
63
65
  // Showing warrnings if extra unknown parameters are found
64
66
  const {
65
67
  error: warrning,
66
- } = ConfigurationValidator.getApplication().validate(
68
+ } = ConfigurationValidator.getAppCurrencies().validate(
67
69
  {},
68
70
  { abortEarly: false, allowUnknown: false }
69
71
  );
70
72
  if (warrning) {
71
- console.log("Parameter Validation warrnings for getApplication");
72
- console.log(warrning);
73
+ Logger({
74
+ level: "WARN",
75
+ message: "Parameter Validation warrnings for getAppCurrencies",
76
+ });
77
+ Logger({ level: "WARN", message: warrning });
73
78
  }
74
79
 
75
80
  const query_params = {};
76
81
 
77
82
  const xHeaders = {};
78
83
 
79
- return APIClient.execute(
84
+ const response = await APIClient.execute(
80
85
  this._conf,
81
86
  "get",
82
87
  constructUrl({
83
- url: this._urls["getApplication"],
88
+ url: this._urls["getAppCurrencies"],
84
89
  params: {},
85
90
  }),
86
91
  query_params,
87
92
  undefined,
88
93
  xHeaders
89
94
  );
95
+
96
+ const {
97
+ error: res_error,
98
+ } = ConfigurationModel.AppCurrencyResponse().validate(response, {
99
+ abortEarly: false,
100
+ allowUnknown: false,
101
+ });
102
+
103
+ if (res_error) {
104
+ Logger({
105
+ level: "WARN",
106
+ message: "Response Validation Warnnings for getAppCurrencies",
107
+ });
108
+ Logger({ level: "WARN", message: res_error });
109
+ }
110
+
111
+ return response;
90
112
  }
91
113
 
92
114
  /**
93
115
  * @param {Object} arg - Arg object.
94
- * @returns {Promise<ApplicationAboutResponse>} - Success response
95
- * @summary: Get application, owner and seller information
96
- * @description: Use this API to get the current application details which includes channel name, description, banner, logo, favicon, domain details, etc. This API also retrieves the seller and owner information such as address, email address, and phone number.
116
+ * @param {number} [arg.pageNo] -
117
+ * @param {number} [arg.pageSize] -
118
+ * @param {boolean} [arg.orderIncent] - This is a boolean value. Select
119
+ * `true` to retrieve the staff members eligible for getting incentives on orders.
120
+ * @param {number} [arg.orderingStore] - ID of the ordering store. Helps in
121
+ * retrieving staff members working at a particular ordering store.
122
+ * @param {string} [arg.user] - Mongo ID of the staff. Helps in retrieving
123
+ * the details of a particular staff member.
124
+ * @returns {Promise<AppStaffListResponse>} - Success response
125
+ * @summary: Get a list of staff.
126
+ * @description: Use this API to get a list of staff including the names, employee code, incentive status, assigned ordering stores, and title of each staff added to the application.
97
127
  */
98
- getOwnerInfo({} = {}) {
99
- const { error } = ConfigurationValidator.getOwnerInfo().validate(
100
- {},
128
+ async getAppStaffList({
129
+ pageNo,
130
+ pageSize,
131
+ orderIncent,
132
+ orderingStore,
133
+ user,
134
+ } = {}) {
135
+ const { error } = ConfigurationValidator.getAppStaffList().validate(
136
+ { pageNo, pageSize, orderIncent, orderingStore, user },
101
137
  { abortEarly: false, allowUnknown: true }
102
138
  );
103
139
  if (error) {
@@ -105,41 +141,114 @@ class Configuration {
105
141
  }
106
142
 
107
143
  // Showing warrnings if extra unknown parameters are found
108
- const { error: warrning } = ConfigurationValidator.getOwnerInfo().validate(
109
- {},
144
+ const {
145
+ error: warrning,
146
+ } = ConfigurationValidator.getAppStaffList().validate(
147
+ { pageNo, pageSize, orderIncent, orderingStore, user },
110
148
  { abortEarly: false, allowUnknown: false }
111
149
  );
112
150
  if (warrning) {
113
- console.log("Parameter Validation warrnings for getOwnerInfo");
114
- console.log(warrning);
151
+ Logger({
152
+ level: "WARN",
153
+ message: "Parameter Validation warrnings for getAppStaffList",
154
+ });
155
+ Logger({ level: "WARN", message: warrning });
115
156
  }
116
157
 
117
158
  const query_params = {};
159
+ query_params["page_no"] = pageNo;
160
+ query_params["page_size"] = pageSize;
161
+ query_params["order_incent"] = orderIncent;
162
+ query_params["ordering_store"] = orderingStore;
163
+ query_params["user"] = user;
118
164
 
119
165
  const xHeaders = {};
120
166
 
121
- return APIClient.execute(
167
+ const response = await APIClient.execute(
122
168
  this._conf,
123
169
  "get",
124
170
  constructUrl({
125
- url: this._urls["getOwnerInfo"],
171
+ url: this._urls["getAppStaffList"],
126
172
  params: {},
127
173
  }),
128
174
  query_params,
129
175
  undefined,
130
176
  xHeaders
131
177
  );
178
+
179
+ const {
180
+ error: res_error,
181
+ } = ConfigurationModel.AppStaffListResponse().validate(response, {
182
+ abortEarly: false,
183
+ allowUnknown: false,
184
+ });
185
+
186
+ if (res_error) {
187
+ Logger({
188
+ level: "WARN",
189
+ message: "Response Validation Warnnings for getAppStaffList",
190
+ });
191
+ Logger({ level: "WARN", message: res_error });
192
+ }
193
+
194
+ return response;
132
195
  }
133
196
 
134
197
  /**
135
198
  * @param {Object} arg - Arg object.
136
- * @returns {Promise<ApplicationDetail>} - Success response
137
- * @summary: Get basic application details
138
- * @description: Use this API to retrieve only the basic details of the application which includes channel name, description, banner, logo, favicon, domain details, etc.
199
+ * @param {number} [arg.pageSize] -
200
+ * @param {boolean} [arg.orderIncent] - This is a boolean value. Select
201
+ * `true` to retrieve the staff members eligible for getting incentives on orders.
202
+ * @param {number} [arg.orderingStore] - ID of the ordering store. Helps in
203
+ * retrieving staff members working at a particular ordering store.
204
+ * @param {string} [arg.user] - Mongo ID of the staff. Helps in retrieving
205
+ * the details of a particular staff member.
206
+ * @summary: Get a list of staff.
207
+ * @description: Use this API to get a list of staff including the names, employee code, incentive status, assigned ordering stores, and title of each staff added to the application.
139
208
  */
140
- getBasicDetails({} = {}) {
141
- const { error } = ConfigurationValidator.getBasicDetails().validate(
142
- {},
209
+ getAppStaffListPaginator({
210
+ pageSize,
211
+ orderIncent,
212
+ orderingStore,
213
+ user,
214
+ } = {}) {
215
+ const paginator = new Paginator();
216
+ const callback = async () => {
217
+ const pageId = paginator.nextId;
218
+ const pageNo = paginator.pageNo;
219
+ const pageType = "number";
220
+ const data = await this.getAppStaffList({
221
+ pageNo: pageNo,
222
+ pageSize: pageSize,
223
+ orderIncent: orderIncent,
224
+ orderingStore: orderingStore,
225
+ user: user,
226
+ });
227
+ paginator.setPaginator({
228
+ hasNext: data.page.has_next ? true : false,
229
+ nextId: data.page.next_id,
230
+ });
231
+ return data;
232
+ };
233
+ paginator.setCallback(callback);
234
+ return paginator;
235
+ }
236
+
237
+ /**
238
+ * @param {Object} arg - Arg object.
239
+ * @param {boolean} [arg.orderIncent] - This is a boolean value. Select
240
+ * `true` to retrieve the staff members eligible for getting incentives on orders.
241
+ * @param {number} [arg.orderingStore] - ID of the ordering store. Helps in
242
+ * retrieving staff members working at a particular ordering store.
243
+ * @param {string} [arg.user] - Mongo ID of the staff. Helps in retrieving
244
+ * the details of a particular staff member.
245
+ * @returns {Promise<AppStaffResponse>} - Success response
246
+ * @summary: Get a list of staff.
247
+ * @description: Use this API to get a list of staff including the names, employee code, incentive status, assigned ordering stores, and title of each staff added to the application.
248
+ */
249
+ async getAppStaffs({ orderIncent, orderingStore, user } = {}) {
250
+ const { error } = ConfigurationValidator.getAppStaffs().validate(
251
+ { orderIncent, orderingStore, user },
143
252
  { abortEarly: false, allowUnknown: true }
144
253
  );
145
254
  if (error) {
@@ -147,42 +256,63 @@ class Configuration {
147
256
  }
148
257
 
149
258
  // Showing warrnings if extra unknown parameters are found
150
- const {
151
- error: warrning,
152
- } = ConfigurationValidator.getBasicDetails().validate(
153
- {},
259
+ const { error: warrning } = ConfigurationValidator.getAppStaffs().validate(
260
+ { orderIncent, orderingStore, user },
154
261
  { abortEarly: false, allowUnknown: false }
155
262
  );
156
263
  if (warrning) {
157
- console.log("Parameter Validation warrnings for getBasicDetails");
158
- console.log(warrning);
264
+ Logger({
265
+ level: "WARN",
266
+ message: "Parameter Validation warrnings for getAppStaffs",
267
+ });
268
+ Logger({ level: "WARN", message: warrning });
159
269
  }
160
270
 
161
271
  const query_params = {};
272
+ query_params["order_incent"] = orderIncent;
273
+ query_params["ordering_store"] = orderingStore;
274
+ query_params["user"] = user;
162
275
 
163
276
  const xHeaders = {};
164
277
 
165
- return APIClient.execute(
278
+ const response = await APIClient.execute(
166
279
  this._conf,
167
280
  "get",
168
281
  constructUrl({
169
- url: this._urls["getBasicDetails"],
282
+ url: this._urls["getAppStaffs"],
170
283
  params: {},
171
284
  }),
172
285
  query_params,
173
286
  undefined,
174
287
  xHeaders
175
288
  );
289
+
290
+ const {
291
+ error: res_error,
292
+ } = ConfigurationModel.AppStaffResponse().validate(response, {
293
+ abortEarly: false,
294
+ allowUnknown: false,
295
+ });
296
+
297
+ if (res_error) {
298
+ Logger({
299
+ level: "WARN",
300
+ message: "Response Validation Warnnings for getAppStaffs",
301
+ });
302
+ Logger({ level: "WARN", message: res_error });
303
+ }
304
+
305
+ return response;
176
306
  }
177
307
 
178
308
  /**
179
309
  * @param {Object} arg - Arg object.
180
- * @returns {Promise<AppTokenResponse>} - Success response
181
- * @summary: Get integration tokens
182
- * @description: Use this API to retrieve the tokens used while integrating Firebase, MoEngage, Segment, GTM, Freshchat, Safetynet, Google Map and Facebook. **Note** - Token values are encrypted with AES encryption using a secret key. Kindly reach out to the developers for obtaining the secret key.
310
+ * @returns {Promise<Application>} - Success response
311
+ * @summary: Get current application details
312
+ * @description: Use this API to get the current application details which includes configurations that indicate the status of the website, domain, ID, tokens, images, etc.
183
313
  */
184
- getIntegrationTokens({} = {}) {
185
- const { error } = ConfigurationValidator.getIntegrationTokens().validate(
314
+ async getApplication({} = {}) {
315
+ const { error } = ConfigurationValidator.getApplication().validate(
186
316
  {},
187
317
  { abortEarly: false, allowUnknown: true }
188
318
  );
@@ -193,46 +323,61 @@ class Configuration {
193
323
  // Showing warrnings if extra unknown parameters are found
194
324
  const {
195
325
  error: warrning,
196
- } = ConfigurationValidator.getIntegrationTokens().validate(
326
+ } = ConfigurationValidator.getApplication().validate(
197
327
  {},
198
328
  { abortEarly: false, allowUnknown: false }
199
329
  );
200
330
  if (warrning) {
201
- console.log("Parameter Validation warrnings for getIntegrationTokens");
202
- console.log(warrning);
331
+ Logger({
332
+ level: "WARN",
333
+ message: "Parameter Validation warrnings for getApplication",
334
+ });
335
+ Logger({ level: "WARN", message: warrning });
203
336
  }
204
337
 
205
338
  const query_params = {};
206
339
 
207
340
  const xHeaders = {};
208
341
 
209
- return APIClient.execute(
342
+ const response = await APIClient.execute(
210
343
  this._conf,
211
344
  "get",
212
345
  constructUrl({
213
- url: this._urls["getIntegrationTokens"],
346
+ url: this._urls["getApplication"],
214
347
  params: {},
215
348
  }),
216
349
  query_params,
217
350
  undefined,
218
351
  xHeaders
219
352
  );
353
+
354
+ const {
355
+ error: res_error,
356
+ } = ConfigurationModel.Application().validate(response, {
357
+ abortEarly: false,
358
+ allowUnknown: false,
359
+ });
360
+
361
+ if (res_error) {
362
+ Logger({
363
+ level: "WARN",
364
+ message: "Response Validation Warnnings for getApplication",
365
+ });
366
+ Logger({ level: "WARN", message: res_error });
367
+ }
368
+
369
+ return response;
220
370
  }
221
371
 
222
372
  /**
223
373
  * @param {Object} arg - Arg object.
224
- * @param {number} [arg.pageNo] - The page number to navigate through the
225
- * given set of results. Default value is 1.
226
- * @param {number} [arg.pageSize] - The number of items to retrieve in each
227
- * page. Default value is 10.
228
- * @param {string} [arg.q] - Store code or name of the ordering store.
229
- * @returns {Promise<OrderingStores>} - Success response
230
- * @summary: Get deployment stores
231
- * @description: Use this API to retrieve the details of all the deployment stores (the selling locations where the application will be utilized for placing orders).
374
+ * @returns {Promise<ApplicationDetail>} - Success response
375
+ * @summary: Get basic application details
376
+ * @description: Use this API to retrieve only the basic details of the application which includes channel name, description, banner, logo, favicon, domain details, etc.
232
377
  */
233
- getOrderingStores({ pageNo, pageSize, q } = {}) {
234
- const { error } = ConfigurationValidator.getOrderingStores().validate(
235
- { pageNo, pageSize, q },
378
+ async getBasicDetails({} = {}) {
379
+ const { error } = ConfigurationValidator.getBasicDetails().validate(
380
+ {},
236
381
  { abortEarly: false, allowUnknown: true }
237
382
  );
238
383
  if (error) {
@@ -242,74 +387,61 @@ class Configuration {
242
387
  // Showing warrnings if extra unknown parameters are found
243
388
  const {
244
389
  error: warrning,
245
- } = ConfigurationValidator.getOrderingStores().validate(
246
- { pageNo, pageSize, q },
390
+ } = ConfigurationValidator.getBasicDetails().validate(
391
+ {},
247
392
  { abortEarly: false, allowUnknown: false }
248
393
  );
249
394
  if (warrning) {
250
- console.log("Parameter Validation warrnings for getOrderingStores");
251
- console.log(warrning);
395
+ Logger({
396
+ level: "WARN",
397
+ message: "Parameter Validation warrnings for getBasicDetails",
398
+ });
399
+ Logger({ level: "WARN", message: warrning });
252
400
  }
253
401
 
254
402
  const query_params = {};
255
- query_params["page_no"] = pageNo;
256
- query_params["page_size"] = pageSize;
257
- query_params["q"] = q;
258
403
 
259
404
  const xHeaders = {};
260
405
 
261
- return APIClient.execute(
406
+ const response = await APIClient.execute(
262
407
  this._conf,
263
408
  "get",
264
409
  constructUrl({
265
- url: this._urls["getOrderingStores"],
410
+ url: this._urls["getBasicDetails"],
266
411
  params: {},
267
412
  }),
268
413
  query_params,
269
414
  undefined,
270
415
  xHeaders
271
416
  );
272
- }
273
417
 
274
- /**
275
- * @param {Object} arg - Arg object.
276
- * @param {number} [arg.pageSize] - The number of items to retrieve in each
277
- * page. Default value is 10.
278
- * @param {string} [arg.q] - Store code or name of the ordering store.
279
- * @summary: Get deployment stores
280
- * @description: Use this API to retrieve the details of all the deployment stores (the selling locations where the application will be utilized for placing orders).
281
- */
282
- getOrderingStoresPaginator({ pageSize, q } = {}) {
283
- const paginator = new Paginator();
284
- const callback = async () => {
285
- const pageId = paginator.nextId;
286
- const pageNo = paginator.pageNo;
287
- const pageType = "number";
288
- const data = await this.getOrderingStores({
289
- pageNo: pageNo,
290
- pageSize: pageSize,
291
- q: q,
292
- });
293
- paginator.setPaginator({
294
- hasNext: data.page.has_next ? true : false,
295
- nextId: data.page.next_id,
418
+ const {
419
+ error: res_error,
420
+ } = ConfigurationModel.ApplicationDetail().validate(response, {
421
+ abortEarly: false,
422
+ allowUnknown: false,
423
+ });
424
+
425
+ if (res_error) {
426
+ Logger({
427
+ level: "WARN",
428
+ message: "Response Validation Warnnings for getBasicDetails",
296
429
  });
297
- return data;
298
- };
299
- paginator.setCallback(callback);
300
- return paginator;
430
+ Logger({ level: "WARN", message: res_error });
431
+ }
432
+
433
+ return response;
301
434
  }
302
435
 
303
436
  /**
304
437
  * @param {Object} arg - Arg object.
305
- * @param {number} arg.storeId - Store uid
306
- * @returns {Promise<OrderingStore>} - Success response
307
- * @summary: Get ordering store details
308
- * @description: Use this API to retrieve the details of given stores uid (the selling locations where the application will be utilized for placing orders).
438
+ * @returns {Promise<ApplicationInformation>} - Success response
439
+ * @summary: Get application information
440
+ * @description: Use this API to retrieve information about the social links, address and contact information of the company/seller/brand operating the application.
309
441
  */
310
- getStoreDetailById({ storeId } = {}) {
311
- const { error } = ConfigurationValidator.getStoreDetailById().validate(
312
- { storeId },
442
+ async getContactInfo({} = {}) {
443
+ const { error } = ConfigurationValidator.getContactInfo().validate(
444
+ {},
313
445
  { abortEarly: false, allowUnknown: true }
314
446
  );
315
447
  if (error) {
@@ -319,40 +451,60 @@ class Configuration {
319
451
  // Showing warrnings if extra unknown parameters are found
320
452
  const {
321
453
  error: warrning,
322
- } = ConfigurationValidator.getStoreDetailById().validate(
323
- { storeId },
454
+ } = ConfigurationValidator.getContactInfo().validate(
455
+ {},
324
456
  { abortEarly: false, allowUnknown: false }
325
457
  );
326
458
  if (warrning) {
327
- console.log("Parameter Validation warrnings for getStoreDetailById");
328
- console.log(warrning);
459
+ Logger({
460
+ level: "WARN",
461
+ message: "Parameter Validation warrnings for getContactInfo",
462
+ });
463
+ Logger({ level: "WARN", message: warrning });
329
464
  }
330
465
 
331
466
  const query_params = {};
332
467
 
333
468
  const xHeaders = {};
334
469
 
335
- return APIClient.execute(
470
+ const response = await APIClient.execute(
336
471
  this._conf,
337
472
  "get",
338
473
  constructUrl({
339
- url: this._urls["getStoreDetailById"],
340
- params: { storeId },
474
+ url: this._urls["getContactInfo"],
475
+ params: {},
341
476
  }),
342
477
  query_params,
343
478
  undefined,
344
479
  xHeaders
345
480
  );
481
+
482
+ const {
483
+ error: res_error,
484
+ } = ConfigurationModel.ApplicationInformation().validate(response, {
485
+ abortEarly: false,
486
+ allowUnknown: false,
487
+ });
488
+
489
+ if (res_error) {
490
+ Logger({
491
+ level: "WARN",
492
+ message: "Response Validation Warnnings for getContactInfo",
493
+ });
494
+ Logger({ level: "WARN", message: res_error });
495
+ }
496
+
497
+ return response;
346
498
  }
347
499
 
348
500
  /**
349
501
  * @param {Object} arg - Arg object.
350
- * @returns {Promise<AppFeatureResponse>} - Success response
351
- * @summary: Get features of application
352
- * @description: Use this API to retrieve the configuration of features such as product detail, landing page, options in the login/registration screen, communication opt-in, cart options and many more.
502
+ * @returns {Promise<CurrenciesResponse>} - Success response
503
+ * @summary: Get all currencies list
504
+ * @description: Use this API to get a list of currencies available. Moreover, get the name, code, symbol, and the decimal digits of the currencies.
353
505
  */
354
- getFeatures({} = {}) {
355
- const { error } = ConfigurationValidator.getFeatures().validate(
506
+ async getCurrencies({} = {}) {
507
+ const { error } = ConfigurationValidator.getCurrencies().validate(
356
508
  {},
357
509
  { abortEarly: false, allowUnknown: true }
358
510
  );
@@ -361,41 +513,62 @@ class Configuration {
361
513
  }
362
514
 
363
515
  // Showing warrnings if extra unknown parameters are found
364
- const { error: warrning } = ConfigurationValidator.getFeatures().validate(
516
+ const { error: warrning } = ConfigurationValidator.getCurrencies().validate(
365
517
  {},
366
518
  { abortEarly: false, allowUnknown: false }
367
519
  );
368
520
  if (warrning) {
369
- console.log("Parameter Validation warrnings for getFeatures");
370
- console.log(warrning);
521
+ Logger({
522
+ level: "WARN",
523
+ message: "Parameter Validation warrnings for getCurrencies",
524
+ });
525
+ Logger({ level: "WARN", message: warrning });
371
526
  }
372
527
 
373
528
  const query_params = {};
374
529
 
375
530
  const xHeaders = {};
376
531
 
377
- return APIClient.execute(
532
+ const response = await APIClient.execute(
378
533
  this._conf,
379
534
  "get",
380
535
  constructUrl({
381
- url: this._urls["getFeatures"],
536
+ url: this._urls["getCurrencies"],
382
537
  params: {},
383
538
  }),
384
539
  query_params,
385
540
  undefined,
386
541
  xHeaders
387
542
  );
543
+
544
+ const {
545
+ error: res_error,
546
+ } = ConfigurationModel.CurrenciesResponse().validate(response, {
547
+ abortEarly: false,
548
+ allowUnknown: false,
549
+ });
550
+
551
+ if (res_error) {
552
+ Logger({
553
+ level: "WARN",
554
+ message: "Response Validation Warnnings for getCurrencies",
555
+ });
556
+ Logger({ level: "WARN", message: res_error });
557
+ }
558
+
559
+ return response;
388
560
  }
389
561
 
390
562
  /**
391
563
  * @param {Object} arg - Arg object.
392
- * @returns {Promise<ApplicationInformation>} - Success response
393
- * @summary: Get application information
394
- * @description: Use this API to retrieve information about the social links, address and contact information of the company/seller/brand operating the application.
564
+ * @param {string} arg.id - Object ID assigned to the currency
565
+ * @returns {Promise<Currency>} - Success response
566
+ * @summary: Get currency by its ID
567
+ * @description: Use this API to retrieve a currency using its ID.
395
568
  */
396
- getContactInfo({} = {}) {
397
- const { error } = ConfigurationValidator.getContactInfo().validate(
398
- {},
569
+ async getCurrencyById({ id } = {}) {
570
+ const { error } = ConfigurationValidator.getCurrencyById().validate(
571
+ { id },
399
572
  { abortEarly: false, allowUnknown: true }
400
573
  );
401
574
  if (error) {
@@ -405,84 +578,61 @@ class Configuration {
405
578
  // Showing warrnings if extra unknown parameters are found
406
579
  const {
407
580
  error: warrning,
408
- } = ConfigurationValidator.getContactInfo().validate(
409
- {},
581
+ } = ConfigurationValidator.getCurrencyById().validate(
582
+ { id },
410
583
  { abortEarly: false, allowUnknown: false }
411
584
  );
412
585
  if (warrning) {
413
- console.log("Parameter Validation warrnings for getContactInfo");
414
- console.log(warrning);
586
+ Logger({
587
+ level: "WARN",
588
+ message: "Parameter Validation warrnings for getCurrencyById",
589
+ });
590
+ Logger({ level: "WARN", message: warrning });
415
591
  }
416
592
 
417
593
  const query_params = {};
418
594
 
419
595
  const xHeaders = {};
420
596
 
421
- return APIClient.execute(
597
+ const response = await APIClient.execute(
422
598
  this._conf,
423
599
  "get",
424
600
  constructUrl({
425
- url: this._urls["getContactInfo"],
426
- params: {},
601
+ url: this._urls["getCurrencyById"],
602
+ params: { id },
427
603
  }),
428
604
  query_params,
429
605
  undefined,
430
606
  xHeaders
431
607
  );
432
- }
433
-
434
- /**
435
- * @param {Object} arg - Arg object.
436
- * @returns {Promise<CurrenciesResponse>} - Success response
437
- * @summary: Get all currencies list
438
- * @description: Use this API to get a list of currencies available. Moreover, get the name, code, symbol, and the decimal digits of the currencies.
439
- */
440
- getCurrencies({} = {}) {
441
- const { error } = ConfigurationValidator.getCurrencies().validate(
442
- {},
443
- { abortEarly: false, allowUnknown: true }
444
- );
445
- if (error) {
446
- return Promise.reject(new FDKClientValidationError(error));
447
- }
448
608
 
449
- // Showing warrnings if extra unknown parameters are found
450
- const { error: warrning } = ConfigurationValidator.getCurrencies().validate(
451
- {},
452
- { abortEarly: false, allowUnknown: false }
453
- );
454
- if (warrning) {
455
- console.log("Parameter Validation warrnings for getCurrencies");
456
- console.log(warrning);
609
+ const {
610
+ error: res_error,
611
+ } = ConfigurationModel.Currency().validate(response, {
612
+ abortEarly: false,
613
+ allowUnknown: false,
614
+ });
615
+
616
+ if (res_error) {
617
+ Logger({
618
+ level: "WARN",
619
+ message: "Response Validation Warnnings for getCurrencyById",
620
+ });
621
+ Logger({ level: "WARN", message: res_error });
457
622
  }
458
623
 
459
- const query_params = {};
460
-
461
- const xHeaders = {};
462
-
463
- return APIClient.execute(
464
- this._conf,
465
- "get",
466
- constructUrl({
467
- url: this._urls["getCurrencies"],
468
- params: {},
469
- }),
470
- query_params,
471
- undefined,
472
- xHeaders
473
- );
624
+ return response;
474
625
  }
475
626
 
476
627
  /**
477
628
  * @param {Object} arg - Arg object.
478
- * @param {string} arg.id - Object ID assigned to the currency
479
- * @returns {Promise<Currency>} - Success response
480
- * @summary: Get currency by its ID
481
- * @description: Use this API to retrieve a currency using its ID.
629
+ * @returns {Promise<AppFeatureResponse>} - Success response
630
+ * @summary: Get features of application
631
+ * @description: Use this API to retrieve the configuration of features such as product detail, landing page, options in the login/registration screen, communication opt-in, cart options and many more.
482
632
  */
483
- getCurrencyById({ id } = {}) {
484
- const { error } = ConfigurationValidator.getCurrencyById().validate(
485
- { id },
633
+ async getFeatures({} = {}) {
634
+ const { error } = ConfigurationValidator.getFeatures().validate(
635
+ {},
486
636
  { abortEarly: false, allowUnknown: true }
487
637
  );
488
638
  if (error) {
@@ -490,42 +640,60 @@ class Configuration {
490
640
  }
491
641
 
492
642
  // Showing warrnings if extra unknown parameters are found
493
- const {
494
- error: warrning,
495
- } = ConfigurationValidator.getCurrencyById().validate(
496
- { id },
643
+ const { error: warrning } = ConfigurationValidator.getFeatures().validate(
644
+ {},
497
645
  { abortEarly: false, allowUnknown: false }
498
646
  );
499
647
  if (warrning) {
500
- console.log("Parameter Validation warrnings for getCurrencyById");
501
- console.log(warrning);
648
+ Logger({
649
+ level: "WARN",
650
+ message: "Parameter Validation warrnings for getFeatures",
651
+ });
652
+ Logger({ level: "WARN", message: warrning });
502
653
  }
503
654
 
504
655
  const query_params = {};
505
656
 
506
657
  const xHeaders = {};
507
658
 
508
- return APIClient.execute(
659
+ const response = await APIClient.execute(
509
660
  this._conf,
510
661
  "get",
511
662
  constructUrl({
512
- url: this._urls["getCurrencyById"],
513
- params: { id },
663
+ url: this._urls["getFeatures"],
664
+ params: {},
514
665
  }),
515
666
  query_params,
516
667
  undefined,
517
668
  xHeaders
518
669
  );
670
+
671
+ const {
672
+ error: res_error,
673
+ } = ConfigurationModel.AppFeatureResponse().validate(response, {
674
+ abortEarly: false,
675
+ allowUnknown: false,
676
+ });
677
+
678
+ if (res_error) {
679
+ Logger({
680
+ level: "WARN",
681
+ message: "Response Validation Warnnings for getFeatures",
682
+ });
683
+ Logger({ level: "WARN", message: res_error });
684
+ }
685
+
686
+ return response;
519
687
  }
520
688
 
521
689
  /**
522
690
  * @param {Object} arg - Arg object.
523
- * @returns {Promise<AppCurrencyResponse>} - Success response
524
- * @summary: Get currencies enabled in the application
525
- * @description: Use this API to get a list of currencies allowed in the current application. Moreover, get the name, code, symbol, and the decimal digits of the currencies.
691
+ * @returns {Promise<AppTokenResponse>} - Success response
692
+ * @summary: Get integration tokens
693
+ * @description: Use this API to retrieve the tokens used while integrating Firebase, MoEngage, Segment, GTM, Freshchat, Safetynet, Google Map and Facebook. **Note** - Token values are encrypted with AES encryption using a secret key. Kindly reach out to the developers for obtaining the secret key.
526
694
  */
527
- getAppCurrencies({} = {}) {
528
- const { error } = ConfigurationValidator.getAppCurrencies().validate(
695
+ async getIntegrationTokens({} = {}) {
696
+ const { error } = ConfigurationValidator.getIntegrationTokens().validate(
529
697
  {},
530
698
  { abortEarly: false, allowUnknown: true }
531
699
  );
@@ -536,30 +704,50 @@ class Configuration {
536
704
  // Showing warrnings if extra unknown parameters are found
537
705
  const {
538
706
  error: warrning,
539
- } = ConfigurationValidator.getAppCurrencies().validate(
707
+ } = ConfigurationValidator.getIntegrationTokens().validate(
540
708
  {},
541
709
  { abortEarly: false, allowUnknown: false }
542
710
  );
543
711
  if (warrning) {
544
- console.log("Parameter Validation warrnings for getAppCurrencies");
545
- console.log(warrning);
712
+ Logger({
713
+ level: "WARN",
714
+ message: "Parameter Validation warrnings for getIntegrationTokens",
715
+ });
716
+ Logger({ level: "WARN", message: warrning });
546
717
  }
547
718
 
548
719
  const query_params = {};
549
720
 
550
721
  const xHeaders = {};
551
722
 
552
- return APIClient.execute(
723
+ const response = await APIClient.execute(
553
724
  this._conf,
554
725
  "get",
555
726
  constructUrl({
556
- url: this._urls["getAppCurrencies"],
727
+ url: this._urls["getIntegrationTokens"],
557
728
  params: {},
558
729
  }),
559
730
  query_params,
560
731
  undefined,
561
732
  xHeaders
562
733
  );
734
+
735
+ const {
736
+ error: res_error,
737
+ } = ConfigurationModel.AppTokenResponse().validate(response, {
738
+ abortEarly: false,
739
+ allowUnknown: false,
740
+ });
741
+
742
+ if (res_error) {
743
+ Logger({
744
+ level: "WARN",
745
+ message: "Response Validation Warnnings for getIntegrationTokens",
746
+ });
747
+ Logger({ level: "WARN", message: res_error });
748
+ }
749
+
750
+ return response;
563
751
  }
564
752
 
565
753
  /**
@@ -568,7 +756,7 @@ class Configuration {
568
756
  * @summary: Get list of languages
569
757
  * @description: Use this API to get a list of languages supported in the application.
570
758
  */
571
- getLanguages({} = {}) {
759
+ async getLanguages({} = {}) {
572
760
  const { error } = ConfigurationValidator.getLanguages().validate(
573
761
  {},
574
762
  { abortEarly: false, allowUnknown: true }
@@ -583,15 +771,18 @@ class Configuration {
583
771
  { abortEarly: false, allowUnknown: false }
584
772
  );
585
773
  if (warrning) {
586
- console.log("Parameter Validation warrnings for getLanguages");
587
- console.log(warrning);
774
+ Logger({
775
+ level: "WARN",
776
+ message: "Parameter Validation warrnings for getLanguages",
777
+ });
778
+ Logger({ level: "WARN", message: warrning });
588
779
  }
589
780
 
590
781
  const query_params = {};
591
782
 
592
783
  const xHeaders = {};
593
784
 
594
- return APIClient.execute(
785
+ const response = await APIClient.execute(
595
786
  this._conf,
596
787
  "get",
597
788
  constructUrl({
@@ -602,6 +793,23 @@ class Configuration {
602
793
  undefined,
603
794
  xHeaders
604
795
  );
796
+
797
+ const {
798
+ error: res_error,
799
+ } = ConfigurationModel.LanguageResponse().validate(response, {
800
+ abortEarly: false,
801
+ allowUnknown: false,
802
+ });
803
+
804
+ if (res_error) {
805
+ Logger({
806
+ level: "WARN",
807
+ message: "Response Validation Warnnings for getLanguages",
808
+ });
809
+ Logger({ level: "WARN", message: res_error });
810
+ }
811
+
812
+ return response;
605
813
  }
606
814
 
607
815
  /**
@@ -611,7 +819,7 @@ class Configuration {
611
819
  * @summary: Get an Ordering Store signed cookie on selection of ordering store.
612
820
  * @description: Use this API to get an Ordering Store signed cookie upon selecting an ordering store. This will be used by the cart service to verify a coupon against the selected ordering store in cart.
613
821
  */
614
- getOrderingStoreCookie({ body } = {}) {
822
+ async getOrderingStoreCookie({ body } = {}) {
615
823
  const { error } = ConfigurationValidator.getOrderingStoreCookie().validate(
616
824
  { body },
617
825
  { abortEarly: false, allowUnknown: true }
@@ -628,15 +836,18 @@ class Configuration {
628
836
  { abortEarly: false, allowUnknown: false }
629
837
  );
630
838
  if (warrning) {
631
- console.log("Parameter Validation warrnings for getOrderingStoreCookie");
632
- console.log(warrning);
839
+ Logger({
840
+ level: "WARN",
841
+ message: "Parameter Validation warrnings for getOrderingStoreCookie",
842
+ });
843
+ Logger({ level: "WARN", message: warrning });
633
844
  }
634
845
 
635
846
  const query_params = {};
636
847
 
637
848
  const xHeaders = {};
638
849
 
639
- return APIClient.execute(
850
+ const response = await APIClient.execute(
640
851
  this._conf,
641
852
  "post",
642
853
  constructUrl({
@@ -647,19 +858,39 @@ class Configuration {
647
858
  body,
648
859
  xHeaders
649
860
  );
861
+
862
+ const {
863
+ error: res_error,
864
+ } = ConfigurationModel.SuccessMessageResponse().validate(response, {
865
+ abortEarly: false,
866
+ allowUnknown: false,
867
+ });
868
+
869
+ if (res_error) {
870
+ Logger({
871
+ level: "WARN",
872
+ message: "Response Validation Warnnings for getOrderingStoreCookie",
873
+ });
874
+ Logger({ level: "WARN", message: res_error });
875
+ }
876
+
877
+ return response;
650
878
  }
651
879
 
652
880
  /**
653
881
  * @param {Object} arg - Arg object.
654
- * @returns {Promise<SuccessMessageResponse>} - Success response
655
- * @summary: Unset the Ordering Store signed cookie.
656
- * @description: Use this API to unset the Ordering Store cookie upon changing the sales channel, by its domain URL, in the Universal Fynd Store app.
882
+ * @param {number} [arg.pageNo] - The page number to navigate through the
883
+ * given set of results. Default value is 1.
884
+ * @param {number} [arg.pageSize] - The number of items to retrieve in each
885
+ * page. Default value is 10.
886
+ * @param {string} [arg.q] - Store code or name of the ordering store.
887
+ * @returns {Promise<OrderingStores>} - Success response
888
+ * @summary: Get deployment stores
889
+ * @description: Use this API to retrieve the details of all the deployment stores (the selling locations where the application will be utilized for placing orders).
657
890
  */
658
- removeOrderingStoreCookie({} = {}) {
659
- const {
660
- error,
661
- } = ConfigurationValidator.removeOrderingStoreCookie().validate(
662
- {},
891
+ async getOrderingStores({ pageNo, pageSize, q } = {}) {
892
+ const { error } = ConfigurationValidator.getOrderingStores().validate(
893
+ { pageNo, pageSize, q },
663
894
  { abortEarly: false, allowUnknown: true }
664
895
  );
665
896
  if (error) {
@@ -669,51 +900,93 @@ class Configuration {
669
900
  // Showing warrnings if extra unknown parameters are found
670
901
  const {
671
902
  error: warrning,
672
- } = ConfigurationValidator.removeOrderingStoreCookie().validate(
673
- {},
903
+ } = ConfigurationValidator.getOrderingStores().validate(
904
+ { pageNo, pageSize, q },
674
905
  { abortEarly: false, allowUnknown: false }
675
906
  );
676
907
  if (warrning) {
677
- console.log(
678
- "Parameter Validation warrnings for removeOrderingStoreCookie"
679
- );
680
- console.log(warrning);
908
+ Logger({
909
+ level: "WARN",
910
+ message: "Parameter Validation warrnings for getOrderingStores",
911
+ });
912
+ Logger({ level: "WARN", message: warrning });
681
913
  }
682
914
 
683
915
  const query_params = {};
916
+ query_params["page_no"] = pageNo;
917
+ query_params["page_size"] = pageSize;
918
+ query_params["q"] = q;
684
919
 
685
920
  const xHeaders = {};
686
921
 
687
- return APIClient.execute(
922
+ const response = await APIClient.execute(
688
923
  this._conf,
689
- "delete",
924
+ "get",
690
925
  constructUrl({
691
- url: this._urls["removeOrderingStoreCookie"],
926
+ url: this._urls["getOrderingStores"],
692
927
  params: {},
693
928
  }),
694
929
  query_params,
695
930
  undefined,
696
931
  xHeaders
697
932
  );
933
+
934
+ const {
935
+ error: res_error,
936
+ } = ConfigurationModel.OrderingStores().validate(response, {
937
+ abortEarly: false,
938
+ allowUnknown: false,
939
+ });
940
+
941
+ if (res_error) {
942
+ Logger({
943
+ level: "WARN",
944
+ message: "Response Validation Warnnings for getOrderingStores",
945
+ });
946
+ Logger({ level: "WARN", message: res_error });
947
+ }
948
+
949
+ return response;
698
950
  }
699
951
 
700
952
  /**
701
953
  * @param {Object} arg - Arg object.
702
- * @param {number} [arg.pageNo] -
703
- * @param {number} [arg.pageSize] -
704
- * @param {boolean} [arg.orderIncent] - This is a boolean value. Select
705
- * `true` to retrieve the staff members eligible for getting incentives on orders.
706
- * @param {number} [arg.orderingStore] - ID of the ordering store. Helps in
707
- * retrieving staff members working at a particular ordering store.
708
- * @param {string} [arg.user] - Mongo ID of the staff. Helps in retrieving
709
- * the details of a particular staff member.
710
- * @returns {Promise<AppStaffListResponse>} - Success response
711
- * @summary: Get a list of staff.
712
- * @description: Use this API to get a list of staff including the names, employee code, incentive status, assigned ordering stores, and title of each staff added to the application.
954
+ * @param {number} [arg.pageSize] - The number of items to retrieve in each
955
+ * page. Default value is 10.
956
+ * @param {string} [arg.q] - Store code or name of the ordering store.
957
+ * @summary: Get deployment stores
958
+ * @description: Use this API to retrieve the details of all the deployment stores (the selling locations where the application will be utilized for placing orders).
713
959
  */
714
- getAppStaffList({ pageNo, pageSize, orderIncent, orderingStore, user } = {}) {
715
- const { error } = ConfigurationValidator.getAppStaffList().validate(
716
- { pageNo, pageSize, orderIncent, orderingStore, user },
960
+ getOrderingStoresPaginator({ pageSize, q } = {}) {
961
+ const paginator = new Paginator();
962
+ const callback = async () => {
963
+ const pageId = paginator.nextId;
964
+ const pageNo = paginator.pageNo;
965
+ const pageType = "number";
966
+ const data = await this.getOrderingStores({
967
+ pageNo: pageNo,
968
+ pageSize: pageSize,
969
+ q: q,
970
+ });
971
+ paginator.setPaginator({
972
+ hasNext: data.page.has_next ? true : false,
973
+ nextId: data.page.next_id,
974
+ });
975
+ return data;
976
+ };
977
+ paginator.setCallback(callback);
978
+ return paginator;
979
+ }
980
+
981
+ /**
982
+ * @param {Object} arg - Arg object.
983
+ * @returns {Promise<ApplicationAboutResponse>} - Success response
984
+ * @summary: Get application, owner and seller information
985
+ * @description: Use this API to get the current application details which includes channel name, description, banner, logo, favicon, domain details, etc. This API also retrieves the seller and owner information such as address, email address, and phone number.
986
+ */
987
+ async getOwnerInfo({} = {}) {
988
+ const { error } = ConfigurationValidator.getOwnerInfo().validate(
989
+ {},
717
990
  { abortEarly: false, allowUnknown: true }
718
991
  );
719
992
  if (error) {
@@ -721,94 +994,128 @@ class Configuration {
721
994
  }
722
995
 
723
996
  // Showing warrnings if extra unknown parameters are found
724
- const {
725
- error: warrning,
726
- } = ConfigurationValidator.getAppStaffList().validate(
727
- { pageNo, pageSize, orderIncent, orderingStore, user },
997
+ const { error: warrning } = ConfigurationValidator.getOwnerInfo().validate(
998
+ {},
728
999
  { abortEarly: false, allowUnknown: false }
729
1000
  );
730
1001
  if (warrning) {
731
- console.log("Parameter Validation warrnings for getAppStaffList");
732
- console.log(warrning);
1002
+ Logger({
1003
+ level: "WARN",
1004
+ message: "Parameter Validation warrnings for getOwnerInfo",
1005
+ });
1006
+ Logger({ level: "WARN", message: warrning });
733
1007
  }
734
1008
 
735
1009
  const query_params = {};
736
- query_params["page_no"] = pageNo;
737
- query_params["page_size"] = pageSize;
738
- query_params["order_incent"] = orderIncent;
739
- query_params["ordering_store"] = orderingStore;
740
- query_params["user"] = user;
741
1010
 
742
1011
  const xHeaders = {};
743
1012
 
744
- return APIClient.execute(
1013
+ const response = await APIClient.execute(
745
1014
  this._conf,
746
1015
  "get",
747
1016
  constructUrl({
748
- url: this._urls["getAppStaffList"],
1017
+ url: this._urls["getOwnerInfo"],
749
1018
  params: {},
750
1019
  }),
751
1020
  query_params,
752
1021
  undefined,
753
1022
  xHeaders
754
1023
  );
1024
+
1025
+ const {
1026
+ error: res_error,
1027
+ } = ConfigurationModel.ApplicationAboutResponse().validate(response, {
1028
+ abortEarly: false,
1029
+ allowUnknown: false,
1030
+ });
1031
+
1032
+ if (res_error) {
1033
+ Logger({
1034
+ level: "WARN",
1035
+ message: "Response Validation Warnnings for getOwnerInfo",
1036
+ });
1037
+ Logger({ level: "WARN", message: res_error });
1038
+ }
1039
+
1040
+ return response;
755
1041
  }
756
1042
 
757
1043
  /**
758
1044
  * @param {Object} arg - Arg object.
759
- * @param {number} [arg.pageSize] -
760
- * @param {boolean} [arg.orderIncent] - This is a boolean value. Select
761
- * `true` to retrieve the staff members eligible for getting incentives on orders.
762
- * @param {number} [arg.orderingStore] - ID of the ordering store. Helps in
763
- * retrieving staff members working at a particular ordering store.
764
- * @param {string} [arg.user] - Mongo ID of the staff. Helps in retrieving
765
- * the details of a particular staff member.
766
- * @summary: Get a list of staff.
767
- * @description: Use this API to get a list of staff including the names, employee code, incentive status, assigned ordering stores, and title of each staff added to the application.
1045
+ * @param {number} arg.storeId - Store uid
1046
+ * @returns {Promise<OrderingStore>} - Success response
1047
+ * @summary: Get ordering store details
1048
+ * @description: Use this API to retrieve the details of given stores uid (the selling locations where the application will be utilized for placing orders).
768
1049
  */
769
- getAppStaffListPaginator({
770
- pageSize,
771
- orderIncent,
772
- orderingStore,
773
- user,
774
- } = {}) {
775
- const paginator = new Paginator();
776
- const callback = async () => {
777
- const pageId = paginator.nextId;
778
- const pageNo = paginator.pageNo;
779
- const pageType = "number";
780
- const data = await this.getAppStaffList({
781
- pageNo: pageNo,
782
- pageSize: pageSize,
783
- orderIncent: orderIncent,
784
- orderingStore: orderingStore,
785
- user: user,
1050
+ async getStoreDetailById({ storeId } = {}) {
1051
+ const { error } = ConfigurationValidator.getStoreDetailById().validate(
1052
+ { storeId },
1053
+ { abortEarly: false, allowUnknown: true }
1054
+ );
1055
+ if (error) {
1056
+ return Promise.reject(new FDKClientValidationError(error));
1057
+ }
1058
+
1059
+ // Showing warrnings if extra unknown parameters are found
1060
+ const {
1061
+ error: warrning,
1062
+ } = ConfigurationValidator.getStoreDetailById().validate(
1063
+ { storeId },
1064
+ { abortEarly: false, allowUnknown: false }
1065
+ );
1066
+ if (warrning) {
1067
+ Logger({
1068
+ level: "WARN",
1069
+ message: "Parameter Validation warrnings for getStoreDetailById",
786
1070
  });
787
- paginator.setPaginator({
788
- hasNext: data.page.has_next ? true : false,
789
- nextId: data.page.next_id,
1071
+ Logger({ level: "WARN", message: warrning });
1072
+ }
1073
+
1074
+ const query_params = {};
1075
+
1076
+ const xHeaders = {};
1077
+
1078
+ const response = await APIClient.execute(
1079
+ this._conf,
1080
+ "get",
1081
+ constructUrl({
1082
+ url: this._urls["getStoreDetailById"],
1083
+ params: { storeId },
1084
+ }),
1085
+ query_params,
1086
+ undefined,
1087
+ xHeaders
1088
+ );
1089
+
1090
+ const {
1091
+ error: res_error,
1092
+ } = ConfigurationModel.OrderingStore().validate(response, {
1093
+ abortEarly: false,
1094
+ allowUnknown: false,
1095
+ });
1096
+
1097
+ if (res_error) {
1098
+ Logger({
1099
+ level: "WARN",
1100
+ message: "Response Validation Warnnings for getStoreDetailById",
790
1101
  });
791
- return data;
792
- };
793
- paginator.setCallback(callback);
794
- return paginator;
1102
+ Logger({ level: "WARN", message: res_error });
1103
+ }
1104
+
1105
+ return response;
795
1106
  }
796
1107
 
797
1108
  /**
798
1109
  * @param {Object} arg - Arg object.
799
- * @param {boolean} [arg.orderIncent] - This is a boolean value. Select
800
- * `true` to retrieve the staff members eligible for getting incentives on orders.
801
- * @param {number} [arg.orderingStore] - ID of the ordering store. Helps in
802
- * retrieving staff members working at a particular ordering store.
803
- * @param {string} [arg.user] - Mongo ID of the staff. Helps in retrieving
804
- * the details of a particular staff member.
805
- * @returns {Promise<AppStaffResponse>} - Success response
806
- * @summary: Get a list of staff.
807
- * @description: Use this API to get a list of staff including the names, employee code, incentive status, assigned ordering stores, and title of each staff added to the application.
1110
+ * @returns {Promise<SuccessMessageResponse>} - Success response
1111
+ * @summary: Unset the Ordering Store signed cookie.
1112
+ * @description: Use this API to unset the Ordering Store cookie upon changing the sales channel, by its domain URL, in the Universal Fynd Store app.
808
1113
  */
809
- getAppStaffs({ orderIncent, orderingStore, user } = {}) {
810
- const { error } = ConfigurationValidator.getAppStaffs().validate(
811
- { orderIncent, orderingStore, user },
1114
+ async removeOrderingStoreCookie({} = {}) {
1115
+ const {
1116
+ error,
1117
+ } = ConfigurationValidator.removeOrderingStoreCookie().validate(
1118
+ {},
812
1119
  { abortEarly: false, allowUnknown: true }
813
1120
  );
814
1121
  if (error) {
@@ -816,33 +1123,52 @@ class Configuration {
816
1123
  }
817
1124
 
818
1125
  // Showing warrnings if extra unknown parameters are found
819
- const { error: warrning } = ConfigurationValidator.getAppStaffs().validate(
820
- { orderIncent, orderingStore, user },
1126
+ const {
1127
+ error: warrning,
1128
+ } = ConfigurationValidator.removeOrderingStoreCookie().validate(
1129
+ {},
821
1130
  { abortEarly: false, allowUnknown: false }
822
1131
  );
823
1132
  if (warrning) {
824
- console.log("Parameter Validation warrnings for getAppStaffs");
825
- console.log(warrning);
1133
+ Logger({
1134
+ level: "WARN",
1135
+ message: "Parameter Validation warrnings for removeOrderingStoreCookie",
1136
+ });
1137
+ Logger({ level: "WARN", message: warrning });
826
1138
  }
827
1139
 
828
1140
  const query_params = {};
829
- query_params["order_incent"] = orderIncent;
830
- query_params["ordering_store"] = orderingStore;
831
- query_params["user"] = user;
832
1141
 
833
1142
  const xHeaders = {};
834
1143
 
835
- return APIClient.execute(
1144
+ const response = await APIClient.execute(
836
1145
  this._conf,
837
- "get",
1146
+ "delete",
838
1147
  constructUrl({
839
- url: this._urls["getAppStaffs"],
1148
+ url: this._urls["removeOrderingStoreCookie"],
840
1149
  params: {},
841
1150
  }),
842
1151
  query_params,
843
1152
  undefined,
844
1153
  xHeaders
845
1154
  );
1155
+
1156
+ const {
1157
+ error: res_error,
1158
+ } = ConfigurationModel.SuccessMessageResponse().validate(response, {
1159
+ abortEarly: false,
1160
+ allowUnknown: false,
1161
+ });
1162
+
1163
+ if (res_error) {
1164
+ Logger({
1165
+ level: "WARN",
1166
+ message: "Response Validation Warnnings for removeOrderingStoreCookie",
1167
+ });
1168
+ Logger({ level: "WARN", message: res_error });
1169
+ }
1170
+
1171
+ return response;
846
1172
  }
847
1173
  }
848
1174