edge-impulse-api 1.66.22 → 1.66.24
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.
|
@@ -86,6 +86,7 @@ type adminDeleteProjectQueryParams = {
|
|
|
86
86
|
};
|
|
87
87
|
type adminDeleteUserQueryParams = {
|
|
88
88
|
fullDeletion?: boolean;
|
|
89
|
+
skipUserNotification?: boolean;
|
|
89
90
|
};
|
|
90
91
|
type adminFindUserQueryParams = {
|
|
91
92
|
query: string;
|
|
@@ -153,6 +154,14 @@ type adminGetTrashbinQueryParams = {
|
|
|
153
154
|
offset?: number;
|
|
154
155
|
search?: string;
|
|
155
156
|
};
|
|
157
|
+
type adminGetTrashbinJobsQueryParams = {
|
|
158
|
+
startDate?: Date;
|
|
159
|
+
endDate?: Date;
|
|
160
|
+
limit?: number;
|
|
161
|
+
offset?: number;
|
|
162
|
+
sort?: string;
|
|
163
|
+
key?: string;
|
|
164
|
+
};
|
|
156
165
|
type adminGetUserJobsQueryParams = {
|
|
157
166
|
limit?: number;
|
|
158
167
|
offset?: number;
|
|
@@ -433,6 +442,7 @@ export declare class AdminApi {
|
|
|
433
442
|
* @summary Delete a user
|
|
434
443
|
* @param userId User ID
|
|
435
444
|
* @param fullDeletion Set to true to schedule permanent deletion
|
|
445
|
+
* @param skipUserNotification If set to true, skips sending email notifications to users about their account/entity deletion. This is typically used for maintenance activities where notification is not needed or desired.
|
|
436
446
|
*/
|
|
437
447
|
adminDeleteUser(userId: number, queryParams?: adminDeleteUserQueryParams, options?: {
|
|
438
448
|
headers: {
|
|
@@ -806,6 +816,21 @@ export declare class AdminApi {
|
|
|
806
816
|
[name: string]: string;
|
|
807
817
|
};
|
|
808
818
|
}): Promise<AdminGetTrashBinResponse>;
|
|
819
|
+
/**
|
|
820
|
+
* Admin-only API to retrieve a paginated list of trash bin related jobs. Jobs can be filtered by job key The response is paginated and can be controlled using: - limit: Maximum number of jobs to return - offset: Number of jobs to skip Results are ordered by creation date (newest first), or custom sort. Note: This endpoint requires admin:jobs:read permission.
|
|
821
|
+
* @summary Get a list of trash bin related jobs
|
|
822
|
+
* @param startDate Start date
|
|
823
|
+
* @param endDate End date
|
|
824
|
+
* @param limit Maximum number of results
|
|
825
|
+
* @param offset Offset in results, can be used in conjunction with LimitResultsParameter to implement paging.
|
|
826
|
+
* @param sort Fields and order to sort query by
|
|
827
|
+
* @param key Job key to filter on
|
|
828
|
+
*/
|
|
829
|
+
adminGetTrashbinJobs(queryParams?: adminGetTrashbinJobsQueryParams, options?: {
|
|
830
|
+
headers: {
|
|
831
|
+
[name: string]: string;
|
|
832
|
+
};
|
|
833
|
+
}): Promise<ListJobsResponse>;
|
|
809
834
|
/**
|
|
810
835
|
* Admin-only API to get a specific enterprise trial.
|
|
811
836
|
* @summary Get enterprise trial
|
|
@@ -1688,6 +1688,7 @@ class AdminApi {
|
|
|
1688
1688
|
* @summary Delete a user
|
|
1689
1689
|
* @param userId User ID
|
|
1690
1690
|
* @param fullDeletion Set to true to schedule permanent deletion
|
|
1691
|
+
* @param skipUserNotification If set to true, skips sending email notifications to users about their account/entity deletion. This is typically used for maintenance activities where notification is not needed or desired.
|
|
1691
1692
|
*/
|
|
1692
1693
|
async adminDeleteUser(userId, queryParams, options = { headers: {} }) {
|
|
1693
1694
|
const localVarPath = this.basePath + '/api/admin/users/{userId}'
|
|
@@ -1712,6 +1713,9 @@ class AdminApi {
|
|
|
1712
1713
|
if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.fullDeletion) !== undefined) {
|
|
1713
1714
|
localVarQueryParameters['fullDeletion'] = models_1.ObjectSerializer.serialize(queryParams.fullDeletion, "boolean");
|
|
1714
1715
|
}
|
|
1716
|
+
if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.skipUserNotification) !== undefined) {
|
|
1717
|
+
localVarQueryParameters['skipUserNotification'] = models_1.ObjectSerializer.serialize(queryParams.skipUserNotification, "boolean");
|
|
1718
|
+
}
|
|
1715
1719
|
Object.assign(localVarHeaderParams, options.headers);
|
|
1716
1720
|
Object.assign(localVarHeaderParams, this.opts.extraHeaders);
|
|
1717
1721
|
let localVarUseFormData = false;
|
|
@@ -4342,6 +4346,97 @@ class AdminApi {
|
|
|
4342
4346
|
});
|
|
4343
4347
|
});
|
|
4344
4348
|
}
|
|
4349
|
+
/**
|
|
4350
|
+
* Admin-only API to retrieve a paginated list of trash bin related jobs. Jobs can be filtered by job key The response is paginated and can be controlled using: - limit: Maximum number of jobs to return - offset: Number of jobs to skip Results are ordered by creation date (newest first), or custom sort. Note: This endpoint requires admin:jobs:read permission.
|
|
4351
|
+
* @summary Get a list of trash bin related jobs
|
|
4352
|
+
* @param startDate Start date
|
|
4353
|
+
* @param endDate End date
|
|
4354
|
+
* @param limit Maximum number of results
|
|
4355
|
+
* @param offset Offset in results, can be used in conjunction with LimitResultsParameter to implement paging.
|
|
4356
|
+
* @param sort Fields and order to sort query by
|
|
4357
|
+
* @param key Job key to filter on
|
|
4358
|
+
*/
|
|
4359
|
+
async adminGetTrashbinJobs(queryParams, options = { headers: {} }) {
|
|
4360
|
+
const localVarPath = this.basePath + '/api/admin/trashbin/jobs';
|
|
4361
|
+
let localVarQueryParameters = {};
|
|
4362
|
+
let localVarHeaderParams = Object.assign({
|
|
4363
|
+
'User-Agent': 'edgeimpulse-api nodejs'
|
|
4364
|
+
}, this.defaultHeaders);
|
|
4365
|
+
const produces = ['application/json'];
|
|
4366
|
+
// give precedence to 'application/json'
|
|
4367
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
4368
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
4369
|
+
}
|
|
4370
|
+
else {
|
|
4371
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
4372
|
+
}
|
|
4373
|
+
let localVarFormParams = {};
|
|
4374
|
+
if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.startDate) !== undefined) {
|
|
4375
|
+
localVarQueryParameters['startDate'] = models_1.ObjectSerializer.serialize(queryParams.startDate, "Date");
|
|
4376
|
+
}
|
|
4377
|
+
if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.endDate) !== undefined) {
|
|
4378
|
+
localVarQueryParameters['endDate'] = models_1.ObjectSerializer.serialize(queryParams.endDate, "Date");
|
|
4379
|
+
}
|
|
4380
|
+
if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.limit) !== undefined) {
|
|
4381
|
+
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(queryParams.limit, "number");
|
|
4382
|
+
}
|
|
4383
|
+
if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.offset) !== undefined) {
|
|
4384
|
+
localVarQueryParameters['offset'] = models_1.ObjectSerializer.serialize(queryParams.offset, "number");
|
|
4385
|
+
}
|
|
4386
|
+
if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.sort) !== undefined) {
|
|
4387
|
+
localVarQueryParameters['sort'] = models_1.ObjectSerializer.serialize(queryParams.sort, "string");
|
|
4388
|
+
}
|
|
4389
|
+
if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.key) !== undefined) {
|
|
4390
|
+
localVarQueryParameters['key'] = models_1.ObjectSerializer.serialize(queryParams.key, "string");
|
|
4391
|
+
}
|
|
4392
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
4393
|
+
Object.assign(localVarHeaderParams, this.opts.extraHeaders);
|
|
4394
|
+
let localVarUseFormData = false;
|
|
4395
|
+
let localVarRequestOptions = {
|
|
4396
|
+
method: 'GET',
|
|
4397
|
+
qs: localVarQueryParameters,
|
|
4398
|
+
headers: localVarHeaderParams,
|
|
4399
|
+
uri: localVarPath,
|
|
4400
|
+
useQuerystring: this._useQuerystring,
|
|
4401
|
+
agentOptions: { keepAlive: false },
|
|
4402
|
+
json: true,
|
|
4403
|
+
};
|
|
4404
|
+
let authenticationPromise = Promise.resolve();
|
|
4405
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
|
|
4406
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
|
|
4407
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
|
|
4408
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
4409
|
+
return authenticationPromise.then(() => {
|
|
4410
|
+
if (Object.keys(localVarFormParams).length) {
|
|
4411
|
+
if (localVarUseFormData) {
|
|
4412
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
4413
|
+
}
|
|
4414
|
+
else {
|
|
4415
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
4416
|
+
}
|
|
4417
|
+
}
|
|
4418
|
+
return new Promise((resolve, reject) => {
|
|
4419
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
4420
|
+
if (error) {
|
|
4421
|
+
reject(error);
|
|
4422
|
+
}
|
|
4423
|
+
else {
|
|
4424
|
+
body = models_1.ObjectSerializer.deserialize(body, "ListJobsResponse");
|
|
4425
|
+
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
4426
|
+
if (typeof body.success === 'boolean' && !body.success) {
|
|
4427
|
+
reject(new Error(body.error || errString));
|
|
4428
|
+
}
|
|
4429
|
+
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
4430
|
+
resolve(body);
|
|
4431
|
+
}
|
|
4432
|
+
else {
|
|
4433
|
+
reject(errString);
|
|
4434
|
+
}
|
|
4435
|
+
}
|
|
4436
|
+
});
|
|
4437
|
+
});
|
|
4438
|
+
});
|
|
4439
|
+
}
|
|
4345
4440
|
/**
|
|
4346
4441
|
* Admin-only API to get a specific enterprise trial.
|
|
4347
4442
|
* @summary Get enterprise trial
|