@gofynd/fdk-client-javascript 1.4.15-beta.14 → 1.4.15-beta.15

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 (278) hide show
  1. package/README.md +23 -26
  2. package/package.json +5 -1
  3. package/sdk/application/ApplicationClient.d.ts +5 -6
  4. package/sdk/application/ApplicationClient.js +24 -20
  5. package/sdk/application/Cart/CartApplicationClient.d.ts +133 -83
  6. package/sdk/application/Cart/CartApplicationClient.js +444 -76
  7. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +132 -114
  8. package/sdk/application/Catalog/CatalogApplicationClient.js +209 -126
  9. package/sdk/application/Common/CommonApplicationClient.d.ts +4 -4
  10. package/sdk/application/Common/CommonApplicationClient.js +4 -4
  11. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +3 -3
  12. package/sdk/application/Communication/CommunicationApplicationClient.js +3 -3
  13. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +58 -36
  14. package/sdk/application/Configuration/ConfigurationApplicationClient.js +73 -29
  15. package/sdk/application/Content/ContentApplicationClient.d.ts +95 -66
  16. package/sdk/application/Content/ContentApplicationClient.js +274 -111
  17. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +11 -11
  18. package/sdk/application/FileStorage/FileStorageApplicationClient.js +10 -10
  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 +7 -7
  22. package/sdk/application/Lead/LeadApplicationClient.js +6 -6
  23. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +37 -57
  24. package/sdk/application/Logistic/LogisticApplicationClient.js +117 -180
  25. package/sdk/application/Order/OrderApplicationClient.d.ts +63 -21
  26. package/sdk/application/Order/OrderApplicationClient.js +217 -17
  27. package/sdk/application/Payment/PaymentApplicationClient.d.ts +179 -149
  28. package/sdk/application/Payment/PaymentApplicationClient.js +301 -167
  29. package/sdk/application/Share/ShareApplicationClient.d.ts +7 -7
  30. package/sdk/application/Share/ShareApplicationClient.js +7 -7
  31. package/sdk/application/Theme/ThemeApplicationClient.d.ts +7 -7
  32. package/sdk/application/Theme/ThemeApplicationClient.js +10 -6
  33. package/sdk/application/User/UserApplicationClient.d.ts +103 -53
  34. package/sdk/application/User/UserApplicationClient.js +308 -49
  35. package/sdk/common/AxiosHelper.js +11 -4
  36. package/sdk/common/Constant.d.ts +27 -4
  37. package/sdk/common/Constant.js +33 -6
  38. package/sdk/common/utils.d.ts +10 -0
  39. package/sdk/common/utils.js +24 -3
  40. package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +46 -16
  41. package/sdk/partner/FileStorage/FileStoragePartnerClient.js +266 -40
  42. package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +163 -19
  43. package/sdk/partner/FileStorage/FileStoragePartnerModel.js +158 -14
  44. package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +5 -2
  45. package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +23 -7
  46. package/sdk/partner/Lead/LeadPartnerClient.d.ts +9 -9
  47. package/sdk/partner/Lead/LeadPartnerClient.js +9 -9
  48. package/sdk/partner/Lead/LeadPartnerModel.d.ts +14 -9
  49. package/sdk/partner/Lead/LeadPartnerModel.js +19 -17
  50. package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +264 -49
  51. package/sdk/partner/Logistics/LogisticsPartnerClient.js +2116 -252
  52. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +2256 -258
  53. package/sdk/partner/Logistics/LogisticsPartnerModel.js +1187 -230
  54. package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +21 -1
  55. package/sdk/partner/Logistics/LogisticsPartnerValidator.js +218 -13
  56. package/sdk/partner/PartnerClient.d.ts +5 -2
  57. package/sdk/partner/PartnerClient.js +21 -7
  58. package/sdk/partner/Theme/ThemePartnerClient.d.ts +32 -34
  59. package/sdk/partner/Theme/ThemePartnerClient.js +42 -44
  60. package/sdk/partner/Theme/ThemePartnerModel.d.ts +142 -43
  61. package/sdk/partner/Theme/ThemePartnerModel.js +129 -44
  62. package/sdk/partner/Theme/ThemePartnerValidator.js +4 -4
  63. package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +83 -27
  64. package/sdk/partner/Webhook/WebhookPartnerClient.js +446 -27
  65. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +920 -185
  66. package/sdk/partner/Webhook/WebhookPartnerModel.js +462 -154
  67. package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +5 -0
  68. package/sdk/partner/Webhook/WebhookPartnerValidator.js +41 -3
  69. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +8 -7
  70. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +17 -11
  71. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +4 -1
  72. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
  73. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +68 -13
  74. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +44 -6
  75. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +3 -33
  76. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +4 -244
  77. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +49 -145
  78. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +20 -171
  79. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -39
  80. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +0 -35
  81. package/sdk/platform/Billing/BillingPlatformClient.d.ts +15 -15
  82. package/sdk/platform/Billing/BillingPlatformClient.js +18 -18
  83. package/sdk/platform/Billing/BillingPlatformModel.d.ts +443 -388
  84. package/sdk/platform/Billing/BillingPlatformModel.js +280 -263
  85. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +16 -18
  86. package/sdk/platform/Billing/BillingPlatformValidator.js +8 -9
  87. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +266 -203
  88. package/sdk/platform/Cart/CartPlatformApplicationClient.js +1446 -500
  89. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +729 -100
  90. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +446 -82
  91. package/sdk/platform/Cart/CartPlatformModel.d.ts +6927 -1396
  92. package/sdk/platform/Cart/CartPlatformModel.js +3065 -1316
  93. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +433 -248
  94. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1662 -559
  95. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +464 -159
  96. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +304 -87
  97. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +383 -234
  98. package/sdk/platform/Catalog/CatalogPlatformClient.js +2475 -1557
  99. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +9573 -2678
  100. package/sdk/platform/Catalog/CatalogPlatformModel.js +5033 -1973
  101. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +364 -117
  102. package/sdk/platform/Catalog/CatalogPlatformValidator.js +281 -104
  103. package/sdk/platform/Common/CommonPlatformClient.d.ts +5 -4
  104. package/sdk/platform/Common/CommonPlatformClient.js +6 -5
  105. package/sdk/platform/Common/CommonPlatformModel.d.ts +36 -25
  106. package/sdk/platform/Common/CommonPlatformModel.js +25 -14
  107. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +80 -153
  108. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +102 -541
  109. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +36 -49
  110. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +20 -60
  111. package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +1 -1
  112. package/sdk/platform/Communication/CommunicationPlatformClient.js +1 -1
  113. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +189 -43
  114. package/sdk/platform/Communication/CommunicationPlatformModel.js +165 -42
  115. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +58 -81
  116. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +68 -116
  117. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +291 -249
  118. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +243 -234
  119. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +12 -12
  120. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +12 -12
  121. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +78 -65
  122. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +101 -88
  123. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +20 -20
  124. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +19 -19
  125. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +68 -34
  126. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +174 -41
  127. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +667 -244
  128. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +474 -155
  129. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +37 -9
  130. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +27 -8
  131. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +366 -280
  132. package/sdk/platform/Content/ContentPlatformApplicationClient.js +1435 -753
  133. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +323 -223
  134. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +335 -205
  135. package/sdk/platform/Content/ContentPlatformClient.d.ts +304 -106
  136. package/sdk/platform/Content/ContentPlatformClient.js +1842 -450
  137. package/sdk/platform/Content/ContentPlatformModel.d.ts +2582 -566
  138. package/sdk/platform/Content/ContentPlatformModel.js +1426 -558
  139. package/sdk/platform/Content/ContentPlatformValidator.d.ts +293 -114
  140. package/sdk/platform/Content/ContentPlatformValidator.js +328 -101
  141. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +59 -23
  142. package/sdk/platform/Discount/DiscountPlatformClient.js +84 -23
  143. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +403 -110
  144. package/sdk/platform/Discount/DiscountPlatformModel.js +121 -107
  145. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +56 -36
  146. package/sdk/platform/Discount/DiscountPlatformValidator.js +29 -19
  147. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +12 -110
  148. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +14 -684
  149. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +5 -94
  150. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +4 -115
  151. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +20 -20
  152. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +22 -22
  153. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +90 -920
  154. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +53 -949
  155. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
  156. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
  157. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +10 -10
  158. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +10 -10
  159. package/sdk/platform/Lead/LeadPlatformClient.d.ts +11 -11
  160. package/sdk/platform/Lead/LeadPlatformClient.js +11 -11
  161. package/sdk/platform/Lead/LeadPlatformModel.d.ts +14 -9
  162. package/sdk/platform/Lead/LeadPlatformModel.js +20 -18
  163. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +56 -9
  164. package/sdk/platform/Order/OrderPlatformApplicationClient.js +340 -10
  165. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +128 -24
  166. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +81 -19
  167. package/sdk/platform/Order/OrderPlatformClient.d.ts +517 -160
  168. package/sdk/platform/Order/OrderPlatformClient.js +1623 -384
  169. package/sdk/platform/Order/OrderPlatformModel.d.ts +10372 -1587
  170. package/sdk/platform/Order/OrderPlatformModel.js +5726 -1512
  171. package/sdk/platform/Order/OrderPlatformValidator.d.ts +539 -123
  172. package/sdk/platform/Order/OrderPlatformValidator.js +323 -92
  173. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +8 -6
  174. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +11 -9
  175. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +6 -4
  176. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +3 -2
  177. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +77 -25
  178. package/sdk/platform/Partner/PartnerPlatformModel.js +32 -21
  179. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +144 -219
  180. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +307 -796
  181. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +86 -121
  182. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +80 -138
  183. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +30 -30
  184. package/sdk/platform/Payment/PaymentPlatformClient.js +30 -30
  185. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +901 -761
  186. package/sdk/platform/Payment/PaymentPlatformModel.js +663 -583
  187. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +8 -8
  188. package/sdk/platform/Payment/PaymentPlatformValidator.js +8 -8
  189. package/sdk/platform/PlatformApplicationClient.d.ts +0 -2
  190. package/sdk/platform/PlatformApplicationClient.js +0 -4
  191. package/sdk/platform/PlatformClient.d.ts +5 -4
  192. package/sdk/platform/PlatformClient.js +32 -22
  193. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +526 -69
  194. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +3337 -337
  195. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +603 -38
  196. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +529 -32
  197. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +184 -133
  198. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +780 -491
  199. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +9408 -1666
  200. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +5720 -1765
  201. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +257 -180
  202. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +185 -127
  203. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +7 -7
  204. package/sdk/platform/Share/SharePlatformApplicationClient.js +7 -7
  205. package/sdk/platform/Share/SharePlatformModel.d.ts +45 -9
  206. package/sdk/platform/Share/SharePlatformModel.js +31 -6
  207. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +26 -26
  208. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +38 -29
  209. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +18 -3
  210. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +10 -2
  211. package/sdk/platform/Theme/ThemePlatformClient.d.ts +4 -4
  212. package/sdk/platform/Theme/ThemePlatformClient.js +4 -4
  213. package/sdk/platform/Theme/ThemePlatformModel.d.ts +103 -17
  214. package/sdk/platform/Theme/ThemePlatformModel.js +92 -23
  215. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +167 -45
  216. package/sdk/platform/User/UserPlatformApplicationClient.js +950 -67
  217. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +189 -3
  218. package/sdk/platform/User/UserPlatformApplicationValidator.js +157 -3
  219. package/sdk/platform/User/UserPlatformModel.d.ts +880 -47
  220. package/sdk/platform/User/UserPlatformModel.js +607 -46
  221. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +33 -86
  222. package/sdk/platform/Webhook/WebhookPlatformClient.js +79 -474
  223. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +861 -422
  224. package/sdk/platform/Webhook/WebhookPlatformModel.js +469 -391
  225. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -55
  226. package/sdk/platform/Webhook/WebhookPlatformValidator.js +12 -72
  227. package/sdk/platform/index.d.ts +0 -2
  228. package/sdk/platform/index.js +0 -4
  229. package/sdk/public/Catalog/CatalogPublicClient.d.ts +22 -0
  230. package/sdk/public/Catalog/CatalogPublicClient.js +133 -0
  231. package/sdk/public/Catalog/CatalogPublicModel.d.ts +158 -0
  232. package/sdk/public/Catalog/CatalogPublicModel.js +116 -0
  233. package/sdk/public/Catalog/CatalogPublicValidator.d.ts +55 -0
  234. package/sdk/public/Catalog/CatalogPublicValidator.js +35 -0
  235. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +5 -4
  236. package/sdk/public/Configuration/ConfigurationPublicClient.js +9 -8
  237. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +41 -21
  238. package/sdk/public/Configuration/ConfigurationPublicModel.js +28 -12
  239. package/sdk/public/Content/ContentPublicClient.d.ts +145 -2
  240. package/sdk/public/Content/ContentPublicClient.js +1067 -17
  241. package/sdk/public/Content/ContentPublicModel.d.ts +704 -3
  242. package/sdk/public/Content/ContentPublicModel.js +751 -3
  243. package/sdk/public/Content/ContentPublicValidator.d.ts +94 -3
  244. package/sdk/public/Content/ContentPublicValidator.js +119 -2
  245. package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
  246. package/sdk/public/Partner/PartnerPublicClient.js +1 -1
  247. package/sdk/public/Partner/PartnerPublicModel.d.ts +248 -72
  248. package/sdk/public/Partner/PartnerPublicModel.js +81 -71
  249. package/sdk/public/Partner/PartnerPublicValidator.d.ts +2 -2
  250. package/sdk/public/Partner/PartnerPublicValidator.js +1 -1
  251. package/sdk/public/PublicClient.d.ts +5 -2
  252. package/sdk/public/PublicClient.js +16 -6
  253. package/sdk/public/Webhook/WebhookPublicClient.d.ts +13 -13
  254. package/sdk/public/Webhook/WebhookPublicClient.js +13 -13
  255. package/sdk/public/Webhook/WebhookPublicModel.d.ts +249 -67
  256. package/sdk/public/Webhook/WebhookPublicModel.js +81 -61
  257. package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
  258. package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
  259. package/sdk/public/index.d.ts +1 -0
  260. package/sdk/public/index.js +2 -0
  261. package/utility.d.ts +3 -0
  262. package/utility.js +7 -0
  263. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +0 -79
  264. package/sdk/application/Rewards/RewardsApplicationClient.js +0 -315
  265. package/sdk/application/Webhook/WebhookApplicationClient.d.ts +0 -19
  266. package/sdk/application/Webhook/WebhookApplicationClient.js +0 -72
  267. package/sdk/platform/Finance/FinancePlatformClient.d.ts +0 -320
  268. package/sdk/platform/Finance/FinancePlatformClient.js +0 -2333
  269. package/sdk/platform/Finance/FinancePlatformModel.d.ts +0 -2890
  270. package/sdk/platform/Finance/FinancePlatformModel.js +0 -2148
  271. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +0 -284
  272. package/sdk/platform/Finance/FinancePlatformValidator.js +0 -354
  273. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +0 -136
  274. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +0 -976
  275. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +0 -152
  276. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +0 -157
  277. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +0 -382
  278. package/sdk/platform/Rewards/RewardsPlatformModel.js +0 -408
@@ -18,10 +18,11 @@ class Order {
18
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.ConfigUpdatedResponse>} - Success response
21
+ * @returns {Promise<OrderPlatformModel.ConfigUpdatedResponseSchema>} -
22
+ * Success response
22
23
  * @name addStateManagerConfig
23
24
  * @summary: Allows esm config updation
24
- * @description: Update ESM config - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/addStateManagerConfig/).
25
+ * @description: Update ESM config - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/addStateManagerConfig/).
25
26
  */
