@gofynd/fdk-client-javascript 1.3.5-beta.1 → 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/platform/Catalog/CatalogPlatformModel.d.ts +4 -4
- package/sdk/platform/Catalog/CatalogPlatformModel.js +4 -4
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +2 -0
- package/sdk/platform/Lead/LeadPlatformModel.js +2 -0
- 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
|
/**
|
|
@@ -2044,12 +2044,12 @@ export = CatalogPlatformModel;
|
|
|
2044
2044
|
/**
|
|
2045
2045
|
* @typedef ProductBulkRequest
|
|
2046
2046
|
* @property {number} [cancelled]
|
|
2047
|
-
* @property {
|
|
2047
|
+
* @property {Object[]} [cancelled_records]
|
|
2048
2048
|
* @property {number} [company_id]
|
|
2049
2049
|
* @property {UserDetail1} [created_by]
|
|
2050
2050
|
* @property {string} [created_on]
|
|
2051
2051
|
* @property {number} [failed]
|
|
2052
|
-
* @property {
|
|
2052
|
+
* @property {Object[]} [failed_records]
|
|
2053
2053
|
* @property {string} [file_path]
|
|
2054
2054
|
* @property {boolean} [is_active]
|
|
2055
2055
|
* @property {UserDetail1} [modified_by]
|
|
@@ -6122,12 +6122,12 @@ type ProductBulkAssets = {
|
|
|
6122
6122
|
declare function ProductBulkRequest(): ProductBulkRequest;
|
|
6123
6123
|
type ProductBulkRequest = {
|
|
6124
6124
|
cancelled?: number;
|
|
6125
|
-
cancelled_records?:
|
|
6125
|
+
cancelled_records?: any[];
|
|
6126
6126
|
company_id?: number;
|
|
6127
6127
|
created_by?: UserDetail1;
|
|
6128
6128
|
created_on?: string;
|
|
6129
6129
|
failed?: number;
|
|
6130
|
-
failed_records?:
|
|
6130
|
+
failed_records?: any[];
|
|
6131
6131
|
file_path?: string;
|
|
6132
6132
|
is_active?: boolean;
|
|
6133
6133
|
modified_by?: UserDetail1;
|
|
@@ -2285,12 +2285,12 @@ const Joi = require("joi");
|
|
|
2285
2285
|
/**
|
|
2286
2286
|
* @typedef ProductBulkRequest
|
|
2287
2287
|
* @property {number} [cancelled]
|
|
2288
|
-
* @property {
|
|
2288
|
+
* @property {Object[]} [cancelled_records]
|
|
2289
2289
|
* @property {number} [company_id]
|
|
2290
2290
|
* @property {UserDetail1} [created_by]
|
|
2291
2291
|
* @property {string} [created_on]
|
|
2292
2292
|
* @property {number} [failed]
|
|
2293
|
-
* @property {
|
|
2293
|
+
* @property {Object[]} [failed_records]
|
|
2294
2294
|
* @property {string} [file_path]
|
|
2295
2295
|
* @property {boolean} [is_active]
|
|
2296
2296
|
* @property {UserDetail1} [modified_by]
|
|
@@ -6092,12 +6092,12 @@ class CatalogPlatformModel {
|
|
|
6092
6092
|
static ProductBulkRequest() {
|
|
6093
6093
|
return Joi.object({
|
|
6094
6094
|
cancelled: Joi.number(),
|
|
6095
|
-
cancelled_records: Joi.array().items(Joi.
|
|
6095
|
+
cancelled_records: Joi.array().items(Joi.any()),
|
|
6096
6096
|
company_id: Joi.number(),
|
|
6097
6097
|
created_by: CatalogPlatformModel.UserDetail1(),
|
|
6098
6098
|
created_on: Joi.string().allow(""),
|
|
6099
6099
|
failed: Joi.number(),
|
|
6100
|
-
failed_records: Joi.array().items(Joi.
|
|
6100
|
+
failed_records: Joi.array().items(Joi.any()),
|
|
6101
6101
|
file_path: Joi.string().allow(""),
|
|
6102
6102
|
is_active: Joi.boolean(),
|
|
6103
6103
|
modified_by: CatalogPlatformModel.UserDetail1(),
|
|
@@ -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(""),
|
|
@@ -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(""),
|