edge-impulse-api 1.92.13 → 1.92.15

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 (34) hide show
  1. package/build/library/sdk/api/rawDataApi.d.ts +48 -0
  2. package/build/library/sdk/api/rawDataApi.js +210 -0
  3. package/build/library/sdk/api/rawDataApi.js.map +1 -1
  4. package/build/library/sdk/model/getRawDataMetadataCooccurrenceResponse.d.ts +58 -0
  5. package/build/library/sdk/model/getRawDataMetadataCooccurrenceResponse.js +150 -0
  6. package/build/library/sdk/model/getRawDataMetadataCooccurrenceResponse.js.map +1 -0
  7. package/build/library/sdk/model/getRawDataMetadataCooccurrenceResponseAllOf.d.ts +50 -0
  8. package/build/library/sdk/model/getRawDataMetadataCooccurrenceResponseAllOf.js +140 -0
  9. package/build/library/sdk/model/getRawDataMetadataCooccurrenceResponseAllOf.js.map +1 -0
  10. package/build/library/sdk/model/getRawDataMetadataDistributionResponse.d.ts +47 -0
  11. package/build/library/sdk/model/getRawDataMetadataDistributionResponse.js +85 -0
  12. package/build/library/sdk/model/getRawDataMetadataDistributionResponse.js.map +1 -0
  13. package/build/library/sdk/model/getRawDataMetadataDistributionResponseAllOf.d.ts +39 -0
  14. package/build/library/sdk/model/getRawDataMetadataDistributionResponseAllOf.js +75 -0
  15. package/build/library/sdk/model/getRawDataMetadataDistributionResponseAllOf.js.map +1 -0
  16. package/build/library/sdk/model/metadataDistributionBucket.d.ts +29 -0
  17. package/build/library/sdk/model/metadataDistributionBucket.js +49 -0
  18. package/build/library/sdk/model/metadataDistributionBucket.js.map +1 -0
  19. package/build/library/sdk/model/metadataDistributionLabelBreakdown.d.ts +27 -0
  20. package/build/library/sdk/model/metadataDistributionLabelBreakdown.js +39 -0
  21. package/build/library/sdk/model/metadataDistributionLabelBreakdown.js.map +1 -0
  22. package/build/library/sdk/model/models.d.ts +6 -0
  23. package/build/library/sdk/model/models.js +22 -0
  24. package/build/library/sdk/model/models.js.map +1 -1
  25. package/build/library/sdk/model/projectInfoResponse.d.ts +1 -0
  26. package/build/library/sdk/model/projectInfoResponse.js +5 -0
  27. package/build/library/sdk/model/projectInfoResponse.js.map +1 -1
  28. package/build/library/sdk/model/projectInfoResponseAllOf.d.ts +1 -0
  29. package/build/library/sdk/model/projectInfoResponseAllOf.js +5 -0
  30. package/build/library/sdk/model/projectInfoResponseAllOf.js.map +1 -1
  31. package/build/library/sdk/model/updateProjectRequest.d.ts +4 -0
  32. package/build/library/sdk/model/updateProjectRequest.js +5 -0
  33. package/build/library/sdk/model/updateProjectRequest.js.map +1 -1
  34. package/package.json +1 -1
@@ -35,6 +35,8 @@ import { GetDataExplorerSettingsResponse } from '../model/getDataExplorerSetting
35
35
  import { GetDatasetRatioResponse } from '../model/getDatasetRatioResponse';
36
36
  import { GetDiversityDataResponse } from '../model/getDiversityDataResponse';
37
37
  import { GetLabelNoiseDataResponse } from '../model/getLabelNoiseDataResponse';
38
+ import { GetRawDataMetadataCooccurrenceResponse } from '../model/getRawDataMetadataCooccurrenceResponse';
39
+ import { GetRawDataMetadataDistributionResponse } from '../model/getRawDataMetadataDistributionResponse';
38
40
  import { GetSampleMetadataFilterOptionsResponse } from '../model/getSampleMetadataFilterOptionsResponse';
39
41
  import { GetSampleMetadataResponse } from '../model/getSampleMetadataResponse';
40
42
  import { GetSampleResponse } from '../model/getSampleResponse';
@@ -312,6 +314,21 @@ type getAllImportedFromQueryParams = {
312
314
  limit?: number;
313
315
  offset?: number;
314
316
  };
317
+ type getRawDataMetadataCooccurrenceQueryParams = {
318
+ category: RawDataCategory;
319
+ keyA: string;
320
+ keyB: string;
321
+ topNKeyA?: number;
322
+ topNKeyB?: number;
323
+ normalize?: 'none' | 'global';
324
+ };
325
+ type getRawDataMetadataDistributionQueryParams = {
326
+ category: RawDataCategory;
327
+ key: string;
328
+ topN?: number;
329
+ binCount?: number;
330
+ groupByLabel?: boolean;
331
+ };
315
332
  type getSampleQueryParams = {
316
333
  limitPayloadValues?: number;
317
334
  cacheKey?: string;
@@ -967,6 +984,37 @@ export declare class RawDataApi {
967
984
  [name: string]: string;
968
985
  };
969
986
  }): Promise<ObjectDetectionLabelQueueCountResponse>;
