@gofynd/fdk-client-javascript 3.19.0 → 3.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/sdk/application/Cart/CartApplicationClient.d.ts +2 -2
- package/sdk/application/Cart/CartApplicationClient.js +12 -4
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +1 -1
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +11 -3
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +1 -0
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +5 -5
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +50 -7
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +69 -10
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +30 -5
- package/sdk/platform/Cart/CartPlatformModel.d.ts +97 -72
- package/sdk/platform/Cart/CartPlatformModel.js +54 -35
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1 -1
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +17 -11
- package/sdk/platform/Catalog/CatalogPlatformClient.js +18 -12
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +353 -156
- package/sdk/platform/Catalog/CatalogPlatformModel.js +176 -87
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +40 -38
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +22 -21
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +1 -1
- package/sdk/platform/Content/ContentPlatformModel.d.ts +7 -7
- package/sdk/platform/Content/ContentPlatformModel.js +5 -5
- package/sdk/platform/Order/OrderPlatformModel.d.ts +2 -2
- package/sdk/platform/Order/OrderPlatformModel.js +1 -1
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +1 -1
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +12 -3
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +5 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +2 -0
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +4 -2
- package/sdk/platform/User/UserPlatformApplicationClient.js +9 -5
- package/sdk/platform/User/UserPlatformModel.d.ts +17 -1
- package/sdk/platform/User/UserPlatformModel.js +17 -1
package/README.md
CHANGED
|
@@ -234,7 +234,7 @@ console.log("Active Theme: ", response.information.name);
|
|
|
234
234
|
The above code will log the curl command in the console
|
|
235
235
|
|
|
236
236
|
```bash
|
|
237
|
-
curl --request GET "https://api.fynd.com/service/application/theme/v1.0/applied-theme" --header 'authorization: Bearer <authorization-token>' --header 'x-fp-sdk-version: 3.
|
|
237
|
+
curl --request GET "https://api.fynd.com/service/application/theme/v1.0/applied-theme" --header 'authorization: Bearer <authorization-token>' --header 'x-fp-sdk-version: 3.20.0' --header 'x-fp-date: 20230222T115108Z' --header 'x-fp-signature: v1.1:1e3ab3b02b5bc626e3c32a37ee844266ade02bbcbaafc28fc7a0e46a76a7a1a8'
|
|
238
238
|
Active Theme: Emerge
|
|
239
239
|
```
|
|
240
240
|
|
package/package.json
CHANGED
|
@@ -102,7 +102,7 @@ declare class Cart {
|
|
|
102
102
|
* @summary: Checkout cart
|
|
103
103
|
* @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://docs.fynd.com/partners/commerce/sdk/application/cart/checkoutCartV2/).
|
|
104
104
|
*/
|
|
105
|
-
checkoutCartV2({ body, xOrderingSource, buyNow, cartType, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<CartCheckoutResult>;
|
|
105
|
+
checkoutCartV2({ body, xOrderingSource, xLocationDetail, xCurrencyCode, buyNow, cartType, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<CartCheckoutResult>;
|
|
106
106
|
/**
|
|
107
107
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
108
108
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -298,7 +298,7 @@ declare class Cart {
|
|
|
298
298
|
* @returns {Promise<UpdateAddressResult>} - Success response
|
|
299
299
|
* @name updateAddress
|
|
300
300
|
* @summary: Updates an existing customer address
|
|
301
|
-
* @description: Customer can modify the details of a previously saved
|
|
301
|
+
* @description: Customer can modify the details of a previously saved address. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/cart/updateAddress/).
|
|
302
302
|
*/
|
|
303
303
|
updateAddress({ id, body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<UpdateAddressResult>;
|
|
304
304
|
/**
|
|
@@ -338,9 +338,15 @@ class Cart {
|
|
|
338
338
|
* @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://docs.fynd.com/partners/commerce/sdk/application/cart/checkoutCartV2/).
|
|
339
339
|
*/
|
|
340
340
|
async checkoutCartV2(
|
|
341
|
-
{
|
|
342
|
-
|
|
343
|
-
|
|
341
|
+
{
|
|
342
|
+
body,
|
|
343
|
+
xOrderingSource,
|
|
344
|
+
xLocationDetail,
|
|
345
|
+
xCurrencyCode,
|
|
346
|
+
buyNow,
|
|
347
|
+
cartType,
|
|
348
|
+
requestHeaders,
|
|
349
|
+
} = { requestHeaders: {} },
|
|
344
350
|
{ responseHeaders } = { responseHeaders: false }
|
|
345
351
|
) {
|
|
346
352
|
const query_params = {};
|
|
@@ -349,6 +355,8 @@ class Cart {
|
|
|
349
355
|
|
|
350
356
|
const xHeaders = {};
|
|
351
357
|
xHeaders["x-ordering-source"] = xOrderingSource;
|
|
358
|
+
xHeaders["x-location-detail"] = xLocationDetail;
|
|
359
|
+
xHeaders["x-currency-code"] = xCurrencyCode;
|
|
352
360
|
|
|
353
361
|
const response = await ApplicationAPIClient.execute(
|
|
354
362
|
this._conf,
|
|
@@ -1314,7 +1322,7 @@ class Cart {
|
|
|
1314
1322
|
* @returns {Promise<UpdateAddressResult>} - Success response
|
|
1315
1323
|
* @name updateAddress
|
|
1316
1324
|
* @summary: Updates an existing customer address
|
|
1317
|
-
* @description: Customer can modify the details of a previously saved
|
|
1325
|
+
* @description: Customer can modify the details of a previously saved address. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/cart/updateAddress/).
|
|
1318
1326
|
*/
|
|
1319
1327
|
async updateAddress(
|
|
1320
1328
|
{ id, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -257,7 +257,7 @@ declare class Logistics {
|
|
|
257
257
|
* @summary: Get created Schemes for courier partner
|
|
258
258
|
* @description: Get created Schemes for courier partner - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/partner/logistics/getCourierPartnerSchemes/).
|
|
259
259
|
*/
|
|
260
|
-
getCourierPartnerSchemes({ schemeType, paymentMode, capabilities, schemeIds, requestHeaders }?: LogisticsPartnerValidator.GetCourierPartnerSchemesParam, { responseHeaders }?: object): Promise<LogisticsPartnerModel.CourierPartnerSchemeList>;
|
|
260
|
+
getCourierPartnerSchemes({ extensionId, schemeType, paymentMode, capabilities, schemeIds, requestHeaders, }?: LogisticsPartnerValidator.GetCourierPartnerSchemesParam, { responseHeaders }?: object): Promise<LogisticsPartnerModel.CourierPartnerSchemeList>;
|
|
261
261
|
/**
|
|
262
262
|
* @param {LogisticsPartnerValidator.UpdateCourierPartnerSchemeParam} arg -
|
|
263
263
|
* Arg object.
|
|
@@ -2091,15 +2091,21 @@ class Logistics {
|
|
|
2091
2091
|
* @description: Get created Schemes for courier partner - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/partner/logistics/getCourierPartnerSchemes/).
|
|
2092
2092
|
*/
|
|
2093
2093
|
async getCourierPartnerSchemes(
|
|
2094
|
-
{
|
|
2095
|
-
|
|
2096
|
-
|
|
2094
|
+
{
|
|
2095
|
+
extensionId,
|
|
2096
|
+
schemeType,
|
|
2097
|
+
paymentMode,
|
|
2098
|
+
capabilities,
|
|
2099
|
+
schemeIds,
|
|
2100
|
+
requestHeaders,
|
|
2101
|
+
} = { requestHeaders: {} },
|
|
2097
2102
|
{ responseHeaders } = { responseHeaders: false }
|
|
2098
2103
|
) {
|
|
2099
2104
|
const {
|
|
2100
2105
|
error,
|
|
2101
2106
|
} = LogisticsPartnerValidator.getCourierPartnerSchemes().validate(
|
|
2102
2107
|
{
|
|
2108
|
+
extensionId,
|
|
2103
2109
|
schemeType,
|
|
2104
2110
|
paymentMode,
|
|
2105
2111
|
capabilities,
|
|
@@ -2116,6 +2122,7 @@ class Logistics {
|
|
|
2116
2122
|
error: warrning,
|
|
2117
2123
|
} = LogisticsPartnerValidator.getCourierPartnerSchemes().validate(
|
|
2118
2124
|
{
|
|
2125
|
+
extensionId,
|
|
2119
2126
|
schemeType,
|
|
2120
2127
|
paymentMode,
|
|
2121
2128
|
capabilities,
|
|
@@ -2131,6 +2138,7 @@ class Logistics {
|
|
|
2131
2138
|
}
|
|
2132
2139
|
|
|
2133
2140
|
const query_params = {};
|
|
2141
|
+
query_params["extension_id"] = extensionId;
|
|
2134
2142
|
query_params["scheme_type"] = schemeType;
|
|
2135
2143
|
query_params["payment_mode"] = paymentMode;
|
|
2136
2144
|
query_params["capabilities"] = capabilities;
|
|
@@ -233,6 +233,7 @@ class LogisticsValidator {
|
|
|
233
233
|
|
|
234
234
|
static getCourierPartnerSchemes() {
|
|
235
235
|
return Joi.object({
|
|
236
|
+
extensionId: Joi.string().allow(""),
|
|
236
237
|
schemeType: Joi.string().allow(""),
|
|
237
238
|
paymentMode: Joi.string().allow(""),
|
|
238
239
|
capabilities: Joi.array().items(Joi.string().allow("")),
|
|
@@ -72,10 +72,10 @@ declare class Cart {
|
|
|
72
72
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
73
73
|
* @returns {Promise<CartPlatformModel.OpenApiCheckoutResult>} - Success response
|
|
74
74
|
* @name checkoutCart
|
|
75
|
-
* @summary: Checkout
|
|
75
|
+
* @summary: Headless Checkout
|
|
76
76
|
* @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://docs.fynd.com/partners/commerce/sdk/platform/cart/checkoutCart/).
|
|
77
77
|
*/
|
|
78
|
-
checkoutCart({ body, xOrderingSource, xAnonymousCart, requestHeaders }?: CartPlatformApplicationValidator.CheckoutCartParam, { responseHeaders }?: object): Promise<CartPlatformModel.OpenApiCheckoutResult>;
|
|
78
|
+
checkoutCart({ body, xOrderingSource, xAnonymousCart, xLocationDetail, xCurrencyCode, requestHeaders, }?: CartPlatformApplicationValidator.CheckoutCartParam, { responseHeaders }?: object): Promise<CartPlatformModel.OpenApiCheckoutResult>;
|
|
79
79
|
/**
|
|
80
80
|
* @param {CartPlatformApplicationValidator.CreateCartMetaConfigParam} arg
|
|
81
81
|
* - Arg object
|
|
@@ -169,7 +169,7 @@ declare class Cart {
|
|
|
169
169
|
* @summary: Get and validate cart items
|
|
170
170
|
* @description: Retrieve cart details for a provided list of cart items and validate its contents. This ensures accuracy and completeness in cart information, including item quantities, prices, discounts, and applicable taxes. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/fetchAndvalidateCartItems/).
|
|
171
171
|
*/
|
|
172
|
-
fetchAndvalidateCartItems({ body, xOrderingSource, requestHeaders }?: CartPlatformApplicationValidator.FetchAndvalidateCartItemsParam, { responseHeaders }?: object): Promise<CartPlatformModel.OpenapiCartDetailsResult>;
|
|
172
|
+
fetchAndvalidateCartItems({ body, xOrderingSource, xLocationDetail, xCurrencyCode, requestHeaders, }?: CartPlatformApplicationValidator.FetchAndvalidateCartItemsParam, { responseHeaders }?: object): Promise<CartPlatformModel.OpenapiCartDetailsResult>;
|
|
173
173
|
/**
|
|
174
174
|
* @param {CartPlatformApplicationValidator.FetchCartMetaConfigParam} arg - Arg object
|
|
175
175
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -466,7 +466,7 @@ declare class Cart {
|
|
|
466
466
|
* @summary: Update cart checkout
|
|
467
467
|
* @description: Overrides the cart's checkout process with a new provided cart items. It provides flexibility in customizing checkout flows to meet specific business requirements, enhancing the user experience and optimizing order processing workflows. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/overrideCart/).
|
|
468
468
|
*/
|
|
469
|
-
overrideCart({ body, xOrderingSource, requestHeaders }?: CartPlatformApplicationValidator.OverrideCartParam, { responseHeaders }?: object): Promise<CartPlatformModel.OverrideCheckoutResult>;
|
|
469
|
+
overrideCart({ body, xOrderingSource, xLocationDetail, xCurrencyCode, requestHeaders, }?: CartPlatformApplicationValidator.OverrideCartParam, { responseHeaders }?: object): Promise<CartPlatformModel.OverrideCheckoutResult>;
|
|
470
470
|
/**
|
|
471
471
|
* @param {CartPlatformApplicationValidator.PlatformAddItemsParam} arg - Arg object
|
|
472
472
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -500,7 +500,7 @@ declare class Cart {
|
|
|
500
500
|
* @summary: Checkout cart
|
|
501
501
|
* @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://docs.fynd.com/partners/commerce/sdk/platform/cart/platformCheckoutCartV2/).
|
|
502
502
|
*/
|
|
503
|
-
platformCheckoutCartV2({ body, xOrderingSource, id, requestHeaders }?: CartPlatformApplicationValidator.PlatformCheckoutCartV2Param, { responseHeaders }?: object): Promise<CartPlatformModel.CartCheckoutDetails>;
|
|
503
|
+
platformCheckoutCartV2({ body, xOrderingSource, xAnonymousCart, xLocationDetail, xCurrencyCode, id, requestHeaders, }?: CartPlatformApplicationValidator.PlatformCheckoutCartV2Param, { responseHeaders }?: object): Promise<CartPlatformModel.CartCheckoutDetails>;
|
|
504
504
|
/**
|
|
505
505
|
* @param {CartPlatformApplicationValidator.PlatformUpdateCartParam} arg - Arg object
|
|
506
506
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -544,13 +544,18 @@ class Cart {
|
|
|
544
544
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
545
545
|
* @returns {Promise<CartPlatformModel.OpenApiCheckoutResult>} - Success response
|
|
546
546
|
* @name checkoutCart
|
|
547
|
-
* @summary: Checkout
|
|
547
|
+
* @summary: Headless Checkout
|
|
548
548
|
* @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://docs.fynd.com/partners/commerce/sdk/platform/cart/checkoutCart/).
|
|
549
549
|
*/
|
|
550
550
|
async checkoutCart(
|
|
551
|
-
{
|
|
552
|
-
|
|
553
|
-
|
|
551
|
+
{
|
|
552
|
+
body,
|
|
553
|
+
xOrderingSource,
|
|
554
|
+
xAnonymousCart,
|
|
555
|
+
xLocationDetail,
|
|
556
|
+
xCurrencyCode,
|
|
557
|
+
requestHeaders,
|
|
558
|
+
} = { requestHeaders: {} },
|
|
554
559
|
{ responseHeaders } = { responseHeaders: false }
|
|
555
560
|
) {
|
|
556
561
|
const { error } = CartPlatformApplicationValidator.checkoutCart().validate(
|
|
@@ -558,6 +563,8 @@ class Cart {
|
|
|
558
563
|
body,
|
|
559
564
|
xOrderingSource,
|
|
560
565
|
xAnonymousCart,
|
|
566
|
+
xLocationDetail,
|
|
567
|
+
xCurrencyCode,
|
|
561
568
|
},
|
|
562
569
|
{ abortEarly: false, allowUnknown: true }
|
|
563
570
|
);
|
|
@@ -573,6 +580,8 @@ class Cart {
|
|
|
573
580
|
body,
|
|
574
581
|
xOrderingSource,
|
|
575
582
|
xAnonymousCart,
|
|
583
|
+
xLocationDetail,
|
|
584
|
+
xCurrencyCode,
|
|
576
585
|
},
|
|
577
586
|
{ abortEarly: false, allowUnknown: false }
|
|
578
587
|
);
|
|
@@ -1260,7 +1269,13 @@ class Cart {
|
|
|
1260
1269
|
* @description: Retrieve cart details for a provided list of cart items and validate its contents. This ensures accuracy and completeness in cart information, including item quantities, prices, discounts, and applicable taxes. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/fetchAndvalidateCartItems/).
|
|
1261
1270
|
*/
|
|
1262
1271
|
async fetchAndvalidateCartItems(
|
|
1263
|
-
{
|
|
1272
|
+
{
|
|
1273
|
+
body,
|
|
1274
|
+
xOrderingSource,
|
|
1275
|
+
xLocationDetail,
|
|
1276
|
+
xCurrencyCode,
|
|
1277
|
+
requestHeaders,
|
|
1278
|
+
} = { requestHeaders: {} },
|
|
1264
1279
|
{ responseHeaders } = { responseHeaders: false }
|
|
1265
1280
|
) {
|
|
1266
1281
|
const {
|
|
@@ -1269,6 +1284,8 @@ class Cart {
|
|
|
1269
1284
|
{
|
|
1270
1285
|
body,
|
|
1271
1286
|
xOrderingSource,
|
|
1287
|
+
xLocationDetail,
|
|
1288
|
+
xCurrencyCode,
|
|
1272
1289
|
},
|
|
1273
1290
|
{ abortEarly: false, allowUnknown: true }
|
|
1274
1291
|
);
|
|
@@ -1283,6 +1300,8 @@ class Cart {
|
|
|
1283
1300
|
{
|
|
1284
1301
|
body,
|
|
1285
1302
|
xOrderingSource,
|
|
1303
|
+
xLocationDetail,
|
|
1304
|
+
xCurrencyCode,
|
|
1286
1305
|
},
|
|
1287
1306
|
{ abortEarly: false, allowUnknown: false }
|
|
1288
1307
|
);
|
|
@@ -3867,13 +3886,21 @@ class Cart {
|
|
|
3867
3886
|
* @description: Overrides the cart's checkout process with a new provided cart items. It provides flexibility in customizing checkout flows to meet specific business requirements, enhancing the user experience and optimizing order processing workflows. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/overrideCart/).
|
|
3868
3887
|
*/
|
|
3869
3888
|
async overrideCart(
|
|
3870
|
-
{
|
|
3889
|
+
{
|
|
3890
|
+
body,
|
|
3891
|
+
xOrderingSource,
|
|
3892
|
+
xLocationDetail,
|
|
3893
|
+
xCurrencyCode,
|
|
3894
|
+
requestHeaders,
|
|
3895
|
+
} = { requestHeaders: {} },
|
|
3871
3896
|
{ responseHeaders } = { responseHeaders: false }
|
|
3872
3897
|
) {
|
|
3873
3898
|
const { error } = CartPlatformApplicationValidator.overrideCart().validate(
|
|
3874
3899
|
{
|
|
3875
3900
|
body,
|
|
3876
3901
|
xOrderingSource,
|
|
3902
|
+
xLocationDetail,
|
|
3903
|
+
xCurrencyCode,
|
|
3877
3904
|
},
|
|
3878
3905
|
{ abortEarly: false, allowUnknown: true }
|
|
3879
3906
|
);
|
|
@@ -3888,6 +3915,8 @@ class Cart {
|
|
|
3888
3915
|
{
|
|
3889
3916
|
body,
|
|
3890
3917
|
xOrderingSource,
|
|
3918
|
+
xLocationDetail,
|
|
3919
|
+
xCurrencyCode,
|
|
3891
3920
|
},
|
|
3892
3921
|
{ abortEarly: false, allowUnknown: false }
|
|
3893
3922
|
);
|
|
@@ -4146,7 +4175,15 @@ class Cart {
|
|
|
4146
4175
|
* @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://docs.fynd.com/partners/commerce/sdk/platform/cart/platformCheckoutCartV2/).
|
|
4147
4176
|
*/
|
|
4148
4177
|
async platformCheckoutCartV2(
|
|
4149
|
-
{
|
|
4178
|
+
{
|
|
4179
|
+
body,
|
|
4180
|
+
xOrderingSource,
|
|
4181
|
+
xAnonymousCart,
|
|
4182
|
+
xLocationDetail,
|
|
4183
|
+
xCurrencyCode,
|
|
4184
|
+
id,
|
|
4185
|
+
requestHeaders,
|
|
4186
|
+
} = { requestHeaders: {} },
|
|
4150
4187
|
{ responseHeaders } = { responseHeaders: false }
|
|
4151
4188
|
) {
|
|
4152
4189
|
const {
|
|
@@ -4155,6 +4192,9 @@ class Cart {
|
|
|
4155
4192
|
{
|
|
4156
4193
|
body,
|
|
4157
4194
|
xOrderingSource,
|
|
4195
|
+
xAnonymousCart,
|
|
4196
|
+
xLocationDetail,
|
|
4197
|
+
xCurrencyCode,
|
|
4158
4198
|
id,
|
|
4159
4199
|
},
|
|
4160
4200
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -4170,6 +4210,9 @@ class Cart {
|
|
|
4170
4210
|
{
|
|
4171
4211
|
body,
|
|
4172
4212
|
xOrderingSource,
|
|
4213
|
+
xAnonymousCart,
|
|
4214
|
+
xLocationDetail,
|
|
4215
|
+
xCurrencyCode,
|
|
4173
4216
|
id,
|
|
4174
4217
|
},
|
|
4175
4218
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -47,9 +47,13 @@ export = CartPlatformApplicationValidator;
|
|
|
47
47
|
* @typedef CheckoutCartParam
|
|
48
48
|
* @property {string} [xOrderingSource] - Ordering source header, to be used to
|
|
49
49
|
* identify source of order creation.
|
|
50
|
-
* @property {string} [xAnonymousCart] -
|
|
51
|
-
*
|
|
52
|
-
*
|
|
50
|
+
* @property {string} [xAnonymousCart] - It allows operations on cross-platform
|
|
51
|
+
* anonymous carts. When provided, the system retrieves the cart using only
|
|
52
|
+
* the cart_id, ignoring the user_id. Use this when interacting with an
|
|
53
|
+
* anonymous or guest cart across platforms.
|
|
54
|
+
* @property {string} [xLocationDetail] - Location details for the cart checkout
|
|
55
|
+
* @property {string} [xCurrencyCode] - Currency code for transactions. Defaults
|
|
56
|
+
* to INR if the location is India.
|
|
53
57
|
* @property {CartPlatformModel.OpenApiPlatformCheckoutReq} body
|
|
54
58
|
*/
|
|
55
59
|
/**
|
|
@@ -89,6 +93,8 @@ export = CartPlatformApplicationValidator;
|
|
|
89
93
|
* @typedef FetchAndvalidateCartItemsParam
|
|
90
94
|
* @property {string} [xOrderingSource] - Ordering source header, to be used to
|
|
91
95
|
* identify source of order creation.
|
|
96
|
+
* @property {string} [xLocationDetail] - Location details for the cart checkout
|
|
97
|
+
* @property {string} [xCurrencyCode] - Currency code for transactions.
|
|
92
98
|
* @property {CartPlatformModel.OpenapiCartDetailsCreation} body
|
|
93
99
|
*/
|
|
94
100
|
/** @typedef FetchCartMetaConfigParam */
|
|
@@ -310,6 +316,9 @@ export = CartPlatformApplicationValidator;
|
|
|
310
316
|
* @typedef OverrideCartParam
|
|
311
317
|
* @property {string} [xOrderingSource] - Ordering source header, to be used to
|
|
312
318
|
* identify source of order creation.
|
|
319
|
+
* @property {string} [xLocationDetail] - Location details for the cart checkout
|
|
320
|
+
* @property {string} [xCurrencyCode] - Currency code for transactions. Defaults
|
|
321
|
+
* to INR if the location is India.
|
|
313
322
|
* @property {CartPlatformModel.OverrideCheckoutReq} body
|
|
314
323
|
*/
|
|
315
324
|
/**
|
|
@@ -344,8 +353,15 @@ export = CartPlatformApplicationValidator;
|
|
|
344
353
|
/**
|
|
345
354
|
* @typedef PlatformCheckoutCartV2Param
|
|
346
355
|
* @property {string} [xOrderingSource] - Ordering source header, to be used to
|
|
347
|
-
* identify source of order creation
|
|
348
|
-
* @property {string} [
|
|
356
|
+
* identify source of order creation
|
|
357
|
+
* @property {string} [xAnonymousCart] - It allows operations on cross-platform
|
|
358
|
+
* anonymous carts. When provided, the system retrieves the cart using only
|
|
359
|
+
* the cart_id, ignoring the user_id. Use this when interacting with an
|
|
360
|
+
* anonymous or guest cart across platforms.
|
|
361
|
+
* @property {string} [xLocationDetail] - Location information for the cart
|
|
362
|
+
* @property {string} [xCurrencyCode] - Currency code for the transaction.
|
|
363
|
+
* Defaults to INR if the order location is India.
|
|
364
|
+
* @property {string} [id] - Unique identifier of the cart
|
|
349
365
|
* @property {CartPlatformModel.PlatformCartCheckoutDetailV2Creation} body
|
|
350
366
|
*/
|
|
351
367
|
/**
|
|
@@ -750,11 +766,21 @@ type CheckoutCartParam = {
|
|
|
750
766
|
*/
|
|
751
767
|
xOrderingSource?: string;
|
|
752
768
|
/**
|
|
753
|
-
* -
|
|
754
|
-
*
|
|
755
|
-
*
|
|
769
|
+
* - It allows operations on cross-platform
|
|
770
|
+
* anonymous carts. When provided, the system retrieves the cart using only
|
|
771
|
+
* the cart_id, ignoring the user_id. Use this when interacting with an
|
|
772
|
+
* anonymous or guest cart across platforms.
|
|
756
773
|
*/
|
|
757
774
|
xAnonymousCart?: string;
|
|
775
|
+
/**
|
|
776
|
+
* - Location details for the cart checkout
|
|
777
|
+
*/
|
|
778
|
+
xLocationDetail?: string;
|
|
779
|
+
/**
|
|
780
|
+
* - Currency code for transactions. Defaults
|
|
781
|
+
* to INR if the location is India.
|
|
782
|
+
*/
|
|
783
|
+
xCurrencyCode?: string;
|
|
758
784
|
body: CartPlatformModel.OpenApiPlatformCheckoutReq;
|
|
759
785
|
};
|
|
760
786
|
type CreateCartMetaConfigParam = {
|
|
@@ -791,6 +817,14 @@ type FetchAndvalidateCartItemsParam = {
|
|
|
791
817
|
* identify source of order creation.
|
|
792
818
|
*/
|
|
793
819
|
xOrderingSource?: string;
|
|
820
|
+
/**
|
|
821
|
+
* - Location details for the cart checkout
|
|
822
|
+
*/
|
|
823
|
+
xLocationDetail?: string;
|
|
824
|
+
/**
|
|
825
|
+
* - Currency code for transactions.
|
|
826
|
+
*/
|
|
827
|
+
xCurrencyCode?: string;
|
|
794
828
|
body: CartPlatformModel.OpenapiCartDetailsCreation;
|
|
795
829
|
};
|
|
796
830
|
type GetAbandonedCartParam = {
|
|
@@ -1122,6 +1156,15 @@ type OverrideCartParam = {
|
|
|
1122
1156
|
* identify source of order creation.
|
|
1123
1157
|
*/
|
|
1124
1158
|
xOrderingSource?: string;
|
|
1159
|
+
/**
|
|
1160
|
+
* - Location details for the cart checkout
|
|
1161
|
+
*/
|
|
1162
|
+
xLocationDetail?: string;
|
|
1163
|
+
/**
|
|
1164
|
+
* - Currency code for transactions. Defaults
|
|
1165
|
+
* to INR if the location is India.
|
|
1166
|
+
*/
|
|
1167
|
+
xCurrencyCode?: string;
|
|
1125
1168
|
body: CartPlatformModel.OverrideCheckoutReq;
|
|
1126
1169
|
};
|
|
1127
1170
|
type PlatformAddItemsParam = {
|
|
@@ -1184,11 +1227,27 @@ type PlatformCheckoutCartParam = {
|
|
|
1184
1227
|
type PlatformCheckoutCartV2Param = {
|
|
1185
1228
|
/**
|
|
1186
1229
|
* - Ordering source header, to be used to
|
|
1187
|
-
* identify source of order creation
|
|
1230
|
+
* identify source of order creation
|
|
1188
1231
|
*/
|
|
1189
1232
|
xOrderingSource?: string;
|
|
1190
1233
|
/**
|
|
1191
|
-
* -
|
|
1234
|
+
* - It allows operations on cross-platform
|
|
1235
|
+
* anonymous carts. When provided, the system retrieves the cart using only
|
|
1236
|
+
* the cart_id, ignoring the user_id. Use this when interacting with an
|
|
1237
|
+
* anonymous or guest cart across platforms.
|
|
1238
|
+
*/
|
|
1239
|
+
xAnonymousCart?: string;
|
|
1240
|
+
/**
|
|
1241
|
+
* - Location information for the cart
|
|
1242
|
+
*/
|
|
1243
|
+
xLocationDetail?: string;
|
|
1244
|
+
/**
|
|
1245
|
+
* - Currency code for the transaction.
|
|
1246
|
+
* Defaults to INR if the order location is India.
|
|
1247
|
+
*/
|
|
1248
|
+
xCurrencyCode?: string;
|
|
1249
|
+
/**
|
|
1250
|
+
* - Unique identifier of the cart
|
|
1192
1251
|
*/
|
|
1193
1252
|
id?: string;
|
|
1194
1253
|
body: CartPlatformModel.PlatformCartCheckoutDetailV2Creation;
|
|
@@ -56,9 +56,13 @@ const CartPlatformModel = require("./CartPlatformModel");
|
|
|
56
56
|
* @typedef CheckoutCartParam
|
|
57
57
|
* @property {string} [xOrderingSource] - Ordering source header, to be used to
|
|
58
58
|
* identify source of order creation.
|
|
59
|
-
* @property {string} [xAnonymousCart] -
|
|
60
|
-
*
|
|
61
|
-
*
|
|
59
|
+
* @property {string} [xAnonymousCart] - It allows operations on cross-platform
|
|
60
|
+
* anonymous carts. When provided, the system retrieves the cart using only
|
|
61
|
+
* the cart_id, ignoring the user_id. Use this when interacting with an
|
|
62
|
+
* anonymous or guest cart across platforms.
|
|
63
|
+
* @property {string} [xLocationDetail] - Location details for the cart checkout
|
|
64
|
+
* @property {string} [xCurrencyCode] - Currency code for transactions. Defaults
|
|
65
|
+
* to INR if the location is India.
|
|
62
66
|
* @property {CartPlatformModel.OpenApiPlatformCheckoutReq} body
|
|
63
67
|
*/
|
|
64
68
|
|
|
@@ -107,6 +111,8 @@ const CartPlatformModel = require("./CartPlatformModel");
|
|
|
107
111
|
* @typedef FetchAndvalidateCartItemsParam
|
|
108
112
|
* @property {string} [xOrderingSource] - Ordering source header, to be used to
|
|
109
113
|
* identify source of order creation.
|
|
114
|
+
* @property {string} [xLocationDetail] - Location details for the cart checkout
|
|
115
|
+
* @property {string} [xCurrencyCode] - Currency code for transactions.
|
|
110
116
|
* @property {CartPlatformModel.OpenapiCartDetailsCreation} body
|
|
111
117
|
*/
|
|
112
118
|
|
|
@@ -356,6 +362,9 @@ const CartPlatformModel = require("./CartPlatformModel");
|
|
|
356
362
|
* @typedef OverrideCartParam
|
|
357
363
|
* @property {string} [xOrderingSource] - Ordering source header, to be used to
|
|
358
364
|
* identify source of order creation.
|
|
365
|
+
* @property {string} [xLocationDetail] - Location details for the cart checkout
|
|
366
|
+
* @property {string} [xCurrencyCode] - Currency code for transactions. Defaults
|
|
367
|
+
* to INR if the location is India.
|
|
359
368
|
* @property {CartPlatformModel.OverrideCheckoutReq} body
|
|
360
369
|
*/
|
|
361
370
|
|
|
@@ -393,8 +402,15 @@ const CartPlatformModel = require("./CartPlatformModel");
|
|
|
393
402
|
/**
|
|
394
403
|
* @typedef PlatformCheckoutCartV2Param
|
|
395
404
|
* @property {string} [xOrderingSource] - Ordering source header, to be used to
|
|
396
|
-
* identify source of order creation
|
|
397
|
-
* @property {string} [
|
|
405
|
+
* identify source of order creation
|
|
406
|
+
* @property {string} [xAnonymousCart] - It allows operations on cross-platform
|
|
407
|
+
* anonymous carts. When provided, the system retrieves the cart using only
|
|
408
|
+
* the cart_id, ignoring the user_id. Use this when interacting with an
|
|
409
|
+
* anonymous or guest cart across platforms.
|
|
410
|
+
* @property {string} [xLocationDetail] - Location information for the cart
|
|
411
|
+
* @property {string} [xCurrencyCode] - Currency code for the transaction.
|
|
412
|
+
* Defaults to INR if the order location is India.
|
|
413
|
+
* @property {string} [id] - Unique identifier of the cart
|
|
398
414
|
* @property {CartPlatformModel.PlatformCartCheckoutDetailV2Creation} body
|
|
399
415
|
*/
|
|
400
416
|
|
|
@@ -672,6 +688,8 @@ class CartPlatformApplicationValidator {
|
|
|
672
688
|
return Joi.object({
|
|
673
689
|
xOrderingSource: Joi.string().allow(""),
|
|
674
690
|
xAnonymousCart: Joi.string().allow(""),
|
|
691
|
+
xLocationDetail: Joi.string().allow(""),
|
|
692
|
+
xCurrencyCode: Joi.string().allow(""),
|
|
675
693
|
|
|
676
694
|
body: CartPlatformModel.OpenApiPlatformCheckoutReq().required(),
|
|
677
695
|
}).required();
|
|
@@ -738,6 +756,8 @@ class CartPlatformApplicationValidator {
|
|
|
738
756
|
static fetchAndvalidateCartItems() {
|
|
739
757
|
return Joi.object({
|
|
740
758
|
xOrderingSource: Joi.string().allow(""),
|
|
759
|
+
xLocationDetail: Joi.string().allow(""),
|
|
760
|
+
xCurrencyCode: Joi.string().allow(""),
|
|
741
761
|
|
|
742
762
|
body: CartPlatformModel.OpenapiCartDetailsCreation().required(),
|
|
743
763
|
}).required();
|
|
@@ -1028,6 +1048,8 @@ class CartPlatformApplicationValidator {
|
|
|
1028
1048
|
static overrideCart() {
|
|
1029
1049
|
return Joi.object({
|
|
1030
1050
|
xOrderingSource: Joi.string().allow(""),
|
|
1051
|
+
xLocationDetail: Joi.string().allow(""),
|
|
1052
|
+
xCurrencyCode: Joi.string().allow(""),
|
|
1031
1053
|
|
|
1032
1054
|
body: CartPlatformModel.OverrideCheckoutReq().required(),
|
|
1033
1055
|
}).required();
|
|
@@ -1063,6 +1085,9 @@ class CartPlatformApplicationValidator {
|
|
|
1063
1085
|
static platformCheckoutCartV2() {
|
|
1064
1086
|
return Joi.object({
|
|
1065
1087
|
xOrderingSource: Joi.string().allow(""),
|
|
1088
|
+
xAnonymousCart: Joi.string().allow(""),
|
|
1089
|
+
xLocationDetail: Joi.string().allow(""),
|
|
1090
|
+
xCurrencyCode: Joi.string().allow(""),
|
|
1066
1091
|
|
|
1067
1092
|
id: Joi.string().allow(""),
|
|
1068
1093
|
body: CartPlatformModel.PlatformCartCheckoutDetailV2Creation().required(),
|