@gofynd/fdk-client-javascript 1.4.15-beta.10 → 1.4.15-beta.11
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/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 +39 -1
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +247 -1
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +33 -1
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +37 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +165 -1
- package/sdk/platform/Cart/CartPlatformModel.js +120 -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
package/README.md
CHANGED
|
@@ -237,7 +237,7 @@ console.log("Active Theme: ", response.information.name);
|
|
|
237
237
|
The above code will log the curl command in the console
|
|
238
238
|
|
|
239
239
|
```bash
|
|
240
|
-
curl --request GET "https://api.fynd.com/service/application/theme/v1.0/applied-theme" --header 'authorization: Bearer <authorization-token>' --header 'x-fp-sdk-version: 1.4.15-beta.
|
|
240
|
+
curl --request GET "https://api.fynd.com/service/application/theme/v1.0/applied-theme" --header 'authorization: Bearer <authorization-token>' --header 'x-fp-sdk-version: 1.4.15-beta.11' --header 'x-fp-date: 20230222T115108Z' --header 'x-fp-signature: v1.1:1e3ab3b02b5bc626e3c32a37ee844266ade02bbcbaafc28fc7a0e46a76a7a1a8'
|
|
241
241
|
Active Theme: Emerge
|
|
242
242
|
```
|
|
243
243
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gofynd/fdk-client-javascript",
|
|
3
|
-
"version": "1.4.15-beta.
|
|
3
|
+
"version": "1.4.15-beta.11",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"build": "webpack",
|
|
11
11
|
"prettier": "npx prettier -w ./sdk ./tests && npx tsc"
|
|
12
12
|
},
|
|
13
|
-
"author": "Jigar Dafda
|
|
13
|
+
"author": "Jigar Dafda",
|
|
14
14
|
"license": "ISC",
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"axios": "^1.6.4",
|
|
@@ -29,6 +29,7 @@ declare class Catalog {
|
|
|
29
29
|
getProductStockForTimeByIds: string;
|
|
30
30
|
getProductVariantsBySlug: string;
|
|
31
31
|
getProducts: string;
|
|
32
|
+
getProductsServiceability: string;
|
|
32
33
|
getSearchResults: string;
|
|
33
34
|
getSimilarComparisonProductBySlug: string;
|
|
34
35
|
getStores: string;
|
|
@@ -436,6 +437,15 @@ declare class Catalog {
|
|
|
436
437
|
sortOn?: string;
|
|
437
438
|
pageSize?: number;
|
|
438
439
|
}): Paginator<ProductListingResponse>;
|
|
440
|
+
/**
|
|
441
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
442
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
443
|
+
* @returns {Promise<ProductSizePriceServiceabilityResponse>} - Success response
|
|
444
|
+
* @name getProductsServiceability
|
|
445
|
+
* @summary: get size price for multiple products,For serviceability
|
|
446
|
+
* @description: Get size price for multiple products, For serviceability, with reduced size of response - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductsServiceability/).
|
|
447
|
+
*/
|
|
448
|
+
getProductsServiceability({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<ProductSizePriceServiceabilityResponse>;
|
|
439
449
|
/**
|
|
440
450
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
441
451
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -56,6 +56,8 @@ class Catalog {
|
|
|
56
56
|
getProductVariantsBySlug:
|
|
57
57
|
"/service/application/catalog/v1.0/products/{slug}/variants/",
|
|
58
58
|
getProducts: "/service/application/catalog/v1.0/products/",
|
|
59
|
+
getProductsServiceability:
|
|
60
|
+
"/service/application/catalog/v1.0/products/serviceability",
|
|
59
61
|
getSearchResults: "/service/application/catalog/v1.0/auto-complete/",
|
|
60
62
|
getSimilarComparisonProductBySlug:
|
|
61
63
|
"/service/application/catalog/v1.0/products/{slug}/similar/compare/",
|
|
@@ -1598,6 +1600,43 @@ class Catalog {
|
|
|
1598
1600
|
return paginator;
|
|
1599
1601
|
}
|
|
1600
1602
|
|
|
1603
|
+
/**
|
|
1604
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1605
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1606
|
+
* @returns {Promise<ProductSizePriceServiceabilityResponse>} - Success response
|
|
1607
|
+
* @name getProductsServiceability
|
|
1608
|
+
* @summary: get size price for multiple products,For serviceability
|
|
1609
|
+
* @description: Get size price for multiple products, For serviceability, with reduced size of response - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductsServiceability/).
|
|
1610
|
+
*/
|
|
1611
|
+
async getProductsServiceability(
|
|
1612
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1613
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1614
|
+
) {
|
|
1615
|
+
const query_params = {};
|
|
1616
|
+
|
|
1617
|
+
const xHeaders = {};
|
|
1618
|
+
|
|
1619
|
+
const response = await ApplicationAPIClient.execute(
|
|
1620
|
+
this._conf,
|
|
1621
|
+
"post",
|
|
1622
|
+
constructUrl({
|
|
1623
|
+
url: this._urls["getProductsServiceability"],
|
|
1624
|
+
params: {},
|
|
1625
|
+
}),
|
|
1626
|
+
query_params,
|
|
1627
|
+
body,
|
|
1628
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1629
|
+
{ responseHeaders }
|
|
1630
|
+
);
|
|
1631
|
+
|
|
1632
|
+
let responseData = response;
|
|
1633
|
+
if (responseHeaders) {
|
|
1634
|
+
responseData = response[0];
|
|
1635
|
+
}
|
|
1636
|
+
|
|
1637
|
+
return response;
|
|
1638
|
+
}
|
|
1639
|
+
|
|
1601
1640
|
/**
|
|
1602
1641
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1603
1642
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -43,15 +43,13 @@ declare class FileStorage {
|
|
|
43
43
|
* @param {string} namespace
|
|
44
44
|
* @param {number} size
|
|
45
45
|
* @param {number} tags
|
|
46
|
-
* @param {string} enc_key
|
|
47
46
|
*/
|
|
48
|
-
upload({ data, file_name, content_type, namespace, size, tags,
|
|
47
|
+
upload({ data, file_name, content_type, namespace, size, tags, }?: {
|
|
49
48
|
data: any;
|
|
50
49
|
file_name: any;
|
|
51
50
|
content_type: any;
|
|
52
51
|
namespace: any;
|
|
53
52
|
size: any;
|
|
54
53
|
tags: any;
|
|
55
|
-
enc_key: any;
|
|
56
54
|
}): Promise<any>;
|
|
57
55
|
}
|
|
@@ -173,7 +173,6 @@ class FileStorage {
|
|
|
173
173
|
* @param {string} namespace
|
|
174
174
|
* @param {number} size
|
|
175
175
|
* @param {number} tags
|
|
176
|
-
* @param {string} enc_key
|
|
177
176
|
*/
|
|
178
177
|
FileStorage.prototype.upload = function ({
|
|
179
178
|
data,
|
|
@@ -182,7 +181,6 @@ FileStorage.prototype.upload = function ({
|
|
|
182
181
|
namespace,
|
|
183
182
|
size,
|
|
184
183
|
tags,
|
|
185
|
-
enc_key,
|
|
186
184
|
} = {}) {
|
|
187
185
|
return new Promise(async (resolve, reject) => {
|
|
188
186
|
try {
|
|
@@ -193,7 +191,6 @@ FileStorage.prototype.upload = function ({
|
|
|
193
191
|
content_type,
|
|
194
192
|
size: size,
|
|
195
193
|
tags: tags,
|
|
196
|
-
enc_key: enc_key,
|
|
197
194
|
},
|
|
198
195
|
});
|
|
199
196
|
if (dataObj.upload && dataObj.upload.url) {
|
|
@@ -30,7 +30,6 @@ export = FileStoragePartnerModel;
|
|
|
30
30
|
* @property {number} size
|
|
31
31
|
* @property {string[]} [tags]
|
|
32
32
|
* @property {Object} [params]
|
|
33
|
-
* @property {string} [enc_key]
|
|
34
33
|
*/
|
|
35
34
|
/**
|
|
36
35
|
* @typedef CreatedBy
|
|
@@ -97,7 +96,6 @@ type StartRequest = {
|
|
|
97
96
|
size: number;
|
|
98
97
|
tags?: string[];
|
|
99
98
|
params?: any;
|
|
100
|
-
enc_key?: string;
|
|
101
99
|
};
|
|
102
100
|
/** @returns {CreatedBy} */
|
|
103
101
|
declare function CreatedBy(): CreatedBy;
|
|
@@ -34,7 +34,6 @@ const Joi = require("joi");
|
|
|
34
34
|
* @property {number} size
|
|
35
35
|
* @property {string[]} [tags]
|
|
36
36
|
* @property {Object} [params]
|
|
37
|
-
* @property {string} [enc_key]
|
|
38
37
|
*/
|
|
39
38
|
|
|
40
39
|
/**
|
|
@@ -107,7 +106,6 @@ class FileStoragePartnerModel {
|
|
|
107
106
|
size: Joi.number().required(),
|
|
108
107
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
109
108
|
params: Joi.object().pattern(/\S/, Joi.any()),
|
|
110
|
-
enc_key: Joi.string().allow(""),
|
|
111
109
|
});
|
|
112
110
|
}
|
|
113
111
|
|
|
@@ -13,6 +13,19 @@ declare class Cart {
|
|
|
13
13
|
* @description: Customers can add a new address to their cart to save details such as name, email, contact information, and address. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/addAddress/).
|
|
14
14
|
*/
|
|
15
15
|
addAddress({ body, requestHeaders }?: CartPlatformApplicationValidator.AddAddressParam, { responseHeaders }?: object): Promise<CartPlatformModel.SaveAddressResponse>;
|
|
16
|
+
/**
|
|
17
|
+
* @param {CartPlatformApplicationValidator.AddBulkPriceAdjustmentParam} arg
|
|
18
|
+
* - Arg object
|
|
19
|
+
*
|
|
20
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
21
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
22
|
+
* @returns {Promise<CartPlatformModel.BulkPriceAdjustmentResponse>} -
|
|
23
|
+
* Success response
|
|
24
|
+
* @name addBulkPriceAdjustment
|
|
25
|
+
* @summary: Create price adjustments in Bulk
|
|
26
|
+
* @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/).
|
|
27
|
+
*/
|
|
28
|
+
addBulkPriceAdjustment({ body, requestHeaders }?: CartPlatformApplicationValidator.AddBulkPriceAdjustmentParam, { responseHeaders }?: object): Promise<CartPlatformModel.BulkPriceAdjustmentResponse>;
|
|
16
29
|
/**
|
|
17
30
|
* @param {CartPlatformApplicationValidator.AddItemsParam} arg - Arg object
|
|
18
31
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -417,7 +430,7 @@ declare class Cart {
|
|
|
417
430
|
* @returns {Promise<CartPlatformModel.CartCheckoutResponse>} - Success response
|
|
418
431
|
* @name platformCheckoutCartV2
|
|
419
432
|
* @summary: Checkout cart
|
|
420
|
-
* @description: The checkout cart initiates the order creation process based on the items in the user
|
|
433
|
+
* @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/).
|
|
421
434
|
*/
|
|
422
435
|
platformCheckoutCartV2({ body, id, requestHeaders }?: CartPlatformApplicationValidator.PlatformCheckoutCartV2Param, { responseHeaders }?: object): Promise<CartPlatformModel.CartCheckoutResponse>;
|
|
423
436
|
/**
|
|
@@ -440,6 +453,18 @@ declare class Cart {
|
|
|
440
453
|
* @description: Remove an existing customer address from the system. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/removeAddress/).
|
|
441
454
|
*/
|
|
442
455
|
removeAddress({ id, userId, requestHeaders }?: CartPlatformApplicationValidator.RemoveAddressParam, { responseHeaders }?: object): Promise<CartPlatformModel.DeleteAddressResponse>;
|
|
456
|
+
/**
|
|
457
|
+
* @param {CartPlatformApplicationValidator.RemoveBulkPriceAdjustmentParam} arg
|
|
458
|
+
* - Arg object
|
|
459
|
+
*
|
|
460
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
461
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
462
|
+
* @returns {Promise<CartPlatformModel.SuccessMessage>} - Success response
|
|
463
|
+
* @name removeBulkPriceAdjustment
|
|
464
|
+
* @summary: Remove price adjustments in bulk.
|
|
465
|
+
* @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/).
|
|
466
|
+
*/
|
|
467
|
+
removeBulkPriceAdjustment({ priceAdjustmentIds, requestHeaders }?: CartPlatformApplicationValidator.RemoveBulkPriceAdjustmentParam, { responseHeaders }?: object): Promise<CartPlatformModel.SuccessMessage>;
|
|
443
468
|
/**
|
|
444
469
|
* @param {CartPlatformApplicationValidator.RemoveCouponParam} arg - Arg object
|
|
445
470
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -502,6 +527,19 @@ declare class Cart {
|
|
|
502
527
|
* @description: Update the user address - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updateAddress/).
|
|
503
528
|
*/
|
|
504
529
|
updateAddress({ id, body, requestHeaders }?: CartPlatformApplicationValidator.UpdateAddressParam, { responseHeaders }?: object): Promise<CartPlatformModel.UpdateAddressResponse>;
|
|
530
|
+
/**
|
|
531
|
+
* @param {CartPlatformApplicationValidator.UpdateBulkPriceAdjustmentParam} arg
|
|
532
|
+
* - Arg object
|
|
533
|
+
*
|
|
534
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
535
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
536
|
+
* @returns {Promise<CartPlatformModel.BulkPriceAdjustmentResponse>} -
|
|
537
|
+
* Success response
|
|
538
|
+
* @name updateBulkPriceAdjustment
|
|
539
|
+
* @summary: Update price adjustments
|
|
540
|
+
* @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/).
|
|
541
|
+
*/
|
|
542
|
+
updateBulkPriceAdjustment({ body, requestHeaders }?: CartPlatformApplicationValidator.UpdateBulkPriceAdjustmentParam, { responseHeaders }?: object): Promise<CartPlatformModel.BulkPriceAdjustmentResponse>;
|
|
505
543
|
/**
|
|
506
544
|
* @param {CartPlatformApplicationValidator.UpdateCartParam} arg - Arg object
|
|
507
545
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -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 `{}`
|
|
@@ -3311,7 +3393,7 @@ class Cart {
|
|
|
3311
3393
|
* @returns {Promise<CartPlatformModel.CartCheckoutResponse>} - Success response
|
|
3312
3394
|
* @name platformCheckoutCartV2
|
|
3313
3395
|
* @summary: Checkout cart
|
|
3314
|
-
* @description: The checkout cart initiates the order creation process based on the items in the user
|
|
3396
|
+
* @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
3397
|
*/
|
|
3316
3398
|
async platformCheckoutCartV2(
|
|
3317
3399
|
{ body, id, requestHeaders } = { requestHeaders: {} },
|
|
@@ -3562,6 +3644,88 @@ class Cart {
|
|
|
3562
3644
|
return response;
|
|
3563
3645
|
}
|
|
3564
3646
|
|
|
3647
|
+
/**
|
|
3648
|
+
* @param {CartPlatformApplicationValidator.RemoveBulkPriceAdjustmentParam} arg
|
|
3649
|
+
* - Arg object
|
|
3650
|
+
*
|
|
3651
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3652
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3653
|
+
* @returns {Promise<CartPlatformModel.SuccessMessage>} - Success response
|
|
3654
|
+
* @name removeBulkPriceAdjustment
|
|
3655
|
+
* @summary: Remove price adjustments in bulk.
|
|
3656
|
+
* @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/).
|
|
3657
|
+
*/
|
|
3658
|
+
async removeBulkPriceAdjustment(
|
|
3659
|
+
{ priceAdjustmentIds, requestHeaders } = { requestHeaders: {} },
|
|
3660
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
3661
|
+
) {
|
|
3662
|
+
const {
|
|
3663
|
+
error,
|
|
3664
|
+
} = CartPlatformApplicationValidator.removeBulkPriceAdjustment().validate(
|
|
3665
|
+
{
|
|
3666
|
+
priceAdjustmentIds,
|
|
3667
|
+
},
|
|
3668
|
+
{ abortEarly: false, allowUnknown: true }
|
|
3669
|
+
);
|
|
3670
|
+
if (error) {
|
|
3671
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
3672
|
+
}
|
|
3673
|
+
|
|
3674
|
+
// Showing warrnings if extra unknown parameters are found
|
|
3675
|
+
const {
|
|
3676
|
+
error: warrning,
|
|
3677
|
+
} = CartPlatformApplicationValidator.removeBulkPriceAdjustment().validate(
|
|
3678
|
+
{
|
|
3679
|
+
priceAdjustmentIds,
|
|
3680
|
+
},
|
|
3681
|
+
{ abortEarly: false, allowUnknown: false }
|
|
3682
|
+
);
|
|
3683
|
+
if (warrning) {
|
|
3684
|
+
Logger({
|
|
3685
|
+
level: "WARN",
|
|
3686
|
+
message: `Parameter Validation warrnings for platform > Cart > removeBulkPriceAdjustment \n ${warrning}`,
|
|
3687
|
+
});
|
|
3688
|
+
}
|
|
3689
|
+
|
|
3690
|
+
const query_params = {};
|
|
3691
|
+
query_params["price_adjustment_ids"] = priceAdjustmentIds;
|
|
3692
|
+
|
|
3693
|
+
const response = await PlatformAPIClient.execute(
|
|
3694
|
+
this.config,
|
|
3695
|
+
"delete",
|
|
3696
|
+
`/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/bulk-price-adjustment`,
|
|
3697
|
+
query_params,
|
|
3698
|
+
undefined,
|
|
3699
|
+
requestHeaders,
|
|
3700
|
+
{ responseHeaders }
|
|
3701
|
+
);
|
|
3702
|
+
|
|
3703
|
+
let responseData = response;
|
|
3704
|
+
if (responseHeaders) {
|
|
3705
|
+
responseData = response[0];
|
|
3706
|
+
}
|
|
3707
|
+
|
|
3708
|
+
const {
|
|
3709
|
+
error: res_error,
|
|
3710
|
+
} = CartPlatformModel.SuccessMessage().validate(responseData, {
|
|
3711
|
+
abortEarly: false,
|
|
3712
|
+
allowUnknown: true,
|
|
3713
|
+
});
|
|
3714
|
+
|
|
3715
|
+
if (res_error) {
|
|
3716
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
3717
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
3718
|
+
} else {
|
|
3719
|
+
Logger({
|
|
3720
|
+
level: "WARN",
|
|
3721
|
+
message: `Response Validation Warnings for platform > Cart > removeBulkPriceAdjustment \n ${res_error}`,
|
|
3722
|
+
});
|
|
3723
|
+
}
|
|
3724
|
+
}
|
|
3725
|
+
|
|
3726
|
+
return response;
|
|
3727
|
+
}
|
|
3728
|
+
|
|
3565
3729
|
/**
|
|
3566
3730
|
* @param {CartPlatformApplicationValidator.RemoveCouponParam} arg - Arg object
|
|
3567
3731
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -4068,6 +4232,88 @@ class Cart {
|
|
|
4068
4232
|
return response;
|
|
4069
4233
|
}
|
|
4070
4234
|
|
|
4235
|
+
/**
|
|
4236
|
+
* @param {CartPlatformApplicationValidator.UpdateBulkPriceAdjustmentParam} arg
|
|
4237
|
+
* - Arg object
|
|
4238
|
+
*
|
|
4239
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4240
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4241
|
+
* @returns {Promise<CartPlatformModel.BulkPriceAdjustmentResponse>} -
|
|
4242
|
+
* Success response
|
|
4243
|
+
* @name updateBulkPriceAdjustment
|
|
4244
|
+
* @summary: Update price adjustments
|
|
4245
|
+
* @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/).
|
|
4246
|
+
*/
|
|
4247
|
+
async updateBulkPriceAdjustment(
|
|
4248
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
4249
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
4250
|
+
) {
|
|
4251
|
+
const {
|
|
4252
|
+
error,
|
|
4253
|
+
} = CartPlatformApplicationValidator.updateBulkPriceAdjustment().validate(
|
|
4254
|
+
{
|
|
4255
|
+
body,
|
|
4256
|
+
},
|
|
4257
|
+
{ abortEarly: false, allowUnknown: true }
|
|
4258
|
+
);
|
|
4259
|
+
if (error) {
|
|
4260
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
4261
|
+
}
|
|
4262
|
+
|
|
4263
|
+
// Showing warrnings if extra unknown parameters are found
|
|
4264
|
+
const {
|
|
4265
|
+
error: warrning,
|
|
4266
|
+
} = CartPlatformApplicationValidator.updateBulkPriceAdjustment().validate(
|
|
4267
|
+
{
|
|
4268
|
+
body,
|
|
4269
|
+
},
|
|
4270
|
+
{ abortEarly: false, allowUnknown: false }
|
|
4271
|
+
);
|
|
4272
|
+
if (warrning) {
|
|
4273
|
+
Logger({
|
|
4274
|
+
level: "WARN",
|
|
4275
|
+
message: `Parameter Validation warrnings for platform > Cart > updateBulkPriceAdjustment \n ${warrning}`,
|
|
4276
|
+
});
|
|
4277
|
+
}
|
|
4278
|
+
|
|
4279
|
+
const query_params = {};
|
|
4280
|
+
|
|
4281
|
+
const response = await PlatformAPIClient.execute(
|
|
4282
|
+
this.config,
|
|
4283
|
+
"put",
|
|
4284
|
+
`/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/bulk-price-adjustment`,
|
|
4285
|
+
query_params,
|
|
4286
|
+
body,
|
|
4287
|
+
requestHeaders,
|
|
4288
|
+
{ responseHeaders }
|
|
4289
|
+
);
|
|
4290
|
+
|
|
4291
|
+
let responseData = response;
|
|
4292
|
+
if (responseHeaders) {
|
|
4293
|
+
responseData = response[0];
|
|
4294
|
+
}
|
|
4295
|
+
|
|
4296
|
+
const {
|
|
4297
|
+
error: res_error,
|
|
4298
|
+
} = CartPlatformModel.BulkPriceAdjustmentResponse().validate(responseData, {
|
|
4299
|
+
abortEarly: false,
|
|
4300
|
+
allowUnknown: true,
|
|
4301
|
+
});
|
|
4302
|
+
|
|
4303
|
+
if (res_error) {
|
|
4304
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
4305
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
4306
|
+
} else {
|
|
4307
|
+
Logger({
|
|
4308
|
+
level: "WARN",
|
|
4309
|
+
message: `Response Validation Warnings for platform > Cart > updateBulkPriceAdjustment \n ${res_error}`,
|
|
4310
|
+
});
|
|
4311
|
+
}
|
|
4312
|
+
}
|
|
4313
|
+
|
|
4314
|
+
return response;
|
|
4315
|
+
}
|
|
4316
|
+
|
|
4071
4317
|
/**
|
|
4072
4318
|
* @param {CartPlatformApplicationValidator.UpdateCartParam} arg - Arg object
|
|
4073
4319
|
* @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
|
|
@@ -260,6 +264,11 @@ export = CartPlatformApplicationValidator;
|
|
|
260
264
|
* @property {string} id - ID allotted to the selected address
|
|
261
265
|
* @property {string} [userId] - Option to delete address for the provided user_id.
|
|
262
266
|
*/
|
|
267
|
+
/**
|
|
268
|
+
* @typedef RemoveBulkPriceAdjustmentParam
|
|
269
|
+
* @property {string} priceAdjustmentIds - List of Price Adjustment IDs to be
|
|
270
|
+
* removed (comma-separated)
|
|
271
|
+
*/
|
|
263
272
|
/**
|
|
264
273
|
* @typedef RemoveCouponParam
|
|
265
274
|
* @property {string} [uid]
|
|
@@ -300,6 +309,10 @@ export = CartPlatformApplicationValidator;
|
|
|
300
309
|
* @property {string} id - ID allotted to the selected address
|
|
301
310
|
* @property {CartPlatformModel.PlatformAddress} body
|
|
302
311
|
*/
|
|
312
|
+
/**
|
|
313
|
+
* @typedef UpdateBulkPriceAdjustmentParam
|
|
314
|
+
* @property {CartPlatformModel.BulkPriceAdjustmentUpdateRequest} body
|
|
315
|
+
*/
|
|
303
316
|
/**
|
|
304
317
|
* @typedef UpdateCartParam
|
|
305
318
|
* @property {string} cartId - Current Cart _id
|
|
@@ -381,6 +394,8 @@ export = CartPlatformApplicationValidator;
|
|
|
381
394
|
declare class CartPlatformApplicationValidator {
|
|
382
395
|
/** @returns {AddAddressParam} */
|
|
383
396
|
static addAddress(): AddAddressParam;
|
|
397
|
+
/** @returns {AddBulkPriceAdjustmentParam} */
|
|
398
|
+
static addBulkPriceAdjustment(): AddBulkPriceAdjustmentParam;
|
|
384
399
|
/** @returns {AddItemsParam} */
|
|
385
400
|
static addItems(): AddItemsParam;
|
|
386
401
|
/** @returns {AddPriceAdjustmentParam} */
|
|
@@ -461,6 +476,8 @@ declare class CartPlatformApplicationValidator {
|
|
|
461
476
|
static platformUpdateCart(): PlatformUpdateCartParam;
|
|
462
477
|
/** @returns {RemoveAddressParam} */
|
|
463
478
|
static removeAddress(): RemoveAddressParam;
|
|
479
|
+
/** @returns {RemoveBulkPriceAdjustmentParam} */
|
|
480
|
+
static removeBulkPriceAdjustment(): RemoveBulkPriceAdjustmentParam;
|
|
464
481
|
/** @returns {RemoveCouponParam} */
|
|
465
482
|
static removeCoupon(): RemoveCouponParam;
|
|
466
483
|
/** @returns {RemovePriceAdjustmentParam} */
|
|
@@ -473,6 +490,8 @@ declare class CartPlatformApplicationValidator {
|
|
|
473
490
|
static selectPaymentModeV2(): SelectPaymentModeV2Param;
|
|
474
491
|
/** @returns {UpdateAddressParam} */
|
|
475
492
|
static updateAddress(): UpdateAddressParam;
|
|
493
|
+
/** @returns {UpdateBulkPriceAdjustmentParam} */
|
|
494
|
+
static updateBulkPriceAdjustment(): UpdateBulkPriceAdjustmentParam;
|
|
476
495
|
/** @returns {UpdateCartParam} */
|
|
477
496
|
static updateCart(): UpdateCartParam;
|
|
478
497
|
/** @returns {UpdateCartMetaParam} */
|
|
@@ -499,11 +518,14 @@ declare class CartPlatformApplicationValidator {
|
|
|
499
518
|
static validateCouponForPayment(): ValidateCouponForPaymentParam;
|
|
500
519
|
}
|
|
501
520
|
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 };
|
|
521
|
+
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, PlatformCheckoutCartV2Param, PlatformUpdateCartParam, RemoveAddressParam, RemoveBulkPriceAdjustmentParam, RemoveCouponParam, RemovePriceAdjustmentParam, SelectAddressParam, SelectPaymentModeParam, SelectPaymentModeV2Param, UpdateAddressParam, UpdateBulkPriceAdjustmentParam, UpdateCartParam, UpdateCartMetaParam, UpdateCartMetaConfigParam, UpdateCartUserParam, UpdateCartWithSharedItemsParam, UpdateCouponParam, UpdateCouponPartiallyParam, UpdatePriceAdjustmentParam, UpdatePromotionParam, UpdatePromotionPartiallyParam, UpdateShipmentsParam, ValidateCouponForPaymentParam };
|
|
503
522
|
}
|
|
504
523
|
type AddAddressParam = {
|
|
505
524
|
body: CartPlatformModel.PlatformAddress;
|
|
506
525
|
};
|
|
526
|
+
type AddBulkPriceAdjustmentParam = {
|
|
527
|
+
body: CartPlatformModel.BulkPriceAdjustmentAddRequest;
|
|
528
|
+
};
|
|
507
529
|
type AddItemsParam = {
|
|
508
530
|
/**
|
|
509
531
|
* - Current Cart _id
|
|
@@ -844,6 +866,13 @@ type RemoveAddressParam = {
|
|
|
844
866
|
*/
|
|
845
867
|
userId?: string;
|
|
846
868
|
};
|
|
869
|
+
type RemoveBulkPriceAdjustmentParam = {
|
|
870
|
+
/**
|
|
871
|
+
* - List of Price Adjustment IDs to be
|
|
872
|
+
* removed (comma-separated)
|
|
873
|
+
*/
|
|
874
|
+
priceAdjustmentIds: string;
|
|
875
|
+
};
|
|
847
876
|
type RemoveCouponParam = {
|
|
848
877
|
uid?: string;
|
|
849
878
|
buyNow?: boolean;
|
|
@@ -887,6 +916,9 @@ type UpdateAddressParam = {
|
|
|
887
916
|
id: string;
|
|
888
917
|
body: CartPlatformModel.PlatformAddress;
|
|
889
918
|
};
|
|
919
|
+
type UpdateBulkPriceAdjustmentParam = {
|
|
920
|
+
body: CartPlatformModel.BulkPriceAdjustmentUpdateRequest;
|
|
921
|
+
};
|
|
890
922
|
type UpdateCartParam = {
|
|
891
923
|
/**
|
|
892
924
|
* - 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
|
|
@@ -304,6 +309,12 @@ const CartPlatformModel = require("./CartPlatformModel");
|
|
|
304
309
|
* @property {string} [userId] - Option to delete address for the provided user_id.
|
|
305
310
|
*/
|
|
306
311
|
|
|
312
|
+
/**
|
|
313
|
+
* @typedef RemoveBulkPriceAdjustmentParam
|
|
314
|
+
* @property {string} priceAdjustmentIds - List of Price Adjustment IDs to be
|
|
315
|
+
* removed (comma-separated)
|
|
316
|
+
*/
|
|
317
|
+
|
|
307
318
|
/**
|
|
308
319
|
* @typedef RemoveCouponParam
|
|
309
320
|
* @property {string} [uid]
|
|
@@ -350,6 +361,11 @@ const CartPlatformModel = require("./CartPlatformModel");
|
|
|
350
361
|
* @property {CartPlatformModel.PlatformAddress} body
|
|
351
362
|
*/
|
|
352
363
|
|
|
364
|
+
/**
|
|
365
|
+
* @typedef UpdateBulkPriceAdjustmentParam
|
|
366
|
+
* @property {CartPlatformModel.BulkPriceAdjustmentUpdateRequest} body
|
|
367
|
+
*/
|
|
368
|
+
|
|
353
369
|
/**
|
|
354
370
|
* @typedef UpdateCartParam
|
|
355
371
|
* @property {string} cartId - Current Cart _id
|
|
@@ -448,6 +464,13 @@ class CartPlatformApplicationValidator {
|
|
|
448
464
|
}).required();
|
|
449
465
|
}
|
|
450
466
|
|
|
467
|
+
/** @returns {AddBulkPriceAdjustmentParam} */
|
|
468
|
+
static addBulkPriceAdjustment() {
|
|
469
|
+
return Joi.object({
|
|
470
|
+
body: CartPlatformModel.BulkPriceAdjustmentAddRequest().required(),
|
|
471
|
+
}).required();
|
|
472
|
+
}
|
|
473
|
+
|
|
451
474
|
/** @returns {AddItemsParam} */
|
|
452
475
|
static addItems() {
|
|
453
476
|
return Joi.object({
|
|
@@ -806,6 +829,13 @@ class CartPlatformApplicationValidator {
|
|
|
806
829
|
}).required();
|
|
807
830
|
}
|
|
808
831
|
|
|
832
|
+
/** @returns {RemoveBulkPriceAdjustmentParam} */
|
|
833
|
+
static removeBulkPriceAdjustment() {
|
|
834
|
+
return Joi.object({
|
|
835
|
+
priceAdjustmentIds: Joi.string().allow("").required(),
|
|
836
|
+
}).required();
|
|
837
|
+
}
|
|
838
|
+
|
|
809
839
|
/** @returns {RemoveCouponParam} */
|
|
810
840
|
static removeCoupon() {
|
|
811
841
|
return Joi.object({
|
|
@@ -860,6 +890,13 @@ class CartPlatformApplicationValidator {
|
|
|
860
890
|
}).required();
|
|
861
891
|
}
|
|
862
892
|
|
|
893
|
+
/** @returns {UpdateBulkPriceAdjustmentParam} */
|
|
894
|
+
static updateBulkPriceAdjustment() {
|
|
895
|
+
return Joi.object({
|
|
896
|
+
body: CartPlatformModel.BulkPriceAdjustmentUpdateRequest().required(),
|
|
897
|
+
}).required();
|
|
898
|
+
}
|
|
899
|
+
|
|
863
900
|
/** @returns {UpdateCartParam} */
|
|
864
901
|
static updateCart() {
|
|
865
902
|
return Joi.object({
|
|
@@ -538,6 +538,24 @@ export = CartPlatformModel;
|
|
|
538
538
|
* @property {Object} [meta]
|
|
539
539
|
* @property {string} cart_id - The ID of the cart
|
|
540
540
|
*/
|
|
541
|
+
/**
|
|
542
|
+
* @typedef BulkPriceAdjustmentUpdate
|
|
543
|
+
* @property {string} [modified_by] - The entity that modified the field
|
|
544
|
+
* @property {number} value
|
|
545
|
+
* @property {string} message - The message associated with the price adjustment
|
|
546
|
+
* @property {string} [apply_expiry] - The date and time when the expiry should be applied
|
|
547
|
+
* @property {PriceAdjustmentRestrictions} [restrictions] - Restrictions applied
|
|
548
|
+
* to this particular item or product, including whether or not cancellation
|
|
549
|
+
* and return are allowed.
|
|
550
|
+
* @property {boolean} article_level_distribution - Flag indicating whether the
|
|
551
|
+
* distribution should is done at the article level
|
|
552
|
+
* @property {Collection} collection
|
|
553
|
+
* @property {string} type - Type of price adjusment
|
|
554
|
+
* @property {boolean} [allowed_refund] - Flag indicating whether refunds are
|
|
555
|
+
* allowed (default: False)
|
|
556
|
+
* @property {Article[]} article_ids - The list of article object in the price adjustment
|
|
557
|
+
* @property {Object} [meta]
|
|
558
|
+
*/
|
|
541
559
|
/**
|
|
542
560
|
* @typedef PriceAdjustment
|
|
543
561
|
* @property {number} value
|
|
@@ -592,6 +610,24 @@ export = CartPlatformModel;
|
|
|
592
610
|
* @property {boolean} [auto_remove] - This field if set true will remove mop
|
|
593
611
|
* type price adjustment.
|
|
594
612
|
*/
|
|
613
|
+
/**
|
|
614
|
+
* @typedef BulkPriceAdjustmentAdd
|
|
615
|
+
* @property {number} value
|
|
616
|
+
* @property {string} message - The message associated with the price adjustment
|
|
617
|
+
* @property {string} [apply_expiry] - The date and time when the expiry should be applied
|
|
618
|
+
* @property {PriceAdjustmentRestrictions} [restrictions] - This field accepts
|
|
619
|
+
* the restrictions applied to this particular item or service, including
|
|
620
|
+
* whether or not cancellation and return are allowed, etc
|
|
621
|
+
* @property {string} [created_by] - The entity that created the field
|
|
622
|
+
* @property {boolean} article_level_distribution - Flag indicating whether the
|
|
623
|
+
* distribution should is done at the article level
|
|
624
|
+
* @property {Collection} collection
|
|
625
|
+
* @property {string} type - Type of price adjusment
|
|
626
|
+
* @property {boolean} [allowed_refund] - Flag indicating whether refunds are
|
|
627
|
+
* allowed (default: False)
|
|
628
|
+
* @property {Article[]} article_ids - The list of article object in the price adjustment
|
|
629
|
+
* @property {Object} [meta]
|
|
630
|
+
*/
|
|
595
631
|
/**
|
|
596
632
|
* @typedef CartItem
|
|
597
633
|
* @property {number} [quantity]
|
|
@@ -1348,6 +1384,7 @@ export = CartPlatformModel;
|
|
|
1348
1384
|
/**
|
|
1349
1385
|
* @typedef CartItemCountResponse
|
|
1350
1386
|
* @property {number} [user_cart_items_count] - Item count present in cart
|
|
1387
|
+
* @property {number} [user_cart_article_count] - Article count present in cart.
|
|
1351
1388
|
*/
|
|
1352
1389
|
/**
|
|
1353
1390
|
* @typedef Coupon
|
|
@@ -1758,10 +1795,27 @@ export = CartPlatformModel;
|
|
|
1758
1795
|
* @property {boolean} [success]
|
|
1759
1796
|
* @property {PromotionPaymentOffer[]} [promotions]
|
|
1760
1797
|
*/
|
|
1798
|
+
/**
|
|
1799
|
+
* @typedef BulkPriceAdjustmentUpdateRequest
|
|
1800
|
+
* @property {string} [cart_id]
|
|
1801
|
+
* @property {boolean} [is_authenticated]
|
|
1802
|
+
* @property {BulkPriceAdjustmentUpdate[]} [items]
|
|
1803
|
+
*/
|
|
1804
|
+
/**
|
|
1805
|
+
* @typedef BulkPriceAdjustmentResponse
|
|
1806
|
+
* @property {boolean} [success]
|
|
1807
|
+
* @property {PriceAdjustmentResponse[]} [data]
|
|
1808
|
+
*/
|
|
1809
|
+
/**
|
|
1810
|
+
* @typedef BulkPriceAdjustmentAddRequest
|
|
1811
|
+
* @property {string} [cart_id]
|
|
1812
|
+
* @property {boolean} [is_authenticated]
|
|
1813
|
+
* @property {BulkPriceAdjustmentAdd[]} [items]
|
|
1814
|
+
*/
|
|
1761
1815
|
declare class CartPlatformModel {
|
|
1762
1816
|
}
|
|
1763
1817
|
declare namespace CartPlatformModel {
|
|
1764
|
-
export { CouponDateMeta, Ownership, CouponAuthor, State, PaymentAllowValue, PaymentModes, PriceRange, PostOrder, BulkBundleRestriction, UsesRemaining, UsesRestriction, Restrictions, Validation, CouponAction, CouponSchedule, Rule, DisplayMetaDict, DisplayMeta, Identifier, Validity, RuleDefinition, CouponAdd, Page, CouponsResponse, SuccessMessage, OperationErrorResponse, CouponUpdate, CouponPartialUpdate, DisplayMeta1, Ownership1, CompareObject, ItemCriteria, DiscountOffer, DiscountRule, PaymentAllowValue1, PromotionPaymentModes, UserRegistered, PostOrder1, UsesRemaining1, UsesRestriction1, Restrictions1, PromotionSchedule, PromotionAction, PromotionAuthor, Visibility, PromotionDateMeta, PromotionListItem, PromotionsResponse, PromotionAdd, PromotionUpdate, PromotionPartialUpdate, ActivePromosResponse, Charges, DeliveryCharges, CartMetaConfigUpdate, CartMetaConfigAdd, Article, PriceAdjustmentRestrictions, Collection, PriceAdjustmentUpdate, PriceAdjustment, PriceAdjustmentResponse, GetPriceAdjustmentResponse, PriceAdjustmentAdd, CartItem, OpenapiCartDetailsRequest, CouponBreakup, DisplayBreakup, LoyaltyPoints, RawBreakup, CartBreakup, ProductImage, Tags, BaseInfo, ActionQuery, ProductAction, CategoryInfo, CartProduct, BasePrice, ArticlePriceInfo, StoreInfo, ProductArticle, Ownership2, DiscountRulesApp, AppliedFreeArticles, BuyRules, AppliedPromotion, PromiseFormatted, PromiseISOFormat, PromiseTimestamp, ShipmentPromise, CouponDetails, ProductPrice, ProductPriceInfo, CartProductIdentifer, ProductAvailabilitySize, ProductAvailability, PromoMeta, CartProductInfo, OpenapiCartDetailsResponse, OpenApiErrorResponse, ShippingAddress, OpenApiCartServiceabilityRequest, OpenApiCartServiceabilityResponse, OpenApiFiles, CartItemMeta, MultiTenderPaymentMeta, MultiTenderPaymentMethod, OpenApiOrderItem, OpenApiPlatformCheckoutReq, OpenApiCheckoutResponse, AbandonedCart, AbandonedCartResponse, PaymentSelectionLock, CartCurrency, CartDetailCoupon, ChargesThreshold, DeliveryChargesConfig, CartCommonConfig, CartDetailResponse, AddProductCart, AddCartRequest, AddCartDetailResponse, UpdateProductCart, UpdateCartRequest, UpdateCartDetailResponse, OverrideCartItemPromo, OverrideCartItem, OverrideCheckoutReq, OverrideCheckoutResponse, GetShareCartLinkRequest, GetShareCartLinkResponse, SharedCartDetails, SharedCart, SharedCartResponse, CartList, MultiCartResponse, UpdateUserCartMapping, UserInfo, UserCartMappingResponse, PlatformAddCartRequest, PlatformUpdateCartRequest, DeleteCartRequest, DeleteCartDetailResponse, CartItemCountResponse, Coupon, PageCoupon, GetCouponResponse, ApplyCouponRequest, GeoLocation, PlatformAddress, PlatformGetAddressesResponse, SaveAddressResponse, UpdateAddressResponse, DeleteAddressResponse, PlatformSelectCartAddressRequest, ShipmentArticle, PlatformShipmentResponse, PlatformCartShipmentsResponse, UpdateCartShipmentItem, UpdateCartShipmentRequest, PlatformCartMetaRequest, CartMetaResponse, CartMetaMissingResponse, StaffCheckout, CustomerDetails, Files, CheckCart, CartCheckoutResponse, CartDeliveryModesResponse, PickupStoreDetail, StoreDetailsResponse, UpdateCartPaymentRequest, CouponValidity, PaymentCouponValidate, PaymentMeta, PaymentMethod, PlatformCartCheckoutDetailV2Request, UpdateCartPaymentRequestV2, PriceMinMax, ItemPriceDetails, FreeGiftItems, PromotionOffer, PromotionOffersResponse, PromotionPaymentOffer, PromotionPaymentOffersResponse };
|
|
1818
|
+
export { CouponDateMeta, Ownership, CouponAuthor, State, PaymentAllowValue, PaymentModes, PriceRange, PostOrder, BulkBundleRestriction, UsesRemaining, UsesRestriction, Restrictions, Validation, CouponAction, CouponSchedule, Rule, DisplayMetaDict, DisplayMeta, Identifier, Validity, RuleDefinition, CouponAdd, Page, CouponsResponse, SuccessMessage, OperationErrorResponse, CouponUpdate, CouponPartialUpdate, DisplayMeta1, Ownership1, CompareObject, ItemCriteria, DiscountOffer, DiscountRule, PaymentAllowValue1, PromotionPaymentModes, UserRegistered, PostOrder1, UsesRemaining1, UsesRestriction1, Restrictions1, PromotionSchedule, PromotionAction, PromotionAuthor, Visibility, PromotionDateMeta, PromotionListItem, PromotionsResponse, PromotionAdd, PromotionUpdate, PromotionPartialUpdate, ActivePromosResponse, Charges, DeliveryCharges, CartMetaConfigUpdate, CartMetaConfigAdd, Article, PriceAdjustmentRestrictions, Collection, PriceAdjustmentUpdate, BulkPriceAdjustmentUpdate, PriceAdjustment, PriceAdjustmentResponse, GetPriceAdjustmentResponse, PriceAdjustmentAdd, BulkPriceAdjustmentAdd, CartItem, OpenapiCartDetailsRequest, CouponBreakup, DisplayBreakup, LoyaltyPoints, RawBreakup, CartBreakup, ProductImage, Tags, BaseInfo, ActionQuery, ProductAction, CategoryInfo, CartProduct, BasePrice, ArticlePriceInfo, StoreInfo, ProductArticle, Ownership2, DiscountRulesApp, AppliedFreeArticles, BuyRules, AppliedPromotion, PromiseFormatted, PromiseISOFormat, PromiseTimestamp, ShipmentPromise, CouponDetails, ProductPrice, ProductPriceInfo, CartProductIdentifer, ProductAvailabilitySize, ProductAvailability, PromoMeta, CartProductInfo, OpenapiCartDetailsResponse, OpenApiErrorResponse, ShippingAddress, OpenApiCartServiceabilityRequest, OpenApiCartServiceabilityResponse, OpenApiFiles, CartItemMeta, MultiTenderPaymentMeta, MultiTenderPaymentMethod, OpenApiOrderItem, OpenApiPlatformCheckoutReq, OpenApiCheckoutResponse, AbandonedCart, AbandonedCartResponse, PaymentSelectionLock, CartCurrency, CartDetailCoupon, ChargesThreshold, DeliveryChargesConfig, CartCommonConfig, CartDetailResponse, AddProductCart, AddCartRequest, AddCartDetailResponse, UpdateProductCart, UpdateCartRequest, UpdateCartDetailResponse, OverrideCartItemPromo, OverrideCartItem, OverrideCheckoutReq, OverrideCheckoutResponse, GetShareCartLinkRequest, GetShareCartLinkResponse, SharedCartDetails, SharedCart, SharedCartResponse, CartList, MultiCartResponse, UpdateUserCartMapping, UserInfo, UserCartMappingResponse, PlatformAddCartRequest, PlatformUpdateCartRequest, DeleteCartRequest, DeleteCartDetailResponse, CartItemCountResponse, Coupon, PageCoupon, GetCouponResponse, ApplyCouponRequest, GeoLocation, PlatformAddress, PlatformGetAddressesResponse, SaveAddressResponse, UpdateAddressResponse, DeleteAddressResponse, PlatformSelectCartAddressRequest, ShipmentArticle, PlatformShipmentResponse, PlatformCartShipmentsResponse, UpdateCartShipmentItem, UpdateCartShipmentRequest, PlatformCartMetaRequest, CartMetaResponse, CartMetaMissingResponse, StaffCheckout, CustomerDetails, Files, CheckCart, CartCheckoutResponse, CartDeliveryModesResponse, PickupStoreDetail, StoreDetailsResponse, UpdateCartPaymentRequest, CouponValidity, PaymentCouponValidate, PaymentMeta, PaymentMethod, PlatformCartCheckoutDetailV2Request, UpdateCartPaymentRequestV2, PriceMinMax, ItemPriceDetails, FreeGiftItems, PromotionOffer, PromotionOffersResponse, PromotionPaymentOffer, PromotionPaymentOffersResponse, BulkPriceAdjustmentUpdateRequest, BulkPriceAdjustmentResponse, BulkPriceAdjustmentAddRequest };
|
|
1765
1819
|
}
|
|
1766
1820
|
/** @returns {CouponDateMeta} */
|
|
1767
1821
|
declare function CouponDateMeta(): CouponDateMeta;
|
|
@@ -2524,6 +2578,49 @@ type PriceAdjustmentUpdate = {
|
|
|
2524
2578
|
*/
|
|
2525
2579
|
cart_id: string;
|
|
2526
2580
|
};
|
|
2581
|
+
/** @returns {BulkPriceAdjustmentUpdate} */
|
|
2582
|
+
declare function BulkPriceAdjustmentUpdate(): BulkPriceAdjustmentUpdate;
|
|
2583
|
+
type BulkPriceAdjustmentUpdate = {
|
|
2584
|
+
/**
|
|
2585
|
+
* - The entity that modified the field
|
|
2586
|
+
*/
|
|
2587
|
+
modified_by?: string;
|
|
2588
|
+
value: number;
|
|
2589
|
+
/**
|
|
2590
|
+
* - The message associated with the price adjustment
|
|
2591
|
+
*/
|
|
2592
|
+
message: string;
|
|
2593
|
+
/**
|
|
2594
|
+
* - The date and time when the expiry should be applied
|
|
2595
|
+
*/
|
|
2596
|
+
apply_expiry?: string;
|
|
2597
|
+
/**
|
|
2598
|
+
* - Restrictions applied
|
|
2599
|
+
* to this particular item or product, including whether or not cancellation
|
|
2600
|
+
* and return are allowed.
|
|
2601
|
+
*/
|
|
2602
|
+
restrictions?: PriceAdjustmentRestrictions;
|
|
2603
|
+
/**
|
|
2604
|
+
* - Flag indicating whether the
|
|
2605
|
+
* distribution should is done at the article level
|
|
2606
|
+
*/
|
|
2607
|
+
article_level_distribution: boolean;
|
|
2608
|
+
collection: Collection;
|
|
2609
|
+
/**
|
|
2610
|
+
* - Type of price adjusment
|
|
2611
|
+
*/
|
|
2612
|
+
type: string;
|
|
2613
|
+
/**
|
|
2614
|
+
* - Flag indicating whether refunds are
|
|
2615
|
+
* allowed (default: False)
|
|
2616
|
+
*/
|
|
2617
|
+
allowed_refund?: boolean;
|
|
2618
|
+
/**
|
|
2619
|
+
* - The list of article object in the price adjustment
|
|
2620
|
+
*/
|
|
2621
|
+
article_ids: Article[];
|
|
2622
|
+
meta?: any;
|
|
2623
|
+
};
|
|
2527
2624
|
/** @returns {PriceAdjustment} */
|
|
2528
2625
|
declare function PriceAdjustment(): PriceAdjustment;
|
|
2529
2626
|
type PriceAdjustment = {
|
|
@@ -2645,6 +2742,49 @@ type PriceAdjustmentAdd = {
|
|
|
2645
2742
|
*/
|
|
2646
2743
|
auto_remove?: boolean;
|
|
2647
2744
|
};
|
|
2745
|
+
/** @returns {BulkPriceAdjustmentAdd} */
|
|
2746
|
+
declare function BulkPriceAdjustmentAdd(): BulkPriceAdjustmentAdd;
|
|
2747
|
+
type BulkPriceAdjustmentAdd = {
|
|
2748
|
+
value: number;
|
|
2749
|
+
/**
|
|
2750
|
+
* - The message associated with the price adjustment
|
|
2751
|
+
*/
|
|
2752
|
+
message: string;
|
|
2753
|
+
/**
|
|
2754
|
+
* - The date and time when the expiry should be applied
|
|
2755
|
+
*/
|
|
2756
|
+
apply_expiry?: string;
|
|
2757
|
+
/**
|
|
2758
|
+
* - This field accepts
|
|
2759
|
+
* the restrictions applied to this particular item or service, including
|
|
2760
|
+
* whether or not cancellation and return are allowed, etc
|
|
2761
|
+
*/
|
|
2762
|
+
restrictions?: PriceAdjustmentRestrictions;
|
|
2763
|
+
/**
|
|
2764
|
+
* - The entity that created the field
|
|
2765
|
+
*/
|
|
2766
|
+
created_by?: string;
|
|
2767
|
+
/**
|
|
2768
|
+
* - Flag indicating whether the
|
|
2769
|
+
* distribution should is done at the article level
|
|
2770
|
+
*/
|
|
2771
|
+
article_level_distribution: boolean;
|
|
2772
|
+
collection: Collection;
|
|
2773
|
+
/**
|
|
2774
|
+
* - Type of price adjusment
|
|
2775
|
+
*/
|
|
2776
|
+
type: string;
|
|
2777
|
+
/**
|
|
2778
|
+
* - Flag indicating whether refunds are
|
|
2779
|
+
* allowed (default: False)
|
|
2780
|
+
*/
|
|
2781
|
+
allowed_refund?: boolean;
|
|
2782
|
+
/**
|
|
2783
|
+
* - The list of article object in the price adjustment
|
|
2784
|
+
*/
|
|
2785
|
+
article_ids: Article[];
|
|
2786
|
+
meta?: any;
|
|
2787
|
+
};
|
|
2648
2788
|
/** @returns {CartItem} */
|
|
2649
2789
|
declare function CartItem(): CartItem;
|
|
2650
2790
|
type CartItem = {
|
|
@@ -3650,6 +3790,10 @@ type CartItemCountResponse = {
|
|
|
3650
3790
|
* - Item count present in cart
|
|
3651
3791
|
*/
|
|
3652
3792
|
user_cart_items_count?: number;
|
|
3793
|
+
/**
|
|
3794
|
+
* - Article count present in cart.
|
|
3795
|
+
*/
|
|
3796
|
+
user_cart_article_count?: number;
|
|
3653
3797
|
};
|
|
3654
3798
|
/** @returns {Coupon} */
|
|
3655
3799
|
declare function Coupon(): Coupon;
|
|
@@ -4209,3 +4353,23 @@ type PromotionPaymentOffersResponse = {
|
|
|
4209
4353
|
success?: boolean;
|
|
4210
4354
|
promotions?: PromotionPaymentOffer[];
|
|
4211
4355
|
};
|
|
4356
|
+
/** @returns {BulkPriceAdjustmentUpdateRequest} */
|
|
4357
|
+
declare function BulkPriceAdjustmentUpdateRequest(): BulkPriceAdjustmentUpdateRequest;
|
|
4358
|
+
type BulkPriceAdjustmentUpdateRequest = {
|
|
4359
|
+
cart_id?: string;
|
|
4360
|
+
is_authenticated?: boolean;
|
|
4361
|
+
items?: BulkPriceAdjustmentUpdate[];
|
|
4362
|
+
};
|
|
4363
|
+
/** @returns {BulkPriceAdjustmentResponse} */
|
|
4364
|
+
declare function BulkPriceAdjustmentResponse(): BulkPriceAdjustmentResponse;
|
|
4365
|
+
type BulkPriceAdjustmentResponse = {
|
|
4366
|
+
success?: boolean;
|
|
4367
|
+
data?: PriceAdjustmentResponse[];
|
|
4368
|
+
};
|
|
4369
|
+
/** @returns {BulkPriceAdjustmentAddRequest} */
|
|
4370
|
+
declare function BulkPriceAdjustmentAddRequest(): BulkPriceAdjustmentAddRequest;
|
|
4371
|
+
type BulkPriceAdjustmentAddRequest = {
|
|
4372
|
+
cart_id?: string;
|
|
4373
|
+
is_authenticated?: boolean;
|
|
4374
|
+
items?: BulkPriceAdjustmentAdd[];
|
|
4375
|
+
};
|
|
@@ -599,6 +599,25 @@ const Joi = require("joi");
|
|
|
599
599
|
* @property {string} cart_id - The ID of the cart
|
|
600
600
|
*/
|
|
601
601
|
|
|
602
|
+
/**
|
|
603
|
+
* @typedef BulkPriceAdjustmentUpdate
|
|
604
|
+
* @property {string} [modified_by] - The entity that modified the field
|
|
605
|
+
* @property {number} value
|
|
606
|
+
* @property {string} message - The message associated with the price adjustment
|
|
607
|
+
* @property {string} [apply_expiry] - The date and time when the expiry should be applied
|
|
608
|
+
* @property {PriceAdjustmentRestrictions} [restrictions] - Restrictions applied
|
|
609
|
+
* to this particular item or product, including whether or not cancellation
|
|
610
|
+
* and return are allowed.
|
|
611
|
+
* @property {boolean} article_level_distribution - Flag indicating whether the
|
|
612
|
+
* distribution should is done at the article level
|
|
613
|
+
* @property {Collection} collection
|
|
614
|
+
* @property {string} type - Type of price adjusment
|
|
615
|
+
* @property {boolean} [allowed_refund] - Flag indicating whether refunds are
|
|
616
|
+
* allowed (default: False)
|
|
617
|
+
* @property {Article[]} article_ids - The list of article object in the price adjustment
|
|
618
|
+
* @property {Object} [meta]
|
|
619
|
+
*/
|
|
620
|
+
|
|
602
621
|
/**
|
|
603
622
|
* @typedef PriceAdjustment
|
|
604
623
|
* @property {number} value
|
|
@@ -657,6 +676,25 @@ const Joi = require("joi");
|
|
|
657
676
|
* type price adjustment.
|
|
658
677
|
*/
|
|
659
678
|
|
|
679
|
+
/**
|
|
680
|
+
* @typedef BulkPriceAdjustmentAdd
|
|
681
|
+
* @property {number} value
|
|
682
|
+
* @property {string} message - The message associated with the price adjustment
|
|
683
|
+
* @property {string} [apply_expiry] - The date and time when the expiry should be applied
|
|
684
|
+
* @property {PriceAdjustmentRestrictions} [restrictions] - This field accepts
|
|
685
|
+
* the restrictions applied to this particular item or service, including
|
|
686
|
+
* whether or not cancellation and return are allowed, etc
|
|
687
|
+
* @property {string} [created_by] - The entity that created the field
|
|
688
|
+
* @property {boolean} article_level_distribution - Flag indicating whether the
|
|
689
|
+
* distribution should is done at the article level
|
|
690
|
+
* @property {Collection} collection
|
|
691
|
+
* @property {string} type - Type of price adjusment
|
|
692
|
+
* @property {boolean} [allowed_refund] - Flag indicating whether refunds are
|
|
693
|
+
* allowed (default: False)
|
|
694
|
+
* @property {Article[]} article_ids - The list of article object in the price adjustment
|
|
695
|
+
* @property {Object} [meta]
|
|
696
|
+
*/
|
|
697
|
+
|
|
660
698
|
/**
|
|
661
699
|
* @typedef CartItem
|
|
662
700
|
* @property {number} [quantity]
|
|
@@ -1493,6 +1531,7 @@ const Joi = require("joi");
|
|
|
1493
1531
|
/**
|
|
1494
1532
|
* @typedef CartItemCountResponse
|
|
1495
1533
|
* @property {number} [user_cart_items_count] - Item count present in cart
|
|
1534
|
+
* @property {number} [user_cart_article_count] - Article count present in cart.
|
|
1496
1535
|
*/
|
|
1497
1536
|
|
|
1498
1537
|
/**
|
|
@@ -1945,6 +1984,26 @@ const Joi = require("joi");
|
|
|
1945
1984
|
* @property {PromotionPaymentOffer[]} [promotions]
|
|
1946
1985
|
*/
|
|
1947
1986
|
|
|
1987
|
+
/**
|
|
1988
|
+
* @typedef BulkPriceAdjustmentUpdateRequest
|
|
1989
|
+
* @property {string} [cart_id]
|
|
1990
|
+
* @property {boolean} [is_authenticated]
|
|
1991
|
+
* @property {BulkPriceAdjustmentUpdate[]} [items]
|
|
1992
|
+
*/
|
|
1993
|
+
|
|
1994
|
+
/**
|
|
1995
|
+
* @typedef BulkPriceAdjustmentResponse
|
|
1996
|
+
* @property {boolean} [success]
|
|
1997
|
+
* @property {PriceAdjustmentResponse[]} [data]
|
|
1998
|
+
*/
|
|
1999
|
+
|
|
2000
|
+
/**
|
|
2001
|
+
* @typedef BulkPriceAdjustmentAddRequest
|
|
2002
|
+
* @property {string} [cart_id]
|
|
2003
|
+
* @property {boolean} [is_authenticated]
|
|
2004
|
+
* @property {BulkPriceAdjustmentAdd[]} [items]
|
|
2005
|
+
*/
|
|
2006
|
+
|
|
1948
2007
|
class CartPlatformModel {
|
|
1949
2008
|
/** @returns {CouponDateMeta} */
|
|
1950
2009
|
static CouponDateMeta() {
|
|
@@ -2661,6 +2720,23 @@ class CartPlatformModel {
|
|
|
2661
2720
|
});
|
|
2662
2721
|
}
|
|
2663
2722
|
|
|
2723
|
+
/** @returns {BulkPriceAdjustmentUpdate} */
|
|
2724
|
+
static BulkPriceAdjustmentUpdate() {
|
|
2725
|
+
return Joi.object({
|
|
2726
|
+
modified_by: Joi.string().allow(""),
|
|
2727
|
+
value: Joi.number().required(),
|
|
2728
|
+
message: Joi.string().allow("").required(),
|
|
2729
|
+
apply_expiry: Joi.string().allow(""),
|
|
2730
|
+
restrictions: CartPlatformModel.PriceAdjustmentRestrictions(),
|
|
2731
|
+
article_level_distribution: Joi.boolean().required(),
|
|
2732
|
+
collection: CartPlatformModel.Collection().required(),
|
|
2733
|
+
type: Joi.string().allow("").required(),
|
|
2734
|
+
allowed_refund: Joi.boolean(),
|
|
2735
|
+
article_ids: Joi.array().items(CartPlatformModel.Article()).required(),
|
|
2736
|
+
meta: Joi.any(),
|
|
2737
|
+
});
|
|
2738
|
+
}
|
|
2739
|
+
|
|
2664
2740
|
/** @returns {PriceAdjustment} */
|
|
2665
2741
|
static PriceAdjustment() {
|
|
2666
2742
|
return Joi.object({
|
|
@@ -2715,6 +2791,23 @@ class CartPlatformModel {
|
|
|
2715
2791
|
});
|
|
2716
2792
|
}
|
|
2717
2793
|
|
|
2794
|
+
/** @returns {BulkPriceAdjustmentAdd} */
|
|
2795
|
+
static BulkPriceAdjustmentAdd() {
|
|
2796
|
+
return Joi.object({
|
|
2797
|
+
value: Joi.number().required(),
|
|
2798
|
+
message: Joi.string().allow("").required(),
|
|
2799
|
+
apply_expiry: Joi.string().allow(""),
|
|
2800
|
+
restrictions: CartPlatformModel.PriceAdjustmentRestrictions(),
|
|
2801
|
+
created_by: Joi.string().allow(""),
|
|
2802
|
+
article_level_distribution: Joi.boolean().required(),
|
|
2803
|
+
collection: CartPlatformModel.Collection().required(),
|
|
2804
|
+
type: Joi.string().allow("").required(),
|
|
2805
|
+
allowed_refund: Joi.boolean(),
|
|
2806
|
+
article_ids: Joi.array().items(CartPlatformModel.Article()).required(),
|
|
2807
|
+
meta: Joi.any(),
|
|
2808
|
+
});
|
|
2809
|
+
}
|
|
2810
|
+
|
|
2718
2811
|
/** @returns {CartItem} */
|
|
2719
2812
|
static CartItem() {
|
|
2720
2813
|
return Joi.object({
|
|
@@ -3721,6 +3814,7 @@ class CartPlatformModel {
|
|
|
3721
3814
|
static CartItemCountResponse() {
|
|
3722
3815
|
return Joi.object({
|
|
3723
3816
|
user_cart_items_count: Joi.number(),
|
|
3817
|
+
user_cart_article_count: Joi.number(),
|
|
3724
3818
|
});
|
|
3725
3819
|
}
|
|
3726
3820
|
|
|
@@ -4264,5 +4358,31 @@ class CartPlatformModel {
|
|
|
4264
4358
|
promotions: Joi.array().items(CartPlatformModel.PromotionPaymentOffer()),
|
|
4265
4359
|
});
|
|
4266
4360
|
}
|
|
4361
|
+
|
|
4362
|
+
/** @returns {BulkPriceAdjustmentUpdateRequest} */
|
|
4363
|
+
static BulkPriceAdjustmentUpdateRequest() {
|
|
4364
|
+
return Joi.object({
|
|
4365
|
+
cart_id: Joi.string().allow(""),
|
|
4366
|
+
is_authenticated: Joi.boolean(),
|
|
4367
|
+
items: Joi.array().items(CartPlatformModel.BulkPriceAdjustmentUpdate()),
|
|
4368
|
+
});
|
|
4369
|
+
}
|
|
4370
|
+
|
|
4371
|
+
/** @returns {BulkPriceAdjustmentResponse} */
|
|
4372
|
+
static BulkPriceAdjustmentResponse() {
|
|
4373
|
+
return Joi.object({
|
|
4374
|
+
success: Joi.boolean(),
|
|
4375
|
+
data: Joi.array().items(CartPlatformModel.PriceAdjustmentResponse()),
|
|
4376
|
+
});
|
|
4377
|
+
}
|
|
4378
|
+
|
|
4379
|
+
/** @returns {BulkPriceAdjustmentAddRequest} */
|
|
4380
|
+
static BulkPriceAdjustmentAddRequest() {
|
|
4381
|
+
return Joi.object({
|
|
4382
|
+
cart_id: Joi.string().allow(""),
|
|
4383
|
+
is_authenticated: Joi.boolean(),
|
|
4384
|
+
items: Joi.array().items(CartPlatformModel.BulkPriceAdjustmentAdd()),
|
|
4385
|
+
});
|
|
4386
|
+
}
|
|
4267
4387
|
}
|
|
4268
4388
|
module.exports = CartPlatformModel;
|
|
@@ -152,16 +152,14 @@ declare class FileStorage {
|
|
|
152
152
|
* @param {string} namespace
|
|
153
153
|
* @param {number} size
|
|
154
154
|
* @param {number} tags
|
|
155
|
-
* @param {string} enc_key
|
|
156
155
|
*/
|
|
157
|
-
upload({ data, file_name, content_type, namespace, size, tags,
|
|
156
|
+
upload({ data, file_name, content_type, namespace, size, tags, }?: {
|
|
158
157
|
data: any;
|
|
159
158
|
file_name: any;
|
|
160
159
|
content_type: any;
|
|
161
160
|
namespace: any;
|
|
162
161
|
size: any;
|
|
163
162
|
tags: any;
|
|
164
|
-
enc_key: any;
|
|
165
163
|
}): Promise<any>;
|
|
166
164
|
}
|
|
167
165
|
import FileStoragePlatformApplicationValidator = require("./FileStoragePlatformApplicationValidator");
|
|
@@ -1045,7 +1045,6 @@ class FileStorage {
|
|
|
1045
1045
|
* @param {string} namespace
|
|
1046
1046
|
* @param {number} size
|
|
1047
1047
|
* @param {number} tags
|
|
1048
|
-
* @param {string} enc_key
|
|
1049
1048
|
*/
|
|
1050
1049
|
FileStorage.prototype.upload = function ({
|
|
1051
1050
|
data,
|
|
@@ -1054,7 +1053,6 @@ FileStorage.prototype.upload = function ({
|
|
|
1054
1053
|
namespace,
|
|
1055
1054
|
size,
|
|
1056
1055
|
tags,
|
|
1057
|
-
enc_key,
|
|
1058
1056
|
} = {}) {
|
|
1059
1057
|
return new Promise(async (resolve, reject) => {
|
|
1060
1058
|
try {
|
|
@@ -1065,7 +1063,6 @@ FileStorage.prototype.upload = function ({
|
|
|
1065
1063
|
content_type,
|
|
1066
1064
|
size: size,
|
|
1067
1065
|
tags: tags,
|
|
1068
|
-
enc_key: enc_key,
|
|
1069
1066
|
},
|
|
1070
1067
|
});
|
|
1071
1068
|
if (dataObj.upload && dataObj.upload.url) {
|
|
@@ -69,16 +69,14 @@ declare class FileStorage {
|
|
|
69
69
|
* @param {string} namespace
|
|
70
70
|
* @param {number} size
|
|
71
71
|
* @param {number} tags
|
|
72
|
-
* @param {string} enc_key
|
|
73
72
|
*/
|
|
74
|
-
upload({ data, file_name, content_type, namespace, size, tags,
|
|
73
|
+
upload({ data, file_name, content_type, namespace, size, tags, }?: {
|
|
75
74
|
data: any;
|
|
76
75
|
file_name: any;
|
|
77
76
|
content_type: any;
|
|
78
77
|
namespace: any;
|
|
79
78
|
size: any;
|
|
80
79
|
tags: any;
|
|
81
|
-
enc_key: any;
|
|
82
80
|
}): Promise<any>;
|
|
83
81
|
}
|
|
84
82
|
import FileStoragePlatformValidator = require("./FileStoragePlatformValidator");
|
|
@@ -510,7 +510,6 @@ class FileStorage {
|
|
|
510
510
|
* @param {string} namespace
|
|
511
511
|
* @param {number} size
|
|
512
512
|
* @param {number} tags
|
|
513
|
-
* @param {string} enc_key
|
|
514
513
|
*/
|
|
515
514
|
FileStorage.prototype.upload = function ({
|
|
516
515
|
data,
|
|
@@ -519,7 +518,6 @@ FileStorage.prototype.upload = function ({
|
|
|
519
518
|
namespace,
|
|
520
519
|
size,
|
|
521
520
|
tags,
|
|
522
|
-
enc_key,
|
|
523
521
|
} = {}) {
|
|
524
522
|
return new Promise(async (resolve, reject) => {
|
|
525
523
|
try {
|
|
@@ -530,7 +528,6 @@ FileStorage.prototype.upload = function ({
|
|
|
530
528
|
content_type,
|
|
531
529
|
size: size,
|
|
532
530
|
tags: tags,
|
|
533
|
-
enc_key: enc_key,
|
|
534
531
|
},
|
|
535
532
|
});
|
|
536
533
|
if (dataObj.upload && dataObj.upload.url) {
|
|
@@ -43,7 +43,6 @@ export = FileStoragePlatformModel;
|
|
|
43
43
|
* @property {number} size
|
|
44
44
|
* @property {string[]} [tags]
|
|
45
45
|
* @property {Object} [params]
|
|
46
|
-
* @property {string} [enc_key]
|
|
47
46
|
*/
|
|
48
47
|
/**
|
|
49
48
|
* @typedef CreatedBy
|
|
@@ -86,16 +85,10 @@ export = FileStoragePlatformModel;
|
|
|
86
85
|
* @typedef SignUrlResponse
|
|
87
86
|
* @property {Urls[]} urls
|
|
88
87
|
*/
|
|
89
|
-
/**
|
|
90
|
-
* @typedef EncryptionMapping
|
|
91
|
-
* @property {string} [enc_url]
|
|
92
|
-
* @property {string} [value]
|
|
93
|
-
*/
|
|
94
88
|
/**
|
|
95
89
|
* @typedef SignUrlRequest
|
|
96
90
|
* @property {number} expiry
|
|
97
91
|
* @property {string[]} urls
|
|
98
|
-
* @property {EncryptionMapping[]} [enc_url_mapping]
|
|
99
92
|
*/
|
|
100
93
|
/**
|
|
101
94
|
* @typedef InvoiceTypesDataResponse
|
|
@@ -577,7 +570,7 @@ export = FileStoragePlatformModel;
|
|
|
577
570
|
declare class FileStoragePlatformModel {
|
|
578
571
|
}
|
|
579
572
|
declare namespace FileStoragePlatformModel {
|
|
580
|
-
export { ProxyResponse, FailedResponse, CDN, Upload, StartResponse, Params, StartRequest, CreatedBy, CompleteResponse, DestinationNamespace, CopyFiles, Urls, SignUrlResponse,
|
|
573
|
+
export { ProxyResponse, FailedResponse, CDN, Upload, StartResponse, Params, StartRequest, CreatedBy, CompleteResponse, DestinationNamespace, CopyFiles, Urls, SignUrlResponse, SignUrlRequest, InvoiceTypesDataResponse, InvoiceTypesResponse, ConversionRate, DeliveryPartnerDetail, Image, PaymentData, InvoiceDetail, CompanyDetail, StoreDetail, CustomerBillingDetail, CustomerShippingDetail, ReturnDetail, Brand, Cgst, Sgst, Igst, Tax, ItemsProductTable, ProductTable, Taxes, TaxTable, RegisteredCompanyDetail, Kwargs, ShipmentIdBarcodeGenerator, SignedQrcodeGenerator, KwargsUpiQrcode, UpiQrcodeGenerator, DigitalsignatureGenerator, KwargsAwbNumber, AwbNumberLabelBarcodeGenerator, AwbNumberBarcodeGenerator, MetaProperty, Meta, DummyTemplateDataPayload, DummyTemplateData, DummyTemplateDataItems, PdfConfig, PdfConfigSuccessData, PdfConfigSuccess, PdfConfigSaveSuccessData, PdfConfigSaveSuccess, PdfDefaultTemplateSuccess, Document, PaymentReceiptRequestBody, PaymentReceiptOrderDetails, PaymentReceiptCustomerDetails, PaymentReceiptPayments, PaymentReceiptFormat, PaymentReceiptService, PaymentReceiptTaxes, PaymentReceiptPayload, PaymentReceiptMeta, ExtensionSlug };
|
|
581
574
|
}
|
|
582
575
|
/** @returns {ProxyResponse} */
|
|
583
576
|
declare function ProxyResponse(): ProxyResponse;
|
|
@@ -633,7 +626,6 @@ type StartRequest = {
|
|
|
633
626
|
size: number;
|
|
634
627
|
tags?: string[];
|
|
635
628
|
params?: any;
|
|
636
|
-
enc_key?: string;
|
|
637
629
|
};
|
|
638
630
|
/** @returns {CreatedBy} */
|
|
639
631
|
declare function CreatedBy(): CreatedBy;
|
|
@@ -682,18 +674,11 @@ declare function SignUrlResponse(): SignUrlResponse;
|
|
|
682
674
|
type SignUrlResponse = {
|
|
683
675
|
urls: Urls[];
|
|
684
676
|
};
|
|
685
|
-
/** @returns {EncryptionMapping} */
|
|
686
|
-
declare function EncryptionMapping(): EncryptionMapping;
|
|
687
|
-
type EncryptionMapping = {
|
|
688
|
-
enc_url?: string;
|
|
689
|
-
value?: string;
|
|
690
|
-
};
|
|
691
677
|
/** @returns {SignUrlRequest} */
|
|
692
678
|
declare function SignUrlRequest(): SignUrlRequest;
|
|
693
679
|
type SignUrlRequest = {
|
|
694
680
|
expiry: number;
|
|
695
681
|
urls: string[];
|
|
696
|
-
enc_url_mapping?: EncryptionMapping[];
|
|
697
682
|
};
|
|
698
683
|
/** @returns {InvoiceTypesDataResponse} */
|
|
699
684
|
declare function InvoiceTypesDataResponse(): InvoiceTypesDataResponse;
|
|
@@ -50,7 +50,6 @@ const Joi = require("joi");
|
|
|
50
50
|
* @property {number} size
|
|
51
51
|
* @property {string[]} [tags]
|
|
52
52
|
* @property {Object} [params]
|
|
53
|
-
* @property {string} [enc_key]
|
|
54
53
|
*/
|
|
55
54
|
|
|
56
55
|
/**
|
|
@@ -100,17 +99,10 @@ const Joi = require("joi");
|
|
|
100
99
|
* @property {Urls[]} urls
|
|
101
100
|
*/
|
|
102
101
|
|
|
103
|
-
/**
|
|
104
|
-
* @typedef EncryptionMapping
|
|
105
|
-
* @property {string} [enc_url]
|
|
106
|
-
* @property {string} [value]
|
|
107
|
-
*/
|
|
108
|
-
|
|
109
102
|
/**
|
|
110
103
|
* @typedef SignUrlRequest
|
|
111
104
|
* @property {number} expiry
|
|
112
105
|
* @property {string[]} urls
|
|
113
|
-
* @property {EncryptionMapping[]} [enc_url_mapping]
|
|
114
106
|
*/
|
|
115
107
|
|
|
116
108
|
/**
|
|
@@ -707,7 +699,6 @@ class FileStoragePlatformModel {
|
|
|
707
699
|
size: Joi.number().required(),
|
|
708
700
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
709
701
|
params: Joi.object().pattern(/\S/, Joi.any()),
|
|
710
|
-
enc_key: Joi.string().allow(""),
|
|
711
702
|
});
|
|
712
703
|
}
|
|
713
704
|
|
|
@@ -770,22 +761,11 @@ class FileStoragePlatformModel {
|
|
|
770
761
|
});
|
|
771
762
|
}
|
|
772
763
|
|
|
773
|
-
/** @returns {EncryptionMapping} */
|
|
774
|
-
static EncryptionMapping() {
|
|
775
|
-
return Joi.object({
|
|
776
|
-
enc_url: Joi.string().allow(""),
|
|
777
|
-
value: Joi.string().allow(""),
|
|
778
|
-
});
|
|
779
|
-
}
|
|
780
|
-
|
|
781
764
|
/** @returns {SignUrlRequest} */
|
|
782
765
|
static SignUrlRequest() {
|
|
783
766
|
return Joi.object({
|
|
784
767
|
expiry: Joi.number().required(),
|
|
785
768
|
urls: Joi.array().items(Joi.string().allow("")).required(),
|
|
786
|
-
enc_url_mapping: Joi.array().items(
|
|
787
|
-
FileStoragePlatformModel.EncryptionMapping()
|
|
788
|
-
),
|
|
789
769
|
});
|
|
790
770
|
}
|
|
791
771
|
|