@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
@@ -41,13 +41,17 @@ class Share {
41
41
 
42
42
  /**
43
43
  * @param {ShareApplicationValidator.CreateShortLinkParam} arg - Arg object.
44
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
44
45
  * @param {import("../ApplicationAPIClient").Options} - Options
45
46
  * @returns {Promise<ShareApplicationModel.ShortLinkRes>} - Success response
46
47
  * @name createShortLink
47
48
  * @summary: Create a short link
48
49
  * @description: Use this API to create a short link that is easy to write/share/read as compared to long URLs. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/share/createShortLink/).
49
50
  */
50
- async createShortLink({ body } = {}, { headers } = { headers: false }) {
51
+ async createShortLink(
52
+ { body, requestHeaders } = { requestHeaders: {} },
53
+ { responseHeaders } = { responseHeaders: false }
54
+ ) {
51
55
  const { error } = ShareApplicationValidator.createShortLink().validate(
52
56
  { body },
53
57
  { abortEarly: false, allowUnknown: true }
@@ -83,12 +87,12 @@ class Share {
83
87
  }),
84
88
  query_params,
85
89
  body,
86
- xHeaders,
87
- { headers }
90
+ { ...xHeaders, ...requestHeaders },
91
+ { responseHeaders }
88
92
  );
89
93
 
90
94
  let responseData = response;
91
- if (headers) {
95
+ if (responseHeaders) {
92
96
  responseData = response[0];
93
97
  }
94
98
 
@@ -110,13 +114,18 @@ class Share {
110
114
  }
111
115
 
112
116
  /**
117
+ * @param {ShareApplicationValidator.GetApplicationQRCodeParam} arg - Arg object.
118
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
113
119
  * @param {import("../ApplicationAPIClient").Options} - Options
114
120
  * @returns {Promise<ShareApplicationModel.QRCodeResp>} - Success response
115
121
  * @name getApplicationQRCode
116
122
  * @summary: Create QR Code of an app
117
123
  * @description: Use this API to create a QR code of an app for sharing it with users who want to use the app. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/share/getApplicationQRCode/).
118
124
  */
119
- async getApplicationQRCode({ headers } = { headers: false }) {
125
+ async getApplicationQRCode(
126
+ { requestHeaders } = { requestHeaders: {} },
127
+ { responseHeaders } = { responseHeaders: false }
128
+ ) {
120
129
  const { error } = ShareApplicationValidator.getApplicationQRCode().validate(
121
130
  {},
122
131
  { abortEarly: false, allowUnknown: true }
@@ -152,12 +161,12 @@ class Share {
152
161
  }),
153
162
  query_params,
154
163
  undefined,
155
- xHeaders,
156
- { headers }
164
+ { ...xHeaders, ...requestHeaders },
165
+ { responseHeaders }
157
166
  );
158
167
 
159
168
  let responseData = response;
160
- if (headers) {
169
+ if (responseHeaders) {
161
170
  responseData = response[0];
162
171
  }
163
172
 
@@ -180,6 +189,7 @@ class Share {
180
189
 
181
190
  /**
182
191
  * @param {ShareApplicationValidator.GetCollectionQRCodeBySlugParam} arg - Arg object.
192
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
183
193
  * @param {import("../ApplicationAPIClient").Options} - Options
184
194
  * @returns {Promise<ShareApplicationModel.QRCodeResp>} - Success response
185
195
  * @name getCollectionQRCodeBySlug
@@ -187,8 +197,8 @@ class Share {
187
197
  * @description: Use this API to create a QR code of a collection of products for sharing it with users who want to view/purchase the collection. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/share/getCollectionQRCodeBySlug/).
188
198
  */
189
199
  async getCollectionQRCodeBySlug(
190
- { slug } = {},
191
- { headers } = { headers: false }
200
+ { slug, requestHeaders } = { requestHeaders: {} },
201
+ { responseHeaders } = { responseHeaders: false }
192
202
  ) {
193
203
  const {
194
204
  error,
@@ -227,12 +237,12 @@ class Share {
227
237
  }),
228
238
  query_params,
229
239
  undefined,
230
- xHeaders,
231
- { headers }
240
+ { ...xHeaders, ...requestHeaders },
241
+ { responseHeaders }
232
242
  );
233
243
 
234
244
  let responseData = response;
235
- if (headers) {
245
+ if (responseHeaders) {
236
246
  responseData = response[0];
237
247
  }
238
248
 
@@ -256,6 +266,7 @@ class Share {
256
266
  /**
257
267
  * @param {ShareApplicationValidator.GetOriginalShortLinkByHashParam} arg -
258
268
  * Arg object.
269
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
259
270
  * @param {import("../ApplicationAPIClient").Options} - Options
260
271
  * @returns {Promise<ShareApplicationModel.ShortLinkRes>} - Success response
261
272
  * @name getOriginalShortLinkByHash
@@ -263,8 +274,8 @@ class Share {
263
274
  * @description: Use this API to retrieve the original link from a short-link by using a hash value. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/share/getOriginalShortLinkByHash/).
264
275
  */
265
276
  async getOriginalShortLinkByHash(
266
- { hash } = {},
267
- { headers } = { headers: false }
277
+ { hash, requestHeaders } = { requestHeaders: {} },
278
+ { responseHeaders } = { responseHeaders: false }
268
279
  ) {
269
280
  const {
270
281
  error,
@@ -303,12 +314,12 @@ class Share {
303
314
  }),
304
315
  query_params,
305
316
  undefined,
306
- xHeaders,
307
- { headers }
317
+ { ...xHeaders, ...requestHeaders },
318
+ { responseHeaders }
308
319
  );
309
320
 
310
321
  let responseData = response;
311
- if (headers) {
322
+ if (responseHeaders) {
312
323
  responseData = response[0];
313
324
  }
314
325
 
@@ -331,6 +342,7 @@ class Share {
331
342
 
332
343
  /**
333
344
  * @param {ShareApplicationValidator.GetProductQRCodeBySlugParam} arg - Arg object.
345
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
334
346
  * @param {import("../ApplicationAPIClient").Options} - Options
335
347
  * @returns {Promise<ShareApplicationModel.QRCodeResp>} - Success response
336
348
  * @name getProductQRCodeBySlug
@@ -338,8 +350,8 @@ class Share {
338
350
  * @description: Use this API to create a QR code of a product for sharing it with users who want to view/purchase the product. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/share/getProductQRCodeBySlug/).
339
351
  */
340
352
  async getProductQRCodeBySlug(
341
- { slug } = {},
342
- { headers } = { headers: false }
353
+ { slug, requestHeaders } = { requestHeaders: {} },
354
+ { responseHeaders } = { responseHeaders: false }
343
355
  ) {
344
356
  const {
345
357
  error,
@@ -378,12 +390,12 @@ class Share {
378
390
  }),
379
391
  query_params,
380
392
  undefined,
381
- xHeaders,
382
- { headers }
393
+ { ...xHeaders, ...requestHeaders },
394
+ { responseHeaders }
383
395
  );
384
396
 
385
397
  let responseData = response;
386
- if (headers) {
398
+ if (responseHeaders) {
387
399
  responseData = response[0];
388
400
  }
389
401
 
@@ -406,13 +418,17 @@ class Share {
406
418
 
407
419
  /**
408
420
  * @param {ShareApplicationValidator.GetShortLinkByHashParam} arg - Arg object.
421
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
409
422
  * @param {import("../ApplicationAPIClient").Options} - Options
410
423
  * @returns {Promise<ShareApplicationModel.ShortLinkRes>} - Success response
411
424
  * @name getShortLinkByHash
412
425
  * @summary: Get short link by hash
413
426
  * @description: Use this API to get a short link by using a hash value. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/share/getShortLinkByHash/).
414
427
  */
415
- async getShortLinkByHash({ hash } = {}, { headers } = { headers: false }) {
428
+ async getShortLinkByHash(
429
+ { hash, requestHeaders } = { requestHeaders: {} },
430
+ { responseHeaders } = { responseHeaders: false }
431
+ ) {
416
432
  const { error } = ShareApplicationValidator.getShortLinkByHash().validate(
417
433
  { hash },
418
434
  { abortEarly: false, allowUnknown: true }
@@ -448,12 +464,12 @@ class Share {
448
464
  }),
449
465
  query_params,
450
466
  undefined,
451
- xHeaders,
452
- { headers }
467
+ { ...xHeaders, ...requestHeaders },
468
+ { responseHeaders }
453
469
  );
454
470
 
455
471
  let responseData = response;
456
- if (headers) {
472
+ if (responseHeaders) {
457
473
  responseData = response[0];
458
474
  }
459
475
 
@@ -476,13 +492,17 @@ class Share {
476
492
 
477
493
  /**
478
494
  * @param {ShareApplicationValidator.GetUrlQRCodeParam} arg - Arg object.
495
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
479
496
  * @param {import("../ApplicationAPIClient").Options} - Options
480
497
  * @returns {Promise<ShareApplicationModel.QRCodeResp>} - Success response
481
498
  * @name getUrlQRCode
482
499
  * @summary: Create QR Code of a URL
483
500
  * @description: Use this API to create a QR code of a URL for sharing it with users who want to visit the link. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/share/getUrlQRCode/).
484
501
  */
485
- async getUrlQRCode({ url } = {}, { headers } = { headers: false }) {
502
+ async getUrlQRCode(
503
+ { url, requestHeaders } = { requestHeaders: {} },
504
+ { responseHeaders } = { responseHeaders: false }
505
+ ) {
486
506
  const { error } = ShareApplicationValidator.getUrlQRCode().validate(
487
507
  { url },
488
508
  { abortEarly: false, allowUnknown: true }
@@ -519,12 +539,12 @@ class Share {
519
539
  }),
520
540
  query_params,
521
541
  undefined,
522
- xHeaders,
523
- { headers }
542
+ { ...xHeaders, ...requestHeaders },
543
+ { responseHeaders }
524
544
  );
525
545
 
526
546
  let responseData = response;
527
- if (headers) {
547
+ if (responseHeaders) {
528
548
  responseData = response[0];
529
549
  }
530
550
 
@@ -12,16 +12,6 @@ export = ShareApplicationModel;
12
12
  * @typedef ErrorRes
13
13
  * @property {string} [message]
14
14
  */
15
- /**
16
- * @typedef Page
17
- * @property {number} [current]
18
- * @property {boolean} [has_next]
19
- * @property {boolean} [has_previous]
20
- * @property {number} [item_total]
21
- * @property {string} [next_id]
22
- * @property {number} [size]
23
- * @property {string} type
24
- */
25
15
  /**
26
16
  * @typedef QRCodeResp
27
17
  * @property {string} [link]
@@ -39,11 +29,6 @@ export = ShareApplicationModel;
39
29
  * @property {RedirectDevice} [ios]
40
30
  * @property {WebRedirect} [web]
41
31
  */
42
- /**
43
- * @typedef ShortLinkList
44
- * @property {ShortLinkRes[]} [items]
45
- * @property {Page} [page]
46
- */
47
32
  /**
48
33
  * @typedef ShortLinkReq
49
34
  * @property {boolean} [active]
@@ -102,7 +87,7 @@ export = ShareApplicationModel;
102
87
  declare class ShareApplicationModel {
103
88
  }
104
89
  declare namespace ShareApplicationModel {
105
- export { Attribution, CampaignShortLink, ErrorRes, Page, QRCodeResp, RedirectDevice, Redirects, ShortLinkList, ShortLinkReq, ShortLinkRes, SocialMediaTags, UrlInfo, WebRedirect };
90
+ export { Attribution, CampaignShortLink, ErrorRes, QRCodeResp, RedirectDevice, Redirects, ShortLinkReq, ShortLinkRes, SocialMediaTags, UrlInfo, WebRedirect };
106
91
  }
107
92
  /** @returns {Attribution} */
108
93
  declare function Attribution(): Attribution;
@@ -120,17 +105,6 @@ declare function ErrorRes(): ErrorRes;
120
105
  type ErrorRes = {
121
106
  message?: string;
122
107
  };
123
- /** @returns {Page} */
124
- declare function Page(): Page;
125
- type Page = {
126
- current?: number;
127
- has_next?: boolean;
128
- has_previous?: boolean;
129
- item_total?: number;
130
- next_id?: string;
131
- size?: number;
132
- type: string;
133
- };
134
108
  /** @returns {QRCodeResp} */
135
109
  declare function QRCodeResp(): QRCodeResp;
136
110
  type QRCodeResp = {
@@ -151,12 +125,6 @@ type Redirects = {
151
125
  ios?: RedirectDevice;
152
126
  web?: WebRedirect;
153
127
  };
154
- /** @returns {ShortLinkList} */
155
- declare function ShortLinkList(): ShortLinkList;
156
- type ShortLinkList = {
157
- items?: ShortLinkRes[];
158
- page?: Page;
159
- };
160
128
  /** @returns {ShortLinkReq} */
161
129
  declare function ShortLinkReq(): ShortLinkReq;
162
130
  type ShortLinkReq = {
@@ -16,17 +16,6 @@ const Joi = require("joi");
16
16
  * @property {string} [message]
17
17
  */
18
18
 
19
- /**
20
- * @typedef Page
21
- * @property {number} [current]
22
- * @property {boolean} [has_next]
23
- * @property {boolean} [has_previous]
24
- * @property {number} [item_total]
25
- * @property {string} [next_id]
26
- * @property {number} [size]
27
- * @property {string} type
28
- */
29
-
30
19
  /**
31
20
  * @typedef QRCodeResp
32
21
  * @property {string} [link]
@@ -47,12 +36,6 @@ const Joi = require("joi");
47
36
  * @property {WebRedirect} [web]
48
37
  */
49
38
 
50
- /**
51
- * @typedef ShortLinkList
52
- * @property {ShortLinkRes[]} [items]
53
- * @property {Page} [page]
54
- */
55
-
56
39
  /**
57
40
  * @typedef ShortLinkReq
58
41
  * @property {boolean} [active]
@@ -136,19 +119,6 @@ class ShareApplicationModel {
136
119
  });
137
120
  }
138
121
 
139
- /** @returns {Page} */
140
- static Page() {
141
- return Joi.object({
142
- current: Joi.number(),
143
- has_next: Joi.boolean(),
144
- has_previous: Joi.boolean(),
145
- item_total: Joi.number(),
146
- next_id: Joi.string().allow(""),
147
- size: Joi.number(),
148
- type: Joi.string().allow("").required(),
149
- });
150
- }
151
-
152
122
  /** @returns {QRCodeResp} */
153
123
  static QRCodeResp() {
154
124
  return Joi.object({
@@ -175,14 +145,6 @@ class ShareApplicationModel {
175
145
  });
176
146
  }
177
147
 
178
- /** @returns {ShortLinkList} */
179
- static ShortLinkList() {
180
- return Joi.object({
181
- items: Joi.array().items(ShareApplicationModel.ShortLinkRes()),
182
- page: ShareApplicationModel.Page(),
183
- });
184
- }
185
-
186
148
  /** @returns {ShortLinkReq} */
187
149
  static ShortLinkReq() {
188
150
  return Joi.object({
@@ -12,39 +12,44 @@ declare class Theme {
12
12
  updateUrls(urls: any): void;
13
13
  /**
14
14
  * @param {ThemeApplicationValidator.GetAllPagesParam} arg - Arg object.
15
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
15
16
  * @param {import("../ApplicationAPIClient").Options} - Options
16
17
  * @returns {Promise<ThemeApplicationModel.AllAvailablePageSchema>} - Success response
17
18
  * @name getAllPages
18
19
  * @summary: Get all pages of a theme
19
20
  * @description: Use this API to retrieve all the available pages of a theme by its ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/theme/getAllPages/).
20
21
  */
21
- getAllPages({ themeId }?: ThemeApplicationValidator.GetAllPagesParam, { headers }?: import("../ApplicationAPIClient").Options): Promise<ThemeApplicationModel.AllAvailablePageSchema>;
22
+ getAllPages({ themeId, requestHeaders }?: ThemeApplicationValidator.GetAllPagesParam, { responseHeaders }?: object): Promise<ThemeApplicationModel.AllAvailablePageSchema>;
22
23
  /**
24
+ * @param {ThemeApplicationValidator.GetAppliedThemeParam} arg - Arg object.
25
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
23
26
  * @param {import("../ApplicationAPIClient").Options} - Options
24
27
  * @returns {Promise<ThemeApplicationModel.ThemesSchema>} - Success response
25
28
  * @name getAppliedTheme
26
29
  * @summary: Get the theme currently applied to an application
27
30
  * @description: An application has multiple themes, but only one theme can be applied at a time. Use this API to retrieve the theme currently applied to the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/theme/getAppliedTheme/).
28
31
  */
29
- getAppliedTheme({ headers }?: import("../ApplicationAPIClient").Options): Promise<ThemeApplicationModel.ThemesSchema>;
32
+ getAppliedTheme({ requestHeaders }?: any, { responseHeaders }?: object): Promise<ThemeApplicationModel.ThemesSchema>;
30
33
  /**
31
34
  * @param {ThemeApplicationValidator.GetPageParam} arg - Arg object.
35
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
32
36
  * @param {import("../ApplicationAPIClient").Options} - Options
33
37
  * @returns {Promise<ThemeApplicationModel.AvailablePageSchema>} - Success response
34
38
  * @name getPage
35
39
  * @summary: Get page of a theme
36
40
  * @description: Use this API to retrieve a page of a theme. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/theme/getPage/).
37
41
  */
38
- getPage({ themeId, pageValue }?: ThemeApplicationValidator.GetPageParam, { headers }?: import("../ApplicationAPIClient").Options): Promise<ThemeApplicationModel.AvailablePageSchema>;
42
+ getPage({ themeId, pageValue, requestHeaders }?: ThemeApplicationValidator.GetPageParam, { responseHeaders }?: object): Promise<ThemeApplicationModel.AvailablePageSchema>;
39
43
  /**
40
44
  * @param {ThemeApplicationValidator.GetThemeForPreviewParam} arg - Arg object.
45
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
41
46
  * @param {import("../ApplicationAPIClient").Options} - Options
42
47
  * @returns {Promise<ThemeApplicationModel.ThemesSchema>} - Success response
43
48
  * @name getThemeForPreview
44
49
  * @summary: Get a theme for a preview
45
50
  * @description: A theme can be previewed before applying it. Use this API to retrieve the preview of a theme by its ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/theme/getThemeForPreview/).
46
51
  */
47
- getThemeForPreview({ themeId }?: ThemeApplicationValidator.GetThemeForPreviewParam, { headers }?: import("../ApplicationAPIClient").Options): Promise<ThemeApplicationModel.ThemesSchema>;
52
+ getThemeForPreview({ themeId, requestHeaders }?: ThemeApplicationValidator.GetThemeForPreviewParam, { responseHeaders }?: object): Promise<ThemeApplicationModel.ThemesSchema>;
48
53
  }
49
54
  import ThemeApplicationValidator = require("./ThemeApplicationValidator");
50
55
  import ThemeApplicationModel = require("./ThemeApplicationModel");
@@ -12,9 +12,9 @@ class Theme {
12
12
  this._conf = _conf;
13
13
  this._relativeUrls = {
14
14
  getAllPages: "/service/application/theme/v1.0/{theme_id}/page",
15
- getAppliedTheme: "/service/application/theme/v1.0/applied-theme",
15
+ getAppliedTheme: "/service/application/theme/v2.0/applied-theme",
16
16
  getPage: "/service/application/theme/v1.0/{theme_id}/{page_value}",
17
- getThemeForPreview: "/service/application/theme/v1.0/{theme_id}/preview",
17
+ getThemeForPreview: "/service/application/theme/v2.0/{theme_id}/preview",
18
18
  };
19
19
  this._urls = Object.entries(this._relativeUrls).reduce(
20
20
  (urls, [method, relativeUrl]) => {
@@ -34,13 +34,17 @@ class Theme {
34
34
 
35
35
  /**
36
36
  * @param {ThemeApplicationValidator.GetAllPagesParam} arg - Arg object.
37
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
37
38
  * @param {import("../ApplicationAPIClient").Options} - Options
38
39
  * @returns {Promise<ThemeApplicationModel.AllAvailablePageSchema>} - Success response
39
40
  * @name getAllPages
40
41
  * @summary: Get all pages of a theme
41
42
  * @description: Use this API to retrieve all the available pages of a theme by its ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/theme/getAllPages/).
42
43
  */
43
- async getAllPages({ themeId } = {}, { headers } = { headers: false }) {
44
+ async getAllPages(
45
+ { themeId, requestHeaders } = { requestHeaders: {} },
46
+ { responseHeaders } = { responseHeaders: false }
47
+ ) {
44
48
  const { error } = ThemeApplicationValidator.getAllPages().validate(
45
49
  { themeId },
46
50
  { abortEarly: false, allowUnknown: true }
@@ -76,12 +80,12 @@ class Theme {
76
80
  }),
77
81
  query_params,
78
82
  undefined,
79
- xHeaders,
80
- { headers }
83
+ { ...xHeaders, ...requestHeaders },
84
+ { responseHeaders }
81
85
  );
82
86
 
83
87
  let responseData = response;
84
- if (headers) {
88
+ if (responseHeaders) {
85
89
  responseData = response[0];
86
90
  }
87
91
 
@@ -103,13 +107,18 @@ class Theme {
103
107
  }
104
108
 
105
109
  /**
110
+ * @param {ThemeApplicationValidator.GetAppliedThemeParam} arg - Arg object.
111
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
106
112
  * @param {import("../ApplicationAPIClient").Options} - Options
107
113
  * @returns {Promise<ThemeApplicationModel.ThemesSchema>} - Success response
108
114
  * @name getAppliedTheme
109
115
  * @summary: Get the theme currently applied to an application
110
116
  * @description: An application has multiple themes, but only one theme can be applied at a time. Use this API to retrieve the theme currently applied to the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/theme/getAppliedTheme/).
111
117
  */
112
- async getAppliedTheme({ headers } = { headers: false }) {
118
+ async getAppliedTheme(
119
+ { requestHeaders } = { requestHeaders: {} },
120
+ { responseHeaders } = { responseHeaders: false }
121
+ ) {
113
122
  const { error } = ThemeApplicationValidator.getAppliedTheme().validate(
114
123
  {},
115
124
  { abortEarly: false, allowUnknown: true }
@@ -145,12 +154,12 @@ class Theme {
145
154
  }),
146
155
  query_params,
147
156
  undefined,
148
- xHeaders,
149
- { headers }
157
+ { ...xHeaders, ...requestHeaders },
158
+ { responseHeaders }
150
159
  );
151
160
 
152
161
  let responseData = response;
153
- if (headers) {
162
+ if (responseHeaders) {
154
163
  responseData = response[0];
155
164
  }
156
165
 
@@ -173,13 +182,17 @@ class Theme {
173
182
 
174
183
  /**
175
184
  * @param {ThemeApplicationValidator.GetPageParam} arg - Arg object.
185
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
176
186
  * @param {import("../ApplicationAPIClient").Options} - Options
177
187
  * @returns {Promise<ThemeApplicationModel.AvailablePageSchema>} - Success response
178
188
  * @name getPage
179
189
  * @summary: Get page of a theme
180
190
  * @description: Use this API to retrieve a page of a theme. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/theme/getPage/).
181
191
  */
182
- async getPage({ themeId, pageValue } = {}, { headers } = { headers: false }) {
192
+ async getPage(
193
+ { themeId, pageValue, requestHeaders } = { requestHeaders: {} },
194
+ { responseHeaders } = { responseHeaders: false }
195
+ ) {
183
196
  const { error } = ThemeApplicationValidator.getPage().validate(
184
197
  { themeId, pageValue },
185
198
  { abortEarly: false, allowUnknown: true }
@@ -213,12 +226,12 @@ class Theme {
213
226
  }),
214
227
  query_params,
215
228
  undefined,
216
- xHeaders,
217
- { headers }
229
+ { ...xHeaders, ...requestHeaders },
230
+ { responseHeaders }
218
231
  );
219
232
 
220
233
  let responseData = response;
221
- if (headers) {
234
+ if (responseHeaders) {
222
235
  responseData = response[0];
223
236
  }
224
237
 
@@ -241,13 +254,17 @@ class Theme {
241
254
 
242
255
  /**
243
256
  * @param {ThemeApplicationValidator.GetThemeForPreviewParam} arg - Arg object.
257
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
244
258
  * @param {import("../ApplicationAPIClient").Options} - Options
245
259
  * @returns {Promise<ThemeApplicationModel.ThemesSchema>} - Success response
246
260
  * @name getThemeForPreview
247
261
  * @summary: Get a theme for a preview
248
262
  * @description: A theme can be previewed before applying it. Use this API to retrieve the preview of a theme by its ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/theme/getThemeForPreview/).
249
263
  */
250
- async getThemeForPreview({ themeId } = {}, { headers } = { headers: false }) {
264
+ async getThemeForPreview(
265
+ { themeId, requestHeaders } = { requestHeaders: {} },
266
+ { responseHeaders } = { responseHeaders: false }
267
+ ) {
251
268
  const { error } = ThemeApplicationValidator.getThemeForPreview().validate(
252
269
  { themeId },
253
270
  { abortEarly: false, allowUnknown: true }
@@ -283,12 +300,12 @@ class Theme {
283
300
  }),
284
301
  query_params,
285
302
  undefined,
286
- xHeaders,
287
- { headers }
303
+ { ...xHeaders, ...requestHeaders },
304
+ { responseHeaders }
288
305
  );
289
306
 
290
307
  let responseData = response;
291
- if (headers) {
308
+ if (responseHeaders) {
292
309
  responseData = response[0];
293
310
  }
294
311