1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-23 00:22:19 +01:00

chore: generate orval types (#7742)

This commit is contained in:
Mateusz Kwasniewski 2024-08-02 14:55:46 +02:00 committed by GitHub
parent 43c8152515
commit 4c55632313
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
53 changed files with 536 additions and 112 deletions

View File

@ -216,8 +216,6 @@ export const AdvancedPlayground: FC<{
const response = changeRequest
? await evaluateChangeRequestPlayground(changeRequest, {
context: parsedContext,
projects: [],
environments: [],
})
: await evaluateAdvancedPlayground({
environments: resolveEnvironments(environments),

View File

@ -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
}

View File

@ -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<AdvancedPlaygroundResponseSchema> => {
const path = `${URI}/change-request/${changeRequestId}`;
const req = createRequest(path, {

View File

@ -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 };

View File

@ -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 };

View File

@ -7,4 +7,6 @@
/**
* Match the payload of the signal
*/
export type ActionSetEventSchemaActionSetMatchPayload = { [key: string]: any };
export type ActionSetEventSchemaActionSetMatchPayload = {
[key: string]: unknown;
};

View File

@ -7,4 +7,4 @@
/**
* Match the payload of the signal
*/
export type ActionsSchemaMatchPayload = { [key: string]: any };
export type ActionsSchemaMatchPayload = { [key: string]: unknown };

View File

@ -4,4 +4,4 @@
* See `gen:api` script in package.json
*/
export type ChangeRequestChangeSchemaPayloadOneOf = { [key: string]: any };
export type ChangeRequestChangeSchemaPayloadOneOf = { [key: string]: unknown };

View File

@ -7,4 +7,6 @@
/**
* The necessary data to perform this change.
*/
export type ChangeRequestDefaultChangeSchemaPayload = { [key: string]: any };
export type ChangeRequestDefaultChangeSchemaPayload = {
[key: string]: unknown;
};

View File

@ -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;
}

View File

@ -5,5 +5,5 @@
*/
export type ChangeRequestSegmentChangeSchemaPayloadOneOf = {
[key: string]: any;
[key: string]: unknown;
};

View File

@ -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-<language>:<version>" */
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;
}

View File

@ -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-<language>:<version>" */
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;
}

View File

@ -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 };

View File

@ -7,4 +7,4 @@
/**
* Match the payload of the signal
*/
export type CreateActionsSchemaMatchPayload = { [key: string]: any };
export type CreateActionsSchemaMatchPayload = { [key: string]: unknown };

View File

@ -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;
}

View File

@ -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;

View File

@ -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;

View File

@ -4,4 +4,4 @@
* See `gen:api` script in package.json
*/
export type FeatureSchemaStrategiesItem = { [key: string]: any };
export type FeatureSchemaStrategiesItem = { [key: string]: unknown };

View File

@ -4,4 +4,6 @@
* See `gen:api` script in package.json
*/
export type FeatureSearchResponseSchemaStrategiesItem = { [key: string]: any };
export type FeatureSearchResponseSchemaStrategiesItem = {
[key: string]: unknown;
};

View File

@ -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;
};

View File

@ -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;
};

View File

@ -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;
};

View File

@ -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;
};

View File

@ -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;
};

View File

@ -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;
};

View File

@ -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;
};

View File

@ -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;
};

View File

@ -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';

View File

@ -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;
}

View File

@ -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 };

View File

@ -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;

View File

@ -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[];
}

View File

@ -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;

View File

@ -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;
};

View File

@ -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',

View File

@ -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;
};

View File

@ -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;

View File

@ -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;

View File

@ -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',

View File

@ -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;
}

View File

@ -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;

View File

@ -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;
};

View File

@ -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',

View File

@ -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;
};

View File

@ -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;

View File

@ -29,5 +29,5 @@ export interface SdkContextSchema {
sessionId?: string;
/** An identifier for the current user */
userId?: string;
[key: string]: any;
[key: string]: unknown;
}

View File

@ -26,5 +26,5 @@ export interface SdkFlatContextSchema {
sessionId?: string;
/** An identifier for the current user */
userId?: string;
[key: string]: any;
[key: string]: unknown;
}

View File

@ -7,4 +7,4 @@
/**
* The payload of the signal.
*/
export type SignalEndpointSignalSchemaPayload = { [key: string]: any };
export type SignalEndpointSignalSchemaPayload = { [key: string]: unknown };

View File

@ -7,4 +7,4 @@
/**
* The payload of the signal.
*/
export type SignalSchemaPayload = { [key: string]: any };
export type SignalSchemaPayload = { [key: string]: unknown };

View File

@ -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

View File

@ -4,4 +4,4 @@
* See `gen:api` script in package.json
*/
export type UiConfigSchemaLinksItem = { [key: string]: any };
export type UiConfigSchemaLinksItem = { [key: string]: unknown };

View File

@ -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;
}