edge-impulse-api 1.94.0 → 1.94.2

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 (42) hide show
  1. package/build/browser/edge-impulse-api.d.ts +255 -3
  2. package/build/browser/edge-impulse-api.js +1016 -229
  3. package/build/browser/edge-impulse-api.js.map +1 -1
  4. package/build/library/sdk/api/apis.d.ts +3 -1
  5. package/build/library/sdk/api/apis.js +3 -1
  6. package/build/library/sdk/api/apis.js.map +1 -1
  7. package/build/library/sdk/api/organizationOAuthClientsApi.d.ts +167 -0
  8. package/build/library/sdk/api/organizationOAuthClientsApi.js +726 -0
  9. package/build/library/sdk/api/organizationOAuthClientsApi.js.map +1 -0
  10. package/build/library/sdk/model/createOAuthClientRequest.d.ts +8 -0
  11. package/build/library/sdk/model/createOAuthClientRequest.js +4 -0
  12. package/build/library/sdk/model/createOAuthClientRequest.js.map +1 -0
  13. package/build/library/sdk/model/createOAuthClientResponse.d.ts +13 -0
  14. package/build/library/sdk/model/createOAuthClientResponse.js +4 -0
  15. package/build/library/sdk/model/createOAuthClientResponse.js.map +1 -0
  16. package/build/library/sdk/model/deploymentTarget.d.ts +4 -1
  17. package/build/library/sdk/model/deploymentTarget.js.map +1 -1
  18. package/build/library/sdk/model/deploymentTargetEngine.js.map +1 -1
  19. package/build/library/sdk/model/feature.d.ts +1 -1
  20. package/build/library/sdk/model/feature.js +1 -1
  21. package/build/library/sdk/model/feature.js.map +1 -1
  22. package/build/library/sdk/model/getOrganizationOAuthClientResponse.d.ts +12 -0
  23. package/build/library/sdk/model/getOrganizationOAuthClientResponse.js +4 -0
  24. package/build/library/sdk/model/getOrganizationOAuthClientResponse.js.map +1 -0
  25. package/build/library/sdk/model/listOrganizationOAuthClientsResponse.d.ts +12 -0
  26. package/build/library/sdk/model/listOrganizationOAuthClientsResponse.js +4 -0
  27. package/build/library/sdk/model/listOrganizationOAuthClientsResponse.js.map +1 -0
  28. package/build/library/sdk/model/models.d.ts +7 -0
  29. package/build/library/sdk/model/models.js +7 -0
  30. package/build/library/sdk/model/models.js.map +1 -1
  31. package/build/library/sdk/model/projectDeploymentTarget.d.ts +3 -0
  32. package/build/library/sdk/model/projectDeploymentTarget.js.map +1 -1
  33. package/build/library/sdk/model/rotateOAuthClientSecretResponse.d.ts +11 -0
  34. package/build/library/sdk/model/rotateOAuthClientSecretResponse.js +4 -0
  35. package/build/library/sdk/model/rotateOAuthClientSecretResponse.js.map +1 -0
  36. package/build/library/sdk/model/selfServeOAuthClient.d.ts +13 -0
  37. package/build/library/sdk/model/selfServeOAuthClient.js +4 -0
  38. package/build/library/sdk/model/selfServeOAuthClient.js.map +1 -0
  39. package/build/library/sdk/model/updateOAuthClientRequest.d.ts +7 -0
  40. package/build/library/sdk/model/updateOAuthClientRequest.js +4 -0
  41. package/build/library/sdk/model/updateOAuthClientRequest.js.map +1 -0
  42. package/package.json +1 -1
@@ -8526,6 +8526,8 @@ __exportStar(require("./organizationDataCampaignsApi"), exports);
8526
8526
  const organizationDataCampaignsApi_1 = require("./organizationDataCampaignsApi");
8527
8527
  __exportStar(require("./organizationJobsApi"), exports);
8528
8528
  const organizationJobsApi_1 = require("./organizationJobsApi");
8529
+ __exportStar(require("./organizationOAuthClientsApi"), exports);
8530
+ const organizationOAuthClientsApi_1 = require("./organizationOAuthClientsApi");
8529
8531
  __exportStar(require("./organizationPipelinesApi"), exports);
8530
8532
  const organizationPipelinesApi_1 = require("./organizationPipelinesApi");
8531
8533
  __exportStar(require("./organizationPortalsApi"), exports);
@@ -8562,7 +8564,7 @@ class HttpError extends Error {
8562
8564
  }
8563
8565
  }
8564
8566
  exports.HttpError = HttpError;
8565
- exports.APIS = [adminApi_1.AdminApi, authApi_1.AuthApi, cDNApi_1.CDNApi, canaryApi_1.CanaryApi, classifyApi_1.ClassifyApi, dSPApi_1.DSPApi, datasetVersionsApi_1.DatasetVersionsApi, deploymentApi_1.DeploymentApi, devicesApi_1.DevicesApi, emailVerificationApi_1.EmailVerificationApi, exportApi_1.ExportApi, featureFlagsApi_1.FeatureFlagsApi, healthApi_1.HealthApi, impulseApi_1.ImpulseApi, integrationsApi_1.IntegrationsApi, jobsApi_1.JobsApi, learnApi_1.LearnApi, loginApi_1.LoginApi, metricsApi_1.MetricsApi, monitoringApi_1.MonitoringApi, optimizationApi_1.OptimizationApi, organizationBlocksApi_1.OrganizationBlocksApi, organizationCreateProjectApi_1.OrganizationCreateProjectApi, organizationDataApi_1.OrganizationDataApi, organizationDataCampaignsApi_1.OrganizationDataCampaignsApi, organizationJobsApi_1.OrganizationJobsApi, organizationPipelinesApi_1.OrganizationPipelinesApi, organizationPortalsApi_1.OrganizationPortalsApi, organizationsApi_1.OrganizationsApi, performanceCalibrationApi_1.PerformanceCalibrationApi, postProcessingApi_1.PostProcessingApi, projectsApi_1.ProjectsApi, rawDataApi_1.RawDataApi, testApi_1.TestApi, themesApi_1.ThemesApi, uploadPortalApi_1.UploadPortalApi, userApi_1.UserApi, vlmApi_1.VlmApi, whitelabelsApi_1.WhitelabelsApi];
8567
+ exports.APIS = [adminApi_1.AdminApi, authApi_1.AuthApi, cDNApi_1.CDNApi, canaryApi_1.CanaryApi, classifyApi_1.ClassifyApi, dSPApi_1.DSPApi, datasetVersionsApi_1.DatasetVersionsApi, deploymentApi_1.DeploymentApi, devicesApi_1.DevicesApi, emailVerificationApi_1.EmailVerificationApi, exportApi_1.ExportApi, featureFlagsApi_1.FeatureFlagsApi, healthApi_1.HealthApi, impulseApi_1.ImpulseApi, integrationsApi_1.IntegrationsApi, jobsApi_1.JobsApi, learnApi_1.LearnApi, loginApi_1.LoginApi, metricsApi_1.MetricsApi, monitoringApi_1.MonitoringApi, optimizationApi_1.OptimizationApi, organizationBlocksApi_1.OrganizationBlocksApi, organizationCreateProjectApi_1.OrganizationCreateProjectApi, organizationDataApi_1.OrganizationDataApi, organizationDataCampaignsApi_1.OrganizationDataCampaignsApi, organizationJobsApi_1.OrganizationJobsApi, organizationOAuthClientsApi_1.OrganizationOAuthClientsApi, organizationPipelinesApi_1.OrganizationPipelinesApi, organizationPortalsApi_1.OrganizationPortalsApi, organizationsApi_1.OrganizationsApi, performanceCalibrationApi_1.PerformanceCalibrationApi, postProcessingApi_1.PostProcessingApi, projectsApi_1.ProjectsApi, rawDataApi_1.RawDataApi, testApi_1.TestApi, themesApi_1.ThemesApi, uploadPortalApi_1.UploadPortalApi, userApi_1.UserApi, vlmApi_1.VlmApi, whitelabelsApi_1.WhitelabelsApi];
8566
8568
  });
8567
8569
 
8568
8570
 
@@ -36898,7 +36900,7 @@ exports.OrganizationJobsApi = OrganizationJobsApi;
36898
36900
  });
36899
36901
 
36900
36902
 
