@gofynd/fdk-client-javascript 1.0.2 → 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 (310) 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 +557 -1279
  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 +14453 -17192
  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 +3438 -4172
  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 +3400 -5361
  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/Cart/CartApplicationClient.d.ts +243 -243
  44. package/sdk/application/Cart/CartApplicationClient.js +567 -567
  45. package/sdk/application/Cart/CartApplicationModel.d.ts +64 -63
  46. package/sdk/application/Cart/CartApplicationModel.js +489 -886
  47. package/sdk/application/Cart/CartApplicationValidator.d.ts +17 -17
  48. package/sdk/application/Cart/CartApplicationValidator.js +98 -98
  49. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +358 -358
  50. package/sdk/application/Catalog/CatalogApplicationClient.js +1036 -1036
  51. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +90 -90
  52. package/sdk/application/Catalog/CatalogApplicationModel.js +677 -1243
  53. package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +19 -19
  54. package/sdk/application/Catalog/CatalogApplicationValidator.js +110 -110
  55. package/sdk/application/Common/CommonApplicationClient.d.ts +13 -13
  56. package/sdk/application/Common/CommonApplicationClient.js +38 -38
  57. package/sdk/application/Common/CommonApplicationModel.d.ts +12 -12
  58. package/sdk/application/Common/CommonApplicationModel.js +83 -160
  59. package/sdk/application/Common/CommonApplicationValidator.d.ts +1 -1
  60. package/sdk/application/Common/CommonApplicationValidator.js +6 -6
  61. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +11 -11
  62. package/sdk/application/Communication/CommunicationApplicationClient.js +26 -26
  63. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +6 -6
  64. package/sdk/application/Communication/CommunicationApplicationModel.js +38 -83
  65. package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +1 -1
  66. package/sdk/application/Communication/CommunicationApplicationValidator.js +4 -4
  67. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +116 -116
  68. package/sdk/application/Configuration/ConfigurationApplicationClient.js +330 -330
  69. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +85 -85
  70. package/sdk/application/Configuration/ConfigurationApplicationModel.js +480 -851
  71. package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +8 -8
  72. package/sdk/application/Configuration/ConfigurationApplicationValidator.js +33 -33
  73. package/sdk/application/Content/ContentApplicationClient.d.ts +67 -67
  74. package/sdk/application/Content/ContentApplicationClient.js +191 -191
  75. package/sdk/application/Content/ContentApplicationModel.d.ts +76 -76
  76. package/sdk/application/Content/ContentApplicationModel.js +467 -884
  77. package/sdk/application/Content/ContentApplicationValidator.d.ts +5 -5
  78. package/sdk/application/Content/ContentApplicationValidator.js +24 -24
  79. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +25 -25
  80. package/sdk/application/FileStorage/FileStorageApplicationClient.js +59 -59
  81. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +13 -13
  82. package/sdk/application/FileStorage/FileStorageApplicationModel.js +86 -169
  83. package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +1 -1
  84. package/sdk/application/FileStorage/FileStorageApplicationValidator.js +7 -7
  85. package/sdk/application/Lead/LeadApplicationClient.d.ts +24 -24
  86. package/sdk/application/Lead/LeadApplicationClient.js +100 -100
  87. package/sdk/application/Lead/LeadApplicationModel.d.ts +35 -35
  88. package/sdk/application/Lead/LeadApplicationModel.js +267 -474
  89. package/sdk/application/Lead/LeadApplicationValidator.d.ts +2 -2
  90. package/sdk/application/Lead/LeadApplicationValidator.js +11 -11
  91. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +30 -19
  92. package/sdk/application/Logistic/LogisticApplicationClient.js +110 -43
  93. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +17 -14
  94. package/sdk/application/Logistic/LogisticApplicationModel.js +133 -201
  95. package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +3 -2
  96. package/sdk/application/Logistic/LogisticApplicationValidator.js +14 -8
  97. package/sdk/application/Order/OrderApplicationClient.d.ts +85 -85
  98. package/sdk/application/Order/OrderApplicationClient.js +232 -232
  99. package/sdk/application/Order/OrderApplicationModel.d.ts +50 -50
  100. package/sdk/application/Order/OrderApplicationModel.js +352 -656
  101. package/sdk/application/Order/OrderApplicationValidator.d.ts +7 -7
  102. package/sdk/application/Order/OrderApplicationValidator.js +28 -28
  103. package/sdk/application/Payment/PaymentApplicationClient.d.ts +318 -318
  104. package/sdk/application/Payment/PaymentApplicationClient.js +739 -739
  105. package/sdk/application/Payment/PaymentApplicationModel.d.ts +72 -72
  106. package/sdk/application/Payment/PaymentApplicationModel.js +570 -1038
  107. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +28 -28
  108. package/sdk/application/Payment/PaymentApplicationValidator.js +107 -107
  109. package/sdk/application/PosCart/PosCartApplicationClient.d.ts +254 -254
  110. package/sdk/application/PosCart/PosCartApplicationClient.js +617 -617
  111. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +64 -63
  112. package/sdk/application/PosCart/PosCartApplicationModel.js +475 -871
  113. package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +18 -18
  114. package/sdk/application/PosCart/PosCartApplicationValidator.js +103 -103
  115. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +27 -27
  116. package/sdk/application/Rewards/RewardsApplicationClient.js +112 -112
  117. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +14 -14
  118. package/sdk/application/Rewards/RewardsApplicationModel.js +96 -191
  119. package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +3 -3
  120. package/sdk/application/Rewards/RewardsApplicationValidator.js +12 -12
  121. package/sdk/application/Share/ShareApplicationClient.d.ts +37 -37
  122. package/sdk/application/Share/ShareApplicationClient.js +84 -84
  123. package/sdk/application/Share/ShareApplicationModel.d.ts +8 -8
  124. package/sdk/application/Share/ShareApplicationModel.js +63 -123
  125. package/sdk/application/Share/ShareApplicationValidator.d.ts +4 -4
  126. package/sdk/application/Share/ShareApplicationValidator.js +12 -12
  127. package/sdk/application/Theme/ThemeApplicationClient.d.ts +8 -8
  128. package/sdk/application/Theme/ThemeApplicationClient.js +31 -31
  129. package/sdk/application/Theme/ThemeApplicationModel.d.ts +34 -34
  130. package/sdk/application/Theme/ThemeApplicationModel.js +190 -336
  131. package/sdk/application/Theme/ThemeApplicationValidator.d.ts +1 -1
  132. package/sdk/application/Theme/ThemeApplicationValidator.js +4 -4
  133. package/sdk/application/User/UserApplicationClient.d.ts +280 -280
  134. package/sdk/application/User/UserApplicationClient.js +581 -581
  135. package/sdk/application/User/UserApplicationModel.d.ts +79 -72
  136. package/sdk/application/User/UserApplicationModel.js +440 -689
  137. package/sdk/application/User/UserApplicationValidator.d.ts +24 -24
  138. package/sdk/application/User/UserApplicationValidator.js +89 -89
  139. package/sdk/common/AxiosHelper.js +1 -1
  140. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +51 -51
  141. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +179 -179
  142. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +6 -6
  143. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +20 -20
  144. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +11 -11
  145. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +95 -178
  146. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +10 -10
  147. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +41 -41
  148. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +10 -10
  149. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +50 -89
  150. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -1
  151. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +6 -6
  152. package/sdk/platform/Billing/BillingPlatformClient.d.ts +60 -60
  153. package/sdk/platform/Billing/BillingPlatformClient.js +181 -181
  154. package/sdk/platform/Billing/BillingPlatformModel.d.ts +40 -40
  155. package/sdk/platform/Billing/BillingPlatformModel.js +342 -668
  156. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +8 -8
  157. package/sdk/platform/Billing/BillingPlatformValidator.js +25 -25
  158. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +168 -168
  159. package/sdk/platform/Cart/CartPlatformApplicationClient.js +553 -553
  160. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +11 -11
  161. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +63 -63
  162. package/sdk/platform/Cart/CartPlatformModel.d.ts +84 -83
  163. package/sdk/platform/Cart/CartPlatformModel.js +671 -1205
  164. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +632 -632
  165. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1525 -1525
  166. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +40 -40
  167. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +174 -174
  168. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +682 -682
  169. package/sdk/platform/Catalog/CatalogPlatformClient.js +1557 -1557
  170. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +291 -291
  171. package/sdk/platform/Catalog/CatalogPlatformModel.js +2127 -3904
  172. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +66 -66
  173. package/sdk/platform/Catalog/CatalogPlatformValidator.js +229 -229
  174. package/sdk/platform/Common/CommonPlatformClient.d.ts +12 -12
  175. package/sdk/platform/Common/CommonPlatformClient.js +41 -41
  176. package/sdk/platform/Common/CommonPlatformModel.d.ts +12 -12
  177. package/sdk/platform/Common/CommonPlatformModel.js +83 -160
  178. package/sdk/platform/Common/CommonPlatformValidator.d.ts +1 -1
  179. package/sdk/platform/Common/CommonPlatformValidator.js +6 -6
  180. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +326 -326
  181. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +943 -943
  182. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +30 -30
  183. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +87 -87
  184. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +67 -67
  185. package/sdk/platform/Communication/CommunicationPlatformModel.js +522 -974
  186. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +55 -55
  187. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +212 -212
  188. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +27 -27
  189. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +279 -542
  190. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +7 -7
  191. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +24 -24
  192. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +163 -153
  193. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +615 -552
  194. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +22 -21
  195. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +69 -63
  196. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +125 -125
  197. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +342 -342
  198. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +148 -146
  199. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +854 -1508
  200. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +9 -9
  201. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +38 -38
  202. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +534 -534
  203. package/sdk/platform/Content/ContentPlatformApplicationClient.js +1324 -1324
  204. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +50 -50
  205. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +156 -156
  206. package/sdk/platform/Content/ContentPlatformModel.d.ts +78 -78
  207. package/sdk/platform/Content/ContentPlatformModel.js +484 -907
  208. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +65 -65
  209. package/sdk/platform/Discount/DiscountPlatformClient.js +216 -216
  210. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +7 -7
  211. package/sdk/platform/Discount/DiscountPlatformModel.js +60 -121
  212. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +6 -6
  213. package/sdk/platform/Discount/DiscountPlatformValidator.js +29 -29
  214. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +24 -24
  215. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +58 -58
  216. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +1 -1
  217. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +8 -8
  218. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +52 -52
  219. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +123 -123
  220. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +13 -13
  221. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +86 -169
  222. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +3 -3
  223. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +11 -11
  224. package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +63 -63
  225. package/sdk/platform/Inventory/InventoryPlatformClient.js +228 -228
  226. package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +30 -30
  227. package/sdk/platform/Inventory/InventoryPlatformModel.js +497 -964
  228. package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +7 -7
  229. package/sdk/platform/Inventory/InventoryPlatformValidator.js +28 -28
  230. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +73 -73
  231. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +200 -200
  232. package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +7 -7
  233. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +28 -28
  234. package/sdk/platform/Lead/LeadPlatformClient.d.ts +80 -80
  235. package/sdk/platform/Lead/LeadPlatformClient.js +212 -212
  236. package/sdk/platform/Lead/LeadPlatformModel.d.ts +35 -35
  237. package/sdk/platform/Lead/LeadPlatformModel.js +267 -474
  238. package/sdk/platform/Lead/LeadPlatformValidator.d.ts +6 -6
  239. package/sdk/platform/Lead/LeadPlatformValidator.js +24 -24
  240. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +10 -10
  241. package/sdk/platform/Order/OrderPlatformApplicationClient.js +65 -65
  242. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -1
  243. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +6 -6
  244. package/sdk/platform/Order/OrderPlatformClient.d.ts +357 -357
  245. package/sdk/platform/Order/OrderPlatformClient.js +1035 -1035
  246. package/sdk/platform/Order/OrderPlatformModel.d.ts +198 -196
  247. package/sdk/platform/Order/OrderPlatformModel.js +1574 -2861
  248. package/sdk/platform/Order/OrderPlatformValidator.d.ts +32 -32
  249. package/sdk/platform/Order/OrderPlatformValidator.js +160 -160
  250. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +1 -1
  251. package/sdk/platform/Partner/PartnerPlatformModel.js +10 -26
  252. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +57 -57
  253. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +167 -167
  254. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +6 -6
  255. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +23 -23
  256. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +42 -42
  257. package/sdk/platform/Payment/PaymentPlatformClient.js +153 -153
  258. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +27 -27
  259. package/sdk/platform/Payment/PaymentPlatformModel.js +222 -410
  260. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +4 -4
  261. package/sdk/platform/Payment/PaymentPlatformValidator.js +21 -21
  262. package/sdk/platform/PlatformApplicationClient.d.ts +1496 -10325
  263. package/sdk/platform/PlatformApplicationClient.js +1584 -13899
  264. package/sdk/platform/PlatformClient.d.ts +7965 -7885
  265. package/sdk/platform/PlatformClient.js +8672 -10105
  266. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +83 -83
  267. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +275 -275
  268. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +8 -8
  269. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +34 -34
  270. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +15 -15
  271. package/sdk/platform/Rewards/RewardsPlatformModel.js +92 -194
  272. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +10 -10
  273. package/sdk/platform/Share/SharePlatformApplicationClient.js +59 -59
  274. package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +1 -1
  275. package/sdk/platform/Share/SharePlatformApplicationValidator.js +6 -6
  276. package/sdk/platform/Share/SharePlatformModel.d.ts +8 -8
  277. package/sdk/platform/Share/SharePlatformModel.js +60 -118
  278. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +132 -132
  279. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +310 -310
  280. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +15 -15
  281. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +44 -44
  282. package/sdk/platform/Theme/ThemePlatformModel.d.ts +34 -34
  283. package/sdk/platform/Theme/ThemePlatformModel.js +190 -336
  284. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +136 -69
  285. package/sdk/platform/User/UserPlatformApplicationClient.js +505 -166
  286. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +12 -7
  287. package/sdk/platform/User/UserPlatformApplicationValidator.js +61 -23
  288. package/sdk/platform/User/UserPlatformModel.d.ts +79 -72
  289. package/sdk/platform/User/UserPlatformModel.js +440 -689
  290. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +31 -31
  291. package/sdk/platform/Webhook/WebhookPlatformClient.js +88 -88
  292. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +7 -7
  293. package/sdk/platform/Webhook/WebhookPlatformModel.js +68 -136
  294. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +3 -3
  295. package/sdk/platform/Webhook/WebhookPlatformValidator.js +14 -14
  296. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +13 -13
  297. package/sdk/public/Configuration/ConfigurationPublicClient.js +38 -38
  298. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +12 -12
  299. package/sdk/public/Configuration/ConfigurationPublicModel.js +85 -162
  300. package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +1 -1
  301. package/sdk/public/Configuration/ConfigurationPublicValidator.js +6 -6
  302. package/sdk/public/Inventory/InventoryPublicClient.d.ts +34 -34
  303. package/sdk/public/Inventory/InventoryPublicClient.js +113 -113
  304. package/sdk/public/Inventory/InventoryPublicModel.d.ts +10 -10
  305. package/sdk/public/Inventory/InventoryPublicModel.js +119 -245
  306. package/sdk/public/Inventory/InventoryPublicValidator.d.ts +3 -3
  307. package/sdk/public/Inventory/InventoryPublicValidator.js +15 -15
  308. package/sdk/public/Webhook/WebhookPublicModel.d.ts +7 -7
  309. package/sdk/public/Webhook/WebhookPublicModel.js +68 -136
  310. package/tests/application/catalog.spec.js +7 -0
