@gofynd/fdk-client-javascript 3.1.0-beta.1 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (304) hide show
  1. package/README.md +1 -1
  2. package/package.json +2 -2
  3. package/sdk/application/ApplicationClient.d.ts +2 -0
  4. package/sdk/application/ApplicationClient.js +2 -0
  5. package/sdk/application/Cart/CartApplicationClient.d.ts +81 -101
  6. package/sdk/application/Cart/CartApplicationClient.js +173 -511
  7. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +110 -110
  8. package/sdk/application/Catalog/CatalogApplicationClient.js +214 -447
  9. package/sdk/application/Common/CommonApplicationClient.d.ts +4 -4
  10. package/sdk/application/Common/CommonApplicationClient.js +4 -19
  11. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +3 -43
  12. package/sdk/application/Communication/CommunicationApplicationClient.js +4 -214
  13. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +41 -54
  14. package/sdk/application/Configuration/ConfigurationApplicationClient.js +39 -192
  15. package/sdk/application/Content/ContentApplicationClient.d.ts +61 -61
  16. package/sdk/application/Content/ContentApplicationClient.js +183 -366
  17. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +2 -2
  18. package/sdk/application/FileStorage/FileStorageApplicationClient.js +11 -30
  19. package/sdk/application/Finance/FinanceApplicationClient.d.ts +29 -0
  20. package/sdk/application/Finance/FinanceApplicationClient.js +111 -0
  21. package/sdk/application/Lead/LeadApplicationClient.d.ts +6 -6
  22. package/sdk/application/Lead/LeadApplicationClient.js +24 -55
  23. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +28 -117
  24. package/sdk/application/Logistic/LogisticApplicationClient.js +99 -492
  25. package/sdk/application/Order/OrderApplicationClient.d.ts +31 -51
  26. package/sdk/application/Order/OrderApplicationClient.js +89 -293
  27. package/sdk/application/Payment/PaymentApplicationClient.d.ts +108 -218
  28. package/sdk/application/Payment/PaymentApplicationClient.js +100 -1081
  29. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +14 -14
  30. package/sdk/application/Rewards/RewardsApplicationClient.js +13 -66
  31. package/sdk/application/Share/ShareApplicationClient.d.ts +11 -11
  32. package/sdk/application/Share/ShareApplicationClient.js +35 -89
  33. package/sdk/application/Theme/ThemeApplicationClient.d.ts +5 -25
  34. package/sdk/application/Theme/ThemeApplicationClient.js +24 -150
  35. package/sdk/application/User/UserApplicationClient.d.ts +23 -13
  36. package/sdk/application/User/UserApplicationClient.js +49 -407
  37. package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -4
  38. package/sdk/application/Webhook/WebhookApplicationClient.js +4 -11
  39. package/sdk/common/Utility.d.ts +1 -1
  40. package/sdk/common/Utility.js +10 -7
  41. package/sdk/common/Validator.d.ts +1 -0
  42. package/sdk/common/Validator.js +20 -0
  43. package/sdk/common/utils.d.ts +0 -1
  44. package/sdk/common/utils.js +0 -14
  45. package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +10 -54
  46. package/sdk/partner/FileStorage/FileStoragePartnerClient.js +32 -364
  47. package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +54 -1
  48. package/sdk/partner/FileStorage/FileStoragePartnerModel.js +43 -0
  49. package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +1 -5
  50. package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +4 -35
  51. package/sdk/partner/Lead/LeadPartnerClient.d.ts +5 -5
  52. package/sdk/partner/Lead/LeadPartnerClient.js +4 -4
  53. package/sdk/partner/Lead/LeadPartnerModel.d.ts +52 -98
  54. package/sdk/partner/Lead/LeadPartnerModel.js +76 -100
  55. package/sdk/partner/Lead/LeadPartnerValidator.js +1 -1
  56. package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +172 -41
  57. package/sdk/partner/Logistics/LogisticsPartnerClient.js +1222 -85
  58. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +1921 -297
  59. package/sdk/partner/Logistics/LogisticsPartnerModel.js +973 -258
  60. package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +13 -1
  61. package/sdk/partner/Logistics/LogisticsPartnerValidator.js +148 -16
  62. package/sdk/partner/PartnerClient.d.ts +0 -6
  63. package/sdk/partner/PartnerClient.js +0 -9
  64. package/sdk/partner/Theme/ThemePartnerClient.d.ts +21 -63
  65. package/sdk/partner/Theme/ThemePartnerClient.js +67 -392
  66. package/sdk/partner/Theme/ThemePartnerModel.d.ts +72 -104
  67. package/sdk/partner/Theme/ThemePartnerModel.js +75 -101
  68. package/sdk/partner/Theme/ThemePartnerValidator.d.ts +1 -5
  69. package/sdk/partner/Theme/ThemePartnerValidator.js +12 -42
  70. package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +18 -18
  71. package/sdk/partner/Webhook/WebhookPartnerClient.js +18 -18
  72. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +673 -189
  73. package/sdk/partner/Webhook/WebhookPartnerModel.js +270 -159
  74. package/sdk/partner/Webhook/WebhookPartnerValidator.js +3 -3
  75. package/sdk/partner/index.d.ts +0 -3
  76. package/sdk/partner/index.js +0 -6
  77. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +4 -1
  78. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
  79. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +3 -3
  80. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +3 -3
  81. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +2 -32
  82. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +3 -243
  83. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +49 -145
  84. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +20 -171
  85. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -39
  86. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +0 -35
  87. package/sdk/platform/Billing/BillingPlatformClient.d.ts +12 -12
  88. package/sdk/platform/Billing/BillingPlatformClient.js +15 -15
  89. package/sdk/platform/Billing/BillingPlatformModel.d.ts +443 -388
  90. package/sdk/platform/Billing/BillingPlatformModel.js +280 -263
  91. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +16 -18
  92. package/sdk/platform/Billing/BillingPlatformValidator.js +8 -9
  93. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +172 -251
  94. package/sdk/platform/Cart/CartPlatformApplicationClient.js +577 -648
  95. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +270 -165
  96. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +192 -108
  97. package/sdk/platform/Cart/CartPlatformModel.d.ts +4554 -3154
  98. package/sdk/platform/Cart/CartPlatformModel.js +1935 -2854
  99. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +380 -976
  100. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +2004 -6464
  101. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +161 -1082
  102. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +80 -884
  103. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +568 -325
  104. package/sdk/platform/Catalog/CatalogPlatformClient.js +1560 -1162
  105. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +9772 -7871
  106. package/sdk/platform/Catalog/CatalogPlatformModel.js +6978 -9516
  107. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +231 -240
  108. package/sdk/platform/Catalog/CatalogPlatformValidator.js +180 -188
  109. package/sdk/platform/Common/CommonPlatformClient.d.ts +6 -5
  110. package/sdk/platform/Common/CommonPlatformClient.js +6 -5
  111. package/sdk/platform/Common/CommonPlatformModel.d.ts +19 -25
  112. package/sdk/platform/Common/CommonPlatformModel.js +11 -14
  113. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +240 -376
  114. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +589 -874
  115. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +139 -170
  116. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +126 -145
  117. package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +3 -56
  118. package/sdk/platform/Communication/CommunicationPlatformClient.js +4 -307
  119. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +330 -502
  120. package/sdk/platform/Communication/CommunicationPlatformModel.js +376 -610
  121. package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +3 -62
  122. package/sdk/platform/Communication/CommunicationPlatformValidator.js +2 -48
  123. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +72 -100
  124. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +88 -146
  125. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +270 -241
  126. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +248 -226
  127. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +20 -31
  128. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +20 -25
  129. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +117 -332
  130. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +409 -1470
  131. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +55 -158
  132. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +41 -163
  133. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +65 -142
  134. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +103 -568
  135. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +562 -1289
  136. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +368 -1037
  137. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +34 -80
  138. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +24 -79
  139. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +302 -248
  140. package/sdk/platform/Content/ContentPlatformApplicationClient.js +1292 -773
  141. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +330 -218
  142. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +325 -208
  143. package/sdk/platform/Content/ContentPlatformClient.d.ts +279 -118
  144. package/sdk/platform/Content/ContentPlatformClient.js +1617 -492
  145. package/sdk/platform/Content/ContentPlatformModel.d.ts +2391 -924
  146. package/sdk/platform/Content/ContentPlatformModel.js +1314 -970
  147. package/sdk/platform/Content/ContentPlatformValidator.d.ts +272 -134
  148. package/sdk/platform/Content/ContentPlatformValidator.js +295 -118
  149. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +53 -43
  150. package/sdk/platform/Discount/DiscountPlatformClient.js +53 -43
  151. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +383 -110
  152. package/sdk/platform/Discount/DiscountPlatformModel.js +117 -108
  153. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +56 -36
  154. package/sdk/platform/Discount/DiscountPlatformValidator.js +29 -19
  155. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +4 -163
  156. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +4 -1078
  157. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +5 -141
  158. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +4 -177
  159. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +8 -8
  160. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +8 -8
  161. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +30 -1123
  162. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +24 -1135
  163. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
  164. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
  165. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +17 -17
  166. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +33 -33
  167. package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +19 -19
  168. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +14 -14
  169. package/sdk/platform/Lead/LeadPlatformClient.d.ts +24 -4
  170. package/sdk/platform/Lead/LeadPlatformClient.js +160 -4
  171. package/sdk/platform/Lead/LeadPlatformModel.d.ts +60 -140
  172. package/sdk/platform/Lead/LeadPlatformModel.js +81 -162
  173. package/sdk/platform/Lead/LeadPlatformValidator.d.ts +29 -3
  174. package/sdk/platform/Lead/LeadPlatformValidator.js +28 -2
  175. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +19 -98
  176. package/sdk/platform/Order/OrderPlatformApplicationClient.js +27 -662
  177. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +91 -118
  178. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +32 -127
  179. package/sdk/platform/Order/OrderPlatformClient.d.ts +406 -403
  180. package/sdk/platform/Order/OrderPlatformClient.js +1200 -1343
  181. package/sdk/platform/Order/OrderPlatformModel.d.ts +8665 -4505
  182. package/sdk/platform/Order/OrderPlatformModel.js +4088 -3601
  183. package/sdk/platform/Order/OrderPlatformValidator.d.ts +666 -442
  184. package/sdk/platform/Order/OrderPlatformValidator.js +353 -312
  185. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +6 -4
  186. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +9 -7
  187. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +67 -19
  188. package/sdk/platform/Partner/PartnerPlatformModel.js +26 -17
  189. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +135 -382
  190. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +937 -2452
  191. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +100 -306
  192. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +74 -305
  193. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +56 -66
  194. package/sdk/platform/Payment/PaymentPlatformClient.js +124 -269
  195. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +1307 -3536
  196. package/sdk/platform/Payment/PaymentPlatformModel.js +1389 -3692
  197. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +35 -64
  198. package/sdk/platform/Payment/PaymentPlatformValidator.js +34 -60
  199. package/sdk/platform/PlatformClient.d.ts +0 -2
  200. package/sdk/platform/PlatformClient.js +0 -4
  201. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +2 -2
  202. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +2 -2
  203. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +2 -2
  204. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +2 -2
  205. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +12 -12
  206. package/sdk/platform/Rewards/RewardsPlatformModel.js +10 -10
  207. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +64 -136
  208. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +111 -521
  209. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +75 -117
  210. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +50 -105
  211. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +160 -149
  212. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +766 -545
  213. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +6196 -3978
  214. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +3181 -3895
  215. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +294 -220
  216. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +205 -149
  217. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +16 -4
  218. package/sdk/platform/Share/SharePlatformApplicationClient.js +86 -8
  219. package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +23 -6
  220. package/sdk/platform/Share/SharePlatformApplicationValidator.js +16 -3
  221. package/sdk/platform/Share/SharePlatformModel.d.ts +53 -9
  222. package/sdk/platform/Share/SharePlatformModel.js +45 -5
  223. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +17 -37
  224. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +66 -204
  225. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +25 -26
  226. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +20 -31
  227. package/sdk/platform/Theme/ThemePlatformClient.d.ts +8 -18
  228. package/sdk/platform/Theme/ThemePlatformClient.js +8 -85
  229. package/sdk/platform/Theme/ThemePlatformModel.d.ts +17 -425
  230. package/sdk/platform/Theme/ThemePlatformModel.js +23 -329
  231. package/sdk/platform/Theme/ThemePlatformValidator.d.ts +3 -7
  232. package/sdk/platform/Theme/ThemePlatformValidator.js +2 -9
  233. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +81 -18
  234. package/sdk/platform/User/UserPlatformApplicationClient.js +491 -27
  235. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +126 -10
  236. package/sdk/platform/User/UserPlatformApplicationValidator.js +92 -7
  237. package/sdk/platform/User/UserPlatformModel.d.ts +317 -218
  238. package/sdk/platform/User/UserPlatformModel.js +253 -210
  239. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +25 -78
  240. package/sdk/platform/Webhook/WebhookPlatformClient.js +75 -470
  241. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +813 -426
  242. package/sdk/platform/Webhook/WebhookPlatformModel.js +446 -395
  243. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -55
  244. package/sdk/platform/Webhook/WebhookPlatformValidator.js +12 -72
  245. package/sdk/platform/index.d.ts +0 -1
  246. package/sdk/platform/index.js +0 -2
  247. package/sdk/public/Catalog/CatalogPublicClient.d.ts +22 -0
  248. package/sdk/public/Catalog/CatalogPublicClient.js +133 -0
  249. package/sdk/public/Catalog/CatalogPublicModel.d.ts +158 -0
  250. package/sdk/public/Catalog/CatalogPublicModel.js +116 -0
  251. package/sdk/public/Catalog/CatalogPublicValidator.d.ts +55 -0
  252. package/sdk/public/Catalog/CatalogPublicValidator.js +35 -0
  253. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +4 -14
  254. package/sdk/public/Configuration/ConfigurationPublicClient.js +10 -113
  255. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +46 -114
  256. package/sdk/public/Configuration/ConfigurationPublicModel.js +32 -117
  257. package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +1 -11
  258. package/sdk/public/Configuration/ConfigurationPublicValidator.js +0 -12
  259. package/sdk/public/Content/ContentPublicClient.d.ts +36 -25
  260. package/sdk/public/Content/ContentPublicClient.js +254 -280
  261. package/sdk/public/Content/ContentPublicModel.d.ts +151 -38
  262. package/sdk/public/Content/ContentPublicModel.js +98 -44
  263. package/sdk/public/Content/ContentPublicValidator.d.ts +18 -17
  264. package/sdk/public/Content/ContentPublicValidator.js +26 -19
  265. package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
  266. package/sdk/public/Partner/PartnerPublicClient.js +6 -11
  267. package/sdk/public/Partner/PartnerPublicModel.d.ts +248 -72
  268. package/sdk/public/Partner/PartnerPublicModel.js +81 -71
  269. package/sdk/public/Partner/PartnerPublicValidator.d.ts +2 -2
  270. package/sdk/public/Partner/PartnerPublicValidator.js +1 -1
  271. package/sdk/public/PublicClient.d.ts +2 -0
  272. package/sdk/public/PublicClient.js +4 -0
  273. package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
  274. package/sdk/public/Webhook/WebhookPublicClient.js +9 -48
  275. package/sdk/public/Webhook/WebhookPublicModel.d.ts +215 -67
  276. package/sdk/public/Webhook/WebhookPublicModel.js +66 -61
  277. package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
  278. package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
  279. package/sdk/public/index.d.ts +1 -0
  280. package/sdk/public/index.js +2 -0
  281. package/sdk/partner/Authorization/AuthorizationPartnerClient.d.ts +0 -66
  282. package/sdk/partner/Authorization/AuthorizationPartnerClient.js +0 -431
  283. package/sdk/partner/Authorization/AuthorizationPartnerModel.d.ts +0 -231
  284. package/sdk/partner/Authorization/AuthorizationPartnerModel.js +0 -152
  285. package/sdk/partner/Authorization/AuthorizationPartnerValidator.d.ts +0 -8
  286. package/sdk/partner/Authorization/AuthorizationPartnerValidator.js +0 -39
  287. package/sdk/partner/Catalog/CatalogPartnerClient.d.ts +0 -26
  288. package/sdk/partner/Catalog/CatalogPartnerClient.js +0 -173
  289. package/sdk/partner/Catalog/CatalogPartnerModel.d.ts +0 -238
  290. package/sdk/partner/Catalog/CatalogPartnerModel.js +0 -248
  291. package/sdk/partner/Catalog/CatalogPartnerValidator.d.ts +0 -5
  292. package/sdk/partner/Catalog/CatalogPartnerValidator.js +0 -19
  293. package/sdk/partner/Payment/PaymentPartnerClient.d.ts +0 -116
  294. package/sdk/partner/Payment/PaymentPartnerClient.js +0 -857
  295. package/sdk/partner/Payment/PaymentPartnerModel.d.ts +0 -388
  296. package/sdk/partner/Payment/PaymentPartnerModel.js +0 -442
  297. package/sdk/partner/Payment/PaymentPartnerValidator.d.ts +0 -14
  298. package/sdk/partner/Payment/PaymentPartnerValidator.js +0 -74
  299. package/sdk/platform/Finance/FinancePlatformClient.d.ts +0 -320
  300. package/sdk/platform/Finance/FinancePlatformClient.js +0 -2333
  301. package/sdk/platform/Finance/FinancePlatformModel.d.ts +0 -2895
  302. package/sdk/platform/Finance/FinancePlatformModel.js +0 -2150
  303. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +0 -284
  304. package/sdk/platform/Finance/FinancePlatformValidator.js +0 -354
@@ -15,20 +15,20 @@ class Order {
15
15
  }
16
16
 
17
17
  /**
18
- * @param {OrderPlatformValidator.AddUserViewsParam} arg - Arg object
18
+ * @param {OrderPlatformValidator.AddStateManagerConfigParam} arg - Arg object
19
19
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
20
20
  * @param {import("../PlatformAPIClient").Options} - Options
21
- * @returns {Promise<OrderPlatformModel.CreateUpdateDeleteResponse>} -
21
+ * @returns {Promise<OrderPlatformModel.ConfigUpdatedResponseSchema>} -
22
22
  * Success response
23
- * @name addUserViews
24
- * @summary: Add custom view for every unique user cross company pair.
25
- * @description: Add custom view for every unique user cross company pair. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/addUserViews/).
23
+ * @name addStateManagerConfig
24
+ * @summary: Allows esm config updation
25
+ * @description: Update ESM config - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/addStateManagerConfig/).
26
26
  */
