@gofynd/fdk-client-javascript 1.2.0 → 1.3.1-beta.1

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 +6 -4
  12. package/sdk/application/Cart/CartApplicationModel.js +6 -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 +90 -7
  234. package/sdk/platform/Webhook/WebhookPlatformValidator.js +113 -3
  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
@@ -80,6 +80,7 @@ class Catalog {
80
80
 
81
81
  /**
82
82
  * @param {CatalogApplicationValidator.FollowByIdParam} arg - Arg object.
83
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
83
84
  * @param {import("../ApplicationAPIClient").Options} - Options
84
85
  * @returns {Promise<CatalogApplicationModel.FollowPostResponse>} - Success response
85
86
  * @name followById
@@ -87,8 +88,8 @@ class Catalog {
87
88
  * @description: Follow a particular entity such as product, brand, collection specified by its ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/followById/).
88
89
  */
89
90
  async followById(
90
- { collectionType, collectionId } = {},
91
- { headers } = { headers: false }
91
+ { collectionType, collectionId, requestHeaders } = { requestHeaders: {} },
92
+ { responseHeaders } = { responseHeaders: false }
92
93
  ) {
93
94
  const { error } = CatalogApplicationValidator.followById().validate(
94
95
  { collectionType, collectionId },
@@ -125,12 +126,12 @@ class Catalog {
125
126
  }),
126
127
  query_params,
127
128
  undefined,
128
- xHeaders,
129
- { headers }
129
+ { ...xHeaders, ...requestHeaders },
130
+ { responseHeaders }
130
131
  );
131
132
 
132
133
  let responseData = response;
133
- if (headers) {
134
+ if (responseHeaders) {
134
135
  responseData = response[0];
135
136
  }
136
137
 
@@ -153,13 +154,17 @@ class Catalog {
153
154
 
154
155
  /**
155
156
  * @param {CatalogApplicationValidator.GetBrandDetailBySlugParam} arg - Arg object.
157
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
156
158
  * @param {import("../ApplicationAPIClient").Options} - Options
157
159
  * @returns {Promise<CatalogApplicationModel.BrandDetailResponse>} - Success response
158
160
  * @name getBrandDetailBySlug
159
161
  * @summary: Get metadata of a brand
160
162
  * @description: Fetch metadata of a brand such as name, information, logo, banner, etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getBrandDetailBySlug/).
161
163
  */
162
- async getBrandDetailBySlug({ slug } = {}, { headers } = { headers: false }) {
164
+ async getBrandDetailBySlug(
165
+ { slug, requestHeaders } = { requestHeaders: {} },
166
+ { responseHeaders } = { responseHeaders: false }
167
+ ) {
163
168
  const {
164
169
  error,
165
170
  } = CatalogApplicationValidator.getBrandDetailBySlug().validate(
@@ -197,12 +202,12 @@ class Catalog {
197
202
  }),
198
203
  query_params,
199
204
  undefined,
200
- xHeaders,
201
- { headers }
205
+ { ...xHeaders, ...requestHeaders },
206
+ { responseHeaders }
202
207
  );
203
208
 
204
209
  let responseData = response;
205
- if (headers) {
210
+ if (responseHeaders) {
206
211
  responseData = response[0];
207
212
  }
208
213
 
@@ -225,6 +230,7 @@ class Catalog {
225
230
 
226
231
  /**
227
232
  * @param {CatalogApplicationValidator.GetBrandsParam} arg - Arg object.
233
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
228
234
  * @param {import("../ApplicationAPIClient").Options} - Options
229
235
  * @returns {Promise<CatalogApplicationModel.BrandListingResponse>} - Success response
230
236
  * @name getBrands
@@ -232,8 +238,8 @@ class Catalog {
232
238
  * @description: A brand is the name under which a product is sold. Use this API to list all the brands. You can also filter the brands by department. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getBrands/).
233
239
  */
234
240
  async getBrands(
235
- { department, pageNo, pageSize } = {},
236
- { headers } = { headers: false }
241
+ { department, pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
242
+ { responseHeaders } = { responseHeaders: false }
237
243
  ) {
238
244
  const { error } = CatalogApplicationValidator.getBrands().validate(
239
245
  { department, pageNo, pageSize },
@@ -273,12 +279,12 @@ class Catalog {
273
279
  }),
274
280
  query_params,
275
281
  undefined,
276
- xHeaders,
277
- { headers }
282
+ { ...xHeaders, ...requestHeaders },
283
+ { responseHeaders }
278
284
  );
279
285
 
280
286
  let responseData = response;
281
- if (headers) {
287
+ if (responseHeaders) {
282
288
  responseData = response[0];
283
289
  }
284
290
 
@@ -333,6 +339,7 @@ class Catalog {
333
339
 
334
340
  /**
335
341
  * @param {CatalogApplicationValidator.GetCategoriesParam} arg - Arg object.
342
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
336
343
  * @param {import("../ApplicationAPIClient").Options} - Options
337
344
  * @returns {Promise<CatalogApplicationModel.CategoryListingResponse>} -
338
345
  * Success response
@@ -340,7 +347,10 @@ class Catalog {
340
347
  * @summary: List all the categories
341
348
  * @description: Use this API to list all the categories. You can also filter the categories by department. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getCategories/).
342
349
  */
343
- async getCategories({ department } = {}, { headers } = { headers: false }) {
350
+ async getCategories(
351
+ { department, requestHeaders } = { requestHeaders: {} },
352
+ { responseHeaders } = { responseHeaders: false }
353
+ ) {
344
354
  const { error } = CatalogApplicationValidator.getCategories().validate(
345
355
  { department },
346
356
  { abortEarly: false, allowUnknown: true }
@@ -377,12 +387,12 @@ class Catalog {
377
387
  }),
378
388
  query_params,
379
389
  undefined,
380
- xHeaders,
381
- { headers }
390
+ { ...xHeaders, ...requestHeaders },
391
+ { responseHeaders }
382
392
  );
383
393
 
384
394
  let responseData = response;
385
- if (headers) {
395
+ if (responseHeaders) {
386
396
  responseData = response[0];
387
397
  }
388
398
 
@@ -405,6 +415,7 @@ class Catalog {
405
415
 
406
416
  /**
407
417
  * @param {CatalogApplicationValidator.GetCategoryDetailBySlugParam} arg - Arg object.
418
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
408
419
  * @param {import("../ApplicationAPIClient").Options} - Options
409
420
  * @returns {Promise<CatalogApplicationModel.CategoryMetaResponse>} - Success response
410
421
  * @name getCategoryDetailBySlug
@@ -412,8 +423,8 @@ class Catalog {
412
423
  * @description: Fetch metadata of a category such as name, information, logo, banner, etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getCategoryDetailBySlug/).
413
424
  */
414
425
  async getCategoryDetailBySlug(
415
- { slug } = {},
416
- { headers } = { headers: false }
426
+ { slug, requestHeaders } = { requestHeaders: {} },
427
+ { responseHeaders } = { responseHeaders: false }
417
428
  ) {
418
429
  const {
419
430
  error,
@@ -452,12 +463,12 @@ class Catalog {
452
463
  }),
453
464
  query_params,
454
465
  undefined,
455
- xHeaders,
456
- { headers }
466
+ { ...xHeaders, ...requestHeaders },
467
+ { responseHeaders }
457
468
  );
458
469
 
459
470
  let responseData = response;
460
- if (headers) {
471
+ if (responseHeaders) {
461
472
  responseData = response[0];
462
473
  }
463
474
 
@@ -482,6 +493,7 @@ class Catalog {
482
493
  * @param {CatalogApplicationValidator.GetCollectionDetailBySlugParam} arg
483
494
  * - Arg object.
484
495
  *
496
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
485
497
  * @param {import("../ApplicationAPIClient").Options} - Options
486
498
  * @returns {Promise<CatalogApplicationModel.CollectionDetailResponse>} -
487
499
  * Success response
@@ -490,8 +502,8 @@ class Catalog {
490
502
  * @description: Get the details of a collection by its `slug`. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getCollectionDetailBySlug/).
491
503
  */
492
504
  async getCollectionDetailBySlug(
493
- { slug } = {},
494
- { headers } = { headers: false }
505
+ { slug, requestHeaders } = { requestHeaders: {} },
506
+ { responseHeaders } = { responseHeaders: false }
495
507
  ) {
496
508
  const {
497
509
  error,
@@ -530,12 +542,12 @@ class Catalog {
530
542
  }),
531
543
  query_params,
532
544
  undefined,
533
- xHeaders,
534
- { headers }
545
+ { ...xHeaders, ...requestHeaders },
546
+ { responseHeaders }
535
547
  );
536
548
 
537
549
  let responseData = response;
538
- if (headers) {
550
+ if (responseHeaders) {
539
551
  responseData = response[0];
540
552
  }
541
553
 
@@ -559,6 +571,7 @@ class Catalog {
559
571
  /**
560
572
  * @param {CatalogApplicationValidator.GetCollectionItemsBySlugParam} arg -
561
573
  * Arg object.
574
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
562
575
  * @param {import("../ApplicationAPIClient").Options} - Options
563
576
  * @returns {Promise<CatalogApplicationModel.ProductListingResponse>} -
564
577
  * Success response
@@ -567,8 +580,19 @@ class Catalog {
567
580
  * @description: Get items in a collection specified by its `slug`. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getCollectionItemsBySlug/).
568
581
  */
569
582
  async getCollectionItemsBySlug(
570
- { slug, f, q, filters, sortOn, pageId, pageSize, pageNo, pageType } = {},
571
- { headers } = { headers: false }
583
+ {
584
+ slug,
585
+ f,
586
+ q,
587
+ filters,
588
+ sortOn,
589
+ pageId,
590
+ pageSize,
591
+ pageNo,
592
+ pageType,
593
+ requestHeaders,
594
+ } = { requestHeaders: {} },
595
+ { responseHeaders } = { responseHeaders: false }
572
596
  ) {
573
597
  const {
574
598
  error,
@@ -615,12 +639,12 @@ class Catalog {
615
639
  }),
616
640
  query_params,
617
641
  undefined,
618
- xHeaders,
619
- { headers }
642
+ { ...xHeaders, ...requestHeaders },
643
+ { responseHeaders }
620
644
  );
621
645
 
622
646
  let responseData = response;
623
- if (headers) {
647
+ if (responseHeaders) {
624
648
  responseData = response[0];
625
649
  }
626
650
 
@@ -698,6 +722,7 @@ class Catalog {
698
722
 
699
723
  /**
700
724
  * @param {CatalogApplicationValidator.GetCollectionsParam} arg - Arg object.
725
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
701
726
  * @param {import("../ApplicationAPIClient").Options} - Options
702
727
  * @returns {Promise<CatalogApplicationModel.GetCollectionListingResponse>}
703
728
  * - Success response
@@ -707,8 +732,8 @@ class Catalog {
707
732
  * @description: Collections are a great way to organize your products and can improve the ability for customers to find items quickly and efficiently. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getCollections/).
708
733
  */
709
734
  async getCollections(
710
- { pageNo, pageSize, tag, q } = {},
711
- { headers } = { headers: false }
735
+ { pageNo, pageSize, tag, q, requestHeaders } = { requestHeaders: {} },
736
+ { responseHeaders } = { responseHeaders: false }
712
737
  ) {
713
738
  const { error } = CatalogApplicationValidator.getCollections().validate(
714
739
  { pageNo, pageSize, tag, q },
@@ -749,12 +774,12 @@ class Catalog {
749
774
  }),
750
775
  query_params,
751
776
  undefined,
752
- xHeaders,
753
- { headers }
777
+ { ...xHeaders, ...requestHeaders },
778
+ { responseHeaders }
754
779
  );
755
780
 
756
781
  let responseData = response;
757
- if (headers) {
782
+ if (responseHeaders) {
758
783
  responseData = response[0];
759
784
  }
760
785
 
@@ -810,6 +835,7 @@ class Catalog {
810
835
  * @param {CatalogApplicationValidator.GetComparedFrequentlyProductBySlugParam} arg
811
836
  * - Arg object.
812
837
  *
838
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
813
839
  * @param {import("../ApplicationAPIClient").Options} - Options
814
840
  * @returns {Promise<CatalogApplicationModel.ProductFrequentlyComparedSimilarResponse>}
815
841
  * - Success response
@@ -819,8 +845,8 @@ class Catalog {
819
845
  * @description: Use this API to compare a given product automatically with products that are frequently compared with it. Only one slug is needed. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getComparedFrequentlyProductBySlug/).
820
846
  */
821
847
  async getComparedFrequentlyProductBySlug(
822
- { slug } = {},
823
- { headers } = { headers: false }
848
+ { slug, requestHeaders } = { requestHeaders: {} },
849
+ { responseHeaders } = { responseHeaders: false }
824
850
  ) {
825
851
  const {
826
852
  error,
@@ -859,12 +885,12 @@ class Catalog {
859
885
  }),
860
886
  query_params,
861
887
  undefined,
862
- xHeaders,
863
- { headers }
888
+ { ...xHeaders, ...requestHeaders },
889
+ { responseHeaders }
864
890
  );
865
891
 
866
892
  let responseData = response;
867
- if (headers) {
893
+ if (responseHeaders) {
868
894
  responseData = response[0];
869
895
  }
870
896
 
@@ -886,13 +912,18 @@ class Catalog {
886
912
  }
887
913
 
888
914
  /**
915
+ * @param {CatalogApplicationValidator.GetDepartmentsParam} arg - Arg object.
916
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
889
917
  * @param {import("../ApplicationAPIClient").Options} - Options
890
918
  * @returns {Promise<CatalogApplicationModel.DepartmentResponse>} - Success response
891
919
  * @name getDepartments
892
920
  * @summary: List all the departments
893
921
  * @description: Departments are a way to categorise similar products. A product can lie in multiple departments. For example, a skirt can below to the 'Women's Fashion' Department while a handbag can lie in 'Women's Accessories' Department. Use this API to list all the departments. If successful, returns the list of departments specified in `DepartmentResponse` - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getDepartments/).
894
922
  */
895
- async getDepartments({ headers } = { headers: false }) {
923
+ async getDepartments(
924
+ { requestHeaders } = { requestHeaders: {} },
925
+ { responseHeaders } = { responseHeaders: false }
926
+ ) {
896
927
  const { error } = CatalogApplicationValidator.getDepartments().validate(
897
928
  {},
898
929
  { abortEarly: false, allowUnknown: true }
@@ -928,12 +959,12 @@ class Catalog {
928
959
  }),
929
960
  query_params,
930
961
  undefined,
931
- xHeaders,
932
- { headers }
962
+ { ...xHeaders, ...requestHeaders },
963
+ { responseHeaders }
933
964
  );
934
965
 
935
966
  let responseData = response;
936
- if (headers) {
967
+ if (responseHeaders) {
937
968
  responseData = response[0];
938
969
  }
939
970
 
@@ -956,6 +987,7 @@ class Catalog {
956
987
 
957
988
  /**
958
989
  * @param {CatalogApplicationValidator.GetFollowIdsParam} arg - Arg object.
990
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
959
991
  * @param {import("../ApplicationAPIClient").Options} - Options
960
992
  * @returns {Promise<CatalogApplicationModel.FollowIdsResponse>} - Success response
961
993
  * @name getFollowIds
@@ -963,8 +995,8 @@ class Catalog {
963
995
  * @description: You can get the IDs of all the followed Products, Brands and Collections. Pass collection_type as query parameter to fetch specific Ids - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getFollowIds/).
964
996
  */
965
997
  async getFollowIds(
966
- { collectionType } = {},
967
- { headers } = { headers: false }
998
+ { collectionType, requestHeaders } = { requestHeaders: {} },
999
+ { responseHeaders } = { responseHeaders: false }
968
1000
  ) {
969
1001
  const { error } = CatalogApplicationValidator.getFollowIds().validate(
970
1002
  { collectionType },
@@ -1002,12 +1034,12 @@ class Catalog {
1002
1034
  }),
1003
1035
  query_params,
1004
1036
  undefined,
1005
- xHeaders,
1006
- { headers }
1037
+ { ...xHeaders, ...requestHeaders },
1038
+ { responseHeaders }
1007
1039
  );
1008
1040
 
1009
1041
  let responseData = response;
1010
- if (headers) {
1042
+ if (responseHeaders) {
1011
1043
  responseData = response[0];
1012
1044
  }
1013
1045
 
@@ -1030,6 +1062,7 @@ class Catalog {
1030
1062
 
1031
1063
  /**
1032
1064
  * @param {CatalogApplicationValidator.GetFollowedListingParam} arg - Arg object.
1065
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1033
1066
  * @param {import("../ApplicationAPIClient").Options} - Options
1034
1067
  * @returns {Promise<CatalogApplicationModel.GetFollowListingResponse>} -
1035
1068
  * Success response
@@ -1038,8 +1071,10 @@ class Catalog {
1038
1071
  * @description: Users can follow a product they like. This API retrieves the products the user have followed. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getFollowedListing/).
1039
1072
  */
1040
1073
  async getFollowedListing(
1041
- { collectionType, pageId, pageSize } = {},
1042
- { headers } = { headers: false }
1074
+ { collectionType, pageId, pageSize, requestHeaders } = {
1075
+ requestHeaders: {},
1076
+ },
1077
+ { responseHeaders } = { responseHeaders: false }
1043
1078
  ) {
1044
1079
  const { error } = CatalogApplicationValidator.getFollowedListing().validate(
1045
1080
  { collectionType, pageId, pageSize },
@@ -1078,12 +1113,12 @@ class Catalog {
1078
1113
  }),
1079
1114
  query_params,
1080
1115
  undefined,
1081
- xHeaders,
1082
- { headers }
1116
+ { ...xHeaders, ...requestHeaders },
1117
+ { responseHeaders }
1083
1118
  );
1084
1119
 
1085
1120
  let responseData = response;
1086
- if (headers) {
1121
+ if (responseHeaders) {
1087
1122
  responseData = response[0];
1088
1123
  }
1089
1124
 
@@ -1136,6 +1171,7 @@ class Catalog {
1136
1171
 
1137
1172
  /**
1138
1173
  * @param {CatalogApplicationValidator.GetFollowerCountByIdParam} arg - Arg object.
1174
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1139
1175
  * @param {import("../ApplicationAPIClient").Options} - Options
1140
1176
  * @returns {Promise<CatalogApplicationModel.FollowerCountResponse>} -
1141
1177
  * Success response
@@ -1144,8 +1180,8 @@ class Catalog {
1144
1180
  * @description: Get the total count of followers for a given collection type and collection ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getFollowerCountById/).
1145
1181
  */
1146
1182
  async getFollowerCountById(
1147
- { collectionType, collectionId } = {},
1148
- { headers } = { headers: false }
1183
+ { collectionType, collectionId, requestHeaders } = { requestHeaders: {} },
1184
+ { responseHeaders } = { responseHeaders: false }
1149
1185
  ) {
1150
1186
  const {
1151
1187
  error,
@@ -1184,12 +1220,12 @@ class Catalog {
1184
1220
  }),
1185
1221
  query_params,
1186
1222
  undefined,
1187
- xHeaders,
1188
- { headers }
1223
+ { ...xHeaders, ...requestHeaders },
1224
+ { responseHeaders }
1189
1225
  );
1190
1226
 
1191
1227
  let responseData = response;
1192
- if (headers) {
1228
+ if (responseHeaders) {
1193
1229
  responseData = response[0];
1194
1230
  }
1195
1231
 
@@ -1212,6 +1248,7 @@ class Catalog {
1212
1248
 
1213
1249
  /**
1214
1250
  * @param {CatalogApplicationValidator.GetHomeProductsParam} arg - Arg object.
1251
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1215
1252
  * @param {import("../ApplicationAPIClient").Options} - Options
1216
1253
  * @returns {Promise<CatalogApplicationModel.HomeListingResponse>} - Success response
1217
1254
  * @name getHomeProducts
@@ -1219,8 +1256,8 @@ class Catalog {
1219
1256
  * @description: List all the products associated with a brand, collection or category in a random order. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getHomeProducts/).
1220
1257
  */
1221
1258
  async getHomeProducts(
1222
- { sortOn, pageId, pageSize } = {},
1223
- { headers } = { headers: false }
1259
+ { sortOn, pageId, pageSize, requestHeaders } = { requestHeaders: {} },
1260
+ { responseHeaders } = { responseHeaders: false }
1224
1261
  ) {
1225
1262
  const { error } = CatalogApplicationValidator.getHomeProducts().validate(
1226
1263
  { sortOn, pageId, pageSize },
@@ -1260,12 +1297,12 @@ class Catalog {
1260
1297
  }),
1261
1298
  query_params,
1262
1299
  undefined,
1263
- xHeaders,
1264
- { headers }
1300
+ { ...xHeaders, ...requestHeaders },
1301
+ { responseHeaders }
1265
1302
  );
1266
1303
 
1267
1304
  let responseData = response;
1268
- if (headers) {
1305
+ if (responseHeaders) {
1269
1306
  responseData = response[0];
1270
1307
  }
1271
1308
 
@@ -1319,6 +1356,7 @@ class Catalog {
1319
1356
 
1320
1357
  /**
1321
1358
  * @param {CatalogApplicationValidator.GetInStockLocationsParam} arg - Arg object.
1359
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1322
1360
  * @param {import("../ApplicationAPIClient").Options} - Options
1323
1361
  * @returns {Promise<CatalogApplicationModel.ApplicationStoreListing>} -
1324
1362
  * Success response
@@ -1327,8 +1365,17 @@ class Catalog {
1327
1365
  * @description: Use this API to get a list of stores in a specific application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getInStockLocations/).
1328
1366
  */
1329
1367
  async getInStockLocations(
1330
- { pageNo, pageSize, q, city, range, latitude, longitude } = {},
1331
- { headers } = { headers: false }
1368
+ {
1369
+ pageNo,
1370
+ pageSize,
1371
+ q,
1372
+ city,
1373
+ range,
1374
+ latitude,
1375
+ longitude,
1376
+ requestHeaders,
1377
+ } = { requestHeaders: {} },
1378
+ { responseHeaders } = { responseHeaders: false }
1332
1379
  ) {
1333
1380
  const {
1334
1381
  error,
@@ -1374,12 +1421,12 @@ class Catalog {
1374
1421
  }),
1375
1422
  query_params,
1376
1423
  undefined,
1377
- xHeaders,
1378
- { headers }
1424
+ { ...xHeaders, ...requestHeaders },
1425
+ { responseHeaders }
1379
1426
  );
1380
1427
 
1381
1428
  let responseData = response;
1382
- if (headers) {
1429
+ if (responseHeaders) {
1383
1430
  responseData = response[0];
1384
1431
  }
1385
1432
 
@@ -1449,6 +1496,7 @@ class Catalog {
1449
1496
 
1450
1497
  /**
1451
1498
  * @param {CatalogApplicationValidator.GetLocationDetailsByIdParam} arg - Arg object.
1499
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1452
1500
  * @param {import("../ApplicationAPIClient").Options} - Options
1453
1501
  * @returns {Promise<CatalogApplicationModel.StoreDetails>} - Success response
1454
1502
  * @name getLocationDetailsById
@@ -1456,8 +1504,8 @@ class Catalog {
1456
1504
  * @description: Use this API to get meta details for a store. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getLocationDetailsById/).
1457
1505
  */
1458
1506
  async getLocationDetailsById(
1459
- { locationId } = {},
1460
- { headers } = { headers: false }
1507
+ { locationId, requestHeaders } = { requestHeaders: {} },
1508
+ { responseHeaders } = { responseHeaders: false }
1461
1509
  ) {
1462
1510
  const {
1463
1511
  error,
@@ -1496,12 +1544,12 @@ class Catalog {
1496
1544
  }),
1497
1545
  query_params,
1498
1546
  undefined,
1499
- xHeaders,
1500
- { headers }
1547
+ { ...xHeaders, ...requestHeaders },
1548
+ { responseHeaders }
1501
1549
  );
1502
1550
 
1503
1551
  let responseData = response;
1504
- if (headers) {
1552
+ if (responseHeaders) {
1505
1553
  responseData = response[0];
1506
1554
  }
1507
1555
 
@@ -1524,6 +1572,7 @@ class Catalog {
1524
1572
 
1525
1573
  /**
1526
1574
  * @param {CatalogApplicationValidator.GetProductBundlesBySlugParam} arg - Arg object.
1575
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1527
1576
  * @param {import("../ApplicationAPIClient").Options} - Options
1528
1577
  * @returns {Promise<CatalogApplicationModel.ProductBundle>} - Success response
1529
1578
  * @name getProductBundlesBySlug
@@ -1531,8 +1580,8 @@ class Catalog {
1531
1580
  * @description: Use this API to retrieve products bundles to the one specified by its slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductBundlesBySlug/).
1532
1581
  */
1533
1582
  async getProductBundlesBySlug(
1534
- { slug, id } = {},
1535
- { headers } = { headers: false }
1583
+ { slug, id, requestHeaders } = { requestHeaders: {} },
1584
+ { responseHeaders } = { responseHeaders: false }
1536
1585
  ) {
1537
1586
  const {
1538
1587
  error,
@@ -1573,12 +1622,12 @@ class Catalog {
1573
1622
  }),
1574
1623
  query_params,
1575
1624
  undefined,
1576
- xHeaders,
1577
- { headers }
1625
+ { ...xHeaders, ...requestHeaders },
1626
+ { responseHeaders }
1578
1627
  );
1579
1628
 
1580
1629
  let responseData = response;
1581
- if (headers) {
1630
+ if (responseHeaders) {
1582
1631
  responseData = response[0];
1583
1632
  }
1584
1633
 
@@ -1603,6 +1652,7 @@ class Catalog {
1603
1652
  * @param {CatalogApplicationValidator.GetProductComparisonBySlugsParam} arg
1604
1653
  * - Arg object.
1605
1654
  *
1655
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1606
1656
  * @param {import("../ApplicationAPIClient").Options} - Options
1607
1657
  * @returns {Promise<CatalogApplicationModel.ProductsComparisonResponse>} -
1608
1658
  * Success response
@@ -1611,8 +1661,8 @@ class Catalog {
1611
1661
  * @description: Use this API to compare the features of products belonging to the same category. Note that at least one slug is mandatory in the request query. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductComparisonBySlugs/).
1612
1662
  */
1613
1663
  async getProductComparisonBySlugs(
1614
- { slug } = {},
1615
- { headers } = { headers: false }
1664
+ { slug, requestHeaders } = { requestHeaders: {} },
1665
+ { responseHeaders } = { responseHeaders: false }
1616
1666
  ) {
1617
1667
  const {
1618
1668
  error,
@@ -1652,12 +1702,12 @@ class Catalog {
1652
1702
  }),
1653
1703
  query_params,
1654
1704
  undefined,
1655
- xHeaders,
1656
- { headers }
1705
+ { ...xHeaders, ...requestHeaders },
1706
+ { responseHeaders }
1657
1707
  );
1658
1708
 
1659
1709
  let responseData = response;
1660
- if (headers) {
1710
+ if (responseHeaders) {
1661
1711
  responseData = response[0];
1662
1712
  }
1663
1713
 
@@ -1680,6 +1730,7 @@ class Catalog {
1680
1730
 
1681
1731
  /**
1682
1732
  * @param {CatalogApplicationValidator.GetProductDetailBySlugParam} arg - Arg object.
1733
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1683
1734
  * @param {import("../ApplicationAPIClient").Options} - Options
1684
1735
  * @returns {Promise<CatalogApplicationModel.ProductDetail>} - Success response
1685
1736
  * @name getProductDetailBySlug
@@ -1687,8 +1738,8 @@ class Catalog {
1687
1738
  * @description: Use this API to retrieve a product by its slug value. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductDetailBySlug/).
1688
1739
  */
1689
1740
  async getProductDetailBySlug(
1690
- { slug } = {},
1691
- { headers } = { headers: false }
1741
+ { slug, requestHeaders } = { requestHeaders: {} },
1742
+ { responseHeaders } = { responseHeaders: false }
1692
1743
  ) {
1693
1744
  const {
1694
1745
  error,
@@ -1727,12 +1778,12 @@ class Catalog {
1727
1778
  }),
1728
1779
  query_params,
1729
1780
  undefined,
1730
- xHeaders,
1731
- { headers }
1781
+ { ...xHeaders, ...requestHeaders },
1782
+ { responseHeaders }
1732
1783
  );
1733
1784
 
1734
1785
  let responseData = response;
1735
- if (headers) {
1786
+ if (responseHeaders) {
1736
1787
  responseData = response[0];
1737
1788
  }
1738
1789
 
@@ -1755,6 +1806,7 @@ class Catalog {
1755
1806
 
1756
1807
  /**
1757
1808
  * @param {CatalogApplicationValidator.GetProductPriceBySlugParam} arg - Arg object.
1809
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1758
1810
  * @param {import("../ApplicationAPIClient").Options} - Options
1759
1811
  * @returns {Promise<CatalogApplicationModel.ProductSizePriceResponseV3>} -
1760
1812
  * Success response
@@ -1763,8 +1815,10 @@ class Catalog {
1763
1815
  * @description: Prices may vary for different sizes of a product. Use this API to retrieve the price of a product size at all the selling locations near to a PIN Code. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductPriceBySlug/).
1764
1816
  */
1765
1817
  async getProductPriceBySlug(
1766
- { slug, size, storeId, pincode, moq } = {},
1767
- { headers } = { headers: false }
1818
+ { slug, size, storeId, pincode, moq, requestHeaders } = {
1819
+ requestHeaders: {},
1820
+ },
1821
+ { responseHeaders } = { responseHeaders: false }
1768
1822
  ) {
1769
1823
  const {
1770
1824
  error,
@@ -1806,12 +1860,12 @@ class Catalog {
1806
1860
  }),
1807
1861
  query_params,
1808
1862
  undefined,
1809
- xHeaders,
1810
- { headers }
1863
+ { ...xHeaders, ...requestHeaders },
1864
+ { responseHeaders }
1811
1865
  );
1812
1866
 
1813
1867
  let responseData = response;
1814
- if (headers) {
1868
+ if (responseHeaders) {
1815
1869
  responseData = response[0];
1816
1870
  }
1817
1871
 
@@ -1834,6 +1888,7 @@ class Catalog {
1834
1888
 
1835
1889
  /**
1836
1890
  * @param {CatalogApplicationValidator.GetProductSellersBySlugParam} arg - Arg object.
1891
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1837
1892
  * @param {import("../ApplicationAPIClient").Options} - Options
1838
1893
  * @returns {Promise<CatalogApplicationModel.ProductSizeSellersResponseV3>}
1839
1894
  * - Success response
@@ -1843,8 +1898,10 @@ class Catalog {
1843
1898
  * @description: A product of a particular size may be sold by multiple sellers. Use this API to fetch the sellers having the stock of a particular size at a given PIN Code. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductSellersBySlug/).
1844
1899
  */
1845
1900
  async getProductSellersBySlug(
1846
- { slug, size, pincode, strategy, pageNo, pageSize } = {},
1847
- { headers } = { headers: false }
1901
+ { slug, size, pincode, strategy, pageNo, pageSize, requestHeaders } = {
1902
+ requestHeaders: {},
1903
+ },
1904
+ { responseHeaders } = { responseHeaders: false }
1848
1905
  ) {
1849
1906
  const {
1850
1907
  error,
@@ -1887,12 +1944,12 @@ class Catalog {
1887
1944
  }),
1888
1945
  query_params,
1889
1946
  undefined,
1890
- xHeaders,
1891
- { headers }
1947
+ { ...xHeaders, ...requestHeaders },
1948
+ { responseHeaders }
1892
1949
  );
1893
1950
 
1894
1951
  let responseData = response;
1895
- if (headers) {
1952
+ if (responseHeaders) {
1896
1953
  responseData = response[0];
1897
1954
  }
1898
1955
 
@@ -1962,6 +2019,7 @@ class Catalog {
1962
2019
 
1963
2020
  /**
1964
2021
  * @param {CatalogApplicationValidator.GetProductSizesBySlugParam} arg - Arg object.
2022
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1965
2023
  * @param {import("../ApplicationAPIClient").Options} - Options
1966
2024
  * @returns {Promise<CatalogApplicationModel.ProductSizes>} - Success response
1967
2025
  * @name getProductSizesBySlug
@@ -1969,8 +2027,8 @@ class Catalog {
1969
2027
  * @description: A product can have multiple sizes. Use this API to fetch all the available sizes of a product. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductSizesBySlug/).
1970
2028
  */
1971
2029
  async getProductSizesBySlug(
1972
- { slug, storeId } = {},
1973
- { headers } = { headers: false }
2030
+ { slug, storeId, requestHeaders } = { requestHeaders: {} },
2031
+ { responseHeaders } = { responseHeaders: false }
1974
2032
  ) {
1975
2033
  const {
1976
2034
  error,
@@ -2010,12 +2068,12 @@ class Catalog {
2010
2068
  }),
2011
2069
  query_params,
2012
2070
  undefined,
2013
- xHeaders,
2014
- { headers }
2071
+ { ...xHeaders, ...requestHeaders },
2072
+ { responseHeaders }
2015
2073
  );
2016
2074
 
2017
2075
  let responseData = response;
2018
- if (headers) {
2076
+ if (responseHeaders) {
2019
2077
  responseData = response[0];
2020
2078
  }
2021
2079
 
@@ -2038,6 +2096,7 @@ class Catalog {
2038
2096
 
2039
2097
  /**
2040
2098
  * @param {CatalogApplicationValidator.GetProductStockByIdsParam} arg - Arg object.
2099
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2041
2100
  * @param {import("../ApplicationAPIClient").Options} - Options
2042
2101
  * @returns {Promise<CatalogApplicationModel.ProductStockStatusResponse>} -
2043
2102
  * Success response
@@ -2046,8 +2105,8 @@ class Catalog {
2046
2105
  * @description: Retrieve the available stock of the products. Use this API to retrieve stock of multiple products (up to 50) at a time. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductStockByIds/).
2047
2106
  */
2048
2107
  async getProductStockByIds(
2049
- { itemId, alu, skuCode, ean, upc } = {},
2050
- { headers } = { headers: false }
2108
+ { itemId, alu, skuCode, ean, upc, requestHeaders } = { requestHeaders: {} },
2109
+ { responseHeaders } = { responseHeaders: false }
2051
2110
  ) {
2052
2111
  const {
2053
2112
  error,
@@ -2091,12 +2150,12 @@ class Catalog {
2091
2150
  }),
2092
2151
  query_params,
2093
2152
  undefined,
2094
- xHeaders,
2095
- { headers }
2153
+ { ...xHeaders, ...requestHeaders },
2154
+ { responseHeaders }
2096
2155
  );
2097
2156
 
2098
2157
  let responseData = response;
2099
- if (headers) {
2158
+ if (responseHeaders) {
2100
2159
  responseData = response[0];
2101
2160
  }
2102
2161
 
@@ -2121,6 +2180,7 @@ class Catalog {
2121
2180
  * @param {CatalogApplicationValidator.GetProductStockForTimeByIdsParam} arg
2122
2181
  * - Arg object.
2123
2182
  *
2183
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2124
2184
  * @param {import("../ApplicationAPIClient").Options} - Options
2125
2185
  * @returns {Promise<CatalogApplicationModel.ProductStockPolling>} - Success response
2126
2186
  * @name getProductStockForTimeByIds
@@ -2128,8 +2188,8 @@ class Catalog {
2128
2188
  * @description: Retrieve the available stock of the products. Use this API to get the stock status of products whose inventory is updated at the specified time - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductStockForTimeByIds/).
2129
2189
  */
2130
2190
  async getProductStockForTimeByIds(
2131
- { timestamp, pageSize, pageId } = {},
2132
- { headers } = { headers: false }
2191
+ { timestamp, pageSize, pageId, requestHeaders } = { requestHeaders: {} },
2192
+ { responseHeaders } = { responseHeaders: false }
2133
2193
  ) {
2134
2194
  const {
2135
2195
  error,
@@ -2171,12 +2231,12 @@ class Catalog {
2171
2231
  }),
2172
2232
  query_params,
2173
2233
  undefined,
2174
- xHeaders,
2175
- { headers }
2234
+ { ...xHeaders, ...requestHeaders },
2235
+ { responseHeaders }
2176
2236
  );
2177
2237
 
2178
2238
  let responseData = response;
2179
- if (headers) {
2239
+ if (responseHeaders) {
2180
2240
  responseData = response[0];
2181
2241
  }
2182
2242
 
@@ -2229,6 +2289,7 @@ class Catalog {
2229
2289
  /**
2230
2290
  * @param {CatalogApplicationValidator.GetProductVariantsBySlugParam} arg -
2231
2291
  * Arg object.
2292
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2232
2293
  * @param {import("../ApplicationAPIClient").Options} - Options
2233
2294
  * @returns {Promise<CatalogApplicationModel.ProductVariantsResponse>} -
2234
2295
  * Success response
@@ -2237,8 +2298,8 @@ class Catalog {
2237
2298
  * @description: A product can have a different type of variants such as colour, shade, memory. Use this API to fetch all the available variants of a product using its slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductVariantsBySlug/).
2238
2299
  */
2239
2300
  async getProductVariantsBySlug(
2240
- { slug } = {},
2241
- { headers } = { headers: false }
2301
+ { slug, requestHeaders } = { requestHeaders: {} },
2302
+ { responseHeaders } = { responseHeaders: false }
2242
2303
  ) {
2243
2304
  const {
2244
2305
  error,
@@ -2277,12 +2338,12 @@ class Catalog {
2277
2338
  }),
2278
2339
  query_params,
2279
2340
  undefined,
2280
- xHeaders,
2281
- { headers }
2341
+ { ...xHeaders, ...requestHeaders },
2342
+ { responseHeaders }
2282
2343
  );
2283
2344
 
2284
2345
  let responseData = response;
2285
- if (headers) {
2346
+ if (responseHeaders) {
2286
2347
  responseData = response[0];
2287
2348
  }
2288
2349
 
@@ -2305,6 +2366,7 @@ class Catalog {
2305
2366
 
2306
2367
  /**
2307
2368
  * @param {CatalogApplicationValidator.GetProductsParam} arg - Arg object.
2369
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2308
2370
  * @param {import("../ApplicationAPIClient").Options} - Options
2309
2371
  * @returns {Promise<CatalogApplicationModel.ProductListingResponse>} -
2310
2372
  * Success response
@@ -2313,8 +2375,18 @@ class Catalog {
2313
2375
  * @description: Use this API to list all the products. You may choose a sort order or make arbitrary search queries by entering the product name, brand, category or collection. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProducts/).
2314
2376
  */
2315
2377
  async getProducts(
2316
- { q, f, filters, sortOn, pageId, pageSize, pageNo, pageType } = {},
2317
- { headers } = { headers: false }
2378
+ {
2379
+ q,
2380
+ f,
2381
+ filters,
2382
+ sortOn,
2383
+ pageId,
2384
+ pageSize,
2385
+ pageNo,
2386
+ pageType,
2387
+ requestHeaders,
2388
+ } = { requestHeaders: {} },
2389
+ { responseHeaders } = { responseHeaders: false }
2318
2390
  ) {
2319
2391
  const { error } = CatalogApplicationValidator.getProducts().validate(
2320
2392
  { q, f, filters, sortOn, pageId, pageSize, pageNo, pageType },
@@ -2359,12 +2431,12 @@ class Catalog {
2359
2431
  }),
2360
2432
  query_params,
2361
2433
  undefined,
2362
- xHeaders,
2363
- { headers }
2434
+ { ...xHeaders, ...requestHeaders },
2435
+ { responseHeaders }
2364
2436
  );
2365
2437
 
2366
2438
  let responseData = response;
2367
- if (headers) {
2439
+ if (responseHeaders) {
2368
2440
  responseData = response[0];
2369
2441
  }
2370
2442
 
@@ -2431,13 +2503,17 @@ class Catalog {
2431
2503
 
2432
2504
  /**
2433
2505
  * @param {CatalogApplicationValidator.GetSearchResultsParam} arg - Arg object.
2506
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2434
2507
  * @param {import("../ApplicationAPIClient").Options} - Options
2435
2508
  * @returns {Promise<CatalogApplicationModel.AutoCompleteResponse>} - Success response
2436
2509
  * @name getSearchResults
2437
2510
  * @summary: Get relevant suggestions for a search query
2438
2511
  * @description: Retrieves a list of suggestions for a given search query. Each suggestion is a valid search term that's generated on the basis of query. This is particularly useful to enhance the user experience while using the search tool. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getSearchResults/).
2439
2512
  */
2440
- async getSearchResults({ q } = {}, { headers } = { headers: false }) {
2513
+ async getSearchResults(
2514
+ { q, requestHeaders } = { requestHeaders: {} },
2515
+ { responseHeaders } = { responseHeaders: false }
2516
+ ) {
2441
2517
  const { error } = CatalogApplicationValidator.getSearchResults().validate(
2442
2518
  { q },
2443
2519
  { abortEarly: false, allowUnknown: true }
@@ -2474,12 +2550,12 @@ class Catalog {
2474
2550
  }),
2475
2551
  query_params,
2476
2552
  undefined,
2477
- xHeaders,
2478
- { headers }
2553
+ { ...xHeaders, ...requestHeaders },
2554
+ { responseHeaders }
2479
2555
  );
2480
2556
 
2481
2557
  let responseData = response;
2482
- if (headers) {
2558
+ if (responseHeaders) {
2483
2559
  responseData = response[0];
2484
2560
  }
2485
2561
 
@@ -2504,6 +2580,7 @@ class Catalog {
2504
2580
  * @param {CatalogApplicationValidator.GetSimilarComparisonProductBySlugParam} arg
2505
2581
  * - Arg object.
2506
2582
  *
2583
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2507
2584
  * @param {import("../ApplicationAPIClient").Options} - Options
2508
2585
  * @returns {Promise<CatalogApplicationModel.ProductCompareResponse>} -
2509
2586
  * Success response
@@ -2512,8 +2589,8 @@ class Catalog {
2512
2589
  * @description: Use this API to compare a given product automatically with similar products. Only one slug is needed. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getSimilarComparisonProductBySlug/).
2513
2590
  */
2514
2591
  async getSimilarComparisonProductBySlug(
2515
- { slug } = {},
2516
- { headers } = { headers: false }
2592
+ { slug, requestHeaders } = { requestHeaders: {} },
2593
+ { responseHeaders } = { responseHeaders: false }
2517
2594
  ) {
2518
2595
  const {
2519
2596
  error,
@@ -2552,12 +2629,12 @@ class Catalog {
2552
2629
  }),
2553
2630
  query_params,
2554
2631
  undefined,
2555
- xHeaders,
2556
- { headers }
2632
+ { ...xHeaders, ...requestHeaders },
2633
+ { responseHeaders }
2557
2634
  );
2558
2635
 
2559
2636
  let responseData = response;
2560
- if (headers) {
2637
+ if (responseHeaders) {
2561
2638
  responseData = response[0];
2562
2639
  }
2563
2640
 
@@ -2580,6 +2657,7 @@ class Catalog {
2580
2657
 
2581
2658
  /**
2582
2659
  * @param {CatalogApplicationValidator.GetStoresParam} arg - Arg object.
2660
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2583
2661
  * @param {import("../ApplicationAPIClient").Options} - Options
2584
2662
  * @returns {Promise<CatalogApplicationModel.StoreListingResponse>} - Success response
2585
2663
  * @name getStores
@@ -2587,8 +2665,17 @@ class Catalog {
2587
2665
  * @description: Use this API to get a list of stores in a specific application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getStores/).
2588
2666
  */
2589
2667
  async getStores(
2590
- { pageNo, pageSize, q, city, range, latitude, longitude } = {},
2591
- { headers } = { headers: false }
2668
+ {
2669
+ pageNo,
2670
+ pageSize,
2671
+ q,
2672
+ city,
2673
+ range,
2674
+ latitude,
2675
+ longitude,
2676
+ requestHeaders,
2677
+ } = { requestHeaders: {} },
2678
+ { responseHeaders } = { responseHeaders: false }
2592
2679
  ) {
2593
2680
  const { error } = CatalogApplicationValidator.getStores().validate(
2594
2681
  { pageNo, pageSize, q, city, range, latitude, longitude },
@@ -2632,12 +2719,12 @@ class Catalog {
2632
2719
  }),
2633
2720
  query_params,
2634
2721
  undefined,
2635
- xHeaders,
2636
- { headers }
2722
+ { ...xHeaders, ...requestHeaders },
2723
+ { responseHeaders }
2637
2724
  );
2638
2725
 
2639
2726
  let responseData = response;
2640
- if (headers) {
2727
+ if (responseHeaders) {
2641
2728
  responseData = response[0];
2642
2729
  }
2643
2730
 
@@ -2700,6 +2787,7 @@ class Catalog {
2700
2787
 
2701
2788
  /**
2702
2789
  * @param {CatalogApplicationValidator.UnfollowByIdParam} arg - Arg object.
2790
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2703
2791
  * @param {import("../ApplicationAPIClient").Options} - Options
2704
2792
  * @returns {Promise<CatalogApplicationModel.FollowPostResponse>} - Success response
2705
2793
  * @name unfollowById
@@ -2707,8 +2795,8 @@ class Catalog {
2707
2795
  * @description: You can undo a followed product, brand or collection by its ID. This action is referred as _unfollow_. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/unfollowById/).
2708
2796
  */
2709
2797
  async unfollowById(
2710
- { collectionType, collectionId } = {},
2711
- { headers } = { headers: false }
2798
+ { collectionType, collectionId, requestHeaders } = { requestHeaders: {} },
2799
+ { responseHeaders } = { responseHeaders: false }
2712
2800
  ) {
2713
2801
  const { error } = CatalogApplicationValidator.unfollowById().validate(
2714
2802
  { collectionType, collectionId },
@@ -2745,12 +2833,12 @@ class Catalog {
2745
2833
  }),
2746
2834
  query_params,
2747
2835
  undefined,
2748
- xHeaders,
2749
- { headers }
2836
+ { ...xHeaders, ...requestHeaders },
2837
+ { responseHeaders }
2750
2838
  );
2751
2839
 
2752
2840
  let responseData = response;
2753
- if (headers) {
2841
+ if (responseHeaders) {
2754
2842
  responseData = response[0];
2755
2843
  }
2756
2844