@gofynd/fdk-client-javascript 1.3.5-beta.2 → 1.3.5-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/sdk/application/ApplicationClient.d.ts +4 -1
- package/sdk/application/ApplicationClient.js +12 -5
- package/sdk/application/Cart/CartApplicationModel.js +7 -7
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +2 -0
- package/sdk/platform/Lead/LeadPlatformModel.js +2 -0
- package/sdk/platform/Order/OrderPlatformModel.d.ts +0 -4
- package/sdk/platform/Order/OrderPlatformModel.js +0 -4
- package/sdk/platform/User/UserPlatformModel.d.ts +4 -0
- package/sdk/platform/User/UserPlatformModel.js +4 -0
package/README.md
CHANGED
|
@@ -214,7 +214,7 @@ console.log("Active Theme: ", response.information.name);
|
|
|
214
214
|
The above code will log the curl command in the console
|
|
215
215
|
|
|
216
216
|
```bash
|
|
217
|
-
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.3.5-beta.
|
|
217
|
+
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.3.5-beta.3' --header 'x-fp-date: 20230222T115108Z' --header 'x-fp-signature: v1.1:1e3ab3b02b5bc626e3c32a37ee844266ade02bbcbaafc28fc7a0e46a76a7a1a8'
|
|
218
218
|
Active Theme: Emerge
|
|
219
219
|
```
|
|
220
220
|
|
package/package.json
CHANGED
|
@@ -36,8 +36,11 @@ declare class ApplicationClient {
|
|
|
36
36
|
*
|
|
37
37
|
* @param {import("./ApplicationConfig").LocationObject} locationDetails -
|
|
38
38
|
* The location details to set.
|
|
39
|
+
* @param {boolean} [isNew=false] - If passed `true`, it will flush all the
|
|
40
|
+
* old data and assign new one. if passed `false` it will update only new
|
|
41
|
+
* passed values and keep old values for other data. Default is `false`
|
|
39
42
|
*/
|
|
40
|
-
setLocationDetails(locationDetails: import("./ApplicationConfig").LocationObject): void;
|
|
43
|
+
setLocationDetails(locationDetails: import("./ApplicationConfig").LocationObject, isNew?: boolean): void;
|
|
41
44
|
/**
|
|
42
45
|
* Sets the currency code in ApplicationConfig.
|
|
43
46
|
*
|
|
@@ -58,12 +58,19 @@ class ApplicationClient {
|
|
|
58
58
|
*
|
|
59
59
|
* @param {import("./ApplicationConfig").LocationObject} locationDetails -
|
|
60
60
|
* The location details to set.
|
|
61
|
+
* @param {boolean} [isNew=false] - If passed `true`, it will flush all the
|
|
62
|
+
* old data and assign new one. if passed `false` it will update only new
|
|
63
|
+
* passed values and keep old values for other data. Default is `false`
|
|
61
64
|
*/
|
|
62
|
-
setLocationDetails(locationDetails) {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
setLocationDetails(locationDetails, isNew = false) {
|
|
66
|
+
if (isNew === true) {
|
|
67
|
+
this.config.locationDetails = locationDetails;
|
|
68
|
+
} else {
|
|
69
|
+
this.config.locationDetails = {
|
|
70
|
+
...this.config.locationDetails,
|
|
71
|
+
...locationDetails,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
67
74
|
}
|
|
68
75
|
|
|
69
76
|
/**
|
|
@@ -1129,23 +1129,23 @@ class CartApplicationModel {
|
|
|
1129
1129
|
aggregator: Joi.string().allow(""),
|
|
1130
1130
|
billing_address: Joi.any(),
|
|
1131
1131
|
billing_address_id: Joi.string().allow(""),
|
|
1132
|
-
callback_url: Joi.string().allow(""),
|
|
1132
|
+
callback_url: Joi.string().allow("").allow(null),
|
|
1133
1133
|
custom_meta: Joi.array().items(
|
|
1134
1134
|
CartApplicationModel.CartCheckoutCustomMeta()
|
|
1135
1135
|
),
|
|
1136
|
-
customer_details: Joi.any(),
|
|
1136
|
+
customer_details: Joi.any().allow(null),
|
|
1137
1137
|
delivery_address: Joi.any(),
|
|
1138
1138
|
extra_meta: Joi.any(),
|
|
1139
|
-
id: Joi.string().allow(""),
|
|
1139
|
+
id: Joi.string().allow("").allow(null),
|
|
1140
1140
|
merchant_code: Joi.string().allow(""),
|
|
1141
1141
|
meta: Joi.any(),
|
|
1142
1142
|
order_type: Joi.string().allow(""),
|
|
1143
|
-
ordering_store: Joi.number(),
|
|
1143
|
+
ordering_store: Joi.number().allow(null),
|
|
1144
1144
|
payment_auto_confirm: Joi.boolean(),
|
|
1145
1145
|
payment_extra_identifiers: Joi.any(),
|
|
1146
|
-
payment_identifier: Joi.string().allow(""),
|
|
1146
|
+
payment_identifier: Joi.string().allow("").allow(null),
|
|
1147
1147
|
payment_mode: Joi.string().allow("").required(),
|
|
1148
|
-
payment_params: Joi.any(),
|
|
1148
|
+
payment_params: Joi.any().allow(null),
|
|
1149
1149
|
staff: CartApplicationModel.StaffCheckout(),
|
|
1150
1150
|
});
|
|
1151
1151
|
}
|
|
@@ -1452,7 +1452,7 @@ class CartApplicationModel {
|
|
|
1452
1452
|
/** @returns {CustomerDetails} */
|
|
1453
1453
|
static CustomerDetails() {
|
|
1454
1454
|
return Joi.object({
|
|
1455
|
-
email: Joi.string().allow(""),
|
|
1455
|
+
email: Joi.string().allow("").allow(null),
|
|
1456
1456
|
mobile: Joi.string().allow("").required(),
|
|
1457
1457
|
name: Joi.string().allow(""),
|
|
1458
1458
|
});
|
|
@@ -290,6 +290,7 @@ export = LeadPlatformModel;
|
|
|
290
290
|
* @property {string} [created_at]
|
|
291
291
|
* @property {string} [dob]
|
|
292
292
|
* @property {Email[]} [emails]
|
|
293
|
+
* @property {string} [external_id]
|
|
293
294
|
* @property {string} [first_name]
|
|
294
295
|
* @property {string} [gender]
|
|
295
296
|
* @property {string} [last_name]
|
|
@@ -1006,6 +1007,7 @@ type UserSchema = {
|
|
|
1006
1007
|
created_at?: string;
|
|
1007
1008
|
dob?: string;
|
|
1008
1009
|
emails?: Email[];
|
|
1010
|
+
external_id?: string;
|
|
1009
1011
|
first_name?: string;
|
|
1010
1012
|
gender?: string;
|
|
1011
1013
|
last_name?: string;
|
|
@@ -329,6 +329,7 @@ const Joi = require("joi");
|
|
|
329
329
|
* @property {string} [created_at]
|
|
330
330
|
* @property {string} [dob]
|
|
331
331
|
* @property {Email[]} [emails]
|
|
332
|
+
* @property {string} [external_id]
|
|
332
333
|
* @property {string} [first_name]
|
|
333
334
|
* @property {string} [gender]
|
|
334
335
|
* @property {string} [last_name]
|
|
@@ -759,6 +760,7 @@ class LeadPlatformModel {
|
|
|
759
760
|
created_at: Joi.string().allow(""),
|
|
760
761
|
dob: Joi.string().allow(""),
|
|
761
762
|
emails: Joi.array().items(LeadPlatformModel.Email()),
|
|
763
|
+
external_id: Joi.string().allow(""),
|
|
762
764
|
first_name: Joi.string().allow(""),
|
|
763
765
|
gender: Joi.string().allow(""),
|
|
764
766
|
last_name: Joi.string().allow(""),
|
|
@@ -1761,7 +1761,6 @@ export = OrderPlatformModel;
|
|
|
1761
1761
|
* @property {LineItem[]} line_items
|
|
1762
1762
|
* @property {number} location_id
|
|
1763
1763
|
* @property {Object} [meta]
|
|
1764
|
-
* @property {string} [order_type]
|
|
1765
1764
|
* @property {number} [priority]
|
|
1766
1765
|
* @property {ProcessingDates} [processing_dates]
|
|
1767
1766
|
*/
|
|
@@ -2009,7 +2008,6 @@ export = OrderPlatformModel;
|
|
|
2009
2008
|
* @typedef ShipmentStatusData
|
|
2010
2009
|
* @property {string[]} [bag_list]
|
|
2011
2010
|
* @property {string} [created_at]
|
|
2012
|
-
* @property {string} [current_shipment_status]
|
|
2013
2011
|
* @property {string} [display_name]
|
|
2014
2012
|
* @property {number} [id]
|
|
2015
2013
|
* @property {Object} [meta]
|
|
@@ -4539,7 +4537,6 @@ type Shipment = {
|
|
|
4539
4537
|
line_items: LineItem[];
|
|
4540
4538
|
location_id: number;
|
|
4541
4539
|
meta?: any;
|
|
4542
|
-
order_type?: string;
|
|
4543
4540
|
priority?: number;
|
|
4544
4541
|
processing_dates?: ProcessingDates;
|
|
4545
4542
|
};
|
|
@@ -4813,7 +4810,6 @@ declare function ShipmentStatusData(): ShipmentStatusData;
|
|
|
4813
4810
|
type ShipmentStatusData = {
|
|
4814
4811
|
bag_list?: string[];
|
|
4815
4812
|
created_at?: string;
|
|
4816
|
-
current_shipment_status?: string;
|
|
4817
4813
|
display_name?: string;
|
|
4818
4814
|
id?: number;
|
|
4819
4815
|
meta?: any;
|
|
@@ -1955,7 +1955,6 @@ const Joi = require("joi");
|
|
|
1955
1955
|
* @property {LineItem[]} line_items
|
|
1956
1956
|
* @property {number} location_id
|
|
1957
1957
|
* @property {Object} [meta]
|
|
1958
|
-
* @property {string} [order_type]
|
|
1959
1958
|
* @property {number} [priority]
|
|
1960
1959
|
* @property {ProcessingDates} [processing_dates]
|
|
1961
1960
|
*/
|
|
@@ -2223,7 +2222,6 @@ const Joi = require("joi");
|
|
|
2223
2222
|
* @typedef ShipmentStatusData
|
|
2224
2223
|
* @property {string[]} [bag_list]
|
|
2225
2224
|
* @property {string} [created_at]
|
|
2226
|
-
* @property {string} [current_shipment_status]
|
|
2227
2225
|
* @property {string} [display_name]
|
|
2228
2226
|
* @property {number} [id]
|
|
2229
2227
|
* @property {Object} [meta]
|
|
@@ -4971,7 +4969,6 @@ class OrderPlatformModel {
|
|
|
4971
4969
|
line_items: Joi.array().items(OrderPlatformModel.LineItem()).required(),
|
|
4972
4970
|
location_id: Joi.number().required(),
|
|
4973
4971
|
meta: Joi.any(),
|
|
4974
|
-
order_type: Joi.string().allow(""),
|
|
4975
4972
|
priority: Joi.number(),
|
|
4976
4973
|
processing_dates: OrderPlatformModel.ProcessingDates(),
|
|
4977
4974
|
});
|
|
@@ -5287,7 +5284,6 @@ class OrderPlatformModel {
|
|
|
5287
5284
|
return Joi.object({
|
|
5288
5285
|
bag_list: Joi.array().items(Joi.string().allow("")),
|
|
5289
5286
|
created_at: Joi.string().allow("").allow(null),
|
|
5290
|
-
current_shipment_status: Joi.string().allow("").allow(null),
|
|
5291
5287
|
display_name: Joi.string().allow("").allow(null),
|
|
5292
5288
|
id: Joi.number().allow(null),
|
|
5293
5289
|
meta: Joi.any().allow(null),
|
|
@@ -34,6 +34,7 @@ export = UserPlatformModel;
|
|
|
34
34
|
/**
|
|
35
35
|
* @typedef CreateUserRequestSchema
|
|
36
36
|
* @property {string} [email]
|
|
37
|
+
* @property {string} [external_id]
|
|
37
38
|
* @property {string} [first_name]
|
|
38
39
|
* @property {string} [gender]
|
|
39
40
|
* @property {string} [last_name]
|
|
@@ -307,6 +308,7 @@ export = UserPlatformModel;
|
|
|
307
308
|
* @property {string} [created_at]
|
|
308
309
|
* @property {string} [dob]
|
|
309
310
|
* @property {Email[]} [emails]
|
|
311
|
+
* @property {string} [external_id]
|
|
310
312
|
* @property {string} [first_name]
|
|
311
313
|
* @property {string} [gender]
|
|
312
314
|
* @property {string} [last_name]
|
|
@@ -369,6 +371,7 @@ type CreateUserGroupSchema = {
|
|
|
369
371
|
declare function CreateUserRequestSchema(): CreateUserRequestSchema;
|
|
370
372
|
type CreateUserRequestSchema = {
|
|
371
373
|
email?: string;
|
|
374
|
+
external_id?: string;
|
|
372
375
|
first_name?: string;
|
|
373
376
|
gender?: string;
|
|
374
377
|
last_name?: string;
|
|
@@ -699,6 +702,7 @@ type UserSchema = {
|
|
|
699
702
|
created_at?: string;
|
|
700
703
|
dob?: string;
|
|
701
704
|
emails?: Email[];
|
|
705
|
+
external_id?: string;
|
|
702
706
|
first_name?: string;
|
|
703
707
|
gender?: string;
|
|
704
708
|
last_name?: string;
|
|
@@ -42,6 +42,7 @@ const Joi = require("joi");
|
|
|
42
42
|
/**
|
|
43
43
|
* @typedef CreateUserRequestSchema
|
|
44
44
|
* @property {string} [email]
|
|
45
|
+
* @property {string} [external_id]
|
|
45
46
|
* @property {string} [first_name]
|
|
46
47
|
* @property {string} [gender]
|
|
47
48
|
* @property {string} [last_name]
|
|
@@ -354,6 +355,7 @@ const Joi = require("joi");
|
|
|
354
355
|
* @property {string} [created_at]
|
|
355
356
|
* @property {string} [dob]
|
|
356
357
|
* @property {Email[]} [emails]
|
|
358
|
+
* @property {string} [external_id]
|
|
357
359
|
* @property {string} [first_name]
|
|
358
360
|
* @property {string} [gender]
|
|
359
361
|
* @property {string} [last_name]
|
|
@@ -428,6 +430,7 @@ class UserPlatformModel {
|
|
|
428
430
|
static CreateUserRequestSchema() {
|
|
429
431
|
return Joi.object({
|
|
430
432
|
email: Joi.string().allow(""),
|
|
433
|
+
external_id: Joi.string().allow(""),
|
|
431
434
|
first_name: Joi.string().allow(""),
|
|
432
435
|
gender: Joi.string().allow(""),
|
|
433
436
|
last_name: Joi.string().allow(""),
|
|
@@ -814,6 +817,7 @@ class UserPlatformModel {
|
|
|
814
817
|
created_at: Joi.string().allow(""),
|
|
815
818
|
dob: Joi.string().allow(""),
|
|
816
819
|
emails: Joi.array().items(UserPlatformModel.Email()),
|
|
820
|
+
external_id: Joi.string().allow(""),
|
|
817
821
|
first_name: Joi.string().allow(""),
|
|
818
822
|
gender: Joi.string().allow(""),
|
|
819
823
|
last_name: Joi.string().allow(""),
|