1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-10-18 11:14:57 +02:00

Update OpenAPI generated types for frontend (#6950)

This commit is contained in:
Tymoteusz Czech 2024-04-26 13:31:15 +02:00 committed by GitHub
parent 7022ce8afb
commit 514a18bf93
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
148 changed files with 1317 additions and 287 deletions

View File

@ -16,13 +16,22 @@ export interface ActionEventSchema {
createdAt: string;
/** The id of user that created this action set */
createdByUserId: number;
/** The details of the action event, if any. */
/**
* The details of the action event, if any.
* @nullable
*/
details?: string | null;
/** A map of parameters to pass to the action */
executionParams?: ActionEventSchemaExecutionParams;
/** The id of the action set */
/**
* The id of the action set
* @minimum 1
*/
id: number;
/** The order in which the action should be executed */
/**
* The order in which the action should be executed
* @minimum 1
*/
sortOrder: number;
/** The state of the action. Can be one of `not started`, `started`, `success`, or `failed`. */
state: ActionEventSchemaState;

View File

@ -17,8 +17,14 @@ export interface ActionSchema {
createdByUserId: number;
/** A map of parameters to pass to the action */
executionParams?: ActionSchemaExecutionParams;
/** The id of the action set */
/**
* The id of the action set
* @minimum 1
*/
id: number;
/** The order in which the action should be executed */
/**
* The order in which the action should be executed
* @minimum 1
*/
sortOrder: number;
}

View File

@ -17,7 +17,10 @@ export interface ActionSetEventSchema {
actionSetId: number;
/** The date and time of when the action set event was created. In other words, the date and time of when the action set started executing. */
createdAt: string;
/** The action set event's ID. Action set event IDs are incrementing integers. In other words, a more recently created action set event will always have a higher ID than an older one. */
/**
* The action set event's ID. Action set event IDs are incrementing integers. In other words, a more recently created action set event will always have a higher ID than an older one.
* @minimum 1
*/
id: number;
/** The signal that triggered this action set event. */
signal: SignalSchema;

View File

@ -12,17 +12,26 @@ import type { ActionSetEventSchemaActionSetMatch } from './actionSetEventSchemaA
export type ActionSetEventSchemaActionSet = {
/** The list of actions executed in sequential order when the action set was triggered, decorated with the individual action states. */
actions: ActionEventSchema[];
/** The id of the service account that will execute the action */
/**
* The id of the service account that will execute the action
* @minimum 1
*/
actorId: number;
/** The date and time of when the action set was created. */
createdAt: string;
/** The ID of the user that created this action set. */
createdByUserId: number;
/** The description of the action set */
/**
* The description of the action set
* @nullable
*/
description?: string | null;
/** Whether this action set is enabled or not */
enabled?: boolean;
/** The ID of the action set. */
/**
* The ID of the action set.
* @minimum 1
*/
id: number;
/** Defines a matching rule for the signal that will trigger the action set */
match: ActionSetEventSchemaActionSetMatch;

View File

@ -12,17 +12,26 @@ import type { ActionsSchemaMatch } from './actionsSchemaMatch';
export interface ActionsSchema {
/** The list of actions to execute in sequential order when the action set is triggered. */
actions: ActionSchema[];
/** The id of the service account that will execute the action */
/**
* The id of the service account that will execute the action
* @minimum 1
*/
actorId: number;
/** The date and time of when the action set was created. */
createdAt: string;
/** The ID of the user that created this action set. */
createdByUserId: number;
/** The description of the action set */
/**
* The description of the action set
* @nullable
*/
description?: string | null;
/** Whether this action set is enabled or not */
enabled?: boolean;
/** The ID of the action set. */
/**
* The ID of the action set.
* @minimum 1
*/
id: number;
/** Defines a matching rule for the signal that will trigger the action set */
match: ActionsSchemaMatch;

View File

@ -7,4 +7,4 @@
/**
* Parameters for the addon provider. This object has different required and optional properties depending on the provider you choose. Consult the documentation for details.
*/
export type AddonCreateUpdateSchemaParameters = { [key: string]: {} };
export type AddonCreateUpdateSchemaParameters = { [key: string]: unknown };

View File

@ -9,7 +9,10 @@ import type { AddonSchemaParameters } from './addonSchemaParameters';
* An [addon](https://docs.getunleash.io/reference/addons) instance description. Contains data about what kind of provider it uses, whether it's enabled or not, what events it listens for, and more.
*/
export interface AddonSchema {
/** A description of the addon. `null` if no description exists. */
/**
* A description of the addon. `null` if no description exists.
* @nullable
*/
description: string | null;
/** Whether the addon is enabled or not. */
enabled: boolean;
@ -17,7 +20,10 @@ export interface AddonSchema {
environments?: string[];
/** The event types that trigger this specific addon. */
events: string[];
/** The addon's unique identifier. */
/**
* The addon's unique identifier.
* @minimum 1
*/
id: number;
/** Parameters for the addon provider. This object has different required and optional properties depending on the provider you choose. */
parameters: AddonSchemaParameters;

View File

@ -7,4 +7,4 @@
/**
* Parameters for the addon provider. This object has different required and optional properties depending on the provider you choose.
*/
export type AddonSchemaParameters = { [key: string]: {} };
export type AddonSchemaParameters = { [key: string]: unknown };

View File

@ -12,6 +12,9 @@ import type { AdminPermissionsSchemaVersion } from './adminPermissionsSchemaVers
export interface AdminPermissionsSchema {
/** Returns permissions available at all three levels (root|project|environment) */
permissions: AdminPermissionsSchemaPermissions;
/** The api version of this response. A natural increasing number. Only increases if format changes */
/**
* The api version of this response. A natural increasing number. Only increases if format changes
* @minimum 1
*/
version: AdminPermissionsSchemaVersion;
}

View File

@ -6,6 +6,7 @@
/**
* The api version of this response. A natural increasing number. Only increases if format changes
* @minimum 1
*/
export type AdminPermissionsSchemaVersion =
(typeof AdminPermissionsSchemaVersion)[keyof typeof AdminPermissionsSchemaVersion];

View File

@ -13,18 +13,38 @@ export interface AdminSegmentSchema {
constraints: ConstraintSchema[];
/** When the segment was created */
createdAt: string;
/** The creator's email or username */
/**
* The creator's email or username
* @nullable
*/
createdBy?: string | null;
/** The description for this segment */
/**
* The description for this segment
* @nullable
*/
description?: string | null;
/** The ID of this segment */
/**
* The ID of this segment
* @minimum 0
*/
id: number;
/** The name of this segment */
name: string;
/** The project the segment belongs to. Only present if the segment is a project-specific segment. */
/**
* The project the segment belongs to. Only present if the segment is a project-specific segment.
* @nullable
*/
project?: string | null;
/** The number of feature flags that use this segment. The number also includes the any flags with pending change requests that would add this segment. */
/**
* The number of feature flags that use this segment. The number also includes the any flags with pending change requests that would add this segment.
* @minimum 0
* @nullable
*/
usedInFeatures?: number | null;
/** The number of projects that use this segment. The number includes any projects with pending change requests that would add this segment. */
/**
* The number of projects that use this segment. The number includes any projects with pending change requests that would add this segment.
* @minimum 0
* @nullable
*/
usedInProjects?: number | null;
}

View File

@ -28,10 +28,13 @@ export interface AdvancedPlaygroundEnvironmentFeatureSchema {
projectId: string;
/** Feature's applicable strategies and cumulative results of the strategies */
strategies: AdvancedPlaygroundEnvironmentFeatureSchemaStrategies;
/** The feature variant you receive based on the provided context or the _disabled
/**
* The feature variant you receive based on the provided context or the _disabled
variant_. If a feature is disabled or doesn't have any
variants, you would get the _disabled variant_.
Otherwise, you'll get one of the feature's defined variants. */
Otherwise, you'll get one of the feature's defined variants.
* @nullable
*/
variant: AdvancedPlaygroundEnvironmentFeatureSchemaVariant;
/** The feature variants. */
variants: VariantSchema[];

View File

@ -10,6 +10,7 @@ import type { AdvancedPlaygroundEnvironmentFeatureSchemaVariantPayload } from '.
variant_. If a feature is disabled or doesn't have any
variants, you would get the _disabled variant_.
Otherwise, you'll get one of the feature's defined variants.
* @nullable
*/
export type AdvancedPlaygroundEnvironmentFeatureSchemaVariant = {
/** Whether the variant is enabled or not. If the feature is disabled or if it doesn't have variants, this property will be `false` */

View File

@ -11,7 +11,10 @@ import type { AdvancedPlaygroundRequestSchemaProjects } from './advancedPlaygrou
*/
export interface AdvancedPlaygroundRequestSchema {
context: SdkContextSchema;
/** The environments to evaluate toggles in. */
/**
* The environments to evaluate toggles in.
* @minItems 1
*/
environments: string[];
/** A list of projects to check for toggles in. */
projects?: AdvancedPlaygroundRequestSchemaProjects;

View File

@ -9,13 +9,19 @@ import type { ApiTokenSchemaType } from './apiTokenSchemaType';
* An overview of an [Unleash API token](https://docs.getunleash.io/reference/api-tokens-and-client-keys).
*/
export interface ApiTokenSchema {
/** Alias is no longer in active use and will often be NULL. It's kept around as a way of allowing old proxy tokens created with the old metadata format to keep working. */
/**
* Alias is no longer in active use and will often be NULL. It's kept around as a way of allowing old proxy tokens created with the old metadata format to keep working.
* @nullable
*/
alias?: string | null;
/** When the token was created. */
createdAt: string;
/** The environment the token has access to. `*` if it has access to all environments. */
environment?: string;
/** The token's expiration date. NULL if the token doesn't have an expiration set. */
/**
* The token's expiration date. NULL if the token doesn't have an expiration set.
* @nullable
*/
expiresAt?: string | null;
/** The project this token belongs to. */
project: string;
@ -23,7 +29,10 @@ export interface ApiTokenSchema {
projects: string[];
/** The token used for authentication. */
secret: string;
/** When the token was last seen/used to authenticate with. NULL if the token has not yet been used for authentication. */
/**
* When the token was last seen/used to authenticate with. NULL if the token has not yet been used for authentication.
* @nullable
*/
seenAt?: string | null;
/** A unique name for this particular token */
tokenName: string;

View File

@ -13,7 +13,10 @@ export interface ApplicationOverviewEnvironmentSchema {
instanceCount: number;
/** This list of issues that might be wrong with the application */
issues: ApplicationEnvironmentIssuesSchema;
/** The last time the application environment was seen */
/**
* The last time the application environment was seen
* @nullable
*/
lastSeen: string | null;
/** Name of the application environment */
name: string;

View File

@ -10,19 +10,37 @@
export interface BannerSchema {
/** The date and time of when the banner was created. */
createdAt: string;
/** The markdown to display on the dialog. If not specified, no dialog will be displayed. */
/**
* The markdown to display on the dialog. If not specified, no dialog will be displayed.
* @nullable
*/
dialog?: string | null;
/** The title to display on the dialog. If not specified, this will be the same as `linkText`. */
/**
* The title to display on the dialog. If not specified, this will be the same as `linkText`.
* @nullable
*/
dialogTitle?: string | null;
/** Whether the banner should be displayed currently. If not specified, defaults to true. */
enabled?: boolean;
/** The icon to display on the banner. Can be one of https://fonts.google.com/icons. If not specified, this will be the default icon for the variant. If "none", no icon will be displayed. */
/**
* The icon to display on the banner. Can be one of https://fonts.google.com/icons. If not specified, this will be the default icon for the variant. If "none", no icon will be displayed.
* @nullable
*/
icon?: string | null;
/** The banner's ID. Banner IDs are incrementing integers. In other words, a more recently created banner will always have a higher ID than an older one. */
/**
* The banner's ID. Banner IDs are incrementing integers. In other words, a more recently created banner will always have a higher ID than an older one.
* @minimum 1
*/
id: number;
/** The link to display on the banner. Can either be an absolute or a relative link (e.g. absolute: "https://example.com" or relative: "/admin/service-accounts"). If "dialog", will display a dialog when clicked. If not specified, no link will be displayed. */
/**
* The link to display on the banner. Can either be an absolute or a relative link (e.g. absolute: "https://example.com" or relative: "/admin/service-accounts"). If "dialog", will display a dialog when clicked. If not specified, no link will be displayed.
* @nullable
*/
link?: string | null;
/** The text to display on the link. If not specified, will be displayed as "More info". */
/**
* The text to display on the link. If not specified, will be displayed as "More info".
* @nullable
*/
linkText?: string | null;
/** The message to display to all users. Supports markdown. */
message: string;

View File

@ -8,8 +8,14 @@
* The user who created this change.
*/
export type ChangeRequestChangeSchemaCreatedBy = {
/** The URL where the user's image can be found. */
/**
* The URL where the user's image can be found.
* @nullable
*/
imageUrl?: string | null;
/** The user's username. */
/**
* The user's username.
* @nullable
*/
username?: string | null;
};

View File

@ -8,8 +8,14 @@
* Information about the user who posted the comment
*/
export type ChangeRequestCommentSchemaCreatedBy = {
/** The URL where the user's image can be found. */
/**
* The URL where the user's image can be found.
* @nullable
*/
imageUrl?: string | null;
/** The user's username. */
/**
* The user's username.
* @nullable
*/
username?: string | null;
};

View File

@ -12,7 +12,10 @@ export interface ChangeRequestEnvironmentConfigSchema {
changeRequestEnabled: boolean;
/** The environment that this configuration applies to. */
environment: string;
/** The number of approvals that are required for a change request to be fully approved and ready to be applied in this environment. */
/**
* The number of approvals that are required for a change request to be fully approved and ready to be applied in this environment.
* @nullable
*/
requiredApprovals: number | null;
/** The [type of the environment](https://docs.getunleash.io/reference/environments#environment-types) listed in `environment`. */
type: string;

View File

@ -12,6 +12,7 @@ export type ChangeRequestScheduleSchemaOneOfThree = {
/**
* The reason the scheduled failed to apply. Deprecated in favor of the `reason` property.
* @deprecated
* @nullable
*/
failureReason?: string | null;
/** The reason the scheduled failed to apply. */

View File

@ -8,7 +8,11 @@
* The user who created this change request.
*/
export type ChangeRequestSchemaOneOfCreatedBy = {
/** The URL of the user's profile image. */
/**
* The URL of the user's profile image.
* @nullable
*/
imageUrl?: string | null;
/** @nullable */
username?: string | null;
};

View File

@ -8,7 +8,11 @@
* The user who created this change request.
*/
export type ChangeRequestSchemaOneOfFourCreatedBy = {
/** The URL of the user's profile image. */
/**
* The URL of the user's profile image.
* @nullable
*/
imageUrl?: string | null;
/** @nullable */
username?: string | null;
};

View File

@ -8,8 +8,14 @@
* The user who created this change.
*/
export type ChangeRequestSegmentChangeSchemaCreatedBy = {
/** The URL where the user's image can be found. */
/**
* The URL where the user's image can be found.
* @nullable
*/
imageUrl?: string | null;
/** The user's username. */
/**
* The user's username.
* @nullable
*/
username?: string | null;
};

View File

@ -18,7 +18,10 @@ export interface ClientApplicationSchema {
environment?: string;
/** A unique identifier identifying the instance of the application running the SDK. Often changes based on execution environment. For instance: two pods in Kubernetes will have two different instanceIds */
instanceId?: string;
/** How often (in seconds) does the client refresh its toggles */
/**
* How often (in seconds) does the client refresh its toggles
* @minimum 0
*/
interval: number;
/** An SDK version identifier. Usually formatted as "unleash-client-<language>:<version>" */
sdkVersion?: string;

View File

@ -13,11 +13,17 @@ import type { VariantSchema } from './variantSchema';
export interface ClientFeatureSchema {
/** Feature dependencies for this toggle */
dependencies?: DependentFeatureSchema[];
/** A description of the toggle */
/**
* A description of the toggle
* @nullable
*/
description?: string | null;
/** Whether the feature flag is enabled for the current API key or not. This is ANDed with the evaluation results of the strategies list, so if this is false, the evaluation result will always be false */
enabled: boolean;
/** Set to true if SDKs should trigger [impression events](https://docs.getunleash.io/reference/impression-data) when this toggle is evaluated */
/**
* Set to true if SDKs should trigger [impression events](https://docs.getunleash.io/reference/impression-data) when this toggle is evaluated
* @nullable
*/
impressionData?: boolean | null;
/** The unique name of a feature toggle. Is validated to be URL safe on creation */
name: string;
@ -29,6 +35,9 @@ export interface ClientFeatureSchema {
strategies?: FeatureStrategySchema[];
/** What kind of feature flag is this. Refer to the documentation on [feature toggle types](https://docs.getunleash.io/reference/feature-toggle-types) for more information */
type?: string;
/** [Variants](https://docs.getunleash.io/reference/feature-toggle-variants#what-are-variants) configured for this toggle */
/**
* [Variants](https://docs.getunleash.io/reference/feature-toggle-variants#what-are-variants) configured for this toggle
* @nullable
*/
variants?: VariantSchema[] | null;
}

View File

@ -17,6 +17,9 @@ export interface ClientFeaturesSchema {
query?: ClientFeaturesQuerySchema;
/** A list of [Segments](https://docs.getunleash.io/reference/segments) configured for this Unleash instance */
segments?: ClientSegmentSchema[];
/** A version number for the format used in the response. Most Unleash instances now return version 2, which includes segments as a separate array */
/**
* A version number for the format used in the response. Most Unleash instances now return version 2, which includes segments as a separate array
* @minimum 0
*/
version: number;
}

View File

@ -16,12 +16,18 @@ export interface ClientMetricsEnvSchema {
environment: string;
/** Name of the feature checked by the SDK */
featureName: string;
/** How many times the toggle evaluated to false */
/**
* How many times the toggle evaluated to false
* @minimum 0
*/
no?: number;
/** The start of the time window these metrics are valid for. The window is 1 hour wide */
timestamp?: DateSchema;
/** How many times each variant was returned */
variants?: ClientMetricsEnvSchemaVariants;
/** How many times the toggle evaluated to true */
/**
* How many times the toggle evaluated to true
* @minimum 0
*/
yes?: number;
}

View File

@ -10,11 +10,17 @@ import type { ClientMetricsSchemaBucketTogglesVariants } from './clientMetricsSc
*/
export type ClientMetricsSchemaBucketToggles = {
[key: string]: {
/** How many times the toggle evaluated to false */
/**
* How many times the toggle evaluated to false
* @minimum 0
*/
no?: number;
/** An object describing how many times each variant was returned. Variant names are used as properties, and the number of times they were exposed is the corresponding value (i.e. `{ [variantName]: number }`). */
variants?: ClientMetricsSchemaBucketTogglesVariants;
/** How many times the toggle evaluated to true */
/**
* How many times the toggle evaluated to true
* @minimum 0
*/
yes?: number;
};
};

View File

@ -9,9 +9,15 @@ import type { LegalValueSchema } from './legalValueSchema';
* A representation of a [context field](https://docs.getunleash.io/reference/unleash-context).
*/
export interface ContextFieldSchema {
/** When this context field was created */
/**
* When this context field was created
* @nullable
*/
createdAt?: string | null;
/** The description of the context field. */
/**
* The description of the context field.
* @nullable
*/
description?: string | null;
/** Allowed values for this context field schema. Can be used to narrow down accepted input */
legalValues?: LegalValueSchema[];
@ -21,8 +27,16 @@ export interface ContextFieldSchema {
sortOrder?: number;
/** Does this context field support being used for [stickiness](https://docs.getunleash.io/reference/stickiness) calculations */
stickiness?: boolean;
/** Number of projects where this context field is used in */
/**
* Number of projects where this context field is used in
* @minimum 0
* @nullable
*/
usedInFeatures?: number | null;
/** Number of projects where this context field is used in */
/**
* Number of projects where this context field is used in
* @minimum 0
* @nullable
*/
usedInProjects?: number | null;
}

View File

@ -13,6 +13,9 @@ export interface CreateActionSchema {
action: string;
/** A map of parameters to pass to the action */
executionParams?: CreateActionSchemaExecutionParams;
/** The order in which the action should be executed */
/**
* The order in which the action should be executed
* @minimum 1
*/
sortOrder: number;
}

View File

@ -12,9 +12,15 @@ import type { CreateActionsSchemaMatch } from './createActionsSchemaMatch';
export interface CreateActionsSchema {
/** The list of actions to execute in sequential order when the action set is triggered */
actions: CreateActionSchema[];
/** The id of the service account that will execute the action */
/**
* The id of the service account that will execute the action
* @minimum 1
*/
actorId: number;
/** The description of the action set */
/**
* The description of the action set
* @nullable
*/
description?: string | null;
/** Whether this action set is enabled or not */
enabled?: boolean;

View File

@ -9,6 +9,9 @@ export type CreateApiTokenSchemaOneOf = {
expiresAt?: string;
/** The name of the token. */
tokenName: string;
/** An admin token. Must be the string "admin" (not case sensitive). */
/**
* An admin token. Must be the string "admin" (not case sensitive).
* @pattern ^[Aa][Dd][Mm][Ii][Nn]$
*/
type: string;
};

View File

@ -13,7 +13,10 @@ export type CreateApiTokenSchemaOneOfFour = {
project?: string;
/** A list of projects that the token should be valid for. This property is mutually incompatible with the `project` property. If you specify one, you cannot specify the other. */
projects?: string[];
/** A client or frontend token. Must be one of the strings "client" or "frontend" (not case sensitive). */
/**
* A client or frontend token. Must be one of the strings "client" or "frontend" (not case sensitive).
* @pattern ^([Cc][Ll][Ii][Ee][Nn][Tt]|[Ff][Rr][Oo][Nn][Tt][Ee][Nn][Dd])$
*/
type: string;
/**
* The name of the token. This property is deprecated. Use `tokenName` instead.

View File

@ -15,6 +15,9 @@ export type CreateApiTokenSchemaOneOfThree = {
projects?: string[];
/** The name of the token. */
tokenName: string;
/** A client or frontend token. Must be one of the strings "client" or "frontend" (not case sensitive). */
/**
* A client or frontend token. Must be one of the strings "client" or "frontend" (not case sensitive).
* @pattern ^([Cc][Ll][Ii][Ee][Nn][Tt]|[Ff][Rr][Oo][Nn][Tt][Ee][Nn][Dd])$
*/
type: string;
};

View File

@ -7,7 +7,10 @@
export type CreateApiTokenSchemaOneOfTwo = {
/** The time when this token should expire. */
expiresAt?: string;
/** An admin token. Must be the string "admin" (not case sensitive). */
/**
* An admin token. Must be the string "admin" (not case sensitive).
* @pattern ^[Aa][Dd][Mm][Ii][Nn]$
*/
type: string;
/**
* The name of the token. This property is deprecated. Use `tokenName` instead.

View File

@ -8,17 +8,32 @@
* Describes the properties required to create or update a banner.
*/
export interface CreateBannerSchema {
/** The markdown to display on the dialog. If not specified, no dialog will be displayed. */
/**
* The markdown to display on the dialog. If not specified, no dialog will be displayed.
* @nullable
*/
dialog?: string | null;
/** The title to display on the dialog. If not specified, this will be the same as `linkText`. */
/**
* The title to display on the dialog. If not specified, this will be the same as `linkText`.
* @nullable
*/
dialogTitle?: string | null;
/** Whether the banner should be displayed currently. If not specified, defaults to true. */
enabled?: boolean;
/** The icon to display on the banner. Can be one of https://fonts.google.com/icons. If not specified, this will be the default icon for the variant. If "none", no icon will be displayed. */
/**
* The icon to display on the banner. Can be one of https://fonts.google.com/icons. If not specified, this will be the default icon for the variant. If "none", no icon will be displayed.
* @nullable
*/
icon?: string | null;
/** The link to display on the banner. Can either be an absolute or a relative link (e.g. absolute: "https://example.com" or relative: "/admin/service-accounts"). If "dialog", will display a dialog when clicked. If not specified, no link will be displayed. */
/**
* The link to display on the banner. Can either be an absolute or a relative link (e.g. absolute: "https://example.com" or relative: "/admin/service-accounts"). If "dialog", will display a dialog when clicked. If not specified, no link will be displayed.
* @nullable
*/
link?: string | null;
/** The text to display on the link. If not specified, will be displayed as "More info". */
/**
* The text to display on the link. If not specified, will be displayed as "More info".
* @nullable
*/
linkText?: string | null;
/** The message to display to all users. Supports markdown. */
message: string;

View File

@ -10,16 +10,22 @@
export interface CreateEnvironmentSchema {
/** Newly created environments are enabled by default. Set this property to `false` to create the environment in a disabled state. */
enabled?: boolean;
/** The name of the environment. Must be a URL-friendly string according to [RFC 3968, section 2.3](https://www.rfc-editor.org/rfc/rfc3986#section-2.3) */
/**
* The name of the environment. Must be a URL-friendly string according to [RFC 3968, section 2.3](https://www.rfc-editor.org/rfc/rfc3986#section-2.3)
* @pattern ^[a-zA-Z0-9~_.-]+$
*/
name: string;
/** Defines where in the list of environments to place this environment. The list uses an ascending sort, so lower numbers are shown first. You can change this value later. */
sortOrder?: number;
/** The [type of environment](https://docs.getunleash.io/reference/environments#environment-types) you would like to create. Unleash officially recognizes the following values:
/**
* The [type of environment](https://docs.getunleash.io/reference/environments#environment-types) you would like to create. Unleash officially recognizes the following values:
- `development`
- `test`
- `preproduction`
- `production`
If you pass a string that is not one of the recognized values, Unleash will accept it, but it will carry no special semantics. */
If you pass a string that is not one of the recognized values, Unleash will accept it, but it will carry no special semantics.
* @minLength 1
*/
type: string;
}

View File

@ -8,10 +8,19 @@
* Create a feature naming pattern
*/
export interface CreateFeatureNamingPatternSchema {
/** A description of the pattern in a human-readable format. Will be shown to users when they create a new feature flag. */
/**
* A description of the pattern in a human-readable format. Will be shown to users when they create a new feature flag.
* @nullable
*/
description?: string | null;
/** An example of a feature name that matches the pattern. Must itself match the pattern supplied. */
/**
* An example of a feature name that matches the pattern. Must itself match the pattern supplied.
* @nullable
*/
example?: string | null;
/** A JavaScript regular expression pattern, without the start and end delimiters. Optional flags are not allowed. */
/**
* A JavaScript regular expression pattern, without the start and end delimiters. Optional flags are not allowed.
* @nullable
*/
pattern: string | null;
}

View File

@ -8,7 +8,10 @@
* Data used to create a new feature toggle.
*/
export interface CreateFeatureSchema {
/** Detailed description of the feature */
/**
* Detailed description of the feature
* @nullable
*/
description?: string | null;
/** `true` if the impression data collection is enabled for the feature, otherwise `false`. */
impressionData?: boolean;

View File

@ -13,7 +13,10 @@ import type { CreateStrategyVariantSchema } from './createStrategyVariantSchema'
export interface CreateFeatureStrategySchema {
/** A list of the constraints attached to the strategy. See https://docs.getunleash.io/reference/strategy-constraints */
constraints?: ConstraintSchema[];
/** A toggle to disable the strategy. defaults to false. Disabled strategies are not evaluated or returned to the SDKs */
/**
* A toggle to disable the strategy. defaults to false. Disabled strategies are not evaluated or returned to the SDKs
* @nullable
*/
disabled?: boolean | null;
/** The name of the strategy type */
name: string;
@ -23,7 +26,10 @@ export interface CreateFeatureStrategySchema {
segments?: number[];
/** The order of the strategy in the list */
sortOrder?: number;
/** A descriptive title for the strategy */
/**
* A descriptive title for the strategy
* @nullable
*/
title?: string | null;
/** Strategy level variants */
variants?: CreateStrategyVariantSchema[];

View File

@ -9,13 +9,19 @@ import type { CreateGroupSchemaUsersItem } from './createGroupSchemaUsersItem';
* A detailed information about a user group
*/
export interface CreateGroupSchema {
/** A custom description of the group */
/**
* A custom description of the group
* @nullable
*/
description?: string | null;
/** A list of SSO groups that should map to this Unleash group */
mappingsSSO?: string[];
/** The name of the group */
name: string;
/** A role id that is used as the root role for all users in this group. This can be either the id of the Viewer, Editor or Admin role. */
/**
* A role id that is used as the root role for all users in this group. This can be either the id of the Viewer, Editor or Admin role.
* @nullable
*/
rootRole?: number | null;
/** A list of users belonging to this group */
users?: CreateGroupSchemaUsersItem[];

View File

@ -8,6 +8,9 @@
* A minimal user object
*/
export type CreateGroupSchemaUsersItemUser = {
/** The user id */
/**
* The user id
* @minimum 0
*/
id: number;
};

View File

@ -3,20 +3,37 @@
* Do not edit manually.
* See `gen:api` script in package.json
*/
import type { CreateProjectSchemaChangeRequestEnvironmentsItem } from './createProjectSchemaChangeRequestEnvironmentsItem';
import type { CreateProjectSchemaMode } from './createProjectSchemaMode';
/**
* Data used to create a new [project](https://docs.getunleash.io/reference/projects).
*/
export interface CreateProjectSchema {
/** A list of environments that should have change requests enabled. If the list includes environments not in the `environments` list, they will still have change requests enabled. */
changeRequestEnvironments?: CreateProjectSchemaChangeRequestEnvironmentsItem[];
/** A default stickiness for the project affecting the default stickiness value for variants and Gradual Rollout strategy */
defaultStickiness?: string;
/** The project's description. */
/**
* The project's description.
* @nullable
*/
description?: string | null;
/** The project's identifier. */
/**
* A list of environments that should be enabled for this project. The list must contain at least one environment. If this property is missing, Unleash will default to enabling all non-deprecated environments for the project. This is a beta feature and is not yet generally available.
* @minItems 1
*/
environments?: string[];
/**
* The project's identifier.
* @pattern [A-Za-z0-9_~.-]+
*/
id: string;
/** A mode of the project affecting what actions are possible in this project */
mode?: CreateProjectSchemaMode;
/** The project's name. */
/**
* The project's name.
* @minLength 1
*/
name: string;
}

View File

@ -0,0 +1,12 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/
export type CreateProjectSchemaChangeRequestEnvironmentsItem = {
/** The name of the environment to configure change requests for. */
name: string;
/** The number of approvals required for a change request to be fully approved and ready to applied in this environment. If no value is provided, it will be set to the default number, which is 1. Values will be clamped to between 1 and 10 inclusive. this is a beta feature is not yet generally available. */
requiredApprovals?: number;
};

View File

@ -8,7 +8,10 @@
* Describes the properties required to create or update a signal endpoint.
*/
export interface CreateSignalEndpointSchema {
/** A more detailed description of the signal endpoint and its intended use. */
/**
* A more detailed description of the signal endpoint and its intended use.
* @nullable
*/
description?: string | null;
/** Whether the signal endpoint is currently enabled. If not specified, defaults to true. */
enabled?: boolean;

View File

@ -16,7 +16,11 @@ export interface CreateStrategyVariantSchema {
payload?: CreateStrategyVariantSchemaPayload;
/** The [stickiness](https://docs.getunleash.io/reference/feature-toggle-variants#variant-stickiness) to use for distribution of this variant. Stickiness is how Unleash guarantees that the same user gets the same variant every time */
stickiness: string;
/** The weight is the likelihood of any one user getting this variant. It is an integer between 0 and 1000. See the section on [variant weights](https://docs.getunleash.io/reference/feature-toggle-variants#variant-weight) for more information */
/**
* The weight is the likelihood of any one user getting this variant. It is an integer between 0 and 1000. See the section on [variant weights](https://docs.getunleash.io/reference/feature-toggle-variants#variant-weight) for more information
* @minimum 0
* @maximum 1000
*/
weight: number;
/** Set to `fix` if this variant must have exactly the weight allocated to it. If the type is `variable`, the weight will adjust so that the total weight of all variants adds up to 1000. Refer to the [variant weight documentation](https://docs.getunleash.io/reference/feature-toggle-variants#variant-weight). */
weightType: CreateStrategyVariantSchemaWeightType;

View File

@ -28,18 +28,33 @@ export interface CreateUserResponseSchema {
* @deprecated
*/
isAPI?: boolean;
/** How many unsuccessful attempts at logging in has the user made */
/**
* How many unsuccessful attempts at logging in has the user made
* @minimum 0
*/
loginAttempts?: number;
/** Name of the user */
/**
* Name of the user
* @nullable
*/
name?: string | null;
/** Deprecated */
permissions?: string[];
/** Which [root role](https://docs.getunleash.io/reference/rbac#predefined-roles) this user is assigned. Usually a numeric role ID, but can be a string when returning newly created user with an explicit string role. */
rootRole?: CreateUserResponseSchemaRootRole;
/** The SCIM ID of the user, only present if managed by SCIM */
/**
* The SCIM ID of the user, only present if managed by SCIM
* @nullable
*/
scimId?: string | null;
/** The last time this user logged in */
/**
* The last time this user logged in
* @nullable
*/
seenAt?: string | null;
/** A unique username for the user */
/**
* A unique username for the user
* @nullable
*/
username?: string | null;
}

View File

@ -13,17 +13,26 @@ import type { ProjectStatsSchema } from './projectStatsSchema';
* A high-level overview of a project. It contains information such as project statistics, the name of the project, what members and what features it contains, etc.
*/
export interface DeprecatedProjectOverviewSchema {
/** When the project was created. */
/**
* When the project was created.
* @nullable
*/
createdAt?: string | null;
/** A default stickiness for the project affecting the default stickiness value for variants and Gradual Rollout strategy */
defaultStickiness?: string;
/** Additional information about the project */
/**
* Additional information about the project
* @nullable
*/
description?: string | null;
/** The environments that are enabled for this project */
environments?: ProjectEnvironmentSchema[];
/** `true` if the project was favorited, otherwise `false`. */
favorite?: boolean;
/** A limit on the number of features allowed in the project. Null if no limit. */
/**
* A limit on the number of features allowed in the project. Null if no limit.
* @nullable
*/
featureLimit?: number | null;
featureNaming?: CreateFeatureNamingPatternSchema;
/** The full list of features in this project (excluding archived features) */
@ -38,7 +47,10 @@ export interface DeprecatedProjectOverviewSchema {
name: string;
/** Project statistics */
stats?: ProjectStatsSchema;
/** When the project was last updated. */
/**
* When the project was last updated.
* @nullable
*/
updatedAt?: string | null;
/** The schema version used to describe the project overview */
version: number;

View File

@ -15,9 +15,15 @@ export interface EnvironmentProjectSchema {
enabled: boolean;
/** The name of the environment */
name: string;
/** The number of client and front-end API tokens that have access to this project */
/**
* The number of client and front-end API tokens that have access to this project
* @minimum 0
*/
projectApiTokenCount?: number;
/** The number of features enabled in this environment for this project */
/**
* The number of features enabled in this environment for this project
* @minimum 0
*/
projectEnabledToggleCount?: number;
/** `true` if the environment is protected, otherwise `false`. A *protected* environment can not be deleted. */
protected: boolean;

View File

@ -8,15 +8,27 @@
* A definition of the project environment
*/
export interface EnvironmentSchema {
/** The number of API tokens for the project environment */
/**
* The number of API tokens for the project environment
* @minimum 0
* @nullable
*/
apiTokenCount?: number | null;
/** `true` if the environment is enabled for the project, otherwise `false`. */
enabled: boolean;
/** The number of enabled toggles for the project environment */
/**
* The number of enabled toggles for the project environment
* @minimum 0
* @nullable
*/
enabledToggleCount?: number | null;
/** The name of the environment */
name: string;
/** The number of projects with this environment */
/**
* The number of projects with this environment
* @minimum 0
* @nullable
*/
projectCount?: number | null;
/** `true` if the environment is protected, otherwise `false`. A *protected* environment can not be deleted. */
protected: boolean;

View File

@ -16,21 +16,45 @@ export interface EventSchema {
createdAt: string;
/** Which user created this event */
createdBy: string;
/** The is of the user that created this event */
/**
* The is of the user that created this event
* @nullable
*/
createdByUserId?: number | null;
/** Extra associated data related to the event, such as feature toggle state, segment configuration, etc., if applicable. */
/**
* Extra associated data related to the event, such as feature toggle state, segment configuration, etc., if applicable.
* @nullable
*/
data?: EventSchemaData;
/** The feature toggle environment the event relates to, if applicable. */
/**
* The feature toggle environment the event relates to, if applicable.
* @nullable
*/
environment?: string | null;
/** The name of the feature toggle the event relates to, if applicable. */
/**
* The name of the feature toggle the event relates to, if applicable.
* @nullable
*/
featureName?: string | null;
/** The ID of the event. An increasing natural number. */
/**
* The ID of the event. An increasing natural number.
* @minimum 1
*/
id: number;
/** Data relating to the previous state of the event's subject. */
/**
* Data relating to the previous state of the event's subject.
* @nullable
*/
preData?: EventSchemaPreData;
/** The project the event relates to, if applicable. */
/**
* The project the event relates to, if applicable.
* @nullable
*/
project?: string | null;
/** Any tags related to the event, if applicable. */
/**
* Any tags related to the event, if applicable.
* @nullable
*/
tags?: TagSchema[] | null;
/** What [type](https://docs.getunleash.io/reference/api/legacy/unleash/admin/events#event-type-description) of event this is */
type: EventSchemaType;

View File

@ -6,5 +6,6 @@
/**
* Extra associated data related to the event, such as feature toggle state, segment configuration, etc., if applicable.
* @nullable
*/
export type EventSchemaData = { [key: string]: any } | null;

View File

@ -6,5 +6,6 @@
/**
* Data relating to the previous state of the event's subject.
* @nullable
*/
export type EventSchemaPreData = { [key: string]: any } | null;

View File

@ -12,8 +12,14 @@ import type { EventsSchemaVersion } from './eventsSchemaVersion';
export interface EventsSchema {
/** The list of events */
events: EventSchema[];
/** The total count of events */
/**
* The total count of events
* @minimum 0
*/
totalEvents?: number;
/** The api version of this response. A natural increasing number. Only increases if format changes */
/**
* The api version of this response. A natural increasing number. Only increases if format changes
* @minimum 1
*/
version: EventsSchemaVersion;
}

View File

@ -6,6 +6,7 @@
/**
* The api version of this response. A natural increasing number. Only increases if format changes
* @minimum 1
*/
export type EventsSchemaVersion =
(typeof EventsSchemaVersion)[keyof typeof EventsSchemaVersion];

View File

@ -16,12 +16,18 @@ export interface FeatureEnvironmentMetricsSchema {
environment: string;
/** The name of the feature */
featureName?: string;
/** How many times the toggle evaluated to false */
/**
* How many times the toggle evaluated to false
* @minimum 0
*/
no: number;
/** The start of the time window these metrics are valid for. The window is usually 1 hour wide */
timestamp: DateSchema;
/** How many times each variant was returned */
variants?: FeatureEnvironmentMetricsSchemaVariants;
/** How many times the toggle evaluated to true */
/**
* How many times the toggle evaluated to true
* @minimum 0
*/
yes: number;
}

View File

@ -20,7 +20,10 @@ export interface FeatureEnvironmentSchema {
hasEnabledStrategies?: boolean;
/** Whether the feature has any strategies defined. */
hasStrategies?: boolean;
/** The date when metrics where last collected for the feature environment */
/**
* The date when metrics where last collected for the feature environment
* @nullable
*/
lastSeenAt?: string | null;
/** The name of the environment */
name: string;

View File

@ -14,8 +14,14 @@ export interface FeatureEventsSchema {
events: EventSchema[];
/** The name of the feature toggle these events relate to */
toggleName?: string;
/** How many events are there for this feature toggle */
/**
* How many events are there for this feature toggle
* @minimum 0
*/
totalEvents?: number;
/** An API versioning number */
/**
* An API versioning number
* @minimum 1
*/
version?: FeatureEventsSchemaVersion;
}

View File

@ -6,6 +6,7 @@
/**
* An API versioning number
* @minimum 1
*/
export type FeatureEventsSchemaVersion =
(typeof FeatureEventsSchemaVersion)[keyof typeof FeatureEventsSchemaVersion];

View File

@ -13,6 +13,9 @@ export interface FeatureMetricsSchema {
data: FeatureEnvironmentMetricsSchema[];
/** The maturity level of this API (alpha, beta, stable, deprecated) */
maturity: string;
/** The version of this schema */
/**
* The version of this schema
* @minimum 1
*/
version: number;
}

View File

@ -5,6 +5,7 @@
*/
import type { FeatureSchemaDependenciesItem } from './featureSchemaDependenciesItem';
import type { FeatureEnvironmentSchema } from './featureEnvironmentSchema';
import type { FeatureSchemaLifecycle } from './featureSchemaLifecycle';
import type { FeatureSchemaStrategiesItem } from './featureSchemaStrategiesItem';
import type { TagSchema } from './tagSchema';
import type { VariantSchema } from './variantSchema';
@ -15,15 +16,24 @@ import type { VariantSchema } from './variantSchema';
export interface FeatureSchema {
/** `true` if the feature is archived */
archived?: boolean;
/** The date the feature was archived */
/**
* The date the feature was archived
* @nullable
*/
archivedAt?: string | null;
/** The list of child feature names. This is an experimental field and may change. */
children?: string[];
/** The date the feature was created */
/**
* The date the feature was created
* @nullable
*/
createdAt?: string | null;
/** The list of parent dependencies. This is an experimental field and may change. */
dependencies?: FeatureSchemaDependenciesItem[];
/** Detailed description of the feature */
/**
* Detailed description of the feature
* @nullable
*/
description?: string | null;
/** `true` if the feature is enabled, otherwise `false`. */
enabled?: boolean;
@ -36,8 +46,11 @@ export interface FeatureSchema {
/**
* The date when metrics where last collected for the feature. This field is deprecated, use the one in featureEnvironmentSchema
* @deprecated
* @nullable
*/
lastSeenAt?: string | null;
/** Current lifecycle stage of the feature */
lifecycle?: FeatureSchemaLifecycle;
/** Unique feature name */
name: string;
/** Name of the project the feature belongs to */
@ -49,7 +62,10 @@ export interface FeatureSchema {
* @deprecated
*/
strategies?: FeatureSchemaStrategiesItem[];
/** The list of feature tags */
/**
* The list of feature tags
* @nullable
*/
tags?: TagSchema[] | null;
/** Type of the toggle e.g. experiment, kill-switch, release, operational, permission */
type?: string;

View File

@ -0,0 +1,16 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/
import type { FeatureSchemaLifecycleStage } from './featureSchemaLifecycleStage';
/**
* Current lifecycle stage of the feature
*/
export type FeatureSchemaLifecycle = {
/** When the feature entered this stage */
enteredStageAt: string;
/** The name of the current lifecycle stage */
stage: FeatureSchemaLifecycleStage;
};

View File

@ -0,0 +1,20 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/
/**
* The name of the current lifecycle stage
*/
export type FeatureSchemaLifecycleStage =
(typeof FeatureSchemaLifecycleStage)[keyof typeof FeatureSchemaLifecycleStage];
// eslint-disable-next-line @typescript-eslint/no-redeclare
export const FeatureSchemaLifecycleStage = {
initial: 'initial',
'pre-live': 'pre-live',
live: 'live',
completed: 'completed',
archived: 'archived',
} as const;

View File

@ -20,11 +20,17 @@ export interface FeatureSearchEnvironmentSchema {
hasEnabledStrategies?: boolean;
/** Whether the feature has any strategies defined. */
hasStrategies?: boolean;
/** The date when metrics where last collected for the feature environment */
/**
* The date when metrics where last collected for the feature environment
* @nullable
*/
lastSeenAt?: string | null;
/** The name of the environment */
name: string;
/** How many times the toggle evaluated to false in last hour bucket */
/**
* How many times the toggle evaluated to false in last hour bucket
* @minimum 0
*/
no?: number;
/** The sort order of the feature environment in the feature environments list */
sortOrder?: number;
@ -36,6 +42,9 @@ export interface FeatureSearchEnvironmentSchema {
variantCount?: number;
/** A list of variants for the feature environment */
variants?: VariantSchema[];
/** How many times the toggle evaluated to true in last hour bucket */
/**
* How many times the toggle evaluated to true in last hour bucket
* @minimum 0
*/
yes?: number;
}

View File

@ -15,13 +15,25 @@ import type { VariantSchema } from './variantSchema';
export interface FeatureSearchResponseSchema {
/** `true` if the feature is archived */
archived?: boolean;
/** The date the feature was archived */
/**
* The date the feature was archived
* @nullable
*/
archivedAt?: string | null;
/** The date the feature was created */
/**
* The date the feature was created
* @nullable
*/
createdAt: string | null;
/** The type of dependency. 'parent' means that the feature is a parent feature, 'child' means that the feature is a child feature. */
/**
* The type of dependency. 'parent' means that the feature is a parent feature, 'child' means that the feature is a child feature.
* @nullable
*/
dependencyType: FeatureSearchResponseSchemaDependencyType;
/** Detailed description of the feature */
/**
* Detailed description of the feature
* @nullable
*/
description?: string | null;
/** The list of environments where the feature can be used */
environments: FeatureSearchEnvironmentSchema[];
@ -32,6 +44,7 @@ export interface FeatureSearchResponseSchema {
/**
* The date when metrics where last collected for the feature. This field is deprecated, use the one in featureEnvironmentSchema
* @deprecated
* @nullable
*/
lastSeenAt?: string | null;
/** Unique feature name */
@ -47,7 +60,10 @@ export interface FeatureSearchResponseSchema {
* @deprecated
*/
strategies?: FeatureSearchResponseSchemaStrategiesItem[];
/** The list of feature tags */
/**
* The list of feature tags
* @nullable
*/
tags?: TagSchema[] | null;
/** Type of the toggle e.g. experiment, kill-switch, release, operational, permission */
type: string;

View File

@ -6,6 +6,7 @@
/**
* The type of dependency. 'parent' means that the feature is a parent feature, 'child' means that the feature is a child feature.
* @nullable
*/
export type FeatureSearchResponseSchemaDependencyType =
| (typeof FeatureSearchResponseSchemaDependencyType)[keyof typeof FeatureSearchResponseSchemaDependencyType]

View File

@ -13,7 +13,10 @@ import type { StrategyVariantSchema } from './strategyVariantSchema';
export interface FeatureStrategySchema {
/** A list of the constraints attached to the strategy. See https://docs.getunleash.io/reference/strategy-constraints */
constraints?: ConstraintSchema[];
/** A toggle to disable the strategy. defaults to false. Disabled strategies are not evaluated or returned to the SDKs */
/**
* A toggle to disable the strategy. defaults to false. Disabled strategies are not evaluated or returned to the SDKs
* @nullable
*/
disabled?: boolean | null;
/** The name or feature the strategy is attached to */
featureName?: string;
@ -26,7 +29,10 @@ export interface FeatureStrategySchema {
segments?: number[];
/** The order of the strategy in the list */
sortOrder?: number;
/** A descriptive title for the strategy */
/**
* A descriptive title for the strategy
* @nullable
*/
title?: string | null;
/** Strategy level variants */
variants?: StrategyVariantSchema[];

View File

@ -8,7 +8,10 @@
* Describes a tag applied to a feature
*/
export interface FeatureTagSchema {
/** The id of the user who created this tag */
/**
* The id of the user who created this tag
* @nullable
*/
createdByUserId?: number | null;
/** The name of the feature this tag is applied to */
featureName: string;

View File

@ -12,7 +12,11 @@ export interface FeatureTypeSchema {
description: string;
/** The identifier of this feature toggle type. */
id: string;
/** How many days it takes before a feature toggle of this typed is flagged as [potentially stale](https://docs.getunleash.io/reference/technical-debt#stale-and-potentially-stale-toggles) by Unleash. If this value is `null`, Unleash will never mark it as potentially stale. */
/**
* How many days it takes before a feature toggle of this typed is flagged as [potentially stale](https://docs.getunleash.io/reference/technical-debt#stale-and-potentially-stale-toggles) by Unleash. If this value is `null`, Unleash will never mark it as potentially stale.
* @minimum 0
* @nullable
*/
lifetimeDays: number | null;
/** The display name of this feature toggle type. */
name: string;

View File

@ -17,6 +17,9 @@ export interface FeatureUsageSchema {
maturity: string;
/** A list of applications seen using this feature */
seenApplications: string[];
/** The version of this schema */
/**
* The version of this schema
* @minimum 1
*/
version: number;
}

View File

@ -10,7 +10,10 @@
export interface FeedbackResponseSchema {
/** The name of the feedback session */
feedbackId?: string;
/** When this feedback was given */
/**
* When this feedback was given
* @nullable
*/
given?: string | null;
/** `true` if the user has asked never to see this feedback questionnaire again. */
neverShow?: boolean;

View File

@ -8,18 +8,30 @@
* Schema representing feedback information.
*/
export interface FeedbackSchema {
/** Details aspects of the service or product that could benefit from enhancements or modifications. Aids in pinpointing areas needing attention for improvement. */
/**
* Details aspects of the service or product that could benefit from enhancements or modifications. Aids in pinpointing areas needing attention for improvement.
* @nullable
*/
areasForImprovement: string | null;
/** The category of the feedback. */
category: string;
/** The date and time when the feedback was provided. */
createdAt: string;
/** A score indicating the difficulty experienced by the user. */
/**
* A score indicating the difficulty experienced by the user.
* @nullable
*/
difficultyScore: number | null;
/** The unique identifier of the feedback. */
id: number;
/** This field is for users to mention what they liked. */
/**
* This field is for users to mention what they liked.
* @nullable
*/
positive: string | null;
/** The type of user providing the feedback. */
/**
* The type of user providing the feedback.
* @nullable
*/
userType: string | null;
}

View File

@ -8,7 +8,10 @@
* User feedback information to be updated.
*/
export interface FeedbackUpdateSchema {
/** When this feedback was given */
/**
* When this feedback was given
* @nullable
*/
given?: string | null;
/** `true` if the user has asked never to see this feedback questionnaire again. */
neverShow?: boolean;

View File

@ -9,11 +9,20 @@ import type { GroupUserModelSchema } from './groupUserModelSchema';
* A detailed information about a user group
*/
export interface GroupSchema {
/** When was this group created */
/**
* When was this group created
* @nullable
*/
createdAt?: string | null;
/** A user who created this group */
/**
* A user who created this group
* @nullable
*/
createdBy?: string | null;
/** A custom description of the group */
/**
* A custom description of the group
* @nullable
*/
description?: string | null;
/** The group id */
id?: number;
@ -23,11 +32,20 @@ export interface GroupSchema {
name: string;
/** A list of projects where this group is used */
projects?: string[];
/** A role id that is used as the root role for all users in this group. This can be either the id of the Viewer, Editor or Admin role. */
/**
* A role id that is used as the root role for all users in this group. This can be either the id of the Viewer, Editor or Admin role.
* @nullable
*/
rootRole?: number | null;
/** The SCIM ID of the group, only present if managed by SCIM */
/**
* The SCIM ID of the group, only present if managed by SCIM
* @nullable
*/
scimId?: string | null;
/** The number of users that belong to this group */
/**
* The number of users that belong to this group
* @minimum 0
*/
userCount?: number;
/** A list of users belonging to this group */
users?: GroupUserModelSchema[];

View File

@ -9,7 +9,10 @@ import type { UserSchema } from './userSchema';
* Details for a single user belonging to a group
*/
export interface GroupUserModelSchema {
/** The username of the user who added this user to this group */
/**
* The username of the user who added this user to this group
* @nullable
*/
createdBy?: string | null;
/** The date when the user joined the group */
joinedAt?: string;

View File

@ -11,25 +11,46 @@ import type { GroupUserModelSchema } from './groupUserModelSchema';
export interface GroupWithProjectRoleSchema {
/** When this group was added to the project */
addedAt?: string;
/** When was this group created */
/**
* When was this group created
* @nullable
*/
createdAt?: string | null;
/** A user who created this group */
/**
* A user who created this group
* @nullable
*/
createdBy?: string | null;
/** A custom description of the group */
/**
* A custom description of the group
* @nullable
*/
description?: string | null;
/** The group's ID in the Unleash system */
/**
* The group's ID in the Unleash system
* @minimum 0
*/
id: number;
/** A list of SSO groups that should map to this Unleash group */
mappingsSSO?: string[];
/** The name of the group */
name?: string;
/** The ID of the role this group has in the given project */
/**
* The ID of the role this group has in the given project
* @minimum 0
*/
roleId?: number;
/** A list of roles this user has in the given project */
roles?: number[];
/** A role id that is used as the root role for all users in this group. This can be either the id of the Viewer, Editor or Admin role. */
/**
* A role id that is used as the root role for all users in this group. This can be either the id of the Viewer, Editor or Admin role.
* @nullable
*/
rootRole?: number | null;
/** The SCIM ID of the group, only present if managed by SCIM */
/**
* The SCIM ID of the group, only present if managed by SCIM
* @nullable
*/
scimId?: string | null;
/** A list of users belonging to this group */
users?: GroupUserModelSchema[];

View File

@ -13,24 +13,36 @@ import type { ProjectStatsSchema } from './projectStatsSchema';
* An overview of a project's stats and its health as described in the documentation on [technical debt](https://docs.getunleash.io/reference/technical-debt)
*/
export interface HealthOverviewSchema {
/** When the project was last updated. */
/**
* When the project was last updated.
* @nullable
*/
createdAt?: string | null;
/** A default stickiness for the project affecting the default stickiness value for variants and Gradual Rollout strategy */
defaultStickiness: string;
/** The project's description */
/**
* The project's description
* @nullable
*/
description?: string | null;
/** An array containing the names of all the environments configured for the project. */
environments: ProjectEnvironmentSchema[];
/** Indicates if the project has been marked as a favorite by the current user requesting the project health overview. */
favorite?: boolean;
/** A limit on the number of features allowed in the project. Null if no limit. */
/**
* A limit on the number of features allowed in the project. Null if no limit.
* @nullable
*/
featureLimit?: number | null;
featureNaming?: CreateFeatureNamingPatternSchema;
/** An array containing an overview of all the features of the project and their individual status */
features: FeatureSchema[];
/** The overall [health rating](https://docs.getunleash.io/reference/technical-debt#health-rating) of the project. */
health: number;
/** The number of users/members in the project. */
/**
* The number of users/members in the project.
* @minimum 0
*/
members: number;
/** The project's [collaboration mode](https://docs.getunleash.io/reference/project-collaboration-mode). Determines whether non-project members can submit change requests or not. */
mode: HealthOverviewSchemaMode;
@ -38,7 +50,10 @@ export interface HealthOverviewSchema {
name: string;
/** Project statistics */
stats?: ProjectStatsSchema;
/** When the project was last updated. */
/**
* When the project was last updated.
* @nullable
*/
updatedAt?: string | null;
/** The project overview version. */
version: number;

View File

@ -15,24 +15,36 @@ import type { ProjectStatsSchema } from './projectStatsSchema';
export interface HealthReportSchema {
/** The number of active feature toggles. */
activeCount: number;
/** When the project was last updated. */
/**
* When the project was last updated.
* @nullable
*/
createdAt?: string | null;
/** A default stickiness for the project affecting the default stickiness value for variants and Gradual Rollout strategy */
defaultStickiness: string;
/** The project's description */
/**
* The project's description
* @nullable
*/
description?: string | null;
/** An array containing the names of all the environments configured for the project. */
environments: ProjectEnvironmentSchema[];
/** Indicates if the project has been marked as a favorite by the current user requesting the project health overview. */
favorite?: boolean;
/** A limit on the number of features allowed in the project. Null if no limit. */
/**
* A limit on the number of features allowed in the project. Null if no limit.
* @nullable
*/
featureLimit?: number | null;
featureNaming?: CreateFeatureNamingPatternSchema;
/** An array containing an overview of all the features of the project and their individual status */
features: FeatureSchema[];
/** The overall [health rating](https://docs.getunleash.io/reference/technical-debt#health-rating) of the project. */
health: number;
/** The number of users/members in the project. */
/**
* The number of users/members in the project.
* @minimum 0
*/
members: number;
/** The project's [collaboration mode](https://docs.getunleash.io/reference/project-collaboration-mode). Determines whether non-project members can submit change requests or not. */
mode: HealthReportSchemaMode;
@ -44,7 +56,10 @@ export interface HealthReportSchema {
staleCount: number;
/** Project statistics */
stats?: ProjectStatsSchema;
/** When the project was last updated. */
/**
* When the project was last updated.
* @nullable
*/
updatedAt?: string | null;
/** The project overview version. */
version: number;

View File

@ -12,14 +12,29 @@ export interface InactiveUserSchema {
createdAt?: string;
/** Email of the user */
email?: string;
/** The user id */
/**
* The user id
* @minimum 0
*/
id: number;
/** Name of the user */
/**
* Name of the user
* @nullable
*/
name?: string | null;
/** The last time this user's PAT token (if any) was used */
/**
* The last time this user's PAT token (if any) was used
* @nullable
*/
patSeenAt?: string | null;
/** The last time this user logged in */
/**
* The last time this user logged in
* @nullable
*/
seenAt?: string | null;
/** A unique username for the user */
/**
* A unique username for the user
* @nullable
*/
username?: string | null;
}

View File

@ -11,6 +11,9 @@ import type { InactiveUserSchema } from './inactiveUserSchema';
export interface InactiveUsersSchema {
/** The list of users that are flagged as inactive */
inactiveUsers: InactiveUserSchema[];
/** The version of this schema. Used to keep track of compatibility */
/**
* The version of this schema. Used to keep track of compatibility
* @minimum 1
*/
version: number;
}

View File

@ -378,6 +378,7 @@ export * from './createProjectApiToken401';
export * from './createProjectApiToken403';
export * from './createProjectApiToken404';
export * from './createProjectSchema';
export * from './createProjectSchemaChangeRequestEnvironmentsItem';
export * from './createProjectSchemaMode';
export * from './createPublicSignupToken400';
export * from './createPublicSignupToken401';
@ -542,6 +543,8 @@ export * from './featureLifecycleSchemaItemStage';
export * from './featureMetricsSchema';
export * from './featureSchema';
export * from './featureSchemaDependenciesItem';
export * from './featureSchemaLifecycle';
export * from './featureSchemaLifecycleStage';
export * from './featureSchemaStrategiesItem';
export * from './featureSearchEnvironmentSchema';
export * from './featureSearchResponseSchema';
@ -848,7 +851,6 @@ export * from './patchFeatureVariants403';
export * from './patchFeatureVariants404';
export * from './patchSchema';
export * from './patchSchemaOp';
export * from './patchSchemaValue';
export * from './patchesSchema';
export * from './patsSchema';
export * from './permissionSchema';
@ -898,6 +900,17 @@ export * from './projectRoleSchema';
export * from './projectRoleUsageSchema';
export * from './projectSchema';
export * from './projectSchemaMode';
export * from './projectSchemaOwners';
export * from './projectSchemaOwnersOneOfItem';
export * from './projectSchemaOwnersOneOfItemAnyOf';
export * from './projectSchemaOwnersOneOfItemAnyOfEmail';
export * from './projectSchemaOwnersOneOfItemAnyOfFive';
export * from './projectSchemaOwnersOneOfItemAnyOfFiveName';
export * from './projectSchemaOwnersOneOfItemAnyOfFiveOwnerType';
export * from './projectSchemaOwnersOneOfItemAnyOfImageUrl';
export * from './projectSchemaOwnersOneOfItemAnyOfOwnerType';
export * from './projectSchemaOwnersOneOfNineItem';
export * from './projectSchemaOwnersOneOfNineItemOwnerType';
export * from './projectSettingsSchema';
export * from './projectSettingsSchemaDefaultStickiness';
export * from './projectSettingsSchemaMode';

View File

@ -16,17 +16,35 @@ export interface InstanceAdminStatsSchema {
activeUsers?: InstanceAdminStatsSchemaActiveUsers;
/** A count of connected applications in the last week, last month and all time since last restart */
clientApps?: InstanceAdminStatsSchemaClientAppsItem[];
/** The number of context fields defined in this instance. */
/**
* The number of context fields defined in this instance.
* @minimum 0
*/
contextFields?: number;
/** The number of environments defined in this instance */
/**
* The number of environments defined in this instance
* @minimum 0
*/
environments?: number;
/** The number of export operations on this instance */
/**
* The number of export operations on this instance
* @minimum 0
*/
featureExports?: number;
/** The number of import operations on this instance */
/**
* The number of import operations on this instance
* @minimum 0
*/
featureImports?: number;
/** The number of feature-toggles this instance has */
/**
* The number of feature-toggles this instance has
* @minimum 0
*/
featureToggles?: number;
/** The number of groups defined in this instance */
/**
* The number of groups defined in this instance
* @minimum 0
*/
groups?: number;
/** A unique identifier for this instance. Generated by the database migration scripts at first run. Typically a UUID. */
instanceId: string;
@ -36,21 +54,39 @@ export interface InstanceAdminStatsSchema {
previousDayMetricsBucketsCount?: InstanceAdminStatsSchemaPreviousDayMetricsBucketsCount;
/** The number of changes to the production environment in the last 30, 60 and 90 days */
productionChanges?: InstanceAdminStatsSchemaProductionChanges;
/** The number of projects defined in this instance. */
/**
* The number of projects defined in this instance.
* @minimum 0
*/
projects?: number;
/** The number of roles defined in this instance */
/**
* The number of roles defined in this instance
* @minimum 0
*/
roles?: number;
/** Whether or not SAML authentication is enabled for this instance */
SAMLenabled?: boolean;
/** The number of segments defined in this instance */
/**
* The number of segments defined in this instance
* @minimum 0
*/
segments?: number;
/** The number of strategies defined in this instance */
/**
* The number of strategies defined in this instance
* @minimum 0
*/
strategies?: number;
/** A SHA-256 checksum of the instance statistics to be used to verify that the data in this object has not been tampered with */
sum?: string;
/** When these statistics were produced */
/**
* When these statistics were produced
* @nullable
*/
timestamp?: string | null;
/** The number of users this instance has */
/**
* The number of users this instance has
* @minimum 0
*/
users?: number;
/** The version of Unleash Enterprise that is bundled in this instance */
versionEnterprise?: string;

View File

@ -8,12 +8,24 @@
* The number of active users in the last 7, 30 and 90 days
*/
export type InstanceAdminStatsSchemaActiveUsers = {
/** The number of active users in the last 30 days */
/**
* The number of active users in the last 30 days
* @minimum 0
*/
last30?: number;
/** The number of active users in the last 60 days */
/**
* The number of active users in the last 60 days
* @minimum 0
*/
last60?: number;
/** The number of active users in the last 7 days */
/**
* The number of active users in the last 7 days
* @minimum 0
*/
last7?: number;
/** The number of active users in the last 90 days */
/**
* The number of active users in the last 90 days
* @minimum 0
*/
last90?: number;
};

View File

@ -8,8 +8,14 @@
* The number client metrics buckets records recorded in the previous day. # features * # apps * # envs * # hours with metrics
*/
export type InstanceAdminStatsSchemaPreviousDayMetricsBucketsCount = {
/** The number of enabled/disabled metrics buckets recorded in the previous day */
/**
* The number of enabled/disabled metrics buckets recorded in the previous day
* @minimum 0
*/
enabledCount?: number;
/** The number of variant metrics buckets recorded in the previous day */
/**
* The number of variant metrics buckets recorded in the previous day
* @minimum 0
*/
variantCount?: number;
};

View File

@ -8,10 +8,19 @@
* The number of changes to the production environment in the last 30, 60 and 90 days
*/
export type InstanceAdminStatsSchemaProductionChanges = {
/** The number of changes in production in the last 30 days */
/**
* The number of changes in production in the last 30 days
* @minimum 0
*/
last30?: number;
/** The number of changes in production in the last 60 days */
/**
* The number of changes in production in the last 60 days
* @minimum 0
*/
last60?: number;
/** The number of changes in production in the last 90 days */
/**
* The number of changes in production in the last 90 days
* @minimum 0
*/
last90?: number;
};

View File

@ -12,11 +12,20 @@ export interface LoginEventSchema {
auth_type?: string;
/** The date and time of when the login was attempted. */
created_at?: string;
/** The reason for the login failure. This property is only present if the login was unsuccessful. */
/**
* The reason for the login failure. This property is only present if the login was unsuccessful.
* @nullable
*/
failure_reason?: string | null;
/** The event's ID. Event IDs are incrementing integers. In other words, a more recent event will always have a higher ID than an older event. */
/**
* The event's ID. Event IDs are incrementing integers. In other words, a more recent event will always have a higher ID than an older event.
* @minimum 1
*/
id: number;
/** The IP address of the client that attempted to log in. */
/**
* The IP address of the client that attempted to log in.
* @nullable
*/
ip?: string | null;
/** Whether the login was successful or not. */
successful?: boolean;

View File

@ -18,6 +18,9 @@ export type NotificationsSchemaItem = {
message: string;
/** The type of the notification used e.g. for the graphical hints */
notificationType: NotificationsSchemaItemNotificationType;
/** The date and time when the notification was read or marked as read, otherwise `null` */
/**
* The date and time when the notification was read or marked as read, otherwise `null`
* @nullable
*/
readAt: string | null;
};

View File

@ -5,8 +5,14 @@
*/
export type NotificationsSchemaItemCreatedBy = {
/** The avatar url of the user who triggered the notification */
/**
* The avatar url of the user who triggered the notification
* @nullable
*/
imageUrl?: string | null;
/** The name of the user who triggered the notification */
/**
* The name of the user who triggered the notification
* @nullable
*/
username?: string | null;
};

View File

@ -14,11 +14,17 @@ export interface PatSchema {
description: string;
/** The PAT's expiration date. */
expiresAt: string;
/** The PAT's ID. PAT IDs are incrementing integers. In other words, a more recently created PAT will always have a higher ID than an older one. */
/**
* The PAT's ID. PAT IDs are incrementing integers. In other words, a more recently created PAT will always have a higher ID than an older one.
* @minimum 1
*/
id: number;
/** The token used for authentication. It is automatically generated by Unleash when the PAT is created and that is the only time this property is returned. */
secret?: string;
/** When the PAT was last seen/used to authenticate with. `null` if it has not been used yet. */
/**
* When the PAT was last seen/used to authenticate with. `null` if it has not been used yet.
* @nullable
*/
seenAt?: string | null;
/** The ID of the user this PAT belongs to. */
userId?: number;

View File

@ -4,7 +4,6 @@
* See `gen:api` script in package.json
*/
import type { PatchSchemaOp } from './patchSchemaOp';
import type { PatchSchemaValue } from './patchSchemaValue';
/**
* A [JSON patch](https://www.rfc-editor.org/rfc/rfc6902) operation description
@ -17,5 +16,5 @@ export interface PatchSchema {
/** The path to the property to operate on */
path: string;
/** The value to add or replace, if performing one of those operations */
value?: PatchSchemaValue;
value?: unknown;
}

View File

@ -1,10 +0,0 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/
/**
* The value to add or replace, if performing one of those operations
*/
export type PatchSchemaValue = {};

View File

@ -25,10 +25,13 @@ export interface PlaygroundFeatureSchema {
projectId: string;
/** The feature's applicable strategies and cumulative results of the strategies */
strategies: PlaygroundFeatureSchemaStrategies;
/** The feature variant you receive based on the provided context or the _disabled
/**
* The feature variant you receive based on the provided context or the _disabled
variant_. If a feature is disabled or doesn't have any
variants, you would get the _disabled variant_.
Otherwise, you'll get one of thefeature's defined variants. */
Otherwise, you'll get one of thefeature's defined variants.
* @nullable
*/
variant: PlaygroundFeatureSchemaVariant;
/** The feature variants. */
variants: VariantSchema[];

View File

@ -10,6 +10,7 @@ import type { PlaygroundFeatureSchemaVariantPayload } from './playgroundFeatureS
variant_. If a feature is disabled or doesn't have any
variants, you would get the _disabled variant_.
Otherwise, you'll get one of thefeature's defined variants.
* @nullable
*/
export type PlaygroundFeatureSchemaVariant = {
/** Whether the variant is enabled or not. If the feature is disabled or if it doesn't have variants, this property will be `false` */

View File

@ -15,7 +15,10 @@ import type { PlaygroundSegmentSchema } from './playgroundSegmentSchema';
export interface PlaygroundStrategySchema {
/** The strategy's constraints and their evaluation results. */
constraints: PlaygroundConstraintSchema[];
/** The strategy's status. Disabled strategies are not evaluated */
/**
* The strategy's status. Disabled strategies are not evaluated
* @nullable
*/
disabled: boolean | null;
/** The strategy's id. */
id: string;

View File

@ -12,10 +12,13 @@ export type PlaygroundStrategySchemaResultAnyOfFour = {
enabled: boolean;
/** Signals that this strategy was evaluated successfully. */
evaluationStatus: PlaygroundStrategySchemaResultAnyOfFourEvaluationStatus;
/** The feature variant you receive based on the provided context or the _disabled
/**
* The feature variant you receive based on the provided context or the _disabled
variant_. If a feature is disabled or doesn't have any
variants, you would get the _disabled variant_.
Otherwise, you'll get one of the feature's defined variants. */
Otherwise, you'll get one of the feature's defined variants.
* @nullable
*/
variant?: PlaygroundStrategySchemaResultAnyOfFourVariant;
/** The feature variants. */
variants?: VariantSchema[];

View File

@ -10,6 +10,7 @@ import type { PlaygroundStrategySchemaResultAnyOfFourVariantPayload } from './pl
variant_. If a feature is disabled or doesn't have any
variants, you would get the _disabled variant_.
Otherwise, you'll get one of the feature's defined variants.
* @nullable
*/
export type PlaygroundStrategySchemaResultAnyOfFourVariant = {
/** Whether the variant is enabled or not. If the feature is disabled or if it doesn't have variants, this property will be `false` */

View File

@ -7,7 +7,10 @@
export type ProjectAccessConfigurationSchemaRolesItem = {
/** A list of group ids that will be assigned this role */
groups?: number[];
/** The id of the role. */
/**
* The id of the role.
* @minimum 1
*/
id?: number;
/** A list of user ids that will be assigned this role */
users?: number[];

View File

@ -5,6 +5,9 @@
*/
export type ProjectAddRoleAccessSchemaGroupsItem = {
/** A group ID */
/**
* A group ID
* @minimum 0
*/
id: number;
};

View File

@ -5,6 +5,9 @@
*/
export type ProjectAddRoleAccessSchemaUsersItem = {
/** A user ID */
/**
* A user ID
* @minimum 0
*/
id: number;
};

Some files were not shown because too many files have changed in this diff Show More