@gofynd/fdk-client-javascript 1.0.2 → 1.0.4

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