@gofynd/fdk-client-javascript 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (262) hide show
  1. package/README.md +44 -7
  2. package/package.json +1 -2
  3. package/sdk/application/ApplicationAPIClient.d.ts +3 -3
  4. package/sdk/application/ApplicationAPIClient.js +6 -4
  5. package/sdk/application/ApplicationClient.d.ts +2 -3
  6. package/sdk/application/ApplicationClient.js +1 -45
  7. package/sdk/application/ApplicationConfig.d.ts +46 -6
  8. package/sdk/application/ApplicationConfig.js +15 -16
  9. package/sdk/application/Cart/CartApplicationClient.d.ts +61 -33
  10. package/sdk/application/Cart/CartApplicationClient.js +225 -134
  11. package/sdk/application/Cart/CartApplicationModel.d.ts +4 -4
  12. package/sdk/application/Cart/CartApplicationModel.js +4 -4
  13. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +61 -30
  14. package/sdk/application/Catalog/CatalogApplicationClient.js +234 -146
  15. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +115 -13
  16. package/sdk/application/Catalog/CatalogApplicationModel.js +77 -12
  17. package/sdk/application/Common/CommonApplicationClient.d.ts +5 -3
  18. package/sdk/application/Common/CommonApplicationClient.js +13 -11
  19. package/sdk/application/Common/CommonApplicationModel.d.ts +3 -83
  20. package/sdk/application/Common/CommonApplicationModel.js +2 -58
  21. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +9 -3
  22. package/sdk/application/Communication/CommunicationApplicationClient.js +25 -13
  23. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +1 -34
  24. package/sdk/application/Communication/CommunicationApplicationModel.js +0 -36
  25. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +46 -16
  26. package/sdk/application/Configuration/ConfigurationApplicationClient.js +144 -68
  27. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +1 -219
  28. package/sdk/application/Configuration/ConfigurationApplicationModel.js +0 -226
  29. package/sdk/application/Content/ContentApplicationClient.d.ts +49 -21
  30. package/sdk/application/Content/ContentApplicationClient.js +159 -80
  31. package/sdk/application/Content/ContentApplicationModel.d.ts +5 -622
  32. package/sdk/application/Content/ContentApplicationModel.js +11 -763
  33. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +6 -3
  34. package/sdk/application/FileStorage/FileStorageApplicationClient.js +20 -14
  35. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +1 -152
  36. package/sdk/application/FileStorage/FileStorageApplicationModel.js +0 -180
  37. package/sdk/application/Lead/LeadApplicationClient.d.ts +14 -7
  38. package/sdk/application/Lead/LeadApplicationClient.js +50 -31
  39. package/sdk/application/Lead/LeadApplicationModel.d.ts +22 -741
  40. package/sdk/application/Lead/LeadApplicationModel.js +21 -481
  41. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +11 -5
  42. package/sdk/application/Logistic/LogisticApplicationClient.js +41 -20
  43. package/sdk/application/Order/OrderApplicationClient.d.ts +24 -12
  44. package/sdk/application/Order/OrderApplicationClient.js +88 -56
  45. package/sdk/application/Payment/PaymentApplicationClient.d.ts +91 -42
  46. package/sdk/application/Payment/PaymentApplicationClient.js +293 -194
  47. package/sdk/application/Payment/PaymentApplicationModel.d.ts +36 -36
  48. package/sdk/application/Payment/PaymentApplicationModel.js +36 -36
  49. package/sdk/application/PosCart/PosCartApplicationClient.d.ts +59 -32
  50. package/sdk/application/PosCart/PosCartApplicationClient.js +214 -130
  51. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +2 -2
  52. package/sdk/application/PosCart/PosCartApplicationModel.js +2 -2
  53. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +16 -7
  54. package/sdk/application/Rewards/RewardsApplicationClient.js +56 -29
  55. package/sdk/application/Share/ShareApplicationClient.d.ts +15 -7
  56. package/sdk/application/Share/ShareApplicationClient.js +51 -31
  57. package/sdk/application/Share/ShareApplicationModel.d.ts +1 -33
  58. package/sdk/application/Share/ShareApplicationModel.js +0 -38
  59. package/sdk/application/Theme/ThemeApplicationClient.d.ts +9 -4
  60. package/sdk/application/Theme/ThemeApplicationClient.js +35 -18
  61. package/sdk/application/Theme/ThemeApplicationModel.d.ts +982 -312
  62. package/sdk/application/Theme/ThemeApplicationModel.js +621 -284
  63. package/sdk/application/User/UserApplicationClient.d.ts +74 -35
  64. package/sdk/application/User/UserApplicationClient.js +252 -161
  65. package/sdk/application/User/UserApplicationModel.d.ts +3 -401
  66. package/sdk/application/User/UserApplicationModel.js +2 -490
  67. package/sdk/common/AxiosHelper.js +1 -2
  68. package/sdk/common/FDKError.d.ts +3 -0
  69. package/sdk/common/FDKError.js +8 -0
  70. package/sdk/common/utils.d.ts +3 -0
  71. package/sdk/common/utils.js +29 -0
  72. package/sdk/partner/PartnerAPIClient.d.ts +5 -4
  73. package/sdk/partner/PartnerAPIClient.js +7 -4
  74. package/sdk/partner/PartnerClient.d.ts +2 -0
  75. package/sdk/partner/PartnerClient.js +3 -0
  76. package/sdk/partner/Theme/ThemePartnerClient.d.ts +299 -0
  77. package/sdk/partner/Theme/ThemePartnerClient.js +768 -0
  78. package/sdk/partner/Theme/ThemePartnerModel.d.ts +1706 -0
  79. package/sdk/partner/Theme/ThemePartnerModel.js +1409 -0
  80. package/sdk/partner/Theme/ThemePartnerValidator.d.ts +22 -0
  81. package/sdk/partner/Theme/ThemePartnerValidator.js +157 -0
  82. package/sdk/partner/index.d.ts +3 -1
  83. package/sdk/partner/index.js +3 -1
  84. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +8 -4
  85. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +38 -16
  86. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +1 -13
  87. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +0 -12
  88. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +10 -0
  89. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +4 -0
  90. package/sdk/platform/Billing/BillingPlatformClient.d.ts +59 -14
  91. package/sdk/platform/Billing/BillingPlatformClient.js +315 -64
  92. package/sdk/platform/Billing/BillingPlatformModel.d.ts +56 -196
  93. package/sdk/platform/Billing/BillingPlatformModel.js +63 -217
  94. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +23 -1
  95. package/sdk/platform/Billing/BillingPlatformValidator.js +31 -0
  96. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +124 -63
  97. package/sdk/platform/Cart/CartPlatformApplicationClient.js +431 -265
  98. package/sdk/platform/Cart/CartPlatformModel.d.ts +253 -53
  99. package/sdk/platform/Cart/CartPlatformModel.js +104 -54
  100. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +120 -53
  101. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +398 -247
  102. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +155 -78
  103. package/sdk/platform/Catalog/CatalogPlatformClient.js +561 -355
  104. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +10 -12
  105. package/sdk/platform/Catalog/CatalogPlatformModel.js +10 -12
  106. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +30 -0
  107. package/sdk/platform/Catalog/CatalogPlatformValidator.js +13 -0
  108. package/sdk/platform/Common/CommonPlatformClient.d.ts +5 -3
  109. package/sdk/platform/Common/CommonPlatformClient.js +13 -11
  110. package/sdk/platform/Common/CommonPlatformModel.d.ts +39 -64
  111. package/sdk/platform/Common/CommonPlatformModel.js +23 -57
  112. package/sdk/platform/Common/CommonPlatformValidator.d.ts +5 -10
  113. package/sdk/platform/Common/CommonPlatformValidator.js +3 -4
  114. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +370 -120
  115. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +2328 -888
  116. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +143 -24
  117. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +179 -15
  118. package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +2 -1
  119. package/sdk/platform/Communication/CommunicationPlatformClient.js +6 -5
  120. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +386 -308
  121. package/sdk/platform/Communication/CommunicationPlatformModel.js +415 -355
  122. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +38 -13
  123. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +171 -57
  124. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +53 -1
  125. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +54 -0
  126. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +5 -1
  127. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +7 -0
  128. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +96 -29
  129. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +311 -126
  130. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +5 -1
  131. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +7 -0
  132. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +36 -18
  133. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +121 -86
  134. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +13 -180
  135. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +5 -113
  136. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +162 -70
  137. package/sdk/platform/Content/ContentPlatformApplicationClient.js +528 -309
  138. package/sdk/platform/Content/ContentPlatformModel.d.ts +9 -198
  139. package/sdk/platform/Content/ContentPlatformModel.js +8 -231
  140. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +48 -11
  141. package/sdk/platform/Discount/DiscountPlatformClient.js +142 -48
  142. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +40 -1
  143. package/sdk/platform/Discount/DiscountPlatformModel.js +27 -0
  144. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +84 -18
  145. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +486 -53
  146. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +71 -7
  147. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +81 -5
  148. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +13 -18
  149. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +58 -65
  150. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +198 -71
  151. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +212 -64
  152. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +18 -10
  153. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +11 -6
  154. package/sdk/platform/Finance/FinancePlatformClient.d.ts +177 -40
  155. package/sdk/platform/Finance/FinancePlatformClient.js +1028 -132
  156. package/sdk/platform/Finance/FinancePlatformModel.d.ts +670 -22
  157. package/sdk/platform/Finance/FinancePlatformModel.js +809 -23
  158. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +111 -1
  159. package/sdk/platform/Finance/FinancePlatformValidator.js +134 -0
  160. package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +24 -12
  161. package/sdk/platform/Inventory/InventoryPlatformClient.js +94 -52
  162. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +27 -13
  163. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +101 -55
  164. package/sdk/platform/Lead/LeadPlatformClient.d.ts +50 -39
  165. package/sdk/platform/Lead/LeadPlatformClient.js +171 -112
  166. package/sdk/platform/Lead/LeadPlatformModel.d.ts +32 -390
  167. package/sdk/platform/Lead/LeadPlatformModel.js +31 -214
  168. package/sdk/platform/Lead/LeadPlatformValidator.d.ts +33 -33
  169. package/sdk/platform/Lead/LeadPlatformValidator.js +23 -23
  170. package/sdk/platform/OAuthClient.js +6 -2
  171. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +4 -2
  172. package/sdk/platform/Order/OrderPlatformApplicationClient.js +12 -10
  173. package/sdk/platform/Order/OrderPlatformClient.d.ts +165 -71
  174. package/sdk/platform/Order/OrderPlatformClient.js +738 -205
  175. package/sdk/platform/Order/OrderPlatformModel.d.ts +261 -3
  176. package/sdk/platform/Order/OrderPlatformModel.js +225 -2
  177. package/sdk/platform/Order/OrderPlatformValidator.d.ts +104 -3
  178. package/sdk/platform/Order/OrderPlatformValidator.js +85 -2
  179. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -22
  180. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +12 -159
  181. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +1 -30
  182. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +0 -26
  183. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +1 -690
  184. package/sdk/platform/Partner/PartnerPlatformModel.js +0 -809
  185. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +167 -32
  186. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +793 -145
  187. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +91 -1
  188. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +91 -0
  189. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +20 -10
  190. package/sdk/platform/Payment/PaymentPlatformClient.js +68 -47
  191. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +549 -7
  192. package/sdk/platform/Payment/PaymentPlatformModel.js +305 -6
  193. package/sdk/platform/PlatformAPIClient.d.ts +3 -3
  194. package/sdk/platform/PlatformAPIClient.js +2 -2
  195. package/sdk/platform/PlatformClient.d.ts +2 -2
  196. package/sdk/platform/PlatformClient.js +4 -4
  197. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +28 -12
  198. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +90 -53
  199. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +1 -12
  200. package/sdk/platform/Rewards/RewardsPlatformModel.js +0 -14
  201. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +62 -26
  202. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +210 -93
  203. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +20 -11
  204. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +23 -11
  205. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +36 -18
  206. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +142 -78
  207. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +12 -3
  208. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +14 -2
  209. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +10 -26
  210. package/sdk/platform/Share/SharePlatformApplicationClient.js +36 -67
  211. package/sdk/platform/Share/SharePlatformModel.d.ts +4 -4
  212. package/sdk/platform/Share/SharePlatformModel.js +4 -4
  213. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +127 -57
  214. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +564 -189
  215. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +63 -26
  216. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +62 -22
  217. package/sdk/platform/Theme/ThemePlatformClient.d.ts +37 -0
  218. package/sdk/platform/Theme/ThemePlatformClient.js +235 -0
  219. package/sdk/platform/Theme/ThemePlatformModel.d.ts +1167 -261
  220. package/sdk/platform/Theme/ThemePlatformModel.js +801 -244
  221. package/sdk/platform/Theme/ThemePlatformValidator.d.ts +32 -0
  222. package/sdk/platform/Theme/ThemePlatformValidator.js +38 -0
  223. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +35 -17
  224. package/sdk/platform/User/UserPlatformApplicationClient.js +132 -73
  225. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +7 -0
  226. package/sdk/platform/User/UserPlatformApplicationValidator.js +3 -0
  227. package/sdk/platform/User/UserPlatformModel.d.ts +1 -738
  228. package/sdk/platform/User/UserPlatformModel.js +3 -899
  229. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +120 -7
  230. package/sdk/platform/Webhook/WebhookPlatformClient.js +799 -41
  231. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +476 -86
  232. package/sdk/platform/Webhook/WebhookPlatformModel.js +388 -89
  233. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +96 -9
  234. package/sdk/platform/Webhook/WebhookPlatformValidator.js +117 -5
  235. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +5 -3
  236. package/sdk/public/Configuration/ConfigurationPublicClient.js +13 -11
  237. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +3 -106
  238. package/sdk/public/Configuration/ConfigurationPublicModel.js +2 -59
  239. package/sdk/public/Inventory/InventoryPublicClient.d.ts +12 -6
  240. package/sdk/public/Inventory/InventoryPublicClient.js +42 -27
  241. package/sdk/public/Partner/PartnerPublicClient.d.ts +22 -0
  242. package/sdk/public/Partner/PartnerPublicClient.js +110 -0
  243. package/sdk/public/Partner/PartnerPublicModel.d.ts +240 -0
  244. package/sdk/public/Partner/PartnerPublicModel.js +280 -0
  245. package/sdk/public/Partner/PartnerPublicValidator.d.ts +18 -0
  246. package/sdk/public/Partner/PartnerPublicValidator.js +19 -0
  247. package/sdk/public/PublicAPIClient.d.ts +14 -1
  248. package/sdk/public/PublicAPIClient.js +7 -1
  249. package/sdk/public/PublicClient.d.ts +2 -0
  250. package/sdk/public/PublicClient.js +4 -0
  251. package/sdk/public/Webhook/WebhookPublicClient.d.ts +5 -2
  252. package/sdk/public/Webhook/WebhookPublicClient.js +15 -9
  253. package/sdk/public/Webhook/WebhookPublicModel.d.ts +1 -191
  254. package/sdk/public/Webhook/WebhookPublicModel.js +0 -229
  255. package/sdk/public/index.d.ts +1 -0
  256. package/sdk/public/index.js +2 -0
  257. package/sdk/application/ApplicationModels.d.ts +0 -48
  258. package/sdk/application/ApplicationModels.js +0 -38
  259. package/sdk/platform/Partner/PartnerPlatformClient.d.ts +0 -106
  260. package/sdk/platform/Partner/PartnerPlatformClient.js +0 -878
  261. package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +0 -208
  262. package/sdk/platform/Partner/PartnerPlatformValidator.js +0 -169
