@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
@@ -13,6 +13,7 @@ class CompanyProfile {
13
13
 
14
14
  /**
15
15
  * @param {CompanyProfilePlatformValidator.CbsOnboardGetParam} arg - Arg object
16
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
16
17
  * @param {import("../PlatformAPIClient").Options} - Options
17
18
  * @returns {Promise<CompanyProfilePlatformModel.GetCompanyProfileSerializerResponse>}
18
19
  * - Success response
@@ -21,7 +22,10 @@ class CompanyProfile {
21
22
  * @summary: Get company profile
22
23
  * @description: This API allows to view the company profile of the seller account. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/cbsOnboardGet/).
23
24
  */
24
- async cbsOnboardGet({ headers } = { headers: false }) {
25
+ async cbsOnboardGet(
26
+ { requestHeaders } = { requestHeaders: {} },
27
+ { responseHeaders } = { responseHeaders: false }
28
+ ) {
25
29
  const { error } = CompanyProfilePlatformValidator.cbsOnboardGet().validate(
26
30
  {},
27
31
  { abortEarly: false, allowUnknown: true }
@@ -54,12 +58,12 @@ class CompanyProfile {
54
58
  `/service/platform/company-profile/v1.0/company/${this.config.companyId}`,
55
59
  query_params,
56
60
  undefined,
57
- xHeaders,
58
- { headers }
61
+ { ...xHeaders, ...requestHeaders },
62
+ { responseHeaders }
59
63
  );
60
64
 
61
65
  let responseData = response;
62
- if (headers) {
66
+ if (responseHeaders) {
63
67
  responseData = response[0];
64
68
  }
65
69
 
@@ -82,6 +86,7 @@ class CompanyProfile {
82
86
 
83
87
  /**
84
88
  * @param {CompanyProfilePlatformValidator.CreateBrandParam} arg - Arg object
89
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
85
90
  * @param {import("../PlatformAPIClient").Options} - Options
86
91
  * @returns {Promise<CompanyProfilePlatformModel.ProfileSuccessResponse>} -
87
92
  * Success response
@@ -89,7 +94,10 @@ class CompanyProfile {
89
94
  * @summary: Create a Brand.
90
95
  * @description: This API allows to create a brand associated to a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/createBrand/).
91
96
  */
92
- async createBrand({ body } = {}, { headers } = { headers: false }) {
97
+ async createBrand(
98
+ { body, requestHeaders } = { requestHeaders: {} },
99
+ { responseHeaders } = { responseHeaders: false }
100
+ ) {
93
101
  const { error } = CompanyProfilePlatformValidator.createBrand().validate(
94
102
  {
95
103
  body,
@@ -126,12 +134,12 @@ class CompanyProfile {
126
134
  `/service/platform/company-profile/v1.0/company/${this.config.companyId}/brand/`,
127
135
  query_params,
128
136
  body,
129
- xHeaders,
130
- { headers }
137
+ { ...xHeaders, ...requestHeaders },
138
+ { responseHeaders }
131
139
  );
132
140
 
133
141
  let responseData = response;
134
- if (headers) {
142
+ if (responseHeaders) {
135
143
  responseData = response[0];
136
144
  }
137
145
 
@@ -156,6 +164,7 @@ class CompanyProfile {
156
164
  * @param {CompanyProfilePlatformValidator.CreateCompanyBrandMappingParam} arg
157
165
  * - Arg object
158
166
  *
167
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
159
168
  * @param {import("../PlatformAPIClient").Options} - Options
160
169
  * @returns {Promise<CompanyProfilePlatformModel.ProfileSuccessResponse>} -
161
170
  * Success response
@@ -164,8 +173,8 @@ class CompanyProfile {
164
173
  * @description: This API allows to create a company brand mapping, for a already existing brand in the system. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/createCompanyBrandMapping/).
165
174
  */
166
175
  async createCompanyBrandMapping(
167
- { body } = {},
168
- { headers } = { headers: false }
176
+ { body, requestHeaders } = { requestHeaders: {} },
177
+ { responseHeaders } = { responseHeaders: false }
169
178
  ) {
170
179
  const {
171
180
  error,
@@ -205,12 +214,12 @@ class CompanyProfile {
205
214
  `/service/platform/company-profile/v1.0/company/${this.config.companyId}/company-brand`,
206
215
  query_params,
207
216
  body,
208
- xHeaders,
209
- { headers }
217
+ { ...xHeaders, ...requestHeaders },
218
+ { responseHeaders }
210
219
  );
211
220
 
212
221
  let responseData = response;
213
- if (headers) {
222
+ if (responseHeaders) {
214
223
  responseData = response[0];
215
224
  }
216
225
 
@@ -233,6 +242,7 @@ class CompanyProfile {
233
242
 
234
243
  /**
235
244
  * @param {CompanyProfilePlatformValidator.CreateLocationParam} arg - Arg object
245
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
236
246
  * @param {import("../PlatformAPIClient").Options} - Options
237
247
  * @returns {Promise<CompanyProfilePlatformModel.ProfileSuccessResponse>} -
238
248
  * Success response
@@ -240,7 +250,10 @@ class CompanyProfile {
240
250
  * @summary: Create a location associated to a company.
241
251
  * @description: This API allows to edit a location associated to a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/createLocation/).
242
252
  */
243
- async createLocation({ body } = {}, { headers } = { headers: false }) {
253
+ async createLocation(
254
+ { body, requestHeaders } = { requestHeaders: {} },
255
+ { responseHeaders } = { responseHeaders: false }
256
+ ) {
244
257
  const { error } = CompanyProfilePlatformValidator.createLocation().validate(
245
258
  {
246
259
  body,
@@ -277,12 +290,12 @@ class CompanyProfile {
277
290
  `/service/platform/company-profile/v1.0/company/${this.config.companyId}/location`,
278
291
  query_params,
279
292
  body,
280
- xHeaders,
281
- { headers }
293
+ { ...xHeaders, ...requestHeaders },
294
+ { responseHeaders }
282
295
  );
283
296
 
284
297
  let responseData = response;
285
- if (headers) {
298
+ if (responseHeaders) {
286
299
  responseData = response[0];
287
300
  }
288
301
 
@@ -305,6 +318,7 @@ class CompanyProfile {
305
318
 
306
319
  /**
307
320
  * @param {CompanyProfilePlatformValidator.CreateLocationBulkParam} arg - Arg object
321
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
308
322
  * @param {import("../PlatformAPIClient").Options} - Options
309
323
  * @returns {Promise<CompanyProfilePlatformModel.ProfileSuccessResponse>} -
310
324
  * Success response
@@ -312,7 +326,10 @@ class CompanyProfile {
312
326
  * @summary: Create a location asscoiated to a company in bulk.
313
327
  * @description: This API allows to create a location associated to a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/createLocationBulk/).
314
328
  */
315
- async createLocationBulk({ body } = {}, { headers } = { headers: false }) {
329
+ async createLocationBulk(
330
+ { body, requestHeaders } = { requestHeaders: {} },
331
+ { responseHeaders } = { responseHeaders: false }
332
+ ) {
316
333
  const {
317
334
  error,
318
335
  } = CompanyProfilePlatformValidator.createLocationBulk().validate(
@@ -351,12 +368,12 @@ class CompanyProfile {
351
368
  `/service/platform/company-profile/v1.0/company/${this.config.companyId}/location/bulk`,
352
369
  query_params,
353
370
  body,
354
- xHeaders,
355
- { headers }
371
+ { ...xHeaders, ...requestHeaders },
372
+ { responseHeaders }
356
373
  );
357
374
 
358
375
  let responseData = response;
359
- if (headers) {
376
+ if (responseHeaders) {
360
377
  responseData = response[0];
361
378
  }
362
379
 
@@ -379,6 +396,7 @@ class CompanyProfile {
379
396
 
380
397
  /**
381
398
  * @param {CompanyProfilePlatformValidator.EditBrandParam} arg - Arg object
399
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
382
400
  * @param {import("../PlatformAPIClient").Options} - Options
383
401
  * @returns {Promise<CompanyProfilePlatformModel.ProfileSuccessResponse>} -
384
402
  * Success response
@@ -386,7 +404,10 @@ class CompanyProfile {
386
404
  * @summary: Edit a brand.
387
405
  * @description: This API allows to edit meta of a brand. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/editBrand/).
388
406
  */
389
- async editBrand({ brandId, body } = {}, { headers } = { headers: false }) {
407
+ async editBrand(
408
+ { brandId, body, requestHeaders } = { requestHeaders: {} },
409
+ { responseHeaders } = { responseHeaders: false }
410
+ ) {
390
411
  const { error } = CompanyProfilePlatformValidator.editBrand().validate(
391
412
  {
392
413
  brandId,
@@ -425,12 +446,12 @@ class CompanyProfile {
425
446
  `/service/platform/company-profile/v1.0/company/${this.config.companyId}/brand/${brandId}`,
426
447
  query_params,
427
448
  body,
428
- xHeaders,
429
- { headers }
449
+ { ...xHeaders, ...requestHeaders },
450
+ { responseHeaders }
430
451
  );
431
452
 
432
453
  let responseData = response;
433
- if (headers) {
454
+ if (responseHeaders) {
434
455
  responseData = response[0];
435
456
  }
436
457
 
@@ -453,6 +474,7 @@ class CompanyProfile {
453
474
 
454
475
  /**
455
476
  * @param {CompanyProfilePlatformValidator.GetBrandParam} arg - Arg object
477
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
456
478
  * @param {import("../PlatformAPIClient").Options} - Options
457
479
  * @returns {Promise<CompanyProfilePlatformModel.GetBrandResponseSerializer>}
458
480
  * - Success response
@@ -461,7 +483,10 @@ class CompanyProfile {
461
483
  * @summary: Get a single company brand.
462
484
  * @description: This API helps to get data associated to a particular company brand. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/getBrand/).
463
485
  */
464
- async getBrand({ brandId } = {}, { headers } = { headers: false }) {
486
+ async getBrand(
487
+ { brandId, requestHeaders } = { requestHeaders: {} },
488
+ { responseHeaders } = { responseHeaders: false }
489
+ ) {
465
490
  const { error } = CompanyProfilePlatformValidator.getBrand().validate(
466
491
  {
467
492
  brandId,
@@ -498,12 +523,12 @@ class CompanyProfile {
498
523
  `/service/platform/company-profile/v1.0/company/${this.config.companyId}/brand/${brandId}`,
499
524
  query_params,
500
525
  undefined,
501
- xHeaders,
502
- { headers }
526
+ { ...xHeaders, ...requestHeaders },
527
+ { responseHeaders }
503
528
  );
504
529
 
505
530
  let responseData = response;
506
- if (headers) {
531
+ if (responseHeaders) {
507
532
  responseData = response[0];
508
533
  }
509
534
 
@@ -526,6 +551,7 @@ class CompanyProfile {
526
551
 
527
552
  /**
528
553
  * @param {CompanyProfilePlatformValidator.GetBrandsParam} arg - Arg object
554
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
529
555
  * @param {import("../PlatformAPIClient").Options} - Options
530
556
  * @returns {Promise<CompanyProfilePlatformModel.CompanyBrandListSerializer>}
531
557
  * - Success response
@@ -535,8 +561,8 @@ class CompanyProfile {
535
561
  * @description: This API helps to get view brands associated to a particular company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/getBrands/).
536
562
  */
537
563
  async getBrands(
538
- { pageNo, pageSize, q } = {},
539
- { headers } = { headers: false }
564
+ { pageNo, pageSize, q, requestHeaders } = { requestHeaders: {} },
565
+ { responseHeaders } = { responseHeaders: false }
540
566
  ) {
541
567
  const { error } = CompanyProfilePlatformValidator.getBrands().validate(
542
568
  {
@@ -581,12 +607,12 @@ class CompanyProfile {
581
607
  `/service/platform/company-profile/v1.0/company/${this.config.companyId}/company-brand`,
582
608
  query_params,
583
609
  undefined,
584
- xHeaders,
585
- { headers }
610
+ { ...xHeaders, ...requestHeaders },
611
+ { responseHeaders }
586
612
  );
587
613
 
588
614
  let responseData = response;
589
- if (headers) {
615
+ if (responseHeaders) {
590
616
  responseData = response[0];
591
617
  }
592
618
 
@@ -639,6 +665,7 @@ class CompanyProfile {
639
665
 
640
666
  /**
641
667
  * @param {CompanyProfilePlatformValidator.GetCompanyMetricsParam} arg - Arg object
668
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
642
669
  * @param {import("../PlatformAPIClient").Options} - Options
643
670
  * @returns {Promise<CompanyProfilePlatformModel.MetricsSerializer>} -
644
671
  * Success response
@@ -646,7 +673,10 @@ class CompanyProfile {
646
673
  * @summary: Get company metrics
647
674
  * @description: This API allows to view the company metrics, i.e. the status of its brand and stores. Also its allows to view the number of products, company documents & store documents which are verified and unverified. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/getCompanyMetrics/).
648
675
  */
649
- async getCompanyMetrics({ headers } = { headers: false }) {
676
+ async getCompanyMetrics(
677
+ { requestHeaders } = { requestHeaders: {} },
678
+ { responseHeaders } = { responseHeaders: false }
679
+ ) {
650
680
  const {
651
681
  error,
652
682
  } = CompanyProfilePlatformValidator.getCompanyMetrics().validate(
@@ -681,12 +711,12 @@ class CompanyProfile {
681
711
  `/service/platform/company-profile/v1.0/company/${this.config.companyId}/metrics`,
682
712
  query_params,
683
713
  undefined,
684
- xHeaders,
685
- { headers }
714
+ { ...xHeaders, ...requestHeaders },
715
+ { responseHeaders }
686
716
  );
687
717
 
688
718
  let responseData = response;
689
- if (headers) {
719
+ if (responseHeaders) {
690
720
  responseData = response[0];
691
721
  }
692
722
 
@@ -709,6 +739,7 @@ class CompanyProfile {
709
739
 
710
740
  /**
711
741
  * @param {CompanyProfilePlatformValidator.GetLocationDetailParam} arg - Arg object
742
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
712
743
  * @param {import("../PlatformAPIClient").Options} - Options
713
744
  * @returns {Promise<CompanyProfilePlatformModel.GetLocationSerializer>} -
714
745
  * Success response
@@ -717,8 +748,8 @@ class CompanyProfile {
717
748
  * @description: This API helps to get data associated to a specific location. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/getLocationDetail/).
718
749
  */
719
750
  async getLocationDetail(
720
- { locationId } = {},
721
- { headers } = { headers: false }
751
+ { locationId, requestHeaders } = { requestHeaders: {} },
752
+ { responseHeaders } = { responseHeaders: false }
722
753
  ) {
723
754
  const {
724
755
  error,
@@ -758,12 +789,12 @@ class CompanyProfile {
758
789
  `/service/platform/company-profile/v1.0/company/${this.config.companyId}/location/${locationId}`,
759
790
  query_params,
760
791
  undefined,
761
- xHeaders,
762
- { headers }
792
+ { ...xHeaders, ...requestHeaders },
793
+ { responseHeaders }
763
794
  );
764
795
 
765
796
  let responseData = response;
766
- if (headers) {
797
+ if (responseHeaders) {
767
798
  responseData = response[0];
768
799
  }
769
800
 
@@ -784,8 +815,84 @@ class CompanyProfile {
784
815
  return response;
785
816
  }
786
817
 
818
+ /**
819
+ * @param {CompanyProfilePlatformValidator.GetLocationTagsParam} arg - Arg object
820
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
821
+ * @param {import("../PlatformAPIClient").Options} - Options
822
+ * @returns {Promise<CompanyProfilePlatformModel.StoreTagsResponseSchema>}
823
+ * - Success response
824
+ *
825
+ * @name getLocationTags
826
+ * @summary: Get tags associated with locations for a company.
827
+ * @description: This API fetches all the tags associated to a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/getLocationTags/).
828
+ */
829
+ async getLocationTags(
830
+ { requestHeaders } = { requestHeaders: {} },
831
+ { responseHeaders } = { responseHeaders: false }
832
+ ) {
833
+ const {
834
+ error,
835
+ } = CompanyProfilePlatformValidator.getLocationTags().validate(
836
+ {},
837
+ { abortEarly: false, allowUnknown: true }
838
+ );
839
+ if (error) {
840
+ return Promise.reject(new FDKClientValidationError(error));
841
+ }
842
+
843
+ // Showing warrnings if extra unknown parameters are found
844
+ const {
845
+ error: warrning,
846
+ } = CompanyProfilePlatformValidator.getLocationTags().validate(
847
+ {},
848
+ { abortEarly: false, allowUnknown: false }
849
+ );
850
+ if (warrning) {
851
+ Logger({
852
+ level: "WARN",
853
+ message: `Parameter Validation warrnings for platform > CompanyProfile > getLocationTags \n ${warrning}`,
854
+ });
855
+ }
856
+
857
+ const query_params = {};
858
+
859
+ const xHeaders = {};
860
+
861
+ const response = await PlatformAPIClient.execute(
862
+ this.config,
863
+ "get",
864
+ `/service/platform/company-profile/v1.0/company/${this.config.companyId}/location/tags`,
865
+ query_params,
866
+ undefined,
867
+ { ...xHeaders, ...requestHeaders },
868
+ { responseHeaders }
869
+ );
870
+
871
+ let responseData = response;
872
+ if (responseHeaders) {
873
+ responseData = response[0];
874
+ }
875
+
876
+ const {
877
+ error: res_error,
878
+ } = CompanyProfilePlatformModel.StoreTagsResponseSchema().validate(
879
+ responseData,
880
+ { abortEarly: false, allowUnknown: false }
881
+ );
882
+
883
+ if (res_error) {
884
+ Logger({
885
+ level: "WARN",
886
+ message: `Response Validation Warnnings for platform > CompanyProfile > getLocationTags \n ${res_error}`,
887
+ });
888
+ }
889
+
890
+ return response;
891
+ }
892
+
787
893
  /**
788
894
  * @param {CompanyProfilePlatformValidator.GetLocationsParam} arg - Arg object
895
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
789
896
  * @param {import("../PlatformAPIClient").Options} - Options
790
897
  * @returns {Promise<CompanyProfilePlatformModel.LocationListSerializer>} -
791
898
  * Success response
@@ -794,8 +901,10 @@ class CompanyProfile {
794
901
  * @description: This API allows to view all the locations associated to a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/getLocations/).
795
902
  */
796
903
  async getLocations(
797
- { storeType, q, stage, pageNo, pageSize, locationIds } = {},
798
- { headers } = { headers: false }
904
+ { storeType, q, stage, pageNo, pageSize, locationIds, requestHeaders } = {
905
+ requestHeaders: {},
906
+ },
907
+ { responseHeaders } = { responseHeaders: false }
799
908
  ) {
800
909
  const { error } = CompanyProfilePlatformValidator.getLocations().validate(
801
910
  {
@@ -849,12 +958,12 @@ class CompanyProfile {
849
958
  `/service/platform/company-profile/v1.0/company/${this.config.companyId}/location`,
850
959
  query_params,
851
960
  undefined,
852
- xHeaders,
853
- { headers }
961
+ { ...xHeaders, ...requestHeaders },
962
+ { responseHeaders }
854
963
  );
855
964
 
856
965
  let responseData = response;
857
- if (headers) {
966
+ if (responseHeaders) {
858
967
  responseData = response[0];
859
968
  }
860
969
 
@@ -915,6 +1024,7 @@ class CompanyProfile {
915
1024
 
916
1025
  /**
917
1026
  * @param {CompanyProfilePlatformValidator.UpdateCompanyParam} arg - Arg object
1027
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
918
1028
  * @param {import("../PlatformAPIClient").Options} - Options
919
1029
  * @returns {Promise<CompanyProfilePlatformModel.ProfileSuccessResponse>} -
920
1030
  * Success response
@@ -922,7 +1032,10 @@ class CompanyProfile {
922
1032
  * @summary: Edit company profile
923
1033
  * @description: This API allows to edit the company profile of the seller account. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/updateCompany/).
924
1034
  */
925
- async updateCompany({ body } = {}, { headers } = { headers: false }) {
1035
+ async updateCompany(
1036
+ { body, requestHeaders } = { requestHeaders: {} },
1037
+ { responseHeaders } = { responseHeaders: false }
1038
+ ) {
926
1039
  const { error } = CompanyProfilePlatformValidator.updateCompany().validate(
927
1040
  {
928
1041
  body,
@@ -959,12 +1072,12 @@ class CompanyProfile {
959
1072
  `/service/platform/company-profile/v1.0/company/${this.config.companyId}`,
960
1073
  query_params,
961
1074
  body,
962
- xHeaders,
963
- { headers }
1075
+ { ...xHeaders, ...requestHeaders },
1076
+ { responseHeaders }
964
1077
  );
965
1078
 
966
1079
  let responseData = response;
967
- if (headers) {
1080
+ if (responseHeaders) {
968
1081
  responseData = response[0];
969
1082
  }
970
1083
 
@@ -987,6 +1100,7 @@ class CompanyProfile {
987
1100
 
988
1101
  /**
989
1102
  * @param {CompanyProfilePlatformValidator.UpdateLocationParam} arg - Arg object
1103
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
990
1104
  * @param {import("../PlatformAPIClient").Options} - Options
991
1105
  * @returns {Promise<CompanyProfilePlatformModel.ProfileSuccessResponse>} -
992
1106
  * Success response
@@ -995,8 +1109,8 @@ class CompanyProfile {
995
1109
  * @description: This API allows to edit a location associated to a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/updateLocation/).
996
1110
  */
997
1111
  async updateLocation(
998
- { locationId, body } = {},
999
- { headers } = { headers: false }
1112
+ { locationId, body, requestHeaders } = { requestHeaders: {} },
1113
+ { responseHeaders } = { responseHeaders: false }
1000
1114
  ) {
1001
1115
  const { error } = CompanyProfilePlatformValidator.updateLocation().validate(
1002
1116
  {
@@ -1036,12 +1150,12 @@ class CompanyProfile {
1036
1150
  `/service/platform/company-profile/v1.0/company/${this.config.companyId}/location/${locationId}`,
1037
1151
  query_params,
1038
1152
  body,
1039
- xHeaders,
1040
- { headers }
1153
+ { ...xHeaders, ...requestHeaders },
1154
+ { responseHeaders }
1041
1155
  );
1042
1156
 
1043
1157
  let responseData = response;
1044
- if (headers) {
1158
+ if (responseHeaders) {
1045
1159
  responseData = response[0];
1046
1160
  }
1047
1161