27
- async addUserViews(
27
+ async addStateManagerConfig(
28
28
  { body, requestHeaders } = { requestHeaders: {} },
29
29
  { responseHeaders } = { responseHeaders: false }
30
30
  ) {
31
- const { error } = OrderPlatformValidator.addUserViews().validate(
31
+ const { error } = OrderPlatformValidator.addStateManagerConfig().validate(
32
32
  {
33
33
  body,
34
34
  },
@@ -39,7 +39,9 @@ class Order {
39
39
  }
40
40
 
41
41
  // Showing warrnings if extra unknown parameters are found
42
- const { error: warrning } = OrderPlatformValidator.addUserViews().validate(
42
+ const {
43
+ error: warrning,
44
+ } = OrderPlatformValidator.addStateManagerConfig().validate(
43
45
  {
44
46
  body,
45
47
  },
@@ -48,7 +50,7 @@ class Order {
48
50
  if (warrning) {
49
51
  Logger({
50
52
  level: "WARN",
51
- message: `Parameter Validation warrnings for platform > Order > addUserViews \n ${warrning}`,
53
+ message: `Parameter Validation warrnings for platform > Order > addStateManagerConfig \n ${warrning}`,
52
54
  });
53
55
  }
54
56
 
@@ -59,7 +61,7 @@ class Order {
59
61
  const response = await PlatformAPIClient.execute(
60
62
  this.config,
61
63
  "post",
62
- `/service/platform/order/v1.0/company/${this.config.companyId}/views`,
64
+ `/service/platform/order-manage/v1.0/company/${this.config.companyId}/state/manager/config`,
63
65
  query_params,
64
66
  body,
65
67
  { ...xHeaders, ...requestHeaders },
@@ -73,10 +75,10 @@ class Order {
73
75
 
74
76
  const {
75
77
  error: res_error,
76
- } = OrderPlatformModel.CreateUpdateDeleteResponse().validate(responseData, {
77
- abortEarly: false,
78
- allowUnknown: true,
79
- });
78
+ } = OrderPlatformModel.ConfigUpdatedResponseSchema().validate(
79
+ responseData,
80
+ { abortEarly: false, allowUnknown: true }
81
+ );
80
82
 
81
83
  if (res_error) {
82
84
  if (this.config.options.strictResponseCheck === true) {
@@ -84,7 +86,7 @@ class Order {
84
86
  } else {
85
87
  Logger({
86
88
  level: "WARN",
87
- message: `Response Validation Warnings for platform > Order > addUserViews \n ${res_error}`,
89
+ message: `Response Validation Warnings for platform > Order > addStateManagerConfig \n ${res_error}`,
88
90
  });
89
91
  }
90
92
  }
@@ -96,10 +98,11 @@ class Order {
96
98
  * @param {OrderPlatformValidator.AttachOrderUserParam} arg - Arg object
97
99
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
98
100
  * @param {import("../PlatformAPIClient").Options} - Options
99
- * @returns {Promise<OrderPlatformModel.AttachOrderUserResponse>} - Success response
101
+ * @returns {Promise<OrderPlatformModel.AttachOrderUserResponseSchema>} -
102
+ * Success response
100
103
  * @name attachOrderUser
101
- * @summary: Attach order user.
102
- * @description: Attach order User - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/attachOrderUser/).
104
+ * @summary: Attach order to a user
105
+ * @description: Attach an anonymous order to a customer based on OTP verification - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/attachOrderUser/).
103
106
  */
104
107
  async attachOrderUser(
105
108
  { body, requestHeaders } = { requestHeaders: {} },
@@ -152,10 +155,10 @@ class Order {
152
155
 
153
156
  const {
154
157
  error: res_error,
155
- } = OrderPlatformModel.AttachOrderUserResponse().validate(responseData, {
156
- abortEarly: false,
157
- allowUnknown: true,
158
- });
158
+ } = OrderPlatformModel.AttachOrderUserResponseSchema().validate(
159
+ responseData,
160
+ { abortEarly: false, allowUnknown: true }
161
+ );
159
162
 
160
163
  if (res_error) {
161
164
  if (this.config.options.strictResponseCheck === true) {
@@ -175,11 +178,10 @@ class Order {
175
178
  * @param {OrderPlatformValidator.BulkListingParam} arg - Arg object
176
179
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
177
180
  * @param {import("../PlatformAPIClient").Options} - Options
178
- * @returns {Promise<OrderPlatformModel.BulkListingResponse>} - Success response
181
+ * @returns {Promise<OrderPlatformModel.BulkListingResponseSchema>} - Success response
179
182
  * @name bulkListing
180
- * @summary: Fetches of previous or running bulk jobs.
181
- * @description: Fetches of previous or running bulk jobs.
182
- * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/bulkListing/).
183
+ * @summary: Lists bulk operations
184
+ * @description: Get list of bulk operation that is initiated and completed as per the filters provided - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/bulkListing/).
183
185
  */
184
186
  async bulkListing(
185
187
  {
@@ -258,7 +260,7 @@ class Order {
258
260
 
259
261
  const {
260
262
  error: res_error,
261
- } = OrderPlatformModel.BulkListingResponse().validate(responseData, {
263
+ } = OrderPlatformModel.BulkListingResponseSchema().validate(responseData, {
262
264
  abortEarly: false,
263
265
  allowUnknown: true,
264
266
  });
@@ -281,11 +283,12 @@ class Order {
281
283
  * @param {OrderPlatformValidator.BulkStateTransistionParam} arg - Arg object
282
284
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
283
285
  * @param {import("../PlatformAPIClient").Options} - Options
284
- * @returns {Promise<OrderPlatformModel.BulkStateTransistionResponse>} -
285
- * Success response
286
+ * @returns {Promise<OrderPlatformModel.BulkStateTransistionResponseSchema>}
287
+ * - Success response
288
+ *
286
289
  * @name bulkStateTransistion
287
- * @summary: Performs State Transisiton in Bulk for the given shipments in the excel/csv file url.
288
- * @description: Performs State Transisiton in Bulk for the given shipments in the excel/csv file url. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/bulkStateTransistion/).
290
+ * @summary: Upload bulk state transitions file
291
+ * @description: Performs state transisiton in bulk using the CSV or excel file for the given shipments. The bulk transition CSV or excel template can be downloaded using the seller template download method. Current supported format is excel and CSV. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/bulkStateTransistion/).
289
292
  */
290
293
  async bulkStateTransistion(
291
294
  { body, requestHeaders } = { requestHeaders: {} },
@@ -338,7 +341,7 @@ class Order {
338
341
 
339
342
  const {
340
343
  error: res_error,
341
- } = OrderPlatformModel.BulkStateTransistionResponse().validate(
344
+ } = OrderPlatformModel.BulkStateTransistionResponseSchema().validate(
342
345
  responseData,
343
346
  { abortEarly: false, allowUnknown: true }
344
347
  );
@@ -363,8 +366,8 @@ class Order {
363
366
  * @param {import("../PlatformAPIClient").Options} - Options
364
367
  * @returns {Promise<OrderPlatformModel.OrderStatusResult>} - Success response
365
368
  * @name checkOrderStatus
366
- * @summary: Check order status.
367
- * @description: Verify the current status of an order. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/checkOrderStatus/).
369
+ * @summary: Debug order
370
+ * @description: Used to verify the status of order. It queries error logs, resyncs the shipments if there was an issue with sync etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/checkOrderStatus/).
368
371
  */
369
372
  async checkOrderStatus(
370
373
  { body, requestHeaders } = { requestHeaders: {} },
@@ -437,28 +440,23 @@ class Order {
437
440
  }
438
441
 
439
442
  /**
440
- * @param {OrderPlatformValidator.Click2CallParam} arg - Arg object
443
+ * @param {OrderPlatformValidator.CreateChannelConfigParam} arg - Arg object
441
444
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
442
445
  * @param {import("../PlatformAPIClient").Options} - Options
443
- * @returns {Promise<OrderPlatformModel.Click2CallResponse>} - Success response
444
- * @name click2Call
445
- * @summary: Click to call.
446
- * @description: Click to call. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/click2Call/).
446
+ * @returns {Promise<OrderPlatformModel.CreateChannelConfigResponseSchema>}
447
+ * - Success response
448
+ *
449
+ * @name createChannelConfig
450
+ * @summary: Create channel configuration
451
+ * @description: Set up configuration for a channel specific to orders which has implications over how the order fulfilment happens in a channel - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/createChannelConfig/).
447
452
  */
448
- async click2Call(
449
- { caller, receiver, bagId, callerId, method, requestHeaders } = {
450
- requestHeaders: {},
451
- },
453
+ async createChannelConfig(
454
+ { body, requestHeaders } = { requestHeaders: {} },
452
455
  { responseHeaders } = { responseHeaders: false }
453
456
  ) {
454
- const { error } = OrderPlatformValidator.click2Call().validate(
457
+ const { error } = OrderPlatformValidator.createChannelConfig().validate(
455
458
  {
456
- caller,
457
- receiver,
458
- bagId,
459
-
460
- callerId,
461
- method,
459
+ body,
462
460
  },
463
461
  { abortEarly: false, allowUnknown: true }
464
462
  );
@@ -467,39 +465,31 @@ class Order {
467
465
  }
468
466
 
469
467
  // Showing warrnings if extra unknown parameters are found
470
- const { error: warrning } = OrderPlatformValidator.click2Call().validate(
468
+ const {
469
+ error: warrning,
470
+ } = OrderPlatformValidator.createChannelConfig().validate(
471
471
  {
472
- caller,
473
- receiver,
474
- bagId,
475
-
476
- callerId,
477
- method,
472
+ body,
478
473
  },
479
474
  { abortEarly: false, allowUnknown: false }
480
475
  );
481
476
  if (warrning) {
482
477
  Logger({
483
478
  level: "WARN",
484
- message: `Parameter Validation warrnings for platform > Order > click2Call \n ${warrning}`,
479
+ message: `Parameter Validation warrnings for platform > Order > createChannelConfig \n ${warrning}`,
485
480
  });
486
481
  }
487
482
 
488
483
  const query_params = {};
489
- query_params["caller"] = caller;
490
- query_params["receiver"] = receiver;
491
- query_params["bag_id"] = bagId;
492
- query_params["caller_id"] = callerId;
493
- query_params["method"] = method;
494
484
 
495
485
  const xHeaders = {};
496
486
 
497
487
  const response = await PlatformAPIClient.execute(
498
488
  this.config,
499
- "get",
500
- `/service/platform/order-manage/v1.0/company/${this.config.companyId}/ninja/click2call`,
489
+ "post",
490
+ `/service/platform/order-manage/v1.0/company/${this.config.companyId}/order-config`,
501
491
  query_params,
502
- undefined,
492
+ body,
503
493
  { ...xHeaders, ...requestHeaders },
504
494
  { responseHeaders }
505
495
  );
@@ -511,10 +501,10 @@ class Order {
511
501
 
512
502
  const {
513
503
  error: res_error,
514
- } = OrderPlatformModel.Click2CallResponse().validate(responseData, {
515
- abortEarly: false,
516
- allowUnknown: true,
517
- });
504
+ } = OrderPlatformModel.CreateChannelConfigResponseSchema().validate(
505
+ responseData,
506
+ { abortEarly: false, allowUnknown: true }
507
+ );
518
508
 
519
509
  if (res_error) {
520
510
  if (this.config.options.strictResponseCheck === true) {
@@ -522,7 +512,7 @@ class Order {
522
512
  } else {
523
513
  Logger({
524
514
  level: "WARN",
525
- message: `Response Validation Warnings for platform > Order > click2Call \n ${res_error}`,
515
+ message: `Response Validation Warnings for platform > Order > createChannelConfig \n ${res_error}`,
526
516
  });
527
517
  }
528
518
  }
@@ -534,18 +524,19 @@ class Order {
534
524
  * @param {OrderPlatformValidator.CreateOrderParam} arg - Arg object
535
525
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
536
526
  * @param {import("../PlatformAPIClient").Options} - Options
537
- * @returns {Promise<OrderPlatformModel.CreateOrderResponse>} - Success response
527
+ * @returns {Promise<OrderPlatformModel.CreateOrderResponseSchema>} - Success response
538
528
  * @name createOrder
539
- * @summary: Create order.
540
- * @description: Create order. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/createOrder/).
529
+ * @summary: Create order
530
+ * @description: Creates an order - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/createOrder/).
541
531
  */
542
532
  async createOrder(
543
- { body, requestHeaders } = { requestHeaders: {} },
533
+ { body, xOrderingSource, requestHeaders } = { requestHeaders: {} },
544
534
  { responseHeaders } = { responseHeaders: false }
545
535
  ) {
546
536
  const { error } = OrderPlatformValidator.createOrder().validate(
547
537
  {
548
538
  body,
539
+ xOrderingSource,
549
540
  },
550
541
  { abortEarly: false, allowUnknown: true }
551
542
  );
@@ -557,6 +548,7 @@ class Order {
557
548
  const { error: warrning } = OrderPlatformValidator.createOrder().validate(
558
549
  {
559
550
  body,
551
+ xOrderingSource,
560
552
  },
561
553
  { abortEarly: false, allowUnknown: false }
562
554
  );
@@ -570,6 +562,7 @@ class Order {
570
562
  const query_params = {};
571
563
 
572
564
  const xHeaders = {};
565
+ xHeaders["x-ordering-source"] = xOrderingSource;
573
566
 
574
567
  const response = await PlatformAPIClient.execute(
575
568
  this.config,
@@ -588,7 +581,7 @@ class Order {
588
581
 
589
582
  const {
590
583
  error: res_error,
591
- } = OrderPlatformModel.CreateOrderResponse().validate(responseData, {
584
+ } = OrderPlatformModel.CreateOrderResponseSchema().validate(responseData, {
592
585
  abortEarly: false,
593
586
  allowUnknown: true,
594
587
  });
@@ -608,22 +601,21 @@ class Order {
608
601
  }
609
602
 
610
603
  /**
611
- * @param {OrderPlatformValidator.DeleteUserViewsParam} arg - Arg object
604
+ * @param {OrderPlatformValidator.DispatchManifestsParam} arg - Arg object
612
605
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
613
606
  * @param {import("../PlatformAPIClient").Options} - Options
614
- * @returns {Promise<OrderPlatformModel.CreateUpdateDeleteResponse>} -
615
- * Success response
616
- * @name deleteUserViews
617
- * @summary: Delete custom view for every unique user cross company pair.
618
- * @description: Delete custom view for every unique user cross company pair. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/deleteUserViews/).
607
+ * @returns {Promise<OrderPlatformModel.SuccessResponseSchema>} - Success response
608
+ * @name dispatchManifests
609
+ * @summary: Dispatch manifest
610
+ * @description: Updates the status of the manifest to processed and change the status of the shipments in the manifest to dispatch status - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/dispatchManifests/).
619
611
  */
620
- async deleteUserViews(
621
- { viewId, requestHeaders } = { requestHeaders: {} },
612
+ async dispatchManifests(
613
+ { body, requestHeaders } = { requestHeaders: {} },
622
614
  { responseHeaders } = { responseHeaders: false }
623
615
  ) {
624
- const { error } = OrderPlatformValidator.deleteUserViews().validate(
616
+ const { error } = OrderPlatformValidator.dispatchManifests().validate(
625
617
  {
626
- viewId,
618
+ body,
627
619
  },
628
620
  { abortEarly: false, allowUnknown: true }
629
621
  );
@@ -634,30 +626,29 @@ class Order {
634
626
  // Showing warrnings if extra unknown parameters are found
635
627
  const {
636
628
  error: warrning,
637
- } = OrderPlatformValidator.deleteUserViews().validate(
629
+ } = OrderPlatformValidator.dispatchManifests().validate(
638
630
  {
639
- viewId,
631
+ body,
640
632
  },
641
633
  { abortEarly: false, allowUnknown: false }
642
634
  );
643
635
  if (warrning) {
644
636
  Logger({
645
637
  level: "WARN",
646
- message: `Parameter Validation warrnings for platform > Order > deleteUserViews \n ${warrning}`,
638
+ message: `Parameter Validation warrnings for platform > Order > dispatchManifests \n ${warrning}`,
647
639
  });
648
640
  }
649
641
 
650
642
  const query_params = {};
651
- query_params["view_id"] = viewId;
652
643
 
653
644
  const xHeaders = {};
654
645
 
655
646
  const response = await PlatformAPIClient.execute(
656
647
  this.config,
657
- "delete",
658
- `/service/platform/order/v1.0/company/${this.config.companyId}/views`,
648
+ "post",
649
+ `/service/platform/order-manage/v1.0/company/${this.config.companyId}/manifest/dispatch`,
659
650
  query_params,
660
- undefined,
651
+ body,
661
652
  { ...xHeaders, ...requestHeaders },
662
653
  { responseHeaders }
663
654
  );
@@ -669,7 +660,7 @@ class Order {
669
660
 
670
661
  const {
671
662
  error: res_error,
672
- } = OrderPlatformModel.CreateUpdateDeleteResponse().validate(responseData, {
663
+ } = OrderPlatformModel.SuccessResponseSchema().validate(responseData, {
673
664
  abortEarly: false,
674
665
  allowUnknown: true,
675
666
  });
@@ -680,7 +671,7 @@ class Order {
680
671
  } else {
681
672
  Logger({
682
673
  level: "WARN",
683
- message: `Response Validation Warnings for platform > Order > deleteUserViews \n ${res_error}`,
674
+ message: `Response Validation Warnings for platform > Order > dispatchManifests \n ${res_error}`,
684
675
  });
685
676
  }
686
677
  }
@@ -692,9 +683,9 @@ class Order {
692
683
  * @param {OrderPlatformValidator.DownloadBulkActionTemplateParam} arg - Arg object
693
684
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
694
685
  * @param {import("../PlatformAPIClient").Options} - Options
695
- * @returns {Promise<OrderPlatformModel.TemplateDownloadResponse>} - Success response
686
+ * @returns {Promise<OrderPlatformModel.FileResponseSchema>} - Success response
696
687
  * @name downloadBulkActionTemplate
697
- * @summary: Download bulk action template.
688
+ * @summary: Download bulk template
698
689
  * @description: Download bulk seller templates which can be used to perform operations in bulk - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/downloadBulkActionTemplate/).
699
690
  */
700
691
  async downloadBulkActionTemplate(
@@ -751,7 +742,7 @@ class Order {
751
742
 
752
743
  const {
753
744
  error: res_error,
754
- } = OrderPlatformModel.TemplateDownloadResponse().validate(responseData, {
745
+ } = OrderPlatformModel.FileResponseSchema().validate(responseData, {
755
746
  abortEarly: false,
756
747
  allowUnknown: true,
757
748
  });
@@ -774,10 +765,11 @@ class Order {
774
765
  * @param {OrderPlatformValidator.DownloadLanesReportParam} arg - Arg object
775
766
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
776
767
  * @param {import("../PlatformAPIClient").Options} - Options
777
- * @returns {Promise<OrderPlatformModel.BulkReportsDownloadResponse>} -
778
- * Success response
768
+ * @returns {Promise<OrderPlatformModel.BulkReportsDownloadResponseSchema>}
769
+ * - Success response
770
+ *
779
771
  * @name downloadLanesReport
780
- * @summary: Downloads lanes shipment/orders.
772
+ * @summary: Download Lane report
781
773
  * @description: Downloads shipments/orders present in the provided lane - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/downloadLanesReport/).
782
774
  */
783
775
  async downloadLanesReport(
@@ -831,7 +823,7 @@ class Order {
831
823
 
832
824
  const {
833
825
  error: res_error,
834
- } = OrderPlatformModel.BulkReportsDownloadResponse().validate(
826
+ } = OrderPlatformModel.BulkReportsDownloadResponseSchema().validate(
835
827
  responseData,
836
828
  { abortEarly: false, allowUnknown: true }
837
829
  );
@@ -854,10 +846,11 @@ class Order {
854
846
  * @param {OrderPlatformValidator.EInvoiceRetryParam} arg - Arg object
855
847
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
856
848
  * @param {import("../PlatformAPIClient").Options} - Options
857
- * @returns {Promise<OrderPlatformModel.EInvoiceRetryResponse>} - Success response
849
+ * @returns {Promise<OrderPlatformModel.EInvoiceRetryResponseSchema>} -
850
+ * Success response
858
851
  * @name eInvoiceRetry
859
- * @summary: Retry e-invoice after failure
860
- * @description: Retry e-invoice after failure - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/eInvoiceRetry/).
852
+ * @summary: Retry E-invoice
853
+ * @description: Reattempt the generation of an E-invoice - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/eInvoiceRetry/).
861
854
  */
862
855
  async eInvoiceRetry(
863
856
  { body, requestHeaders } = { requestHeaders: {} },
@@ -908,10 +901,10 @@ class Order {
908
901
 
909
902
  const {
910
903
  error: res_error,
911
- } = OrderPlatformModel.EInvoiceRetryResponse().validate(responseData, {
912
- abortEarly: false,
913
- allowUnknown: true,
914
- });
904
+ } = OrderPlatformModel.EInvoiceRetryResponseSchema().validate(
905
+ responseData,
906
+ { abortEarly: false, allowUnknown: true }
907
+ );
915
908
 
916
909
  if (res_error) {
917
910
  if (this.config.options.strictResponseCheck === true) {
@@ -933,8 +926,8 @@ class Order {
933
926
  * @param {import("../PlatformAPIClient").Options} - Options
934
927
  * @returns {Promise<OrderPlatformModel.FailedOrderLogDetails>} - Success response
935
928
  * @name failedOrderLogDetails
936
- * @summary: Get failed order logs according to the filter provided
937
- * @description: This endpoint allows users to get the exact error trace from the log id provided - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/failedOrderLogDetails/).
929
+ * @summary: Get failed order log
930
+ * @description: Get the exact error trace from the log Id provided in the failed order list API response - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/failedOrderLogDetails/).
938
931
  */
939
932
  async failedOrderLogDetails(
940
933
  { logId, requestHeaders } = { requestHeaders: {} },
@@ -1007,25 +1000,32 @@ class Order {
1007
1000
  }
1008
1001
 
1009
1002
  /**
1010
- * @param {OrderPlatformValidator.FetchCreditBalanceDetailParam} arg - Arg object
1003
+ * @param {OrderPlatformValidator.FailedOrderLogsParam} arg - Arg object
1011
1004
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1012
1005
  * @param {import("../PlatformAPIClient").Options} - Options
1013
- * @returns {Promise<OrderPlatformModel.FetchCreditBalanceResponsePayload>}
1014
- * - Success response
1015
- *
1016
- * @name fetchCreditBalanceDetail
1017
- * @summary: Fetch credit balance detail.
1018
- * @description: Retrieve details about credit balance on the basis of customer mobile number - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/fetchCreditBalanceDetail/).
1006
+ * @returns {Promise<OrderPlatformModel.FailedOrderLogs>} - Success response
1007
+ * @name failedOrderLogs
1008
+ * @summary: List failed order logs
1009
+ * @description: Get failed order logs listing for filters based on order Id, user contact number, user email Id and sales channel Id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/failedOrderLogs/).
1019
1010
  */
1020
- async fetchCreditBalanceDetail(
1021
- { body, requestHeaders } = { requestHeaders: {} },
1011
+ async failedOrderLogs(
1012
+ {
1013
+ applicationId,
1014
+ pageNo,
1015
+ pageSize,
1016
+ searchType,
1017
+ searchValue,
1018
+ requestHeaders,
1019
+ } = { requestHeaders: {} },
1022
1020
  { responseHeaders } = { responseHeaders: false }
1023
1021
  ) {
1024
- const {
1025
- error,
1026
- } = OrderPlatformValidator.fetchCreditBalanceDetail().validate(
1022
+ const { error } = OrderPlatformValidator.failedOrderLogs().validate(
1027
1023
  {
1028
- body,
1024
+ applicationId,
1025
+ pageNo,
1026
+ pageSize,
1027
+ searchType,
1028
+ searchValue,
1029
1029
  },
1030
1030
  { abortEarly: false, allowUnknown: true }
1031
1031
  );
@@ -1036,29 +1036,38 @@ class Order {
1036
1036
  // Showing warrnings if extra unknown parameters are found
1037
1037
  const {
1038
1038
  error: warrning,
1039
- } = OrderPlatformValidator.fetchCreditBalanceDetail().validate(
1039
+ } = OrderPlatformValidator.failedOrderLogs().validate(
1040
1040
  {
1041
- body,
1041
+ applicationId,
1042
+ pageNo,
1043
+ pageSize,
1044
+ searchType,
1045
+ searchValue,
1042
1046
  },
1043
1047
  { abortEarly: false, allowUnknown: false }
1044
1048
  );
1045
1049
  if (warrning) {
1046
1050
  Logger({
1047
1051
  level: "WARN",
1048
- message: `Parameter Validation warrnings for platform > Order > fetchCreditBalanceDetail \n ${warrning}`,
1052
+ message: `Parameter Validation warrnings for platform > Order > failedOrderLogs \n ${warrning}`,
1049
1053
  });
1050
1054
  }
1051
1055
 
1052
1056
  const query_params = {};
1057
+ query_params["application_id"] = applicationId;
1058
+ query_params["page_no"] = pageNo;
1059
+ query_params["page_size"] = pageSize;
1060
+ query_params["search_type"] = searchType;
1061
+ query_params["search_value"] = searchValue;
1053
1062
 
1054
1063
  const xHeaders = {};
1055
1064
 
1056
1065
  const response = await PlatformAPIClient.execute(
1057
1066
  this.config,
1058
- "post",
1059
- `/service/platform/order-manage/v1.0/company/${this.config.companyId}/customer-credit-balance`,
1067
+ "get",
1068
+ `/service/platform/order-manage/v1.0/company/${this.config.companyId}/orders/failed`,
1060
1069
  query_params,
1061
- body,
1070
+ undefined,
1062
1071
  { ...xHeaders, ...requestHeaders },
1063
1072
  { responseHeaders }
1064
1073
  );
@@ -1070,10 +1079,10 @@ class Order {
1070
1079
 
1071
1080
  const {
1072
1081
  error: res_error,
1073
- } = OrderPlatformModel.FetchCreditBalanceResponsePayload().validate(
1074
- responseData,
1075
- { abortEarly: false, allowUnknown: true }
1076
- );
1082
+ } = OrderPlatformModel.FailedOrderLogs().validate(responseData, {
1083
+ abortEarly: false,
1084
+ allowUnknown: true,
1085
+ });
1077
1086
 
1078
1087
  if (res_error) {
1079
1088
  if (this.config.options.strictResponseCheck === true) {
@@ -1081,7 +1090,7 @@ class Order {
1081
1090
  } else {
1082
1091
  Logger({
1083
1092
  level: "WARN",
1084
- message: `Response Validation Warnings for platform > Order > fetchCreditBalanceDetail \n ${res_error}`,
1093
+ message: `Response Validation Warnings for platform > Order > failedOrderLogs \n ${res_error}`,
1085
1094
  });
1086
1095
  }
1087
1096
  }
@@ -1096,7 +1105,7 @@ class Order {
1096
1105
  * @returns {Promise<OrderPlatformModel.RefundModeConfigResponsePayload>} -
1097
1106
  * Success response
1098
1107
  * @name fetchRefundModeConfig
1099
- * @summary: Fetch refund mode config.
1108
+ * @summary: List refund modes
1100
1109
  * @description: Get list of refund modes to trigger refunds - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/fetchRefundModeConfig/).
1101
1110
  */
1102
1111
  async fetchRefundModeConfig(
@@ -1170,13 +1179,96 @@ class Order {
1170
1179
  }
1171
1180
 
1172
1181
  /**
1173
- * @param {OrderPlatformValidator.GeneratePOSReceiptByOrderIdParam} arg - Arg object
1182
+ * @param {OrderPlatformValidator.GenerateInvoiceIDParam} arg - Arg object
1174
1183
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1175
1184
  * @param {import("../PlatformAPIClient").Options} - Options
1176
- * @returns {Promise<OrderPlatformModel.GeneratePosOrderReceiptResponse>} -
1185
+ * @returns {Promise<OrderPlatformModel.GenerateInvoiceIDResponseSchema>} -
1177
1186
  * Success response
1187
+ * @name generateInvoiceID
1188
+ * @summary: Generate and attach invoice Id
1189
+ * @description: Generate and attach Invoice Ids against shipments. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/generateInvoiceID/).
1190
+ */
1191
+ async generateInvoiceID(
1192
+ { invoiceType, body, requestHeaders } = { requestHeaders: {} },
1193
+ { responseHeaders } = { responseHeaders: false }
1194
+ ) {
1195
+ const { error } = OrderPlatformValidator.generateInvoiceID().validate(
1196
+ {
1197
+ invoiceType,
1198
+ body,
1199
+ },
1200
+ { abortEarly: false, allowUnknown: true }
1201
+ );
1202
+ if (error) {
1203
+ return Promise.reject(new FDKClientValidationError(error));
1204
+ }
1205
+
1206
+ // Showing warrnings if extra unknown parameters are found
1207
+ const {
1208
+ error: warrning,
1209
+ } = OrderPlatformValidator.generateInvoiceID().validate(
1210
+ {
1211
+ invoiceType,
1212
+ body,
1213
+ },
1214
+ { abortEarly: false, allowUnknown: false }
1215
+ );
1216
+ if (warrning) {
1217
+ Logger({
1218
+ level: "WARN",
1219
+ message: `Parameter Validation warrnings for platform > Order > generateInvoiceID \n ${warrning}`,
1220
+ });
1221
+ }
1222
+
1223
+ const query_params = {};
1224
+
1225
+ const xHeaders = {};
1226
+
1227
+ const response = await PlatformAPIClient.execute(
1228
+ this.config,
1229
+ "post",
1230
+ `/service/platform/order-manage/v1.0/company/${this.config.companyId}/${invoiceType}/id/generate`,
1231
+ query_params,
1232
+ body,
1233
+ { ...xHeaders, ...requestHeaders },
1234
+ { responseHeaders }
1235
+ );
1236
+
1237
+ let responseData = response;
1238
+ if (responseHeaders) {
1239
+ responseData = response[0];
1240
+ }
1241
+
1242
+ const {
1243
+ error: res_error,
1244
+ } = OrderPlatformModel.GenerateInvoiceIDResponseSchema().validate(
1245
+ responseData,
1246
+ { abortEarly: false, allowUnknown: true }
1247
+ );
1248
+
1249
+ if (res_error) {
1250
+ if (this.config.options.strictResponseCheck === true) {
1251
+ return Promise.reject(new FDKResponseValidationError(res_error));
1252
+ } else {
1253
+ Logger({
1254
+ level: "WARN",
1255
+ message: `Response Validation Warnings for platform > Order > generateInvoiceID \n ${res_error}`,
1256
+ });
1257
+ }
1258
+ }
1259
+
1260
+ return response;
1261
+ }
1262
+
1263
+ /**
1264
+ * @param {OrderPlatformValidator.GeneratePOSReceiptByOrderIdParam} arg - Arg object
1265
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1266
+ * @param {import("../PlatformAPIClient").Options} - Options
1267
+ * @returns {Promise<OrderPlatformModel.GeneratePosOrderReceiptResponseSchema>}
1268
+ * - Success response
1269
+ *
1178
1270
  * @name generatePOSReceiptByOrderId
1179
- * @summary: Generate POS receipt by order ID.
1271
+ * @summary: Generate POS receipt by order Id
1180
1272
  * @description: Create a point-of-sale (POS) receipt for a specific order by order Id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/generatePOSReceiptByOrderId/).
1181
1273
  */
1182
1274
  async generatePOSReceiptByOrderId(
@@ -1240,7 +1332,7 @@ class Order {
1240
1332
 
1241
1333
  const {
1242
1334
  error: res_error,
1243
- } = OrderPlatformModel.GeneratePosOrderReceiptResponse().validate(
1335
+ } = OrderPlatformModel.GeneratePosOrderReceiptResponseSchema().validate(
1244
1336
  responseData,
1245
1337
  { abortEarly: false, allowUnknown: true }
1246
1338
  );
@@ -1259,6 +1351,85 @@ class Order {
1259
1351
  return response;
1260
1352
  }
1261
1353
 
1354
+ /**
1355
+ * @param {OrderPlatformValidator.GenerateProcessManifestParam} arg - Arg object
1356
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1357
+ * @param {import("../PlatformAPIClient").Options} - Options
1358
+ * @returns {Promise<OrderPlatformModel.ManifestResponseSchema>} - Success response
1359
+ * @name generateProcessManifest
1360
+ * @summary: Process Order Manifest
1361
+ * @description: Endpoint to save and process order manifests. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/generateProcessManifest/).
1362
+ */
1363
+ async generateProcessManifest(
1364
+ { body, requestHeaders } = { requestHeaders: {} },
1365
+ { responseHeaders } = { responseHeaders: false }
1366
+ ) {
1367
+ const { error } = OrderPlatformValidator.generateProcessManifest().validate(
1368
+ {
1369
+ body,
1370
+ },
1371
+ { abortEarly: false, allowUnknown: true }
1372
+ );
1373
+ if (error) {
1374
+ return Promise.reject(new FDKClientValidationError(error));
1375
+ }
1376
+
1377
+ // Showing warrnings if extra unknown parameters are found
1378
+ const {
1379
+ error: warrning,
1380
+ } = OrderPlatformValidator.generateProcessManifest().validate(
1381
+ {
1382
+ body,
1383
+ },
1384
+ { abortEarly: false, allowUnknown: false }
1385
+ );
1386
+ if (warrning) {
1387
+ Logger({
1388
+ level: "WARN",
1389
+ message: `Parameter Validation warrnings for platform > Order > generateProcessManifest \n ${warrning}`,
1390
+ });
1391
+ }
1392
+
1393
+ const query_params = {};
1394
+
1395
+ const xHeaders = {};
1396
+
1397
+ const response = await PlatformAPIClient.execute(
1398
+ this.config,
1399
+ "post",
1400
+ `/service/platform/order-manage/v1.0/company/${this.config.companyId}/process-manifest`,
1401
+ query_params,
1402
+ body,
1403
+ { ...xHeaders, ...requestHeaders },
1404
+ { responseHeaders }
1405
+ );
1406
+
1407
+ let responseData = response;
1408
+ if (responseHeaders) {
1409
+ responseData = response[0];
1410
+ }
1411
+
1412
+ const {
1413
+ error: res_error,
1414
+ } = OrderPlatformModel.ManifestResponseSchema().validate(responseData, {
1415
+ abortEarly: false,
1416
+ allowUnknown: true,
1417
+ });
1418
+
1419
+ if (res_error) {
1420
+ if (this.config.options.strictResponseCheck === true) {
1421
+ return Promise.reject(new FDKResponseValidationError(res_error));
1422
+ } else {
1423
+ Logger({
1424
+ level: "WARN",
1425
+ message: `Response Validation Warnings for platform > Order > generateProcessManifest \n ${res_error}`,
1426
+ });
1427
+ }
1428
+ }
1429
+
1430
+ return response;
1431
+ }
1432
+
1262
1433
  /**
1263
1434
  * @param {OrderPlatformValidator.GetAllowedStateTransitionParam} arg - Arg object
1264
1435
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -1266,19 +1437,22 @@ class Order {
1266
1437
  * @returns {Promise<OrderPlatformModel.RoleBaseStateTransitionMapping>} -
1267
1438
  * Success response
1268
1439
  * @name getAllowedStateTransition
1269
- * @summary: Get allowed state transition.
1270
- * @description: Retrieve next possible states based on logged in user. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getAllowedStateTransition/).
1440
+ * @summary: Get allowed state transition
1441
+ * @description: Retrieve next possible states based on logged in user's role - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getAllowedStateTransition/).
1271
1442
  */
1272
1443
  async getAllowedStateTransition(
1273
- { orderingChannel, status, requestHeaders } = { requestHeaders: {} },
1444
+ { status, orderingChannel, orderingSource, requestHeaders } = {
1445
+ requestHeaders: {},
1446
+ },
1274
1447
  { responseHeaders } = { responseHeaders: false }
1275
1448
  ) {
1276
1449
  const {
1277
1450
  error,
1278
1451
  } = OrderPlatformValidator.getAllowedStateTransition().validate(
1279
1452
  {
1280
- orderingChannel,
1281
1453
  status,
1454
+ orderingChannel,
1455
+ orderingSource,
1282
1456
  },
1283
1457
  { abortEarly: false, allowUnknown: true }
1284
1458
  );
@@ -1291,8 +1465,9 @@ class Order {
1291
1465
  error: warrning,
1292
1466
  } = OrderPlatformValidator.getAllowedStateTransition().validate(
1293
1467
  {
1294
- orderingChannel,
1295
1468
  status,
1469
+ orderingChannel,
1470
+ orderingSource,
1296
1471
  },
1297
1472
  { abortEarly: false, allowUnknown: false }
1298
1473
  );
@@ -1305,6 +1480,7 @@ class Order {
1305
1480
 
1306
1481
  const query_params = {};
1307
1482
  query_params["ordering_channel"] = orderingChannel;
1483
+ query_params["ordering_source"] = orderingSource;
1308
1484
  query_params["status"] = status;
1309
1485
 
1310
1486
  const xHeaders = {};
@@ -1349,10 +1525,11 @@ class Order {
1349
1525
  * @param {OrderPlatformValidator.GetAllowedTemplatesForBulkParam} arg - Arg object
1350
1526
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1351
1527
  * @param {import("../PlatformAPIClient").Options} - Options
1352
- * @returns {Promise<OrderPlatformModel.AllowedTemplatesResponse>} - Success response
1528
+ * @returns {Promise<OrderPlatformModel.AllowedTemplatesResponseSchema>} -
1529
+ * Success response
1353
1530
  * @name getAllowedTemplatesForBulk
1354
- * @summary: Gets All the allowed Templates to perform Bulk Operations.
1355
- * @description: Gets All the allowed Templates to perform Bulk Operations. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getAllowedTemplatesForBulk/).
1531
+ * @summary: List bulk operation templates
1532
+ * @description: Gets all the allowed templates to perform bulk operations. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getAllowedTemplatesForBulk/).
1356
1533
  */
1357
1534
  async getAllowedTemplatesForBulk(
1358
1535
  { requestHeaders } = { requestHeaders: {} },
@@ -1403,10 +1580,10 @@ class Order {
1403
1580
 
1404
1581
  const {
1405
1582
  error: res_error,
1406
- } = OrderPlatformModel.AllowedTemplatesResponse().validate(responseData, {
1407
- abortEarly: false,
1408
- allowUnknown: true,
1409
- });
1583
+ } = OrderPlatformModel.AllowedTemplatesResponseSchema().validate(
1584
+ responseData,
1585
+ { abortEarly: false, allowUnknown: true }
1586
+ );
1410
1587
 
1411
1588
  if (res_error) {
1412
1589
  if (this.config.options.strictResponseCheck === true) {
@@ -1426,9 +1603,10 @@ class Order {
1426
1603
  * @param {OrderPlatformValidator.GetAnnouncementsParam} arg - Arg object
1427
1604
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1428
1605
  * @param {import("../PlatformAPIClient").Options} - Options
1429
- * @returns {Promise<OrderPlatformModel.AnnouncementsResponse>} - Success response
1606
+ * @returns {Promise<OrderPlatformModel.AnnouncementsResponseSchema>} -
1607
+ * Success response
1430
1608
  * @name getAnnouncements
1431
- * @summary: Get announcements.
1609
+ * @summary: List announcements
1432
1610
  * @description: Retrieve announcements related to orders fulfilment configured by platform or company admin - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getAnnouncements/).
1433
1611
  */
1434
1612
  async getAnnouncements(
@@ -1483,10 +1661,10 @@ class Order {
1483
1661
 
1484
1662
  const {
1485
1663
  error: res_error,
1486
- } = OrderPlatformModel.AnnouncementsResponse().validate(responseData, {
1487
- abortEarly: false,
1488
- allowUnknown: true,
1489
- });
1664
+ } = OrderPlatformModel.AnnouncementsResponseSchema().validate(
1665
+ responseData,
1666
+ { abortEarly: false, allowUnknown: true }
1667
+ );
1490
1668
 
1491
1669
  if (res_error) {
1492
1670
  if (this.config.options.strictResponseCheck === true) {
@@ -1506,11 +1684,12 @@ class Order {
1506
1684
  * @param {OrderPlatformValidator.GetBagByIdParam} arg - Arg object
1507
1685
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1508
1686
  * @param {import("../PlatformAPIClient").Options} - Options
1509
- * @returns {Promise<OrderPlatformModel.BagDetailsPlatformResponse>} -
1510
- * Success response
1687
+ * @returns {Promise<OrderPlatformModel.BagDetailsPlatformResponseSchema>}
1688
+ * - Success response
1689
+ *
1511
1690
  * @name getBagById
1512
- * @summary: Get bag by ID.
1513
- * @description: Get Order Bag Details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getBagById/).
1691
+ * @summary: Get bag
1692
+ * @description: Retrieve detailed information about a specific bag - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getBagById/).
1514
1693
  */
1515
1694
  async getBagById(
1516
1695
  { bagId, channelBagId, channelId, requestHeaders } = { requestHeaders: {} },
@@ -1554,7 +1733,7 @@ class Order {
1554
1733
  const response = await PlatformAPIClient.execute(
1555
1734
  this.config,
1556
1735
  "get",
1557
- `/service/platform/order/v1.0/company/${this.config.companyId}/bag-details`,
1736
+ `/service/platform/order/v1.0/company/${this.config.companyId}/bag-details/`,
1558
1737
  query_params,
1559
1738
  undefined,
1560
1739
  { ...xHeaders, ...requestHeaders },
@@ -1568,10 +1747,10 @@ class Order {
1568
1747
 
1569
1748
  const {
1570
1749
  error: res_error,
1571
- } = OrderPlatformModel.BagDetailsPlatformResponse().validate(responseData, {
1572
- abortEarly: false,
1573
- allowUnknown: true,
1574
- });
1750
+ } = OrderPlatformModel.BagDetailsPlatformResponseSchema().validate(
1751
+ responseData,
1752
+ { abortEarly: false, allowUnknown: true }
1753
+ );
1575
1754
 
1576
1755
  if (res_error) {
1577
1756
  if (this.config.options.strictResponseCheck === true) {
@@ -1591,10 +1770,11 @@ class Order {
1591
1770
  * @param {OrderPlatformValidator.GetBagsParam} arg - Arg object
1592
1771
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1593
1772
  * @param {import("../PlatformAPIClient").Options} - Options
1594
- * @returns {Promise<OrderPlatformModel.GetBagsPlatformResponse>} - Success response
1773
+ * @returns {Promise<OrderPlatformModel.GetBagsPlatformResponseSchema>} -
1774
+ * Success response
1595
1775
  * @name getBags
1596
- * @summary: Get bags.
1597
- * @description: Get Bags for the order - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getBags/).
1776
+ * @summary: List bags
1777
+ * @description: Get paginated list of bags based on provided filters - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getBags/).
1598
1778
  */
1599
1779
  async getBags(
1600
1780
  {
@@ -1681,10 +1861,10 @@ class Order {
1681
1861
 
1682
1862
  const {
1683
1863
  error: res_error,
1684
- } = OrderPlatformModel.GetBagsPlatformResponse().validate(responseData, {
1685
- abortEarly: false,
1686
- allowUnknown: true,
1687
- });
1864
+ } = OrderPlatformModel.GetBagsPlatformResponseSchema().validate(
1865
+ responseData,
1866
+ { abortEarly: false, allowUnknown: true }
1867
+ );
1688
1868
 
1689
1869
  if (res_error) {
1690
1870
  if (this.config.options.strictResponseCheck === true) {
@@ -1704,10 +1884,11 @@ class Order {
1704
1884
  * @param {OrderPlatformValidator.GetBulkActionTemplateParam} arg - Arg object
1705
1885
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1706
1886
  * @param {import("../PlatformAPIClient").Options} - Options
1707
- * @returns {Promise<OrderPlatformModel.BulkActionTemplateResponse>} -
1708
- * Success response
1887
+ * @returns {Promise<OrderPlatformModel.BulkActionTemplateResponseSchema>}
1888
+ * - Success response
1889
+ *
1709
1890
  * @name getBulkActionTemplate
1710
- * @summary: Get bulk action template.
1891
+ * @summary: List supported templates
1711
1892
  * @description: Get list of templates so that users can download the required template - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getBulkActionTemplate/).
1712
1893
  */
1713
1894
  async getBulkActionTemplate(
@@ -1757,10 +1938,10 @@ class Order {
1757
1938
 
1758
1939
  const {
1759
1940
  error: res_error,
1760
- } = OrderPlatformModel.BulkActionTemplateResponse().validate(responseData, {
1761
- abortEarly: false,
1762
- allowUnknown: true,
1763
- });
1941
+ } = OrderPlatformModel.BulkActionTemplateResponseSchema().validate(
1942
+ responseData,
1943
+ { abortEarly: false, allowUnknown: true }
1944
+ );
1764
1945
 
1765
1946
  if (res_error) {
1766
1947
  if (this.config.options.strictResponseCheck === true) {
@@ -1780,9 +1961,9 @@ class Order {
1780
1961
  * @param {OrderPlatformValidator.GetBulkShipmentExcelFileParam} arg - Arg object
1781
1962
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1782
1963
  * @param {import("../PlatformAPIClient").Options} - Options
1783
- * @returns {Promise<OrderPlatformModel.TemplateDownloadResponse>} - Success response
1964
+ * @returns {Promise<OrderPlatformModel.FileResponseSchema>} - Success response
1784
1965
  * @name getBulkShipmentExcelFile
1785
- * @summary: Get bulk shipment Excel file.
1966
+ * @summary: Generate the report
1786
1967
  * @description: Generates the report which can be filled and uploaded to perform the bulk operation based on the filters provided - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getBulkShipmentExcelFile/).
1787
1968
  */
1788
1969
  async getBulkShipmentExcelFile(
@@ -1886,7 +2067,7 @@ class Order {
1886
2067
 
1887
2068
  const {
1888
2069
  error: res_error,
1889
- } = OrderPlatformModel.TemplateDownloadResponse().validate(responseData, {
2070
+ } = OrderPlatformModel.FileResponseSchema().validate(responseData, {
1890
2071
  abortEarly: false,
1891
2072
  allowUnknown: true,
1892
2073
  });
@@ -1906,27 +2087,20 @@ class Order {
1906
2087
  }
1907
2088
 
1908
2089
  /**
1909
- * @param {OrderPlatformValidator.GetFailedOrderLogsParam} arg - Arg object
2090
+ * @param {OrderPlatformValidator.GetChannelConfigParam} arg - Arg object
1910
2091
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1911
2092
  * @param {import("../PlatformAPIClient").Options} - Options
1912
- * @returns {Promise<OrderPlatformModel.FailedOrderLogs>} - Success response
1913
- * @name getFailedOrderLogs
1914
- * @summary: Get failed order logs according to the filter provided
1915
- * @description: This endpoint allows users to get failed order logs listing for filters based on order id, user contact number, user email id and sales channel id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getFailedOrderLogs/).
2093
+ * @returns {Promise<OrderPlatformModel.CreateChannelConfigData>} - Success response
2094
+ * @name getChannelConfig
2095
+ * @summary: Get channel configuration
2096
+ * @description: Retrieve configuration settings specific to orders for a channel - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getChannelConfig/).
1916
2097
  */
1917
- async getFailedOrderLogs(
1918
- { pageNo, pageSize, searchType, searchValue, requestHeaders } = {
1919
- requestHeaders: {},
1920
- },
2098
+ async getChannelConfig(
2099
+ { requestHeaders } = { requestHeaders: {} },
1921
2100
  { responseHeaders } = { responseHeaders: false }
1922
2101
  ) {
1923
- const { error } = OrderPlatformValidator.getFailedOrderLogs().validate(
1924
- {
1925
- pageNo,
1926
- pageSize,
1927
- searchType,
1928
- searchValue,
1929
- },
2102
+ const { error } = OrderPlatformValidator.getChannelConfig().validate(
2103
+ {},
1930
2104
  { abortEarly: false, allowUnknown: true }
1931
2105
  );
1932
2106
  if (error) {
@@ -1936,34 +2110,25 @@ class Order {
1936
2110
  // Showing warrnings if extra unknown parameters are found
1937
2111
  const {
1938
2112
  error: warrning,
1939
- } = OrderPlatformValidator.getFailedOrderLogs().validate(
1940
- {
1941
- pageNo,
1942
- pageSize,
1943
- searchType,
1944
- searchValue,
1945
- },
2113
+ } = OrderPlatformValidator.getChannelConfig().validate(
2114
+ {},
1946
2115
  { abortEarly: false, allowUnknown: false }
1947
2116
  );
1948
2117
  if (warrning) {
1949
2118
  Logger({
1950
2119
  level: "WARN",
1951
- message: `Parameter Validation warrnings for platform > Order > getFailedOrderLogs \n ${warrning}`,
2120
+ message: `Parameter Validation warrnings for platform > Order > getChannelConfig \n ${warrning}`,
1952
2121
  });
1953
2122
  }
1954
2123
 
1955
2124
  const query_params = {};
1956
- query_params["page_no"] = pageNo;
1957
- query_params["page_size"] = pageSize;
1958
- query_params["search_type"] = searchType;
1959
- query_params["search_value"] = searchValue;
1960
2125
 
1961
2126
  const xHeaders = {};
1962
2127
 
1963
2128
  const response = await PlatformAPIClient.execute(
1964
2129
  this.config,
1965
2130
  "get",
1966
- `/service/platform/order-manage/v1.0/company/${this.config.companyId}/orders/failed`,
2131
+ `/service/platform/order-manage/v1.0/company/${this.config.companyId}/order-config`,
1967
2132
  query_params,
1968
2133
  undefined,
1969
2134
  { ...xHeaders, ...requestHeaders },
@@ -1977,7 +2142,7 @@ class Order {
1977
2142
 
1978
2143
  const {
1979
2144
  error: res_error,
1980
- } = OrderPlatformModel.FailedOrderLogs().validate(responseData, {
2145
+ } = OrderPlatformModel.CreateChannelConfigData().validate(responseData, {
1981
2146
  abortEarly: false,
1982
2147
  allowUnknown: true,
1983
2148
  });
@@ -1988,7 +2153,7 @@ class Order {
1988
2153
  } else {
1989
2154
  Logger({
1990
2155
  level: "WARN",
1991
- message: `Response Validation Warnings for platform > Order > getFailedOrderLogs \n ${res_error}`,
2156
+ message: `Response Validation Warnings for platform > Order > getChannelConfig \n ${res_error}`,
1992
2157
  });
1993
2158
  }
1994
2159
  }
@@ -2000,9 +2165,9 @@ class Order {
2000
2165
  * @param {OrderPlatformValidator.GetFileByStatusParam} arg - Arg object
2001
2166
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2002
2167
  * @param {import("../PlatformAPIClient").Options} - Options
2003
- * @returns {Promise<OrderPlatformModel.JobFailedResponse>} - Success response
2168
+ * @returns {Promise<OrderPlatformModel.JobFailedResponseSchema>} - Success response
2004
2169
  * @name getFileByStatus
2005
- * @summary: Get the file download URL used for performing bulk operation
2170
+ * @summary: Download file used for Bulk operation
2006
2171
  * @description: Get the file download URL used for performing bulk operation - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getFileByStatus/).
2007
2172
  */
2008
2173
  async getFileByStatus(
@@ -2067,7 +2232,7 @@ class Order {
2067
2232
 
2068
2233
  const {
2069
2234
  error: res_error,
2070
- } = OrderPlatformModel.JobFailedResponse().validate(responseData, {
2235
+ } = OrderPlatformModel.JobFailedResponseSchema().validate(responseData, {
2071
2236
  abortEarly: false,
2072
2237
  allowUnknown: true,
2073
2238
  });
@@ -2086,94 +2251,14 @@ class Order {
2086
2251
  return response;
2087
2252
  }
2088
2253
 
2089
- /**
2090
- * @param {OrderPlatformValidator.GetGlobalFiltersParam} arg - Arg object
2091
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2092
- * @param {import("../PlatformAPIClient").Options} - Options
2093
- * @returns {Promise<OrderPlatformModel.GlobalFiltersResponse>} - Success response
2094
- * @name getGlobalFilters
2095
- * @summary: Get global filters for populating filter listing and powering views api.
2096
- * @description: Get global filters for populating filter listing and powering views api. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getGlobalFilters/).
2097
- */
2098
- async getGlobalFilters(
2099
- { showIn, requestHeaders } = { requestHeaders: {} },
2100
- { responseHeaders } = { responseHeaders: false }
2101
- ) {
2102
- const { error } = OrderPlatformValidator.getGlobalFilters().validate(
2103
- {
2104
- showIn,
2105
- },
2106
- { abortEarly: false, allowUnknown: true }
2107
- );
2108
- if (error) {
2109
- return Promise.reject(new FDKClientValidationError(error));
2110
- }
2111
-
2112
- // Showing warrnings if extra unknown parameters are found
2113
- const {
2114
- error: warrning,
2115
- } = OrderPlatformValidator.getGlobalFilters().validate(
2116
- {
2117
- showIn,
2118
- },
2119
- { abortEarly: false, allowUnknown: false }
2120
- );
2121
- if (warrning) {
2122
- Logger({
2123
- level: "WARN",
2124
- message: `Parameter Validation warrnings for platform > Order > getGlobalFilters \n ${warrning}`,
2125
- });
2126
- }
2127
-
2128
- const query_params = {};
2129
- query_params["show_in"] = showIn;
2130
-
2131
- const xHeaders = {};
2132
-
2133
- const response = await PlatformAPIClient.execute(
2134
- this.config,
2135
- "get",
2136
- `/service/platform/order/v1.0/company/${this.config.companyId}/filters`,
2137
- query_params,
2138
- undefined,
2139
- { ...xHeaders, ...requestHeaders },
2140
- { responseHeaders }
2141
- );
2142
-
2143
- let responseData = response;
2144
- if (responseHeaders) {
2145
- responseData = response[0];
2146
- }
2147
-
2148
- const {
2149
- error: res_error,
2150
- } = OrderPlatformModel.GlobalFiltersResponse().validate(responseData, {
2151
- abortEarly: false,
2152
- allowUnknown: true,
2153
- });
2154
-
2155
- if (res_error) {
2156
- if (this.config.options.strictResponseCheck === true) {
2157
- return Promise.reject(new FDKResponseValidationError(res_error));
2158
- } else {
2159
- Logger({
2160
- level: "WARN",
2161
- message: `Response Validation Warnings for platform > Order > getGlobalFilters \n ${res_error}`,
2162
- });
2163
- }
2164
- }
2165
-
2166
- return response;
2167
- }
2168
-
2169
2254
  /**
2170
2255
  * @param {OrderPlatformValidator.GetLaneConfigParam} arg - Arg object
2171
2256
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2172
2257
  * @param {import("../PlatformAPIClient").Options} - Options
2173
- * @returns {Promise<OrderPlatformModel.LaneConfigResponse>} - Success response
2258
+ * @returns {Promise<OrderPlatformModel.LaneConfigResponseSchema>} - Success response
2174
2259
  * @name getLaneConfig
2175
- * @summary: Get lane configuration.
2176
- * @description: Get lane config for the order and shipment - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getLaneConfig/).
2260
+ * @summary: Get lane configuration
2261
+ * @description: Get configuration settings for lanes - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getLaneConfig/).
2177
2262
  */
2178
2263
  async getLaneConfig(
2179
2264
  {
@@ -2286,7 +2371,7 @@ class Order {
2286
2371
  const response = await PlatformAPIClient.execute(
2287
2372
  this.config,
2288
2373
  "get",
2289
- `/service/platform/order/v1.0/company/${this.config.companyId}/lane-config`,
2374
+ `/service/platform/order/v1.0/company/${this.config.companyId}/lane-config/`,
2290
2375
  query_params,
2291
2376
  undefined,
2292
2377
  { ...xHeaders, ...requestHeaders },
@@ -2300,7 +2385,7 @@ class Order {
2300
2385
 
2301
2386
  const {
2302
2387
  error: res_error,
2303
- } = OrderPlatformModel.LaneConfigResponse().validate(responseData, {
2388
+ } = OrderPlatformModel.LaneConfigResponseSchema().validate(responseData, {
2304
2389
  abortEarly: false,
2305
2390
  allowUnknown: true,
2306
2391
  });
@@ -2320,21 +2405,34 @@ class Order {
2320
2405
  }
2321
2406
 
2322
2407
  /**
2323
- * @param {OrderPlatformValidator.GetManifestfiltersParam} arg - Arg object
2408
+ * @param {OrderPlatformValidator.GetManifestDetailsParam} arg - Arg object
2324
2409
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2325
2410
  * @param {import("../PlatformAPIClient").Options} - Options
2326
- * @returns {Promise<OrderPlatformModel.ManifestFiltersResponse>} - Success response
2327
- * @name getManifestfilters
2328
- * @summary: get Manifest Filters.
2329
- * @description: get Manifest Filters. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getManifestfilters/).
2411
+ * @returns {Promise<OrderPlatformModel.ManifestDetails>} - Success response
2412
+ * @name getManifestDetails
2413
+ * @summary: Get a manifest
2414
+ * @description: Get details regarding a manifest which can be used to perform further actions on it - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getManifestDetails/).
2330
2415
  */
2331
- async getManifestfilters(
2332
- { view, requestHeaders } = { requestHeaders: {} },
2416
+ async getManifestDetails(
2417
+ {
2418
+ manifestId,
2419
+ dpIds,
2420
+ endDate,
2421
+ startDate,
2422
+ pageNo,
2423
+ pageSize,
2424
+ requestHeaders,
2425
+ } = { requestHeaders: {} },
2333
2426
  { responseHeaders } = { responseHeaders: false }
2334
2427
  ) {
2335
- const { error } = OrderPlatformValidator.getManifestfilters().validate(
2428
+ const { error } = OrderPlatformValidator.getManifestDetails().validate(
2336
2429
  {
2337
- view,
2430
+ manifestId,
2431
+ dpIds,
2432
+ endDate,
2433
+ startDate,
2434
+ pageNo,
2435
+ pageSize,
2338
2436
  },
2339
2437
  { abortEarly: false, allowUnknown: true }
2340
2438
  );
@@ -2345,28 +2443,38 @@ class Order {
2345
2443
  // Showing warrnings if extra unknown parameters are found
2346
2444
  const {
2347
2445
  error: warrning,
2348
- } = OrderPlatformValidator.getManifestfilters().validate(
2446
+ } = OrderPlatformValidator.getManifestDetails().validate(
2349
2447
  {
2350
- view,
2448
+ manifestId,
2449
+ dpIds,
2450
+ endDate,
2451
+ startDate,
2452
+ pageNo,
2453
+ pageSize,
2351
2454
  },
2352
2455
  { abortEarly: false, allowUnknown: false }
2353
2456
  );
2354
2457
  if (warrning) {
2355
2458
  Logger({
2356
2459
  level: "WARN",
2357
- message: `Parameter Validation warrnings for platform > Order > getManifestfilters \n ${warrning}`,
2460
+ message: `Parameter Validation warrnings for platform > Order > getManifestDetails \n ${warrning}`,
2358
2461
  });
2359
2462
  }
2360
2463
 
2361
2464
  const query_params = {};
2362
- query_params["view"] = view;
2465
+ query_params["manifest_id"] = manifestId;
2466
+ query_params["dp_ids"] = dpIds;
2467
+ query_params["end_date"] = endDate;
2468
+ query_params["start_date"] = startDate;
2469
+ query_params["page_no"] = pageNo;
2470
+ query_params["page_size"] = pageSize;
2363
2471
 
2364
2472
  const xHeaders = {};
2365
2473
 
2366
2474
  const response = await PlatformAPIClient.execute(
2367
2475
  this.config,
2368
2476
  "get",
2369
- `/service/platform/order-manage/v1.0/company/${this.config.companyId}/filter/listing`,
2477
+ `/service/platform/order-manage/v1.0/company/${this.config.companyId}/manifest/details`,
2370
2478
  query_params,
2371
2479
  undefined,
2372
2480
  { ...xHeaders, ...requestHeaders },
@@ -2380,7 +2488,7 @@ class Order {
2380
2488
 
2381
2489
  const {
2382
2490
  error: res_error,
2383
- } = OrderPlatformModel.ManifestFiltersResponse().validate(responseData, {
2491
+ } = OrderPlatformModel.ManifestDetails().validate(responseData, {
2384
2492
  abortEarly: false,
2385
2493
  allowUnknown: true,
2386
2494
  });
@@ -2391,7 +2499,7 @@ class Order {
2391
2499
  } else {
2392
2500
  Logger({
2393
2501
  level: "WARN",
2394
- message: `Response Validation Warnings for platform > Order > getManifestfilters \n ${res_error}`,
2502
+ message: `Response Validation Warnings for platform > Order > getManifestDetails \n ${res_error}`,
2395
2503
  });
2396
2504
  }
2397
2505
  }
@@ -2400,25 +2508,42 @@ class Order {
2400
2508
  }
2401
2509
 
2402
2510
  /**
2403
- * @param {OrderPlatformValidator.GetOrderByIdParam} arg - Arg object
2511
+ * @param {OrderPlatformValidator.GetManifestShipmentsParam} arg - Arg object
2404
2512
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2405
2513
  * @param {import("../PlatformAPIClient").Options} - Options
2406
- * @returns {Promise<OrderPlatformModel.OrderDetailsResponse>} - Success response
2407
- * @name getOrderById
2408
- * @summary: Get order by ID.
2409
- * @description: Retrieve detailed information about a specific order. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getOrderById/).
2514
+ * @returns {Promise<OrderPlatformModel.ManifestShipmentListing>} - Success response
2515
+ * @name getManifestShipments
2516
+ * @summary: List manifest shipments
2517
+ * @description: Get list of shipments tagged to that manifest, the user can also search the shipments on the basis of shipment Id, order Id and AWB number - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getManifestShipments/).
2410
2518
  */
2411
- async getOrderById(
2412
- { orderId, myOrders, allowInactive, requestHeaders } = {
2413
- requestHeaders: {},
2414
- },
2519
+ async getManifestShipments(
2520
+ {
2521
+ dpIds,
2522
+ stores,
2523
+ toDate,
2524
+ fromDate,
2525
+ dpName,
2526
+ salesChannels,
2527
+ searchType,
2528
+ searchValue,
2529
+ pageNo,
2530
+ pageSize,
2531
+ requestHeaders,
2532
+ } = { requestHeaders: {} },
2415
2533
  { responseHeaders } = { responseHeaders: false }
2416
2534
  ) {
2417
- const { error } = OrderPlatformValidator.getOrderById().validate(
2535
+ const { error } = OrderPlatformValidator.getManifestShipments().validate(
2418
2536
  {
2419
- orderId,
2420
- myOrders,
2421
- allowInactive,
2537
+ dpIds,
2538
+ stores,
2539
+ toDate,
2540
+ fromDate,
2541
+ dpName,
2542
+ salesChannels,
2543
+ searchType,
2544
+ searchValue,
2545
+ pageNo,
2546
+ pageSize,
2422
2547
  },
2423
2548
  { abortEarly: false, allowUnknown: true }
2424
2549
  );
@@ -2427,32 +2552,48 @@ class Order {
2427
2552
  }
2428
2553
 
2429
2554
  // Showing warrnings if extra unknown parameters are found
2430
- const { error: warrning } = OrderPlatformValidator.getOrderById().validate(
2555
+ const {
2556
+ error: warrning,
2557
+ } = OrderPlatformValidator.getManifestShipments().validate(
2431
2558
  {
2432
- orderId,
2433
- myOrders,
2434
- allowInactive,
2559
+ dpIds,
2560
+ stores,
2561
+ toDate,
2562
+ fromDate,
2563
+ dpName,
2564
+ salesChannels,
2565
+ searchType,
2566
+ searchValue,
2567
+ pageNo,
2568
+ pageSize,
2435
2569
  },
2436
2570
  { abortEarly: false, allowUnknown: false }
2437
2571
  );
2438
2572
  if (warrning) {
2439
2573
  Logger({
2440
2574
  level: "WARN",
2441
- message: `Parameter Validation warrnings for platform > Order > getOrderById \n ${warrning}`,
2575
+ message: `Parameter Validation warrnings for platform > Order > getManifestShipments \n ${warrning}`,
2442
2576
  });
2443
2577
  }
2444
2578
 
2445
2579
  const query_params = {};
2446
- query_params["order_id"] = orderId;
2447
- query_params["my_orders"] = myOrders;
2448
- query_params["allow_inactive"] = allowInactive;
2580
+ query_params["dp_ids"] = dpIds;
2581
+ query_params["stores"] = stores;
2582
+ query_params["to_date"] = toDate;
2583
+ query_params["from_date"] = fromDate;
2584
+ query_params["dp_name"] = dpName;
2585
+ query_params["sales_channels"] = salesChannels;
2586
+ query_params["search_type"] = searchType;
2587
+ query_params["search_value"] = searchValue;
2588
+ query_params["page_no"] = pageNo;
2589
+ query_params["page_size"] = pageSize;
2449
2590
 
2450
2591
  const xHeaders = {};
2451
2592
 
2452
2593
  const response = await PlatformAPIClient.execute(
2453
2594
  this.config,
2454
2595
  "get",
2455
- `/service/platform/order/v1.0/company/${this.config.companyId}/order-details`,
2596
+ `/service/platform/order-manage/v1.0/company/${this.config.companyId}/manifest/shipments-listing`,
2456
2597
  query_params,
2457
2598
  undefined,
2458
2599
  { ...xHeaders, ...requestHeaders },
@@ -2466,7 +2607,7 @@ class Order {
2466
2607
 
2467
2608
  const {
2468
2609
  error: res_error,
2469
- } = OrderPlatformModel.OrderDetailsResponse().validate(responseData, {
2610
+ } = OrderPlatformModel.ManifestShipmentListing().validate(responseData, {
2470
2611
  abortEarly: false,
2471
2612
  allowUnknown: true,
2472
2613
  });
@@ -2477,7 +2618,7 @@ class Order {
2477
2618
  } else {
2478
2619
  Logger({
2479
2620
  level: "WARN",
2480
- message: `Response Validation Warnings for platform > Order > getOrderById \n ${res_error}`,
2621
+ message: `Response Validation Warnings for platform > Order > getManifestShipments \n ${res_error}`,
2481
2622
  });
2482
2623
  }
2483
2624
  }
@@ -2486,78 +2627,22 @@ class Order {
2486
2627
  }
2487
2628
 
2488
2629
  /**
2489
- * @param {OrderPlatformValidator.GetOrdersParam} arg - Arg object
2630
+ * @param {OrderPlatformValidator.GetManifestfiltersParam} arg - Arg object
2490
2631
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2491
2632
  * @param {import("../PlatformAPIClient").Options} - Options
2492
- * @returns {Promise<OrderPlatformModel.OrderListingResponse>} - Success response
2493
- * @name getOrders
2494
- * @summary: Get orders.
2495
- * @description: Get Orders Listing - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getOrders/).
2633
+ * @returns {Promise<OrderPlatformModel.ManifestFiltersResponseSchema>} -
2634
+ * Success response
2635
+ * @name getManifestfilters
2636
+ * @summary: List filters
2637
+ * @description: Get supported filter for listing manifests - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getManifestfilters/).
2496
2638
  */
2497
- async getOrders(
2498
- {
2499
- lane,
2500
- searchType,
2501
- bagStatus,
2502
- timeToDispatch,
2503
- paymentMethods,
2504
- tags,
2505
- searchValue,
2506
- fromDate,
2507
- toDate,
2508
- startDate,
2509
- endDate,
2510
- dpIds,
2511
- stores,
2512
- salesChannels,
2513
- pageNo,
2514
- pageSize,
2515
- isPrioritySort,
2516
- customMeta,
2517
- myOrders,
2518
- showCrossCompanyData,
2519
- customerId,
2520
- orderType,
2521
- operationalStatus,
2522
- financialStatus,
2523
- logisticsStatus,
2524
- parentViewSlug,
2525
- childViewSlug,
2526
- groupEntity,
2527
- requestHeaders,
2528
- } = { requestHeaders: {} },
2639
+ async getManifestfilters(
2640
+ { view, requestHeaders } = { requestHeaders: {} },
2529
2641
  { responseHeaders } = { responseHeaders: false }
2530
2642
  ) {
2531
- const { error } = OrderPlatformValidator.getOrders().validate(
2643
+ const { error } = OrderPlatformValidator.getManifestfilters().validate(
2532
2644
  {
2533
- lane,
2534
- searchType,
2535
- bagStatus,
2536
- timeToDispatch,
2537
- paymentMethods,
2538
- tags,
2539
- searchValue,
2540
- fromDate,
2541
- toDate,
2542
- startDate,
2543
- endDate,
2544
- dpIds,
2545
- stores,
2546
- salesChannels,
2547
- pageNo,
2548
- pageSize,
2549
- isPrioritySort,
2550
- customMeta,
2551
- myOrders,
2552
- showCrossCompanyData,
2553
- customerId,
2554
- orderType,
2555
- operationalStatus,
2556
- financialStatus,
2557
- logisticsStatus,
2558
- parentViewSlug,
2559
- childViewSlug,
2560
- groupEntity,
2645
+ view,
2561
2646
  },
2562
2647
  { abortEarly: false, allowUnknown: true }
2563
2648
  );
@@ -2566,82 +2651,30 @@ class Order {
2566
2651
  }
2567
2652
 
2568
2653
  // Showing warrnings if extra unknown parameters are found
2569
- const { error: warrning } = OrderPlatformValidator.getOrders().validate(
2654
+ const {
2655
+ error: warrning,
2656
+ } = OrderPlatformValidator.getManifestfilters().validate(
2570
2657
  {
2571
- lane,
2572
- searchType,
2573
- bagStatus,
2574
- timeToDispatch,
2575
- paymentMethods,
2576
- tags,
2577
- searchValue,
2578
- fromDate,
2579
- toDate,
2580
- startDate,
2581
- endDate,
2582
- dpIds,
2583
- stores,
2584
- salesChannels,
2585
- pageNo,
2586
- pageSize,
2587
- isPrioritySort,
2588
- customMeta,
2589
- myOrders,
2590
- showCrossCompanyData,
2591
- customerId,
2592
- orderType,
2593
- operationalStatus,
2594
- financialStatus,
2595
- logisticsStatus,
2596
- parentViewSlug,
2597
- childViewSlug,
2598
- groupEntity,
2658
+ view,
2599
2659
  },
2600
2660
  { abortEarly: false, allowUnknown: false }
2601
2661
  );
2602
2662
  if (warrning) {
2603
2663
  Logger({
2604
2664
  level: "WARN",
2605
- message: `Parameter Validation warrnings for platform > Order > getOrders \n ${warrning}`,
2665
+ message: `Parameter Validation warrnings for platform > Order > getManifestfilters \n ${warrning}`,
2606
2666
  });
2607
2667
  }
2608
2668
 
2609
2669
  const query_params = {};
2610
- query_params["lane"] = lane;
2611
- query_params["search_type"] = searchType;
2612
- query_params["bag_status"] = bagStatus;
2613
- query_params["time_to_dispatch"] = timeToDispatch;
2614
- query_params["payment_methods"] = paymentMethods;
2615
- query_params["tags"] = tags;
2616
- query_params["search_value"] = searchValue;
2617
- query_params["from_date"] = fromDate;
2618
- query_params["to_date"] = toDate;
2619
- query_params["start_date"] = startDate;
2620
- query_params["end_date"] = endDate;
2621
- query_params["dp_ids"] = dpIds;
2622
- query_params["stores"] = stores;
2623
- query_params["sales_channels"] = salesChannels;
2624
- query_params["page_no"] = pageNo;
2625
- query_params["page_size"] = pageSize;
2626
- query_params["is_priority_sort"] = isPrioritySort;
2627
- query_params["custom_meta"] = customMeta;
2628
- query_params["my_orders"] = myOrders;
2629
- query_params["show_cross_company_data"] = showCrossCompanyData;
2630
- query_params["customer_id"] = customerId;
2631
- query_params["order_type"] = orderType;
2632
- query_params["operational_status"] = operationalStatus;
2633
- query_params["financial_status"] = financialStatus;
2634
- query_params["logistics_status"] = logisticsStatus;
2635
- query_params["parent_view_slug"] = parentViewSlug;
2636
- query_params["child_view_slug"] = childViewSlug;
2637
- query_params["group_entity"] = groupEntity;
2670
+ query_params["view"] = view;
2638
2671
 
2639
2672
  const xHeaders = {};
2640
2673
 
2641
2674
  const response = await PlatformAPIClient.execute(
2642
2675
  this.config,
2643
2676
  "get",
2644
- `/service/platform/order/v1.0/company/${this.config.companyId}/orders-listing`,
2677
+ `/service/platform/order-manage/v1.0/company/${this.config.companyId}/filter/listing`,
2645
2678
  query_params,
2646
2679
  undefined,
2647
2680
  { ...xHeaders, ...requestHeaders },
@@ -2655,10 +2688,10 @@ class Order {
2655
2688
 
2656
2689
  const {
2657
2690
  error: res_error,
2658
- } = OrderPlatformModel.OrderListingResponse().validate(responseData, {
2659
- abortEarly: false,
2660
- allowUnknown: true,
2661
- });
2691
+ } = OrderPlatformModel.ManifestFiltersResponseSchema().validate(
2692
+ responseData,
2693
+ { abortEarly: false, allowUnknown: true }
2694
+ );
2662
2695
 
2663
2696
  if (res_error) {
2664
2697
  if (this.config.options.strictResponseCheck === true) {
@@ -2666,7 +2699,7 @@ class Order {
2666
2699
  } else {
2667
2700
  Logger({
2668
2701
  level: "WARN",
2669
- message: `Response Validation Warnings for platform > Order > getOrders \n ${res_error}`,
2702
+ message: `Response Validation Warnings for platform > Order > getManifestfilters \n ${res_error}`,
2670
2703
  });
2671
2704
  }
2672
2705
  }
@@ -2675,150 +2708,40 @@ class Order {
2675
2708
  }
2676
2709
 
2677
2710
  /**
2678
- * @param {Object} arg - Arg object.
2679
- * @param {string} [arg.lane] - Lane refers to a section where orders are
2680
- * assigned, indicating its grouping
2681
- * @param {string} [arg.searchType] - Search_type refers to the field that
2682
- * will be used as the target for the search operation
2683
- * @param {string} [arg.bagStatus] - Bag_status refers to the status of the
2684
- * entity. Filters orders based on the status.
2685
- * @param {number} [arg.timeToDispatch] - Time_to_dispatch refers to the
2686
- * estimated SLA time.
2687
- * @param {string} [arg.paymentMethods] -
2688
- * @param {string} [arg.tags] - Tags refer to additional descriptive labels
2689
- * associated with the order
2690
- * @param {string} [arg.searchValue] - Search_value is matched against the
2691
- * field specified by the search_type
2692
- * @param {string} [arg.fromDate] -
2693
- * @param {string} [arg.toDate] -
2694
- * @param {string} [arg.startDate] -
2695
- * @param {string} [arg.endDate] -
2696
- * @param {string} [arg.dpIds] - Delivery Partner IDs to which shipments are assigned.
2697
- * @param {string} [arg.stores] -
2698
- * @param {string} [arg.salesChannels] -
2699
- * @param {number} [arg.pageSize] -
2700
- * @param {boolean} [arg.isPrioritySort] -
2701
- * @param {Object[]} [arg.customMeta] -
2702
- * @param {boolean} [arg.myOrders] -
2703
- * @param {boolean} [arg.showCrossCompanyData] - Flag to view cross &
2704
- * non-cross company order
2705
- * @param {string} [arg.customerId] -
2706
- * @param {string} [arg.orderType] -
2707
- * @param {string} [arg.operationalStatus] - Statuses relating to shipment
2708
- * transition in order processing journey. Comma separated values of
2709
- * operational statuses.
2710
- * @param {string} [arg.financialStatus] - Statuses relating to finance
2711
- * related operations in the order processing journey. Comma separated
2712
- * values of financial statuses.
2713
- * @param {string} [arg.logisticsStatus] - Statuses relating to delivery and
2714
- * pickup related operations in the order processing journey. Comma
2715
- * separated values of logistics statuses.
2716
- * @param {string} [arg.parentViewSlug] - Parent view is used for grouping
2717
- * of child views. Slug of parent view.
2718
- * @param {string} [arg.childViewSlug] - Child view is user configured view,
2719
- * which has filters added by the user on which shipments/orders are
2720
- * fetched. Slug of child view.
2721
- * @param {string} [arg.groupEntity] - Defines the grouping criterion for
2722
- * retrieving shipments or orders. It specifies whether the results should
2723
- * be organized based on shipment groups or order groups. For example,
2724
- * using 'shipments' groups results by shipment, while an invalid value
2725
- * like 'abcd' may not be recognized, leading to errors or default behavior.
2726
- * @returns {Paginator<OrderPlatformModel.OrderListingResponse>}
2727
- * @summary: Get orders.
2728
- * @description: Get Orders Listing
2729
- */
2730
- getOrdersPaginator({
2731
- lane,
2732
- searchType,
2733
- bagStatus,
2734
- timeToDispatch,
2735
- paymentMethods,
2736
- tags,
2737
- searchValue,
2738
- fromDate,
2739
- toDate,
2740
- startDate,
2741
- endDate,
2742
- dpIds,
2743
- stores,
2744
- salesChannels,
2745
- pageSize,
2746
- isPrioritySort,
2747
- customMeta,
2748
- myOrders,
2749
- showCrossCompanyData,
2750
- customerId,
2751
- orderType,
2752
- operationalStatus,
2753
- financialStatus,
2754
- logisticsStatus,
2755
- parentViewSlug,
2756
- childViewSlug,
2757
- groupEntity,
2758
- } = {}) {
2759
- const paginator = new Paginator();
2760
- const callback = async () => {
2761
- const pageId = paginator.nextId;
2762
- const pageNo = paginator.pageNo;
2763
- const pageType = "number";
2764
- const data = await this.getOrders({
2765
- lane: lane,
2766
- searchType: searchType,
2767
- bagStatus: bagStatus,
2768
- timeToDispatch: timeToDispatch,
2769
- paymentMethods: paymentMethods,
2770
- tags: tags,
2771
- searchValue: searchValue,
2772
- fromDate: fromDate,
2773
- toDate: toDate,
2774
- startDate: startDate,
2775
- endDate: endDate,
2776
- dpIds: dpIds,
2777
- stores: stores,
2778
- salesChannels: salesChannels,
2779
- pageNo: pageNo,
2780
- pageSize: pageSize,
2781
- isPrioritySort: isPrioritySort,
2782
- customMeta: customMeta,
2783
- myOrders: myOrders,
2784
- showCrossCompanyData: showCrossCompanyData,
2785
- customerId: customerId,
2786
- orderType: orderType,
2787
- operationalStatus: operationalStatus,
2788
- financialStatus: financialStatus,
2789
- logisticsStatus: logisticsStatus,
2790
- parentViewSlug: parentViewSlug,
2791
- childViewSlug: childViewSlug,
2792
- groupEntity: groupEntity,
2793
- });
2794
- paginator.setPaginator({
2795
- hasNext: data.page.has_next ? true : false,
2796
- nextId: data.page.next_id,
2797
- });
2798
- return data;
2799
- };
2800
- paginator.setCallback(callback.bind(this));
2801
- return paginator;
2802
- }
2803
-
2804
- /**
2805
- * @param {OrderPlatformValidator.GetRefundConfigurationParam} arg - Arg object
2711
+ * @param {OrderPlatformValidator.GetManifestsParam} arg - Arg object
2806
2712
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2807
2713
  * @param {import("../PlatformAPIClient").Options} - Options
2808
- * @returns {Promise<OrderPlatformModel.RefundStateConfigurationManualSchemaResponse>}
2809
- * - Success response
2810
- *
2811
- * @name getRefundConfiguration
2812
- * @summary: refund configuration.
2813
- * @description: refund configuration. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getRefundConfiguration/).
2714
+ * @returns {Promise<OrderPlatformModel.ManifestList>} - Success response
2715
+ * @name getManifests
2716
+ * @summary: List manifests
2717
+ * @description: Get a list of manifest as per the filter provided - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getManifests/).
2814
2718
  */
2815
- async getRefundConfiguration(
2816
- { appId, requestHeaders } = { requestHeaders: {} },
2719
+ async getManifests(
2720
+ {
2721
+ status,
2722
+ startDate,
2723
+ endDate,
2724
+ searchType,
2725
+ storeId,
2726
+ searchValue,
2727
+ dpIds,
2728
+ pageNo,
2729
+ pageSize,
2730
+ requestHeaders,
2731
+ } = { requestHeaders: {} },
2817
2732
  { responseHeaders } = { responseHeaders: false }
2818
2733
  ) {
2819
- const { error } = OrderPlatformValidator.getRefundConfiguration().validate(
2734
+ const { error } = OrderPlatformValidator.getManifests().validate(
2820
2735
  {
2821
- appId,
2736
+ status,
2737
+ startDate,
2738
+ endDate,
2739
+ searchType,
2740
+ storeId,
2741
+ searchValue,
2742
+ dpIds,
2743
+ pageNo,
2744
+ pageSize,
2822
2745
  },
2823
2746
  { abortEarly: false, allowUnknown: true }
2824
2747
  );
@@ -2827,30 +2750,44 @@ class Order {
2827
2750
  }
2828
2751
 
2829
2752
  // Showing warrnings if extra unknown parameters are found
2830
- const {
2831
- error: warrning,
2832
- } = OrderPlatformValidator.getRefundConfiguration().validate(
2753
+ const { error: warrning } = OrderPlatformValidator.getManifests().validate(
2833
2754
  {
2834
- appId,
2755
+ status,
2756
+ startDate,
2757
+ endDate,
2758
+ searchType,
2759
+ storeId,
2760
+ searchValue,
2761
+ dpIds,
2762
+ pageNo,
2763
+ pageSize,
2835
2764
  },
2836
2765
  { abortEarly: false, allowUnknown: false }
2837
2766
  );
2838
2767
  if (warrning) {
2839
2768
  Logger({
2840
2769
  level: "WARN",
2841
- message: `Parameter Validation warrnings for platform > Order > getRefundConfiguration \n ${warrning}`,
2770
+ message: `Parameter Validation warrnings for platform > Order > getManifests \n ${warrning}`,
2842
2771
  });
2843
2772
  }
2844
2773
 
2845
2774
  const query_params = {};
2846
- query_params["app_id"] = appId;
2775
+ query_params["status"] = status;
2776
+ query_params["start_date"] = startDate;
2777
+ query_params["end_date"] = endDate;
2778
+ query_params["search_type"] = searchType;
2779
+ query_params["store_id"] = storeId;
2780
+ query_params["search_value"] = searchValue;
2781
+ query_params["dp_ids"] = dpIds;
2782
+ query_params["page_no"] = pageNo;
2783
+ query_params["page_size"] = pageSize;
2847
2784
 
2848
2785
  const xHeaders = {};
2849
2786
 
2850
2787
  const response = await PlatformAPIClient.execute(
2851
2788
  this.config,
2852
2789
  "get",
2853
- `/service/platform/order-manage/v1.0/company/${this.config.companyId}/refund/config`,
2790
+ `/service/platform/order-manage/v1.0/company/${this.config.companyId}/manifest/listing`,
2854
2791
  query_params,
2855
2792
  undefined,
2856
2793
  { ...xHeaders, ...requestHeaders },
@@ -2864,10 +2801,10 @@ class Order {
2864
2801
 
2865
2802
  const {
2866
2803
  error: res_error,
2867
- } = OrderPlatformModel.RefundStateConfigurationManualSchemaResponse().validate(
2868
- responseData,
2869
- { abortEarly: false, allowUnknown: true }
2870
- );
2804
+ } = OrderPlatformModel.ManifestList().validate(responseData, {
2805
+ abortEarly: false,
2806
+ allowUnknown: true,
2807
+ });
2871
2808
 
2872
2809
  if (res_error) {
2873
2810
  if (this.config.options.strictResponseCheck === true) {
@@ -2875,7 +2812,7 @@ class Order {
2875
2812
  } else {
2876
2813
  Logger({
2877
2814
  level: "WARN",
2878
- message: `Response Validation Warnings for platform > Order > getRefundConfiguration \n ${res_error}`,
2815
+ message: `Response Validation Warnings for platform > Order > getManifests \n ${res_error}`,
2879
2816
  });
2880
2817
  }
2881
2818
  }
@@ -2884,22 +2821,27 @@ class Order {
2884
2821
  }
2885
2822
 
2886
2823
  /**
2887
- * @param {OrderPlatformValidator.GetRefundEnableStateListParam} arg - Arg object
2824
+ * @param {OrderPlatformValidator.GetOrderByIdParam} arg - Arg object
2888
2825
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2889
2826
  * @param {import("../PlatformAPIClient").Options} - Options
2890
- * @returns {Promise<OrderPlatformModel.GetRefundStates>} - Success response
2891
- * @name getRefundEnableStateList
2892
- * @summary: Refund State Configurationb
2893
- * @description: refund configuration. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getRefundEnableStateList/).
2827
+ * @returns {Promise<OrderPlatformModel.OrderDetailsResponseSchema>} -
2828
+ * Success response
2829
+ * @name getOrderById
2830
+ * @summary: Get order
2831
+ * @description: Get detailed information about a specific order - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getOrderById/).
2894
2832
  */
2895
- async getRefundEnableStateList(
2896
- { requestHeaders } = { requestHeaders: {} },
2833
+ async getOrderById(
2834
+ { orderId, myOrders, allowInactive, requestHeaders } = {
2835
+ requestHeaders: {},
2836
+ },
2897
2837
  { responseHeaders } = { responseHeaders: false }
2898
2838
  ) {
2899
- const {
2900
- error,
2901
- } = OrderPlatformValidator.getRefundEnableStateList().validate(
2902
- {},
2839
+ const { error } = OrderPlatformValidator.getOrderById().validate(
2840
+ {
2841
+ orderId,
2842
+ myOrders,
2843
+ allowInactive,
2844
+ },
2903
2845
  { abortEarly: false, allowUnknown: true }
2904
2846
  );
2905
2847
  if (error) {
@@ -2907,27 +2849,32 @@ class Order {
2907
2849
  }
2908
2850
 
2909
2851
  // Showing warrnings if extra unknown parameters are found
2910
- const {
2911
- error: warrning,
2912
- } = OrderPlatformValidator.getRefundEnableStateList().validate(
2913
- {},
2852
+ const { error: warrning } = OrderPlatformValidator.getOrderById().validate(
2853
+ {
2854
+ orderId,
2855
+ myOrders,
2856
+ allowInactive,
2857
+ },
2914
2858
  { abortEarly: false, allowUnknown: false }
2915
2859
  );
2916
2860
  if (warrning) {
2917
2861
  Logger({
2918
2862
  level: "WARN",
2919
- message: `Parameter Validation warrnings for platform > Order > getRefundEnableStateList \n ${warrning}`,
2863
+ message: `Parameter Validation warrnings for platform > Order > getOrderById \n ${warrning}`,
2920
2864
  });
2921
2865
  }
2922
2866
 
2923
2867
  const query_params = {};
2868
+ query_params["order_id"] = orderId;
2869
+ query_params["my_orders"] = myOrders;
2870
+ query_params["allow_inactive"] = allowInactive;
2924
2871
 
2925
2872
  const xHeaders = {};
2926
2873
 
2927
2874
  const response = await PlatformAPIClient.execute(
2928
2875
  this.config,
2929
2876
  "get",
2930
- `/service/platform/order-manage/v1.0/company/${this.config.companyId}/refund/states`,
2877
+ `/service/platform/order/v1.0/company/${this.config.companyId}/order-details`,
2931
2878
  query_params,
2932
2879
  undefined,
2933
2880
  { ...xHeaders, ...requestHeaders },
@@ -2941,7 +2888,7 @@ class Order {
2941
2888
 
2942
2889
  const {
2943
2890
  error: res_error,
2944
- } = OrderPlatformModel.GetRefundStates().validate(responseData, {
2891
+ } = OrderPlatformModel.OrderDetailsResponseSchema().validate(responseData, {
2945
2892
  abortEarly: false,
2946
2893
  allowUnknown: true,
2947
2894
  });
@@ -2952,7 +2899,7 @@ class Order {
2952
2899
  } else {
2953
2900
  Logger({
2954
2901
  level: "WARN",
2955
- message: `Response Validation Warnings for platform > Order > getRefundEnableStateList \n ${res_error}`,
2902
+ message: `Response Validation Warnings for platform > Order > getOrderById \n ${res_error}`,
2956
2903
  });
2957
2904
  }
2958
2905
  }
@@ -2961,36 +2908,75 @@ class Order {
2961
2908
  }
2962
2909
 
2963
2910
  /**
2964
- * @param {OrderPlatformValidator.GetRefundOptionsParam} arg - Arg object
2911
+ * @param {OrderPlatformValidator.GetOrdersParam} arg - Arg object
2965
2912
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2966
2913
  * @param {import("../PlatformAPIClient").Options} - Options
2967
- * @returns {Promise<OrderPlatformModel.RefundOptionsSchemaResponse>} -
2914
+ * @returns {Promise<OrderPlatformModel.OrderListingResponseSchema>} -
2968
2915
  * Success response
2969
- * @name getRefundOptions
2970
- * @summary: Retrieve refund options with amount breakup for specific shipment and bags.
2971
- * @description: This API can be used for giving the refund amount with available option of MOPs. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getRefundOptions/).
2916
+ * @name getOrders
2917
+ * @summary: List orders
2918
+ * @description: Get a list of orders based on the filters provided. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getOrders/).
2972
2919
  */
2973
- async getRefundOptions(
2920
+ async getOrders(
2974
2921
  {
2975
- shipmentId,
2976
- bagIds,
2977
- state,
2978
- optinAppId,
2979
- optinCompanyId,
2980
- status,
2922
+ lane,
2923
+ searchType,
2924
+ bagStatus,
2925
+ timeToDispatch,
2926
+ paymentMethods,
2927
+ tags,
2928
+ searchValue,
2929
+ fromDate,
2930
+ toDate,
2931
+ startDate,
2932
+ endDate,
2933
+ dpIds,
2934
+ stores,
2935
+ salesChannels,
2936
+ pageNo,
2937
+ pageSize,
2938
+ isPrioritySort,
2939
+ customMeta,
2940
+ myOrders,
2941
+ showCrossCompanyData,
2942
+ customerId,
2943
+ orderType,
2944
+ allowInactive,
2945
+ groupEntity,
2946
+ enforceDateFilter,
2947
+ fulfillmentType,
2981
2948
  requestHeaders,
2982
2949
  } = { requestHeaders: {} },
2983
2950
  { responseHeaders } = { responseHeaders: false }
2984
2951
  ) {
2985
- const { error } = OrderPlatformValidator.getRefundOptions().validate(
2952
+ const { error } = OrderPlatformValidator.getOrders().validate(
2986
2953
  {
2987
- shipmentId,
2988
-
2989
- bagIds,
2990
- state,
2991
- optinAppId,
2992
- optinCompanyId,
2993
- status,
2954
+ lane,
2955
+ searchType,
2956
+ bagStatus,
2957
+ timeToDispatch,
2958
+ paymentMethods,
2959
+ tags,
2960
+ searchValue,
2961
+ fromDate,
2962
+ toDate,
2963
+ startDate,
2964
+ endDate,
2965
+ dpIds,
2966
+ stores,
2967
+ salesChannels,
2968
+ pageNo,
2969
+ pageSize,
2970
+ isPrioritySort,
2971
+ customMeta,
2972
+ myOrders,
2973
+ showCrossCompanyData,
2974
+ customerId,
2975
+ orderType,
2976
+ allowInactive,
2977
+ groupEntity,
2978
+ enforceDateFilter,
2979
+ fulfillmentType,
2994
2980
  },
2995
2981
  { abortEarly: false, allowUnknown: true }
2996
2982
  );
@@ -2999,40 +2985,78 @@ class Order {
2999
2985
  }
3000
2986
 
3001
2987
  // Showing warrnings if extra unknown parameters are found
3002
- const {
3003
- error: warrning,
3004
- } = OrderPlatformValidator.getRefundOptions().validate(
2988
+ const { error: warrning } = OrderPlatformValidator.getOrders().validate(
3005
2989
  {
3006
- shipmentId,
3007
-
3008
- bagIds,
3009
- state,
3010
- optinAppId,
3011
- optinCompanyId,
3012
- status,
2990
+ lane,
2991
+ searchType,
2992
+ bagStatus,
2993
+ timeToDispatch,
2994
+ paymentMethods,
2995
+ tags,
2996
+ searchValue,
2997
+ fromDate,
2998
+ toDate,
2999
+ startDate,
3000
+ endDate,
3001
+ dpIds,
3002
+ stores,
3003
+ salesChannels,
3004
+ pageNo,
3005
+ pageSize,
3006
+ isPrioritySort,
3007
+ customMeta,
3008
+ myOrders,
3009
+ showCrossCompanyData,
3010
+ customerId,
3011
+ orderType,
3012
+ allowInactive,
3013
+ groupEntity,
3014
+ enforceDateFilter,
3015
+ fulfillmentType,
3013
3016
  },
3014
3017
  { abortEarly: false, allowUnknown: false }
3015
3018
  );
3016
3019
  if (warrning) {
3017
3020
  Logger({
3018
3021
  level: "WARN",
3019
- message: `Parameter Validation warrnings for platform > Order > getRefundOptions \n ${warrning}`,
3022
+ message: `Parameter Validation warrnings for platform > Order > getOrders \n ${warrning}`,
3020
3023
  });
3021
3024
  }
3022
3025
 
3023
3026
  const query_params = {};
3024
- query_params["bag_ids"] = bagIds;
3025
- query_params["state"] = state;
3026
- query_params["optin_app_id"] = optinAppId;
3027
- query_params["optin_company_id"] = optinCompanyId;
3028
- query_params["status"] = status;
3027
+ query_params["lane"] = lane;
3028
+ query_params["search_type"] = searchType;
3029
+ query_params["bag_status"] = bagStatus;
3030
+ query_params["time_to_dispatch"] = timeToDispatch;
3031
+ query_params["payment_methods"] = paymentMethods;
3032
+ query_params["tags"] = tags;
3033
+ query_params["search_value"] = searchValue;
3034
+ query_params["from_date"] = fromDate;
3035
+ query_params["to_date"] = toDate;
3036
+ query_params["start_date"] = startDate;
3037
+ query_params["end_date"] = endDate;
3038
+ query_params["dp_ids"] = dpIds;
3039
+ query_params["stores"] = stores;
3040
+ query_params["sales_channels"] = salesChannels;
3041
+ query_params["page_no"] = pageNo;
3042
+ query_params["page_size"] = pageSize;
3043
+ query_params["is_priority_sort"] = isPrioritySort;
3044
+ query_params["custom_meta"] = customMeta;
3045
+ query_params["my_orders"] = myOrders;
3046
+ query_params["show_cross_company_data"] = showCrossCompanyData;
3047
+ query_params["customer_id"] = customerId;
3048
+ query_params["order_type"] = orderType;
3049
+ query_params["allow_inactive"] = allowInactive;
3050
+ query_params["group_entity"] = groupEntity;
3051
+ query_params["enforce_date_filter"] = enforceDateFilter;
3052
+ query_params["fulfillment_type"] = fulfillmentType;
3029
3053
 
3030
3054
  const xHeaders = {};
3031
3055
 
3032
3056
  const response = await PlatformAPIClient.execute(
3033
3057
  this.config,
3034
3058
  "get",
3035
- `/service/platform/order-manage/v1.0/company/${this.config.companyId}/shipment/${shipmentId}/refund-options`,
3059
+ `/service/platform/order/v1.0/company/${this.config.companyId}/orders-listing`,
3036
3060
  query_params,
3037
3061
  undefined,
3038
3062
  { ...xHeaders, ...requestHeaders },
@@ -3046,10 +3070,10 @@ class Order {
3046
3070
 
3047
3071
  const {
3048
3072
  error: res_error,
3049
- } = OrderPlatformModel.RefundOptionsSchemaResponse().validate(
3050
- responseData,
3051
- { abortEarly: false, allowUnknown: true }
3052
- );
3073
+ } = OrderPlatformModel.OrderListingResponseSchema().validate(responseData, {
3074
+ abortEarly: false,
3075
+ allowUnknown: true,
3076
+ });
3053
3077
 
3054
3078
  if (res_error) {
3055
3079
  if (this.config.options.strictResponseCheck === true) {
@@ -3057,7 +3081,7 @@ class Order {
3057
3081
  } else {
3058
3082
  Logger({
3059
3083
  level: "WARN",
3060
- message: `Response Validation Warnings for platform > Order > getRefundOptions \n ${res_error}`,
3084
+ message: `Response Validation Warnings for platform > Order > getOrders \n ${res_error}`,
3061
3085
  });
3062
3086
  }
3063
3087
  }
@@ -3066,96 +3090,135 @@ class Order {
3066
3090
  }
3067
3091
 
3068
3092
  /**
3069
- * @param {OrderPlatformValidator.GetRefundStateConfigurationParam} arg - Arg object
3070
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3071
- * @param {import("../PlatformAPIClient").Options} - Options
3072
- * @returns {Promise<OrderPlatformModel.GetRefundStateConfigurationResponse>}
3073
- * - Success response
3074
- *
3075
- * @name getRefundStateConfiguration
3076
- * @summary: Refund State Configuration
3077
- * @description: Refund State Configuration - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getRefundStateConfiguration/).
3093
+ * @param {Object} arg - Arg object.
3094
+ * @param {string} [arg.lane] - Lane refers to a section where orders are
3095
+ * assigned, indicating its grouping.
3096
+ * @param {string} [arg.searchType] - Search_type refers to the field that
3097
+ * will be used as the target for the search operation.
3098
+ * @param {string} [arg.bagStatus] - Bag_status refers to status of the
3099
+ * entity. Filters orders based on the status.
3100
+ * @param {number} [arg.timeToDispatch] - Time_to_dispatch refers to
3101
+ * estimated SLA time.
3102
+ * @param {string} [arg.paymentMethods] - Comma separated values of payment
3103
+ * methods that were used to place order.
3104
+ * @param {string} [arg.tags] - Tags refers to additional descriptive labels
3105
+ * associated with the order
3106
+ * @param {string} [arg.searchValue] - Search_value is matched against the
3107
+ * field specified by the search_type
3108
+ * @param {string} [arg.fromDate] - Date time in UTC timezone as per ISO format.
3109
+ * @param {string} [arg.toDate] - Date time in UTC timezone as per ISO format.
3110
+ * @param {string} [arg.startDate] - Date time in UTC timezone as per ISO format.
3111
+ * @param {string} [arg.endDate] - Date time in UTC timezone as per ISO format.
3112
+ * @param {string} [arg.dpIds] - Delivery Partner IDs to which shipments are assigned.
3113
+ * @param {string} [arg.stores] - A comma-separated list of store IDs used
3114
+ * to filter results to only those related to specific stores.
3115
+ * @param {string} [arg.salesChannels] - A comma-separated list of sales
3116
+ * channel IDs to filter results based on the sales channels involved.
3117
+ * @param {number} [arg.pageSize] - Determines the number of results
3118
+ * returned per page.
3119
+ * @param {boolean} [arg.isPrioritySort] -
3120
+ * @param {string} [arg.customMeta] -
3121
+ * @param {boolean} [arg.myOrders] -
3122
+ * @param {boolean} [arg.showCrossCompanyData] - Flag to view cross &
3123
+ * non-cross company order
3124
+ * @param {string} [arg.customerId] - The unique identifier for the customer
3125
+ * associated with the query, useful for filtering results to a specific customer.
3126
+ * @param {string} [arg.orderType] -
3127
+ * @param {boolean} [arg.allowInactive] - Flag indicating whether inactive
3128
+ * shipments are allowed
3129
+ * @param {string} [arg.groupEntity] - Defines the grouping criterion for
3130
+ * retrieving shipments or orders. It specifies whether the results should
3131
+ * be organized based on shipment groups or order groups. For example,
3132
+ * using 'shipments' groups results by shipment, while an invalid value
3133
+ * like 'abcd' may not be recognized, leading to errors or default behavior.
3134
+ * @param {boolean} [arg.enforceDateFilter] - Applies a date filter for
3135
+ * listing orders. This is useful when fetching data for a specific date
3136
+ * range while performing searches.
3137
+ * @param {string} [arg.fulfillmentType] - Define the Fulfillment Type for
3138
+ * Listing Orders, This is use when we want to get list of shipments or
3139
+ * orders by cross store or cross company or fulfilling Store (by
3140
+ * default), this is also depends on the login user accessType and store access
3141
+ * @returns {Paginator<OrderPlatformModel.OrderListingResponseSchema>}
3142
+ * @summary: List orders
3143
+ * @description: Get a list of orders based on the filters provided.
3078
3144
  */
3079
- async getRefundStateConfiguration(
3080
- { appId, requestHeaders } = { requestHeaders: {} },
3081
- { responseHeaders } = { responseHeaders: false }
3082
- ) {
3083
- const {
3084
- error,
3085
- } = OrderPlatformValidator.getRefundStateConfiguration().validate(
3086
- {
3087
- appId,
3088
- },
3089
- { abortEarly: false, allowUnknown: true }
3090
- );
3091
- if (error) {
3092
- return Promise.reject(new FDKClientValidationError(error));
3093
- }
3094
-
3095
- // Showing warrnings if extra unknown parameters are found
3096
- const {
3097
- error: warrning,
3098
- } = OrderPlatformValidator.getRefundStateConfiguration().validate(
3099
- {
3100
- appId,
3101
- },
3102
- { abortEarly: false, allowUnknown: false }
3103
- );
3104
- if (warrning) {
3105
- Logger({
3106
- level: "WARN",
3107
- message: `Parameter Validation warrnings for platform > Order > getRefundStateConfiguration \n ${warrning}`,
3108
- });
3109
- }
3110
-
3111
- const query_params = {};
3112
- query_params["app_id"] = appId;
3113
-
3114
- const xHeaders = {};
3115
-
3116
- const response = await PlatformAPIClient.execute(
3117
- this.config,
3118
- "get",
3119
- `/service/platform/order-manage/v1.0/company/${this.config.companyId}/refund/states/config`,
3120
- query_params,
3121
- undefined,
3122
- { ...xHeaders, ...requestHeaders },
3123
- { responseHeaders }
3124
- );
3125
-
3126
- let responseData = response;
3127
- if (responseHeaders) {
3128
- responseData = response[0];
3129
- }
3130
-
3131
- const {
3132
- error: res_error,
3133
- } = OrderPlatformModel.GetRefundStateConfigurationResponse().validate(
3134
- responseData,
3135
- { abortEarly: false, allowUnknown: true }
3136
- );
3137
-
3138
- if (res_error) {
3139
- if (this.config.options.strictResponseCheck === true) {
3140
- return Promise.reject(new FDKResponseValidationError(res_error));
3141
- } else {
3142
- Logger({
3143
- level: "WARN",
3144
- message: `Response Validation Warnings for platform > Order > getRefundStateConfiguration \n ${res_error}`,
3145
- });
3146
- }
3147
- }
3148
-
3149
- return response;
3145
+ getOrdersPaginator({
3146
+ lane,
3147
+ searchType,
3148
+ bagStatus,
3149
+ timeToDispatch,
3150
+ paymentMethods,
3151
+ tags,
3152
+ searchValue,
3153
+ fromDate,
3154
+ toDate,
3155
+ startDate,
3156
+ endDate,
3157
+ dpIds,
3158
+ stores,
3159
+ salesChannels,
3160
+ pageSize,
3161
+ isPrioritySort,
3162
+ customMeta,
3163
+ myOrders,
3164
+ showCrossCompanyData,
3165
+ customerId,
3166
+ orderType,
3167
+ allowInactive,
3168
+ groupEntity,
3169
+ enforceDateFilter,
3170
+ fulfillmentType,
3171
+ } = {}) {
3172
+ const paginator = new Paginator();
3173
+ const callback = async () => {
3174
+ const pageId = paginator.nextId;
3175
+ const pageNo = paginator.pageNo;
3176
+ const pageType = "number";
3177
+ const data = await this.getOrders({
3178
+ lane: lane,
3179
+ searchType: searchType,
3180
+ bagStatus: bagStatus,
3181
+ timeToDispatch: timeToDispatch,
3182
+ paymentMethods: paymentMethods,
3183
+ tags: tags,
3184
+ searchValue: searchValue,
3185
+ fromDate: fromDate,
3186
+ toDate: toDate,
3187
+ startDate: startDate,
3188
+ endDate: endDate,
3189
+ dpIds: dpIds,
3190
+ stores: stores,
3191
+ salesChannels: salesChannels,
3192
+ pageNo: pageNo,
3193
+ pageSize: pageSize,
3194
+ isPrioritySort: isPrioritySort,
3195
+ customMeta: customMeta,
3196
+ myOrders: myOrders,
3197
+ showCrossCompanyData: showCrossCompanyData,
3198
+ customerId: customerId,
3199
+ orderType: orderType,
3200
+ allowInactive: allowInactive,
3201
+ groupEntity: groupEntity,
3202
+ enforceDateFilter: enforceDateFilter,
3203
+ fulfillmentType: fulfillmentType,
3204
+ });
3205
+ paginator.setPaginator({
3206
+ hasNext: data.page.has_next ? true : false,
3207
+ nextId: data.page.next_id,
3208
+ });
3209
+ return data;
3210
+ };
3211
+ paginator.setCallback(callback.bind(this));
3212
+ return paginator;
3150
3213
  }
3151
3214
 
3152
3215
  /**
3153
3216
  * @param {OrderPlatformValidator.GetRoleBasedActionsParam} arg - Arg object
3154
3217
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3155
3218
  * @param {import("../PlatformAPIClient").Options} - Options
3156
- * @returns {Promise<OrderPlatformModel.GetActionsResponse>} - Success response
3219
+ * @returns {Promise<OrderPlatformModel.GetActionsResponseSchema>} - Success response
3157
3220
  * @name getRoleBasedActions
3158
- * @summary: Get role-based actions.
3221
+ * @summary: Get role-based actions
3159
3222
  * @description: Retrieve permissible actions based on user roles such as company_admin, company_operation, customer_care, and read_only. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getRoleBasedActions/).
3160
3223
  */
3161
3224
  async getRoleBasedActions(
@@ -3205,7 +3268,7 @@ class Order {
3205
3268
 
3206
3269
  const {
3207
3270
  error: res_error,
3208
- } = OrderPlatformModel.GetActionsResponse().validate(responseData, {
3271
+ } = OrderPlatformModel.GetActionsResponseSchema().validate(responseData, {
3209
3272
  abortEarly: false,
3210
3273
  allowUnknown: true,
3211
3274
  });
@@ -3228,15 +3291,20 @@ class Order {
3228
3291
  * @param {OrderPlatformValidator.GetShipmentByIdParam} arg - Arg object
3229
3292
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3230
3293
  * @param {import("../PlatformAPIClient").Options} - Options
3231
- * @returns {Promise<OrderPlatformModel.ShipmentInfoResponse>} - Success response
3294
+ * @returns {Promise<OrderPlatformModel.ShipmentInfoResponseSchema>} -
3295
+ * Success response
3232
3296
  * @name getShipmentById
3233
- * @summary: Get shipment by ID.
3234
- * @description: Retrieve detailed information about a specific shipment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentById/).
3297
+ * @summary: Get shipment details
3298
+ * @description: Get detailed information about a specific shipment - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentById/).
3235
3299
  */
3236
3300
  async getShipmentById(
3237
- { channelShipmentId, shipmentId, fetchActiveShipment, requestHeaders } = {
3238
- requestHeaders: {},
3239
- },
3301
+ {
3302
+ channelShipmentId,
3303
+ shipmentId,
3304
+ fetchActiveShipment,
3305
+ allowInactive,
3306
+ requestHeaders,
3307
+ } = { requestHeaders: {} },
3240
3308
  { responseHeaders } = { responseHeaders: false }
3241
3309
  ) {
3242
3310
  const { error } = OrderPlatformValidator.getShipmentById().validate(
@@ -3244,6 +3312,7 @@ class Order {
3244
3312
  channelShipmentId,
3245
3313
  shipmentId,
3246
3314
  fetchActiveShipment,
3315
+ allowInactive,
3247
3316
  },
3248
3317
  { abortEarly: false, allowUnknown: true }
3249
3318
  );
@@ -3259,6 +3328,7 @@ class Order {
3259
3328
  channelShipmentId,
3260
3329
  shipmentId,
3261
3330
  fetchActiveShipment,
3331
+ allowInactive,
3262
3332
  },
3263
3333
  { abortEarly: false, allowUnknown: false }
3264
3334
  );
@@ -3273,6 +3343,7 @@ class Order {
3273
3343
  query_params["channel_shipment_id"] = channelShipmentId;
3274
3344
  query_params["shipment_id"] = shipmentId;
3275
3345
  query_params["fetch_active_shipment"] = fetchActiveShipment;
3346
+ query_params["allow_inactive"] = allowInactive;
3276
3347
 
3277
3348
  const xHeaders = {};
3278
3349
 
@@ -3293,7 +3364,7 @@ class Order {
3293
3364
 
3294
3365
  const {
3295
3366
  error: res_error,
3296
- } = OrderPlatformModel.ShipmentInfoResponse().validate(responseData, {
3367
+ } = OrderPlatformModel.ShipmentInfoResponseSchema().validate(responseData, {
3297
3368
  abortEarly: false,
3298
3369
  allowUnknown: true,
3299
3370
  });
@@ -3316,10 +3387,11 @@ class Order {
3316
3387
  * @param {OrderPlatformValidator.GetShipmentHistoryParam} arg - Arg object
3317
3388
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3318
3389
  * @param {import("../PlatformAPIClient").Options} - Options
3319
- * @returns {Promise<OrderPlatformModel.ShipmentHistoryResponse>} - Success response
3390
+ * @returns {Promise<OrderPlatformModel.ShipmentHistoryResponseSchema>} -
3391
+ * Success response
3320
3392
  * @name getShipmentHistory
3321
- * @summary: Get shipment history.
3322
- * @description: Retrieve the shipment history. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentHistory/).
3393
+ * @summary: Get a shipment's history
3394
+ * @description: Get the history of the shipment - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentHistory/).
3323
3395
  */
3324
3396
  async getShipmentHistory(
3325
3397
  { shipmentId, bagId, requestHeaders } = { requestHeaders: {} },
@@ -3376,10 +3448,10 @@ class Order {
3376
3448
 
3377
3449
  const {
3378
3450
  error: res_error,
3379
- } = OrderPlatformModel.ShipmentHistoryResponse().validate(responseData, {
3380
- abortEarly: false,
3381
- allowUnknown: true,
3382
- });
3451
+ } = OrderPlatformModel.ShipmentHistoryResponseSchema().validate(
3452
+ responseData,
3453
+ { abortEarly: false, allowUnknown: true }
3454
+ );
3383
3455
 
3384
3456
  if (res_error) {
3385
3457
  if (this.config.options.strictResponseCheck === true) {
@@ -3399,11 +3471,12 @@ class Order {
3399
3471
  * @param {OrderPlatformValidator.GetShipmentReasonsParam} arg - Arg object
3400
3472
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3401
3473
  * @param {import("../PlatformAPIClient").Options} - Options
3402
- * @returns {Promise<OrderPlatformModel.PlatformShipmentReasonsResponse>} -
3403
- * Success response
3474
+ * @returns {Promise<OrderPlatformModel.PlatformShipmentReasonsResponseSchema>}
3475
+ * - Success response
3476
+ *
3404
3477
  * @name getShipmentReasons
3405
- * @summary: Get reasons behind full or partial cancellation of a shipment
3406
- * @description: Use this API to retrieve the issues that led to the cancellation of bags within a shipment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentReasons/).
3478
+ * @summary: List bag cancellation reasons
3479
+ * @description: Get reasons to perform full or partial cancellation of a bag - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentReasons/).
3407
3480
  */
3408
3481
  async getShipmentReasons(
3409
3482
  { shipmentId, bagId, state, requestHeaders } = { requestHeaders: {} },
@@ -3460,7 +3533,7 @@ class Order {
3460
3533
 
3461
3534
  const {
3462
3535
  error: res_error,
3463
- } = OrderPlatformModel.PlatformShipmentReasonsResponse().validate(
3536
+ } = OrderPlatformModel.PlatformShipmentReasonsResponseSchema().validate(
3464
3537
  responseData,
3465
3538
  { abortEarly: false, allowUnknown: true }
3466
3539
  );
@@ -3483,17 +3556,18 @@ class Order {
3483
3556
  * @param {OrderPlatformValidator.GetShipmentsParam} arg - Arg object
3484
3557
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3485
3558
  * @param {import("../PlatformAPIClient").Options} - Options
3486
- * @returns {Promise<OrderPlatformModel.ShipmentInternalPlatformViewResponse>}
3559
+ * @returns {Promise<OrderPlatformModel.ShipmentInternalPlatformViewResponseSchema>}
3487
3560
  * - Success response
3488
3561
  *
3489
3562
  * @name getShipments
3490
- * @summary: Get shipments.
3491
- * @description: Get Shipments Listing for the company id - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipments/).
3563
+ * @summary: List shipments
3564
+ * @description: Get a list of shipments based on the filters provided - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipments/).
3492
3565
  */
3493
3566
  async getShipments(
3494
3567
  {
3495
3568
  lane,
3496
3569
  bagStatus,
3570
+ statusAssigned,
3497
3571
  statusOverrideLane,
3498
3572
  timeToDispatch,
3499
3573
  searchType,
@@ -3502,6 +3576,8 @@ class Order {
3502
3576
  toDate,
3503
3577
  startDate,
3504
3578
  endDate,
3579
+ statusAssignedStartDate,
3580
+ statusAssignedEndDate,
3505
3581
  dpIds,
3506
3582
  stores,
3507
3583
  salesChannels,
@@ -3523,13 +3599,9 @@ class Order {
3523
3599
  tags,
3524
3600
  customerId,
3525
3601
  orderType,
3526
- operationalStatus,
3527
- financialStatus,
3528
- logisticsStatus,
3529
- parentViewSlug,
3530
- childViewSlug,
3531
- lockStatus,
3532
3602
  groupEntity,
3603
+ enforceDateFilter,
3604
+ fulfillmentType,
3533
3605
  requestHeaders,
3534
3606
  } = { requestHeaders: {} },
3535
3607
  { responseHeaders } = { responseHeaders: false }
@@ -3538,6 +3610,7 @@ class Order {
3538
3610
  {
3539
3611
  lane,
3540
3612
  bagStatus,
3613
+ statusAssigned,
3541
3614
  statusOverrideLane,
3542
3615
  timeToDispatch,
3543
3616
  searchType,
@@ -3546,6 +3619,8 @@ class Order {
3546
3619
  toDate,
3547
3620
  startDate,
3548
3621
  endDate,
3622
+ statusAssignedStartDate,
3623
+ statusAssignedEndDate,
3549
3624
  dpIds,
3550
3625
  stores,
3551
3626
  salesChannels,
@@ -3567,13 +3642,9 @@ class Order {
3567
3642
  tags,
3568
3643
  customerId,
3569
3644
  orderType,
3570
- operationalStatus,
3571
- financialStatus,
3572
- logisticsStatus,
3573
- parentViewSlug,
3574
- childViewSlug,
3575
- lockStatus,
3576
3645
  groupEntity,
3646
+ enforceDateFilter,
3647
+ fulfillmentType,
3577
3648
  },
3578
3649
  { abortEarly: false, allowUnknown: true }
3579
3650
  );
@@ -3586,6 +3657,7 @@ class Order {
3586
3657
  {
3587
3658
  lane,
3588
3659
  bagStatus,
3660
+ statusAssigned,
3589
3661
  statusOverrideLane,
3590
3662
  timeToDispatch,
3591
3663
  searchType,
@@ -3594,6 +3666,8 @@ class Order {
3594
3666
  toDate,
3595
3667
  startDate,
3596
3668
  endDate,
3669
+ statusAssignedStartDate,
3670
+ statusAssignedEndDate,
3597
3671
  dpIds,
3598
3672
  stores,
3599
3673
  salesChannels,
@@ -3615,13 +3689,9 @@ class Order {
3615
3689
  tags,
3616
3690
  customerId,
3617
3691
  orderType,
3618
- operationalStatus,
3619
- financialStatus,
3620
- logisticsStatus,
3621
- parentViewSlug,
3622
- childViewSlug,
3623
- lockStatus,
3624
3692
  groupEntity,
3693
+ enforceDateFilter,
3694
+ fulfillmentType,
3625
3695
  },
3626
3696
  { abortEarly: false, allowUnknown: false }
3627
3697
  );
@@ -3635,6 +3705,7 @@ class Order {
3635
3705
  const query_params = {};
3636
3706
  query_params["lane"] = lane;
3637
3707
  query_params["bag_status"] = bagStatus;
3708
+ query_params["status_assigned"] = statusAssigned;
3638
3709
  query_params["status_override_lane"] = statusOverrideLane;
3639
3710
  query_params["time_to_dispatch"] = timeToDispatch;
3640
3711
  query_params["search_type"] = searchType;
@@ -3643,6 +3714,8 @@ class Order {
3643
3714
  query_params["to_date"] = toDate;
3644
3715
  query_params["start_date"] = startDate;
3645
3716
  query_params["end_date"] = endDate;
3717
+ query_params["status_assigned_start_date"] = statusAssignedStartDate;
3718
+ query_params["status_assigned_end_date"] = statusAssignedEndDate;
3646
3719
  query_params["dp_ids"] = dpIds;
3647
3720
  query_params["stores"] = stores;
3648
3721
  query_params["sales_channels"] = salesChannels;
@@ -3664,13 +3737,9 @@ class Order {
3664
3737
  query_params["tags"] = tags;
3665
3738
  query_params["customer_id"] = customerId;
3666
3739
  query_params["order_type"] = orderType;
3667
- query_params["operational_status"] = operationalStatus;
3668
- query_params["financial_status"] = financialStatus;
3669
- query_params["logistics_status"] = logisticsStatus;
3670
- query_params["parent_view_slug"] = parentViewSlug;
3671
- query_params["child_view_slug"] = childViewSlug;
3672
- query_params["lock_status"] = lockStatus;
3673
3740
  query_params["group_entity"] = groupEntity;
3741
+ query_params["enforce_date_filter"] = enforceDateFilter;
3742
+ query_params["fulfillment_type"] = fulfillmentType;
3674
3743
 
3675
3744
  const xHeaders = {};
3676
3745
 
@@ -3691,7 +3760,7 @@ class Order {
3691
3760
 
3692
3761
  const {
3693
3762
  error: res_error,
3694
- } = OrderPlatformModel.ShipmentInternalPlatformViewResponse().validate(
3763
+ } = OrderPlatformModel.ShipmentInternalPlatformViewResponseSchema().validate(
3695
3764
  responseData,
3696
3765
  { abortEarly: false, allowUnknown: true }
3697
3766
  );
@@ -3713,64 +3782,90 @@ class Order {
3713
3782
  /**
3714
3783
  * @param {Object} arg - Arg object.
3715
3784
  * @param {string} [arg.lane] - Name of lane for which data is to be fetched
3716
- * @param {string} [arg.bagStatus] - Comma separated values of bag statuses
3785
+ * @param {string} [arg.bagStatus] - Comma separated values of bag statuses.
3786
+ * @param {string} [arg.statusAssigned] - Used to filter shipments based on
3787
+ * status present in shipment_status_history. For more information on
3788
+ * these statuses, refer to the Fynd Partners documentation.
3717
3789
  * @param {boolean} [arg.statusOverrideLane] - Use this flag to fetch by
3718
- * bag_status and override lane
3719
- * @param {number} [arg.timeToDispatch] -
3720
- * @param {string} [arg.searchType] - Search type key
3721
- * @param {string} [arg.searchValue] - Search type value
3790
+ * bag_status and override lane.
3791
+ * @param {number} [arg.timeToDispatch] - Indicates the time to dispatch.
3792
+ * @param {string} [arg.searchType] - Specifies the key used to determine
3793
+ * the type of search being performed.
3794
+ * @param {string} [arg.searchValue] - The value corresponding to the search
3795
+ * type, such as a specific shipment ID or order ID.
3722
3796
  * @param {string} [arg.fromDate] - Start Date in DD-MM-YYYY format
3723
3797
  * @param {string} [arg.toDate] - End Date in DD-MM-YYYY format
3724
- * @param {string} [arg.startDate] - UTC Start Date in ISO format
3725
- * @param {string} [arg.endDate] - UTC End Date in ISO format
3726
- * @param {string} [arg.dpIds] - Comma separated values of delivery partner ids
3727
- * @param {string} [arg.stores] - Comma separated values of store ids
3728
- * @param {string} [arg.salesChannels] - Comma separated values of sales channel ids
3729
- * @param {number} [arg.pageSize] - Page size of data received per page
3730
- * @param {boolean} [arg.fetchActiveShipment] - Flag to fetch active shipments
3731
- * @param {boolean} [arg.allowInactive] - Flag to allow inactive shipments
3732
- * @param {boolean} [arg.excludeLockedShipments] - Flag to fetch locked shipments
3733
- * @param {string} [arg.paymentMethods] - Comma separated values of payment methods
3734
- * @param {string} [arg.channelShipmentId] - App Shipment Id
3735
- * @param {string} [arg.channelOrderId] - App Order Id
3736
- * @param {string} [arg.customMeta] -
3737
- * @param {string} [arg.orderingChannel] -
3738
- * @param {string} [arg.companyAffiliateTag] -
3739
- * @param {boolean} [arg.myOrders] -
3740
- * @param {string} [arg.platformUserId] -
3741
- * @param {string} [arg.sortType] - Sort the result data on basis of input
3742
- * @param {boolean} [arg.showCrossCompanyData] - Flag to view cross &
3743
- * non-cross company order
3744
- * @param {string} [arg.tags] - Comma separated values of tags
3745
- * @param {string} [arg.customerId] -
3746
- * @param {string} [arg.orderType] -
3747
- * @param {string} [arg.operationalStatus] - Statuses relating to shipment
3748
- * transition in order processing journey. Comma separated values of
3749
- * operational statuses.
3750
- * @param {string} [arg.financialStatus] - Statuses relating to finance
3751
- * related operations in the order processing journey. Comma separated
3752
- * values of financial statuses.
3753
- * @param {string} [arg.logisticsStatus] - Statuses relating to delivery and
3754
- * pickup related operations in the order processing journey. Comma
3755
- * separated values of logistics statuses.
3756
- * @param {string} [arg.parentViewSlug] - Parent view is used for grouping
3757
- * of child views. Slug of parent view.
3758
- * @param {string} [arg.childViewSlug] - Child view is user configured view
3759
- * which has filters added by the user on which shipments/orders are
3760
- * fetched. Slug of child view.
3761
- * @param {string} [arg.lockStatus] - Flag to identify if a shipment is locked or not.
3798
+ * @param {string} [arg.startDate] - The UTC start date in ISO format
3799
+ * (YYYY-MM-DDTHH:MM:SSZ) for filtering results.
3800
+ * @param {string} [arg.endDate] - The UTC end date in ISO format
3801
+ * (YYYY-MM-DDTHH:MM:SSZ) for filtering results.
3802
+ * @param {string} [arg.statusAssignedStartDate] - Specifies the starting
3803
+ * UTC date and time (in ISO format, YYYY-MM-DDTHH:MM:SSZ) to define the
3804
+ * lower boundary for filtering shipments based on the `created_at`
3805
+ * timestamp of statuses in the shipment's status history. It allows
3806
+ * filtering statuses that were created within a specific time range.
3807
+ * @param {string} [arg.statusAssignedEndDate] - Specifies the ending UTC
3808
+ * date and time (in ISO format, YYYY-MM-DDTHH:MM:SSZ) to define the upper
3809
+ * boundary for filtering shipments based on the `created_at` timestamp of
3810
+ * statuses in the shipment's status history.
3811
+ * @param {string} [arg.dpIds] - A comma-separated list of delivery partner
3812
+ * IDs to filter results by specific delivery partners.
3813
+ * @param {string} [arg.stores] - A comma-separated list of store IDs used
3814
+ * to filter results to only those related to specific stores.
3815
+ * @param {string} [arg.salesChannels] - A comma-separated list of sales
3816
+ * channel IDs to filter results based on the sales channels involved.
3817
+ * @param {number} [arg.pageSize] - Determines the number of results
3818
+ * returned per page.
3819
+ * @param {boolean} [arg.fetchActiveShipment] - A boolean flag that
3820
+ * indicates whether to include only active shipments in the results.
3821
+ * @param {boolean} [arg.allowInactive] - A flag indicating whether to allow
3822
+ * the inclusion of inactive shipments in the results.
3823
+ * @param {boolean} [arg.excludeLockedShipments] - A flag to specify whether
3824
+ * to exclude shipments that are locked from the results.
3825
+ * @param {string} [arg.paymentMethods] - A comma-separated list of payment methods.
3826
+ * @param {string} [arg.channelShipmentId] - The shipment ID used in the
3827
+ * application, which can be used to reference specific shipments.
3828
+ * @param {string} [arg.channelOrderId] - The order ID used in the application.
3829
+ * @param {string} [arg.customMeta] - Custom metadata associated with the
3830
+ * query, allowing for additional filtering or information to be passed.
3831
+ * @param {string} [arg.orderingChannel] - The channel through which the
3832
+ * order was placed.
3833
+ * @param {string} [arg.companyAffiliateTag] - A tag used to identify the
3834
+ * company's affiliation for filtering or reporting purposes.
3835
+ * @param {boolean} [arg.myOrders] - A boolean flag indicating whether the
3836
+ * query should return only the user's orders.
3837
+ * @param {string} [arg.platformUserId] - The unique identifier of the user
3838
+ * on the platform, useful for filtering orders related to a specific user.
3839
+ * @param {string} [arg.sortType] - Determines the sorting order of the
3840
+ * results based on specific criteria.
3841
+ * @param {boolean} [arg.showCrossCompanyData] - A flag indicating whether
3842
+ * to include data from both cross-company and non-cross-company orders in
3843
+ * the results.
3844
+ * @param {string} [arg.tags] - A comma-separated list of tags associated
3845
+ * with the orders to filter results based on specific characteristics.
3846
+ * @param {string} [arg.customerId] - The unique identifier for the customer
3847
+ * associated with the query, useful for filtering results to a specific customer.
3848
+ * @param {string} [arg.orderType] - The type of order being queried.
3762
3849
  * @param {string} [arg.groupEntity] - Defines the grouping criterion for
3763
3850
  * retrieving shipments or orders. It specifies whether the results should
3764
3851
  * be organized based on shipment groups or order groups. For example,
3765
3852
  * using 'shipments' groups results by shipment, while an invalid value
3766
3853
  * like 'abcd' may not be recognized, leading to errors or default behavior.
3767
- * @returns {Paginator<OrderPlatformModel.ShipmentInternalPlatformViewResponse>}
3768
- * @summary: Get shipments.
3769
- * @description: Get Shipments Listing for the company id
3854
+ * @param {boolean} [arg.enforceDateFilter] - Applies a date filter for
3855
+ * listing shipments. This is useful when fetching data for a specific
3856
+ * date range while performing searches.
3857
+ * @param {string} [arg.fulfillmentType] - Define the Fulfillment Type for
3858
+ * Listing Orders, This is use when we want to get list of shipments or
3859
+ * orders by cross store or cross company or fulfilling Store (by
3860
+ * default), this is also depends on the login user accessType and store access
3861
+ * @returns {Paginator<OrderPlatformModel.ShipmentInternalPlatformViewResponseSchema>}
3862
+ * @summary: List shipments
3863
+ * @description: Get a list of shipments based on the filters provided
3770
3864
  */
3771
3865
  getShipmentsPaginator({
3772
3866
  lane,
3773
3867
  bagStatus,
3868
+ statusAssigned,
3774
3869
  statusOverrideLane,
3775
3870
  timeToDispatch,
3776
3871
  searchType,
@@ -3779,6 +3874,8 @@ class Order {
3779
3874
  toDate,
3780
3875
  startDate,
3781
3876
  endDate,
3877
+ statusAssignedStartDate,
3878
+ statusAssignedEndDate,
3782
3879
  dpIds,
3783
3880
  stores,
3784
3881
  salesChannels,
@@ -3799,13 +3896,9 @@ class Order {
3799
3896
  tags,
3800
3897
  customerId,
3801
3898
  orderType,
3802
- operationalStatus,
3803
- financialStatus,
3804
- logisticsStatus,
3805
- parentViewSlug,
3806
- childViewSlug,
3807
- lockStatus,
3808
3899
  groupEntity,
3900
+ enforceDateFilter,
3901
+ fulfillmentType,
3809
3902
  } = {}) {
3810
3903
  const paginator = new Paginator();
3811
3904
  const callback = async () => {
@@ -3815,6 +3908,7 @@ class Order {
3815
3908
  const data = await this.getShipments({
3816
3909
  lane: lane,
3817
3910
  bagStatus: bagStatus,
3911
+ statusAssigned: statusAssigned,
3818
3912
  statusOverrideLane: statusOverrideLane,
3819
3913
  timeToDispatch: timeToDispatch,
3820
3914
  searchType: searchType,
@@ -3823,6 +3917,8 @@ class Order {
3823
3917
  toDate: toDate,
3824
3918
  startDate: startDate,
3825
3919
  endDate: endDate,
3920
+ statusAssignedStartDate: statusAssignedStartDate,
3921
+ statusAssignedEndDate: statusAssignedEndDate,
3826
3922
  dpIds: dpIds,
3827
3923
  stores: stores,
3828
3924
  salesChannels: salesChannels,
@@ -3844,13 +3940,9 @@ class Order {
3844
3940
  tags: tags,
3845
3941
  customerId: customerId,
3846
3942
  orderType: orderType,
3847
- operationalStatus: operationalStatus,
3848
- financialStatus: financialStatus,
3849
- logisticsStatus: logisticsStatus,
3850
- parentViewSlug: parentViewSlug,
3851
- childViewSlug: childViewSlug,
3852
- lockStatus: lockStatus,
3853
3943
  groupEntity: groupEntity,
3944
+ enforceDateFilter: enforceDateFilter,
3945
+ fulfillmentType: fulfillmentType,
3854
3946
  });
3855
3947
  paginator.setPaginator({
3856
3948
  hasNext: data.page.has_next ? true : false,
@@ -3863,96 +3955,28 @@ class Order {
3863
3955
  }
3864
3956
 
3865
3957
  /**
3866
- * @param {OrderPlatformValidator.GetStateTransitionMapParam} arg - Arg object
3867
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3868
- * @param {import("../PlatformAPIClient").Options} - Options
3869
- * @returns {Promise<OrderPlatformModel.BagStateTransitionMap>} - Success response
3870
- * @name getStateTransitionMap
3871
- * @summary: Get state transition map.
3872
- * @description: Retrieve a map of state transitions for orders - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getStateTransitionMap/).
3873
- */
3874
- async getStateTransitionMap(
3875
- { requestHeaders } = { requestHeaders: {} },
3876
- { responseHeaders } = { responseHeaders: false }
3877
- ) {
3878
- const { error } = OrderPlatformValidator.getStateTransitionMap().validate(
3879
- {},
3880
- { abortEarly: false, allowUnknown: true }
3881
- );
3882
- if (error) {
3883
- return Promise.reject(new FDKClientValidationError(error));
3884
- }
3885
-
3886
- // Showing warrnings if extra unknown parameters are found
3887
- const {
3888
- error: warrning,
3889
- } = OrderPlatformValidator.getStateTransitionMap().validate(
3890
- {},
3891
- { abortEarly: false, allowUnknown: false }
3892
- );
3893
- if (warrning) {
3894
- Logger({
3895
- level: "WARN",
3896
- message: `Parameter Validation warrnings for platform > Order > getStateTransitionMap \n ${warrning}`,
3897
- });
3898
- }
3899
-
3900
- const query_params = {};
3901
-
3902
- const xHeaders = {};
3903
-
3904
- const response = await PlatformAPIClient.execute(
3905
- this.config,
3906
- "get",
3907
- `/service/platform/order-manage/v1.0/company/${this.config.companyId}/bag/state/transition`,
3908
- query_params,
3909
- undefined,
3910
- { ...xHeaders, ...requestHeaders },
3911
- { responseHeaders }
3912
- );
3913
-
3914
- let responseData = response;
3915
- if (responseHeaders) {
3916
- responseData = response[0];
3917
- }
3918
-
3919
- const {
3920
- error: res_error,
3921
- } = OrderPlatformModel.BagStateTransitionMap().validate(responseData, {
3922
- abortEarly: false,
3923
- allowUnknown: true,
3924
- });
3925
-
3926
- if (res_error) {
3927
- if (this.config.options.strictResponseCheck === true) {
3928
- return Promise.reject(new FDKResponseValidationError(res_error));
3929
- } else {
3930
- Logger({
3931
- level: "WARN",
3932
- message: `Response Validation Warnings for platform > Order > getStateTransitionMap \n ${res_error}`,
3933
- });
3934
- }
3935
- }
3936
-
3937
- return response;
3938
- }
3939
-
3940
- /**
3941
- * @param {OrderPlatformValidator.GetTemplateParam} arg - Arg object
3958
+ * @param {OrderPlatformValidator.GetStateManagerConfigParam} arg - Arg object
3942
3959
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3943
3960
  * @param {import("../PlatformAPIClient").Options} - Options
3944
- * @returns {Promise<OrderPlatformModel.TemplateDownloadResponse>} - Success response
3945
- * @name getTemplate
3946
- * @summary: Get the Excel or CSV file URL for the Template.
3947
- * @description: Get the Excel or CSV file URL for the Template. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getTemplate/).
3961
+ * @returns {Promise<Object>} - Success response
3962
+ * @name getStateManagerConfig
3963
+ * @summary: Retrieves Entity State Manager configuration which includes flags, hooks, and filters, for a specific application within a company's setup.
3964
+ * @description: This endpoint retrieves the ESM (Entity State Manager) configuration for a specific application within a company. The retrieval is based on parameters such as application ID, ordering channel, and entity type.
3965
+ * The ESM config stores order processing configuration. Each document in the ESM config collection of Order Management System - OMS's database is a JSON object representing the configuration of a specific application ID. This includes filters, hooks, flags set on different state-transitions. This configuration is picked and accordingly features are enabled.
3966
+ * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getStateManagerConfig/).
3948
3967
  */
3949
- async getTemplate(
3950
- { templateName, requestHeaders } = { requestHeaders: {} },
3968
+ async getStateManagerConfig(
3969
+ { appId, orderingChannel, orderingSource, entity, requestHeaders } = {
3970
+ requestHeaders: {},
3971
+ },
3951
3972
  { responseHeaders } = { responseHeaders: false }
3952
3973
  ) {
3953
- const { error } = OrderPlatformValidator.getTemplate().validate(
3974
+ const { error } = OrderPlatformValidator.getStateManagerConfig().validate(
3954
3975
  {
3955
- templateName,
3976
+ appId,
3977
+ orderingChannel,
3978
+ orderingSource,
3979
+ entity,
3956
3980
  },
3957
3981
  { abortEarly: false, allowUnknown: true }
3958
3982
  );
@@ -3961,105 +3985,36 @@ class Order {
3961
3985
  }
3962
3986
 
3963
3987
  // Showing warrnings if extra unknown parameters are found
3964
- const { error: warrning } = OrderPlatformValidator.getTemplate().validate(
3965
- {
3966
- templateName,
3967
- },
3968
- { abortEarly: false, allowUnknown: false }
3969
- );
3970
- if (warrning) {
3971
- Logger({
3972
- level: "WARN",
3973
- message: `Parameter Validation warrnings for platform > Order > getTemplate \n ${warrning}`,
3974
- });
3975
- }
3976
-
3977
- const query_params = {};
3978
-
3979
- const xHeaders = {};
3980
-
3981
- const response = await PlatformAPIClient.execute(
3982
- this.config,
3983
- "get",
3984
- `/service/platform/order/v1.0/company/${this.config.companyId}/jobs/templates/${templateName}`,
3985
- query_params,
3986
- undefined,
3987
- { ...xHeaders, ...requestHeaders },
3988
- { responseHeaders }
3989
- );
3990
-
3991
- let responseData = response;
3992
- if (responseHeaders) {
3993
- responseData = response[0];
3994
- }
3995
-
3996
3988
  const {
3997
- error: res_error,
3998
- } = OrderPlatformModel.TemplateDownloadResponse().validate(responseData, {
3999
- abortEarly: false,
4000
- allowUnknown: true,
4001
- });
4002
-
4003
- if (res_error) {
4004
- if (this.config.options.strictResponseCheck === true) {
4005
- return Promise.reject(new FDKResponseValidationError(res_error));
4006
- } else {
4007
- Logger({
4008
- level: "WARN",
4009
- message: `Response Validation Warnings for platform > Order > getTemplate \n ${res_error}`,
4010
- });
4011
- }
4012
- }
4013
-
4014
- return response;
4015
- }
4016
-
4017
- /**
4018
- * @param {OrderPlatformValidator.GetUserViewsParam} arg - Arg object
4019
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4020
- * @param {import("../PlatformAPIClient").Options} - Options
4021
- * @returns {Promise<OrderPlatformModel.UserViewsResponse>} - Success response
4022
- * @name getUserViews
4023
- * @summary: Get custom view for every unique user cross company pair.
4024
- * @description: Get custom view for every unique user cross company pair. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getUserViews/).
4025
- */
4026
- async getUserViews(
4027
- { showIn, requestHeaders } = { requestHeaders: {} },
4028
- { responseHeaders } = { responseHeaders: false }
4029
- ) {
4030
- const { error } = OrderPlatformValidator.getUserViews().validate(
4031
- {
4032
- showIn,
4033
- },
4034
- { abortEarly: false, allowUnknown: true }
4035
- );
4036
- if (error) {
4037
- return Promise.reject(new FDKClientValidationError(error));
4038
- }
4039
-
4040
- // Showing warrnings if extra unknown parameters are found
4041
- const { error: warrning } = OrderPlatformValidator.getUserViews().validate(
3989
+ error: warrning,
3990
+ } = OrderPlatformValidator.getStateManagerConfig().validate(
4042
3991
  {
4043
- showIn,
3992
+ appId,
3993
+ orderingChannel,
3994
+ orderingSource,
3995
+ entity,
4044
3996
  },
4045
3997
  { abortEarly: false, allowUnknown: false }
4046
3998
  );
4047
3999
  if (warrning) {
4048
4000
  Logger({
4049
4001
  level: "WARN",
4050
- message: `Parameter Validation warrnings for platform > Order > getUserViews \n ${warrning}`,
4002
+ message: `Parameter Validation warrnings for platform > Order > getStateManagerConfig \n ${warrning}`,
4051
4003
  });
4052
4004
  }
4053
4005
 
4054
4006
  const query_params = {};
4055
- query_params["show_in"] = showIn;
4007
+ query_params["app_id"] = appId;
4008
+ query_params["ordering_channel"] = orderingChannel;
4009
+ query_params["ordering_source"] = orderingSource;
4010
+ query_params["entity"] = entity;
4056
4011
 
4057
4012
  const xHeaders = {};
4058
4013
 
4059
4014
  const response = await PlatformAPIClient.execute(
4060
4015
  this.config,
4061
4016
  "get",
4062
- `/service/platform/order/v1.0/company/${this.config.companyId}/views`,
4017
+ `/service/platform/order-manage/v1.0/company/${this.config.companyId}/state/manager/config`,
4063
4018
  query_params,
4064
4019
  undefined,
4065
4020
  { ...xHeaders, ...requestHeaders },
@@ -4071,9 +4026,7 @@ class Order {
4071
4026
  responseData = response[0];
4072
4027
  }
4073
4028
 
4074
- const {
4075
- error: res_error,
4076
- } = OrderPlatformModel.UserViewsResponse().validate(responseData, {
4029
+ const { error: res_error } = Joi.any().validate(responseData, {
4077
4030
  abortEarly: false,
4078
4031
  allowUnknown: true,
4079
4032
  });
@@ -4084,7 +4037,7 @@ class Order {
4084
4037
  } else {
4085
4038
  Logger({
4086
4039
  level: "WARN",
4087
- message: `Response Validation Warnings for platform > Order > getUserViews \n ${res_error}`,
4040
+ message: `Response Validation Warnings for platform > Order > getStateManagerConfig \n ${res_error}`,
4088
4041
  });
4089
4042
  }
4090
4043
  }
@@ -4093,23 +4046,20 @@ class Order {
4093
4046
  }
4094
4047
 
4095
4048
  /**
4096
- * @param {OrderPlatformValidator.GetfiltersParam} arg - Arg object
4049
+ * @param {OrderPlatformValidator.GetStateTransitionMapParam} arg - Arg object
4097
4050
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4098
4051
  * @param {import("../PlatformAPIClient").Options} - Options
4099
- * @returns {Promise<OrderPlatformModel.FiltersResponse>} - Success response
4100
- * @name getfilters
4101
- * @summary: Get filters.
4102
- * @description: Get supported filters for various listing operations - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getfilters/).
4052
+ * @returns {Promise<OrderPlatformModel.BagStateTransitionMap>} - Success response
4053
+ * @name getStateTransitionMap
4054
+ * @summary: Get state transition map
4055
+ * @description: Retrieve a map of state transitions for orders - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getStateTransitionMap/).
4103
4056
  */
4104
- async getfilters(
4105
- { view, groupEntity, requestHeaders } = { requestHeaders: {} },
4057
+ async getStateTransitionMap(
4058
+ { requestHeaders } = { requestHeaders: {} },
4106
4059
  { responseHeaders } = { responseHeaders: false }
4107
4060
  ) {
4108
- const { error } = OrderPlatformValidator.getfilters().validate(
4109
- {
4110
- view,
4111
- groupEntity,
4112
- },
4061
+ const { error } = OrderPlatformValidator.getStateTransitionMap().validate(
4062
+ {},
4113
4063
  { abortEarly: false, allowUnknown: true }
4114
4064
  );
4115
4065
  if (error) {
@@ -4117,30 +4067,27 @@ class Order {
4117
4067
  }
4118
4068
 
4119
4069
  // Showing warrnings if extra unknown parameters are found
4120
- const { error: warrning } = OrderPlatformValidator.getfilters().validate(
4121
- {
4122
- view,
4123
- groupEntity,
4124
- },
4070
+ const {
4071
+ error: warrning,
4072
+ } = OrderPlatformValidator.getStateTransitionMap().validate(
4073
+ {},
4125
4074
  { abortEarly: false, allowUnknown: false }
4126
4075
  );
4127
4076
  if (warrning) {
4128
4077
  Logger({
4129
4078
  level: "WARN",
4130
- message: `Parameter Validation warrnings for platform > Order > getfilters \n ${warrning}`,
4079
+ message: `Parameter Validation warrnings for platform > Order > getStateTransitionMap \n ${warrning}`,
4131
4080
  });
4132
4081
  }
4133
4082
 
4134
4083
  const query_params = {};
4135
- query_params["view"] = view;
4136
- query_params["group_entity"] = groupEntity;
4137
4084
 
4138
4085
  const xHeaders = {};
4139
4086
 
4140
4087
  const response = await PlatformAPIClient.execute(
4141
4088
  this.config,
4142
4089
  "get",
4143
- `/service/platform/order/v1.0/company/${this.config.companyId}/filter-listing`,
4090
+ `/service/platform/order-manage/v1.0/company/${this.config.companyId}/bag/state/transition`,
4144
4091
  query_params,
4145
4092
  undefined,
4146
4093
  { ...xHeaders, ...requestHeaders },
@@ -4154,7 +4101,7 @@ class Order {
4154
4101
 
4155
4102
  const {
4156
4103
  error: res_error,
4157
- } = OrderPlatformModel.FiltersResponse().validate(responseData, {
4104
+ } = OrderPlatformModel.BagStateTransitionMap().validate(responseData, {
4158
4105
  abortEarly: false,
4159
4106
  allowUnknown: true,
4160
4107
  });
@@ -4165,7 +4112,7 @@ class Order {
4165
4112
  } else {
4166
4113
  Logger({
4167
4114
  level: "WARN",
4168
- message: `Response Validation Warnings for platform > Order > getfilters \n ${res_error}`,
4115
+ message: `Response Validation Warnings for platform > Order > getStateTransitionMap \n ${res_error}`,
4169
4116
  });
4170
4117
  }
4171
4118
  }
@@ -4174,22 +4121,22 @@ class Order {
4174
4121
  }
4175
4122
 
4176
4123
  /**
4177
- * @param {OrderPlatformValidator.InvalidateShipmentCacheParam} arg - Arg object
4124
+ * @param {OrderPlatformValidator.GetTemplateParam} arg - Arg object
4178
4125
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4179
4126
  * @param {import("../PlatformAPIClient").Options} - Options
4180
- * @returns {Promise<OrderPlatformModel.InvalidateShipmentCacheResponse>} -
4127
+ * @returns {Promise<OrderPlatformModel.TemplateDownloadResponseSchema>} -
4181
4128
  * Success response
4182
- * @name invalidateShipmentCache
4183
- * @summary: Invalidate shipment cache
4184
- * @description: Clear the existing shipment cache data stored in Redis and serialize the updated data for subsequent use. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/invalidateShipmentCache/).
4129
+ * @name getTemplate
4130
+ * @summary: Download bulk operation templates
4131
+ * @description: Get the excel or CSV file URL for the template. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getTemplate/).
4185
4132
  */
4186
- async invalidateShipmentCache(
4187
- { body, requestHeaders } = { requestHeaders: {} },
4133
+ async getTemplate(
4134
+ { templateName, requestHeaders } = { requestHeaders: {} },
4188
4135
  { responseHeaders } = { responseHeaders: false }
4189
4136
  ) {
4190
- const { error } = OrderPlatformValidator.invalidateShipmentCache().validate(
4137
+ const { error } = OrderPlatformValidator.getTemplate().validate(
4191
4138
  {
4192
- body,
4139
+ templateName,
4193
4140
  },
4194
4141
  { abortEarly: false, allowUnknown: true }
4195
4142
  );
@@ -4198,18 +4145,16 @@ class Order {
4198
4145
  }
4199
4146
 
4200
4147
  // Showing warrnings if extra unknown parameters are found
4201
- const {
4202
- error: warrning,
4203
- } = OrderPlatformValidator.invalidateShipmentCache().validate(
4148
+ const { error: warrning } = OrderPlatformValidator.getTemplate().validate(
4204
4149
  {
4205
- body,
4150
+ templateName,
4206
4151
  },
4207
4152
  { abortEarly: false, allowUnknown: false }
4208
4153
  );
4209
4154
  if (warrning) {
4210
4155
  Logger({
4211
4156
  level: "WARN",
4212
- message: `Parameter Validation warrnings for platform > Order > invalidateShipmentCache \n ${warrning}`,
4157
+ message: `Parameter Validation warrnings for platform > Order > getTemplate \n ${warrning}`,
4213
4158
  });
4214
4159
  }
4215
4160
 
@@ -4219,10 +4164,10 @@ class Order {
4219
4164
 
4220
4165
  const response = await PlatformAPIClient.execute(
4221
4166
  this.config,
4222
- "put",
4223
- `/service/platform/order-manage/v1.0/company/${this.config.companyId}/update-cache`,
4167
+ "get",
4168
+ `/service/platform/order/v1.0/company/${this.config.companyId}/jobs/templates/${templateName}`,
4224
4169
  query_params,
4225
- body,
4170
+ undefined,
4226
4171
  { ...xHeaders, ...requestHeaders },
4227
4172
  { responseHeaders }
4228
4173
  );
@@ -4234,7 +4179,7 @@ class Order {
4234
4179
 
4235
4180
  const {
4236
4181
  error: res_error,
4237
- } = OrderPlatformModel.InvalidateShipmentCacheResponse().validate(
4182
+ } = OrderPlatformModel.TemplateDownloadResponseSchema().validate(
4238
4183
  responseData,
4239
4184
  { abortEarly: false, allowUnknown: true }
4240
4185
  );
@@ -4245,7 +4190,7 @@ class Order {
4245
4190
  } else {
4246
4191
  Logger({
4247
4192
  level: "WARN",
4248
- message: `Response Validation Warnings for platform > Order > invalidateShipmentCache \n ${res_error}`,
4193
+ message: `Response Validation Warnings for platform > Order > getTemplate \n ${res_error}`,
4249
4194
  });
4250
4195
  }
4251
4196
  }
@@ -4254,21 +4199,22 @@ class Order {
4254
4199
  }
4255
4200
 
4256
4201
  /**
4257
- * @param {OrderPlatformValidator.JobDetailsParam} arg - Arg object
4202
+ * @param {OrderPlatformValidator.GetfiltersParam} arg - Arg object
4258
4203
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4259
4204
  * @param {import("../PlatformAPIClient").Options} - Options
4260
- * @returns {Promise<OrderPlatformModel.JobDetailsResponse>} - Success response
4261
- * @name jobDetails
4262
- * @summary: Fetches details for the job of the provided batch_id
4263
- * @description: Fetches details for the job of the provided batch_id - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/jobDetails/).
4205
+ * @returns {Promise<OrderPlatformModel.FiltersResponseSchema>} - Success response
4206
+ * @name getfilters
4207
+ * @summary: List filters
4208
+ * @description: Get supported filters for various listing operations - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getfilters/).
4264
4209
  */
4265
- async jobDetails(
4266
- { batchId, requestHeaders } = { requestHeaders: {} },
4210
+ async getfilters(
4211
+ { view, groupEntity, requestHeaders } = { requestHeaders: {} },
4267
4212
  { responseHeaders } = { responseHeaders: false }
4268
4213
  ) {
4269
- const { error } = OrderPlatformValidator.jobDetails().validate(
4214
+ const { error } = OrderPlatformValidator.getfilters().validate(
4270
4215
  {
4271
- batchId,
4216
+ view,
4217
+ groupEntity,
4272
4218
  },
4273
4219
  { abortEarly: false, allowUnknown: true }
4274
4220
  );
@@ -4277,27 +4223,30 @@ class Order {
4277
4223
  }
4278
4224
 
4279
4225
  // Showing warrnings if extra unknown parameters are found
4280
- const { error: warrning } = OrderPlatformValidator.jobDetails().validate(
4226
+ const { error: warrning } = OrderPlatformValidator.getfilters().validate(
4281
4227
  {
4282
- batchId,
4228
+ view,
4229
+ groupEntity,
4283
4230
  },
4284
4231
  { abortEarly: false, allowUnknown: false }
4285
4232
  );
4286
4233
  if (warrning) {
4287
4234
  Logger({
4288
4235
  level: "WARN",
4289
- message: `Parameter Validation warrnings for platform > Order > jobDetails \n ${warrning}`,
4236
+ message: `Parameter Validation warrnings for platform > Order > getfilters \n ${warrning}`,
4290
4237
  });
4291
4238
  }
4292
4239
 
4293
4240
  const query_params = {};
4241
+ query_params["view"] = view;
4242
+ query_params["group_entity"] = groupEntity;
4294
4243
 
4295
4244
  const xHeaders = {};
4296
4245
 
4297
4246
  const response = await PlatformAPIClient.execute(
4298
4247
  this.config,
4299
4248
  "get",
4300
- `/service/platform/order-manage/v1.0/company/${this.config.companyId}/jobs/${batchId}`,
4249
+ `/service/platform/order/v1.0/company/${this.config.companyId}/filter-listing`,
4301
4250
  query_params,
4302
4251
  undefined,
4303
4252
  { ...xHeaders, ...requestHeaders },
@@ -4311,7 +4260,7 @@ class Order {
4311
4260
 
4312
4261
  const {
4313
4262
  error: res_error,
4314
- } = OrderPlatformModel.JobDetailsResponse().validate(responseData, {
4263
+ } = OrderPlatformModel.FiltersResponseSchema().validate(responseData, {
4315
4264
  abortEarly: false,
4316
4265
  allowUnknown: true,
4317
4266
  });
@@ -4322,7 +4271,7 @@ class Order {
4322
4271
  } else {
4323
4272
  Logger({
4324
4273
  level: "WARN",
4325
- message: `Response Validation Warnings for platform > Order > jobDetails \n ${res_error}`,
4274
+ message: `Response Validation Warnings for platform > Order > getfilters \n ${res_error}`,
4326
4275
  });
4327
4276
  }
4328
4277
  }
@@ -4331,19 +4280,21 @@ class Order {
4331
4280
  }
4332
4281
 
4333
4282
  /**
4334
- * @param {OrderPlatformValidator.OrderUpdateParam} arg - Arg object
4283
+ * @param {OrderPlatformValidator.InvalidateShipmentCacheParam} arg - Arg object
4335
4284
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4336
4285
  * @param {import("../PlatformAPIClient").Options} - Options
4337
- * @returns {Promise<OrderPlatformModel.ResponseDetail>} - Success response
4338
- * @name orderUpdate
4339
- * @summary: Update an order
4340
- * @description: Used to update an order's meta information. These meta information can be accessed via order or shipment details API. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/orderUpdate/).
4286
+ * @returns {Promise<OrderPlatformModel.InvalidateShipmentCacheResponseSchema>}
4287
+ * - Success response
4288
+ *
4289
+ * @name invalidateShipmentCache
4290
+ * @summary: Invalidate shipment cache
4291
+ * @description: Clear the existing shipment cache data stored in Redis and serialize the updated data for subsequent use. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/invalidateShipmentCache/).
4341
4292
  */
4342
- async orderUpdate(
4293
+ async invalidateShipmentCache(
4343
4294
  { body, requestHeaders } = { requestHeaders: {} },
4344
4295
  { responseHeaders } = { responseHeaders: false }
4345
4296
  ) {
4346
- const { error } = OrderPlatformValidator.orderUpdate().validate(
4297
+ const { error } = OrderPlatformValidator.invalidateShipmentCache().validate(
4347
4298
  {
4348
4299
  body,
4349
4300
  },
@@ -4354,7 +4305,9 @@ class Order {
4354
4305
  }
4355
4306
 
4356
4307
  // Showing warrnings if extra unknown parameters are found
4357
- const { error: warrning } = OrderPlatformValidator.orderUpdate().validate(
4308
+ const {
4309
+ error: warrning,
4310
+ } = OrderPlatformValidator.invalidateShipmentCache().validate(
4358
4311
  {
4359
4312
  body,
4360
4313
  },
@@ -4363,7 +4316,7 @@ class Order {
4363
4316
  if (warrning) {
4364
4317
  Logger({
4365
4318
  level: "WARN",
4366
- message: `Parameter Validation warrnings for platform > Order > orderUpdate \n ${warrning}`,
4319
+ message: `Parameter Validation warrnings for platform > Order > invalidateShipmentCache \n ${warrning}`,
4367
4320
  });
4368
4321
  }
4369
4322
 
@@ -4374,7 +4327,7 @@ class Order {
4374
4327
  const response = await PlatformAPIClient.execute(
4375
4328
  this.config,
4376
4329
  "put",
4377
- `/service/platform/order-manage/v1.0/company/${this.config.companyId}/order/validation`,
4330
+ `/service/platform/order-manage/v1.0/company/${this.config.companyId}/update-cache`,
4378
4331
  query_params,
4379
4332
  body,
4380
4333
  { ...xHeaders, ...requestHeaders },
@@ -4388,10 +4341,10 @@ class Order {
4388
4341
 
4389
4342
  const {
4390
4343
  error: res_error,
4391
- } = OrderPlatformModel.ResponseDetail().validate(responseData, {
4392
- abortEarly: false,
4393
- allowUnknown: true,
4394
- });
4344
+ } = OrderPlatformModel.InvalidateShipmentCacheResponseSchema().validate(
4345
+ responseData,
4346
+ { abortEarly: false, allowUnknown: true }
4347
+ );
4395
4348
 
4396
4349
  if (res_error) {
4397
4350
  if (this.config.options.strictResponseCheck === true) {
@@ -4399,7 +4352,7 @@ class Order {
4399
4352
  } else {
4400
4353
  Logger({
4401
4354
  level: "WARN",
4402
- message: `Response Validation Warnings for platform > Order > orderUpdate \n ${res_error}`,
4355
+ message: `Response Validation Warnings for platform > Order > invalidateShipmentCache \n ${res_error}`,
4403
4356
  });
4404
4357
  }
4405
4358
  }
@@ -4408,24 +4361,21 @@ class Order {
4408
4361
  }
4409
4362
 
4410
4363
  /**
4411
- * @param {OrderPlatformValidator.PostRefundConfigurationParam} arg - Arg object
4364
+ * @param {OrderPlatformValidator.JobDetailsParam} arg - Arg object
4412
4365
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4413
4366
  * @param {import("../PlatformAPIClient").Options} - Options
4414
- * @returns {Promise<OrderPlatformModel.RefundStateConfigurationManualSchemaResponse>}
4415
- * - Success response
4416
- *
4417
- * @name postRefundConfiguration
4418
- * @summary: refund configuration.
4419
- * @description: refund configuration. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/postRefundConfiguration/).
4367
+ * @returns {Promise<OrderPlatformModel.JobDetailsResponseSchema>} - Success response
4368
+ * @name jobDetails
4369
+ * @summary: Get bulk operation details
4370
+ * @description: Fetches details of the job for the provided batch Id - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/jobDetails/).
4420
4371
  */
4421
- async postRefundConfiguration(
4422
- { appId, body, requestHeaders } = { requestHeaders: {} },
4372
+ async jobDetails(
4373
+ { batchId, requestHeaders } = { requestHeaders: {} },
4423
4374
  { responseHeaders } = { responseHeaders: false }
4424
4375
  ) {
4425
- const { error } = OrderPlatformValidator.postRefundConfiguration().validate(
4376
+ const { error } = OrderPlatformValidator.jobDetails().validate(
4426
4377
  {
4427
- appId,
4428
- body,
4378
+ batchId,
4429
4379
  },
4430
4380
  { abortEarly: false, allowUnknown: true }
4431
4381
  );
@@ -4434,33 +4384,29 @@ class Order {
4434
4384
  }
4435
4385
 
4436
4386
  // Showing warrnings if extra unknown parameters are found
4437
- const {
4438
- error: warrning,
4439
- } = OrderPlatformValidator.postRefundConfiguration().validate(
4387
+ const { error: warrning } = OrderPlatformValidator.jobDetails().validate(
4440
4388
  {
4441
- appId,
4442
- body,
4389
+ batchId,
4443
4390
  },
4444
4391
  { abortEarly: false, allowUnknown: false }
4445
4392
  );
4446
4393
  if (warrning) {
4447
4394
  Logger({
4448
4395
  level: "WARN",
4449
- message: `Parameter Validation warrnings for platform > Order > postRefundConfiguration \n ${warrning}`,
4396
+ message: `Parameter Validation warrnings for platform > Order > jobDetails \n ${warrning}`,
4450
4397
  });
4451
4398
  }
4452
4399
 
4453
4400
  const query_params = {};
4454
- query_params["app_id"] = appId;
4455
4401
 
4456
4402
  const xHeaders = {};
4457
4403
 
4458
4404
  const response = await PlatformAPIClient.execute(
4459
4405
  this.config,
4460
- "post",
4461
- `/service/platform/order-manage/v1.0/company/${this.config.companyId}/refund/config`,
4406
+ "get",
4407
+ `/service/platform/order-manage/v1.0/company/${this.config.companyId}/jobs/${batchId}`,
4462
4408
  query_params,
4463
- body,
4409
+ undefined,
4464
4410
  { ...xHeaders, ...requestHeaders },
4465
4411
  { responseHeaders }
4466
4412
  );
@@ -4472,10 +4418,10 @@ class Order {
4472
4418
 
4473
4419
  const {
4474
4420
  error: res_error,
4475
- } = OrderPlatformModel.RefundStateConfigurationManualSchemaResponse().validate(
4476
- responseData,
4477
- { abortEarly: false, allowUnknown: true }
4478
- );
4421
+ } = OrderPlatformModel.JobDetailsResponseSchema().validate(responseData, {
4422
+ abortEarly: false,
4423
+ allowUnknown: true,
4424
+ });
4479
4425
 
4480
4426
  if (res_error) {
4481
4427
  if (this.config.options.strictResponseCheck === true) {
@@ -4483,7 +4429,7 @@ class Order {
4483
4429
  } else {
4484
4430
  Logger({
4485
4431
  level: "WARN",
4486
- message: `Response Validation Warnings for platform > Order > postRefundConfiguration \n ${res_error}`,
4432
+ message: `Response Validation Warnings for platform > Order > jobDetails \n ${res_error}`,
4487
4433
  });
4488
4434
  }
4489
4435
  }
@@ -4492,25 +4438,20 @@ class Order {
4492
4438
  }
4493
4439
 
4494
4440
  /**
4495
- * @param {OrderPlatformValidator.PostRefundStateConfigurationParam} arg - Arg object
4441
+ * @param {OrderPlatformValidator.OrderUpdateParam} arg - Arg object
4496
4442
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4497
4443
  * @param {import("../PlatformAPIClient").Options} - Options
4498
- * @returns {Promise<OrderPlatformModel.PostRefundStateConfigurationResponse>}
4499
- * - Success response
4500
- *
4501
- * @name postRefundStateConfiguration
4502
- * @summary: Refund State Configuration
4503
- * @description: Refund State Configuration - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/postRefundStateConfiguration/).
4444
+ * @returns {Promise<OrderPlatformModel.ResponseDetail>} - Success response
4445
+ * @name orderUpdate
4446
+ * @summary: Update an order
4447
+ * @description: Used to update an order's meta information. These meta information can be accessed via order or shipment details API. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/orderUpdate/).
4504
4448
  */
4505
- async postRefundStateConfiguration(
4506
- { appId, body, requestHeaders } = { requestHeaders: {} },
4449
+ async orderUpdate(
4450
+ { body, requestHeaders } = { requestHeaders: {} },
4507
4451
  { responseHeaders } = { responseHeaders: false }
4508
4452
  ) {
4509
- const {
4510
- error,
4511
- } = OrderPlatformValidator.postRefundStateConfiguration().validate(
4453
+ const { error } = OrderPlatformValidator.orderUpdate().validate(
4512
4454
  {
4513
- appId,
4514
4455
  body,
4515
4456
  },
4516
4457
  { abortEarly: false, allowUnknown: true }
@@ -4520,11 +4461,8 @@ class Order {
4520
4461
  }
4521
4462
 
4522
4463
  // Showing warrnings if extra unknown parameters are found
4523
- const {
4524
- error: warrning,
4525
- } = OrderPlatformValidator.postRefundStateConfiguration().validate(
4464
+ const { error: warrning } = OrderPlatformValidator.orderUpdate().validate(
4526
4465
  {
4527
- appId,
4528
4466
  body,
4529
4467
  },
4530
4468
  { abortEarly: false, allowUnknown: false }
@@ -4532,19 +4470,18 @@ class Order {
4532
4470
  if (warrning) {
4533
4471
  Logger({
4534
4472
  level: "WARN",
4535
- message: `Parameter Validation warrnings for platform > Order > postRefundStateConfiguration \n ${warrning}`,
4473
+ message: `Parameter Validation warrnings for platform > Order > orderUpdate \n ${warrning}`,
4536
4474
  });
4537
4475
  }
4538
4476
 
4539
4477
  const query_params = {};
4540
- query_params["app_id"] = appId;
4541
4478
 
4542
4479
  const xHeaders = {};
4543
4480
 
4544
4481
  const response = await PlatformAPIClient.execute(
4545
4482
  this.config,
4546
- "post",
4547
- `/service/platform/order-manage/v1.0/company/${this.config.companyId}/refund/states/config`,
4483
+ "put",
4484
+ `/service/platform/order-manage/v1.0/company/${this.config.companyId}/order/validation`,
4548
4485
  query_params,
4549
4486
  body,
4550
4487
  { ...xHeaders, ...requestHeaders },
@@ -4558,10 +4495,10 @@ class Order {
4558
4495
 
4559
4496
  const {
4560
4497
  error: res_error,
4561
- } = OrderPlatformModel.PostRefundStateConfigurationResponse().validate(
4562
- responseData,
4563
- { abortEarly: false, allowUnknown: true }
4564
- );
4498
+ } = OrderPlatformModel.ResponseDetail().validate(responseData, {
4499
+ abortEarly: false,
4500
+ allowUnknown: true,
4501
+ });
4565
4502
 
4566
4503
  if (res_error) {
4567
4504
  if (this.config.options.strictResponseCheck === true) {
@@ -4569,7 +4506,7 @@ class Order {
4569
4506
  } else {
4570
4507
  Logger({
4571
4508
  level: "WARN",
4572
- message: `Response Validation Warnings for platform > Order > postRefundStateConfiguration \n ${res_error}`,
4509
+ message: `Response Validation Warnings for platform > Order > orderUpdate \n ${res_error}`,
4573
4510
  });
4574
4511
  }
4575
4512
  }
@@ -4581,10 +4518,11 @@ class Order {
4581
4518
  * @param {OrderPlatformValidator.PostShipmentHistoryParam} arg - Arg object
4582
4519
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4583
4520
  * @param {import("../PlatformAPIClient").Options} - Options
4584
- * @returns {Promise<OrderPlatformModel.ShipmentHistoryResponse>} - Success response
4521
+ * @returns {Promise<OrderPlatformModel.ShipmentHistoryResponseSchema>} -
4522
+ * Success response
4585
4523
  * @name postShipmentHistory
4586
- * @summary: Post shipment history.
4587
- * @description: Add history records for a shipment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/postShipmentHistory/).
4524
+ * @summary: Create shipment history
4525
+ * @description: Used to add logs in history for a bag for the provided Shipment ID - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/postShipmentHistory/).
4588
4526
  */
4589
4527
  async postShipmentHistory(
4590
4528
  { body, requestHeaders } = { requestHeaders: {} },
@@ -4637,10 +4575,10 @@ class Order {
4637
4575
 
4638
4576
  const {
4639
4577
  error: res_error,
4640
- } = OrderPlatformModel.ShipmentHistoryResponse().validate(responseData, {
4641
- abortEarly: false,
4642
- allowUnknown: true,
4643
- });
4578
+ } = OrderPlatformModel.ShipmentHistoryResponseSchema().validate(
4579
+ responseData,
4580
+ { abortEarly: false, allowUnknown: true }
4581
+ );
4644
4582
 
4645
4583
  if (res_error) {
4646
4584
  if (this.config.options.strictResponseCheck === true) {
@@ -4660,10 +4598,11 @@ class Order {
4660
4598
  * @param {OrderPlatformValidator.ReassignLocationParam} arg - Arg object
4661
4599
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4662
4600
  * @param {import("../PlatformAPIClient").Options} - Options
4663
- * @returns {Promise<OrderPlatformModel.StoreReassignResponse>} - Success response
4601
+ * @returns {Promise<OrderPlatformModel.StoreReassignResponseSchema>} -
4602
+ * Success response
4664
4603
  * @name reassignLocation
4665
- * @summary: Reassign location.
4666
- * @description: Change the assigned location for an order or shipment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/reassignLocation/).
4604
+ * @summary: Reassign location
4605
+ * @description: Reassign the shipment to a another location and update its status to 'Store Reassigned.' - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/reassignLocation/).
4667
4606
  */
4668
4607
  async reassignLocation(
4669
4608
  { body, requestHeaders } = { requestHeaders: {} },
@@ -4716,10 +4655,10 @@ class Order {
4716
4655
 
4717
4656
  const {
4718
4657
  error: res_error,
4719
- } = OrderPlatformModel.StoreReassignResponse().validate(responseData, {
4720
- abortEarly: false,
4721
- allowUnknown: true,
4722
- });
4658
+ } = OrderPlatformModel.StoreReassignResponseSchema().validate(
4659
+ responseData,
4660
+ { abortEarly: false, allowUnknown: true }
4661
+ );
4723
4662
 
4724
4663
  if (res_error) {
4725
4664
  if (this.config.options.strictResponseCheck === true) {
@@ -4739,9 +4678,9 @@ class Order {
4739
4678
  * @param {OrderPlatformValidator.SendSmsNinjaParam} arg - Arg object
4740
4679
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4741
4680
  * @param {import("../PlatformAPIClient").Options} - Options
4742
- * @returns {Promise<OrderPlatformModel.SendSmsResponse>} - Success response
4681
+ * @returns {Promise<OrderPlatformModel.BaseResponseSchema>} - Success response
4743
4682
  * @name sendSmsNinja
4744
- * @summary: Send SMS via Ninja.
4683
+ * @summary: Send SMS
4745
4684
  * @description: Send SMS to customer based on the template that is selected - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/sendSmsNinja/).
4746
4685
  */
4747
4686
  async sendSmsNinja(
@@ -4793,7 +4732,7 @@ class Order {
4793
4732
 
4794
4733
  const {
4795
4734
  error: res_error,
4796
- } = OrderPlatformModel.SendSmsResponse().validate(responseData, {
4735
+ } = OrderPlatformModel.BaseResponseSchema().validate(responseData, {
4797
4736
  abortEarly: false,
4798
4737
  allowUnknown: true,
4799
4738
  });
@@ -4816,10 +4755,11 @@ class Order {
4816
4755
  * @param {OrderPlatformValidator.SendUserMobileOTPParam} arg - Arg object
4817
4756
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4818
4757
  * @param {import("../PlatformAPIClient").Options} - Options
4819
- * @returns {Promise<OrderPlatformModel.SendUserMobileOtpResponse>} - Success response
4758
+ * @returns {Promise<OrderPlatformModel.SendUserMobileOtpResponseSchema>} -
4759
+ * Success response
4820
4760
  * @name sendUserMobileOTP
4821
- * @summary: Send user mobile OTP.
4822
- * @description: Send a one-time OTP to a users mobile device. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/sendUserMobileOTP/).
4761
+ * @summary: Send user mobile OTP
4762
+ * @description: Send a one-time OTP to a customer mobile number - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/sendUserMobileOTP/).
4823
4763
  */
4824
4764
  async sendUserMobileOTP(
4825
4765
  { body, requestHeaders } = { requestHeaders: {} },
@@ -4872,10 +4812,10 @@ class Order {
4872
4812
 
4873
4813
  const {
4874
4814
  error: res_error,
4875
- } = OrderPlatformModel.SendUserMobileOtpResponse().validate(responseData, {
4876
- abortEarly: false,
4877
- allowUnknown: true,
4878
- });
4815
+ } = OrderPlatformModel.SendUserMobileOtpResponseSchema().validate(
4816
+ responseData,
4817
+ { abortEarly: false, allowUnknown: true }
4818
+ );
4879
4819
 
4880
4820
  if (res_error) {
4881
4821
  if (this.config.options.strictResponseCheck === true) {
@@ -4895,11 +4835,12 @@ class Order {
4895
4835
  * @param {OrderPlatformValidator.TrackShipmentParam} arg - Arg object
4896
4836
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4897
4837
  * @param {import("../PlatformAPIClient").Options} - Options
4898
- * @returns {Promise<OrderPlatformModel.CourierPartnerTrackingResponse>} -
4899
- * Success response
4838
+ * @returns {Promise<OrderPlatformModel.CourierPartnerTrackingResponseSchema>}
4839
+ * - Success response
4840
+ *
4900
4841
  * @name trackShipment
4901
- * @summary: Retrieve courier partner tracking details for a given shipment id or awb no.
4902
- * @description: Retrieve courier partner tracking details for a given shipment id or awb no. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/trackShipment/).
4842
+ * @summary: Track shipment
4843
+ * @description: Retrieve courier partner tracking details for a given shipment Id or AWB number - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/trackShipment/).
4903
4844
  */
4904
4845
  async trackShipment(
4905
4846
  { shipmentId, awb, pageNo, pageSize, requestHeaders } = {
@@ -4962,7 +4903,7 @@ class Order {
4962
4903
 
4963
4904
  const {
4964
4905
  error: res_error,
4965
- } = OrderPlatformModel.CourierPartnerTrackingResponse().validate(
4906
+ } = OrderPlatformModel.CourierPartnerTrackingResponseSchema().validate(
4966
4907
  responseData,
4967
4908
  { abortEarly: false, allowUnknown: true }
4968
4909
  );
@@ -4982,21 +4923,21 @@ class Order {
4982
4923
  }
4983
4924
 
4984
4925
  /**
4985
- * @param {OrderPlatformValidator.UpdateOrderParam} arg - Arg object
4926
+ * @param {OrderPlatformValidator.UpdateAddressParam} arg - Arg object
4986
4927
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4987
4928
  * @param {import("../PlatformAPIClient").Options} - Options
4988
- * @returns {Promise<OrderPlatformModel.OrderUpdateResponseDetail>} - Success response
4989
- * @name updateOrder
4990
- * @summary: Enables the updating of various order properties, including tax_details, meta, and more, providing flexibility and precision in order adjustments.
4991
- * @description: Enables the updating of various order properties, including tax_details, meta, and more, providing flexibility and precision in order adjustments. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updateOrder/).
4929
+ * @returns {Promise<OrderPlatformModel.BaseResponseSchema>} - Success response
4930
+ * @name updateAddress
4931
+ * @summary: Update shipment address
4932
+ * @description: Update the address details of an existing shipment based on the provided address_category. This operation allows the modification of critical shipment details, potentially affecting delivery/billing accuracy and customer communication. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updateAddress/).
4992
4933
  */
4993
- async updateOrder(
4994
- { orderId, body, requestHeaders } = { requestHeaders: {} },
4934
+ async updateAddress(
4935
+ { shipmentId, body, requestHeaders } = { requestHeaders: {} },
4995
4936
  { responseHeaders } = { responseHeaders: false }
4996
4937
  ) {
4997
- const { error } = OrderPlatformValidator.updateOrder().validate(
4938
+ const { error } = OrderPlatformValidator.updateAddress().validate(
4998
4939
  {
4999
- orderId,
4940
+ shipmentId,
5000
4941
  body,
5001
4942
  },
5002
4943
  { abortEarly: false, allowUnknown: true }
@@ -5006,9 +4947,9 @@ class Order {
5006
4947
  }
5007
4948
 
5008
4949
  // Showing warrnings if extra unknown parameters are found
5009
- const { error: warrning } = OrderPlatformValidator.updateOrder().validate(
4950
+ const { error: warrning } = OrderPlatformValidator.updateAddress().validate(
5010
4951
  {
5011
- orderId,
4952
+ shipmentId,
5012
4953
  body,
5013
4954
  },
5014
4955
  { abortEarly: false, allowUnknown: false }
@@ -5016,7 +4957,7 @@ class Order {
5016
4957
  if (warrning) {
5017
4958
  Logger({
5018
4959
  level: "WARN",
5019
- message: `Parameter Validation warrnings for platform > Order > updateOrder \n ${warrning}`,
4960
+ message: `Parameter Validation warrnings for platform > Order > updateAddress \n ${warrning}`,
5020
4961
  });
5021
4962
  }
5022
4963
 
@@ -5027,7 +4968,7 @@ class Order {
5027
4968
  const response = await PlatformAPIClient.execute(
5028
4969
  this.config,
5029
4970
  "put",
5030
- `/service/platform/order-manage/v1.0/company/${this.config.companyId}/order/${orderId}`,
4971
+ `/service/platform/order-manage/v1.0/company/${this.config.companyId}/shipment/${shipmentId}/address`,
5031
4972
  query_params,
5032
4973
  body,
5033
4974
  { ...xHeaders, ...requestHeaders },
@@ -5041,7 +4982,7 @@ class Order {
5041
4982
 
5042
4983
  const {
5043
4984
  error: res_error,
5044
- } = OrderPlatformModel.OrderUpdateResponseDetail().validate(responseData, {
4985
+ } = OrderPlatformModel.BaseResponseSchema().validate(responseData, {
5045
4986
  abortEarly: false,
5046
4987
  allowUnknown: true,
5047
4988
  });
@@ -5052,7 +4993,7 @@ class Order {
5052
4993
  } else {
5053
4994
  Logger({
5054
4995
  level: "WARN",
5055
- message: `Response Validation Warnings for platform > Order > updateOrder \n ${res_error}`,
4996
+ message: `Response Validation Warnings for platform > Order > updateAddress \n ${res_error}`,
5056
4997
  });
5057
4998
  }
5058
4999
  }
@@ -5064,12 +5005,12 @@ class Order {
5064
5005
  * @param {OrderPlatformValidator.UpdatePackagingDimensionsParam} arg - Arg object
5065
5006
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
5066
5007
  * @param {import("../PlatformAPIClient").Options} - Options
5067
- * @returns {Promise<OrderPlatformModel.UpdatePackagingDimensionsResponse>}
5008
+ * @returns {Promise<OrderPlatformModel.UpdatePackagingDimensionsResponseSchema>}
5068
5009
  * - Success response
5069
5010
  *
5070
5011
  * @name updatePackagingDimensions
5071
- * @summary: Update packaging dimensions.
5072
- * @description: Modify the dimensions of packaging. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updatePackagingDimensions/).
5012
+ * @summary: Update packaging dimensions
5013
+ * @description: Used to modify the packaging dimension of a shipment - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updatePackagingDimensions/).
5073
5014
  */
5074
5015
  async updatePackagingDimensions(
5075
5016
  { body, requestHeaders } = { requestHeaders: {} },
@@ -5124,7 +5065,7 @@ class Order {
5124
5065
 
5125
5066
  const {
5126
5067
  error: res_error,
5127
- } = OrderPlatformModel.UpdatePackagingDimensionsResponse().validate(
5068
+ } = OrderPlatformModel.UpdatePackagingDimensionsResponseSchema().validate(
5128
5069
  responseData,
5129
5070
  { abortEarly: false, allowUnknown: true }
5130
5071
  );
@@ -5144,21 +5085,19 @@ class Order {
5144
5085
  }
5145
5086
 
5146
5087
  /**
5147
- * @param {OrderPlatformValidator.UpdateShipmentParam} arg - Arg object
5088
+ * @param {OrderPlatformValidator.UpdatePaymentInfoParam} arg - Arg object
5148
5089
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
5149
5090
  * @param {import("../PlatformAPIClient").Options} - Options
5150
- * @returns {Promise<OrderPlatformModel.UpdateShipmentStatusResponseBody>}
5151
- * - Success response
5152
- *
5153
- * @name updateShipment
5154
- * @summary: Update shipment status.
5155
- * @description: Shipment action transition or Shipment data update or both. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updateShipment/).
5091
+ * @returns {Promise<Object>} - Success response
5092
+ * @name updatePaymentInfo
5093
+ * @summary: Update payment details for an order, its shipments and its bags.
5094
+ * @description: Updates the payment mode for an order, its shipments and its bags. This endpoint allows for modifying payment methods, and associated details but not amount. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updatePaymentInfo/).
5156
5095
  */
5157
- async updateShipment(
5096
+ async updatePaymentInfo(
5158
5097
  { body, requestHeaders } = { requestHeaders: {} },
5159
5098
  { responseHeaders } = { responseHeaders: false }
5160
5099
  ) {
5161
- const { error } = OrderPlatformValidator.updateShipment().validate(
5100
+ const { error } = OrderPlatformValidator.updatePaymentInfo().validate(
5162
5101
  {
5163
5102
  body,
5164
5103
  },
@@ -5171,7 +5110,7 @@ class Order {
5171
5110
  // Showing warrnings if extra unknown parameters are found
5172
5111
  const {
5173
5112
  error: warrning,
5174
- } = OrderPlatformValidator.updateShipment().validate(
5113
+ } = OrderPlatformValidator.updatePaymentInfo().validate(
5175
5114
  {
5176
5115
  body,
5177
5116
  },
@@ -5180,7 +5119,7 @@ class Order {
5180
5119
  if (warrning) {
5181
5120
  Logger({
5182
5121
  level: "WARN",
5183
- message: `Parameter Validation warrnings for platform > Order > updateShipment \n ${warrning}`,
5122
+ message: `Parameter Validation warrnings for platform > Order > updatePaymentInfo \n ${warrning}`,
5184
5123
  });
5185
5124
  }
5186
5125
 
@@ -5191,7 +5130,7 @@ class Order {
5191
5130
  const response = await PlatformAPIClient.execute(
5192
5131
  this.config,
5193
5132
  "put",
5194
- `/service/platform/order-manage/v1.0/company/${this.config.companyId}/shipment/update`,
5133
+ `/service/platform/order-manage/v1.0/company/${this.config.companyId}/payment/update`,
5195
5134
  query_params,
5196
5135
  body,
5197
5136
  { ...xHeaders, ...requestHeaders },
@@ -5203,12 +5142,10 @@ class Order {
5203
5142
  responseData = response[0];
5204
5143
  }
5205
5144
 
5206
- const {
5207
- error: res_error,
5208
- } = OrderPlatformModel.UpdateShipmentStatusResponseBody().validate(
5209
- responseData,
5210
- { abortEarly: false, allowUnknown: true }
5211
- );
5145
+ const { error: res_error } = Joi.any().validate(responseData, {
5146
+ abortEarly: false,
5147
+ allowUnknown: true,
5148
+ });
5212
5149
 
5213
5150
  if (res_error) {
5214
5151
  if (this.config.options.strictResponseCheck === true) {
@@ -5216,7 +5153,7 @@ class Order {
5216
5153
  } else {
5217
5154
  Logger({
5218
5155
  level: "WARN",
5219
- message: `Response Validation Warnings for platform > Order > updateShipment \n ${res_error}`,
5156
+ message: `Response Validation Warnings for platform > Order > updatePaymentInfo \n ${res_error}`,
5220
5157
  });
5221
5158
  }
5222
5159
  }
@@ -5228,11 +5165,12 @@ class Order {
5228
5165
  * @param {OrderPlatformValidator.UpdateShipmentLockParam} arg - Arg object
5229
5166
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
5230
5167
  * @param {import("../PlatformAPIClient").Options} - Options
5231
- * @returns {Promise<OrderPlatformModel.UpdateShipmentLockResponse>} -
5232
- * Success response
5168
+ * @returns {Promise<OrderPlatformModel.UpdateShipmentLockResponseSchema>}
5169
+ * - Success response
5170
+ *
5233
5171
  * @name updateShipmentLock
5234
- * @summary: Update shipment lock.
5235
- * @description: Modify shipment/bag lock and check status. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updateShipmentLock/).
5172
+ * @summary: Update a shipment lock
5173
+ * @description: Modify shipment/bag lock status and update lock/unlock messages. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updateShipmentLock/).
5236
5174
  */
5237
5175
  async updateShipmentLock(
5238
5176
  { body, requestHeaders } = { requestHeaders: {} },
@@ -5285,10 +5223,10 @@ class Order {
5285
5223
 
5286
5224
  const {
5287
5225
  error: res_error,
5288
- } = OrderPlatformModel.UpdateShipmentLockResponse().validate(responseData, {
5289
- abortEarly: false,
5290
- allowUnknown: true,
5291
- });
5226
+ } = OrderPlatformModel.UpdateShipmentLockResponseSchema().validate(
5227
+ responseData,
5228
+ { abortEarly: false, allowUnknown: true }
5229
+ );
5292
5230
 
5293
5231
  if (res_error) {
5294
5232
  if (this.config.options.strictResponseCheck === true) {
@@ -5312,8 +5250,8 @@ class Order {
5312
5250
  * - Success response
5313
5251
  *
5314
5252
  * @name updateShipmentStatus
5315
- * @summary: Update shipment status.
5316
- * @description: Shipment state transition or Shipment data update or both. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updateShipmentStatus/).
5253
+ * @summary: Update a shipment's status
5254
+ * @description: Used for updating a shipment and its status. Can also be used for updating bags present in that shipment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updateShipmentStatus/).
5317
5255
  */
5318
5256
  async updateShipmentStatus(
5319
5257
  { body, requestHeaders } = { requestHeaders: {} },
@@ -5392,8 +5330,8 @@ class Order {
5392
5330
  * @returns {Promise<OrderPlatformModel.CourierPartnerTrackingDetails>} -
5393
5331
  * Success response
5394
5332
  * @name updateShipmentTracking
5395
- * @summary: Update shipment tracking.
5396
- * @description: Modify courier partner tracking details for a given shipment id or awb no. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updateShipmentTracking/).
5333
+ * @summary: Update shipment tracking
5334
+ * @description: Modify courier partner tracking details for a given shipment Id or AWB number - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updateShipmentTracking/).
5397
5335
  */
5398
5336
  async updateShipmentTracking(
5399
5337
  { body, requestHeaders } = { requestHeaders: {} },
@@ -5466,100 +5404,19 @@ class Order {
5466
5404
  }
5467
5405
 
5468
5406
  /**
5469
- * @param {OrderPlatformValidator.UpdateUserViewPositionParam} arg - Arg object
5470
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
5471
- * @param {import("../PlatformAPIClient").Options} - Options
5472
- * @returns {Promise<OrderPlatformModel.CreateUpdateDeleteResponse>} -
5473
- * Success response
5474
- * @name updateUserViewPosition
5475
- * @summary: Update User view(Parent view and child view) position
5476
- * @description: Update User view(Parent view and child view) position - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updateUserViewPosition/).
5477
- */
5478
- async updateUserViewPosition(
5479
- { body, requestHeaders } = { requestHeaders: {} },
5480
- { responseHeaders } = { responseHeaders: false }
5481
- ) {
5482
- const { error } = OrderPlatformValidator.updateUserViewPosition().validate(
5483
- {
5484
- body,
5485
- },
5486
- { abortEarly: false, allowUnknown: true }
5487
- );
5488
- if (error) {
5489
- return Promise.reject(new FDKClientValidationError(error));
5490
- }
5491
-
5492
- // Showing warrnings if extra unknown parameters are found
5493
- const {
5494
- error: warrning,
5495
- } = OrderPlatformValidator.updateUserViewPosition().validate(
5496
- {
5497
- body,
5498
- },
5499
- { abortEarly: false, allowUnknown: false }
5500
- );
5501
- if (warrning) {
5502
- Logger({
5503
- level: "WARN",
5504
- message: `Parameter Validation warrnings for platform > Order > updateUserViewPosition \n ${warrning}`,
5505
- });
5506
- }
5507
-
5508
- const query_params = {};
5509
-
5510
- const xHeaders = {};
5511
-
5512
- const response = await PlatformAPIClient.execute(
5513
- this.config,
5514
- "put",
5515
- `/service/platform/order/v1.0/company/${this.config.companyId}/view/position`,
5516
- query_params,
5517
- body,
5518
- { ...xHeaders, ...requestHeaders },
5519
- { responseHeaders }
5520
- );
5521
-
5522
- let responseData = response;
5523
- if (responseHeaders) {
5524
- responseData = response[0];
5525
- }
5526
-
5527
- const {
5528
- error: res_error,
5529
- } = OrderPlatformModel.CreateUpdateDeleteResponse().validate(responseData, {
5530
- abortEarly: false,
5531
- allowUnknown: true,
5532
- });
5533
-
5534
- if (res_error) {
5535
- if (this.config.options.strictResponseCheck === true) {
5536
- return Promise.reject(new FDKResponseValidationError(res_error));
5537
- } else {
5538
- Logger({
5539
- level: "WARN",
5540
- message: `Response Validation Warnings for platform > Order > updateUserViewPosition \n ${res_error}`,
5541
- });
5542
- }
5543
- }
5544
-
5545
- return response;
5546
- }
5547
-
5548
- /**
5549
- * @param {OrderPlatformValidator.UpdateUserViewsParam} arg - Arg object
5407
+ * @param {OrderPlatformValidator.UploadConsentsParam} arg - Arg object
5550
5408
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
5551
5409
  * @param {import("../PlatformAPIClient").Options} - Options
5552
- * @returns {Promise<OrderPlatformModel.CreateUpdateDeleteResponse>} -
5553
- * Success response
5554
- * @name updateUserViews
5555
- * @summary: Update custom view for every unique user cross company pair.
5556
- * @description: Update custom view for every unique user cross company pair. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updateUserViews/).
5410
+ * @returns {Promise<OrderPlatformModel.SuccessResponseSchema>} - Success response
5411
+ * @name uploadConsents
5412
+ * @summary: Upload consent
5413
+ * @description: Uploads the consent signed by courier partner and seller to keep records - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/uploadConsents/).
5557
5414
  */
5558
- async updateUserViews(
5415
+ async uploadConsents(
5559
5416
  { body, requestHeaders } = { requestHeaders: {} },
5560
5417
  { responseHeaders } = { responseHeaders: false }
5561
5418
  ) {
5562
- const { error } = OrderPlatformValidator.updateUserViews().validate(
5419
+ const { error } = OrderPlatformValidator.uploadConsents().validate(
5563
5420
  {
5564
5421
  body,
5565
5422
  },
@@ -5572,7 +5429,7 @@ class Order {
5572
5429
  // Showing warrnings if extra unknown parameters are found
5573
5430
  const {
5574
5431
  error: warrning,
5575
- } = OrderPlatformValidator.updateUserViews().validate(
5432
+ } = OrderPlatformValidator.uploadConsents().validate(
5576
5433
  {
5577
5434
  body,
5578
5435
  },
@@ -5581,7 +5438,7 @@ class Order {
5581
5438
  if (warrning) {
5582
5439
  Logger({
5583
5440
  level: "WARN",
5584
- message: `Parameter Validation warrnings for platform > Order > updateUserViews \n ${warrning}`,
5441
+ message: `Parameter Validation warrnings for platform > Order > uploadConsents \n ${warrning}`,
5585
5442
  });
5586
5443
  }
5587
5444
 
@@ -5591,8 +5448,8 @@ class Order {
5591
5448
 
5592
5449
  const response = await PlatformAPIClient.execute(
5593
5450
  this.config,
5594
- "put",
5595
- `/service/platform/order/v1.0/company/${this.config.companyId}/views`,
5451
+ "post",
5452
+ `/service/platform/order-manage/v1.0/company/${this.config.companyId}/manifest/uploadConsent`,
5596
5453
  query_params,
5597
5454
  body,
5598
5455
  { ...xHeaders, ...requestHeaders },
@@ -5606,7 +5463,7 @@ class Order {
5606
5463
 
5607
5464
  const {
5608
5465
  error: res_error,
5609
- } = OrderPlatformModel.CreateUpdateDeleteResponse().validate(responseData, {
5466
+ } = OrderPlatformModel.SuccessResponseSchema().validate(responseData, {
5610
5467
  abortEarly: false,
5611
5468
  allowUnknown: true,
5612
5469
  });
@@ -5617,7 +5474,7 @@ class Order {
5617
5474
  } else {
5618
5475
  Logger({
5619
5476
  level: "WARN",
5620
- message: `Response Validation Warnings for platform > Order > updateUserViews \n ${res_error}`,
5477
+ message: `Response Validation Warnings for platform > Order > uploadConsents \n ${res_error}`,
5621
5478
  });
5622
5479
  }
5623
5480
  }
@@ -5629,10 +5486,10 @@ class Order {
5629
5486
  * @param {OrderPlatformValidator.VerifyMobileOTPParam} arg - Arg object
5630
5487
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
5631
5488
  * @param {import("../PlatformAPIClient").Options} - Options
5632
- * @returns {Promise<OrderPlatformModel.VerifyOtpResponse>} - Success response
5489
+ * @returns {Promise<OrderPlatformModel.VerifyOtpResponseSchema>} - Success response
5633
5490
  * @name verifyMobileOTP
5634
- * @summary: Verify Mobile OTP
5635
- * @description: Verify Mobile OTP - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/verifyMobileOTP/).
5491
+ * @summary: Verify mobile OTP
5492
+ * @description: Perform OTP verification to link a user to an anonymous order - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/verifyMobileOTP/).
5636
5493
  */
5637
5494
  async verifyMobileOTP(
5638
5495
  { body, requestHeaders } = { requestHeaders: {} },
@@ -5685,7 +5542,7 @@ class Order {
5685
5542
 
5686
5543
  const {
5687
5544
  error: res_error,
5688
- } = OrderPlatformModel.VerifyOtpResponse().validate(responseData, {
5545
+ } = OrderPlatformModel.VerifyOtpResponseSchema().validate(responseData, {
5689
5546
  abortEarly: false,
5690
5547
  allowUnknown: true,
5691
5548
  });