@gofynd/fdk-client-javascript 3.18.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/application/Order/OrderApplicationClient.d.ts +11 -0
- package/sdk/application/Order/OrderApplicationClient.js +49 -0
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +1 -1
- package/sdk/application/Payment/PaymentApplicationClient.js +2 -0
- package/sdk/common/utils.d.ts +1 -1
- package/sdk/common/utils.js +1 -0
- 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/partner/Webhook/WebhookPartnerClient.d.ts +46 -0
- package/sdk/partner/Webhook/WebhookPartnerClient.js +334 -0
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +222 -1
- package/sdk/partner/Webhook/WebhookPartnerModel.js +165 -0
- package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +4 -0
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +30 -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 +6 -6
- package/sdk/platform/Order/OrderPlatformModel.js +5 -5
- 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 +43 -3
- package/sdk/platform/User/UserPlatformModel.js +27 -3
|
@@ -2044,7 +2044,9 @@ class User {
|
|
|
2044
2044
|
*
|
|
2045
2045
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2046
2046
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2047
|
-
* @returns {Promise<
|
|
2047
|
+
* @returns {Promise<UserPlatformModel.UserAttributeDefinitionsResponseSchema>}
|
|
2048
|
+
* - Success response
|
|
2049
|
+
*
|
|
2048
2050
|
* @name getUserAttributesForUser
|
|
2049
2051
|
* @summary: Get All Customer Attributes
|
|
2050
2052
|
* @description: Retrieve all user attributes for a specific user - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/getUserAttributesForUser/).
|
|
@@ -2106,10 +2108,12 @@ class User {
|
|
|
2106
2108
|
responseData = response[0];
|
|
2107
2109
|
}
|
|
2108
2110
|
|
|
2109
|
-
const {
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2111
|
+
const {
|
|
2112
|
+
error: res_error,
|
|
2113
|
+
} = UserPlatformModel.UserAttributeDefinitionsResponseSchema().validate(
|
|
2114
|
+
responseData,
|
|
2115
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2116
|
+
);
|
|
2113
2117
|
|
|
2114
2118
|
if (res_error) {
|
|
2115
2119
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -9,6 +9,11 @@ export = UserPlatformModel;
|
|
|
9
9
|
* definition objects.
|
|
10
10
|
* @property {PaginationSchema} [page]
|
|
11
11
|
*/
|
|
12
|
+
/**
|
|
13
|
+
* @typedef UserAttributeDefinitionsResponseSchema
|
|
14
|
+
* @property {UserAttribute[]} [items]
|
|
15
|
+
* @property {PaginationSchema} [page]
|
|
16
|
+
*/
|
|
12
17
|
/**
|
|
13
18
|
* @typedef UserAttributeDefinition
|
|
14
19
|
* @property {string} [_id] - The unique identifier for the attribute definition.
|
|
@@ -34,6 +39,7 @@ export = UserPlatformModel;
|
|
|
34
39
|
* @property {string} [created_at] - The creation date of the attribute.
|
|
35
40
|
* @property {string} [modified_at] - The modification date of the attribute.
|
|
36
41
|
* @property {number} [__v] - The version number of the attribute.
|
|
42
|
+
* @property {string[]} [options] - List of possible values for the attribute
|
|
37
43
|
*/
|
|
38
44
|
/**
|
|
39
45
|
* @typedef UserAttributeDefinitionDetails
|
|
@@ -421,6 +427,8 @@ export = UserPlatformModel;
|
|
|
421
427
|
* @property {Object} [meta]
|
|
422
428
|
* @property {string} [external_id]
|
|
423
429
|
* @property {string} [rr_id]
|
|
430
|
+
* @property {string} [dob] - User's date of birth in ISO date
|
|
431
|
+
* format("1990-01-01T00:00:00.000Z").
|
|
424
432
|
*/
|
|
425
433
|
/**
|
|
426
434
|
* @typedef CreateUserResponseSchema
|
|
@@ -608,6 +616,8 @@ export = UserPlatformModel;
|
|
|
608
616
|
* @typedef UpdateUserRequestSchema
|
|
609
617
|
* @property {string} [first_name]
|
|
610
618
|
* @property {string} [last_name]
|
|
619
|
+
* @property {string} [dob] - User's date of birth in ISO date
|
|
620
|
+
* format("1990-01-01T00:00:00.000Z").
|
|
611
621
|
* @property {string} [gender]
|
|
612
622
|
* @property {string} [external_id]
|
|
613
623
|
* @property {string} [rr_id]
|
|
@@ -640,7 +650,8 @@ export = UserPlatformModel;
|
|
|
640
650
|
* @property {PhoneNumber[]} [phone_numbers]
|
|
641
651
|
* @property {Email[]} [emails]
|
|
642
652
|
* @property {string} [gender]
|
|
643
|
-
* @property {string} [dob]
|
|
653
|
+
* @property {string} [dob] - User's date of birth in ISO date
|
|
654
|
+
* format("1990-01-01T00:00:00.000Z").
|
|
644
655
|
* @property {boolean} [active]
|
|
645
656
|
* @property {string} [profile_pic_url]
|
|
646
657
|
* @property {string} [username]
|
|
@@ -662,7 +673,8 @@ export = UserPlatformModel;
|
|
|
662
673
|
* @property {PhoneNumber[]} [phone_numbers]
|
|
663
674
|
* @property {Email[]} [emails]
|
|
664
675
|
* @property {string} [gender]
|
|
665
|
-
* @property {string} [dob]
|
|
676
|
+
* @property {string} [dob] - User's date of birth in ISO date
|
|
677
|
+
* format("1990-01-01T00:00:00.000Z").
|
|
666
678
|
* @property {boolean} [active]
|
|
667
679
|
* @property {string} [profile_pic_url]
|
|
668
680
|
* @property {string} [username]
|
|
@@ -710,7 +722,7 @@ export = UserPlatformModel;
|
|
|
710
722
|
declare class UserPlatformModel {
|
|
711
723
|
}
|
|
712
724
|
declare namespace UserPlatformModel {
|
|
713
|
-
export { SuccessMessage, UserAttributeDefinitionList, UserAttributeDefinition, UserAttributeDefinitionDetails, AttributeMaskingProperties, AttributeRegistrationProperties, UserAttributeDefinitionValidation, BulkUserAttribute, UserAttribute, CreateBulkUserAttribute, BulkUserAttributeRequestBody, CreateUserAttribute, CreateUserAttributeDefinition, CreateStoreFrontUsersPayload, BulkUserExportSchema, BulkActionModel, CreatedBySchema, BulkActionLinkSchema, FileLinks, BulkActionCountSchema, BlockUserRequestSchema, ArchiveUserRequestSchema, UnDeleteUserRequestSchema, BlockUserSuccess, ArchiveUserSuccess, UnDeleteUserSuccess, UserSearchResponseSchema, CustomerListResponseSchema, BulkActionPaginationSchema, PaginationSchema, SessionListResponseSchema, SessionDeleteResponseSchema, SessionsDeleteResponseSchema, APIError, SessionListResponseInfo, Conditions, UserResponseErrorSchema, UserGroupResponseSchema, UserGroupListResponseSchema, ConditionsSchema, DeleteBulkUserAttribute, UserAttributeFilter, UserAttributeFilterQuery, UserAttributeFilterRequestConditions, UserAttributeFiltered, UserAttributeFilteredList, CreateUserGroup, CreateUserRequestSchema, CreateUserResponseSchema, CreateUserSessionRequestSchema, CreateUserSessionResponseSchema, PlatformSchema, LookAndFeel, Login, MetaSchema, Social, RequiredFields, PlatformEmail, PlatformMobile, RegisterRequiredFields, RegisterRequiredFieldsEmail, RegisterRequiredFieldsMobile, FlashCard, SocialTokens, DeleteAccountReasons, DeleteAccountConsent, GetUserTimeline, UserTimeline, Facebook, Accountkit, Google, SessionExpiry, UpdateUserGroupSchema, PartialUserGroupUpdateSchema, UserGroupUpdateData, UpdateUserRequestSchema, UserEmails, UserPhoneNumbers, UserSchema, UserSearchSchema, PhoneNumber, Email, UserConsent, DeleteUserGroupSuccess, PrivacyPolicyConsentSchema };
|
|
725
|
+
export { SuccessMessage, UserAttributeDefinitionList, UserAttributeDefinitionsResponseSchema, UserAttributeDefinition, UserAttributeDefinitionDetails, AttributeMaskingProperties, AttributeRegistrationProperties, UserAttributeDefinitionValidation, BulkUserAttribute, UserAttribute, CreateBulkUserAttribute, BulkUserAttributeRequestBody, CreateUserAttribute, CreateUserAttributeDefinition, CreateStoreFrontUsersPayload, BulkUserExportSchema, BulkActionModel, CreatedBySchema, BulkActionLinkSchema, FileLinks, BulkActionCountSchema, BlockUserRequestSchema, ArchiveUserRequestSchema, UnDeleteUserRequestSchema, BlockUserSuccess, ArchiveUserSuccess, UnDeleteUserSuccess, UserSearchResponseSchema, CustomerListResponseSchema, BulkActionPaginationSchema, PaginationSchema, SessionListResponseSchema, SessionDeleteResponseSchema, SessionsDeleteResponseSchema, APIError, SessionListResponseInfo, Conditions, UserResponseErrorSchema, UserGroupResponseSchema, UserGroupListResponseSchema, ConditionsSchema, DeleteBulkUserAttribute, UserAttributeFilter, UserAttributeFilterQuery, UserAttributeFilterRequestConditions, UserAttributeFiltered, UserAttributeFilteredList, CreateUserGroup, CreateUserRequestSchema, CreateUserResponseSchema, CreateUserSessionRequestSchema, CreateUserSessionResponseSchema, PlatformSchema, LookAndFeel, Login, MetaSchema, Social, RequiredFields, PlatformEmail, PlatformMobile, RegisterRequiredFields, RegisterRequiredFieldsEmail, RegisterRequiredFieldsMobile, FlashCard, SocialTokens, DeleteAccountReasons, DeleteAccountConsent, GetUserTimeline, UserTimeline, Facebook, Accountkit, Google, SessionExpiry, UpdateUserGroupSchema, PartialUserGroupUpdateSchema, UserGroupUpdateData, UpdateUserRequestSchema, UserEmails, UserPhoneNumbers, UserSchema, UserSearchSchema, PhoneNumber, Email, UserConsent, DeleteUserGroupSuccess, PrivacyPolicyConsentSchema };
|
|
714
726
|
}
|
|
715
727
|
/** @returns {SuccessMessage} */
|
|
716
728
|
declare function SuccessMessage(): SuccessMessage;
|
|
@@ -727,6 +739,12 @@ type UserAttributeDefinitionList = {
|
|
|
727
739
|
items?: UserAttributeDefinition[];
|
|
728
740
|
page?: PaginationSchema;
|
|
729
741
|
};
|
|
742
|
+
/** @returns {UserAttributeDefinitionsResponseSchema} */
|
|
743
|
+
declare function UserAttributeDefinitionsResponseSchema(): UserAttributeDefinitionsResponseSchema;
|
|
744
|
+
type UserAttributeDefinitionsResponseSchema = {
|
|
745
|
+
items?: UserAttribute[];
|
|
746
|
+
page?: PaginationSchema;
|
|
747
|
+
};
|
|
730
748
|
/** @returns {UserAttributeDefinition} */
|
|
731
749
|
declare function UserAttributeDefinition(): UserAttributeDefinition;
|
|
732
750
|
type UserAttributeDefinition = {
|
|
@@ -804,6 +822,10 @@ type UserAttributeDefinition = {
|
|
|
804
822
|
* - The version number of the attribute.
|
|
805
823
|
*/
|
|
806
824
|
__v?: number;
|
|
825
|
+
/**
|
|
826
|
+
* - List of possible values for the attribute
|
|
827
|
+
*/
|
|
828
|
+
options?: string[];
|
|
807
829
|
};
|
|
808
830
|
/** @returns {UserAttributeDefinitionDetails} */
|
|
809
831
|
declare function UserAttributeDefinitionDetails(): UserAttributeDefinitionDetails;
|
|
@@ -1550,6 +1572,11 @@ type CreateUserRequestSchema = {
|
|
|
1550
1572
|
meta?: any;
|
|
1551
1573
|
external_id?: string;
|
|
1552
1574
|
rr_id?: string;
|
|
1575
|
+
/**
|
|
1576
|
+
* - User's date of birth in ISO date
|
|
1577
|
+
* format("1990-01-01T00:00:00.000Z").
|
|
1578
|
+
*/
|
|
1579
|
+
dob?: string;
|
|
1553
1580
|
};
|
|
1554
1581
|
/** @returns {CreateUserResponseSchema} */
|
|
1555
1582
|
declare function CreateUserResponseSchema(): CreateUserResponseSchema;
|
|
@@ -1804,6 +1831,11 @@ declare function UpdateUserRequestSchema(): UpdateUserRequestSchema;
|
|
|
1804
1831
|
type UpdateUserRequestSchema = {
|
|
1805
1832
|
first_name?: string;
|
|
1806
1833
|
last_name?: string;
|
|
1834
|
+
/**
|
|
1835
|
+
* - User's date of birth in ISO date
|
|
1836
|
+
* format("1990-01-01T00:00:00.000Z").
|
|
1837
|
+
*/
|
|
1838
|
+
dob?: string;
|
|
1807
1839
|
gender?: string;
|
|
1808
1840
|
external_id?: string;
|
|
1809
1841
|
rr_id?: string;
|
|
@@ -1839,6 +1871,10 @@ type UserSchema = {
|
|
|
1839
1871
|
phone_numbers?: PhoneNumber[];
|
|
1840
1872
|
emails?: Email[];
|
|
1841
1873
|
gender?: string;
|
|
1874
|
+
/**
|
|
1875
|
+
* - User's date of birth in ISO date
|
|
1876
|
+
* format("1990-01-01T00:00:00.000Z").
|
|
1877
|
+
*/
|
|
1842
1878
|
dob?: string;
|
|
1843
1879
|
active?: boolean;
|
|
1844
1880
|
profile_pic_url?: string;
|
|
@@ -1862,6 +1898,10 @@ type UserSearchSchema = {
|
|
|
1862
1898
|
phone_numbers?: PhoneNumber[];
|
|
1863
1899
|
emails?: Email[];
|
|
1864
1900
|
gender?: string;
|
|
1901
|
+
/**
|
|
1902
|
+
* - User's date of birth in ISO date
|
|
1903
|
+
* format("1990-01-01T00:00:00.000Z").
|
|
1904
|
+
*/
|
|
1865
1905
|
dob?: string;
|
|
1866
1906
|
active?: boolean;
|
|
1867
1907
|
profile_pic_url?: string;
|
|
@@ -12,6 +12,12 @@ const Joi = require("joi");
|
|
|
12
12
|
* @property {PaginationSchema} [page]
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
+
/**
|
|
16
|
+
* @typedef UserAttributeDefinitionsResponseSchema
|
|
17
|
+
* @property {UserAttribute[]} [items]
|
|
18
|
+
* @property {PaginationSchema} [page]
|
|
19
|
+
*/
|
|
20
|
+
|
|
15
21
|
/**
|
|
16
22
|
* @typedef UserAttributeDefinition
|
|
17
23
|
* @property {string} [_id] - The unique identifier for the attribute definition.
|
|
@@ -37,6 +43,7 @@ const Joi = require("joi");
|
|
|
37
43
|
* @property {string} [created_at] - The creation date of the attribute.
|
|
38
44
|
* @property {string} [modified_at] - The modification date of the attribute.
|
|
39
45
|
* @property {number} [__v] - The version number of the attribute.
|
|
46
|
+
* @property {string[]} [options] - List of possible values for the attribute
|
|
40
47
|
*/
|
|
41
48
|
|
|
42
49
|
/**
|
|
@@ -469,6 +476,8 @@ const Joi = require("joi");
|
|
|
469
476
|
* @property {Object} [meta]
|
|
470
477
|
* @property {string} [external_id]
|
|
471
478
|
* @property {string} [rr_id]
|
|
479
|
+
* @property {string} [dob] - User's date of birth in ISO date
|
|
480
|
+
* format("1990-01-01T00:00:00.000Z").
|
|
472
481
|
*/
|
|
473
482
|
|
|
474
483
|
/**
|
|
@@ -684,6 +693,8 @@ const Joi = require("joi");
|
|
|
684
693
|
* @typedef UpdateUserRequestSchema
|
|
685
694
|
* @property {string} [first_name]
|
|
686
695
|
* @property {string} [last_name]
|
|
696
|
+
* @property {string} [dob] - User's date of birth in ISO date
|
|
697
|
+
* format("1990-01-01T00:00:00.000Z").
|
|
687
698
|
* @property {string} [gender]
|
|
688
699
|
* @property {string} [external_id]
|
|
689
700
|
* @property {string} [rr_id]
|
|
@@ -719,7 +730,8 @@ const Joi = require("joi");
|
|
|
719
730
|
* @property {PhoneNumber[]} [phone_numbers]
|
|
720
731
|
* @property {Email[]} [emails]
|
|
721
732
|
* @property {string} [gender]
|
|
722
|
-
* @property {string} [dob]
|
|
733
|
+
* @property {string} [dob] - User's date of birth in ISO date
|
|
734
|
+
* format("1990-01-01T00:00:00.000Z").
|
|
723
735
|
* @property {boolean} [active]
|
|
724
736
|
* @property {string} [profile_pic_url]
|
|
725
737
|
* @property {string} [username]
|
|
@@ -742,7 +754,8 @@ const Joi = require("joi");
|
|
|
742
754
|
* @property {PhoneNumber[]} [phone_numbers]
|
|
743
755
|
* @property {Email[]} [emails]
|
|
744
756
|
* @property {string} [gender]
|
|
745
|
-
* @property {string} [dob]
|
|
757
|
+
* @property {string} [dob] - User's date of birth in ISO date
|
|
758
|
+
* format("1990-01-01T00:00:00.000Z").
|
|
746
759
|
* @property {boolean} [active]
|
|
747
760
|
* @property {string} [profile_pic_url]
|
|
748
761
|
* @property {string} [username]
|
|
@@ -809,6 +822,14 @@ class UserPlatformModel {
|
|
|
809
822
|
});
|
|
810
823
|
}
|
|
811
824
|
|
|
825
|
+
/** @returns {UserAttributeDefinitionsResponseSchema} */
|
|
826
|
+
static UserAttributeDefinitionsResponseSchema() {
|
|
827
|
+
return Joi.object({
|
|
828
|
+
items: Joi.array().items(UserPlatformModel.UserAttribute()),
|
|
829
|
+
page: UserPlatformModel.PaginationSchema(),
|
|
830
|
+
});
|
|
831
|
+
}
|
|
832
|
+
|
|
812
833
|
/** @returns {UserAttributeDefinition} */
|
|
813
834
|
static UserAttributeDefinition() {
|
|
814
835
|
return Joi.object({
|
|
@@ -832,6 +853,7 @@ class UserPlatformModel {
|
|
|
832
853
|
created_at: Joi.string().allow(""),
|
|
833
854
|
modified_at: Joi.string().allow(""),
|
|
834
855
|
__v: Joi.number(),
|
|
856
|
+
options: Joi.array().items(Joi.string().allow("")),
|
|
835
857
|
});
|
|
836
858
|
}
|
|
837
859
|
|
|
@@ -926,7 +948,7 @@ class UserPlatformModel {
|
|
|
926
948
|
static BulkUserAttributeRequestBody() {
|
|
927
949
|
return Joi.object({
|
|
928
950
|
definition_id: Joi.string().allow("").required(),
|
|
929
|
-
value: Joi.
|
|
951
|
+
value: Joi.any().required(),
|
|
930
952
|
});
|
|
931
953
|
}
|
|
932
954
|
|
|
@@ -1307,6 +1329,7 @@ class UserPlatformModel {
|
|
|
1307
1329
|
meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
1308
1330
|
external_id: Joi.string().allow(""),
|
|
1309
1331
|
rr_id: Joi.string().allow(""),
|
|
1332
|
+
dob: Joi.string().allow(""),
|
|
1310
1333
|
});
|
|
1311
1334
|
}
|
|
1312
1335
|
|
|
@@ -1574,6 +1597,7 @@ class UserPlatformModel {
|
|
|
1574
1597
|
return Joi.object({
|
|
1575
1598
|
first_name: Joi.string().allow(""),
|
|
1576
1599
|
last_name: Joi.string().allow(""),
|
|
1600
|
+
dob: Joi.string().allow(""),
|
|
1577
1601
|
gender: Joi.string().allow(""),
|
|
1578
1602
|
external_id: Joi.string().allow(""),
|
|
1579
1603
|
rr_id: Joi.string().allow(""),
|