36901
- define("library/sdk/api/organizationPipelinesApi", ["require", "exports"], function (require, exports) {
36903
+ define("library/sdk/api/organizationOAuthClientsApi", ["require", "exports"], function (require, exports) {
36902
36904
  "use strict";
36903
36905
  /**
36904
36906
  * Edge Impulse API
@@ -36912,7 +36914,7 @@ define("library/sdk/api/organizationPipelinesApi", ["require", "exports"], funct
36912
36914
  * Do not edit the class manually.
36913
36915
  */
36914
36916
  Object.defineProperty(exports, "__esModule", { value: true });
36915
- exports.OrganizationPipelinesApi = exports.OrganizationPipelinesApiApiKeys = void 0;
36917
+ exports.OrganizationOAuthClientsApi = exports.OrganizationOAuthClientsApiApiKeys = void 0;
36916
36918
  let fetch;
36917
36919
  let FormData;
36918
36920
  if (globalThis.fetch && globalThis.FormData) {
@@ -36930,13 +36932,13 @@ let defaultBasePath = 'https://studio.edgeimpulse.com/v1';
36930
36932
  // ===============================================
36931
36933
  // This file is autogenerated - Please do not edit
36932
36934
  // ===============================================
36933
- var OrganizationPipelinesApiApiKeys;
36934
- (function (OrganizationPipelinesApiApiKeys) {
36935
- OrganizationPipelinesApiApiKeys[OrganizationPipelinesApiApiKeys["ApiKeyAuthentication"] = 0] = "ApiKeyAuthentication";
36936
- OrganizationPipelinesApiApiKeys[OrganizationPipelinesApiApiKeys["JWTAuthentication"] = 1] = "JWTAuthentication";
36937
- OrganizationPipelinesApiApiKeys[OrganizationPipelinesApiApiKeys["JWTHttpHeaderAuthentication"] = 2] = "JWTHttpHeaderAuthentication";
36938
- })(OrganizationPipelinesApiApiKeys = exports.OrganizationPipelinesApiApiKeys || (exports.OrganizationPipelinesApiApiKeys = {}));
36939
- class OrganizationPipelinesApi {
36935
+ var OrganizationOAuthClientsApiApiKeys;
36936
+ (function (OrganizationOAuthClientsApiApiKeys) {
36937
+ OrganizationOAuthClientsApiApiKeys[OrganizationOAuthClientsApiApiKeys["ApiKeyAuthentication"] = 0] = "ApiKeyAuthentication";
36938
+ OrganizationOAuthClientsApiApiKeys[OrganizationOAuthClientsApiApiKeys["JWTAuthentication"] = 1] = "JWTAuthentication";
36939
+ OrganizationOAuthClientsApiApiKeys[OrganizationOAuthClientsApiApiKeys["JWTHttpHeaderAuthentication"] = 2] = "JWTHttpHeaderAuthentication";
36940
+ })(OrganizationOAuthClientsApiApiKeys = exports.OrganizationOAuthClientsApiApiKeys || (exports.OrganizationOAuthClientsApiApiKeys = {}));
36941
+ class OrganizationOAuthClientsApi {
36940
36942
  async handleResponse(response, returnType) {
36941
36943
  let body = await (0, models_1.parseResponse)(response);
36942
36944
  if (!response.ok) {
@@ -36994,19 +36996,19 @@ class OrganizationPipelinesApi {
36994
36996
  this.authentications.default = auth;
36995
36997
  }
36996
36998
  setApiKey(key, value) {
36997
- this.authentications[OrganizationPipelinesApiApiKeys[key]].apiKey = value;
36999
+ this.authentications[OrganizationOAuthClientsApiApiKeys[key]].apiKey = value;
36998
37000
  }
36999
37001
  set accessToken(token) {
37000
37002
  this.authentications.OAuth2.accessToken = token;
37001
37003
  }
37002
37004
  /**
37003
- * Create an organizational pipelines
37004
- * @summary Create pipeline
37005
+ * Registers a new OAuth app owned by the developer profile organization and returns the client id and one-time client secret.
37006
+ * @summary Create an OAuth app
37005
37007
  * @param organizationId Organization ID
37006
- * @param organizationUpdatePipelineBody
37008
+ * @param createOAuthClientRequest
37007
37009
  */
37008
- async createOrganizationPipeline(organizationId, organizationUpdatePipelineBody, options = { headers: {} }) {
37009
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/pipelines'
37010
+ async createOrganizationOAuthClient(organizationId, createOAuthClientRequest, options = { headers: {} }) {
37011
+ const localVarPath = this.basePath + '/api/organizations/{organizationId}/oauth-clients'
37010
37012
  .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
37011
37013
  let queryParameters = {};
37012
37014
  let localVarHeaderParams = {
@@ -37025,11 +37027,11 @@ class OrganizationPipelinesApi {
37025
37027
  let localVarFormParams;
37026
37028
  // verify required parameter 'organizationId' is not null or undefined
37027
37029
  if (organizationId === null || organizationId === undefined) {
37028
- throw new Error('Required parameter organizationId was null or undefined when calling createOrganizationPipeline.');
37030
+ throw new Error('Required parameter organizationId was null or undefined when calling createOrganizationOAuthClient.');
37029
37031
  }
37030
- // verify required parameter 'organizationUpdatePipelineBody' is not null or undefined
37031
- if (organizationUpdatePipelineBody === null || organizationUpdatePipelineBody === undefined) {
37032
- throw new Error('Required parameter organizationUpdatePipelineBody was null or undefined when calling createOrganizationPipeline.');
37032
+ // verify required parameter 'createOAuthClientRequest' is not null or undefined
37033
+ if (createOAuthClientRequest === null || createOAuthClientRequest === undefined) {
37034
+ throw new Error('Required parameter createOAuthClientRequest was null or undefined when calling createOrganizationOAuthClient.');
37033
37035
  }
37034
37036
  localVarHeaderParams = {
37035
37037
  ...localVarHeaderParams,
@@ -37045,7 +37047,7 @@ class OrganizationPipelinesApi {
37045
37047
  method: 'POST',
37046
37048
  headers: { ...localVarHeaderParams },
37047
37049
  };
37048
- localVarRequestOptions.body = JSON.stringify(organizationUpdatePipelineBody);
37050
+ localVarRequestOptions.body = JSON.stringify(createOAuthClientRequest);
37049
37051
  let requestOptions = localVarRequestOptions;
37050
37052
  let url = localVarUrl;
37051
37053
  const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
@@ -37065,7 +37067,7 @@ class OrganizationPipelinesApi {
37065
37067
  url = authDefault.url;
37066
37068
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
37067
37069
  const response = await fetch(url, requestOptions);
37068
- const resp = this.handleResponse(response, 'EntityCreatedResponse');
37070
+ const resp = this.handleResponse(response, 'CreateOAuthClientResponse');
37069
37071
  if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
37070
37072
  const headerCb = options.responseHeadersCallback;
37071
37073
  // on next tick, so we have time to handle the response
@@ -37076,15 +37078,15 @@ class OrganizationPipelinesApi {
37076
37078
  return resp;
37077
37079
  }
37078
37080
  /**
37079
- * Delete an organizational pipelines
37080
- * @summary Delete pipeline
37081
+ * Deletes an OAuth app owned by the developer profile organization and revokes its tokens and authorization codes.
37082
+ * @summary Delete an OAuth app
37081
37083
  * @param organizationId Organization ID
37082
- * @param pipelineId Pipeline ID
37084
+ * @param oauthClientId
37083
37085
  */
37084
- async deleteOrganizationPipeline(organizationId, pipelineId, options = { headers: {} }) {
37085
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/pipelines/{pipelineId}'
37086
+ async deleteOrganizationOAuthClient(organizationId, oauthClientId, options = { headers: {} }) {
37087
+ const localVarPath = this.basePath + '/api/organizations/{organizationId}/oauth-clients/{oauthClientId}'
37086
37088
  .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
37087
- .replace('{' + 'pipelineId' + '}', encodeURIComponent(String(pipelineId)));
37089
+ .replace('{' + 'oauthClientId' + '}', encodeURIComponent(String(oauthClientId)));
37088
37090
  let queryParameters = {};
37089
37091
  let localVarHeaderParams = {
37090
37092
  ...(typeof window === "undefined" ? { "User-Agent": "edgeimpulse-api nodejs" } : {}),
@@ -37102,11 +37104,11 @@ class OrganizationPipelinesApi {
37102
37104
  let localVarFormParams;
37103
37105
  // verify required parameter 'organizationId' is not null or undefined
37104
37106
  if (organizationId === null || organizationId === undefined) {
37105
- throw new Error('Required parameter organizationId was null or undefined when calling deleteOrganizationPipeline.');
37107
+ throw new Error('Required parameter organizationId was null or undefined when calling deleteOrganizationOAuthClient.');
37106
37108
  }
37107
- // verify required parameter 'pipelineId' is not null or undefined
37108
- if (pipelineId === null || pipelineId === undefined) {
37109
- throw new Error('Required parameter pipelineId was null or undefined when calling deleteOrganizationPipeline.');
37109
+ // verify required parameter 'oauthClientId' is not null or undefined
37110
+ if (oauthClientId === null || oauthClientId === undefined) {
37111
+ throw new Error('Required parameter oauthClientId was null or undefined when calling deleteOrganizationOAuthClient.');
37110
37112
  }
37111
37113
  localVarHeaderParams = {
37112
37114
  ...localVarHeaderParams,
@@ -37152,15 +37154,15 @@ class OrganizationPipelinesApi {
37152
37154
  return resp;
37153
37155
  }
37154
37156
  /**
37155
- * Retrieve an organizational pipelines
37156
- * @summary Get pipeline
37157
+ * Deletes the logo of an OAuth app owned by the developer profile organization.
37158
+ * @summary Delete an OAuth app logo
37157
37159
  * @param organizationId Organization ID
37158
- * @param pipelineId Pipeline ID
37160
+ * @param oauthClientId
37159
37161
  */
37160
- async getOrganizationPipeline(organizationId, pipelineId, options = { headers: {} }) {
37161
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/pipelines/{pipelineId}'
37162
+ async deleteOrganizationOAuthClientLogo(organizationId, oauthClientId, options = { headers: {} }) {
37163
+ const localVarPath = this.basePath + '/api/organizations/{organizationId}/oauth-clients/{oauthClientId}/logo'
37162
37164
  .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
37163
- .replace('{' + 'pipelineId' + '}', encodeURIComponent(String(pipelineId)));
37165
+ .replace('{' + 'oauthClientId' + '}', encodeURIComponent(String(oauthClientId)));
37164
37166
  let queryParameters = {};
37165
37167
  let localVarHeaderParams = {
37166
37168
  ...(typeof window === "undefined" ? { "User-Agent": "edgeimpulse-api nodejs" } : {}),
@@ -37178,11 +37180,11 @@ class OrganizationPipelinesApi {
37178
37180
  let localVarFormParams;
37179
37181
  // verify required parameter 'organizationId' is not null or undefined
37180
37182
  if (organizationId === null || organizationId === undefined) {
37181
- throw new Error('Required parameter organizationId was null or undefined when calling getOrganizationPipeline.');
37183
+ throw new Error('Required parameter organizationId was null or undefined when calling deleteOrganizationOAuthClientLogo.');
37182
37184
  }
37183
- // verify required parameter 'pipelineId' is not null or undefined
37184
- if (pipelineId === null || pipelineId === undefined) {
37185
- throw new Error('Required parameter pipelineId was null or undefined when calling getOrganizationPipeline.');
37185
+ // verify required parameter 'oauthClientId' is not null or undefined
37186
+ if (oauthClientId === null || oauthClientId === undefined) {
37187
+ throw new Error('Required parameter oauthClientId was null or undefined when calling deleteOrganizationOAuthClientLogo.');
37186
37188
  }
37187
37189
  localVarHeaderParams = {
37188
37190
  ...localVarHeaderParams,
@@ -37195,7 +37197,7 @@ class OrganizationPipelinesApi {
37195
37197
  .join('&');
37196
37198
  let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
37197
37199
  let localVarRequestOptions = {
37198
- method: 'GET',
37200
+ method: 'DELETE',
37199
37201
  headers: { ...localVarHeaderParams },
37200
37202
  };
37201
37203
  let requestOptions = localVarRequestOptions;
@@ -37217,7 +37219,7 @@ class OrganizationPipelinesApi {
37217
37219
  url = authDefault.url;
37218
37220
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
37219
37221
  const response = await fetch(url, requestOptions);
37220
- const resp = this.handleResponse(response, 'GetOrganizationPipelinesResponse');
37222
+ const resp = this.handleResponse(response, 'GenericApiResponse');
37221
37223
  if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
37222
37224
  const headerCb = options.responseHeadersCallback;
37223
37225
  // on next tick, so we have time to handle the response
@@ -37228,14 +37230,15 @@ class OrganizationPipelinesApi {
37228
37230
  return resp;
37229
37231
  }
37230
37232
  /**
37231
- * Retrieve all archived organizational pipelines
37232
- * @summary List archived pipelines
37233
+ * Retrieves a single OAuth app owned by the developer profile organization.
37234
+ * @summary Get an OAuth app
37233
37235
  * @param organizationId Organization ID
37234
- * @param projectId If set, filters on pipelines which are attached to this project.
37236
+ * @param oauthClientId
37235
37237
  */
37236
- async listArchivedOrganizationPipelines(organizationId, queryParams, options = { headers: {} }) {
37237
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/pipelines/archived'
37238
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
37238
+ async getOrganizationOAuthClient(organizationId, oauthClientId, options = { headers: {} }) {
37239
+ const localVarPath = this.basePath + '/api/organizations/{organizationId}/oauth-clients/{oauthClientId}'
37240
+ .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
37241
+ .replace('{' + 'oauthClientId' + '}', encodeURIComponent(String(oauthClientId)));
37239
37242
  let queryParameters = {};
37240
37243
  let localVarHeaderParams = {
37241
37244
  ...(typeof window === "undefined" ? { "User-Agent": "edgeimpulse-api nodejs" } : {}),
@@ -37253,10 +37256,11 @@ class OrganizationPipelinesApi {
37253
37256
  let localVarFormParams;
37254
37257
  // verify required parameter 'organizationId' is not null or undefined
37255
37258
  if (organizationId === null || organizationId === undefined) {
37256
- throw new Error('Required parameter organizationId was null or undefined when calling listArchivedOrganizationPipelines.');
37259
+ throw new Error('Required parameter organizationId was null or undefined when calling getOrganizationOAuthClient.');
37257
37260
  }
37258
- if (typeof (queryParams === null || queryParams === void 0 ? void 0 : queryParams.projectId) !== 'undefined' && (queryParams === null || queryParams === void 0 ? void 0 : queryParams.projectId) !== null) {
37259
- queryParameters['projectId'] = queryParams.projectId;
37261
+ // verify required parameter 'oauthClientId' is not null or undefined
37262
+ if (oauthClientId === null || oauthClientId === undefined) {
37263
+ throw new Error('Required parameter oauthClientId was null or undefined when calling getOrganizationOAuthClient.');
37260
37264
  }
37261
37265
  localVarHeaderParams = {
37262
37266
  ...localVarHeaderParams,
@@ -37291,7 +37295,7 @@ class OrganizationPipelinesApi {
37291
37295
  url = authDefault.url;
37292
37296
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
37293
37297
  const response = await fetch(url, requestOptions);
37294
- const resp = this.handleResponse(response, 'ListOrganizationPipelinesResponse');
37298
+ const resp = this.handleResponse(response, 'GetOrganizationOAuthClientResponse');
37295
37299
  if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
37296
37300
  const headerCb = options.responseHeadersCallback;
37297
37301
  // on next tick, so we have time to handle the response
@@ -37302,13 +37306,12 @@ class OrganizationPipelinesApi {
37302
37306
  return resp;
37303
37307
  }
37304
37308
  /**
37305
- * Retrieve all organizational pipelines
37306
- * @summary List pipelines
37309
+ * Lists the OAuth apps owned by the developer profile organization.
37310
+ * @summary List OAuth apps
37307
37311
  * @param organizationId Organization ID
37308
- * @param projectId If set, filters on pipelines which are attached to this project.
37309
37312
  */
37310
- async listOrganizationPipelines(organizationId, queryParams, options = { headers: {} }) {
37311
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/pipelines'
37313
+ async listOrganizationOAuthClients(organizationId, options = { headers: {} }) {
37314
+ const localVarPath = this.basePath + '/api/organizations/{organizationId}/oauth-clients'
37312
37315
  .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
37313
37316
  let queryParameters = {};
37314
37317
  let localVarHeaderParams = {
@@ -37327,10 +37330,7 @@ class OrganizationPipelinesApi {
37327
37330
  let localVarFormParams;
37328
37331
  // verify required parameter 'organizationId' is not null or undefined
37329
37332
  if (organizationId === null || organizationId === undefined) {
37330
- throw new Error('Required parameter organizationId was null or undefined when calling listOrganizationPipelines.');
37331
- }
37332
- if (typeof (queryParams === null || queryParams === void 0 ? void 0 : queryParams.projectId) !== 'undefined' && (queryParams === null || queryParams === void 0 ? void 0 : queryParams.projectId) !== null) {
37333
- queryParameters['projectId'] = queryParams.projectId;
37333
+ throw new Error('Required parameter organizationId was null or undefined when calling listOrganizationOAuthClients.');
37334
37334
  }
37335
37335
  localVarHeaderParams = {
37336
37336
  ...localVarHeaderParams,
@@ -37365,7 +37365,7 @@ class OrganizationPipelinesApi {
37365
37365
  url = authDefault.url;
37366
37366
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
37367
37367
  const response = await fetch(url, requestOptions);
37368
- const resp = this.handleResponse(response, 'ListOrganizationPipelinesResponse');
37368
+ const resp = this.handleResponse(response, 'ListOrganizationOAuthClientsResponse');
37369
37369
  if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
37370
37370
  const headerCb = options.responseHeadersCallback;
37371
37371
  // on next tick, so we have time to handle the response
@@ -37376,16 +37376,15 @@ class OrganizationPipelinesApi {
37376
37376
  return resp;
37377
37377
  }
37378
37378
  /**
37379
- * Run an organizational pipeline
37380
- * @summary Run pipeline
37379
+ * Rotates the client secret of an OAuth app owned by the developer profile organization and returns the new one-time secret.
37380
+ * @summary Rotate an OAuth app client secret
37381
37381
  * @param organizationId Organization ID
37382
- * @param pipelineId Pipeline ID
37383
- * @param ignoreLastSuccessfulRun If set then `EI_LAST_SUCCESSFUL_RUN` is not set. You can use this to re-run a pipeline from scratch.
37382
+ * @param oauthClientId
37384
37383
  */
37385
- async runOrganizationPipeline(organizationId, pipelineId, queryParams, options = { headers: {} }) {
37386
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/pipelines/{pipelineId}/run'
37384
+ async rotateOrganizationOAuthClientSecret(organizationId, oauthClientId, options = { headers: {} }) {
37385
+ const localVarPath = this.basePath + '/api/organizations/{organizationId}/oauth-clients/{oauthClientId}/rotate-secret'
37387
37386
  .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
37388
- .replace('{' + 'pipelineId' + '}', encodeURIComponent(String(pipelineId)));
37387
+ .replace('{' + 'oauthClientId' + '}', encodeURIComponent(String(oauthClientId)));
37389
37388
  let queryParameters = {};
37390
37389
  let localVarHeaderParams = {
37391
37390
  ...(typeof window === "undefined" ? { "User-Agent": "edgeimpulse-api nodejs" } : {}),
@@ -37403,14 +37402,11 @@ class OrganizationPipelinesApi {
37403
37402
  let localVarFormParams;
37404
37403
  // verify required parameter 'organizationId' is not null or undefined
37405
37404
  if (organizationId === null || organizationId === undefined) {
37406
- throw new Error('Required parameter organizationId was null or undefined when calling runOrganizationPipeline.');
37405
+ throw new Error('Required parameter organizationId was null or undefined when calling rotateOrganizationOAuthClientSecret.');
37407
37406
  }
37408
- // verify required parameter 'pipelineId' is not null or undefined
37409
- if (pipelineId === null || pipelineId === undefined) {
37410
- throw new Error('Required parameter pipelineId was null or undefined when calling runOrganizationPipeline.');
37411
- }
37412
- if (typeof (queryParams === null || queryParams === void 0 ? void 0 : queryParams.ignoreLastSuccessfulRun) !== 'undefined' && (queryParams === null || queryParams === void 0 ? void 0 : queryParams.ignoreLastSuccessfulRun) !== null) {
37413
- queryParameters['ignoreLastSuccessfulRun'] = queryParams.ignoreLastSuccessfulRun;
37407
+ // verify required parameter 'oauthClientId' is not null or undefined
37408
+ if (oauthClientId === null || oauthClientId === undefined) {
37409
+ throw new Error('Required parameter oauthClientId was null or undefined when calling rotateOrganizationOAuthClientSecret.');
37414
37410
  }
37415
37411
  localVarHeaderParams = {
37416
37412
  ...localVarHeaderParams,
@@ -37445,7 +37441,7 @@ class OrganizationPipelinesApi {
37445
37441
  url = authDefault.url;
37446
37442
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
37447
37443
  const response = await fetch(url, requestOptions);
37448
- const resp = this.handleResponse(response, 'RunOrganizationPipelineResponse');
37444
+ const resp = this.handleResponse(response, 'RotateOAuthClientSecretResponse');
37449
37445
  if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
37450
37446
  const headerCb = options.responseHeadersCallback;
37451
37447
  // on next tick, so we have time to handle the response
@@ -37456,15 +37452,16 @@ class OrganizationPipelinesApi {
37456
37452
  return resp;
37457
37453
  }
37458
37454
  /**
37459
- * Stops the pipeline, and marks it as failed.
37460
- * @summary Stop a running pipeline
37455
+ * Updates the mutable properties of an OAuth app owned by the developer profile organization.
37456
+ * @summary Update an OAuth app
37461
37457
  * @param organizationId Organization ID
37462
- * @param pipelineId Pipeline ID
37458
+ * @param oauthClientId
37459
+ * @param updateOAuthClientRequest
37463
37460
  */
37464
- async stopOrganizationPipeline(organizationId, pipelineId, options = { headers: {} }) {
37465
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/pipelines/{pipelineId}/stop'
37461
+ async updateOrganizationOAuthClient(organizationId, oauthClientId, updateOAuthClientRequest, options = { headers: {} }) {
37462
+ const localVarPath = this.basePath + '/api/organizations/{organizationId}/oauth-clients/{oauthClientId}'
37466
37463
  .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
37467
- .replace('{' + 'pipelineId' + '}', encodeURIComponent(String(pipelineId)));
37464
+ .replace('{' + 'oauthClientId' + '}', encodeURIComponent(String(oauthClientId)));
37468
37465
  let queryParameters = {};
37469
37466
  let localVarHeaderParams = {
37470
37467
  ...(typeof window === "undefined" ? { "User-Agent": "edgeimpulse-api nodejs" } : {}),
@@ -37482,11 +37479,15 @@ class OrganizationPipelinesApi {
37482
37479
  let localVarFormParams;
37483
37480
  // verify required parameter 'organizationId' is not null or undefined
37484
37481
  if (organizationId === null || organizationId === undefined) {
37485
- throw new Error('Required parameter organizationId was null or undefined when calling stopOrganizationPipeline.');
37482
+ throw new Error('Required parameter organizationId was null or undefined when calling updateOrganizationOAuthClient.');
37486
37483
  }
37487
- // verify required parameter 'pipelineId' is not null or undefined
37488
- if (pipelineId === null || pipelineId === undefined) {
37489
- throw new Error('Required parameter pipelineId was null or undefined when calling stopOrganizationPipeline.');
37484
+ // verify required parameter 'oauthClientId' is not null or undefined
37485
+ if (oauthClientId === null || oauthClientId === undefined) {
37486
+ throw new Error('Required parameter oauthClientId was null or undefined when calling updateOrganizationOAuthClient.');
37487
+ }
37488
+ // verify required parameter 'updateOAuthClientRequest' is not null or undefined
37489
+ if (updateOAuthClientRequest === null || updateOAuthClientRequest === undefined) {
37490
+ throw new Error('Required parameter updateOAuthClientRequest was null or undefined when calling updateOrganizationOAuthClient.');
37490
37491
  }
37491
37492
  localVarHeaderParams = {
37492
37493
  ...localVarHeaderParams,
@@ -37502,6 +37503,7 @@ class OrganizationPipelinesApi {
37502
37503
  method: 'POST',
37503
37504
  headers: { ...localVarHeaderParams },
37504
37505
  };
37506
+ localVarRequestOptions.body = JSON.stringify(updateOAuthClientRequest);
37505
37507
  let requestOptions = localVarRequestOptions;
37506
37508
  let url = localVarUrl;
37507
37509
  const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
@@ -37532,16 +37534,16 @@ class OrganizationPipelinesApi {
37532
37534
  return resp;
37533
37535
  }
37534
37536
  /**
37535
- * Update an organizational pipelines
37536
- * @summary Update pipeline
37537
+ * Uploads a PNG or JPEG logo for an OAuth app owned by the developer profile organization.
37538
+ * @summary Upload an OAuth app logo
37537
37539
  * @param organizationId Organization ID
37538
- * @param pipelineId Pipeline ID
37539
- * @param organizationUpdatePipelineBody
37540
+ * @param oauthClientId
37541
+ * @param image
37540
37542
  */
37541
- async updateOrganizationPipeline(organizationId, pipelineId, organizationUpdatePipelineBody, options = { headers: {} }) {
37542
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/pipelines/{pipelineId}'
37543
+ async uploadOrganizationOAuthClientLogo(organizationId, oauthClientId, params, options = { headers: {} }) {
37544
+ const localVarPath = this.basePath + '/api/organizations/{organizationId}/oauth-clients/{oauthClientId}/logo'
37543
37545
  .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
37544
- .replace('{' + 'pipelineId' + '}', encodeURIComponent(String(pipelineId)));
37546
+ .replace('{' + 'oauthClientId' + '}', encodeURIComponent(String(oauthClientId)));
37545
37547
  let queryParameters = {};
37546
37548
  let localVarHeaderParams = {
37547
37549
  ...(typeof window === "undefined" ? { "User-Agent": "edgeimpulse-api nodejs" } : {}),
@@ -37559,21 +37561,31 @@ class OrganizationPipelinesApi {
37559
37561
  let localVarFormParams;
37560
37562
  // verify required parameter 'organizationId' is not null or undefined
37561
37563
  if (organizationId === null || organizationId === undefined) {
37562
- throw new Error('Required parameter organizationId was null or undefined when calling updateOrganizationPipeline.');
37564
+ throw new Error('Required parameter organizationId was null or undefined when calling uploadOrganizationOAuthClientLogo.');
37563
37565
  }
37564
- // verify required parameter 'pipelineId' is not null or undefined
37565
- if (pipelineId === null || pipelineId === undefined) {
37566
- throw new Error('Required parameter pipelineId was null or undefined when calling updateOrganizationPipeline.');
37566
+ // verify required parameter 'oauthClientId' is not null or undefined
37567
+ if (oauthClientId === null || oauthClientId === undefined) {
37568
+ throw new Error('Required parameter oauthClientId was null or undefined when calling uploadOrganizationOAuthClientLogo.');
37567
37569
  }
37568
- // verify required parameter 'organizationUpdatePipelineBody' is not null or undefined
37569
- if (organizationUpdatePipelineBody === null || organizationUpdatePipelineBody === undefined) {
37570
- throw new Error('Required parameter organizationUpdatePipelineBody was null or undefined when calling updateOrganizationPipeline.');
37570
+ // verify required parameter 'image' is not null or undefined
37571
+ if (params.image === null || params.image === undefined) {
37572
+ throw new Error('Required parameter params.image was null or undefined when calling uploadOrganizationOAuthClientLogo.');
37571
37573
  }
37572
37574
  localVarHeaderParams = {
37573
37575
  ...localVarHeaderParams,
37574
37576
  ...options.headers,
37575
37577
  ...this.opts.extraHeaders,
37576
37578
  };
37579
+ if (params.image !== undefined) {
37580
+ localVarFormParams = (0, models_1.ensureFormData)(localVarFormParams);
37581
+ const imageFiles = Array.isArray(params.image) ? params.image : [params.image];
37582
+ const Blob = globalThis.Blob || require('buffer').Blob;
37583
+ for (const f of imageFiles) {
37584
+ localVarFormParams.append('image', new Blob([f.value], {
37585
+ type: f.options.contentType
37586
+ }), f.options.filename);
37587
+ }
37588
+ }
37577
37589
  const queryString = Object.entries(queryParameters)
37578
37590
  .filter(([, value]) => value !== undefined)
37579
37591
  .map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
@@ -37583,7 +37595,6 @@ class OrganizationPipelinesApi {
37583
37595
  method: 'POST',
37584
37596
  headers: { ...localVarHeaderParams },
37585
37597
  };
37586
- localVarRequestOptions.body = JSON.stringify(organizationUpdatePipelineBody);
37587
37598
  let requestOptions = localVarRequestOptions;
37588
37599
  let url = localVarUrl;
37589
37600
  const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
@@ -37614,11 +37625,11 @@ class OrganizationPipelinesApi {
37614
37625
  return resp;
37615
37626
  }
37616
37627
  }
37617
- exports.OrganizationPipelinesApi = OrganizationPipelinesApi;
37628
+ exports.OrganizationOAuthClientsApi = OrganizationOAuthClientsApi;
37618
37629
  });
37619
37630
 
37620
37631
 
37621
- define("library/sdk/api/organizationPortalsApi", ["require", "exports"], function (require, exports) {
37632
+ define("library/sdk/api/organizationPipelinesApi", ["require", "exports"], function (require, exports) {
37622
37633
  "use strict";
37623
37634
  /**
37624
37635
  * Edge Impulse API
@@ -37632,7 +37643,7 @@ define("library/sdk/api/organizationPortalsApi", ["require", "exports"], functio
37632
37643
  * Do not edit the class manually.
37633
37644
  */
37634
37645
  Object.defineProperty(exports, "__esModule", { value: true });
37635
- exports.OrganizationPortalsApi = exports.OrganizationPortalsApiApiKeys = void 0;
37646
+ exports.OrganizationPipelinesApi = exports.OrganizationPipelinesApiApiKeys = void 0;
37636
37647
  let fetch;
37637
37648
  let FormData;
37638
37649
  if (globalThis.fetch && globalThis.FormData) {
@@ -37650,13 +37661,13 @@ let defaultBasePath = 'https://studio.edgeimpulse.com/v1';
37650
37661
  // ===============================================
37651
37662
  // This file is autogenerated - Please do not edit
37652
37663
  // ===============================================
37653
- var OrganizationPortalsApiApiKeys;
37654
- (function (OrganizationPortalsApiApiKeys) {
37655
- OrganizationPortalsApiApiKeys[OrganizationPortalsApiApiKeys["ApiKeyAuthentication"] = 0] = "ApiKeyAuthentication";
37656
- OrganizationPortalsApiApiKeys[OrganizationPortalsApiApiKeys["JWTAuthentication"] = 1] = "JWTAuthentication";
37657
- OrganizationPortalsApiApiKeys[OrganizationPortalsApiApiKeys["JWTHttpHeaderAuthentication"] = 2] = "JWTHttpHeaderAuthentication";
37658
- })(OrganizationPortalsApiApiKeys = exports.OrganizationPortalsApiApiKeys || (exports.OrganizationPortalsApiApiKeys = {}));
37659
- class OrganizationPortalsApi {
37664
+ var OrganizationPipelinesApiApiKeys;
37665
+ (function (OrganizationPipelinesApiApiKeys) {
37666
+ OrganizationPipelinesApiApiKeys[OrganizationPipelinesApiApiKeys["ApiKeyAuthentication"] = 0] = "ApiKeyAuthentication";
37667
+ OrganizationPipelinesApiApiKeys[OrganizationPipelinesApiApiKeys["JWTAuthentication"] = 1] = "JWTAuthentication";
37668
+ OrganizationPipelinesApiApiKeys[OrganizationPipelinesApiApiKeys["JWTHttpHeaderAuthentication"] = 2] = "JWTHttpHeaderAuthentication";
37669
+ })(OrganizationPipelinesApiApiKeys = exports.OrganizationPipelinesApiApiKeys || (exports.OrganizationPipelinesApiApiKeys = {}));
37670
+ class OrganizationPipelinesApi {
37660
37671
  async handleResponse(response, returnType) {
37661
37672
  let body = await (0, models_1.parseResponse)(response);
37662
37673
  if (!response.ok) {
@@ -37714,19 +37725,19 @@ class OrganizationPortalsApi {
37714
37725
  this.authentications.default = auth;
37715
37726
  }
37716
37727
  setApiKey(key, value) {
37717
- this.authentications[OrganizationPortalsApiApiKeys[key]].apiKey = value;
37728
+ this.authentications[OrganizationPipelinesApiApiKeys[key]].apiKey = value;
37718
37729
  }
37719
37730
  set accessToken(token) {
37720
37731
  this.authentications.OAuth2.accessToken = token;
37721
37732
  }
37722
37733
  /**
37723
- * Creates a new upload portal for the organization.
37724
- * @summary Create upload portal
37734
+ * Create an organizational pipelines
37735
+ * @summary Create pipeline
37725
37736
  * @param organizationId Organization ID
37726
- * @param createOrganizationPortalRequest
37737
+ * @param organizationUpdatePipelineBody
37727
37738
  */
37728
- async createOrganizationPortal(organizationId, createOrganizationPortalRequest, options = { headers: {} }) {
37729
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/portals/create'
37739
+ async createOrganizationPipeline(organizationId, organizationUpdatePipelineBody, options = { headers: {} }) {
37740
+ const localVarPath = this.basePath + '/api/organizations/{organizationId}/pipelines'
37730
37741
  .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
37731
37742
  let queryParameters = {};
37732
37743
  let localVarHeaderParams = {
@@ -37745,11 +37756,11 @@ class OrganizationPortalsApi {
37745
37756
  let localVarFormParams;
37746
37757
  // verify required parameter 'organizationId' is not null or undefined
37747
37758
  if (organizationId === null || organizationId === undefined) {
37748
- throw new Error('Required parameter organizationId was null or undefined when calling createOrganizationPortal.');
37759
+ throw new Error('Required parameter organizationId was null or undefined when calling createOrganizationPipeline.');
37749
37760
  }
37750
- // verify required parameter 'createOrganizationPortalRequest' is not null or undefined
37751
- if (createOrganizationPortalRequest === null || createOrganizationPortalRequest === undefined) {
37752
- throw new Error('Required parameter createOrganizationPortalRequest was null or undefined when calling createOrganizationPortal.');
37761
+ // verify required parameter 'organizationUpdatePipelineBody' is not null or undefined
37762
+ if (organizationUpdatePipelineBody === null || organizationUpdatePipelineBody === undefined) {
37763
+ throw new Error('Required parameter organizationUpdatePipelineBody was null or undefined when calling createOrganizationPipeline.');
37753
37764
  }
37754
37765
  localVarHeaderParams = {
37755
37766
  ...localVarHeaderParams,
@@ -37765,7 +37776,7 @@ class OrganizationPortalsApi {
37765
37776
  method: 'POST',
37766
37777
  headers: { ...localVarHeaderParams },
37767
37778
  };
37768
- localVarRequestOptions.body = JSON.stringify(createOrganizationPortalRequest);
37779
+ localVarRequestOptions.body = JSON.stringify(organizationUpdatePipelineBody);
37769
37780
  let requestOptions = localVarRequestOptions;
37770
37781
  let url = localVarUrl;
37771
37782
  const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
@@ -37785,7 +37796,7 @@ class OrganizationPortalsApi {
37785
37796
  url = authDefault.url;
37786
37797
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
37787
37798
  const response = await fetch(url, requestOptions);
37788
- const resp = this.handleResponse(response, 'CreateOrganizationPortalResponse');
37799
+ const resp = this.handleResponse(response, 'EntityCreatedResponse');
37789
37800
  if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
37790
37801
  const headerCb = options.responseHeadersCallback;
37791
37802
  // on next tick, so we have time to handle the response
@@ -37796,15 +37807,15 @@ class OrganizationPortalsApi {
37796
37807
  return resp;
37797
37808
  }
37798
37809
  /**
37799
- * Deletes an upload portal for the organization.
37800
- * @summary Delete upload portal
37810
+ * Delete an organizational pipelines
37811
+ * @summary Delete pipeline
37801
37812
  * @param organizationId Organization ID
37802
- * @param portalId Portal ID
37813
+ * @param pipelineId Pipeline ID
37803
37814
  */
37804
- async deleteOrganizationPortal(organizationId, portalId, options = { headers: {} }) {
37805
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/portals/{portalId}/delete'
37815
+ async deleteOrganizationPipeline(organizationId, pipelineId, options = { headers: {} }) {
37816
+ const localVarPath = this.basePath + '/api/organizations/{organizationId}/pipelines/{pipelineId}'
37806
37817
  .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
37807
- .replace('{' + 'portalId' + '}', encodeURIComponent(String(portalId)));
37818
+ .replace('{' + 'pipelineId' + '}', encodeURIComponent(String(pipelineId)));
37808
37819
  let queryParameters = {};
37809
37820
  let localVarHeaderParams = {
37810
37821
  ...(typeof window === "undefined" ? { "User-Agent": "edgeimpulse-api nodejs" } : {}),
@@ -37822,11 +37833,11 @@ class OrganizationPortalsApi {
37822
37833
  let localVarFormParams;
37823
37834
  // verify required parameter 'organizationId' is not null or undefined
37824
37835
  if (organizationId === null || organizationId === undefined) {
37825
- throw new Error('Required parameter organizationId was null or undefined when calling deleteOrganizationPortal.');
37836
+ throw new Error('Required parameter organizationId was null or undefined when calling deleteOrganizationPipeline.');
37826
37837
  }
37827
- // verify required parameter 'portalId' is not null or undefined
37828
- if (portalId === null || portalId === undefined) {
37829
- throw new Error('Required parameter portalId was null or undefined when calling deleteOrganizationPortal.');
37838
+ // verify required parameter 'pipelineId' is not null or undefined
37839
+ if (pipelineId === null || pipelineId === undefined) {
37840
+ throw new Error('Required parameter pipelineId was null or undefined when calling deleteOrganizationPipeline.');
37830
37841
  }
37831
37842
  localVarHeaderParams = {
37832
37843
  ...localVarHeaderParams,
@@ -37872,15 +37883,15 @@ class OrganizationPortalsApi {
37872
37883
  return resp;
37873
37884
  }
37874
37885
  /**
37875
- * Retrieve a single upload portals identified by ID.
37876
- * @summary Retrieve upload portal information
37886
+ * Retrieve an organizational pipelines
37887
+ * @summary Get pipeline
37877
37888
  * @param organizationId Organization ID
37878
- * @param portalId Portal ID
37889
+ * @param pipelineId Pipeline ID
37879
37890
  */
37880
- async getOrganizationPortal(organizationId, portalId, options = { headers: {} }) {
37881
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/portals/{portalId}'
37891
+ async getOrganizationPipeline(organizationId, pipelineId, options = { headers: {} }) {
37892
+ const localVarPath = this.basePath + '/api/organizations/{organizationId}/pipelines/{pipelineId}'
37882
37893
  .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
37883
- .replace('{' + 'portalId' + '}', encodeURIComponent(String(portalId)));
37894
+ .replace('{' + 'pipelineId' + '}', encodeURIComponent(String(pipelineId)));
37884
37895
  let queryParameters = {};
37885
37896
  let localVarHeaderParams = {
37886
37897
  ...(typeof window === "undefined" ? { "User-Agent": "edgeimpulse-api nodejs" } : {}),
@@ -37898,11 +37909,11 @@ class OrganizationPortalsApi {
37898
37909
  let localVarFormParams;
37899
37910
  // verify required parameter 'organizationId' is not null or undefined
37900
37911
  if (organizationId === null || organizationId === undefined) {
37901
- throw new Error('Required parameter organizationId was null or undefined when calling getOrganizationPortal.');
37912
+ throw new Error('Required parameter organizationId was null or undefined when calling getOrganizationPipeline.');
37902
37913
  }
37903
- // verify required parameter 'portalId' is not null or undefined
37904
- if (portalId === null || portalId === undefined) {
37905
- throw new Error('Required parameter portalId was null or undefined when calling getOrganizationPortal.');
37914
+ // verify required parameter 'pipelineId' is not null or undefined
37915
+ if (pipelineId === null || pipelineId === undefined) {
37916
+ throw new Error('Required parameter pipelineId was null or undefined when calling getOrganizationPipeline.');
37906
37917
  }
37907
37918
  localVarHeaderParams = {
37908
37919
  ...localVarHeaderParams,
@@ -37937,7 +37948,7 @@ class OrganizationPortalsApi {
37937
37948
  url = authDefault.url;
37938
37949
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
37939
37950
  const response = await fetch(url, requestOptions);
37940
- const resp = this.handleResponse(response, 'GetOrganizationPortalResponse');
37951
+ const resp = this.handleResponse(response, 'GetOrganizationPipelinesResponse');
37941
37952
  if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
37942
37953
  const headerCb = options.responseHeadersCallback;
37943
37954
  // on next tick, so we have time to handle the response
@@ -37948,12 +37959,13 @@ class OrganizationPortalsApi {
37948
37959
  return resp;
37949
37960
  }
37950
37961
  /**
37951
- * Retrieve all configured upload portals.
37952
- * @summary List upload portals
37962
+ * Retrieve all archived organizational pipelines
37963
+ * @summary List archived pipelines
37953
37964
  * @param organizationId Organization ID
37965
+ * @param projectId If set, filters on pipelines which are attached to this project.
37954
37966
  */
37955
- async listOrganizationPortals(organizationId, options = { headers: {} }) {
37956
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/portals'
37967
+ async listArchivedOrganizationPipelines(organizationId, queryParams, options = { headers: {} }) {
37968
+ const localVarPath = this.basePath + '/api/organizations/{organizationId}/pipelines/archived'
37957
37969
  .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
37958
37970
  let queryParameters = {};
37959
37971
  let localVarHeaderParams = {
@@ -37972,83 +37984,10 @@ class OrganizationPortalsApi {
37972
37984
  let localVarFormParams;
37973
37985
  // verify required parameter 'organizationId' is not null or undefined
37974
37986
  if (organizationId === null || organizationId === undefined) {
37975
- throw new Error('Required parameter organizationId was null or undefined when calling listOrganizationPortals.');
37976
- }
37977
- localVarHeaderParams = {
37978
- ...localVarHeaderParams,
37979
- ...options.headers,
37980
- ...this.opts.extraHeaders,
37981
- };
37982
- const queryString = Object.entries(queryParameters)
37983
- .filter(([, value]) => value !== undefined)
37984
- .map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
37985
- .join('&');
37986
- let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
37987
- let localVarRequestOptions = {
37988
- method: 'GET',
37989
- headers: { ...localVarHeaderParams },
37990
- };
37991
- let requestOptions = localVarRequestOptions;
37992
- let url = localVarUrl;
37993
- const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
37994
- requestOptions = auth_ApiKeyAuthentication.requestOptions;
37995
- url = auth_ApiKeyAuthentication.url;
37996
- const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
37997
- requestOptions = auth_JWTAuthentication.requestOptions;
37998
- url = auth_JWTAuthentication.url;
37999
- const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
38000
- requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
38001
- url = auth_JWTHttpHeaderAuthentication.url;
38002
- const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
38003
- requestOptions = auth_OAuth2.requestOptions;
38004
- url = auth_OAuth2.url;
38005
- const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
38006
- requestOptions = authDefault.requestOptions;
38007
- url = authDefault.url;
38008
- (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
38009
- const response = await fetch(url, requestOptions);
38010
- const resp = this.handleResponse(response, 'ListOrganizationPortalsResponse');
38011
- if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
38012
- const headerCb = options.responseHeadersCallback;
38013
- // on next tick, so we have time to handle the response
38014
- setTimeout(() => {
38015
- headerCb(Object.fromEntries(response.headers.entries()));
38016
- }, 0);
38017
- }
38018
- return resp;
38019
- }
38020
- /**
38021
- * Rotates the token for an upload portal.
38022
- * @summary Rotate upload portal token
38023
- * @param organizationId Organization ID
38024
- * @param portalId Portal ID
38025
- */
38026
- async rotateOrganizationPortalToken(organizationId, portalId, options = { headers: {} }) {
38027
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/portals/{portalId}/rotate-token'
38028
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
38029
- .replace('{' + 'portalId' + '}', encodeURIComponent(String(portalId)));
38030
- let queryParameters = {};
38031
- let localVarHeaderParams = {
38032
- ...(typeof window === "undefined" ? { "User-Agent": "edgeimpulse-api nodejs" } : {}),
38033
- 'Content-Type': 'application/json',
38034
- ...this.defaultHeaders,
38035
- };
38036
- const produces = ['application/json'];
38037
- // give precedence to 'application/json'
38038
- if (produces.indexOf('application/json') >= 0) {
38039
- localVarHeaderParams.Accept = 'application/json';
38040
- }
38041
- else {
38042
- localVarHeaderParams.Accept = produces.join(',');
38043
- }
38044
- let localVarFormParams;
38045
- // verify required parameter 'organizationId' is not null or undefined
38046
- if (organizationId === null || organizationId === undefined) {
38047
- throw new Error('Required parameter organizationId was null or undefined when calling rotateOrganizationPortalToken.');
37987
+ throw new Error('Required parameter organizationId was null or undefined when calling listArchivedOrganizationPipelines.');
38048
37988
  }
38049
- // verify required parameter 'portalId' is not null or undefined
38050
- if (portalId === null || portalId === undefined) {
38051
- throw new Error('Required parameter portalId was null or undefined when calling rotateOrganizationPortalToken.');
37989
+ if (typeof (queryParams === null || queryParams === void 0 ? void 0 : queryParams.projectId) !== 'undefined' && (queryParams === null || queryParams === void 0 ? void 0 : queryParams.projectId) !== null) {
37990
+ queryParameters['projectId'] = queryParams.projectId;
38052
37991
  }
38053
37992
  localVarHeaderParams = {
38054
37993
  ...localVarHeaderParams,
@@ -38061,7 +38000,799 @@ class OrganizationPortalsApi {
38061
38000
  .join('&');
38062
38001
  let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
38063
38002
  let localVarRequestOptions = {
38064
- method: 'DELETE',
38003
+ method: 'GET',
38004
+ headers: { ...localVarHeaderParams },
38005
+ };
38006
+ let requestOptions = localVarRequestOptions;
38007
+ let url = localVarUrl;
38008
+ const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
38009
+ requestOptions = auth_ApiKeyAuthentication.requestOptions;
38010
+ url = auth_ApiKeyAuthentication.url;
38011
+ const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
38012
+ requestOptions = auth_JWTAuthentication.requestOptions;
38013
+ url = auth_JWTAuthentication.url;
38014
+ const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
38015
+ requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
38016
+ url = auth_JWTHttpHeaderAuthentication.url;
38017
+ const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
38018
+ requestOptions = auth_OAuth2.requestOptions;
38019
+ url = auth_OAuth2.url;
38020
+ const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
38021
+ requestOptions = authDefault.requestOptions;
38022
+ url = authDefault.url;
38023
+ (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
38024
+ const response = await fetch(url, requestOptions);
38025
+ const resp = this.handleResponse(response, 'ListOrganizationPipelinesResponse');
38026
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
38027
+ const headerCb = options.responseHeadersCallback;
38028
+ // on next tick, so we have time to handle the response
38029
+ setTimeout(() => {
38030
+ headerCb(Object.fromEntries(response.headers.entries()));
38031
+ }, 0);
38032
+ }
38033
+ return resp;
38034
+ }
38035
+ /**
38036
+ * Retrieve all organizational pipelines
38037
+ * @summary List pipelines
38038
+ * @param organizationId Organization ID
38039
+ * @param projectId If set, filters on pipelines which are attached to this project.
38040
+ */
38041
+ async listOrganizationPipelines(organizationId, queryParams, options = { headers: {} }) {
38042
+ const localVarPath = this.basePath + '/api/organizations/{organizationId}/pipelines'
38043
+ .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
38044
+ let queryParameters = {};
38045
+ let localVarHeaderParams = {
38046
+ ...(typeof window === "undefined" ? { "User-Agent": "edgeimpulse-api nodejs" } : {}),
38047
+ 'Content-Type': 'application/json',
38048
+ ...this.defaultHeaders,
38049
+ };
38050
+ const produces = ['application/json'];
38051
+ // give precedence to 'application/json'
38052
+ if (produces.indexOf('application/json') >= 0) {
38053
+ localVarHeaderParams.Accept = 'application/json';
38054
+ }
38055
+ else {
38056
+ localVarHeaderParams.Accept = produces.join(',');
38057
+ }
38058
+ let localVarFormParams;
38059
+ // verify required parameter 'organizationId' is not null or undefined
38060
+ if (organizationId === null || organizationId === undefined) {
38061
+ throw new Error('Required parameter organizationId was null or undefined when calling listOrganizationPipelines.');
38062
+ }
38063
+ if (typeof (queryParams === null || queryParams === void 0 ? void 0 : queryParams.projectId) !== 'undefined' && (queryParams === null || queryParams === void 0 ? void 0 : queryParams.projectId) !== null) {
38064
+ queryParameters['projectId'] = queryParams.projectId;
38065
+ }
38066
+ localVarHeaderParams = {
38067
+ ...localVarHeaderParams,
38068
+ ...options.headers,
38069
+ ...this.opts.extraHeaders,
38070
+ };
38071
+ const queryString = Object.entries(queryParameters)
38072
+ .filter(([, value]) => value !== undefined)
38073
+ .map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
38074
+ .join('&');
38075
+ let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
38076
+ let localVarRequestOptions = {
38077
+ method: 'GET',
38078
+ headers: { ...localVarHeaderParams },
38079
+ };
38080
+ let requestOptions = localVarRequestOptions;
38081
+ let url = localVarUrl;
38082
+ const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
38083
+ requestOptions = auth_ApiKeyAuthentication.requestOptions;
38084
+ url = auth_ApiKeyAuthentication.url;
38085
+ const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
38086
+ requestOptions = auth_JWTAuthentication.requestOptions;
38087
+ url = auth_JWTAuthentication.url;
38088
+ const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
38089
+ requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
38090
+ url = auth_JWTHttpHeaderAuthentication.url;
38091
+ const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
38092
+ requestOptions = auth_OAuth2.requestOptions;
38093
+ url = auth_OAuth2.url;
38094
+ const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
38095
+ requestOptions = authDefault.requestOptions;
38096
+ url = authDefault.url;
38097
+ (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
38098
+ const response = await fetch(url, requestOptions);
38099
+ const resp = this.handleResponse(response, 'ListOrganizationPipelinesResponse');
38100
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
38101
+ const headerCb = options.responseHeadersCallback;
38102
+ // on next tick, so we have time to handle the response
38103
+ setTimeout(() => {
38104
+ headerCb(Object.fromEntries(response.headers.entries()));
38105
+ }, 0);
38106
+ }
38107
+ return resp;
38108
+ }
38109
+ /**
38110
+ * Run an organizational pipeline
38111
+ * @summary Run pipeline
38112
+ * @param organizationId Organization ID
38113
+ * @param pipelineId Pipeline ID
38114
+ * @param ignoreLastSuccessfulRun If set then `EI_LAST_SUCCESSFUL_RUN` is not set. You can use this to re-run a pipeline from scratch.
38115
+ */
38116
+ async runOrganizationPipeline(organizationId, pipelineId, queryParams, options = { headers: {} }) {
38117
+ const localVarPath = this.basePath + '/api/organizations/{organizationId}/pipelines/{pipelineId}/run'
38118
+ .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
38119
+ .replace('{' + 'pipelineId' + '}', encodeURIComponent(String(pipelineId)));
38120
+ let queryParameters = {};
38121
+ let localVarHeaderParams = {
38122
+ ...(typeof window === "undefined" ? { "User-Agent": "edgeimpulse-api nodejs" } : {}),
38123
+ 'Content-Type': 'application/json',
38124
+ ...this.defaultHeaders,
38125
+ };
38126
+ const produces = ['application/json'];
38127
+ // give precedence to 'application/json'
38128
+ if (produces.indexOf('application/json') >= 0) {
38129
+ localVarHeaderParams.Accept = 'application/json';
38130
+ }
38131
+ else {
38132
+ localVarHeaderParams.Accept = produces.join(',');
38133
+ }
38134
+ let localVarFormParams;
38135
+ // verify required parameter 'organizationId' is not null or undefined
38136
+ if (organizationId === null || organizationId === undefined) {
38137
+ throw new Error('Required parameter organizationId was null or undefined when calling runOrganizationPipeline.');
38138
+ }
38139
+ // verify required parameter 'pipelineId' is not null or undefined
38140
+ if (pipelineId === null || pipelineId === undefined) {
38141
+ throw new Error('Required parameter pipelineId was null or undefined when calling runOrganizationPipeline.');
38142
+ }
38143
+ if (typeof (queryParams === null || queryParams === void 0 ? void 0 : queryParams.ignoreLastSuccessfulRun) !== 'undefined' && (queryParams === null || queryParams === void 0 ? void 0 : queryParams.ignoreLastSuccessfulRun) !== null) {
38144
+ queryParameters['ignoreLastSuccessfulRun'] = queryParams.ignoreLastSuccessfulRun;
38145
+ }
38146
+ localVarHeaderParams = {
38147
+ ...localVarHeaderParams,
38148
+ ...options.headers,
38149
+ ...this.opts.extraHeaders,
38150
+ };
38151
+ const queryString = Object.entries(queryParameters)
38152
+ .filter(([, value]) => value !== undefined)
38153
+ .map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
38154
+ .join('&');
38155
+ let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
38156
+ let localVarRequestOptions = {
38157
+ method: 'POST',
38158
+ headers: { ...localVarHeaderParams },
38159
+ };
38160
+ let requestOptions = localVarRequestOptions;
38161
+ let url = localVarUrl;
38162
+ const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
38163
+ requestOptions = auth_ApiKeyAuthentication.requestOptions;
38164
+ url = auth_ApiKeyAuthentication.url;
38165
+ const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
38166
+ requestOptions = auth_JWTAuthentication.requestOptions;
38167
+ url = auth_JWTAuthentication.url;
38168
+ const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
38169
+ requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
38170
+ url = auth_JWTHttpHeaderAuthentication.url;
38171
+ const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
38172
+ requestOptions = auth_OAuth2.requestOptions;
38173
+ url = auth_OAuth2.url;
38174
+ const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
38175
+ requestOptions = authDefault.requestOptions;
38176
+ url = authDefault.url;
38177
+ (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
38178
+ const response = await fetch(url, requestOptions);
38179
+ const resp = this.handleResponse(response, 'RunOrganizationPipelineResponse');
38180
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
38181
+ const headerCb = options.responseHeadersCallback;
38182
+ // on next tick, so we have time to handle the response
38183
+ setTimeout(() => {
38184
+ headerCb(Object.fromEntries(response.headers.entries()));
38185
+ }, 0);
38186
+ }
38187
+ return resp;
38188
+ }
38189
+ /**
38190
+ * Stops the pipeline, and marks it as failed.
38191
+ * @summary Stop a running pipeline
38192
+ * @param organizationId Organization ID
38193
+ * @param pipelineId Pipeline ID
38194
+ */
38195
+ async stopOrganizationPipeline(organizationId, pipelineId, options = { headers: {} }) {
38196
+ const localVarPath = this.basePath + '/api/organizations/{organizationId}/pipelines/{pipelineId}/stop'
38197
+ .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
38198
+ .replace('{' + 'pipelineId' + '}', encodeURIComponent(String(pipelineId)));
38199
+ let queryParameters = {};
38200
+ let localVarHeaderParams = {
38201
+ ...(typeof window === "undefined" ? { "User-Agent": "edgeimpulse-api nodejs" } : {}),
38202
+ 'Content-Type': 'application/json',
38203
+ ...this.defaultHeaders,
38204
+ };
38205
+ const produces = ['application/json'];
38206
+ // give precedence to 'application/json'
38207
+ if (produces.indexOf('application/json') >= 0) {
38208
+ localVarHeaderParams.Accept = 'application/json';
38209
+ }
38210
+ else {
38211
+ localVarHeaderParams.Accept = produces.join(',');
38212
+ }
38213
+ let localVarFormParams;
38214
+ // verify required parameter 'organizationId' is not null or undefined
38215
+ if (organizationId === null || organizationId === undefined) {
38216
+ throw new Error('Required parameter organizationId was null or undefined when calling stopOrganizationPipeline.');
38217
+ }
38218
+ // verify required parameter 'pipelineId' is not null or undefined
38219
+ if (pipelineId === null || pipelineId === undefined) {
38220
+ throw new Error('Required parameter pipelineId was null or undefined when calling stopOrganizationPipeline.');
38221
+ }
38222
+ localVarHeaderParams = {
38223
+ ...localVarHeaderParams,
38224
+ ...options.headers,
38225
+ ...this.opts.extraHeaders,
38226
+ };
38227
+ const queryString = Object.entries(queryParameters)
38228
+ .filter(([, value]) => value !== undefined)
38229
+ .map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
38230
+ .join('&');
38231
+ let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
38232
+ let localVarRequestOptions = {
38233
+ method: 'POST',
38234
+ headers: { ...localVarHeaderParams },
38235
+ };
38236
+ let requestOptions = localVarRequestOptions;
38237
+ let url = localVarUrl;
38238
+ const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
38239
+ requestOptions = auth_ApiKeyAuthentication.requestOptions;
38240
+ url = auth_ApiKeyAuthentication.url;
38241
+ const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
38242
+ requestOptions = auth_JWTAuthentication.requestOptions;
38243
+ url = auth_JWTAuthentication.url;
38244
+ const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
38245
+ requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
38246
+ url = auth_JWTHttpHeaderAuthentication.url;
38247
+ const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
38248
+ requestOptions = auth_OAuth2.requestOptions;
38249
+ url = auth_OAuth2.url;
38250
+ const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
38251
+ requestOptions = authDefault.requestOptions;
38252
+ url = authDefault.url;
38253
+ (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
38254
+ const response = await fetch(url, requestOptions);
38255
+ const resp = this.handleResponse(response, 'GenericApiResponse');
38256
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
38257
+ const headerCb = options.responseHeadersCallback;
38258
+ // on next tick, so we have time to handle the response
38259
+ setTimeout(() => {
38260
+ headerCb(Object.fromEntries(response.headers.entries()));
38261
+ }, 0);
38262
+ }
38263
+ return resp;
38264
+ }
38265
+ /**
38266
+ * Update an organizational pipelines
38267
+ * @summary Update pipeline
38268
+ * @param organizationId Organization ID
38269
+ * @param pipelineId Pipeline ID
38270
+ * @param organizationUpdatePipelineBody
38271
+ */
38272
+ async updateOrganizationPipeline(organizationId, pipelineId, organizationUpdatePipelineBody, options = { headers: {} }) {
38273
+ const localVarPath = this.basePath + '/api/organizations/{organizationId}/pipelines/{pipelineId}'
38274
+ .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
38275
+ .replace('{' + 'pipelineId' + '}', encodeURIComponent(String(pipelineId)));
38276
+ let queryParameters = {};
38277
+ let localVarHeaderParams = {
38278
+ ...(typeof window === "undefined" ? { "User-Agent": "edgeimpulse-api nodejs" } : {}),
38279
+ 'Content-Type': 'application/json',
38280
+ ...this.defaultHeaders,
38281
+ };
38282
+ const produces = ['application/json'];
38283
+ // give precedence to 'application/json'
38284
+ if (produces.indexOf('application/json') >= 0) {
38285
+ localVarHeaderParams.Accept = 'application/json';
38286
+ }
38287
+ else {
38288
+ localVarHeaderParams.Accept = produces.join(',');
38289
+ }
38290
+ let localVarFormParams;
38291
+ // verify required parameter 'organizationId' is not null or undefined
38292
+ if (organizationId === null || organizationId === undefined) {
38293
+ throw new Error('Required parameter organizationId was null or undefined when calling updateOrganizationPipeline.');
38294
+ }
38295
+ // verify required parameter 'pipelineId' is not null or undefined
38296
+ if (pipelineId === null || pipelineId === undefined) {
38297
+ throw new Error('Required parameter pipelineId was null or undefined when calling updateOrganizationPipeline.');
38298
+ }
38299
+ // verify required parameter 'organizationUpdatePipelineBody' is not null or undefined
38300
+ if (organizationUpdatePipelineBody === null || organizationUpdatePipelineBody === undefined) {
38301
+ throw new Error('Required parameter organizationUpdatePipelineBody was null or undefined when calling updateOrganizationPipeline.');
38302
+ }
38303
+ localVarHeaderParams = {
38304
+ ...localVarHeaderParams,
38305
+ ...options.headers,
38306
+ ...this.opts.extraHeaders,
38307
+ };
38308
+ const queryString = Object.entries(queryParameters)
38309
+ .filter(([, value]) => value !== undefined)
38310
+ .map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
38311
+ .join('&');
38312
+ let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
38313
+ let localVarRequestOptions = {
38314
+ method: 'POST',
38315
+ headers: { ...localVarHeaderParams },
38316
+ };
38317
+ localVarRequestOptions.body = JSON.stringify(organizationUpdatePipelineBody);
38318
+ let requestOptions = localVarRequestOptions;
38319
+ let url = localVarUrl;
38320
+ const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
38321
+ requestOptions = auth_ApiKeyAuthentication.requestOptions;
38322
+ url = auth_ApiKeyAuthentication.url;
38323
+ const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
38324
+ requestOptions = auth_JWTAuthentication.requestOptions;
38325
+ url = auth_JWTAuthentication.url;
38326
+ const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
38327
+ requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
38328
+ url = auth_JWTHttpHeaderAuthentication.url;
38329
+ const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
38330
+ requestOptions = auth_OAuth2.requestOptions;
38331
+ url = auth_OAuth2.url;
38332
+ const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
38333
+ requestOptions = authDefault.requestOptions;
38334
+ url = authDefault.url;
38335
+ (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
38336
+ const response = await fetch(url, requestOptions);
38337
+ const resp = this.handleResponse(response, 'GenericApiResponse');
38338
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
38339
+ const headerCb = options.responseHeadersCallback;
38340
+ // on next tick, so we have time to handle the response
38341
+ setTimeout(() => {
38342
+ headerCb(Object.fromEntries(response.headers.entries()));
38343
+ }, 0);
38344
+ }
38345
+ return resp;
38346
+ }
38347
+ }
38348
+ exports.OrganizationPipelinesApi = OrganizationPipelinesApi;
38349
+ });
38350
+
38351
+
38352
+ define("library/sdk/api/organizationPortalsApi", ["require", "exports"], function (require, exports) {
38353
+ "use strict";
38354
+ /**
38355
+ * Edge Impulse API
38356
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
38357
+ *
38358
+ * The version of the OpenAPI document: 1.0.0
38359
+ *
38360
+ *
38361
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
38362
+ * https://openapi-generator.tech
38363
+ * Do not edit the class manually.
38364
+ */
38365
+ Object.defineProperty(exports, "__esModule", { value: true });
38366
+ exports.OrganizationPortalsApi = exports.OrganizationPortalsApiApiKeys = void 0;
38367
+ let fetch;
38368
+ let FormData;
38369
+ if (globalThis.fetch && globalThis.FormData) {
38370
+ fetch = globalThis.fetch;
38371
+ FormData = globalThis.FormData;
38372
+ }
38373
+ else {
38374
+ const undici = require('undici');
38375
+ fetch = undici.fetch;
38376
+ FormData = undici.FormData;
38377
+ }
38378
+ const models_1 = require("../model/models");
38379
+ const models_2 = require("../model/models");
38380
+ let defaultBasePath = 'https://studio.edgeimpulse.com/v1';
38381
+ // ===============================================
38382
+ // This file is autogenerated - Please do not edit
38383
+ // ===============================================
38384
+ var OrganizationPortalsApiApiKeys;
38385
+ (function (OrganizationPortalsApiApiKeys) {
38386
+ OrganizationPortalsApiApiKeys[OrganizationPortalsApiApiKeys["ApiKeyAuthentication"] = 0] = "ApiKeyAuthentication";
38387
+ OrganizationPortalsApiApiKeys[OrganizationPortalsApiApiKeys["JWTAuthentication"] = 1] = "JWTAuthentication";
38388
+ OrganizationPortalsApiApiKeys[OrganizationPortalsApiApiKeys["JWTHttpHeaderAuthentication"] = 2] = "JWTHttpHeaderAuthentication";
38389
+ })(OrganizationPortalsApiApiKeys = exports.OrganizationPortalsApiApiKeys || (exports.OrganizationPortalsApiApiKeys = {}));
38390
+ class OrganizationPortalsApi {
38391
+ async handleResponse(response, returnType) {
38392
+ let body = await (0, models_1.parseResponse)(response);
38393
+ if (!response.ok) {
38394
+ let errorMsg;
38395
+ if (typeof body === 'object' && body !== null && 'error' in body) {
38396
+ errorMsg = body.error;
38397
+ }
38398
+ else {
38399
+ errorMsg = `Failed to call "${response.url}", returned ${response.status}: ` + (typeof body === 'string' ? body : JSON.stringify(body));
38400
+ }
38401
+ throw new Error(errorMsg);
38402
+ }
38403
+ if (typeof body.success === 'boolean' && !body.success) {
38404
+ const errString = `Failed to call "${response.url}", returned ${response.status}: ` + body.error;
38405
+ throw new Error(body.error || errString);
38406
+ }
38407
+ return (0, models_1.convertISODateStringsOnObj)(body);
38408
+ }
38409
+ constructor(basePathOrUsername, opts, password, basePath) {
38410
+ this._basePath = defaultBasePath;
38411
+ this.defaultHeaders = {};
38412
+ this._opts = {};
38413
+ this.authentications = {
38414
+ 'default': new models_1.VoidAuth(),
38415
+ 'ApiKeyAuthentication': new models_2.ApiKeyAuth('header', 'x-api-key'),
38416
+ 'OAuth2': new models_2.OAuth(),
38417
+ 'JWTAuthentication': new models_2.ApiKeyAuth('cookie', 'jwt'),
38418
+ 'JWTHttpHeaderAuthentication': new models_2.ApiKeyAuth('header', 'x-jwt-token'),
38419
+ };
38420
+ if (password) {
38421
+ if (basePath) {
38422
+ this.basePath = basePath;
38423
+ }
38424
+ }
38425
+ else {
38426
+ if (basePathOrUsername) {
38427
+ this.basePath = basePathOrUsername;
38428
+ }
38429
+ }
38430
+ this.opts = opts !== null && opts !== void 0 ? opts : {};
38431
+ }
38432
+ set basePath(basePath) {
38433
+ this._basePath = basePath;
38434
+ }
38435
+ get basePath() {
38436
+ return this._basePath;
38437
+ }
38438
+ set opts(opts) {
38439
+ this._opts = opts;
38440
+ }
38441
+ get opts() {
38442
+ return this._opts;
38443
+ }
38444
+ setDefaultAuthentication(auth) {
38445
+ this.authentications.default = auth;
38446
+ }
38447
+ setApiKey(key, value) {
38448
+ this.authentications[OrganizationPortalsApiApiKeys[key]].apiKey = value;
38449
+ }
38450
+ set accessToken(token) {
38451
+ this.authentications.OAuth2.accessToken = token;
38452
+ }
38453
+ /**
38454
+ * Creates a new upload portal for the organization.
38455
+ * @summary Create upload portal
38456
+ * @param organizationId Organization ID
38457
+ * @param createOrganizationPortalRequest
38458
+ */
38459
+ async createOrganizationPortal(organizationId, createOrganizationPortalRequest, options = { headers: {} }) {
38460
+ const localVarPath = this.basePath + '/api/organizations/{organizationId}/portals/create'
38461
+ .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
38462
+ let queryParameters = {};
38463
+ let localVarHeaderParams = {
38464
+ ...(typeof window === "undefined" ? { "User-Agent": "edgeimpulse-api nodejs" } : {}),
38465
+ 'Content-Type': 'application/json',
38466
+ ...this.defaultHeaders,
38467
+ };
38468
+ const produces = ['application/json'];
38469
+ // give precedence to 'application/json'
38470
+ if (produces.indexOf('application/json') >= 0) {
38471
+ localVarHeaderParams.Accept = 'application/json';
38472
+ }
38473
+ else {
38474
+ localVarHeaderParams.Accept = produces.join(',');
38475
+ }
38476
+ let localVarFormParams;
38477
+ // verify required parameter 'organizationId' is not null or undefined
38478
+ if (organizationId === null || organizationId === undefined) {
38479
+ throw new Error('Required parameter organizationId was null or undefined when calling createOrganizationPortal.');
38480
+ }
38481
+ // verify required parameter 'createOrganizationPortalRequest' is not null or undefined
38482
+ if (createOrganizationPortalRequest === null || createOrganizationPortalRequest === undefined) {
38483
+ throw new Error('Required parameter createOrganizationPortalRequest was null or undefined when calling createOrganizationPortal.');
38484
+ }
38485
+ localVarHeaderParams = {
38486
+ ...localVarHeaderParams,
38487
+ ...options.headers,
38488
+ ...this.opts.extraHeaders,
38489
+ };
38490
+ const queryString = Object.entries(queryParameters)
38491
+ .filter(([, value]) => value !== undefined)
38492
+ .map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
38493
+ .join('&');
38494
+ let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
38495
+ let localVarRequestOptions = {
38496
+ method: 'POST',
38497
+ headers: { ...localVarHeaderParams },
38498
+ };
38499
+ localVarRequestOptions.body = JSON.stringify(createOrganizationPortalRequest);
38500
+ let requestOptions = localVarRequestOptions;
38501
+ let url = localVarUrl;
38502
+ const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
38503
+ requestOptions = auth_ApiKeyAuthentication.requestOptions;
38504
+ url = auth_ApiKeyAuthentication.url;
38505
+ const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
38506
+ requestOptions = auth_JWTAuthentication.requestOptions;
38507
+ url = auth_JWTAuthentication.url;
38508
+ const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
38509
+ requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
38510
+ url = auth_JWTHttpHeaderAuthentication.url;
38511
+ const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
38512
+ requestOptions = auth_OAuth2.requestOptions;
38513
+ url = auth_OAuth2.url;
38514
+ const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
38515
+ requestOptions = authDefault.requestOptions;
38516
+ url = authDefault.url;
38517
+ (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
38518
+ const response = await fetch(url, requestOptions);
38519
+ const resp = this.handleResponse(response, 'CreateOrganizationPortalResponse');
38520
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
38521
+ const headerCb = options.responseHeadersCallback;
38522
+ // on next tick, so we have time to handle the response
38523
+ setTimeout(() => {
38524
+ headerCb(Object.fromEntries(response.headers.entries()));
38525
+ }, 0);
38526
+ }
38527
+ return resp;
38528
+ }
38529
+ /**
38530
+ * Deletes an upload portal for the organization.
38531
+ * @summary Delete upload portal
38532
+ * @param organizationId Organization ID
38533
+ * @param portalId Portal ID
38534
+ */
38535
+ async deleteOrganizationPortal(organizationId, portalId, options = { headers: {} }) {
38536
+ const localVarPath = this.basePath + '/api/organizations/{organizationId}/portals/{portalId}/delete'
38537
+ .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
38538
+ .replace('{' + 'portalId' + '}', encodeURIComponent(String(portalId)));
38539
+ let queryParameters = {};
38540
+ let localVarHeaderParams = {
38541
+ ...(typeof window === "undefined" ? { "User-Agent": "edgeimpulse-api nodejs" } : {}),
38542
+ 'Content-Type': 'application/json',
38543
+ ...this.defaultHeaders,
38544
+ };
38545
+ const produces = ['application/json'];
38546
+ // give precedence to 'application/json'
38547
+ if (produces.indexOf('application/json') >= 0) {
38548
+ localVarHeaderParams.Accept = 'application/json';
38549
+ }
38550
+ else {
38551
+ localVarHeaderParams.Accept = produces.join(',');
38552
+ }
38553
+ let localVarFormParams;
38554
+ // verify required parameter 'organizationId' is not null or undefined
38555
+ if (organizationId === null || organizationId === undefined) {
38556
+ throw new Error('Required parameter organizationId was null or undefined when calling deleteOrganizationPortal.');
38557
+ }
38558
+ // verify required parameter 'portalId' is not null or undefined
38559
+ if (portalId === null || portalId === undefined) {
38560
+ throw new Error('Required parameter portalId was null or undefined when calling deleteOrganizationPortal.');
38561
+ }
38562
+ localVarHeaderParams = {
38563
+ ...localVarHeaderParams,
38564
+ ...options.headers,
38565
+ ...this.opts.extraHeaders,
38566
+ };
38567
+ const queryString = Object.entries(queryParameters)
38568
+ .filter(([, value]) => value !== undefined)
38569
+ .map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
38570
+ .join('&');
38571
+ let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
38572
+ let localVarRequestOptions = {
38573
+ method: 'DELETE',
38574
+ headers: { ...localVarHeaderParams },
38575
+ };
38576
+ let requestOptions = localVarRequestOptions;
38577
+ let url = localVarUrl;
38578
+ const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
38579
+ requestOptions = auth_ApiKeyAuthentication.requestOptions;
38580
+ url = auth_ApiKeyAuthentication.url;
38581
+ const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
38582
+ requestOptions = auth_JWTAuthentication.requestOptions;
38583
+ url = auth_JWTAuthentication.url;
38584
+ const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
38585
+ requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
38586
+ url = auth_JWTHttpHeaderAuthentication.url;
38587
+ const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
38588
+ requestOptions = auth_OAuth2.requestOptions;
38589
+ url = auth_OAuth2.url;
38590
+ const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
38591
+ requestOptions = authDefault.requestOptions;
38592
+ url = authDefault.url;
38593
+ (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
38594
+ const response = await fetch(url, requestOptions);
38595
+ const resp = this.handleResponse(response, 'GenericApiResponse');
38596
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
38597
+ const headerCb = options.responseHeadersCallback;
38598
+ // on next tick, so we have time to handle the response
38599
+ setTimeout(() => {
38600
+ headerCb(Object.fromEntries(response.headers.entries()));
38601
+ }, 0);
38602
+ }
38603
+ return resp;
38604
+ }
38605
+ /**
38606
+ * Retrieve a single upload portals identified by ID.
38607
+ * @summary Retrieve upload portal information
38608
+ * @param organizationId Organization ID
38609
+ * @param portalId Portal ID
38610
+ */
38611
+ async getOrganizationPortal(organizationId, portalId, options = { headers: {} }) {
38612
+ const localVarPath = this.basePath + '/api/organizations/{organizationId}/portals/{portalId}'
38613
+ .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
38614
+ .replace('{' + 'portalId' + '}', encodeURIComponent(String(portalId)));
38615
+ let queryParameters = {};
38616
+ let localVarHeaderParams = {
38617
+ ...(typeof window === "undefined" ? { "User-Agent": "edgeimpulse-api nodejs" } : {}),
38618
+ 'Content-Type': 'application/json',
38619
+ ...this.defaultHeaders,
38620
+ };
38621
+ const produces = ['application/json'];
38622
+ // give precedence to 'application/json'
38623
+ if (produces.indexOf('application/json') >= 0) {
38624
+ localVarHeaderParams.Accept = 'application/json';
38625
+ }
38626
+ else {
38627
+ localVarHeaderParams.Accept = produces.join(',');
38628
+ }
38629
+ let localVarFormParams;
38630
+ // verify required parameter 'organizationId' is not null or undefined
38631
+ if (organizationId === null || organizationId === undefined) {
38632
+ throw new Error('Required parameter organizationId was null or undefined when calling getOrganizationPortal.');
38633
+ }
38634
+ // verify required parameter 'portalId' is not null or undefined
38635
+ if (portalId === null || portalId === undefined) {
38636
+ throw new Error('Required parameter portalId was null or undefined when calling getOrganizationPortal.');
38637
+ }
38638
+ localVarHeaderParams = {
38639
+ ...localVarHeaderParams,
38640
+ ...options.headers,
38641
+ ...this.opts.extraHeaders,
38642
+ };
38643
+ const queryString = Object.entries(queryParameters)
38644
+ .filter(([, value]) => value !== undefined)
38645
+ .map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
38646
+ .join('&');
38647
+ let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
38648
+ let localVarRequestOptions = {
38649
+ method: 'GET',
38650
+ headers: { ...localVarHeaderParams },
38651
+ };
38652
+ let requestOptions = localVarRequestOptions;
38653
+ let url = localVarUrl;
38654
+ const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
38655
+ requestOptions = auth_ApiKeyAuthentication.requestOptions;
38656
+ url = auth_ApiKeyAuthentication.url;
38657
+ const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
38658
+ requestOptions = auth_JWTAuthentication.requestOptions;
38659
+ url = auth_JWTAuthentication.url;
38660
+ const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
38661
+ requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
38662
+ url = auth_JWTHttpHeaderAuthentication.url;
38663
+ const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
38664
+ requestOptions = auth_OAuth2.requestOptions;
38665
+ url = auth_OAuth2.url;
38666
+ const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
38667
+ requestOptions = authDefault.requestOptions;
38668
+ url = authDefault.url;
38669
+ (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
38670
+ const response = await fetch(url, requestOptions);
38671
+ const resp = this.handleResponse(response, 'GetOrganizationPortalResponse');
38672
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
38673
+ const headerCb = options.responseHeadersCallback;
38674
+ // on next tick, so we have time to handle the response
38675
+ setTimeout(() => {
38676
+ headerCb(Object.fromEntries(response.headers.entries()));
38677
+ }, 0);
38678
+ }
38679
+ return resp;
38680
+ }
38681
+ /**
38682
+ * Retrieve all configured upload portals.
38683
+ * @summary List upload portals
38684
+ * @param organizationId Organization ID
38685
+ */
38686
+ async listOrganizationPortals(organizationId, options = { headers: {} }) {
38687
+ const localVarPath = this.basePath + '/api/organizations/{organizationId}/portals'
38688
+ .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
38689
+ let queryParameters = {};
38690
+ let localVarHeaderParams = {
38691
+ ...(typeof window === "undefined" ? { "User-Agent": "edgeimpulse-api nodejs" } : {}),
38692
+ 'Content-Type': 'application/json',
38693
+ ...this.defaultHeaders,
38694
+ };
38695
+ const produces = ['application/json'];
38696
+ // give precedence to 'application/json'
38697
+ if (produces.indexOf('application/json') >= 0) {
38698
+ localVarHeaderParams.Accept = 'application/json';
38699
+ }
38700
+ else {
38701
+ localVarHeaderParams.Accept = produces.join(',');
38702
+ }
38703
+ let localVarFormParams;
38704
+ // verify required parameter 'organizationId' is not null or undefined
38705
+ if (organizationId === null || organizationId === undefined) {
38706
+ throw new Error('Required parameter organizationId was null or undefined when calling listOrganizationPortals.');
38707
+ }
38708
+ localVarHeaderParams = {
38709
+ ...localVarHeaderParams,
38710
+ ...options.headers,
38711
+ ...this.opts.extraHeaders,
38712
+ };
38713
+ const queryString = Object.entries(queryParameters)
38714
+ .filter(([, value]) => value !== undefined)
38715
+ .map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
38716
+ .join('&');
38717
+ let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
38718
+ let localVarRequestOptions = {
38719
+ method: 'GET',
38720
+ headers: { ...localVarHeaderParams },
38721
+ };
38722
+ let requestOptions = localVarRequestOptions;
38723
+ let url = localVarUrl;
38724
+ const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
38725
+ requestOptions = auth_ApiKeyAuthentication.requestOptions;
38726
+ url = auth_ApiKeyAuthentication.url;
38727
+ const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
38728
+ requestOptions = auth_JWTAuthentication.requestOptions;
38729
+ url = auth_JWTAuthentication.url;
38730
+ const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
38731
+ requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
38732
+ url = auth_JWTHttpHeaderAuthentication.url;
38733
+ const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
38734
+ requestOptions = auth_OAuth2.requestOptions;
38735
+ url = auth_OAuth2.url;
38736
+ const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
38737
+ requestOptions = authDefault.requestOptions;
38738
+ url = authDefault.url;
38739
+ (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
38740
+ const response = await fetch(url, requestOptions);
38741
+ const resp = this.handleResponse(response, 'ListOrganizationPortalsResponse');
38742
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
38743
+ const headerCb = options.responseHeadersCallback;
38744
+ // on next tick, so we have time to handle the response
38745
+ setTimeout(() => {
38746
+ headerCb(Object.fromEntries(response.headers.entries()));
38747
+ }, 0);
38748
+ }
38749
+ return resp;
38750
+ }
38751
+ /**
38752
+ * Rotates the token for an upload portal.
38753
+ * @summary Rotate upload portal token
38754
+ * @param organizationId Organization ID
38755
+ * @param portalId Portal ID
38756
+ */
38757
+ async rotateOrganizationPortalToken(organizationId, portalId, options = { headers: {} }) {
38758
+ const localVarPath = this.basePath + '/api/organizations/{organizationId}/portals/{portalId}/rotate-token'
38759
+ .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
38760
+ .replace('{' + 'portalId' + '}', encodeURIComponent(String(portalId)));
38761
+ let queryParameters = {};
38762
+ let localVarHeaderParams = {
38763
+ ...(typeof window === "undefined" ? { "User-Agent": "edgeimpulse-api nodejs" } : {}),
38764
+ 'Content-Type': 'application/json',
38765
+ ...this.defaultHeaders,
38766
+ };
38767
+ const produces = ['application/json'];
38768
+ // give precedence to 'application/json'
38769
+ if (produces.indexOf('application/json') >= 0) {
38770
+ localVarHeaderParams.Accept = 'application/json';
38771
+ }
38772
+ else {
38773
+ localVarHeaderParams.Accept = produces.join(',');
38774
+ }
38775
+ let localVarFormParams;
38776
+ // verify required parameter 'organizationId' is not null or undefined
38777
+ if (organizationId === null || organizationId === undefined) {
38778
+ throw new Error('Required parameter organizationId was null or undefined when calling rotateOrganizationPortalToken.');
38779
+ }
38780
+ // verify required parameter 'portalId' is not null or undefined
38781
+ if (portalId === null || portalId === undefined) {
38782
+ throw new Error('Required parameter portalId was null or undefined when calling rotateOrganizationPortalToken.');
38783
+ }
38784
+ localVarHeaderParams = {
38785
+ ...localVarHeaderParams,
38786
+ ...options.headers,
38787
+ ...this.opts.extraHeaders,
38788
+ };
38789
+ const queryString = Object.entries(queryParameters)
38790
+ .filter(([, value]) => value !== undefined)
38791
+ .map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
38792
+ .join('&');
38793
+ let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
38794
+ let localVarRequestOptions = {
38795
+ method: 'DELETE',
38065
38796
  headers: { ...localVarHeaderParams },
38066
38797
  };
38067
38798
  let requestOptions = localVarRequestOptions;
@@ -65234,6 +65965,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
65234
65965
  });
65235
65966
 
65236
65967
 
65968
+ define("library/sdk/model/createOAuthClientRequest", ["require", "exports"], function (require, exports) {
65969
+ "use strict";
65970
+ // Generated by studio/openapi/generate-models/convert.ts
65971
+ Object.defineProperty(exports, "__esModule", { value: true });
65972
+ });
65973
+
65974
+
65975
+ define("library/sdk/model/createOAuthClientResponse", ["require", "exports"], function (require, exports) {
65976
+ "use strict";
65977
+ // Generated by studio/openapi/generate-models/convert.ts
65978
+ Object.defineProperty(exports, "__esModule", { value: true });
65979
+ });
65980
+
65981
+
65237
65982
  define("library/sdk/model/createOrganizationBucketRequest", ["require", "exports"], function (require, exports) {
65238
65983
  "use strict";
65239
65984
  // Generated by studio/openapi/generate-models/convert.ts
@@ -66276,7 +67021,7 @@ define("library/sdk/model/feature", ["require", "exports"], function (require, e
66276
67021
  // Generated by studio/openapi/generate-models/convert.ts
66277
67022
  Object.defineProperty(exports, "__esModule", { value: true });
66278
67023
  exports.FeatureValues = void 0;
66279
- exports.FeatureValues = ['signup-thank-you-page', 'stripe-live-mode', 'azure-storage', 'monthly-compute-limit-enforcement', 'pay-as-you-go', 'user-screening-check', 'oauth2', 'external-apps-redirect-flow', 'dataset-versioning'];
67024
+ exports.FeatureValues = ['signup-thank-you-page', 'stripe-live-mode', 'azure-storage', 'monthly-compute-limit-enforcement', 'pay-as-you-go', 'user-screening-check', 'oauth2', 'external-apps-redirect-flow', 'dataset-versioning', 'oauth2-self-serve'];
66280
67025
  });
66281
67026
 
66282
67027
 
@@ -66725,6 +67470,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
66725
67470
  });
66726
67471
 
66727
67472
 
67473
+ define("library/sdk/model/getOrganizationOAuthClientResponse", ["require", "exports"], function (require, exports) {
67474
+ "use strict";
67475
+ // Generated by studio/openapi/generate-models/convert.ts
67476
+ Object.defineProperty(exports, "__esModule", { value: true });
67477
+ });
67478
+
67479
+
66728
67480
  define("library/sdk/model/getOrganizationPipelinesResponse", ["require", "exports"], function (require, exports) {
66729
67481
  "use strict";
66730
67482
  // Generated by studio/openapi/generate-models/convert.ts
@@ -67573,6 +68325,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
67573
68325
  });
67574
68326
 
67575
68327
 
68328
+ define("library/sdk/model/listOrganizationOAuthClientsResponse", ["require", "exports"], function (require, exports) {
68329
+ "use strict";
68330
+ // Generated by studio/openapi/generate-models/convert.ts
68331
+ Object.defineProperty(exports, "__esModule", { value: true });
68332
+ });
68333
+
68334
+
67576
68335
  define("library/sdk/model/listOrganizationPipelinesResponse", ["require", "exports"], function (require, exports) {
67577
68336
  "use strict";
67578
68337
  // Generated by studio/openapi/generate-models/convert.ts
@@ -68021,6 +68780,8 @@ __exportStar(require("./createImpulseResponse"), exports);
68021
68780
  __exportStar(require("./createMultiProjectDeploymentRequest"), exports);
68022
68781
  __exportStar(require("./createNewEmptyImpulseRequest"), exports);
68023
68782
  __exportStar(require("./createNewEmptyImpulseResponse"), exports);
68783
+ __exportStar(require("./createOAuthClientRequest"), exports);
68784
+ __exportStar(require("./createOAuthClientResponse"), exports);
68024
68785
  __exportStar(require("./createOrganizationBucketRequest"), exports);
68025
68786
  __exportStar(require("./createOrganizationBucketResponse"), exports);
68026
68787
  __exportStar(require("./createOrganizationPortalRequest"), exports);
@@ -68221,6 +68982,7 @@ __exportStar(require("./getOrganizationDatasetResponse"), exports);
68221
68982
  __exportStar(require("./getOrganizationDeployBlockResponse"), exports);
68222
68983
  __exportStar(require("./getOrganizationDspBlockResponse"), exports);
68223
68984
  __exportStar(require("./getOrganizationExtensionBlockResponse"), exports);
68985
+ __exportStar(require("./getOrganizationOAuthClientResponse"), exports);
68224
68986
  __exportStar(require("./getOrganizationPipelinesResponse"), exports);
68225
68987
  __exportStar(require("./getOrganizationPortalResponse"), exports);
68226
68988
  __exportStar(require("./getOrganizationTransferLearningBlockResponse"), exports);
@@ -68335,6 +69097,7 @@ __exportStar(require("./listOrganizationDeployBlocksResponse"), exports);
68335
69097
  __exportStar(require("./listOrganizationDspBlocksResponse"), exports);
68336
69098
  __exportStar(require("./listOrganizationExtensionBlocksResponse"), exports);
68337
69099
  __exportStar(require("./listOrganizationFilesResponse"), exports);
69100
+ __exportStar(require("./listOrganizationOAuthClientsResponse"), exports);
68338
69101
  __exportStar(require("./listOrganizationPipelinesResponse"), exports);
68339
69102
  __exportStar(require("./listOrganizationPortalsResponse"), exports);
68340
69103
  __exportStar(require("./listOrganizationSecretsResponse"), exports);
@@ -68543,6 +69306,7 @@ __exportStar(require("./resetPasswordRequest"), exports);
68543
69306
  __exportStar(require("./resourceRange"), exports);
68544
69307
  __exportStar(require("./restoreProjectFromPublicRequest"), exports);
68545
69308
  __exportStar(require("./restoreProjectRequest"), exports);
69309
+ __exportStar(require("./rotateOAuthClientSecretResponse"), exports);
68546
69310
  __exportStar(require("./rotateWebhookDestinationSecretResponse"), exports);
68547
69311
  __exportStar(require("./runOrganizationPipelineResponse"), exports);
68548
69312
  __exportStar(require("./sample"), exports);
@@ -68558,6 +69322,7 @@ __exportStar(require("./savePretrainedModelRequest"), exports);
68558
69322
  __exportStar(require("./scoreTrialResponse"), exports);
68559
69323
  __exportStar(require("./segmentSampleRequest"), exports);
68560
69324
  __exportStar(require("./segmentSampleRequestSegments"), exports);
69325
+ __exportStar(require("./selfServeOAuthClient"), exports);
68561
69326
  __exportStar(require("./sendUserFeedbackRequest"), exports);
68562
69327
  __exportStar(require("./sensor"), exports);
68563
69328
  __exportStar(require("./setAIActionsOrderRequest"), exports);
@@ -68636,6 +69401,7 @@ __exportStar(require("./updateDatasetVersionRequest"), exports);
68636
69401
  __exportStar(require("./updateEventSubscriptionRequest"), exports);
68637
69402
  __exportStar(require("./updateImpulseRequest"), exports);
68638
69403
  __exportStar(require("./updateJobRequest"), exports);
69404
+ __exportStar(require("./updateOAuthClientRequest"), exports);
68639
69405
  __exportStar(require("./updateOrganizationAddCollaboratorRequest"), exports);
68640
69406
  __exportStar(require("./updateOrganizationBucketRequest"), exports);
68641
69407
  __exportStar(require("./updateOrganizationCreateEmptyProjectRequest"), exports);
@@ -70218,6 +70984,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
70218
70984
  });
70219
70985
 
70220
70986
 
70987
+ define("library/sdk/model/rotateOAuthClientSecretResponse", ["require", "exports"], function (require, exports) {
70988
+ "use strict";
70989
+ // Generated by studio/openapi/generate-models/convert.ts
70990
+ Object.defineProperty(exports, "__esModule", { value: true });
70991
+ });
70992
+
70993
+
70221
70994
  define("library/sdk/model/rotateWebhookDestinationSecretResponse", ["require", "exports"], function (require, exports) {
70222
70995
  "use strict";
70223
70996
  // Generated by studio/openapi/generate-models/convert.ts
@@ -70330,6 +71103,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
70330
71103
  });
70331
71104
 
70332
71105
 
71106
+ define("library/sdk/model/selfServeOAuthClient", ["require", "exports"], function (require, exports) {
71107
+ "use strict";
71108
+ // Generated by studio/openapi/generate-models/convert.ts
71109
+ Object.defineProperty(exports, "__esModule", { value: true });
71110
+ });
71111
+
71112
+
70333
71113
  define("library/sdk/model/sendUserFeedbackRequest", ["require", "exports"], function (require, exports) {
70334
71114
  "use strict";
70335
71115
  // Generated by studio/openapi/generate-models/convert.ts
@@ -70906,6 +71686,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
70906
71686
  });
70907
71687
 
70908
71688
 
71689
+ define("library/sdk/model/updateOAuthClientRequest", ["require", "exports"], function (require, exports) {
71690
+ "use strict";
71691
+ // Generated by studio/openapi/generate-models/convert.ts
71692
+ Object.defineProperty(exports, "__esModule", { value: true });
71693
+ });
71694
+
71695
+
70909
71696
  define("library/sdk/model/updateOrganizationAddCollaboratorRequest", ["require", "exports"], function (require, exports) {
70910
71697
  "use strict";
70911
71698
  // Generated by studio/openapi/generate-models/convert.ts