edge-impulse-api 1.93.22 → 1.93.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 (38) hide show
  1. package/build/browser/edge-impulse-api.d.ts +81 -36
  2. package/build/browser/edge-impulse-api.js +110 -3
  3. package/build/browser/edge-impulse-api.js.map +1 -1
  4. package/build/library/sdk/api/datasetVersionsApi.d.ts +11 -0
  5. package/build/library/sdk/api/datasetVersionsApi.js +62 -0
  6. package/build/library/sdk/api/datasetVersionsApi.js.map +1 -1
  7. package/build/library/sdk/model/actorProjectApiKey.d.ts +1 -22
  8. package/build/library/sdk/model/actorProjectApiKey.js +1 -2
  9. package/build/library/sdk/model/actorProjectApiKey.js.map +1 -1
  10. package/build/library/sdk/model/createDatasetVersionResponse.d.ts +24 -0
  11. package/build/library/sdk/model/createDatasetVersionResponse.js +4 -0
  12. package/build/library/sdk/model/createDatasetVersionResponse.js.map +1 -0
  13. package/build/library/sdk/model/datasetVersionType.d.ts +1 -1
  14. package/build/library/sdk/model/datasetVersionType.js +1 -1
  15. package/build/library/sdk/model/datasetVersionType.js.map +1 -1
  16. package/build/library/sdk/model/models.d.ts +5 -0
  17. package/build/library/sdk/model/models.js +5 -0
  18. package/build/library/sdk/model/models.js.map +1 -1
  19. package/build/library/sdk/model/vlmCandidateLabelMap.d.ts +2 -2
  20. package/build/library/sdk/model/vlmCandidateLabelsSingle.d.ts +7 -0
  21. package/build/library/sdk/model/vlmCandidateLabelsSingle.js +6 -0
  22. package/build/library/sdk/model/vlmCandidateLabelsSingle.js.map +1 -0
  23. package/build/library/sdk/model/vlmConfiguration.d.ts +2 -0
  24. package/build/library/sdk/model/vlmConfigurationBase.d.ts +2 -0
  25. package/build/library/sdk/model/vlmInferenceResultsResults.d.ts +2 -6
  26. package/build/library/sdk/model/vlmModel.d.ts +0 -6
  27. package/build/library/sdk/model/vlmPromptComponent.d.ts +0 -4
  28. package/build/library/sdk/model/vlmPromptComponentConfig.d.ts +2 -0
  29. package/build/library/sdk/model/vlmPromptMode.d.ts +2 -0
  30. package/build/library/sdk/model/vlmPromptMode.js +6 -0
  31. package/build/library/sdk/model/vlmPromptMode.js.map +1 -0
  32. package/build/library/sdk/model/vlmResult.d.ts +22 -0
  33. package/build/library/sdk/model/vlmResult.js +4 -0
  34. package/build/library/sdk/model/vlmResult.js.map +1 -0
  35. package/build/library/sdk/model/vlmResultType.d.ts +2 -0
  36. package/build/library/sdk/model/vlmResultType.js +6 -0
  37. package/build/library/sdk/model/vlmResultType.js.map +1 -0
  38. package/package.json +1 -1
@@ -2158,6 +2158,16 @@ export class DatasetVersionsApi {
2158
2158
  setDefaultAuthentication(auth: Authentication): void;
2159
2159
  setApiKey(key: DatasetVersionsApiApiKeys, value: string | undefined): void;
2160
2160
  set accessToken(token: string);
2161
+ /**
2162
+ * Trigger a manual snapshot of the current dataset. Snapshots are usually created automatically when dataset changes are detected, but this endpoint lets you control when one is created (for example, before a large update). The request returns immediately, and a background process typically creates the new dataset version within a few seconds. If a manual snapshot is already in progress, a null window is returned.
2163
+ * @summary Create a new snapshot of the dataset
2164
+ * @param projectId Project ID
2165
+ */
2166
+ createDatasetVersion(projectId: number, options?: {
2167
+ headers: {
2168
+ [name: string]: string;
2169
+ };
2170
+ }): Promise<CreateDatasetVersionResponse>;
2161
2171
  /**
2162
2172
  * Get details of a specific dataset version for this project.
2163
2173
  * @summary Get dataset version
@@ -11866,30 +11876,11 @@ export const ActorOAuthClientTypeEnumValues: string[];
11866
11876
 
11867
11877
 
11868
11878
  export type ActorProjectApiKey = {
11869
- id: number;
11870
- apiKey: string;
11871
- isDevelopmentKey: boolean;
11879
+ type: ActorProjectApiKeyTypeEnum;
11872
11880
  name: string;
11873
11881
  created: Date;
11874
- role: ActorProjectApiKeyRoleEnum;
11875
11882
  createdByUser?: CreatedUpdatedByUser;
11876
- /**
11877
- * When this API key was last used.
11878
- */
11879
- lastUsed?: ProjectApiKeyLastUsed;
11880
- /**
11881
- * If the key has a ttl set, when the key will expire
11882
- */
11883
- expires?: Date;
11884
- /**
11885
- * OAuth client_id that created this API key through an OAuth-scoped key endpoint.
11886
- */
11887
- createdViaOAuthClientId?: string;
11888
- createdForExtension?: ApiKeyExtension;
11889
- type: ActorProjectApiKeyTypeEnum;
11890
11883
  };
