@gofynd/fdk-client-javascript 1.2.0 → 1.3.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 +44 -7
- package/package.json +1 -2
- package/sdk/application/ApplicationAPIClient.d.ts +3 -3
- package/sdk/application/ApplicationAPIClient.js +6 -4
- package/sdk/application/ApplicationClient.d.ts +2 -3
- package/sdk/application/ApplicationClient.js +1 -45
- package/sdk/application/ApplicationConfig.d.ts +46 -6
- package/sdk/application/ApplicationConfig.js +15 -16
- package/sdk/application/Cart/CartApplicationClient.d.ts +61 -33
- package/sdk/application/Cart/CartApplicationClient.js +225 -134
- package/sdk/application/Cart/CartApplicationModel.d.ts +4 -4
- package/sdk/application/Cart/CartApplicationModel.js +4 -4
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +61 -30
- package/sdk/application/Catalog/CatalogApplicationClient.js +234 -146
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +115 -13
- package/sdk/application/Catalog/CatalogApplicationModel.js +77 -12
- package/sdk/application/Common/CommonApplicationClient.d.ts +5 -3
- package/sdk/application/Common/CommonApplicationClient.js +13 -11
- package/sdk/application/Common/CommonApplicationModel.d.ts +3 -83
- package/sdk/application/Common/CommonApplicationModel.js +2 -58
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +9 -3
- package/sdk/application/Communication/CommunicationApplicationClient.js +25 -13
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +1 -34
- package/sdk/application/Communication/CommunicationApplicationModel.js +0 -36
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +46 -16
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +144 -68
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +1 -219
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +0 -226
- package/sdk/application/Content/ContentApplicationClient.d.ts +49 -21
- package/sdk/application/Content/ContentApplicationClient.js +159 -80
- package/sdk/application/Content/ContentApplicationModel.d.ts +5 -622
- package/sdk/application/Content/ContentApplicationModel.js +11 -763
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +6 -3
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +20 -14
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +1 -152
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +0 -180
- package/sdk/application/Lead/LeadApplicationClient.d.ts +14 -7
- package/sdk/application/Lead/LeadApplicationClient.js +50 -31
- package/sdk/application/Lead/LeadApplicationModel.d.ts +22 -741
- package/sdk/application/Lead/LeadApplicationModel.js +21 -481
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +11 -5
- package/sdk/application/Logistic/LogisticApplicationClient.js +41 -20
- package/sdk/application/Order/OrderApplicationClient.d.ts +24 -12
- package/sdk/application/Order/OrderApplicationClient.js +88 -56
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +91 -42
- package/sdk/application/Payment/PaymentApplicationClient.js +293 -194
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +36 -36
- package/sdk/application/Payment/PaymentApplicationModel.js +36 -36
- package/sdk/application/PosCart/PosCartApplicationClient.d.ts +59 -32
- package/sdk/application/PosCart/PosCartApplicationClient.js +214 -130
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +2 -2
- package/sdk/application/PosCart/PosCartApplicationModel.js +2 -2
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +16 -7
- package/sdk/application/Rewards/RewardsApplicationClient.js +56 -29
- package/sdk/application/Share/ShareApplicationClient.d.ts +15 -7
- package/sdk/application/Share/ShareApplicationClient.js +51 -31
- package/sdk/application/Share/ShareApplicationModel.d.ts +1 -33
- package/sdk/application/Share/ShareApplicationModel.js +0 -38
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +9 -4
- package/sdk/application/Theme/ThemeApplicationClient.js +35 -18
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +982 -312
- package/sdk/application/Theme/ThemeApplicationModel.js +621 -284
- package/sdk/application/User/UserApplicationClient.d.ts +74 -35
- package/sdk/application/User/UserApplicationClient.js +252 -161
- package/sdk/application/User/UserApplicationModel.d.ts +3 -401
- package/sdk/application/User/UserApplicationModel.js +2 -490
- package/sdk/common/AxiosHelper.js +1 -2
- package/sdk/common/FDKError.d.ts +3 -0
- package/sdk/common/FDKError.js +8 -0
- package/sdk/common/utils.d.ts +3 -0
- package/sdk/common/utils.js +29 -0
- package/sdk/partner/PartnerAPIClient.d.ts +5 -4
- package/sdk/partner/PartnerAPIClient.js +7 -4
- package/sdk/partner/PartnerClient.d.ts +2 -0
- package/sdk/partner/PartnerClient.js +3 -0
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +299 -0
- package/sdk/partner/Theme/ThemePartnerClient.js +768 -0
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +1706 -0
- package/sdk/partner/Theme/ThemePartnerModel.js +1409 -0
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +22 -0
- package/sdk/partner/Theme/ThemePartnerValidator.js +157 -0
- package/sdk/partner/index.d.ts +3 -1
- package/sdk/partner/index.js +3 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +8 -4
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +38 -16
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +1 -13
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +0 -12
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +10 -0
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +4 -0
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +59 -14
- package/sdk/platform/Billing/BillingPlatformClient.js +315 -64
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +56 -196
- package/sdk/platform/Billing/BillingPlatformModel.js +63 -217
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +23 -1
- package/sdk/platform/Billing/BillingPlatformValidator.js +31 -0
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +124 -63
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +431 -265
- package/sdk/platform/Cart/CartPlatformModel.d.ts +253 -53
- package/sdk/platform/Cart/CartPlatformModel.js +104 -54
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +120 -53
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +398 -247
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +155 -78
- package/sdk/platform/Catalog/CatalogPlatformClient.js +561 -355
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +10 -12
- package/sdk/platform/Catalog/CatalogPlatformModel.js +10 -12
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +30 -0
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +13 -0
- package/sdk/platform/Common/CommonPlatformClient.d.ts +5 -3
- package/sdk/platform/Common/CommonPlatformClient.js +13 -11
- package/sdk/platform/Common/CommonPlatformModel.d.ts +39 -64
- package/sdk/platform/Common/CommonPlatformModel.js +23 -57
- package/sdk/platform/Common/CommonPlatformValidator.d.ts +5 -10
- package/sdk/platform/Common/CommonPlatformValidator.js +3 -4
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +370 -120
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +2328 -888
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +143 -24
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +179 -15
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +2 -1
- package/sdk/platform/Communication/CommunicationPlatformClient.js +6 -5
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +386 -308
- package/sdk/platform/Communication/CommunicationPlatformModel.js +415 -355
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +38 -13
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +171 -57
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +53 -1
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +54 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +5 -1
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +7 -0
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +96 -29
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +311 -126
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +5 -1
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +7 -0
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +36 -18
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +121 -86
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +13 -180
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +5 -113
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +162 -70
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +528 -309
- package/sdk/platform/Content/ContentPlatformModel.d.ts +9 -198
- package/sdk/platform/Content/ContentPlatformModel.js +8 -231
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +48 -11
- package/sdk/platform/Discount/DiscountPlatformClient.js +142 -48
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +40 -1
- package/sdk/platform/Discount/DiscountPlatformModel.js +27 -0
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +84 -18
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +486 -53
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +71 -7
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +81 -5
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +13 -18
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +58 -65
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +198 -71
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +212 -64
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +18 -10
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +11 -6
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +177 -40
- package/sdk/platform/Finance/FinancePlatformClient.js +1028 -132
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +670 -22
- package/sdk/platform/Finance/FinancePlatformModel.js +809 -23
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +111 -1
- package/sdk/platform/Finance/FinancePlatformValidator.js +134 -0
- package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +24 -12
- package/sdk/platform/Inventory/InventoryPlatformClient.js +94 -52
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +27 -13
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +101 -55
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +50 -39
- package/sdk/platform/Lead/LeadPlatformClient.js +171 -112
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +32 -390
- package/sdk/platform/Lead/LeadPlatformModel.js +31 -214
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +33 -33
- package/sdk/platform/Lead/LeadPlatformValidator.js +23 -23
- package/sdk/platform/OAuthClient.js +6 -2
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +4 -2
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +12 -10
- package/sdk/platform/Order/OrderPlatformClient.d.ts +165 -71
- package/sdk/platform/Order/OrderPlatformClient.js +738 -205
- package/sdk/platform/Order/OrderPlatformModel.d.ts +261 -3
- package/sdk/platform/Order/OrderPlatformModel.js +225 -2
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +104 -3
- package/sdk/platform/Order/OrderPlatformValidator.js +85 -2
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -22
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +12 -159
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +1 -30
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +0 -26
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +1 -690
- package/sdk/platform/Partner/PartnerPlatformModel.js +0 -809
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +167 -32
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +793 -145
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +91 -1
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +91 -0
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +20 -10
- package/sdk/platform/Payment/PaymentPlatformClient.js +68 -47
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +549 -7
- package/sdk/platform/Payment/PaymentPlatformModel.js +305 -6
- package/sdk/platform/PlatformAPIClient.d.ts +3 -3
- package/sdk/platform/PlatformAPIClient.js +2 -2
- package/sdk/platform/PlatformClient.d.ts +2 -2
- package/sdk/platform/PlatformClient.js +4 -4
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +28 -12
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +90 -53
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +1 -12
- package/sdk/platform/Rewards/RewardsPlatformModel.js +0 -14
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +62 -26
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +210 -93
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +20 -11
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +23 -11
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +36 -18
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +142 -78
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +12 -3
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +14 -2
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +10 -26
- package/sdk/platform/Share/SharePlatformApplicationClient.js +36 -67
- package/sdk/platform/Share/SharePlatformModel.d.ts +4 -4
- package/sdk/platform/Share/SharePlatformModel.js +4 -4
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +127 -57
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +564 -189
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +63 -26
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +62 -22
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +37 -0
- package/sdk/platform/Theme/ThemePlatformClient.js +235 -0
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +1167 -261
- package/sdk/platform/Theme/ThemePlatformModel.js +801 -244
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +32 -0
- package/sdk/platform/Theme/ThemePlatformValidator.js +38 -0
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +35 -17
- package/sdk/platform/User/UserPlatformApplicationClient.js +132 -73
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +7 -0
- package/sdk/platform/User/UserPlatformApplicationValidator.js +3 -0
- package/sdk/platform/User/UserPlatformModel.d.ts +1 -738
- package/sdk/platform/User/UserPlatformModel.js +3 -899
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +120 -7
- package/sdk/platform/Webhook/WebhookPlatformClient.js +799 -41
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +476 -86
- package/sdk/platform/Webhook/WebhookPlatformModel.js +388 -89
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +96 -9
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +117 -5
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +5 -3
- package/sdk/public/Configuration/ConfigurationPublicClient.js +13 -11
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +3 -106
- package/sdk/public/Configuration/ConfigurationPublicModel.js +2 -59
- package/sdk/public/Inventory/InventoryPublicClient.d.ts +12 -6
- package/sdk/public/Inventory/InventoryPublicClient.js +42 -27
- package/sdk/public/Partner/PartnerPublicClient.d.ts +22 -0
- package/sdk/public/Partner/PartnerPublicClient.js +110 -0
- package/sdk/public/Partner/PartnerPublicModel.d.ts +240 -0
- package/sdk/public/Partner/PartnerPublicModel.js +280 -0
- package/sdk/public/Partner/PartnerPublicValidator.d.ts +18 -0
- package/sdk/public/Partner/PartnerPublicValidator.js +19 -0
- package/sdk/public/PublicAPIClient.d.ts +14 -1
- package/sdk/public/PublicAPIClient.js +7 -1
- package/sdk/public/PublicClient.d.ts +2 -0
- package/sdk/public/PublicClient.js +4 -0
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +5 -2
- package/sdk/public/Webhook/WebhookPublicClient.js +15 -9
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +1 -191
- package/sdk/public/Webhook/WebhookPublicModel.js +0 -229
- package/sdk/public/index.d.ts +1 -0
- package/sdk/public/index.js +2 -0
- package/sdk/application/ApplicationModels.d.ts +0 -48
- package/sdk/application/ApplicationModels.js +0 -38
- package/sdk/platform/Partner/PartnerPlatformClient.d.ts +0 -106
- package/sdk/platform/Partner/PartnerPlatformClient.js +0 -878
- package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +0 -208
- package/sdk/platform/Partner/PartnerPlatformValidator.js +0 -169
|
@@ -14,13 +14,17 @@ class User {
|
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* @param {UserPlatformApplicationValidator.ArchiveUserParam} arg - Arg object
|
|
17
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
17
18
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
18
19
|
* @returns {Promise<UserPlatformModel.ArchiveUserSuccess>} - Success response
|
|
19
20
|
* @name archiveUser
|
|
20
21
|
* @summary: archive user
|
|
21
22
|
* @description: archive user - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/archiveUser/).
|
|
22
23
|
*/
|
|
23
|
-
async archiveUser(
|
|
24
|
+
async archiveUser(
|
|
25
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
26
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
27
|
+
) {
|
|
24
28
|
const { error } = UserPlatformApplicationValidator.archiveUser().validate(
|
|
25
29
|
{
|
|
26
30
|
body,
|
|
@@ -55,12 +59,12 @@ class User {
|
|
|
55
59
|
`/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/customers/archive`,
|
|
56
60
|
query_params,
|
|
57
61
|
body,
|
|
58
|
-
|
|
59
|
-
{
|
|
62
|
+
requestHeaders,
|
|
63
|
+
{ responseHeaders }
|
|
60
64
|
);
|
|
61
65
|
|
|
62
66
|
let responseData = response;
|
|
63
|
-
if (
|
|
67
|
+
if (responseHeaders) {
|
|
64
68
|
responseData = response[0];
|
|
65
69
|
}
|
|
66
70
|
|
|
@@ -83,13 +87,17 @@ class User {
|
|
|
83
87
|
|
|
84
88
|
/**
|
|
85
89
|
* @param {UserPlatformApplicationValidator.BlockOrUnblockUsersParam} arg - Arg object
|
|
90
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
86
91
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
87
92
|
* @returns {Promise<UserPlatformModel.BlockUserSuccess>} - Success response
|
|
88
93
|
* @name blockOrUnblockUsers
|
|
89
94
|
* @summary: Block/Unblock user
|
|
90
95
|
* @description: Block/Unblock user - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/blockOrUnblockUsers/).
|
|
91
96
|
*/
|
|
92
|
-
async blockOrUnblockUsers(
|
|
97
|
+
async blockOrUnblockUsers(
|
|
98
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
99
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
100
|
+
) {
|
|
93
101
|
const {
|
|
94
102
|
error,
|
|
95
103
|
} = UserPlatformApplicationValidator.blockOrUnblockUsers().validate(
|
|
@@ -126,12 +134,12 @@ class User {
|
|
|
126
134
|
`/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/customers/activation`,
|
|
127
135
|
query_params,
|
|
128
136
|
body,
|
|
129
|
-
|
|
130
|
-
{
|
|
137
|
+
requestHeaders,
|
|
138
|
+
{ responseHeaders }
|
|
131
139
|
);
|
|
132
140
|
|
|
133
141
|
let responseData = response;
|
|
134
|
-
if (
|
|
142
|
+
if (responseHeaders) {
|
|
135
143
|
responseData = response[0];
|
|
136
144
|
}
|
|
137
145
|
|
|
@@ -154,13 +162,17 @@ class User {
|
|
|
154
162
|
|
|
155
163
|
/**
|
|
156
164
|
* @param {UserPlatformApplicationValidator.CreateUserParam} arg - Arg object
|
|
165
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
157
166
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
158
167
|
* @returns {Promise<UserPlatformModel.CreateUserResponseSchema>} - Success response
|
|
159
168
|
* @name createUser
|
|
160
169
|
* @summary: Create user
|
|
161
170
|
* @description: Create user - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/createUser/).
|
|
162
171
|
*/
|
|
163
|
-
async createUser(
|
|
172
|
+
async createUser(
|
|
173
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
174
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
175
|
+
) {
|
|
164
176
|
const { error } = UserPlatformApplicationValidator.createUser().validate(
|
|
165
177
|
{
|
|
166
178
|
body,
|
|
@@ -195,12 +207,12 @@ class User {
|
|
|
195
207
|
`/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/customers`,
|
|
196
208
|
query_params,
|
|
197
209
|
body,
|
|
198
|
-
|
|
199
|
-
{
|
|
210
|
+
requestHeaders,
|
|
211
|
+
{ responseHeaders }
|
|
200
212
|
);
|
|
201
213
|
|
|
202
214
|
let responseData = response;
|
|
203
|
-
if (
|
|
215
|
+
if (responseHeaders) {
|
|
204
216
|
responseData = response[0];
|
|
205
217
|
}
|
|
206
218
|
|
|
@@ -223,13 +235,17 @@ class User {
|
|
|
223
235
|
|
|
224
236
|
/**
|
|
225
237
|
* @param {UserPlatformApplicationValidator.CreateUserGroupParam} arg - Arg object
|
|
238
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
226
239
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
227
240
|
* @returns {Promise<UserPlatformModel.UserGroupResponseSchema>} - Success response
|
|
228
241
|
* @name createUserGroup
|
|
229
242
|
* @summary: Create an User Group
|
|
230
243
|
* @description: Use this API to create new user Group - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/createUserGroup/).
|
|
231
244
|
*/
|
|
232
|
-
async createUserGroup(
|
|
245
|
+
async createUserGroup(
|
|
246
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
247
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
248
|
+
) {
|
|
233
249
|
const {
|
|
234
250
|
error,
|
|
235
251
|
} = UserPlatformApplicationValidator.createUserGroup().validate(
|
|
@@ -266,12 +282,12 @@ class User {
|
|
|
266
282
|
`/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/user_group`,
|
|
267
283
|
query_params,
|
|
268
284
|
body,
|
|
269
|
-
|
|
270
|
-
{
|
|
285
|
+
requestHeaders,
|
|
286
|
+
{ responseHeaders }
|
|
271
287
|
);
|
|
272
288
|
|
|
273
289
|
let responseData = response;
|
|
274
|
-
if (
|
|
290
|
+
if (responseHeaders) {
|
|
275
291
|
responseData = response[0];
|
|
276
292
|
}
|
|
277
293
|
|
|
@@ -294,6 +310,7 @@ class User {
|
|
|
294
310
|
|
|
295
311
|
/**
|
|
296
312
|
* @param {UserPlatformApplicationValidator.CreateUserSessionParam} arg - Arg object
|
|
313
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
297
314
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
298
315
|
* @returns {Promise<UserPlatformModel.CreateUserSessionResponseSchema>} -
|
|
299
316
|
* Success response
|
|
@@ -301,7 +318,10 @@ class User {
|
|
|
301
318
|
* @summary: Create user session
|
|
302
319
|
* @description: Create user session - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/createUserSession/).
|
|
303
320
|
*/
|
|
304
|
-
async createUserSession(
|
|
321
|
+
async createUserSession(
|
|
322
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
323
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
324
|
+
) {
|
|
305
325
|
const {
|
|
306
326
|
error,
|
|
307
327
|
} = UserPlatformApplicationValidator.createUserSession().validate(
|
|
@@ -338,12 +358,12 @@ class User {
|
|
|
338
358
|
`/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/customers/session`,
|
|
339
359
|
query_params,
|
|
340
360
|
body,
|
|
341
|
-
|
|
342
|
-
{
|
|
361
|
+
requestHeaders,
|
|
362
|
+
{ responseHeaders }
|
|
343
363
|
);
|
|
344
364
|
|
|
345
365
|
let responseData = response;
|
|
346
|
-
if (
|
|
366
|
+
if (responseHeaders) {
|
|
347
367
|
responseData = response[0];
|
|
348
368
|
}
|
|
349
369
|
|
|
@@ -368,6 +388,7 @@ class User {
|
|
|
368
388
|
* @param {UserPlatformApplicationValidator.DeleteActiveSessionsParam} arg
|
|
369
389
|
* - Arg object
|
|
370
390
|
*
|
|
391
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
371
392
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
372
393
|
* @returns {Promise<UserPlatformModel.SessionDeleteResponseSchema>} -
|
|
373
394
|
* Success response
|
|
@@ -376,8 +397,8 @@ class User {
|
|
|
376
397
|
* @description: Use this API to Delete a list of session of customers who have registered in the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/deleteActiveSessions/).
|
|
377
398
|
*/
|
|
378
399
|
async deleteActiveSessions(
|
|
379
|
-
{ id, reason } = {},
|
|
380
|
-
{
|
|
400
|
+
{ id, reason, requestHeaders } = { requestHeaders: {} },
|
|
401
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
381
402
|
) {
|
|
382
403
|
const {
|
|
383
404
|
error,
|
|
@@ -419,12 +440,12 @@ class User {
|
|
|
419
440
|
`/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/customers/sessions`,
|
|
420
441
|
query_params,
|
|
421
442
|
undefined,
|
|
422
|
-
|
|
423
|
-
{
|
|
443
|
+
requestHeaders,
|
|
444
|
+
{ responseHeaders }
|
|
424
445
|
);
|
|
425
446
|
|
|
426
447
|
let responseData = response;
|
|
427
|
-
if (
|
|
448
|
+
if (responseHeaders) {
|
|
428
449
|
responseData = response[0];
|
|
429
450
|
}
|
|
430
451
|
|
|
@@ -447,6 +468,7 @@ class User {
|
|
|
447
468
|
|
|
448
469
|
/**
|
|
449
470
|
* @param {UserPlatformApplicationValidator.DeleteSessionParam} arg - Arg object
|
|
471
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
450
472
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
451
473
|
* @returns {Promise<UserPlatformModel.SessionDeleteResponseSchema>} -
|
|
452
474
|
* Success response
|
|
@@ -455,8 +477,8 @@ class User {
|
|
|
455
477
|
* @description: Use this API to Delete a session of customers who have registered in the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/deleteSession/).
|
|
456
478
|
*/
|
|
457
479
|
async deleteSession(
|
|
458
|
-
{ id, sessionId, reason } = {},
|
|
459
|
-
{
|
|
480
|
+
{ id, sessionId, reason, requestHeaders } = { requestHeaders: {} },
|
|
481
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
460
482
|
) {
|
|
461
483
|
const { error } = UserPlatformApplicationValidator.deleteSession().validate(
|
|
462
484
|
{
|
|
@@ -499,12 +521,12 @@ class User {
|
|
|
499
521
|
`/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/customers/session`,
|
|
500
522
|
query_params,
|
|
501
523
|
undefined,
|
|
502
|
-
|
|
503
|
-
{
|
|
524
|
+
requestHeaders,
|
|
525
|
+
{ responseHeaders }
|
|
504
526
|
);
|
|
505
527
|
|
|
506
528
|
let responseData = response;
|
|
507
|
-
if (
|
|
529
|
+
if (responseHeaders) {
|
|
508
530
|
responseData = response[0];
|
|
509
531
|
}
|
|
510
532
|
|
|
@@ -527,13 +549,17 @@ class User {
|
|
|
527
549
|
|
|
528
550
|
/**
|
|
529
551
|
* @param {UserPlatformApplicationValidator.GetActiveSessionsParam} arg - Arg object
|
|
552
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
530
553
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
531
554
|
* @returns {Promise<UserPlatformModel.SessionListResponseSchema>} - Success response
|
|
532
555
|
* @name getActiveSessions
|
|
533
556
|
* @summary: Get a list of all session with info for a user
|
|
534
557
|
* @description: Use this API to retrieve a list of session with info of customers who have registered in the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/getActiveSessions/).
|
|
535
558
|
*/
|
|
536
|
-
async getActiveSessions(
|
|
559
|
+
async getActiveSessions(
|
|
560
|
+
{ id, requestHeaders } = { requestHeaders: {} },
|
|
561
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
562
|
+
) {
|
|
537
563
|
const {
|
|
538
564
|
error,
|
|
539
565
|
} = UserPlatformApplicationValidator.getActiveSessions().validate(
|
|
@@ -571,12 +597,12 @@ class User {
|
|
|
571
597
|
`/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/customers/sessions`,
|
|
572
598
|
query_params,
|
|
573
599
|
undefined,
|
|
574
|
-
|
|
575
|
-
{
|
|
600
|
+
requestHeaders,
|
|
601
|
+
{ responseHeaders }
|
|
576
602
|
);
|
|
577
603
|
|
|
578
604
|
let responseData = response;
|
|
579
|
-
if (
|
|
605
|
+
if (responseHeaders) {
|
|
580
606
|
responseData = response[0];
|
|
581
607
|
}
|
|
582
608
|
|
|
@@ -599,6 +625,7 @@ class User {
|
|
|
599
625
|
|
|
600
626
|
/**
|
|
601
627
|
* @param {UserPlatformApplicationValidator.GetCustomersParam} arg - Arg object
|
|
628
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
602
629
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
603
630
|
* @returns {Promise<UserPlatformModel.CustomerListResponseSchema>} - Success response
|
|
604
631
|
* @name getCustomers
|
|
@@ -606,8 +633,8 @@ class User {
|
|
|
606
633
|
* @description: Use this API to retrieve a list of customers who have registered in the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/getCustomers/).
|
|
607
634
|
*/
|
|
608
635
|
async getCustomers(
|
|
609
|
-
{ q, pageSize, pageNo } = {},
|
|
610
|
-
{
|
|
636
|
+
{ q, pageSize, pageNo, requestHeaders } = { requestHeaders: {} },
|
|
637
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
611
638
|
) {
|
|
612
639
|
const { error } = UserPlatformApplicationValidator.getCustomers().validate(
|
|
613
640
|
{
|
|
@@ -650,12 +677,12 @@ class User {
|
|
|
650
677
|
`/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/customers/list`,
|
|
651
678
|
query_params,
|
|
652
679
|
undefined,
|
|
653
|
-
|
|
654
|
-
{
|
|
680
|
+
requestHeaders,
|
|
681
|
+
{ responseHeaders }
|
|
655
682
|
);
|
|
656
683
|
|
|
657
684
|
let responseData = response;
|
|
658
|
-
if (
|
|
685
|
+
if (responseHeaders) {
|
|
659
686
|
responseData = response[0];
|
|
660
687
|
}
|
|
661
688
|
|
|
@@ -677,13 +704,18 @@ class User {
|
|
|
677
704
|
}
|
|
678
705
|
|
|
679
706
|
/**
|
|
707
|
+
* @param {UserPlatformApplicationValidator.GetPlatformConfigParam} arg - Arg object
|
|
708
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
680
709
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
681
710
|
* @returns {Promise<UserPlatformModel.PlatformSchema>} - Success response
|
|
682
711
|
* @name getPlatformConfig
|
|
683
712
|
* @summary: Get platform configurations
|
|
684
713
|
* @description: Use this API to get all the platform configurations such as mobile image, desktop image, social logins, and all other text. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/getPlatformConfig/).
|
|
685
714
|
*/
|
|
686
|
-
async getPlatformConfig(
|
|
715
|
+
async getPlatformConfig(
|
|
716
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
717
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
718
|
+
) {
|
|
687
719
|
const {
|
|
688
720
|
error,
|
|
689
721
|
} = UserPlatformApplicationValidator.getPlatformConfig().validate(
|
|
@@ -716,12 +748,12 @@ class User {
|
|
|
716
748
|
`/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/platform/config`,
|
|
717
749
|
query_params,
|
|
718
750
|
undefined,
|
|
719
|
-
|
|
720
|
-
{
|
|
751
|
+
requestHeaders,
|
|
752
|
+
{ responseHeaders }
|
|
721
753
|
);
|
|
722
754
|
|
|
723
755
|
let responseData = response;
|
|
724
|
-
if (
|
|
756
|
+
if (responseHeaders) {
|
|
725
757
|
responseData = response[0];
|
|
726
758
|
}
|
|
727
759
|
|
|
@@ -744,13 +776,17 @@ class User {
|
|
|
744
776
|
|
|
745
777
|
/**
|
|
746
778
|
* @param {UserPlatformApplicationValidator.GetUserGroupByIdParam} arg - Arg object
|
|
779
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
747
780
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
748
781
|
* @returns {Promise<UserPlatformModel.UserGroupResponseSchema>} - Success response
|
|
749
782
|
* @name getUserGroupById
|
|
750
783
|
* @summary: Get an User Group by Id
|
|
751
784
|
* @description: Use this API to get details of an existing user Group - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/getUserGroupById/).
|
|
752
785
|
*/
|
|
753
|
-
async getUserGroupById(
|
|
786
|
+
async getUserGroupById(
|
|
787
|
+
{ groupId, requestHeaders } = { requestHeaders: {} },
|
|
788
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
789
|
+
) {
|
|
754
790
|
const {
|
|
755
791
|
error,
|
|
756
792
|
} = UserPlatformApplicationValidator.getUserGroupById().validate(
|
|
@@ -787,12 +823,12 @@ class User {
|
|
|
787
823
|
`/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/user_group/${groupId}`,
|
|
788
824
|
query_params,
|
|
789
825
|
undefined,
|
|
790
|
-
|
|
791
|
-
{
|
|
826
|
+
requestHeaders,
|
|
827
|
+
{ responseHeaders }
|
|
792
828
|
);
|
|
793
829
|
|
|
794
830
|
let responseData = response;
|
|
795
|
-
if (
|
|
831
|
+
if (responseHeaders) {
|
|
796
832
|
responseData = response[0];
|
|
797
833
|
}
|
|
798
834
|
|
|
@@ -815,6 +851,7 @@ class User {
|
|
|
815
851
|
|
|
816
852
|
/**
|
|
817
853
|
* @param {UserPlatformApplicationValidator.GetUserGroupsParam} arg - Arg object
|
|
854
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
818
855
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
819
856
|
* @returns {Promise<UserPlatformModel.UserGroupListResponseSchema>} -
|
|
820
857
|
* Success response
|
|
@@ -823,8 +860,10 @@ class User {
|
|
|
823
860
|
* @description: Use this API to get User Groups mathing criteria passed in query - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/getUserGroups/).
|
|
824
861
|
*/
|
|
825
862
|
async getUserGroups(
|
|
826
|
-
{ pageNo, pageSize, name, status, groupUid } = {
|
|
827
|
-
|
|
863
|
+
{ pageNo, pageSize, name, status, groupUid, requestHeaders } = {
|
|
864
|
+
requestHeaders: {},
|
|
865
|
+
},
|
|
866
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
828
867
|
) {
|
|
829
868
|
const { error } = UserPlatformApplicationValidator.getUserGroups().validate(
|
|
830
869
|
{
|
|
@@ -873,12 +912,12 @@ class User {
|
|
|
873
912
|
`/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/user_group`,
|
|
874
913
|
query_params,
|
|
875
914
|
undefined,
|
|
876
|
-
|
|
877
|
-
{
|
|
915
|
+
requestHeaders,
|
|
916
|
+
{ responseHeaders }
|
|
878
917
|
);
|
|
879
918
|
|
|
880
919
|
let responseData = response;
|
|
881
|
-
if (
|
|
920
|
+
if (responseHeaders) {
|
|
882
921
|
responseData = response[0];
|
|
883
922
|
}
|
|
884
923
|
|
|
@@ -901,16 +940,21 @@ class User {
|
|
|
901
940
|
|
|
902
941
|
/**
|
|
903
942
|
* @param {UserPlatformApplicationValidator.SearchUsersParam} arg - Arg object
|
|
943
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
904
944
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
905
945
|
* @returns {Promise<UserPlatformModel.UserSearchResponseSchema>} - Success response
|
|
906
946
|
* @name searchUsers
|
|
907
947
|
* @summary: Search an existing user.
|
|
908
948
|
* @description: Use this API to retrieve an existing user from a list. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/searchUsers/).
|
|
909
949
|
*/
|
|
910
|
-
async searchUsers(
|
|
950
|
+
async searchUsers(
|
|
951
|
+
{ q, query, requestHeaders } = { requestHeaders: {} },
|
|
952
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
953
|
+
) {
|
|
911
954
|
const { error } = UserPlatformApplicationValidator.searchUsers().validate(
|
|
912
955
|
{
|
|
913
956
|
q,
|
|
957
|
+
query,
|
|
914
958
|
},
|
|
915
959
|
{ abortEarly: false, allowUnknown: true }
|
|
916
960
|
);
|
|
@@ -924,6 +968,7 @@ class User {
|
|
|
924
968
|
} = UserPlatformApplicationValidator.searchUsers().validate(
|
|
925
969
|
{
|
|
926
970
|
q,
|
|
971
|
+
query,
|
|
927
972
|
},
|
|
928
973
|
{ abortEarly: false, allowUnknown: false }
|
|
929
974
|
);
|
|
@@ -936,6 +981,7 @@ class User {
|
|
|
936
981
|
|
|
937
982
|
const query_params = {};
|
|
938
983
|
query_params["q"] = q;
|
|
984
|
+
query_params["query"] = query;
|
|
939
985
|
|
|
940
986
|
const response = await PlatformAPIClient.execute(
|
|
941
987
|
this.config,
|
|
@@ -943,12 +989,12 @@ class User {
|
|
|
943
989
|
`/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/customers/search`,
|
|
944
990
|
query_params,
|
|
945
991
|
undefined,
|
|
946
|
-
|
|
947
|
-
{
|
|
992
|
+
requestHeaders,
|
|
993
|
+
{ responseHeaders }
|
|
948
994
|
);
|
|
949
995
|
|
|
950
996
|
let responseData = response;
|
|
951
|
-
if (
|
|
997
|
+
if (responseHeaders) {
|
|
952
998
|
responseData = response[0];
|
|
953
999
|
}
|
|
954
1000
|
|
|
@@ -971,13 +1017,17 @@ class User {
|
|
|
971
1017
|
|
|
972
1018
|
/**
|
|
973
1019
|
* @param {UserPlatformApplicationValidator.UnDeleteUserParam} arg - Arg object
|
|
1020
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
974
1021
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
975
1022
|
* @returns {Promise<UserPlatformModel.UnDeleteUserSuccess>} - Success response
|
|
976
1023
|
* @name unDeleteUser
|
|
977
1024
|
* @summary: undelete user who deleted from application and have not elapsed the platform configured delete days
|
|
978
1025
|
* @description: undelete user who deleted from application and have not elapsed the platform configured delete days - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/unDeleteUser/).
|
|
979
1026
|
*/
|
|
980
|
-
async unDeleteUser(
|
|
1027
|
+
async unDeleteUser(
|
|
1028
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1029
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1030
|
+
) {
|
|
981
1031
|
const { error } = UserPlatformApplicationValidator.unDeleteUser().validate(
|
|
982
1032
|
{
|
|
983
1033
|
body,
|
|
@@ -1012,12 +1062,12 @@ class User {
|
|
|
1012
1062
|
`/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/customers/undelete`,
|
|
1013
1063
|
query_params,
|
|
1014
1064
|
body,
|
|
1015
|
-
|
|
1016
|
-
{
|
|
1065
|
+
requestHeaders,
|
|
1066
|
+
{ responseHeaders }
|
|
1017
1067
|
);
|
|
1018
1068
|
|
|
1019
1069
|
let responseData = response;
|
|
1020
|
-
if (
|
|
1070
|
+
if (responseHeaders) {
|
|
1021
1071
|
responseData = response[0];
|
|
1022
1072
|
}
|
|
1023
1073
|
|
|
@@ -1042,13 +1092,17 @@ class User {
|
|
|
1042
1092
|
* @param {UserPlatformApplicationValidator.UpdatePlatformConfigParam} arg
|
|
1043
1093
|
* - Arg object
|
|
1044
1094
|
*
|
|
1095
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1045
1096
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1046
1097
|
* @returns {Promise<UserPlatformModel.PlatformSchema>} - Success response
|
|
1047
1098
|
* @name updatePlatformConfig
|
|
1048
1099
|
* @summary: Update platform configurations
|
|
1049
1100
|
* @description: Use this API to edit the existing platform configurations such as mobile image, desktop image, social logins, and all other text. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/updatePlatformConfig/).
|
|
1050
1101
|
*/
|
|
1051
|
-
async updatePlatformConfig(
|
|
1102
|
+
async updatePlatformConfig(
|
|
1103
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1104
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1105
|
+
) {
|
|
1052
1106
|
const {
|
|
1053
1107
|
error,
|
|
1054
1108
|
} = UserPlatformApplicationValidator.updatePlatformConfig().validate(
|
|
@@ -1085,12 +1139,12 @@ class User {
|
|
|
1085
1139
|
`/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/platform/config`,
|
|
1086
1140
|
query_params,
|
|
1087
1141
|
body,
|
|
1088
|
-
|
|
1089
|
-
{
|
|
1142
|
+
requestHeaders,
|
|
1143
|
+
{ responseHeaders }
|
|
1090
1144
|
);
|
|
1091
1145
|
|
|
1092
1146
|
let responseData = response;
|
|
1093
|
-
if (
|
|
1147
|
+
if (responseHeaders) {
|
|
1094
1148
|
responseData = response[0];
|
|
1095
1149
|
}
|
|
1096
1150
|
|
|
@@ -1113,13 +1167,17 @@ class User {
|
|
|
1113
1167
|
|
|
1114
1168
|
/**
|
|
1115
1169
|
* @param {UserPlatformApplicationValidator.UpdateUserParam} arg - Arg object
|
|
1170
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1116
1171
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1117
1172
|
* @returns {Promise<UserPlatformModel.CreateUserResponseSchema>} - Success response
|
|
1118
1173
|
* @name updateUser
|
|
1119
1174
|
* @summary: Update user
|
|
1120
1175
|
* @description: Use this API to update user details, Note: Existing emails and phone numbers of user will be replaced directly if phone_numbers or emails field sent in request data. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/updateUser/).
|
|
1121
1176
|
*/
|
|
1122
|
-
async updateUser(
|
|
1177
|
+
async updateUser(
|
|
1178
|
+
{ userId, body, requestHeaders } = { requestHeaders: {} },
|
|
1179
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1180
|
+
) {
|
|
1123
1181
|
const { error } = UserPlatformApplicationValidator.updateUser().validate(
|
|
1124
1182
|
{
|
|
1125
1183
|
userId,
|
|
@@ -1156,12 +1214,12 @@ class User {
|
|
|
1156
1214
|
`/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/customers/${userId}`,
|
|
1157
1215
|
query_params,
|
|
1158
1216
|
body,
|
|
1159
|
-
|
|
1160
|
-
{
|
|
1217
|
+
requestHeaders,
|
|
1218
|
+
{ responseHeaders }
|
|
1161
1219
|
);
|
|
1162
1220
|
|
|
1163
1221
|
let responseData = response;
|
|
1164
|
-
if (
|
|
1222
|
+
if (responseHeaders) {
|
|
1165
1223
|
responseData = response[0];
|
|
1166
1224
|
}
|
|
1167
1225
|
|
|
@@ -1184,6 +1242,7 @@ class User {
|
|
|
1184
1242
|
|
|
1185
1243
|
/**
|
|
1186
1244
|
* @param {UserPlatformApplicationValidator.UpdateUserGroupParam} arg - Arg object
|
|
1245
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1187
1246
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1188
1247
|
* @returns {Promise<UserPlatformModel.UserGroupResponseSchema>} - Success response
|
|
1189
1248
|
* @name updateUserGroup
|
|
@@ -1191,8 +1250,8 @@ class User {
|
|
|
1191
1250
|
* @description: Use this API to update an existing user Group - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/updateUserGroup/).
|
|
1192
1251
|
*/
|
|
1193
1252
|
async updateUserGroup(
|
|
1194
|
-
{ groupId, body } = {},
|
|
1195
|
-
{
|
|
1253
|
+
{ groupId, body, requestHeaders } = { requestHeaders: {} },
|
|
1254
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1196
1255
|
) {
|
|
1197
1256
|
const {
|
|
1198
1257
|
error,
|
|
@@ -1232,12 +1291,12 @@ class User {
|
|
|
1232
1291
|
`/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/user_group/${groupId}`,
|
|
1233
1292
|
query_params,
|
|
1234
1293
|
body,
|
|
1235
|
-
|
|
1236
|
-
{
|
|
1294
|
+
requestHeaders,
|
|
1295
|
+
{ responseHeaders }
|
|
1237
1296
|
);
|
|
1238
1297
|
|
|
1239
1298
|
let responseData = response;
|
|
1240
|
-
if (
|
|
1299
|
+
if (responseHeaders) {
|
|
1241
1300
|
responseData = response[0];
|
|
1242
1301
|
}
|
|
1243
1302
|
|
|
@@ -59,6 +59,8 @@ export = UserPlatformApplicationValidator;
|
|
|
59
59
|
/**
|
|
60
60
|
* @typedef SearchUsersParam
|
|
61
61
|
* @property {string} [q] - The search query. Mobile number or email ID of a customer.
|
|
62
|
+
* @property {string[]} [query] - The search queries. Mobile numbers or email
|
|
63
|
+
* IDs of customers.
|
|
62
64
|
*/
|
|
63
65
|
/**
|
|
64
66
|
* @typedef UnDeleteUserParam
|
|
@@ -212,6 +214,11 @@ type SearchUsersParam = {
|
|
|
212
214
|
* - The search query. Mobile number or email ID of a customer.
|
|
213
215
|
*/
|
|
214
216
|
q?: string;
|
|
217
|
+
/**
|
|
218
|
+
* - The search queries. Mobile numbers or email
|
|
219
|
+
* IDs of customers.
|
|
220
|
+
*/
|
|
221
|
+
query?: string[];
|
|
215
222
|
};
|
|
216
223
|
type UnDeleteUserParam = {
|
|
217
224
|
body: UserPlatformModel.UnDeleteUserRequestSchema;
|
|
@@ -74,6 +74,8 @@ const UserPlatformModel = require("./UserPlatformModel");
|
|
|
74
74
|
/**
|
|
75
75
|
* @typedef SearchUsersParam
|
|
76
76
|
* @property {string} [q] - The search query. Mobile number or email ID of a customer.
|
|
77
|
+
* @property {string[]} [query] - The search queries. Mobile numbers or email
|
|
78
|
+
* IDs of customers.
|
|
77
79
|
*/
|
|
78
80
|
|
|
79
81
|
/**
|
|
@@ -194,6 +196,7 @@ class UserPlatformApplicationValidator {
|
|
|
194
196
|
static searchUsers() {
|
|
195
197
|
return Joi.object({
|
|
196
198
|
q: Joi.string().allow(""),
|
|
199
|
+
query: Joi.array().items(Joi.string().allow("")),
|
|
197
200
|
}).required();
|
|
198
201
|
}
|
|
199
202
|
|