@gofynd/fdk-client-javascript 1.4.8-beta.3 → 1.4.8
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.
- package/README.md +26 -1
- package/package.json +2 -2
- package/sdk/application/ApplicationClient.d.ts +8 -0
- package/sdk/application/ApplicationClient.js +14 -0
- package/sdk/application/Cart/CartApplicationClient.d.ts +20 -20
- package/sdk/application/Cart/CartApplicationClient.js +20 -20
- package/sdk/application/Cart/CartApplicationModel.d.ts +2446 -664
- package/sdk/application/Cart/CartApplicationModel.js +783 -552
- package/sdk/application/Cart/CartApplicationValidator.d.ts +268 -194
- package/sdk/application/Cart/CartApplicationValidator.js +100 -114
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +53 -53
- package/sdk/application/Catalog/CatalogApplicationClient.js +53 -53
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +2012 -503
- package/sdk/application/Catalog/CatalogApplicationModel.js +603 -453
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +64 -64
- package/sdk/application/Catalog/CatalogApplicationValidator.js +32 -32
- package/sdk/application/Common/CommonApplicationClient.d.ts +2 -2
- package/sdk/application/Common/CommonApplicationClient.js +2 -2
- package/sdk/application/Common/CommonApplicationModel.d.ts +170 -90
- package/sdk/application/Common/CommonApplicationModel.js +59 -58
- package/sdk/application/Common/CommonApplicationValidator.d.ts +8 -5
- package/sdk/application/Common/CommonApplicationValidator.js +3 -3
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +2 -2
- package/sdk/application/Communication/CommunicationApplicationClient.js +2 -2
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +170 -35
- package/sdk/application/Communication/CommunicationApplicationModel.js +54 -33
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +15 -15
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +15 -15
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +624 -443
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +259 -248
- package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +32 -24
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +14 -13
- package/sdk/application/Content/ContentApplicationClient.d.ts +16 -16
- package/sdk/application/Content/ContentApplicationClient.js +16 -16
- package/sdk/application/Content/ContentApplicationModel.d.ts +1205 -282
- package/sdk/application/Content/ContentApplicationModel.js +341 -277
- package/sdk/application/Content/ContentApplicationValidator.d.ts +28 -17
- package/sdk/application/Content/ContentApplicationValidator.js +11 -10
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +3 -3
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +3 -3
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +146 -37
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +38 -36
- package/sdk/application/Lead/LeadApplicationClient.d.ts +3 -3
- package/sdk/application/Lead/LeadApplicationClient.js +3 -3
- package/sdk/application/Lead/LeadApplicationModel.d.ts +195 -134
- package/sdk/application/Lead/LeadApplicationModel.js +110 -67
- package/sdk/application/Lead/LeadApplicationValidator.d.ts +8 -8
- package/sdk/application/Lead/LeadApplicationValidator.js +4 -4
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +10 -10
- package/sdk/application/Logistic/LogisticApplicationClient.js +10 -10
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +1039 -221
- package/sdk/application/Logistic/LogisticApplicationModel.js +342 -199
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +76 -82
- package/sdk/application/Logistic/LogisticApplicationValidator.js +38 -41
- package/sdk/application/Order/OrderApplicationClient.d.ts +10 -10
- package/sdk/application/Order/OrderApplicationClient.js +10 -10
- package/sdk/application/Order/OrderApplicationModel.d.ts +1400 -325
- package/sdk/application/Order/OrderApplicationModel.js +391 -317
- package/sdk/application/Order/OrderApplicationValidator.d.ts +32 -30
- package/sdk/application/Order/OrderApplicationValidator.js +15 -14
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +43 -43
- package/sdk/application/Payment/PaymentApplicationClient.js +43 -43
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +1111 -1022
- package/sdk/application/Payment/PaymentApplicationModel.js +537 -521
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +82 -49
- package/sdk/application/Payment/PaymentApplicationValidator.js +30 -30
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +28 -7
- package/sdk/application/Rewards/RewardsApplicationModel.js +7 -7
- package/sdk/application/Share/ShareApplicationModel.d.ts +178 -38
- package/sdk/application/Share/ShareApplicationModel.js +53 -37
- package/sdk/application/Share/ShareApplicationValidator.d.ts +4 -2
- package/sdk/application/Share/ShareApplicationValidator.js +2 -1
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +4 -4
- package/sdk/application/Theme/ThemeApplicationClient.js +14 -8
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +528 -287
- package/sdk/application/Theme/ThemeApplicationModel.js +208 -172
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +17 -12
- package/sdk/application/Theme/ThemeApplicationValidator.js +8 -6
- package/sdk/application/User/UserApplicationClient.d.ts +36 -36
- package/sdk/application/User/UserApplicationClient.js +36 -36
- package/sdk/application/User/UserApplicationModel.d.ts +1062 -255
- package/sdk/application/User/UserApplicationModel.js +298 -244
- package/sdk/application/User/UserApplicationValidator.d.ts +80 -80
- package/sdk/application/User/UserApplicationValidator.js +40 -40
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +1 -1
- package/sdk/application/Webhook/WebhookApplicationClient.js +1 -1
- package/sdk/application/Webhook/WebhookApplicationModel.d.ts +20 -5
- package/sdk/application/Webhook/WebhookApplicationModel.js +5 -5
- package/sdk/common/Clickstream.js +95 -15
- package/sdk/common/Constant.d.ts +9 -0
- package/sdk/common/Constant.js +11 -0
- package/sdk/common/Utility.js +19 -0
- package/sdk/common/utils.js +8 -1
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +28 -7
- package/sdk/partner/Lead/LeadPartnerModel.js +7 -7
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +28 -7
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +7 -7
- package/sdk/partner/PartnerClient.d.ts +8 -0
- package/sdk/partner/PartnerClient.js +14 -0
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +20 -0
- package/sdk/partner/Theme/ThemePartnerClient.js +158 -0
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +45 -6
- package/sdk/partner/Theme/ThemePartnerModel.js +33 -4
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +2 -0
- package/sdk/partner/Theme/ThemePartnerValidator.js +14 -0
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +28 -7
- package/sdk/partner/Webhook/WebhookPartnerModel.js +7 -7
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +28 -7
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +7 -7
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +21 -10
- package/sdk/platform/Billing/BillingPlatformClient.js +167 -83
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +2849 -565
- package/sdk/platform/Billing/BillingPlatformModel.js +935 -556
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +30 -14
- package/sdk/platform/Billing/BillingPlatformValidator.js +31 -16
- package/sdk/platform/Cart/CartPlatformModel.d.ts +28 -7
- package/sdk/platform/Cart/CartPlatformModel.js +8 -8
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +12 -2
- package/sdk/platform/Catalog/CatalogPlatformClient.js +41 -1
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +46 -12
- package/sdk/platform/Catalog/CatalogPlatformModel.js +14 -11
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +40 -0
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +17 -0
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +28 -7
- package/sdk/platform/Communication/CommunicationPlatformModel.js +7 -7
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +28 -7
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +7 -7
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +0 -97
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +77 -782
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +24 -701
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +7 -539
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +1 -183
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +0 -134
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +0 -10
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +0 -79
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +1 -15
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +0 -13
- package/sdk/platform/Content/ContentPlatformModel.d.ts +58 -17
- package/sdk/platform/Content/ContentPlatformModel.js +28 -15
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +28 -7
- package/sdk/platform/Discount/DiscountPlatformModel.js +7 -7
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +127 -25
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +37 -25
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +28 -28
- package/sdk/platform/Finance/FinancePlatformClient.js +28 -28
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +1583 -347
- package/sdk/platform/Finance/FinancePlatformModel.js +463 -351
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +28 -7
- package/sdk/platform/Lead/LeadPlatformModel.js +7 -7
- package/sdk/platform/Order/OrderPlatformClient.d.ts +22 -0
- package/sdk/platform/Order/OrderPlatformClient.js +165 -0
- package/sdk/platform/Order/OrderPlatformModel.d.ts +613 -39
- package/sdk/platform/Order/OrderPlatformModel.js +359 -41
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +32 -1
- package/sdk/platform/Order/OrderPlatformValidator.js +28 -0
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +30 -9
- package/sdk/platform/Payment/PaymentPlatformModel.js +9 -9
- package/sdk/platform/PlatformClient.d.ts +8 -0
- package/sdk/platform/PlatformClient.js +14 -0
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +28 -7
- package/sdk/platform/Rewards/RewardsPlatformModel.js +7 -7
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +12 -9
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +12 -9
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +120 -22
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +76 -21
- package/sdk/platform/Share/SharePlatformModel.d.ts +28 -7
- package/sdk/platform/Share/SharePlatformModel.js +7 -7
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +18 -5
- package/sdk/platform/Theme/ThemePlatformModel.js +7 -4
- package/sdk/platform/User/UserPlatformModel.d.ts +18 -18
- package/sdk/platform/User/UserPlatformModel.js +9 -9
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +28 -7
- package/sdk/platform/Webhook/WebhookPlatformModel.js +7 -7
- package/sdk/public/Billing/BillingPublicClient.d.ts +11 -0
- package/sdk/public/Billing/BillingPublicClient.js +80 -0
- package/sdk/public/Billing/BillingPublicModel.d.ts +584 -99
- package/sdk/public/Billing/BillingPublicModel.js +252 -87
- package/sdk/public/Billing/BillingPublicValidator.d.ts +10 -1
- package/sdk/public/Billing/BillingPublicValidator.js +12 -0
- package/sdk/public/PublicClient.d.ts +0 -2
- package/sdk/public/PublicClient.js +0 -4
- package/sdk/public/index.d.ts +0 -1
- package/sdk/public/index.js +0 -2
- package/sdk/public/Inventory/InventoryPublicClient.d.ts +0 -87
- package/sdk/public/Inventory/InventoryPublicClient.js +0 -529
- package/sdk/public/Inventory/InventoryPublicModel.d.ts +0 -393
- package/sdk/public/Inventory/InventoryPublicModel.js +0 -448
- package/sdk/public/Inventory/InventoryPublicValidator.d.ts +0 -91
- package/sdk/public/Inventory/InventoryPublicValidator.js +0 -85
|
@@ -182,93 +182,6 @@ class Configuration {
|
|
|
182
182
|
return response;
|
|
183
183
|
}
|
|
184
184
|
|
|
185
|
-
/**
|
|
186
|
-
* @param {ConfigurationPlatformValidator.GetAvailableOptInsParam} arg - Arg object
|
|
187
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
188
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
189
|
-
* @returns {Promise<ConfigurationPlatformModel.GetIntegrationsOptInsResponse>}
|
|
190
|
-
* - Success response
|
|
191
|
-
*
|
|
192
|
-
* @name getAvailableOptIns
|
|
193
|
-
* @summary: List available opt-ins
|
|
194
|
-
* @description: Retrieve a list of available opt-ins. Retrieve a list of all available integrations in a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getAvailableOptIns/).
|
|
195
|
-
*/
|
|
196
|
-
async getAvailableOptIns(
|
|
197
|
-
{ pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
198
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
199
|
-
) {
|
|
200
|
-
const {
|
|
201
|
-
error,
|
|
202
|
-
} = ConfigurationPlatformValidator.getAvailableOptIns().validate(
|
|
203
|
-
{
|
|
204
|
-
pageNo,
|
|
205
|
-
pageSize,
|
|
206
|
-
},
|
|
207
|
-
{ abortEarly: false, allowUnknown: true }
|
|
208
|
-
);
|
|
209
|
-
if (error) {
|
|
210
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
// Showing warrnings if extra unknown parameters are found
|
|
214
|
-
const {
|
|
215
|
-
error: warrning,
|
|
216
|
-
} = ConfigurationPlatformValidator.getAvailableOptIns().validate(
|
|
217
|
-
{
|
|
218
|
-
pageNo,
|
|
219
|
-
pageSize,
|
|
220
|
-
},
|
|
221
|
-
{ abortEarly: false, allowUnknown: false }
|
|
222
|
-
);
|
|
223
|
-
if (warrning) {
|
|
224
|
-
Logger({
|
|
225
|
-
level: "WARN",
|
|
226
|
-
message: `Parameter Validation warrnings for platform > Configuration > getAvailableOptIns \n ${warrning}`,
|
|
227
|
-
});
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
const query_params = {};
|
|
231
|
-
query_params["page_no"] = pageNo;
|
|
232
|
-
query_params["page_size"] = pageSize;
|
|
233
|
-
|
|
234
|
-
const xHeaders = {};
|
|
235
|
-
|
|
236
|
-
const response = await PlatformAPIClient.execute(
|
|
237
|
-
this.config,
|
|
238
|
-
"get",
|
|
239
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/available`,
|
|
240
|
-
query_params,
|
|
241
|
-
undefined,
|
|
242
|
-
{ ...xHeaders, ...requestHeaders },
|
|
243
|
-
{ responseHeaders }
|
|
244
|
-
);
|
|
245
|
-
|
|
246
|
-
let responseData = response;
|
|
247
|
-
if (responseHeaders) {
|
|
248
|
-
responseData = response[0];
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
const {
|
|
252
|
-
error: res_error,
|
|
253
|
-
} = ConfigurationPlatformModel.GetIntegrationsOptInsResponse().validate(
|
|
254
|
-
responseData,
|
|
255
|
-
{ abortEarly: false, allowUnknown: true }
|
|
256
|
-
);
|
|
257
|
-
|
|
258
|
-
if (res_error) {
|
|
259
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
260
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
261
|
-
} else {
|
|
262
|
-
Logger({
|
|
263
|
-
level: "WARN",
|
|
264
|
-
message: `Response Validation Warnings for platform > Configuration > getAvailableOptIns \n ${res_error}`,
|
|
265
|
-
});
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
return response;
|
|
270
|
-
}
|
|
271
|
-
|
|
272
185
|
/**
|
|
273
186
|
* @param {ConfigurationPlatformValidator.GetBrandsByCompanyParam} arg - Arg object
|
|
274
187
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -600,21 +513,25 @@ class Configuration {
|
|
|
600
513
|
}
|
|
601
514
|
|
|
602
515
|
/**
|
|
603
|
-
* @param {ConfigurationPlatformValidator.
|
|
516
|
+
* @param {ConfigurationPlatformValidator.GetOtherSellerApplicationByIdParam} arg
|
|
517
|
+
* - Arg object
|
|
518
|
+
*
|
|
604
519
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
605
520
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
606
|
-
* @returns {Promise<ConfigurationPlatformModel.
|
|
607
|
-
*
|
|
608
|
-
*
|
|
609
|
-
* @
|
|
521
|
+
* @returns {Promise<ConfigurationPlatformModel.OptedApplicationResponse>}
|
|
522
|
+
* - Success response
|
|
523
|
+
*
|
|
524
|
+
* @name getOtherSellerApplicationById
|
|
525
|
+
* @summary: Get others sales. channel
|
|
526
|
+
* @description: Retrieve details of a seller sales channel that was not created within the current company but has opted for the current company's inventory and searched via the sales channel ID of another sales channel - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getOtherSellerApplicationById/).
|
|
610
527
|
*/
|
|
611
|
-
async
|
|
528
|
+
async getOtherSellerApplicationById(
|
|
612
529
|
{ id, requestHeaders } = { requestHeaders: {} },
|
|
613
530
|
{ responseHeaders } = { responseHeaders: false }
|
|
614
531
|
) {
|
|
615
532
|
const {
|
|
616
533
|
error,
|
|
617
|
-
} = ConfigurationPlatformValidator.
|
|
534
|
+
} = ConfigurationPlatformValidator.getOtherSellerApplicationById().validate(
|
|
618
535
|
{
|
|
619
536
|
id,
|
|
620
537
|
},
|
|
@@ -627,7 +544,7 @@ class Configuration {
|
|
|
627
544
|
// Showing warrnings if extra unknown parameters are found
|
|
628
545
|
const {
|
|
629
546
|
error: warrning,
|
|
630
|
-
} = ConfigurationPlatformValidator.
|
|
547
|
+
} = ConfigurationPlatformValidator.getOtherSellerApplicationById().validate(
|
|
631
548
|
{
|
|
632
549
|
id,
|
|
633
550
|
},
|
|
@@ -636,7 +553,7 @@ class Configuration {
|
|
|
636
553
|
if (warrning) {
|
|
637
554
|
Logger({
|
|
638
555
|
level: "WARN",
|
|
639
|
-
message: `Parameter Validation warrnings for platform > Configuration >
|
|
556
|
+
message: `Parameter Validation warrnings for platform > Configuration > getOtherSellerApplicationById \n ${warrning}`,
|
|
640
557
|
});
|
|
641
558
|
}
|
|
642
559
|
|
|
@@ -647,7 +564,7 @@ class Configuration {
|
|
|
647
564
|
const response = await PlatformAPIClient.execute(
|
|
648
565
|
this.config,
|
|
649
566
|
"get",
|
|
650
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/
|
|
567
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/other-seller-applications/${id}`,
|
|
651
568
|
query_params,
|
|
652
569
|
undefined,
|
|
653
570
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -661,97 +578,10 @@ class Configuration {
|
|
|
661
578
|
|
|
662
579
|
const {
|
|
663
580
|
error: res_error,
|
|
664
|
-
} = ConfigurationPlatformModel.
|
|
665
|
-
|
|
666
|
-
allowUnknown: true,
|
|
667
|
-
});
|
|
668
|
-
|
|
669
|
-
if (res_error) {
|
|
670
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
671
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
672
|
-
} else {
|
|
673
|
-
Logger({
|
|
674
|
-
level: "WARN",
|
|
675
|
-
message: `Response Validation Warnings for platform > Configuration > getIntegrationById \n ${res_error}`,
|
|
676
|
-
});
|
|
677
|
-
}
|
|
678
|
-
}
|
|
679
|
-
|
|
680
|
-
return response;
|
|
681
|
-
}
|
|
682
|
-
|
|
683
|
-
/**
|
|
684
|
-
* @param {ConfigurationPlatformValidator.GetIntegrationByLevelIdParam} arg
|
|
685
|
-
* - Arg object
|
|
686
|
-
*
|
|
687
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
688
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
689
|
-
* @returns {Promise<ConfigurationPlatformModel.IntegrationLevel>} - Success response
|
|
690
|
-
* @name getIntegrationByLevelId
|
|
691
|
-
* @summary: Get integration Id
|
|
692
|
-
* @description: Retrieve integration details for a specific level. Retrieve the configuration details of an integration such as token, permissions, level, opted value, uid, meta, location ID, etc. at a particular level (store/company). - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getIntegrationByLevelId/).
|
|
693
|
-
*/
|
|
694
|
-
async getIntegrationByLevelId(
|
|
695
|
-
{ id, level, uid, requestHeaders } = { requestHeaders: {} },
|
|
696
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
697
|
-
) {
|
|
698
|
-
const {
|
|
699
|
-
error,
|
|
700
|
-
} = ConfigurationPlatformValidator.getIntegrationByLevelId().validate(
|
|
701
|
-
{
|
|
702
|
-
id,
|
|
703
|
-
level,
|
|
704
|
-
uid,
|
|
705
|
-
},
|
|
581
|
+
} = ConfigurationPlatformModel.OptedApplicationResponse().validate(
|
|
582
|
+
responseData,
|
|
706
583
|
{ abortEarly: false, allowUnknown: true }
|
|
707
584
|
);
|
|
708
|
-
if (error) {
|
|
709
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
710
|
-
}
|
|
711
|
-
|
|
712
|
-
// Showing warrnings if extra unknown parameters are found
|
|
713
|
-
const {
|
|
714
|
-
error: warrning,
|
|
715
|
-
} = ConfigurationPlatformValidator.getIntegrationByLevelId().validate(
|
|
716
|
-
{
|
|
717
|
-
id,
|
|
718
|
-
level,
|
|
719
|
-
uid,
|
|
720
|
-
},
|
|
721
|
-
{ abortEarly: false, allowUnknown: false }
|
|
722
|
-
);
|
|
723
|
-
if (warrning) {
|
|
724
|
-
Logger({
|
|
725
|
-
level: "WARN",
|
|
726
|
-
message: `Parameter Validation warrnings for platform > Configuration > getIntegrationByLevelId \n ${warrning}`,
|
|
727
|
-
});
|
|
728
|
-
}
|
|
729
|
-
|
|
730
|
-
const query_params = {};
|
|
731
|
-
|
|
732
|
-
const xHeaders = {};
|
|
733
|
-
|
|
734
|
-
const response = await PlatformAPIClient.execute(
|
|
735
|
-
this.config,
|
|
736
|
-
"get",
|
|
737
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/configuration/${id}/${level}/${uid}`,
|
|
738
|
-
query_params,
|
|
739
|
-
undefined,
|
|
740
|
-
{ ...xHeaders, ...requestHeaders },
|
|
741
|
-
{ responseHeaders }
|
|
742
|
-
);
|
|
743
|
-
|
|
744
|
-
let responseData = response;
|
|
745
|
-
if (responseHeaders) {
|
|
746
|
-
responseData = response[0];
|
|
747
|
-
}
|
|
748
|
-
|
|
749
|
-
const {
|
|
750
|
-
error: res_error,
|
|
751
|
-
} = ConfigurationPlatformModel.IntegrationLevel().validate(responseData, {
|
|
752
|
-
abortEarly: false,
|
|
753
|
-
allowUnknown: true,
|
|
754
|
-
});
|
|
755
585
|
|
|
756
586
|
if (res_error) {
|
|
757
587
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -759,7 +589,7 @@ class Configuration {
|
|
|
759
589
|
} else {
|
|
760
590
|
Logger({
|
|
761
591
|
level: "WARN",
|
|
762
|
-
message: `Response Validation Warnings for platform > Configuration >
|
|
592
|
+
message: `Response Validation Warnings for platform > Configuration > getOtherSellerApplicationById \n ${res_error}`,
|
|
763
593
|
});
|
|
764
594
|
}
|
|
765
595
|
}
|
|
@@ -768,32 +598,27 @@ class Configuration {
|
|
|
768
598
|
}
|
|
769
599
|
|
|
770
600
|
/**
|
|
771
|
-
* @param {ConfigurationPlatformValidator.
|
|
601
|
+
* @param {ConfigurationPlatformValidator.GetOtherSellerApplicationsParam} arg
|
|
772
602
|
* - Arg object
|
|
773
603
|
*
|
|
774
604
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
775
605
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
776
|
-
* @returns {Promise<ConfigurationPlatformModel.
|
|
777
|
-
*
|
|
778
|
-
*
|
|
779
|
-
* @
|
|
780
|
-
* @
|
|
781
|
-
* @description: Retrieve configuration settings for integration levels. Retrieve the configuration details of an integration such as token, permissions, level, opted value, uid, meta, location ID, etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getIntegrationLevelConfig/).
|
|
606
|
+
* @returns {Promise<ConfigurationPlatformModel.OtherSellerApplications>} -
|
|
607
|
+
* Success response
|
|
608
|
+
* @name getOtherSellerApplications
|
|
609
|
+
* @summary: Get other sales channel
|
|
610
|
+
* @description: Retrieve sales channels of other sellers. Retrieve all other seller sales channels that were not created within the current company. but have opted for the current company's inventory. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getOtherSellerApplications/).
|
|
782
611
|
*/
|
|
783
|
-
async
|
|
784
|
-
{
|
|
785
|
-
requestHeaders: {},
|
|
786
|
-
},
|
|
612
|
+
async getOtherSellerApplications(
|
|
613
|
+
{ pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
787
614
|
{ responseHeaders } = { responseHeaders: false }
|
|
788
615
|
) {
|
|
789
616
|
const {
|
|
790
617
|
error,
|
|
791
|
-
} = ConfigurationPlatformValidator.
|
|
618
|
+
} = ConfigurationPlatformValidator.getOtherSellerApplications().validate(
|
|
792
619
|
{
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
opted,
|
|
796
|
-
checkPermission,
|
|
620
|
+
pageNo,
|
|
621
|
+
pageSize,
|
|
797
622
|
},
|
|
798
623
|
{ abortEarly: false, allowUnknown: true }
|
|
799
624
|
);
|
|
@@ -804,32 +629,30 @@ class Configuration {
|
|
|
804
629
|
// Showing warrnings if extra unknown parameters are found
|
|
805
630
|
const {
|
|
806
631
|
error: warrning,
|
|
807
|
-
} = ConfigurationPlatformValidator.
|
|
632
|
+
} = ConfigurationPlatformValidator.getOtherSellerApplications().validate(
|
|
808
633
|
{
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
opted,
|
|
812
|
-
checkPermission,
|
|
634
|
+
pageNo,
|
|
635
|
+
pageSize,
|
|
813
636
|
},
|
|
814
637
|
{ abortEarly: false, allowUnknown: false }
|
|
815
638
|
);
|
|
816
639
|
if (warrning) {
|
|
817
640
|
Logger({
|
|
818
641
|
level: "WARN",
|
|
819
|
-
message: `Parameter Validation warrnings for platform > Configuration >
|
|
642
|
+
message: `Parameter Validation warrnings for platform > Configuration > getOtherSellerApplications \n ${warrning}`,
|
|
820
643
|
});
|
|
821
644
|
}
|
|
822
645
|
|
|
823
646
|
const query_params = {};
|
|
824
|
-
query_params["
|
|
825
|
-
query_params["
|
|
647
|
+
query_params["page_no"] = pageNo;
|
|
648
|
+
query_params["page_size"] = pageSize;
|
|
826
649
|
|
|
827
650
|
const xHeaders = {};
|
|
828
651
|
|
|
829
652
|
const response = await PlatformAPIClient.execute(
|
|
830
653
|
this.config,
|
|
831
654
|
"get",
|
|
832
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/
|
|
655
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/other-seller-applications`,
|
|
833
656
|
query_params,
|
|
834
657
|
undefined,
|
|
835
658
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -843,7 +666,7 @@ class Configuration {
|
|
|
843
666
|
|
|
844
667
|
const {
|
|
845
668
|
error: res_error,
|
|
846
|
-
} = ConfigurationPlatformModel.
|
|
669
|
+
} = ConfigurationPlatformModel.OtherSellerApplications().validate(
|
|
847
670
|
responseData,
|
|
848
671
|
{ abortEarly: false, allowUnknown: true }
|
|
849
672
|
);
|
|
@@ -854,7 +677,7 @@ class Configuration {
|
|
|
854
677
|
} else {
|
|
855
678
|
Logger({
|
|
856
679
|
level: "WARN",
|
|
857
|
-
message: `Response Validation Warnings for platform > Configuration >
|
|
680
|
+
message: `Response Validation Warnings for platform > Configuration > getOtherSellerApplications \n ${res_error}`,
|
|
858
681
|
});
|
|
859
682
|
}
|
|
860
683
|
}
|
|
@@ -863,28 +686,26 @@ class Configuration {
|
|
|
863
686
|
}
|
|
864
687
|
|
|
865
688
|
/**
|
|
866
|
-
* @param {ConfigurationPlatformValidator.
|
|
867
|
-
* - Arg object
|
|
868
|
-
*
|
|
689
|
+
* @param {ConfigurationPlatformValidator.GetStoreByBrandsParam} arg - Arg object
|
|
869
690
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
870
691
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
871
|
-
* @returns {Promise<ConfigurationPlatformModel.
|
|
692
|
+
* @returns {Promise<ConfigurationPlatformModel.StoreByBrandsResponse>} -
|
|
872
693
|
* Success response
|
|
873
|
-
* @name
|
|
874
|
-
* @summary: Get
|
|
875
|
-
* @description:
|
|
694
|
+
* @name getStoreByBrands
|
|
695
|
+
* @summary: Get store by brands
|
|
696
|
+
* @description: Retrieve stores associated with specific brands. Retrieve a list of selling locations (stores) by the brands they deal. Store has information about store name, store type, store code, store address, and company detail. filtering can be done on brand id and brand names - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getStoreByBrands/).
|
|
876
697
|
*/
|
|
877
|
-
async
|
|
878
|
-
{
|
|
698
|
+
async getStoreByBrands(
|
|
699
|
+
{ body, pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
879
700
|
{ responseHeaders } = { responseHeaders: false }
|
|
880
701
|
) {
|
|
881
702
|
const {
|
|
882
703
|
error,
|
|
883
|
-
} = ConfigurationPlatformValidator.
|
|
704
|
+
} = ConfigurationPlatformValidator.getStoreByBrands().validate(
|
|
884
705
|
{
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
706
|
+
body,
|
|
707
|
+
pageNo,
|
|
708
|
+
pageSize,
|
|
888
709
|
},
|
|
889
710
|
{ abortEarly: false, allowUnknown: true }
|
|
890
711
|
);
|
|
@@ -895,31 +716,33 @@ class Configuration {
|
|
|
895
716
|
// Showing warrnings if extra unknown parameters are found
|
|
896
717
|
const {
|
|
897
718
|
error: warrning,
|
|
898
|
-
} = ConfigurationPlatformValidator.
|
|
719
|
+
} = ConfigurationPlatformValidator.getStoreByBrands().validate(
|
|
899
720
|
{
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
721
|
+
body,
|
|
722
|
+
pageNo,
|
|
723
|
+
pageSize,
|
|
903
724
|
},
|
|
904
725
|
{ abortEarly: false, allowUnknown: false }
|
|
905
726
|
);
|
|
906
727
|
if (warrning) {
|
|
907
728
|
Logger({
|
|
908
729
|
level: "WARN",
|
|
909
|
-
message: `Parameter Validation warrnings for platform > Configuration >
|
|
730
|
+
message: `Parameter Validation warrnings for platform > Configuration > getStoreByBrands \n ${warrning}`,
|
|
910
731
|
});
|
|
911
732
|
}
|
|
912
733
|
|
|
913
734
|
const query_params = {};
|
|
735
|
+
query_params["page_no"] = pageNo;
|
|
736
|
+
query_params["page_size"] = pageSize;
|
|
914
737
|
|
|
915
738
|
const xHeaders = {};
|
|
916
739
|
|
|
917
740
|
const response = await PlatformAPIClient.execute(
|
|
918
741
|
this.config,
|
|
919
|
-
"
|
|
920
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/
|
|
742
|
+
"post",
|
|
743
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/inventory/stores-by-brands`,
|
|
921
744
|
query_params,
|
|
922
|
-
|
|
745
|
+
body,
|
|
923
746
|
{ ...xHeaders, ...requestHeaders },
|
|
924
747
|
{ responseHeaders }
|
|
925
748
|
);
|
|
@@ -931,7 +754,7 @@ class Configuration {
|
|
|
931
754
|
|
|
932
755
|
const {
|
|
933
756
|
error: res_error,
|
|
934
|
-
} = ConfigurationPlatformModel.
|
|
757
|
+
} = ConfigurationPlatformModel.StoreByBrandsResponse().validate(
|
|
935
758
|
responseData,
|
|
936
759
|
{ abortEarly: false, allowUnknown: true }
|
|
937
760
|
);
|
|
@@ -942,7 +765,7 @@ class Configuration {
|
|
|
942
765
|
} else {
|
|
943
766
|
Logger({
|
|
944
767
|
level: "WARN",
|
|
945
|
-
message: `Response Validation Warnings for platform > Configuration >
|
|
768
|
+
message: `Response Validation Warnings for platform > Configuration > getStoreByBrands \n ${res_error}`,
|
|
946
769
|
});
|
|
947
770
|
}
|
|
948
771
|
}
|
|
@@ -951,27 +774,25 @@ class Configuration {
|
|
|
951
774
|
}
|
|
952
775
|
|
|
953
776
|
/**
|
|
954
|
-
* @param {ConfigurationPlatformValidator.
|
|
955
|
-
* - Arg object
|
|
956
|
-
*
|
|
777
|
+
* @param {ConfigurationPlatformValidator.OptOutFromApplicationParam} arg - Arg object
|
|
957
778
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
958
779
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
959
|
-
* @returns {Promise<ConfigurationPlatformModel.
|
|
960
|
-
*
|
|
961
|
-
*
|
|
962
|
-
* @
|
|
963
|
-
* @
|
|
964
|
-
* @description: Retrieve details of a seller sales channel that was not created within the current company but has opted for the current company's inventory and searched via the sales channel ID of another sales channel - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getOtherSellerApplicationById/).
|
|
780
|
+
* @returns {Promise<ConfigurationPlatformModel.SuccessMessageResponse>} -
|
|
781
|
+
* Success response
|
|
782
|
+
* @name optOutFromApplication
|
|
783
|
+
* @summary: opt out of marketplaces
|
|
784
|
+
* @description: This API allows businesses to opt out of sharing their inventory with external seller sales channels. By using this API, companies or stores can prevent specific seller sales channels from fetching their inventory data. This feature is useful for businesses that want to control who can access their product listings and other inventory information. It helps maintain privacy and control over data distribution, ensuring that sensitive information is only shared with authorized partners. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/optOutFromApplication/).
|
|
965
785
|
*/
|
|
966
|
-
async
|
|
967
|
-
{ id, requestHeaders } = { requestHeaders: {} },
|
|
786
|
+
async optOutFromApplication(
|
|
787
|
+
{ id, body, requestHeaders } = { requestHeaders: {} },
|
|
968
788
|
{ responseHeaders } = { responseHeaders: false }
|
|
969
789
|
) {
|
|
970
790
|
const {
|
|
971
791
|
error,
|
|
972
|
-
} = ConfigurationPlatformValidator.
|
|
792
|
+
} = ConfigurationPlatformValidator.optOutFromApplication().validate(
|
|
973
793
|
{
|
|
974
794
|
id,
|
|
795
|
+
body,
|
|
975
796
|
},
|
|
976
797
|
{ abortEarly: false, allowUnknown: true }
|
|
977
798
|
);
|
|
@@ -982,16 +803,17 @@ class Configuration {
|
|
|
982
803
|
// Showing warrnings if extra unknown parameters are found
|
|
983
804
|
const {
|
|
984
805
|
error: warrning,
|
|
985
|
-
} = ConfigurationPlatformValidator.
|
|
806
|
+
} = ConfigurationPlatformValidator.optOutFromApplication().validate(
|
|
986
807
|
{
|
|
987
808
|
id,
|
|
809
|
+
body,
|
|
988
810
|
},
|
|
989
811
|
{ abortEarly: false, allowUnknown: false }
|
|
990
812
|
);
|
|
991
813
|
if (warrning) {
|
|
992
814
|
Logger({
|
|
993
815
|
level: "WARN",
|
|
994
|
-
message: `Parameter Validation warrnings for platform > Configuration >
|
|
816
|
+
message: `Parameter Validation warrnings for platform > Configuration > optOutFromApplication \n ${warrning}`,
|
|
995
817
|
});
|
|
996
818
|
}
|
|
997
819
|
|
|
@@ -1001,10 +823,10 @@ class Configuration {
|
|
|
1001
823
|
|
|
1002
824
|
const response = await PlatformAPIClient.execute(
|
|
1003
825
|
this.config,
|
|
1004
|
-
"
|
|
1005
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/other-seller-applications/${id}`,
|
|
826
|
+
"put",
|
|
827
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/other-seller-applications/${id}/opt_out`,
|
|
1006
828
|
query_params,
|
|
1007
|
-
|
|
829
|
+
body,
|
|
1008
830
|
{ ...xHeaders, ...requestHeaders },
|
|
1009
831
|
{ responseHeaders }
|
|
1010
832
|
);
|
|
@@ -1016,358 +838,7 @@ class Configuration {
|
|
|
1016
838
|
|
|
1017
839
|
const {
|
|
1018
840
|
error: res_error,
|
|
1019
|
-
} = ConfigurationPlatformModel.
|
|
1020
|
-
responseData,
|
|
1021
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1022
|
-
);
|
|
1023
|
-
|
|
1024
|
-
if (res_error) {
|
|
1025
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
1026
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1027
|
-
} else {
|
|
1028
|
-
Logger({
|
|
1029
|
-
level: "WARN",
|
|
1030
|
-
message: `Response Validation Warnings for platform > Configuration > getOtherSellerApplicationById \n ${res_error}`,
|
|
1031
|
-
});
|
|
1032
|
-
}
|
|
1033
|
-
}
|
|
1034
|
-
|
|
1035
|
-
return response;
|
|
1036
|
-
}
|
|
1037
|
-
|
|
1038
|
-
/**
|
|
1039
|
-
* @param {ConfigurationPlatformValidator.GetOtherSellerApplicationsParam} arg
|
|
1040
|
-
* - Arg object
|
|
1041
|
-
*
|
|
1042
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1043
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1044
|
-
* @returns {Promise<ConfigurationPlatformModel.OtherSellerApplications>} -
|
|
1045
|
-
* Success response
|
|
1046
|
-
* @name getOtherSellerApplications
|
|
1047
|
-
* @summary: Get other sales channel
|
|
1048
|
-
* @description: Retrieve sales channels of other sellers. Retrieve all other seller sales channels that were not created within the current company. but have opted for the current company's inventory. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getOtherSellerApplications/).
|
|
1049
|
-
*/
|
|
1050
|
-
async getOtherSellerApplications(
|
|
1051
|
-
{ pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
1052
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
1053
|
-
) {
|
|
1054
|
-
const {
|
|
1055
|
-
error,
|
|
1056
|
-
} = ConfigurationPlatformValidator.getOtherSellerApplications().validate(
|
|
1057
|
-
{
|
|
1058
|
-
pageNo,
|
|
1059
|
-
pageSize,
|
|
1060
|
-
},
|
|
1061
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1062
|
-
);
|
|
1063
|
-
if (error) {
|
|
1064
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1065
|
-
}
|
|
1066
|
-
|
|
1067
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1068
|
-
const {
|
|
1069
|
-
error: warrning,
|
|
1070
|
-
} = ConfigurationPlatformValidator.getOtherSellerApplications().validate(
|
|
1071
|
-
{
|
|
1072
|
-
pageNo,
|
|
1073
|
-
pageSize,
|
|
1074
|
-
},
|
|
1075
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1076
|
-
);
|
|
1077
|
-
if (warrning) {
|
|
1078
|
-
Logger({
|
|
1079
|
-
level: "WARN",
|
|
1080
|
-
message: `Parameter Validation warrnings for platform > Configuration > getOtherSellerApplications \n ${warrning}`,
|
|
1081
|
-
});
|
|
1082
|
-
}
|
|
1083
|
-
|
|
1084
|
-
const query_params = {};
|
|
1085
|
-
query_params["page_no"] = pageNo;
|
|
1086
|
-
query_params["page_size"] = pageSize;
|
|
1087
|
-
|
|
1088
|
-
const xHeaders = {};
|
|
1089
|
-
|
|
1090
|
-
const response = await PlatformAPIClient.execute(
|
|
1091
|
-
this.config,
|
|
1092
|
-
"get",
|
|
1093
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/other-seller-applications`,
|
|
1094
|
-
query_params,
|
|
1095
|
-
undefined,
|
|
1096
|
-
{ ...xHeaders, ...requestHeaders },
|
|
1097
|
-
{ responseHeaders }
|
|
1098
|
-
);
|
|
1099
|
-
|
|
1100
|
-
let responseData = response;
|
|
1101
|
-
if (responseHeaders) {
|
|
1102
|
-
responseData = response[0];
|
|
1103
|
-
}
|
|
1104
|
-
|
|
1105
|
-
const {
|
|
1106
|
-
error: res_error,
|
|
1107
|
-
} = ConfigurationPlatformModel.OtherSellerApplications().validate(
|
|
1108
|
-
responseData,
|
|
1109
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1110
|
-
);
|
|
1111
|
-
|
|
1112
|
-
if (res_error) {
|
|
1113
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
1114
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1115
|
-
} else {
|
|
1116
|
-
Logger({
|
|
1117
|
-
level: "WARN",
|
|
1118
|
-
message: `Response Validation Warnings for platform > Configuration > getOtherSellerApplications \n ${res_error}`,
|
|
1119
|
-
});
|
|
1120
|
-
}
|
|
1121
|
-
}
|
|
1122
|
-
|
|
1123
|
-
return response;
|
|
1124
|
-
}
|
|
1125
|
-
|
|
1126
|
-
/**
|
|
1127
|
-
* @param {ConfigurationPlatformValidator.GetSelectedOptInsParam} arg - Arg object
|
|
1128
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1129
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1130
|
-
* @returns {Promise<ConfigurationPlatformModel.GetIntegrationsOptInsResponse>}
|
|
1131
|
-
* - Success response
|
|
1132
|
-
*
|
|
1133
|
-
* @name getSelectedOptIns
|
|
1134
|
-
* @summary: List selected opt-in
|
|
1135
|
-
* @description: Retrieve a list of selected opt-ins. Retrieve the store-level/company-level integrations configured in a company - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getSelectedOptIns/).
|
|
1136
|
-
*/
|
|
1137
|
-
async getSelectedOptIns(
|
|
1138
|
-
{ level, uid, pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
1139
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
1140
|
-
) {
|
|
1141
|
-
const {
|
|
1142
|
-
error,
|
|
1143
|
-
} = ConfigurationPlatformValidator.getSelectedOptIns().validate(
|
|
1144
|
-
{
|
|
1145
|
-
level,
|
|
1146
|
-
uid,
|
|
1147
|
-
pageNo,
|
|
1148
|
-
pageSize,
|
|
1149
|
-
},
|
|
1150
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1151
|
-
);
|
|
1152
|
-
if (error) {
|
|
1153
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1154
|
-
}
|
|
1155
|
-
|
|
1156
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1157
|
-
const {
|
|
1158
|
-
error: warrning,
|
|
1159
|
-
} = ConfigurationPlatformValidator.getSelectedOptIns().validate(
|
|
1160
|
-
{
|
|
1161
|
-
level,
|
|
1162
|
-
uid,
|
|
1163
|
-
pageNo,
|
|
1164
|
-
pageSize,
|
|
1165
|
-
},
|
|
1166
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1167
|
-
);
|
|
1168
|
-
if (warrning) {
|
|
1169
|
-
Logger({
|
|
1170
|
-
level: "WARN",
|
|
1171
|
-
message: `Parameter Validation warrnings for platform > Configuration > getSelectedOptIns \n ${warrning}`,
|
|
1172
|
-
});
|
|
1173
|
-
}
|
|
1174
|
-
|
|
1175
|
-
const query_params = {};
|
|
1176
|
-
query_params["page_no"] = pageNo;
|
|
1177
|
-
query_params["page_size"] = pageSize;
|
|
1178
|
-
|
|
1179
|
-
const xHeaders = {};
|
|
1180
|
-
|
|
1181
|
-
const response = await PlatformAPIClient.execute(
|
|
1182
|
-
this.config,
|
|
1183
|
-
"get",
|
|
1184
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/selected/${level}/${uid}`,
|
|
1185
|
-
query_params,
|
|
1186
|
-
undefined,
|
|
1187
|
-
{ ...xHeaders, ...requestHeaders },
|
|
1188
|
-
{ responseHeaders }
|
|
1189
|
-
);
|
|
1190
|
-
|
|
1191
|
-
let responseData = response;
|
|
1192
|
-
if (responseHeaders) {
|
|
1193
|
-
responseData = response[0];
|
|
1194
|
-
}
|
|
1195
|
-
|
|
1196
|
-
const {
|
|
1197
|
-
error: res_error,
|
|
1198
|
-
} = ConfigurationPlatformModel.GetIntegrationsOptInsResponse().validate(
|
|
1199
|
-
responseData,
|
|
1200
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1201
|
-
);
|
|
1202
|
-
|
|
1203
|
-
if (res_error) {
|
|
1204
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
1205
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1206
|
-
} else {
|
|
1207
|
-
Logger({
|
|
1208
|
-
level: "WARN",
|
|
1209
|
-
message: `Response Validation Warnings for platform > Configuration > getSelectedOptIns \n ${res_error}`,
|
|
1210
|
-
});
|
|
1211
|
-
}
|
|
1212
|
-
}
|
|
1213
|
-
|
|
1214
|
-
return response;
|
|
1215
|
-
}
|
|
1216
|
-
|
|
1217
|
-
/**
|
|
1218
|
-
* @param {ConfigurationPlatformValidator.GetStoreByBrandsParam} arg - Arg object
|
|
1219
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1220
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1221
|
-
* @returns {Promise<ConfigurationPlatformModel.StoreByBrandsResponse>} -
|
|
1222
|
-
* Success response
|
|
1223
|
-
* @name getStoreByBrands
|
|
1224
|
-
* @summary: Get store by brands
|
|
1225
|
-
* @description: Retrieve stores associated with specific brands. Retrieve a list of selling locations (stores) by the brands they deal. Store has information about store name, store type, store code, store address, and company detail. filtering can be done on brand id and brand names - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getStoreByBrands/).
|
|
1226
|
-
*/
|
|
1227
|
-
async getStoreByBrands(
|
|
1228
|
-
{ body, pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
1229
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
1230
|
-
) {
|
|
1231
|
-
const {
|
|
1232
|
-
error,
|
|
1233
|
-
} = ConfigurationPlatformValidator.getStoreByBrands().validate(
|
|
1234
|
-
{
|
|
1235
|
-
body,
|
|
1236
|
-
pageNo,
|
|
1237
|
-
pageSize,
|
|
1238
|
-
},
|
|
1239
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1240
|
-
);
|
|
1241
|
-
if (error) {
|
|
1242
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1243
|
-
}
|
|
1244
|
-
|
|
1245
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1246
|
-
const {
|
|
1247
|
-
error: warrning,
|
|
1248
|
-
} = ConfigurationPlatformValidator.getStoreByBrands().validate(
|
|
1249
|
-
{
|
|
1250
|
-
body,
|
|
1251
|
-
pageNo,
|
|
1252
|
-
pageSize,
|
|
1253
|
-
},
|
|
1254
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1255
|
-
);
|
|
1256
|
-
if (warrning) {
|
|
1257
|
-
Logger({
|
|
1258
|
-
level: "WARN",
|
|
1259
|
-
message: `Parameter Validation warrnings for platform > Configuration > getStoreByBrands \n ${warrning}`,
|
|
1260
|
-
});
|
|
1261
|
-
}
|
|
1262
|
-
|
|
1263
|
-
const query_params = {};
|
|
1264
|
-
query_params["page_no"] = pageNo;
|
|
1265
|
-
query_params["page_size"] = pageSize;
|
|
1266
|
-
|
|
1267
|
-
const xHeaders = {};
|
|
1268
|
-
|
|
1269
|
-
const response = await PlatformAPIClient.execute(
|
|
1270
|
-
this.config,
|
|
1271
|
-
"post",
|
|
1272
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/inventory/stores-by-brands`,
|
|
1273
|
-
query_params,
|
|
1274
|
-
body,
|
|
1275
|
-
{ ...xHeaders, ...requestHeaders },
|
|
1276
|
-
{ responseHeaders }
|
|
1277
|
-
);
|
|
1278
|
-
|
|
1279
|
-
let responseData = response;
|
|
1280
|
-
if (responseHeaders) {
|
|
1281
|
-
responseData = response[0];
|
|
1282
|
-
}
|
|
1283
|
-
|
|
1284
|
-
const {
|
|
1285
|
-
error: res_error,
|
|
1286
|
-
} = ConfigurationPlatformModel.StoreByBrandsResponse().validate(
|
|
1287
|
-
responseData,
|
|
1288
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1289
|
-
);
|
|
1290
|
-
|
|
1291
|
-
if (res_error) {
|
|
1292
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
1293
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1294
|
-
} else {
|
|
1295
|
-
Logger({
|
|
1296
|
-
level: "WARN",
|
|
1297
|
-
message: `Response Validation Warnings for platform > Configuration > getStoreByBrands \n ${res_error}`,
|
|
1298
|
-
});
|
|
1299
|
-
}
|
|
1300
|
-
}
|
|
1301
|
-
|
|
1302
|
-
return response;
|
|
1303
|
-
}
|
|
1304
|
-
|
|
1305
|
-
/**
|
|
1306
|
-
* @param {ConfigurationPlatformValidator.OptOutFromApplicationParam} arg - Arg object
|
|
1307
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1308
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1309
|
-
* @returns {Promise<ConfigurationPlatformModel.SuccessMessageResponse>} -
|
|
1310
|
-
* Success response
|
|
1311
|
-
* @name optOutFromApplication
|
|
1312
|
-
* @summary: opt out of marketplaces
|
|
1313
|
-
* @description: This API allows businesses to opt out of sharing their inventory with external seller sales channels. By using this API, companies or stores can prevent specific seller sales channels from fetching their inventory data. This feature is useful for businesses that want to control who can access their product listings and other inventory information. It helps maintain privacy and control over data distribution, ensuring that sensitive information is only shared with authorized partners. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/optOutFromApplication/).
|
|
1314
|
-
*/
|
|
1315
|
-
async optOutFromApplication(
|
|
1316
|
-
{ id, body, requestHeaders } = { requestHeaders: {} },
|
|
1317
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
1318
|
-
) {
|
|
1319
|
-
const {
|
|
1320
|
-
error,
|
|
1321
|
-
} = ConfigurationPlatformValidator.optOutFromApplication().validate(
|
|
1322
|
-
{
|
|
1323
|
-
id,
|
|
1324
|
-
body,
|
|
1325
|
-
},
|
|
1326
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1327
|
-
);
|
|
1328
|
-
if (error) {
|
|
1329
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1330
|
-
}
|
|
1331
|
-
|
|
1332
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1333
|
-
const {
|
|
1334
|
-
error: warrning,
|
|
1335
|
-
} = ConfigurationPlatformValidator.optOutFromApplication().validate(
|
|
1336
|
-
{
|
|
1337
|
-
id,
|
|
1338
|
-
body,
|
|
1339
|
-
},
|
|
1340
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1341
|
-
);
|
|
1342
|
-
if (warrning) {
|
|
1343
|
-
Logger({
|
|
1344
|
-
level: "WARN",
|
|
1345
|
-
message: `Parameter Validation warrnings for platform > Configuration > optOutFromApplication \n ${warrning}`,
|
|
1346
|
-
});
|
|
1347
|
-
}
|
|
1348
|
-
|
|
1349
|
-
const query_params = {};
|
|
1350
|
-
|
|
1351
|
-
const xHeaders = {};
|
|
1352
|
-
|
|
1353
|
-
const response = await PlatformAPIClient.execute(
|
|
1354
|
-
this.config,
|
|
1355
|
-
"put",
|
|
1356
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/other-seller-applications/${id}/opt_out`,
|
|
1357
|
-
query_params,
|
|
1358
|
-
body,
|
|
1359
|
-
{ ...xHeaders, ...requestHeaders },
|
|
1360
|
-
{ responseHeaders }
|
|
1361
|
-
);
|
|
1362
|
-
|
|
1363
|
-
let responseData = response;
|
|
1364
|
-
if (responseHeaders) {
|
|
1365
|
-
responseData = response[0];
|
|
1366
|
-
}
|
|
1367
|
-
|
|
1368
|
-
const {
|
|
1369
|
-
error: res_error,
|
|
1370
|
-
} = ConfigurationPlatformModel.SuccessMessageResponse().validate(
|
|
841
|
+
} = ConfigurationPlatformModel.SuccessMessageResponse().validate(
|
|
1371
842
|
responseData,
|
|
1372
843
|
{ abortEarly: false, allowUnknown: true }
|
|
1373
844
|
);
|
|
@@ -1385,182 +856,6 @@ class Configuration {
|
|
|
1385
856
|
|
|
1386
857
|
return response;
|
|
1387
858
|
}
|
|
1388
|
-
|
|
1389
|
-
/**
|
|
1390
|
-
* @param {ConfigurationPlatformValidator.UpdateLevelIntegrationParam} arg
|
|
1391
|
-
* - Arg object
|
|
1392
|
-
*
|
|
1393
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1394
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1395
|
-
* @returns {Promise<ConfigurationPlatformModel.IntegrationLevel>} - Success response
|
|
1396
|
-
* @name updateLevelIntegration
|
|
1397
|
-
* @summary: Update level integration
|
|
1398
|
-
* @description: Modify level integration. Update the configuration details of an integration such as token, permissions, level, opted value, uid, meta, location ID, etc. at a particular level (store/company). - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/updateLevelIntegration/).
|
|
1399
|
-
*/
|
|
1400
|
-
async updateLevelIntegration(
|
|
1401
|
-
{ id, level, body, requestHeaders } = { requestHeaders: {} },
|
|
1402
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
1403
|
-
) {
|
|
1404
|
-
const {
|
|
1405
|
-
error,
|
|
1406
|
-
} = ConfigurationPlatformValidator.updateLevelIntegration().validate(
|
|
1407
|
-
{
|
|
1408
|
-
id,
|
|
1409
|
-
level,
|
|
1410
|
-
body,
|
|
1411
|
-
},
|
|
1412
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1413
|
-
);
|
|
1414
|
-
if (error) {
|
|
1415
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1416
|
-
}
|
|
1417
|
-
|
|
1418
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1419
|
-
const {
|
|
1420
|
-
error: warrning,
|
|
1421
|
-
} = ConfigurationPlatformValidator.updateLevelIntegration().validate(
|
|
1422
|
-
{
|
|
1423
|
-
id,
|
|
1424
|
-
level,
|
|
1425
|
-
body,
|
|
1426
|
-
},
|
|
1427
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1428
|
-
);
|
|
1429
|
-
if (warrning) {
|
|
1430
|
-
Logger({
|
|
1431
|
-
level: "WARN",
|
|
1432
|
-
message: `Parameter Validation warrnings for platform > Configuration > updateLevelIntegration \n ${warrning}`,
|
|
1433
|
-
});
|
|
1434
|
-
}
|
|
1435
|
-
|
|
1436
|
-
const query_params = {};
|
|
1437
|
-
|
|
1438
|
-
const xHeaders = {};
|
|
1439
|
-
|
|
1440
|
-
const response = await PlatformAPIClient.execute(
|
|
1441
|
-
this.config,
|
|
1442
|
-
"put",
|
|
1443
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/configuration/${id}/${level}`,
|
|
1444
|
-
query_params,
|
|
1445
|
-
body,
|
|
1446
|
-
{ ...xHeaders, ...requestHeaders },
|
|
1447
|
-
{ responseHeaders }
|
|
1448
|
-
);
|
|
1449
|
-
|
|
1450
|
-
let responseData = response;
|
|
1451
|
-
if (responseHeaders) {
|
|
1452
|
-
responseData = response[0];
|
|
1453
|
-
}
|
|
1454
|
-
|
|
1455
|
-
const {
|
|
1456
|
-
error: res_error,
|
|
1457
|
-
} = ConfigurationPlatformModel.IntegrationLevel().validate(responseData, {
|
|
1458
|
-
abortEarly: false,
|
|
1459
|
-
allowUnknown: true,
|
|
1460
|
-
});
|
|
1461
|
-
|
|
1462
|
-
if (res_error) {
|
|
1463
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
1464
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1465
|
-
} else {
|
|
1466
|
-
Logger({
|
|
1467
|
-
level: "WARN",
|
|
1468
|
-
message: `Response Validation Warnings for platform > Configuration > updateLevelIntegration \n ${res_error}`,
|
|
1469
|
-
});
|
|
1470
|
-
}
|
|
1471
|
-
}
|
|
1472
|
-
|
|
1473
|
-
return response;
|
|
1474
|
-
}
|
|
1475
|
-
|
|
1476
|
-
/**
|
|
1477
|
-
* @param {ConfigurationPlatformValidator.UpdateLevelUidIntegrationParam} arg
|
|
1478
|
-
* - Arg object
|
|
1479
|
-
*
|
|
1480
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1481
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1482
|
-
* @returns {Promise<ConfigurationPlatformModel.IntegrationLevel>} - Success response
|
|
1483
|
-
* @name updateLevelUidIntegration
|
|
1484
|
-
* @summary: Update level UID integration
|
|
1485
|
-
* @description: Modify UID-based integration. Update the level of integration by store UID - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/updateLevelUidIntegration/).
|
|
1486
|
-
*/
|
|
1487
|
-
async updateLevelUidIntegration(
|
|
1488
|
-
{ id, level, uid, body, requestHeaders } = { requestHeaders: {} },
|
|
1489
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
1490
|
-
) {
|
|
1491
|
-
const {
|
|
1492
|
-
error,
|
|
1493
|
-
} = ConfigurationPlatformValidator.updateLevelUidIntegration().validate(
|
|
1494
|
-
{
|
|
1495
|
-
id,
|
|
1496
|
-
level,
|
|
1497
|
-
uid,
|
|
1498
|
-
body,
|
|
1499
|
-
},
|
|
1500
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1501
|
-
);
|
|
1502
|
-
if (error) {
|
|
1503
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1504
|
-
}
|
|
1505
|
-
|
|
1506
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1507
|
-
const {
|
|
1508
|
-
error: warrning,
|
|
1509
|
-
} = ConfigurationPlatformValidator.updateLevelUidIntegration().validate(
|
|
1510
|
-
{
|
|
1511
|
-
id,
|
|
1512
|
-
level,
|
|
1513
|
-
uid,
|
|
1514
|
-
body,
|
|
1515
|
-
},
|
|
1516
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1517
|
-
);
|
|
1518
|
-
if (warrning) {
|
|
1519
|
-
Logger({
|
|
1520
|
-
level: "WARN",
|
|
1521
|
-
message: `Parameter Validation warrnings for platform > Configuration > updateLevelUidIntegration \n ${warrning}`,
|
|
1522
|
-
});
|
|
1523
|
-
}
|
|
1524
|
-
|
|
1525
|
-
const query_params = {};
|
|
1526
|
-
|
|
1527
|
-
const xHeaders = {};
|
|
1528
|
-
|
|
1529
|
-
const response = await PlatformAPIClient.execute(
|
|
1530
|
-
this.config,
|
|
1531
|
-
"put",
|
|
1532
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/configuration/${id}/${level}/${uid}`,
|
|
1533
|
-
query_params,
|
|
1534
|
-
body,
|
|
1535
|
-
{ ...xHeaders, ...requestHeaders },
|
|
1536
|
-
{ responseHeaders }
|
|
1537
|
-
);
|
|
1538
|
-
|
|
1539
|
-
let responseData = response;
|
|
1540
|
-
if (responseHeaders) {
|
|
1541
|
-
responseData = response[0];
|
|
1542
|
-
}
|
|
1543
|
-
|
|
1544
|
-
const {
|
|
1545
|
-
error: res_error,
|
|
1546
|
-
} = ConfigurationPlatformModel.IntegrationLevel().validate(responseData, {
|
|
1547
|
-
abortEarly: false,
|
|
1548
|
-
allowUnknown: true,
|
|
1549
|
-
});
|
|
1550
|
-
|
|
1551
|
-
if (res_error) {
|
|
1552
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
1553
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1554
|
-
} else {
|
|
1555
|
-
Logger({
|
|
1556
|
-
level: "WARN",
|
|
1557
|
-
message: `Response Validation Warnings for platform > Configuration > updateLevelUidIntegration \n ${res_error}`,
|
|
1558
|
-
});
|
|
1559
|
-
}
|
|
1560
|
-
}
|
|
1561
|
-
|
|
1562
|
-
return response;
|
|
1563
|
-
}
|
|
1564
859
|
}
|
|
1565
860
|
|
|
1566
861
|
module.exports = Configuration;
|