edge-impulse-api 1.92.23 → 1.92.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/build/library/sdk/api/rawDataApi.d.ts +25 -25
  2. package/build/library/sdk/api/rawDataApi.js +56 -56
  3. package/build/library/sdk/api/rawDataApi.js.map +1 -1
  4. package/build/library/sdk/model/{datasetStratificationOptions.d.ts → datasetSplitOptions.d.ts} +7 -9
  5. package/build/library/sdk/model/{datasetStratificationOptions.js → datasetSplitOptions.js} +15 -15
  6. package/build/library/sdk/model/datasetSplitOptions.js.map +1 -0
  7. package/build/library/sdk/model/datasetSplitOptionsStratifyBy.d.ts +35 -0
  8. package/build/library/sdk/model/datasetSplitOptionsStratifyBy.js +37 -0
  9. package/build/library/sdk/model/datasetSplitOptionsStratifyBy.js.map +1 -0
  10. package/build/library/sdk/model/{datasetStratificationPreviewData.d.ts → datasetSplitPreview.d.ts} +4 -3
  11. package/build/library/sdk/model/datasetSplitPreview.js +34 -0
  12. package/build/library/sdk/model/datasetSplitPreview.js.map +1 -0
  13. package/build/library/sdk/model/{datasetStratificationPreviewResponse.d.ts → datasetSplitPreviewResponse.d.ts} +3 -3
  14. package/build/library/sdk/model/{datasetStratificationPreviewResponse.js → datasetSplitPreviewResponse.js} +8 -8
  15. package/build/library/sdk/model/datasetSplitPreviewResponse.js.map +1 -0
  16. package/build/library/sdk/model/{datasetStratificationPreviewDataData.d.ts → datasetSplitPreviewResponseAllOf.d.ts} +3 -5
  17. package/build/library/sdk/model/{datasetStratificationPreviewData.js → datasetSplitPreviewResponseAllOf.js} +8 -8
  18. package/build/library/sdk/model/datasetSplitPreviewResponseAllOf.js.map +1 -0
  19. package/build/library/sdk/model/datasetSplitPreviewRow.d.ts +32 -0
  20. package/build/library/sdk/model/datasetSplitPreviewRow.js +55 -0
  21. package/build/library/sdk/model/datasetSplitPreviewRow.js.map +1 -0
  22. package/build/library/sdk/model/datasetSplitPreviewSection.d.ts +29 -0
  23. package/build/library/sdk/model/datasetSplitPreviewSection.js +44 -0
  24. package/build/library/sdk/model/datasetSplitPreviewSection.js.map +1 -0
  25. package/build/library/sdk/model/models.d.ts +7 -4
  26. package/build/library/sdk/model/models.js +22 -12
  27. package/build/library/sdk/model/models.js.map +1 -1
  28. package/build/library/sdk/model/projectInfoResponse.d.ts +2 -2
  29. package/build/library/sdk/model/projectInfoResponse.js +3 -3
  30. package/build/library/sdk/model/projectInfoResponse.js.map +1 -1
  31. package/build/library/sdk/model/projectInfoResponseAllOf.d.ts +2 -2
  32. package/build/library/sdk/model/projectInfoResponseAllOf.js +3 -3
  33. package/build/library/sdk/model/projectInfoResponseAllOf.js.map +1 -1
  34. package/package.json +1 -1
  35. package/build/library/sdk/model/datasetStratificationOptions.js.map +0 -1
  36. package/build/library/sdk/model/datasetStratificationPreviewData.js.map +0 -1
  37. package/build/library/sdk/model/datasetStratificationPreviewDataData.js +0 -44
  38. package/build/library/sdk/model/datasetStratificationPreviewDataData.js.map +0 -1
  39. package/build/library/sdk/model/datasetStratificationPreviewResponse.js.map +0 -1
@@ -21,8 +21,8 @@ import { CropSampleRequest } from '../model/cropSampleRequest';
21
21
  import { CropSampleResponse } from '../model/cropSampleResponse';
22
22
  import { DataExplorerPredictionsResponse } from '../model/dataExplorerPredictionsResponse';
23
23
  import { DataExplorerSettings } from '../model/dataExplorerSettings';
