edge-impulse-api 1.61.18 → 1.61.20
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/rawDataApi.d.ts +1 -63
- package/build/library/sdk/api/rawDataApi.js +0 -391
- package/build/library/sdk/api/rawDataApi.js.map +1 -1
- package/build/library/sdk/model/models.d.ts +0 -8
- package/build/library/sdk/model/models.js +0 -24
- package/build/library/sdk/model/models.js.map +1 -1
- package/build/library/sdk/model/projectInfoResponse.d.ts +0 -4
- package/build/library/sdk/model/projectInfoResponse.js +0 -5
- package/build/library/sdk/model/projectInfoResponse.js.map +1 -1
- package/build/library/sdk/model/projectInfoResponseAllOf.d.ts +0 -4
- package/build/library/sdk/model/projectInfoResponseAllOf.js +0 -5
- package/build/library/sdk/model/projectInfoResponseAllOf.js.map +1 -1
- package/build/library/sdk/model/updateProjectRequest.d.ts +0 -4
- package/build/library/sdk/model/updateProjectRequest.js +0 -5
- package/build/library/sdk/model/updateProjectRequest.js.map +1 -1
- package/package.json +1 -1
- package/build/library/sdk/model/autoLabelerSegment.d.ts +0 -31
- package/build/library/sdk/model/autoLabelerSegment.js +0 -59
- package/build/library/sdk/model/autoLabelerSegment.js.map +0 -1
- package/build/library/sdk/model/getAutoLabelerSegmentInfoResponse.d.ts +0 -37
- package/build/library/sdk/model/getAutoLabelerSegmentInfoResponse.js +0 -49
- package/build/library/sdk/model/getAutoLabelerSegmentInfoResponse.js.map +0 -1
- package/build/library/sdk/model/getAutoLabelerSegmentInfoResponseAllOf.d.ts +0 -29
- package/build/library/sdk/model/getAutoLabelerSegmentInfoResponseAllOf.js +0 -39
- package/build/library/sdk/model/getAutoLabelerSegmentInfoResponseAllOf.js.map +0 -1
- package/build/library/sdk/model/runAutoLabelerRequest.d.ts +0 -28
- package/build/library/sdk/model/runAutoLabelerRequest.js +0 -44
- package/build/library/sdk/model/runAutoLabelerRequest.js.map +0 -1
- package/build/library/sdk/model/saveAutoLabelerClustersRequest.d.ts +0 -26
- package/build/library/sdk/model/saveAutoLabelerClustersRequest.js +0 -29
- package/build/library/sdk/model/saveAutoLabelerClustersRequest.js.map +0 -1
- package/build/library/sdk/model/saveAutoLabelerClustersRequestClusters.d.ts +0 -26
- package/build/library/sdk/model/saveAutoLabelerClustersRequestClusters.js +0 -34
- package/build/library/sdk/model/saveAutoLabelerClustersRequestClusters.js.map +0 -1
- package/build/library/sdk/model/saveAutoLabelerClustersResponse.d.ts +0 -33
- package/build/library/sdk/model/saveAutoLabelerClustersResponse.js +0 -39
- package/build/library/sdk/model/saveAutoLabelerClustersResponse.js.map +0 -1
- package/build/library/sdk/model/saveAutoLabelerClustersResponseAllOf.d.ts +0 -25
- package/build/library/sdk/model/saveAutoLabelerClustersResponseAllOf.js +0 -29
- package/build/library/sdk/model/saveAutoLabelerClustersResponseAllOf.js.map +0 -1
|
@@ -21,10 +21,9 @@ import { EditSampleLabelRequest } from '../model/editSampleLabelRequest';
|
|
|
21
21
|
import { FindSegmentSampleRequest } from '../model/findSegmentSampleRequest';
|
|
22
22
|
import { FindSegmentSampleResponse } from '../model/findSegmentSampleResponse';
|
|
23
23
|
import { GenericApiResponse } from '../model/genericApiResponse';
|
|
24
|
+
import { StartJobResponse } from '../model/startJobResponse';
|
|
24
25
|
import { GetAIActionsProposedChangesResponse } from '../model/getAIActionsProposedChangesResponse';
|
|
25
26
|
import { GetAllImportedFromResponse } from '../model/getAllImportedFromResponse';
|
|
26
|
-
import { GetAutoLabelerResponse } from '../model/getAutoLabelerResponse';
|
|
27
|
-
import { GetAutoLabelerSegmentInfoResponse } from '../model/getAutoLabelerSegmentInfoResponse';
|
|
28
27
|
import { GetDataExplorerFeaturesResponse } from '../model/getDataExplorerFeaturesResponse';
|
|
29
28
|
import { GetDataExplorerSettingsResponse } from '../model/getDataExplorerSettingsResponse';
|
|
30
29
|
import { GetDiversityDataResponse } from '../model/getDiversityDataResponse';
|
|
@@ -40,16 +39,12 @@ import { ObjectDetectionLabelQueueCountResponse } from '../model/objectDetection
|
|
|
40
39
|
import { ObjectDetectionLabelQueueResponse } from '../model/objectDetectionLabelQueueResponse';
|
|
41
40
|
import { RebalanceDatasetResponse } from '../model/rebalanceDatasetResponse';
|
|
42
41
|
import { RenameSampleRequest } from '../model/renameSampleRequest';
|
|
43
|
-
import { RunAutoLabelerRequest } from '../model/runAutoLabelerRequest';
|
|
44
42
|
import { SampleBoundingBoxesRequest } from '../model/sampleBoundingBoxesRequest';
|
|
45
|
-
import { SaveAutoLabelerClustersRequest } from '../model/saveAutoLabelerClustersRequest';
|
|
46
|
-
import { SaveAutoLabelerClustersResponse } from '../model/saveAutoLabelerClustersResponse';
|
|
47
43
|
import { SegmentSampleRequest } from '../model/segmentSampleRequest';
|
|
48
44
|
import { SetSampleMetadataRequest } from '../model/setSampleMetadataRequest';
|
|
49
45
|
import { SetSampleProposedChangesRequest } from '../model/setSampleProposedChangesRequest';
|
|
50
46
|
import { SetSampleStructuredLabelsRequest } from '../model/setSampleStructuredLabelsRequest';
|
|
51
47
|
import { SplitSampleInFramesRequest } from '../model/splitSampleInFramesRequest';
|
|
52
|
-
import { StartJobResponse } from '../model/startJobResponse';
|
|
53
48
|
import { StoreSegmentLengthRequest } from '../model/storeSegmentLengthRequest';
|
|
54
49
|
import { TrackObjectsRequest } from '../model/trackObjectsRequest';
|
|
55
50
|
import { TrackObjectsResponse } from '../model/trackObjectsResponse';
|
|
@@ -189,9 +184,6 @@ type getAllImportedFromQueryParams = {
|
|
|
189
184
|
limit?: number;
|
|
190
185
|
offset?: number;
|
|
191
186
|
};
|
|
192
|
-
type getAutoLabelerImageQueryParams = {
|
|
193
|
-
image: string;
|
|
194
|
-
};
|
|
195
187
|
type getSampleQueryParams = {
|
|
196
188
|
limitPayloadValues?: number;
|
|
197
189
|
cacheKey?: string;
|
|
@@ -616,38 +608,6 @@ export declare class RawDataApi {
|
|
|
616
608
|
[name: string]: string;
|
|
617
609
|
};
|
|
618
610
|
}): Promise<GetAllImportedFromResponse>;
|
|
619
|
-
/**
|
|
620
|
-
* Retrieve the results of the auto-labeler (after running `StartJobResponse`)
|
|
621
|
-
* @summary Get auto-labeler results
|
|
622
|
-
* @param projectId Project ID
|
|
623
|
-
*/
|
|
624
|
-
getAutoLabeler(projectId: number, options?: {
|
|
625
|
-
headers: {
|
|
626
|
-
[name: string]: string;
|
|
627
|
-
};
|
|
628
|
-
}): Promise<GetAutoLabelerResponse>;
|
|
629
|
-
/**
|
|
630
|
-
* Grab a segment image from the auto-labeler
|
|
631
|
-
* @summary Get auto-labeler image
|
|
632
|
-
* @param projectId Project ID
|
|
633
|
-
* @param image Which image to receive from the auto-labeler
|
|
634
|
-
*/
|
|
635
|
-
getAutoLabelerImage(projectId: number, queryParams: getAutoLabelerImageQueryParams, options?: {
|
|
636
|
-
headers: {
|
|
637
|
-
[name: string]: string;
|
|
638
|
-
};
|
|
639
|
-
}): Promise<Buffer>;
|
|
640
|
-
/**
|
|
641
|
-
* Get info from a specific segment in an image. Pass in both sampleId and segmentId in the URL.
|
|
642
|
-
* @summary View auto-labeler segment info
|
|
643
|
-
* @param projectId Project ID
|
|
644
|
-
* @param sampleId Sample ID
|
|
645
|
-
*/
|
|
646
|
-
getAutoLabelerSegmentInfo(projectId: number, sampleId: number, options?: {
|
|
647
|
-
headers: {
|
|
648
|
-
[name: string]: string;
|
|
649
|
-
};
|
|
650
|
-
}): Promise<GetAutoLabelerSegmentInfoResponse>;
|
|
651
611
|
/**
|
|
652
612
|
* t-SNE2 output of the raw dataset
|
|
653
613
|
* @summary Get data explorer features
|
|
@@ -937,28 +897,6 @@ export declare class RawDataApi {
|
|
|
937
897
|
[name: string]: string;
|
|
938
898
|
};
|
|
939
899
|
}): Promise<GenericApiResponse>;
|
|
940
|
-
/**
|
|
941
|
-
* Run the auto-labeler over all unlabeled data.
|
|
942
|
-
* @summary Run auto-labeler job
|
|
943
|
-
* @param projectId Project ID
|
|
944
|
-
* @param runAutoLabelerRequest
|
|
945
|
-
*/
|
|
946
|
-
runAutoLabeler(projectId: number, runAutoLabelerRequest: RunAutoLabelerRequest, options?: {
|
|
947
|
-
headers: {
|
|
948
|
-
[name: string]: string;
|
|
949
|
-
};
|
|
950
|
-
}): Promise<StartJobResponse>;
|
|
951
|
-
/**
|
|
952
|
-
* Set labels for all auto-segment clusters.
|
|
953
|
-
* @summary Save auto-labeler clusters
|
|
954
|
-
* @param projectId Project ID
|
|
955
|
-
* @param saveAutoLabelerClustersRequest
|
|
956
|
-
*/
|
|
957
|
-
saveAutoLabelerClusters(projectId: number, saveAutoLabelerClustersRequest: SaveAutoLabelerClustersRequest, options?: {
|
|
958
|
-
headers: {
|
|
959
|
-
[name: string]: string;
|
|
960
|
-
};
|
|
961
|
-
}): Promise<SaveAutoLabelerClustersResponse>;
|
|
962
900
|
/**
|
|
963
901
|
* Slice a sample into multiple segments. The original file will be marked as deleted, but you can crop any created segment to retrieve the original file.
|
|
964
902
|
* @summary Segment sample
|
|
@@ -2250,239 +2250,6 @@ class RawDataApi {
|
|
|
2250
2250
|
});
|
|
2251
2251
|
});
|
|
2252
2252
|
}
|
|
2253
|
-
/**
|
|
2254
|
-
* Retrieve the results of the auto-labeler (after running `StartJobResponse`)
|
|
2255
|
-
* @summary Get auto-labeler results
|
|
2256
|
-
* @param projectId Project ID
|
|
2257
|
-
*/
|
|
2258
|
-
async getAutoLabeler(projectId, options = { headers: {} }) {
|
|
2259
|
-
const localVarPath = this.basePath + '/api/{projectId}/raw-data/auto-labeler'
|
|
2260
|
-
.replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)));
|
|
2261
|
-
let localVarQueryParameters = {};
|
|
2262
|
-
let localVarHeaderParams = Object.assign({
|
|
2263
|
-
'User-Agent': 'edgeimpulse-api nodejs'
|
|
2264
|
-
}, this.defaultHeaders);
|
|
2265
|
-
const produces = ['application/json'];
|
|
2266
|
-
// give precedence to 'application/json'
|
|
2267
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
2268
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
2269
|
-
}
|
|
2270
|
-
else {
|
|
2271
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
2272
|
-
}
|
|
2273
|
-
let localVarFormParams = {};
|
|
2274
|
-
// verify required parameter 'projectId' is not null or undefined
|
|
2275
|
-
if (projectId === null || projectId === undefined) {
|
|
2276
|
-
throw new Error('Required parameter projectId was null or undefined when calling getAutoLabeler.');
|
|
2277
|
-
}
|
|
2278
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
2279
|
-
Object.assign(localVarHeaderParams, this.opts.extraHeaders);
|
|
2280
|
-
let localVarUseFormData = false;
|
|
2281
|
-
let localVarRequestOptions = {
|
|
2282
|
-
method: 'GET',
|
|
2283
|
-
qs: localVarQueryParameters,
|
|
2284
|
-
headers: localVarHeaderParams,
|
|
2285
|
-
uri: localVarPath,
|
|
2286
|
-
useQuerystring: this._useQuerystring,
|
|
2287
|
-
agentOptions: { keepAlive: false },
|
|
2288
|
-
json: true,
|
|
2289
|
-
};
|
|
2290
|
-
let authenticationPromise = Promise.resolve();
|
|
2291
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
|
|
2292
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
|
|
2293
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
|
|
2294
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
2295
|
-
return authenticationPromise.then(() => {
|
|
2296
|
-
if (Object.keys(localVarFormParams).length) {
|
|
2297
|
-
if (localVarUseFormData) {
|
|
2298
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
2299
|
-
}
|
|
2300
|
-
else {
|
|
2301
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
2302
|
-
}
|
|
2303
|
-
}
|
|
2304
|
-
return new Promise((resolve, reject) => {
|
|
2305
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
2306
|
-
if (error) {
|
|
2307
|
-
reject(error);
|
|
2308
|
-
}
|
|
2309
|
-
else {
|
|
2310
|
-
body = models_1.ObjectSerializer.deserialize(body, "GetAutoLabelerResponse");
|
|
2311
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
2312
|
-
if (typeof body.success === 'boolean' && !body.success) {
|
|
2313
|
-
reject(new Error(body.error || errString));
|
|
2314
|
-
}
|
|
2315
|
-
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
2316
|
-
resolve(body);
|
|
2317
|
-
}
|
|
2318
|
-
else {
|
|
2319
|
-
reject(errString);
|
|
2320
|
-
}
|
|
2321
|
-
}
|
|
2322
|
-
});
|
|
2323
|
-
});
|
|
2324
|
-
});
|
|
2325
|
-
}
|
|
2326
|
-
/**
|
|
2327
|
-
* Grab a segment image from the auto-labeler
|
|
2328
|
-
* @summary Get auto-labeler image
|
|
2329
|
-
* @param projectId Project ID
|
|
2330
|
-
* @param image Which image to receive from the auto-labeler
|
|
2331
|
-
*/
|
|
2332
|
-
async getAutoLabelerImage(projectId, queryParams, options = { headers: {} }) {
|
|
2333
|
-
const localVarPath = this.basePath + '/api/{projectId}/raw-data/auto-labeler/image'
|
|
2334
|
-
.replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)));
|
|
2335
|
-
let localVarQueryParameters = {};
|
|
2336
|
-
let localVarHeaderParams = Object.assign({
|
|
2337
|
-
'User-Agent': 'edgeimpulse-api nodejs'
|
|
2338
|
-
}, this.defaultHeaders);
|
|
2339
|
-
const produces = ['application/octet-stream'];
|
|
2340
|
-
// give precedence to 'application/json'
|
|
2341
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
2342
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
2343
|
-
}
|
|
2344
|
-
else {
|
|
2345
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
2346
|
-
}
|
|
2347
|
-
let localVarFormParams = {};
|
|
2348
|
-
// verify required parameter 'projectId' is not null or undefined
|
|
2349
|
-
if (projectId === null || projectId === undefined) {
|
|
2350
|
-
throw new Error('Required parameter projectId was null or undefined when calling getAutoLabelerImage.');
|
|
2351
|
-
}
|
|
2352
|
-
// verify required parameter 'image' is not null or undefined
|
|
2353
|
-
if (queryParams.image === null || queryParams.image === undefined) {
|
|
2354
|
-
throw new Error('Required parameter queryParams.image was null or undefined when calling getAutoLabelerImage.');
|
|
2355
|
-
}
|
|
2356
|
-
if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.image) !== undefined) {
|
|
2357
|
-
localVarQueryParameters['image'] = models_1.ObjectSerializer.serialize(queryParams.image, "string");
|
|
2358
|
-
}
|
|
2359
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
2360
|
-
Object.assign(localVarHeaderParams, this.opts.extraHeaders);
|
|
2361
|
-
let localVarUseFormData = false;
|
|
2362
|
-
let localVarRequestOptions = {
|
|
2363
|
-
method: 'GET',
|
|
2364
|
-
qs: localVarQueryParameters,
|
|
2365
|
-
headers: localVarHeaderParams,
|
|
2366
|
-
uri: localVarPath,
|
|
2367
|
-
useQuerystring: this._useQuerystring,
|
|
2368
|
-
agentOptions: { keepAlive: false },
|
|
2369
|
-
encoding: null,
|
|
2370
|
-
};
|
|
2371
|
-
let authenticationPromise = Promise.resolve();
|
|
2372
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
|
|
2373
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
|
|
2374
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
|
|
2375
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
2376
|
-
return authenticationPromise.then(() => {
|
|
2377
|
-
if (Object.keys(localVarFormParams).length) {
|
|
2378
|
-
if (localVarUseFormData) {
|
|
2379
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
2380
|
-
}
|
|
2381
|
-
else {
|
|
2382
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
2383
|
-
}
|
|
2384
|
-
}
|
|
2385
|
-
return new Promise((resolve, reject) => {
|
|
2386
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
2387
|
-
if (error) {
|
|
2388
|
-
reject(error);
|
|
2389
|
-
}
|
|
2390
|
-
else {
|
|
2391
|
-
body = models_1.ObjectSerializer.deserialize(body, "Buffer");
|
|
2392
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
2393
|
-
if (typeof body.success === 'boolean' && !body.success) {
|
|
2394
|
-
reject(new Error(body.error || errString));
|
|
2395
|
-
}
|
|
2396
|
-
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
2397
|
-
resolve(body);
|
|
2398
|
-
}
|
|
2399
|
-
else {
|
|
2400
|
-
reject(errString);
|
|
2401
|
-
}
|
|
2402
|
-
}
|
|
2403
|
-
});
|
|
2404
|
-
});
|
|
2405
|
-
});
|
|
2406
|
-
}
|
|
2407
|
-
/**
|
|
2408
|
-
* Get info from a specific segment in an image. Pass in both sampleId and segmentId in the URL.
|
|
2409
|
-
* @summary View auto-labeler segment info
|
|
2410
|
-
* @param projectId Project ID
|
|
2411
|
-
* @param sampleId Sample ID
|
|
2412
|
-
*/
|
|
2413
|
-
async getAutoLabelerSegmentInfo(projectId, sampleId, options = { headers: {} }) {
|
|
2414
|
-
const localVarPath = this.basePath + '/api/{projectId}/raw-data/auto-labeler/samples/{sampleId}/segments'
|
|
2415
|
-
.replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)))
|
|
2416
|
-
.replace('{' + 'sampleId' + '}', encodeURIComponent(String(sampleId)));
|
|
2417
|
-
let localVarQueryParameters = {};
|
|
2418
|
-
let localVarHeaderParams = Object.assign({
|
|
2419
|
-
'User-Agent': 'edgeimpulse-api nodejs'
|
|
2420
|
-
}, this.defaultHeaders);
|
|
2421
|
-
const produces = ['application/json'];
|
|
2422
|
-
// give precedence to 'application/json'
|
|
2423
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
2424
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
2425
|
-
}
|
|
2426
|
-
else {
|
|
2427
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
2428
|
-
}
|
|
2429
|
-
let localVarFormParams = {};
|
|
2430
|
-
// verify required parameter 'projectId' is not null or undefined
|
|
2431
|
-
if (projectId === null || projectId === undefined) {
|
|
2432
|
-
throw new Error('Required parameter projectId was null or undefined when calling getAutoLabelerSegmentInfo.');
|
|
2433
|
-
}
|
|
2434
|
-
// verify required parameter 'sampleId' is not null or undefined
|
|
2435
|
-
if (sampleId === null || sampleId === undefined) {
|
|
2436
|
-
throw new Error('Required parameter sampleId was null or undefined when calling getAutoLabelerSegmentInfo.');
|
|
2437
|
-
}
|
|
2438
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
2439
|
-
Object.assign(localVarHeaderParams, this.opts.extraHeaders);
|
|
2440
|
-
let localVarUseFormData = false;
|
|
2441
|
-
let localVarRequestOptions = {
|
|
2442
|
-
method: 'GET',
|
|
2443
|
-
qs: localVarQueryParameters,
|
|
2444
|
-
headers: localVarHeaderParams,
|
|
2445
|
-
uri: localVarPath,
|
|
2446
|
-
useQuerystring: this._useQuerystring,
|
|
2447
|
-
agentOptions: { keepAlive: false },
|
|
2448
|
-
json: true,
|
|
2449
|
-
};
|
|
2450
|
-
let authenticationPromise = Promise.resolve();
|
|
2451
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
|
|
2452
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
|
|
2453
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
|
|
2454
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
2455
|
-
return authenticationPromise.then(() => {
|
|
2456
|
-
if (Object.keys(localVarFormParams).length) {
|
|
2457
|
-
if (localVarUseFormData) {
|
|
2458
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
2459
|
-
}
|
|
2460
|
-
else {
|
|
2461
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
2462
|
-
}
|
|
2463
|
-
}
|
|
2464
|
-
return new Promise((resolve, reject) => {
|
|
2465
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
2466
|
-
if (error) {
|
|
2467
|
-
reject(error);
|
|
2468
|
-
}
|
|
2469
|
-
else {
|
|
2470
|
-
body = models_1.ObjectSerializer.deserialize(body, "GetAutoLabelerSegmentInfoResponse");
|
|
2471
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
2472
|
-
if (typeof body.success === 'boolean' && !body.success) {
|
|
2473
|
-
reject(new Error(body.error || errString));
|
|
2474
|
-
}
|
|
2475
|
-
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
2476
|
-
resolve(body);
|
|
2477
|
-
}
|
|
2478
|
-
else {
|
|
2479
|
-
reject(errString);
|
|
2480
|
-
}
|
|
2481
|
-
}
|
|
2482
|
-
});
|
|
2483
|
-
});
|
|
2484
|
-
});
|
|
2485
|
-
}
|
|
2486
2253
|
/**
|
|
2487
2254
|
* t-SNE2 output of the raw dataset
|
|
2488
2255
|
* @summary Get data explorer features
|
|
@@ -4473,164 +4240,6 @@ class RawDataApi {
|
|
|
4473
4240
|
});
|
|
4474
4241
|
});
|
|
4475
4242
|
}
|
|
4476
|
-
/**
|
|
4477
|
-
* Run the auto-labeler over all unlabeled data.
|
|
4478
|
-
* @summary Run auto-labeler job
|
|
4479
|
-
* @param projectId Project ID
|
|
4480
|
-
* @param runAutoLabelerRequest
|
|
4481
|
-
*/
|
|
4482
|
-
async runAutoLabeler(projectId, runAutoLabelerRequest, options = { headers: {} }) {
|
|
4483
|
-
const localVarPath = this.basePath + '/api/{projectId}/raw-data/auto-labeler/run'
|
|
4484
|
-
.replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)));
|
|
4485
|
-
let localVarQueryParameters = {};
|
|
4486
|
-
let localVarHeaderParams = Object.assign({
|
|
4487
|
-
'User-Agent': 'edgeimpulse-api nodejs'
|
|
4488
|
-
}, this.defaultHeaders);
|
|
4489
|
-
const produces = ['application/json'];
|
|
4490
|
-
// give precedence to 'application/json'
|
|
4491
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
4492
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
4493
|
-
}
|
|
4494
|
-
else {
|
|
4495
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
4496
|
-
}
|
|
4497
|
-
let localVarFormParams = {};
|
|
4498
|
-
// verify required parameter 'projectId' is not null or undefined
|
|
4499
|
-
if (projectId === null || projectId === undefined) {
|
|
4500
|
-
throw new Error('Required parameter projectId was null or undefined when calling runAutoLabeler.');
|
|
4501
|
-
}
|
|
4502
|
-
// verify required parameter 'runAutoLabelerRequest' is not null or undefined
|
|
4503
|
-
if (runAutoLabelerRequest === null || runAutoLabelerRequest === undefined) {
|
|
4504
|
-
throw new Error('Required parameter runAutoLabelerRequest was null or undefined when calling runAutoLabeler.');
|
|
4505
|
-
}
|
|
4506
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
4507
|
-
Object.assign(localVarHeaderParams, this.opts.extraHeaders);
|
|
4508
|
-
let localVarUseFormData = false;
|
|
4509
|
-
let localVarRequestOptions = {
|
|
4510
|
-
method: 'POST',
|
|
4511
|
-
qs: localVarQueryParameters,
|
|
4512
|
-
headers: localVarHeaderParams,
|
|
4513
|
-
uri: localVarPath,
|
|
4514
|
-
useQuerystring: this._useQuerystring,
|
|
4515
|
-
agentOptions: { keepAlive: false },
|
|
4516
|
-
json: true,
|
|
4517
|
-
body: models_1.ObjectSerializer.serialize(runAutoLabelerRequest, "RunAutoLabelerRequest")
|
|
4518
|
-
};
|
|
4519
|
-
let authenticationPromise = Promise.resolve();
|
|
4520
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
|
|
4521
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
|
|
4522
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
|
|
4523
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
4524
|
-
return authenticationPromise.then(() => {
|
|
4525
|
-
if (Object.keys(localVarFormParams).length) {
|
|
4526
|
-
if (localVarUseFormData) {
|
|
4527
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
4528
|
-
}
|
|
4529
|
-
else {
|
|
4530
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
4531
|
-
}
|
|
4532
|
-
}
|
|
4533
|
-
return new Promise((resolve, reject) => {
|
|
4534
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
4535
|
-
if (error) {
|
|
4536
|
-
reject(error);
|
|
4537
|
-
}
|
|
4538
|
-
else {
|
|
4539
|
-
body = models_1.ObjectSerializer.deserialize(body, "StartJobResponse");
|
|
4540
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
4541
|
-
if (typeof body.success === 'boolean' && !body.success) {
|
|
4542
|
-
reject(new Error(body.error || errString));
|
|
4543
|
-
}
|
|
4544
|
-
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
4545
|
-
resolve(body);
|
|
4546
|
-
}
|
|
4547
|
-
else {
|
|
4548
|
-
reject(errString);
|
|
4549
|
-
}
|
|
4550
|
-
}
|
|
4551
|
-
});
|
|
4552
|
-
});
|
|
4553
|
-
});
|
|
4554
|
-
}
|
|
4555
|
-
/**
|
|
4556
|
-
* Set labels for all auto-segment clusters.
|
|
4557
|
-
* @summary Save auto-labeler clusters
|
|
4558
|
-
* @param projectId Project ID
|
|
4559
|
-
* @param saveAutoLabelerClustersRequest
|
|
4560
|
-
*/
|
|
4561
|
-
async saveAutoLabelerClusters(projectId, saveAutoLabelerClustersRequest, options = { headers: {} }) {
|
|
4562
|
-
const localVarPath = this.basePath + '/api/{projectId}/raw-data/auto-labeler/save'
|
|
4563
|
-
.replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)));
|
|
4564
|
-
let localVarQueryParameters = {};
|
|
4565
|
-
let localVarHeaderParams = Object.assign({
|
|
4566
|
-
'User-Agent': 'edgeimpulse-api nodejs'
|
|
4567
|
-
}, this.defaultHeaders);
|
|
4568
|
-
const produces = ['application/json'];
|
|
4569
|
-
// give precedence to 'application/json'
|
|
4570
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
4571
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
4572
|
-
}
|
|
4573
|
-
else {
|
|
4574
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
4575
|
-
}
|
|
4576
|
-
let localVarFormParams = {};
|
|
4577
|
-
// verify required parameter 'projectId' is not null or undefined
|
|
4578
|
-
if (projectId === null || projectId === undefined) {
|
|
4579
|
-
throw new Error('Required parameter projectId was null or undefined when calling saveAutoLabelerClusters.');
|
|
4580
|
-
}
|
|
4581
|
-
// verify required parameter 'saveAutoLabelerClustersRequest' is not null or undefined
|
|
4582
|
-
if (saveAutoLabelerClustersRequest === null || saveAutoLabelerClustersRequest === undefined) {
|
|
4583
|
-
throw new Error('Required parameter saveAutoLabelerClustersRequest was null or undefined when calling saveAutoLabelerClusters.');
|
|
4584
|
-
}
|
|
4585
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
4586
|
-
Object.assign(localVarHeaderParams, this.opts.extraHeaders);
|
|
4587
|
-
let localVarUseFormData = false;
|
|
4588
|
-
let localVarRequestOptions = {
|
|
4589
|
-
method: 'POST',
|
|
4590
|
-
qs: localVarQueryParameters,
|
|
4591
|
-
headers: localVarHeaderParams,
|
|
4592
|
-
uri: localVarPath,
|
|
4593
|
-
useQuerystring: this._useQuerystring,
|
|
4594
|
-
agentOptions: { keepAlive: false },
|
|
4595
|
-
json: true,
|
|
4596
|
-
body: models_1.ObjectSerializer.serialize(saveAutoLabelerClustersRequest, "SaveAutoLabelerClustersRequest")
|
|
4597
|
-
};
|
|
4598
|
-
let authenticationPromise = Promise.resolve();
|
|
4599
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
|
|
4600
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
|
|
4601
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
|
|
4602
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
4603
|
-
return authenticationPromise.then(() => {
|
|
4604
|
-
if (Object.keys(localVarFormParams).length) {
|
|
4605
|
-
if (localVarUseFormData) {
|
|
4606
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
4607
|
-
}
|
|
4608
|
-
else {
|
|
4609
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
4610
|
-
}
|
|
4611
|
-
}
|
|
4612
|
-
return new Promise((resolve, reject) => {
|
|
4613
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
4614
|
-
if (error) {
|
|
4615
|
-
reject(error);
|
|
4616
|
-
}
|
|
4617
|
-
else {
|
|
4618
|
-
body = models_1.ObjectSerializer.deserialize(body, "SaveAutoLabelerClustersResponse");
|
|
4619
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
4620
|
-
if (typeof body.success === 'boolean' && !body.success) {
|
|
4621
|
-
reject(new Error(body.error || errString));
|
|
4622
|
-
}
|
|
4623
|
-
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
4624
|
-
resolve(body);
|
|
4625
|
-
}
|
|
4626
|
-
else {
|
|
4627
|
-
reject(errString);
|
|
4628
|
-
}
|
|
4629
|
-
}
|
|
4630
|
-
});
|
|
4631
|
-
});
|
|
4632
|
-
});
|
|
4633
|
-
}
|
|
4634
4243
|
/**
|
|
4635
4244
|
* Slice a sample into multiple segments. The original file will be marked as deleted, but you can crop any created segment to retrieve the original file.
|
|
4636
4245
|
* @summary Segment sample
|