987
+ /**
988
+ * Get co-occurrence counts for two metadata keys in a project category. This is experimental and may change in the future.
989
+ * @summary Get project metadata co-occurrence matrix
990
+ * @param projectId Project ID
991
+ * @param category Which of the three acquisition categories to retrieve data from
992
+ * @param keyA First metadata key to aggregate values for
993
+ * @param keyB Second metadata key to aggregate values for
994
+ * @param topNKeyA Maximum number of top values to return for keyA
995
+ * @param topNKeyB Maximum number of top values to return for keyB
996
+ * @param normalize Controls how normalizedMatrix is computed. Use none to disable normalization (normalizedMatrix omitted), or global to return percentages across all matrix cells.
997
+ */
998
+ getRawDataMetadataCooccurrence(projectId: number, queryParams: getRawDataMetadataCooccurrenceQueryParams, options?: {
999
+ headers: {
1000
+ [name: string]: string;
1001
+ };
1002
+ }): Promise<GetRawDataMetadataCooccurrenceResponse>;
1003
+ /**
1004
+ * Get metadata value distribution for a specific metadata key in a project category. Numeric values are returned as histogram buckets, non-numeric values as categorical counts. This is experimental and may change in the future.
1005
+ * @summary Get project sample metadata distribution
1006
+ * @param projectId Project ID
1007
+ * @param category Which of the three acquisition categories to retrieve data from
1008
+ * @param key Metadata key to aggregate values for
1009
+ * @param topN Maximum number of top categories to return for categorical values
1010
+ * @param binCount Number of bins to use for numeric histogram values
1011
+ * @param groupByLabel Include per-label breakdown for each bucket
1012
+ */
1013
+ getRawDataMetadataDistribution(projectId: number, queryParams: getRawDataMetadataDistributionQueryParams, options?: {
1014
+ headers: {
1015
+ [name: string]: string;
1016
+ };
1017
+ }): Promise<GetRawDataMetadataDistributionResponse>;
970
1018
  /**
971
1019
  * Get a sample.
972
1020
  * @summary Get sample
@@ -3486,6 +3486,216 @@ class RawDataApi {
3486
3486
  const response = await fetch(url, requestOptions);
3487
3487
  return this.handleResponse(response, 'ObjectDetectionLabelQueueCountResponse');
3488
3488
  }
3489
+ /**
3490
+ * Get co-occurrence counts for two metadata keys in a project category. This is experimental and may change in the future.
3491
+ * @summary Get project metadata co-occurrence matrix
3492
+ * @param projectId Project ID
3493
+ * @param category Which of the three acquisition categories to retrieve data from
3494
+ * @param keyA First metadata key to aggregate values for
3495
+ * @param keyB Second metadata key to aggregate values for
3496
+ * @param topNKeyA Maximum number of top values to return for keyA
3497
+ * @param topNKeyB Maximum number of top values to return for keyB
3498
+ * @param normalize Controls how normalizedMatrix is computed. Use none to disable normalization (normalizedMatrix omitted), or global to return percentages across all matrix cells.
3499
+ */
3500
+ async getRawDataMetadataCooccurrence(projectId, queryParams, options = { headers: {} }) {
3501
+ const localVarPath = this.basePath + '/api/{projectId}/raw-data/metadata-cooccurrence'
3502
+ .replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)));
3503
+ let localVarQueryParameters = {};
3504
+ let localVarHeaderParams = {
3505
+ 'User-Agent': 'edgeimpulse-api nodejs',
3506
+ 'Content-Type': 'application/json',
3507
+ ...this.defaultHeaders,
3508
+ };
3509
+ const produces = ['application/json'];
3510
+ // give precedence to 'application/json'
3511
+ if (produces.indexOf('application/json') >= 0) {
3512
+ localVarHeaderParams.Accept = 'application/json';
3513
+ }
3514
+ else {
3515
+ localVarHeaderParams.Accept = produces.join(',');
3516
+ }
3517
+ let localVarFormParams;
3518
+ // verify required parameter 'projectId' is not null or undefined
3519
+ if (projectId === null || projectId === undefined) {
3520
+ throw new Error('Required parameter projectId was null or undefined when calling getRawDataMetadataCooccurrence.');
3521
+ }
3522
+ // verify required parameter 'category' is not null or undefined
3523
+ if (queryParams.category === null || queryParams.category === undefined) {
3524
+ throw new Error('Required parameter queryParams.category was null or undefined when calling getRawDataMetadataCooccurrence.');
3525
+ }
3526
+ // verify required parameter 'keyA' is not null or undefined
3527
+ if (queryParams.keyA === null || queryParams.keyA === undefined) {
3528
+ throw new Error('Required parameter queryParams.keyA was null or undefined when calling getRawDataMetadataCooccurrence.');
3529
+ }
3530
+ // verify required parameter 'keyB' is not null or undefined
3531
+ if (queryParams.keyB === null || queryParams.keyB === undefined) {
3532
+ throw new Error('Required parameter queryParams.keyB was null or undefined when calling getRawDataMetadataCooccurrence.');
3533
+ }
3534
+ if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.category) !== undefined) {
3535
+ localVarQueryParameters['category'] = models_1.ObjectSerializer.serialize(queryParams.category, "RawDataCategory");
3536
+ }
3537
+ if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.keyA) !== undefined) {
3538
+ localVarQueryParameters['keyA'] = models_1.ObjectSerializer.serialize(queryParams.keyA, "string");
3539
+ }
3540
+ if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.keyB) !== undefined) {
3541
+ localVarQueryParameters['keyB'] = models_1.ObjectSerializer.serialize(queryParams.keyB, "string");
3542
+ }
3543
+ if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.topNKeyA) !== undefined) {
3544
+ localVarQueryParameters['topNKeyA'] = models_1.ObjectSerializer.serialize(queryParams.topNKeyA, "number");
3545
+ }
3546
+ if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.topNKeyB) !== undefined) {
3547
+ localVarQueryParameters['topNKeyB'] = models_1.ObjectSerializer.serialize(queryParams.topNKeyB, "number");
3548
+ }
3549
+ if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.normalize) !== undefined) {
3550
+ localVarQueryParameters['normalize'] = models_1.ObjectSerializer.serialize(queryParams.normalize, "'none' | 'global'");
3551
+ }
3552
+ localVarHeaderParams = {
3553
+ ...localVarHeaderParams,
3554
+ ...options.headers,
3555
+ ...this.opts.extraHeaders,
3556
+ };
3557
+ const queryString = Object.entries(localVarQueryParameters)
3558
+ .filter(([, value]) => value !== undefined)
3559
+ .map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
3560
+ .join('&');
3561
+ let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
3562
+ let localVarRequestOptions = {
3563
+ method: 'GET',
3564
+ headers: { ...localVarHeaderParams },
3565
+ };
3566
+ let requestOptions = localVarRequestOptions;
3567
+ let url = localVarUrl;
3568
+ const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
3569
+ requestOptions = auth_ApiKeyAuthentication.requestOptions;
3570
+ url = auth_ApiKeyAuthentication.url;
3571
+ const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
3572
+ requestOptions = auth_JWTAuthentication.requestOptions;
3573
+ url = auth_JWTAuthentication.url;
3574
+ const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
3575
+ requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
3576
+ url = auth_JWTHttpHeaderAuthentication.url;
3577
+ const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
3578
+ requestOptions = auth_OAuth2.requestOptions;
3579
+ url = auth_OAuth2.url;
3580
+ const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
3581
+ requestOptions = authDefault.requestOptions;
3582
+ url = authDefault.url;
3583
+ if (localVarFormParams) {
3584
+ delete requestOptions.headers['Content-Type'];
3585
+ if (localVarFormParams instanceof FormData) {
3586
+ // FormData: fetch will handle Content-Type automatically.
3587
+ requestOptions.body = localVarFormParams;
3588
+ }
3589
+ else if (Object.keys(localVarFormParams).length > 0) {
3590
+ // URL-encoded form
3591
+ requestOptions.body = new URLSearchParams(localVarFormParams).toString();
3592
+ requestOptions.headers['Content-Type'] = 'application/x-www-form-urlencoded';
3593
+ }
3594
+ }
3595
+ const response = await fetch(url, requestOptions);
3596
+ return this.handleResponse(response, 'GetRawDataMetadataCooccurrenceResponse');
3597
+ }
3598
+ /**
3599
+ * Get metadata value distribution for a specific metadata key in a project category. Numeric values are returned as histogram buckets, non-numeric values as categorical counts. This is experimental and may change in the future.
3600
+ * @summary Get project sample metadata distribution
3601
+ * @param projectId Project ID
3602
+ * @param category Which of the three acquisition categories to retrieve data from
3603
+ * @param key Metadata key to aggregate values for
3604
+ * @param topN Maximum number of top categories to return for categorical values
3605
+ * @param binCount Number of bins to use for numeric histogram values
3606
+ * @param groupByLabel Include per-label breakdown for each bucket
3607
+ */
3608
+ async getRawDataMetadataDistribution(projectId, queryParams, options = { headers: {} }) {
3609
+ const localVarPath = this.basePath + '/api/{projectId}/raw-data/metadata-distribution'
3610
+ .replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)));
3611
+ let localVarQueryParameters = {};
3612
+ let localVarHeaderParams = {
3613
+ 'User-Agent': 'edgeimpulse-api nodejs',
3614
+ 'Content-Type': 'application/json',
3615
+ ...this.defaultHeaders,
3616
+ };
3617
+ const produces = ['application/json'];
3618
+ // give precedence to 'application/json'
3619
+ if (produces.indexOf('application/json') >= 0) {
3620
+ localVarHeaderParams.Accept = 'application/json';
3621
+ }
3622
+ else {
3623
+ localVarHeaderParams.Accept = produces.join(',');
3624
+ }
3625
+ let localVarFormParams;
3626
+ // verify required parameter 'projectId' is not null or undefined
3627
+ if (projectId === null || projectId === undefined) {
3628
+ throw new Error('Required parameter projectId was null or undefined when calling getRawDataMetadataDistribution.');
3629
+ }
3630
+ // verify required parameter 'category' is not null or undefined
3631
+ if (queryParams.category === null || queryParams.category === undefined) {
3632
+ throw new Error('Required parameter queryParams.category was null or undefined when calling getRawDataMetadataDistribution.');
3633
+ }
3634
+ // verify required parameter 'key' is not null or undefined
3635
+ if (queryParams.key === null || queryParams.key === undefined) {
3636
+ throw new Error('Required parameter queryParams.key was null or undefined when calling getRawDataMetadataDistribution.');
3637
+ }
3638
+ if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.category) !== undefined) {
3639
+ localVarQueryParameters['category'] = models_1.ObjectSerializer.serialize(queryParams.category, "RawDataCategory");
3640
+ }
3641
+ if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.key) !== undefined) {
3642
+ localVarQueryParameters['key'] = models_1.ObjectSerializer.serialize(queryParams.key, "string");
3643
+ }
3644
+ if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.topN) !== undefined) {
3645
+ localVarQueryParameters['topN'] = models_1.ObjectSerializer.serialize(queryParams.topN, "number");
3646
+ }
3647
+ if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.binCount) !== undefined) {
3648
+ localVarQueryParameters['binCount'] = models_1.ObjectSerializer.serialize(queryParams.binCount, "number");
3649
+ }
3650
+ if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.groupByLabel) !== undefined) {
3651
+ localVarQueryParameters['groupByLabel'] = models_1.ObjectSerializer.serialize(queryParams.groupByLabel, "boolean");
3652
+ }
3653
+ localVarHeaderParams = {
3654
+ ...localVarHeaderParams,
3655
+ ...options.headers,
3656
+ ...this.opts.extraHeaders,
3657
+ };
3658
+ const queryString = Object.entries(localVarQueryParameters)
3659
+ .filter(([, value]) => value !== undefined)
3660
+ .map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
3661
+ .join('&');
3662
+ let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
3663
+ let localVarRequestOptions = {
3664
+ method: 'GET',
3665
+ headers: { ...localVarHeaderParams },
3666
+ };
3667
+ let requestOptions = localVarRequestOptions;
3668
+ let url = localVarUrl;
3669
+ const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
3670
+ requestOptions = auth_ApiKeyAuthentication.requestOptions;
3671
+ url = auth_ApiKeyAuthentication.url;
3672
+ const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
3673
+ requestOptions = auth_JWTAuthentication.requestOptions;
3674
+ url = auth_JWTAuthentication.url;
3675
+ const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
3676
+ requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
3677
+ url = auth_JWTHttpHeaderAuthentication.url;
3678
+ const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
3679
+ requestOptions = auth_OAuth2.requestOptions;
3680
+ url = auth_OAuth2.url;
3681
+ const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
3682
+ requestOptions = authDefault.requestOptions;
3683
+ url = authDefault.url;
3684
+ if (localVarFormParams) {
3685
+ delete requestOptions.headers['Content-Type'];
3686
+ if (localVarFormParams instanceof FormData) {
3687
+ // FormData: fetch will handle Content-Type automatically.
3688
+ requestOptions.body = localVarFormParams;
3689
+ }
3690
+ else if (Object.keys(localVarFormParams).length > 0) {
3691
+ // URL-encoded form
3692
+ requestOptions.body = new URLSearchParams(localVarFormParams).toString();
3693
+ requestOptions.headers['Content-Type'] = 'application/x-www-form-urlencoded';
3694
+ }
3695
+ }
3696
+ const response = await fetch(url, requestOptions);
3697
+ return this.handleResponse(response, 'GetRawDataMetadataDistributionResponse');
3698
+ }
3489
3699
  /**
3490
3700
  * Get a sample.
3491
3701
  * @summary Get sample