edge-impulse-api 1.93.9 → 1.93.10

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.
@@ -5259,6 +5259,17 @@ export class OrganizationCreateProjectApi {
5259
5259
  [name: string]: string;
5260
5260
  };
5261
5261
  }): Promise<GenericApiResponse>;
5262
+ /**
5263
+ * Creates a signed link to securely upload a custom block archive directly to S3.
5264
+ * @summary Create pre-signed S3 upload link for a custom block archive
5265
+ * @param organizationId Organization ID
5266
+ * @param createCustomBlockUploadLinkRequest
5267
+ */
5268
+ createCustomBlockUploadLink(organizationId: number, createCustomBlockUploadLinkRequest: CreateCustomBlockUploadLinkRequest, options?: {
5269
+ headers: {
5270
+ [name: string]: string;
5271
+ };
5272
+ }): Promise<CreateCustomBlockUploadLinkResponse>;
5262
5273
  /**
5263
5274
  * Remove a transformation job. This will stop all running jobs.
5264
5275
  * @summary Delete transformation job
@@ -5282,6 +5293,17 @@ export class OrganizationCreateProjectApi {
5282
5293
  [name: string]: string;
5283
5294
  };
5284
5295
  }): Promise<GenericApiResponse>;
5296
+ /**
5297
+ * Verifies a staged custom block archive and starts a custom block build job.
5298
+ * @summary Finalize custom block upload
5299
+ * @param organizationId Organization ID
5300
+ * @param finalizeCustomBlockUploadRequest
5301
+ */
5302
+ finalizeCustomBlockUpload(organizationId: number, finalizeCustomBlockUploadRequest: FinalizeCustomBlockUploadRequest, options?: {
5303
+ headers: {
5304
+ [name: string]: string;
5305
+ };
5306
+ }): Promise<StartJobResponse>;
5285
5307
  /**
5286
5308
  * Get the current status of a transformation job job.
5287
5309
  * @summary Get transformation job status
@@ -9926,7 +9948,7 @@ export class RawDataApi {
9926
9948
  };
9927
9949
  }): Promise<RebalanceDatasetResponse>;
9928
9950
  /**
9929
- * Rebalances the dataset over training / testing categories. This resets the category for all data and splits it 80%/20% between training and testing. 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. To get the dataset ratio (as returned by the v1 endpoint), use getDatasetRatio.
9951
+ * Rebalances the dataset over training / testing categories. This resets the category for all data and splits it 80%/20% between training and testing. 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. To get the dataset ratio (as returned by the v1 endpoint), use getDatasetRatio. For richer, more powerful dataset splitting with configurable ratios, stratification, and grouping, use splitDataset (`/v1/api/{projectId}/split`).
9930
9952
  * @summary Rebalance dataset
9931
9953
  * @param projectId Project ID
9932
9954
  */
@@ -13841,6 +13863,50 @@ export type CountSamplesResponse = {
13841
13863
  };
13842
13864
 
13843
13865
 
