@gofynd/fdk-client-javascript 1.4.15-beta.13 → 1.4.15-beta.15
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 +23 -26
- package/package.json +5 -1
- package/sdk/application/ApplicationClient.d.ts +5 -6
- package/sdk/application/ApplicationClient.js +24 -20
- package/sdk/application/Cart/CartApplicationClient.d.ts +133 -83
- package/sdk/application/Cart/CartApplicationClient.js +444 -76
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +132 -114
- package/sdk/application/Catalog/CatalogApplicationClient.js +209 -126
- package/sdk/application/Common/CommonApplicationClient.d.ts +4 -4
- package/sdk/application/Common/CommonApplicationClient.js +4 -4
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +3 -3
- package/sdk/application/Communication/CommunicationApplicationClient.js +3 -3
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +58 -36
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +73 -29
- package/sdk/application/Content/ContentApplicationClient.d.ts +95 -66
- package/sdk/application/Content/ContentApplicationClient.js +274 -111
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +11 -11
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +10 -10
- package/sdk/application/Finance/FinanceApplicationClient.d.ts +29 -0
- package/sdk/application/Finance/FinanceApplicationClient.js +111 -0
- package/sdk/application/Lead/LeadApplicationClient.d.ts +7 -7
- package/sdk/application/Lead/LeadApplicationClient.js +6 -6
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +37 -57
- package/sdk/application/Logistic/LogisticApplicationClient.js +117 -180
- package/sdk/application/Order/OrderApplicationClient.d.ts +63 -21
- package/sdk/application/Order/OrderApplicationClient.js +217 -17
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +179 -149
- package/sdk/application/Payment/PaymentApplicationClient.js +301 -167
- package/sdk/application/Share/ShareApplicationClient.d.ts +7 -7
- package/sdk/application/Share/ShareApplicationClient.js +7 -7
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +7 -7
- package/sdk/application/Theme/ThemeApplicationClient.js +10 -6
- package/sdk/application/User/UserApplicationClient.d.ts +103 -53
- package/sdk/application/User/UserApplicationClient.js +308 -49
- package/sdk/common/AxiosHelper.js +11 -4
- package/sdk/common/Constant.d.ts +27 -4
- package/sdk/common/Constant.js +33 -6
- package/sdk/common/utils.d.ts +10 -0
- package/sdk/common/utils.js +24 -3
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +46 -16
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +266 -40
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +163 -19
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +158 -14
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +5 -2
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +23 -7
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +9 -9
- package/sdk/partner/Lead/LeadPartnerClient.js +9 -9
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +14 -9
- package/sdk/partner/Lead/LeadPartnerModel.js +19 -17
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +264 -49
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +2116 -252
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +2256 -258
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +1187 -230
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +21 -1
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +218 -13
- package/sdk/partner/PartnerClient.d.ts +5 -2
- package/sdk/partner/PartnerClient.js +21 -7
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +32 -34
- package/sdk/partner/Theme/ThemePartnerClient.js +42 -44
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +142 -43
- package/sdk/partner/Theme/ThemePartnerModel.js +129 -44
- package/sdk/partner/Theme/ThemePartnerValidator.js +4 -4
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +83 -27
- package/sdk/partner/Webhook/WebhookPartnerClient.js +446 -27
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +920 -185
- package/sdk/partner/Webhook/WebhookPartnerModel.js +462 -154
- package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +5 -0
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +41 -3
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +8 -7
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +17 -11
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +4 -1
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +68 -13
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +44 -6
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +3 -33
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +4 -244
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +49 -145
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +20 -171
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -39
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +0 -35
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +15 -15
- package/sdk/platform/Billing/BillingPlatformClient.js +18 -18
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +443 -388
- package/sdk/platform/Billing/BillingPlatformModel.js +280 -263
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +16 -18
- package/sdk/platform/Billing/BillingPlatformValidator.js +8 -9
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +266 -203
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +1446 -500
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +729 -100
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +446 -82
- package/sdk/platform/Cart/CartPlatformModel.d.ts +6927 -1396
- package/sdk/platform/Cart/CartPlatformModel.js +3065 -1316
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +433 -248
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1662 -559
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +464 -159
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +304 -87
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +383 -234
- package/sdk/platform/Catalog/CatalogPlatformClient.js +2475 -1557
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +9571 -2674
- package/sdk/platform/Catalog/CatalogPlatformModel.js +5081 -2019
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +364 -117
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +281 -104
- package/sdk/platform/Common/CommonPlatformClient.d.ts +5 -4
- package/sdk/platform/Common/CommonPlatformClient.js +6 -5
- package/sdk/platform/Common/CommonPlatformModel.d.ts +36 -25
- package/sdk/platform/Common/CommonPlatformModel.js +25 -14
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +80 -153
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +102 -541
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +36 -49
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +20 -60
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +1 -1
- package/sdk/platform/Communication/CommunicationPlatformClient.js +1 -1
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +189 -43
- package/sdk/platform/Communication/CommunicationPlatformModel.js +165 -42
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +58 -81
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +68 -116
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +291 -249
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +243 -234
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +12 -12
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +12 -12
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +78 -65
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +101 -88
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +20 -20
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +19 -19
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +68 -34
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +174 -41
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +667 -244
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +474 -155
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +37 -9
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +27 -8
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +366 -280
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1435 -753
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +323 -223
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +335 -205
- package/sdk/platform/Content/ContentPlatformClient.d.ts +304 -106
- package/sdk/platform/Content/ContentPlatformClient.js +1842 -450
- package/sdk/platform/Content/ContentPlatformModel.d.ts +2582 -566
- package/sdk/platform/Content/ContentPlatformModel.js +1426 -558
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +293 -114
- package/sdk/platform/Content/ContentPlatformValidator.js +328 -101
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +59 -23
- package/sdk/platform/Discount/DiscountPlatformClient.js +84 -23
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +403 -110
- package/sdk/platform/Discount/DiscountPlatformModel.js +121 -107
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +56 -36
- package/sdk/platform/Discount/DiscountPlatformValidator.js +29 -19
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +12 -110
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +14 -684
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +5 -94
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +4 -115
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +20 -20
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +22 -22
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +90 -920
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +53 -949
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.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 +11 -11
- package/sdk/platform/Lead/LeadPlatformClient.js +11 -11
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +14 -9
- package/sdk/platform/Lead/LeadPlatformModel.js +20 -18
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +56 -9
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +340 -10
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +128 -24
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +81 -19
- package/sdk/platform/Order/OrderPlatformClient.d.ts +517 -160
- package/sdk/platform/Order/OrderPlatformClient.js +1623 -384
- package/sdk/platform/Order/OrderPlatformModel.d.ts +10372 -1587
- package/sdk/platform/Order/OrderPlatformModel.js +5726 -1512
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +539 -123
- package/sdk/platform/Order/OrderPlatformValidator.js +323 -92
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +8 -6
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +11 -9
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +6 -4
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +3 -2
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +77 -25
- package/sdk/platform/Partner/PartnerPlatformModel.js +32 -21
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +144 -219
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +307 -796
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +86 -121
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +80 -138
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +30 -30
- package/sdk/platform/Payment/PaymentPlatformClient.js +30 -30
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +901 -761
- package/sdk/platform/Payment/PaymentPlatformModel.js +663 -583
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +8 -8
- package/sdk/platform/Payment/PaymentPlatformValidator.js +8 -8
- package/sdk/platform/PlatformApplicationClient.d.ts +0 -2
- package/sdk/platform/PlatformApplicationClient.js +0 -4
- package/sdk/platform/PlatformClient.d.ts +5 -4
- package/sdk/platform/PlatformClient.js +32 -22
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +526 -69
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +3337 -337
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +603 -38
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +529 -32
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +184 -133
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +780 -491
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +9408 -1666
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +5720 -1765
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +257 -180
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +185 -127
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +7 -7
- package/sdk/platform/Share/SharePlatformApplicationClient.js +7 -7
- package/sdk/platform/Share/SharePlatformModel.d.ts +45 -9
- package/sdk/platform/Share/SharePlatformModel.js +31 -6
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +26 -26
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +38 -29
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +18 -3
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +10 -2
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +4 -4
- package/sdk/platform/Theme/ThemePlatformClient.js +4 -4
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +103 -17
- package/sdk/platform/Theme/ThemePlatformModel.js +92 -23
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +167 -45
- package/sdk/platform/User/UserPlatformApplicationClient.js +950 -67
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +189 -3
- package/sdk/platform/User/UserPlatformApplicationValidator.js +157 -3
- package/sdk/platform/User/UserPlatformModel.d.ts +880 -47
- package/sdk/platform/User/UserPlatformModel.js +607 -46
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +33 -86
- package/sdk/platform/Webhook/WebhookPlatformClient.js +79 -474
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +861 -422
- package/sdk/platform/Webhook/WebhookPlatformModel.js +469 -391
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -55
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +12 -72
- package/sdk/platform/index.d.ts +0 -2
- package/sdk/platform/index.js +0 -4
- package/sdk/public/Catalog/CatalogPublicClient.d.ts +22 -0
- package/sdk/public/Catalog/CatalogPublicClient.js +133 -0
- package/sdk/public/Catalog/CatalogPublicModel.d.ts +158 -0
- package/sdk/public/Catalog/CatalogPublicModel.js +116 -0
- package/sdk/public/Catalog/CatalogPublicValidator.d.ts +55 -0
- package/sdk/public/Catalog/CatalogPublicValidator.js +35 -0
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +5 -4
- package/sdk/public/Configuration/ConfigurationPublicClient.js +9 -8
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +41 -21
- package/sdk/public/Configuration/ConfigurationPublicModel.js +28 -12
- package/sdk/public/Content/ContentPublicClient.d.ts +145 -2
- package/sdk/public/Content/ContentPublicClient.js +1067 -17
- package/sdk/public/Content/ContentPublicModel.d.ts +704 -3
- package/sdk/public/Content/ContentPublicModel.js +751 -3
- package/sdk/public/Content/ContentPublicValidator.d.ts +94 -3
- package/sdk/public/Content/ContentPublicValidator.js +119 -2
- package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
- package/sdk/public/Partner/PartnerPublicClient.js +1 -1
- package/sdk/public/Partner/PartnerPublicModel.d.ts +248 -72
- package/sdk/public/Partner/PartnerPublicModel.js +81 -71
- package/sdk/public/Partner/PartnerPublicValidator.d.ts +2 -2
- package/sdk/public/Partner/PartnerPublicValidator.js +1 -1
- package/sdk/public/PublicClient.d.ts +5 -2
- package/sdk/public/PublicClient.js +16 -6
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +13 -13
- package/sdk/public/Webhook/WebhookPublicClient.js +13 -13
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +249 -67
- package/sdk/public/Webhook/WebhookPublicModel.js +81 -61
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
- package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
- package/sdk/public/index.d.ts +1 -0
- package/sdk/public/index.js +2 -0
- package/utility.d.ts +3 -0
- package/utility.js +7 -0
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +0 -79
- package/sdk/application/Rewards/RewardsApplicationClient.js +0 -315
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +0 -19
- package/sdk/application/Webhook/WebhookApplicationClient.js +0 -72
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +0 -320
- package/sdk/platform/Finance/FinancePlatformClient.js +0 -2333
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +0 -2890
- package/sdk/platform/Finance/FinancePlatformModel.js +0 -2148
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +0 -284
- package/sdk/platform/Finance/FinancePlatformValidator.js +0 -354
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +0 -136
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +0 -976
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +0 -152
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +0 -157
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +0 -382
- package/sdk/platform/Rewards/RewardsPlatformModel.js +0 -408
|
@@ -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: {} },
|
|
@@ -171,6 +171,168 @@ class User {
|
|
|
171
171
|
return response;
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
+
/**
|
|
175
|
+
* @param {UserPlatformApplicationValidator.BulkImportStoreFrontUsersParam} arg
|
|
176
|
+
* - Arg object
|
|
177
|
+
*
|
|
178
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
179
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
180
|
+
* @returns {Promise<UserPlatformModel.BulkActionModel>} - Success response
|
|
181
|
+
* @name bulkImportStoreFrontUsers
|
|
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://docs.fynd.com/partners/commerce/sdk/platform/user/bulkImportStoreFrontUsers/).
|
|
184
|
+
*/
|
|
185
|
+
async bulkImportStoreFrontUsers(
|
|
186
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
187
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
188
|
+
) {
|
|
189
|
+
const {
|
|
190
|
+
error,
|
|
191
|
+
} = UserPlatformApplicationValidator.bulkImportStoreFrontUsers().validate(
|
|
192
|
+
{
|
|
193
|
+
body,
|
|
194
|
+
},
|
|
195
|
+
{ abortEarly: false, allowUnknown: true }
|
|
196
|
+
);
|
|
197
|
+
if (error) {
|
|
198
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
// Showing warrnings if extra unknown parameters are found
|
|
202
|
+
const {
|
|
203
|
+
error: warrning,
|
|
204
|
+
} = UserPlatformApplicationValidator.bulkImportStoreFrontUsers().validate(
|
|
205
|
+
{
|
|
206
|
+
body,
|
|
207
|
+
},
|
|
208
|
+
{ abortEarly: false, allowUnknown: false }
|
|
209
|
+
);
|
|
210
|
+
if (warrning) {
|
|
211
|
+
Logger({
|
|
212
|
+
level: "WARN",
|
|
213
|
+
message: `Parameter Validation warrnings for platform > User > bulkImportStoreFrontUsers \n ${warrning}`,
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
const query_params = {};
|
|
218
|
+
|
|
219
|
+
const response = await PlatformAPIClient.execute(
|
|
220
|
+
this.config,
|
|
221
|
+
"post",
|
|
222
|
+
`/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/users/jobs/import`,
|
|
223
|
+
query_params,
|
|
224
|
+
body,
|
|
225
|
+
requestHeaders,
|
|
226
|
+
{ responseHeaders }
|
|
227
|
+
);
|
|
228
|
+
|
|
229
|
+
let responseData = response;
|
|
230
|
+
if (responseHeaders) {
|
|
231
|
+
responseData = response[0];
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
const {
|
|
235
|
+
error: res_error,
|
|
236
|
+
} = UserPlatformModel.BulkActionModel().validate(responseData, {
|
|
237
|
+
abortEarly: false,
|
|
238
|
+
allowUnknown: true,
|
|
239
|
+
});
|
|
240
|
+
|
|
241
|
+
if (res_error) {
|
|
242
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
243
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
244
|
+
} else {
|
|
245
|
+
Logger({
|
|
246
|
+
level: "WARN",
|
|
247
|
+
message: `Response Validation Warnings for platform > User > bulkImportStoreFrontUsers \n ${res_error}`,
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
return response;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* @param {UserPlatformApplicationValidator.CreateBulkExportUsersParam} arg
|
|
257
|
+
* - Arg object
|
|
258
|
+
*
|
|
259
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
260
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
261
|
+
* @returns {Promise<UserPlatformModel.BulkActionModel>} - Success response
|
|
262
|
+
* @name createBulkExportUsers
|
|
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://docs.fynd.com/partners/commerce/sdk/platform/user/createBulkExportUsers/).
|
|
265
|
+
*/
|
|
266
|
+
async createBulkExportUsers(
|
|
267
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
268
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
269
|
+
) {
|
|
270
|
+
const {
|
|
271
|
+
error,
|
|
272
|
+
} = UserPlatformApplicationValidator.createBulkExportUsers().validate(
|
|
273
|
+
{
|
|
274
|
+
body,
|
|
275
|
+
},
|
|
276
|
+
{ abortEarly: false, allowUnknown: true }
|
|
277
|
+
);
|
|
278
|
+
if (error) {
|
|
279
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
// Showing warrnings if extra unknown parameters are found
|
|
283
|
+
const {
|
|
284
|
+
error: warrning,
|
|
285
|
+
} = UserPlatformApplicationValidator.createBulkExportUsers().validate(
|
|
286
|
+
{
|
|
287
|
+
body,
|
|
288
|
+
},
|
|
289
|
+
{ abortEarly: false, allowUnknown: false }
|
|
290
|
+
);
|
|
291
|
+
if (warrning) {
|
|
292
|
+
Logger({
|
|
293
|
+
level: "WARN",
|
|
294
|
+
message: `Parameter Validation warrnings for platform > User > createBulkExportUsers \n ${warrning}`,
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
const query_params = {};
|
|
299
|
+
|
|
300
|
+
const response = await PlatformAPIClient.execute(
|
|
301
|
+
this.config,
|
|
302
|
+
"post",
|
|
303
|
+
`/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/users/jobs/export`,
|
|
304
|
+
query_params,
|
|
305
|
+
body,
|
|
306
|
+
requestHeaders,
|
|
307
|
+
{ responseHeaders }
|
|
308
|
+
);
|
|
309
|
+
|
|
310
|
+
let responseData = response;
|
|
311
|
+
if (responseHeaders) {
|
|
312
|
+
responseData = response[0];
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
const {
|
|
316
|
+
error: res_error,
|
|
317
|
+
} = UserPlatformModel.BulkActionModel().validate(responseData, {
|
|
318
|
+
abortEarly: false,
|
|
319
|
+
allowUnknown: true,
|
|
320
|
+
});
|
|
321
|
+
|
|
322
|
+
if (res_error) {
|
|
323
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
324
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
325
|
+
} else {
|
|
326
|
+
Logger({
|
|
327
|
+
level: "WARN",
|
|
328
|
+
message: `Response Validation Warnings for platform > User > createBulkExportUsers \n ${res_error}`,
|
|
329
|
+
});
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
return response;
|
|
334
|
+
}
|
|
335
|
+
|
|
174
336
|
/**
|
|
175
337
|
* @param {UserPlatformApplicationValidator.CreateUserParam} arg - Arg object
|
|
176
338
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -178,15 +340,16 @@ class User {
|
|
|
178
340
|
* @returns {Promise<UserPlatformModel.CreateUserResponseSchema>} - Success response
|
|
179
341
|
* @name createUser
|
|
180
342
|
* @summary: Create User
|
|
181
|
-
* @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/).
|
|
182
344
|
*/
|
|
183
345
|
async createUser(
|
|
184
|
-
{ body, requestHeaders } = { requestHeaders: {} },
|
|
346
|
+
{ body, verified, requestHeaders } = { requestHeaders: {} },
|
|
185
347
|
{ responseHeaders } = { responseHeaders: false }
|
|
186
348
|
) {
|
|
187
349
|
const { error } = UserPlatformApplicationValidator.createUser().validate(
|
|
188
350
|
{
|
|
189
351
|
body,
|
|
352
|
+
verified,
|
|
190
353
|
},
|
|
191
354
|
{ abortEarly: false, allowUnknown: true }
|
|
192
355
|
);
|
|
@@ -200,6 +363,7 @@ class User {
|
|
|
200
363
|
} = UserPlatformApplicationValidator.createUser().validate(
|
|
201
364
|
{
|
|
202
365
|
body,
|
|
366
|
+
verified,
|
|
203
367
|
},
|
|
204
368
|
{ abortEarly: false, allowUnknown: false }
|
|
205
369
|
);
|
|
@@ -211,6 +375,7 @@ class User {
|
|
|
211
375
|
}
|
|
212
376
|
|
|
213
377
|
const query_params = {};
|
|
378
|
+
query_params["verified"] = verified;
|
|
214
379
|
|
|
215
380
|
const response = await PlatformAPIClient.execute(
|
|
216
381
|
this.config,
|
|
@@ -254,11 +419,11 @@ class User {
|
|
|
254
419
|
*
|
|
255
420
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
256
421
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
257
|
-
* @returns {Promise<UserPlatformModel.
|
|
422
|
+
* @returns {Promise<UserPlatformModel.UserAttributeDefinitionDetails>} -
|
|
258
423
|
* Success response
|
|
259
424
|
* @name createUserAttributeDefinition
|
|
260
425
|
* @summary: Create a User Attribute Definition
|
|
261
|
-
* @description: Create a new User Attribute Definition - Check out [method documentation](https://
|
|
426
|
+
* @description: Create a new User Attribute Definition - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/createUserAttributeDefinition/).
|
|
262
427
|
*/
|
|
263
428
|
async createUserAttributeDefinition(
|
|
264
429
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -311,7 +476,7 @@ class User {
|
|
|
311
476
|
|
|
312
477
|
const {
|
|
313
478
|
error: res_error,
|
|
314
|
-
} = UserPlatformModel.
|
|
479
|
+
} = UserPlatformModel.UserAttributeDefinitionDetails().validate(
|
|
315
480
|
responseData,
|
|
316
481
|
{ abortEarly: false, allowUnknown: true }
|
|
317
482
|
);
|
|
@@ -337,7 +502,7 @@ class User {
|
|
|
337
502
|
* @returns {Promise<UserPlatformModel.UserGroupResponseSchema>} - Success response
|
|
338
503
|
* @name createUserGroup
|
|
339
504
|
* @summary: Create User Group
|
|
340
|
-
* @description: Form and add a new user group. - Check out [method documentation](https://
|
|
505
|
+
* @description: Form and add a new user group. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/createUserGroup/).
|
|
341
506
|
*/
|
|
342
507
|
async createUserGroup(
|
|
343
508
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -417,7 +582,7 @@ class User {
|
|
|
417
582
|
* Success response
|
|
418
583
|
* @name createUserSession
|
|
419
584
|
* @summary: Create User Session
|
|
420
|
-
* @description: Create session for user interactions - Check out [method documentation](https://
|
|
585
|
+
* @description: Create session for user interactions - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/createUserSession/).
|
|
421
586
|
*/
|
|
422
587
|
async createUserSession(
|
|
423
588
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -499,7 +664,7 @@ class User {
|
|
|
499
664
|
* Success response
|
|
500
665
|
* @name deleteActiveSessions
|
|
501
666
|
* @summary: Delete User Active Sessions
|
|
502
|
-
* @description: Terminate all active user sessions. - Check out [method documentation](https://
|
|
667
|
+
* @description: Terminate all active user sessions. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/deleteActiveSessions/).
|
|
503
668
|
*/
|
|
504
669
|
async deleteActiveSessions(
|
|
505
670
|
{ id, reason, requestHeaders } = { requestHeaders: {} },
|
|
@@ -583,7 +748,7 @@ class User {
|
|
|
583
748
|
* Success response
|
|
584
749
|
* @name deleteSession
|
|
585
750
|
* @summary: Delete User Session
|
|
586
|
-
* @description: Terminate an active user session. - Check out [method documentation](https://
|
|
751
|
+
* @description: Terminate an active user session. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/deleteSession/).
|
|
587
752
|
*/
|
|
588
753
|
async deleteSession(
|
|
589
754
|
{ id, sessionId, reason, requestHeaders } = { requestHeaders: {} },
|
|
@@ -664,10 +829,10 @@ class User {
|
|
|
664
829
|
* @param {UserPlatformApplicationValidator.DeleteUserAttributeParam} arg - Arg object
|
|
665
830
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
666
831
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
667
|
-
* @returns {Promise<UserPlatformModel.
|
|
832
|
+
* @returns {Promise<UserPlatformModel.SuccessMessage>} - Success response
|
|
668
833
|
* @name deleteUserAttribute
|
|
669
834
|
* @summary: Delete User Attribute
|
|
670
|
-
* @description: Delete User Attribute - Check out [method documentation](https://
|
|
835
|
+
* @description: Delete User Attribute - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/deleteUserAttribute/).
|
|
671
836
|
*/
|
|
672
837
|
async deleteUserAttribute(
|
|
673
838
|
{ attributeDefId, userId, requestHeaders } = { requestHeaders: {} },
|
|
@@ -716,7 +881,7 @@ class User {
|
|
|
716
881
|
|
|
717
882
|
const {
|
|
718
883
|
error: res_error,
|
|
719
|
-
} = UserPlatformModel.
|
|
884
|
+
} = UserPlatformModel.SuccessMessage().validate(responseData, {
|
|
720
885
|
abortEarly: false,
|
|
721
886
|
allowUnknown: true,
|
|
722
887
|
});
|
|
@@ -741,10 +906,10 @@ class User {
|
|
|
741
906
|
*
|
|
742
907
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
743
908
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
744
|
-
* @returns {Promise<UserPlatformModel.
|
|
909
|
+
* @returns {Promise<UserPlatformModel.SuccessMessage>} - Success response
|
|
745
910
|
* @name deleteUserAttributeDefinitionById
|
|
746
911
|
* @summary: Delete User Attribute Definition
|
|
747
|
-
* @description: Delete a user attribute definition by its unique identifier. - Check out [method documentation](https://
|
|
912
|
+
* @description: Delete a user attribute definition by its unique identifier. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/deleteUserAttributeDefinitionById/).
|
|
748
913
|
*/
|
|
749
914
|
async deleteUserAttributeDefinitionById(
|
|
750
915
|
{ attributeDefId, requestHeaders } = { requestHeaders: {} },
|
|
@@ -770,16 +935,452 @@ class User {
|
|
|
770
935
|
if (warrning) {
|
|
771
936
|
Logger({
|
|
772
937
|
level: "WARN",
|
|
773
|
-
message: `Parameter Validation warrnings for platform > User > deleteUserAttributeDefinitionById \n ${warrning}`,
|
|
938
|
+
message: `Parameter Validation warrnings for platform > User > deleteUserAttributeDefinitionById \n ${warrning}`,
|
|
939
|
+
});
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
const query_params = {};
|
|
943
|
+
|
|
944
|
+
const response = await PlatformAPIClient.execute(
|
|
945
|
+
this.config,
|
|
946
|
+
"delete",
|
|
947
|
+
`/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/user_attribute/definition/${attributeDefId}`,
|
|
948
|
+
query_params,
|
|
949
|
+
undefined,
|
|
950
|
+
requestHeaders,
|
|
951
|
+
{ responseHeaders }
|
|
952
|
+
);
|
|
953
|
+
|
|
954
|
+
let responseData = response;
|
|
955
|
+
if (responseHeaders) {
|
|
956
|
+
responseData = response[0];
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
const {
|
|
960
|
+
error: res_error,
|
|
961
|
+
} = UserPlatformModel.SuccessMessage().validate(responseData, {
|
|
962
|
+
abortEarly: false,
|
|
963
|
+
allowUnknown: true,
|
|
964
|
+
});
|
|
965
|
+
|
|
966
|
+
if (res_error) {
|
|
967
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
968
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
969
|
+
} else {
|
|
970
|
+
Logger({
|
|
971
|
+
level: "WARN",
|
|
972
|
+
message: `Response Validation Warnings for platform > User > deleteUserAttributeDefinitionById \n ${res_error}`,
|
|
973
|
+
});
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
return response;
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
/**
|
|
981
|
+
* @param {UserPlatformApplicationValidator.DeleteUserAttributesInBulkParam} arg
|
|
982
|
+
* - Arg object
|
|
983
|
+
*
|
|
984
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
985
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
986
|
+
* @returns {Promise<UserPlatformModel.SuccessMessage>} - Success response
|
|
987
|
+
* @name deleteUserAttributesInBulk
|
|
988
|
+
* @summary: Delete User Attribute Values in Bulk
|
|
989
|
+
* @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/).
|
|
990
|
+
*/
|
|
991
|
+
async deleteUserAttributesInBulk(
|
|
992
|
+
{ userId, body, requestHeaders } = { requestHeaders: {} },
|
|
993
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
994
|
+
) {
|
|
995
|
+
const {
|
|
996
|
+
error,
|
|
997
|
+
} = UserPlatformApplicationValidator.deleteUserAttributesInBulk().validate(
|
|
998
|
+
{
|
|
999
|
+
userId,
|
|
1000
|
+
|
|
1001
|
+
body,
|
|
1002
|
+
},
|
|
1003
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1004
|
+
);
|
|
1005
|
+
if (error) {
|
|
1006
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1010
|
+
const {
|
|
1011
|
+
error: warrning,
|
|
1012
|
+
} = UserPlatformApplicationValidator.deleteUserAttributesInBulk().validate(
|
|
1013
|
+
{
|
|
1014
|
+
userId,
|
|
1015
|
+
|
|
1016
|
+
body,
|
|
1017
|
+
},
|
|
1018
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1019
|
+
);
|
|
1020
|
+
if (warrning) {
|
|
1021
|
+
Logger({
|
|
1022
|
+
level: "WARN",
|
|
1023
|
+
message: `Parameter Validation warrnings for platform > User > deleteUserAttributesInBulk \n ${warrning}`,
|
|
1024
|
+
});
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
const query_params = {};
|
|
1028
|
+
|
|
1029
|
+
const response = await PlatformAPIClient.execute(
|
|
1030
|
+
this.config,
|
|
1031
|
+
"delete",
|
|
1032
|
+
`/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/user_attribute/user/${userId}`,
|
|
1033
|
+
query_params,
|
|
1034
|
+
body,
|
|
1035
|
+
requestHeaders,
|
|
1036
|
+
{ responseHeaders }
|
|
1037
|
+
);
|
|
1038
|
+
|
|
1039
|
+
let responseData = response;
|
|
1040
|
+
if (responseHeaders) {
|
|
1041
|
+
responseData = response[0];
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
const {
|
|
1045
|
+
error: res_error,
|
|
1046
|
+
} = UserPlatformModel.SuccessMessage().validate(responseData, {
|
|
1047
|
+
abortEarly: false,
|
|
1048
|
+
allowUnknown: true,
|
|
1049
|
+
});
|
|
1050
|
+
|
|
1051
|
+
if (res_error) {
|
|
1052
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1053
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1054
|
+
} else {
|
|
1055
|
+
Logger({
|
|
1056
|
+
level: "WARN",
|
|
1057
|
+
message: `Response Validation Warnings for platform > User > deleteUserAttributesInBulk \n ${res_error}`,
|
|
1058
|
+
});
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
return response;
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
/**
|
|
1066
|
+
* @param {UserPlatformApplicationValidator.DeleteUserGroupParam} arg - Arg object
|
|
1067
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1068
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1069
|
+
* @returns {Promise<UserPlatformModel.DeleteUserGroupSuccess>} - Success response
|
|
1070
|
+
* @name deleteUserGroup
|
|
1071
|
+
* @summary: Delete User Group
|
|
1072
|
+
* @description: Permanently delete a user group by its unique identifier. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/deleteUserGroup/).
|
|
1073
|
+
*/
|
|
1074
|
+
async deleteUserGroup(
|
|
1075
|
+
{ groupId, requestHeaders } = { requestHeaders: {} },
|
|
1076
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1077
|
+
) {
|
|
1078
|
+
const {
|
|
1079
|
+
error,
|
|
1080
|
+
} = UserPlatformApplicationValidator.deleteUserGroup().validate(
|
|
1081
|
+
{
|
|
1082
|
+
groupId,
|
|
1083
|
+
},
|
|
1084
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1085
|
+
);
|
|
1086
|
+
if (error) {
|
|
1087
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1090
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1091
|
+
const {
|
|
1092
|
+
error: warrning,
|
|
1093
|
+
} = UserPlatformApplicationValidator.deleteUserGroup().validate(
|
|
1094
|
+
{
|
|
1095
|
+
groupId,
|
|
1096
|
+
},
|
|
1097
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1098
|
+
);
|
|
1099
|
+
if (warrning) {
|
|
1100
|
+
Logger({
|
|
1101
|
+
level: "WARN",
|
|
1102
|
+
message: `Parameter Validation warrnings for platform > User > deleteUserGroup \n ${warrning}`,
|
|
1103
|
+
});
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
const query_params = {};
|
|
1107
|
+
|
|
1108
|
+
const response = await PlatformAPIClient.execute(
|
|
1109
|
+
this.config,
|
|
1110
|
+
"delete",
|
|
1111
|
+
`/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/user_group/${groupId}`,
|
|
1112
|
+
query_params,
|
|
1113
|
+
undefined,
|
|
1114
|
+
requestHeaders,
|
|
1115
|
+
{ responseHeaders }
|
|
1116
|
+
);
|
|
1117
|
+
|
|
1118
|
+
let responseData = response;
|
|
1119
|
+
if (responseHeaders) {
|
|
1120
|
+
responseData = response[0];
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
const {
|
|
1124
|
+
error: res_error,
|
|
1125
|
+
} = UserPlatformModel.DeleteUserGroupSuccess().validate(responseData, {
|
|
1126
|
+
abortEarly: false,
|
|
1127
|
+
allowUnknown: true,
|
|
1128
|
+
});
|
|
1129
|
+
|
|
1130
|
+
if (res_error) {
|
|
1131
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1132
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1133
|
+
} else {
|
|
1134
|
+
Logger({
|
|
1135
|
+
level: "WARN",
|
|
1136
|
+
message: `Response Validation Warnings for platform > User > deleteUserGroup \n ${res_error}`,
|
|
1137
|
+
});
|
|
1138
|
+
}
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1141
|
+
return response;
|
|
1142
|
+
}
|
|
1143
|
+
|
|
1144
|
+
/**
|
|
1145
|
+
* @param {UserPlatformApplicationValidator.FilterUsersByAttributesParam} arg
|
|
1146
|
+
* - Arg object
|
|
1147
|
+
*
|
|
1148
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1149
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1150
|
+
* @returns {Promise<UserPlatformModel.UserAttributeFiltered>} - Success response
|
|
1151
|
+
* @name filterUsersByAttributes
|
|
1152
|
+
* @summary: Filter Users by Attribute Conditions
|
|
1153
|
+
* @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/).
|
|
1154
|
+
*/
|
|
1155
|
+
async filterUsersByAttributes(
|
|
1156
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1157
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1158
|
+
) {
|
|
1159
|
+
const {
|
|
1160
|
+
error,
|
|
1161
|
+
} = UserPlatformApplicationValidator.filterUsersByAttributes().validate(
|
|
1162
|
+
{
|
|
1163
|
+
body,
|
|
1164
|
+
},
|
|
1165
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1166
|
+
);
|
|
1167
|
+
if (error) {
|
|
1168
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1171
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1172
|
+
const {
|
|
1173
|
+
error: warrning,
|
|
1174
|
+
} = UserPlatformApplicationValidator.filterUsersByAttributes().validate(
|
|
1175
|
+
{
|
|
1176
|
+
body,
|
|
1177
|
+
},
|
|
1178
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1179
|
+
);
|
|
1180
|
+
if (warrning) {
|
|
1181
|
+
Logger({
|
|
1182
|
+
level: "WARN",
|
|
1183
|
+
message: `Parameter Validation warrnings for platform > User > filterUsersByAttributes \n ${warrning}`,
|
|
1184
|
+
});
|
|
1185
|
+
}
|
|
1186
|
+
|
|
1187
|
+
const query_params = {};
|
|
1188
|
+
|
|
1189
|
+
const response = await PlatformAPIClient.execute(
|
|
1190
|
+
this.config,
|
|
1191
|
+
"post",
|
|
1192
|
+
`/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/user_attribute/users`,
|
|
1193
|
+
query_params,
|
|
1194
|
+
body,
|
|
1195
|
+
requestHeaders,
|
|
1196
|
+
{ responseHeaders }
|
|
1197
|
+
);
|
|
1198
|
+
|
|
1199
|
+
let responseData = response;
|
|
1200
|
+
if (responseHeaders) {
|
|
1201
|
+
responseData = response[0];
|
|
1202
|
+
}
|
|
1203
|
+
|
|
1204
|
+
const {
|
|
1205
|
+
error: res_error,
|
|
1206
|
+
} = UserPlatformModel.UserAttributeFiltered().validate(responseData, {
|
|
1207
|
+
abortEarly: false,
|
|
1208
|
+
allowUnknown: true,
|
|
1209
|
+
});
|
|
1210
|
+
|
|
1211
|
+
if (res_error) {
|
|
1212
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1213
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1214
|
+
} else {
|
|
1215
|
+
Logger({
|
|
1216
|
+
level: "WARN",
|
|
1217
|
+
message: `Response Validation Warnings for platform > User > filterUsersByAttributes \n ${res_error}`,
|
|
1218
|
+
});
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1222
|
+
return response;
|
|
1223
|
+
}
|
|
1224
|
+
|
|
1225
|
+
/**
|
|
1226
|
+
* @param {UserPlatformApplicationValidator.GetActiveSessionsParam} arg - Arg object
|
|
1227
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1228
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1229
|
+
* @returns {Promise<UserPlatformModel.SessionListResponseSchema>} - Success response
|
|
1230
|
+
* @name getActiveSessions
|
|
1231
|
+
* @summary: Get User Active Sessions
|
|
1232
|
+
* @description: Retrieve a list of currently active user sessions. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/getActiveSessions/).
|
|
1233
|
+
*/
|
|
1234
|
+
async getActiveSessions(
|
|
1235
|
+
{ id, requestHeaders } = { requestHeaders: {} },
|
|
1236
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1237
|
+
) {
|
|
1238
|
+
const {
|
|
1239
|
+
error,
|
|
1240
|
+
} = UserPlatformApplicationValidator.getActiveSessions().validate(
|
|
1241
|
+
{
|
|
1242
|
+
id,
|
|
1243
|
+
},
|
|
1244
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1245
|
+
);
|
|
1246
|
+
if (error) {
|
|
1247
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1250
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1251
|
+
const {
|
|
1252
|
+
error: warrning,
|
|
1253
|
+
} = UserPlatformApplicationValidator.getActiveSessions().validate(
|
|
1254
|
+
{
|
|
1255
|
+
id,
|
|
1256
|
+
},
|
|
1257
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1258
|
+
);
|
|
1259
|
+
if (warrning) {
|
|
1260
|
+
Logger({
|
|
1261
|
+
level: "WARN",
|
|
1262
|
+
message: `Parameter Validation warrnings for platform > User > getActiveSessions \n ${warrning}`,
|
|
1263
|
+
});
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
const query_params = {};
|
|
1267
|
+
query_params["id"] = id;
|
|
1268
|
+
|
|
1269
|
+
const response = await PlatformAPIClient.execute(
|
|
1270
|
+
this.config,
|
|
1271
|
+
"get",
|
|
1272
|
+
`/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/customers/sessions`,
|
|
1273
|
+
query_params,
|
|
1274
|
+
undefined,
|
|
1275
|
+
requestHeaders,
|
|
1276
|
+
{ responseHeaders }
|
|
1277
|
+
);
|
|
1278
|
+
|
|
1279
|
+
let responseData = response;
|
|
1280
|
+
if (responseHeaders) {
|
|
1281
|
+
responseData = response[0];
|
|
1282
|
+
}
|
|
1283
|
+
|
|
1284
|
+
const {
|
|
1285
|
+
error: res_error,
|
|
1286
|
+
} = UserPlatformModel.SessionListResponseSchema().validate(responseData, {
|
|
1287
|
+
abortEarly: false,
|
|
1288
|
+
allowUnknown: true,
|
|
1289
|
+
});
|
|
1290
|
+
|
|
1291
|
+
if (res_error) {
|
|
1292
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1293
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1294
|
+
} else {
|
|
1295
|
+
Logger({
|
|
1296
|
+
level: "WARN",
|
|
1297
|
+
message: `Response Validation Warnings for platform > User > getActiveSessions \n ${res_error}`,
|
|
1298
|
+
});
|
|
1299
|
+
}
|
|
1300
|
+
}
|
|
1301
|
+
|
|
1302
|
+
return response;
|
|
1303
|
+
}
|
|
1304
|
+
|
|
1305
|
+
/**
|
|
1306
|
+
* @param {UserPlatformApplicationValidator.GetBulkExportUsersListParam} arg
|
|
1307
|
+
* - Arg object
|
|
1308
|
+
*
|
|
1309
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1310
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1311
|
+
* @returns {Promise<UserPlatformModel.BulkActionPaginationSchema>} - Success response
|
|
1312
|
+
* @name getBulkExportUsersList
|
|
1313
|
+
* @summary: Get Bulk User's Export Lists for a specific Application.
|
|
1314
|
+
* @description: This API allows fetching the list of bulk user exports for a specific application and company.
|
|
1315
|
+
* It supports pagination and filtering based on various parameters.
|
|
1316
|
+
* - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/getBulkExportUsersList/).
|
|
1317
|
+
*/
|
|
1318
|
+
async getBulkExportUsersList(
|
|
1319
|
+
{
|
|
1320
|
+
pageNo,
|
|
1321
|
+
pageSize,
|
|
1322
|
+
fileFormat,
|
|
1323
|
+
search,
|
|
1324
|
+
startDate,
|
|
1325
|
+
endDate,
|
|
1326
|
+
status,
|
|
1327
|
+
requestHeaders,
|
|
1328
|
+
} = { requestHeaders: {} },
|
|
1329
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1330
|
+
) {
|
|
1331
|
+
const {
|
|
1332
|
+
error,
|
|
1333
|
+
} = UserPlatformApplicationValidator.getBulkExportUsersList().validate(
|
|
1334
|
+
{
|
|
1335
|
+
pageNo,
|
|
1336
|
+
pageSize,
|
|
1337
|
+
fileFormat,
|
|
1338
|
+
search,
|
|
1339
|
+
startDate,
|
|
1340
|
+
endDate,
|
|
1341
|
+
status,
|
|
1342
|
+
},
|
|
1343
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1344
|
+
);
|
|
1345
|
+
if (error) {
|
|
1346
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1347
|
+
}
|
|
1348
|
+
|
|
1349
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1350
|
+
const {
|
|
1351
|
+
error: warrning,
|
|
1352
|
+
} = UserPlatformApplicationValidator.getBulkExportUsersList().validate(
|
|
1353
|
+
{
|
|
1354
|
+
pageNo,
|
|
1355
|
+
pageSize,
|
|
1356
|
+
fileFormat,
|
|
1357
|
+
search,
|
|
1358
|
+
startDate,
|
|
1359
|
+
endDate,
|
|
1360
|
+
status,
|
|
1361
|
+
},
|
|
1362
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1363
|
+
);
|
|
1364
|
+
if (warrning) {
|
|
1365
|
+
Logger({
|
|
1366
|
+
level: "WARN",
|
|
1367
|
+
message: `Parameter Validation warrnings for platform > User > getBulkExportUsersList \n ${warrning}`,
|
|
774
1368
|
});
|
|
775
1369
|
}
|
|
776
1370
|
|
|
777
1371
|
const query_params = {};
|
|
1372
|
+
query_params["page_no"] = pageNo;
|
|
1373
|
+
query_params["page_size"] = pageSize;
|
|
1374
|
+
query_params["file_format"] = fileFormat;
|
|
1375
|
+
query_params["search"] = search;
|
|
1376
|
+
query_params["start_date"] = startDate;
|
|
1377
|
+
query_params["end_date"] = endDate;
|
|
1378
|
+
query_params["status"] = status;
|
|
778
1379
|
|
|
779
1380
|
const response = await PlatformAPIClient.execute(
|
|
780
1381
|
this.config,
|
|
781
|
-
"
|
|
782
|
-
`/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
1382
|
+
"get",
|
|
1383
|
+
`/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/users/jobs/export`,
|
|
783
1384
|
query_params,
|
|
784
1385
|
undefined,
|
|
785
1386
|
requestHeaders,
|
|
@@ -793,7 +1394,7 @@ class User {
|
|
|
793
1394
|
|
|
794
1395
|
const {
|
|
795
1396
|
error: res_error,
|
|
796
|
-
} = UserPlatformModel.
|
|
1397
|
+
} = UserPlatformModel.BulkActionPaginationSchema().validate(responseData, {
|
|
797
1398
|
abortEarly: false,
|
|
798
1399
|
allowUnknown: true,
|
|
799
1400
|
});
|
|
@@ -804,7 +1405,7 @@ class User {
|
|
|
804
1405
|
} else {
|
|
805
1406
|
Logger({
|
|
806
1407
|
level: "WARN",
|
|
807
|
-
message: `Response Validation Warnings for platform > User >
|
|
1408
|
+
message: `Response Validation Warnings for platform > User > getBulkExportUsersList \n ${res_error}`,
|
|
808
1409
|
});
|
|
809
1410
|
}
|
|
810
1411
|
}
|
|
@@ -813,23 +1414,42 @@ class User {
|
|
|
813
1414
|
}
|
|
814
1415
|
|
|
815
1416
|
/**
|
|
816
|
-
* @param {UserPlatformApplicationValidator.
|
|
1417
|
+
* @param {UserPlatformApplicationValidator.GetBulkImportUsersListParam} arg
|
|
1418
|
+
* - Arg object
|
|
1419
|
+
*
|
|
817
1420
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
818
1421
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
819
|
-
* @returns {Promise<UserPlatformModel.
|
|
820
|
-
* @name
|
|
821
|
-
* @summary: Get User
|
|
822
|
-
* @description:
|
|
1422
|
+
* @returns {Promise<UserPlatformModel.BulkActionPaginationSchema>} - Success response
|
|
1423
|
+
* @name getBulkImportUsersList
|
|
1424
|
+
* @summary: Get Bulk User's Import Lists for a specific Application.
|
|
1425
|
+
* @description: This API allows fetching the list of bulk user imports for a specific application and company.
|
|
1426
|
+
* It supports pagination and filtering based on various parameters.
|
|
1427
|
+
* - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/getBulkImportUsersList/).
|
|
823
1428
|
*/
|
|
824
|
-
async
|
|
825
|
-
{
|
|
1429
|
+
async getBulkImportUsersList(
|
|
1430
|
+
{
|
|
1431
|
+
pageNo,
|
|
1432
|
+
pageSize,
|
|
1433
|
+
search,
|
|
1434
|
+
startDate,
|
|
1435
|
+
endDate,
|
|
1436
|
+
status,
|
|
1437
|
+
fileFormat,
|
|
1438
|
+
requestHeaders,
|
|
1439
|
+
} = { requestHeaders: {} },
|
|
826
1440
|
{ responseHeaders } = { responseHeaders: false }
|
|
827
1441
|
) {
|
|
828
1442
|
const {
|
|
829
1443
|
error,
|
|
830
|
-
} = UserPlatformApplicationValidator.
|
|
1444
|
+
} = UserPlatformApplicationValidator.getBulkImportUsersList().validate(
|
|
831
1445
|
{
|
|
832
|
-
|
|
1446
|
+
pageNo,
|
|
1447
|
+
pageSize,
|
|
1448
|
+
search,
|
|
1449
|
+
startDate,
|
|
1450
|
+
endDate,
|
|
1451
|
+
status,
|
|
1452
|
+
fileFormat,
|
|
833
1453
|
},
|
|
834
1454
|
{ abortEarly: false, allowUnknown: true }
|
|
835
1455
|
);
|
|
@@ -840,26 +1460,38 @@ class User {
|
|
|
840
1460
|
// Showing warrnings if extra unknown parameters are found
|
|
841
1461
|
const {
|
|
842
1462
|
error: warrning,
|
|
843
|
-
} = UserPlatformApplicationValidator.
|
|
1463
|
+
} = UserPlatformApplicationValidator.getBulkImportUsersList().validate(
|
|
844
1464
|
{
|
|
845
|
-
|
|
1465
|
+
pageNo,
|
|
1466
|
+
pageSize,
|
|
1467
|
+
search,
|
|
1468
|
+
startDate,
|
|
1469
|
+
endDate,
|
|
1470
|
+
status,
|
|
1471
|
+
fileFormat,
|
|
846
1472
|
},
|
|
847
1473
|
{ abortEarly: false, allowUnknown: false }
|
|
848
1474
|
);
|
|
849
1475
|
if (warrning) {
|
|
850
1476
|
Logger({
|
|
851
1477
|
level: "WARN",
|
|
852
|
-
message: `Parameter Validation warrnings for platform > User >
|
|
1478
|
+
message: `Parameter Validation warrnings for platform > User > getBulkImportUsersList \n ${warrning}`,
|
|
853
1479
|
});
|
|
854
1480
|
}
|
|
855
1481
|
|
|
856
1482
|
const query_params = {};
|
|
857
|
-
query_params["
|
|
1483
|
+
query_params["page_no"] = pageNo;
|
|
1484
|
+
query_params["page_size"] = pageSize;
|
|
1485
|
+
query_params["search"] = search;
|
|
1486
|
+
query_params["start_date"] = startDate;
|
|
1487
|
+
query_params["end_date"] = endDate;
|
|
1488
|
+
query_params["status"] = status;
|
|
1489
|
+
query_params["file_format"] = fileFormat;
|
|
858
1490
|
|
|
859
1491
|
const response = await PlatformAPIClient.execute(
|
|
860
1492
|
this.config,
|
|
861
1493
|
"get",
|
|
862
|
-
`/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
1494
|
+
`/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/users/jobs/import`,
|
|
863
1495
|
query_params,
|
|
864
1496
|
undefined,
|
|
865
1497
|
requestHeaders,
|
|
@@ -873,7 +1505,7 @@ class User {
|
|
|
873
1505
|
|
|
874
1506
|
const {
|
|
875
1507
|
error: res_error,
|
|
876
|
-
} = UserPlatformModel.
|
|
1508
|
+
} = UserPlatformModel.BulkActionPaginationSchema().validate(responseData, {
|
|
877
1509
|
abortEarly: false,
|
|
878
1510
|
allowUnknown: true,
|
|
879
1511
|
});
|
|
@@ -884,7 +1516,7 @@ class User {
|
|
|
884
1516
|
} else {
|
|
885
1517
|
Logger({
|
|
886
1518
|
level: "WARN",
|
|
887
|
-
message: `Response Validation Warnings for platform > User >
|
|
1519
|
+
message: `Response Validation Warnings for platform > User > getBulkImportUsersList \n ${res_error}`,
|
|
888
1520
|
});
|
|
889
1521
|
}
|
|
890
1522
|
}
|
|
@@ -899,7 +1531,7 @@ class User {
|
|
|
899
1531
|
* @returns {Promise<UserPlatformModel.CustomerListResponseSchema>} - Success response
|
|
900
1532
|
* @name getCustomers
|
|
901
1533
|
* @summary: Get a List of Users
|
|
902
|
-
* @description: Retrieve details of users registered in the sales channel - Check out [method documentation](https://
|
|
1534
|
+
* @description: Retrieve details of users registered in the sales channel - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/getCustomers/).
|
|
903
1535
|
*/
|
|
904
1536
|
async getCustomers(
|
|
905
1537
|
{ q, pageSize, pageNo, requestHeaders } = { requestHeaders: {} },
|
|
@@ -983,7 +1615,7 @@ class User {
|
|
|
983
1615
|
* @returns {Promise<UserPlatformModel.PlatformSchema>} - Success response
|
|
984
1616
|
* @name getPlatformConfig
|
|
985
1617
|
* @summary: Get Platform Config
|
|
986
|
-
* @description: Retrieve platform sales channel authentication configuration. - Check out [method documentation](https://
|
|
1618
|
+
* @description: Retrieve platform sales channel authentication configuration. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/getPlatformConfig/).
|
|
987
1619
|
*/
|
|
988
1620
|
async getPlatformConfig(
|
|
989
1621
|
{ requestHeaders } = { requestHeaders: {} },
|
|
@@ -1055,10 +1687,10 @@ class User {
|
|
|
1055
1687
|
* @param {UserPlatformApplicationValidator.GetUserAttributeParam} arg - Arg object
|
|
1056
1688
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1057
1689
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1058
|
-
* @returns {Promise<UserPlatformModel.
|
|
1690
|
+
* @returns {Promise<UserPlatformModel.UserAttribute>} - Success response
|
|
1059
1691
|
* @name getUserAttribute
|
|
1060
1692
|
* @summary: Get User Attribute
|
|
1061
|
-
* @description: Get User Attribute - Check out [method documentation](https://
|
|
1693
|
+
* @description: Get User Attribute - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/getUserAttribute/).
|
|
1062
1694
|
*/
|
|
1063
1695
|
async getUserAttribute(
|
|
1064
1696
|
{ attributeDefId, userId, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1107,7 +1739,7 @@ class User {
|
|
|
1107
1739
|
|
|
1108
1740
|
const {
|
|
1109
1741
|
error: res_error,
|
|
1110
|
-
} = UserPlatformModel.
|
|
1742
|
+
} = UserPlatformModel.UserAttribute().validate(responseData, {
|
|
1111
1743
|
abortEarly: false,
|
|
1112
1744
|
allowUnknown: true,
|
|
1113
1745
|
});
|
|
@@ -1132,10 +1764,10 @@ class User {
|
|
|
1132
1764
|
*
|
|
1133
1765
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1134
1766
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1135
|
-
* @returns {Promise<UserPlatformModel.
|
|
1767
|
+
* @returns {Promise<UserPlatformModel.UserAttribute>} - Success response
|
|
1136
1768
|
* @name getUserAttributeById
|
|
1137
1769
|
* @summary: Get User Attribute
|
|
1138
|
-
* @description: Retrieve User Attribute details by ID. - Check out [method documentation](https://
|
|
1770
|
+
* @description: Retrieve User Attribute details by ID. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/getUserAttributeById/).
|
|
1139
1771
|
*/
|
|
1140
1772
|
async getUserAttributeById(
|
|
1141
1773
|
{ attributeId, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1184,7 +1816,7 @@ class User {
|
|
|
1184
1816
|
|
|
1185
1817
|
const {
|
|
1186
1818
|
error: res_error,
|
|
1187
|
-
} = UserPlatformModel.
|
|
1819
|
+
} = UserPlatformModel.UserAttribute().validate(responseData, {
|
|
1188
1820
|
abortEarly: false,
|
|
1189
1821
|
allowUnknown: true,
|
|
1190
1822
|
});
|
|
@@ -1212,7 +1844,7 @@ class User {
|
|
|
1212
1844
|
* @returns {Promise<UserPlatformModel.UserAttributeDefinition>} - Success response
|
|
1213
1845
|
* @name getUserAttributeDefinitionById
|
|
1214
1846
|
* @summary: Get User Attribute Definition
|
|
1215
|
-
* @description: Get a user attribute definition by its unique identifier. - Check out [method documentation](https://
|
|
1847
|
+
* @description: Get a user attribute definition by its unique identifier. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/getUserAttributeDefinitionById/).
|
|
1216
1848
|
*/
|
|
1217
1849
|
async getUserAttributeDefinitionById(
|
|
1218
1850
|
{ attributeDefId, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1286,10 +1918,11 @@ class User {
|
|
|
1286
1918
|
*
|
|
1287
1919
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1288
1920
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1289
|
-
* @returns {Promise<
|
|
1921
|
+
* @returns {Promise<UserPlatformModel.UserAttributeDefinitionList>} -
|
|
1922
|
+
* Success response
|
|
1290
1923
|
* @name getUserAttributeDefinitions
|
|
1291
1924
|
* @summary: Get User Attribute Definitions
|
|
1292
|
-
* @description: Retrieve user attribute definitions. - Check out [method documentation](https://
|
|
1925
|
+
* @description: Retrieve user attribute definitions. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/getUserAttributeDefinitions/).
|
|
1293
1926
|
*/
|
|
1294
1927
|
async getUserAttributeDefinitions(
|
|
1295
1928
|
{
|
|
@@ -1384,7 +2017,9 @@ class User {
|
|
|
1384
2017
|
responseData = response[0];
|
|
1385
2018
|
}
|
|
1386
2019
|
|
|
1387
|
-
const {
|
|
2020
|
+
const {
|
|
2021
|
+
error: res_error,
|
|
2022
|
+
} = UserPlatformModel.UserAttributeDefinitionList().validate(responseData, {
|
|
1388
2023
|
abortEarly: false,
|
|
1389
2024
|
allowUnknown: true,
|
|
1390
2025
|
});
|
|
@@ -1409,10 +2044,12 @@ class User {
|
|
|
1409
2044
|
*
|
|
1410
2045
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1411
2046
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1412
|
-
* @returns {Promise<
|
|
2047
|
+
* @returns {Promise<UserPlatformModel.UserAttributeDefinitionsResponseSchema>}
|
|
2048
|
+
* - Success response
|
|
2049
|
+
*
|
|
1413
2050
|
* @name getUserAttributesForUser
|
|
1414
2051
|
* @summary: Get All Customer Attributes
|
|
1415
|
-
* @description: Retrieve all user attributes for a specific user - Check out [method documentation](https://
|
|
2052
|
+
* @description: Retrieve all user attributes for a specific user - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/getUserAttributesForUser/).
|
|
1416
2053
|
*/
|
|
1417
2054
|
async getUserAttributesForUser(
|
|
1418
2055
|
{ userId, pageSize, pageNo, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1471,10 +2108,12 @@ class User {
|
|
|
1471
2108
|
responseData = response[0];
|
|
1472
2109
|
}
|
|
1473
2110
|
|
|
1474
|
-
const {
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
2111
|
+
const {
|
|
2112
|
+
error: res_error,
|
|
2113
|
+
} = UserPlatformModel.UserAttributeDefinitionsResponseSchema().validate(
|
|
2114
|
+
responseData,
|
|
2115
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2116
|
+
);
|
|
1478
2117
|
|
|
1479
2118
|
if (res_error) {
|
|
1480
2119
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1497,7 +2136,7 @@ class User {
|
|
|
1497
2136
|
* @returns {Promise<UserPlatformModel.UserGroupResponseSchema>} - Success response
|
|
1498
2137
|
* @name getUserGroupById
|
|
1499
2138
|
* @summary: Get User Group
|
|
1500
|
-
* @description: Retrieve a user group by its unique identifier. - Check out [method documentation](https://
|
|
2139
|
+
* @description: Retrieve a user group by its unique identifier. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/getUserGroupById/).
|
|
1501
2140
|
*/
|
|
1502
2141
|
async getUserGroupById(
|
|
1503
2142
|
{ groupId, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1577,7 +2216,7 @@ class User {
|
|
|
1577
2216
|
* Success response
|
|
1578
2217
|
* @name getUserGroups
|
|
1579
2218
|
* @summary: Get User Groups
|
|
1580
|
-
* @description: Retrieve a list of user groups. - Check out [method documentation](https://
|
|
2219
|
+
* @description: Retrieve a list of user groups. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/getUserGroups/).
|
|
1581
2220
|
*/
|
|
1582
2221
|
async getUserGroups(
|
|
1583
2222
|
{ pageNo, pageSize, name, type, status, groupUid, requestHeaders } = {
|
|
@@ -1665,6 +2304,165 @@ class User {
|
|
|
1665
2304
|
return response;
|
|
1666
2305
|
}
|
|
1667
2306
|
|
|
2307
|
+
/**
|
|
2308
|
+
* @param {UserPlatformApplicationValidator.GetUserTimelineParam} arg - Arg object
|
|
2309
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2310
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2311
|
+
* @returns {Promise<UserPlatformModel.GetUserTimeline>} - Success response
|
|
2312
|
+
* @name getUserTimeline
|
|
2313
|
+
* @summary: Get Deleted User Timeline
|
|
2314
|
+
* @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/).
|
|
2315
|
+
*/
|
|
2316
|
+
async getUserTimeline(
|
|
2317
|
+
{ userId, requestHeaders } = { requestHeaders: {} },
|
|
2318
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2319
|
+
) {
|
|
2320
|
+
const {
|
|
2321
|
+
error,
|
|
2322
|
+
} = UserPlatformApplicationValidator.getUserTimeline().validate(
|
|
2323
|
+
{
|
|
2324
|
+
userId,
|
|
2325
|
+
},
|
|
2326
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2327
|
+
);
|
|
2328
|
+
if (error) {
|
|
2329
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
2330
|
+
}
|
|
2331
|
+
|
|
2332
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2333
|
+
const {
|
|
2334
|
+
error: warrning,
|
|
2335
|
+
} = UserPlatformApplicationValidator.getUserTimeline().validate(
|
|
2336
|
+
{
|
|
2337
|
+
userId,
|
|
2338
|
+
},
|
|
2339
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2340
|
+
);
|
|
2341
|
+
if (warrning) {
|
|
2342
|
+
Logger({
|
|
2343
|
+
level: "WARN",
|
|
2344
|
+
message: `Parameter Validation warrnings for platform > User > getUserTimeline \n ${warrning}`,
|
|
2345
|
+
});
|
|
2346
|
+
}
|
|
2347
|
+
|
|
2348
|
+
const query_params = {};
|
|
2349
|
+
|
|
2350
|
+
const response = await PlatformAPIClient.execute(
|
|
2351
|
+
this.config,
|
|
2352
|
+
"get",
|
|
2353
|
+
`/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/customers/${userId}/timeline`,
|
|
2354
|
+
query_params,
|
|
2355
|
+
undefined,
|
|
2356
|
+
requestHeaders,
|
|
2357
|
+
{ responseHeaders }
|
|
2358
|
+
);
|
|
2359
|
+
|
|
2360
|
+
let responseData = response;
|
|
2361
|
+
if (responseHeaders) {
|
|
2362
|
+
responseData = response[0];
|
|
2363
|
+
}
|
|
2364
|
+
|
|
2365
|
+
const {
|
|
2366
|
+
error: res_error,
|
|
2367
|
+
} = UserPlatformModel.GetUserTimeline().validate(responseData, {
|
|
2368
|
+
abortEarly: false,
|
|
2369
|
+
allowUnknown: true,
|
|
2370
|
+
});
|
|
2371
|
+
|
|
2372
|
+
if (res_error) {
|
|
2373
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
2374
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2375
|
+
} else {
|
|
2376
|
+
Logger({
|
|
2377
|
+
level: "WARN",
|
|
2378
|
+
message: `Response Validation Warnings for platform > User > getUserTimeline \n ${res_error}`,
|
|
2379
|
+
});
|
|
2380
|
+
}
|
|
2381
|
+
}
|
|
2382
|
+
|
|
2383
|
+
return response;
|
|
2384
|
+
}
|
|
2385
|
+
|
|
2386
|
+
/**
|
|
2387
|
+
* @param {UserPlatformApplicationValidator.GetUsersJobByJobIdParam} arg - Arg object
|
|
2388
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2389
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2390
|
+
* @returns {Promise<UserPlatformModel.BulkActionModel>} - Success response
|
|
2391
|
+
* @name getUsersJobByJobId
|
|
2392
|
+
* @summary: Retrieve Job Details by Job ID for a Specific Application, Including Both Import and Export Jobs.
|
|
2393
|
+
* @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`.
|
|
2394
|
+
* - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/getUsersJobByJobId/).
|
|
2395
|
+
*/
|
|
2396
|
+
async getUsersJobByJobId(
|
|
2397
|
+
{ jobId, requestHeaders } = { requestHeaders: {} },
|
|
2398
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2399
|
+
) {
|
|
2400
|
+
const {
|
|
2401
|
+
error,
|
|
2402
|
+
} = UserPlatformApplicationValidator.getUsersJobByJobId().validate(
|
|
2403
|
+
{
|
|
2404
|
+
jobId,
|
|
2405
|
+
},
|
|
2406
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2407
|
+
);
|
|
2408
|
+
if (error) {
|
|
2409
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
2410
|
+
}
|
|
2411
|
+
|
|
2412
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2413
|
+
const {
|
|
2414
|
+
error: warrning,
|
|
2415
|
+
} = UserPlatformApplicationValidator.getUsersJobByJobId().validate(
|
|
2416
|
+
{
|
|
2417
|
+
jobId,
|
|
2418
|
+
},
|
|
2419
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2420
|
+
);
|
|
2421
|
+
if (warrning) {
|
|
2422
|
+
Logger({
|
|
2423
|
+
level: "WARN",
|
|
2424
|
+
message: `Parameter Validation warrnings for platform > User > getUsersJobByJobId \n ${warrning}`,
|
|
2425
|
+
});
|
|
2426
|
+
}
|
|
2427
|
+
|
|
2428
|
+
const query_params = {};
|
|
2429
|
+
|
|
2430
|
+
const response = await PlatformAPIClient.execute(
|
|
2431
|
+
this.config,
|
|
2432
|
+
"get",
|
|
2433
|
+
`/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/users/jobs/${jobId}`,
|
|
2434
|
+
query_params,
|
|
2435
|
+
undefined,
|
|
2436
|
+
requestHeaders,
|
|
2437
|
+
{ responseHeaders }
|
|
2438
|
+
);
|
|
2439
|
+
|
|
2440
|
+
let responseData = response;
|
|
2441
|
+
if (responseHeaders) {
|
|
2442
|
+
responseData = response[0];
|
|
2443
|
+
}
|
|
2444
|
+
|
|
2445
|
+
const {
|
|
2446
|
+
error: res_error,
|
|
2447
|
+
} = UserPlatformModel.BulkActionModel().validate(responseData, {
|
|
2448
|
+
abortEarly: false,
|
|
2449
|
+
allowUnknown: true,
|
|
2450
|
+
});
|
|
2451
|
+
|
|
2452
|
+
if (res_error) {
|
|
2453
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
2454
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2455
|
+
} else {
|
|
2456
|
+
Logger({
|
|
2457
|
+
level: "WARN",
|
|
2458
|
+
message: `Response Validation Warnings for platform > User > getUsersJobByJobId \n ${res_error}`,
|
|
2459
|
+
});
|
|
2460
|
+
}
|
|
2461
|
+
}
|
|
2462
|
+
|
|
2463
|
+
return response;
|
|
2464
|
+
}
|
|
2465
|
+
|
|
1668
2466
|
/**
|
|
1669
2467
|
* @param {UserPlatformApplicationValidator.SearchUsersParam} arg - Arg object
|
|
1670
2468
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -1672,7 +2470,7 @@ class User {
|
|
|
1672
2470
|
* @returns {Promise<UserPlatformModel.UserSearchResponseSchema>} - Success response
|
|
1673
2471
|
* @name searchUsers
|
|
1674
2472
|
* @summary: Search an Existing Users
|
|
1675
|
-
* @description: Search and filter users details registered in the sales channel - Check out [method documentation](https://
|
|
2473
|
+
* @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/).
|
|
1676
2474
|
*/
|
|
1677
2475
|
async searchUsers(
|
|
1678
2476
|
{ q, query, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1753,7 +2551,7 @@ class User {
|
|
|
1753
2551
|
* @returns {Promise<UserPlatformModel.UnDeleteUserSuccess>} - Success response
|
|
1754
2552
|
* @name unDeleteUser
|
|
1755
2553
|
* @summary: Restore Deleted User
|
|
1756
|
-
* @description: Restore a previously deleted user account. - Check out [method documentation](https://
|
|
2554
|
+
* @description: Restore a previously deleted user account. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/unDeleteUser/).
|
|
1757
2555
|
*/
|
|
1758
2556
|
async unDeleteUser(
|
|
1759
2557
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1832,7 +2630,7 @@ class User {
|
|
|
1832
2630
|
* @returns {Promise<UserPlatformModel.PlatformSchema>} - Success response
|
|
1833
2631
|
* @name updatePlatformConfig
|
|
1834
2632
|
* @summary: Update Platform Config
|
|
1835
|
-
* @description: Modify and update platform sales channel authentication configuration. - Check out [method documentation](https://
|
|
2633
|
+
* @description: Modify and update platform sales channel authentication configuration. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/updatePlatformConfig/).
|
|
1836
2634
|
*/
|
|
1837
2635
|
async updatePlatformConfig(
|
|
1838
2636
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1911,7 +2709,7 @@ class User {
|
|
|
1911
2709
|
* @returns {Promise<UserPlatformModel.CreateUserResponseSchema>} - Success response
|
|
1912
2710
|
* @name updateUser
|
|
1913
2711
|
* @summary: Update User Details
|
|
1914
|
-
* @description: Modify and update user profile information. - Check out [method documentation](https://
|
|
2712
|
+
* @description: Modify and update user profile information. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/updateUser/).
|
|
1915
2713
|
*/
|
|
1916
2714
|
async updateUser(
|
|
1917
2715
|
{ userId, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1987,10 +2785,10 @@ class User {
|
|
|
1987
2785
|
* @param {UserPlatformApplicationValidator.UpdateUserAttributeParam} arg - Arg object
|
|
1988
2786
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1989
2787
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1990
|
-
* @returns {Promise<UserPlatformModel.
|
|
2788
|
+
* @returns {Promise<UserPlatformModel.UserAttribute>} - Success response
|
|
1991
2789
|
* @name updateUserAttribute
|
|
1992
2790
|
* @summary: Update Or Create User Attribute
|
|
1993
|
-
* @description: Update Or Create User Attribute - Check out [method documentation](https://
|
|
2791
|
+
* @description: Update Or Create User Attribute - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/updateUserAttribute/).
|
|
1994
2792
|
*/
|
|
1995
2793
|
async updateUserAttribute(
|
|
1996
2794
|
{ attributeDefId, userId, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -2049,7 +2847,7 @@ class User {
|
|
|
2049
2847
|
|
|
2050
2848
|
const {
|
|
2051
2849
|
error: res_error,
|
|
2052
|
-
} = UserPlatformModel.
|
|
2850
|
+
} = UserPlatformModel.UserAttribute().validate(responseData, {
|
|
2053
2851
|
abortEarly: false,
|
|
2054
2852
|
allowUnknown: true,
|
|
2055
2853
|
});
|
|
@@ -2077,7 +2875,7 @@ class User {
|
|
|
2077
2875
|
* @returns {Promise<UserPlatformModel.UserAttributeDefinition>} - Success response
|
|
2078
2876
|
* @name updateUserAttributeDefinition
|
|
2079
2877
|
* @summary: Update User Attribute Definition
|
|
2080
|
-
* @description: Update an existing user attribute definition. - Check out [method documentation](https://
|
|
2878
|
+
* @description: Update an existing user attribute definition. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/updateUserAttributeDefinition/).
|
|
2081
2879
|
*/
|
|
2082
2880
|
async updateUserAttributeDefinition(
|
|
2083
2881
|
{ attributeDefId, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -2153,6 +2951,91 @@ class User {
|
|
|
2153
2951
|
return response;
|
|
2154
2952
|
}
|
|
2155
2953
|
|
|
2954
|
+
/**
|
|
2955
|
+
* @param {UserPlatformApplicationValidator.UpdateUserAttributesParam} arg
|
|
2956
|
+
* - Arg object
|
|
2957
|
+
*
|
|
2958
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2959
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2960
|
+
* @returns {Promise<UserPlatformModel.BulkUserAttribute>} - Success response
|
|
2961
|
+
* @name updateUserAttributes
|
|
2962
|
+
* @summary: Create Or Update User Attribute
|
|
2963
|
+
* @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/).
|
|
2964
|
+
*/
|
|
2965
|
+
async updateUserAttributes(
|
|
2966
|
+
{ userId, body, requestHeaders } = { requestHeaders: {} },
|
|
2967
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2968
|
+
) {
|
|
2969
|
+
const {
|
|
2970
|
+
error,
|
|
2971
|
+
} = UserPlatformApplicationValidator.updateUserAttributes().validate(
|
|
2972
|
+
{
|
|
2973
|
+
userId,
|
|
2974
|
+
|
|
2975
|
+
body,
|
|
2976
|
+
},
|
|
2977
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2978
|
+
);
|
|
2979
|
+
if (error) {
|
|
2980
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
2981
|
+
}
|
|
2982
|
+
|
|
2983
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2984
|
+
const {
|
|
2985
|
+
error: warrning,
|
|
2986
|
+
} = UserPlatformApplicationValidator.updateUserAttributes().validate(
|
|
2987
|
+
{
|
|
2988
|
+
userId,
|
|
2989
|
+
|
|
2990
|
+
body,
|
|
2991
|
+
},
|
|
2992
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2993
|
+
);
|
|
2994
|
+
if (warrning) {
|
|
2995
|
+
Logger({
|
|
2996
|
+
level: "WARN",
|
|
2997
|
+
message: `Parameter Validation warrnings for platform > User > updateUserAttributes \n ${warrning}`,
|
|
2998
|
+
});
|
|
2999
|
+
}
|
|
3000
|
+
|
|
3001
|
+
const query_params = {};
|
|
3002
|
+
|
|
3003
|
+
const response = await PlatformAPIClient.execute(
|
|
3004
|
+
this.config,
|
|
3005
|
+
"post",
|
|
3006
|
+
`/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/user_attribute/user/${userId}`,
|
|
3007
|
+
query_params,
|
|
3008
|
+
body,
|
|
3009
|
+
requestHeaders,
|
|
3010
|
+
{ responseHeaders }
|
|
3011
|
+
);
|
|
3012
|
+
|
|
3013
|
+
let responseData = response;
|
|
3014
|
+
if (responseHeaders) {
|
|
3015
|
+
responseData = response[0];
|
|
3016
|
+
}
|
|
3017
|
+
|
|
3018
|
+
const {
|
|
3019
|
+
error: res_error,
|
|
3020
|
+
} = UserPlatformModel.BulkUserAttribute().validate(responseData, {
|
|
3021
|
+
abortEarly: false,
|
|
3022
|
+
allowUnknown: true,
|
|
3023
|
+
});
|
|
3024
|
+
|
|
3025
|
+
if (res_error) {
|
|
3026
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
3027
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
3028
|
+
} else {
|
|
3029
|
+
Logger({
|
|
3030
|
+
level: "WARN",
|
|
3031
|
+
message: `Response Validation Warnings for platform > User > updateUserAttributes \n ${res_error}`,
|
|
3032
|
+
});
|
|
3033
|
+
}
|
|
3034
|
+
}
|
|
3035
|
+
|
|
3036
|
+
return response;
|
|
3037
|
+
}
|
|
3038
|
+
|
|
2156
3039
|
/**
|
|
2157
3040
|
* @param {UserPlatformApplicationValidator.UpdateUserGroupParam} arg - Arg object
|
|
2158
3041
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -2160,7 +3043,7 @@ class User {
|
|
|
2160
3043
|
* @returns {Promise<UserPlatformModel.UserGroupResponseSchema>} - Success response
|
|
2161
3044
|
* @name updateUserGroup
|
|
2162
3045
|
* @summary: Update User Group
|
|
2163
|
-
* @description: Modify and update user group details. - Check out [method documentation](https://
|
|
3046
|
+
* @description: Modify and update user group details. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/updateUserGroup/).
|
|
2164
3047
|
*/
|
|
2165
3048
|
async updateUserGroup(
|
|
2166
3049
|
{ groupId, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -2243,7 +3126,7 @@ class User {
|
|
|
2243
3126
|
* @returns {Promise<UserPlatformModel.UserGroupResponseSchema>} - Success response
|
|
2244
3127
|
* @name updateUserGroupPartially
|
|
2245
3128
|
* @summary: Modify User Group
|
|
2246
|
-
* @description: Update user group partially on the platform. - Check out [method documentation](https://
|
|
3129
|
+
* @description: Update user group partially on the platform. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/user/updateUserGroupPartially/).
|
|
2247
3130
|
*/
|
|
2248
3131
|
async updateUserGroupPartially(
|
|
2249
3132
|
{ groupId, body, requestHeaders } = { requestHeaders: {} },
|