edge-impulse-api 1.95.10 → 1.95.12

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 (41) hide show
  1. package/build/browser/edge-impulse-api.d.ts +73 -26
  2. package/build/browser/edge-impulse-api.js +185 -15
  3. package/build/browser/edge-impulse-api.js.map +1 -1
  4. package/build/library/sdk/api/deploymentApi.d.ts +1 -1
  5. package/build/library/sdk/api/deploymentApi.js +1 -1
  6. package/build/library/sdk/api/jobsApi.d.ts +1 -1
  7. package/build/library/sdk/api/jobsApi.js +1 -1
  8. package/build/library/sdk/api/learnApi.d.ts +33 -0
  9. package/build/library/sdk/api/learnApi.js +160 -0
  10. package/build/library/sdk/api/learnApi.js.map +1 -1
  11. package/build/library/sdk/api/organizationBlocksApi.d.ts +5 -4
  12. package/build/library/sdk/api/organizationBlocksApi.js +4 -4
  13. package/build/library/sdk/api/organizationBlocksApi.js.map +1 -1
  14. package/build/library/sdk/model/addOrganizationExtensionBlockRequest.d.ts +2 -6
  15. package/build/library/sdk/model/addOrganizationExtensionBlockRequest.js +0 -2
  16. package/build/library/sdk/model/addOrganizationExtensionBlockRequest.js.map +1 -1
  17. package/build/library/sdk/model/extension.d.ts +2 -3
  18. package/build/library/sdk/model/extension.js +0 -2
  19. package/build/library/sdk/model/extension.js.map +1 -1
  20. package/build/library/sdk/model/extensionNavbarLocation.d.ts +5 -0
  21. package/build/library/sdk/model/extensionNavbarLocation.js +6 -0
  22. package/build/library/sdk/model/extensionNavbarLocation.js.map +1 -0
  23. package/build/library/sdk/model/getAllImpulsesResponse.d.ts +4 -0
  24. package/build/library/sdk/model/listLearnBlockFilesResponse.d.ts +15 -0
  25. package/build/library/sdk/model/listLearnBlockFilesResponse.js +4 -0
  26. package/build/library/sdk/model/listLearnBlockFilesResponse.js.map +1 -0
  27. package/build/library/sdk/model/models.d.ts +2 -0
  28. package/build/library/sdk/model/models.js +2 -0
  29. package/build/library/sdk/model/models.js.map +1 -1
  30. package/build/library/sdk/model/oAuthScope.d.ts +1 -1
  31. package/build/library/sdk/model/oAuthScope.js +1 -1
  32. package/build/library/sdk/model/oAuthScope.js.map +1 -1
  33. package/build/library/sdk/model/projectExtension.d.ts +2 -3
  34. package/build/library/sdk/model/projectExtension.js +0 -2
  35. package/build/library/sdk/model/projectExtension.js.map +1 -1
  36. package/build/library/sdk/model/updateOrganizationExtensionBlockRequest.d.ts +2 -6
  37. package/build/library/sdk/model/updateOrganizationExtensionBlockRequest.js +0 -2
  38. package/build/library/sdk/model/updateOrganizationExtensionBlockRequest.js.map +1 -1
  39. package/build/library/sdk/model/updateProjectRequest.d.ts +2 -1
  40. package/build/library/sdk/model/updateProjectRequest.js.map +1 -1
  41. package/package.json +1 -1