26
27
  async addStateManagerConfig(
27
28
  { body, requestHeaders } = { requestHeaders: {} },
@@ -74,10 +75,10 @@ class Order {
74
75
 
75
76
  const {
76
77
  error: res_error,
77
- } = OrderPlatformModel.ConfigUpdatedResponse().validate(responseData, {
78
- abortEarly: false,
79
- allowUnknown: true,
80
- });
78
+ } = OrderPlatformModel.ConfigUpdatedResponseSchema().validate(
79
+ responseData,
80
+ { abortEarly: false, allowUnknown: true }
81
+ );
81
82
 
82
83
  if (res_error) {
83
84
  if (this.config.options.strictResponseCheck === true) {
@@ -97,10 +98,11 @@ class Order {
97
98
  * @param {OrderPlatformValidator.AttachOrderUserParam} arg - Arg object
98
99
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
99
100
  * @param {import("../PlatformAPIClient").Options} - Options
100
- * @returns {Promise<OrderPlatformModel.AttachOrderUserResponse>} - Success response
101
+ * @returns {Promise<OrderPlatformModel.AttachOrderUserResponseSchema>} -
102
+ * Success response
101
103
  * @name attachOrderUser
102
104
  * @summary: Attach order to a user
103
- * @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/).
105
+ * @description: Attach an anonymous order to a customer based on OTP verification - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/attachOrderUser/).
104
106
  */
105
107
  async attachOrderUser(
106
108
  { body, requestHeaders } = { requestHeaders: {} },
@@ -153,10 +155,10 @@ class Order {
153
155
 
154
156
  const {
155
157
  error: res_error,
156
- } = OrderPlatformModel.AttachOrderUserResponse().validate(responseData, {
157
- abortEarly: false,
158
- allowUnknown: true,
159
- });
158
+ } = OrderPlatformModel.AttachOrderUserResponseSchema().validate(
159
+ responseData,
160
+ { abortEarly: false, allowUnknown: true }
161
+ );
160
162
 
161
163
  if (res_error) {
162
164
  if (this.config.options.strictResponseCheck === true) {
@@ -176,10 +178,10 @@ class Order {
176
178
  * @param {OrderPlatformValidator.BulkListingParam} arg - Arg object
177
179
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
178
180
  * @param {import("../PlatformAPIClient").Options} - Options
179
- * @returns {Promise<OrderPlatformModel.BulkListingResponse>} - Success response
181
+ * @returns {Promise<OrderPlatformModel.BulkListingResponseSchema>} - Success response
180
182
  * @name bulkListing
181
183
  * @summary: Lists bulk operations
182
- * @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/).
184
+ * @description: Get list of bulk operation that is initiated and completed as per the filters provided - Check out [method documentation](https://docs.fynd.com/partners/commerce/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
290
  * @summary: Upload bulk state transitions file
288
- * @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/).
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://docs.fynd.com/partners/commerce/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
  );
@@ -364,7 +367,7 @@ class Order {
364
367
  * @returns {Promise<OrderPlatformModel.OrderStatusResult>} - Success response
365
368
  * @name checkOrderStatus
366
369
  * @summary: Debug order
367
- * @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/).
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://docs.fynd.com/partners/commerce/sdk/platform/order/checkOrderStatus/).
368
371
  */
369
372
  async checkOrderStatus(
370
373
  { body, requestHeaders } = { requestHeaders: {} },
@@ -436,22 +439,185 @@ class Order {
436
439
  return response;
437
440
  }
438
441
 
442
+ /**
443
+ * @param {OrderPlatformValidator.CreateAccountParam} arg - Arg object
444
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
445
+ * @param {import("../PlatformAPIClient").Options} - Options
446
+ * @returns {Promise<OrderPlatformModel.Account>} - Success response
447
+ * @name createAccount
448
+ * @summary: Create channel account
449
+ * @description: Creates a new channel account for the company. Channel accounts represent different sales channels or marketplace integrations (e.g., Shopify, custom marketplaces) through which the company receives and processes orders. Each account is identified by a unique name and can be used to segregate orders from different sources. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/createAccount/).
450
+ */
451
+ async createAccount(
452
+ { body, requestHeaders } = { requestHeaders: {} },
453
+ { responseHeaders } = { responseHeaders: false }
454
+ ) {
455
+ const { error } = OrderPlatformValidator.createAccount().validate(
456
+ {
457
+ body,
458
+ },
459
+ { abortEarly: false, allowUnknown: true }
460
+ );
461
+ if (error) {
462
+ return Promise.reject(new FDKClientValidationError(error));
463
+ }
464
+
465
+ // Showing warrnings if extra unknown parameters are found
466
+ const { error: warrning } = OrderPlatformValidator.createAccount().validate(
467
+ {
468
+ body,
469
+ },
470
+ { abortEarly: false, allowUnknown: false }
471
+ );
472
+ if (warrning) {
473
+ Logger({
474
+ level: "WARN",
475
+ message: `Parameter Validation warrnings for platform > Order > createAccount \n ${warrning}`,
476
+ });
477
+ }
478
+
479
+ const query_params = {};
480
+
481
+ const xHeaders = {};
482
+
483
+ const response = await PlatformAPIClient.execute(
484
+ this.config,
485
+ "post",
486
+ `/service/platform/order-manage/v1.0/company/${this.config.companyId}/account`,
487
+ query_params,
488
+ body,
489
+ { ...xHeaders, ...requestHeaders },
490
+ { responseHeaders }
491
+ );
492
+
493
+ let responseData = response;
494
+ if (responseHeaders) {
495
+ responseData = response[0];
496
+ }
497
+
498
+ const {
499
+ error: res_error,
500
+ } = OrderPlatformModel.Account().validate(responseData, {
501
+ abortEarly: false,
502
+ allowUnknown: true,
503
+ });
504
+
505
+ if (res_error) {
506
+ if (this.config.options.strictResponseCheck === true) {
507
+ return Promise.reject(new FDKResponseValidationError(res_error));
508
+ } else {
509
+ Logger({
510
+ level: "WARN",
511
+ message: `Response Validation Warnings for platform > Order > createAccount \n ${res_error}`,
512
+ });
513
+ }
514
+ }
515
+
516
+ return response;
517
+ }
518
+
519
+ /**
520
+ * @param {OrderPlatformValidator.CreateChannelConfigParam} arg - Arg object
521
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
522
+ * @param {import("../PlatformAPIClient").Options} - Options
523
+ * @returns {Promise<OrderPlatformModel.CreateChannelConfigResponseSchema>}
524
+ * - Success response
525
+ *
526
+ * @name createChannelConfig
527
+ * @summary: Create channel configuration
528
+ * @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://docs.fynd.com/partners/commerce/sdk/platform/order/createChannelConfig/).
529
+ */
530
+ async createChannelConfig(
531
+ { body, requestHeaders } = { requestHeaders: {} },
532
+ { responseHeaders } = { responseHeaders: false }
533
+ ) {
534
+ const { error } = OrderPlatformValidator.createChannelConfig().validate(
535
+ {
536
+ body,
537
+ },
538
+ { abortEarly: false, allowUnknown: true }
539
+ );
540
+ if (error) {
541
+ return Promise.reject(new FDKClientValidationError(error));
542
+ }
543
+
544
+ // Showing warrnings if extra unknown parameters are found
545
+ const {
546
+ error: warrning,
547
+ } = OrderPlatformValidator.createChannelConfig().validate(
548
+ {
549
+ body,
550
+ },
551
+ { abortEarly: false, allowUnknown: false }
552
+ );
553
+ if (warrning) {
554
+ Logger({
555
+ level: "WARN",
556
+ message: `Parameter Validation warrnings for platform > Order > createChannelConfig \n ${warrning}`,
557
+ });
558
+ }
559
+
560
+ const query_params = {};
561
+
562
+ const xHeaders = {};
563
+
564
+ const response = await PlatformAPIClient.execute(
565
+ this.config,
566
+ "post",
567
+ `/service/platform/order-manage/v1.0/company/${this.config.companyId}/order-config`,
568
+ query_params,
569
+ body,
570
+ { ...xHeaders, ...requestHeaders },
571
+ { responseHeaders }
572
+ );
573
+
574
+ let responseData = response;
575
+ if (responseHeaders) {
576
+ responseData = response[0];
577
+ }
578
+
579
+ const {
580
+ error: res_error,
581
+ } = OrderPlatformModel.CreateChannelConfigResponseSchema().validate(
582
+ responseData,
583
+ { abortEarly: false, allowUnknown: true }
584
+ );
585
+
586
+ if (res_error) {
587
+ if (this.config.options.strictResponseCheck === true) {
588
+ return Promise.reject(new FDKResponseValidationError(res_error));
589
+ } else {
590
+ Logger({
591
+ level: "WARN",
592
+ message: `Response Validation Warnings for platform > Order > createChannelConfig \n ${res_error}`,
593
+ });
594
+ }
595
+ }
596
+
597
+ return response;
598
+ }
599
+
439
600
  /**
440
601
  * @param {OrderPlatformValidator.CreateOrderParam} arg - Arg object
441
602
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
442
603
  * @param {import("../PlatformAPIClient").Options} - Options
443
- * @returns {Promise<OrderPlatformModel.CreateOrderResponse>} - Success response
604
+ * @returns {Promise<Object>} - Success response
444
605
  * @name createOrder
445
- * @summary: Create order
446
- * @description: Creates an order - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/createOrder/).
606
+ * @summary: Create Order
607
+ * @description: Creates an order in the OMS. Note: Use the Serviceability API (<a href='/commerce/sdk/latest/platform/company/serviceability#createShipments'>createShipments</a>) to determine shipments before creating an order. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/createOrder/).
447
608
  */
448
609
  async createOrder(
449
- { body, requestHeaders } = { requestHeaders: {} },
610
+ { xOrderingSource, body, xApplicationId, xExtensionId, requestHeaders } = {
611
+ requestHeaders: {},
612
+ },
450
613
  { responseHeaders } = { responseHeaders: false }
451
614
  ) {
452
615
  const { error } = OrderPlatformValidator.createOrder().validate(
453
616
  {
617
+ xOrderingSource,
454
618
  body,
619
+ xApplicationId,
620
+ xExtensionId,
455
621
  },
456
622
  { abortEarly: false, allowUnknown: true }
457
623
  );
@@ -462,7 +628,10 @@ class Order {
462
628
  // Showing warrnings if extra unknown parameters are found
463
629
  const { error: warrning } = OrderPlatformValidator.createOrder().validate(
464
630
  {
631
+ xOrderingSource,
465
632
  body,
633
+ xApplicationId,
634
+ xExtensionId,
466
635
  },
467
636
  { abortEarly: false, allowUnknown: false }
468
637
  );
@@ -475,12 +644,96 @@ class Order {
475
644
 
476
645
  const query_params = {};
477
646
 
647
+ const xHeaders = {};
648
+ if (xOrderingSource !== undefined)
649
+ xHeaders["x-ordering-source"] = xOrderingSource;
650
+ if (xApplicationId !== undefined)
651
+ xHeaders["x-application-id"] = xApplicationId;
652
+ if (xExtensionId !== undefined) xHeaders["x-extension-id"] = xExtensionId;
653
+
654
+ const response = await PlatformAPIClient.execute(
655
+ this.config,
656
+ "post",
657
+ `/service/platform/order-manage/v1.0/company/${this.config.companyId}/orders`,
658
+ query_params,
659
+ body,
660
+ { ...xHeaders, ...requestHeaders },
661
+ { responseHeaders }
662
+ );
663
+
664
+ let responseData = response;
665
+ if (responseHeaders) {
666
+ responseData = response[0];
667
+ }
668
+
669
+ const { error: res_error } = Joi.any().validate(responseData, {
670
+ abortEarly: false,
671
+ allowUnknown: true,
672
+ });
673
+
674
+ if (res_error) {
675
+ if (this.config.options.strictResponseCheck === true) {
676
+ return Promise.reject(new FDKResponseValidationError(res_error));
677
+ } else {
678
+ Logger({
679
+ level: "WARN",
680
+ message: `Response Validation Warnings for platform > Order > createOrder \n ${res_error}`,
681
+ });
682
+ }
683
+ }
684
+
685
+ return response;
686
+ }
687
+
688
+ /**
689
+ * @param {OrderPlatformValidator.CreateShipmentPackagesParam} arg - Arg object
690
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
691
+ * @param {import("../PlatformAPIClient").Options} - Options
692
+ * @returns {Promise<OrderPlatformModel.BaseResponseSchema>} - Success response
693
+ * @name createShipmentPackages
694
+ * @summary: Create shipment packages
695
+ * @description: Create new packages for a shipment, enabling Multi-Piece Shipment (MPS) functionality. This operation validates courier partner availability and performs bag breaking as per number of packages. The system automatically validates MPS eligibility and store configuration before creating packages. If the store is not eligible for MPS, it will not let the user create packages. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/createShipmentPackages/).
696
+ */
697
+ async createShipmentPackages(
698
+ { shipmentId, body, requestHeaders } = { requestHeaders: {} },
699
+ { responseHeaders } = { responseHeaders: false }
700
+ ) {
701
+ const { error } = OrderPlatformValidator.createShipmentPackages().validate(
702
+ {
703
+ shipmentId,
704
+ body,
705
+ },
706
+ { abortEarly: false, allowUnknown: true }
707
+ );
708
+ if (error) {
709
+ return Promise.reject(new FDKClientValidationError(error));
710
+ }
711
+
712
+ // Showing warrnings if extra unknown parameters are found
713
+ const {
714
+ error: warrning,
715
+ } = OrderPlatformValidator.createShipmentPackages().validate(
716
+ {
717
+ shipmentId,
718
+ body,
719
+ },
720
+ { abortEarly: false, allowUnknown: false }
721
+ );
722
+ if (warrning) {
723
+ Logger({
724
+ level: "WARN",
725
+ message: `Parameter Validation warrnings for platform > Order > createShipmentPackages \n ${warrning}`,
726
+ });
727
+ }
728
+
729
+ const query_params = {};
730
+
478
731
  const xHeaders = {};
479
732
 
480
733
  const response = await PlatformAPIClient.execute(
481
734
  this.config,
482
735
  "post",
483
- `/service/platform/order-manage/v1.0/company/${this.config.companyId}/create-order`,
736
+ `/service/platform/order-manage/v1.0/company/${this.config.companyId}/shipment/${shipmentId}/packages`,
484
737
  query_params,
485
738
  body,
486
739
  { ...xHeaders, ...requestHeaders },
@@ -494,7 +747,7 @@ class Order {
494
747
 
495
748
  const {
496
749
  error: res_error,
497
- } = OrderPlatformModel.CreateOrderResponse().validate(responseData, {
750
+ } = OrderPlatformModel.BaseResponseSchema().validate(responseData, {
498
751
  abortEarly: false,
499
752
  allowUnknown: true,
500
753
  });
@@ -505,7 +758,7 @@ class Order {
505
758
  } else {
506
759
  Logger({
507
760
  level: "WARN",
508
- message: `Response Validation Warnings for platform > Order > createOrder \n ${res_error}`,
761
+ message: `Response Validation Warnings for platform > Order > createShipmentPackages \n ${res_error}`,
509
762
  });
510
763
  }
511
764
  }
@@ -517,10 +770,10 @@ class Order {
517
770
  * @param {OrderPlatformValidator.DispatchManifestsParam} arg - Arg object
518
771
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
519
772
  * @param {import("../PlatformAPIClient").Options} - Options
520
- * @returns {Promise<OrderPlatformModel.SuccessResponse>} - Success response
773
+ * @returns {Promise<OrderPlatformModel.SuccessResponseSchema>} - Success response
521
774
  * @name dispatchManifests
522
775
  * @summary: Dispatch manifest
523
- * @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/).
776
+ * @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://docs.fynd.com/partners/commerce/sdk/platform/order/dispatchManifests/).
524
777
  */
525
778
  async dispatchManifests(
526
779
  { body, requestHeaders } = { requestHeaders: {} },
@@ -573,7 +826,7 @@ class Order {
573
826
 
574
827
  const {
575
828
  error: res_error,
576
- } = OrderPlatformModel.SuccessResponse().validate(responseData, {
829
+ } = OrderPlatformModel.SuccessResponseSchema().validate(responseData, {
577
830
  abortEarly: false,
578
831
  allowUnknown: true,
579
832
  });
@@ -596,10 +849,10 @@ class Order {
596
849
  * @param {OrderPlatformValidator.DownloadBulkActionTemplateParam} arg - Arg object
597
850
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
598
851
  * @param {import("../PlatformAPIClient").Options} - Options
599
- * @returns {Promise<OrderPlatformModel.FileResponse>} - Success response
852
+ * @returns {Promise<OrderPlatformModel.FileResponseSchema>} - Success response
600
853
  * @name downloadBulkActionTemplate
601
854
  * @summary: Download bulk template
602
- * @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/).
855
+ * @description: Download bulk seller templates which can be used to perform operations in bulk - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/downloadBulkActionTemplate/).
603
856
  */
604
857
  async downloadBulkActionTemplate(
605
858
  { templateSlug, requestHeaders } = { requestHeaders: {} },
@@ -655,7 +908,7 @@ class Order {
655
908
 
656
909
  const {
657
910
  error: res_error,
658
- } = OrderPlatformModel.FileResponse().validate(responseData, {
911
+ } = OrderPlatformModel.FileResponseSchema().validate(responseData, {
659
912
  abortEarly: false,
660
913
  allowUnknown: true,
661
914
  });
@@ -678,11 +931,12 @@ class Order {
678
931
  * @param {OrderPlatformValidator.DownloadLanesReportParam} arg - Arg object
679
932
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
680
933
  * @param {import("../PlatformAPIClient").Options} - Options
681
- * @returns {Promise<OrderPlatformModel.BulkReportsDownloadResponse>} -
682
- * Success response
934
+ * @returns {Promise<OrderPlatformModel.BulkReportsDownloadResponseSchema>}
935
+ * - Success response
936
+ *
683
937
  * @name downloadLanesReport
684
938
  * @summary: Download Lane report
685
- * @description: Downloads shipments/orders present in the provided lane - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/downloadLanesReport/).
939
+ * @description: Downloads shipments/orders present in the provided lane - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/downloadLanesReport/).
686
940
  */
687
941
  async downloadLanesReport(
688
942
  { body, requestHeaders } = { requestHeaders: {} },
@@ -735,7 +989,7 @@ class Order {
735
989
 
736
990
  const {
737
991
  error: res_error,
738
- } = OrderPlatformModel.BulkReportsDownloadResponse().validate(
992
+ } = OrderPlatformModel.BulkReportsDownloadResponseSchema().validate(
739
993
  responseData,
740
994
  { abortEarly: false, allowUnknown: true }
741
995
  );
@@ -758,10 +1012,11 @@ class Order {
758
1012
  * @param {OrderPlatformValidator.EInvoiceRetryParam} arg - Arg object
759
1013
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
760
1014
  * @param {import("../PlatformAPIClient").Options} - Options
761
- * @returns {Promise<OrderPlatformModel.EInvoiceRetryResponse>} - Success response
1015
+ * @returns {Promise<OrderPlatformModel.EInvoiceRetryResponseSchema>} -
1016
+ * Success response
762
1017
  * @name eInvoiceRetry
763
1018
  * @summary: Retry E-invoice
764
- * @description: Reattempt the generation of an E-invoice - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/eInvoiceRetry/).
1019
+ * @description: Reattempt the generation of an E-invoice - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/eInvoiceRetry/).
765
1020
  */
766
1021
  async eInvoiceRetry(
767
1022
  { body, requestHeaders } = { requestHeaders: {} },
@@ -812,10 +1067,10 @@ class Order {
812
1067
 
813
1068
  const {
814
1069
  error: res_error,
815
- } = OrderPlatformModel.EInvoiceRetryResponse().validate(responseData, {
816
- abortEarly: false,
817
- allowUnknown: true,
818
- });
1070
+ } = OrderPlatformModel.EInvoiceRetryResponseSchema().validate(
1071
+ responseData,
1072
+ { abortEarly: false, allowUnknown: true }
1073
+ );
819
1074
 
820
1075
  if (res_error) {
821
1076
  if (this.config.options.strictResponseCheck === true) {
@@ -838,7 +1093,7 @@ class Order {
838
1093
  * @returns {Promise<OrderPlatformModel.FailedOrderLogDetails>} - Success response
839
1094
  * @name failedOrderLogDetails
840
1095
  * @summary: Get failed order log
841
- * @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/).
1096
+ * @description: Get the exact error trace from the log Id provided in the failed order list API response - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/failedOrderLogDetails/).
842
1097
  */
843
1098
  async failedOrderLogDetails(
844
1099
  { logId, requestHeaders } = { requestHeaders: {} },
@@ -917,7 +1172,7 @@ class Order {
917
1172
  * @returns {Promise<OrderPlatformModel.FailedOrderLogs>} - Success response
918
1173
  * @name failedOrderLogs
919
1174
  * @summary: List failed order logs
920
- * @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/).
1175
+ * @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://docs.fynd.com/partners/commerce/sdk/platform/order/failedOrderLogs/).
921
1176
  */
922
1177
  async failedOrderLogs(
923
1178
  {
@@ -1017,7 +1272,7 @@ class Order {
1017
1272
  * Success response
1018
1273
  * @name fetchRefundModeConfig
1019
1274
  * @summary: List refund modes
1020
- * @description: Get list of refund modes to trigger refunds - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/fetchRefundModeConfig/).
1275
+ * @description: Get list of refund modes to trigger refunds - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/fetchRefundModeConfig/).
1021
1276
  */
1022
1277
  async fetchRefundModeConfig(
1023
1278
  { body, requestHeaders } = { requestHeaders: {} },
@@ -1093,10 +1348,11 @@ class Order {
1093
1348
  * @param {OrderPlatformValidator.GenerateInvoiceIDParam} arg - Arg object
1094
1349
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1095
1350
  * @param {import("../PlatformAPIClient").Options} - Options
1096
- * @returns {Promise<OrderPlatformModel.GenerateInvoiceIDResponse>} - Success response
1351
+ * @returns {Promise<OrderPlatformModel.GenerateInvoiceIDResponseSchema>} -
1352
+ * Success response
1097
1353
  * @name generateInvoiceID
1098
1354
  * @summary: Generate and attach invoice Id
1099
- * @description: Generate and attach Invoice Ids against shipments. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/generateInvoiceID/).
1355
+ * @description: Generate and attach Invoice Ids against shipments. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/generateInvoiceID/).
1100
1356
  */
1101
1357
  async generateInvoiceID(
1102
1358
  { invoiceType, body, requestHeaders } = { requestHeaders: {} },
@@ -1151,10 +1407,10 @@ class Order {
1151
1407
 
1152
1408
  const {
1153
1409
  error: res_error,
1154
- } = OrderPlatformModel.GenerateInvoiceIDResponse().validate(responseData, {
1155
- abortEarly: false,
1156
- allowUnknown: true,
1157
- });
1410
+ } = OrderPlatformModel.GenerateInvoiceIDResponseSchema().validate(
1411
+ responseData,
1412
+ { abortEarly: false, allowUnknown: true }
1413
+ );
1158
1414
 
1159
1415
  if (res_error) {
1160
1416
  if (this.config.options.strictResponseCheck === true) {
@@ -1174,11 +1430,12 @@ class Order {
1174
1430
  * @param {OrderPlatformValidator.GeneratePOSReceiptByOrderIdParam} arg - Arg object
1175
1431
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1176
1432
  * @param {import("../PlatformAPIClient").Options} - Options
1177
- * @returns {Promise<OrderPlatformModel.GeneratePosOrderReceiptResponse>} -
1178
- * Success response
1433
+ * @returns {Promise<OrderPlatformModel.GeneratePosOrderReceiptResponseSchema>}
1434
+ * - Success response
1435
+ *
1179
1436
  * @name generatePOSReceiptByOrderId
1180
1437
  * @summary: Generate POS receipt by order Id
1181
- * @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/).
1438
+ * @description: Create a point-of-sale (POS) receipt for a specific order by order Id. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/generatePOSReceiptByOrderId/).
1182
1439
  */
1183
1440
  async generatePOSReceiptByOrderId(
1184
1441
  { orderId, shipmentId, documentType, requestHeaders } = {
@@ -1241,7 +1498,7 @@ class Order {
1241
1498
 
1242
1499
  const {
1243
1500
  error: res_error,
1244
- } = OrderPlatformModel.GeneratePosOrderReceiptResponse().validate(
1501
+ } = OrderPlatformModel.GeneratePosOrderReceiptResponseSchema().validate(
1245
1502
  responseData,
1246
1503
  { abortEarly: false, allowUnknown: true }
1247
1504
  );
@@ -1264,10 +1521,10 @@ class Order {
1264
1521
  * @param {OrderPlatformValidator.GenerateProcessManifestParam} arg - Arg object
1265
1522
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1266
1523
  * @param {import("../PlatformAPIClient").Options} - Options
1267
- * @returns {Promise<OrderPlatformModel.ManifestResponse>} - Success response
1524
+ * @returns {Promise<OrderPlatformModel.ManifestResponseSchema>} - Success response
1268
1525
  * @name generateProcessManifest
1269
1526
  * @summary: Process Order Manifest
1270
- * @description: Endpoint to save and process order manifests. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/generateProcessManifest/).
1527
+ * @description: Endpoint to save and process order manifests. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/generateProcessManifest/).
1271
1528
  */
1272
1529
  async generateProcessManifest(
1273
1530
  { body, requestHeaders } = { requestHeaders: {} },
@@ -1320,7 +1577,7 @@ class Order {
1320
1577
 
1321
1578
  const {
1322
1579
  error: res_error,
1323
- } = OrderPlatformModel.ManifestResponse().validate(responseData, {
1580
+ } = OrderPlatformModel.ManifestResponseSchema().validate(responseData, {
1324
1581
  abortEarly: false,
1325
1582
  allowUnknown: true,
1326
1583
  });
@@ -1340,25 +1597,21 @@ class Order {
1340
1597
  }
1341
1598
 
1342
1599
  /**
1343
- * @param {OrderPlatformValidator.GetAllowedStateTransitionParam} arg - Arg object
1600
+ * @param {OrderPlatformValidator.GetAccountByIdParam} arg - Arg object
1344
1601
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1345
1602
  * @param {import("../PlatformAPIClient").Options} - Options
1346
- * @returns {Promise<OrderPlatformModel.RoleBaseStateTransitionMapping>} -
1347
- * Success response
1348
- * @name getAllowedStateTransition
1349
- * @summary: Get allowed state transition
1350
- * @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/).
1603
+ * @returns {Promise<OrderPlatformModel.Account>} - Success response
1604
+ * @name getAccountById
1605
+ * @summary: Get channel account details
1606
+ * @description: Retrieves detailed information about a specific channel account using its unique identifier. This endpoint returns the complete account details including the account ID, associated company ID, and the channel account name. Use this to fetch information about a particular sales channel or marketplace integration. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/getAccountById/).
1351
1607
  */
1352
- async getAllowedStateTransition(
1353
- { orderingChannel, status, requestHeaders } = { requestHeaders: {} },
1608
+ async getAccountById(
1609
+ { channelAccountId, requestHeaders } = { requestHeaders: {} },
1354
1610
  { responseHeaders } = { responseHeaders: false }
1355
1611
  ) {
1356
- const {
1357
- error,
1358
- } = OrderPlatformValidator.getAllowedStateTransition().validate(
1612
+ const { error } = OrderPlatformValidator.getAccountById().validate(
1359
1613
  {
1360
- orderingChannel,
1361
- status,
1614
+ channelAccountId,
1362
1615
  },
1363
1616
  { abortEarly: false, allowUnknown: true }
1364
1617
  );
@@ -1369,10 +1622,97 @@ class Order {
1369
1622
  // Showing warrnings if extra unknown parameters are found
1370
1623
  const {
1371
1624
  error: warrning,
1372
- } = OrderPlatformValidator.getAllowedStateTransition().validate(
1625
+ } = OrderPlatformValidator.getAccountById().validate(
1373
1626
  {
1627
+ channelAccountId,
1628
+ },
1629
+ { abortEarly: false, allowUnknown: false }
1630
+ );
1631
+ if (warrning) {
1632
+ Logger({
1633
+ level: "WARN",
1634
+ message: `Parameter Validation warrnings for platform > Order > getAccountById \n ${warrning}`,
1635
+ });
1636
+ }
1637
+
1638
+ const query_params = {};
1639
+
1640
+ const xHeaders = {};
1641
+
1642
+ const response = await PlatformAPIClient.execute(
1643
+ this.config,
1644
+ "get",
1645
+ `/service/platform/order-manage/v1.0/company/${this.config.companyId}/account/${channelAccountId}`,
1646
+ query_params,
1647
+ undefined,
1648
+ { ...xHeaders, ...requestHeaders },
1649
+ { responseHeaders }
1650
+ );
1651
+
1652
+ let responseData = response;
1653
+ if (responseHeaders) {
1654
+ responseData = response[0];
1655
+ }
1656
+
1657
+ const {
1658
+ error: res_error,
1659
+ } = OrderPlatformModel.Account().validate(responseData, {
1660
+ abortEarly: false,
1661
+ allowUnknown: true,
1662
+ });
1663
+
1664
+ if (res_error) {
1665
+ if (this.config.options.strictResponseCheck === true) {
1666
+ return Promise.reject(new FDKResponseValidationError(res_error));
1667
+ } else {
1668
+ Logger({
1669
+ level: "WARN",
1670
+ message: `Response Validation Warnings for platform > Order > getAccountById \n ${res_error}`,
1671
+ });
1672
+ }
1673
+ }
1674
+
1675
+ return response;
1676
+ }
1677
+
1678
+ /**
1679
+ * @param {OrderPlatformValidator.GetAllowedStateTransitionParam} arg - Arg object
1680
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1681
+ * @param {import("../PlatformAPIClient").Options} - Options
1682
+ * @returns {Promise<OrderPlatformModel.RoleBaseStateTransitionMapping>} -
1683
+ * Success response
1684
+ * @name getAllowedStateTransition
1685
+ * @summary: Get allowed state transition
1686
+ * @description: Retrieve next possible states based on logged in user's role - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/getAllowedStateTransition/).
1687
+ */
1688
+ async getAllowedStateTransition(
1689
+ { status, orderingChannel, orderingSource, requestHeaders } = {
1690
+ requestHeaders: {},
1691
+ },
1692
+ { responseHeaders } = { responseHeaders: false }
1693
+ ) {
1694
+ const {
1695
+ error,
1696
+ } = OrderPlatformValidator.getAllowedStateTransition().validate(
1697
+ {
1698
+ status,
1374
1699
  orderingChannel,
1700
+ orderingSource,
1701
+ },
1702
+ { abortEarly: false, allowUnknown: true }
1703
+ );
1704
+ if (error) {
1705
+ return Promise.reject(new FDKClientValidationError(error));
1706
+ }
1707
+
1708
+ // Showing warrnings if extra unknown parameters are found
1709
+ const {
1710
+ error: warrning,
1711
+ } = OrderPlatformValidator.getAllowedStateTransition().validate(
1712
+ {
1375
1713
  status,
1714
+ orderingChannel,
1715
+ orderingSource,
1376
1716
  },
1377
1717
  { abortEarly: false, allowUnknown: false }
1378
1718
  );
@@ -1385,6 +1725,7 @@ class Order {
1385
1725
 
1386
1726
  const query_params = {};
1387
1727
  query_params["ordering_channel"] = orderingChannel;
1728
+ query_params["ordering_source"] = orderingSource;
1388
1729
  query_params["status"] = status;
1389
1730
 
1390
1731
  const xHeaders = {};
@@ -1429,10 +1770,11 @@ class Order {
1429
1770
  * @param {OrderPlatformValidator.GetAllowedTemplatesForBulkParam} arg - Arg object
1430
1771
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1431
1772
  * @param {import("../PlatformAPIClient").Options} - Options
1432
- * @returns {Promise<OrderPlatformModel.AllowedTemplatesResponse>} - Success response
1773
+ * @returns {Promise<OrderPlatformModel.AllowedTemplatesResponseSchema>} -
1774
+ * Success response
1433
1775
  * @name getAllowedTemplatesForBulk
1434
1776
  * @summary: List bulk operation templates
1435
- * @description: Gets all the allowed templates to perform bulk operations. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getAllowedTemplatesForBulk/).
1777
+ * @description: Gets all the allowed templates to perform bulk operations. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/getAllowedTemplatesForBulk/).
1436
1778
  */
1437
1779
  async getAllowedTemplatesForBulk(
1438
1780
  { requestHeaders } = { requestHeaders: {} },
@@ -1483,10 +1825,10 @@ class Order {
1483
1825
 
1484
1826
  const {
1485
1827
  error: res_error,
1486
- } = OrderPlatformModel.AllowedTemplatesResponse().validate(responseData, {
1487
- abortEarly: false,
1488
- allowUnknown: true,
1489
- });
1828
+ } = OrderPlatformModel.AllowedTemplatesResponseSchema().validate(
1829
+ responseData,
1830
+ { abortEarly: false, allowUnknown: true }
1831
+ );
1490
1832
 
1491
1833
  if (res_error) {
1492
1834
  if (this.config.options.strictResponseCheck === true) {
@@ -1506,10 +1848,11 @@ class Order {
1506
1848
  * @param {OrderPlatformValidator.GetAnnouncementsParam} arg - Arg object
1507
1849
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1508
1850
  * @param {import("../PlatformAPIClient").Options} - Options
1509
- * @returns {Promise<OrderPlatformModel.AnnouncementsResponse>} - Success response
1851
+ * @returns {Promise<OrderPlatformModel.AnnouncementsResponseSchema>} -
1852
+ * Success response
1510
1853
  * @name getAnnouncements
1511
1854
  * @summary: List announcements
1512
- * @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/).
1855
+ * @description: Retrieve announcements related to orders fulfilment configured by platform or company admin - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/getAnnouncements/).
1513
1856
  */
1514
1857
  async getAnnouncements(
1515
1858
  { date, requestHeaders } = { requestHeaders: {} },
@@ -1563,10 +1906,10 @@ class Order {
1563
1906
 
1564
1907
  const {
1565
1908
  error: res_error,
1566
- } = OrderPlatformModel.AnnouncementsResponse().validate(responseData, {
1567
- abortEarly: false,
1568
- allowUnknown: true,
1569
- });
1909
+ } = OrderPlatformModel.AnnouncementsResponseSchema().validate(
1910
+ responseData,
1911
+ { abortEarly: false, allowUnknown: true }
1912
+ );
1570
1913
 
1571
1914
  if (res_error) {
1572
1915
  if (this.config.options.strictResponseCheck === true) {
@@ -1586,11 +1929,12 @@ class Order {
1586
1929
  * @param {OrderPlatformValidator.GetBagByIdParam} arg - Arg object
1587
1930
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1588
1931
  * @param {import("../PlatformAPIClient").Options} - Options
1589
- * @returns {Promise<OrderPlatformModel.BagDetailsPlatformResponse>} -
1590
- * Success response
1932
+ * @returns {Promise<OrderPlatformModel.BagDetailsPlatformResponseSchema>}
1933
+ * - Success response
1934
+ *
1591
1935
  * @name getBagById
1592
1936
  * @summary: Get bag
1593
- * @description: Retrieve detailed information about a specific bag - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getBagById/).
1937
+ * @description: Retrieve detailed information about a specific bag - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/getBagById/).
1594
1938
  */
1595
1939
  async getBagById(
1596
1940
  { bagId, channelBagId, channelId, requestHeaders } = { requestHeaders: {} },
@@ -1648,10 +1992,10 @@ class Order {
1648
1992
 
1649
1993
  const {
1650
1994
  error: res_error,
1651
- } = OrderPlatformModel.BagDetailsPlatformResponse().validate(responseData, {
1652
- abortEarly: false,
1653
- allowUnknown: true,
1654
- });
1995
+ } = OrderPlatformModel.BagDetailsPlatformResponseSchema().validate(
1996
+ responseData,
1997
+ { abortEarly: false, allowUnknown: true }
1998
+ );
1655
1999
 
1656
2000
  if (res_error) {
1657
2001
  if (this.config.options.strictResponseCheck === true) {
@@ -1671,10 +2015,11 @@ class Order {
1671
2015
  * @param {OrderPlatformValidator.GetBagsParam} arg - Arg object
1672
2016
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1673
2017
  * @param {import("../PlatformAPIClient").Options} - Options
1674
- * @returns {Promise<OrderPlatformModel.GetBagsPlatformResponse>} - Success response
2018
+ * @returns {Promise<OrderPlatformModel.GetBagsPlatformResponseSchema>} -
2019
+ * Success response
1675
2020
  * @name getBags
1676
2021
  * @summary: List bags
1677
- * @description: Get paginated list of bags based on provided filters - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getBags/).
2022
+ * @description: Get paginated list of bags based on provided filters - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/getBags/).
1678
2023
  */
1679
2024
  async getBags(
1680
2025
  {
@@ -1761,10 +2106,10 @@ class Order {
1761
2106
 
1762
2107
  const {
1763
2108
  error: res_error,
1764
- } = OrderPlatformModel.GetBagsPlatformResponse().validate(responseData, {
1765
- abortEarly: false,
1766
- allowUnknown: true,
1767
- });
2109
+ } = OrderPlatformModel.GetBagsPlatformResponseSchema().validate(
2110
+ responseData,
2111
+ { abortEarly: false, allowUnknown: true }
2112
+ );
1768
2113
 
1769
2114
  if (res_error) {
1770
2115
  if (this.config.options.strictResponseCheck === true) {
@@ -1784,11 +2129,12 @@ class Order {
1784
2129
  * @param {OrderPlatformValidator.GetBulkActionTemplateParam} arg - Arg object
1785
2130
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1786
2131
  * @param {import("../PlatformAPIClient").Options} - Options
1787
- * @returns {Promise<OrderPlatformModel.BulkActionTemplateResponse>} -
1788
- * Success response
2132
+ * @returns {Promise<OrderPlatformModel.BulkActionTemplateResponseSchema>}
2133
+ * - Success response
2134
+ *
1789
2135
  * @name getBulkActionTemplate
1790
2136
  * @summary: List supported templates
1791
- * @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/).
2137
+ * @description: Get list of templates so that users can download the required template - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/getBulkActionTemplate/).
1792
2138
  */
1793
2139
  async getBulkActionTemplate(
1794
2140
  { requestHeaders } = { requestHeaders: {} },
@@ -1837,10 +2183,10 @@ class Order {
1837
2183
 
1838
2184
  const {
1839
2185
  error: res_error,
1840
- } = OrderPlatformModel.BulkActionTemplateResponse().validate(responseData, {
1841
- abortEarly: false,
1842
- allowUnknown: true,
1843
- });
2186
+ } = OrderPlatformModel.BulkActionTemplateResponseSchema().validate(
2187
+ responseData,
2188
+ { abortEarly: false, allowUnknown: true }
2189
+ );
1844
2190
 
1845
2191
  if (res_error) {
1846
2192
  if (this.config.options.strictResponseCheck === true) {
@@ -1860,10 +2206,10 @@ class Order {
1860
2206
  * @param {OrderPlatformValidator.GetBulkShipmentExcelFileParam} arg - Arg object
1861
2207
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1862
2208
  * @param {import("../PlatformAPIClient").Options} - Options
1863
- * @returns {Promise<OrderPlatformModel.FileResponse>} - Success response
2209
+ * @returns {Promise<OrderPlatformModel.FileResponseSchema>} - Success response
1864
2210
  * @name getBulkShipmentExcelFile
1865
2211
  * @summary: Generate the report
1866
- * @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/).
2212
+ * @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://docs.fynd.com/partners/commerce/sdk/platform/order/getBulkShipmentExcelFile/).
1867
2213
  */
1868
2214
  async getBulkShipmentExcelFile(
1869
2215
  {
@@ -1966,7 +2312,7 @@ class Order {
1966
2312
 
1967
2313
  const {
1968
2314
  error: res_error,
1969
- } = OrderPlatformModel.FileResponse().validate(responseData, {
2315
+ } = OrderPlatformModel.FileResponseSchema().validate(responseData, {
1970
2316
  abortEarly: false,
1971
2317
  allowUnknown: true,
1972
2318
  });
@@ -1985,14 +2331,89 @@ class Order {
1985
2331
  return response;
1986
2332
  }
1987
2333
 
2334
+ /**
2335
+ * @param {OrderPlatformValidator.GetChannelConfigParam} arg - Arg object
2336
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2337
+ * @param {import("../PlatformAPIClient").Options} - Options
2338
+ * @returns {Promise<OrderPlatformModel.CreateChannelConfigData>} - Success response
2339
+ * @name getChannelConfig
2340
+ * @summary: Get channel configuration
2341
+ * @description: Retrieve configuration settings specific to orders for a channel - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/getChannelConfig/).
2342
+ */
2343
+ async getChannelConfig(
2344
+ { requestHeaders } = { requestHeaders: {} },
2345
+ { responseHeaders } = { responseHeaders: false }
2346
+ ) {
2347
+ const { error } = OrderPlatformValidator.getChannelConfig().validate(
2348
+ {},
2349
+ { abortEarly: false, allowUnknown: true }
2350
+ );
2351
+ if (error) {
2352
+ return Promise.reject(new FDKClientValidationError(error));
2353
+ }
2354
+
2355
+ // Showing warrnings if extra unknown parameters are found
2356
+ const {
2357
+ error: warrning,
2358
+ } = OrderPlatformValidator.getChannelConfig().validate(
2359
+ {},
2360
+ { abortEarly: false, allowUnknown: false }
2361
+ );
2362
+ if (warrning) {
2363
+ Logger({
2364
+ level: "WARN",
2365
+ message: `Parameter Validation warrnings for platform > Order > getChannelConfig \n ${warrning}`,
2366
+ });
2367
+ }
2368
+
2369
+ const query_params = {};
2370
+
2371
+ const xHeaders = {};
2372
+
2373
+ const response = await PlatformAPIClient.execute(
2374
+ this.config,
2375
+ "get",
2376
+ `/service/platform/order-manage/v1.0/company/${this.config.companyId}/order-config`,
2377
+ query_params,
2378
+ undefined,
2379
+ { ...xHeaders, ...requestHeaders },
2380
+ { responseHeaders }
2381
+ );
2382
+
2383
+ let responseData = response;
2384
+ if (responseHeaders) {
2385
+ responseData = response[0];
2386
+ }
2387
+
2388
+ const {
2389
+ error: res_error,
2390
+ } = OrderPlatformModel.CreateChannelConfigData().validate(responseData, {
2391
+ abortEarly: false,
2392
+ allowUnknown: true,
2393
+ });
2394
+
2395
+ if (res_error) {
2396
+ if (this.config.options.strictResponseCheck === true) {
2397
+ return Promise.reject(new FDKResponseValidationError(res_error));
2398
+ } else {
2399
+ Logger({
2400
+ level: "WARN",
2401
+ message: `Response Validation Warnings for platform > Order > getChannelConfig \n ${res_error}`,
2402
+ });
2403
+ }
2404
+ }
2405
+
2406
+ return response;
2407
+ }
2408
+
1988
2409
  /**
1989
2410
  * @param {OrderPlatformValidator.GetFileByStatusParam} arg - Arg object
1990
2411
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1991
2412
  * @param {import("../PlatformAPIClient").Options} - Options
1992
- * @returns {Promise<OrderPlatformModel.JobFailedResponse>} - Success response
2413
+ * @returns {Promise<OrderPlatformModel.JobFailedResponseSchema>} - Success response
1993
2414
  * @name getFileByStatus
1994
2415
  * @summary: Download file used for Bulk operation
1995
- * @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/).
2416
+ * @description: Get the file download URL used for performing bulk operation - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/getFileByStatus/).
1996
2417
  */
1997
2418
  async getFileByStatus(
1998
2419
  { batchId, status, fileType, reportType, requestHeaders } = {
@@ -2056,7 +2477,7 @@ class Order {
2056
2477
 
2057
2478
  const {
2058
2479
  error: res_error,
2059
- } = OrderPlatformModel.JobFailedResponse().validate(responseData, {
2480
+ } = OrderPlatformModel.JobFailedResponseSchema().validate(responseData, {
2060
2481
  abortEarly: false,
2061
2482
  allowUnknown: true,
2062
2483
  });
@@ -2079,10 +2500,10 @@ class Order {
2079
2500
  * @param {OrderPlatformValidator.GetLaneConfigParam} arg - Arg object
2080
2501
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2081
2502
  * @param {import("../PlatformAPIClient").Options} - Options
2082
- * @returns {Promise<OrderPlatformModel.LaneConfigResponse>} - Success response
2503
+ * @returns {Promise<OrderPlatformModel.LaneConfigResponseSchema>} - Success response
2083
2504
  * @name getLaneConfig
2084
2505
  * @summary: Get lane configuration
2085
- * @description: Get configuration settings for lanes - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getLaneConfig/).
2506
+ * @description: Get configuration settings for lanes - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/getLaneConfig/).
2086
2507
  */
2087
2508
  async getLaneConfig(
2088
2509
  {
@@ -2209,7 +2630,7 @@ class Order {
2209
2630
 
2210
2631
  const {
2211
2632
  error: res_error,
2212
- } = OrderPlatformModel.LaneConfigResponse().validate(responseData, {
2633
+ } = OrderPlatformModel.LaneConfigResponseSchema().validate(responseData, {
2213
2634
  abortEarly: false,
2214
2635
  allowUnknown: true,
2215
2636
  });
@@ -2235,7 +2656,7 @@ class Order {
2235
2656
  * @returns {Promise<OrderPlatformModel.ManifestDetails>} - Success response
2236
2657
  * @name getManifestDetails
2237
2658
  * @summary: Get a manifest
2238
- * @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/).
2659
+ * @description: Get details regarding a manifest which can be used to perform further actions on it - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/getManifestDetails/).
2239
2660
  */
2240
2661
  async getManifestDetails(
2241
2662
  {
@@ -2338,7 +2759,7 @@ class Order {
2338
2759
  * @returns {Promise<OrderPlatformModel.ManifestShipmentListing>} - Success response
2339
2760
  * @name getManifestShipments
2340
2761
  * @summary: List manifest shipments
2341
- * @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/).
2762
+ * @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://docs.fynd.com/partners/commerce/sdk/platform/order/getManifestShipments/).
2342
2763
  */
2343
2764
  async getManifestShipments(
2344
2765
  {
@@ -2454,10 +2875,11 @@ class Order {
2454
2875
  * @param {OrderPlatformValidator.GetManifestfiltersParam} arg - Arg object
2455
2876
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2456
2877
  * @param {import("../PlatformAPIClient").Options} - Options
2457
- * @returns {Promise<OrderPlatformModel.ManifestFiltersResponse>} - Success response
2878
+ * @returns {Promise<OrderPlatformModel.ManifestFiltersResponseSchema>} -
2879
+ * Success response
2458
2880
  * @name getManifestfilters
2459
2881
  * @summary: List filters
2460
- * @description: Get supported filter for listing manifests - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getManifestfilters/).
2882
+ * @description: Get supported filter for listing manifests - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/getManifestfilters/).
2461
2883
  */
2462
2884
  async getManifestfilters(
2463
2885
  { view, requestHeaders } = { requestHeaders: {} },
@@ -2511,10 +2933,10 @@ class Order {
2511
2933
 
2512
2934
  const {
2513
2935
  error: res_error,
2514
- } = OrderPlatformModel.ManifestFiltersResponse().validate(responseData, {
2515
- abortEarly: false,
2516
- allowUnknown: true,
2517
- });
2936
+ } = OrderPlatformModel.ManifestFiltersResponseSchema().validate(
2937
+ responseData,
2938
+ { abortEarly: false, allowUnknown: true }
2939
+ );
2518
2940
 
2519
2941
  if (res_error) {
2520
2942
  if (this.config.options.strictResponseCheck === true) {
@@ -2537,7 +2959,7 @@ class Order {
2537
2959
  * @returns {Promise<OrderPlatformModel.ManifestList>} - Success response
2538
2960
  * @name getManifests
2539
2961
  * @summary: List manifests
2540
- * @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/).
2962
+ * @description: Get a list of manifest as per the filter provided - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/getManifests/).
2541
2963
  */
2542
2964
  async getManifests(
2543
2965
  {
@@ -2647,10 +3069,11 @@ class Order {
2647
3069
  * @param {OrderPlatformValidator.GetOrderByIdParam} arg - Arg object
2648
3070
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2649
3071
  * @param {import("../PlatformAPIClient").Options} - Options
2650
- * @returns {Promise<OrderPlatformModel.OrderDetailsResponse>} - Success response
3072
+ * @returns {Promise<OrderPlatformModel.OrderDetailsResponseSchema>} -
3073
+ * Success response
2651
3074
  * @name getOrderById
2652
3075
  * @summary: Get order
2653
- * @description: Get detailed information about a specific order - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getOrderById/).
3076
+ * @description: Get detailed information about a specific order - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/getOrderById/).
2654
3077
  */
2655
3078
  async getOrderById(
2656
3079
  { orderId, myOrders, allowInactive, requestHeaders } = {
@@ -2710,7 +3133,7 @@ class Order {
2710
3133
 
2711
3134
  const {
2712
3135
  error: res_error,
2713
- } = OrderPlatformModel.OrderDetailsResponse().validate(responseData, {
3136
+ } = OrderPlatformModel.OrderDetailsResponseSchema().validate(responseData, {
2714
3137
  abortEarly: false,
2715
3138
  allowUnknown: true,
2716
3139
  });
@@ -2733,10 +3156,11 @@ class Order {
2733
3156
  * @param {OrderPlatformValidator.GetOrdersParam} arg - Arg object
2734
3157
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2735
3158
  * @param {import("../PlatformAPIClient").Options} - Options
2736
- * @returns {Promise<OrderPlatformModel.OrderListingResponse>} - Success response
3159
+ * @returns {Promise<OrderPlatformModel.OrderListingResponseSchema>} -
3160
+ * Success response
2737
3161
  * @name getOrders
2738
3162
  * @summary: List orders
2739
- * @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/).
3163
+ * @description: Get a list of orders based on the filters provided. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/getOrders/).
2740
3164
  */
2741
3165
  async getOrders(
2742
3166
  {
@@ -2763,7 +3187,11 @@ class Order {
2763
3187
  customerId,
2764
3188
  orderType,
2765
3189
  allowInactive,
3190
+ groupEntity,
2766
3191
  enforceDateFilter,
3192
+ fulfillmentType,
3193
+ orderingSource,
3194
+ channelAccountId,
2767
3195
  requestHeaders,
2768
3196
  } = { requestHeaders: {} },
2769
3197
  { responseHeaders } = { responseHeaders: false }
@@ -2793,7 +3221,11 @@ class Order {
2793
3221
  customerId,
2794
3222
  orderType,
2795
3223
  allowInactive,
3224
+ groupEntity,
2796
3225
  enforceDateFilter,
3226
+ fulfillmentType,
3227
+ orderingSource,
3228
+ channelAccountId,
2797
3229
  },
2798
3230
  { abortEarly: false, allowUnknown: true }
2799
3231
  );
@@ -2827,7 +3259,11 @@ class Order {
2827
3259
  customerId,
2828
3260
  orderType,
2829
3261
  allowInactive,
3262
+ groupEntity,
2830
3263
  enforceDateFilter,
3264
+ fulfillmentType,
3265
+ orderingSource,
3266
+ channelAccountId,
2831
3267
  },
2832
3268
  { abortEarly: false, allowUnknown: false }
2833
3269
  );
@@ -2862,7 +3298,11 @@ class Order {
2862
3298
  query_params["customer_id"] = customerId;
2863
3299
  query_params["order_type"] = orderType;
2864
3300
  query_params["allow_inactive"] = allowInactive;
3301
+ query_params["group_entity"] = groupEntity;
2865
3302
  query_params["enforce_date_filter"] = enforceDateFilter;
3303
+ query_params["fulfillment_type"] = fulfillmentType;
3304
+ query_params["ordering_source"] = orderingSource;
3305
+ query_params["channel_account_id"] = channelAccountId;
2866
3306
 
2867
3307
  const xHeaders = {};
2868
3308
 
@@ -2883,7 +3323,7 @@ class Order {
2883
3323
 
2884
3324
  const {
2885
3325
  error: res_error,
2886
- } = OrderPlatformModel.OrderListingResponse().validate(responseData, {
3326
+ } = OrderPlatformModel.OrderListingResponseSchema().validate(responseData, {
2887
3327
  abortEarly: false,
2888
3328
  allowUnknown: true,
2889
3329
  });
@@ -2902,14 +3342,145 @@ class Order {
2902
3342
  return response;
2903
3343
  }
2904
3344
 
3345
+ /**
3346
+ * @param {Object} arg - Arg object.
3347
+ * @param {string} [arg.lane] - Lane refers to a section where orders are
3348
+ * assigned, indicating its grouping.
3349
+ * @param {string} [arg.searchType] - Search_type refers to the field that
3350
+ * will be used as the target for the search operation.
3351
+ * @param {string} [arg.bagStatus] - Bag_status refers to status of the
3352
+ * entity. Filters orders based on the status.
3353
+ * @param {number} [arg.timeToDispatch] - Time_to_dispatch refers to
3354
+ * estimated SLA time.
3355
+ * @param {string} [arg.paymentMethods] - Comma separated values of payment
3356
+ * methods that were used to place order.
3357
+ * @param {string} [arg.tags] - Tags refers to additional descriptive labels
3358
+ * associated with the order
3359
+ * @param {string} [arg.searchValue] - Search_value is matched against the
3360
+ * field specified by the search_type
3361
+ * @param {string} [arg.fromDate] - Date time in UTC timezone as per ISO format.
3362
+ * @param {string} [arg.toDate] - Date time in UTC timezone as per ISO format.
3363
+ * @param {string} [arg.startDate] - Date time in UTC timezone as per ISO format.
3364
+ * @param {string} [arg.endDate] - Date time in UTC timezone as per ISO format.
3365
+ * @param {string} [arg.dpIds] - Delivery Partner IDs to which shipments are assigned.
3366
+ * @param {string} [arg.stores] - A comma-separated list of store IDs used
3367
+ * to filter results to only those related to specific stores.
3368
+ * @param {string} [arg.salesChannels] - A comma-separated list of sales
3369
+ * channel IDs to filter results based on the sales channels involved.
3370
+ * @param {number} [arg.pageSize] - Determines the number of results
3371
+ * returned per page.
3372
+ * @param {boolean} [arg.isPrioritySort] -
3373
+ * @param {string} [arg.customMeta] -
3374
+ * @param {boolean} [arg.myOrders] -
3375
+ * @param {boolean} [arg.showCrossCompanyData] - Flag to view cross &
3376
+ * non-cross company order
3377
+ * @param {string} [arg.customerId] - The unique identifier for the customer
3378
+ * associated with the query, useful for filtering results to a specific customer.
3379
+ * @param {string} [arg.orderType] -
3380
+ * @param {boolean} [arg.allowInactive] - Flag indicating whether inactive
3381
+ * shipments are allowed
3382
+ * @param {string} [arg.groupEntity] - Defines the grouping criterion for
3383
+ * retrieving shipments or orders. It specifies whether the results should
3384
+ * be organized based on shipment groups or order groups. For example,
3385
+ * using 'shipments' groups results by shipment, while an invalid value
3386
+ * like 'abcd' may not be recognized, leading to errors or default behavior.
3387
+ * @param {boolean} [arg.enforceDateFilter] - Applies a date filter for
3388
+ * listing orders. This is useful when fetching data for a specific date
3389
+ * range while performing searches.
3390
+ * @param {string} [arg.fulfillmentType] - Define the Fulfillment Type for
3391
+ * Listing Orders, This is use when we want to get list of shipments or
3392
+ * orders by cross store or cross company or fulfilling Store (by
3393
+ * default), this is also depends on the login user accessType and store access
3394
+ * @param {string} [arg.orderingSource] - Filter orders by ordering source.
3395
+ * Accepts comma-separated values for multiple sources.
3396
+ * @param {string} [arg.channelAccountId] - Comma-separated channel account
3397
+ * IDs to filter orders by specific channel accounts.
3398
+ * @returns {Paginator<OrderPlatformModel.OrderListingResponseSchema>}
3399
+ * @summary: List orders
3400
+ * @description: Get a list of orders based on the filters provided.
3401
+ */
3402
+ getOrdersPaginator({
3403
+ lane,
3404
+ searchType,
3405
+ bagStatus,
3406
+ timeToDispatch,
3407
+ paymentMethods,
3408
+ tags,
3409
+ searchValue,
3410
+ fromDate,
3411
+ toDate,
3412
+ startDate,
3413
+ endDate,
3414
+ dpIds,
3415
+ stores,
3416
+ salesChannels,
3417
+ pageSize,
3418
+ isPrioritySort,
3419
+ customMeta,
3420
+ myOrders,
3421
+ showCrossCompanyData,
3422
+ customerId,
3423
+ orderType,
3424
+ allowInactive,
3425
+ groupEntity,
3426
+ enforceDateFilter,
3427
+ fulfillmentType,
3428
+ orderingSource,
3429
+ channelAccountId,
3430
+ } = {}) {
3431
+ const paginator = new Paginator();
3432
+ const callback = async () => {
3433
+ const pageId = paginator.nextId;
3434
+ const pageNo = paginator.pageNo;
3435
+ const pageType = "number";
3436
+ const data = await this.getOrders({
3437
+ lane: lane,
3438
+ searchType: searchType,
3439
+ bagStatus: bagStatus,
3440
+ timeToDispatch: timeToDispatch,
3441
+ paymentMethods: paymentMethods,
3442
+ tags: tags,
3443
+ searchValue: searchValue,
3444
+ fromDate: fromDate,
3445
+ toDate: toDate,
3446
+ startDate: startDate,
3447
+ endDate: endDate,
3448
+ dpIds: dpIds,
3449
+ stores: stores,
3450
+ salesChannels: salesChannels,
3451
+ pageNo: pageNo,
3452
+ pageSize: pageSize,
3453
+ isPrioritySort: isPrioritySort,
3454
+ customMeta: customMeta,
3455
+ myOrders: myOrders,
3456
+ showCrossCompanyData: showCrossCompanyData,
3457
+ customerId: customerId,
3458
+ orderType: orderType,
3459
+ allowInactive: allowInactive,
3460
+ groupEntity: groupEntity,
3461
+ enforceDateFilter: enforceDateFilter,
3462
+ fulfillmentType: fulfillmentType,
3463
+ orderingSource: orderingSource,
3464
+ channelAccountId: channelAccountId,
3465
+ });
3466
+ paginator.setPaginator({
3467
+ hasNext: data.page.has_next ? true : false,
3468
+ nextId: data.page.next_id,
3469
+ });
3470
+ return data;
3471
+ };
3472
+ paginator.setCallback(callback.bind(this));
3473
+ return paginator;
3474
+ }
3475
+
2905
3476
  /**
2906
3477
  * @param {OrderPlatformValidator.GetRoleBasedActionsParam} arg - Arg object
2907
3478
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2908
3479
  * @param {import("../PlatformAPIClient").Options} - Options
2909
- * @returns {Promise<OrderPlatformModel.GetActionsResponse>} - Success response
3480
+ * @returns {Promise<OrderPlatformModel.GetActionsResponseSchema>} - Success response
2910
3481
  * @name getRoleBasedActions
2911
3482
  * @summary: Get role-based actions
2912
- * @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/).
3483
+ * @description: Retrieve permissible actions based on user roles such as company_admin, company_operation, customer_care, and read_only. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/getRoleBasedActions/).
2913
3484
  */
2914
3485
  async getRoleBasedActions(
2915
3486
  { requestHeaders } = { requestHeaders: {} },
@@ -2958,7 +3529,7 @@ class Order {
2958
3529
 
2959
3530
  const {
2960
3531
  error: res_error,
2961
- } = OrderPlatformModel.GetActionsResponse().validate(responseData, {
3532
+ } = OrderPlatformModel.GetActionsResponseSchema().validate(responseData, {
2962
3533
  abortEarly: false,
2963
3534
  allowUnknown: true,
2964
3535
  });
@@ -2981,10 +3552,11 @@ class Order {
2981
3552
  * @param {OrderPlatformValidator.GetShipmentByIdParam} arg - Arg object
2982
3553
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2983
3554
  * @param {import("../PlatformAPIClient").Options} - Options
2984
- * @returns {Promise<OrderPlatformModel.ShipmentInfoResponse>} - Success response
3555
+ * @returns {Promise<OrderPlatformModel.ShipmentInfoResponseSchema>} -
3556
+ * Success response
2985
3557
  * @name getShipmentById
2986
- * @summary: Get shipment
2987
- * @description: Get detailed information about a specific shipment - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentById/).
3558
+ * @summary: Get shipment details
3559
+ * @description: Get detailed information about a specific shipment - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/getShipmentById/).
2988
3560
  */
2989
3561
  async getShipmentById(
2990
3562
  {
@@ -3053,7 +3625,7 @@ class Order {
3053
3625
 
3054
3626
  const {
3055
3627
  error: res_error,
3056
- } = OrderPlatformModel.ShipmentInfoResponse().validate(responseData, {
3628
+ } = OrderPlatformModel.ShipmentInfoResponseSchema().validate(responseData, {
3057
3629
  abortEarly: false,
3058
3630
  allowUnknown: true,
3059
3631
  });
@@ -3076,10 +3648,11 @@ class Order {
3076
3648
  * @param {OrderPlatformValidator.GetShipmentHistoryParam} arg - Arg object
3077
3649
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3078
3650
  * @param {import("../PlatformAPIClient").Options} - Options
3079
- * @returns {Promise<OrderPlatformModel.ShipmentHistoryResponse>} - Success response
3651
+ * @returns {Promise<OrderPlatformModel.ShipmentHistoryResponseSchema>} -
3652
+ * Success response
3080
3653
  * @name getShipmentHistory
3081
3654
  * @summary: Get a shipment's history
3082
- * @description: Get the history of the shipment - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentHistory/).
3655
+ * @description: Get the history of the shipment - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/getShipmentHistory/).
3083
3656
  */
3084
3657
  async getShipmentHistory(
3085
3658
  { shipmentId, bagId, requestHeaders } = { requestHeaders: {} },
@@ -3136,10 +3709,10 @@ class Order {
3136
3709
 
3137
3710
  const {
3138
3711
  error: res_error,
3139
- } = OrderPlatformModel.ShipmentHistoryResponse().validate(responseData, {
3140
- abortEarly: false,
3141
- allowUnknown: true,
3142
- });
3712
+ } = OrderPlatformModel.ShipmentHistoryResponseSchema().validate(
3713
+ responseData,
3714
+ { abortEarly: false, allowUnknown: true }
3715
+ );
3143
3716
 
3144
3717
  if (res_error) {
3145
3718
  if (this.config.options.strictResponseCheck === true) {
@@ -3156,24 +3729,21 @@ class Order {
3156
3729
  }
3157
3730
 
3158
3731
  /**
3159
- * @param {OrderPlatformValidator.GetShipmentReasonsParam} arg - Arg object
3732
+ * @param {OrderPlatformValidator.GetShipmentPackagesParam} arg - Arg object
3160
3733
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3161
3734
  * @param {import("../PlatformAPIClient").Options} - Options
3162
- * @returns {Promise<OrderPlatformModel.PlatformShipmentReasonsResponse>} -
3163
- * Success response
3164
- * @name getShipmentReasons
3165
- * @summary: List bag cancellation reasons
3166
- * @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/).
3735
+ * @returns {Promise<OrderPlatformModel.PackagesResponseSchema>} - Success response
3736
+ * @name getShipmentPackages
3737
+ * @summary: Get shipment packages
3738
+ * @description: Retrieve all packages associated with a specific shipment. This endpoint supports both single-piece and multi-piece shipments. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/getShipmentPackages/).
3167
3739
  */
3168
- async getShipmentReasons(
3169
- { shipmentId, bagId, state, requestHeaders } = { requestHeaders: {} },
3740
+ async getShipmentPackages(
3741
+ { shipmentId, requestHeaders } = { requestHeaders: {} },
3170
3742
  { responseHeaders } = { responseHeaders: false }
3171
3743
  ) {
3172
- const { error } = OrderPlatformValidator.getShipmentReasons().validate(
3744
+ const { error } = OrderPlatformValidator.getShipmentPackages().validate(
3173
3745
  {
3174
3746
  shipmentId,
3175
- bagId,
3176
- state,
3177
3747
  },
3178
3748
  { abortEarly: false, allowUnknown: true }
3179
3749
  );
@@ -3184,18 +3754,16 @@ class Order {
3184
3754
  // Showing warrnings if extra unknown parameters are found
3185
3755
  const {
3186
3756
  error: warrning,
3187
- } = OrderPlatformValidator.getShipmentReasons().validate(
3757
+ } = OrderPlatformValidator.getShipmentPackages().validate(
3188
3758
  {
3189
3759
  shipmentId,
3190
- bagId,
3191
- state,
3192
3760
  },
3193
3761
  { abortEarly: false, allowUnknown: false }
3194
3762
  );
3195
3763
  if (warrning) {
3196
3764
  Logger({
3197
3765
  level: "WARN",
3198
- message: `Parameter Validation warrnings for platform > Order > getShipmentReasons \n ${warrning}`,
3766
+ message: `Parameter Validation warrnings for platform > Order > getShipmentPackages \n ${warrning}`,
3199
3767
  });
3200
3768
  }
3201
3769
 
@@ -3206,7 +3774,7 @@ class Order {
3206
3774
  const response = await PlatformAPIClient.execute(
3207
3775
  this.config,
3208
3776
  "get",
3209
- `/service/platform/order/v1.0/company/${this.config.companyId}/shipments/${shipmentId}/bags/${bagId}/state/${state}/reasons`,
3777
+ `/service/platform/order-manage/v1.0/company/${this.config.companyId}/shipment/${shipmentId}/packages`,
3210
3778
  query_params,
3211
3779
  undefined,
3212
3780
  { ...xHeaders, ...requestHeaders },
@@ -3220,10 +3788,10 @@ class Order {
3220
3788
 
3221
3789
  const {
3222
3790
  error: res_error,
3223
- } = OrderPlatformModel.PlatformShipmentReasonsResponse().validate(
3224
- responseData,
3225
- { abortEarly: false, allowUnknown: true }
3226
- );
3791
+ } = OrderPlatformModel.PackagesResponseSchema().validate(responseData, {
3792
+ abortEarly: false,
3793
+ allowUnknown: true,
3794
+ });
3227
3795
 
3228
3796
  if (res_error) {
3229
3797
  if (this.config.options.strictResponseCheck === true) {
@@ -3231,7 +3799,7 @@ class Order {
3231
3799
  } else {
3232
3800
  Logger({
3233
3801
  level: "WARN",
3234
- message: `Response Validation Warnings for platform > Order > getShipmentReasons \n ${res_error}`,
3802
+ message: `Response Validation Warnings for platform > Order > getShipmentPackages \n ${res_error}`,
3235
3803
  });
3236
3804
  }
3237
3805
  }
@@ -3240,37 +3808,125 @@ class Order {
3240
3808
  }
3241
3809
 
3242
3810
  /**
3243
- * @param {OrderPlatformValidator.GetShipmentsParam} arg - Arg object
3811
+ * @param {OrderPlatformValidator.GetShipmentReasonsParam} arg - Arg object
3244
3812
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3245
3813
  * @param {import("../PlatformAPIClient").Options} - Options
3246
- * @returns {Promise<OrderPlatformModel.ShipmentInternalPlatformViewResponse>}
3814
+ * @returns {Promise<OrderPlatformModel.PlatformShipmentReasonsResponseSchema>}
3247
3815
  * - Success response
3248
3816
  *
3249
- * @name getShipments
3250
- * @summary: List shipments
3251
- * @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/).
3817
+ * @name getShipmentReasons
3818
+ * @summary: List bag cancellation reasons
3819
+ * @description: Get reasons to perform full or partial cancellation of a bag - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/getShipmentReasons/).
3252
3820
  */
3253
- async getShipments(
3254
- {
3255
- lane,
3256
- bagStatus,
3257
- statusOverrideLane,
3258
- timeToDispatch,
3259
- searchType,
3260
- searchValue,
3261
- fromDate,
3262
- toDate,
3263
- startDate,
3264
- endDate,
3265
- dpIds,
3266
- stores,
3267
- salesChannels,
3268
- pageNo,
3269
- pageSize,
3270
- fetchActiveShipment,
3271
- allowInactive,
3272
- excludeLockedShipments,
3273
- paymentMethods,
3821
+ async getShipmentReasons(
3822
+ { shipmentId, bagId, state, requestHeaders } = { requestHeaders: {} },
3823
+ { responseHeaders } = { responseHeaders: false }
3824
+ ) {
3825
+ const { error } = OrderPlatformValidator.getShipmentReasons().validate(
3826
+ {
3827
+ shipmentId,
3828
+ bagId,
3829
+ state,
3830
+ },
3831
+ { abortEarly: false, allowUnknown: true }
3832
+ );
3833
+ if (error) {
3834
+ return Promise.reject(new FDKClientValidationError(error));
3835
+ }
3836
+
3837
+ // Showing warrnings if extra unknown parameters are found
3838
+ const {
3839
+ error: warrning,
3840
+ } = OrderPlatformValidator.getShipmentReasons().validate(
3841
+ {
3842
+ shipmentId,
3843
+ bagId,
3844
+ state,
3845
+ },
3846
+ { abortEarly: false, allowUnknown: false }
3847
+ );
3848
+ if (warrning) {
3849
+ Logger({
3850
+ level: "WARN",
3851
+ message: `Parameter Validation warrnings for platform > Order > getShipmentReasons \n ${warrning}`,
3852
+ });
3853
+ }
3854
+
3855
+ const query_params = {};
3856
+
3857
+ const xHeaders = {};
3858
+
3859
+ const response = await PlatformAPIClient.execute(
3860
+ this.config,
3861
+ "get",
3862
+ `/service/platform/order/v1.0/company/${this.config.companyId}/shipments/${shipmentId}/bags/${bagId}/state/${state}/reasons`,
3863
+ query_params,
3864
+ undefined,
3865
+ { ...xHeaders, ...requestHeaders },
3866
+ { responseHeaders }
3867
+ );
3868
+
3869
+ let responseData = response;
3870
+ if (responseHeaders) {
3871
+ responseData = response[0];
3872
+ }
3873
+
3874
+ const {
3875
+ error: res_error,
3876
+ } = OrderPlatformModel.PlatformShipmentReasonsResponseSchema().validate(
3877
+ responseData,
3878
+ { abortEarly: false, allowUnknown: true }
3879
+ );
3880
+
3881
+ if (res_error) {
3882
+ if (this.config.options.strictResponseCheck === true) {
3883
+ return Promise.reject(new FDKResponseValidationError(res_error));
3884
+ } else {
3885
+ Logger({
3886
+ level: "WARN",
3887
+ message: `Response Validation Warnings for platform > Order > getShipmentReasons \n ${res_error}`,
3888
+ });
3889
+ }
3890
+ }
3891
+
3892
+ return response;
3893
+ }
3894
+
3895
+ /**
3896
+ * @param {OrderPlatformValidator.GetShipmentsParam} arg - Arg object
3897
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3898
+ * @param {import("../PlatformAPIClient").Options} - Options
3899
+ * @returns {Promise<OrderPlatformModel.ShipmentInternalPlatformViewResponseSchema>}
3900
+ * - Success response
3901
+ *
3902
+ * @name getShipments
3903
+ * @summary: List shipments
3904
+ * @description: Get a list of shipments based on the filters provided - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/getShipments/).
3905
+ */
3906
+ async getShipments(
3907
+ {
3908
+ lane,
3909
+ bagStatus,
3910
+ statusAssigned,
3911
+ statusOverrideLane,
3912
+ timeToDispatch,
3913
+ searchType,
3914
+ searchValue,
3915
+ fromDate,
3916
+ toDate,
3917
+ startDate,
3918
+ endDate,
3919
+ statusAssignedStartDate,
3920
+ statusAssignedEndDate,
3921
+ dpIds,
3922
+ stores,
3923
+ salesChannels,
3924
+ pageNo,
3925
+ pageSize,
3926
+ fetchActiveShipment,
3927
+ allowInactive,
3928
+ excludeLockedShipments,
3929
+ paymentMethods,
3274
3930
  channelShipmentId,
3275
3931
  channelOrderId,
3276
3932
  customMeta,
@@ -3283,7 +3939,11 @@ class Order {
3283
3939
  tags,
3284
3940
  customerId,
3285
3941
  orderType,
3942
+ groupEntity,
3286
3943
  enforceDateFilter,
3944
+ fulfillmentType,
3945
+ orderingSource,
3946
+ channelAccountId,
3287
3947
  requestHeaders,
3288
3948
  } = { requestHeaders: {} },
3289
3949
  { responseHeaders } = { responseHeaders: false }
@@ -3292,6 +3952,7 @@ class Order {
3292
3952
  {
3293
3953
  lane,
3294
3954
  bagStatus,
3955
+ statusAssigned,
3295
3956
  statusOverrideLane,
3296
3957
  timeToDispatch,
3297
3958
  searchType,
@@ -3300,6 +3961,8 @@ class Order {
3300
3961
  toDate,
3301
3962
  startDate,
3302
3963
  endDate,
3964
+ statusAssignedStartDate,
3965
+ statusAssignedEndDate,
3303
3966
  dpIds,
3304
3967
  stores,
3305
3968
  salesChannels,
@@ -3321,7 +3984,11 @@ class Order {
3321
3984
  tags,
3322
3985
  customerId,
3323
3986
  orderType,
3987
+ groupEntity,
3324
3988
  enforceDateFilter,
3989
+ fulfillmentType,
3990
+ orderingSource,
3991
+ channelAccountId,
3325
3992
  },
3326
3993
  { abortEarly: false, allowUnknown: true }
3327
3994
  );
@@ -3334,6 +4001,7 @@ class Order {
3334
4001
  {
3335
4002
  lane,
3336
4003
  bagStatus,
4004
+ statusAssigned,
3337
4005
  statusOverrideLane,
3338
4006
  timeToDispatch,
3339
4007
  searchType,
@@ -3342,6 +4010,8 @@ class Order {
3342
4010
  toDate,
3343
4011
  startDate,
3344
4012
  endDate,
4013
+ statusAssignedStartDate,
4014
+ statusAssignedEndDate,
3345
4015
  dpIds,
3346
4016
  stores,
3347
4017
  salesChannels,
@@ -3363,7 +4033,11 @@ class Order {
3363
4033
  tags,
3364
4034
  customerId,
3365
4035
  orderType,
4036
+ groupEntity,
3366
4037
  enforceDateFilter,
4038
+ fulfillmentType,
4039
+ orderingSource,
4040
+ channelAccountId,
3367
4041
  },
3368
4042
  { abortEarly: false, allowUnknown: false }
3369
4043
  );
@@ -3377,6 +4051,7 @@ class Order {
3377
4051
  const query_params = {};
3378
4052
  query_params["lane"] = lane;
3379
4053
  query_params["bag_status"] = bagStatus;
4054
+ query_params["status_assigned"] = statusAssigned;
3380
4055
  query_params["status_override_lane"] = statusOverrideLane;
3381
4056
  query_params["time_to_dispatch"] = timeToDispatch;
3382
4057
  query_params["search_type"] = searchType;
@@ -3385,6 +4060,8 @@ class Order {
3385
4060
  query_params["to_date"] = toDate;
3386
4061
  query_params["start_date"] = startDate;
3387
4062
  query_params["end_date"] = endDate;
4063
+ query_params["status_assigned_start_date"] = statusAssignedStartDate;
4064
+ query_params["status_assigned_end_date"] = statusAssignedEndDate;
3388
4065
  query_params["dp_ids"] = dpIds;
3389
4066
  query_params["stores"] = stores;
3390
4067
  query_params["sales_channels"] = salesChannels;
@@ -3406,7 +4083,11 @@ class Order {
3406
4083
  query_params["tags"] = tags;
3407
4084
  query_params["customer_id"] = customerId;
3408
4085
  query_params["order_type"] = orderType;
4086
+ query_params["group_entity"] = groupEntity;
3409
4087
  query_params["enforce_date_filter"] = enforceDateFilter;
4088
+ query_params["fulfillment_type"] = fulfillmentType;
4089
+ query_params["ordering_source"] = orderingSource;
4090
+ query_params["channel_account_id"] = channelAccountId;
3410
4091
 
3411
4092
  const xHeaders = {};
3412
4093
 
@@ -3427,7 +4108,7 @@ class Order {
3427
4108
 
3428
4109
  const {
3429
4110
  error: res_error,
3430
- } = OrderPlatformModel.ShipmentInternalPlatformViewResponse().validate(
4111
+ } = OrderPlatformModel.ShipmentInternalPlatformViewResponseSchema().validate(
3431
4112
  responseData,
3432
4113
  { abortEarly: false, allowUnknown: true }
3433
4114
  );
@@ -3446,6 +4127,189 @@ class Order {
3446
4127
  return response;
3447
4128
  }
3448
4129
 
4130
+ /**
4131
+ * @param {Object} arg - Arg object.
4132
+ * @param {string} [arg.lane] - Name of lane for which data is to be fetched
4133
+ * @param {string} [arg.bagStatus] - Comma separated values of bag statuses.
4134
+ * @param {string} [arg.statusAssigned] - Used to filter shipments based on
4135
+ * status present in shipment_status_history. For more information on
4136
+ * these statuses, refer to the Fynd Partners documentation.
4137
+ * @param {boolean} [arg.statusOverrideLane] - Use this flag to fetch by
4138
+ * bag_status and override lane.
4139
+ * @param {number} [arg.timeToDispatch] - Indicates the time to dispatch.
4140
+ * @param {string} [arg.searchType] - Specifies the key used to determine
4141
+ * the type of search being performed.
4142
+ * @param {string} [arg.searchValue] - The value corresponding to the search
4143
+ * type, such as a specific shipment ID or order ID.
4144
+ * @param {string} [arg.fromDate] - Start Date in DD-MM-YYYY format
4145
+ * @param {string} [arg.toDate] - End Date in DD-MM-YYYY format
4146
+ * @param {string} [arg.startDate] - The UTC start date in ISO format
4147
+ * (YYYY-MM-DDTHH:MM:SSZ) for filtering results.
4148
+ * @param {string} [arg.endDate] - The UTC end date in ISO format
4149
+ * (YYYY-MM-DDTHH:MM:SSZ) for filtering results.
4150
+ * @param {string} [arg.statusAssignedStartDate] - Specifies the starting
4151
+ * UTC date and time (in ISO format, YYYY-MM-DDTHH:MM:SSZ) to define the
4152
+ * lower boundary for filtering shipments based on the `created_at`
4153
+ * timestamp of statuses in the shipment's status history. It allows
4154
+ * filtering statuses that were created within a specific time range.
4155
+ * @param {string} [arg.statusAssignedEndDate] - Specifies the ending UTC
4156
+ * date and time (in ISO format, YYYY-MM-DDTHH:MM:SSZ) to define the upper
4157
+ * boundary for filtering shipments based on the `created_at` timestamp of
4158
+ * statuses in the shipment's status history.
4159
+ * @param {string} [arg.dpIds] - A comma-separated list of delivery partner
4160
+ * IDs to filter results by specific delivery partners.
4161
+ * @param {string} [arg.stores] - A comma-separated list of store IDs used
4162
+ * to filter results to only those related to specific stores.
4163
+ * @param {string} [arg.salesChannels] - A comma-separated list of sales
4164
+ * channel IDs to filter results based on the sales channels involved.
4165
+ * @param {number} [arg.pageSize] - Determines the number of results
4166
+ * returned per page.
4167
+ * @param {boolean} [arg.fetchActiveShipment] - A boolean flag that
4168
+ * indicates whether to include only active shipments in the results.
4169
+ * @param {boolean} [arg.allowInactive] - A flag indicating whether to allow
4170
+ * the inclusion of inactive shipments in the results.
4171
+ * @param {boolean} [arg.excludeLockedShipments] - A flag to specify whether
4172
+ * to exclude shipments that are locked from the results.
4173
+ * @param {string} [arg.paymentMethods] - A comma-separated list of payment methods.
4174
+ * @param {string} [arg.channelShipmentId] - The shipment ID used in the
4175
+ * application, which can be used to reference specific shipments.
4176
+ * @param {string} [arg.channelOrderId] - The order ID used in the application.
4177
+ * @param {string} [arg.customMeta] - Custom metadata associated with the
4178
+ * query, allowing for additional filtering or information to be passed.
4179
+ * @param {string} [arg.orderingChannel] - The channel through which the
4180
+ * order was placed.
4181
+ * @param {string} [arg.companyAffiliateTag] - A tag used to identify the
4182
+ * company's affiliation for filtering or reporting purposes.
4183
+ * @param {boolean} [arg.myOrders] - A boolean flag indicating whether the
4184
+ * query should return only the user's orders.
4185
+ * @param {string} [arg.platformUserId] - The unique identifier of the user
4186
+ * on the platform, useful for filtering orders related to a specific user.
4187
+ * @param {string} [arg.sortType] - Determines the sorting order of the
4188
+ * results based on specific criteria.
4189
+ * @param {boolean} [arg.showCrossCompanyData] - A flag indicating whether
4190
+ * to include data from both cross-company and non-cross-company orders in
4191
+ * the results.
4192
+ * @param {string} [arg.tags] - A comma-separated list of tags associated
4193
+ * with the orders to filter results based on specific characteristics.
4194
+ * @param {string} [arg.customerId] - The unique identifier for the customer
4195
+ * associated with the query, useful for filtering results to a specific customer.
4196
+ * @param {string} [arg.orderType] - The type of order being queried.
4197
+ * @param {string} [arg.groupEntity] - Defines the grouping criterion for
4198
+ * retrieving shipments or orders. It specifies whether the results should
4199
+ * be organized based on shipment groups or order groups. For example,
4200
+ * using 'shipments' groups results by shipment, while an invalid value
4201
+ * like 'abcd' may not be recognized, leading to errors or default behavior.
4202
+ * @param {boolean} [arg.enforceDateFilter] - Applies a date filter for
4203
+ * listing shipments. This is useful when fetching data for a specific
4204
+ * date range while performing searches.
4205
+ * @param {string} [arg.fulfillmentType] - Define the Fulfillment Type for
4206
+ * Listing Orders, This is use when we want to get list of shipments or
4207
+ * orders by cross store or cross company or fulfilling Store (by
4208
+ * default), this is also depends on the login user accessType and store access
4209
+ * @param {string} [arg.orderingSource] - Filter orders by ordering source.
4210
+ * Accepts comma-separated values for multiple sources.
4211
+ * @param {string} [arg.channelAccountId] - Comma-separated channel account
4212
+ * IDs to filter orders by specific channel accounts.
4213
+ * @returns {Paginator<OrderPlatformModel.ShipmentInternalPlatformViewResponseSchema>}
4214
+ * @summary: List shipments
4215
+ * @description: Get a list of shipments based on the filters provided
4216
+ */
4217
+ getShipmentsPaginator({
4218
+ lane,
4219
+ bagStatus,
4220
+ statusAssigned,
4221
+ statusOverrideLane,
4222
+ timeToDispatch,
4223
+ searchType,
4224
+ searchValue,
4225
+ fromDate,
4226
+ toDate,
4227
+ startDate,
4228
+ endDate,
4229
+ statusAssignedStartDate,
4230
+ statusAssignedEndDate,
4231
+ dpIds,
4232
+ stores,
4233
+ salesChannels,
4234
+ pageSize,
4235
+ fetchActiveShipment,
4236
+ allowInactive,
4237
+ excludeLockedShipments,
4238
+ paymentMethods,
4239
+ channelShipmentId,
4240
+ channelOrderId,
4241
+ customMeta,
4242
+ orderingChannel,
4243
+ companyAffiliateTag,
4244
+ myOrders,
4245
+ platformUserId,
4246
+ sortType,
4247
+ showCrossCompanyData,
4248
+ tags,
4249
+ customerId,
4250
+ orderType,
4251
+ groupEntity,
4252
+ enforceDateFilter,
4253
+ fulfillmentType,
4254
+ orderingSource,
4255
+ channelAccountId,
4256
+ } = {}) {
4257
+ const paginator = new Paginator();
4258
+ const callback = async () => {
4259
+ const pageId = paginator.nextId;
4260
+ const pageNo = paginator.pageNo;
4261
+ const pageType = "number";
4262
+ const data = await this.getShipments({
4263
+ lane: lane,
4264
+ bagStatus: bagStatus,
4265
+ statusAssigned: statusAssigned,
4266
+ statusOverrideLane: statusOverrideLane,
4267
+ timeToDispatch: timeToDispatch,
4268
+ searchType: searchType,
4269
+ searchValue: searchValue,
4270
+ fromDate: fromDate,
4271
+ toDate: toDate,
4272
+ startDate: startDate,
4273
+ endDate: endDate,
4274
+ statusAssignedStartDate: statusAssignedStartDate,
4275
+ statusAssignedEndDate: statusAssignedEndDate,
4276
+ dpIds: dpIds,
4277
+ stores: stores,
4278
+ salesChannels: salesChannels,
4279
+ pageNo: pageNo,
4280
+ pageSize: pageSize,
4281
+ fetchActiveShipment: fetchActiveShipment,
4282
+ allowInactive: allowInactive,
4283
+ excludeLockedShipments: excludeLockedShipments,
4284
+ paymentMethods: paymentMethods,
4285
+ channelShipmentId: channelShipmentId,
4286
+ channelOrderId: channelOrderId,
4287
+ customMeta: customMeta,
4288
+ orderingChannel: orderingChannel,
4289
+ companyAffiliateTag: companyAffiliateTag,
4290
+ myOrders: myOrders,
4291
+ platformUserId: platformUserId,
4292
+ sortType: sortType,
4293
+ showCrossCompanyData: showCrossCompanyData,
4294
+ tags: tags,
4295
+ customerId: customerId,
4296
+ orderType: orderType,
4297
+ groupEntity: groupEntity,
4298
+ enforceDateFilter: enforceDateFilter,
4299
+ fulfillmentType: fulfillmentType,
4300
+ orderingSource: orderingSource,
4301
+ channelAccountId: channelAccountId,
4302
+ });
4303
+ paginator.setPaginator({
4304
+ hasNext: data.page.has_next ? true : false,
4305
+ nextId: data.page.next_id,
4306
+ });
4307
+ return data;
4308
+ };
4309
+ paginator.setCallback(callback.bind(this));
4310
+ return paginator;
4311
+ }
4312
+
3449
4313
  /**
3450
4314
  * @param {OrderPlatformValidator.GetStateManagerConfigParam} arg - Arg object
3451
4315
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -3455,16 +4319,19 @@ class Order {
3455
4319
  * @summary: Retrieves Entity State Manager configuration which includes flags, hooks, and filters, for a specific application within a company's setup.
3456
4320
  * @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.
3457
4321
  * 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.
3458
- * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getStateManagerConfig/).
4322
+ * - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/getStateManagerConfig/).
3459
4323
  */
3460
4324
  async getStateManagerConfig(
3461
- { appId, orderingChannel, entity, requestHeaders } = { requestHeaders: {} },
4325
+ { appId, orderingChannel, orderingSource, entity, requestHeaders } = {
4326
+ requestHeaders: {},
4327
+ },
3462
4328
  { responseHeaders } = { responseHeaders: false }
3463
4329
  ) {
3464
4330
  const { error } = OrderPlatformValidator.getStateManagerConfig().validate(
3465
4331
  {
3466
4332
  appId,
3467
4333
  orderingChannel,
4334
+ orderingSource,
3468
4335
  entity,
3469
4336
  },
3470
4337
  { abortEarly: false, allowUnknown: true }
@@ -3480,6 +4347,7 @@ class Order {
3480
4347
  {
3481
4348
  appId,
3482
4349
  orderingChannel,
4350
+ orderingSource,
3483
4351
  entity,
3484
4352
  },
3485
4353
  { abortEarly: false, allowUnknown: false }
@@ -3494,6 +4362,7 @@ class Order {
3494
4362
  const query_params = {};
3495
4363
  query_params["app_id"] = appId;
3496
4364
  query_params["ordering_channel"] = orderingChannel;
4365
+ query_params["ordering_source"] = orderingSource;
3497
4366
  query_params["entity"] = entity;
3498
4367
 
3499
4368
  const xHeaders = {};
@@ -3539,7 +4408,7 @@ class Order {
3539
4408
  * @returns {Promise<OrderPlatformModel.BagStateTransitionMap>} - Success response
3540
4409
  * @name getStateTransitionMap
3541
4410
  * @summary: Get state transition map
3542
- * @description: Retrieve a map of state transitions for orders - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getStateTransitionMap/).
4411
+ * @description: Retrieve a map of state transitions for orders - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/getStateTransitionMap/).
3543
4412
  */
3544
4413
  async getStateTransitionMap(
3545
4414
  { requestHeaders } = { requestHeaders: {} },
@@ -3611,10 +4480,11 @@ class Order {
3611
4480
  * @param {OrderPlatformValidator.GetTemplateParam} arg - Arg object
3612
4481
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3613
4482
  * @param {import("../PlatformAPIClient").Options} - Options
3614
- * @returns {Promise<OrderPlatformModel.TemplateDownloadResponse>} - Success response
4483
+ * @returns {Promise<OrderPlatformModel.TemplateDownloadResponseSchema>} -
4484
+ * Success response
3615
4485
  * @name getTemplate
3616
4486
  * @summary: Download bulk operation templates
3617
- * @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/).
4487
+ * @description: Get the excel or CSV file URL for the template. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/getTemplate/).
3618
4488
  */
3619
4489
  async getTemplate(
3620
4490
  { templateName, requestHeaders } = { requestHeaders: {} },
@@ -3665,10 +4535,10 @@ class Order {
3665
4535
 
3666
4536
  const {
3667
4537
  error: res_error,
3668
- } = OrderPlatformModel.TemplateDownloadResponse().validate(responseData, {
3669
- abortEarly: false,
3670
- allowUnknown: true,
3671
- });
4538
+ } = OrderPlatformModel.TemplateDownloadResponseSchema().validate(
4539
+ responseData,
4540
+ { abortEarly: false, allowUnknown: true }
4541
+ );
3672
4542
 
3673
4543
  if (res_error) {
3674
4544
  if (this.config.options.strictResponseCheck === true) {
@@ -3688,10 +4558,10 @@ class Order {
3688
4558
  * @param {OrderPlatformValidator.GetfiltersParam} arg - Arg object
3689
4559
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3690
4560
  * @param {import("../PlatformAPIClient").Options} - Options
3691
- * @returns {Promise<OrderPlatformModel.FiltersResponse>} - Success response
4561
+ * @returns {Promise<OrderPlatformModel.FiltersResponseSchema>} - Success response
3692
4562
  * @name getfilters
3693
4563
  * @summary: List filters
3694
- * @description: Get supported filters for various listing operations - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getfilters/).
4564
+ * @description: Get supported filters for various listing operations - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/getfilters/).
3695
4565
  */
3696
4566
  async getfilters(
3697
4567
  { view, groupEntity, requestHeaders } = { requestHeaders: {} },
@@ -3746,7 +4616,7 @@ class Order {
3746
4616
 
3747
4617
  const {
3748
4618
  error: res_error,
3749
- } = OrderPlatformModel.FiltersResponse().validate(responseData, {
4619
+ } = OrderPlatformModel.FiltersResponseSchema().validate(responseData, {
3750
4620
  abortEarly: false,
3751
4621
  allowUnknown: true,
3752
4622
  });
@@ -3766,22 +4636,21 @@ class Order {
3766
4636
  }
3767
4637
 
3768
4638
  /**
3769
- * @param {OrderPlatformValidator.InvalidateShipmentCacheParam} arg - Arg object
4639
+ * @param {OrderPlatformValidator.JobDetailsParam} arg - Arg object
3770
4640
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3771
4641
  * @param {import("../PlatformAPIClient").Options} - Options
3772
- * @returns {Promise<OrderPlatformModel.InvalidateShipmentCacheResponse>} -
3773
- * Success response
3774
- * @name invalidateShipmentCache
3775
- * @summary: Invalidate shipment cache
3776
- * @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/).
4642
+ * @returns {Promise<OrderPlatformModel.JobDetailsResponseSchema>} - Success response
4643
+ * @name jobDetails
4644
+ * @summary: Get bulk operation details
4645
+ * @description: Fetches details of the job for the provided batch Id - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/jobDetails/).
3777
4646
  */
3778
- async invalidateShipmentCache(
3779
- { body, requestHeaders } = { requestHeaders: {} },
4647
+ async jobDetails(
4648
+ { batchId, requestHeaders } = { requestHeaders: {} },
3780
4649
  { responseHeaders } = { responseHeaders: false }
3781
4650
  ) {
3782
- const { error } = OrderPlatformValidator.invalidateShipmentCache().validate(
4651
+ const { error } = OrderPlatformValidator.jobDetails().validate(
3783
4652
  {
3784
- body,
4653
+ batchId,
3785
4654
  },
3786
4655
  { abortEarly: false, allowUnknown: true }
3787
4656
  );
@@ -3790,18 +4659,16 @@ class Order {
3790
4659
  }
3791
4660
 
3792
4661
  // Showing warrnings if extra unknown parameters are found
3793
- const {
3794
- error: warrning,
3795
- } = OrderPlatformValidator.invalidateShipmentCache().validate(
4662
+ const { error: warrning } = OrderPlatformValidator.jobDetails().validate(
3796
4663
  {
3797
- body,
4664
+ batchId,
3798
4665
  },
3799
4666
  { abortEarly: false, allowUnknown: false }
3800
4667
  );
3801
4668
  if (warrning) {
3802
4669
  Logger({
3803
4670
  level: "WARN",
3804
- message: `Parameter Validation warrnings for platform > Order > invalidateShipmentCache \n ${warrning}`,
4671
+ message: `Parameter Validation warrnings for platform > Order > jobDetails \n ${warrning}`,
3805
4672
  });
3806
4673
  }
3807
4674
 
@@ -3811,10 +4678,10 @@ class Order {
3811
4678
 
3812
4679
  const response = await PlatformAPIClient.execute(
3813
4680
  this.config,
3814
- "put",
3815
- `/service/platform/order-manage/v1.0/company/${this.config.companyId}/update-cache`,
4681
+ "get",
4682
+ `/service/platform/order-manage/v1.0/company/${this.config.companyId}/jobs/${batchId}`,
3816
4683
  query_params,
3817
- body,
4684
+ undefined,
3818
4685
  { ...xHeaders, ...requestHeaders },
3819
4686
  { responseHeaders }
3820
4687
  );
@@ -3826,10 +4693,10 @@ class Order {
3826
4693
 
3827
4694
  const {
3828
4695
  error: res_error,
3829
- } = OrderPlatformModel.InvalidateShipmentCacheResponse().validate(
3830
- responseData,
3831
- { abortEarly: false, allowUnknown: true }
3832
- );
4696
+ } = OrderPlatformModel.JobDetailsResponseSchema().validate(responseData, {
4697
+ abortEarly: false,
4698
+ allowUnknown: true,
4699
+ });
3833
4700
 
3834
4701
  if (res_error) {
3835
4702
  if (this.config.options.strictResponseCheck === true) {
@@ -3837,7 +4704,7 @@ class Order {
3837
4704
  } else {
3838
4705
  Logger({
3839
4706
  level: "WARN",
3840
- message: `Response Validation Warnings for platform > Order > invalidateShipmentCache \n ${res_error}`,
4707
+ message: `Response Validation Warnings for platform > Order > jobDetails \n ${res_error}`,
3841
4708
  });
3842
4709
  }
3843
4710
  }
@@ -3846,21 +4713,22 @@ class Order {
3846
4713
  }
3847
4714
 
3848
4715
  /**
3849
- * @param {OrderPlatformValidator.JobDetailsParam} arg - Arg object
4716
+ * @param {OrderPlatformValidator.ListAccountsParam} arg - Arg object
3850
4717
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3851
4718
  * @param {import("../PlatformAPIClient").Options} - Options
3852
- * @returns {Promise<OrderPlatformModel.JobDetailsResponse>} - Success response
3853
- * @name jobDetails
3854
- * @summary: Get bulk operation details
3855
- * @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/).
4719
+ * @returns {Promise<OrderPlatformModel.AccountsList>} - Success response
4720
+ * @name listAccounts
4721
+ * @summary: Get channel accounts list
4722
+ * @description: Retrieves a paginated list of all channel accounts configured for the company. Channel accounts represent different sales channels or marketplace integrations from which orders are received. This endpoint returns account details including the account ID, company ID, and channel account name for each configured channel. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/listAccounts/).
3856
4723
  */
3857
- async jobDetails(
3858
- { batchId, requestHeaders } = { requestHeaders: {} },
4724
+ async listAccounts(
4725
+ { page, size, requestHeaders } = { requestHeaders: {} },
3859
4726
  { responseHeaders } = { responseHeaders: false }
3860
4727
  ) {
3861
- const { error } = OrderPlatformValidator.jobDetails().validate(
4728
+ const { error } = OrderPlatformValidator.listAccounts().validate(
3862
4729
  {
3863
- batchId,
4730
+ page,
4731
+ size,
3864
4732
  },
3865
4733
  { abortEarly: false, allowUnknown: true }
3866
4734
  );
@@ -3869,27 +4737,30 @@ class Order {
3869
4737
  }
3870
4738
 
3871
4739
  // Showing warrnings if extra unknown parameters are found
3872
- const { error: warrning } = OrderPlatformValidator.jobDetails().validate(
4740
+ const { error: warrning } = OrderPlatformValidator.listAccounts().validate(
3873
4741
  {
3874
- batchId,
4742
+ page,
4743
+ size,
3875
4744
  },
3876
4745
  { abortEarly: false, allowUnknown: false }
3877
4746
  );
3878
4747
  if (warrning) {
3879
4748
  Logger({
3880
4749
  level: "WARN",
3881
- message: `Parameter Validation warrnings for platform > Order > jobDetails \n ${warrning}`,
4750
+ message: `Parameter Validation warrnings for platform > Order > listAccounts \n ${warrning}`,
3882
4751
  });
3883
4752
  }
3884
4753
 
3885
4754
  const query_params = {};
4755
+ query_params["page"] = page;
4756
+ query_params["size"] = size;
3886
4757
 
3887
4758
  const xHeaders = {};
3888
4759
 
3889
4760
  const response = await PlatformAPIClient.execute(
3890
4761
  this.config,
3891
4762
  "get",
3892
- `/service/platform/order-manage/v1.0/company/${this.config.companyId}/jobs/${batchId}`,
4763
+ `/service/platform/order-manage/v1.0/company/${this.config.companyId}/account`,
3893
4764
  query_params,
3894
4765
  undefined,
3895
4766
  { ...xHeaders, ...requestHeaders },
@@ -3903,7 +4774,7 @@ class Order {
3903
4774
 
3904
4775
  const {
3905
4776
  error: res_error,
3906
- } = OrderPlatformModel.JobDetailsResponse().validate(responseData, {
4777
+ } = OrderPlatformModel.AccountsList().validate(responseData, {
3907
4778
  abortEarly: false,
3908
4779
  allowUnknown: true,
3909
4780
  });
@@ -3914,7 +4785,7 @@ class Order {
3914
4785
  } else {
3915
4786
  Logger({
3916
4787
  level: "WARN",
3917
- message: `Response Validation Warnings for platform > Order > jobDetails \n ${res_error}`,
4788
+ message: `Response Validation Warnings for platform > Order > listAccounts \n ${res_error}`,
3918
4789
  });
3919
4790
  }
3920
4791
  }
@@ -3929,7 +4800,7 @@ class Order {
3929
4800
  * @returns {Promise<OrderPlatformModel.ResponseDetail>} - Success response
3930
4801
  * @name orderUpdate
3931
4802
  * @summary: Update an order
3932
- * @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/).
4803
+ * @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://docs.fynd.com/partners/commerce/sdk/platform/order/orderUpdate/).
3933
4804
  */
3934
4805
  async orderUpdate(
3935
4806
  { body, requestHeaders } = { requestHeaders: {} },
@@ -4003,10 +4874,11 @@ class Order {
4003
4874
  * @param {OrderPlatformValidator.PostShipmentHistoryParam} arg - Arg object
4004
4875
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4005
4876
  * @param {import("../PlatformAPIClient").Options} - Options
4006
- * @returns {Promise<OrderPlatformModel.ShipmentHistoryResponse>} - Success response
4877
+ * @returns {Promise<OrderPlatformModel.ShipmentHistoryResponseSchema>} -
4878
+ * Success response
4007
4879
  * @name postShipmentHistory
4008
4880
  * @summary: Create shipment history
4009
- * @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/).
4881
+ * @description: Used to add logs in history for a bag for the provided Shipment ID - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/postShipmentHistory/).
4010
4882
  */
4011
4883
  async postShipmentHistory(
4012
4884
  { body, requestHeaders } = { requestHeaders: {} },
@@ -4059,10 +4931,10 @@ class Order {
4059
4931
 
4060
4932
  const {
4061
4933
  error: res_error,
4062
- } = OrderPlatformModel.ShipmentHistoryResponse().validate(responseData, {
4063
- abortEarly: false,
4064
- allowUnknown: true,
4065
- });
4934
+ } = OrderPlatformModel.ShipmentHistoryResponseSchema().validate(
4935
+ responseData,
4936
+ { abortEarly: false, allowUnknown: true }
4937
+ );
4066
4938
 
4067
4939
  if (res_error) {
4068
4940
  if (this.config.options.strictResponseCheck === true) {
@@ -4082,10 +4954,11 @@ class Order {
4082
4954
  * @param {OrderPlatformValidator.ReassignLocationParam} arg - Arg object
4083
4955
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4084
4956
  * @param {import("../PlatformAPIClient").Options} - Options
4085
- * @returns {Promise<OrderPlatformModel.StoreReassignResponse>} - Success response
4957
+ * @returns {Promise<OrderPlatformModel.StoreReassignResponseSchema>} -
4958
+ * Success response
4086
4959
  * @name reassignLocation
4087
4960
  * @summary: Reassign location
4088
- * @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/).
4961
+ * @description: Reassign the shipment to a another location and update its status to 'Store Reassigned.' - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/reassignLocation/).
4089
4962
  */
4090
4963
  async reassignLocation(
4091
4964
  { body, requestHeaders } = { requestHeaders: {} },
@@ -4138,10 +5011,10 @@ class Order {
4138
5011
 
4139
5012
  const {
4140
5013
  error: res_error,
4141
- } = OrderPlatformModel.StoreReassignResponse().validate(responseData, {
4142
- abortEarly: false,
4143
- allowUnknown: true,
4144
- });
5014
+ } = OrderPlatformModel.StoreReassignResponseSchema().validate(
5015
+ responseData,
5016
+ { abortEarly: false, allowUnknown: true }
5017
+ );
4145
5018
 
4146
5019
  if (res_error) {
4147
5020
  if (this.config.options.strictResponseCheck === true) {
@@ -4158,20 +5031,27 @@ class Order {
4158
5031
  }
4159
5032
 
4160
5033
  /**
4161
- * @param {OrderPlatformValidator.SendSmsNinjaParam} arg - Arg object
5034
+ * @param {OrderPlatformValidator.RequestCourierPartnerForShipmentParam} arg
5035
+ * - Arg object
5036
+ *
4162
5037
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4163
5038
  * @param {import("../PlatformAPIClient").Options} - Options
4164
- * @returns {Promise<OrderPlatformModel.BaseResponse>} - Success response
4165
- * @name sendSmsNinja
4166
- * @summary: Send SMS
4167
- * @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/).
5039
+ * @returns {Promise<OrderPlatformModel.CourierPartnerResponseSchema>} -
5040
+ * Success response
5041
+ * @name requestCourierPartnerForShipment
5042
+ * @summary: Manually request a courier partner for a shipment.
5043
+ * @description: Use this API to manually assign a courier partner (delivery partner) to a shipment.
5044
+ * - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/requestCourierPartnerForShipment/).
4168
5045
  */
4169
- async sendSmsNinja(
4170
- { body, requestHeaders } = { requestHeaders: {} },
5046
+ async requestCourierPartnerForShipment(
5047
+ { shipmentId, body, requestHeaders } = { requestHeaders: {} },
4171
5048
  { responseHeaders } = { responseHeaders: false }
4172
5049
  ) {
4173
- const { error } = OrderPlatformValidator.sendSmsNinja().validate(
5050
+ const {
5051
+ error,
5052
+ } = OrderPlatformValidator.requestCourierPartnerForShipment().validate(
4174
5053
  {
5054
+ shipmentId,
4175
5055
  body,
4176
5056
  },
4177
5057
  { abortEarly: false, allowUnknown: true }
@@ -4181,8 +5061,11 @@ class Order {
4181
5061
  }
4182
5062
 
4183
5063
  // Showing warrnings if extra unknown parameters are found
4184
- const { error: warrning } = OrderPlatformValidator.sendSmsNinja().validate(
5064
+ const {
5065
+ error: warrning,
5066
+ } = OrderPlatformValidator.requestCourierPartnerForShipment().validate(
4185
5067
  {
5068
+ shipmentId,
4186
5069
  body,
4187
5070
  },
4188
5071
  { abortEarly: false, allowUnknown: false }
@@ -4190,7 +5073,7 @@ class Order {
4190
5073
  if (warrning) {
4191
5074
  Logger({
4192
5075
  level: "WARN",
4193
- message: `Parameter Validation warrnings for platform > Order > sendSmsNinja \n ${warrning}`,
5076
+ message: `Parameter Validation warrnings for platform > Order > requestCourierPartnerForShipment \n ${warrning}`,
4194
5077
  });
4195
5078
  }
4196
5079
 
@@ -4201,7 +5084,7 @@ class Order {
4201
5084
  const response = await PlatformAPIClient.execute(
4202
5085
  this.config,
4203
5086
  "post",
4204
- `/service/platform/order-manage/v1.0/company/${this.config.companyId}/ninja/send-sms`,
5087
+ `/service/platform/order-manage/v1.0/company/${this.config.companyId}/shipment/${shipmentId}/courier-partner/request`,
4205
5088
  query_params,
4206
5089
  body,
4207
5090
  { ...xHeaders, ...requestHeaders },
@@ -4215,10 +5098,10 @@ class Order {
4215
5098
 
4216
5099
  const {
4217
5100
  error: res_error,
4218
- } = OrderPlatformModel.BaseResponse().validate(responseData, {
4219
- abortEarly: false,
4220
- allowUnknown: true,
4221
- });
5101
+ } = OrderPlatformModel.CourierPartnerResponseSchema().validate(
5102
+ responseData,
5103
+ { abortEarly: false, allowUnknown: true }
5104
+ );
4222
5105
 
4223
5106
  if (res_error) {
4224
5107
  if (this.config.options.strictResponseCheck === true) {
@@ -4226,7 +5109,7 @@ class Order {
4226
5109
  } else {
4227
5110
  Logger({
4228
5111
  level: "WARN",
4229
- message: `Response Validation Warnings for platform > Order > sendSmsNinja \n ${res_error}`,
5112
+ message: `Response Validation Warnings for platform > Order > requestCourierPartnerForShipment \n ${res_error}`,
4230
5113
  });
4231
5114
  }
4232
5115
  }
@@ -4235,20 +5118,27 @@ class Order {
4235
5118
  }
4236
5119
 
4237
5120
  /**
4238
- * @param {OrderPlatformValidator.SendUserMobileOTPParam} arg - Arg object
5121
+ * @param {OrderPlatformValidator.SaveCourierPartnerPreferenceForShipmentParam} arg
5122
+ * - Arg object
5123
+ *
4239
5124
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4240
5125
  * @param {import("../PlatformAPIClient").Options} - Options
4241
- * @returns {Promise<OrderPlatformModel.SendUserMobileOtpResponse>} - Success response
4242
- * @name sendUserMobileOTP
4243
- * @summary: Send user mobile OTP
4244
- * @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/).
5126
+ * @returns {Promise<OrderPlatformModel.CourierPartnerResponseSchema>} -
5127
+ * Success response
5128
+ * @name saveCourierPartnerPreferenceForShipment
5129
+ * @summary: Save courier partner preference for a shipment.
5130
+ * @description: Use this API to save the preferred courier partner for a shipment. The preferred courier partner will be triggered automatically when the shipment moves to a state where delivery partner assignment is performed (for example, ready for DP assignment).
5131
+ * - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/saveCourierPartnerPreferenceForShipment/).
4245
5132
  */
4246
- async sendUserMobileOTP(
4247
- { body, requestHeaders } = { requestHeaders: {} },
5133
+ async saveCourierPartnerPreferenceForShipment(
5134
+ { shipmentId, body, requestHeaders } = { requestHeaders: {} },
4248
5135
  { responseHeaders } = { responseHeaders: false }
4249
5136
  ) {
4250
- const { error } = OrderPlatformValidator.sendUserMobileOTP().validate(
5137
+ const {
5138
+ error,
5139
+ } = OrderPlatformValidator.saveCourierPartnerPreferenceForShipment().validate(
4251
5140
  {
5141
+ shipmentId,
4252
5142
  body,
4253
5143
  },
4254
5144
  { abortEarly: false, allowUnknown: true }
@@ -4260,8 +5150,9 @@ class Order {
4260
5150
  // Showing warrnings if extra unknown parameters are found
4261
5151
  const {
4262
5152
  error: warrning,
4263
- } = OrderPlatformValidator.sendUserMobileOTP().validate(
5153
+ } = OrderPlatformValidator.saveCourierPartnerPreferenceForShipment().validate(
4264
5154
  {
5155
+ shipmentId,
4265
5156
  body,
4266
5157
  },
4267
5158
  { abortEarly: false, allowUnknown: false }
@@ -4269,7 +5160,7 @@ class Order {
4269
5160
  if (warrning) {
4270
5161
  Logger({
4271
5162
  level: "WARN",
4272
- message: `Parameter Validation warrnings for platform > Order > sendUserMobileOTP \n ${warrning}`,
5163
+ message: `Parameter Validation warrnings for platform > Order > saveCourierPartnerPreferenceForShipment \n ${warrning}`,
4273
5164
  });
4274
5165
  }
4275
5166
 
@@ -4280,7 +5171,7 @@ class Order {
4280
5171
  const response = await PlatformAPIClient.execute(
4281
5172
  this.config,
4282
5173
  "post",
4283
- `/service/platform/order-manage/v1.0/company/${this.config.companyId}/user/send/otp/mobile`,
5174
+ `/service/platform/order-manage/v1.0/company/${this.config.companyId}/shipment/${shipmentId}/courier-partner/preference`,
4284
5175
  query_params,
4285
5176
  body,
4286
5177
  { ...xHeaders, ...requestHeaders },
@@ -4294,10 +5185,10 @@ class Order {
4294
5185
 
4295
5186
  const {
4296
5187
  error: res_error,
4297
- } = OrderPlatformModel.SendUserMobileOtpResponse().validate(responseData, {
4298
- abortEarly: false,
4299
- allowUnknown: true,
4300
- });
5188
+ } = OrderPlatformModel.CourierPartnerResponseSchema().validate(
5189
+ responseData,
5190
+ { abortEarly: false, allowUnknown: true }
5191
+ );
4301
5192
 
4302
5193
  if (res_error) {
4303
5194
  if (this.config.options.strictResponseCheck === true) {
@@ -4305,7 +5196,7 @@ class Order {
4305
5196
  } else {
4306
5197
  Logger({
4307
5198
  level: "WARN",
4308
- message: `Response Validation Warnings for platform > Order > sendUserMobileOTP \n ${res_error}`,
5199
+ message: `Response Validation Warnings for platform > Order > saveCourierPartnerPreferenceForShipment \n ${res_error}`,
4309
5200
  });
4310
5201
  }
4311
5202
  }
@@ -4314,27 +5205,21 @@ class Order {
4314
5205
  }
4315
5206
 
4316
5207
  /**
4317
- * @param {OrderPlatformValidator.TrackShipmentParam} arg - Arg object
5208
+ * @param {OrderPlatformValidator.SendSmsNinjaParam} arg - Arg object
4318
5209
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4319
5210
  * @param {import("../PlatformAPIClient").Options} - Options
4320
- * @returns {Promise<OrderPlatformModel.CourierPartnerTrackingResponse>} -
4321
- * Success response
4322
- * @name trackShipment
4323
- * @summary: Track shipment
4324
- * @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/).
5211
+ * @returns {Promise<OrderPlatformModel.BaseResponseSchema>} - Success response
5212
+ * @name sendSmsNinja
5213
+ * @summary: Send SMS
5214
+ * @description: Send SMS to customer based on the template that is selected - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/sendSmsNinja/).
4325
5215
  */
4326
- async trackShipment(
4327
- { shipmentId, awb, pageNo, pageSize, requestHeaders } = {
4328
- requestHeaders: {},
4329
- },
5216
+ async sendSmsNinja(
5217
+ { body, requestHeaders } = { requestHeaders: {} },
4330
5218
  { responseHeaders } = { responseHeaders: false }
4331
5219
  ) {
4332
- const { error } = OrderPlatformValidator.trackShipment().validate(
5220
+ const { error } = OrderPlatformValidator.sendSmsNinja().validate(
4333
5221
  {
4334
- shipmentId,
4335
- awb,
4336
- pageNo,
4337
- pageSize,
5222
+ body,
4338
5223
  },
4339
5224
  { abortEarly: false, allowUnknown: true }
4340
5225
  );
@@ -4343,27 +5228,191 @@ class Order {
4343
5228
  }
4344
5229
 
4345
5230
  // Showing warrnings if extra unknown parameters are found
4346
- const { error: warrning } = OrderPlatformValidator.trackShipment().validate(
5231
+ const { error: warrning } = OrderPlatformValidator.sendSmsNinja().validate(
4347
5232
  {
4348
- shipmentId,
4349
- awb,
4350
- pageNo,
4351
- pageSize,
5233
+ body,
4352
5234
  },
4353
5235
  { abortEarly: false, allowUnknown: false }
4354
5236
  );
4355
5237
  if (warrning) {
4356
5238
  Logger({
4357
5239
  level: "WARN",
4358
- message: `Parameter Validation warrnings for platform > Order > trackShipment \n ${warrning}`,
5240
+ message: `Parameter Validation warrnings for platform > Order > sendSmsNinja \n ${warrning}`,
4359
5241
  });
4360
5242
  }
4361
5243
 
4362
5244
  const query_params = {};
4363
- query_params["shipment_id"] = shipmentId;
4364
- query_params["awb"] = awb;
4365
- query_params["page_no"] = pageNo;
4366
- query_params["page_size"] = pageSize;
5245
+
5246
+ const xHeaders = {};
5247
+
5248
+ const response = await PlatformAPIClient.execute(
5249
+ this.config,
5250
+ "post",
5251
+ `/service/platform/order-manage/v1.0/company/${this.config.companyId}/ninja/send-sms`,
5252
+ query_params,
5253
+ body,
5254
+ { ...xHeaders, ...requestHeaders },
5255
+ { responseHeaders }
5256
+ );
5257
+
5258
+ let responseData = response;
5259
+ if (responseHeaders) {
5260
+ responseData = response[0];
5261
+ }
5262
+
5263
+ const {
5264
+ error: res_error,
5265
+ } = OrderPlatformModel.BaseResponseSchema().validate(responseData, {
5266
+ abortEarly: false,
5267
+ allowUnknown: true,
5268
+ });
5269
+
5270
+ if (res_error) {
5271
+ if (this.config.options.strictResponseCheck === true) {
5272
+ return Promise.reject(new FDKResponseValidationError(res_error));
5273
+ } else {
5274
+ Logger({
5275
+ level: "WARN",
5276
+ message: `Response Validation Warnings for platform > Order > sendSmsNinja \n ${res_error}`,
5277
+ });
5278
+ }
5279
+ }
5280
+
5281
+ return response;
5282
+ }
5283
+
5284
+ /**
5285
+ * @param {OrderPlatformValidator.SendUserMobileOTPParam} arg - Arg object
5286
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
5287
+ * @param {import("../PlatformAPIClient").Options} - Options
5288
+ * @returns {Promise<OrderPlatformModel.SendUserMobileOtpResponseSchema>} -
5289
+ * Success response
5290
+ * @name sendUserMobileOTP
5291
+ * @summary: Send user mobile OTP
5292
+ * @description: Send a one-time OTP to a customer mobile number - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/sendUserMobileOTP/).
5293
+ */
5294
+ async sendUserMobileOTP(
5295
+ { body, requestHeaders } = { requestHeaders: {} },
5296
+ { responseHeaders } = { responseHeaders: false }
5297
+ ) {
5298
+ const { error } = OrderPlatformValidator.sendUserMobileOTP().validate(
5299
+ {
5300
+ body,
5301
+ },
5302
+ { abortEarly: false, allowUnknown: true }
5303
+ );
5304
+ if (error) {
5305
+ return Promise.reject(new FDKClientValidationError(error));
5306
+ }
5307
+
5308
+ // Showing warrnings if extra unknown parameters are found
5309
+ const {
5310
+ error: warrning,
5311
+ } = OrderPlatformValidator.sendUserMobileOTP().validate(
5312
+ {
5313
+ body,
5314
+ },
5315
+ { abortEarly: false, allowUnknown: false }
5316
+ );
5317
+ if (warrning) {
5318
+ Logger({
5319
+ level: "WARN",
5320
+ message: `Parameter Validation warrnings for platform > Order > sendUserMobileOTP \n ${warrning}`,
5321
+ });
5322
+ }
5323
+
5324
+ const query_params = {};
5325
+
5326
+ const xHeaders = {};
5327
+
5328
+ const response = await PlatformAPIClient.execute(
5329
+ this.config,
5330
+ "post",
5331
+ `/service/platform/order-manage/v1.0/company/${this.config.companyId}/user/send/otp/mobile`,
5332
+ query_params,
5333
+ body,
5334
+ { ...xHeaders, ...requestHeaders },
5335
+ { responseHeaders }
5336
+ );
5337
+
5338
+ let responseData = response;
5339
+ if (responseHeaders) {
5340
+ responseData = response[0];
5341
+ }
5342
+
5343
+ const {
5344
+ error: res_error,
5345
+ } = OrderPlatformModel.SendUserMobileOtpResponseSchema().validate(
5346
+ responseData,
5347
+ { abortEarly: false, allowUnknown: true }
5348
+ );
5349
+
5350
+ if (res_error) {
5351
+ if (this.config.options.strictResponseCheck === true) {
5352
+ return Promise.reject(new FDKResponseValidationError(res_error));
5353
+ } else {
5354
+ Logger({
5355
+ level: "WARN",
5356
+ message: `Response Validation Warnings for platform > Order > sendUserMobileOTP \n ${res_error}`,
5357
+ });
5358
+ }
5359
+ }
5360
+
5361
+ return response;
5362
+ }
5363
+
5364
+ /**
5365
+ * @param {OrderPlatformValidator.TrackShipmentParam} arg - Arg object
5366
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
5367
+ * @param {import("../PlatformAPIClient").Options} - Options
5368
+ * @returns {Promise<OrderPlatformModel.CourierPartnerTrackingResponseSchema>}
5369
+ * - Success response
5370
+ *
5371
+ * @name trackShipment
5372
+ * @summary: Track shipment
5373
+ * @description: Retrieve courier partner tracking details for a given shipment Id or AWB number - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/trackShipment/).
5374
+ */
5375
+ async trackShipment(
5376
+ { shipmentId, awb, pageNo, pageSize, requestHeaders } = {
5377
+ requestHeaders: {},
5378
+ },
5379
+ { responseHeaders } = { responseHeaders: false }
5380
+ ) {
5381
+ const { error } = OrderPlatformValidator.trackShipment().validate(
5382
+ {
5383
+ shipmentId,
5384
+ awb,
5385
+ pageNo,
5386
+ pageSize,
5387
+ },
5388
+ { abortEarly: false, allowUnknown: true }
5389
+ );
5390
+ if (error) {
5391
+ return Promise.reject(new FDKClientValidationError(error));
5392
+ }
5393
+
5394
+ // Showing warrnings if extra unknown parameters are found
5395
+ const { error: warrning } = OrderPlatformValidator.trackShipment().validate(
5396
+ {
5397
+ shipmentId,
5398
+ awb,
5399
+ pageNo,
5400
+ pageSize,
5401
+ },
5402
+ { abortEarly: false, allowUnknown: false }
5403
+ );
5404
+ if (warrning) {
5405
+ Logger({
5406
+ level: "WARN",
5407
+ message: `Parameter Validation warrnings for platform > Order > trackShipment \n ${warrning}`,
5408
+ });
5409
+ }
5410
+
5411
+ const query_params = {};
5412
+ query_params["shipment_id"] = shipmentId;
5413
+ query_params["awb"] = awb;
5414
+ query_params["page_no"] = pageNo;
5415
+ query_params["page_size"] = pageSize;
4367
5416
 
4368
5417
  const xHeaders = {};
4369
5418
 
@@ -4384,7 +5433,7 @@ class Order {
4384
5433
 
4385
5434
  const {
4386
5435
  error: res_error,
4387
- } = OrderPlatformModel.CourierPartnerTrackingResponse().validate(
5436
+ } = OrderPlatformModel.CourierPartnerTrackingResponseSchema().validate(
4388
5437
  responseData,
4389
5438
  { abortEarly: false, allowUnknown: true }
4390
5439
  );
@@ -4403,48 +5452,102 @@ class Order {
4403
5452
  return response;
4404
5453
  }
4405
5454
 
5455
+ /**
5456
+ * @param {OrderPlatformValidator.UpdateAccountParam} arg - Arg object
5457
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
5458
+ * @param {import("../PlatformAPIClient").Options} - Options
5459
+ * @returns {Promise<OrderPlatformModel.Account>} - Success response
5460
+ * @name updateAccount
5461
+ * @summary: Update account
5462
+ * @description: Updates the details of a specific channel account. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/updateAccount/).
5463
+ */
5464
+ async updateAccount(
5465
+ { channelAccountId, body, requestHeaders } = { requestHeaders: {} },
5466
+ { responseHeaders } = { responseHeaders: false }
5467
+ ) {
5468
+ const { error } = OrderPlatformValidator.updateAccount().validate(
5469
+ {
5470
+ channelAccountId,
5471
+ body,
5472
+ },
5473
+ { abortEarly: false, allowUnknown: true }
5474
+ );
5475
+ if (error) {
5476
+ return Promise.reject(new FDKClientValidationError(error));
5477
+ }
5478
+
5479
+ // Showing warrnings if extra unknown parameters are found
5480
+ const { error: warrning } = OrderPlatformValidator.updateAccount().validate(
5481
+ {
5482
+ channelAccountId,
5483
+ body,
5484
+ },
5485
+ { abortEarly: false, allowUnknown: false }
5486
+ );
5487
+ if (warrning) {
5488
+ Logger({
5489
+ level: "WARN",
5490
+ message: `Parameter Validation warrnings for platform > Order > updateAccount \n ${warrning}`,
5491
+ });
5492
+ }
5493
+
5494
+ const query_params = {};
5495
+
5496
+ const xHeaders = {};
5497
+
5498
+ const response = await PlatformAPIClient.execute(
5499
+ this.config,
5500
+ "put",
5501
+ `/service/platform/order-manage/v1.0/company/${this.config.companyId}/account/${channelAccountId}`,
5502
+ query_params,
5503
+ body,
5504
+ { ...xHeaders, ...requestHeaders },
5505
+ { responseHeaders }
5506
+ );
5507
+
5508
+ let responseData = response;
5509
+ if (responseHeaders) {
5510
+ responseData = response[0];
5511
+ }
5512
+
5513
+ const {
5514
+ error: res_error,
5515
+ } = OrderPlatformModel.Account().validate(responseData, {
5516
+ abortEarly: false,
5517
+ allowUnknown: true,
5518
+ });
5519
+
5520
+ if (res_error) {
5521
+ if (this.config.options.strictResponseCheck === true) {
5522
+ return Promise.reject(new FDKResponseValidationError(res_error));
5523
+ } else {
5524
+ Logger({
5525
+ level: "WARN",
5526
+ message: `Response Validation Warnings for platform > Order > updateAccount \n ${res_error}`,
5527
+ });
5528
+ }
5529
+ }
5530
+
5531
+ return response;
5532
+ }
5533
+
4406
5534
  /**
4407
5535
  * @param {OrderPlatformValidator.UpdateAddressParam} arg - Arg object
4408
5536
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4409
5537
  * @param {import("../PlatformAPIClient").Options} - Options
4410
- * @returns {Promise<OrderPlatformModel.BaseResponse>} - Success response
5538
+ * @returns {Promise<OrderPlatformModel.BaseResponseSchema>} - Success response
4411
5539
  * @name updateAddress
4412
5540
  * @summary: Update shipment address
4413
- * @description: Modify the address details of an existing shipment - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updateAddress/).
5541
+ * @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://docs.fynd.com/partners/commerce/sdk/platform/order/updateAddress/).
4414
5542
  */
4415
5543
  async updateAddress(
4416
- {
4417
- shipmentId,
4418
- addressCategory,
4419
- name,
4420
- address,
4421
- addressType,
4422
- pincode,
4423
- phone,
4424
- email,
4425
- landmark,
4426
- city,
4427
- state,
4428
- country,
4429
- requestHeaders,
4430
- } = { requestHeaders: {} },
5544
+ { shipmentId, body, requestHeaders } = { requestHeaders: {} },
4431
5545
  { responseHeaders } = { responseHeaders: false }
4432
5546
  ) {
4433
5547
  const { error } = OrderPlatformValidator.updateAddress().validate(
4434
5548
  {
4435
5549
  shipmentId,
4436
- addressCategory,
4437
-
4438
- name,
4439
- address,
4440
- addressType,
4441
- pincode,
4442
- phone,
4443
- email,
4444
- landmark,
4445
- city,
4446
- state,
4447
- country,
5550
+ body,
4448
5551
  },
4449
5552
  { abortEarly: false, allowUnknown: true }
4450
5553
  );
@@ -4456,18 +5559,7 @@ class Order {
4456
5559
  const { error: warrning } = OrderPlatformValidator.updateAddress().validate(
4457
5560
  {
4458
5561
  shipmentId,
4459
- addressCategory,
4460
-
4461
- name,
4462
- address,
4463
- addressType,
4464
- pincode,
4465
- phone,
4466
- email,
4467
- landmark,
4468
- city,
4469
- state,
4470
- country,
5562
+ body,
4471
5563
  },
4472
5564
  { abortEarly: false, allowUnknown: false }
4473
5565
  );
@@ -4479,27 +5571,15 @@ class Order {
4479
5571
  }
4480
5572
 
4481
5573
  const query_params = {};
4482
- query_params["shipment_id"] = shipmentId;
4483
- query_params["name"] = name;
4484
- query_params["address"] = address;
4485
- query_params["address_type"] = addressType;
4486
- query_params["pincode"] = pincode;
4487
- query_params["phone"] = phone;
4488
- query_params["email"] = email;
4489
- query_params["landmark"] = landmark;
4490
- query_params["address_category"] = addressCategory;
4491
- query_params["city"] = city;
4492
- query_params["state"] = state;
4493
- query_params["country"] = country;
4494
5574
 
4495
5575
  const xHeaders = {};
4496
5576
 
4497
5577
  const response = await PlatformAPIClient.execute(
4498
5578
  this.config,
4499
- "post",
4500
- `/service/platform/order-manage/v1.0/company/${this.config.companyId}/delight/update-address`,
5579
+ "put",
5580
+ `/service/platform/order-manage/v1.0/company/${this.config.companyId}/shipment/${shipmentId}/address`,
4501
5581
  query_params,
4502
- undefined,
5582
+ body,
4503
5583
  { ...xHeaders, ...requestHeaders },
4504
5584
  { responseHeaders }
4505
5585
  );
@@ -4511,7 +5591,7 @@ class Order {
4511
5591
 
4512
5592
  const {
4513
5593
  error: res_error,
4514
- } = OrderPlatformModel.BaseResponse().validate(responseData, {
5594
+ } = OrderPlatformModel.BaseResponseSchema().validate(responseData, {
4515
5595
  abortEarly: false,
4516
5596
  allowUnknown: true,
4517
5597
  });
@@ -4534,12 +5614,12 @@ class Order {
4534
5614
  * @param {OrderPlatformValidator.UpdatePackagingDimensionsParam} arg - Arg object
4535
5615
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4536
5616
  * @param {import("../PlatformAPIClient").Options} - Options
4537
- * @returns {Promise<OrderPlatformModel.UpdatePackagingDimensionsResponse>}
5617
+ * @returns {Promise<OrderPlatformModel.UpdatePackagingDimensionsResponseSchema>}
4538
5618
  * - Success response
4539
5619
  *
4540
5620
  * @name updatePackagingDimensions
4541
5621
  * @summary: Update packaging dimensions
4542
- * @description: Used to modify the packaging dimension of a shipment - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updatePackagingDimensions/).
5622
+ * @description: Used to modify the packaging dimension of a shipment - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/updatePackagingDimensions/).
4543
5623
  */
4544
5624
  async updatePackagingDimensions(
4545
5625
  { body, requestHeaders } = { requestHeaders: {} },
@@ -4594,7 +5674,7 @@ class Order {
4594
5674
 
4595
5675
  const {
4596
5676
  error: res_error,
4597
- } = OrderPlatformModel.UpdatePackagingDimensionsResponse().validate(
5677
+ } = OrderPlatformModel.UpdatePackagingDimensionsResponseSchema().validate(
4598
5678
  responseData,
4599
5679
  { abortEarly: false, allowUnknown: true }
4600
5680
  );
@@ -4613,15 +5693,93 @@ class Order {
4613
5693
  return response;
4614
5694
  }
4615
5695
 
5696
+ /**
5697
+ * @param {OrderPlatformValidator.UpdatePaymentInfoParam} arg - Arg object
5698
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
5699
+ * @param {import("../PlatformAPIClient").Options} - Options
5700
+ * @returns {Promise<Object>} - Success response
5701
+ * @name updatePaymentInfo
5702
+ * @summary: Update payment details for an order, its shipments and its bags.
5703
+ * @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://docs.fynd.com/partners/commerce/sdk/platform/order/updatePaymentInfo/).
5704
+ */
5705
+ async updatePaymentInfo(
5706
+ { body, requestHeaders } = { requestHeaders: {} },
5707
+ { responseHeaders } = { responseHeaders: false }
5708
+ ) {
5709
+ const { error } = OrderPlatformValidator.updatePaymentInfo().validate(
5710
+ {
5711
+ body,
5712
+ },
5713
+ { abortEarly: false, allowUnknown: true }
5714
+ );
5715
+ if (error) {
5716
+ return Promise.reject(new FDKClientValidationError(error));
5717
+ }
5718
+
5719
+ // Showing warrnings if extra unknown parameters are found
5720
+ const {
5721
+ error: warrning,
5722
+ } = OrderPlatformValidator.updatePaymentInfo().validate(
5723
+ {
5724
+ body,
5725
+ },
5726
+ { abortEarly: false, allowUnknown: false }
5727
+ );
5728
+ if (warrning) {
5729
+ Logger({
5730
+ level: "WARN",
5731
+ message: `Parameter Validation warrnings for platform > Order > updatePaymentInfo \n ${warrning}`,
5732
+ });
5733
+ }
5734
+
5735
+ const query_params = {};
5736
+
5737
+ const xHeaders = {};
5738
+
5739
+ const response = await PlatformAPIClient.execute(
5740
+ this.config,
5741
+ "put",
5742
+ `/service/platform/order-manage/v1.0/company/${this.config.companyId}/payment/update`,
5743
+ query_params,
5744
+ body,
5745
+ { ...xHeaders, ...requestHeaders },
5746
+ { responseHeaders }
5747
+ );
5748
+
5749
+ let responseData = response;
5750
+ if (responseHeaders) {
5751
+ responseData = response[0];
5752
+ }
5753
+
5754
+ const { error: res_error } = Joi.any().validate(responseData, {
5755
+ abortEarly: false,
5756
+ allowUnknown: true,
5757
+ });
5758
+
5759
+ if (res_error) {
5760
+ if (this.config.options.strictResponseCheck === true) {
5761
+ return Promise.reject(new FDKResponseValidationError(res_error));
5762
+ } else {
5763
+ Logger({
5764
+ level: "WARN",
5765
+ message: `Response Validation Warnings for platform > Order > updatePaymentInfo \n ${res_error}`,
5766
+ });
5767
+ }
5768
+ }
5769
+
5770
+ return response;
5771
+ }
5772
+
4616
5773
  /**
4617
5774
  * @param {OrderPlatformValidator.UpdateShipmentLockParam} arg - Arg object
4618
5775
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4619
5776
  * @param {import("../PlatformAPIClient").Options} - Options
4620
- * @returns {Promise<OrderPlatformModel.UpdateShipmentLockResponse>} -
4621
- * Success response
5777
+ * @returns {Promise<OrderPlatformModel.UpdateShipmentLockResponseSchema>}
5778
+ * - Success response
5779
+ *
4622
5780
  * @name updateShipmentLock
4623
5781
  * @summary: Update a shipment lock
4624
- * @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/).
5782
+ * @description: Modify shipment/bag lock status and update lock/unlock messages. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/updateShipmentLock/).
4625
5783
  */
4626
5784
  async updateShipmentLock(
4627
5785
  { body, requestHeaders } = { requestHeaders: {} },
@@ -4674,7 +5832,88 @@ class Order {
4674
5832
 
4675
5833
  const {
4676
5834
  error: res_error,
4677
- } = OrderPlatformModel.UpdateShipmentLockResponse().validate(responseData, {
5835
+ } = OrderPlatformModel.UpdateShipmentLockResponseSchema().validate(
5836
+ responseData,
5837
+ { abortEarly: false, allowUnknown: true }
5838
+ );
5839
+
5840
+ if (res_error) {
5841
+ if (this.config.options.strictResponseCheck === true) {
5842
+ return Promise.reject(new FDKResponseValidationError(res_error));
5843
+ } else {
5844
+ Logger({
5845
+ level: "WARN",
5846
+ message: `Response Validation Warnings for platform > Order > updateShipmentLock \n ${res_error}`,
5847
+ });
5848
+ }
5849
+ }
5850
+
5851
+ return response;
5852
+ }
5853
+
5854
+ /**
5855
+ * @param {OrderPlatformValidator.UpdateShipmentPackagesParam} arg - Arg object
5856
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
5857
+ * @param {import("../PlatformAPIClient").Options} - Options
5858
+ * @returns {Promise<OrderPlatformModel.BaseResponseSchema>} - Success response
5859
+ * @name updateShipmentPackages
5860
+ * @summary: Update shipment packages
5861
+ * @description: Update existing packages for a shipment. This operation replaces all existing packages with the provided package list. The system validates courier partner availability and performs bag breaking as per number of packages. Any packages without IDs will have new unique IDs generated. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/updateShipmentPackages/).
5862
+ */
5863
+ async updateShipmentPackages(
5864
+ { shipmentId, body, requestHeaders } = { requestHeaders: {} },
5865
+ { responseHeaders } = { responseHeaders: false }
5866
+ ) {
5867
+ const { error } = OrderPlatformValidator.updateShipmentPackages().validate(
5868
+ {
5869
+ shipmentId,
5870
+ body,
5871
+ },
5872
+ { abortEarly: false, allowUnknown: true }
5873
+ );
5874
+ if (error) {
5875
+ return Promise.reject(new FDKClientValidationError(error));
5876
+ }
5877
+
5878
+ // Showing warrnings if extra unknown parameters are found
5879
+ const {
5880
+ error: warrning,
5881
+ } = OrderPlatformValidator.updateShipmentPackages().validate(
5882
+ {
5883
+ shipmentId,
5884
+ body,
5885
+ },
5886
+ { abortEarly: false, allowUnknown: false }
5887
+ );
5888
+ if (warrning) {
5889
+ Logger({
5890
+ level: "WARN",
5891
+ message: `Parameter Validation warrnings for platform > Order > updateShipmentPackages \n ${warrning}`,
5892
+ });
5893
+ }
5894
+
5895
+ const query_params = {};
5896
+
5897
+ const xHeaders = {};
5898
+
5899
+ const response = await PlatformAPIClient.execute(
5900
+ this.config,
5901
+ "put",
5902
+ `/service/platform/order-manage/v1.0/company/${this.config.companyId}/shipment/${shipmentId}/packages`,
5903
+ query_params,
5904
+ body,
5905
+ { ...xHeaders, ...requestHeaders },
5906
+ { responseHeaders }
5907
+ );
5908
+
5909
+ let responseData = response;
5910
+ if (responseHeaders) {
5911
+ responseData = response[0];
5912
+ }
5913
+
5914
+ const {
5915
+ error: res_error,
5916
+ } = OrderPlatformModel.BaseResponseSchema().validate(responseData, {
4678
5917
  abortEarly: false,
4679
5918
  allowUnknown: true,
4680
5919
  });
@@ -4685,7 +5924,7 @@ class Order {
4685
5924
  } else {
4686
5925
  Logger({
4687
5926
  level: "WARN",
4688
- message: `Response Validation Warnings for platform > Order > updateShipmentLock \n ${res_error}`,
5927
+ message: `Response Validation Warnings for platform > Order > updateShipmentPackages \n ${res_error}`,
4689
5928
  });
4690
5929
  }
4691
5930
  }
@@ -4702,7 +5941,7 @@ class Order {
4702
5941
  *
4703
5942
  * @name updateShipmentStatus
4704
5943
  * @summary: Update a shipment's status
4705
- * @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/).
5944
+ * @description: It is used for updating the shipment in the following scenarios: Full Confirmation, Partial Confirmation, Change the status of a shipment, Full Cancellation, Partial Cancellation, Assign the shipment to DP. Click <a href='/commerce/miscellaneous/updateShipmentStatus'>here</a> to get the use case details. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/updateShipmentStatus/).
4706
5945
  */
4707
5946
  async updateShipmentStatus(
4708
5947
  { body, requestHeaders } = { requestHeaders: {} },
@@ -4782,7 +6021,7 @@ class Order {
4782
6021
  * Success response
4783
6022
  * @name updateShipmentTracking
4784
6023
  * @summary: Update shipment tracking
4785
- * @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/).
6024
+ * @description: Modify courier partner tracking details for a given shipment Id or AWB number - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/updateShipmentTracking/).
4786
6025
  */
4787
6026
  async updateShipmentTracking(
4788
6027
  { body, requestHeaders } = { requestHeaders: {} },
@@ -4858,10 +6097,10 @@ class Order {
4858
6097
  * @param {OrderPlatformValidator.UploadConsentsParam} arg - Arg object
4859
6098
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4860
6099
  * @param {import("../PlatformAPIClient").Options} - Options
4861
- * @returns {Promise<OrderPlatformModel.SuccessResponse>} - Success response
6100
+ * @returns {Promise<OrderPlatformModel.SuccessResponseSchema>} - Success response
4862
6101
  * @name uploadConsents
4863
6102
  * @summary: Upload consent
4864
- * @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/).
6103
+ * @description: Uploads the consent signed by courier partner and seller to keep records - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/uploadConsents/).
4865
6104
  */
4866
6105
  async uploadConsents(
4867
6106
  { body, requestHeaders } = { requestHeaders: {} },
@@ -4914,7 +6153,7 @@ class Order {
4914
6153
 
4915
6154
  const {
4916
6155
  error: res_error,
4917
- } = OrderPlatformModel.SuccessResponse().validate(responseData, {
6156
+ } = OrderPlatformModel.SuccessResponseSchema().validate(responseData, {
4918
6157
  abortEarly: false,
4919
6158
  allowUnknown: true,
4920
6159
  });
@@ -4937,10 +6176,10 @@ class Order {
4937
6176
  * @param {OrderPlatformValidator.VerifyMobileOTPParam} arg - Arg object
4938
6177
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4939
6178
  * @param {import("../PlatformAPIClient").Options} - Options
4940
- * @returns {Promise<OrderPlatformModel.VerifyOtpResponse>} - Success response
6179
+ * @returns {Promise<OrderPlatformModel.VerifyOtpResponseSchema>} - Success response
4941
6180
  * @name verifyMobileOTP
4942
6181
  * @summary: Verify mobile OTP
4943
- * @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/).
6182
+ * @description: Perform OTP verification to link a user to an anonymous order - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/verifyMobileOTP/).
4944
6183
  */
4945
6184
  async verifyMobileOTP(
4946
6185
  { body, requestHeaders } = { requestHeaders: {} },
@@ -4993,7 +6232,7 @@ class Order {
4993
6232
 
4994
6233
  const {
4995
6234
  error: res_error,
4996
- } = OrderPlatformModel.VerifyOtpResponse().validate(responseData, {
6235
+ } = OrderPlatformModel.VerifyOtpResponseSchema().validate(responseData, {
4997
6236
  abortEarly: false,
4998
6237
  allowUnknown: true,
4999
6238
  });