@@ -10,28 +10,28 @@ class Order {
10
10
  constructor(_conf) {
11
11
  this._conf = _conf;
12
12
  this._relativeUrls = {
13
- getOrders: "/service/application/order/v1.0/orders",
13
+ getCustomerDetailsByShipmentId:
14
+ "/service/application/order/v1.0/orders/{order_id}/shipments/{shipment_id}/customer-details",
15
+ getInvoiceByShipmentId:
16
+ "/service/application/order/v1.0/orders/shipments/{shipment_id}/invoice",
14
17
  getOrderById: "/service/application/order/v1.0/orders/{order_id}",
18
+ getOrders: "/service/application/order/v1.0/orders",
15
19
  getPosOrderById:
16
20
  "/service/application/order/v1.0/orders/pos-order/{order_id}",
17
- getShipmentById:
18
- "/service/application/order/v1.0/orders/shipments/{shipment_id}",
19
- getInvoiceByShipmentId:
20
- "/service/application/order/v1.0/orders/shipments/{shipment_id}/invoice",
21
- trackShipment:
22
- "/service/application/order/v1.0/orders/shipments/{shipment_id}/track",
23
- getCustomerDetailsByShipmentId:
24
- "/service/application/order/v1.0/orders/{order_id}/shipments/{shipment_id}/customer-details",
25
- sendOtpToShipmentCustomer:
26
- "/service/application/order/v1.0/orders/{order_id}/shipments/{shipment_id}/otp/send/",
27
- verifyOtpShipmentCustomer:
28
- "/service/application/order/v1.0/orders/{order_id}/shipments/{shipment_id}/otp/verify/",
29
21
  getShipmentBagReasons:
30
22
  "/service/application/order/v1.0/orders/shipments/{shipment_id}/bags/{bag_id}/reasons",
23
+ getShipmentById:
24
+ "/service/application/order/v1.0/orders/shipments/{shipment_id}",
31
25
  getShipmentReasons:
32
26
  "/service/application/order/v1.0/orders/shipments/{shipment_id}/reasons",
27
+ sendOtpToShipmentCustomer:
28
+ "/service/application/order/v1.0/orders/{order_id}/shipments/{shipment_id}/otp/send/",
29
+ trackShipment:
30
+ "/service/application/order/v1.0/orders/shipments/{shipment_id}/track",
33
31
  updateShipmentStatus:
34
32
  "/service/application/order/v1.0/orders/shipments/{shipment_id}/status",
33
+ verifyOtpShipmentCustomer:
34
+ "/service/application/order/v1.0/orders/{order_id}/shipments/{shipment_id}/otp/verify/",
35
35
  };
36
36
  this._urls = Object.entries(this._relativeUrls).reduce(
37
37
  (urls, [method, relativeUrl]) => {
@@ -51,31 +51,18 @@ class Order {
51
51
 
52
52
  /**
53
53
  * @param {Object} arg - Arg object.
54
- * @param {number} [arg.status] - A filter to retrieve orders by their
55
- * current status such as _placed_, _delivered_, etc.
56
- * @param {number} [arg.pageNo] - The page number to navigate through the
57
- * given set of results. Default value is 1.
58
- * @param {number} [arg.pageSize] - The number of items to retrieve in each
59
- * page. Default value is 10.
60
- * @param {string} [arg.fromDate] - The date from which the orders should be
61
- * retrieved.
62
- * @param {string} [arg.toDate] - The date till which the orders should be retrieved.
63
- * @param {string} [arg.customMeta] - A filter and retrieve data using
64
- * special fields included for special use-cases
65
- * @returns {Promise<OrderList>} - Success response
66
- * @summary: Get all orders
67
- * @description: Use this API to retrieve all the orders.
54
+ * @param {string} arg.orderId - ID of the shipment. An order may contain
55
+ * multiple items and may get divided into one or more shipment, each
56
+ * having its own ID.
57
+ * @param {string} arg.shipmentId - A unique number used for identifying and
58
+ * tracking your orders.
59
+ * @returns {Promise<CustomerDetailsResponse>} - Success response
60
+ * @summary: Get Customer Details by Shipment Id
61
+ * @description: Use this API to retrieve customer details such as mobileno using Shipment ID.
68
62
  */
69
- async getOrders({
70
- status,
71
- pageNo,
72
- pageSize,
73
- fromDate,
74
- toDate,
75
- customMeta,
76
- } = {}) {
77
- const { error } = OrderValidator.getOrders().validate(
78
- { status, pageNo, pageSize, fromDate, toDate, customMeta },
63
+ async getCustomerDetailsByShipmentId({ orderId, shipmentId } = {}) {
64
+ const { error } = OrderValidator.getCustomerDetailsByShipmentId().validate(
65
+ { orderId, shipmentId },
79
66
  { abortEarly: false, allowUnknown: true }
80
67
  );
81
68
  if (error) {
@@ -83,25 +70,22 @@ class Order {
83
70
  }
84
71
 
85
72
  // Showing warrnings if extra unknown parameters are found
86
- const { error: warrning } = OrderValidator.getOrders().validate(
87
- { status, pageNo, pageSize, fromDate, toDate, customMeta },
73
+ const {
74
+ error: warrning,
75
+ } = OrderValidator.getCustomerDetailsByShipmentId().validate(
76
+ { orderId, shipmentId },
88
77
  { abortEarly: false, allowUnknown: false }
89
78
  );
90
79
  if (warrning) {
91
80
  Logger({
92
81
  level: "WARN",
93
- message: "Parameter Validation warrnings for getOrders",
82
+ message:
83
+ "Parameter Validation warrnings for getCustomerDetailsByShipmentId",
94
84
  });
95
85
  Logger({ level: "WARN", message: warrning });
96
86
  }
97
87
 
98
88
  const query_params = {};
99
- query_params["status"] = status;
100
- query_params["page_no"] = pageNo;
101
- query_params["page_size"] = pageSize;
102
- query_params["from_date"] = fromDate;
103
- query_params["to_date"] = toDate;
104
- query_params["custom_meta"] = customMeta;
105
89
 
106
90
  const xHeaders = {};
107
91
 
@@ -109,15 +93,17 @@ class Order {
109
93
  this._conf,
110
94
  "get",
111
95
  constructUrl({
112
- url: this._urls["getOrders"],
113
- params: {},
96
+ url: this._urls["getCustomerDetailsByShipmentId"],
97
+ params: { orderId, shipmentId },
114
98
  }),
115
99
  query_params,
116
100
  undefined,
117
101
  xHeaders
118
102
  );
119
103
 
120
- const { error: res_error } = OrderModel.OrderList().validate(response, {
104
+ const {
105
+ error: res_error,
106
+ } = OrderModel.CustomerDetailsResponse().validate(response, {
121
107
  abortEarly: false,
122
108
  allowUnknown: false,
123
109
  });
@@ -125,7 +111,8 @@ class Order {
125
111
  if (res_error) {
126
112
  Logger({
127
113
  level: "WARN",
128
- message: "Response Validation Warnnings for getOrders",
114
+ message:
115
+ "Response Validation Warnnings for getCustomerDetailsByShipmentId",
129
116
  });
130
117
  Logger({ level: "WARN", message: res_error });
131
118
  }
@@ -135,15 +122,14 @@ class Order {
135
122
 
136
123
  /**
137
124
  * @param {Object} arg - Arg object.
138
- * @param {string} arg.orderId - A unique number used for identifying and
139
- * tracking your orders.
140
- * @returns {Promise<OrderById>} - Success response
141
- * @summary: Get details of an order
142
- * @description: Use this API to retrieve order details such as tracking details, shipment, store information using Fynd Order ID.
125
+ * @param {string} arg.shipmentId - ID of the shipment.
126
+ * @returns {Promise<ResponseGetInvoiceShipment>} - Success response
127
+ * @summary: Get Invoice of a shipment
128
+ * @description: Use this API to retrieve shipment invoice.
143
129
  */
144
- async getOrderById({ orderId } = {}) {
145
- const { error } = OrderValidator.getOrderById().validate(
146
- { orderId },
130
+ async getInvoiceByShipmentId({ shipmentId } = {}) {
131
+ const { error } = OrderValidator.getInvoiceByShipmentId().validate(
132
+ { shipmentId },
147
133
  { abortEarly: false, allowUnknown: true }
148
134
  );
149
135
  if (error) {
@@ -151,14 +137,16 @@ class Order {
151
137
  }
152
138
 
153
139
  // Showing warrnings if extra unknown parameters are found
154
- const { error: warrning } = OrderValidator.getOrderById().validate(
155
- { orderId },
140
+ const {
141
+ error: warrning,
142
+ } = OrderValidator.getInvoiceByShipmentId().validate(
143
+ { shipmentId },
156
144
  { abortEarly: false, allowUnknown: false }
157
145
  );
158
146
  if (warrning) {
159
147
  Logger({
160
148
  level: "WARN",
161
- message: "Parameter Validation warrnings for getOrderById",
149
+ message: "Parameter Validation warrnings for getInvoiceByShipmentId",
162
150
  });
163
151
  Logger({ level: "WARN", message: warrning });
164
152
  }
@@ -171,15 +159,17 @@ class Order {
171
159
  this._conf,
172
160
  "get",
173
161
  constructUrl({
174
- url: this._urls["getOrderById"],
175
- params: { orderId },
162
+ url: this._urls["getInvoiceByShipmentId"],
163
+ params: { shipmentId },
176
164
  }),
177
165
  query_params,
178
166
  undefined,
179
167
  xHeaders
180
168
  );
181
169
 
182
- const { error: res_error } = OrderModel.OrderById().validate(response, {
170
+ const {
171
+ error: res_error,
172
+ } = OrderModel.ResponseGetInvoiceShipment().validate(response, {
183
173
  abortEarly: false,
184
174
  allowUnknown: false,
185
175
  });
@@ -187,7 +177,7 @@ class Order {
187
177
  if (res_error) {
188
178
  Logger({
189
179
  level: "WARN",
190
- message: "Response Validation Warnnings for getOrderById",
180
+ message: "Response Validation Warnnings for getInvoiceByShipmentId",
191
181
  });
192
182
  Logger({ level: "WARN", message: res_error });
193
183
  }
@@ -199,12 +189,12 @@ class Order {
199
189
  * @param {Object} arg - Arg object.
200
190
  * @param {string} arg.orderId - A unique number used for identifying and
201
191
  * tracking your orders.
202
- * @returns {Promise<OrderList>} - Success response
203
- * @summary: Get POS Order
204
- * @description: Use this API to retrieve a POS order and all its details such as tracking details, shipment, store information using Fynd Order ID.
192
+ * @returns {Promise<OrderById>} - Success response
193
+ * @summary: Get details of an order
194
+ * @description: Use this API to retrieve order details such as tracking details, shipment, store information using Fynd Order ID.
205
195
  */
206
- async getPosOrderById({ orderId } = {}) {
207
- const { error } = OrderValidator.getPosOrderById().validate(
196
+ async getOrderById({ orderId } = {}) {
197
+ const { error } = OrderValidator.getOrderById().validate(
208
198
  { orderId },
209
199
  { abortEarly: false, allowUnknown: true }
210
200
  );
@@ -213,14 +203,14 @@ class Order {
213
203
  }
214
204
 
215
205
  // Showing warrnings if extra unknown parameters are found
216
- const { error: warrning } = OrderValidator.getPosOrderById().validate(
206
+ const { error: warrning } = OrderValidator.getOrderById().validate(
217
207
  { orderId },
218
208
  { abortEarly: false, allowUnknown: false }
219
209
  );
220
210
  if (warrning) {
221
211
  Logger({
222
212
  level: "WARN",
223
- message: "Parameter Validation warrnings for getPosOrderById",
213
+ message: "Parameter Validation warrnings for getOrderById",
224
214
  });
225
215
  Logger({ level: "WARN", message: warrning });
226
216
  }
@@ -233,7 +223,7 @@ class Order {
233
223
  this._conf,
234
224
  "get",
235
225
  constructUrl({
236
- url: this._urls["getPosOrderById"],
226
+ url: this._urls["getOrderById"],
237
227
  params: { orderId },
238
228
  }),
239
229
  query_params,
@@ -241,7 +231,7 @@ class Order {
241
231
  xHeaders
242
232
  );
243
233
 
244
- const { error: res_error } = OrderModel.OrderList().validate(response, {
234
+ const { error: res_error } = OrderModel.OrderById().validate(response, {
245
235
  abortEarly: false,
246
236
  allowUnknown: false,
247
237
  });
@@ -249,7 +239,7 @@ class Order {
249
239
  if (res_error) {
250
240
  Logger({
251
241
  level: "WARN",
252
- message: "Response Validation Warnnings for getPosOrderById",
242
+ message: "Response Validation Warnnings for getOrderById",
253
243
  });
254
244
  Logger({ level: "WARN", message: res_error });
255
245
  }
@@ -259,16 +249,31 @@ class Order {
259
249
 
260
250
  /**
261
251
  * @param {Object} arg - Arg object.
262
- * @param {string} arg.shipmentId - ID of the shipment. An order may contain
263
- * multiple items and may get divided into one or more shipment, each
264
- * having its own ID.
265
- * @returns {Promise<ShipmentById>} - Success response
266
- * @summary: Get details of a shipment
267
- * @description: Use this API to retrieve shipment details such as price breakup, tracking details, store information, etc. using Shipment ID.
252
+ * @param {number} [arg.status] - A filter to retrieve orders by their
253
+ * current status such as _placed_, _delivered_, etc.
254
+ * @param {number} [arg.pageNo] - The page number to navigate through the
255
+ * given set of results. Default value is 1.
256
+ * @param {number} [arg.pageSize] - The number of items to retrieve in each
257
+ * page. Default value is 10.
258
+ * @param {string} [arg.fromDate] - The date from which the orders should be
259
+ * retrieved.
260
+ * @param {string} [arg.toDate] - The date till which the orders should be retrieved.
261
+ * @param {string} [arg.customMeta] - A filter and retrieve data using
262
+ * special fields included for special use-cases
263
+ * @returns {Promise<OrderList>} - Success response
264
+ * @summary: Get all orders
265
+ * @description: Use this API to retrieve all the orders.
268
266
  */
269
- async getShipmentById({ shipmentId } = {}) {
270
- const { error } = OrderValidator.getShipmentById().validate(
271
- { shipmentId },
267
+ async getOrders({
268
+ status,
269
+ pageNo,
270
+ pageSize,
271
+ fromDate,
272
+ toDate,
273
+ customMeta,
274
+ } = {}) {
275
+ const { error } = OrderValidator.getOrders().validate(
276
+ { status, pageNo, pageSize, fromDate, toDate, customMeta },
272
277
  { abortEarly: false, allowUnknown: true }
273
278
  );
274
279
  if (error) {
@@ -276,19 +281,25 @@ class Order {
276
281
  }
277
282
 
278
283
  // Showing warrnings if extra unknown parameters are found
279
- const { error: warrning } = OrderValidator.getShipmentById().validate(
280
- { shipmentId },
284
+ const { error: warrning } = OrderValidator.getOrders().validate(
285
+ { status, pageNo, pageSize, fromDate, toDate, customMeta },
281
286
  { abortEarly: false, allowUnknown: false }
282
287
  );
283
288
  if (warrning) {
284
289
  Logger({
285
290
  level: "WARN",
286
- message: "Parameter Validation warrnings for getShipmentById",
291
+ message: "Parameter Validation warrnings for getOrders",
287
292
  });
288
293
  Logger({ level: "WARN", message: warrning });
289
294
  }
290
295
 
291
296
  const query_params = {};
297
+ query_params["status"] = status;
298
+ query_params["page_no"] = pageNo;
299
+ query_params["page_size"] = pageSize;
300
+ query_params["from_date"] = fromDate;
301
+ query_params["to_date"] = toDate;
302
+ query_params["custom_meta"] = customMeta;
292
303
 
293
304
  const xHeaders = {};
294
305
 
@@ -296,15 +307,15 @@ class Order {
296
307
  this._conf,
297
308
  "get",
298
309
  constructUrl({
299
- url: this._urls["getShipmentById"],
300
- params: { shipmentId },
310
+ url: this._urls["getOrders"],
311
+ params: {},
301
312
  }),
302
313
  query_params,
303
314
  undefined,
304
315
  xHeaders
305
316
  );
306
317
 
307
- const { error: res_error } = OrderModel.ShipmentById().validate(response, {
318
+ const { error: res_error } = OrderModel.OrderList().validate(response, {
308
319
  abortEarly: false,
309
320
  allowUnknown: false,
310
321
  });
@@ -312,7 +323,7 @@ class Order {
312
323
  if (res_error) {
313
324
  Logger({
314
325
  level: "WARN",
315
- message: "Response Validation Warnnings for getShipmentById",
326
+ message: "Response Validation Warnnings for getOrders",
316
327
  });
317
328
  Logger({ level: "WARN", message: res_error });
318
329
  }
@@ -322,14 +333,15 @@ class Order {
322
333
 
323
334
  /**
324
335
  * @param {Object} arg - Arg object.
325
- * @param {string} arg.shipmentId - ID of the shipment.
326
- * @returns {Promise<ResponseGetInvoiceShipment>} - Success response
327
- * @summary: Get Invoice of a shipment
328
- * @description: Use this API to retrieve shipment invoice.
336
+ * @param {string} arg.orderId - A unique number used for identifying and
337
+ * tracking your orders.
338
+ * @returns {Promise<OrderList>} - Success response
339
+ * @summary: Get POS Order
340
+ * @description: Use this API to retrieve a POS order and all its details such as tracking details, shipment, store information using Fynd Order ID.
329
341
  */
330
- async getInvoiceByShipmentId({ shipmentId } = {}) {
331
- const { error } = OrderValidator.getInvoiceByShipmentId().validate(
332
- { shipmentId },
342
+ async getPosOrderById({ orderId } = {}) {
343
+ const { error } = OrderValidator.getPosOrderById().validate(
344
+ { orderId },
333
345
  { abortEarly: false, allowUnknown: true }
334
346
  );
335
347
  if (error) {
@@ -337,16 +349,14 @@ class Order {
337
349
  }
338
350
 
339
351
  // Showing warrnings if extra unknown parameters are found
340
- const {
341
- error: warrning,
342
- } = OrderValidator.getInvoiceByShipmentId().validate(
343
- { shipmentId },
352
+ const { error: warrning } = OrderValidator.getPosOrderById().validate(
353
+ { orderId },
344
354
  { abortEarly: false, allowUnknown: false }
345
355
  );
346
356
  if (warrning) {
347
357
  Logger({
348
358
  level: "WARN",
349
- message: "Parameter Validation warrnings for getInvoiceByShipmentId",
359
+ message: "Parameter Validation warrnings for getPosOrderById",
350
360
  });
351
361
  Logger({ level: "WARN", message: warrning });
352
362
  }
@@ -359,17 +369,15 @@ class Order {
359
369
  this._conf,
360
370
  "get",
361
371
  constructUrl({
362
- url: this._urls["getInvoiceByShipmentId"],
363
- params: { shipmentId },
372
+ url: this._urls["getPosOrderById"],
373
+ params: { orderId },
364
374
  }),
365
375
  query_params,
366
376
  undefined,
367
377
  xHeaders
368
378
  );
369
379
 
370
- const {
371
- error: res_error,
372
- } = OrderModel.ResponseGetInvoiceShipment().validate(response, {
380
+ const { error: res_error } = OrderModel.OrderList().validate(response, {
373
381
  abortEarly: false,
374
382
  allowUnknown: false,
375
383
  });
@@ -377,7 +385,7 @@ class Order {
377
385
  if (res_error) {
378
386
  Logger({
379
387
  level: "WARN",
380
- message: "Response Validation Warnnings for getInvoiceByShipmentId",
388
+ message: "Response Validation Warnnings for getPosOrderById",
381
389
  });
382
390
  Logger({ level: "WARN", message: res_error });
383
391
  }
@@ -387,16 +395,18 @@ class Order {
387
395
 
388
396
  /**
389
397
  * @param {Object} arg - Arg object.
390
- * @param {string} arg.shipmentId - ID of the shipment. An order may contain
398
+ * @param {string} arg.shipmentId - ID of the bag. An order may contain
391
399
  * multiple items and may get divided into one or more shipment, each
392
400
  * having its own ID.
393
- * @returns {Promise<ShipmentTrack>} - Success response
394
- * @summary: Track shipment
395
- * @description: Track Shipment by shipment id, for application based on application Id
401
+ * @param {string} arg.bagId - ID of the bag. An order may contain multiple
402
+ * items and may get divided into one or more shipment, each having its own ID.
403
+ * @returns {Promise<ShipmentBagReasons>} - Success response
404
+ * @summary: Get reasons behind full or partial cancellation of a shipment
405
+ * @description: Use this API to retrieve the issues that led to the cancellation of bags within a shipment.
396
406
  */
397
- async trackShipment({ shipmentId } = {}) {
398
- const { error } = OrderValidator.trackShipment().validate(
399
- { shipmentId },
407
+ async getShipmentBagReasons({ shipmentId, bagId } = {}) {
408
+ const { error } = OrderValidator.getShipmentBagReasons().validate(
409
+ { shipmentId, bagId },
400
410
  { abortEarly: false, allowUnknown: true }
401
411
  );
402
412
  if (error) {
@@ -404,14 +414,14 @@ class Order {
404
414
  }
405
415
 
406
416
  // Showing warrnings if extra unknown parameters are found
407
- const { error: warrning } = OrderValidator.trackShipment().validate(
408
- { shipmentId },
417
+ const { error: warrning } = OrderValidator.getShipmentBagReasons().validate(
418
+ { shipmentId, bagId },
409
419
  { abortEarly: false, allowUnknown: false }
410
420
  );
411
421
  if (warrning) {
412
422
  Logger({
413
423
  level: "WARN",
414
- message: "Parameter Validation warrnings for trackShipment",
424
+ message: "Parameter Validation warrnings for getShipmentBagReasons",
415
425
  });
416
426
  Logger({ level: "WARN", message: warrning });
417
427
  }
@@ -424,15 +434,17 @@ class Order {
424
434
  this._conf,
425
435
  "get",
426
436
  constructUrl({
427
- url: this._urls["trackShipment"],
428
- params: { shipmentId },
437
+ url: this._urls["getShipmentBagReasons"],
438
+ params: { shipmentId, bagId },
429
439
  }),
430
440
  query_params,
431
441
  undefined,
432
442
  xHeaders
433
443
  );
434
444
 
435
- const { error: res_error } = OrderModel.ShipmentTrack().validate(response, {
445
+ const {
446
+ error: res_error,
447
+ } = OrderModel.ShipmentBagReasons().validate(response, {
436
448
  abortEarly: false,
437
449
  allowUnknown: false,
438
450
  });
@@ -440,7 +452,7 @@ class Order {
440
452
  if (res_error) {
441
453
  Logger({
442
454
  level: "WARN",
443
- message: "Response Validation Warnnings for trackShipment",
455
+ message: "Response Validation Warnnings for getShipmentBagReasons",
444
456
  });
445
457
  Logger({ level: "WARN", message: res_error });
446
458
  }
@@ -450,18 +462,16 @@ class Order {
450
462
 
451
463
  /**
452
464
  * @param {Object} arg - Arg object.
453
- * @param {string} arg.orderId - ID of the shipment. An order may contain
465
+ * @param {string} arg.shipmentId - ID of the shipment. An order may contain
454
466
  * multiple items and may get divided into one or more shipment, each
455
467
  * having its own ID.
456
- * @param {string} arg.shipmentId - A unique number used for identifying and
457
- * tracking your orders.
458
- * @returns {Promise<CustomerDetailsResponse>} - Success response
459
- * @summary: Get Customer Details by Shipment Id
460
- * @description: Use this API to retrieve customer details such as mobileno using Shipment ID.
468
+ * @returns {Promise<ShipmentById>} - Success response
469
+ * @summary: Get details of a shipment
470
+ * @description: Use this API to retrieve shipment details such as price breakup, tracking details, store information, etc. using Shipment ID.
461
471
  */
462
- async getCustomerDetailsByShipmentId({ orderId, shipmentId } = {}) {
463
- const { error } = OrderValidator.getCustomerDetailsByShipmentId().validate(
464
- { orderId, shipmentId },
472
+ async getShipmentById({ shipmentId } = {}) {
473
+ const { error } = OrderValidator.getShipmentById().validate(
474
+ { shipmentId },
465
475
  { abortEarly: false, allowUnknown: true }
466
476
  );
467
477
  if (error) {
@@ -469,17 +479,14 @@ class Order {
469
479
  }
470
480
 
471
481
  // Showing warrnings if extra unknown parameters are found
472
- const {
473
- error: warrning,
474
- } = OrderValidator.getCustomerDetailsByShipmentId().validate(
475
- { orderId, shipmentId },
482
+ const { error: warrning } = OrderValidator.getShipmentById().validate(
483
+ { shipmentId },
476
484
  { abortEarly: false, allowUnknown: false }
477
485
  );
478
486
  if (warrning) {
479
487
  Logger({
480
488
  level: "WARN",
481
- message:
482
- "Parameter Validation warrnings for getCustomerDetailsByShipmentId",
489
+ message: "Parameter Validation warrnings for getShipmentById",
483
490
  });
484
491
  Logger({ level: "WARN", message: warrning });
485
492
  }
@@ -492,17 +499,15 @@ class Order {
492
499
  this._conf,
493
500
  "get",
494
501
  constructUrl({
495
- url: this._urls["getCustomerDetailsByShipmentId"],
496
- params: { orderId, shipmentId },
502
+ url: this._urls["getShipmentById"],
503
+ params: { shipmentId },
497
504
  }),
498
505
  query_params,
499
506
  undefined,
500
507
  xHeaders
501
508
  );
502
509
 
503
- const {
504
- error: res_error,
505
- } = OrderModel.CustomerDetailsResponse().validate(response, {
510
+ const { error: res_error } = OrderModel.ShipmentById().validate(response, {
506
511
  abortEarly: false,
507
512
  allowUnknown: false,
508
513
  });
@@ -510,8 +515,7 @@ class Order {
510
515
  if (res_error) {
511
516
  Logger({
512
517
  level: "WARN",
513
- message:
514
- "Response Validation Warnnings for getCustomerDetailsByShipmentId",
518
+ message: "Response Validation Warnnings for getShipmentById",
515
519
  });
516
520
  Logger({ level: "WARN", message: res_error });
517
521
  }
@@ -521,18 +525,16 @@ class Order {
521
525
 
522
526
  /**
523
527
  * @param {Object} arg - Arg object.
524
- * @param {string} arg.orderId - A unique number used for identifying and
525
- * tracking your orders.
526
528
  * @param {string} arg.shipmentId - ID of the shipment. An order may contain
527
529
  * multiple items and may get divided into one or more shipment, each
528
530
  * having its own ID.
529
- * @returns {Promise<SendOtpToCustomerResponse>} - Success response
530
- * @summary: Send and Resend Otp code to Order-Shipment customer
531
- * @description: Use this API to send OTP to the customer of the mapped Shipment.
531
+ * @returns {Promise<ShipmentReasons>} - Success response
532
+ * @summary: Get reasons behind full or partial cancellation of a shipment
533
+ * @description: Use this API to retrieve the issues that led to the cancellation of bags within a shipment.
532
534
  */
533
- async sendOtpToShipmentCustomer({ orderId, shipmentId } = {}) {
534
- const { error } = OrderValidator.sendOtpToShipmentCustomer().validate(
535
- { orderId, shipmentId },
535
+ async getShipmentReasons({ shipmentId } = {}) {
536
+ const { error } = OrderValidator.getShipmentReasons().validate(
537
+ { shipmentId },
536
538
  { abortEarly: false, allowUnknown: true }
537
539
  );
538
540
  if (error) {
@@ -540,16 +542,14 @@ class Order {
540
542
  }
541
543
 
542
544
  // Showing warrnings if extra unknown parameters are found
543
- const {
544
- error: warrning,
545
- } = OrderValidator.sendOtpToShipmentCustomer().validate(
546
- { orderId, shipmentId },
545
+ const { error: warrning } = OrderValidator.getShipmentReasons().validate(
546
+ { shipmentId },
547
547
  { abortEarly: false, allowUnknown: false }
548
548
  );
549
549
  if (warrning) {
550
550
  Logger({
551
551
  level: "WARN",
552
- message: "Parameter Validation warrnings for sendOtpToShipmentCustomer",
552
+ message: "Parameter Validation warrnings for getShipmentReasons",
553
553
  });
554
554
  Logger({ level: "WARN", message: warrning });
555
555
  }
@@ -560,27 +560,25 @@ class Order {
560
560
 
561
561
  const response = await APIClient.execute(
562
562
  this._conf,
563
- "post",
563
+ "get",
564
564
  constructUrl({
565
- url: this._urls["sendOtpToShipmentCustomer"],
566
- params: { orderId, shipmentId },
565
+ url: this._urls["getShipmentReasons"],
566
+ params: { shipmentId },
567
567
  }),
568
568
  query_params,
569
569
  undefined,
570
570
  xHeaders
571
571
  );
572
572
 
573
- const {
574
- error: res_error,
575
- } = OrderModel.SendOtpToCustomerResponse().validate(response, {
576
- abortEarly: false,
577
- allowUnknown: false,
578
- });
573
+ const { error: res_error } = OrderModel.ShipmentReasons().validate(
574
+ response,
575
+ { abortEarly: false, allowUnknown: false }
576
+ );
579
577
 
580
578
  if (res_error) {
581
579
  Logger({
582
580
  level: "WARN",
583
- message: "Response Validation Warnnings for sendOtpToShipmentCustomer",
581
+ message: "Response Validation Warnnings for getShipmentReasons",
584
582
  });
585
583
  Logger({ level: "WARN", message: res_error });
586
584
  }
@@ -595,14 +593,13 @@ class Order {
595
593
  * @param {string} arg.shipmentId - ID of the shipment. An order may contain
596
594
  * multiple items and may get divided into one or more shipment, each
597
595
  * having its own ID.
598
- * @param {VerifyOtp} arg.body
599
- * @returns {Promise<VerifyOtpResponse>} - Success response
600
- * @summary: Verify Otp code
601
- * @description: Use this API to verify OTP and create a session token with custom payload.
596
+ * @returns {Promise<SendOtpToCustomerResponse>} - Success response
597
+ * @summary: Send and Resend Otp code to Order-Shipment customer
598
+ * @description: Use this API to send OTP to the customer of the mapped Shipment.
602
599
  */
603
- async verifyOtpShipmentCustomer({ orderId, shipmentId, body } = {}) {
604
- const { error } = OrderValidator.verifyOtpShipmentCustomer().validate(
605
- { orderId, shipmentId, body },
600
+ async sendOtpToShipmentCustomer({ orderId, shipmentId } = {}) {
601
+ const { error } = OrderValidator.sendOtpToShipmentCustomer().validate(
602
+ { orderId, shipmentId },
606
603
  { abortEarly: false, allowUnknown: true }
607
604
  );
608
605
  if (error) {
@@ -612,14 +609,14 @@ class Order {
612
609
  // Showing warrnings if extra unknown parameters are found
613
610
  const {
614
611
  error: warrning,
615
- } = OrderValidator.verifyOtpShipmentCustomer().validate(
616
- { orderId, shipmentId, body },
612
+ } = OrderValidator.sendOtpToShipmentCustomer().validate(
613
+ { orderId, shipmentId },
617
614
  { abortEarly: false, allowUnknown: false }
618
615
  );
619
616
  if (warrning) {
620
617
  Logger({
621
618
  level: "WARN",
622
- message: "Parameter Validation warrnings for verifyOtpShipmentCustomer",
619
+ message: "Parameter Validation warrnings for sendOtpToShipmentCustomer",
623
620
  });
624
621
  Logger({ level: "WARN", message: warrning });
625
622
  }
@@ -632,17 +629,17 @@ class Order {
632
629
  this._conf,
633
630
  "post",
634
631
  constructUrl({
635
- url: this._urls["verifyOtpShipmentCustomer"],
632
+ url: this._urls["sendOtpToShipmentCustomer"],
636
633
  params: { orderId, shipmentId },
637
634
  }),
638
635
  query_params,
639
- body,
636
+ undefined,
640
637
  xHeaders
641
638
  );
642
639
 
643
640
  const {
644
641
  error: res_error,
645
- } = OrderModel.VerifyOtpResponse().validate(response, {
642
+ } = OrderModel.SendOtpToCustomerResponse().validate(response, {
646
643
  abortEarly: false,
647
644
  allowUnknown: false,
648
645
  });
@@ -650,7 +647,7 @@ class Order {
650
647
  if (res_error) {
651
648
  Logger({
652
649
  level: "WARN",
653
- message: "Response Validation Warnnings for verifyOtpShipmentCustomer",
650
+ message: "Response Validation Warnnings for sendOtpToShipmentCustomer",
654
651
  });
655
652
  Logger({ level: "WARN", message: res_error });
656
653
  }
@@ -660,18 +657,16 @@ class Order {
660
657
 
661
658
  /**
662
659
  * @param {Object} arg - Arg object.
663
- * @param {string} arg.shipmentId - ID of the bag. An order may contain
660
+ * @param {string} arg.shipmentId - ID of the shipment. An order may contain
664
661
  * multiple items and may get divided into one or more shipment, each
665
662
  * having its own ID.
666
- * @param {string} arg.bagId - ID of the bag. An order may contain multiple
667
- * items and may get divided into one or more shipment, each having its own ID.
668
- * @returns {Promise<ShipmentBagReasons>} - Success response
669
- * @summary: Get reasons behind full or partial cancellation of a shipment
670
- * @description: Use this API to retrieve the issues that led to the cancellation of bags within a shipment.
663
+ * @returns {Promise<ShipmentTrack>} - Success response
664
+ * @summary: Track shipment
665
+ * @description: Track Shipment by shipment id, for application based on application Id
671
666
  */
672
- async getShipmentBagReasons({ shipmentId, bagId } = {}) {
673
- const { error } = OrderValidator.getShipmentBagReasons().validate(
674
- { shipmentId, bagId },
667
+ async trackShipment({ shipmentId } = {}) {
668
+ const { error } = OrderValidator.trackShipment().validate(
669
+ { shipmentId },
675
670
  { abortEarly: false, allowUnknown: true }
676
671
  );
677
672
  if (error) {
@@ -679,14 +674,14 @@ class Order {
679
674
  }
680
675
 
681
676
  // Showing warrnings if extra unknown parameters are found
682
- const { error: warrning } = OrderValidator.getShipmentBagReasons().validate(
683
- { shipmentId, bagId },
677
+ const { error: warrning } = OrderValidator.trackShipment().validate(
678
+ { shipmentId },
684
679
  { abortEarly: false, allowUnknown: false }
685
680
  );
686
681
  if (warrning) {
687
682
  Logger({
688
683
  level: "WARN",
689
- message: "Parameter Validation warrnings for getShipmentBagReasons",
684
+ message: "Parameter Validation warrnings for trackShipment",
690
685
  });
691
686
  Logger({ level: "WARN", message: warrning });
692
687
  }
@@ -699,17 +694,15 @@ class Order {
699
694
  this._conf,
700
695
  "get",
701
696
  constructUrl({
702
- url: this._urls["getShipmentBagReasons"],
703
- params: { shipmentId, bagId },
697
+ url: this._urls["trackShipment"],
698
+ params: { shipmentId },
704
699
  }),
705
700
  query_params,
706
701
  undefined,
707
702
  xHeaders
708
703
  );
709
704
 
710
- const {
711
- error: res_error,
712
- } = OrderModel.ShipmentBagReasons().validate(response, {
705
+ const { error: res_error } = OrderModel.ShipmentTrack().validate(response, {
713
706
  abortEarly: false,
714
707
  allowUnknown: false,
715
708
  });
@@ -717,7 +710,7 @@ class Order {
717
710
  if (res_error) {
718
711
  Logger({
719
712
  level: "WARN",
720
- message: "Response Validation Warnnings for getShipmentBagReasons",
713
+ message: "Response Validation Warnnings for trackShipment",
721
714
  });
722
715
  Logger({ level: "WARN", message: res_error });
723
716
  }
@@ -730,13 +723,14 @@ class Order {
730
723
  * @param {string} arg.shipmentId - ID of the shipment. An order may contain
731
724
  * multiple items and may get divided into one or more shipment, each
732
725
  * having its own ID.
733
- * @returns {Promise<ShipmentReasons>} - Success response
734
- * @summary: Get reasons behind full or partial cancellation of a shipment
735
- * @description: Use this API to retrieve the issues that led to the cancellation of bags within a shipment.
726
+ * @param {UpdateShipmentStatusRequest} arg.body
727
+ * @returns {Promise<ShipmentApplicationStatusResponse>} - Success response
728
+ * @summary: Update the shipment status
729
+ * @description: Use this API to update the status of a shipment using its shipment ID.
736
730
  */
737
- async getShipmentReasons({ shipmentId } = {}) {
738
- const { error } = OrderValidator.getShipmentReasons().validate(
739
- { shipmentId },
731
+ async updateShipmentStatus({ shipmentId, body } = {}) {
732
+ const { error } = OrderValidator.updateShipmentStatus().validate(
733
+ { shipmentId, body },
740
734
  { abortEarly: false, allowUnknown: true }
741
735
  );
742
736
  if (error) {
@@ -744,14 +738,14 @@ class Order {
744
738
  }
745
739
 
746
740
  // Showing warrnings if extra unknown parameters are found
747
- const { error: warrning } = OrderValidator.getShipmentReasons().validate(
748
- { shipmentId },
741
+ const { error: warrning } = OrderValidator.updateShipmentStatus().validate(
742
+ { shipmentId, body },
749
743
  { abortEarly: false, allowUnknown: false }
750
744
  );
751
745
  if (warrning) {
752
746
  Logger({
753
747
  level: "WARN",
754
- message: "Parameter Validation warrnings for getShipmentReasons",
748
+ message: "Parameter Validation warrnings for updateShipmentStatus",
755
749
  });
756
750
  Logger({ level: "WARN", message: warrning });
757
751
  }
@@ -762,25 +756,27 @@ class Order {
762
756
 
763
757
  const response = await APIClient.execute(
764
758
  this._conf,
765
- "get",
759
+ "put",
766
760
  constructUrl({
767
- url: this._urls["getShipmentReasons"],
761
+ url: this._urls["updateShipmentStatus"],
768
762
  params: { shipmentId },
769
763
  }),
770
764
  query_params,
771
- undefined,
765
+ body,
772
766
  xHeaders
773
767
  );
774
768
 
775
- const { error: res_error } = OrderModel.ShipmentReasons().validate(
776
- response,
777
- { abortEarly: false, allowUnknown: false }
778
- );
769
+ const {
770
+ error: res_error,
771
+ } = OrderModel.ShipmentApplicationStatusResponse().validate(response, {
772
+ abortEarly: false,
773
+ allowUnknown: false,
774
+ });
779
775
 
780
776
  if (res_error) {
781
777
  Logger({
782
778
  level: "WARN",
783
- message: "Response Validation Warnnings for getShipmentReasons",
779
+ message: "Response Validation Warnnings for updateShipmentStatus",
784
780
  });
785
781
  Logger({ level: "WARN", message: res_error });
786
782
  }
@@ -790,17 +786,19 @@ class Order {
790
786
 
791
787
  /**
792
788
  * @param {Object} arg - Arg object.
789
+ * @param {string} arg.orderId - A unique number used for identifying and
790
+ * tracking your orders.
793
791
  * @param {string} arg.shipmentId - ID of the shipment. An order may contain
794
792
  * multiple items and may get divided into one or more shipment, each
795
793
  * having its own ID.
796
- * @param {UpdateShipmentStatusRequest} arg.body
797
- * @returns {Promise<ShipmentApplicationStatusResponse>} - Success response
798
- * @summary: Update the shipment status
799
- * @description: Use this API to update the status of a shipment using its shipment ID.
794
+ * @param {VerifyOtp} arg.body
795
+ * @returns {Promise<VerifyOtpResponse>} - Success response
796
+ * @summary: Verify Otp code
797
+ * @description: Use this API to verify OTP and create a session token with custom payload.
800
798
  */
801
- async updateShipmentStatus({ shipmentId, body } = {}) {
802
- const { error } = OrderValidator.updateShipmentStatus().validate(
803
- { shipmentId, body },
799
+ async verifyOtpShipmentCustomer({ orderId, shipmentId, body } = {}) {
800
+ const { error } = OrderValidator.verifyOtpShipmentCustomer().validate(
801
+ { orderId, shipmentId, body },
804
802
  { abortEarly: false, allowUnknown: true }
805
803
  );
806
804
  if (error) {
@@ -808,14 +806,16 @@ class Order {
808
806
  }
809
807
 
810
808
  // Showing warrnings if extra unknown parameters are found
811
- const { error: warrning } = OrderValidator.updateShipmentStatus().validate(
812
- { shipmentId, body },
809
+ const {
810
+ error: warrning,
811
+ } = OrderValidator.verifyOtpShipmentCustomer().validate(
812
+ { orderId, shipmentId, body },
813
813
  { abortEarly: false, allowUnknown: false }
814
814
  );
815
815
  if (warrning) {
816
816
  Logger({
817
817
  level: "WARN",
818
- message: "Parameter Validation warrnings for updateShipmentStatus",
818
+ message: "Parameter Validation warrnings for verifyOtpShipmentCustomer",
819
819
  });
820
820
  Logger({ level: "WARN", message: warrning });
821
821
  }
@@ -826,10 +826,10 @@ class Order {
826
826
 
827
827
  const response = await APIClient.execute(
828
828
  this._conf,
829
- "put",
829
+ "post",
830
830
  constructUrl({
831
- url: this._urls["updateShipmentStatus"],
832
- params: { shipmentId },
831
+ url: this._urls["verifyOtpShipmentCustomer"],
832
+ params: { orderId, shipmentId },
833
833
  }),
834
834
  query_params,
835
835
  body,
@@ -838,7 +838,7 @@ class Order {
838
838
 
839
839
  const {
840
840
  error: res_error,
841
- } = OrderModel.ShipmentApplicationStatusResponse().validate(response, {
841
+ } = OrderModel.VerifyOtpResponse().validate(response, {
842
842
  abortEarly: false,
843
843
  allowUnknown: false,
844
844
  });
@@ -846,7 +846,7 @@ class Order {
846
846
  if (res_error) {
847
847
  Logger({
848
848
  level: "WARN",
849
- message: "Response Validation Warnnings for updateShipmentStatus",
849
+ message: "Response Validation Warnnings for verifyOtpShipmentCustomer",
850
850
  });
851
851
  Logger({ level: "WARN", message: res_error });
852
852
  }