edge-impulse-linux 1.11.0 → 1.12.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/build/cli/linux/runner.js +31 -4
- package/build/cli/linux/runner.js.map +1 -1
- package/build/cli-common/aws-iotcore-connector.d.ts +97 -6
- package/build/cli-common/aws-iotcore-connector.js +952 -61
- package/build/cli-common/aws-iotcore-connector.js.map +1 -1
- package/build/cli-common/init-cli-app.js +5 -3
- package/build/cli-common/init-cli-app.js.map +1 -1
- package/build/sdk/studio/sdk/api/adminApi.d.ts +162 -8
- package/build/sdk/studio/sdk/api/adminApi.js +874 -7
- package/build/sdk/studio/sdk/api/adminApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/learnApi.d.ts +5 -1
- package/build/sdk/studio/sdk/api/learnApi.js +5 -1
- package/build/sdk/studio/sdk/api/learnApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/organizationBlocksApi.d.ts +6 -10
- package/build/sdk/studio/sdk/api/organizationBlocksApi.js +5 -5
- package/build/sdk/studio/sdk/api/organizationBlocksApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/organizationDataApi.d.ts +3 -2
- package/build/sdk/studio/sdk/api/organizationDataApi.js +2 -2
- package/build/sdk/studio/sdk/api/organizationDataApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/organizationPipelinesApi.d.ts +2 -2
- package/build/sdk/studio/sdk/api/organizationPipelinesApi.js +1 -1
- package/build/sdk/studio/sdk/api/organizationPipelinesApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/organizationsApi.d.ts +11 -10
- package/build/sdk/studio/sdk/api/organizationsApi.js +8 -8
- package/build/sdk/studio/sdk/api/organizationsApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/projectsApi.d.ts +6 -5
- package/build/sdk/studio/sdk/api/projectsApi.js +4 -4
- package/build/sdk/studio/sdk/api/projectsApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/rawDataApi.d.ts +42 -2
- package/build/sdk/studio/sdk/api/rawDataApi.js +82 -2
- package/build/sdk/studio/sdk/api/rawDataApi.js.map +1 -1
- package/build/sdk/studio/sdk/model/addApiKeyRequest.d.ts +2 -2
- package/build/sdk/studio/sdk/model/{addOrganizationSecretResponse.d.ts → addApiKeyResponse.d.ts} +6 -2
- package/build/sdk/studio/sdk/model/{createPipelineResponse.js → addApiKeyResponse.js} +12 -7
- package/build/sdk/studio/sdk/model/addApiKeyResponse.js.map +1 -0
- package/build/sdk/studio/sdk/model/{addOrganizationSecretResponseAllOf.d.ts → addApiKeyResponseAllOf.d.ts} +6 -2
- package/build/sdk/studio/sdk/model/{addOrganizationSecretResponseAllOf.js → addApiKeyResponseAllOf.js} +12 -7
- package/build/sdk/studio/sdk/model/addApiKeyResponseAllOf.js.map +1 -0
- package/build/sdk/studio/sdk/model/addOrganizationApiKeyRequest.d.ts +2 -2
- package/build/sdk/studio/sdk/model/addProjectApiKeyRequest.d.ts +2 -2
- package/build/sdk/studio/sdk/model/adminAddOrganizationApiKeyRequest.d.ts +2 -2
- package/build/sdk/studio/sdk/model/adminAddProjectApiKeyRequest.d.ts +2 -2
- package/build/sdk/studio/sdk/model/adminApiOrganization.d.ts +4 -0
- package/build/sdk/studio/sdk/model/adminApiOrganization.js +5 -0
- package/build/sdk/studio/sdk/model/adminApiOrganization.js.map +1 -1
- package/build/sdk/studio/sdk/model/adminApiProject.d.ts +1 -0
- package/build/sdk/studio/sdk/model/adminApiProject.js +5 -0
- package/build/sdk/studio/sdk/model/adminApiProject.js.map +1 -1
- package/build/sdk/studio/sdk/model/{addOrganizationTransferLearningBlockResponse.d.ts → adminGetTrashBinResponse.d.ts} +7 -2
- package/build/sdk/studio/sdk/model/{addOrganizationSecretResponse.js → adminGetTrashBinResponse.js} +14 -9
- package/build/sdk/studio/sdk/model/adminGetTrashBinResponse.js.map +1 -0
- package/build/sdk/studio/sdk/model/adminGetTrashBinResponseAllOf.d.ts +33 -0
- package/build/sdk/studio/sdk/model/adminGetTrashBinResponseAllOf.js +37 -0
- package/build/sdk/studio/sdk/model/adminGetTrashBinResponseAllOf.js.map +1 -0
- package/build/sdk/studio/sdk/model/adminGetUsersResponseAllOfUsers.d.ts +1 -0
- package/build/sdk/studio/sdk/model/adminGetUsersResponseAllOfUsers.js +5 -0
- package/build/sdk/studio/sdk/model/adminGetUsersResponseAllOfUsers.js.map +1 -1
- package/build/sdk/studio/sdk/model/{addOrganizationDeployBlockResponse.d.ts → adminProjectInfoResponse.d.ts} +3 -2
- package/build/sdk/studio/sdk/model/{createAIActionResponse.js → adminProjectInfoResponse.js} +10 -10
- package/build/sdk/studio/sdk/model/adminProjectInfoResponse.js.map +1 -0
- package/build/sdk/studio/sdk/model/{dspRunResponseAllOfPerformance.d.ts → adminProjectInfoResponseAllOf.d.ts} +3 -3
- package/build/sdk/studio/sdk/model/adminProjectInfoResponseAllOf.js +29 -0
- package/build/sdk/studio/sdk/model/adminProjectInfoResponseAllOf.js.map +1 -0
- package/build/sdk/studio/sdk/model/createEnterpriseTrialResponse.d.ts +2 -2
- package/build/sdk/studio/sdk/model/dSPConfig.d.ts +1 -1
- package/build/sdk/studio/sdk/model/dSPConfigResponse.d.ts +1 -1
- package/build/sdk/studio/sdk/model/dSPInfo.d.ts +2 -2
- package/build/sdk/studio/sdk/model/dSPInfo.js +1 -1
- package/build/sdk/studio/sdk/model/dSPInfo.js.map +1 -1
- package/build/sdk/studio/sdk/model/deploymentTarget.d.ts +4 -0
- package/build/sdk/studio/sdk/model/deploymentTarget.js +5 -0
- package/build/sdk/studio/sdk/model/deploymentTarget.js.map +1 -1
- package/build/sdk/studio/sdk/model/deploymentTargetEngine.d.ts +1 -1
- package/build/sdk/studio/sdk/model/deploymentTargetEngine.js +1 -1
- package/build/sdk/studio/sdk/model/deploymentTargetEngine.js.map +1 -1
- package/build/sdk/studio/sdk/model/{addOrganizationDspBlockResponse.d.ts → dspPerformance.d.ts} +5 -8
- package/build/sdk/studio/sdk/model/{dspRunResponseAllOfPerformance.js → dspPerformance.js} +12 -7
- package/build/sdk/studio/sdk/model/dspPerformance.js.map +1 -0
- package/build/sdk/studio/sdk/model/dspRunResponse.d.ts +2 -2
- package/build/sdk/studio/sdk/model/dspRunResponse.js +1 -1
- package/build/sdk/studio/sdk/model/dspRunResponse.js.map +1 -1
- package/build/sdk/studio/sdk/model/dspRunResponseAllOf.d.ts +2 -2
- package/build/sdk/studio/sdk/model/dspRunResponseAllOf.js +1 -1
- package/build/sdk/studio/sdk/model/dspRunResponseAllOf.js.map +1 -1
- package/build/sdk/studio/sdk/model/dspRunResponseWithSample.d.ts +2 -2
- package/build/sdk/studio/sdk/model/dspRunResponseWithSample.js +1 -1
- package/build/sdk/studio/sdk/model/dspRunResponseWithSample.js.map +1 -1
- package/build/sdk/studio/sdk/model/dspRunResponseWithSampleAllOf.d.ts +2 -2
- package/build/sdk/studio/sdk/model/dspRunResponseWithSampleAllOf.js +1 -1
- package/build/sdk/studio/sdk/model/dspRunResponseWithSampleAllOf.js.map +1 -1
- package/build/sdk/studio/sdk/model/entityCreatedResponse.d.ts +2 -2
- package/build/sdk/studio/sdk/model/entityCreatedResponseAllOf.d.ts +2 -2
- package/build/sdk/studio/sdk/model/feature.d.ts +1 -1
- package/build/sdk/studio/sdk/model/feature.js +1 -1
- package/build/sdk/studio/sdk/model/feature.js.map +1 -1
- package/build/sdk/studio/sdk/model/findSyntiantPosteriorRequest.d.ts +1 -1
- package/build/sdk/studio/sdk/model/findSyntiantPosteriorRequest.js +1 -1
- package/build/sdk/studio/sdk/model/findSyntiantPosteriorRequest.js.map +1 -1
- package/build/sdk/studio/sdk/model/models.d.ts +11 -11
- package/build/sdk/studio/sdk/model/models.js +36 -33
- package/build/sdk/studio/sdk/model/models.js.map +1 -1
- package/build/sdk/studio/sdk/model/objectDetectionLabelQueueResponse.d.ts +2 -2
- package/build/sdk/studio/sdk/model/objectDetectionLabelQueueResponse.js +1 -1
- package/build/sdk/studio/sdk/model/objectDetectionLabelQueueResponse.js.map +1 -1
- package/build/sdk/studio/sdk/model/objectDetectionLabelQueueResponseAllOf.d.ts +2 -2
- package/build/sdk/studio/sdk/model/objectDetectionLabelQueueResponseAllOf.js +1 -1
- package/build/sdk/studio/sdk/model/objectDetectionLabelQueueResponseAllOf.js.map +1 -1
- package/build/sdk/studio/sdk/model/{addOrganizationTransformationBlockResponseAllOf.d.ts → objectDetectionLabelQueueResponseAllOfSamples.d.ts} +1 -1
- package/build/sdk/studio/sdk/model/{addOrganizationTransformationBlockResponseAllOf.js → objectDetectionLabelQueueResponseAllOfSamples.js} +7 -7
- package/build/sdk/studio/sdk/model/objectDetectionLabelQueueResponseAllOfSamples.js.map +1 -0
- package/build/sdk/studio/sdk/model/optimizeConfig.d.ts +13 -2
- package/build/sdk/studio/sdk/model/optimizeConfig.js +16 -1
- package/build/sdk/studio/sdk/model/optimizeConfig.js.map +1 -1
- package/build/sdk/studio/sdk/model/{createAIActionResponse.d.ts → optimizeConfigOptimizationObjectives.d.ts} +9 -6
- package/build/sdk/studio/sdk/model/optimizeConfigOptimizationObjectives.js +39 -0
- package/build/sdk/studio/sdk/model/optimizeConfigOptimizationObjectives.js.map +1 -0
- package/build/sdk/studio/sdk/model/optimizeConfigResponse.d.ts +13 -2
- package/build/sdk/studio/sdk/model/optimizeConfigResponse.js +16 -1
- package/build/sdk/studio/sdk/model/optimizeConfigResponse.js.map +1 -1
- package/build/sdk/studio/sdk/model/optimizeConfigSearchSpaceSource.d.ts +45 -0
- package/build/sdk/studio/sdk/model/optimizeConfigSearchSpaceSource.js +48 -0
- package/build/sdk/studio/sdk/model/optimizeConfigSearchSpaceSource.js.map +1 -0
- package/build/sdk/studio/sdk/model/optimizeStateResponse.d.ts +6 -0
- package/build/sdk/studio/sdk/model/optimizeStateResponse.js +7 -1
- package/build/sdk/studio/sdk/model/optimizeStateResponse.js.map +1 -1
- package/build/sdk/studio/sdk/model/optimizeStateResponseAllOf.d.ts +6 -0
- package/build/sdk/studio/sdk/model/optimizeStateResponseAllOf.js +7 -1
- package/build/sdk/studio/sdk/model/optimizeStateResponseAllOf.js.map +1 -1
- package/build/sdk/studio/sdk/model/organization.d.ts +4 -0
- package/build/sdk/studio/sdk/model/organization.js +5 -0
- package/build/sdk/studio/sdk/model/organization.js.map +1 -1
- package/build/sdk/studio/sdk/model/permission.d.ts +1 -1
- package/build/sdk/studio/sdk/model/permission.js +1 -1
- package/build/sdk/studio/sdk/model/permission.js.map +1 -1
- package/build/sdk/studio/sdk/model/project.d.ts +7 -0
- package/build/sdk/studio/sdk/model/project.js +20 -0
- package/build/sdk/studio/sdk/model/project.js.map +1 -1
- package/build/sdk/studio/sdk/model/projectDeploymentTarget.d.ts +4 -0
- package/build/sdk/studio/sdk/model/projectDeploymentTarget.js +5 -0
- package/build/sdk/studio/sdk/model/projectDeploymentTarget.js.map +1 -1
- package/build/sdk/studio/sdk/model/socketTokenResponse.d.ts +1 -1
- package/build/sdk/studio/sdk/model/socketTokenResponseAllOf.d.ts +1 -1
- package/build/sdk/studio/sdk/model/trashBinEntity.d.ts +55 -0
- package/build/sdk/studio/sdk/model/trashBinEntity.js +62 -0
- package/build/sdk/studio/sdk/model/trashBinEntity.js.map +1 -0
- package/build/sdk/studio/sdk/model/tunerRun.d.ts +1 -0
- package/build/sdk/studio/sdk/model/tunerRun.js +5 -0
- package/build/sdk/studio/sdk/model/tunerRun.js.map +1 -1
- package/package.json +5 -1
- package/build/sdk/studio/sdk/model/addOrganizationDeployBlockResponse.js +0 -39
- package/build/sdk/studio/sdk/model/addOrganizationDeployBlockResponse.js.map +0 -1
- package/build/sdk/studio/sdk/model/addOrganizationDspBlockResponse.js +0 -39
- package/build/sdk/studio/sdk/model/addOrganizationDspBlockResponse.js.map +0 -1
- package/build/sdk/studio/sdk/model/addOrganizationSecretResponse.js.map +0 -1
- package/build/sdk/studio/sdk/model/addOrganizationSecretResponseAllOf.js.map +0 -1
- package/build/sdk/studio/sdk/model/addOrganizationTransferLearningBlockResponse.js +0 -39
- package/build/sdk/studio/sdk/model/addOrganizationTransferLearningBlockResponse.js.map +0 -1
- package/build/sdk/studio/sdk/model/addOrganizationTransformationBlockResponse.d.ts +0 -33
- package/build/sdk/studio/sdk/model/addOrganizationTransformationBlockResponse.js +0 -39
- package/build/sdk/studio/sdk/model/addOrganizationTransformationBlockResponse.js.map +0 -1
- package/build/sdk/studio/sdk/model/addOrganizationTransformationBlockResponseAllOf.js.map +0 -1
- package/build/sdk/studio/sdk/model/createAIActionResponse.js.map +0 -1
- package/build/sdk/studio/sdk/model/createPipelineResponse.d.ts +0 -33
- package/build/sdk/studio/sdk/model/createPipelineResponse.js.map +0 -1
- package/build/sdk/studio/sdk/model/developmentBoardCreatedResponse.d.ts +0 -33
- package/build/sdk/studio/sdk/model/developmentBoardCreatedResponse.js +0 -39
- package/build/sdk/studio/sdk/model/developmentBoardCreatedResponse.js.map +0 -1
- package/build/sdk/studio/sdk/model/dspRunResponseAllOfPerformance.js.map +0 -1
|
@@ -1153,10 +1153,10 @@ class AdminApi {
|
|
|
1153
1153
|
});
|
|
1154
1154
|
}
|
|
1155
1155
|
/**
|
|
1156
|
-
* Admin-only API to delete an organization.
|
|
1156
|
+
* Admin-only API to delete an organization. The deletion process varies based on the `fullDelete` parameter: **Soft Delete** (default, `fullDelete=false`): - Organization is marked as deleted in the database - Organization remains hidden from the product - All data is preserved and recoverable - No data is removed from S3 or FSx **Full Delete** (`fullDelete=true`): 1. Immediate soft deletion - Organization is marked as deleted and hidden from the product - Access is immediately revoked for all organization members 2. Data preservation - S3 and FSx assets are moved to a trash bin 3. Scheduled permanent deletion - A 30-day grace period begins - After 30 days, all organization data and S3 and FSx assets are permanently deleted - During the grace period: - Deletion can be cancelled by administrators - Data can be recovered if needed - Progress can be monitored via admin API
|
|
1157
1157
|
* @summary Delete an organization
|
|
1158
1158
|
* @param organizationId Organization ID
|
|
1159
|
-
* @param fullDeletion Set to true
|
|
1159
|
+
* @param fullDeletion Set to true to schedule permanent deletion
|
|
1160
1160
|
*/
|
|
1161
1161
|
async adminDeleteOrganization(organizationId, queryParams, options = { headers: {} }) {
|
|
1162
1162
|
const localVarPath = this.basePath + '/api/admin/organizations/{organizationId}'
|
|
@@ -1213,7 +1213,7 @@ class AdminApi {
|
|
|
1213
1213
|
reject(error);
|
|
1214
1214
|
}
|
|
1215
1215
|
else {
|
|
1216
|
-
body = models_1.ObjectSerializer.deserialize(body, "
|
|
1216
|
+
body = models_1.ObjectSerializer.deserialize(body, "StartJobResponse");
|
|
1217
1217
|
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
1218
1218
|
if (typeof body.success === 'boolean' && !body.success) {
|
|
1219
1219
|
reject(new Error(body.error || errString));
|
|
@@ -1391,8 +1391,9 @@ class AdminApi {
|
|
|
1391
1391
|
* Admin-only API to delete a project.
|
|
1392
1392
|
* @summary Delete a project
|
|
1393
1393
|
* @param projectId Project ID
|
|
1394
|
+
* @param fullDeletion Set to true to schedule permanent deletion
|
|
1394
1395
|
*/
|
|
1395
|
-
async adminDeleteProject(projectId, options = { headers: {} }) {
|
|
1396
|
+
async adminDeleteProject(projectId, queryParams, options = { headers: {} }) {
|
|
1396
1397
|
const localVarPath = this.basePath + '/api/admin/projects/{projectId}'
|
|
1397
1398
|
.replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)));
|
|
1398
1399
|
let localVarQueryParameters = {};
|
|
@@ -1412,6 +1413,9 @@ class AdminApi {
|
|
|
1412
1413
|
if (projectId === null || projectId === undefined) {
|
|
1413
1414
|
throw new Error('Required parameter projectId was null or undefined when calling adminDeleteProject.');
|
|
1414
1415
|
}
|
|
1416
|
+
if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.fullDeletion) !== undefined) {
|
|
1417
|
+
localVarQueryParameters['fullDeletion'] = models_1.ObjectSerializer.serialize(queryParams.fullDeletion, "boolean");
|
|
1418
|
+
}
|
|
1415
1419
|
Object.assign(localVarHeaderParams, options.headers);
|
|
1416
1420
|
Object.assign(localVarHeaderParams, this.opts.extraHeaders);
|
|
1417
1421
|
let localVarUseFormData = false;
|
|
@@ -1680,11 +1684,12 @@ class AdminApi {
|
|
|
1680
1684
|
});
|
|
1681
1685
|
}
|
|
1682
1686
|
/**
|
|
1683
|
-
* Admin-only API to delete a user.
|
|
1687
|
+
* Admin-only API to delete a user. The deletion process varies based on the `fullDelete` parameter: **Soft Delete** (default, `fullDelete=false`): - User is marked as deleted in the database - User remains hidden from the product - All data is preserved and recoverable - No data is removed from S3 or FSx - User is unsubscribed from marketing communications - Any active subscriptions are cancelled **Full Delete** (`fullDelete=true`): 1. Immediate soft deletion - User is marked as deleted and hidden from the product - Access is immediately revoked - User is unsubscribed from marketing communications - Any active subscriptions are cancelled 2. Data preservation - S3 and FSx assets are moved to a trash bin 3. Scheduled permanent deletion - A 30-day grace period begins - After 30 days, all user data and S3 and FSx assets are permanently deleted - During the grace period: - Deletion can be cancelled by administrators - Data can be recovered if needed - Progress can be monitored via admin API
|
|
1684
1688
|
* @summary Delete a user
|
|
1685
1689
|
* @param userId User ID
|
|
1690
|
+
* @param fullDeletion Set to true to schedule permanent deletion
|
|
1686
1691
|
*/
|
|
1687
|
-
async adminDeleteUser(userId, options = { headers: {} }) {
|
|
1692
|
+
async adminDeleteUser(userId, queryParams, options = { headers: {} }) {
|
|
1688
1693
|
const localVarPath = this.basePath + '/api/admin/users/{userId}'
|
|
1689
1694
|
.replace('{' + 'userId' + '}', encodeURIComponent(String(userId)));
|
|
1690
1695
|
let localVarQueryParameters = {};
|
|
@@ -1704,6 +1709,9 @@ class AdminApi {
|
|
|
1704
1709
|
if (userId === null || userId === undefined) {
|
|
1705
1710
|
throw new Error('Required parameter userId was null or undefined when calling adminDeleteUser.');
|
|
1706
1711
|
}
|
|
1712
|
+
if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.fullDeletion) !== undefined) {
|
|
1713
|
+
localVarQueryParameters['fullDeletion'] = models_1.ObjectSerializer.serialize(queryParams.fullDeletion, "boolean");
|
|
1714
|
+
}
|
|
1707
1715
|
Object.assign(localVarHeaderParams, options.headers);
|
|
1708
1716
|
Object.assign(localVarHeaderParams, this.opts.extraHeaders);
|
|
1709
1717
|
let localVarUseFormData = false;
|
|
@@ -1959,6 +1967,73 @@ class AdminApi {
|
|
|
1959
1967
|
});
|
|
1960
1968
|
});
|
|
1961
1969
|
}
|
|
1970
|
+
/**
|
|
1971
|
+
* ⚠️ DANGER: This is a highly destructive maintenance endpoint that forcefully deletes all content from the trash bin, regardless of grace period status. This should only be used for: - Internal testing purposes - Manual maintenance tasks - Emergency cleanup operations Unlike the normal automatic deletion process which respects the 30-day grace period, this endpoint: - Immediately and permanently deletes ALL data in the trash bin - Bypasses the standard grace period checks - Cannot be undone - May delete data that would otherwise be recoverable The normal trash bin system works as follows: 1. When users/organizations are deleted with `fullDelete=true`: - Their data is moved to the trash bin - A 30-day grace period begins - The data remains recoverable during this period 2. During the 30-day grace period: - Data is preserved in its original structure - Administrators can recover data if needed - The deletion can be cancelled - Storage costs continue to accrue ⚠️ WARNING: - This endpoint bypasses all safety mechanisms - Data deletion is immediate and irreversible - Should not be used in normal operations - Requires explicit admin permissions - Consider using targeted deletion endpoints instead (i.e. /api/admin/trashbin/organizations/:id) Note: The system runs automated cleanup jobs periodically for normal maintenance. This endpoint should only be used in exceptional circumstances by authorized administrators.
|
|
1972
|
+
* @summary Empty all trashbin content
|
|
1973
|
+
*/
|
|
1974
|
+
async adminEmptyTrashbin(options = { headers: {} }) {
|
|
1975
|
+
const localVarPath = this.basePath + '/api/admin/trashbin';
|
|
1976
|
+
let localVarQueryParameters = {};
|
|
1977
|
+
let localVarHeaderParams = Object.assign({
|
|
1978
|
+
'User-Agent': 'edgeimpulse-api nodejs'
|
|
1979
|
+
}, this.defaultHeaders);
|
|
1980
|
+
const produces = ['application/json'];
|
|
1981
|
+
// give precedence to 'application/json'
|
|
1982
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
1983
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
1984
|
+
}
|
|
1985
|
+
else {
|
|
1986
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
1987
|
+
}
|
|
1988
|
+
let localVarFormParams = {};
|
|
1989
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
1990
|
+
Object.assign(localVarHeaderParams, this.opts.extraHeaders);
|
|
1991
|
+
let localVarUseFormData = false;
|
|
1992
|
+
let localVarRequestOptions = {
|
|
1993
|
+
method: 'DELETE',
|
|
1994
|
+
qs: localVarQueryParameters,
|
|
1995
|
+
headers: localVarHeaderParams,
|
|
1996
|
+
uri: localVarPath,
|
|
1997
|
+
useQuerystring: this._useQuerystring,
|
|
1998
|
+
agentOptions: { keepAlive: false },
|
|
1999
|
+
json: true,
|
|
2000
|
+
};
|
|
2001
|
+
let authenticationPromise = Promise.resolve();
|
|
2002
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
|
|
2003
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
|
|
2004
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
|
|
2005
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
2006
|
+
return authenticationPromise.then(() => {
|
|
2007
|
+
if (Object.keys(localVarFormParams).length) {
|
|
2008
|
+
if (localVarUseFormData) {
|
|
2009
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
2010
|
+
}
|
|
2011
|
+
else {
|
|
2012
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
2013
|
+
}
|
|
2014
|
+
}
|
|
2015
|
+
return new Promise((resolve, reject) => {
|
|
2016
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
2017
|
+
if (error) {
|
|
2018
|
+
reject(error);
|
|
2019
|
+
}
|
|
2020
|
+
else {
|
|
2021
|
+
body = models_1.ObjectSerializer.deserialize(body, "StartJobResponse");
|
|
2022
|
+
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
2023
|
+
if (typeof body.success === 'boolean' && !body.success) {
|
|
2024
|
+
reject(new Error(body.error || errString));
|
|
2025
|
+
}
|
|
2026
|
+
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
2027
|
+
resolve(body);
|
|
2028
|
+
}
|
|
2029
|
+
else {
|
|
2030
|
+
reject(errString);
|
|
2031
|
+
}
|
|
2032
|
+
}
|
|
2033
|
+
});
|
|
2034
|
+
});
|
|
2035
|
+
});
|
|
2036
|
+
}
|
|
1962
2037
|
/**
|
|
1963
2038
|
* Admin-only API to set a feature flag ON. Setting a feature flag ON essentially enables the feature for all users.
|
|
1964
2039
|
* @summary Set a feature flag ON
|
|
@@ -3785,7 +3860,7 @@ class AdminApi {
|
|
|
3785
3860
|
reject(error);
|
|
3786
3861
|
}
|
|
3787
3862
|
else {
|
|
3788
|
-
body = models_1.ObjectSerializer.deserialize(body, "
|
|
3863
|
+
body = models_1.ObjectSerializer.deserialize(body, "AdminProjectInfoResponse");
|
|
3789
3864
|
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
3790
3865
|
if (typeof body.success === 'boolean' && !body.success) {
|
|
3791
3866
|
reject(new Error(body.error || errString));
|
|
@@ -4180,6 +4255,93 @@ class AdminApi {
|
|
|
4180
4255
|
});
|
|
4181
4256
|
});
|
|
4182
4257
|
}
|
|
4258
|
+
/**
|
|
4259
|
+
* Retrieves a list of all organizations, projects and users that have been moved to the trash bin and are awaiting permanent deletion. The trash bin system works as follows: 1. When entities are deleted with `fullDelete=true`: - They are moved to the trash bin - A 30-day grace period begins - Data remains recoverable during this period 2. During the grace period: - Entities are hidden from normal operations - Administrators can monitor deletion progress - Data can be recovered if needed - Storage costs continue to accrue 3. After 30 days: - Entities are permanently deleted - All associated data is removed - The deletion becomes irreversible
|
|
4260
|
+
* @summary Get the entities in the trashbin
|
|
4261
|
+
* @param sort Fields and order to sort query by
|
|
4262
|
+
* @param filters
|
|
4263
|
+
* @param limit Maximum number of results
|
|
4264
|
+
* @param offset Offset in results, can be used in conjunction with LimitResultsParameter to implement paging.
|
|
4265
|
+
* @param search Search query
|
|
4266
|
+
*/
|
|
4267
|
+
async adminGetTrashbin(queryParams, options = { headers: {} }) {
|
|
4268
|
+
const localVarPath = this.basePath + '/api/admin/trashbin';
|
|
4269
|
+
let localVarQueryParameters = {};
|
|
4270
|
+
let localVarHeaderParams = Object.assign({
|
|
4271
|
+
'User-Agent': 'edgeimpulse-api nodejs'
|
|
4272
|
+
}, this.defaultHeaders);
|
|
4273
|
+
const produces = ['application/json'];
|
|
4274
|
+
// give precedence to 'application/json'
|
|
4275
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
4276
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
4277
|
+
}
|
|
4278
|
+
else {
|
|
4279
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
4280
|
+
}
|
|
4281
|
+
let localVarFormParams = {};
|
|
4282
|
+
if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.sort) !== undefined) {
|
|
4283
|
+
localVarQueryParameters['sort'] = models_1.ObjectSerializer.serialize(queryParams.sort, "string");
|
|
4284
|
+
}
|
|
4285
|
+
if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.filters) !== undefined) {
|
|
4286
|
+
localVarQueryParameters['filters'] = models_1.ObjectSerializer.serialize(queryParams.filters, "string");
|
|
4287
|
+
}
|
|
4288
|
+
if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.limit) !== undefined) {
|
|
4289
|
+
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(queryParams.limit, "number");
|
|
4290
|
+
}
|
|
4291
|
+
if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.offset) !== undefined) {
|
|
4292
|
+
localVarQueryParameters['offset'] = models_1.ObjectSerializer.serialize(queryParams.offset, "number");
|
|
4293
|
+
}
|
|
4294
|
+
if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.search) !== undefined) {
|
|
4295
|
+
localVarQueryParameters['search'] = models_1.ObjectSerializer.serialize(queryParams.search, "string");
|
|
4296
|
+
}
|
|
4297
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
4298
|
+
Object.assign(localVarHeaderParams, this.opts.extraHeaders);
|
|
4299
|
+
let localVarUseFormData = false;
|
|
4300
|
+
let localVarRequestOptions = {
|
|
4301
|
+
method: 'GET',
|
|
4302
|
+
qs: localVarQueryParameters,
|
|
4303
|
+
headers: localVarHeaderParams,
|
|
4304
|
+
uri: localVarPath,
|
|
4305
|
+
useQuerystring: this._useQuerystring,
|
|
4306
|
+
agentOptions: { keepAlive: false },
|
|
4307
|
+
json: true,
|
|
4308
|
+
};
|
|
4309
|
+
let authenticationPromise = Promise.resolve();
|
|
4310
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
|
|
4311
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
|
|
4312
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
|
|
4313
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
4314
|
+
return authenticationPromise.then(() => {
|
|
4315
|
+
if (Object.keys(localVarFormParams).length) {
|
|
4316
|
+
if (localVarUseFormData) {
|
|
4317
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
4318
|
+
}
|
|
4319
|
+
else {
|
|
4320
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
4321
|
+
}
|
|
4322
|
+
}
|
|
4323
|
+
return new Promise((resolve, reject) => {
|
|
4324
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
4325
|
+
if (error) {
|
|
4326
|
+
reject(error);
|
|
4327
|
+
}
|
|
4328
|
+
else {
|
|
4329
|
+
body = models_1.ObjectSerializer.deserialize(body, "AdminGetTrashBinResponse");
|
|
4330
|
+
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
4331
|
+
if (typeof body.success === 'boolean' && !body.success) {
|
|
4332
|
+
reject(new Error(body.error || errString));
|
|
4333
|
+
}
|
|
4334
|
+
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
4335
|
+
resolve(body);
|
|
4336
|
+
}
|
|
4337
|
+
else {
|
|
4338
|
+
reject(errString);
|
|
4339
|
+
}
|
|
4340
|
+
}
|
|
4341
|
+
});
|
|
4342
|
+
});
|
|
4343
|
+
});
|
|
4344
|
+
}
|
|
4183
4345
|
/**
|
|
4184
4346
|
* Admin-only API to get a specific enterprise trial.
|
|
4185
4347
|
* @summary Get enterprise trial
|
|
@@ -4579,6 +4741,711 @@ class AdminApi {
|
|
|
4579
4741
|
});
|
|
4580
4742
|
});
|
|
4581
4743
|
}
|
|
4744
|
+
/**
|
|
4745
|
+
* List files in the trashbin FSx for a given organization.
|
|
4746
|
+
* @summary List organization FSx files in the trash bin
|
|
4747
|
+
* @param organizationId Organization ID
|
|
4748
|
+
*/
|
|
4749
|
+
async adminListTrashbinOrganizationFSxFiles(organizationId, options = { headers: {} }) {
|
|
4750
|
+
const localVarPath = this.basePath + '/api/admin/trashbin/organizations/{organizationId}/fsx'
|
|
4751
|
+
.replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
|
|
4752
|
+
let localVarQueryParameters = {};
|
|
4753
|
+
let localVarHeaderParams = Object.assign({
|
|
4754
|
+
'User-Agent': 'edgeimpulse-api nodejs'
|
|
4755
|
+
}, this.defaultHeaders);
|
|
4756
|
+
const produces = ['application/json'];
|
|
4757
|
+
// give precedence to 'application/json'
|
|
4758
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
4759
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
4760
|
+
}
|
|
4761
|
+
else {
|
|
4762
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
4763
|
+
}
|
|
4764
|
+
let localVarFormParams = {};
|
|
4765
|
+
// verify required parameter 'organizationId' is not null or undefined
|
|
4766
|
+
if (organizationId === null || organizationId === undefined) {
|
|
4767
|
+
throw new Error('Required parameter organizationId was null or undefined when calling adminListTrashbinOrganizationFSxFiles.');
|
|
4768
|
+
}
|
|
4769
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
4770
|
+
Object.assign(localVarHeaderParams, this.opts.extraHeaders);
|
|
4771
|
+
let localVarUseFormData = false;
|
|
4772
|
+
let localVarRequestOptions = {
|
|
4773
|
+
method: 'GET',
|
|
4774
|
+
qs: localVarQueryParameters,
|
|
4775
|
+
headers: localVarHeaderParams,
|
|
4776
|
+
uri: localVarPath,
|
|
4777
|
+
useQuerystring: this._useQuerystring,
|
|
4778
|
+
agentOptions: { keepAlive: false },
|
|
4779
|
+
json: true,
|
|
4780
|
+
};
|
|
4781
|
+
let authenticationPromise = Promise.resolve();
|
|
4782
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
|
|
4783
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
|
|
4784
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
|
|
4785
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
4786
|
+
return authenticationPromise.then(() => {
|
|
4787
|
+
if (Object.keys(localVarFormParams).length) {
|
|
4788
|
+
if (localVarUseFormData) {
|
|
4789
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
4790
|
+
}
|
|
4791
|
+
else {
|
|
4792
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
4793
|
+
}
|
|
4794
|
+
}
|
|
4795
|
+
return new Promise((resolve, reject) => {
|
|
4796
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
4797
|
+
if (error) {
|
|
4798
|
+
reject(error);
|
|
4799
|
+
}
|
|
4800
|
+
else {
|
|
4801
|
+
body = models_1.ObjectSerializer.deserialize(body, "ListPortalFilesInFolderResponse");
|
|
4802
|
+
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
4803
|
+
if (typeof body.success === 'boolean' && !body.success) {
|
|
4804
|
+
reject(new Error(body.error || errString));
|
|
4805
|
+
}
|
|
4806
|
+
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
4807
|
+
resolve(body);
|
|
4808
|
+
}
|
|
4809
|
+
else {
|
|
4810
|
+
reject(errString);
|
|
4811
|
+
}
|
|
4812
|
+
}
|
|
4813
|
+
});
|
|
4814
|
+
});
|
|
4815
|
+
});
|
|
4816
|
+
}
|
|
4817
|
+
/**
|
|
4818
|
+
* Lists files in the trash bin S3 bucket for a given organization. Files are organized by their original source bucket. The `sourceBucket` parameter specifies which bucket to list files from: - ingestion: Lists files from the ingestion bucket - cdn: Lists files from the CDN bucket - user-data: Lists files from the user data bucket Optionally, use the `filePrefix` parameter to filter results to a specific path or filename pattern. The response is paginated and returns up to 1000 files per request. To retrieve additional pages: 1. Make the initial request without a continuation token 2. If more files exist, the response will include a `continuationToken` 3. Make subsequent requests with the provided token to retrieve the next page 4. Repeat until no continuation token is returned Note: Files remain in the trash bin for 30 days before permanent deletion.
|
|
4819
|
+
* @summary List organization S3 files in the trash bin
|
|
4820
|
+
* @param organizationId Organization ID
|
|
4821
|
+
* @param sourceBucket Specifies which source bucket to list deleted files from. Options are: - ingestion: Files uploaded through data ingestion - cdn: Files stored in the CDN - user-data: User-generated or uploaded content
|
|
4822
|
+
* @param prefix Directory path prefix to filter results. For example: - Empty string or \"/\" lists files in the root directory - \"docs/\" lists files in the docs directory - \"docs/images/\" lists files in the docs/images subdirectory
|
|
4823
|
+
* @param continuationToken Token for paginating through results. When a list operation returns more results than can fit in a single response, the response will include a continuationToken. Pass this token in your next request to get the next page of results. If not provided, returns the first page of results. When there are no more results, the response will not include a continuationToken. Note: When backed by S3, this maps directly to S3\'s NextContinuationToken.
|
|
4824
|
+
*/
|
|
4825
|
+
async adminListTrashbinOrganizationS3Files(organizationId, queryParams, options = { headers: {} }) {
|
|
4826
|
+
const localVarPath = this.basePath + '/api/admin/trashbin/organizations/{organizationId}/s3'
|
|
4827
|
+
.replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
|
|
4828
|
+
let localVarQueryParameters = {};
|
|
4829
|
+
let localVarHeaderParams = Object.assign({
|
|
4830
|
+
'User-Agent': 'edgeimpulse-api nodejs'
|
|
4831
|
+
}, this.defaultHeaders);
|
|
4832
|
+
const produces = ['application/json'];
|
|
4833
|
+
// give precedence to 'application/json'
|
|
4834
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
4835
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
4836
|
+
}
|
|
4837
|
+
else {
|
|
4838
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
4839
|
+
}
|
|
4840
|
+
let localVarFormParams = {};
|
|
4841
|
+
// verify required parameter 'organizationId' is not null or undefined
|
|
4842
|
+
if (organizationId === null || organizationId === undefined) {
|
|
4843
|
+
throw new Error('Required parameter organizationId was null or undefined when calling adminListTrashbinOrganizationS3Files.');
|
|
4844
|
+
}
|
|
4845
|
+
// verify required parameter 'sourceBucket' is not null or undefined
|
|
4846
|
+
if (queryParams.sourceBucket === null || queryParams.sourceBucket === undefined) {
|
|
4847
|
+
throw new Error('Required parameter queryParams.sourceBucket was null or undefined when calling adminListTrashbinOrganizationS3Files.');
|
|
4848
|
+
}
|
|
4849
|
+
if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.prefix) !== undefined) {
|
|
4850
|
+
localVarQueryParameters['prefix'] = models_1.ObjectSerializer.serialize(queryParams.prefix, "string");
|
|
4851
|
+
}
|
|
4852
|
+
if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.sourceBucket) !== undefined) {
|
|
4853
|
+
localVarQueryParameters['sourceBucket'] = models_1.ObjectSerializer.serialize(queryParams.sourceBucket, "'ingestion' | 'cdn' | 'user-data'");
|
|
4854
|
+
}
|
|
4855
|
+
if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.continuationToken) !== undefined) {
|
|
4856
|
+
localVarQueryParameters['continuationToken'] = models_1.ObjectSerializer.serialize(queryParams.continuationToken, "string");
|
|
4857
|
+
}
|
|
4858
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
4859
|
+
Object.assign(localVarHeaderParams, this.opts.extraHeaders);
|
|
4860
|
+
let localVarUseFormData = false;
|
|
4861
|
+
let localVarRequestOptions = {
|
|
4862
|
+
method: 'GET',
|
|
4863
|
+
qs: localVarQueryParameters,
|
|
4864
|
+
headers: localVarHeaderParams,
|
|
4865
|
+
uri: localVarPath,
|
|
4866
|
+
useQuerystring: this._useQuerystring,
|
|
4867
|
+
agentOptions: { keepAlive: false },
|
|
4868
|
+
json: true,
|
|
4869
|
+
};
|
|
4870
|
+
let authenticationPromise = Promise.resolve();
|
|
4871
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
|
|
4872
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
|
|
4873
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
|
|
4874
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
4875
|
+
return authenticationPromise.then(() => {
|
|
4876
|
+
if (Object.keys(localVarFormParams).length) {
|
|
4877
|
+
if (localVarUseFormData) {
|
|
4878
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
4879
|
+
}
|
|
4880
|
+
else {
|
|
4881
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
4882
|
+
}
|
|
4883
|
+
}
|
|
4884
|
+
return new Promise((resolve, reject) => {
|
|
4885
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
4886
|
+
if (error) {
|
|
4887
|
+
reject(error);
|
|
4888
|
+
}
|
|
4889
|
+
else {
|
|
4890
|
+
body = models_1.ObjectSerializer.deserialize(body, "ListPortalFilesInFolderResponse");
|
|
4891
|
+
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
4892
|
+
if (typeof body.success === 'boolean' && !body.success) {
|
|
4893
|
+
reject(new Error(body.error || errString));
|
|
4894
|
+
}
|
|
4895
|
+
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
4896
|
+
resolve(body);
|
|
4897
|
+
}
|
|
4898
|
+
else {
|
|
4899
|
+
reject(errString);
|
|
4900
|
+
}
|
|
4901
|
+
}
|
|
4902
|
+
});
|
|
4903
|
+
});
|
|
4904
|
+
});
|
|
4905
|
+
}
|
|
4906
|
+
/**
|
|
4907
|
+
* List files in the trashbin FSx for a given project.
|
|
4908
|
+
* @summary List project FSx files in the trash bin
|
|
4909
|
+
* @param projectId Project ID
|
|
4910
|
+
*/
|
|
4911
|
+
async adminListTrashbinProjectFSxFiles(projectId, options = { headers: {} }) {
|
|
4912
|
+
const localVarPath = this.basePath + '/api/admin/trashbin/projects/{projectId}/fsx'
|
|
4913
|
+
.replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)));
|
|
4914
|
+
let localVarQueryParameters = {};
|
|
4915
|
+
let localVarHeaderParams = Object.assign({
|
|
4916
|
+
'User-Agent': 'edgeimpulse-api nodejs'
|
|
4917
|
+
}, this.defaultHeaders);
|
|
4918
|
+
const produces = ['application/json'];
|
|
4919
|
+
// give precedence to 'application/json'
|
|
4920
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
4921
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
4922
|
+
}
|
|
4923
|
+
else {
|
|
4924
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
4925
|
+
}
|
|
4926
|
+
let localVarFormParams = {};
|
|
4927
|
+
// verify required parameter 'projectId' is not null or undefined
|
|
4928
|
+
if (projectId === null || projectId === undefined) {
|
|
4929
|
+
throw new Error('Required parameter projectId was null or undefined when calling adminListTrashbinProjectFSxFiles.');
|
|
4930
|
+
}
|
|
4931
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
4932
|
+
Object.assign(localVarHeaderParams, this.opts.extraHeaders);
|
|
4933
|
+
let localVarUseFormData = false;
|
|
4934
|
+
let localVarRequestOptions = {
|
|
4935
|
+
method: 'GET',
|
|
4936
|
+
qs: localVarQueryParameters,
|
|
4937
|
+
headers: localVarHeaderParams,
|
|
4938
|
+
uri: localVarPath,
|
|
4939
|
+
useQuerystring: this._useQuerystring,
|
|
4940
|
+
agentOptions: { keepAlive: false },
|
|
4941
|
+
json: true,
|
|
4942
|
+
};
|
|
4943
|
+
let authenticationPromise = Promise.resolve();
|
|
4944
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
|
|
4945
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
|
|
4946
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
|
|
4947
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
4948
|
+
return authenticationPromise.then(() => {
|
|
4949
|
+
if (Object.keys(localVarFormParams).length) {
|
|
4950
|
+
if (localVarUseFormData) {
|
|
4951
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
4952
|
+
}
|
|
4953
|
+
else {
|
|
4954
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
4955
|
+
}
|
|
4956
|
+
}
|
|
4957
|
+
return new Promise((resolve, reject) => {
|
|
4958
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
4959
|
+
if (error) {
|
|
4960
|
+
reject(error);
|
|
4961
|
+
}
|
|
4962
|
+
else {
|
|
4963
|
+
body = models_1.ObjectSerializer.deserialize(body, "ListPortalFilesInFolderResponse");
|
|
4964
|
+
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
4965
|
+
if (typeof body.success === 'boolean' && !body.success) {
|
|
4966
|
+
reject(new Error(body.error || errString));
|
|
4967
|
+
}
|
|
4968
|
+
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
4969
|
+
resolve(body);
|
|
4970
|
+
}
|
|
4971
|
+
else {
|
|
4972
|
+
reject(errString);
|
|
4973
|
+
}
|
|
4974
|
+
}
|
|
4975
|
+
});
|
|
4976
|
+
});
|
|
4977
|
+
});
|
|
4978
|
+
}
|
|
4979
|
+
/**
|
|
4980
|
+
* Lists files in the trash bin S3 bucket for a given project. Files are organized by their original source bucket. The `sourceBucket` parameter specifies which bucket to list files from: - ingestion: Lists files from the ingestion bucket - cdn: Lists files from the CDN bucket - user-data: Lists files from the user data bucket Optionally, use the `filePrefix` parameter to filter results to a specific path or filename pattern. The response is paginated and returns up to 1000 files per request. To retrieve additional pages: 1. Make the initial request without a continuation token 2. If more files exist, the response will include a `continuationToken` 3. Make subsequent requests with the provided token to retrieve the next page 4. Repeat until no continuation token is returned Note: Files remain in the trash bin for 30 days before permanent deletion.
|
|
4981
|
+
* @summary List project S3 files in the trash bin
|
|
4982
|
+
* @param projectId Project ID
|
|
4983
|
+
* @param sourceBucket Specifies which source bucket to list deleted files from. Options are: - ingestion: Files uploaded through data ingestion - cdn: Files stored in the CDN - user-data: User-generated or uploaded content
|
|
4984
|
+
* @param prefix Directory path prefix to filter results. For example: - Empty string or \"/\" lists files in the root directory - \"docs/\" lists files in the docs directory - \"docs/images/\" lists files in the docs/images subdirectory
|
|
4985
|
+
* @param continuationToken Token for paginating through results. When a list operation returns more results than can fit in a single response, the response will include a continuationToken. Pass this token in your next request to get the next page of results. If not provided, returns the first page of results. When there are no more results, the response will not include a continuationToken. Note: When backed by S3, this maps directly to S3\'s NextContinuationToken.
|
|
4986
|
+
*/
|
|
4987
|
+
async adminListTrashbinProjectS3Files(projectId, queryParams, options = { headers: {} }) {
|
|
4988
|
+
const localVarPath = this.basePath + '/api/admin/trashbin/projects/{projectId}/s3'
|
|
4989
|
+
.replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)));
|
|
4990
|
+
let localVarQueryParameters = {};
|
|
4991
|
+
let localVarHeaderParams = Object.assign({
|
|
4992
|
+
'User-Agent': 'edgeimpulse-api nodejs'
|
|
4993
|
+
}, this.defaultHeaders);
|
|
4994
|
+
const produces = ['application/json'];
|
|
4995
|
+
// give precedence to 'application/json'
|
|
4996
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
4997
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
4998
|
+
}
|
|
4999
|
+
else {
|
|
5000
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
5001
|
+
}
|
|
5002
|
+
let localVarFormParams = {};
|
|
5003
|
+
// verify required parameter 'projectId' is not null or undefined
|
|
5004
|
+
if (projectId === null || projectId === undefined) {
|
|
5005
|
+
throw new Error('Required parameter projectId was null or undefined when calling adminListTrashbinProjectS3Files.');
|
|
5006
|
+
}
|
|
5007
|
+
// verify required parameter 'sourceBucket' is not null or undefined
|
|
5008
|
+
if (queryParams.sourceBucket === null || queryParams.sourceBucket === undefined) {
|
|
5009
|
+
throw new Error('Required parameter queryParams.sourceBucket was null or undefined when calling adminListTrashbinProjectS3Files.');
|
|
5010
|
+
}
|
|
5011
|
+
if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.prefix) !== undefined) {
|
|
5012
|
+
localVarQueryParameters['prefix'] = models_1.ObjectSerializer.serialize(queryParams.prefix, "string");
|
|
5013
|
+
}
|
|
5014
|
+
if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.sourceBucket) !== undefined) {
|
|
5015
|
+
localVarQueryParameters['sourceBucket'] = models_1.ObjectSerializer.serialize(queryParams.sourceBucket, "'ingestion' | 'cdn' | 'user-data'");
|
|
5016
|
+
}
|
|
5017
|
+
if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.continuationToken) !== undefined) {
|
|
5018
|
+
localVarQueryParameters['continuationToken'] = models_1.ObjectSerializer.serialize(queryParams.continuationToken, "string");
|
|
5019
|
+
}
|
|
5020
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
5021
|
+
Object.assign(localVarHeaderParams, this.opts.extraHeaders);
|
|
5022
|
+
let localVarUseFormData = false;
|
|
5023
|
+
let localVarRequestOptions = {
|
|
5024
|
+
method: 'GET',
|
|
5025
|
+
qs: localVarQueryParameters,
|
|
5026
|
+
headers: localVarHeaderParams,
|
|
5027
|
+
uri: localVarPath,
|
|
5028
|
+
useQuerystring: this._useQuerystring,
|
|
5029
|
+
agentOptions: { keepAlive: false },
|
|
5030
|
+
json: true,
|
|
5031
|
+
};
|
|
5032
|
+
let authenticationPromise = Promise.resolve();
|
|
5033
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
|
|
5034
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
|
|
5035
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
|
|
5036
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
5037
|
+
return authenticationPromise.then(() => {
|
|
5038
|
+
if (Object.keys(localVarFormParams).length) {
|
|
5039
|
+
if (localVarUseFormData) {
|
|
5040
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
5041
|
+
}
|
|
5042
|
+
else {
|
|
5043
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
5044
|
+
}
|
|
5045
|
+
}
|
|
5046
|
+
return new Promise((resolve, reject) => {
|
|
5047
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
5048
|
+
if (error) {
|
|
5049
|
+
reject(error);
|
|
5050
|
+
}
|
|
5051
|
+
else {
|
|
5052
|
+
body = models_1.ObjectSerializer.deserialize(body, "ListPortalFilesInFolderResponse");
|
|
5053
|
+
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
5054
|
+
if (typeof body.success === 'boolean' && !body.success) {
|
|
5055
|
+
reject(new Error(body.error || errString));
|
|
5056
|
+
}
|
|
5057
|
+
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
5058
|
+
resolve(body);
|
|
5059
|
+
}
|
|
5060
|
+
else {
|
|
5061
|
+
reject(errString);
|
|
5062
|
+
}
|
|
5063
|
+
}
|
|
5064
|
+
});
|
|
5065
|
+
});
|
|
5066
|
+
});
|
|
5067
|
+
}
|
|
5068
|
+
/**
|
|
5069
|
+
* List files in the trashbin FSx for a given user.
|
|
5070
|
+
* @summary List user FSx files in the trash bin
|
|
5071
|
+
* @param userId User ID
|
|
5072
|
+
*/
|
|
5073
|
+
async adminListTrashbinUserFSxFiles(userId, options = { headers: {} }) {
|
|
5074
|
+
const localVarPath = this.basePath + '/api/admin/trashbin/users/{userId}/fsx'
|
|
5075
|
+
.replace('{' + 'userId' + '}', encodeURIComponent(String(userId)));
|
|
5076
|
+
let localVarQueryParameters = {};
|
|
5077
|
+
let localVarHeaderParams = Object.assign({
|
|
5078
|
+
'User-Agent': 'edgeimpulse-api nodejs'
|
|
5079
|
+
}, this.defaultHeaders);
|
|
5080
|
+
const produces = ['application/json'];
|
|
5081
|
+
// give precedence to 'application/json'
|
|
5082
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
5083
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
5084
|
+
}
|
|
5085
|
+
else {
|
|
5086
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
5087
|
+
}
|
|
5088
|
+
let localVarFormParams = {};
|
|
5089
|
+
// verify required parameter 'userId' is not null or undefined
|
|
5090
|
+
if (userId === null || userId === undefined) {
|
|
5091
|
+
throw new Error('Required parameter userId was null or undefined when calling adminListTrashbinUserFSxFiles.');
|
|
5092
|
+
}
|
|
5093
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
5094
|
+
Object.assign(localVarHeaderParams, this.opts.extraHeaders);
|
|
5095
|
+
let localVarUseFormData = false;
|
|
5096
|
+
let localVarRequestOptions = {
|
|
5097
|
+
method: 'GET',
|
|
5098
|
+
qs: localVarQueryParameters,
|
|
5099
|
+
headers: localVarHeaderParams,
|
|
5100
|
+
uri: localVarPath,
|
|
5101
|
+
useQuerystring: this._useQuerystring,
|
|
5102
|
+
agentOptions: { keepAlive: false },
|
|
5103
|
+
json: true,
|
|
5104
|
+
};
|
|
5105
|
+
let authenticationPromise = Promise.resolve();
|
|
5106
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
|
|
5107
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
|
|
5108
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
|
|
5109
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
5110
|
+
return authenticationPromise.then(() => {
|
|
5111
|
+
if (Object.keys(localVarFormParams).length) {
|
|
5112
|
+
if (localVarUseFormData) {
|
|
5113
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
5114
|
+
}
|
|
5115
|
+
else {
|
|
5116
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
5117
|
+
}
|
|
5118
|
+
}
|
|
5119
|
+
return new Promise((resolve, reject) => {
|
|
5120
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
5121
|
+
if (error) {
|
|
5122
|
+
reject(error);
|
|
5123
|
+
}
|
|
5124
|
+
else {
|
|
5125
|
+
body = models_1.ObjectSerializer.deserialize(body, "ListPortalFilesInFolderResponse");
|
|
5126
|
+
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
5127
|
+
if (typeof body.success === 'boolean' && !body.success) {
|
|
5128
|
+
reject(new Error(body.error || errString));
|
|
5129
|
+
}
|
|
5130
|
+
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
5131
|
+
resolve(body);
|
|
5132
|
+
}
|
|
5133
|
+
else {
|
|
5134
|
+
reject(errString);
|
|
5135
|
+
}
|
|
5136
|
+
}
|
|
5137
|
+
});
|
|
5138
|
+
});
|
|
5139
|
+
});
|
|
5140
|
+
}
|
|
5141
|
+
/**
|
|
5142
|
+
* Lists files in the trash bin S3 bucket for a given user. Files are organized by their original source bucket. The `sourceBucket` parameter specifies which bucket to list files from: - ingestion: Lists files from the ingestion bucket - cdn: Lists files from the CDN bucket - user-data: Lists files from the user data bucket Optionally, use the `filePrefix` parameter to filter results to a specific path or filename pattern. The response is paginated and returns up to 1000 files per request. To retrieve additional pages: 1. Make the initial request without a continuation token 2. If more files exist, the response will include a `continuationToken` 3. Make subsequent requests with the provided token to retrieve the next page 4. Repeat until no continuation token is returned Note: Files remain in the trash bin for 30 days before permanent deletion.
|
|
5143
|
+
* @summary List user S3 files in the trash bin
|
|
5144
|
+
* @param userId User ID
|
|
5145
|
+
* @param sourceBucket Specifies which source bucket to list deleted files from. Options are: - ingestion: Files uploaded through data ingestion - cdn: Files stored in the CDN - user-data: User-generated or uploaded content
|
|
5146
|
+
* @param prefix Directory path prefix to filter results. For example: - Empty string or \"/\" lists files in the root directory - \"docs/\" lists files in the docs directory - \"docs/images/\" lists files in the docs/images subdirectory
|
|
5147
|
+
* @param continuationToken Token for paginating through results. When a list operation returns more results than can fit in a single response, the response will include a continuationToken. Pass this token in your next request to get the next page of results. If not provided, returns the first page of results. When there are no more results, the response will not include a continuationToken. Note: When backed by S3, this maps directly to S3\'s NextContinuationToken.
|
|
5148
|
+
*/
|
|
5149
|
+
async adminListTrashbinUserS3Files(userId, queryParams, options = { headers: {} }) {
|
|
5150
|
+
const localVarPath = this.basePath + '/api/admin/trashbin/users/{userId}/s3'
|
|
5151
|
+
.replace('{' + 'userId' + '}', encodeURIComponent(String(userId)));
|
|
5152
|
+
let localVarQueryParameters = {};
|
|
5153
|
+
let localVarHeaderParams = Object.assign({
|
|
5154
|
+
'User-Agent': 'edgeimpulse-api nodejs'
|
|
5155
|
+
}, this.defaultHeaders);
|
|
5156
|
+
const produces = ['application/json'];
|
|
5157
|
+
// give precedence to 'application/json'
|
|
5158
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
5159
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
5160
|
+
}
|
|
5161
|
+
else {
|
|
5162
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
5163
|
+
}
|
|
5164
|
+
let localVarFormParams = {};
|
|
5165
|
+
// verify required parameter 'userId' is not null or undefined
|
|
5166
|
+
if (userId === null || userId === undefined) {
|
|
5167
|
+
throw new Error('Required parameter userId was null or undefined when calling adminListTrashbinUserS3Files.');
|
|
5168
|
+
}
|
|
5169
|
+
// verify required parameter 'sourceBucket' is not null or undefined
|
|
5170
|
+
if (queryParams.sourceBucket === null || queryParams.sourceBucket === undefined) {
|
|
5171
|
+
throw new Error('Required parameter queryParams.sourceBucket was null or undefined when calling adminListTrashbinUserS3Files.');
|
|
5172
|
+
}
|
|
5173
|
+
if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.prefix) !== undefined) {
|
|
5174
|
+
localVarQueryParameters['prefix'] = models_1.ObjectSerializer.serialize(queryParams.prefix, "string");
|
|
5175
|
+
}
|
|
5176
|
+
if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.sourceBucket) !== undefined) {
|
|
5177
|
+
localVarQueryParameters['sourceBucket'] = models_1.ObjectSerializer.serialize(queryParams.sourceBucket, "'ingestion' | 'cdn' | 'user-data'");
|
|
5178
|
+
}
|
|
5179
|
+
if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.continuationToken) !== undefined) {
|
|
5180
|
+
localVarQueryParameters['continuationToken'] = models_1.ObjectSerializer.serialize(queryParams.continuationToken, "string");
|
|
5181
|
+
}
|
|
5182
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
5183
|
+
Object.assign(localVarHeaderParams, this.opts.extraHeaders);
|
|
5184
|
+
let localVarUseFormData = false;
|
|
5185
|
+
let localVarRequestOptions = {
|
|
5186
|
+
method: 'GET',
|
|
5187
|
+
qs: localVarQueryParameters,
|
|
5188
|
+
headers: localVarHeaderParams,
|
|
5189
|
+
uri: localVarPath,
|
|
5190
|
+
useQuerystring: this._useQuerystring,
|
|
5191
|
+
agentOptions: { keepAlive: false },
|
|
5192
|
+
json: true,
|
|
5193
|
+
};
|
|
5194
|
+
let authenticationPromise = Promise.resolve();
|
|
5195
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
|
|
5196
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
|
|
5197
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
|
|
5198
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
5199
|
+
return authenticationPromise.then(() => {
|
|
5200
|
+
if (Object.keys(localVarFormParams).length) {
|
|
5201
|
+
if (localVarUseFormData) {
|
|
5202
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
5203
|
+
}
|
|
5204
|
+
else {
|
|
5205
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
5206
|
+
}
|
|
5207
|
+
}
|
|
5208
|
+
return new Promise((resolve, reject) => {
|
|
5209
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
5210
|
+
if (error) {
|
|
5211
|
+
reject(error);
|
|
5212
|
+
}
|
|
5213
|
+
else {
|
|
5214
|
+
body = models_1.ObjectSerializer.deserialize(body, "ListPortalFilesInFolderResponse");
|
|
5215
|
+
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
5216
|
+
if (typeof body.success === 'boolean' && !body.success) {
|
|
5217
|
+
reject(new Error(body.error || errString));
|
|
5218
|
+
}
|
|
5219
|
+
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
5220
|
+
resolve(body);
|
|
5221
|
+
}
|
|
5222
|
+
else {
|
|
5223
|
+
reject(errString);
|
|
5224
|
+
}
|
|
5225
|
+
}
|
|
5226
|
+
});
|
|
5227
|
+
});
|
|
5228
|
+
});
|
|
5229
|
+
}
|
|
5230
|
+
/**
|
|
5231
|
+
* Permanently delete an organization from the trash bin. This is the final step in the deletion process and cannot be undone. The trash bin process works as follows: 1. When an organization is initially deleted with `fullDelete=true`, its data is moved to the trash bin 2. The organization remains in the trash bin for 30 days 3. During this period: - Data can be recovered if needed - The deletion can be cancelled - All files remain in their original structure 4. Using this endpoint will: - Permanently delete all organization data - Remove all files from S3/FSx storage - This action is irreversible Note: Only use this endpoint after the 30-day grace period or when permanent deletion is absolutely necessary.
|
|
5232
|
+
* @summary Permanently delete an organization
|
|
5233
|
+
* @param organizationId Organization ID
|
|
5234
|
+
*/
|
|
5235
|
+
async adminPermanentlyDeleteOrganization(organizationId, options = { headers: {} }) {
|
|
5236
|
+
const localVarPath = this.basePath + '/api/admin/trashbin/organizations/{organizationId}'
|
|
5237
|
+
.replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
|
|
5238
|
+
let localVarQueryParameters = {};
|
|
5239
|
+
let localVarHeaderParams = Object.assign({
|
|
5240
|
+
'User-Agent': 'edgeimpulse-api nodejs'
|
|
5241
|
+
}, this.defaultHeaders);
|
|
5242
|
+
const produces = ['application/json'];
|
|
5243
|
+
// give precedence to 'application/json'
|
|
5244
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
5245
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
5246
|
+
}
|
|
5247
|
+
else {
|
|
5248
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
5249
|
+
}
|
|
5250
|
+
let localVarFormParams = {};
|
|
5251
|
+
// verify required parameter 'organizationId' is not null or undefined
|
|
5252
|
+
if (organizationId === null || organizationId === undefined) {
|
|
5253
|
+
throw new Error('Required parameter organizationId was null or undefined when calling adminPermanentlyDeleteOrganization.');
|
|
5254
|
+
}
|
|
5255
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
5256
|
+
Object.assign(localVarHeaderParams, this.opts.extraHeaders);
|
|
5257
|
+
let localVarUseFormData = false;
|
|
5258
|
+
let localVarRequestOptions = {
|
|
5259
|
+
method: 'DELETE',
|
|
5260
|
+
qs: localVarQueryParameters,
|
|
5261
|
+
headers: localVarHeaderParams,
|
|
5262
|
+
uri: localVarPath,
|
|
5263
|
+
useQuerystring: this._useQuerystring,
|
|
5264
|
+
agentOptions: { keepAlive: false },
|
|
5265
|
+
json: true,
|
|
5266
|
+
};
|
|
5267
|
+
let authenticationPromise = Promise.resolve();
|
|
5268
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
|
|
5269
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
|
|
5270
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
|
|
5271
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
5272
|
+
return authenticationPromise.then(() => {
|
|
5273
|
+
if (Object.keys(localVarFormParams).length) {
|
|
5274
|
+
if (localVarUseFormData) {
|
|
5275
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
5276
|
+
}
|
|
5277
|
+
else {
|
|
5278
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
5279
|
+
}
|
|
5280
|
+
}
|
|
5281
|
+
return new Promise((resolve, reject) => {
|
|
5282
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
5283
|
+
if (error) {
|
|
5284
|
+
reject(error);
|
|
5285
|
+
}
|
|
5286
|
+
else {
|
|
5287
|
+
body = models_1.ObjectSerializer.deserialize(body, "StartJobResponse");
|
|
5288
|
+
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
5289
|
+
if (typeof body.success === 'boolean' && !body.success) {
|
|
5290
|
+
reject(new Error(body.error || errString));
|
|
5291
|
+
}
|
|
5292
|
+
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
5293
|
+
resolve(body);
|
|
5294
|
+
}
|
|
5295
|
+
else {
|
|
5296
|
+
reject(errString);
|
|
5297
|
+
}
|
|
5298
|
+
}
|
|
5299
|
+
});
|
|
5300
|
+
});
|
|
5301
|
+
});
|
|
5302
|
+
}
|
|
5303
|
+
/**
|
|
5304
|
+
* Permanently delete a project from the trash bin. This is the final step in the deletion process and cannot be undone. The trash bin process works as follows: 1. When a project is initially deleted with `fullDelete=true`, its data is moved to the trash bin 2. The project remains in the trash bin for 30 days 3. During this period: - Data can be recovered if needed - The deletion can be cancelled - All files remain in their original structure 4. Using this endpoint will: - Permanently delete all project data - Remove all files from S3/FSx storage - This action is irreversible Note: Only use this endpoint after the 30-day grace period or when permanent deletion is absolutely necessary.
|
|
5305
|
+
* @summary Permanently delete a project
|
|
5306
|
+
* @param projectId Project ID
|
|
5307
|
+
*/
|
|
5308
|
+
async adminPermanentlyDeleteProject(projectId, options = { headers: {} }) {
|
|
5309
|
+
const localVarPath = this.basePath + '/api/admin/trashbin/projects/{projectId}'
|
|
5310
|
+
.replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)));
|
|
5311
|
+
let localVarQueryParameters = {};
|
|
5312
|
+
let localVarHeaderParams = Object.assign({
|
|
5313
|
+
'User-Agent': 'edgeimpulse-api nodejs'
|
|
5314
|
+
}, this.defaultHeaders);
|
|
5315
|
+
const produces = ['application/json'];
|
|
5316
|
+
// give precedence to 'application/json'
|
|
5317
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
5318
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
5319
|
+
}
|
|
5320
|
+
else {
|
|
5321
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
5322
|
+
}
|
|
5323
|
+
let localVarFormParams = {};
|
|
5324
|
+
// verify required parameter 'projectId' is not null or undefined
|
|
5325
|
+
if (projectId === null || projectId === undefined) {
|
|
5326
|
+
throw new Error('Required parameter projectId was null or undefined when calling adminPermanentlyDeleteProject.');
|
|
5327
|
+
}
|
|
5328
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
5329
|
+
Object.assign(localVarHeaderParams, this.opts.extraHeaders);
|
|
5330
|
+
let localVarUseFormData = false;
|
|
5331
|
+
let localVarRequestOptions = {
|
|
5332
|
+
method: 'DELETE',
|
|
5333
|
+
qs: localVarQueryParameters,
|
|
5334
|
+
headers: localVarHeaderParams,
|
|
5335
|
+
uri: localVarPath,
|
|
5336
|
+
useQuerystring: this._useQuerystring,
|
|
5337
|
+
agentOptions: { keepAlive: false },
|
|
5338
|
+
json: true,
|
|
5339
|
+
};
|
|
5340
|
+
let authenticationPromise = Promise.resolve();
|
|
5341
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
|
|
5342
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
|
|
5343
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
|
|
5344
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
5345
|
+
return authenticationPromise.then(() => {
|
|
5346
|
+
if (Object.keys(localVarFormParams).length) {
|
|
5347
|
+
if (localVarUseFormData) {
|
|
5348
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
5349
|
+
}
|
|
5350
|
+
else {
|
|
5351
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
5352
|
+
}
|
|
5353
|
+
}
|
|
5354
|
+
return new Promise((resolve, reject) => {
|
|
5355
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
5356
|
+
if (error) {
|
|
5357
|
+
reject(error);
|
|
5358
|
+
}
|
|
5359
|
+
else {
|
|
5360
|
+
body = models_1.ObjectSerializer.deserialize(body, "StartJobResponse");
|
|
5361
|
+
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
5362
|
+
if (typeof body.success === 'boolean' && !body.success) {
|
|
5363
|
+
reject(new Error(body.error || errString));
|
|
5364
|
+
}
|
|
5365
|
+
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
5366
|
+
resolve(body);
|
|
5367
|
+
}
|
|
5368
|
+
else {
|
|
5369
|
+
reject(errString);
|
|
5370
|
+
}
|
|
5371
|
+
}
|
|
5372
|
+
});
|
|
5373
|
+
});
|
|
5374
|
+
});
|
|
5375
|
+
}
|
|
5376
|
+
/**
|
|
5377
|
+
* Permanently delete a user from the trash bin. This is the final step in the deletion process and cannot be undone. The trash bin process works as follows: 1. When a user is initially deleted with `fullDelete=true`, their data is moved to the trash bin 2. The user remains in the trash bin for 30 days 3. During this period: - Data can be recovered if needed - The deletion can be cancelled - All files remain in their original structure 4. Using this endpoint will: - Permanently delete all user data - Remove all files from S3/FSx storage - This action is irreversible Note: Only use this endpoint after the 30-day grace period or when permanent deletion is absolutely necessary.
|
|
5378
|
+
* @summary Permanently delete a user
|
|
5379
|
+
* @param userId User ID
|
|
5380
|
+
*/
|
|
5381
|
+
async adminPermanentlyDeleteUser(userId, options = { headers: {} }) {
|
|
5382
|
+
const localVarPath = this.basePath + '/api/admin/trashbin/users/{userId}'
|
|
5383
|
+
.replace('{' + 'userId' + '}', encodeURIComponent(String(userId)));
|
|
5384
|
+
let localVarQueryParameters = {};
|
|
5385
|
+
let localVarHeaderParams = Object.assign({
|
|
5386
|
+
'User-Agent': 'edgeimpulse-api nodejs'
|
|
5387
|
+
}, this.defaultHeaders);
|
|
5388
|
+
const produces = ['application/json'];
|
|
5389
|
+
// give precedence to 'application/json'
|
|
5390
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
5391
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
5392
|
+
}
|
|
5393
|
+
else {
|
|
5394
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
5395
|
+
}
|
|
5396
|
+
let localVarFormParams = {};
|
|
5397
|
+
// verify required parameter 'userId' is not null or undefined
|
|
5398
|
+
if (userId === null || userId === undefined) {
|
|
5399
|
+
throw new Error('Required parameter userId was null or undefined when calling adminPermanentlyDeleteUser.');
|
|
5400
|
+
}
|
|
5401
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
5402
|
+
Object.assign(localVarHeaderParams, this.opts.extraHeaders);
|
|
5403
|
+
let localVarUseFormData = false;
|
|
5404
|
+
let localVarRequestOptions = {
|
|
5405
|
+
method: 'DELETE',
|
|
5406
|
+
qs: localVarQueryParameters,
|
|
5407
|
+
headers: localVarHeaderParams,
|
|
5408
|
+
uri: localVarPath,
|
|
5409
|
+
useQuerystring: this._useQuerystring,
|
|
5410
|
+
agentOptions: { keepAlive: false },
|
|
5411
|
+
json: true,
|
|
5412
|
+
};
|
|
5413
|
+
let authenticationPromise = Promise.resolve();
|
|
5414
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
|
|
5415
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
|
|
5416
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
|
|
5417
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
5418
|
+
return authenticationPromise.then(() => {
|
|
5419
|
+
if (Object.keys(localVarFormParams).length) {
|
|
5420
|
+
if (localVarUseFormData) {
|
|
5421
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
5422
|
+
}
|
|
5423
|
+
else {
|
|
5424
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
5425
|
+
}
|
|
5426
|
+
}
|
|
5427
|
+
return new Promise((resolve, reject) => {
|
|
5428
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
5429
|
+
if (error) {
|
|
5430
|
+
reject(error);
|
|
5431
|
+
}
|
|
5432
|
+
else {
|
|
5433
|
+
body = models_1.ObjectSerializer.deserialize(body, "StartJobResponse");
|
|
5434
|
+
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
5435
|
+
if (typeof body.success === 'boolean' && !body.success) {
|
|
5436
|
+
reject(new Error(body.error || errString));
|
|
5437
|
+
}
|
|
5438
|
+
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
5439
|
+
resolve(body);
|
|
5440
|
+
}
|
|
5441
|
+
else {
|
|
5442
|
+
reject(errString);
|
|
5443
|
+
}
|
|
5444
|
+
}
|
|
5445
|
+
});
|
|
5446
|
+
});
|
|
5447
|
+
});
|
|
5448
|
+
}
|
|
4582
5449
|
/**
|
|
4583
5450
|
* Admin-only API to remove a user from an organization.
|
|
4584
5451
|
* @summary Remove user from an organization
|