edge-impulse-api 1.96.0 → 1.96.1

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.
@@ -13,7 +13,7 @@ import type { Response as UndiciResponse } from 'undici-types';
13
13
  import { Authentication } from '../model/models';
14
14
  import { ApiKeyAuth, OAuth } from '../model/models';
15
15
  import { RequestFile } from './apis';
16
- import type { AddOrganizationDspBlockRequest, AddOrganizationSecretRequest, AddOrganizationTransferLearningBlockRequest, AddOrganizationTransformationBlockRequest, EntityCreatedResponse, ExportBlockResponse, ExtensionAuthMethod, ExtensionNavbarLocation, ExtensionVisibility, GenericApiResponse, GetOrganizationDeployBlockResponse, GetOrganizationDspBlockResponse, GetOrganizationExtensionBlockResponse, GetOrganizationTransferLearningBlockResponse, GetOrganizationTransformationBlockResponse, GetPublicOrganizationTransformationBlockResponse, ListOrganizationDeployBlocksResponse, ListOrganizationDspBlocksResponse, ListOrganizationExtensionBlocksResponse, ListOrganizationSecretsResponse, ListOrganizationTransferLearningBlocksResponse, ListOrganizationTransformationBlocksResponse, ListPublicOrganizationTransformationBlocksResponse, ProjectApiKeyRole, PublicProjectTierAvailability, UpdateOrganizationDspBlockRequest, UpdateOrganizationTransferLearningBlockRequest, UpdateOrganizationTransformationBlockRequest } from '../model/models';
16
+ import type { AddOrganizationDspBlockRequest, AddOrganizationSecretRequest, AddOrganizationTransferLearningBlockRequest, AddOrganizationTransformationBlockRequest, EntityCreatedResponse, ExportBlockResponse, ExtensionAuthMethod, ExtensionNavbarLocation, ExtensionVisibility, GenericApiResponse, GetOrganizationDeployBlockResponse, GetOrganizationDspBlockResponse, GetOrganizationExtensionBlockResponse, GetOrganizationTransferLearningBlockResponse, GetOrganizationTransformationBlockResponse, GetPublicOrganizationTransformationBlockResponse, LearnBlockType, ListOrganizationDeployBlocksResponse, ListOrganizationDspBlocksResponse, ListOrganizationExtensionBlocksResponse, ListOrganizationSecretsResponse, ListOrganizationTransferLearningBlocksResponse, ListOrganizationTransformationBlocksResponse, ListPublicOrganizationTransformationBlocksResponse, ProjectApiKeyRole, PublicProjectTierAvailability, UpdateOrganizationDspBlockRequest, UpdateOrganizationTransferLearningBlockRequest, UpdateOrganizationTransformationBlockRequest } from '../model/models';
17
17
  export declare enum OrganizationBlocksApiApiKeys {
18
18
  ApiKeyAuthentication = 0,
19
19
  JWTAuthentication = 1,
@@ -55,6 +55,7 @@ export type addOrganizationExtensionBlockFormParams = {
55
55
  authMethod: ExtensionAuthMethod;
56
56
  requireAdminInstall?: boolean;
57
57
  hideSideMenu?: boolean;
58
+ showOnLearnBlockTypes?: Array<LearnBlockType>;
58
59
  };
59
60
  export type updateOrganizationDeployBlockFormParams = {
60
61
  name?: string;
@@ -91,6 +92,7 @@ export type updateOrganizationExtensionBlockFormParams = {
91
92
  blockNoLongerAvailableReason?: string;
92
93
  authMethod?: ExtensionAuthMethod;
93
94
  requireAdminInstall?: boolean;
95
+ showOnLearnBlockTypes?: Array<LearnBlockType>;
94
96
  };
95
97
  export type OrganizationBlocksApiOpts = {
96
98
  extraHeaders?: Record<string, string>;
@@ -179,6 +181,7 @@ export declare class OrganizationBlocksApi {
179
181
  * @param blockNoLongerAvailableReason Reason this extension is no longer available.
180
182
  * @param requireAdminInstall Whether only organization administrators may install this extension on projects.
181
183
  * @param hideSideMenu Whether to hide the Studio side menu while this extension is open.
184
+ * @param showOnLearnBlockTypes Only applies to navbarLocation \&quot;learn_block\&quot; or \&quot;learn_block_top_navbar\&quot;. The learn block types that this is extension is shown on. If not set (or set to an empty array), this will show on all learn blocks.
182
185
  */
183
186
  addOrganizationExtensionBlock(organizationId: number, params: addOrganizationExtensionBlockFormParams, options?: {
184
187
  headers: {
@@ -639,6 +642,7 @@ export declare class OrganizationBlocksApi {
639
642
  * @param blockNoLongerAvailableReason Reason this extension is no longer available.
640
643
  * @param authMethod
641
644
  * @param requireAdminInstall Whether only organization administrators may install this extension on projects.
645
+ * @param showOnLearnBlockTypes Only applies to navbarLocation \&quot;learn_block\&quot; or \&quot;learn_block_top_navbar\&quot;. The learn block types that this is extension is shown on. If set to an empty array, this will show on all learn blocks.
642
646
  */
643
647
  updateOrganizationExtensionBlock(organizationId: number, extensionId: number, params: updateOrganizationExtensionBlockFormParams, options?: {
644
648
  headers: {
@@ -417,6 +417,7 @@ class OrganizationBlocksApi {
417
417
  * @param blockNoLongerAvailableReason Reason this extension is no longer available.
418
418
  * @param requireAdminInstall Whether only organization administrators may install this extension on projects.
419
419
  * @param hideSideMenu Whether to hide the Studio side menu while this extension is open.
420
+ * @param showOnLearnBlockTypes Only applies to navbarLocation \&quot;learn_block\&quot; or \&quot;learn_block_top_navbar\&quot;. The learn block types that this is extension is shown on. If not set (or set to an empty array), this will show on all learn blocks.
420
421
  */
421
422
  async addOrganizationExtensionBlock(organizationId, params, options = { headers: {} }) {
422
423
  const localVarPath = this.basePath + '/api/organizations/{organizationId}/extension'
@@ -554,6 +555,16 @@ class OrganizationBlocksApi {
554
555
  localVarFormParams = (0, models_1.appendFormField)(localVarFormParams, 'hideSideMenu', (0, models_1.serializeFormDataValue)(params.hideSideMenu, 'boolean'));
555
556
  }
556
557
  }
558
+ if (params.showOnLearnBlockTypes !== undefined) {
559
+ if (params.showOnLearnBlockTypes) {
560
+ const isParametersField = "showOnLearnBlockTypes" === "parameters";
561
+ const serializableParams = isParametersField && params && ("parameters" in params);
562
+ const showOnLearnBlockTypesSerialized = serializableParams
563
+ ? JSON.stringify(params.parameters)
564
+ : (0, models_1.serializeFormDataValue)(params.showOnLearnBlockTypes, 'Array<LearnBlockType>');
565
+ localVarFormParams = (0, models_1.appendFormField)(localVarFormParams, 'showOnLearnBlockTypes', showOnLearnBlockTypesSerialized);
566
+ }
567
+ }
557
568
  const queryString = Object.entries(queryParameters)
558
569
  .filter(([, value]) => value !== undefined)
559
570
  .map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
@@ -2968,6 +2979,7 @@ class OrganizationBlocksApi {
2968
2979
  * @param blockNoLongerAvailableReason Reason this extension is no longer available.
2969
2980
  * @param authMethod
2970
2981
  * @param requireAdminInstall Whether only organization administrators may install this extension on projects.
2982
+ * @param showOnLearnBlockTypes Only applies to navbarLocation \&quot;learn_block\&quot; or \&quot;learn_block_top_navbar\&quot;. The learn block types that this is extension is shown on. If set to an empty array, this will show on all learn blocks.
2971
2983
  */
2972
2984
  async updateOrganizationExtensionBlock(organizationId, extensionId, params, options = { headers: {} }) {
2973
2985
  const localVarPath = this.basePath + '/api/organizations/{organizationId}/extension/{extensionId}'
@@ -3081,6 +3093,16 @@ class OrganizationBlocksApi {
3081
3093
  localVarFormParams = (0, models_1.appendFormField)(localVarFormParams, 'requireAdminInstall', (0, models_1.serializeFormDataValue)(params.requireAdminInstall, 'boolean'));
3082
3094
  }
3083
3095
  }
3096
+ if (params.showOnLearnBlockTypes !== undefined) {
3097
+ if (params.showOnLearnBlockTypes) {
3098
+ const isParametersField = "showOnLearnBlockTypes" === "parameters";
3099
+ const serializableParams = isParametersField && params && ("parameters" in params);
3100
+ const showOnLearnBlockTypesSerialized = serializableParams
3101
+ ? JSON.stringify(params.parameters)
3102
+ : (0, models_1.serializeFormDataValue)(params.showOnLearnBlockTypes, 'Array<LearnBlockType>');
3103
+ localVarFormParams = (0, models_1.appendFormField)(localVarFormParams, 'showOnLearnBlockTypes', showOnLearnBlockTypesSerialized);
3104
+ }
3105
+ }
3084
3106
  const queryString = Object.entries(queryParameters)
3085
3107
  .filter(([, value]) => value !== undefined)
3086
3108
  .map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)