11891
- export type ActorProjectApiKeyRoleEnum = 'admin' | 'readonly' | 'ingestiononly' | 'ingestion_deployment' | 'wladmin';
11892
- export const ActorProjectApiKeyRoleEnumValues: string[];
11893
11884
  export type ActorProjectApiKeyTypeEnum = 'projectApiKey';
11894
11885
  export const ActorProjectApiKeyTypeEnumValues: string[];
11895
11886
 
@@ -14393,6 +14384,32 @@ export type CreateCustomBlockUploadLinkResponse = {
14393
14384
  };
14394
14385
 
14395
14386
 
14387
+ export type CreateDatasetVersionResponse = {
14388
+ /**
14389
+ * Whether the operation succeeded
14390
+ */
14391
+ success: boolean;
14392
+ /**
14393
+ * Optional error description (set if 'success' was false)
14394
+ */
14395
+ error?: string;
14396
+ window?: {
14397
+ /**
14398
+ * Temporary window ID that cannot be used for retrieval. The window is deleted after a successful commit.
14399
+ */
14400
+ windowId: number;
14401
+ /**
14402
+ * Date and time when this dataset version window closed.
14403
+ */
14404
+ closed: Date;
14405
+ /**
14406
+ * Date and time when this dataset version window opened.
14407
+ */
14408
+ opened: Date;
14409
+ } | null;
14410
+ };
14411
+
14412
+
14396
14413
  export type CreateDeveloperProfileResponse = {
14397
14414
  /**
14398
14415
  * Whether the operation succeeded
@@ -16168,7 +16185,7 @@ export type DatasetVersionSummary = {
16168
16185
  };
16169
16186
 
16170
16187
 
16171
- export type DatasetVersionType = 'auto_save' | 'restore';
16188
+ export type DatasetVersionType = 'auto_save' | 'restore' | 'manual';
16172
16189
  export const DatasetVersionTypeValues: string[];
16173
16190
 
16174
16191
 
@@ -28774,8 +28791,16 @@ export type VlmCandidateLabelItem = {
28774
28791
 
28775
28792
  export type VlmCandidateLabelMap = {
28776
28793
  version: number;
28794
+ data: VlmCandidateLabelsSingle;
28795
+ };
28796
+
28797
+
28798
+ export type VlmCandidateLabelsSingle = {
28799
+ type: VlmCandidateLabelsSingleTypeEnum;
28777
28800
  candidateLabels: VlmCandidateLabelItem[];
28778
28801
  };
28802
+ export type VlmCandidateLabelsSingleTypeEnum = 'single';
28803
+ export const VlmCandidateLabelsSingleTypeEnumValues: string[];
28779
28804
 
28780
28805
 
28781
28806
  export type VlmConfigResponse = {
@@ -28797,6 +28822,7 @@ export type VlmConfiguration = {
28797
28822
  candidateLabelsMap?: VlmCandidateLabelMap;
28798
28823
  promptComponents?: VlmPromptComponentConfig;
28799
28824
  parameters?: VlmPromptConfigParameters;
28825
+ labelingMethod: ProjectLabelingMethod;
28800
28826
  /**
28801
28827
  * Unique configuration ID, updated each time the config is changed
28802
28828
  */
@@ -28810,6 +28836,7 @@ export type VlmConfigurationBase = {
28810
28836
  candidateLabelsMap?: VlmCandidateLabelMap;
28811
28837
  promptComponents?: VlmPromptComponentConfig;
28812
28838
  parameters?: VlmPromptConfigParameters;
28839
+ labelingMethod: ProjectLabelingMethod;
28813
28840
  };
28814
28841
 
28815
28842
 
@@ -28873,12 +28900,7 @@ export type VlmInferenceResults = {
28873
28900
 
28874
28901
  export type VlmInferenceResultsResults = {
28875
28902
  sample: Sample;
28876
- /**
28877
- * Classification results for the sample, or null for pending results.
28878
- */
28879
- result: {
28880
- [key: string]: number;
28881
- } | null;
28903
+ result: VlmResult | null;
28882
28904
  };
28883
28905
 
28884
28906
 
@@ -28901,11 +28923,6 @@ export type VlmModel = {
28901
28923
  * If true, the warmup endpoint may be called to prepare the model for inference
28902
28924
  */
28903
28925
  requiresWarmup?: boolean;
28904
- /**
28905
- * List of example prompt templates available for insertion. Each template is an array of components defining the
28906
- * prompt text and whether the component is user-editable.
28907
- */
28908
- availablePromptComponents?: VlmPromptComponent[][];
28909
28926
  defaultParameters: DSPGroup[];
28910
28927
  };
28911
28928
 
@@ -28919,15 +28936,12 @@ export type VlmPromptComponent = {
28919
28936
  * The text content of the prompt.
28920
28937
  */
28921
28938
  text: string;
28922
- /**
28923
- * Indicates whether the prompt component can be edited by the user.
28924
- */
28925
- userEditable: boolean;
28926
28939
  };
28927
28940
 
28928
28941
 
28929
28942
  export type VlmPromptComponentConfig = {
28930
28943
  version: number;
28944
+ promptMode: VlmPromptMode;
28931
28945
  promptComponents: VlmPromptComponent[];
28932
28946
  };
28933
28947
 
@@ -28944,6 +28958,37 @@ export type VlmPromptConfigParameters = {
28944
28958
  };
28945
28959
 
28946
28960
 
28961
+ export type VlmPromptMode = 'single' | 'multi';
28962
+ export const VlmPromptModeValues: string[];
28963
+
28964
+
28965
+ /**
28966
+ * Classification results for the sample
28967
+ */
28968
+ export type VlmResult = {
28969
+ type: VlmResultType;
28970
+ version: number;
28971
+ result: {
28972
+ /**
28973
+ * Group key for multi-label classification
28974
+ */
28975
+ name?: string;
28976
+ /**
28977
+ * VLM zero-shot models have a single key with the value 1; CLIP models will show each candidate label's
28978
+ * similarity
28979
+ * score
28980
+ */
28981
+ scores: {
28982
+ [key: string]: number;
28983
+ };
28984
+ }[];
28985
+ };
28986
+
28987
+
28988
+ export type VlmResultType = 'classification';
28989
+ export const VlmResultTypeValues: string[];
28990
+
28991
+
28947
28992
  export type VlmSetConfigResponse = GenericApiResponse;
28948
28993
 
28949
28994
 
@@ -10813,6 +10813,68 @@ class DatasetVersionsApi {
10813
10813
  set accessToken(token) {
10814
10814
  this.authentications.OAuth2.accessToken = token;
10815
10815
  }
10816
+ /**
10817
+ * Trigger a manual snapshot of the current dataset. Snapshots are usually created automatically when dataset changes are detected, but this endpoint lets you control when one is created (for example, before a large update). The request returns immediately, and a background process typically creates the new dataset version within a few seconds. If a manual snapshot is already in progress, a null window is returned.
10818
+ * @summary Create a new snapshot of the dataset
10819
+ * @param projectId Project ID
10820
+ */
10821
+ async createDatasetVersion(projectId, options = { headers: {} }) {
10822
+ const localVarPath = this.basePath + '/api/{projectId}/dataset-versions/create'
10823
+ .replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)));
10824
+ let queryParameters = {};
10825
+ let localVarHeaderParams = {
10826
+ ...(typeof window === "undefined" ? { "User-Agent": "edgeimpulse-api nodejs" } : {}),
10827
+ 'Content-Type': 'application/json',
10828
+ ...this.defaultHeaders,
10829
+ };
10830
+ const produces = ['application/json'];
10831
+ // give precedence to 'application/json'
10832
+ if (produces.indexOf('application/json') >= 0) {
10833
+ localVarHeaderParams.Accept = 'application/json';
10834
+ }
10835
+ else {
10836
+ localVarHeaderParams.Accept = produces.join(',');
10837
+ }
10838
+ let localVarFormParams;
10839
+ // verify required parameter 'projectId' is not null or undefined
10840
+ if (projectId === null || projectId === undefined) {
10841
+ throw new Error('Required parameter projectId was null or undefined when calling createDatasetVersion.');
10842
+ }
10843
+ localVarHeaderParams = {
10844
+ ...localVarHeaderParams,
10845
+ ...options.headers,
10846
+ ...this.opts.extraHeaders,
10847
+ };
10848
+ const queryString = Object.entries(queryParameters)
10849
+ .filter(([, value]) => value !== undefined)
10850
+ .map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
10851
+ .join('&');
10852
+ let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
10853
+ let localVarRequestOptions = {
10854
+ method: 'POST',
10855
+ headers: { ...localVarHeaderParams },
10856
+ };
10857
+ let requestOptions = localVarRequestOptions;
10858
+ let url = localVarUrl;
10859
+ const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
10860
+ requestOptions = auth_ApiKeyAuthentication.requestOptions;
10861
+ url = auth_ApiKeyAuthentication.url;
10862
+ const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
10863
+ requestOptions = auth_JWTAuthentication.requestOptions;
10864
+ url = auth_JWTAuthentication.url;
10865
+ const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
10866
+ requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
10867
+ url = auth_JWTHttpHeaderAuthentication.url;
10868
+ const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
10869
+ requestOptions = auth_OAuth2.requestOptions;
10870
+ url = auth_OAuth2.url;
10871
+ const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
10872
+ requestOptions = authDefault.requestOptions;
10873
+ url = authDefault.url;
10874
+ (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
10875
+ const response = await fetch(url, requestOptions);
10876
+ return this.handleResponse(response, 'CreateDatasetVersionResponse');
10877
+ }
10816
10878
  /**
10817
10879
  * Get details of a specific dataset version for this project.
10818
10880
  * @summary Get dataset version
@@ -58201,8 +58263,7 @@ define("library/sdk/model/actorProjectApiKey", ["require", "exports"], function
58201
58263
  "use strict";
58202
58264
  // Generated by studio/openapi/generate-models/convert.ts
58203
58265
  Object.defineProperty(exports, "__esModule", { value: true });
58204
- exports.ActorProjectApiKeyTypeEnumValues = exports.ActorProjectApiKeyRoleEnumValues = void 0;
58205
- exports.ActorProjectApiKeyRoleEnumValues = ['admin', 'readonly', 'ingestiononly', 'ingestion_deployment', 'wladmin'];
58266
+ exports.ActorProjectApiKeyTypeEnumValues = void 0;
58206
58267
  exports.ActorProjectApiKeyTypeEnumValues = ['projectApiKey'];
58207
58268
  });
58208
58269
 
@@ -59164,6 +59225,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
59164
59225
  });
59165
59226
 
59166
59227
 
59228
+ define("library/sdk/model/createDatasetVersionResponse", ["require", "exports"], function (require, exports) {
59229
+ "use strict";
59230
+ // Generated by studio/openapi/generate-models/convert.ts
59231
+ Object.defineProperty(exports, "__esModule", { value: true });
59232
+ });
59233
+
59234
+
59167
59235
  define("library/sdk/model/createDeveloperProfileResponse", ["require", "exports"], function (require, exports) {
59168
59236
  "use strict";
59169
59237
  // Generated by studio/openapi/generate-models/convert.ts
@@ -59725,7 +59793,7 @@ define("library/sdk/model/datasetVersionType", ["require", "exports"], function
59725
59793
  // Generated by studio/openapi/generate-models/convert.ts
59726
59794
  Object.defineProperty(exports, "__esModule", { value: true });
59727
59795
  exports.DatasetVersionTypeValues = void 0;
59728
- exports.DatasetVersionTypeValues = ['auto_save', 'restore'];
59796
+ exports.DatasetVersionTypeValues = ['auto_save', 'restore', 'manual'];
59729
59797
  });
59730
59798
 
59731
59799
 
@@ -62056,6 +62124,7 @@ __exportStar(require("./cosineSimilarityIssue"), exports);
62056
62124
  __exportStar(require("./countSamplesResponse"), exports);
62057
62125
  __exportStar(require("./createCustomBlockUploadLinkRequest"), exports);
62058
62126
  __exportStar(require("./createCustomBlockUploadLinkResponse"), exports);
62127
+ __exportStar(require("./createDatasetVersionResponse"), exports);
62059
62128
  __exportStar(require("./createDeveloperProfileResponse"), exports);
62060
62129
  __exportStar(require("./createDeviceRequest"), exports);
62061
62130
  __exportStar(require("./createEnterpriseTrialResponse"), exports);
@@ -62754,6 +62823,7 @@ __exportStar(require("./verifyResetPasswordRequest"), exports);
62754
62823
  __exportStar(require("./verifySignupApprovalResponse"), exports);
62755
62824
  __exportStar(require("./vlmCandidateLabelItem"), exports);
62756
62825
  __exportStar(require("./vlmCandidateLabelMap"), exports);
62826
+ __exportStar(require("./vlmCandidateLabelsSingle"), exports);
62757
62827
  __exportStar(require("./vlmConfigResponse"), exports);
62758
62828
  __exportStar(require("./vlmConfiguration"), exports);
62759
62829
  __exportStar(require("./vlmConfigurationBase"), exports);
@@ -62770,6 +62840,9 @@ __exportStar(require("./vlmPromptComponent"), exports);
62770
62840
  __exportStar(require("./vlmPromptComponentConfig"), exports);
62771
62841
  __exportStar(require("./vlmPromptConfigParamItem"), exports);
62772
62842
  __exportStar(require("./vlmPromptConfigParameters"), exports);
62843
+ __exportStar(require("./vlmPromptMode"), exports);
62844
+ __exportStar(require("./vlmResult"), exports);
62845
+ __exportStar(require("./vlmResultType"), exports);
62773
62846
  __exportStar(require("./vlmSetConfigResponse"), exports);
62774
62847
  __exportStar(require("./webhookDestination"), exports);
62775
62848
  __exportStar(require("./whitelabel"), exports);
@@ -65446,6 +65519,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
65446
65519
  });
65447
65520
 
65448
65521
 
65522
+ define("library/sdk/model/vlmCandidateLabelsSingle", ["require", "exports"], function (require, exports) {
65523
+ "use strict";
65524
+ // Generated by studio/openapi/generate-models/convert.ts
65525
+ Object.defineProperty(exports, "__esModule", { value: true });
65526
+ exports.VlmCandidateLabelsSingleTypeEnumValues = void 0;
65527
+ exports.VlmCandidateLabelsSingleTypeEnumValues = ['single'];
65528
+ });
65529
+
65530
+
65449
65531
  define("library/sdk/model/vlmConfigResponse", ["require", "exports"], function (require, exports) {
65450
65532
  "use strict";
65451
65533
  // Generated by studio/openapi/generate-models/convert.ts
@@ -65560,6 +65642,31 @@ Object.defineProperty(exports, "__esModule", { value: true });
65560
65642
  });
65561
65643
 
65562
65644
 
65645
+ define("library/sdk/model/vlmPromptMode", ["require", "exports"], function (require, exports) {
65646
+ "use strict";
65647
+ // Generated by studio/openapi/generate-models/convert.ts
65648
+ Object.defineProperty(exports, "__esModule", { value: true });
65649
+ exports.VlmPromptModeValues = void 0;
65650
+ exports.VlmPromptModeValues = ['single', 'multi'];
65651
+ });
65652
+
65653
+
65654
+ define("library/sdk/model/vlmResult", ["require", "exports"], function (require, exports) {
65655
+ "use strict";
65656
+ // Generated by studio/openapi/generate-models/convert.ts
65657
+ Object.defineProperty(exports, "__esModule", { value: true });
65658
+ });
65659
+
65660
+
65661
+ define("library/sdk/model/vlmResultType", ["require", "exports"], function (require, exports) {
65662
+ "use strict";
65663
+ // Generated by studio/openapi/generate-models/convert.ts
65664
+ Object.defineProperty(exports, "__esModule", { value: true });
65665
+ exports.VlmResultTypeValues = void 0;
65666
+ exports.VlmResultTypeValues = ['classification'];
65667
+ });
65668
+
65669
+
65563
65670
  define("library/sdk/model/vlmSetConfigResponse", ["require", "exports"], function (require, exports) {
65564
65671
  "use strict";
65565
65672
  // Generated by studio/openapi/generate-models/convert.ts