@@ -2774,7 +2774,7 @@ export class DeploymentApi {
2774
2774
  setApiKey(key: DeploymentApiApiKeys, value: string | undefined): void;
2775
2775
  set accessToken(token: string);
2776
2776
  /**
2777
- * Create a deployment job for a _public_ project. You can only create deployments for \"wasm\" and \"wasm-browser-simd\" deployment types. If a deployment already exists, jobId is null. If a deployment did not exist, or a job is created, jobId is set to an integer, and you can get updates via `getPublicDeploymentStatus`. When this step is complete use `downloadHistoricDeployment` to download the artefacts using deploymentVersion. Updates are _NOT_ streamed over the websocket API (for security reasons); but can be obtained via `getPublicDeploymentStatus`.
2777
+ * Create a deployment job for a _public_ project. If a deployment already exists, jobId is null. If a deployment did not exist, or a job is created, jobId is set to an integer, and you can get updates via `getPublicDeploymentStatus`. When this step is complete use `downloadHistoricDeployment` to download the artefacts using deploymentVersion. Updates are _NOT_ streamed over the websocket API (for security reasons); but can be obtained via `getPublicDeploymentStatus`.
2778
2778
  * @summary Build deployment (public)
2779
2779
  * @param projectId Project ID
2780
2780
  * @param buildPublicDeploymentJobRequest
@@ -4686,7 +4686,7 @@ export class JobsApi {
4686
4686
  }) => void;
4687
4687
  }): Promise<StartJobResponse>;
4688
4688
  /**
4689
- * Create a new version of the project. This stores all data and configuration offsite. If you have access to the enterprise version of Edge Impulse you can store your data in your own storage buckets (only through JWT token authentication).
4689
+ * Create a new version of the project. This stores all data and configuration offsite. If you have access to the enterprise version of Edge Impulse you can store your data in your own storage buckets (only through JWT token authentication). OAuth requests that set makePublic to true also require the projects:versions:public:create scope.
4690
4690
  * @summary Version project
4691
4691
  * @param projectId Project ID
4692
4692
  * @param projectVersionRequest
@@ -4797,6 +4797,9 @@ type getPretrainedModelInfoQueryParams = {
4797
4797
  type profilePretrainedModelQueryParams = {
4798
4798
  impulseId?: number;
4799
4799
  };
4800
+ type readLearnBlockCustomDataFileQueryParams = {
4801
+ path: string;
4802
+ };
4800
4803
  type savePretrainedModelParametersQueryParams = {
4801
4804
  impulseId?: number;
4802
4805
  };
@@ -5091,6 +5094,20 @@ export class LearnApi {
5091
5094
  [name: string]: string;
5092
5095
  }) => void;
5093
5096
  }): Promise<VlmConfigResponse>;
5097
+ /**
5098
+ * List all custom files for the learn block as they exist on the file system. You can write extra files to /home/custom_data in your custom learn block (or in expert mode); then pick them up here. This yields all files across all subfolders.
5099
+ * @summary List learn block custom data files
5100
+ * @param projectId Project ID
5101
+ * @param learnId Learn Block ID, use the impulse functions to retrieve the ID
5102
+ */
5103
+ listLearnBlockCustomDataFiles(projectId: number, learnId: number, options?: {
5104
+ headers: {
5105
+ [name: string]: string;
5106
+ };
5107
+ responseHeadersCallback?: (headers: {
5108
+ [name: string]: string;
5109
+ }) => void;
5110
+ }): Promise<ListLearnBlockFilesResponse>;
5094
5111
  /**
5095
5112
  * Returns the latency, RAM and ROM used for the pretrained model - upload first via `uploadPretrainedModel`. This is using the project\'s selected latency device. Updates are streamed over the websocket API (or can be retrieved through the /stdout endpoint). Use getProfileTfliteJobResult to get the results when the job is completed.
5096
5113
  * @summary Profile pretrained model
@@ -5105,6 +5122,21 @@ export class LearnApi {
5105
5122
  [name: string]: string;
5106
5123
  }) => void;
5107
5124
  }): Promise<StartJobResponse>;
5125
+ /**
5126
+ * Read a file from the learn block as it exists on the file system. You can write extra files to /home/custom_data in your custom learn block (or in expert mode); then pick them up here. Use \"listLearnBlockCustomDataFiles\" to list all available files.
5127
+ * @summary Read learn block custom data file
5128
+ * @param projectId Project ID
5129
+ * @param learnId Learn Block ID, use the impulse functions to retrieve the ID
5130
+ * @param path CDN Path
5131
+ */
5132
+ readLearnBlockCustomDataFile(projectId: number, learnId: number, queryParams: readLearnBlockCustomDataFileQueryParams, options?: {
5133
+ headers: {
5134
+ [name: string]: string;
5135
+ };
5136
+ responseHeadersCallback?: (headers: {
5137
+ [name: string]: string;
5138
+ }) => void;
5139
+ }): Promise<ArrayBuffer>;
5108
5140
  /**
5109
5141
  * Save input / model configuration for a pretrained model. This overrides the current impulse. If you want to deploy a pretrained model from the API, see `startDeployPretrainedModelJob`.
5110
5142
  * @summary Save parameters for pretrained model
@@ -5973,7 +6005,7 @@ export type addOrganizationExtensionBlockFormParams = {
5973
6005
  repositoryUrl?: string;
5974
6006
  logo?: RequestFile;
5975
6007
  navbarIcon?: string;
5976
- navbarLocation: string;
6008
+ navbarLocation: ExtensionNavbarLocation;
5977
6009
  requiredApiKeyRole: ProjectApiKeyRole;
5978
6010
  visibility?: ExtensionVisibility;
5979
6011
  publicProjectTierAvailability?: PublicProjectTierAvailability;
@@ -6007,7 +6039,7 @@ export type updateOrganizationExtensionBlockFormParams = {
6007
6039
  repositoryUrl?: string;
6008
6040
  logo?: RequestFile;
6009
6041
  navbarIcon?: string;
6010
- navbarLocation?: string;
6042
+ navbarLocation?: ExtensionNavbarLocation;
6011
6043
  requiredApiKeyRole?: ProjectApiKeyRole;
6012
6044
  visibility?: ExtensionVisibility;
6013
6045
  publicProjectTierAvailability?: PublicProjectTierAvailability;
@@ -6088,7 +6120,7 @@ export class OrganizationBlocksApi {
6088
6120
  * @param name Extension block name.
6089
6121
  * @param description Extension block description.
6090
6122
  * @param url URL loaded by the extension.
6091
- * @param navbarLocation Studio navigation location for the extension.
6123
+ * @param navbarLocation
6092
6124
  * @param requiredApiKeyRole
6093
6125
  * @param onlyAvailableInProjectId Required if \\\&quot;visibility\\\&quot; is \\\&quot;project\\\&quot;. If set, this extension is scoped to this specific project.
6094
6126
  * @param repositoryUrl Optional source repository URL for the extension.
@@ -6550,7 +6582,7 @@ export class OrganizationBlocksApi {
6550
6582
  * @param repositoryUrl Optional source repository URL for the extension.
6551
6583
  * @param logo Optional logo image for the extension.
6552
6584
  * @param navbarIcon Optional Font Awesome icon class for the navigation item.
6553
- * @param navbarLocation Studio navigation location for the extension.
6585
+ * @param navbarLocation
6554
6586
  * @param requiredApiKeyRole
6555
6587
  * @param visibility
6556
6588
  * @param publicProjectTierAvailability
@@ -14577,10 +14609,7 @@ export type AddOrganizationExtensionBlockRequest = {
14577
14609
  * Optional Font Awesome icon class for the navigation item.
14578
14610
  */
14579
14611
  navbarIcon?: string;
14580
- /**
14581
- * Studio navigation location for the extension.
14582
- */
14583
- navbarLocation: AddOrganizationExtensionBlockRequestNavbarLocationEnum;
14612
+ navbarLocation: ExtensionNavbarLocation;
14584
14613
  requiredApiKeyRole: ProjectApiKeyRole;
14585
14614
  visibility?: ExtensionVisibility;
14586
14615
  publicProjectTierAvailability?: PublicProjectTierAvailability;
@@ -14593,8 +14622,6 @@ export type AddOrganizationExtensionBlockRequest = {
14593
14622
  */
14594
14623
  blockNoLongerAvailableReason?: string;
14595
14624
  };
14596
- export type AddOrganizationExtensionBlockRequestNavbarLocationEnum = 'project' | 'devices' | 'data_acquisition' | 'experiments' | 'create_impulse' | 'dsp_block' | 'learn_block' | 'live_classification' | 'model_testing' | 'deployment' | 'impulse' | 'versioning';
14597
- export const AddOrganizationExtensionBlockRequestNavbarLocationEnumValues: string[];
14598
14625
 
14599
14626
 
14600
14627
  export type AddOrganizationSecretRequest = {
@@ -19832,7 +19859,7 @@ export type Extension = {
19832
19859
  publicProjectTierAvailability: PublicProjectTierAvailability;
19833
19860
  url: string;
19834
19861
  repositoryUrl?: string;
19835
- navbarLocation: ExtensionNavbarLocationEnum;
19862
+ navbarLocation: ExtensionNavbarLocation;
19836
19863
  lastUpdated: Date;
19837
19864
  lastUpdatedByUser?: CreatedUpdatedByUser;
19838
19865
  /**
@@ -19848,8 +19875,13 @@ export type Extension = {
19848
19875
  navbarIcon?: string;
19849
19876
  requiredApiKeyRole: ProjectApiKeyRole;
19850
19877
  };
19851
- export type ExtensionNavbarLocationEnum = 'project' | 'devices' | 'data_acquisition' | 'experiments' | 'create_impulse' | 'dsp_block' | 'learn_block' | 'live_classification' | 'model_testing' | 'deployment' | 'impulse' | 'versioning';
19852
- export const ExtensionNavbarLocationEnumValues: string[];
19878
+
19879
+
19880
+ /**
19881
+ * Studio navigation location for the extension.
19882
+ */
19883
+ export type ExtensionNavbarLocation = 'project' | 'devices' | 'data_acquisition' | 'experiments' | 'create_impulse' | 'upload_model' | 'dsp_block' | 'learn_block' | 'live_classification' | 'model_testing' | 'deployment' | 'impulse' | 'versioning';
19884
+ export const ExtensionNavbarLocationValues: string[];
19853
19885
 
19854
19886
 
19855
19887
  /**
@@ -20072,6 +20104,10 @@ export type GetAllImpulsesResponse = {
20072
20104
  */
20073
20105
  error?: string;
20074
20106
  impulses: Impulse[];
20107
+ /**
20108
+ * The maximum number of impulses that you can create in this project. If unlimited, then this value is set to -1.
20109
+ */
20110
+ maxImpulseCount: number;
20075
20111
  };
20076
20112
 
20077
20113
 
@@ -23281,6 +23317,23 @@ export type ListJobsResponse = {
23281
23317
  };
23282
23318
 
23283
23319
 
23320
+ export type ListLearnBlockFilesResponse = {
23321
+ /**
23322
+ * Whether the operation succeeded
23323
+ */
23324
+ success: boolean;
23325
+ /**
23326
+ * Optional error description (set if 'success' was false)
23327
+ */
23328
+ error?: string;
23329
+ files: {
23330
+ path: string;
23331
+ mimeType: string;
23332
+ size: number;
23333
+ }[];
23334
+ };
23335
+
23336
+
23284
23337
  export type ListModelsResponse = {
23285
23338
  /**
23286
23339
  * Whether the operation succeeded
@@ -24183,7 +24236,7 @@ export type NeighborsScore = {
24183
24236
  };
24184
24237
 
24185
24238
 
24186
- export type OAuthScope = 'ai-actions:create' | 'ai-actions:delete' | 'ai-actions:read' | 'ai-actions:update' | 'blocks:read' | 'blocks:create' | 'blocks:update' | 'blocks:delete' | 'classify:read' | 'classify:run' | 'csv-wizard:read' | 'csv-wizard:update' | 'deployments:create' | 'deployments:read' | 'deployments:update' | 'devices:create' | 'devices:delete' | 'devices:read' | 'devices:update' | 'dsp:read' | 'dsp:run' | 'dsp:update' | 'impulse:create' | 'impulse:delete' | 'impulse:read' | 'impulse:update' | 'jobs:cancel' | 'jobs:read' | 'jobs:run' | 'jobs:update' | 'optimization:delete' | 'optimization:read' | 'optimization:run' | 'optimization:update' | 'performance-calibration:read' | 'performance-calibration:run' | 'performance-calibration:update' | 'post-processing:read' | 'post-processing:run' | 'post-processing:update' | 'learn:read' | 'learn:run' | 'learn:update' | 'organizations:read' | 'organizations:data:read' | 'organizations:data:create' | 'organizations:data:update' | 'organizations:data:delete' | 'organizations:pipelines:read' | 'organizations:pipelines:create' | 'organizations:pipelines:update' | 'organizations:pipelines:delete' | 'organizations:pipelines:run' | 'organizations:transformation-jobs:read' | 'organizations:transformation-jobs:create' | 'organizations:transformation-jobs:update' | 'organizations:transformation-jobs:delete' | 'organizations:transformation-jobs:run' | 'projects:apikeys:ingestiononly:create' | 'projects:apikeys:ingestiononly:delete' | 'projects:create' | 'projects:delete' | 'projects:monitoring:write' | 'projects:monitoring:update' | 'projects:monitoring:read' | 'projects:monitoring:delete' | 'projects:read' | 'projects:update' | 'projects:versions:create' | 'projects:versions:delete' | 'projects:versions:read' | 'projects:versions:update' | 'projects:data:delete' | 'projects:data:read' | 'projects:data:update' | 'user:read';
24239
+ export type OAuthScope = 'ai-actions:create' | 'ai-actions:delete' | 'ai-actions:read' | 'ai-actions:update' | 'blocks:read' | 'blocks:create' | 'blocks:update' | 'blocks:delete' | 'classify:read' | 'classify:run' | 'csv-wizard:read' | 'csv-wizard:update' | 'deployments:create' | 'deployments:read' | 'deployments:update' | 'devices:create' | 'devices:delete' | 'devices:read' | 'devices:update' | 'dsp:read' | 'dsp:run' | 'dsp:update' | 'impulse:create' | 'impulse:delete' | 'impulse:read' | 'impulse:update' | 'jobs:cancel' | 'jobs:read' | 'jobs:run' | 'jobs:update' | 'optimization:delete' | 'optimization:read' | 'optimization:run' | 'optimization:update' | 'performance-calibration:read' | 'performance-calibration:run' | 'performance-calibration:update' | 'post-processing:read' | 'post-processing:run' | 'post-processing:update' | 'learn:read' | 'learn:run' | 'learn:update' | 'organizations:read' | 'organizations:data:read' | 'organizations:data:create' | 'organizations:data:update' | 'organizations:data:delete' | 'organizations:pipelines:read' | 'organizations:pipelines:create' | 'organizations:pipelines:update' | 'organizations:pipelines:delete' | 'organizations:pipelines:run' | 'organizations:transformation-jobs:read' | 'organizations:transformation-jobs:create' | 'organizations:transformation-jobs:update' | 'organizations:transformation-jobs:delete' | 'organizations:transformation-jobs:run' | 'projects:apikeys:ingestiononly:create' | 'projects:apikeys:ingestiononly:delete' | 'projects:create' | 'projects:delete' | 'projects:monitoring:write' | 'projects:monitoring:update' | 'projects:monitoring:read' | 'projects:monitoring:delete' | 'projects:read' | 'projects:update' | 'projects:versions:create' | 'projects:versions:delete' | 'projects:versions:public:create' | 'projects:versions:read' | 'projects:versions:update' | 'projects:data:delete' | 'projects:data:read' | 'projects:data:update' | 'user:read';
24187
24240
  export const OAuthScopeValues: string[];
24188
24241
 
24189
24242
 
@@ -27295,7 +27348,7 @@ export type ProjectExtension = {
27295
27348
  publicProjectTierAvailability: PublicProjectTierAvailability;
27296
27349
  url: string;
27297
27350
  repositoryUrl?: string;
27298
- navbarLocation: ProjectExtensionNavbarLocationEnum;
27351
+ navbarLocation: ExtensionNavbarLocation;
27299
27352
  lastUpdated: Date;
27300
27353
  lastUpdatedByUser?: CreatedUpdatedByUser;
27301
27354
  /**
@@ -27313,8 +27366,6 @@ export type ProjectExtension = {
27313
27366
  addedToProject: Date;
27314
27367
  addedToProjectByUser?: CreatedUpdatedByUser;
27315
27368
  };
27316
- export type ProjectExtensionNavbarLocationEnum = 'project' | 'devices' | 'data_acquisition' | 'experiments' | 'create_impulse' | 'dsp_block' | 'learn_block' | 'live_classification' | 'model_testing' | 'deployment' | 'impulse' | 'versioning';
27317
- export const ProjectExtensionNavbarLocationEnumValues: string[];
27318
27369
 
27319
27370
 
27320
27371
  export type ProjectHmacKey = {
@@ -30157,10 +30208,7 @@ export type UpdateOrganizationExtensionBlockRequest = {
30157
30208
  * Optional Font Awesome icon class for the navigation item.
30158
30209
  */
30159
30210
  navbarIcon?: string;
30160
- /**
30161
- * Studio navigation location for the extension.
30162
- */
30163
- navbarLocation?: UpdateOrganizationExtensionBlockRequestNavbarLocationEnum;
30211
+ navbarLocation?: ExtensionNavbarLocation;
30164
30212
  requiredApiKeyRole?: ProjectApiKeyRole;
30165
30213
  visibility?: ExtensionVisibility;
30166
30214
  publicProjectTierAvailability?: PublicProjectTierAvailability;
@@ -30173,8 +30221,6 @@ export type UpdateOrganizationExtensionBlockRequest = {
30173
30221
  */
30174
30222
  blockNoLongerAvailableReason?: string;
30175
30223
  };
30176
- export type UpdateOrganizationExtensionBlockRequestNavbarLocationEnum = 'project' | 'devices' | 'data_acquisition' | 'experiments' | 'create_impulse' | 'dsp_block' | 'learn_block' | 'live_classification' | 'model_testing' | 'deployment' | 'impulse' | 'versioning';
30177
- export const UpdateOrganizationExtensionBlockRequestNavbarLocationEnumValues: string[];
30178
30224
 
30179
30225
 
30180
30226
  export type UpdateOrganizationPortalResponse = {
@@ -30344,7 +30390,8 @@ export type UpdateOrganizationTransformationBlockRequest = {
30344
30390
 
30345
30391
 
30346
30392
  /**
30347
- * Only fields set in this object will be updated.
30393
+ * Only fields set in this object will be updated. "projectVisibility" can only be changed when authenticating with JWT
30394
+ * token authentication.
30348
30395
  */
30349
30396
  export type UpdateProjectRequest = {
30350
30397
  /**
@@ -12599,7 +12599,7 @@ class DeploymentApi {
12599
12599
  this.authentications.OAuth2.accessToken = token;
12600
12600
  }
12601
12601
  /**
12602
- * Create a deployment job for a _public_ project. You can only create deployments for \"wasm\" and \"wasm-browser-simd\" deployment types. If a deployment already exists, jobId is null. If a deployment did not exist, or a job is created, jobId is set to an integer, and you can get updates via `getPublicDeploymentStatus`. When this step is complete use `downloadHistoricDeployment` to download the artefacts using deploymentVersion. Updates are _NOT_ streamed over the websocket API (for security reasons); but can be obtained via `getPublicDeploymentStatus`.
12602
+ * Create a deployment job for a _public_ project. If a deployment already exists, jobId is null. If a deployment did not exist, or a job is created, jobId is set to an integer, and you can get updates via `getPublicDeploymentStatus`. When this step is complete use `downloadHistoricDeployment` to download the artefacts using deploymentVersion. Updates are _NOT_ streamed over the websocket API (for security reasons); but can be obtained via `getPublicDeploymentStatus`.
12603
12603
  * @summary Build deployment (public)
12604
12604
  * @param projectId Project ID
12605
12605
  * @param buildPublicDeploymentJobRequest
@@ -21306,7 +21306,7 @@ class JobsApi {
21306
21306
  return resp;
21307
21307
  }
21308
21308
  /**
21309
- * Create a new version of the project. This stores all data and configuration offsite. If you have access to the enterprise version of Edge Impulse you can store your data in your own storage buckets (only through JWT token authentication).
21309
+ * Create a new version of the project. This stores all data and configuration offsite. If you have access to the enterprise version of Edge Impulse you can store your data in your own storage buckets (only through JWT token authentication). OAuth requests that set makePublic to true also require the projects:versions:public:create scope.
21310
21310
  * @summary Version project
21311
21311
  * @param projectId Project ID
21312
21312
  * @param projectVersionRequest
@@ -23150,6 +23150,82 @@ class LearnApi {
23150
23150
  }
23151
23151
  return resp;
23152
23152
  }
23153
+ /**
23154
+ * List all custom files for the learn block as they exist on the file system. You can write extra files to /home/custom_data in your custom learn block (or in expert mode); then pick them up here. This yields all files across all subfolders.
23155
+ * @summary List learn block custom data files
23156
+ * @param projectId Project ID
23157
+ * @param learnId Learn Block ID, use the impulse functions to retrieve the ID
23158
+ */
23159
+ async listLearnBlockCustomDataFiles(projectId, learnId, options = { headers: {} }) {
23160
+ const localVarPath = this.basePath + '/api/{projectId}/learn-data/{learnId}/custom-data/list'
23161
+ .replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)))
23162
+ .replace('{' + 'learnId' + '}', encodeURIComponent(String(learnId)));
23163
+ let queryParameters = {};
23164
+ let localVarHeaderParams = {
23165
+ ...(typeof window === "undefined" ? { "User-Agent": "edgeimpulse-api nodejs" } : {}),
23166
+ 'Content-Type': 'application/json',
23167
+ ...this.defaultHeaders,
23168
+ };
23169
+ const produces = ['application/json'];
23170
+ // give precedence to 'application/json'
23171
+ if (produces.indexOf('application/json') >= 0) {
23172
+ localVarHeaderParams.Accept = 'application/json';
23173
+ }
23174
+ else {
23175
+ localVarHeaderParams.Accept = produces.join(',');
23176
+ }
23177
+ let localVarFormParams;
23178
+ // verify required parameter 'projectId' is not null or undefined
23179
+ if (projectId === null || projectId === undefined) {
23180
+ throw new Error('Required parameter projectId was null or undefined when calling listLearnBlockCustomDataFiles.');
23181
+ }
23182
+ // verify required parameter 'learnId' is not null or undefined
23183
+ if (learnId === null || learnId === undefined) {
23184
+ throw new Error('Required parameter learnId was null or undefined when calling listLearnBlockCustomDataFiles.');
23185
+ }
23186
+ localVarHeaderParams = {
23187
+ ...localVarHeaderParams,
23188
+ ...options.headers,
23189
+ ...this.opts.extraHeaders,
23190
+ };
23191
+ const queryString = Object.entries(queryParameters)
23192
+ .filter(([, value]) => value !== undefined)
23193
+ .map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
23194
+ .join('&');
23195
+ let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
23196
+ let localVarRequestOptions = {
23197
+ method: 'GET',
23198
+ headers: { ...localVarHeaderParams },
23199
+ };
23200
+ let requestOptions = localVarRequestOptions;
23201
+ let url = localVarUrl;
23202
+ const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
23203
+ requestOptions = auth_ApiKeyAuthentication.requestOptions;
23204
+ url = auth_ApiKeyAuthentication.url;
23205
+ const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
23206
+ requestOptions = auth_JWTAuthentication.requestOptions;
23207
+ url = auth_JWTAuthentication.url;
23208
+ const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
23209
+ requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
23210
+ url = auth_JWTHttpHeaderAuthentication.url;
23211
+ const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
23212
+ requestOptions = auth_OAuth2.requestOptions;
23213
+ url = auth_OAuth2.url;
23214
+ const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
23215
+ requestOptions = authDefault.requestOptions;
23216
+ url = authDefault.url;
23217
+ (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
23218
+ const response = await fetch(url, requestOptions);
23219
+ const resp = this.handleResponse(response, 'ListLearnBlockFilesResponse');
23220
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
23221
+ const headerCb = options.responseHeadersCallback;
23222
+ // on next tick, so we have time to handle the response
23223
+ setTimeout(() => {
23224
+ headerCb(Object.fromEntries(response.headers.entries()));
23225
+ }, 0);
23226
+ }
23227
+ return resp;
23228
+ }
23153
23229
  /**
23154
23230
  * Returns the latency, RAM and ROM used for the pretrained model - upload first via `uploadPretrainedModel`. This is using the project\'s selected latency device. Updates are streamed over the websocket API (or can be retrieved through the /stdout endpoint). Use getProfileTfliteJobResult to get the results when the job is completed.
23155
23231
  * @summary Profile pretrained model
@@ -23224,6 +23300,90 @@ class LearnApi {
23224
23300
  }
23225
23301
  return resp;
23226
23302
  }
23303
+ /**
23304
+ * Read a file from the learn block as it exists on the file system. You can write extra files to /home/custom_data in your custom learn block (or in expert mode); then pick them up here. Use \"listLearnBlockCustomDataFiles\" to list all available files.
23305
+ * @summary Read learn block custom data file
23306
+ * @param projectId Project ID
23307
+ * @param learnId Learn Block ID, use the impulse functions to retrieve the ID
23308
+ * @param path CDN Path
23309
+ */
23310
+ async readLearnBlockCustomDataFile(projectId, learnId, queryParams, options = { headers: {} }) {
23311
+ const localVarPath = this.basePath + '/api/{projectId}/learn-data/{learnId}/custom-data/read'
23312
+ .replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)))
23313
+ .replace('{' + 'learnId' + '}', encodeURIComponent(String(learnId)));
23314
+ let queryParameters = {};
23315
+ let localVarHeaderParams = {
23316
+ ...(typeof window === "undefined" ? { "User-Agent": "edgeimpulse-api nodejs" } : {}),
23317
+ 'Content-Type': 'application/json',
23318
+ ...this.defaultHeaders,
23319
+ };
23320
+ const produces = ['application/octet-stream'];
23321
+ // give precedence to 'application/json'
23322
+ if (produces.indexOf('application/json') >= 0) {
23323
+ localVarHeaderParams.Accept = 'application/json';
23324
+ }
23325
+ else {
23326
+ localVarHeaderParams.Accept = produces.join(',');
23327
+ }
23328
+ let localVarFormParams;
23329
+ // verify required parameter 'projectId' is not null or undefined
23330
+ if (projectId === null || projectId === undefined) {
23331
+ throw new Error('Required parameter projectId was null or undefined when calling readLearnBlockCustomDataFile.');
23332
+ }
23333
+ // verify required parameter 'learnId' is not null or undefined
23334
+ if (learnId === null || learnId === undefined) {
23335
+ throw new Error('Required parameter learnId was null or undefined when calling readLearnBlockCustomDataFile.');
23336
+ }
23337
+ // verify required parameter 'path' is not null or undefined
23338
+ if (queryParams.path === null || queryParams.path === undefined) {
23339
+ throw new Error('Required parameter queryParams.path was null or undefined when calling readLearnBlockCustomDataFile.');
23340
+ }
23341
+ if (typeof (queryParams === null || queryParams === void 0 ? void 0 : queryParams.path) !== 'undefined' && (queryParams === null || queryParams === void 0 ? void 0 : queryParams.path) !== null) {
23342
+ queryParameters['path'] = queryParams.path;
23343
+ }
23344
+ localVarHeaderParams = {
23345
+ ...localVarHeaderParams,
23346
+ ...options.headers,
23347
+ ...this.opts.extraHeaders,
23348
+ };
23349
+ const queryString = Object.entries(queryParameters)
23350
+ .filter(([, value]) => value !== undefined)
23351
+ .map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
23352
+ .join('&');
23353
+ let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
23354
+ let localVarRequestOptions = {
23355
+ method: 'GET',
23356
+ headers: { ...localVarHeaderParams },
23357
+ };
23358
+ let requestOptions = localVarRequestOptions;
23359
+ let url = localVarUrl;
23360
+ const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
23361
+ requestOptions = auth_ApiKeyAuthentication.requestOptions;
23362
+ url = auth_ApiKeyAuthentication.url;
23363
+ const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
23364
+ requestOptions = auth_JWTAuthentication.requestOptions;
23365
+ url = auth_JWTAuthentication.url;
23366
+ const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
23367
+ requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
23368
+ url = auth_JWTHttpHeaderAuthentication.url;
23369
+ const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
23370
+ requestOptions = auth_OAuth2.requestOptions;
23371
+ url = auth_OAuth2.url;
23372
+ const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
23373
+ requestOptions = authDefault.requestOptions;
23374
+ url = authDefault.url;
23375
+ (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
23376
+ const response = await fetch(url, requestOptions);
23377
+ const resp = this.handleResponse(response, 'Buffer');
23378
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
23379
+ const headerCb = options.responseHeadersCallback;
23380
+ // on next tick, so we have time to handle the response
23381
+ setTimeout(() => {
23382
+ headerCb(Object.fromEntries(response.headers.entries()));
23383
+ }, 0);
23384
+ }
23385
+ return resp;
23386
+ }
23227
23387
  /**
23228
23388
  * Save input / model configuration for a pretrained model. This overrides the current impulse. If you want to deploy a pretrained model from the API, see `startDeployPretrainedModelJob`.
23229
23389
  * @summary Save parameters for pretrained model
@@ -27525,7 +27685,7 @@ class OrganizationBlocksApi {
27525
27685
  * @param name Extension block name.
27526
27686
  * @param description Extension block description.
27527
27687
  * @param url URL loaded by the extension.
27528
- * @param navbarLocation Studio navigation location for the extension.
27688
+ * @param navbarLocation
27529
27689
  * @param requiredApiKeyRole
27530
27690
  * @param onlyAvailableInProjectId Required if \\\&quot;visibility\\\&quot; is \\\&quot;project\\\&quot;. If set, this extension is scoped to this specific project.
27531
27691
  * @param repositoryUrl Optional source repository URL for the extension.
@@ -27625,7 +27785,7 @@ class OrganizationBlocksApi {
27625
27785
  }
27626
27786
  if (params.navbarLocation !== undefined) {
27627
27787
  if (params.navbarLocation !== null && params.navbarLocation !== undefined) {
27628
- localVarFormParams = (0, models_1.appendFormField)(localVarFormParams, 'navbarLocation', (0, models_1.serializeFormDataValue)(params.navbarLocation, 'string'));
27788
+ localVarFormParams = (0, models_1.appendFormField)(localVarFormParams, 'navbarLocation', (0, models_1.serializeFormDataValue)(params.navbarLocation, 'ExtensionNavbarLocation'));
27629
27789
  }
27630
27790
  }
27631
27791
  if (params.requiredApiKeyRole !== undefined) {
@@ -30059,7 +30219,7 @@ class OrganizationBlocksApi {
30059
30219
  * @param repositoryUrl Optional source repository URL for the extension.
30060
30220
  * @param logo Optional logo image for the extension.
30061
30221
  * @param navbarIcon Optional Font Awesome icon class for the navigation item.
30062
- * @param navbarLocation Studio navigation location for the extension.
30222
+ * @param navbarLocation
30063
30223
  * @param requiredApiKeyRole
30064
30224
  * @param visibility
30065
30225
  * @param publicProjectTierAvailability
@@ -30140,7 +30300,7 @@ class OrganizationBlocksApi {
30140
30300
  }
30141
30301
  if (params.navbarLocation !== undefined) {
30142
30302
  if (params.navbarLocation !== null && params.navbarLocation !== undefined) {
30143
- localVarFormParams = (0, models_1.appendFormField)(localVarFormParams, 'navbarLocation', (0, models_1.serializeFormDataValue)(params.navbarLocation, 'string'));
30303
+ localVarFormParams = (0, models_1.appendFormField)(localVarFormParams, 'navbarLocation', (0, models_1.serializeFormDataValue)(params.navbarLocation, 'ExtensionNavbarLocation'));
30144
30304
  }
30145
30305
  }
30146
30306
  if (params.requiredApiKeyRole !== undefined) {
@@ -65089,8 +65249,6 @@ define("library/sdk/model/addOrganizationExtensionBlockRequest", ["require", "ex
65089
65249
  "use strict";
65090
65250
  // Generated by studio/openapi/generate-models/convert.ts
65091
65251
  Object.defineProperty(exports, "__esModule", { value: true });
65092
- exports.AddOrganizationExtensionBlockRequestNavbarLocationEnumValues = void 0;
65093
- exports.AddOrganizationExtensionBlockRequestNavbarLocationEnumValues = ['project', 'devices', 'data_acquisition', 'experiments', 'create_impulse', 'dsp_block', 'learn_block', 'live_classification', 'model_testing', 'deployment', 'impulse', 'versioning'];
65094
65252
  });
65095
65253
 
65096
65254
 
@@ -67038,8 +67196,15 @@ define("library/sdk/model/extension", ["require", "exports"], function (require,
67038
67196
  "use strict";
67039
67197
  // Generated by studio/openapi/generate-models/convert.ts
67040
67198
  Object.defineProperty(exports, "__esModule", { value: true });
67041
- exports.ExtensionNavbarLocationEnumValues = void 0;
67042
- exports.ExtensionNavbarLocationEnumValues = ['project', 'devices', 'data_acquisition', 'experiments', 'create_impulse', 'dsp_block', 'learn_block', 'live_classification', 'model_testing', 'deployment', 'impulse', 'versioning'];
67199
+ });
67200
+
67201
+
67202
+ define("library/sdk/model/extensionNavbarLocation", ["require", "exports"], function (require, exports) {
67203
+ "use strict";
67204
+ // Generated by studio/openapi/generate-models/convert.ts
67205
+ Object.defineProperty(exports, "__esModule", { value: true });
67206
+ exports.ExtensionNavbarLocationValues = void 0;
67207
+ exports.ExtensionNavbarLocationValues = ['project', 'devices', 'data_acquisition', 'experiments', 'create_impulse', 'upload_model', 'dsp_block', 'learn_block', 'live_classification', 'model_testing', 'deployment', 'impulse', 'versioning'];
67043
67208
  });
67044
67209
 
67045
67210
 
@@ -68291,6 +68456,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
68291
68456
  });
68292
68457
 
68293
68458
 
68459
+ define("library/sdk/model/listLearnBlockFilesResponse", ["require", "exports"], function (require, exports) {
68460
+ "use strict";
68461
+ // Generated by studio/openapi/generate-models/convert.ts
68462
+ Object.defineProperty(exports, "__esModule", { value: true });
68463
+ });
68464
+
68465
+
68294
68466
  define("library/sdk/model/listModelsResponse", ["require", "exports"], function (require, exports) {
68295
68467
  "use strict";
68296
68468
  // Generated by studio/openapi/generate-models/convert.ts
@@ -68955,6 +69127,7 @@ __exportStar(require("./exportKerasBlockDataRequest"), exports);
68955
69127
  __exportStar(require("./exportOriginalDataRequest"), exports);
68956
69128
  __exportStar(require("./exportWavDataRequest"), exports);
68957
69129
  __exportStar(require("./extension"), exports);
69130
+ __exportStar(require("./extensionNavbarLocation"), exports);
68958
69131
  __exportStar(require("./extensionVisibility"), exports);
68959
69132
  __exportStar(require("./feature"), exports);
68960
69133
  __exportStar(require("./finalizeCustomBlockUploadRequest"), exports);
@@ -69123,6 +69296,7 @@ __exportStar(require("./listEnterpriseTrialsResponse"), exports);
69123
69296
  __exportStar(require("./listEventSubscriptionsResponse"), exports);
69124
69297
  __exportStar(require("./listHmacKeysResponse"), exports);
69125
69298
  __exportStar(require("./listJobsResponse"), exports);
69299
+ __exportStar(require("./listLearnBlockFilesResponse"), exports);
69126
69300
  __exportStar(require("./listModelsResponse"), exports);
69127
69301
  __exportStar(require("./listMonitoringEventsResponse"), exports);
69128
69302
  __exportStar(require("./listOrganizationApiKeysResponse"), exports);
@@ -69769,7 +69943,7 @@ define("library/sdk/model/oAuthScope", ["require", "exports"], function (require
69769
69943
  // Generated by studio/openapi/generate-models/convert.ts
69770
69944
  Object.defineProperty(exports, "__esModule", { value: true });
69771
69945
  exports.OAuthScopeValues = void 0;
69772
- exports.OAuthScopeValues = ['ai-actions:create', 'ai-actions:delete', 'ai-actions:read', 'ai-actions:update', 'blocks:read', 'blocks:create', 'blocks:update', 'blocks:delete', 'classify:read', 'classify:run', 'csv-wizard:read', 'csv-wizard:update', 'deployments:create', 'deployments:read', 'deployments:update', 'devices:create', 'devices:delete', 'devices:read', 'devices:update', 'dsp:read', 'dsp:run', 'dsp:update', 'impulse:create', 'impulse:delete', 'impulse:read', 'impulse:update', 'jobs:cancel', 'jobs:read', 'jobs:run', 'jobs:update', 'optimization:delete', 'optimization:read', 'optimization:run', 'optimization:update', 'performance-calibration:read', 'performance-calibration:run', 'performance-calibration:update', 'post-processing:read', 'post-processing:run', 'post-processing:update', 'learn:read', 'learn:run', 'learn:update', 'organizations:read', 'organizations:data:read', 'organizations:data:create', 'organizations:data:update', 'organizations:data:delete', 'organizations:pipelines:read', 'organizations:pipelines:create', 'organizations:pipelines:update', 'organizations:pipelines:delete', 'organizations:pipelines:run', 'organizations:transformation-jobs:read', 'organizations:transformation-jobs:create', 'organizations:transformation-jobs:update', 'organizations:transformation-jobs:delete', 'organizations:transformation-jobs:run', 'projects:apikeys:ingestiononly:create', 'projects:apikeys:ingestiononly:delete', 'projects:create', 'projects:delete', 'projects:monitoring:write', 'projects:monitoring:update', 'projects:monitoring:read', 'projects:monitoring:delete', 'projects:read', 'projects:update', 'projects:versions:create', 'projects:versions:delete', 'projects:versions:read', 'projects:versions:update', 'projects:data:delete', 'projects:data:read', 'projects:data:update', 'user:read'];
69946
+ exports.OAuthScopeValues = ['ai-actions:create', 'ai-actions:delete', 'ai-actions:read', 'ai-actions:update', 'blocks:read', 'blocks:create', 'blocks:update', 'blocks:delete', 'classify:read', 'classify:run', 'csv-wizard:read', 'csv-wizard:update', 'deployments:create', 'deployments:read', 'deployments:update', 'devices:create', 'devices:delete', 'devices:read', 'devices:update', 'dsp:read', 'dsp:run', 'dsp:update', 'impulse:create', 'impulse:delete', 'impulse:read', 'impulse:update', 'jobs:cancel', 'jobs:read', 'jobs:run', 'jobs:update', 'optimization:delete', 'optimization:read', 'optimization:run', 'optimization:update', 'performance-calibration:read', 'performance-calibration:run', 'performance-calibration:update', 'post-processing:read', 'post-processing:run', 'post-processing:update', 'learn:read', 'learn:run', 'learn:update', 'organizations:read', 'organizations:data:read', 'organizations:data:create', 'organizations:data:update', 'organizations:data:delete', 'organizations:pipelines:read', 'organizations:pipelines:create', 'organizations:pipelines:update', 'organizations:pipelines:delete', 'organizations:pipelines:run', 'organizations:transformation-jobs:read', 'organizations:transformation-jobs:create', 'organizations:transformation-jobs:update', 'organizations:transformation-jobs:delete', 'organizations:transformation-jobs:run', 'projects:apikeys:ingestiononly:create', 'projects:apikeys:ingestiononly:delete', 'projects:create', 'projects:delete', 'projects:monitoring:write', 'projects:monitoring:update', 'projects:monitoring:read', 'projects:monitoring:delete', 'projects:read', 'projects:update', 'projects:versions:create', 'projects:versions:delete', 'projects:versions:public:create', 'projects:versions:read', 'projects:versions:update', 'projects:data:delete', 'projects:data:read', 'projects:data:update', 'user:read'];
69773
69947
  });
69774
69948
 
69775
69949
 
@@ -70724,8 +70898,6 @@ define("library/sdk/model/projectExtension", ["require", "exports"], function (r
70724
70898
  "use strict";
70725
70899
  // Generated by studio/openapi/generate-models/convert.ts
70726
70900
  Object.defineProperty(exports, "__esModule", { value: true });
70727
- exports.ProjectExtensionNavbarLocationEnumValues = void 0;
70728
- exports.ProjectExtensionNavbarLocationEnumValues = ['project', 'devices', 'data_acquisition', 'experiments', 'create_impulse', 'dsp_block', 'learn_block', 'live_classification', 'model_testing', 'deployment', 'impulse', 'versioning'];
70729
70901
  });
70730
70902
 
70731
70903
 
@@ -71829,8 +72001,6 @@ define("library/sdk/model/updateOrganizationExtensionBlockRequest", ["require",
71829
72001
  "use strict";
71830
72002
  // Generated by studio/openapi/generate-models/convert.ts
71831
72003
  Object.defineProperty(exports, "__esModule", { value: true });
71832
- exports.UpdateOrganizationExtensionBlockRequestNavbarLocationEnumValues = void 0;
71833
- exports.UpdateOrganizationExtensionBlockRequestNavbarLocationEnumValues = ['project', 'devices', 'data_acquisition', 'experiments', 'create_impulse', 'dsp_block', 'learn_block', 'live_classification', 'model_testing', 'deployment', 'impulse', 'versioning'];
71834
72004
  });
71835
72005
 
71836
72006