24
- import { DatasetStratificationOptions } from '../model/datasetStratificationOptions';
25
- import { DatasetStratificationPreviewResponse } from '../model/datasetStratificationPreviewResponse';
24
+ import { DatasetSplitOptions } from '../model/datasetSplitOptions';
25
+ import { DatasetSplitPreviewResponse } from '../model/datasetSplitPreviewResponse';
26
26
  import { EditSampleLabelRequest } from '../model/editSampleLabelRequest';
27
27
  import { FindSegmentSampleRequest } from '../model/findSegmentSampleRequest';
28
28
  import { FindSegmentSampleResponse } from '../model/findSegmentSampleResponse';
@@ -1129,15 +1129,15 @@ export declare class RawDataApi {
1129
1129
  };
1130
1130
  }): Promise<GetSampleResponse>;
1131
1131
  /**
1132
- * Returns the results of a previously requested stratification preview job. This endpoint is used to retrieve the results after a stratification preview job has been started.
1133
- * @summary Get stratify preview results
1132
+ * Returns the results of a previously requested split preview job. This endpoint is used to retrieve the results after a split preview job has been started.
1133
+ * @summary Get split preview results
1134
1134
  * @param projectId Project ID
1135
1135
  */
1136
- getStratifyPreviewResults(projectId: number, options?: {
1136
+ getSplitPreviewResults(projectId: number, options?: {
1137
1137
  headers: {
1138
1138
  [name: string]: string;
1139
1139
  };
1140
- }): Promise<DatasetStratificationPreviewResponse>;
1140
+ }): Promise<DatasetSplitPreviewResponse>;
1141
1141
  /**
1142
1142
  * Get the original, uncropped, downsampled data.
1143
1143
  * @summary Get the original downsampled data
@@ -1380,50 +1380,50 @@ export declare class RawDataApi {
1380
1380
  };
1381
1381
  }): Promise<GenericApiResponse>;
1382
1382
  /**
1383
- * Split a video sample into individual frames. Depending on the length of the video sample this will either execute immediately or return the ID of a job that will perform this action.
1384
- * @summary Split sample into frames
1383
+ * Performs a deterministic, in-place split of the project\'s dataset into \"training\", \"testing\", and optional \"validation\" sets. Split balancing can use the label, one or more metadata keys, or both as a composite grouping signal. Related samples can also be kept together across splits by metadata key. This is a deterministic process based on the hash of the name of the data. Returns immediately on small datasets, or starts a job on larger datasets. For example: { \"trainingSplitRatio\": 0.8, \"testingSplitRatio\": 0.1, \"validationSplitRatio\": 0.1, \"excludeDisabledSamples\": false, \"stratifyBy\": { \"label\": true, \"metadataKeys\": [\"site\", \"scanner\"] }, \"keepTogetherMetadataKeys\": [\"capture_group\"] } With these options, label/site/scanner are used to balance the split, while samples sharing the same capture_group value stay in the same split bucket.
1384
+ * @summary Split dataset
1385
1385
  * @param projectId Project ID
1386
- * @param sampleId Sample ID
1387
- * @param splitSampleInFramesRequest
1386
+ * @param datasetSplitOptions
1388
1387
  */