13866
+ export type CreateCustomBlockUploadLinkRequest = {
13867
+ /**
13868
+ * file name
13869
+ */
13870
+ fileName: string;
13871
+ /**
13872
+ * file size in bytes
13873
+ */
13874
+ fileSize: number;
13875
+ /**
13876
+ * hash to identify file changes
13877
+ */
13878
+ fileHash: string;
13879
+ type: CreateCustomBlockUploadLinkRequestTypeEnum;
13880
+ blockId: number;
13881
+ };
13882
+ export type CreateCustomBlockUploadLinkRequestTypeEnum = 'transform' | 'deploy' | 'dsp' | 'transferLearning';
13883
+ export const CreateCustomBlockUploadLinkRequestTypeEnumValues: string[];
13884
+
13885
+
13886
+ export type CreateCustomBlockUploadLinkResponse = {
13887
+ /**
13888
+ * Whether the operation succeeded
13889
+ */
13890
+ success: boolean;
13891
+ /**
13892
+ * Optional error description (set if 'success' was false)
13893
+ */
13894
+ error?: string;
13895
+ /**
13896
+ * S3 Upload Link
13897
+ */
13898
+ url?: string;
13899
+ /**
13900
+ * S3 File Tag
13901
+ */
13902
+ ETag?: string;
13903
+ /**
13904
+ * S3 object key for the staged upload
13905
+ */
13906
+ uploadKey: string;
13907
+ };
13908
+
13909
+
13844
13910
  export type CreateDeveloperProfileResponse = {
13845
13911
  /**
13846
13912
  * Whether the operation succeeded
@@ -16755,6 +16821,30 @@ export type Feature = 'signup-thank-you-page' | 'stripe-live-mode' | 'azure-stor
16755
16821
  export const FeatureValues: string[];
16756
16822
 
16757
16823
 
16824
+ export type FinalizeCustomBlockUploadRequest = {
16825
+ /**
16826
+ * S3 object key for the staged upload
16827
+ */
16828
+ uploadKey: string;
16829
+ /**
16830
+ * file name
16831
+ */
16832
+ fileName: string;
16833
+ /**
16834
+ * file size in bytes
16835
+ */
16836
+ fileSize: number;
16837
+ /**
16838
+ * hash to identify file changes
16839
+ */
16840
+ fileHash: string;
16841
+ type: FinalizeCustomBlockUploadRequestTypeEnum;
16842
+ blockId: number;
16843
+ };
16844
+ export type FinalizeCustomBlockUploadRequestTypeEnum = 'transform' | 'deploy' | 'dsp' | 'transferLearning';
16845
+ export const FinalizeCustomBlockUploadRequestTypeEnumValues: string[];
16846
+
16847
+
16758
16848
  export type FindSegmentSampleRequest = {
16759
16849
  /**
16760
16850
  * If set, the segments are automatically shifted randomly, to make the dataset distribution more uniform.
@@ -25921,6 +25921,74 @@ class OrganizationCreateProjectApi {
25921
25921
  const response = await fetch(url, requestOptions);
25922
25922
  return this.handleResponse(response, 'GenericApiResponse');
25923
25923
  }
25924
+ /**
25925
+ * Creates a signed link to securely upload a custom block archive directly to S3.
25926
+ * @summary Create pre-signed S3 upload link for a custom block archive
25927
+ * @param organizationId Organization ID
25928
+ * @param createCustomBlockUploadLinkRequest
25929
+ */
25930
+ async createCustomBlockUploadLink(organizationId, createCustomBlockUploadLinkRequest, options = { headers: {} }) {
25931
+ const localVarPath = this.basePath + '/api/organizations/{organizationId}/custom-block/upload-link'
25932
+ .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
25933
+ let queryParameters = {};
25934
+ let localVarHeaderParams = {
25935
+ ...(typeof window === "undefined" ? { "User-Agent": "edgeimpulse-api nodejs" } : {}),
25936
+ 'Content-Type': 'application/json',
25937
+ ...this.defaultHeaders,
25938
+ };
25939
+ const produces = ['application/json'];
25940
+ // give precedence to 'application/json'
25941
+ if (produces.indexOf('application/json') >= 0) {
25942
+ localVarHeaderParams.Accept = 'application/json';
25943
+ }
25944
+ else {
25945
+ localVarHeaderParams.Accept = produces.join(',');
25946
+ }
25947
+ let localVarFormParams;
25948
+ // verify required parameter 'organizationId' is not null or undefined
25949
+ if (organizationId === null || organizationId === undefined) {
25950
+ throw new Error('Required parameter organizationId was null or undefined when calling createCustomBlockUploadLink.');
25951
+ }
25952
+ // verify required parameter 'createCustomBlockUploadLinkRequest' is not null or undefined
25953
+ if (createCustomBlockUploadLinkRequest === null || createCustomBlockUploadLinkRequest === undefined) {
25954
+ throw new Error('Required parameter createCustomBlockUploadLinkRequest was null or undefined when calling createCustomBlockUploadLink.');
25955
+ }
25956
+ localVarHeaderParams = {
25957
+ ...localVarHeaderParams,
25958
+ ...options.headers,
25959
+ ...this.opts.extraHeaders,
25960
+ };
25961
+ const queryString = Object.entries(queryParameters)
25962
+ .filter(([, value]) => value !== undefined)
25963
+ .map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
25964
+ .join('&');
25965
+ let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
25966
+ let localVarRequestOptions = {
25967
+ method: 'POST',
25968
+ headers: { ...localVarHeaderParams },
25969
+ };
25970
+ localVarRequestOptions.body = JSON.stringify(createCustomBlockUploadLinkRequest);
25971
+ let requestOptions = localVarRequestOptions;
25972
+ let url = localVarUrl;
25973
+ const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
25974
+ requestOptions = auth_ApiKeyAuthentication.requestOptions;
25975
+ url = auth_ApiKeyAuthentication.url;
25976
+ const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
25977
+ requestOptions = auth_JWTAuthentication.requestOptions;
25978
+ url = auth_JWTAuthentication.url;
25979
+ const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
25980
+ requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
25981
+ url = auth_JWTHttpHeaderAuthentication.url;
25982
+ const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
25983
+ requestOptions = auth_OAuth2.requestOptions;
25984
+ url = auth_OAuth2.url;
25985
+ const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
25986
+ requestOptions = authDefault.requestOptions;
25987
+ url = authDefault.url;
25988
+ (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
25989
+ const response = await fetch(url, requestOptions);
25990
+ return this.handleResponse(response, 'CreateCustomBlockUploadLinkResponse');
25991
+ }
25924
25992
  /**
25925
25993
  * Remove a transformation job. This will stop all running jobs.
25926
25994
  * @summary Delete transformation job
@@ -26063,6 +26131,74 @@ class OrganizationCreateProjectApi {
26063
26131
  const response = await fetch(url, requestOptions);
26064
26132
  return this.handleResponse(response, 'GenericApiResponse');
26065
26133
  }
26134
+ /**
26135
+ * Verifies a staged custom block archive and starts a custom block build job.
26136
+ * @summary Finalize custom block upload
26137
+ * @param organizationId Organization ID
26138
+ * @param finalizeCustomBlockUploadRequest
26139
+ */
26140
+ async finalizeCustomBlockUpload(organizationId, finalizeCustomBlockUploadRequest, options = { headers: {} }) {
26141
+ const localVarPath = this.basePath + '/api/organizations/{organizationId}/custom-block/finalize'
26142
+ .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
26143
+ let queryParameters = {};
26144
+ let localVarHeaderParams = {
26145
+ ...(typeof window === "undefined" ? { "User-Agent": "edgeimpulse-api nodejs" } : {}),
26146
+ 'Content-Type': 'application/json',
26147
+ ...this.defaultHeaders,
26148
+ };
26149
+ const produces = ['application/json'];
26150
+ // give precedence to 'application/json'
26151
+ if (produces.indexOf('application/json') >= 0) {
26152
+ localVarHeaderParams.Accept = 'application/json';
26153
+ }
26154
+ else {
26155
+ localVarHeaderParams.Accept = produces.join(',');
26156
+ }
26157
+ let localVarFormParams;
26158
+ // verify required parameter 'organizationId' is not null or undefined
26159
+ if (organizationId === null || organizationId === undefined) {
26160
+ throw new Error('Required parameter organizationId was null or undefined when calling finalizeCustomBlockUpload.');
26161
+ }
26162
+ // verify required parameter 'finalizeCustomBlockUploadRequest' is not null or undefined
26163
+ if (finalizeCustomBlockUploadRequest === null || finalizeCustomBlockUploadRequest === undefined) {
26164
+ throw new Error('Required parameter finalizeCustomBlockUploadRequest was null or undefined when calling finalizeCustomBlockUpload.');
26165
+ }
26166
+ localVarHeaderParams = {
26167
+ ...localVarHeaderParams,
26168
+ ...options.headers,
26169
+ ...this.opts.extraHeaders,
26170
+ };
26171
+ const queryString = Object.entries(queryParameters)
26172
+ .filter(([, value]) => value !== undefined)
26173
+ .map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
26174
+ .join('&');
26175
+ let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
26176
+ let localVarRequestOptions = {
26177
+ method: 'POST',
26178
+ headers: { ...localVarHeaderParams },
26179
+ };
26180
+ localVarRequestOptions.body = JSON.stringify(finalizeCustomBlockUploadRequest);
26181
+ let requestOptions = localVarRequestOptions;
26182
+ let url = localVarUrl;
26183
+ const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
26184
+ requestOptions = auth_ApiKeyAuthentication.requestOptions;
26185
+ url = auth_ApiKeyAuthentication.url;
26186
+ const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
26187
+ requestOptions = auth_JWTAuthentication.requestOptions;
26188
+ url = auth_JWTAuthentication.url;
26189
+ const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
26190
+ requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
26191
+ url = auth_JWTHttpHeaderAuthentication.url;
26192
+ const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
26193
+ requestOptions = auth_OAuth2.requestOptions;
26194
+ url = auth_OAuth2.url;
26195
+ const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
26196
+ requestOptions = authDefault.requestOptions;
26197
+ url = authDefault.url;
26198
+ (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
26199
+ const response = await fetch(url, requestOptions);
26200
+ return this.handleResponse(response, 'StartJobResponse');
26201
+ }
26066
26202
  /**
26067
26203
  * Get the current status of a transformation job job.
26068
26204
  * @summary Get transformation job status
@@ -48652,7 +48788,7 @@ class RawDataApi {
48652
48788
  return this.handleResponse(response, 'RebalanceDatasetResponse');
48653
48789
  }
48654
48790
  /**
48655
- * Rebalances the dataset over training / testing categories. This resets the category for all data and splits it 80%/20% between training and testing. 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. To get the dataset ratio (as returned by the v1 endpoint), use getDatasetRatio.
48791
+ * Rebalances the dataset over training / testing categories. This resets the category for all data and splits it 80%/20% between training and testing. 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. To get the dataset ratio (as returned by the v1 endpoint), use getDatasetRatio. For richer, more powerful dataset splitting with configurable ratios, stratification, and grouping, use splitDataset (`/v1/api/{projectId}/split`).
48656
48792
  * @summary Rebalance dataset
48657
48793
  * @param projectId Project ID
48658
48794
  */
@@ -56945,6 +57081,22 @@ Object.defineProperty(exports, "__esModule", { value: true });
56945
57081
  });
56946
57082
 
56947
57083
 
57084
+ define("library/sdk/model/createCustomBlockUploadLinkRequest", ["require", "exports"], function (require, exports) {
57085
+ "use strict";
57086
+ // Generated by studio/openapi/generate-models/convert.ts
57087
+ Object.defineProperty(exports, "__esModule", { value: true });
57088
+ exports.CreateCustomBlockUploadLinkRequestTypeEnumValues = void 0;
57089
+ exports.CreateCustomBlockUploadLinkRequestTypeEnumValues = ['transform', 'deploy', 'dsp', 'transferLearning'];
57090
+ });
57091
+
57092
+
57093
+ define("library/sdk/model/createCustomBlockUploadLinkResponse", ["require", "exports"], function (require, exports) {
57094
+ "use strict";
57095
+ // Generated by studio/openapi/generate-models/convert.ts
57096
+ Object.defineProperty(exports, "__esModule", { value: true });
57097
+ });
57098
+
57099
+
56948
57100
  define("library/sdk/model/createDeveloperProfileResponse", ["require", "exports"], function (require, exports) {
56949
57101
  "use strict";
56950
57102
  // Generated by studio/openapi/generate-models/convert.ts
@@ -58033,6 +58185,15 @@ exports.FeatureValues = ['signup-thank-you-page', 'stripe-live-mode', 'azure-sto
58033
58185
  });
58034
58186
 
58035
58187
 
58188
+ define("library/sdk/model/finalizeCustomBlockUploadRequest", ["require", "exports"], function (require, exports) {
58189
+ "use strict";
58190
+ // Generated by studio/openapi/generate-models/convert.ts
58191
+ Object.defineProperty(exports, "__esModule", { value: true });
58192
+ exports.FinalizeCustomBlockUploadRequestTypeEnumValues = void 0;
58193
+ exports.FinalizeCustomBlockUploadRequestTypeEnumValues = ['transform', 'deploy', 'dsp', 'transferLearning'];
58194
+ });
58195
+
58196
+
58036
58197
  define("library/sdk/model/findSegmentSampleRequest", ["require", "exports"], function (require, exports) {
58037
58198
  "use strict";
58038
58199
  // Generated by studio/openapi/generate-models/convert.ts
@@ -59677,6 +59838,8 @@ __exportStar(require("./convertUserRequest"), exports);
59677
59838
  __exportStar(require("./cosineSimilarityData"), exports);
59678
59839
  __exportStar(require("./cosineSimilarityIssue"), exports);
59679
59840
  __exportStar(require("./countSamplesResponse"), exports);
59841
+ __exportStar(require("./createCustomBlockUploadLinkRequest"), exports);
59842
+ __exportStar(require("./createCustomBlockUploadLinkResponse"), exports);
59680
59843
  __exportStar(require("./createDeveloperProfileResponse"), exports);
59681
59844
  __exportStar(require("./createDeviceRequest"), exports);
59682
59845
  __exportStar(require("./createEnterpriseTrialResponse"), exports);
@@ -59822,6 +59985,7 @@ __exportStar(require("./exportKerasBlockDataRequest"), exports);
59822
59985
  __exportStar(require("./exportOriginalDataRequest"), exports);
59823
59986
  __exportStar(require("./exportWavDataRequest"), exports);
59824
59987
  __exportStar(require("./feature"), exports);
59988
+ __exportStar(require("./finalizeCustomBlockUploadRequest"), exports);
59825
59989
  __exportStar(require("./findSegmentSampleRequest"), exports);
59826
59990
  __exportStar(require("./findSegmentSampleResponse"), exports);
59827
59991
  __exportStar(require("./findSyntiantPosteriorRequest"), exports);