@gofynd/fdk-client-javascript 1.6.2 → 1.6.4
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/partner/Webhook/WebhookPartnerModel.d.ts +59 -1
- package/sdk/partner/Webhook/WebhookPartnerModel.js +34 -0
- package/sdk/platform/Order/OrderPlatformModel.d.ts +27 -3
- package/sdk/platform/Order/OrderPlatformModel.js +21 -2
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +63 -0
- package/sdk/platform/User/UserPlatformApplicationClient.js +464 -0
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +117 -1
- package/sdk/platform/User/UserPlatformApplicationValidator.js +85 -0
- package/sdk/platform/User/UserPlatformModel.d.ts +218 -6
- package/sdk/platform/User/UserPlatformModel.js +151 -5
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +59 -1
- package/sdk/platform/Webhook/WebhookPlatformModel.js +34 -0
|
@@ -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,86 @@ class User {
|
|
|
1665
2049
|
return response;
|
|
1666
2050
|
}
|
|
1667
2051
|
|
|
2052
|
+
/**
|
|
2053
|
+
* @param {UserPlatformApplicationValidator.GetUsersJobByJobIdParam} arg - Arg object
|
|
2054
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2055
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2056
|
+
* @returns {Promise<UserPlatformModel.BulkActionModel>} - Success response
|
|
2057
|
+
* @name getUsersJobByJobId
|
|
2058
|
+
* @summary: Retrieve Job Details by Job ID for a Specific Application, Including Both Import and Export Jobs.
|
|
2059
|
+
* @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`.
|
|
2060
|
+
* - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/getUsersJobByJobId/).
|
|
2061
|
+
*/
|
|
2062
|
+
async getUsersJobByJobId(
|
|
2063
|
+
{ jobId, requestHeaders } = { requestHeaders: {} },
|
|
2064
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2065
|
+
) {
|
|
2066
|
+
const {
|
|
2067
|
+
error,
|
|
2068
|
+
} = UserPlatformApplicationValidator.getUsersJobByJobId().validate(
|
|
2069
|
+
{
|
|
2070
|
+
jobId,
|
|
2071
|
+
},
|
|
2072
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2073
|
+
);
|
|
2074
|
+
if (error) {
|
|
2075
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
2076
|
+
}
|
|
2077
|
+
|
|
2078
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2079
|
+
const {
|
|
2080
|
+
error: warrning,
|
|
2081
|
+
} = UserPlatformApplicationValidator.getUsersJobByJobId().validate(
|
|
2082
|
+
{
|
|
2083
|
+
jobId,
|
|
2084
|
+
},
|
|
2085
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2086
|
+
);
|
|
2087
|
+
if (warrning) {
|
|
2088
|
+
Logger({
|
|
2089
|
+
level: "WARN",
|
|
2090
|
+
message: `Parameter Validation warrnings for platform > User > getUsersJobByJobId \n ${warrning}`,
|
|
2091
|
+
});
|
|
2092
|
+
}
|
|
2093
|
+
|
|
2094
|
+
const query_params = {};
|
|
2095
|
+
|
|
2096
|
+
const response = await PlatformAPIClient.execute(
|
|
2097
|
+
this.config,
|
|
2098
|
+
"get",
|
|
2099
|
+
`/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/users/jobs/${jobId}`,
|
|
2100
|
+
query_params,
|
|
2101
|
+
undefined,
|
|
2102
|
+
requestHeaders,
|
|
2103
|
+
{ responseHeaders }
|
|
2104
|
+
);
|
|
2105
|
+
|
|
2106
|
+
let responseData = response;
|
|
2107
|
+
if (responseHeaders) {
|
|
2108
|
+
responseData = response[0];
|
|
2109
|
+
}
|
|
2110
|
+
|
|
2111
|
+
const {
|
|
2112
|
+
error: res_error,
|
|
2113
|
+
} = UserPlatformModel.BulkActionModel().validate(responseData, {
|
|
2114
|
+
abortEarly: false,
|
|
2115
|
+
allowUnknown: true,
|
|
2116
|
+
});
|
|
2117
|
+
|
|
2118
|
+
if (res_error) {
|
|
2119
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
2120
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2121
|
+
} else {
|
|
2122
|
+
Logger({
|
|
2123
|
+
level: "WARN",
|
|
2124
|
+
message: `Response Validation Warnings for platform > User > getUsersJobByJobId \n ${res_error}`,
|
|
2125
|
+
});
|
|
2126
|
+
}
|
|
2127
|
+
}
|
|
2128
|
+
|
|
2129
|
+
return response;
|
|
2130
|
+
}
|
|
2131
|
+
|
|
1668
2132
|
/**
|
|
1669
2133
|
* @param {UserPlatformApplicationValidator.SearchUsersParam} arg - Arg object
|
|
1670
2134
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -7,6 +7,14 @@ export = UserPlatformApplicationValidator;
|
|
|
7
7
|
* @typedef BlockOrUnblockUsersParam
|
|
8
8
|
* @property {UserPlatformModel.BlockUserRequestSchema} body
|
|
9
9
|
*/
|
|
10
|
+
/**
|
|
11
|
+
* @typedef BulkImportStoreFrontUsersParam
|
|
12
|
+
* @property {UserPlatformModel.CreateStoreFrontUsersPayload} body
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* @typedef CreateBulkExportUsersParam
|
|
16
|
+
* @property {UserPlatformModel.BulkUserExportSchema} body
|
|
17
|
+
*/
|
|
10
18
|
/**
|
|
11
19
|
* @typedef CreateUserParam
|
|
12
20
|
* @property {UserPlatformModel.CreateUserRequestSchema} body
|
|
@@ -48,6 +56,26 @@ export = UserPlatformApplicationValidator;
|
|
|
48
56
|
* @typedef GetActiveSessionsParam
|
|
49
57
|
* @property {string} id - ID of a customer.
|
|
50
58
|
*/
|
|
59
|
+
/**
|
|
60
|
+
* @typedef GetBulkExportUsersListParam
|
|
61
|
+
* @property {string} [pageNo] - Page number for pagination result
|
|
62
|
+
* @property {string} [pageSize] - Page size for pagination result
|
|
63
|
+
* @property {string} [fileFormat] - Filter data based on file format eg csv or xlsx
|
|
64
|
+
* @property {string} [search] - The search queries based on job name.
|
|
65
|
+
* @property {string} [startDate] - Start date
|
|
66
|
+
* @property {string} [endDate] - End date
|
|
67
|
+
* @property {string} [status] - Status of the Import Documents
|
|
68
|
+
*/
|
|
69
|
+
/**
|
|
70
|
+
* @typedef GetBulkImportUsersListParam
|
|
71
|
+
* @property {string} [pageNo] - Page number for pagination result
|
|
72
|
+
* @property {string} [pageSize] - Page size for pagination result
|
|
73
|
+
* @property {string} [search] - The search queries based on job name.
|
|
74
|
+
* @property {string} [startDate] - Start date
|
|
75
|
+
* @property {string} [endDate] - End date
|
|
76
|
+
* @property {string} [status] - Status of the Import Documents
|
|
77
|
+
* @property {string} [fileFormat] - Filter data based on file format eg csv or xlsx
|
|
78
|
+
*/
|
|
51
79
|
/**
|
|
52
80
|
* @typedef GetCustomersParam
|
|
53
81
|
* @property {string} [q] - The search query. Mobile number or email ID of a customer.
|
|
@@ -109,6 +137,11 @@ export = UserPlatformApplicationValidator;
|
|
|
109
137
|
* @property {string} [status] - To get User Groups with given status
|
|
110
138
|
* @property {number} [groupUid] - To get User Groups with given uid
|
|
111
139
|
*/
|
|
140
|
+
/**
|
|
141
|
+
* @typedef GetUsersJobByJobIdParam
|
|
142
|
+
* @property {string} jobId - The unique identifier of the job. This is used to
|
|
143
|
+
* fetch the details of the specific job.
|
|
144
|
+
*/
|
|
112
145
|
/**
|
|
113
146
|
* @typedef SearchUsersParam
|
|
114
147
|
* @property {string} [q] - The search query. Mobile number or email ID of a customer.
|
|
@@ -156,6 +189,10 @@ declare class UserPlatformApplicationValidator {
|
|
|
156
189
|
static archiveUser(): ArchiveUserParam;
|
|
157
190
|
/** @returns {BlockOrUnblockUsersParam} */
|
|
158
191
|
static blockOrUnblockUsers(): BlockOrUnblockUsersParam;
|
|
192
|
+
/** @returns {BulkImportStoreFrontUsersParam} */
|
|
193
|
+
static bulkImportStoreFrontUsers(): BulkImportStoreFrontUsersParam;
|
|
194
|
+
/** @returns {CreateBulkExportUsersParam} */
|
|
195
|
+
static createBulkExportUsers(): CreateBulkExportUsersParam;
|
|
159
196
|
/** @returns {CreateUserParam} */
|
|
160
197
|
static createUser(): CreateUserParam;
|
|
161
198
|
/** @returns {CreateUserAttributeDefinitionParam} */
|
|
@@ -174,6 +211,10 @@ declare class UserPlatformApplicationValidator {
|
|
|
174
211
|
static deleteUserAttributeDefinitionById(): DeleteUserAttributeDefinitionByIdParam;
|
|
175
212
|
/** @returns {GetActiveSessionsParam} */
|
|
176
213
|
static getActiveSessions(): GetActiveSessionsParam;
|
|
214
|
+
/** @returns {GetBulkExportUsersListParam} */
|
|
215
|
+
static getBulkExportUsersList(): GetBulkExportUsersListParam;
|
|
216
|
+
/** @returns {GetBulkImportUsersListParam} */
|
|
217
|
+
static getBulkImportUsersList(): GetBulkImportUsersListParam;
|
|
177
218
|
/** @returns {GetCustomersParam} */
|
|
178
219
|
static getCustomers(): GetCustomersParam;
|
|
179
220
|
/** @returns {GetPlatformConfigParam} */
|
|
@@ -192,6 +233,8 @@ declare class UserPlatformApplicationValidator {
|
|
|
192
233
|
static getUserGroupById(): GetUserGroupByIdParam;
|
|
193
234
|
/** @returns {GetUserGroupsParam} */
|
|
194
235
|
static getUserGroups(): GetUserGroupsParam;
|
|
236
|
+
/** @returns {GetUsersJobByJobIdParam} */
|
|
237
|
+
static getUsersJobByJobId(): GetUsersJobByJobIdParam;
|
|
195
238
|
/** @returns {SearchUsersParam} */
|
|
196
239
|
static searchUsers(): SearchUsersParam;
|
|
197
240
|
/** @returns {UnDeleteUserParam} */
|
|
@@ -210,7 +253,7 @@ declare class UserPlatformApplicationValidator {
|
|
|
210
253
|
static updateUserGroupPartially(): UpdateUserGroupPartiallyParam;
|
|
211
254
|
}
|
|
212
255
|
declare namespace UserPlatformApplicationValidator {
|
|
213
|
-
export { ArchiveUserParam, BlockOrUnblockUsersParam, CreateUserParam, CreateUserAttributeDefinitionParam, CreateUserGroupParam, CreateUserSessionParam, DeleteActiveSessionsParam, DeleteSessionParam, DeleteUserAttributeParam, DeleteUserAttributeDefinitionByIdParam, GetActiveSessionsParam, GetCustomersParam, GetPlatformConfigParam, GetUserAttributeParam, GetUserAttributeByIdParam, GetUserAttributeDefinitionByIdParam, GetUserAttributeDefinitionsParam, GetUserAttributesForUserParam, GetUserGroupByIdParam, GetUserGroupsParam, SearchUsersParam, UnDeleteUserParam, UpdatePlatformConfigParam, UpdateUserParam, UpdateUserAttributeParam, UpdateUserAttributeDefinitionParam, UpdateUserGroupParam, UpdateUserGroupPartiallyParam };
|
|
256
|
+
export { ArchiveUserParam, BlockOrUnblockUsersParam, BulkImportStoreFrontUsersParam, CreateBulkExportUsersParam, CreateUserParam, CreateUserAttributeDefinitionParam, CreateUserGroupParam, CreateUserSessionParam, DeleteActiveSessionsParam, DeleteSessionParam, DeleteUserAttributeParam, DeleteUserAttributeDefinitionByIdParam, GetActiveSessionsParam, GetBulkExportUsersListParam, GetBulkImportUsersListParam, GetCustomersParam, GetPlatformConfigParam, GetUserAttributeParam, GetUserAttributeByIdParam, GetUserAttributeDefinitionByIdParam, GetUserAttributeDefinitionsParam, GetUserAttributesForUserParam, GetUserGroupByIdParam, GetUserGroupsParam, GetUsersJobByJobIdParam, SearchUsersParam, UnDeleteUserParam, UpdatePlatformConfigParam, UpdateUserParam, UpdateUserAttributeParam, UpdateUserAttributeDefinitionParam, UpdateUserGroupParam, UpdateUserGroupPartiallyParam };
|
|
214
257
|
}
|
|
215
258
|
type ArchiveUserParam = {
|
|
216
259
|
body: UserPlatformModel.ArchiveUserRequestSchema;
|
|
@@ -218,6 +261,12 @@ type ArchiveUserParam = {
|
|
|
218
261
|
type BlockOrUnblockUsersParam = {
|
|
219
262
|
body: UserPlatformModel.BlockUserRequestSchema;
|
|
220
263
|
};
|
|
264
|
+
type BulkImportStoreFrontUsersParam = {
|
|
265
|
+
body: UserPlatformModel.CreateStoreFrontUsersPayload;
|
|
266
|
+
};
|
|
267
|
+
type CreateBulkExportUsersParam = {
|
|
268
|
+
body: UserPlatformModel.BulkUserExportSchema;
|
|
269
|
+
};
|
|
221
270
|
type CreateUserParam = {
|
|
222
271
|
body: UserPlatformModel.CreateUserRequestSchema;
|
|
223
272
|
};
|
|
@@ -277,6 +326,66 @@ type GetActiveSessionsParam = {
|
|
|
277
326
|
*/
|
|
278
327
|
id: string;
|
|
279
328
|
};
|
|
329
|
+
type GetBulkExportUsersListParam = {
|
|
330
|
+
/**
|
|
331
|
+
* - Page number for pagination result
|
|
332
|
+
*/
|
|
333
|
+
pageNo?: string;
|
|
334
|
+
/**
|
|
335
|
+
* - Page size for pagination result
|
|
336
|
+
*/
|
|
337
|
+
pageSize?: string;
|
|
338
|
+
/**
|
|
339
|
+
* - Filter data based on file format eg csv or xlsx
|
|
340
|
+
*/
|
|
341
|
+
fileFormat?: string;
|
|
342
|
+
/**
|
|
343
|
+
* - The search queries based on job name.
|
|
344
|
+
*/
|
|
345
|
+
search?: string;
|
|
346
|
+
/**
|
|
347
|
+
* - Start date
|
|
348
|
+
*/
|
|
349
|
+
startDate?: string;
|
|
350
|
+
/**
|
|
351
|
+
* - End date
|
|
352
|
+
*/
|
|
353
|
+
endDate?: string;
|
|
354
|
+
/**
|
|
355
|
+
* - Status of the Import Documents
|
|
356
|
+
*/
|
|
357
|
+
status?: string;
|
|
358
|
+
};
|
|
359
|
+
type GetBulkImportUsersListParam = {
|
|
360
|
+
/**
|
|
361
|
+
* - Page number for pagination result
|
|
362
|
+
*/
|
|
363
|
+
pageNo?: string;
|
|
364
|
+
/**
|
|
365
|
+
* - Page size for pagination result
|
|
366
|
+
*/
|
|
367
|
+
pageSize?: string;
|
|
368
|
+
/**
|
|
369
|
+
* - The search queries based on job name.
|
|
370
|
+
*/
|
|
371
|
+
search?: string;
|
|
372
|
+
/**
|
|
373
|
+
* - Start date
|
|
374
|
+
*/
|
|
375
|
+
startDate?: string;
|
|
376
|
+
/**
|
|
377
|
+
* - End date
|
|
378
|
+
*/
|
|
379
|
+
endDate?: string;
|
|
380
|
+
/**
|
|
381
|
+
* - Status of the Import Documents
|
|
382
|
+
*/
|
|
383
|
+
status?: string;
|
|
384
|
+
/**
|
|
385
|
+
* - Filter data based on file format eg csv or xlsx
|
|
386
|
+
*/
|
|
387
|
+
fileFormat?: string;
|
|
388
|
+
};
|
|
280
389
|
type GetCustomersParam = {
|
|
281
390
|
/**
|
|
282
391
|
* - The search query. Mobile number or email ID of a customer.
|
|
@@ -413,6 +522,13 @@ type GetUserGroupsParam = {
|
|
|
413
522
|
*/
|
|
414
523
|
groupUid?: number;
|
|
415
524
|
};
|
|
525
|
+
type GetUsersJobByJobIdParam = {
|
|
526
|
+
/**
|
|
527
|
+
* - The unique identifier of the job. This is used to
|
|
528
|
+
* fetch the details of the specific job.
|
|
529
|
+
*/
|
|
530
|
+
jobId: string;
|
|
531
|
+
};
|
|
416
532
|
type SearchUsersParam = {
|
|
417
533
|
/**
|
|
418
534
|
* - The search query. Mobile number or email ID of a customer.
|