@gofynd/fdk-client-javascript 1.4.15-beta.10 → 1.4.15-beta.12
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 +2 -2
- package/sdk/application/Cart/CartApplicationClient.d.ts +10 -0
- package/sdk/application/Cart/CartApplicationClient.js +40 -0
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +10 -0
- package/sdk/application/Catalog/CatalogApplicationClient.js +39 -0
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +1 -3
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +0 -3
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +0 -2
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +0 -2
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +51 -1
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +331 -1
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +47 -1
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +51 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +251 -1
- package/sdk/platform/Cart/CartPlatformModel.js +208 -0
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +1 -3
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +0 -3
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +1 -3
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +0 -3
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +1 -16
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +0 -20
|
@@ -92,6 +92,88 @@ class Cart {
|
|
|
92
92
|
return response;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
+
/**
|
|
96
|
+
* @param {CartPlatformApplicationValidator.AddBulkPriceAdjustmentParam} arg
|
|
97
|
+
* - Arg object
|
|
98
|
+
*
|
|
99
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
100
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
101
|
+
* @returns {Promise<CartPlatformModel.BulkPriceAdjustmentResponse>} -
|
|
102
|
+
* Success response
|
|
103
|
+
* @name addBulkPriceAdjustment
|
|
104
|
+
* @summary: Create price adjustments in Bulk
|
|
105
|
+
* @description: Create custom price adjustments for items in the cart, facilitating the application of discounts or promotions. Price adjustments can be tailored based on specific sales channel contexts, enhancing flexibility in pricing strategies. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/addBulkPriceAdjustment/).
|
|
106
|
+
*/
|
|
107
|
+
async addBulkPriceAdjustment(
|
|
108
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
109
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
110
|
+
) {
|
|
111
|
+
const {
|
|
112
|
+
error,
|
|
113
|
+
} = CartPlatformApplicationValidator.addBulkPriceAdjustment().validate(
|
|
114
|
+
{
|
|
115
|
+
body,
|
|
116
|
+
},
|
|
117
|
+
{ abortEarly: false, allowUnknown: true }
|
|
118
|
+
);
|
|
119
|
+
if (error) {
|
|
120
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// Showing warrnings if extra unknown parameters are found
|
|
124
|
+
const {
|
|
125
|
+
error: warrning,
|
|
126
|
+
} = CartPlatformApplicationValidator.addBulkPriceAdjustment().validate(
|
|
127
|
+
{
|
|
128
|
+
body,
|
|
129
|
+
},
|
|
130
|
+
{ abortEarly: false, allowUnknown: false }
|
|
131
|
+
);
|
|
132
|
+
if (warrning) {
|
|
133
|
+
Logger({
|
|
134
|
+
level: "WARN",
|
|
135
|
+
message: `Parameter Validation warrnings for platform > Cart > addBulkPriceAdjustment \n ${warrning}`,
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
const query_params = {};
|
|
140
|
+
|
|
141
|
+
const response = await PlatformAPIClient.execute(
|
|
142
|
+
this.config,
|
|
143
|
+
"post",
|
|
144
|
+
`/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/bulk-price-adjustment`,
|
|
145
|
+
query_params,
|
|
146
|
+
body,
|
|
147
|
+
requestHeaders,
|
|
148
|
+
{ responseHeaders }
|
|
149
|
+
);
|
|
150
|
+
|
|
151
|
+
let responseData = response;
|
|
152
|
+
if (responseHeaders) {
|
|
153
|
+
responseData = response[0];
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
const {
|
|
157
|
+
error: res_error,
|
|
158
|
+
} = CartPlatformModel.BulkPriceAdjustmentResponse().validate(responseData, {
|
|
159
|
+
abortEarly: false,
|
|
160
|
+
allowUnknown: true,
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
if (res_error) {
|
|
164
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
165
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
166
|
+
} else {
|
|
167
|
+
Logger({
|
|
168
|
+
level: "WARN",
|
|
169
|
+
message: `Response Validation Warnings for platform > Cart > addBulkPriceAdjustment \n ${res_error}`,
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
return response;
|
|
175
|
+
}
|
|
176
|
+
|
|
95
177
|
/**
|
|
96
178
|
* @param {CartPlatformApplicationValidator.AddItemsParam} arg - Arg object
|
|
97
179
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -3302,6 +3384,90 @@ class Cart {
|
|
|
3302
3384
|
return response;
|
|
3303
3385
|
}
|
|
3304
3386
|
|
|
3387
|
+
/**
|
|
3388
|
+
* @param {CartPlatformApplicationValidator.PlatformCheckoutCartParam} arg
|
|
3389
|
+
* - Arg object
|
|
3390
|
+
*
|
|
3391
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3392
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3393
|
+
* @returns {Promise<CartPlatformModel.CartCheckoutResponse>} - Success response
|
|
3394
|
+
* @name platformCheckoutCart
|
|
3395
|
+
* @summary: Checkout cart
|
|
3396
|
+
* @description: The checkout cart initiates the order creation process based on the selected address and payment method. It revalidates the cart details to ensure safe and seamless order placement. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/platformCheckoutCart/).
|
|
3397
|
+
*/
|
|
3398
|
+
async platformCheckoutCart(
|
|
3399
|
+
{ body, id, requestHeaders } = { requestHeaders: {} },
|
|
3400
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
3401
|
+
) {
|
|
3402
|
+
const {
|
|
3403
|
+
error,
|
|
3404
|
+
} = CartPlatformApplicationValidator.platformCheckoutCart().validate(
|
|
3405
|
+
{
|
|
3406
|
+
body,
|
|
3407
|
+
id,
|
|
3408
|
+
},
|
|
3409
|
+
{ abortEarly: false, allowUnknown: true }
|
|
3410
|
+
);
|
|
3411
|
+
if (error) {
|
|
3412
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
3413
|
+
}
|
|
3414
|
+
|
|
3415
|
+
// Showing warrnings if extra unknown parameters are found
|
|
3416
|
+
const {
|
|
3417
|
+
error: warrning,
|
|
3418
|
+
} = CartPlatformApplicationValidator.platformCheckoutCart().validate(
|
|
3419
|
+
{
|
|
3420
|
+
body,
|
|
3421
|
+
id,
|
|
3422
|
+
},
|
|
3423
|
+
{ abortEarly: false, allowUnknown: false }
|
|
3424
|
+
);
|
|
3425
|
+
if (warrning) {
|
|
3426
|
+
Logger({
|
|
3427
|
+
level: "WARN",
|
|
3428
|
+
message: `Parameter Validation warrnings for platform > Cart > platformCheckoutCart \n ${warrning}`,
|
|
3429
|
+
});
|
|
3430
|
+
}
|
|
3431
|
+
|
|
3432
|
+
const query_params = {};
|
|
3433
|
+
query_params["id"] = id;
|
|
3434
|
+
|
|
3435
|
+
const response = await PlatformAPIClient.execute(
|
|
3436
|
+
this.config,
|
|
3437
|
+
"post",
|
|
3438
|
+
`/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/checkout`,
|
|
3439
|
+
query_params,
|
|
3440
|
+
body,
|
|
3441
|
+
requestHeaders,
|
|
3442
|
+
{ responseHeaders }
|
|
3443
|
+
);
|
|
3444
|
+
|
|
3445
|
+
let responseData = response;
|
|
3446
|
+
if (responseHeaders) {
|
|
3447
|
+
responseData = response[0];
|
|
3448
|
+
}
|
|
3449
|
+
|
|
3450
|
+
const {
|
|
3451
|
+
error: res_error,
|
|
3452
|
+
} = CartPlatformModel.CartCheckoutResponse().validate(responseData, {
|
|
3453
|
+
abortEarly: false,
|
|
3454
|
+
allowUnknown: true,
|
|
3455
|
+
});
|
|
3456
|
+
|
|
3457
|
+
if (res_error) {
|
|
3458
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
3459
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
3460
|
+
} else {
|
|
3461
|
+
Logger({
|
|
3462
|
+
level: "WARN",
|
|
3463
|
+
message: `Response Validation Warnings for platform > Cart > platformCheckoutCart \n ${res_error}`,
|
|
3464
|
+
});
|
|
3465
|
+
}
|
|
3466
|
+
}
|
|
3467
|
+
|
|
3468
|
+
return response;
|
|
3469
|
+
}
|
|
3470
|
+
|
|
3305
3471
|
/**
|
|
3306
3472
|
* @param {CartPlatformApplicationValidator.PlatformCheckoutCartV2Param} arg
|
|
3307
3473
|
* - Arg object
|
|
@@ -3311,7 +3477,7 @@ class Cart {
|
|
|
3311
3477
|
* @returns {Promise<CartPlatformModel.CartCheckoutResponse>} - Success response
|
|
3312
3478
|
* @name platformCheckoutCartV2
|
|
3313
3479
|
* @summary: Checkout cart
|
|
3314
|
-
* @description: The checkout cart initiates the order creation process based on the items in the user
|
|
3480
|
+
* @description: The checkout cart initiates the order creation process based on the items in the user's cart, their selected address, and chosen payment methods. It also supports multiple payment method options and revalidates the cart details to ensure a secure and seamless order placement. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/platformCheckoutCartV2/).
|
|
3315
3481
|
*/
|
|
3316
3482
|
async platformCheckoutCartV2(
|
|
3317
3483
|
{ body, id, requestHeaders } = { requestHeaders: {} },
|
|
@@ -3562,6 +3728,88 @@ class Cart {
|
|
|
3562
3728
|
return response;
|
|
3563
3729
|
}
|
|
3564
3730
|
|
|
3731
|
+
/**
|
|
3732
|
+
* @param {CartPlatformApplicationValidator.RemoveBulkPriceAdjustmentParam} arg
|
|
3733
|
+
* - Arg object
|
|
3734
|
+
*
|
|
3735
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3736
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3737
|
+
* @returns {Promise<CartPlatformModel.SuccessMessage>} - Success response
|
|
3738
|
+
* @name removeBulkPriceAdjustment
|
|
3739
|
+
* @summary: Remove price adjustments in bulk.
|
|
3740
|
+
* @description: Remove the applied price adjustments for specific items within the cart based on unique price adjustment IDs. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/removeBulkPriceAdjustment/).
|
|
3741
|
+
*/
|
|
3742
|
+
async removeBulkPriceAdjustment(
|
|
3743
|
+
{ priceAdjustmentIds, requestHeaders } = { requestHeaders: {} },
|
|
3744
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
3745
|
+
) {
|
|
3746
|
+
const {
|
|
3747
|
+
error,
|
|
3748
|
+
} = CartPlatformApplicationValidator.removeBulkPriceAdjustment().validate(
|
|
3749
|
+
{
|
|
3750
|
+
priceAdjustmentIds,
|
|
3751
|
+
},
|
|
3752
|
+
{ abortEarly: false, allowUnknown: true }
|
|
3753
|
+
);
|
|
3754
|
+
if (error) {
|
|
3755
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
3756
|
+
}
|
|
3757
|
+
|
|
3758
|
+
// Showing warrnings if extra unknown parameters are found
|
|
3759
|
+
const {
|
|
3760
|
+
error: warrning,
|
|
3761
|
+
} = CartPlatformApplicationValidator.removeBulkPriceAdjustment().validate(
|
|
3762
|
+
{
|
|
3763
|
+
priceAdjustmentIds,
|
|
3764
|
+
},
|
|
3765
|
+
{ abortEarly: false, allowUnknown: false }
|
|
3766
|
+
);
|
|
3767
|
+
if (warrning) {
|
|
3768
|
+
Logger({
|
|
3769
|
+
level: "WARN",
|
|
3770
|
+
message: `Parameter Validation warrnings for platform > Cart > removeBulkPriceAdjustment \n ${warrning}`,
|
|
3771
|
+
});
|
|
3772
|
+
}
|
|
3773
|
+
|
|
3774
|
+
const query_params = {};
|
|
3775
|
+
query_params["price_adjustment_ids"] = priceAdjustmentIds;
|
|
3776
|
+
|
|
3777
|
+
const response = await PlatformAPIClient.execute(
|
|
3778
|
+
this.config,
|
|
3779
|
+
"delete",
|
|
3780
|
+
`/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/bulk-price-adjustment`,
|
|
3781
|
+
query_params,
|
|
3782
|
+
undefined,
|
|
3783
|
+
requestHeaders,
|
|
3784
|
+
{ responseHeaders }
|
|
3785
|
+
);
|
|
3786
|
+
|
|
3787
|
+
let responseData = response;
|
|
3788
|
+
if (responseHeaders) {
|
|
3789
|
+
responseData = response[0];
|
|
3790
|
+
}
|
|
3791
|
+
|
|
3792
|
+
const {
|
|
3793
|
+
error: res_error,
|
|
3794
|
+
} = CartPlatformModel.SuccessMessage().validate(responseData, {
|
|
3795
|
+
abortEarly: false,
|
|
3796
|
+
allowUnknown: true,
|
|
3797
|
+
});
|
|
3798
|
+
|
|
3799
|
+
if (res_error) {
|
|
3800
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
3801
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
3802
|
+
} else {
|
|
3803
|
+
Logger({
|
|
3804
|
+
level: "WARN",
|
|
3805
|
+
message: `Response Validation Warnings for platform > Cart > removeBulkPriceAdjustment \n ${res_error}`,
|
|
3806
|
+
});
|
|
3807
|
+
}
|
|
3808
|
+
}
|
|
3809
|
+
|
|
3810
|
+
return response;
|
|
3811
|
+
}
|
|
3812
|
+
|
|
3565
3813
|
/**
|
|
3566
3814
|
* @param {CartPlatformApplicationValidator.RemoveCouponParam} arg - Arg object
|
|
3567
3815
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -4068,6 +4316,88 @@ class Cart {
|
|
|
4068
4316
|
return response;
|
|
4069
4317
|
}
|
|
4070
4318
|
|
|
4319
|
+
/**
|
|
4320
|
+
* @param {CartPlatformApplicationValidator.UpdateBulkPriceAdjustmentParam} arg
|
|
4321
|
+
* - Arg object
|
|
4322
|
+
*
|
|
4323
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4324
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4325
|
+
* @returns {Promise<CartPlatformModel.BulkPriceAdjustmentResponse>} -
|
|
4326
|
+
* Success response
|
|
4327
|
+
* @name updateBulkPriceAdjustment
|
|
4328
|
+
* @summary: Update price adjustments
|
|
4329
|
+
* @description: Modify price adjustments for specific items in the cart. By providing the seller ID, sales channel ID, and price adjustment ID, seller can apply discounts or other adjustments to the prices of cart items, facilitating dynamic pricing strategies. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updateBulkPriceAdjustment/).
|
|
4330
|
+
*/
|
|
4331
|
+
async updateBulkPriceAdjustment(
|
|
4332
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
4333
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
4334
|
+
) {
|
|
4335
|
+
const {
|
|
4336
|
+
error,
|
|
4337
|
+
} = CartPlatformApplicationValidator.updateBulkPriceAdjustment().validate(
|
|
4338
|
+
{
|
|
4339
|
+
body,
|
|
4340
|
+
},
|
|
4341
|
+
{ abortEarly: false, allowUnknown: true }
|
|
4342
|
+
);
|
|
4343
|
+
if (error) {
|
|
4344
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
4345
|
+
}
|
|
4346
|
+
|
|
4347
|
+
// Showing warrnings if extra unknown parameters are found
|
|
4348
|
+
const {
|
|
4349
|
+
error: warrning,
|
|
4350
|
+
} = CartPlatformApplicationValidator.updateBulkPriceAdjustment().validate(
|
|
4351
|
+
{
|
|
4352
|
+
body,
|
|
4353
|
+
},
|
|
4354
|
+
{ abortEarly: false, allowUnknown: false }
|
|
4355
|
+
);
|
|
4356
|
+
if (warrning) {
|
|
4357
|
+
Logger({
|
|
4358
|
+
level: "WARN",
|
|
4359
|
+
message: `Parameter Validation warrnings for platform > Cart > updateBulkPriceAdjustment \n ${warrning}`,
|
|
4360
|
+
});
|
|
4361
|
+
}
|
|
4362
|
+
|
|
4363
|
+
const query_params = {};
|
|
4364
|
+
|
|
4365
|
+
const response = await PlatformAPIClient.execute(
|
|
4366
|
+
this.config,
|
|
4367
|
+
"put",
|
|
4368
|
+
`/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/bulk-price-adjustment`,
|
|
4369
|
+
query_params,
|
|
4370
|
+
body,
|
|
4371
|
+
requestHeaders,
|
|
4372
|
+
{ responseHeaders }
|
|
4373
|
+
);
|
|
4374
|
+
|
|
4375
|
+
let responseData = response;
|
|
4376
|
+
if (responseHeaders) {
|
|
4377
|
+
responseData = response[0];
|
|
4378
|
+
}
|
|
4379
|
+
|
|
4380
|
+
const {
|
|
4381
|
+
error: res_error,
|
|
4382
|
+
} = CartPlatformModel.BulkPriceAdjustmentResponse().validate(responseData, {
|
|
4383
|
+
abortEarly: false,
|
|
4384
|
+
allowUnknown: true,
|
|
4385
|
+
});
|
|
4386
|
+
|
|
4387
|
+
if (res_error) {
|
|
4388
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
4389
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
4390
|
+
} else {
|
|
4391
|
+
Logger({
|
|
4392
|
+
level: "WARN",
|
|
4393
|
+
message: `Response Validation Warnings for platform > Cart > updateBulkPriceAdjustment \n ${res_error}`,
|
|
4394
|
+
});
|
|
4395
|
+
}
|
|
4396
|
+
}
|
|
4397
|
+
|
|
4398
|
+
return response;
|
|
4399
|
+
}
|
|
4400
|
+
|
|
4071
4401
|
/**
|
|
4072
4402
|
* @param {CartPlatformApplicationValidator.UpdateCartParam} arg - Arg object
|
|
4073
4403
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -3,6 +3,10 @@ export = CartPlatformApplicationValidator;
|
|
|
3
3
|
* @typedef AddAddressParam
|
|
4
4
|
* @property {CartPlatformModel.PlatformAddress} body
|
|
5
5
|
*/
|
|
6
|
+
/**
|
|
7
|
+
* @typedef AddBulkPriceAdjustmentParam
|
|
8
|
+
* @property {CartPlatformModel.BulkPriceAdjustmentAddRequest} body
|
|
9
|
+
*/
|
|
6
10
|
/**
|
|
7
11
|
* @typedef AddItemsParam
|
|
8
12
|
* @property {string} cartId - Current Cart _id
|
|
@@ -236,6 +240,11 @@ export = CartPlatformApplicationValidator;
|
|
|
236
240
|
* @property {string} [id] - The unique identifier of the cart
|
|
237
241
|
* @property {CartPlatformModel.PlatformAddCartRequest} body
|
|
238
242
|
*/
|
|
243
|
+
/**
|
|
244
|
+
* @typedef PlatformCheckoutCartParam
|
|
245
|
+
* @property {string} [id] - The unique identifier of the cart
|
|
246
|
+
* @property {CartPlatformModel.PlatformCartCheckoutDetailRequest} body
|
|
247
|
+
*/
|
|
239
248
|
/**
|
|
240
249
|
* @typedef PlatformCheckoutCartV2Param
|
|
241
250
|
* @property {string} [id] - The unique identifier of the cart
|
|
@@ -260,6 +269,11 @@ export = CartPlatformApplicationValidator;
|
|
|
260
269
|
* @property {string} id - ID allotted to the selected address
|
|
261
270
|
* @property {string} [userId] - Option to delete address for the provided user_id.
|
|
262
271
|
*/
|
|
272
|
+
/**
|
|
273
|
+
* @typedef RemoveBulkPriceAdjustmentParam
|
|
274
|
+
* @property {string} priceAdjustmentIds - List of Price Adjustment IDs to be
|
|
275
|
+
* removed (comma-separated)
|
|
276
|
+
*/
|
|
263
277
|
/**
|
|
264
278
|
* @typedef RemoveCouponParam
|
|
265
279
|
* @property {string} [uid]
|
|
@@ -300,6 +314,10 @@ export = CartPlatformApplicationValidator;
|
|
|
300
314
|
* @property {string} id - ID allotted to the selected address
|
|
301
315
|
* @property {CartPlatformModel.PlatformAddress} body
|
|
302
316
|
*/
|
|
317
|
+
/**
|
|
318
|
+
* @typedef UpdateBulkPriceAdjustmentParam
|
|
319
|
+
* @property {CartPlatformModel.BulkPriceAdjustmentUpdateRequest} body
|
|
320
|
+
*/
|
|
303
321
|
/**
|
|
304
322
|
* @typedef UpdateCartParam
|
|
305
323
|
* @property {string} cartId - Current Cart _id
|
|
@@ -381,6 +399,8 @@ export = CartPlatformApplicationValidator;
|
|
|
381
399
|
declare class CartPlatformApplicationValidator {
|
|
382
400
|
/** @returns {AddAddressParam} */
|
|
383
401
|
static addAddress(): AddAddressParam;
|
|
402
|
+
/** @returns {AddBulkPriceAdjustmentParam} */
|
|
403
|
+
static addBulkPriceAdjustment(): AddBulkPriceAdjustmentParam;
|
|
384
404
|
/** @returns {AddItemsParam} */
|
|
385
405
|
static addItems(): AddItemsParam;
|
|
386
406
|
/** @returns {AddPriceAdjustmentParam} */
|
|
@@ -455,12 +475,16 @@ declare class CartPlatformApplicationValidator {
|
|
|
455
475
|
static overrideCart(): OverrideCartParam;
|
|
456
476
|
/** @returns {PlatformAddItemsParam} */
|
|
457
477
|
static platformAddItems(): PlatformAddItemsParam;
|
|
478
|
+
/** @returns {PlatformCheckoutCartParam} */
|
|
479
|
+
static platformCheckoutCart(): PlatformCheckoutCartParam;
|
|
458
480
|
/** @returns {PlatformCheckoutCartV2Param} */
|
|
459
481
|
static platformCheckoutCartV2(): PlatformCheckoutCartV2Param;
|
|
460
482
|
/** @returns {PlatformUpdateCartParam} */
|
|
461
483
|
static platformUpdateCart(): PlatformUpdateCartParam;
|
|
462
484
|
/** @returns {RemoveAddressParam} */
|
|
463
485
|
static removeAddress(): RemoveAddressParam;
|
|
486
|
+
/** @returns {RemoveBulkPriceAdjustmentParam} */
|
|
487
|
+
static removeBulkPriceAdjustment(): RemoveBulkPriceAdjustmentParam;
|
|
464
488
|
/** @returns {RemoveCouponParam} */
|
|
465
489
|
static removeCoupon(): RemoveCouponParam;
|
|
466
490
|
/** @returns {RemovePriceAdjustmentParam} */
|
|
@@ -473,6 +497,8 @@ declare class CartPlatformApplicationValidator {
|
|
|
473
497
|
static selectPaymentModeV2(): SelectPaymentModeV2Param;
|
|
474
498
|
/** @returns {UpdateAddressParam} */
|
|
475
499
|
static updateAddress(): UpdateAddressParam;
|
|
500
|
+
/** @returns {UpdateBulkPriceAdjustmentParam} */
|
|
501
|
+
static updateBulkPriceAdjustment(): UpdateBulkPriceAdjustmentParam;
|
|
476
502
|
/** @returns {UpdateCartParam} */
|
|
477
503
|
static updateCart(): UpdateCartParam;
|
|
478
504
|
/** @returns {UpdateCartMetaParam} */
|
|
@@ -499,11 +525,14 @@ declare class CartPlatformApplicationValidator {
|
|
|
499
525
|
static validateCouponForPayment(): ValidateCouponForPaymentParam;
|
|
500
526
|
}
|
|
501
527
|
declare namespace CartPlatformApplicationValidator {
|
|
502
|
-
export { AddAddressParam, AddItemsParam, AddPriceAdjustmentParam, ApplyCouponParam, CheckCartServiceabilityParam, CheckoutCartParam, CreateCartMetaConfigParam, CreateCouponParam, CreatePromotionParam, DeleteCartParam, FetchAndvalidateCartItemsParam, FetchCartMetaConfigParam, GetAbandonedCartParam, GetAbandonedCartDetailsParam, GetAddressByIdParam, GetAddressesParam, GetAppCouponsParam, GetAvailableDeliveryModesParam, GetCartParam, GetCartListParam, GetCartShareLinkParam, GetCartSharedItemsParam, GetCouponByIdParam, GetCouponCodeExistsParam, GetCouponOptionValuesParam, GetCouponsParam, GetItemCountParam, GetPriceAdjustmentsParam, GetPromosCouponConfigParam, GetPromotionByIdParam, GetPromotionCodeExistsParam, GetPromotionOffersParam, GetPromotionPaymentOffersParam, GetPromotionsParam, GetShipmentsParam, GetStoreAddressByUidParam, OverrideCartParam, PlatformAddItemsParam, PlatformCheckoutCartV2Param, PlatformUpdateCartParam, RemoveAddressParam, RemoveCouponParam, RemovePriceAdjustmentParam, SelectAddressParam, SelectPaymentModeParam, SelectPaymentModeV2Param, UpdateAddressParam, UpdateCartParam, UpdateCartMetaParam, UpdateCartMetaConfigParam, UpdateCartUserParam, UpdateCartWithSharedItemsParam, UpdateCouponParam, UpdateCouponPartiallyParam, UpdatePriceAdjustmentParam, UpdatePromotionParam, UpdatePromotionPartiallyParam, UpdateShipmentsParam, ValidateCouponForPaymentParam };
|
|
528
|
+
export { AddAddressParam, AddBulkPriceAdjustmentParam, AddItemsParam, AddPriceAdjustmentParam, ApplyCouponParam, CheckCartServiceabilityParam, CheckoutCartParam, CreateCartMetaConfigParam, CreateCouponParam, CreatePromotionParam, DeleteCartParam, FetchAndvalidateCartItemsParam, FetchCartMetaConfigParam, GetAbandonedCartParam, GetAbandonedCartDetailsParam, GetAddressByIdParam, GetAddressesParam, GetAppCouponsParam, GetAvailableDeliveryModesParam, GetCartParam, GetCartListParam, GetCartShareLinkParam, GetCartSharedItemsParam, GetCouponByIdParam, GetCouponCodeExistsParam, GetCouponOptionValuesParam, GetCouponsParam, GetItemCountParam, GetPriceAdjustmentsParam, GetPromosCouponConfigParam, GetPromotionByIdParam, GetPromotionCodeExistsParam, GetPromotionOffersParam, GetPromotionPaymentOffersParam, GetPromotionsParam, GetShipmentsParam, GetStoreAddressByUidParam, OverrideCartParam, PlatformAddItemsParam, PlatformCheckoutCartParam, PlatformCheckoutCartV2Param, PlatformUpdateCartParam, RemoveAddressParam, RemoveBulkPriceAdjustmentParam, RemoveCouponParam, RemovePriceAdjustmentParam, SelectAddressParam, SelectPaymentModeParam, SelectPaymentModeV2Param, UpdateAddressParam, UpdateBulkPriceAdjustmentParam, UpdateCartParam, UpdateCartMetaParam, UpdateCartMetaConfigParam, UpdateCartUserParam, UpdateCartWithSharedItemsParam, UpdateCouponParam, UpdateCouponPartiallyParam, UpdatePriceAdjustmentParam, UpdatePromotionParam, UpdatePromotionPartiallyParam, UpdateShipmentsParam, ValidateCouponForPaymentParam };
|
|
503
529
|
}
|
|
504
530
|
type AddAddressParam = {
|
|
505
531
|
body: CartPlatformModel.PlatformAddress;
|
|
506
532
|
};
|
|
533
|
+
type AddBulkPriceAdjustmentParam = {
|
|
534
|
+
body: CartPlatformModel.BulkPriceAdjustmentAddRequest;
|
|
535
|
+
};
|
|
507
536
|
type AddItemsParam = {
|
|
508
537
|
/**
|
|
509
538
|
* - Current Cart _id
|
|
@@ -799,6 +828,13 @@ type PlatformAddItemsParam = {
|
|
|
799
828
|
id?: string;
|
|
800
829
|
body: CartPlatformModel.PlatformAddCartRequest;
|
|
801
830
|
};
|
|
831
|
+
type PlatformCheckoutCartParam = {
|
|
832
|
+
/**
|
|
833
|
+
* - The unique identifier of the cart
|
|
834
|
+
*/
|
|
835
|
+
id?: string;
|
|
836
|
+
body: CartPlatformModel.PlatformCartCheckoutDetailRequest;
|
|
837
|
+
};
|
|
802
838
|
type PlatformCheckoutCartV2Param = {
|
|
803
839
|
/**
|
|
804
840
|
* - The unique identifier of the cart
|
|
@@ -844,6 +880,13 @@ type RemoveAddressParam = {
|
|
|
844
880
|
*/
|
|
845
881
|
userId?: string;
|
|
846
882
|
};
|
|
883
|
+
type RemoveBulkPriceAdjustmentParam = {
|
|
884
|
+
/**
|
|
885
|
+
* - List of Price Adjustment IDs to be
|
|
886
|
+
* removed (comma-separated)
|
|
887
|
+
*/
|
|
888
|
+
priceAdjustmentIds: string;
|
|
889
|
+
};
|
|
847
890
|
type RemoveCouponParam = {
|
|
848
891
|
uid?: string;
|
|
849
892
|
buyNow?: boolean;
|
|
@@ -887,6 +930,9 @@ type UpdateAddressParam = {
|
|
|
887
930
|
id: string;
|
|
888
931
|
body: CartPlatformModel.PlatformAddress;
|
|
889
932
|
};
|
|
933
|
+
type UpdateBulkPriceAdjustmentParam = {
|
|
934
|
+
body: CartPlatformModel.BulkPriceAdjustmentUpdateRequest;
|
|
935
|
+
};
|
|
890
936
|
type UpdateCartParam = {
|
|
891
937
|
/**
|
|
892
938
|
* - Current Cart _id
|
|
@@ -7,6 +7,11 @@ const CartPlatformModel = require("./CartPlatformModel");
|
|
|
7
7
|
* @property {CartPlatformModel.PlatformAddress} body
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* @typedef AddBulkPriceAdjustmentParam
|
|
12
|
+
* @property {CartPlatformModel.BulkPriceAdjustmentAddRequest} body
|
|
13
|
+
*/
|
|
14
|
+
|
|
10
15
|
/**
|
|
11
16
|
* @typedef AddItemsParam
|
|
12
17
|
* @property {string} cartId - Current Cart _id
|
|
@@ -277,6 +282,12 @@ const CartPlatformModel = require("./CartPlatformModel");
|
|
|
277
282
|
* @property {CartPlatformModel.PlatformAddCartRequest} body
|
|
278
283
|
*/
|
|
279
284
|
|
|
285
|
+
/**
|
|
286
|
+
* @typedef PlatformCheckoutCartParam
|
|
287
|
+
* @property {string} [id] - The unique identifier of the cart
|
|
288
|
+
* @property {CartPlatformModel.PlatformCartCheckoutDetailRequest} body
|
|
289
|
+
*/
|
|
290
|
+
|
|
280
291
|
/**
|
|
281
292
|
* @typedef PlatformCheckoutCartV2Param
|
|
282
293
|
* @property {string} [id] - The unique identifier of the cart
|
|
@@ -304,6 +315,12 @@ const CartPlatformModel = require("./CartPlatformModel");
|
|
|
304
315
|
* @property {string} [userId] - Option to delete address for the provided user_id.
|
|
305
316
|
*/
|
|
306
317
|
|
|
318
|
+
/**
|
|
319
|
+
* @typedef RemoveBulkPriceAdjustmentParam
|
|
320
|
+
* @property {string} priceAdjustmentIds - List of Price Adjustment IDs to be
|
|
321
|
+
* removed (comma-separated)
|
|
322
|
+
*/
|
|
323
|
+
|
|
307
324
|
/**
|
|
308
325
|
* @typedef RemoveCouponParam
|
|
309
326
|
* @property {string} [uid]
|
|
@@ -350,6 +367,11 @@ const CartPlatformModel = require("./CartPlatformModel");
|
|
|
350
367
|
* @property {CartPlatformModel.PlatformAddress} body
|
|
351
368
|
*/
|
|
352
369
|
|
|
370
|
+
/**
|
|
371
|
+
* @typedef UpdateBulkPriceAdjustmentParam
|
|
372
|
+
* @property {CartPlatformModel.BulkPriceAdjustmentUpdateRequest} body
|
|
373
|
+
*/
|
|
374
|
+
|
|
353
375
|
/**
|
|
354
376
|
* @typedef UpdateCartParam
|
|
355
377
|
* @property {string} cartId - Current Cart _id
|
|
@@ -448,6 +470,13 @@ class CartPlatformApplicationValidator {
|
|
|
448
470
|
}).required();
|
|
449
471
|
}
|
|
450
472
|
|
|
473
|
+
/** @returns {AddBulkPriceAdjustmentParam} */
|
|
474
|
+
static addBulkPriceAdjustment() {
|
|
475
|
+
return Joi.object({
|
|
476
|
+
body: CartPlatformModel.BulkPriceAdjustmentAddRequest().required(),
|
|
477
|
+
}).required();
|
|
478
|
+
}
|
|
479
|
+
|
|
451
480
|
/** @returns {AddItemsParam} */
|
|
452
481
|
static addItems() {
|
|
453
482
|
return Joi.object({
|
|
@@ -778,6 +807,14 @@ class CartPlatformApplicationValidator {
|
|
|
778
807
|
}).required();
|
|
779
808
|
}
|
|
780
809
|
|
|
810
|
+
/** @returns {PlatformCheckoutCartParam} */
|
|
811
|
+
static platformCheckoutCart() {
|
|
812
|
+
return Joi.object({
|
|
813
|
+
id: Joi.string().allow(""),
|
|
814
|
+
body: CartPlatformModel.PlatformCartCheckoutDetailRequest().required(),
|
|
815
|
+
}).required();
|
|
816
|
+
}
|
|
817
|
+
|
|
781
818
|
/** @returns {PlatformCheckoutCartV2Param} */
|
|
782
819
|
static platformCheckoutCartV2() {
|
|
783
820
|
return Joi.object({
|
|
@@ -806,6 +843,13 @@ class CartPlatformApplicationValidator {
|
|
|
806
843
|
}).required();
|
|
807
844
|
}
|
|
808
845
|
|
|
846
|
+
/** @returns {RemoveBulkPriceAdjustmentParam} */
|
|
847
|
+
static removeBulkPriceAdjustment() {
|
|
848
|
+
return Joi.object({
|
|
849
|
+
priceAdjustmentIds: Joi.string().allow("").required(),
|
|
850
|
+
}).required();
|
|
851
|
+
}
|
|
852
|
+
|
|
809
853
|
/** @returns {RemoveCouponParam} */
|
|
810
854
|
static removeCoupon() {
|
|
811
855
|
return Joi.object({
|
|
@@ -860,6 +904,13 @@ class CartPlatformApplicationValidator {
|
|
|
860
904
|
}).required();
|
|
861
905
|
}
|
|
862
906
|
|
|
907
|
+
/** @returns {UpdateBulkPriceAdjustmentParam} */
|
|
908
|
+
static updateBulkPriceAdjustment() {
|
|
909
|
+
return Joi.object({
|
|
910
|
+
body: CartPlatformModel.BulkPriceAdjustmentUpdateRequest().required(),
|
|
911
|
+
}).required();
|
|
912
|
+
}
|
|
913
|
+
|
|
863
914
|
/** @returns {UpdateCartParam} */
|
|
864
915
|
static updateCart() {
|
|
865
916
|
return Joi.object({
|