@gofynd/fdk-client-javascript 3.3.5 → 3.4.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 +30 -30
- package/sdk/application/Cart/CartApplicationClient.js +30 -30
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +36 -33
- package/sdk/application/Catalog/CatalogApplicationClient.js +54 -35
- package/sdk/application/Common/CommonApplicationClient.d.ts +2 -2
- package/sdk/application/Common/CommonApplicationClient.js +2 -2
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +3 -3
- package/sdk/application/Communication/CommunicationApplicationClient.js +3 -3
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +16 -16
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +16 -16
- package/sdk/application/Content/ContentApplicationClient.d.ts +24 -24
- package/sdk/application/Content/ContentApplicationClient.js +24 -24
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +3 -3
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +3 -3
- package/sdk/application/Finance/FinanceApplicationClient.d.ts +2 -2
- package/sdk/application/Finance/FinanceApplicationClient.js +2 -2
- package/sdk/application/Lead/LeadApplicationClient.d.ts +5 -5
- package/sdk/application/Lead/LeadApplicationClient.js +5 -5
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +19 -9
- package/sdk/application/Logistic/LogisticApplicationClient.js +53 -9
- package/sdk/application/Order/OrderApplicationClient.d.ts +12 -12
- package/sdk/application/Order/OrderApplicationClient.js +12 -12
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +46 -46
- package/sdk/application/Payment/PaymentApplicationClient.js +46 -46
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +7 -7
- package/sdk/application/Rewards/RewardsApplicationClient.js +7 -7
- package/sdk/application/Share/ShareApplicationClient.d.ts +7 -7
- package/sdk/application/Share/ShareApplicationClient.js +7 -7
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +4 -4
- package/sdk/application/Theme/ThemeApplicationClient.js +4 -4
- package/sdk/application/User/UserApplicationClient.d.ts +47 -47
- package/sdk/application/User/UserApplicationClient.js +47 -47
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +1 -1
- package/sdk/application/Webhook/WebhookApplicationClient.js +1 -1
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +6 -6
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +6 -6
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +7 -7
- package/sdk/partner/Lead/LeadPartnerClient.js +7 -7
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +2 -2
- package/sdk/partner/Lead/LeadPartnerModel.js +1 -1
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +25 -25
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +25 -25
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +6 -6
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +3 -3
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +24 -24
- package/sdk/partner/Theme/ThemePartnerClient.js +24 -24
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +10 -10
- package/sdk/partner/Webhook/WebhookPartnerClient.js +10 -10
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +7 -2
- package/sdk/partner/Webhook/WebhookPartnerModel.js +3 -1
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +3 -3
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +3 -3
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +2 -2
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +1 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +1 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +1 -1
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +5 -5
- package/sdk/platform/Billing/BillingPlatformClient.js +5 -5
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +62 -62
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +62 -62
- package/sdk/platform/Cart/CartPlatformModel.d.ts +233 -3
- package/sdk/platform/Cart/CartPlatformModel.js +147 -1
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +66 -66
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +66 -66
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +81 -79
- package/sdk/platform/Catalog/CatalogPlatformClient.js +93 -80
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +89 -5
- package/sdk/platform/Catalog/CatalogPlatformModel.js +57 -3
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +7 -2
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +4 -2
- package/sdk/platform/Common/CommonPlatformClient.d.ts +2 -2
- package/sdk/platform/Common/CommonPlatformClient.js +2 -2
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +67 -67
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +67 -67
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +1 -1
- package/sdk/platform/Communication/CommunicationPlatformClient.js +1 -1
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +2 -2
- package/sdk/platform/Communication/CommunicationPlatformModel.js +1 -1
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +14 -14
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +14 -14
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +2 -2
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +1 -1
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +32 -32
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +32 -32
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +11 -11
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +11 -11
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +19 -3
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +16 -1
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +107 -107
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +107 -107
- package/sdk/platform/Content/ContentPlatformClient.d.ts +40 -40
- package/sdk/platform/Content/ContentPlatformClient.js +40 -40
- package/sdk/platform/Content/ContentPlatformModel.d.ts +2 -2
- package/sdk/platform/Content/ContentPlatformModel.js +1 -1
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +11 -11
- package/sdk/platform/Discount/DiscountPlatformClient.js +11 -11
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +2 -2
- package/sdk/platform/Discount/DiscountPlatformModel.js +1 -1
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +4 -4
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +4 -4
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +6 -6
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +6 -6
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +10 -10
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +10 -10
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +9 -9
- package/sdk/platform/Lead/LeadPlatformClient.js +9 -9
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +2 -2
- package/sdk/platform/Lead/LeadPlatformModel.js +1 -1
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +5 -5
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +5 -5
- package/sdk/platform/Order/OrderPlatformClient.d.ts +58 -58
- package/sdk/platform/Order/OrderPlatformClient.js +58 -58
- package/sdk/platform/Order/OrderPlatformModel.d.ts +29 -10
- package/sdk/platform/Order/OrderPlatformModel.js +28 -6
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +2 -2
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +51 -51
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +51 -51
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +10 -10
- package/sdk/platform/Payment/PaymentPlatformClient.js +10 -10
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2 -2
- package/sdk/platform/Payment/PaymentPlatformModel.js +1 -1
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +12 -12
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +12 -12
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformModel.js +1 -1
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +162 -39
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +840 -73
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +139 -1
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +125 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +30 -30
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +36 -30
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +936 -62
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +591 -33
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +12 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +5 -0
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +5 -5
- package/sdk/platform/Share/SharePlatformApplicationClient.js +5 -5
- package/sdk/platform/Share/SharePlatformModel.d.ts +2 -2
- package/sdk/platform/Share/SharePlatformModel.js +1 -1
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +22 -22
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +22 -22
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +4 -4
- package/sdk/platform/Theme/ThemePlatformClient.js +4 -4
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +70 -34
- package/sdk/platform/User/UserPlatformApplicationClient.js +285 -34
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +38 -1
- package/sdk/platform/User/UserPlatformApplicationValidator.js +42 -0
- package/sdk/platform/User/UserPlatformModel.d.ts +430 -10
- package/sdk/platform/User/UserPlatformModel.js +276 -7
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +9 -9
- package/sdk/platform/Webhook/WebhookPlatformClient.js +9 -9
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +12 -2
- package/sdk/platform/Webhook/WebhookPlatformModel.js +5 -1
- package/sdk/public/Catalog/CatalogPublicClient.d.ts +1 -1
- package/sdk/public/Catalog/CatalogPublicClient.js +1 -1
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +2 -2
- package/sdk/public/Configuration/ConfigurationPublicClient.js +2 -2
- package/sdk/public/Content/ContentPublicClient.d.ts +14 -14
- package/sdk/public/Content/ContentPublicClient.js +14 -14
- package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
- package/sdk/public/Partner/PartnerPublicClient.js +1 -1
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +5 -5
- package/sdk/public/Webhook/WebhookPublicClient.js +5 -5
|
@@ -22,7 +22,7 @@ class User {
|
|
|
22
22
|
* @returns {Promise<UserPlatformModel.ArchiveUserSuccess>} - Success response
|
|
23
23
|
* @name archiveUser
|
|
24
24
|
* @summary: Archive User
|
|
25
|
-
* @description: Delete user from sales channel, allowing re-registration with the same mobile/email for a new user account. - Check out [method documentation](https://
|
|
25
|
+
* @description: Delete user from sales channel, allowing re-registration with the same mobile/email for a new user account. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/archiveUser/).
|
|
26
26
|
*/
|
|
27
27
|
async archiveUser(
|
|
28
28
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -99,7 +99,7 @@ class User {
|
|
|
99
99
|
* @returns {Promise<UserPlatformModel.BlockUserSuccess>} - Success response
|
|
100
100
|
* @name blockOrUnblockUsers
|
|
101
101
|
* @summary: Block/Unblock Users
|
|
102
|
-
* @description: Manage user access by blocking or unblocking their accounts, restricting login for blocked accounts and allowing login for unblocked accounts. - Check out [method documentation](https://
|
|
102
|
+
* @description: Manage user access by blocking or unblocking their accounts, restricting login for blocked accounts and allowing login for unblocked accounts. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/blockOrUnblockUsers/).
|
|
103
103
|
*/
|
|
104
104
|
async blockOrUnblockUsers(
|
|
105
105
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -180,7 +180,7 @@ class User {
|
|
|
180
180
|
* @returns {Promise<UserPlatformModel.BulkActionModel>} - Success response
|
|
181
181
|
* @name bulkImportStoreFrontUsers
|
|
182
182
|
* @summary: Bulk import storefront customers using CSV and XLSX files.
|
|
183
|
-
* @description: The API allows bulk import of storefront customers using CSV or XLSX files. - Check out [method documentation](https://
|
|
183
|
+
* @description: The API allows bulk import of storefront customers using CSV or XLSX files. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/bulkImportStoreFrontUsers/).
|
|
184
184
|
*/
|
|
185
185
|
async bulkImportStoreFrontUsers(
|
|
186
186
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -261,7 +261,7 @@ class User {
|
|
|
261
261
|
* @returns {Promise<UserPlatformModel.BulkActionModel>} - Success response
|
|
262
262
|
* @name createBulkExportUsers
|
|
263
263
|
* @summary: Bulk export storefront customers using CSV and XLSX files.
|
|
264
|
-
* @description: This API allows bulk export of storefront users by requesting files in CSV or XLSX format. - Check out [method documentation](https://
|
|
264
|
+
* @description: This API allows bulk export of storefront users by requesting files in CSV or XLSX format. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/createBulkExportUsers/).
|
|
265
265
|
*/
|
|
266
266
|
async createBulkExportUsers(
|
|
267
267
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -340,7 +340,7 @@ class User {
|
|
|
340
340
|
* @returns {Promise<UserPlatformModel.CreateUserResponseSchema>} - Success response
|
|
341
341
|
* @name createUser
|
|
342
342
|
* @summary: Create User
|
|
343
|
-
* @description: Register and add a new user to the sales channel. - Check out [method documentation](https://
|
|
343
|
+
* @description: Register and add a new user to the sales channel. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/createUser/).
|
|
344
344
|
*/
|
|
345
345
|
async createUser(
|
|
346
346
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -420,7 +420,7 @@ class User {
|
|
|
420
420
|
* Success response
|
|
421
421
|
* @name createUserAttributeDefinition
|
|
422
422
|
* @summary: Create a User Attribute Definition
|
|
423
|
-
* @description: Create a new User Attribute Definition - Check out [method documentation](https://
|
|
423
|
+
* @description: Create a new User Attribute Definition - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/createUserAttributeDefinition/).
|
|
424
424
|
*/
|
|
425
425
|
async createUserAttributeDefinition(
|
|
426
426
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -499,7 +499,7 @@ class User {
|
|
|
499
499
|
* @returns {Promise<UserPlatformModel.UserGroupResponseSchema>} - Success response
|
|
500
500
|
* @name createUserGroup
|
|
501
501
|
* @summary: Create User Group
|
|
502
|
-
* @description: Form and add a new user group. - Check out [method documentation](https://
|
|
502
|
+
* @description: Form and add a new user group. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/createUserGroup/).
|
|
503
503
|
*/
|
|
504
504
|
async createUserGroup(
|
|
505
505
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -579,7 +579,7 @@ class User {
|
|
|
579
579
|
* Success response
|
|
580
580
|
* @name createUserSession
|
|
581
581
|
* @summary: Create User Session
|
|
582
|
-
* @description: Create session for user interactions - Check out [method documentation](https://
|
|
582
|
+
* @description: Create session for user interactions - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/createUserSession/).
|
|
583
583
|
*/
|
|
584
584
|
async createUserSession(
|
|
585
585
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -661,7 +661,7 @@ class User {
|
|
|
661
661
|
* Success response
|
|
662
662
|
* @name deleteActiveSessions
|
|
663
663
|
* @summary: Delete User Active Sessions
|
|
664
|
-
* @description: Terminate all active user sessions. - Check out [method documentation](https://
|
|
664
|
+
* @description: Terminate all active user sessions. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/deleteActiveSessions/).
|
|
665
665
|
*/
|
|
666
666
|
async deleteActiveSessions(
|
|
667
667
|
{ id, reason, requestHeaders } = { requestHeaders: {} },
|
|
@@ -745,7 +745,7 @@ class User {
|
|
|
745
745
|
* Success response
|
|
746
746
|
* @name deleteSession
|
|
747
747
|
* @summary: Delete User Session
|
|
748
|
-
* @description: Terminate an active user session. - Check out [method documentation](https://
|
|
748
|
+
* @description: Terminate an active user session. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/deleteSession/).
|
|
749
749
|
*/
|
|
750
750
|
async deleteSession(
|
|
751
751
|
{ id, sessionId, reason, requestHeaders } = { requestHeaders: {} },
|
|
@@ -829,7 +829,7 @@ class User {
|
|
|
829
829
|
* @returns {Promise<UserPlatformModel.SuccessMessage>} - Success response
|
|
830
830
|
* @name deleteUserAttribute
|
|
831
831
|
* @summary: Delete User Attribute
|
|
832
|
-
* @description: Delete User Attribute - Check out [method documentation](https://
|
|
832
|
+
* @description: Delete User Attribute - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/deleteUserAttribute/).
|
|
833
833
|
*/
|
|
834
834
|
async deleteUserAttribute(
|
|
835
835
|
{ attributeDefId, userId, requestHeaders } = { requestHeaders: {} },
|
|
@@ -906,7 +906,7 @@ class User {
|
|
|
906
906
|
* @returns {Promise<UserPlatformModel.SuccessMessage>} - Success response
|
|
907
907
|
* @name deleteUserAttributeDefinitionById
|
|
908
908
|
* @summary: Delete User Attribute Definition
|
|
909
|
-
* @description: Delete a user attribute definition by its unique identifier. - Check out [method documentation](https://
|
|
909
|
+
* @description: Delete a user attribute definition by its unique identifier. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/deleteUserAttributeDefinitionById/).
|
|
910
910
|
*/
|
|
911
911
|
async deleteUserAttributeDefinitionById(
|
|
912
912
|
{ attributeDefId, requestHeaders } = { requestHeaders: {} },
|
|
@@ -974,6 +974,172 @@ class User {
|
|
|
974
974
|
return response;
|
|
975
975
|
}
|
|
976
976
|
|
|
977
|
+
/**
|
|
978
|
+
* @param {UserPlatformApplicationValidator.DeleteUserAttributesInBulkParam} arg
|
|
979
|
+
* - Arg object
|
|
980
|
+
*
|
|
981
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
982
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
983
|
+
* @returns {Promise<UserPlatformModel.SuccessMessage>} - Success response
|
|
984
|
+
* @name deleteUserAttributesInBulk
|
|
985
|
+
* @summary: Delete User Attribute Values in Bulk
|
|
986
|
+
* @description: This request deletes attribute values for a single user based on the provided user attribute definition. Each user attribute definition represents a distinct attribute, and for each definition, a user can have one corresponding value. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/deleteUserAttributesInBulk/).
|
|
987
|
+
*/
|
|
988
|
+
async deleteUserAttributesInBulk(
|
|
989
|
+
{ userId, body, requestHeaders } = { requestHeaders: {} },
|
|
990
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
991
|
+
) {
|
|
992
|
+
const {
|
|
993
|
+
error,
|
|
994
|
+
} = UserPlatformApplicationValidator.deleteUserAttributesInBulk().validate(
|
|
995
|
+
{
|
|
996
|
+
userId,
|
|
997
|
+
|
|
998
|
+
body,
|
|
999
|
+
},
|
|
1000
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1001
|
+
);
|
|
1002
|
+
if (error) {
|
|
1003
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1007
|
+
const {
|
|
1008
|
+
error: warrning,
|
|
1009
|
+
} = UserPlatformApplicationValidator.deleteUserAttributesInBulk().validate(
|
|
1010
|
+
{
|
|
1011
|
+
userId,
|
|
1012
|
+
|
|
1013
|
+
body,
|
|
1014
|
+
},
|
|
1015
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1016
|
+
);
|
|
1017
|
+
if (warrning) {
|
|
1018
|
+
Logger({
|
|
1019
|
+
level: "WARN",
|
|
1020
|
+
message: `Parameter Validation warrnings for platform > User > deleteUserAttributesInBulk \n ${warrning}`,
|
|
1021
|
+
});
|
|
1022
|
+
}
|
|
1023
|
+
|
|
1024
|
+
const query_params = {};
|
|
1025
|
+
|
|
1026
|
+
const response = await PlatformAPIClient.execute(
|
|
1027
|
+
this.config,
|
|
1028
|
+
"delete",
|
|
1029
|
+
`/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/user_attribute/user/${userId}`,
|
|
1030
|
+
query_params,
|
|
1031
|
+
body,
|
|
1032
|
+
requestHeaders,
|
|
1033
|
+
{ responseHeaders }
|
|
1034
|
+
);
|
|
1035
|
+
|
|
1036
|
+
let responseData = response;
|
|
1037
|
+
if (responseHeaders) {
|
|
1038
|
+
responseData = response[0];
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
const {
|
|
1042
|
+
error: res_error,
|
|
1043
|
+
} = UserPlatformModel.SuccessMessage().validate(responseData, {
|
|
1044
|
+
abortEarly: false,
|
|
1045
|
+
allowUnknown: true,
|
|
1046
|
+
});
|
|
1047
|
+
|
|
1048
|
+
if (res_error) {
|
|
1049
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1050
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1051
|
+
} else {
|
|
1052
|
+
Logger({
|
|
1053
|
+
level: "WARN",
|
|
1054
|
+
message: `Response Validation Warnings for platform > User > deleteUserAttributesInBulk \n ${res_error}`,
|
|
1055
|
+
});
|
|
1056
|
+
}
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
return response;
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
/**
|
|
1063
|
+
* @param {UserPlatformApplicationValidator.FilterUsersByAttributesParam} arg
|
|
1064
|
+
* - Arg object
|
|
1065
|
+
*
|
|
1066
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1067
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1068
|
+
* @returns {Promise<UserPlatformModel.UserAttributeFiltered>} - Success response
|
|
1069
|
+
* @name filterUsersByAttributes
|
|
1070
|
+
* @summary: Filter Users by Attribute Conditions
|
|
1071
|
+
* @description: Returns a filtered list of users based on user attribute conditions and along with details of definition Ids. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/filterUsersByAttributes/).
|
|
1072
|
+
*/
|
|
1073
|
+
async filterUsersByAttributes(
|
|
1074
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1075
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1076
|
+
) {
|
|
1077
|
+
const {
|
|
1078
|
+
error,
|
|
1079
|
+
} = UserPlatformApplicationValidator.filterUsersByAttributes().validate(
|
|
1080
|
+
{
|
|
1081
|
+
body,
|
|
1082
|
+
},
|
|
1083
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1084
|
+
);
|
|
1085
|
+
if (error) {
|
|
1086
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1087
|
+
}
|
|
1088
|
+
|
|
1089
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1090
|
+
const {
|
|
1091
|
+
error: warrning,
|
|
1092
|
+
} = UserPlatformApplicationValidator.filterUsersByAttributes().validate(
|
|
1093
|
+
{
|
|
1094
|
+
body,
|
|
1095
|
+
},
|
|
1096
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1097
|
+
);
|
|
1098
|
+
if (warrning) {
|
|
1099
|
+
Logger({
|
|
1100
|
+
level: "WARN",
|
|
1101
|
+
message: `Parameter Validation warrnings for platform > User > filterUsersByAttributes \n ${warrning}`,
|
|
1102
|
+
});
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
const query_params = {};
|
|
1106
|
+
|
|
1107
|
+
const response = await PlatformAPIClient.execute(
|
|
1108
|
+
this.config,
|
|
1109
|
+
"post",
|
|
1110
|
+
`/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/user_attribute/users`,
|
|
1111
|
+
query_params,
|
|
1112
|
+
body,
|
|
1113
|
+
requestHeaders,
|
|
1114
|
+
{ responseHeaders }
|
|
1115
|
+
);
|
|
1116
|
+
|
|
1117
|
+
let responseData = response;
|
|
1118
|
+
if (responseHeaders) {
|
|
1119
|
+
responseData = response[0];
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
const {
|
|
1123
|
+
error: res_error,
|
|
1124
|
+
} = UserPlatformModel.UserAttributeFiltered().validate(responseData, {
|
|
1125
|
+
abortEarly: false,
|
|
1126
|
+
allowUnknown: true,
|
|
1127
|
+
});
|
|
1128
|
+
|
|
1129
|
+
if (res_error) {
|
|
1130
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1131
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1132
|
+
} else {
|
|
1133
|
+
Logger({
|
|
1134
|
+
level: "WARN",
|
|
1135
|
+
message: `Response Validation Warnings for platform > User > filterUsersByAttributes \n ${res_error}`,
|
|
1136
|
+
});
|
|
1137
|
+
}
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1140
|
+
return response;
|
|
1141
|
+
}
|
|
1142
|
+
|
|
977
1143
|
/**
|
|
978
1144
|
* @param {UserPlatformApplicationValidator.GetActiveSessionsParam} arg - Arg object
|
|
979
1145
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -981,7 +1147,7 @@ class User {
|
|
|
981
1147
|
* @returns {Promise<UserPlatformModel.SessionListResponseSchema>} - Success response
|
|
982
1148
|
* @name getActiveSessions
|
|
983
1149
|
* @summary: Get User Active Sessions
|
|
984
|
-
* @description: Retrieve a list of currently active user sessions. - Check out [method documentation](https://
|
|
1150
|
+
* @description: Retrieve a list of currently active user sessions. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/getActiveSessions/).
|
|
985
1151
|
*/
|
|
986
1152
|
async getActiveSessions(
|
|
987
1153
|
{ id, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1065,7 +1231,7 @@ class User {
|
|
|
1065
1231
|
* @summary: Get Bulk User's Export Lists for a specific Application.
|
|
1066
1232
|
* @description: This API allows fetching the list of bulk user exports for a specific application and company.
|
|
1067
1233
|
* It supports pagination and filtering based on various parameters.
|
|
1068
|
-
* - Check out [method documentation](https://
|
|
1234
|
+
* - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/getBulkExportUsersList/).
|
|
1069
1235
|
*/
|
|
1070
1236
|
async getBulkExportUsersList(
|
|
1071
1237
|
{
|
|
@@ -1176,7 +1342,7 @@ class User {
|
|
|
1176
1342
|
* @summary: Get Bulk User's Import Lists for a specific Application.
|
|
1177
1343
|
* @description: This API allows fetching the list of bulk user imports for a specific application and company.
|
|
1178
1344
|
* It supports pagination and filtering based on various parameters.
|
|
1179
|
-
* - Check out [method documentation](https://
|
|
1345
|
+
* - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/getBulkImportUsersList/).
|
|
1180
1346
|
*/
|
|
1181
1347
|
async getBulkImportUsersList(
|
|
1182
1348
|
{
|
|
@@ -1283,7 +1449,7 @@ class User {
|
|
|
1283
1449
|
* @returns {Promise<UserPlatformModel.CustomerListResponseSchema>} - Success response
|
|
1284
1450
|
* @name getCustomers
|
|
1285
1451
|
* @summary: Get a List of Users
|
|
1286
|
-
* @description: Retrieve details of users registered in the sales channel - Check out [method documentation](https://
|
|
1452
|
+
* @description: Retrieve details of users registered in the sales channel - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/getCustomers/).
|
|
1287
1453
|
*/
|
|
1288
1454
|
async getCustomers(
|
|
1289
1455
|
{ q, pageSize, pageNo, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1367,7 +1533,7 @@ class User {
|
|
|
1367
1533
|
* @returns {Promise<UserPlatformModel.PlatformSchema>} - Success response
|
|
1368
1534
|
* @name getPlatformConfig
|
|
1369
1535
|
* @summary: Get Platform Config
|
|
1370
|
-
* @description: Retrieve platform sales channel authentication configuration. - Check out [method documentation](https://
|
|
1536
|
+
* @description: Retrieve platform sales channel authentication configuration. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/getPlatformConfig/).
|
|
1371
1537
|
*/
|
|
1372
1538
|
async getPlatformConfig(
|
|
1373
1539
|
{ requestHeaders } = { requestHeaders: {} },
|
|
@@ -1442,7 +1608,7 @@ class User {
|
|
|
1442
1608
|
* @returns {Promise<UserPlatformModel.UserAttribute>} - Success response
|
|
1443
1609
|
* @name getUserAttribute
|
|
1444
1610
|
* @summary: Get User Attribute
|
|
1445
|
-
* @description: Get User Attribute - Check out [method documentation](https://
|
|
1611
|
+
* @description: Get User Attribute - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/getUserAttribute/).
|
|
1446
1612
|
*/
|
|
1447
1613
|
async getUserAttribute(
|
|
1448
1614
|
{ attributeDefId, userId, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1519,7 +1685,7 @@ class User {
|
|
|
1519
1685
|
* @returns {Promise<UserPlatformModel.UserAttribute>} - Success response
|
|
1520
1686
|
* @name getUserAttributeById
|
|
1521
1687
|
* @summary: Get User Attribute
|
|
1522
|
-
* @description: Retrieve User Attribute details by ID. - Check out [method documentation](https://
|
|
1688
|
+
* @description: Retrieve User Attribute details by ID. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/getUserAttributeById/).
|
|
1523
1689
|
*/
|
|
1524
1690
|
async getUserAttributeById(
|
|
1525
1691
|
{ attributeId, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1596,7 +1762,7 @@ class User {
|
|
|
1596
1762
|
* @returns {Promise<UserPlatformModel.UserAttributeDefinition>} - Success response
|
|
1597
1763
|
* @name getUserAttributeDefinitionById
|
|
1598
1764
|
* @summary: Get User Attribute Definition
|
|
1599
|
-
* @description: Get a user attribute definition by its unique identifier. - Check out [method documentation](https://
|
|
1765
|
+
* @description: Get a user attribute definition by its unique identifier. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/getUserAttributeDefinitionById/).
|
|
1600
1766
|
*/
|
|
1601
1767
|
async getUserAttributeDefinitionById(
|
|
1602
1768
|
{ attributeDefId, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1673,7 +1839,7 @@ class User {
|
|
|
1673
1839
|
* @returns {Promise<Object>} - Success response
|
|
1674
1840
|
* @name getUserAttributeDefinitions
|
|
1675
1841
|
* @summary: Get User Attribute Definitions
|
|
1676
|
-
* @description: Retrieve user attribute definitions. - Check out [method documentation](https://
|
|
1842
|
+
* @description: Retrieve user attribute definitions. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/getUserAttributeDefinitions/).
|
|
1677
1843
|
*/
|
|
1678
1844
|
async getUserAttributeDefinitions(
|
|
1679
1845
|
{
|
|
@@ -1796,7 +1962,7 @@ class User {
|
|
|
1796
1962
|
* @returns {Promise<Object>} - Success response
|
|
1797
1963
|
* @name getUserAttributesForUser
|
|
1798
1964
|
* @summary: Get All Customer Attributes
|
|
1799
|
-
* @description: Retrieve all user attributes for a specific user - Check out [method documentation](https://
|
|
1965
|
+
* @description: Retrieve all user attributes for a specific user - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/getUserAttributesForUser/).
|
|
1800
1966
|
*/
|
|
1801
1967
|
async getUserAttributesForUser(
|
|
1802
1968
|
{ userId, pageSize, pageNo, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1881,7 +2047,7 @@ class User {
|
|
|
1881
2047
|
* @returns {Promise<UserPlatformModel.UserGroupResponseSchema>} - Success response
|
|
1882
2048
|
* @name getUserGroupById
|
|
1883
2049
|
* @summary: Get User Group
|
|
1884
|
-
* @description: Retrieve a user group by its unique identifier. - Check out [method documentation](https://
|
|
2050
|
+
* @description: Retrieve a user group by its unique identifier. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/getUserGroupById/).
|
|
1885
2051
|
*/
|
|
1886
2052
|
async getUserGroupById(
|
|
1887
2053
|
{ groupId, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1961,7 +2127,7 @@ class User {
|
|
|
1961
2127
|
* Success response
|
|
1962
2128
|
* @name getUserGroups
|
|
1963
2129
|
* @summary: Get User Groups
|
|
1964
|
-
* @description: Retrieve a list of user groups. - Check out [method documentation](https://
|
|
2130
|
+
* @description: Retrieve a list of user groups. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/getUserGroups/).
|
|
1965
2131
|
*/
|
|
1966
2132
|
async getUserGroups(
|
|
1967
2133
|
{ pageNo, pageSize, name, type, status, groupUid, requestHeaders } = {
|
|
@@ -2056,7 +2222,7 @@ class User {
|
|
|
2056
2222
|
* @returns {Promise<UserPlatformModel.GetUserTimeline>} - Success response
|
|
2057
2223
|
* @name getUserTimeline
|
|
2058
2224
|
* @summary: Get Deleted User Timeline
|
|
2059
|
-
* @description: Fetches the timeline for the user who has made a data erase request. The timeline will show when the request was raised and when the request will be completed. It will also show if request has been cancelled before completion. - Check out [method documentation](https://
|
|
2225
|
+
* @description: Fetches the timeline for the user who has made a data erase request. The timeline will show when the request was raised and when the request will be completed. It will also show if request has been cancelled before completion. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/getUserTimeline/).
|
|
2060
2226
|
*/
|
|
2061
2227
|
async getUserTimeline(
|
|
2062
2228
|
{ userId, requestHeaders } = { requestHeaders: {} },
|
|
@@ -2136,7 +2302,7 @@ class User {
|
|
|
2136
2302
|
* @name getUsersJobByJobId
|
|
2137
2303
|
* @summary: Retrieve Job Details by Job ID for a Specific Application, Including Both Import and Export Jobs.
|
|
2138
2304
|
* @description: This endpoint retrieves the details of a specific user's import and export related jobs associated with a given `job_id`, `application_id`, and `company_id`.
|
|
2139
|
-
* - Check out [method documentation](https://
|
|
2305
|
+
* - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/getUsersJobByJobId/).
|
|
2140
2306
|
*/
|
|
2141
2307
|
async getUsersJobByJobId(
|
|
2142
2308
|
{ jobId, requestHeaders } = { requestHeaders: {} },
|
|
@@ -2215,7 +2381,7 @@ class User {
|
|
|
2215
2381
|
* @returns {Promise<UserPlatformModel.UserSearchResponseSchema>} - Success response
|
|
2216
2382
|
* @name searchUsers
|
|
2217
2383
|
* @summary: Search an Existing Users
|
|
2218
|
-
* @description: Search and filter users details registered in the sales channel - Check out [method documentation](https://
|
|
2384
|
+
* @description: Search and filter users details registered in the sales channel - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/searchUsers/).
|
|
2219
2385
|
*/
|
|
2220
2386
|
async searchUsers(
|
|
2221
2387
|
{ q, query, requestHeaders } = { requestHeaders: {} },
|
|
@@ -2296,7 +2462,7 @@ class User {
|
|
|
2296
2462
|
* @returns {Promise<UserPlatformModel.UnDeleteUserSuccess>} - Success response
|
|
2297
2463
|
* @name unDeleteUser
|
|
2298
2464
|
* @summary: Restore Deleted User
|
|
2299
|
-
* @description: Restore a previously deleted user account. - Check out [method documentation](https://
|
|
2465
|
+
* @description: Restore a previously deleted user account. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/unDeleteUser/).
|
|
2300
2466
|
*/
|
|
2301
2467
|
async unDeleteUser(
|
|
2302
2468
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -2375,7 +2541,7 @@ class User {
|
|
|
2375
2541
|
* @returns {Promise<UserPlatformModel.PlatformSchema>} - Success response
|
|
2376
2542
|
* @name updatePlatformConfig
|
|
2377
2543
|
* @summary: Update Platform Config
|
|
2378
|
-
* @description: Modify and update platform sales channel authentication configuration. - Check out [method documentation](https://
|
|
2544
|
+
* @description: Modify and update platform sales channel authentication configuration. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/updatePlatformConfig/).
|
|
2379
2545
|
*/
|
|
2380
2546
|
async updatePlatformConfig(
|
|
2381
2547
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -2454,7 +2620,7 @@ class User {
|
|
|
2454
2620
|
* @returns {Promise<UserPlatformModel.CreateUserResponseSchema>} - Success response
|
|
2455
2621
|
* @name updateUser
|
|
2456
2622
|
* @summary: Update User Details
|
|
2457
|
-
* @description: Modify and update user profile information. - Check out [method documentation](https://
|
|
2623
|
+
* @description: Modify and update user profile information. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/updateUser/).
|
|
2458
2624
|
*/
|
|
2459
2625
|
async updateUser(
|
|
2460
2626
|
{ userId, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -2533,7 +2699,7 @@ class User {
|
|
|
2533
2699
|
* @returns {Promise<UserPlatformModel.UserAttribute>} - Success response
|
|
2534
2700
|
* @name updateUserAttribute
|
|
2535
2701
|
* @summary: Update Or Create User Attribute
|
|
2536
|
-
* @description: Update Or Create User Attribute - Check out [method documentation](https://
|
|
2702
|
+
* @description: Update Or Create User Attribute - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/updateUserAttribute/).
|
|
2537
2703
|
*/
|
|
2538
2704
|
async updateUserAttribute(
|
|
2539
2705
|
{ attributeDefId, userId, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -2620,7 +2786,7 @@ class User {
|
|
|
2620
2786
|
* @returns {Promise<UserPlatformModel.UserAttributeDefinition>} - Success response
|
|
2621
2787
|
* @name updateUserAttributeDefinition
|
|
2622
2788
|
* @summary: Update User Attribute Definition
|
|
2623
|
-
* @description: Update an existing user attribute definition. - Check out [method documentation](https://
|
|
2789
|
+
* @description: Update an existing user attribute definition. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/updateUserAttributeDefinition/).
|
|
2624
2790
|
*/
|
|
2625
2791
|
async updateUserAttributeDefinition(
|
|
2626
2792
|
{ attributeDefId, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -2696,6 +2862,91 @@ class User {
|
|
|
2696
2862
|
return response;
|
|
2697
2863
|
}
|
|
2698
2864
|
|
|
2865
|
+
/**
|
|
2866
|
+
* @param {UserPlatformApplicationValidator.UpdateUserAttributesParam} arg
|
|
2867
|
+
* - Arg object
|
|
2868
|
+
*
|
|
2869
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2870
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2871
|
+
* @returns {Promise<UserPlatformModel.BulkUserAttribute>} - Success response
|
|
2872
|
+
* @name updateUserAttributes
|
|
2873
|
+
* @summary: Create Or Update User Attribute
|
|
2874
|
+
* @description: This API is used to create or update multiple user attribute values for the specified user ID. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/updateUserAttributes/).
|
|
2875
|
+
*/
|
|
2876
|
+
async updateUserAttributes(
|
|
2877
|
+
{ userId, body, requestHeaders } = { requestHeaders: {} },
|
|
2878
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2879
|
+
) {
|
|
2880
|
+
const {
|
|
2881
|
+
error,
|
|
2882
|
+
} = UserPlatformApplicationValidator.updateUserAttributes().validate(
|
|
2883
|
+
{
|
|
2884
|
+
userId,
|
|
2885
|
+
|
|
2886
|
+
body,
|
|
2887
|
+
},
|
|
2888
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2889
|
+
);
|
|
2890
|
+
if (error) {
|
|
2891
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
2892
|
+
}
|
|
2893
|
+
|
|
2894
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2895
|
+
const {
|
|
2896
|
+
error: warrning,
|
|
2897
|
+
} = UserPlatformApplicationValidator.updateUserAttributes().validate(
|
|
2898
|
+
{
|
|
2899
|
+
userId,
|
|
2900
|
+
|
|
2901
|
+
body,
|
|
2902
|
+
},
|
|
2903
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2904
|
+
);
|
|
2905
|
+
if (warrning) {
|
|
2906
|
+
Logger({
|
|
2907
|
+
level: "WARN",
|
|
2908
|
+
message: `Parameter Validation warrnings for platform > User > updateUserAttributes \n ${warrning}`,
|
|
2909
|
+
});
|
|
2910
|
+
}
|
|
2911
|
+
|
|
2912
|
+
const query_params = {};
|
|
2913
|
+
|
|
2914
|
+
const response = await PlatformAPIClient.execute(
|
|
2915
|
+
this.config,
|
|
2916
|
+
"post",
|
|
2917
|
+
`/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/user_attribute/user/${userId}`,
|
|
2918
|
+
query_params,
|
|
2919
|
+
body,
|
|
2920
|
+
requestHeaders,
|
|
2921
|
+
{ responseHeaders }
|
|
2922
|
+
);
|
|
2923
|
+
|
|
2924
|
+
let responseData = response;
|
|
2925
|
+
if (responseHeaders) {
|
|
2926
|
+
responseData = response[0];
|
|
2927
|
+
}
|
|
2928
|
+
|
|
2929
|
+
const {
|
|
2930
|
+
error: res_error,
|
|
2931
|
+
} = UserPlatformModel.BulkUserAttribute().validate(responseData, {
|
|
2932
|
+
abortEarly: false,
|
|
2933
|
+
allowUnknown: true,
|
|
2934
|
+
});
|
|
2935
|
+
|
|
2936
|
+
if (res_error) {
|
|
2937
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
2938
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2939
|
+
} else {
|
|
2940
|
+
Logger({
|
|
2941
|
+
level: "WARN",
|
|
2942
|
+
message: `Response Validation Warnings for platform > User > updateUserAttributes \n ${res_error}`,
|
|
2943
|
+
});
|
|
2944
|
+
}
|
|
2945
|
+
}
|
|
2946
|
+
|
|
2947
|
+
return response;
|
|
2948
|
+
}
|
|
2949
|
+
|
|
2699
2950
|
/**
|
|
2700
2951
|
* @param {UserPlatformApplicationValidator.UpdateUserGroupParam} arg - Arg object
|
|
2701
2952
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -2703,7 +2954,7 @@ class User {
|
|
|
2703
2954
|
* @returns {Promise<UserPlatformModel.UserGroupResponseSchema>} - Success response
|
|
2704
2955
|
* @name updateUserGroup
|
|
2705
2956
|
* @summary: Update User Group
|
|
2706
|
-
* @description: Modify and update user group details. - Check out [method documentation](https://
|
|
2957
|
+
* @description: Modify and update user group details. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/updateUserGroup/).
|
|
2707
2958
|
*/
|
|
2708
2959
|
async updateUserGroup(
|
|
2709
2960
|
{ groupId, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -2786,7 +3037,7 @@ class User {
|
|
|
2786
3037
|
* @returns {Promise<UserPlatformModel.UserGroupResponseSchema>} - Success response
|
|
2787
3038
|
* @name updateUserGroupPartially
|
|
2788
3039
|
* @summary: Modify User Group
|
|
2789
|
-
* @description: Update user group partially on the platform. - Check out [method documentation](https://
|
|
3040
|
+
* @description: Update user group partially on the platform. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/updateUserGroupPartially/).
|
|
2790
3041
|
*/
|
|
2791
3042
|
async updateUserGroupPartially(
|
|
2792
3043
|
{ groupId, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -52,6 +52,15 @@ export = UserPlatformApplicationValidator;
|
|
|
52
52
|
* @property {string} attributeDefId - The unique identifier of the attribute
|
|
53
53
|
* definition to delete.
|
|
54
54
|
*/
|
|
55
|
+
/**
|
|
56
|
+
* @typedef DeleteUserAttributesInBulkParam
|
|
57
|
+
* @property {string} userId - The unique identifier of the user to update.
|
|
58
|
+
* @property {UserPlatformModel.DeleteBulkUserAttribute} body
|
|
59
|
+
*/
|
|
60
|
+
/**
|
|
61
|
+
* @typedef FilterUsersByAttributesParam
|
|
62
|
+
* @property {UserPlatformModel.UserAttributeFilter} body
|
|
63
|
+
*/
|
|
55
64
|
/**
|
|
56
65
|
* @typedef GetActiveSessionsParam
|
|
57
66
|
* @property {string} id - ID of a customer.
|
|
@@ -178,6 +187,11 @@ export = UserPlatformApplicationValidator;
|
|
|
178
187
|
* definition to update.
|
|
179
188
|
* @property {UserPlatformModel.CreateUserAttributeDefinition} body
|
|
180
189
|
*/
|
|
190
|
+
/**
|
|
191
|
+
* @typedef UpdateUserAttributesParam
|
|
192
|
+
* @property {string} userId - The unique identifier of the user.
|
|
193
|
+
* @property {UserPlatformModel.CreateBulkUserAttribute} body
|
|
194
|
+
*/
|
|
181
195
|
/**
|
|
182
196
|
* @typedef UpdateUserGroupParam
|
|
183
197
|
* @property {string} groupId - Numeric ID allotted to a User Group
|
|
@@ -213,6 +227,10 @@ declare class UserPlatformApplicationValidator {
|
|
|
213
227
|
static deleteUserAttribute(): DeleteUserAttributeParam;
|
|
214
228
|
/** @returns {DeleteUserAttributeDefinitionByIdParam} */
|
|
215
229
|
static deleteUserAttributeDefinitionById(): DeleteUserAttributeDefinitionByIdParam;
|
|
230
|
+
/** @returns {DeleteUserAttributesInBulkParam} */
|
|
231
|
+
static deleteUserAttributesInBulk(): DeleteUserAttributesInBulkParam;
|
|
232
|
+
/** @returns {FilterUsersByAttributesParam} */
|
|
233
|
+
static filterUsersByAttributes(): FilterUsersByAttributesParam;
|
|
216
234
|
/** @returns {GetActiveSessionsParam} */
|
|
217
235
|
static getActiveSessions(): GetActiveSessionsParam;
|
|
218
236
|
/** @returns {GetBulkExportUsersListParam} */
|
|
@@ -253,13 +271,15 @@ declare class UserPlatformApplicationValidator {
|
|
|
253
271
|
static updateUserAttribute(): UpdateUserAttributeParam;
|
|
254
272
|
/** @returns {UpdateUserAttributeDefinitionParam} */
|
|
255
273
|
static updateUserAttributeDefinition(): UpdateUserAttributeDefinitionParam;
|
|
274
|
+
/** @returns {UpdateUserAttributesParam} */
|
|
275
|
+
static updateUserAttributes(): UpdateUserAttributesParam;
|
|
256
276
|
/** @returns {UpdateUserGroupParam} */
|
|
257
277
|
static updateUserGroup(): UpdateUserGroupParam;
|
|
258
278
|
/** @returns {UpdateUserGroupPartiallyParam} */
|
|
259
279
|
static updateUserGroupPartially(): UpdateUserGroupPartiallyParam;
|
|
260
280
|
}
|
|
261
281
|
declare namespace UserPlatformApplicationValidator {
|
|
262
|
-
export { ArchiveUserParam, BlockOrUnblockUsersParam, BulkImportStoreFrontUsersParam, CreateBulkExportUsersParam, CreateUserParam, CreateUserAttributeDefinitionParam, CreateUserGroupParam, CreateUserSessionParam, DeleteActiveSessionsParam, DeleteSessionParam, DeleteUserAttributeParam, DeleteUserAttributeDefinitionByIdParam, GetActiveSessionsParam, GetBulkExportUsersListParam, GetBulkImportUsersListParam, GetCustomersParam, GetPlatformConfigParam, GetUserAttributeParam, GetUserAttributeByIdParam, GetUserAttributeDefinitionByIdParam, GetUserAttributeDefinitionsParam, GetUserAttributesForUserParam, GetUserGroupByIdParam, GetUserGroupsParam, GetUserTimelineParam, GetUsersJobByJobIdParam, SearchUsersParam, UnDeleteUserParam, UpdatePlatformConfigParam, UpdateUserParam, UpdateUserAttributeParam, UpdateUserAttributeDefinitionParam, UpdateUserGroupParam, UpdateUserGroupPartiallyParam };
|
|
282
|
+
export { ArchiveUserParam, BlockOrUnblockUsersParam, BulkImportStoreFrontUsersParam, CreateBulkExportUsersParam, CreateUserParam, CreateUserAttributeDefinitionParam, CreateUserGroupParam, CreateUserSessionParam, DeleteActiveSessionsParam, DeleteSessionParam, DeleteUserAttributeParam, DeleteUserAttributeDefinitionByIdParam, DeleteUserAttributesInBulkParam, FilterUsersByAttributesParam, GetActiveSessionsParam, GetBulkExportUsersListParam, GetBulkImportUsersListParam, GetCustomersParam, GetPlatformConfigParam, GetUserAttributeParam, GetUserAttributeByIdParam, GetUserAttributeDefinitionByIdParam, GetUserAttributeDefinitionsParam, GetUserAttributesForUserParam, GetUserGroupByIdParam, GetUserGroupsParam, GetUserTimelineParam, GetUsersJobByJobIdParam, SearchUsersParam, UnDeleteUserParam, UpdatePlatformConfigParam, UpdateUserParam, UpdateUserAttributeParam, UpdateUserAttributeDefinitionParam, UpdateUserAttributesParam, UpdateUserGroupParam, UpdateUserGroupPartiallyParam };
|
|
263
283
|
}
|
|
264
284
|
type ArchiveUserParam = {
|
|
265
285
|
body: UserPlatformModel.ArchiveUserRequestSchema;
|
|
@@ -326,6 +346,16 @@ type DeleteUserAttributeDefinitionByIdParam = {
|
|
|
326
346
|
*/
|
|
327
347
|
attributeDefId: string;
|
|
328
348
|
};
|
|
349
|
+
type DeleteUserAttributesInBulkParam = {
|
|
350
|
+
/**
|
|
351
|
+
* - The unique identifier of the user to update.
|
|
352
|
+
*/
|
|
353
|
+
userId: string;
|
|
354
|
+
body: UserPlatformModel.DeleteBulkUserAttribute;
|
|
355
|
+
};
|
|
356
|
+
type FilterUsersByAttributesParam = {
|
|
357
|
+
body: UserPlatformModel.UserAttributeFilter;
|
|
358
|
+
};
|
|
329
359
|
type GetActiveSessionsParam = {
|
|
330
360
|
/**
|
|
331
361
|
* - ID of a customer.
|
|
@@ -585,6 +615,13 @@ type UpdateUserAttributeDefinitionParam = {
|
|
|
585
615
|
attributeDefId: string;
|
|
586
616
|
body: UserPlatformModel.CreateUserAttributeDefinition;
|
|
587
617
|
};
|
|
618
|
+
type UpdateUserAttributesParam = {
|
|
619
|
+
/**
|
|
620
|
+
* - The unique identifier of the user.
|
|
621
|
+
*/
|
|
622
|
+
userId: string;
|
|
623
|
+
body: UserPlatformModel.CreateBulkUserAttribute;
|
|
624
|
+
};
|
|
588
625
|
type UpdateUserGroupParam = {
|
|
589
626
|
/**
|
|
590
627
|
* - Numeric ID allotted to a User Group
|