@@ -54,6 +54,7 @@ class Order {
54
54
  * @param {OrderApplicationValidator.GetCustomerDetailsByShipmentIdParam} arg
55
55
  * - Arg object.
56
56
  *
57
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
57
58
  * @param {import("../ApplicationAPIClient").Options} - Options
58
59
  * @returns {Promise<OrderApplicationModel.CustomerDetailsResponse>} -
59
60
  * Success response
@@ -62,8 +63,8 @@ class Order {
62
63
  * @description: Use this API to retrieve customer details such as mobileno using Shipment ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getCustomerDetailsByShipmentId/).
63
64
  */
64
65
  async getCustomerDetailsByShipmentId(
65
- { orderId, shipmentId } = {},
66
- { headers } = { headers: false }
66
+ { orderId, shipmentId, requestHeaders } = { requestHeaders: {} },
67
+ { responseHeaders } = { responseHeaders: false }
67
68
  ) {
68
69
  const {
69
70
  error,
@@ -102,12 +103,12 @@ class Order {
102
103
  }),
103
104
  query_params,
104
105
  undefined,
105
- xHeaders,
106
- { headers }
106
+ { ...xHeaders, ...requestHeaders },
107
+ { responseHeaders }
107
108
  );
108
109
 
109
110
  let responseData = response;
110
- if (headers) {
111
+ if (responseHeaders) {
111
112
  responseData = response[0];
112
113
  }
113
114
 
@@ -130,6 +131,7 @@ class Order {
130
131
 
131
132
  /**
132
133
  * @param {OrderApplicationValidator.GetInvoiceByShipmentIdParam} arg - Arg object.
134
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
133
135
  * @param {import("../ApplicationAPIClient").Options} - Options
134
136
  * @returns {Promise<OrderApplicationModel.ResponseGetInvoiceShipment>} -
135
137
  * Success response
@@ -138,8 +140,8 @@ class Order {
138
140
  * @description: Use this API to retrieve shipment invoice. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getInvoiceByShipmentId/).
139
141
  */
140
142
  async getInvoiceByShipmentId(
141
- { shipmentId } = {},
142
- { headers } = { headers: false }
143
+ { shipmentId, requestHeaders } = { requestHeaders: {} },
144
+ { responseHeaders } = { responseHeaders: false }
143
145
  ) {
144
146
  const {
145
147
  error,
@@ -178,12 +180,12 @@ class Order {
178
180
  }),
179
181
  query_params,
180
182
  undefined,
181
- xHeaders,
182
- { headers }
183
+ { ...xHeaders, ...requestHeaders },
184
+ { responseHeaders }
183
185
  );
184
186
 
185
187
  let responseData = response;
186
- if (headers) {
188
+ if (responseHeaders) {
187
189
  responseData = response[0];
188
190
  }
189
191
 
@@ -206,13 +208,17 @@ class Order {
206
208
 
207
209
  /**
208
210
  * @param {OrderApplicationValidator.GetOrderByIdParam} arg - Arg object.
211
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
209
212
  * @param {import("../ApplicationAPIClient").Options} - Options
210
213
  * @returns {Promise<OrderApplicationModel.OrderById>} - Success response
211
214
  * @name getOrderById
212
215
  * @summary: Get details of an order
213
216
  * @description: Use this API to retrieve order details such as tracking details, shipment, store information using Fynd Order ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getOrderById/).
214
217
  */
215
- async getOrderById({ orderId } = {}, { headers } = { headers: false }) {
218
+ async getOrderById(
219
+ { orderId, requestHeaders } = { requestHeaders: {} },
220
+ { responseHeaders } = { responseHeaders: false }
221
+ ) {
216
222
  const { error } = OrderApplicationValidator.getOrderById().validate(
217
223
  { orderId },
218
224
  { abortEarly: false, allowUnknown: true }
@@ -248,12 +254,12 @@ class Order {
248
254
  }),
249
255
  query_params,
250
256
  undefined,
251
- xHeaders,
252
- { headers }
257
+ { ...xHeaders, ...requestHeaders },
258
+ { responseHeaders }
253
259
  );
254
260
 
255
261
  let responseData = response;
256
- if (headers) {
262
+ if (responseHeaders) {
257
263
  responseData = response[0];
258
264
  }
259
265
 
@@ -276,6 +282,7 @@ class Order {
276
282
 
277
283
  /**
278
284
  * @param {OrderApplicationValidator.GetOrdersParam} arg - Arg object.
285
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
279
286
  * @param {import("../ApplicationAPIClient").Options} - Options
280
287
  * @returns {Promise<OrderApplicationModel.OrderList>} - Success response
281
288
  * @name getOrders
@@ -283,8 +290,16 @@ class Order {
283
290
  * @description: Use this API to retrieve all the orders. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getOrders/).
284
291
  */
285
292
  async getOrders(
286
- { status, pageNo, pageSize, fromDate, toDate, customMeta } = {},
287
- { headers } = { headers: false }
293
+ {
294
+ status,
295
+ pageNo,
296
+ pageSize,
297
+ fromDate,
298
+ toDate,
299
+ customMeta,
300
+ requestHeaders,
301
+ } = { requestHeaders: {} },
302
+ { responseHeaders } = { responseHeaders: false }
288
303
  ) {
289
304
  const { error } = OrderApplicationValidator.getOrders().validate(
290
305
  { status, pageNo, pageSize, fromDate, toDate, customMeta },
@@ -325,12 +340,12 @@ class Order {
325
340
  }),
326
341
  query_params,
327
342
  undefined,
328
- xHeaders,
329
- { headers }
343
+ { ...xHeaders, ...requestHeaders },
344
+ { responseHeaders }
330
345
  );
331
346
 
332
347
  let responseData = response;
333
- if (headers) {
348
+ if (responseHeaders) {
334
349
  responseData = response[0];
335
350
  }
336
351
 
@@ -353,13 +368,17 @@ class Order {
353
368
 
354
369
  /**
355
370
  * @param {OrderApplicationValidator.GetPosOrderByIdParam} arg - Arg object.
371
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
356
372
  * @param {import("../ApplicationAPIClient").Options} - Options
357
373
  * @returns {Promise<OrderApplicationModel.OrderById>} - Success response
358
374
  * @name getPosOrderById
359
375
  * @summary: Get POS Order
360
376
  * @description: Use this API to retrieve a POS order and all its details such as tracking details, shipment, store information using Fynd Order ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getPosOrderById/).
361
377
  */
362
- async getPosOrderById({ orderId } = {}, { headers } = { headers: false }) {
378
+ async getPosOrderById(
379
+ { orderId, requestHeaders } = { requestHeaders: {} },
380
+ { responseHeaders } = { responseHeaders: false }
381
+ ) {
363
382
  const { error } = OrderApplicationValidator.getPosOrderById().validate(
364
383
  { orderId },
365
384
  { abortEarly: false, allowUnknown: true }
@@ -395,12 +414,12 @@ class Order {
395
414
  }),
396
415
  query_params,
397
416
  undefined,
398
- xHeaders,
399
- { headers }
417
+ { ...xHeaders, ...requestHeaders },
418
+ { responseHeaders }
400
419
  );
401
420
 
402
421
  let responseData = response;
403
- if (headers) {
422
+ if (responseHeaders) {
404
423
  responseData = response[0];
405
424
  }
406
425
 
@@ -423,6 +442,7 @@ class Order {
423
442
 
424
443
  /**
425
444
  * @param {OrderApplicationValidator.GetShipmentBagReasonsParam} arg - Arg object.
445
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
426
446
  * @param {import("../ApplicationAPIClient").Options} - Options
427
447
  * @returns {Promise<OrderApplicationModel.ShipmentBagReasons>} - Success response
428
448
  * @name getShipmentBagReasons
@@ -430,8 +450,8 @@ class Order {
430
450
  * @description: Use this API to retrieve the issues that led to the cancellation of bags within a shipment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getShipmentBagReasons/).
431
451
  */
432
452
  async getShipmentBagReasons(
433
- { shipmentId, bagId } = {},
434
- { headers } = { headers: false }
453
+ { shipmentId, bagId, requestHeaders } = { requestHeaders: {} },
454
+ { responseHeaders } = { responseHeaders: false }
435
455
  ) {
436
456
  const {
437
457
  error,
@@ -470,12 +490,12 @@ class Order {
470
490
  }),
471
491
  query_params,
472
492
  undefined,
473
- xHeaders,
474
- { headers }
493
+ { ...xHeaders, ...requestHeaders },
494
+ { responseHeaders }
475
495
  );
476
496
 
477
497
  let responseData = response;
478
- if (headers) {
498
+ if (responseHeaders) {
479
499
  responseData = response[0];
480
500
  }
481
501
 
@@ -498,13 +518,17 @@ class Order {
498
518
 
499
519
  /**
500
520
  * @param {OrderApplicationValidator.GetShipmentByIdParam} arg - Arg object.
521
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
501
522
  * @param {import("../ApplicationAPIClient").Options} - Options
502
523
  * @returns {Promise<OrderApplicationModel.ShipmentById>} - Success response
503
524
  * @name getShipmentById
504
525
  * @summary: Get details of a shipment
505
526
  * @description: Use this API to retrieve shipment details such as price breakup, tracking details, store information, etc. using Shipment ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getShipmentById/).
506
527
  */
507
- async getShipmentById({ shipmentId } = {}, { headers } = { headers: false }) {
528
+ async getShipmentById(
529
+ { shipmentId, requestHeaders } = { requestHeaders: {} },
530
+ { responseHeaders } = { responseHeaders: false }
531
+ ) {
508
532
  const { error } = OrderApplicationValidator.getShipmentById().validate(
509
533
  { shipmentId },
510
534
  { abortEarly: false, allowUnknown: true }
@@ -540,12 +564,12 @@ class Order {
540
564
  }),
541
565
  query_params,
542
566
  undefined,
543
- xHeaders,
544
- { headers }
567
+ { ...xHeaders, ...requestHeaders },
568
+ { responseHeaders }
545
569
  );
546
570
 
547
571
  let responseData = response;
548
- if (headers) {
572
+ if (responseHeaders) {
549
573
  responseData = response[0];
550
574
  }
551
575
 
@@ -568,6 +592,7 @@ class Order {
568
592
 
569
593
  /**
570
594
  * @param {OrderApplicationValidator.GetShipmentReasonsParam} arg - Arg object.
595
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
571
596
  * @param {import("../ApplicationAPIClient").Options} - Options
572
597
  * @returns {Promise<OrderApplicationModel.ShipmentReasons>} - Success response
573
598
  * @name getShipmentReasons
@@ -575,8 +600,8 @@ class Order {
575
600
  * @description: Use this API to retrieve the issues that led to the cancellation of bags within a shipment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getShipmentReasons/).
576
601
  */
577
602
  async getShipmentReasons(
578
- { shipmentId } = {},
579
- { headers } = { headers: false }
603
+ { shipmentId, requestHeaders } = { requestHeaders: {} },
604
+ { responseHeaders } = { responseHeaders: false }
580
605
  ) {
581
606
  const { error } = OrderApplicationValidator.getShipmentReasons().validate(
582
607
  { shipmentId },
@@ -613,12 +638,12 @@ class Order {
613
638
  }),
614
639
  query_params,
615
640
  undefined,
616
- xHeaders,
617
- { headers }
641
+ { ...xHeaders, ...requestHeaders },
642
+ { responseHeaders }
618
643
  );
619
644
 
620
645
  let responseData = response;
621
- if (headers) {
646
+ if (responseHeaders) {
622
647
  responseData = response[0];
623
648
  }
624
649
 
@@ -641,6 +666,7 @@ class Order {
641
666
 
642
667
  /**
643
668
  * @param {OrderApplicationValidator.SendOtpToShipmentCustomerParam} arg - Arg object.
669
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
644
670
  * @param {import("../ApplicationAPIClient").Options} - Options
645
671
  * @returns {Promise<OrderApplicationModel.SendOtpToCustomerResponse>} -
646
672
  * Success response
@@ -649,8 +675,8 @@ class Order {
649
675
  * @description: Use this API to send OTP to the customer of the mapped Shipment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/sendOtpToShipmentCustomer/).
650
676
  */
651
677
  async sendOtpToShipmentCustomer(
652
- { orderId, shipmentId } = {},
653
- { headers } = { headers: false }
678
+ { orderId, shipmentId, requestHeaders } = { requestHeaders: {} },
679
+ { responseHeaders } = { responseHeaders: false }
654
680
  ) {
655
681
  const {
656
682
  error,
@@ -689,12 +715,12 @@ class Order {
689
715
  }),
690
716
  query_params,
691
717
  undefined,
692
- xHeaders,
693
- { headers }
718
+ { ...xHeaders, ...requestHeaders },
719
+ { responseHeaders }
694
720
  );
695
721
 
696
722
  let responseData = response;
697
- if (headers) {
723
+ if (responseHeaders) {
698
724
  responseData = response[0];
699
725
  }
700
726
 
@@ -717,13 +743,17 @@ class Order {
717
743
 
718
744
  /**
719
745
  * @param {OrderApplicationValidator.TrackShipmentParam} arg - Arg object.
746
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
720
747
  * @param {import("../ApplicationAPIClient").Options} - Options
721
748
  * @returns {Promise<OrderApplicationModel.ShipmentTrack>} - Success response
722
749
  * @name trackShipment
723
750
  * @summary: Track shipment
724
751
  * @description: Track Shipment by shipment id, for application based on application Id - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/trackShipment/).
725
752
  */
726
- async trackShipment({ shipmentId } = {}, { headers } = { headers: false }) {
753
+ async trackShipment(
754
+ { shipmentId, requestHeaders } = { requestHeaders: {} },
755
+ { responseHeaders } = { responseHeaders: false }
756
+ ) {
727
757
  const { error } = OrderApplicationValidator.trackShipment().validate(
728
758
  { shipmentId },
729
759
  { abortEarly: false, allowUnknown: true }
@@ -759,12 +789,12 @@ class Order {
759
789
  }),
760
790
  query_params,
761
791
  undefined,
762
- xHeaders,
763
- { headers }
792
+ { ...xHeaders, ...requestHeaders },
793
+ { responseHeaders }
764
794
  );
765
795
 
766
796
  let responseData = response;
767
- if (headers) {
797
+ if (responseHeaders) {
768
798
  responseData = response[0];
769
799
  }
770
800
 
@@ -787,6 +817,7 @@ class Order {
787
817
 
788
818
  /**
789
819
  * @param {OrderApplicationValidator.UpdateShipmentStatusParam} arg - Arg object.
820
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
790
821
  * @param {import("../ApplicationAPIClient").Options} - Options
791
822
  * @returns {Promise<OrderApplicationModel.ShipmentApplicationStatusResponse>}
792
823
  * - Success response
@@ -796,8 +827,8 @@ class Order {
796
827
  * @description: Use this API to update the status of a shipment using its shipment ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/updateShipmentStatus/).
797
828
  */
798
829
  async updateShipmentStatus(
799
- { shipmentId, body } = {},
800
- { headers } = { headers: false }
830
+ { shipmentId, body, requestHeaders } = { requestHeaders: {} },
831
+ { responseHeaders } = { responseHeaders: false }
801
832
  ) {
802
833
  const { error } = OrderApplicationValidator.updateShipmentStatus().validate(
803
834
  { shipmentId, body },
@@ -834,12 +865,12 @@ class Order {
834
865
  }),
835
866
  query_params,
836
867
  body,
837
- xHeaders,
838
- { headers }
868
+ { ...xHeaders, ...requestHeaders },
869
+ { responseHeaders }
839
870
  );
840
871
 
841
872
  let responseData = response;
842
- if (headers) {
873
+ if (responseHeaders) {
843
874
  responseData = response[0];
844
875
  }
845
876
 
@@ -862,6 +893,7 @@ class Order {
862
893
 
863
894
  /**
864
895
  * @param {OrderApplicationValidator.VerifyOtpShipmentCustomerParam} arg - Arg object.
896
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
865
897
  * @param {import("../ApplicationAPIClient").Options} - Options
866
898
  * @returns {Promise<OrderApplicationModel.VerifyOtpResponse>} - Success response
867
899
  * @name verifyOtpShipmentCustomer
@@ -869,8 +901,8 @@ class Order {
869
901
  * @description: Use this API to verify OTP and create a session token with custom payload. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/verifyOtpShipmentCustomer/).
870
902
  */
871
903
  async verifyOtpShipmentCustomer(
872
- { orderId, shipmentId, body } = {},
873
- { headers } = { headers: false }
904
+ { orderId, shipmentId, body, requestHeaders } = { requestHeaders: {} },
905
+ { responseHeaders } = { responseHeaders: false }
874
906
  ) {
875
907
  const {
876
908
  error,
@@ -909,12 +941,12 @@ class Order {
909
941
  }),
910
942
  query_params,
911
943
  body,
912
- xHeaders,
913
- { headers }
944
+ { ...xHeaders, ...requestHeaders },
945
+ { responseHeaders }
914
946
  );
915
947
 
916
948
  let responseData = response;
917
- if (headers) {
949
+ if (responseHeaders) {
918
950
  responseData = response[0];
919
951
  }
920
952