@gofynd/fdk-client-javascript 1.6.3 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/sdk/application/Cart/CartApplicationClient.d.ts +5 -5
- package/sdk/application/Cart/CartApplicationClient.js +26 -268
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +20 -20
- package/sdk/application/Catalog/CatalogApplicationClient.js +98 -347
- package/sdk/application/Common/CommonApplicationClient.js +1 -16
- package/sdk/application/Communication/CommunicationApplicationClient.js +1 -24
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +24 -2
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +58 -137
- package/sdk/application/Content/ContentApplicationClient.d.ts +47 -7
- package/sdk/application/Content/ContentApplicationClient.js +222 -191
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +2 -2
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +11 -30
- package/sdk/application/Finance/FinanceApplicationClient.js +1 -16
- package/sdk/application/Lead/LeadApplicationClient.d.ts +4 -4
- package/sdk/application/Lead/LeadApplicationClient.js +21 -52
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +16 -56
- package/sdk/application/Logistic/LogisticApplicationClient.js +57 -332
- package/sdk/application/Order/OrderApplicationClient.d.ts +11 -11
- package/sdk/application/Order/OrderApplicationClient.js +68 -153
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +2 -12
- package/sdk/application/Payment/PaymentApplicationClient.js +7 -487
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +1 -1
- package/sdk/application/Rewards/RewardsApplicationClient.js +6 -59
- package/sdk/application/Share/ShareApplicationClient.d.ts +4 -4
- package/sdk/application/Share/ShareApplicationClient.js +21 -75
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +3 -3
- package/sdk/application/Theme/ThemeApplicationClient.js +19 -47
- package/sdk/application/User/UserApplicationClient.js +1 -407
- package/sdk/application/Webhook/WebhookApplicationClient.js +1 -8
- package/sdk/common/Utility.d.ts +1 -1
- package/sdk/common/Utility.js +4 -4
- package/sdk/common/Validator.d.ts +1 -0
- package/sdk/common/Validator.js +20 -0
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +1 -55
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +1 -408
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +0 -5
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +0 -37
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +5 -0
- package/sdk/partner/Lead/LeadPartnerModel.js +2 -0
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +29 -25
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +65 -42
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +1008 -794
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +573 -460
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +10 -5
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +64 -1
- package/sdk/partner/Webhook/WebhookPartnerModel.js +36 -0
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +5 -0
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +2 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +67 -9
- package/sdk/platform/Cart/CartPlatformModel.js +38 -5
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1 -1
- package/sdk/platform/Catalog/CatalogPlatformClient.js +4 -4
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +47 -13
- package/sdk/platform/Catalog/CatalogPlatformModel.js +29 -7
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +7 -4
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +71 -7
- package/sdk/platform/Communication/CommunicationPlatformModel.js +70 -6
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +0 -27
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +8 -60
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +31 -20
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +18 -18
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +3 -3
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +13 -0
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +30 -1
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +68 -11
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +49 -7
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +169 -0
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1279 -132
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +156 -1
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +180 -0
- package/sdk/platform/Content/ContentPlatformClient.d.ts +162 -0
- package/sdk/platform/Content/ContentPlatformClient.js +1697 -497
- package/sdk/platform/Content/ContentPlatformModel.d.ts +1053 -35
- package/sdk/platform/Content/ContentPlatformModel.js +717 -34
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +127 -1
- package/sdk/platform/Content/ContentPlatformValidator.js +171 -0
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +34 -0
- package/sdk/platform/Discount/DiscountPlatformClient.js +59 -0
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +365 -93
- package/sdk/platform/Discount/DiscountPlatformModel.js +98 -93
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +54 -34
- package/sdk/platform/Discount/DiscountPlatformValidator.js +27 -17
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +0 -156
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +0 -1072
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +1 -137
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +0 -173
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +1 -1105
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +0 -1125
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +5 -0
- package/sdk/platform/Lead/LeadPlatformModel.js +2 -0
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +0 -10
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +0 -92
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -28
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +0 -18
- package/sdk/platform/Order/OrderPlatformClient.d.ts +212 -0
- package/sdk/platform/Order/OrderPlatformClient.js +397 -0
- package/sdk/platform/Order/OrderPlatformModel.d.ts +66 -10
- package/sdk/platform/Order/OrderPlatformModel.js +39 -7
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +33 -1
- package/sdk/platform/Order/OrderPlatformValidator.js +20 -0
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +58 -10
- package/sdk/platform/Partner/PartnerPlatformModel.js +19 -10
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +12 -2
- package/sdk/platform/Payment/PaymentPlatformModel.js +8 -2
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +5 -0
- package/sdk/platform/Rewards/RewardsPlatformModel.js +2 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +240 -24
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +1753 -277
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +320 -22
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +269 -19
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +53 -104
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +201 -629
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +5720 -2891
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +3414 -2181
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +138 -216
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +81 -148
- package/sdk/platform/Share/SharePlatformModel.d.ts +5 -0
- package/sdk/platform/Share/SharePlatformModel.js +2 -0
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +73 -0
- package/sdk/platform/User/UserPlatformApplicationClient.js +543 -0
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +129 -1
- package/sdk/platform/User/UserPlatformApplicationValidator.js +97 -0
- package/sdk/platform/User/UserPlatformModel.d.ts +269 -6
- package/sdk/platform/User/UserPlatformModel.js +187 -5
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +64 -1
- package/sdk/platform/Webhook/WebhookPlatformModel.js +36 -0
- package/sdk/public/Catalog/CatalogPublicClient.d.ts +1 -1
- package/sdk/public/Catalog/CatalogPublicClient.js +6 -11
- package/sdk/public/Configuration/ConfigurationPublicClient.js +1 -16
- package/sdk/public/Content/ContentPublicClient.d.ts +36 -3
- package/sdk/public/Content/ContentPublicClient.js +261 -104
- package/sdk/public/Content/ContentPublicModel.d.ts +155 -1
- package/sdk/public/Content/ContentPublicModel.js +102 -0
- package/sdk/public/Content/ContentPublicValidator.d.ts +18 -1
- package/sdk/public/Content/ContentPublicValidator.js +26 -0
- package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
- package/sdk/public/Partner/PartnerPublicClient.js +6 -11
- 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/Webhook/WebhookPublicClient.js +1 -40
|
@@ -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://partners.fynd.com/help/docs/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://partners.fynd.com/help/docs/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 `{}`
|
|
@@ -892,6 +1054,228 @@ class User {
|
|
|
892
1054
|
return response;
|
|
893
1055
|
}
|
|
894
1056
|
|
|
1057
|
+
/**
|
|
1058
|
+
* @param {UserPlatformApplicationValidator.GetBulkExportUsersListParam} arg
|
|
1059
|
+
* - Arg object
|
|
1060
|
+
*
|
|
1061
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1062
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1063
|
+
* @returns {Promise<UserPlatformModel.BulkActionPaginationSchema>} - Success response
|
|
1064
|
+
* @name getBulkExportUsersList
|
|
1065
|
+
* @summary: Get Bulk User's Export Lists for a specific Application.
|
|
1066
|
+
* @description: This API allows fetching the list of bulk user exports for a specific application and company.
|
|
1067
|
+
* It supports pagination and filtering based on various parameters.
|
|
1068
|
+
* - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/getBulkExportUsersList/).
|
|
1069
|
+
*/
|
|
1070
|
+
async getBulkExportUsersList(
|
|
1071
|
+
{
|
|
1072
|
+
pageNo,
|
|
1073
|
+
pageSize,
|
|
1074
|
+
fileFormat,
|
|
1075
|
+
search,
|
|
1076
|
+
startDate,
|
|
1077
|
+
endDate,
|
|
1078
|
+
status,
|
|
1079
|
+
requestHeaders,
|
|
1080
|
+
} = { requestHeaders: {} },
|
|
1081
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1082
|
+
) {
|
|
1083
|
+
const {
|
|
1084
|
+
error,
|
|
1085
|
+
} = UserPlatformApplicationValidator.getBulkExportUsersList().validate(
|
|
1086
|
+
{
|
|
1087
|
+
pageNo,
|
|
1088
|
+
pageSize,
|
|
1089
|
+
fileFormat,
|
|
1090
|
+
search,
|
|
1091
|
+
startDate,
|
|
1092
|
+
endDate,
|
|
1093
|
+
status,
|
|
1094
|
+
},
|
|
1095
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1096
|
+
);
|
|
1097
|
+
if (error) {
|
|
1098
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1099
|
+
}
|
|
1100
|
+
|
|
1101
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1102
|
+
const {
|
|
1103
|
+
error: warrning,
|
|
1104
|
+
} = UserPlatformApplicationValidator.getBulkExportUsersList().validate(
|
|
1105
|
+
{
|
|
1106
|
+
pageNo,
|
|
1107
|
+
pageSize,
|
|
1108
|
+
fileFormat,
|
|
1109
|
+
search,
|
|
1110
|
+
startDate,
|
|
1111
|
+
endDate,
|
|
1112
|
+
status,
|
|
1113
|
+
},
|
|
1114
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1115
|
+
);
|
|
1116
|
+
if (warrning) {
|
|
1117
|
+
Logger({
|
|
1118
|
+
level: "WARN",
|
|
1119
|
+
message: `Parameter Validation warrnings for platform > User > getBulkExportUsersList \n ${warrning}`,
|
|
1120
|
+
});
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
const query_params = {};
|
|
1124
|
+
query_params["page_no"] = pageNo;
|
|
1125
|
+
query_params["page_size"] = pageSize;
|
|
1126
|
+
query_params["file_format"] = fileFormat;
|
|
1127
|
+
query_params["search"] = search;
|
|
1128
|
+
query_params["start_date"] = startDate;
|
|
1129
|
+
query_params["end_date"] = endDate;
|
|
1130
|
+
query_params["status"] = status;
|
|
1131
|
+
|
|
1132
|
+
const response = await PlatformAPIClient.execute(
|
|
1133
|
+
this.config,
|
|
1134
|
+
"get",
|
|
1135
|
+
`/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/users/jobs/export`,
|
|
1136
|
+
query_params,
|
|
1137
|
+
undefined,
|
|
1138
|
+
requestHeaders,
|
|
1139
|
+
{ responseHeaders }
|
|
1140
|
+
);
|
|
1141
|
+
|
|
1142
|
+
let responseData = response;
|
|
1143
|
+
if (responseHeaders) {
|
|
1144
|
+
responseData = response[0];
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1147
|
+
const {
|
|
1148
|
+
error: res_error,
|
|
1149
|
+
} = UserPlatformModel.BulkActionPaginationSchema().validate(responseData, {
|
|
1150
|
+
abortEarly: false,
|
|
1151
|
+
allowUnknown: true,
|
|
1152
|
+
});
|
|
1153
|
+
|
|
1154
|
+
if (res_error) {
|
|
1155
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1156
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1157
|
+
} else {
|
|
1158
|
+
Logger({
|
|
1159
|
+
level: "WARN",
|
|
1160
|
+
message: `Response Validation Warnings for platform > User > getBulkExportUsersList \n ${res_error}`,
|
|
1161
|
+
});
|
|
1162
|
+
}
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1165
|
+
return response;
|
|
1166
|
+
}
|
|
1167
|
+
|
|
1168
|
+
/**
|
|
1169
|
+
* @param {UserPlatformApplicationValidator.GetBulkImportUsersListParam} arg
|
|
1170
|
+
* - Arg object
|
|
1171
|
+
*
|
|
1172
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1173
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1174
|
+
* @returns {Promise<UserPlatformModel.BulkActionPaginationSchema>} - Success response
|
|
1175
|
+
* @name getBulkImportUsersList
|
|
1176
|
+
* @summary: Get Bulk User's Import Lists for a specific Application.
|
|
1177
|
+
* @description: This API allows fetching the list of bulk user imports for a specific application and company.
|
|
1178
|
+
* It supports pagination and filtering based on various parameters.
|
|
1179
|
+
* - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/getBulkImportUsersList/).
|
|
1180
|
+
*/
|
|
1181
|
+
async getBulkImportUsersList(
|
|
1182
|
+
{
|
|
1183
|
+
pageNo,
|
|
1184
|
+
pageSize,
|
|
1185
|
+
search,
|
|
1186
|
+
startDate,
|
|
1187
|
+
endDate,
|
|
1188
|
+
status,
|
|
1189
|
+
fileFormat,
|
|
1190
|
+
requestHeaders,
|
|
1191
|
+
} = { requestHeaders: {} },
|
|
1192
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1193
|
+
) {
|
|
1194
|
+
const {
|
|
1195
|
+
error,
|
|
1196
|
+
} = UserPlatformApplicationValidator.getBulkImportUsersList().validate(
|
|
1197
|
+
{
|
|
1198
|
+
pageNo,
|
|
1199
|
+
pageSize,
|
|
1200
|
+
search,
|
|
1201
|
+
startDate,
|
|
1202
|
+
endDate,
|
|
1203
|
+
status,
|
|
1204
|
+
fileFormat,
|
|
1205
|
+
},
|
|
1206
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1207
|
+
);
|
|
1208
|
+
if (error) {
|
|
1209
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1213
|
+
const {
|
|
1214
|
+
error: warrning,
|
|
1215
|
+
} = UserPlatformApplicationValidator.getBulkImportUsersList().validate(
|
|
1216
|
+
{
|
|
1217
|
+
pageNo,
|
|
1218
|
+
pageSize,
|
|
1219
|
+
search,
|
|
1220
|
+
startDate,
|
|
1221
|
+
endDate,
|
|
1222
|
+
status,
|
|
1223
|
+
fileFormat,
|
|
1224
|
+
},
|
|
1225
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1226
|
+
);
|
|
1227
|
+
if (warrning) {
|
|
1228
|
+
Logger({
|
|
1229
|
+
level: "WARN",
|
|
1230
|
+
message: `Parameter Validation warrnings for platform > User > getBulkImportUsersList \n ${warrning}`,
|
|
1231
|
+
});
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1234
|
+
const query_params = {};
|
|
1235
|
+
query_params["page_no"] = pageNo;
|
|
1236
|
+
query_params["page_size"] = pageSize;
|
|
1237
|
+
query_params["search"] = search;
|
|
1238
|
+
query_params["start_date"] = startDate;
|
|
1239
|
+
query_params["end_date"] = endDate;
|
|
1240
|
+
query_params["status"] = status;
|
|
1241
|
+
query_params["file_format"] = fileFormat;
|
|
1242
|
+
|
|
1243
|
+
const response = await PlatformAPIClient.execute(
|
|
1244
|
+
this.config,
|
|
1245
|
+
"get",
|
|
1246
|
+
`/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/users/jobs/import`,
|
|
1247
|
+
query_params,
|
|
1248
|
+
undefined,
|
|
1249
|
+
requestHeaders,
|
|
1250
|
+
{ responseHeaders }
|
|
1251
|
+
);
|
|
1252
|
+
|
|
1253
|
+
let responseData = response;
|
|
1254
|
+
if (responseHeaders) {
|
|
1255
|
+
responseData = response[0];
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
const {
|
|
1259
|
+
error: res_error,
|
|
1260
|
+
} = UserPlatformModel.BulkActionPaginationSchema().validate(responseData, {
|
|
1261
|
+
abortEarly: false,
|
|
1262
|
+
allowUnknown: true,
|
|
1263
|
+
});
|
|
1264
|
+
|
|
1265
|
+
if (res_error) {
|
|
1266
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1267
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1268
|
+
} else {
|
|
1269
|
+
Logger({
|
|
1270
|
+
level: "WARN",
|
|
1271
|
+
message: `Response Validation Warnings for platform > User > getBulkImportUsersList \n ${res_error}`,
|
|
1272
|
+
});
|
|
1273
|
+
}
|
|
1274
|
+
}
|
|
1275
|
+
|
|
1276
|
+
return response;
|
|
1277
|
+
}
|
|
1278
|
+
|
|
895
1279
|
/**
|
|
896
1280
|
* @param {UserPlatformApplicationValidator.GetCustomersParam} arg - Arg object
|
|
897
1281
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -1665,6 +2049,165 @@ class User {
|
|
|
1665
2049
|
return response;
|
|
1666
2050
|
}
|
|
1667
2051
|
|
|
2052
|
+
/**
|
|
2053
|
+
* @param {UserPlatformApplicationValidator.GetUserTimelineParam} arg - Arg object
|
|
2054
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2055
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2056
|
+
* @returns {Promise<UserPlatformModel.GetUserTimeline>} - Success response
|
|
2057
|
+
* @name getUserTimeline
|
|
2058
|
+
* @summary: Get Deleted User Timeline
|
|
2059
|
+
* @description: Fetches the timeline for the user who has made a data erase request. The timeline will show when the request was raised and when the request will be completed. It will also show if request has been cancelled before completion. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/getUserTimeline/).
|
|
2060
|
+
*/
|
|
2061
|
+
async getUserTimeline(
|
|
2062
|
+
{ userId, requestHeaders } = { requestHeaders: {} },
|
|
2063
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2064
|
+
) {
|
|
2065
|
+
const {
|
|
2066
|
+
error,
|
|
2067
|
+
} = UserPlatformApplicationValidator.getUserTimeline().validate(
|
|
2068
|
+
{
|
|
2069
|
+
userId,
|
|
2070
|
+
},
|
|
2071
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2072
|
+
);
|
|
2073
|
+
if (error) {
|
|
2074
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
2075
|
+
}
|
|
2076
|
+
|
|
2077
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2078
|
+
const {
|
|
2079
|
+
error: warrning,
|
|
2080
|
+
} = UserPlatformApplicationValidator.getUserTimeline().validate(
|
|
2081
|
+
{
|
|
2082
|
+
userId,
|
|
2083
|
+
},
|
|
2084
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2085
|
+
);
|
|
2086
|
+
if (warrning) {
|
|
2087
|
+
Logger({
|
|
2088
|
+
level: "WARN",
|
|
2089
|
+
message: `Parameter Validation warrnings for platform > User > getUserTimeline \n ${warrning}`,
|
|
2090
|
+
});
|
|
2091
|
+
}
|
|
2092
|
+
|
|
2093
|
+
const query_params = {};
|
|
2094
|
+
|
|
2095
|
+
const response = await PlatformAPIClient.execute(
|
|
2096
|
+
this.config,
|
|
2097
|
+
"get",
|
|
2098
|
+
`/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/customers/${userId}/timeline`,
|
|
2099
|
+
query_params,
|
|
2100
|
+
undefined,
|
|
2101
|
+
requestHeaders,
|
|
2102
|
+
{ responseHeaders }
|
|
2103
|
+
);
|
|
2104
|
+
|
|
2105
|
+
let responseData = response;
|
|
2106
|
+
if (responseHeaders) {
|
|
2107
|
+
responseData = response[0];
|
|
2108
|
+
}
|
|
2109
|
+
|
|
2110
|
+
const {
|
|
2111
|
+
error: res_error,
|
|
2112
|
+
} = UserPlatformModel.GetUserTimeline().validate(responseData, {
|
|
2113
|
+
abortEarly: false,
|
|
2114
|
+
allowUnknown: true,
|
|
2115
|
+
});
|
|
2116
|
+
|
|
2117
|
+
if (res_error) {
|
|
2118
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
2119
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2120
|
+
} else {
|
|
2121
|
+
Logger({
|
|
2122
|
+
level: "WARN",
|
|
2123
|
+
message: `Response Validation Warnings for platform > User > getUserTimeline \n ${res_error}`,
|
|
2124
|
+
});
|
|
2125
|
+
}
|
|
2126
|
+
}
|
|
2127
|
+
|
|
2128
|
+
return response;
|
|
2129
|
+
}
|
|
2130
|
+
|
|
2131
|
+
/**
|
|
2132
|
+
* @param {UserPlatformApplicationValidator.GetUsersJobByJobIdParam} arg - Arg object
|
|
2133
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2134
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2135
|
+
* @returns {Promise<UserPlatformModel.BulkActionModel>} - Success response
|
|
2136
|
+
* @name getUsersJobByJobId
|
|
2137
|
+
* @summary: Retrieve Job Details by Job ID for a Specific Application, Including Both Import and Export Jobs.
|
|
2138
|
+
* @description: This endpoint retrieves the details of a specific user's import and export related jobs associated with a given `job_id`, `application_id`, and `company_id`.
|
|
2139
|
+
* - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/getUsersJobByJobId/).
|
|
2140
|
+
*/
|
|
2141
|
+
async getUsersJobByJobId(
|
|
2142
|
+
{ jobId, requestHeaders } = { requestHeaders: {} },
|
|
2143
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2144
|
+
) {
|
|
2145
|
+
const {
|
|
2146
|
+
error,
|
|
2147
|
+
} = UserPlatformApplicationValidator.getUsersJobByJobId().validate(
|
|
2148
|
+
{
|
|
2149
|
+
jobId,
|
|
2150
|
+
},
|
|
2151
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2152
|
+
);
|
|
2153
|
+
if (error) {
|
|
2154
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
2155
|
+
}
|
|
2156
|
+
|
|
2157
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2158
|
+
const {
|
|
2159
|
+
error: warrning,
|
|
2160
|
+
} = UserPlatformApplicationValidator.getUsersJobByJobId().validate(
|
|
2161
|
+
{
|
|
2162
|
+
jobId,
|
|
2163
|
+
},
|
|
2164
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2165
|
+
);
|
|
2166
|
+
if (warrning) {
|
|
2167
|
+
Logger({
|
|
2168
|
+
level: "WARN",
|
|
2169
|
+
message: `Parameter Validation warrnings for platform > User > getUsersJobByJobId \n ${warrning}`,
|
|
2170
|
+
});
|
|
2171
|
+
}
|
|
2172
|
+
|
|
2173
|
+
const query_params = {};
|
|
2174
|
+
|
|
2175
|
+
const response = await PlatformAPIClient.execute(
|
|
2176
|
+
this.config,
|
|
2177
|
+
"get",
|
|
2178
|
+
`/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/users/jobs/${jobId}`,
|
|
2179
|
+
query_params,
|
|
2180
|
+
undefined,
|
|
2181
|
+
requestHeaders,
|
|
2182
|
+
{ responseHeaders }
|
|
2183
|
+
);
|
|
2184
|
+
|
|
2185
|
+
let responseData = response;
|
|
2186
|
+
if (responseHeaders) {
|
|
2187
|
+
responseData = response[0];
|
|
2188
|
+
}
|
|
2189
|
+
|
|
2190
|
+
const {
|
|
2191
|
+
error: res_error,
|
|
2192
|
+
} = UserPlatformModel.BulkActionModel().validate(responseData, {
|
|
2193
|
+
abortEarly: false,
|
|
2194
|
+
allowUnknown: true,
|
|
2195
|
+
});
|
|
2196
|
+
|
|
2197
|
+
if (res_error) {
|
|
2198
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
2199
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2200
|
+
} else {
|
|
2201
|
+
Logger({
|
|
2202
|
+
level: "WARN",
|
|
2203
|
+
message: `Response Validation Warnings for platform > User > getUsersJobByJobId \n ${res_error}`,
|
|
2204
|
+
});
|
|
2205
|
+
}
|
|
2206
|
+
}
|
|
2207
|
+
|
|
2208
|
+
return response;
|
|
2209
|
+
}
|
|
2210
|
+
|
|
1668
2211
|
/**
|
|
1669
2212
|
* @param {UserPlatformApplicationValidator.SearchUsersParam} arg - Arg object
|
|
1670
2213
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|