1389
- splitSampleInFrames(projectId: number, sampleId: number, splitSampleInFramesRequest: SplitSampleInFramesRequest, options?: {
1388
+ splitDataset(projectId: number, datasetSplitOptions: DatasetSplitOptions, options?: {
1390
1389
  headers: {
1391
1390
  [name: string]: string;
1392
1391
  };
1393
1392
  }): Promise<GenericApiResponse | StartJobResponse>;
1394
1393
  /**
1395
- * When segmenting a sample into smaller segments, store the segment length to ensure uniform segment lengths.
1396
- * @summary Store the last segment length
1394
+ * Returns a preview of how the project\'s dataset would be split if the current split options were applied. For each group (composite of label and/or metadata keys, or keep-together group), shows the number and percentage of samples that would be assigned to each split. This does not update the dataset, only provides a summary. Returns immediately on small datasets, or starts a job on larger datasets.
1395
+ * @summary Split dataset preview
1397
1396
  * @param projectId Project ID
1398
- * @param storeSegmentLengthRequest
1397
+ * @param datasetSplitOptions
1399
1398
  */
1400
- storeSegmentLength(projectId: number, storeSegmentLengthRequest: StoreSegmentLengthRequest, options?: {
1399
+ splitDatasetPreview(projectId: number, datasetSplitOptions: DatasetSplitOptions, options?: {
1401
1400
  headers: {
1402
1401
  [name: string]: string;
1403
1402
  };
1404
- }): Promise<GenericApiResponse>;
1403
+ }): Promise<DatasetSplitPreviewResponse | StartJobResponse>;
1405
1404
  /**
1406
- * Performs a deterministic, in-place stratified split of the project\'s dataset into \"training\", \"testing\", and optional \"validation\" sets, based on the chosen stratification options. Stratification can use the label, one or more metadata keys, or both as a composite group. This is a deterministic process based on the hash of the name of the data. Returns immediately on small datasets, or starts a job on larger datasets. For example: { \"stratifyByLabel\": true, \"metadataKeys\": [\"site\", \"scanner\"], \"excludeDisabledSamples\": false, \"trainingSplitRatio\": 0.8, \"testingSplitRatio\": 0.1, \"validationSplitRatio\": 0.1 } With these options, samples are grouped by the combination of label, site, and scanner. Within each group, 80% are set to \"training\", 10% to \"testing\", and 10% to \"validation\".
1407
- * @summary Stratify dataset
1405
+ * Split a video sample into individual frames. Depending on the length of the video sample this will either execute immediately or return the ID of a job that will perform this action.
1406
+ * @summary Split sample into frames
1408
1407
  * @param projectId Project ID
1409
- * @param datasetStratificationOptions
1408
+ * @param sampleId Sample ID
1409
+ * @param splitSampleInFramesRequest
1410
1410
  */
1411
- stratifyDataset(projectId: number, datasetStratificationOptions: DatasetStratificationOptions, options?: {
1411
+ splitSampleInFrames(projectId: number, sampleId: number, splitSampleInFramesRequest: SplitSampleInFramesRequest, options?: {
1412
1412
  headers: {
1413
1413
  [name: string]: string;
1414
1414
  };
1415
1415
  }): Promise<GenericApiResponse | StartJobResponse>;
1416
1416
  /**
1417
- * Returns a preview of how the project\'s dataset would be balanced if the current stratification options were applied. For each group (composite of label and/or metadata keys), shows the number and percentage of samples that would be assigned to each split (\"training\"/\"testing\"). This does not update the dataset, only provides a summary. Returns immediately on small datasets, or starts a job on larger datasets.
1418
- * @summary Stratify dataset preview
1417
+ * When segmenting a sample into smaller segments, store the segment length to ensure uniform segment lengths.
1418
+ * @summary Store the last segment length
1419
1419
  * @param projectId Project ID
1420
- * @param datasetStratificationOptions
1420
+ * @param storeSegmentLengthRequest
1421
1421
  */
1422
- stratifyDatasetPreview(projectId: number, datasetStratificationOptions: DatasetStratificationOptions, options?: {
1422
+ storeSegmentLength(projectId: number, storeSegmentLengthRequest: StoreSegmentLengthRequest, options?: {
1423
1423
  headers: {
1424
1424
  [name: string]: string;
1425
1425
  };
1426
- }): Promise<DatasetStratificationPreviewResponse | StartJobResponse>;
1426
+ }): Promise<GenericApiResponse>;
1427
1427
  /**
1428
1428
  * Track objects between two samples. Source sample should have bounding boxes set.
1429
1429
  * @summary Track objects
@@ -4433,12 +4433,12 @@ class RawDataApi {
4433
4433
  return this.handleResponse(response, 'GetSampleResponse');
4434
4434
  }
4435
4435
  /**
4436
- * Returns the results of a previously requested stratification preview job. This endpoint is used to retrieve the results after a stratification preview job has been started.
4437
- * @summary Get stratify preview results
4436
+ * Returns the results of a previously requested split preview job. This endpoint is used to retrieve the results after a split preview job has been started.
4437
+ * @summary Get split preview results
4438
4438
  * @param projectId Project ID
4439
4439
  */
4440
- async getStratifyPreviewResults(projectId, options = { headers: {} }) {
4441
- const localVarPath = this.basePath + '/api/{projectId}/get-stratify-preview-results'
4440
+ async getSplitPreviewResults(projectId, options = { headers: {} }) {
4441
+ const localVarPath = this.basePath + '/api/{projectId}/get-split-preview-results'
4442
4442
  .replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)));
4443
4443
  let localVarQueryParameters = {};
4444
4444
  let localVarHeaderParams = {
@@ -4457,7 +4457,7 @@ class RawDataApi {
4457
4457
  let localVarFormParams;
4458
4458
  // verify required parameter 'projectId' is not null or undefined
4459
4459
  if (projectId === null || projectId === undefined) {
4460
- throw new Error('Required parameter projectId was null or undefined when calling getStratifyPreviewResults.');
4460
+ throw new Error('Required parameter projectId was null or undefined when calling getSplitPreviewResults.');
4461
4461
  }
4462
4462
  localVarHeaderParams = {
4463
4463
  ...localVarHeaderParams,
@@ -4503,7 +4503,7 @@ class RawDataApi {
4503
4503
  }
4504
4504
  }
4505
4505
  const response = await fetch(url, requestOptions);
4506
- return this.handleResponse(response, 'DatasetStratificationPreviewResponse');
4506
+ return this.handleResponse(response, 'DatasetSplitPreviewResponse');
4507
4507
  }
4508
4508
  /**
4509
4509
  * Get the original, uncropped, downsampled data.
@@ -6145,16 +6145,14 @@ class RawDataApi {
6145
6145
  return this.handleResponse(response, 'GenericApiResponse');
6146
6146
  }
6147
6147
  /**
6148
- * Split a video sample into individual frames. Depending on the length of the video sample this will either execute immediately or return the ID of a job that will perform this action.
6149
- * @summary Split sample into frames
6148
+ * Performs a deterministic, in-place split of the project\'s dataset into \"training\", \"testing\", and optional \"validation\" sets. Split balancing can use the label, one or more metadata keys, or both as a composite grouping signal. Related samples can also be kept together across splits by metadata key. This is a deterministic process based on the hash of the name of the data. Returns immediately on small datasets, or starts a job on larger datasets. For example: { \"trainingSplitRatio\": 0.8, \"testingSplitRatio\": 0.1, \"validationSplitRatio\": 0.1, \"excludeDisabledSamples\": false, \"stratifyBy\": { \"label\": true, \"metadataKeys\": [\"site\", \"scanner\"] }, \"keepTogetherMetadataKeys\": [\"capture_group\"] } With these options, label/site/scanner are used to balance the split, while samples sharing the same capture_group value stay in the same split bucket.
6149
+ * @summary Split dataset
6150
6150
  * @param projectId Project ID
6151
- * @param sampleId Sample ID
6152
- * @param splitSampleInFramesRequest
6151
+ * @param datasetSplitOptions
6153
6152
  */
6154
- async splitSampleInFrames(projectId, sampleId, splitSampleInFramesRequest, options = { headers: {} }) {
6155
- const localVarPath = this.basePath + '/api/{projectId}/raw-data/{sampleId}/split'
6156
- .replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)))
6157
- .replace('{' + 'sampleId' + '}', encodeURIComponent(String(sampleId)));
6153
+ async splitDataset(projectId, datasetSplitOptions, options = { headers: {} }) {
6154
+ const localVarPath = this.basePath + '/api/{projectId}/split'
6155
+ .replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)));
6158
6156
  let localVarQueryParameters = {};
