edge-impulse-api 1.69.7 → 1.69.9
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/build/library/sdk/api/adminApi.d.ts +20 -0
- package/build/library/sdk/api/adminApi.js +148 -0
- package/build/library/sdk/api/adminApi.js.map +1 -1
- package/build/library/sdk/api/classifyApi.d.ts +12 -0
- package/build/library/sdk/api/classifyApi.js +24 -0
- package/build/library/sdk/api/classifyApi.js.map +1 -1
- package/build/library/sdk/api/dSPApi.d.ts +4 -0
- package/build/library/sdk/api/dSPApi.js +8 -0
- package/build/library/sdk/api/dSPApi.js.map +1 -1
- package/build/library/sdk/api/rawDataApi.d.ts +8 -0
- package/build/library/sdk/api/rawDataApi.js +16 -0
- package/build/library/sdk/api/rawDataApi.js.map +1 -1
- package/package.json +1 -1
|
@@ -1067,6 +1067,26 @@ export declare class AdminApi {
|
|
|
1067
1067
|
[name: string]: string;
|
|
1068
1068
|
};
|
|
1069
1069
|
}): Promise<GenericApiResponse>;
|
|
1070
|
+
/**
|
|
1071
|
+
* Admin-only API to restore a soft-deleted project. A soft-deleted project has been marked as deleted in the database but data has not been moved to the trash bin yet. To restore projects from the trash bin, use adminRestoreTrashbinProject.
|
|
1072
|
+
* @summary Restore a soft-deleted project
|
|
1073
|
+
* @param projectId Project ID
|
|
1074
|
+
*/
|
|
1075
|
+
adminRestoreProject(projectId: number, options?: {
|
|
1076
|
+
headers: {
|
|
1077
|
+
[name: string]: string;
|
|
1078
|
+
};
|
|
1079
|
+
}): Promise<GenericApiResponse>;
|
|
1080
|
+
/**
|
|
1081
|
+
* Starts a job to restore a project that has been moved to the trash bin. This: 1. Restores all S3 data 2. Restores all FSx data 3. Restores access to the project 4. Unschedules permanent deletion
|
|
1082
|
+
* @summary Restore a project that has been moved to the trash bin and is scheduled for deletion
|
|
1083
|
+
* @param projectId Project ID
|
|
1084
|
+
*/
|
|
1085
|
+
adminRestoreTrashbinProject(projectId: number, options?: {
|
|
1086
|
+
headers: {
|
|
1087
|
+
[name: string]: string;
|
|
1088
|
+
};
|
|
1089
|
+
}): Promise<StartJobResponse>;
|
|
1070
1090
|
/**
|
|
1071
1091
|
* Admin-only API to update a studio config item.
|
|
1072
1092
|
* @summary Update studio config
|
|
@@ -6088,6 +6088,154 @@ class AdminApi {
|
|
|
6088
6088
|
});
|
|
6089
6089
|
});
|
|
6090
6090
|
}
|
|
6091
|
+
/**
|
|
6092
|
+
* Admin-only API to restore a soft-deleted project. A soft-deleted project has been marked as deleted in the database but data has not been moved to the trash bin yet. To restore projects from the trash bin, use adminRestoreTrashbinProject.
|
|
6093
|
+
* @summary Restore a soft-deleted project
|
|
6094
|
+
* @param projectId Project ID
|
|
6095
|
+
*/
|
|
6096
|
+
async adminRestoreProject(projectId, options = { headers: {} }) {
|
|
6097
|
+
const localVarPath = this.basePath + '/api/admin/projects/{projectId}/restore'
|
|
6098
|
+
.replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)));
|
|
6099
|
+
let localVarQueryParameters = {};
|
|
6100
|
+
let localVarHeaderParams = Object.assign({
|
|
6101
|
+
'User-Agent': 'edgeimpulse-api nodejs'
|
|
6102
|
+
}, this.defaultHeaders);
|
|
6103
|
+
const produces = ['application/json'];
|
|
6104
|
+
// give precedence to 'application/json'
|
|
6105
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
6106
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
6107
|
+
}
|
|
6108
|
+
else {
|
|
6109
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
6110
|
+
}
|
|
6111
|
+
let localVarFormParams = {};
|
|
6112
|
+
// verify required parameter 'projectId' is not null or undefined
|
|
6113
|
+
if (projectId === null || projectId === undefined) {
|
|
6114
|
+
throw new Error('Required parameter projectId was null or undefined when calling adminRestoreProject.');
|
|
6115
|
+
}
|
|
6116
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
6117
|
+
Object.assign(localVarHeaderParams, this.opts.extraHeaders);
|
|
6118
|
+
let localVarUseFormData = false;
|
|
6119
|
+
let localVarRequestOptions = {
|
|
6120
|
+
method: 'POST',
|
|
6121
|
+
qs: localVarQueryParameters,
|
|
6122
|
+
headers: localVarHeaderParams,
|
|
6123
|
+
uri: localVarPath,
|
|
6124
|
+
useQuerystring: this._useQuerystring,
|
|
6125
|
+
agentOptions: { keepAlive: false },
|
|
6126
|
+
json: true,
|
|
6127
|
+
};
|
|
6128
|
+
let authenticationPromise = Promise.resolve();
|
|
6129
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
|
|
6130
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
|
|
6131
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
|
|
6132
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
6133
|
+
return authenticationPromise.then(() => {
|
|
6134
|
+
if (Object.keys(localVarFormParams).length) {
|
|
6135
|
+
if (localVarUseFormData) {
|
|
6136
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
6137
|
+
}
|
|
6138
|
+
else {
|
|
6139
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
6140
|
+
}
|
|
6141
|
+
}
|
|
6142
|
+
return new Promise((resolve, reject) => {
|
|
6143
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
6144
|
+
if (error) {
|
|
6145
|
+
reject(error);
|
|
6146
|
+
}
|
|
6147
|
+
else {
|
|
6148
|
+
body = models_1.ObjectSerializer.deserialize(body, "GenericApiResponse");
|
|
6149
|
+
if (typeof body.success === 'boolean' && !body.success) {
|
|
6150
|
+
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
6151
|
+
reject(new Error(body.error || errString));
|
|
6152
|
+
}
|
|
6153
|
+
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
6154
|
+
resolve(body);
|
|
6155
|
+
}
|
|
6156
|
+
else {
|
|
6157
|
+
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
6158
|
+
reject(errString);
|
|
6159
|
+
}
|
|
6160
|
+
}
|
|
6161
|
+
});
|
|
6162
|
+
});
|
|
6163
|
+
});
|
|
6164
|
+
}
|
|
6165
|
+
/**
|
|
6166
|
+
* Starts a job to restore a project that has been moved to the trash bin. This: 1. Restores all S3 data 2. Restores all FSx data 3. Restores access to the project 4. Unschedules permanent deletion
|
|
6167
|
+
* @summary Restore a project that has been moved to the trash bin and is scheduled for deletion
|
|
6168
|
+
* @param projectId Project ID
|
|
6169
|
+
*/
|
|
6170
|
+
async adminRestoreTrashbinProject(projectId, options = { headers: {} }) {
|
|
6171
|
+
const localVarPath = this.basePath + '/api/admin/trashbin/projects/{projectId}/restore'
|
|
6172
|
+
.replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)));
|
|
6173
|
+
let localVarQueryParameters = {};
|
|
6174
|
+
let localVarHeaderParams = Object.assign({
|
|
6175
|
+
'User-Agent': 'edgeimpulse-api nodejs'
|
|
6176
|
+
}, this.defaultHeaders);
|
|
6177
|
+
const produces = ['application/json'];
|
|
6178
|
+
// give precedence to 'application/json'
|
|
6179
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
6180
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
6181
|
+
}
|
|
6182
|
+
else {
|
|
6183
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
6184
|
+
}
|
|
6185
|
+
let localVarFormParams = {};
|
|
6186
|
+
// verify required parameter 'projectId' is not null or undefined
|
|
6187
|
+
if (projectId === null || projectId === undefined) {
|
|
6188
|
+
throw new Error('Required parameter projectId was null or undefined when calling adminRestoreTrashbinProject.');
|
|
6189
|
+
}
|
|
6190
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
6191
|
+
Object.assign(localVarHeaderParams, this.opts.extraHeaders);
|
|
6192
|
+
let localVarUseFormData = false;
|
|
6193
|
+
let localVarRequestOptions = {
|
|
6194
|
+
method: 'POST',
|
|
6195
|
+
qs: localVarQueryParameters,
|
|
6196
|
+
headers: localVarHeaderParams,
|
|
6197
|
+
uri: localVarPath,
|
|
6198
|
+
useQuerystring: this._useQuerystring,
|
|
6199
|
+
agentOptions: { keepAlive: false },
|
|
6200
|
+
json: true,
|
|
6201
|
+
};
|
|
6202
|
+
let authenticationPromise = Promise.resolve();
|
|
6203
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
|
|
6204
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
|
|
6205
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
|
|
6206
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
6207
|
+
return authenticationPromise.then(() => {
|
|
6208
|
+
if (Object.keys(localVarFormParams).length) {
|
|
6209
|
+
if (localVarUseFormData) {
|
|
6210
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
6211
|
+
}
|
|
6212
|
+
else {
|
|
6213
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
6214
|
+
}
|
|
6215
|
+
}
|
|
6216
|
+
return new Promise((resolve, reject) => {
|
|
6217
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
6218
|
+
if (error) {
|
|
6219
|
+
reject(error);
|
|
6220
|
+
}
|
|
6221
|
+
else {
|
|
6222
|
+
body = models_1.ObjectSerializer.deserialize(body, "StartJobResponse");
|
|
6223
|
+
if (typeof body.success === 'boolean' && !body.success) {
|
|
6224
|
+
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
6225
|
+
reject(new Error(body.error || errString));
|
|
6226
|
+
}
|
|
6227
|
+
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
6228
|
+
resolve(body);
|
|
6229
|
+
}
|
|
6230
|
+
else {
|
|
6231
|
+
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
6232
|
+
reject(errString);
|
|
6233
|
+
}
|
|
6234
|
+
}
|
|
6235
|
+
});
|
|
6236
|
+
});
|
|
6237
|
+
});
|
|
6238
|
+
}
|
|
6091
6239
|
/**
|
|
6092
6240
|
* Admin-only API to update a studio config item.
|
|
6093
6241
|
* @summary Update studio config
|