From 4c5563231389db8431d811444bc4881e14561639 Mon Sep 17 00:00:00 2001 From: Mateusz Kwasniewski Date: Fri, 2 Aug 2024 14:55:46 +0200 Subject: [PATCH] chore: generate orval types (#7742) --- .../Playground/AdvancedPlayground.tsx | 2 - .../StrategyExecutionParameters.tsx | 12 +++-- .../actions/usePlayground/usePlayground.ts | 3 +- .../actionEventSchemaExecutionParams.ts | 2 +- .../models/actionSchemaExecutionParams.ts | 2 +- ...tionSetEventSchemaActionSetMatchPayload.ts | 4 +- .../models/actionsSchemaMatchPayload.ts | 2 +- .../changeRequestChangeSchemaPayloadOneOf.ts | 2 +- ...changeRequestDefaultChangeSchemaPayload.ts | 4 +- .../changeRequestPlaygroundRequestSchema.ts | 13 +++++ ...eRequestSegmentChangeSchemaPayloadOneOf.ts | 2 +- .../openapi/models/clientApplicationSchema.ts | 8 +++ .../src/openapi/models/clientMetricsSchema.ts | 15 +++++- .../createActionSchemaExecutionParams.ts | 2 +- .../models/createActionsSchemaMatchPayload.ts | 2 +- .../src/openapi/models/createFeatureSchema.ts | 3 ++ .../src/openapi/models/eventSchemaData.ts | 2 +- .../src/openapi/models/eventSchemaPreData.ts | 2 +- .../models/featureSchemaStrategiesItem.ts | 2 +- ...atureSearchResponseSchemaStrategiesItem.ts | 4 +- .../models/getChangeRequestPlayground400.ts | 14 ++++++ .../models/getChangeRequestPlayground401.ts | 14 ++++++ .../models/getChangeRequestPlayground404.ts | 14 ++++++ .../models/getInstanceInsightsParams.ts | 16 ++++++ .../openapi/models/getIntegrationEvents401.ts | 14 ++++++ .../openapi/models/getIntegrationEvents403.ts | 14 ++++++ .../openapi/models/getIntegrationEvents404.ts | 14 ++++++ .../models/getIntegrationEventsParams.ts | 16 ++++++ frontend/src/openapi/models/index.ts | 26 ++++++++-- .../openapi/models/integrationEventSchema.ts | 31 ++++++++++++ .../models/integrationEventSchemaDetails.ts | 10 ++++ .../models/integrationEventSchemaState.ts | 18 +++++++ .../openapi/models/integrationEventsSchema.ts | 14 ++++++ .../src/openapi/models/oidcSettingsSchema.ts | 33 ++---------- .../openapi/models/oidcSettingsSchemaOneOf.ts | 40 +++++++++++++++ ...oidcSettingsSchemaOneOfDefaultRootRole.ts} | 6 +-- .../models/oidcSettingsSchemaOneOfFour.ts | 40 +++++++++++++++ ...cSettingsSchemaOneOfFourDefaultRootRole.ts | 18 +++++++ ...sSchemaOneOfFourIdTokenSigningAlgorithm.ts | 18 +++++++ ...ingsSchemaOneOfIdTokenSigningAlgorithm.ts} | 6 +-- .../openapi/models/resourceLimitsSchema.ts | 50 +++++++++++-------- .../src/openapi/models/samlSettingsSchema.ts | 28 ++--------- .../openapi/models/samlSettingsSchemaOneOf.ts | 33 ++++++++++++ ...samlSettingsSchemaOneOfDefaultRootRole.ts} | 6 +-- .../models/samlSettingsSchemaOneOfThree.ts | 33 ++++++++++++ ...SettingsSchemaOneOfThreeDefaultRootRole.ts | 18 +++++++ .../src/openapi/models/sdkContextSchema.ts | 2 +- .../openapi/models/sdkFlatContextSchema.ts | 2 +- .../signalEndpointSignalSchemaPayload.ts | 2 +- .../src/openapi/models/signalSchemaPayload.ts | 2 +- frontend/src/openapi/models/uiConfigSchema.ts | 4 ++ .../openapi/models/uiConfigSchemaLinksItem.ts | 2 +- .../models/updateServiceAccountSchema.ts | 2 +- 53 files changed, 536 insertions(+), 112 deletions(-) create mode 100644 frontend/src/openapi/models/changeRequestPlaygroundRequestSchema.ts create mode 100644 frontend/src/openapi/models/getChangeRequestPlayground400.ts create mode 100644 frontend/src/openapi/models/getChangeRequestPlayground401.ts create mode 100644 frontend/src/openapi/models/getChangeRequestPlayground404.ts create mode 100644 frontend/src/openapi/models/getInstanceInsightsParams.ts create mode 100644 frontend/src/openapi/models/getIntegrationEvents401.ts create mode 100644 frontend/src/openapi/models/getIntegrationEvents403.ts create mode 100644 frontend/src/openapi/models/getIntegrationEvents404.ts create mode 100644 frontend/src/openapi/models/getIntegrationEventsParams.ts create mode 100644 frontend/src/openapi/models/integrationEventSchema.ts create mode 100644 frontend/src/openapi/models/integrationEventSchemaDetails.ts create mode 100644 frontend/src/openapi/models/integrationEventSchemaState.ts create mode 100644 frontend/src/openapi/models/integrationEventsSchema.ts create mode 100644 frontend/src/openapi/models/oidcSettingsSchemaOneOf.ts rename frontend/src/openapi/models/{oidcSettingsSchemaDefaultRootRole.ts => oidcSettingsSchemaOneOfDefaultRootRole.ts} (64%) create mode 100644 frontend/src/openapi/models/oidcSettingsSchemaOneOfFour.ts create mode 100644 frontend/src/openapi/models/oidcSettingsSchemaOneOfFourDefaultRootRole.ts create mode 100644 frontend/src/openapi/models/oidcSettingsSchemaOneOfFourIdTokenSigningAlgorithm.ts rename frontend/src/openapi/models/{oidcSettingsSchemaIdTokenSigningAlgorithm.ts => oidcSettingsSchemaOneOfIdTokenSigningAlgorithm.ts} (60%) create mode 100644 frontend/src/openapi/models/samlSettingsSchemaOneOf.ts rename frontend/src/openapi/models/{samlSettingsSchemaDefaultRootRole.ts => samlSettingsSchemaOneOfDefaultRootRole.ts} (57%) create mode 100644 frontend/src/openapi/models/samlSettingsSchemaOneOfThree.ts create mode 100644 frontend/src/openapi/models/samlSettingsSchemaOneOfThreeDefaultRootRole.ts diff --git a/frontend/src/component/playground/Playground/AdvancedPlayground.tsx b/frontend/src/component/playground/Playground/AdvancedPlayground.tsx index 573a02aa49..5181a02a06 100644 --- a/frontend/src/component/playground/Playground/AdvancedPlayground.tsx +++ b/frontend/src/component/playground/Playground/AdvancedPlayground.tsx @@ -216,8 +216,6 @@ export const AdvancedPlayground: FC<{ const response = changeRequest ? await evaluateChangeRequestPlayground(changeRequest, { context: parsedContext, - projects: [], - environments: [], }) : await evaluateAdvancedPlayground({ environments: resolveEnvironments(environments), diff --git a/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/FeatureStrategyList/StrategyList/StrategyItem/StrategyExecution/StrategyExecutionParameters/StrategyExecutionParameters.tsx b/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/FeatureStrategyList/StrategyList/StrategyItem/StrategyExecution/StrategyExecutionParameters/StrategyExecutionParameters.tsx index 964e2ec819..79a29aa127 100644 --- a/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/FeatureStrategyList/StrategyList/StrategyItem/StrategyExecution/StrategyExecutionParameters/StrategyExecutionParameters.tsx +++ b/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/FeatureStrategyList/StrategyList/StrategyItem/StrategyExecution/StrategyExecutionParameters/StrategyExecutionParameters.tsx @@ -112,7 +112,9 @@ export const PlaygroundResultStrategyExecutionParameters = ({ text='user' input={ input?.context?.[getMappedParam(key)] - ? input?.context?.[getMappedParam(key)] + ? (input?.context?.[ + getMappedParam(key) + ] as string) : 'no value' } showReason={ @@ -120,7 +122,7 @@ export const PlaygroundResultStrategyExecutionParameters = ({ ? !users.includes( input?.context?.[ getMappedParam(key) - ], + ] as string, ) : undefined } @@ -151,7 +153,9 @@ export const PlaygroundResultStrategyExecutionParameters = ({ disabled={disabled} input={ input?.context?.[getMappedParam(key)] - ? input?.context?.[getMappedParam(key)] + ? (input?.context?.[ + getMappedParam(key) + ] as string) : 'no value' } showReason={ @@ -159,7 +163,7 @@ export const PlaygroundResultStrategyExecutionParameters = ({ ? !IPs.includes( input?.context?.[ getMappedParam(key) - ], + ] as string, ) : undefined } diff --git a/frontend/src/hooks/api/actions/usePlayground/usePlayground.ts b/frontend/src/hooks/api/actions/usePlayground/usePlayground.ts index fa0904d359..ff7569134d 100644 --- a/frontend/src/hooks/api/actions/usePlayground/usePlayground.ts +++ b/frontend/src/hooks/api/actions/usePlayground/usePlayground.ts @@ -2,6 +2,7 @@ import useAPI from '../useApi/useApi'; import type { AdvancedPlaygroundRequestSchema, AdvancedPlaygroundResponseSchema, + ChangeRequestPlaygroundRequestSchema, } from 'openapi'; export const usePlaygroundApi = () => { @@ -26,7 +27,7 @@ export const usePlaygroundApi = () => { const evaluateChangeRequestPlayground = async ( changeRequestId: string, - payload: AdvancedPlaygroundRequestSchema, // FIXME: type + payload: ChangeRequestPlaygroundRequestSchema, ): Promise => { const path = `${URI}/change-request/${changeRequestId}`; const req = createRequest(path, { diff --git a/frontend/src/openapi/models/actionEventSchemaExecutionParams.ts b/frontend/src/openapi/models/actionEventSchemaExecutionParams.ts index a73de2da79..4665d1c517 100644 --- a/frontend/src/openapi/models/actionEventSchemaExecutionParams.ts +++ b/frontend/src/openapi/models/actionEventSchemaExecutionParams.ts @@ -7,4 +7,4 @@ /** * A map of parameters to pass to the action */ -export type ActionEventSchemaExecutionParams = { [key: string]: any }; +export type ActionEventSchemaExecutionParams = { [key: string]: unknown }; diff --git a/frontend/src/openapi/models/actionSchemaExecutionParams.ts b/frontend/src/openapi/models/actionSchemaExecutionParams.ts index 1292b97481..0480440e7e 100644 --- a/frontend/src/openapi/models/actionSchemaExecutionParams.ts +++ b/frontend/src/openapi/models/actionSchemaExecutionParams.ts @@ -7,4 +7,4 @@ /** * A map of parameters to pass to the action */ -export type ActionSchemaExecutionParams = { [key: string]: any }; +export type ActionSchemaExecutionParams = { [key: string]: unknown }; diff --git a/frontend/src/openapi/models/actionSetEventSchemaActionSetMatchPayload.ts b/frontend/src/openapi/models/actionSetEventSchemaActionSetMatchPayload.ts index cf58786304..4b9a3226ce 100644 --- a/frontend/src/openapi/models/actionSetEventSchemaActionSetMatchPayload.ts +++ b/frontend/src/openapi/models/actionSetEventSchemaActionSetMatchPayload.ts @@ -7,4 +7,6 @@ /** * Match the payload of the signal */ -export type ActionSetEventSchemaActionSetMatchPayload = { [key: string]: any }; +export type ActionSetEventSchemaActionSetMatchPayload = { + [key: string]: unknown; +}; diff --git a/frontend/src/openapi/models/actionsSchemaMatchPayload.ts b/frontend/src/openapi/models/actionsSchemaMatchPayload.ts index 277d43ecf3..63a25ec1b6 100644 --- a/frontend/src/openapi/models/actionsSchemaMatchPayload.ts +++ b/frontend/src/openapi/models/actionsSchemaMatchPayload.ts @@ -7,4 +7,4 @@ /** * Match the payload of the signal */ -export type ActionsSchemaMatchPayload = { [key: string]: any }; +export type ActionsSchemaMatchPayload = { [key: string]: unknown }; diff --git a/frontend/src/openapi/models/changeRequestChangeSchemaPayloadOneOf.ts b/frontend/src/openapi/models/changeRequestChangeSchemaPayloadOneOf.ts index 4ff4693a8f..c55c166db2 100644 --- a/frontend/src/openapi/models/changeRequestChangeSchemaPayloadOneOf.ts +++ b/frontend/src/openapi/models/changeRequestChangeSchemaPayloadOneOf.ts @@ -4,4 +4,4 @@ * See `gen:api` script in package.json */ -export type ChangeRequestChangeSchemaPayloadOneOf = { [key: string]: any }; +export type ChangeRequestChangeSchemaPayloadOneOf = { [key: string]: unknown }; diff --git a/frontend/src/openapi/models/changeRequestDefaultChangeSchemaPayload.ts b/frontend/src/openapi/models/changeRequestDefaultChangeSchemaPayload.ts index e93f4070a9..a172a47029 100644 --- a/frontend/src/openapi/models/changeRequestDefaultChangeSchemaPayload.ts +++ b/frontend/src/openapi/models/changeRequestDefaultChangeSchemaPayload.ts @@ -7,4 +7,6 @@ /** * The necessary data to perform this change. */ -export type ChangeRequestDefaultChangeSchemaPayload = { [key: string]: any }; +export type ChangeRequestDefaultChangeSchemaPayload = { + [key: string]: unknown; +}; diff --git a/frontend/src/openapi/models/changeRequestPlaygroundRequestSchema.ts b/frontend/src/openapi/models/changeRequestPlaygroundRequestSchema.ts new file mode 100644 index 0000000000..a0b10cf988 --- /dev/null +++ b/frontend/src/openapi/models/changeRequestPlaygroundRequestSchema.ts @@ -0,0 +1,13 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ +import type { SdkContextSchema } from './sdkContextSchema'; + +/** + * Data for the playground API to evaluate flags with change request applied in preview mode + */ +export interface ChangeRequestPlaygroundRequestSchema { + context: SdkContextSchema; +} diff --git a/frontend/src/openapi/models/changeRequestSegmentChangeSchemaPayloadOneOf.ts b/frontend/src/openapi/models/changeRequestSegmentChangeSchemaPayloadOneOf.ts index 1660579427..fa535bc0da 100644 --- a/frontend/src/openapi/models/changeRequestSegmentChangeSchemaPayloadOneOf.ts +++ b/frontend/src/openapi/models/changeRequestSegmentChangeSchemaPayloadOneOf.ts @@ -5,5 +5,5 @@ */ export type ChangeRequestSegmentChangeSchemaPayloadOneOf = { - [key: string]: any; + [key: string]: unknown; }; diff --git a/frontend/src/openapi/models/clientApplicationSchema.ts b/frontend/src/openapi/models/clientApplicationSchema.ts index b471e6daec..b934ba7047 100644 --- a/frontend/src/openapi/models/clientApplicationSchema.ts +++ b/frontend/src/openapi/models/clientApplicationSchema.ts @@ -23,10 +23,18 @@ export interface ClientApplicationSchema { * @minimum 0 */ interval: number; + /** The platform the application is running on. For languages that compile to binaries, this can be omitted */ + platformName?: string; + /** The version of the platform the application is running on. Languages that compile to binaries, this is expected to be the compiler version used to assemble the binary. */ + platformVersion?: string; /** An SDK version identifier. Usually formatted as "unleash-client-:" */ sdkVersion?: string; + /** The version of the Unleash client specification the client supports */ + specVersion?: string; /** Either an RFC-3339 timestamp or a unix timestamp in seconds */ started: ClientApplicationSchemaStarted; /** Which strategies the SDKs runtime knows about */ strategies: string[]; + /** The semantic version of the Yggdrasil engine used by the client. If the client is using a native engine this can be omitted. */ + yggdrasilVersion?: string; } diff --git a/frontend/src/openapi/models/clientMetricsSchema.ts b/frontend/src/openapi/models/clientMetricsSchema.ts index 8d8ec63d0e..48aa290413 100644 --- a/frontend/src/openapi/models/clientMetricsSchema.ts +++ b/frontend/src/openapi/models/clientMetricsSchema.ts @@ -13,8 +13,21 @@ export interface ClientMetricsSchema { appName: string; /** Holds all metrics gathered over a window of time. Typically 1 hour wide */ bucket: ClientMetricsSchemaBucket; - /** Which environment the application is running in */ + /** + * Which environment the application is running in. This property was deprecated in v5. This can be determined by the API key calling this endpoint. + * @deprecated + */ environment?: string; /** A [(somewhat) unique identifier](https://docs.getunleash.io/reference/sdks/node#advanced-usage) for the application */ instanceId?: string; + /** The platform the application is running on. For languages that compile to binaries, this can be omitted */ + platformName?: string; + /** The version of the platform the application is running on. Languages that compile to binaries, this is expected to be the compiler version used to assemble the binary. */ + platformVersion?: string; + /** An SDK version identifier. Usually formatted as "unleash-client-:" */ + sdkVersion?: string; + /** The version of the Unleash client specification the client supports */ + specVersion?: string; + /** The semantic version of the Yggdrasil engine used by the client. If the client is using a native engine this can be omitted. */ + yggdrasilVersion?: string; } diff --git a/frontend/src/openapi/models/createActionSchemaExecutionParams.ts b/frontend/src/openapi/models/createActionSchemaExecutionParams.ts index c6c7be55ff..0880d186e7 100644 --- a/frontend/src/openapi/models/createActionSchemaExecutionParams.ts +++ b/frontend/src/openapi/models/createActionSchemaExecutionParams.ts @@ -7,4 +7,4 @@ /** * A map of parameters to pass to the action */ -export type CreateActionSchemaExecutionParams = { [key: string]: any }; +export type CreateActionSchemaExecutionParams = { [key: string]: unknown }; diff --git a/frontend/src/openapi/models/createActionsSchemaMatchPayload.ts b/frontend/src/openapi/models/createActionsSchemaMatchPayload.ts index 400c9dfec2..4bbc91eff4 100644 --- a/frontend/src/openapi/models/createActionsSchemaMatchPayload.ts +++ b/frontend/src/openapi/models/createActionsSchemaMatchPayload.ts @@ -7,4 +7,4 @@ /** * Match the payload of the signal */ -export type CreateActionsSchemaMatchPayload = { [key: string]: any }; +export type CreateActionsSchemaMatchPayload = { [key: string]: unknown }; diff --git a/frontend/src/openapi/models/createFeatureSchema.ts b/frontend/src/openapi/models/createFeatureSchema.ts index b9aabe9ea6..c2bfec0bd0 100644 --- a/frontend/src/openapi/models/createFeatureSchema.ts +++ b/frontend/src/openapi/models/createFeatureSchema.ts @@ -3,6 +3,7 @@ * Do not edit manually. * See `gen:api` script in package.json */ +import type { TagSchema } from './tagSchema'; /** * Data used to create a new feature flag. @@ -17,6 +18,8 @@ export interface CreateFeatureSchema { impressionData?: boolean; /** Unique feature name */ name: string; + /** Tags to add to the feature. */ + tags?: TagSchema[]; /** The feature flag's [type](https://docs.getunleash.io/reference/feature-toggle-types). One of experiment, kill-switch, release, operational, or permission */ type?: string; } diff --git a/frontend/src/openapi/models/eventSchemaData.ts b/frontend/src/openapi/models/eventSchemaData.ts index 244afd3705..7a59783324 100644 --- a/frontend/src/openapi/models/eventSchemaData.ts +++ b/frontend/src/openapi/models/eventSchemaData.ts @@ -8,4 +8,4 @@ * Extra associated data related to the event, such as feature flag state, segment configuration, etc., if applicable. * @nullable */ -export type EventSchemaData = { [key: string]: any } | null; +export type EventSchemaData = { [key: string]: unknown } | null; diff --git a/frontend/src/openapi/models/eventSchemaPreData.ts b/frontend/src/openapi/models/eventSchemaPreData.ts index fb8f247336..34a776b80a 100644 --- a/frontend/src/openapi/models/eventSchemaPreData.ts +++ b/frontend/src/openapi/models/eventSchemaPreData.ts @@ -8,4 +8,4 @@ * Data relating to the previous state of the event's subject. * @nullable */ -export type EventSchemaPreData = { [key: string]: any } | null; +export type EventSchemaPreData = { [key: string]: unknown } | null; diff --git a/frontend/src/openapi/models/featureSchemaStrategiesItem.ts b/frontend/src/openapi/models/featureSchemaStrategiesItem.ts index 74eb231676..4d4c38505f 100644 --- a/frontend/src/openapi/models/featureSchemaStrategiesItem.ts +++ b/frontend/src/openapi/models/featureSchemaStrategiesItem.ts @@ -4,4 +4,4 @@ * See `gen:api` script in package.json */ -export type FeatureSchemaStrategiesItem = { [key: string]: any }; +export type FeatureSchemaStrategiesItem = { [key: string]: unknown }; diff --git a/frontend/src/openapi/models/featureSearchResponseSchemaStrategiesItem.ts b/frontend/src/openapi/models/featureSearchResponseSchemaStrategiesItem.ts index 106ce402ec..28b8396590 100644 --- a/frontend/src/openapi/models/featureSearchResponseSchemaStrategiesItem.ts +++ b/frontend/src/openapi/models/featureSearchResponseSchemaStrategiesItem.ts @@ -4,4 +4,6 @@ * See `gen:api` script in package.json */ -export type FeatureSearchResponseSchemaStrategiesItem = { [key: string]: any }; +export type FeatureSearchResponseSchemaStrategiesItem = { + [key: string]: unknown; +}; diff --git a/frontend/src/openapi/models/getChangeRequestPlayground400.ts b/frontend/src/openapi/models/getChangeRequestPlayground400.ts new file mode 100644 index 0000000000..ec0d62c17a --- /dev/null +++ b/frontend/src/openapi/models/getChangeRequestPlayground400.ts @@ -0,0 +1,14 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +export type GetChangeRequestPlayground400 = { + /** The ID of the error instance */ + id?: string; + /** A description of what went wrong. */ + message?: string; + /** The name of the error kind */ + name?: string; +}; diff --git a/frontend/src/openapi/models/getChangeRequestPlayground401.ts b/frontend/src/openapi/models/getChangeRequestPlayground401.ts new file mode 100644 index 0000000000..bd2dfc652b --- /dev/null +++ b/frontend/src/openapi/models/getChangeRequestPlayground401.ts @@ -0,0 +1,14 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +export type GetChangeRequestPlayground401 = { + /** The ID of the error instance */ + id?: string; + /** A description of what went wrong. */ + message?: string; + /** The name of the error kind */ + name?: string; +}; diff --git a/frontend/src/openapi/models/getChangeRequestPlayground404.ts b/frontend/src/openapi/models/getChangeRequestPlayground404.ts new file mode 100644 index 0000000000..12a1b372db --- /dev/null +++ b/frontend/src/openapi/models/getChangeRequestPlayground404.ts @@ -0,0 +1,14 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +export type GetChangeRequestPlayground404 = { + /** The ID of the error instance */ + id?: string; + /** A description of what went wrong. */ + message?: string; + /** The name of the error kind */ + name?: string; +}; diff --git a/frontend/src/openapi/models/getInstanceInsightsParams.ts b/frontend/src/openapi/models/getInstanceInsightsParams.ts new file mode 100644 index 0000000000..6cce7a3b37 --- /dev/null +++ b/frontend/src/openapi/models/getInstanceInsightsParams.ts @@ -0,0 +1,16 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +export type GetInstanceInsightsParams = { + /** + * The beginning of the date range in yyyy-MM-dd format + */ + from?: string; + /** + * The end of the date range in yyyy-MM-dd format + */ + to?: string; +}; diff --git a/frontend/src/openapi/models/getIntegrationEvents401.ts b/frontend/src/openapi/models/getIntegrationEvents401.ts new file mode 100644 index 0000000000..398cc7b57f --- /dev/null +++ b/frontend/src/openapi/models/getIntegrationEvents401.ts @@ -0,0 +1,14 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +export type GetIntegrationEvents401 = { + /** The ID of the error instance */ + id?: string; + /** A description of what went wrong. */ + message?: string; + /** The name of the error kind */ + name?: string; +}; diff --git a/frontend/src/openapi/models/getIntegrationEvents403.ts b/frontend/src/openapi/models/getIntegrationEvents403.ts new file mode 100644 index 0000000000..e4eda045bf --- /dev/null +++ b/frontend/src/openapi/models/getIntegrationEvents403.ts @@ -0,0 +1,14 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +export type GetIntegrationEvents403 = { + /** The ID of the error instance */ + id?: string; + /** A description of what went wrong. */ + message?: string; + /** The name of the error kind */ + name?: string; +}; diff --git a/frontend/src/openapi/models/getIntegrationEvents404.ts b/frontend/src/openapi/models/getIntegrationEvents404.ts new file mode 100644 index 0000000000..ea9fce9cab --- /dev/null +++ b/frontend/src/openapi/models/getIntegrationEvents404.ts @@ -0,0 +1,14 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +export type GetIntegrationEvents404 = { + /** The ID of the error instance */ + id?: string; + /** A description of what went wrong. */ + message?: string; + /** The name of the error kind */ + name?: string; +}; diff --git a/frontend/src/openapi/models/getIntegrationEventsParams.ts b/frontend/src/openapi/models/getIntegrationEventsParams.ts new file mode 100644 index 0000000000..9ee2d129ce --- /dev/null +++ b/frontend/src/openapi/models/getIntegrationEventsParams.ts @@ -0,0 +1,16 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +export type GetIntegrationEventsParams = { + /** + * The number of results to return in a page. By default it is set to 50. + */ + limit?: string; + /** + * The number of results to skip when returning a page. By default it is set to 0. + */ + offset?: string; +}; diff --git a/frontend/src/openapi/models/index.ts b/frontend/src/openapi/models/index.ts index 10286c37e7..29130cb528 100644 --- a/frontend/src/openapi/models/index.ts +++ b/frontend/src/openapi/models/index.ts @@ -238,6 +238,7 @@ export * from './changeRequestOneOrManyCreateSchemaOneOfTwoone'; export * from './changeRequestOneOrManyCreateSchemaOneOfTwooneAction'; export * from './changeRequestOneOrManyCreateSchemaOneOfTwothree'; export * from './changeRequestOneOrManyCreateSchemaOneOfTwothreeAction'; +export * from './changeRequestPlaygroundRequestSchema'; export * from './changeRequestScheduleSchema'; export * from './changeRequestScheduleSchemaOneOf'; export * from './changeRequestScheduleSchemaOneOfFive'; @@ -605,6 +606,9 @@ export * from './getArchivedFeaturesByProjectId403'; export * from './getBanners401'; export * from './getBaseUsersAndGroups401'; export * from './getChangeRequest404'; +export * from './getChangeRequestPlayground400'; +export * from './getChangeRequestPlayground401'; +export * from './getChangeRequestPlayground404'; export * from './getDeprecatedProjectOverview401'; export * from './getDeprecatedProjectOverview403'; export * from './getDeprecatedProjectOverview404'; @@ -649,6 +653,11 @@ export * from './getGroup403'; export * from './getGroup404'; export * from './getGroups401'; export * from './getGroups403'; +export * from './getInstanceInsightsParams'; +export * from './getIntegrationEvents401'; +export * from './getIntegrationEvents403'; +export * from './getIntegrationEvents404'; +export * from './getIntegrationEventsParams'; export * from './getLoginHistory401'; export * from './getLoginHistory404'; export * from './getMaintenance401'; @@ -785,6 +794,10 @@ export * from './instanceInsightsSchemaMetricsSummaryTrendsItem'; export * from './instanceInsightsSchemaProjectFlagTrendsItem'; export * from './instanceInsightsSchemaUserTrendsItem'; export * from './instanceInsightsSchemaUsers'; +export * from './integrationEventSchema'; +export * from './integrationEventSchemaDetails'; +export * from './integrationEventSchemaState'; +export * from './integrationEventsSchema'; export * from './invoicesSchema'; export * from './invoicesSchemaItem'; export * from './legalValueSchema'; @@ -814,8 +827,12 @@ export * from './notificationsSchemaItem'; export * from './notificationsSchemaItemCreatedBy'; export * from './notificationsSchemaItemNotificationType'; export * from './oidcSettingsSchema'; -export * from './oidcSettingsSchemaDefaultRootRole'; -export * from './oidcSettingsSchemaIdTokenSigningAlgorithm'; +export * from './oidcSettingsSchemaOneOf'; +export * from './oidcSettingsSchemaOneOfDefaultRootRole'; +export * from './oidcSettingsSchemaOneOfFour'; +export * from './oidcSettingsSchemaOneOfFourDefaultRootRole'; +export * from './oidcSettingsSchemaOneOfFourIdTokenSigningAlgorithm'; +export * from './oidcSettingsSchemaOneOfIdTokenSigningAlgorithm'; export * from './outdatedSdksSchema'; export * from './outdatedSdksSchemaSdksItem'; export * from './overrideSchema'; @@ -993,7 +1010,10 @@ export * from './roleWithVersionSchema'; export * from './rolesSchema'; export * from './rolesWithVersionSchema'; export * from './samlSettingsSchema'; -export * from './samlSettingsSchemaDefaultRootRole'; +export * from './samlSettingsSchemaOneOf'; +export * from './samlSettingsSchemaOneOfDefaultRootRole'; +export * from './samlSettingsSchemaOneOfThree'; +export * from './samlSettingsSchemaOneOfThreeDefaultRootRole'; export * from './scheduledChangeRequestViewModelSchema'; export * from './scimSettingsSchema'; export * from './scimTokenSchema'; diff --git a/frontend/src/openapi/models/integrationEventSchema.ts b/frontend/src/openapi/models/integrationEventSchema.ts new file mode 100644 index 0000000000..8262e20c05 --- /dev/null +++ b/frontend/src/openapi/models/integrationEventSchema.ts @@ -0,0 +1,31 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ +import type { IntegrationEventSchemaDetails } from './integrationEventSchemaDetails'; +import type { EventSchema } from './eventSchema'; +import type { IntegrationEventSchemaState } from './integrationEventSchemaState'; + +/** + * An object describing an integration event. + */ +export interface IntegrationEventSchema { + /** The date and time of when the integration event was created. In other words, the date and time of when the integration handled the event. */ + createdAt: string; + /** Detailed information about the integration event. The contents vary depending on the type of integration and the specific details. */ + details: IntegrationEventSchemaDetails; + /** The event that triggered this integration event. */ + event: EventSchema; + /** + * The integration event's ID. Integration event IDs are incrementing integers. In other words, a more recently created integration event will always have a higher ID than an older one. This ID is represented as a string since it is a BigInt. + * @pattern ^[0-9]+$ + */ + id: string; + /** The ID of the integration that the integration event belongs to. */ + integrationId: number; + /** The state of the integration event. Can be one of `success`, `failed` or `successWithErrors`. */ + state: IntegrationEventSchemaState; + /** Details about the state of the integration event. */ + stateDetails: string; +} diff --git a/frontend/src/openapi/models/integrationEventSchemaDetails.ts b/frontend/src/openapi/models/integrationEventSchemaDetails.ts new file mode 100644 index 0000000000..5fa9367941 --- /dev/null +++ b/frontend/src/openapi/models/integrationEventSchemaDetails.ts @@ -0,0 +1,10 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +/** + * Detailed information about the integration event. The contents vary depending on the type of integration and the specific details. + */ +export type IntegrationEventSchemaDetails = { [key: string]: unknown }; diff --git a/frontend/src/openapi/models/integrationEventSchemaState.ts b/frontend/src/openapi/models/integrationEventSchemaState.ts new file mode 100644 index 0000000000..388b1bc101 --- /dev/null +++ b/frontend/src/openapi/models/integrationEventSchemaState.ts @@ -0,0 +1,18 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +/** + * The state of the integration event. Can be one of `success`, `failed` or `successWithErrors`. + */ +export type IntegrationEventSchemaState = + (typeof IntegrationEventSchemaState)[keyof typeof IntegrationEventSchemaState]; + +// eslint-disable-next-line @typescript-eslint/no-redeclare +export const IntegrationEventSchemaState = { + success: 'success', + failed: 'failed', + successWithErrors: 'successWithErrors', +} as const; diff --git a/frontend/src/openapi/models/integrationEventsSchema.ts b/frontend/src/openapi/models/integrationEventsSchema.ts new file mode 100644 index 0000000000..b0f2f6ed88 --- /dev/null +++ b/frontend/src/openapi/models/integrationEventsSchema.ts @@ -0,0 +1,14 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ +import type { IntegrationEventSchema } from './integrationEventSchema'; + +/** + * A response model with a list of integration events. + */ +export interface IntegrationEventsSchema { + /** A list of integration events. */ + integrationEvents: IntegrationEventSchema[]; +} diff --git a/frontend/src/openapi/models/oidcSettingsSchema.ts b/frontend/src/openapi/models/oidcSettingsSchema.ts index 7b0c7cc3a6..f3f16f2ec7 100644 --- a/frontend/src/openapi/models/oidcSettingsSchema.ts +++ b/frontend/src/openapi/models/oidcSettingsSchema.ts @@ -3,35 +3,12 @@ * Do not edit manually. * See `gen:api` script in package.json */ -import type { OidcSettingsSchemaDefaultRootRole } from './oidcSettingsSchemaDefaultRootRole'; -import type { OidcSettingsSchemaIdTokenSigningAlgorithm } from './oidcSettingsSchemaIdTokenSigningAlgorithm'; +import type { OidcSettingsSchemaOneOf } from './oidcSettingsSchemaOneOf'; +import type { OidcSettingsSchemaOneOfFour } from './oidcSettingsSchemaOneOfFour'; /** * Settings for configuring OpenID Connect as a login provider for Unleash */ -export interface OidcSettingsSchema { - /** Authentication Context Class Reference, used to request extra values in the acr claim returned from the server. If multiple values are required, they should be space separated. - Consult [the OIDC reference](https://openid.net/specs/openid-connect-core-1_0.html#AuthorizationEndpoint) for more information - */ - acrValues?: string; - /** Auto create users based on email addresses from login tokens */ - autoCreate?: boolean; - /** The OIDC client ID of this application. */ - clientId: string; - /** [Default role](https://docs.getunleash.io/reference/rbac#standard-roles) granted to users auto-created from email. Only relevant if autoCreate is `true` */ - defaultRootRole?: OidcSettingsSchemaDefaultRootRole; - /** Assign this root role to auto created users. Should be a role ID and takes precedence over `defaultRootRole`. */ - defaultRootRoleId?: number; - /** The [.well-known OpenID discover URL](https://swagger.io/docs/specification/authentication/openid-connect-discovery/) */ - discoverUrl?: string; - /** Comma separated list of email domains that are automatically approved for an account in the server. Only relevant if autoCreate is `true` */ - emailDomains?: string; - /** `true` if OpenID connect is turned on for this instance, otherwise `false` */ - enabled?: boolean; - /** Support Single sign out when user clicks logout in Unleash. If `true` user is signed out of all OpenID Connect sessions against the clientId they may have active */ - enableSingleSignOut?: boolean; - /** The signing algorithm used to sign our token. Refer to the [JWT signatures](https://jwt.io/introduction) documentation for more information. */ - idTokenSigningAlgorithm?: OidcSettingsSchemaIdTokenSigningAlgorithm; - /** Shared secret from OpenID server. Used to authenticate login requests */ - secret: string; -} +export type OidcSettingsSchema = + | OidcSettingsSchemaOneOf + | OidcSettingsSchemaOneOfFour; diff --git a/frontend/src/openapi/models/oidcSettingsSchemaOneOf.ts b/frontend/src/openapi/models/oidcSettingsSchemaOneOf.ts new file mode 100644 index 0000000000..d47f1fdc91 --- /dev/null +++ b/frontend/src/openapi/models/oidcSettingsSchemaOneOf.ts @@ -0,0 +1,40 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ +import type { OidcSettingsSchemaOneOfDefaultRootRole } from './oidcSettingsSchemaOneOfDefaultRootRole'; +import type { OidcSettingsSchemaOneOfIdTokenSigningAlgorithm } from './oidcSettingsSchemaOneOfIdTokenSigningAlgorithm'; + +export type OidcSettingsSchemaOneOf = { + /** Authentication Context Class Reference, used to request extra values in the acr claim returned from the server. If multiple values are required, they should be space separated. + Consult [the OIDC reference](https://openid.net/specs/openid-connect-core-1_0.html#AuthorizationEndpoint) for more information + */ + acrValues?: string; + /** When enabled Unleash will also request the 'groups' scope as part of the login request. */ + addGroupsScope?: boolean; + /** Auto create users based on email addresses from login tokens */ + autoCreate?: boolean; + /** The OIDC client ID of this application. */ + clientId: string; + /** [Default role](https://docs.getunleash.io/reference/rbac#standard-roles) granted to users auto-created from email. Only relevant if autoCreate is `true` */ + defaultRootRole?: OidcSettingsSchemaOneOfDefaultRootRole; + /** Assign this root role to auto created users. Should be a role ID and takes precedence over `defaultRootRole`. */ + defaultRootRoleId?: number; + /** The [.well-known OpenID discover URL](https://swagger.io/docs/specification/authentication/openid-connect-discovery/) */ + discoverUrl?: string; + /** Comma separated list of email domains that are automatically approved for an account in the server. Only relevant if autoCreate is `true` */ + emailDomains?: string; + /** Whether to enable or disable OpenID Connect for this instance */ + enabled: boolean; + /** Should we enable group syncing. Refer to the documentation [Group syncing](https://docs.getunleash.io/how-to/how-to-set-up-group-sso-sync) */ + enableGroupSyncing?: boolean; + /** Support Single sign out when user clicks logout in Unleash. If `true` user is signed out of all OpenID Connect sessions against the clientId they may have active */ + enableSingleSignOut?: boolean; + /** Specifies the path in the OIDC token response to read which groups the user belongs to from. */ + groupJsonPath?: string; + /** The signing algorithm used to sign our token. Refer to the [JWT signatures](https://jwt.io/introduction) documentation for more information. */ + idTokenSigningAlgorithm?: OidcSettingsSchemaOneOfIdTokenSigningAlgorithm; + /** Shared secret from OpenID server. Used to authenticate login requests */ + secret: string; +}; diff --git a/frontend/src/openapi/models/oidcSettingsSchemaDefaultRootRole.ts b/frontend/src/openapi/models/oidcSettingsSchemaOneOfDefaultRootRole.ts similarity index 64% rename from frontend/src/openapi/models/oidcSettingsSchemaDefaultRootRole.ts rename to frontend/src/openapi/models/oidcSettingsSchemaOneOfDefaultRootRole.ts index 4e7ad22420..5ef88430e5 100644 --- a/frontend/src/openapi/models/oidcSettingsSchemaDefaultRootRole.ts +++ b/frontend/src/openapi/models/oidcSettingsSchemaOneOfDefaultRootRole.ts @@ -7,11 +7,11 @@ /** * [Default role](https://docs.getunleash.io/reference/rbac#standard-roles) granted to users auto-created from email. Only relevant if autoCreate is `true` */ -export type OidcSettingsSchemaDefaultRootRole = - (typeof OidcSettingsSchemaDefaultRootRole)[keyof typeof OidcSettingsSchemaDefaultRootRole]; +export type OidcSettingsSchemaOneOfDefaultRootRole = + (typeof OidcSettingsSchemaOneOfDefaultRootRole)[keyof typeof OidcSettingsSchemaOneOfDefaultRootRole]; // eslint-disable-next-line @typescript-eslint/no-redeclare -export const OidcSettingsSchemaDefaultRootRole = { +export const OidcSettingsSchemaOneOfDefaultRootRole = { Viewer: 'Viewer', Editor: 'Editor', Admin: 'Admin', diff --git a/frontend/src/openapi/models/oidcSettingsSchemaOneOfFour.ts b/frontend/src/openapi/models/oidcSettingsSchemaOneOfFour.ts new file mode 100644 index 0000000000..285ce21653 --- /dev/null +++ b/frontend/src/openapi/models/oidcSettingsSchemaOneOfFour.ts @@ -0,0 +1,40 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ +import type { OidcSettingsSchemaOneOfFourDefaultRootRole } from './oidcSettingsSchemaOneOfFourDefaultRootRole'; +import type { OidcSettingsSchemaOneOfFourIdTokenSigningAlgorithm } from './oidcSettingsSchemaOneOfFourIdTokenSigningAlgorithm'; + +export type OidcSettingsSchemaOneOfFour = { + /** Authentication Context Class Reference, used to request extra values in the acr claim returned from the server. If multiple values are required, they should be space separated. + Consult [the OIDC reference](https://openid.net/specs/openid-connect-core-1_0.html#AuthorizationEndpoint) for more information + */ + acrValues?: string; + /** When enabled Unleash will also request the 'groups' scope as part of the login request. */ + addGroupsScope?: boolean; + /** Auto create users based on email addresses from login tokens */ + autoCreate?: boolean; + /** The OIDC client ID of this application. */ + clientId?: string; + /** [Default role](https://docs.getunleash.io/reference/rbac#standard-roles) granted to users auto-created from email. Only relevant if autoCreate is `true` */ + defaultRootRole?: OidcSettingsSchemaOneOfFourDefaultRootRole; + /** Assign this root role to auto created users. Should be a role ID and takes precedence over `defaultRootRole`. */ + defaultRootRoleId?: number; + /** The [.well-known OpenID discover URL](https://swagger.io/docs/specification/authentication/openid-connect-discovery/) */ + discoverUrl?: string; + /** Comma separated list of email domains that are automatically approved for an account in the server. Only relevant if autoCreate is `true` */ + emailDomains?: string; + /** Whether to enable or disable OpenID Connect for this instance */ + enabled?: boolean; + /** Should we enable group syncing. Refer to the documentation [Group syncing](https://docs.getunleash.io/how-to/how-to-set-up-group-sso-sync) */ + enableGroupSyncing?: boolean; + /** Support Single sign out when user clicks logout in Unleash. If `true` user is signed out of all OpenID Connect sessions against the clientId they may have active */ + enableSingleSignOut?: boolean; + /** Specifies the path in the OIDC token response to read which groups the user belongs to from. */ + groupJsonPath?: string; + /** The signing algorithm used to sign our token. Refer to the [JWT signatures](https://jwt.io/introduction) documentation for more information. */ + idTokenSigningAlgorithm?: OidcSettingsSchemaOneOfFourIdTokenSigningAlgorithm; + /** Shared secret from OpenID server. Used to authenticate login requests */ + secret?: string; +}; diff --git a/frontend/src/openapi/models/oidcSettingsSchemaOneOfFourDefaultRootRole.ts b/frontend/src/openapi/models/oidcSettingsSchemaOneOfFourDefaultRootRole.ts new file mode 100644 index 0000000000..b35ad62a08 --- /dev/null +++ b/frontend/src/openapi/models/oidcSettingsSchemaOneOfFourDefaultRootRole.ts @@ -0,0 +1,18 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +/** + * [Default role](https://docs.getunleash.io/reference/rbac#standard-roles) granted to users auto-created from email. Only relevant if autoCreate is `true` + */ +export type OidcSettingsSchemaOneOfFourDefaultRootRole = + (typeof OidcSettingsSchemaOneOfFourDefaultRootRole)[keyof typeof OidcSettingsSchemaOneOfFourDefaultRootRole]; + +// eslint-disable-next-line @typescript-eslint/no-redeclare +export const OidcSettingsSchemaOneOfFourDefaultRootRole = { + Viewer: 'Viewer', + Editor: 'Editor', + Admin: 'Admin', +} as const; diff --git a/frontend/src/openapi/models/oidcSettingsSchemaOneOfFourIdTokenSigningAlgorithm.ts b/frontend/src/openapi/models/oidcSettingsSchemaOneOfFourIdTokenSigningAlgorithm.ts new file mode 100644 index 0000000000..b04a5d5868 --- /dev/null +++ b/frontend/src/openapi/models/oidcSettingsSchemaOneOfFourIdTokenSigningAlgorithm.ts @@ -0,0 +1,18 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +/** + * The signing algorithm used to sign our token. Refer to the [JWT signatures](https://jwt.io/introduction) documentation for more information. + */ +export type OidcSettingsSchemaOneOfFourIdTokenSigningAlgorithm = + (typeof OidcSettingsSchemaOneOfFourIdTokenSigningAlgorithm)[keyof typeof OidcSettingsSchemaOneOfFourIdTokenSigningAlgorithm]; + +// eslint-disable-next-line @typescript-eslint/no-redeclare +export const OidcSettingsSchemaOneOfFourIdTokenSigningAlgorithm = { + RS256: 'RS256', + RS384: 'RS384', + RS512: 'RS512', +} as const; diff --git a/frontend/src/openapi/models/oidcSettingsSchemaIdTokenSigningAlgorithm.ts b/frontend/src/openapi/models/oidcSettingsSchemaOneOfIdTokenSigningAlgorithm.ts similarity index 60% rename from frontend/src/openapi/models/oidcSettingsSchemaIdTokenSigningAlgorithm.ts rename to frontend/src/openapi/models/oidcSettingsSchemaOneOfIdTokenSigningAlgorithm.ts index 53cbe01889..7796f98c4b 100644 --- a/frontend/src/openapi/models/oidcSettingsSchemaIdTokenSigningAlgorithm.ts +++ b/frontend/src/openapi/models/oidcSettingsSchemaOneOfIdTokenSigningAlgorithm.ts @@ -7,11 +7,11 @@ /** * The signing algorithm used to sign our token. Refer to the [JWT signatures](https://jwt.io/introduction) documentation for more information. */ -export type OidcSettingsSchemaIdTokenSigningAlgorithm = - (typeof OidcSettingsSchemaIdTokenSigningAlgorithm)[keyof typeof OidcSettingsSchemaIdTokenSigningAlgorithm]; +export type OidcSettingsSchemaOneOfIdTokenSigningAlgorithm = + (typeof OidcSettingsSchemaOneOfIdTokenSigningAlgorithm)[keyof typeof OidcSettingsSchemaOneOfIdTokenSigningAlgorithm]; // eslint-disable-next-line @typescript-eslint/no-redeclare -export const OidcSettingsSchemaIdTokenSigningAlgorithm = { +export const OidcSettingsSchemaOneOfIdTokenSigningAlgorithm = { RS256: 'RS256', RS384: 'RS384', RS512: 'RS512', diff --git a/frontend/src/openapi/models/resourceLimitsSchema.ts b/frontend/src/openapi/models/resourceLimitsSchema.ts index c5af4b312b..f1cb18f695 100644 --- a/frontend/src/openapi/models/resourceLimitsSchema.ts +++ b/frontend/src/openapi/models/resourceLimitsSchema.ts @@ -16,6 +16,34 @@ export interface ResourceLimitsSchema { actionSetFilterValues: number; /** The maximum number of action set definitions per project allowed. */ actionSetsPerProject: number; + /** + * The maximum number of SDK and admin API tokens you can have at the same time. This limit applies only to server-side and client-side SDK tokens and to admin tokens. Personal access tokens are not subject to this limit. The limit applies to the total number of tokens across all projects in your organization. + * @minimum 0 + */ + apiTokens: number; + /** The maximum number of constraints in a single strategy. */ + constraints: number; + /** The maximum number of values for a single constraint. */ + constraintValues: number; + /** + * The maximum number of environments allowed. + * @minimum 1 + */ + environments: number; + /** The maximum number of feature environment strategies allowed. */ + featureEnvironmentStrategies: number; + /** + * The maximum number of feature flags you can have at the same time. Archived flags do not count towards this limit. + * @minimum 1 + */ + featureFlags: number; + /** + * The maximum number of projects allowed. + * @minimum 1 + */ + projects: number; + /** The maximum number of segments allowed. */ + segments: number; /** The maximum number of values per segment allowed. */ segmentValues: number; /** The maximum number of signal endpoints allowed. */ @@ -24,26 +52,4 @@ export interface ResourceLimitsSchema { signalTokensPerEndpoint: number; /** The maximum number of strategy segments allowed. */ strategySegments: number; - /** The maximum number of feature environment strategies allowed. */ - featureEnvironmentStrategies: number; - /** The maximum number of environments allowed. */ - environments: number; - /** The maximum number of values for a single constraint. */ - constraintValues: number; - /** The maximum number of constraints for a single strategy. */ - constraints: number; - /** The maximum number of projects allowed. */ - projects: number; - /** The maximum number of segments allowed. */ - segments: number; - /** The maximum number of SDK and admin API tokens you can have at - * the same time. This limit applies only to server-side and - * client-side SDK tokens and to admin tokens. Personal access - * tokens are not subject to this limit. The limit applies to the - * total number of tokens across all projects in your - * organization. */ - apiTokens: number; - /** The maximum number of feature flags you can have at the same - * time. Archived flags do not count towards this limit. */ - featureFlags: number; } diff --git a/frontend/src/openapi/models/samlSettingsSchema.ts b/frontend/src/openapi/models/samlSettingsSchema.ts index 66aa126782..42bcfa928d 100644 --- a/frontend/src/openapi/models/samlSettingsSchema.ts +++ b/frontend/src/openapi/models/samlSettingsSchema.ts @@ -3,30 +3,12 @@ * Do not edit manually. * See `gen:api` script in package.json */ -import type { SamlSettingsSchemaDefaultRootRole } from './samlSettingsSchemaDefaultRootRole'; +import type { SamlSettingsSchemaOneOf } from './samlSettingsSchemaOneOf'; +import type { SamlSettingsSchemaOneOfThree } from './samlSettingsSchemaOneOfThree'; /** * Settings used to authenticate via SAML */ -export interface SamlSettingsSchema { - /** Should Unleash create users based on the emails coming back in the authentication reply from the SAML server */ - autoCreate?: boolean; - /** The X509 certificate used to validate requests */ - certificate: string; - /** Assign this root role to auto created users */ - defaultRootRole?: SamlSettingsSchemaDefaultRootRole; - /** Assign this root role to auto created users. Should be a role ID and takes precedence over `defaultRootRole`. */ - defaultRootRoleId?: number; - /** A comma separated list of email domains that Unleash will auto create user accounts for. */ - emailDomains?: string; - /** Is SAML authentication enabled */ - enabled?: boolean; - /** The SAML 2.0 entity ID */ - entityId: string; - /** Which URL to use for Single Sign On */ - signOnUrl: string; - /** Which URL to use for Single Sign Out */ - signOutUrl?: string; - /** Signing certificate for sign out requests */ - spCertificate?: string; -} +export type SamlSettingsSchema = + | SamlSettingsSchemaOneOf + | SamlSettingsSchemaOneOfThree; diff --git a/frontend/src/openapi/models/samlSettingsSchemaOneOf.ts b/frontend/src/openapi/models/samlSettingsSchemaOneOf.ts new file mode 100644 index 0000000000..ee1de95c41 --- /dev/null +++ b/frontend/src/openapi/models/samlSettingsSchemaOneOf.ts @@ -0,0 +1,33 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ +import type { SamlSettingsSchemaOneOfDefaultRootRole } from './samlSettingsSchemaOneOfDefaultRootRole'; + +export type SamlSettingsSchemaOneOf = { + /** Should Unleash create users based on the emails coming back in the authentication reply from the SAML server */ + autoCreate?: boolean; + /** The X509 certificate used to validate requests */ + certificate: string; + /** Assign this root role to auto created users */ + defaultRootRole?: SamlSettingsSchemaOneOfDefaultRootRole; + /** Assign this root role to auto created users. Should be a role ID and takes precedence over `defaultRootRole`. */ + defaultRootRoleId?: number; + /** A comma separated list of email domains that Unleash will auto create user accounts for. */ + emailDomains?: string; + /** Whether to enable or disable SAML 2.0 for this instance */ + enabled?: boolean; + /** Should we enable group syncing. Refer to the documentation [Group syncing](https://docs.getunleash.io/how-to/how-to-set-up-group-sso-sync) */ + enableGroupSyncing?: boolean; + /** The SAML 2.0 entity ID */ + entityId: string; + /** Specifies the path in the SAML token response from which to read the groups the user belongs to. */ + groupJsonPath?: string; + /** Which URL to use for Single Sign On */ + signOnUrl: string; + /** Which URL to use for Single Sign Out */ + signOutUrl?: string; + /** Signing certificate for sign out requests */ + spCertificate?: string; +}; diff --git a/frontend/src/openapi/models/samlSettingsSchemaDefaultRootRole.ts b/frontend/src/openapi/models/samlSettingsSchemaOneOfDefaultRootRole.ts similarity index 57% rename from frontend/src/openapi/models/samlSettingsSchemaDefaultRootRole.ts rename to frontend/src/openapi/models/samlSettingsSchemaOneOfDefaultRootRole.ts index b6ead47df4..d97c249dfc 100644 --- a/frontend/src/openapi/models/samlSettingsSchemaDefaultRootRole.ts +++ b/frontend/src/openapi/models/samlSettingsSchemaOneOfDefaultRootRole.ts @@ -7,11 +7,11 @@ /** * Assign this root role to auto created users */ -export type SamlSettingsSchemaDefaultRootRole = - (typeof SamlSettingsSchemaDefaultRootRole)[keyof typeof SamlSettingsSchemaDefaultRootRole]; +export type SamlSettingsSchemaOneOfDefaultRootRole = + (typeof SamlSettingsSchemaOneOfDefaultRootRole)[keyof typeof SamlSettingsSchemaOneOfDefaultRootRole]; // eslint-disable-next-line @typescript-eslint/no-redeclare -export const SamlSettingsSchemaDefaultRootRole = { +export const SamlSettingsSchemaOneOfDefaultRootRole = { Viewer: 'Viewer', Editor: 'Editor', Admin: 'Admin', diff --git a/frontend/src/openapi/models/samlSettingsSchemaOneOfThree.ts b/frontend/src/openapi/models/samlSettingsSchemaOneOfThree.ts new file mode 100644 index 0000000000..8fcb26d0e4 --- /dev/null +++ b/frontend/src/openapi/models/samlSettingsSchemaOneOfThree.ts @@ -0,0 +1,33 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ +import type { SamlSettingsSchemaOneOfThreeDefaultRootRole } from './samlSettingsSchemaOneOfThreeDefaultRootRole'; + +export type SamlSettingsSchemaOneOfThree = { + /** Should Unleash create users based on the emails coming back in the authentication reply from the SAML server */ + autoCreate?: boolean; + /** The X509 certificate used to validate requests */ + certificate?: string; + /** Assign this root role to auto created users */ + defaultRootRole?: SamlSettingsSchemaOneOfThreeDefaultRootRole; + /** Assign this root role to auto created users. Should be a role ID and takes precedence over `defaultRootRole`. */ + defaultRootRoleId?: number; + /** A comma separated list of email domains that Unleash will auto create user accounts for. */ + emailDomains?: string; + /** Whether to enable or disable SAML 2.0 for this instance */ + enabled?: boolean; + /** Should we enable group syncing. Refer to the documentation [Group syncing](https://docs.getunleash.io/how-to/how-to-set-up-group-sso-sync) */ + enableGroupSyncing?: boolean; + /** The SAML 2.0 entity ID */ + entityId?: string; + /** Specifies the path in the SAML token response from which to read the groups the user belongs to. */ + groupJsonPath?: string; + /** Which URL to use for Single Sign On */ + signOnUrl?: string; + /** Which URL to use for Single Sign Out */ + signOutUrl?: string; + /** Signing certificate for sign out requests */ + spCertificate?: string; +}; diff --git a/frontend/src/openapi/models/samlSettingsSchemaOneOfThreeDefaultRootRole.ts b/frontend/src/openapi/models/samlSettingsSchemaOneOfThreeDefaultRootRole.ts new file mode 100644 index 0000000000..72c72335dc --- /dev/null +++ b/frontend/src/openapi/models/samlSettingsSchemaOneOfThreeDefaultRootRole.ts @@ -0,0 +1,18 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +/** + * Assign this root role to auto created users + */ +export type SamlSettingsSchemaOneOfThreeDefaultRootRole = + (typeof SamlSettingsSchemaOneOfThreeDefaultRootRole)[keyof typeof SamlSettingsSchemaOneOfThreeDefaultRootRole]; + +// eslint-disable-next-line @typescript-eslint/no-redeclare +export const SamlSettingsSchemaOneOfThreeDefaultRootRole = { + Viewer: 'Viewer', + Editor: 'Editor', + Admin: 'Admin', +} as const; diff --git a/frontend/src/openapi/models/sdkContextSchema.ts b/frontend/src/openapi/models/sdkContextSchema.ts index 7462700064..5a93d9bc73 100644 --- a/frontend/src/openapi/models/sdkContextSchema.ts +++ b/frontend/src/openapi/models/sdkContextSchema.ts @@ -29,5 +29,5 @@ export interface SdkContextSchema { sessionId?: string; /** An identifier for the current user */ userId?: string; - [key: string]: any; + [key: string]: unknown; } diff --git a/frontend/src/openapi/models/sdkFlatContextSchema.ts b/frontend/src/openapi/models/sdkFlatContextSchema.ts index cc51aebef1..34a27d5e23 100644 --- a/frontend/src/openapi/models/sdkFlatContextSchema.ts +++ b/frontend/src/openapi/models/sdkFlatContextSchema.ts @@ -26,5 +26,5 @@ export interface SdkFlatContextSchema { sessionId?: string; /** An identifier for the current user */ userId?: string; - [key: string]: any; + [key: string]: unknown; } diff --git a/frontend/src/openapi/models/signalEndpointSignalSchemaPayload.ts b/frontend/src/openapi/models/signalEndpointSignalSchemaPayload.ts index 29f5ec88e9..e0a921ccd7 100644 --- a/frontend/src/openapi/models/signalEndpointSignalSchemaPayload.ts +++ b/frontend/src/openapi/models/signalEndpointSignalSchemaPayload.ts @@ -7,4 +7,4 @@ /** * The payload of the signal. */ -export type SignalEndpointSignalSchemaPayload = { [key: string]: any }; +export type SignalEndpointSignalSchemaPayload = { [key: string]: unknown }; diff --git a/frontend/src/openapi/models/signalSchemaPayload.ts b/frontend/src/openapi/models/signalSchemaPayload.ts index 12847e9702..28a18c437e 100644 --- a/frontend/src/openapi/models/signalSchemaPayload.ts +++ b/frontend/src/openapi/models/signalSchemaPayload.ts @@ -7,4 +7,4 @@ /** * The payload of the signal. */ -export type SignalSchemaPayload = { [key: string]: any }; +export type SignalSchemaPayload = { [key: string]: unknown }; diff --git a/frontend/src/openapi/models/uiConfigSchema.ts b/frontend/src/openapi/models/uiConfigSchema.ts index 0ad05ac6f8..7cb033f9a8 100644 --- a/frontend/src/openapi/models/uiConfigSchema.ts +++ b/frontend/src/openapi/models/uiConfigSchema.ts @@ -37,8 +37,12 @@ export interface UiConfigSchema { name?: string; /** Whether to enable the Unleash network view or not. */ networkViewEnabled?: boolean; + /** Whether the OIDC configuration is set through environment variables or not. */ + oidcConfiguredThroughEnv?: boolean; /** A map of resource names and their limits. */ resourceLimits?: ResourceLimitsSchema; + /** Whether the SAML configuration is set through environment variables or not. */ + samlConfiguredThroughEnv?: boolean; /** * The maximum number of values that can be used in a single segment. * @deprecated diff --git a/frontend/src/openapi/models/uiConfigSchemaLinksItem.ts b/frontend/src/openapi/models/uiConfigSchemaLinksItem.ts index c08e6ff40c..6a947ca310 100644 --- a/frontend/src/openapi/models/uiConfigSchemaLinksItem.ts +++ b/frontend/src/openapi/models/uiConfigSchemaLinksItem.ts @@ -4,4 +4,4 @@ * See `gen:api` script in package.json */ -export type UiConfigSchemaLinksItem = { [key: string]: any }; +export type UiConfigSchemaLinksItem = { [key: string]: unknown }; diff --git a/frontend/src/openapi/models/updateServiceAccountSchema.ts b/frontend/src/openapi/models/updateServiceAccountSchema.ts index 98ebd7e873..acb3ca5b1f 100644 --- a/frontend/src/openapi/models/updateServiceAccountSchema.ts +++ b/frontend/src/openapi/models/updateServiceAccountSchema.ts @@ -12,5 +12,5 @@ export interface UpdateServiceAccountSchema { name?: string; /** The id of the root role for the service account */ rootRole?: number; - [key: string]: any; + [key: string]: unknown; }