6159
6157
  let localVarHeaderParams = {
6160
6158
  'User-Agent': 'edgeimpulse-api nodejs',
@@ -6172,15 +6170,11 @@ class RawDataApi {
6172
6170
  let localVarFormParams;
6173
6171
  // verify required parameter 'projectId' is not null or undefined
6174
6172
  if (projectId === null || projectId === undefined) {
6175
- throw new Error('Required parameter projectId was null or undefined when calling splitSampleInFrames.');
6173
+ throw new Error('Required parameter projectId was null or undefined when calling splitDataset.');
6176
6174
  }
6177
- // verify required parameter 'sampleId' is not null or undefined
6178
- if (sampleId === null || sampleId === undefined) {
6179
- throw new Error('Required parameter sampleId was null or undefined when calling splitSampleInFrames.');
6180
- }
6181
- // verify required parameter 'splitSampleInFramesRequest' is not null or undefined
6182
- if (splitSampleInFramesRequest === null || splitSampleInFramesRequest === undefined) {
6183
- throw new Error('Required parameter splitSampleInFramesRequest was null or undefined when calling splitSampleInFrames.');
6175
+ // verify required parameter 'datasetSplitOptions' is not null or undefined
6176
+ if (datasetSplitOptions === null || datasetSplitOptions === undefined) {
6177
+ throw new Error('Required parameter datasetSplitOptions was null or undefined when calling splitDataset.');
6184
6178
  }
6185
6179
  localVarHeaderParams = {
6186
6180
  ...localVarHeaderParams,
@@ -6196,7 +6190,7 @@ class RawDataApi {
6196
6190
  method: 'POST',
6197
6191
  headers: { ...localVarHeaderParams },
6198
6192
  };
6199
- localVarRequestOptions.body = JSON.stringify(models_1.ObjectSerializer.serialize(splitSampleInFramesRequest, "SplitSampleInFramesRequest"));
6193
+ localVarRequestOptions.body = JSON.stringify(models_1.ObjectSerializer.serialize(datasetSplitOptions, "DatasetSplitOptions"));
6200
6194
  let requestOptions = localVarRequestOptions;
6201
6195
  let url = localVarUrl;
6202
6196
  const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
@@ -6230,13 +6224,13 @@ class RawDataApi {
6230
6224
  return this.handleResponse(response, 'GenericApiResponse | StartJobResponse');
6231
6225
  }
6232
6226
  /**
6233
- * When segmenting a sample into smaller segments, store the segment length to ensure uniform segment lengths.
6234
- * @summary Store the last segment length
6227
+ * Returns a preview of how the project\'s dataset would be split if the current split options were applied. For each group (composite of label and/or metadata keys, or keep-together group), shows the number and percentage of samples that would be assigned to each split. This does not update the dataset, only provides a summary. Returns immediately on small datasets, or starts a job on larger datasets.
6228
+ * @summary Split dataset preview
6235
6229
  * @param projectId Project ID
6236
- * @param storeSegmentLengthRequest
6230
+ * @param datasetSplitOptions
6237
6231
  */
6238
- async storeSegmentLength(projectId, storeSegmentLengthRequest, options = { headers: {} }) {
6239
- const localVarPath = this.basePath + '/api/{projectId}/raw-data/store-segment-length'
6232
+ async splitDatasetPreview(projectId, datasetSplitOptions, options = { headers: {} }) {
6233
+ const localVarPath = this.basePath + '/api/{projectId}/split-preview'
6240
6234
  .replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)));
6241
6235
  let localVarQueryParameters = {};
6242
6236
  let localVarHeaderParams = {
@@ -6255,11 +6249,11 @@ class RawDataApi {
6255
6249
  let localVarFormParams;
6256
6250
  // verify required parameter 'projectId' is not null or undefined
6257
6251
  if (projectId === null || projectId === undefined) {
6258
- throw new Error('Required parameter projectId was null or undefined when calling storeSegmentLength.');
6252
+ throw new Error('Required parameter projectId was null or undefined when calling splitDatasetPreview.');
6259
6253
  }
6260
- // verify required parameter 'storeSegmentLengthRequest' is not null or undefined
6261
- if (storeSegmentLengthRequest === null || storeSegmentLengthRequest === undefined) {
6262
- throw new Error('Required parameter storeSegmentLengthRequest was null or undefined when calling storeSegmentLength.');
6254
+ // verify required parameter 'datasetSplitOptions' is not null or undefined
6255
+ if (datasetSplitOptions === null || datasetSplitOptions === undefined) {
6256
+ throw new Error('Required parameter datasetSplitOptions was null or undefined when calling splitDatasetPreview.');
6263
6257
  }
6264
6258
  localVarHeaderParams = {
6265
6259
  ...localVarHeaderParams,
@@ -6275,7 +6269,7 @@ class RawDataApi {
6275
6269
  method: 'POST',
6276
6270
  headers: { ...localVarHeaderParams },
6277
6271
  };
6278
- localVarRequestOptions.body = JSON.stringify(models_1.ObjectSerializer.serialize(storeSegmentLengthRequest, "StoreSegmentLengthRequest"));
6272
+ localVarRequestOptions.body = JSON.stringify(models_1.ObjectSerializer.serialize(datasetSplitOptions, "DatasetSplitOptions"));
6279
6273
  let requestOptions = localVarRequestOptions;
6280
6274
  let url = localVarUrl;
6281
6275
  const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
@@ -6306,17 +6300,19 @@ class RawDataApi {
6306
6300
  }
6307
6301
  }
6308
6302
  const response = await fetch(url, requestOptions);
6309
- return this.handleResponse(response, 'GenericApiResponse');
6303
+ return this.handleResponse(response, 'DatasetSplitPreviewResponse | StartJobResponse');
6310
6304
  }
6311
6305
  /**
6312
- * Performs a deterministic, in-place stratified split of the project\'s dataset into \"training\", \"testing\", and optional \"validation\" sets, based on the chosen stratification options. Stratification can use the label, one or more metadata keys, or both as a composite group. This is a deterministic process based on the hash of the name of the data. Returns immediately on small datasets, or starts a job on larger datasets. For example: { \"stratifyByLabel\": true, \"metadataKeys\": [\"site\", \"scanner\"], \"excludeDisabledSamples\": false, \"trainingSplitRatio\": 0.8, \"testingSplitRatio\": 0.1, \"validationSplitRatio\": 0.1 } With these options, samples are grouped by the combination of label, site, and scanner. Within each group, 80% are set to \"training\", 10% to \"testing\", and 10% to \"validation\".
6313
- * @summary Stratify dataset
6306
+ * Split a video sample into individual frames. Depending on the length of the video sample this will either execute immediately or return the ID of a job that will perform this action.
6307
+ * @summary Split sample into frames
6314
6308
  * @param projectId Project ID
6315
- * @param datasetStratificationOptions
6309
+ * @param sampleId Sample ID
6310
+ * @param splitSampleInFramesRequest
6316
6311
  */
6317
- async stratifyDataset(projectId, datasetStratificationOptions, options = { headers: {} }) {
6318
- const localVarPath = this.basePath + '/api/{projectId}/stratify'
6319
- .replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)));
6312
+ async splitSampleInFrames(projectId, sampleId, splitSampleInFramesRequest, options = { headers: {} }) {
6313
+ const localVarPath = this.basePath + '/api/{projectId}/raw-data/{sampleId}/split'
6314
+ .replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)))
6315
+ .replace('{' + 'sampleId' + '}', encodeURIComponent(String(sampleId)));
6320
6316
  let localVarQueryParameters = {};
6321
6317
  let localVarHeaderParams = {
6322
6318
  'User-Agent': 'edgeimpulse-api nodejs',
@@ -6334,11 +6330,15 @@ class RawDataApi {
6334
6330
  let localVarFormParams;
6335
6331
  // verify required parameter 'projectId' is not null or undefined
6336
6332
  if (projectId === null || projectId === undefined) {
6337
- throw new Error('Required parameter projectId was null or undefined when calling stratifyDataset.');
6333
+ throw new Error('Required parameter projectId was null or undefined when calling splitSampleInFrames.');
6338
6334
  }
6339
- // verify required parameter 'datasetStratificationOptions' is not null or undefined
6340
- if (datasetStratificationOptions === null || datasetStratificationOptions === undefined) {
6341
- throw new Error('Required parameter datasetStratificationOptions was null or undefined when calling stratifyDataset.');
6335
+ // verify required parameter 'sampleId' is not null or undefined
6336
+ if (sampleId === null || sampleId === undefined) {
6337
+ throw new Error('Required parameter sampleId was null or undefined when calling splitSampleInFrames.');
6338
+ }
6339
+ // verify required parameter 'splitSampleInFramesRequest' is not null or undefined
6340
+ if (splitSampleInFramesRequest === null || splitSampleInFramesRequest === undefined) {
6341
+ throw new Error('Required parameter splitSampleInFramesRequest was null or undefined when calling splitSampleInFrames.');
6342
6342
  }
6343
6343
  localVarHeaderParams = {
6344
6344
  ...localVarHeaderParams,
@@ -6354,7 +6354,7 @@ class RawDataApi {
6354
6354
  method: 'POST',
6355
6355
  headers: { ...localVarHeaderParams },
6356
6356
  };
6357
- localVarRequestOptions.body = JSON.stringify(models_1.ObjectSerializer.serialize(datasetStratificationOptions, "DatasetStratificationOptions"));
6357
+ localVarRequestOptions.body = JSON.stringify(models_1.ObjectSerializer.serialize(splitSampleInFramesRequest, "SplitSampleInFramesRequest"));
6358
6358
  let requestOptions = localVarRequestOptions;
6359
6359
  let url = localVarUrl;
6360
6360
  const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
@@ -6388,13 +6388,13 @@ class RawDataApi {
6388
6388
  return this.handleResponse(response, 'GenericApiResponse | StartJobResponse');
6389
6389
  }
6390
6390
  /**
6391
- * Returns a preview of how the project\'s dataset would be balanced if the current stratification options were applied. For each group (composite of label and/or metadata keys), shows the number and percentage of samples that would be assigned to each split (\"training\"/\"testing\"). This does not update the dataset, only provides a summary. Returns immediately on small datasets, or starts a job on larger datasets.
6392
- * @summary Stratify dataset preview
6391
+ * When segmenting a sample into smaller segments, store the segment length to ensure uniform segment lengths.
6392
+ * @summary Store the last segment length
6393
6393
  * @param projectId Project ID
6394
- * @param datasetStratificationOptions
6394
+ * @param storeSegmentLengthRequest
6395
6395
  */
6396
- async stratifyDatasetPreview(projectId, datasetStratificationOptions, options = { headers: {} }) {
6397
- const localVarPath = this.basePath + '/api/{projectId}/stratify-preview'
6396
+ async storeSegmentLength(projectId, storeSegmentLengthRequest, options = { headers: {} }) {
6397
+ const localVarPath = this.basePath + '/api/{projectId}/raw-data/store-segment-length'
6398
6398
  .replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)));
6399
6399
  let localVarQueryParameters = {};
6400
6400
  let localVarHeaderParams = {
@@ -6413,11 +6413,11 @@ class RawDataApi {
6413
6413
  let localVarFormParams;
6414
6414
  // verify required parameter 'projectId' is not null or undefined
6415
6415
  if (projectId === null || projectId === undefined) {
6416
- throw new Error('Required parameter projectId was null or undefined when calling stratifyDatasetPreview.');
6416
+ throw new Error('Required parameter projectId was null or undefined when calling storeSegmentLength.');
6417
6417
  }
6418
- // verify required parameter 'datasetStratificationOptions' is not null or undefined
6419
- if (datasetStratificationOptions === null || datasetStratificationOptions === undefined) {
6420
- throw new Error('Required parameter datasetStratificationOptions was null or undefined when calling stratifyDatasetPreview.');
6418
+ // verify required parameter 'storeSegmentLengthRequest' is not null or undefined
6419
+ if (storeSegmentLengthRequest === null || storeSegmentLengthRequest === undefined) {
6420
+ throw new Error('Required parameter storeSegmentLengthRequest was null or undefined when calling storeSegmentLength.');
6421
6421
  }
6422
6422
  localVarHeaderParams = {
6423
6423
  ...localVarHeaderParams,
@@ -6433,7 +6433,7 @@ class RawDataApi {
6433
6433
  method: 'POST',
6434
6434
  headers: { ...localVarHeaderParams },
6435
6435
  };
6436
- localVarRequestOptions.body = JSON.stringify(models_1.ObjectSerializer.serialize(datasetStratificationOptions, "DatasetStratificationOptions"));
6436
+ localVarRequestOptions.body = JSON.stringify(models_1.ObjectSerializer.serialize(storeSegmentLengthRequest, "StoreSegmentLengthRequest"));
6437
6437
  let requestOptions = localVarRequestOptions;
6438
6438
  let url = localVarUrl;
6439
6439
  const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
@@ -6464,7 +6464,7 @@ class RawDataApi {
6464
6464
  }
6465
6465
  }
6466
6466
  const response = await fetch(url, requestOptions);
6467
- return this.handleResponse(response, 'DatasetStratificationPreviewResponse | StartJobResponse');
6467
+ return this.handleResponse(response, 'GenericApiResponse');
6468
6468
  }
6469
6469
  /**
6470
6470
  * Track objects between two samples. Source sample should have bounding boxes set.