@gofynd/fdk-client-javascript 3.16.3 → 3.17.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.
- package/README.md +1 -1
- package/package.json +1 -1
- package/sdk/application/ApplicationClient.d.ts +0 -2
- package/sdk/application/ApplicationClient.js +0 -2
- package/sdk/application/Cart/CartApplicationClient.d.ts +40 -0
- package/sdk/application/Cart/CartApplicationClient.js +176 -0
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +18 -4
- package/sdk/application/Catalog/CatalogApplicationClient.js +47 -4
- package/sdk/application/Content/ContentApplicationClient.d.ts +21 -1
- package/sdk/application/Content/ContentApplicationClient.js +93 -2
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +11 -21
- package/sdk/application/Logistic/LogisticApplicationClient.js +34 -83
- package/sdk/application/Order/OrderApplicationClient.d.ts +11 -0
- package/sdk/application/Order/OrderApplicationClient.js +50 -0
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +5 -5
- package/sdk/application/Payment/PaymentApplicationClient.js +5 -4
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +84 -0
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +712 -0
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +237 -1
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +157 -0
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +8 -0
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +70 -0
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +74 -12
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +637 -36
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +225 -1
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +147 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +952 -5
- package/sdk/platform/Cart/CartPlatformModel.js +598 -2
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +125 -5
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +831 -41
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +205 -7
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +154 -3
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +5 -16
- package/sdk/platform/Catalog/CatalogPlatformClient.js +8 -85
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1025 -159
- package/sdk/platform/Catalog/CatalogPlatformModel.js +840 -165
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +8 -10
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +3 -12
- package/sdk/platform/Common/CommonPlatformModel.d.ts +18 -1
- package/sdk/platform/Common/CommonPlatformModel.js +14 -0
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +1 -73
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +4 -462
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +7 -45
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +4 -55
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +10 -2
- package/sdk/platform/Communication/CommunicationPlatformModel.js +3 -2
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +14 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +6 -0
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +92 -1
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +54 -0
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +21 -0
- package/sdk/platform/Discount/DiscountPlatformModel.js +9 -0
- package/sdk/platform/Order/OrderPlatformClient.d.ts +27 -19
- package/sdk/platform/Order/OrderPlatformClient.js +176 -108
- package/sdk/platform/Order/OrderPlatformModel.d.ts +359 -45
- package/sdk/platform/Order/OrderPlatformModel.js +218 -44
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +40 -43
- package/sdk/platform/Order/OrderPlatformValidator.js +35 -30
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +14 -3
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +88 -6
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +28 -3
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +22 -2
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +376 -11
- package/sdk/platform/Payment/PaymentPlatformModel.js +243 -10
- package/sdk/platform/PlatformApplicationClient.d.ts +0 -2
- package/sdk/platform/PlatformApplicationClient.js +0 -4
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +0 -13
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +0 -82
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +1 -10
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +0 -12
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +212 -28
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +133 -13
- package/sdk/platform/User/UserPlatformModel.d.ts +2 -2
- package/sdk/platform/User/UserPlatformModel.js +4 -4
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +29 -0
- package/sdk/platform/Webhook/WebhookPlatformModel.js +13 -0
- package/sdk/platform/index.d.ts +0 -1
- package/sdk/platform/index.js +0 -2
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +27 -1
- package/sdk/public/Configuration/ConfigurationPublicModel.js +19 -0
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +29 -0
- package/sdk/public/Webhook/WebhookPublicModel.js +13 -0
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +0 -79
- package/sdk/application/Rewards/RewardsApplicationClient.js +0 -315
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +0 -136
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +0 -976
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +0 -152
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +0 -157
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +0 -387
- package/sdk/platform/Rewards/RewardsPlatformModel.js +0 -410
|
@@ -1230,7 +1230,7 @@ class Catalog {
|
|
|
1230
1230
|
* @returns {Promise<CatalogPlatformModel.CreateTax>} - Success response
|
|
1231
1231
|
* @name createTax
|
|
1232
1232
|
* @summary: Create Tax Rule
|
|
1233
|
-
* @description: Create a tax rule and its version for under a specific company. This also creates a live version of the rule - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/createTax/).
|
|
1233
|
+
* @description: Create a tax rule and its version for under a specific company. This also creates a live version of the rule. The API now supports region-specific versions using optional region_type and areas along with the default country-level rule definition. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/createTax/).
|
|
1234
1234
|
*/
|
|
1235
1235
|
async createTax(
|
|
1236
1236
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1392,7 +1392,7 @@ class Catalog {
|
|
|
1392
1392
|
* @returns {Promise<CatalogPlatformModel.TaxVersion>} - Success response
|
|
1393
1393
|
* @name createTaxVersion
|
|
1394
1394
|
* @summary: Create a tax version
|
|
1395
|
-
* @description: Creates a tax
|
|
1395
|
+
* @description: Creates a tax version using the provided rule_id with support for scheduled applicability and optional region-level overrides. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/createTaxVersion/).
|
|
1396
1396
|
*/
|
|
1397
1397
|
async createTaxVersion(
|
|
1398
1398
|
{ ruleId, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -4079,86 +4079,6 @@ class Catalog {
|
|
|
4079
4079
|
return response;
|
|
4080
4080
|
}
|
|
4081
4081
|
|
|
4082
|
-
/**
|
|
4083
|
-
* @param {CatalogPlatformValidator.GetOptimalLocationsParam} arg - Arg object
|
|
4084
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4085
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4086
|
-
* @returns {Promise<CatalogPlatformModel.StoreAssignResponseSchema>} -
|
|
4087
|
-
* Success response
|
|
4088
|
-
* @name getOptimalLocations
|
|
4089
|
-
* @summary: Get optimal locations
|
|
4090
|
-
* @description: This API returns the optimal locations where inventory is available for the given articles. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getOptimalLocations/).
|
|
4091
|
-
*/
|
|
4092
|
-
async getOptimalLocations(
|
|
4093
|
-
{ body, requestHeaders } = { requestHeaders: {} },
|
|
4094
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
4095
|
-
) {
|
|
4096
|
-
const { error } = CatalogPlatformValidator.getOptimalLocations().validate(
|
|
4097
|
-
{
|
|
4098
|
-
body,
|
|
4099
|
-
},
|
|
4100
|
-
{ abortEarly: false, allowUnknown: true }
|
|
4101
|
-
);
|
|
4102
|
-
if (error) {
|
|
4103
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
4104
|
-
}
|
|
4105
|
-
|
|
4106
|
-
// Showing warrnings if extra unknown parameters are found
|
|
4107
|
-
const {
|
|
4108
|
-
error: warrning,
|
|
4109
|
-
} = CatalogPlatformValidator.getOptimalLocations().validate(
|
|
4110
|
-
{
|
|
4111
|
-
body,
|
|
4112
|
-
},
|
|
4113
|
-
{ abortEarly: false, allowUnknown: false }
|
|
4114
|
-
);
|
|
4115
|
-
if (warrning) {
|
|
4116
|
-
Logger({
|
|
4117
|
-
level: "WARN",
|
|
4118
|
-
message: `Parameter Validation warrnings for platform > Catalog > getOptimalLocations \n ${warrning}`,
|
|
4119
|
-
});
|
|
4120
|
-
}
|
|
4121
|
-
|
|
4122
|
-
const query_params = {};
|
|
4123
|
-
|
|
4124
|
-
const xHeaders = {};
|
|
4125
|
-
|
|
4126
|
-
const response = await PlatformAPIClient.execute(
|
|
4127
|
-
this.config,
|
|
4128
|
-
"post",
|
|
4129
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/location/reassign/`,
|
|
4130
|
-
query_params,
|
|
4131
|
-
body,
|
|
4132
|
-
{ ...xHeaders, ...requestHeaders },
|
|
4133
|
-
{ responseHeaders }
|
|
4134
|
-
);
|
|
4135
|
-
|
|
4136
|
-
let responseData = response;
|
|
4137
|
-
if (responseHeaders) {
|
|
4138
|
-
responseData = response[0];
|
|
4139
|
-
}
|
|
4140
|
-
|
|
4141
|
-
const {
|
|
4142
|
-
error: res_error,
|
|
4143
|
-
} = CatalogPlatformModel.StoreAssignResponseSchema().validate(
|
|
4144
|
-
responseData,
|
|
4145
|
-
{ abortEarly: false, allowUnknown: true }
|
|
4146
|
-
);
|
|
4147
|
-
|
|
4148
|
-
if (res_error) {
|
|
4149
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
4150
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
4151
|
-
} else {
|
|
4152
|
-
Logger({
|
|
4153
|
-
level: "WARN",
|
|
4154
|
-
message: `Response Validation Warnings for platform > Catalog > getOptimalLocations \n ${res_error}`,
|
|
4155
|
-
});
|
|
4156
|
-
}
|
|
4157
|
-
}
|
|
4158
|
-
|
|
4159
|
-
return response;
|
|
4160
|
-
}
|
|
4161
|
-
|
|
4162
4082
|
/**
|
|
4163
4083
|
* @param {CatalogPlatformValidator.GetProductParam} arg - Arg object
|
|
4164
4084
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -5638,10 +5558,10 @@ class Catalog {
|
|
|
5638
5558
|
* @returns {Promise<CatalogPlatformModel.TaxRuleVersion>} - Success response
|
|
5639
5559
|
* @name getTaxVersionDetails
|
|
5640
5560
|
* @summary: Get tax versions for a tax rule
|
|
5641
|
-
* @description: Retrieve versions of a tax rule with support for filtering by
|
|
5561
|
+
* @description: Retrieve versions of a tax rule with support for filtering by status and text search on region names via the `q` parameter. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getTaxVersionDetails/).
|
|
5642
5562
|
*/
|
|
5643
5563
|
async getTaxVersionDetails(
|
|
5644
|
-
{ ruleId, versionStatus, limit, page, requestHeaders } = {
|
|
5564
|
+
{ ruleId, versionStatus, q, limit, page, requestHeaders } = {
|
|
5645
5565
|
requestHeaders: {},
|
|
5646
5566
|
},
|
|
5647
5567
|
{ responseHeaders } = { responseHeaders: false }
|
|
@@ -5650,6 +5570,7 @@ class Catalog {
|
|
|
5650
5570
|
{
|
|
5651
5571
|
ruleId,
|
|
5652
5572
|
versionStatus,
|
|
5573
|
+
q,
|
|
5653
5574
|
limit,
|
|
5654
5575
|
page,
|
|
5655
5576
|
},
|
|
@@ -5666,6 +5587,7 @@ class Catalog {
|
|
|
5666
5587
|
{
|
|
5667
5588
|
ruleId,
|
|
5668
5589
|
versionStatus,
|
|
5590
|
+
q,
|
|
5669
5591
|
limit,
|
|
5670
5592
|
page,
|
|
5671
5593
|
},
|
|
@@ -5680,6 +5602,7 @@ class Catalog {
|
|
|
5680
5602
|
|
|
5681
5603
|
const query_params = {};
|
|
5682
5604
|
query_params["version_status"] = versionStatus;
|
|
5605
|
+
query_params["q"] = q;
|
|
5683
5606
|
query_params["limit"] = limit;
|
|
5684
5607
|
query_params["page"] = page;
|
|
5685
5608
|
|
|
@@ -7418,7 +7341,7 @@ class Catalog {
|
|
|
7418
7341
|
* @returns {Promise<CatalogPlatformModel.TaxVersion>} - Success response
|
|
7419
7342
|
* @name updateTaxVersion
|
|
7420
7343
|
* @summary: Update a tax version
|
|
7421
|
-
* @description: Updates a tax
|
|
7344
|
+
* @description: Updates a tax version using the provided rule_id. Scheduled versions support editing of components, applicable dates, and regional overrides while live versions allow limited updates. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/updateTaxVersion/).
|
|
7422
7345
|
*/
|
|
7423
7346
|
async updateTaxVersion(
|
|
7424
7347
|
{ ruleId, versionId, body, requestHeaders } = { requestHeaders: {} },
|