Skip to content

Commit

Permalink
update openapi
Browse files Browse the repository at this point in the history
  • Loading branch information
Tymek committed Sep 8, 2023
1 parent 2aa63fb commit 3ffaafe
Show file tree
Hide file tree
Showing 32 changed files with 202 additions and 130 deletions.
2 changes: 2 additions & 0 deletions frontend/src/openapi/models/addonTypeSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ export interface AddonTypeSchema {
documentationUrl: string;
/** A description of the addon type. */
description: string;
/** A long description of how to use this addon type. This will be displayed on the top of configuration page. Can contain markdown. */
howTo?: string;
/** A list of [Unleash tag types](https://docs.getunleash.io/reference/tags#tag-types) that this addon uses. These tags will be added to the Unleash instance when an addon of this type is created. */
tagTypes?: TagTypeSchema[];
/** The addon provider's parameters. Use these to configure an addon of this provider type. Items with `required: true` must be provided. */
Expand Down
24 changes: 6 additions & 18 deletions frontend/src/openapi/models/createApiTokenSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,15 @@
* See `gen:api` script in package.json
*/
import type { CreateApiTokenSchemaOneOf } from './createApiTokenSchemaOneOf';
import type { CreateApiTokenSchemaOneOfTwo } from './createApiTokenSchemaOneOfTwo';
import type { CreateApiTokenSchemaOneOfThree } from './createApiTokenSchemaOneOfThree';
import type { CreateApiTokenSchemaOneOfFour } from './createApiTokenSchemaOneOfFour';
import type { CreateApiTokenSchemaOneOfSeven } from './createApiTokenSchemaOneOfSeven';
import type { CreateApiTokenSchemaOneOfOnezero } from './createApiTokenSchemaOneOfOnezero';

/**
* The data required to create an [Unleash API token](https://docs.getunleash.io/reference/api-tokens-and-client-keys).
*/
export type CreateApiTokenSchema =
| (CreateApiTokenSchemaOneOf & {
/** The time when this token should expire. */
expiresAt?: string;
})
| (CreateApiTokenSchemaOneOfFour & {
/** The time when this token should expire. */
expiresAt?: string;
})
| (CreateApiTokenSchemaOneOfSeven & {
/** The time when this token should expire. */
expiresAt?: string;
})
| (CreateApiTokenSchemaOneOfOnezero & {
/** The time when this token should expire. */
expiresAt?: string;
});
| CreateApiTokenSchemaOneOf
| CreateApiTokenSchemaOneOfTwo
| CreateApiTokenSchemaOneOfThree
| CreateApiTokenSchemaOneOfFour;
12 changes: 8 additions & 4 deletions frontend/src/openapi/models/createApiTokenSchemaOneOf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@
* Do not edit manually.
* See `gen:api` script in package.json
*/
import type { CreateApiTokenSchemaOneOfAllOf } from './createApiTokenSchemaOneOfAllOf';
import type { CreateApiTokenSchemaOneOfAllOfTwo } from './createApiTokenSchemaOneOfAllOfTwo';

export type CreateApiTokenSchemaOneOf = CreateApiTokenSchemaOneOfAllOf &
CreateApiTokenSchemaOneOfAllOfTwo;
export type CreateApiTokenSchemaOneOf = {
/** The time when this token should expire. */
expiresAt?: string;
/** An admin token. Must be the string "admin" (not case sensitive). */
type: string;
/** The name of the token. */
tokenName: string;
};
10 changes: 0 additions & 10 deletions frontend/src/openapi/models/createApiTokenSchemaOneOfAllOf.ts

This file was deleted.

10 changes: 0 additions & 10 deletions frontend/src/openapi/models/createApiTokenSchemaOneOfAllOfTwo.ts

This file was deleted.

21 changes: 17 additions & 4 deletions frontend/src/openapi/models/createApiTokenSchemaOneOfFour.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,21 @@
* Do not edit manually.
* See `gen:api` script in package.json
*/
import type { CreateApiTokenSchemaOneOfFourAllOf } from './createApiTokenSchemaOneOfFourAllOf';
import type { CreateApiTokenSchemaOneOfFourAllOfTwo } from './createApiTokenSchemaOneOfFourAllOfTwo';

export type CreateApiTokenSchemaOneOfFour = CreateApiTokenSchemaOneOfFourAllOf &
CreateApiTokenSchemaOneOfFourAllOfTwo;
export type CreateApiTokenSchemaOneOfFour = {
/** The time when this token should expire. */
expiresAt?: string;
/** A client or frontend token. Must be one of the strings "client" or "frontend" (not case sensitive). */
type: string;
/** The environment that the token should be valid for. Defaults to "default" */
environment?: string;
/** The project that the token should be valid for. Defaults to "*" meaning every project. This property is mutually incompatible with the `projects` property. If you specify one, you cannot specify the other. */
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[];
/**
* The name of the token. This property is deprecated. Use `tokenName` instead.
* @deprecated
*/
username: string;
};
10 changes: 0 additions & 10 deletions frontend/src/openapi/models/createApiTokenSchemaOneOfFourAllOf.ts

This file was deleted.

This file was deleted.

11 changes: 0 additions & 11 deletions frontend/src/openapi/models/createApiTokenSchemaOneOfOnezero.ts

This file was deleted.

11 changes: 0 additions & 11 deletions frontend/src/openapi/models/createApiTokenSchemaOneOfSeven.ts

This file was deleted.

16 changes: 0 additions & 16 deletions frontend/src/openapi/models/createApiTokenSchemaOneOfSevenAllOf.ts

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
* See `gen:api` script in package.json
*/

export type CreateApiTokenSchemaOneOfOnezeroAllOf = {
export type CreateApiTokenSchemaOneOfThree = {
/** The time when this token should expire. */
expiresAt?: string;
/** A client or frontend token. Must be one of the strings "client" or "frontend" (not case sensitive). */
type: string;
/** The environment that the token should be valid for. Defaults to "default" */
Expand All @@ -13,4 +15,6 @@ export type CreateApiTokenSchemaOneOfOnezeroAllOf = {
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[];
/** The name of the token. */
tokenName: string;
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
* See `gen:api` script in package.json
*/

export type CreateApiTokenSchemaOneOfOnezeroAllOfTwo = {
export type CreateApiTokenSchemaOneOfTwo = {
/** The time when this token should expire. */
expiresAt?: string;
/** An admin token. Must be the string "admin" (not case sensitive). */
type: string;
/**
* The name of the token. This property is deprecated. Use `tokenName` instead.
* @deprecated
Expand Down
17 changes: 17 additions & 0 deletions frontend/src/openapi/models/createFeatureNamingPatternSchema.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/

/**
* Create a feature naming pattern
*/
export interface CreateFeatureNamingPatternSchema {
/** A JavaScript regular expression pattern, without the start and end delimiters. Optional flags are not allowed. */
pattern: string | null;
/** An example of a feature name that matches the pattern. Must itself match the pattern supplied. */
example?: string | null;
/** A description of the pattern in a human-readable format. Will be shown to users when they create a new feature flag. */
description?: string | null;
}
14 changes: 14 additions & 0 deletions frontend/src/openapi/models/createProjectApiToken404.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/

export type CreateProjectApiToken404 = {
/** The ID of the error instance */
id?: string;
/** The name of the error kind */
name?: string;
/** A description of what went wrong. */
message?: string;
};
14 changes: 14 additions & 0 deletions frontend/src/openapi/models/deleteProjectApiToken400.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/

export type DeleteProjectApiToken400 = {
/** The ID of the error instance */
id?: string;
/** The name of the error kind */
name?: string;
/** A description of what went wrong. */
message?: string;
};
14 changes: 14 additions & 0 deletions frontend/src/openapi/models/deleteProjectApiToken404.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/

export type DeleteProjectApiToken404 = {
/** The ID of the error instance */
id?: string;
/** The name of the error kind */
name?: string;
/** A description of what went wrong. */
message?: string;
};
15 changes: 15 additions & 0 deletions frontend/src/openapi/models/doraFeaturesSchema.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/

/**
* The representation of a dora time to production feature metric
*/
export interface DoraFeaturesSchema {
/** The name of a feature toggle */
name: string;
/** The average number of days it takes a feature toggle to get into production */
timeToProduction: number;
}
4 changes: 4 additions & 0 deletions frontend/src/openapi/models/eventSchemaType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ export const EventSchemaType = {
'context-field-updated': 'context-field-updated',
'context-field-deleted': 'context-field-deleted',
'project-access-added': 'project-access-added',
'project-access-user-roles-updated': 'project-access-user-roles-updated',
'project-access-group-roles-updated': 'project-access-group-roles-updated',
'project-access-user-roles-deleted': 'project-access-user-roles-deleted',
'project-access-group-roles-deleted': 'project-access-group-roles-deleted',
'project-created': 'project-created',
'project-updated': 'project-updated',
'project-deleted': 'project-deleted',
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/openapi/models/featureEnvironmentSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ export interface FeatureEnvironmentSchema {
strategies?: FeatureStrategySchema[];
/** A list of variants for the feature environment */
variants?: VariantSchema[];
/** The date when metrics where last collected for the feature environment */
lastSeenAt?: string | null;
}
14 changes: 14 additions & 0 deletions frontend/src/openapi/models/getProjectDora401.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/

export type GetProjectDora401 = {
/** The ID of the error instance */
id?: string;
/** The name of the error kind */
name?: string;
/** A description of what went wrong. */
message?: string;
};
14 changes: 14 additions & 0 deletions frontend/src/openapi/models/getProjectDora403.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/

export type GetProjectDora403 = {
/** The ID of the error instance */
id?: string;
/** The name of the error kind */
name?: string;
/** A description of what went wrong. */
message?: string;
};
14 changes: 14 additions & 0 deletions frontend/src/openapi/models/getProjectDora404.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/

export type GetProjectDora404 = {
/** The ID of the error instance */
id?: string;
/** The name of the error kind */
name?: string;
/** A description of what went wrong. */
message?: string;
};
2 changes: 2 additions & 0 deletions frontend/src/openapi/models/healthOverviewSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import type { HealthOverviewSchemaMode } from './healthOverviewSchemaMode';
import type { ProjectEnvironmentSchema } from './projectEnvironmentSchema';
import type { FeatureSchema } from './featureSchema';
import type { ProjectStatsSchema } from './projectStatsSchema';
import type { CreateFeatureNamingPatternSchema } from './createFeatureNamingPatternSchema';

/**
* 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)
Expand Down Expand Up @@ -40,4 +41,5 @@ export interface HealthOverviewSchema {
favorite?: boolean;
/** Project statistics */
stats?: ProjectStatsSchema;
featureNaming?: CreateFeatureNamingPatternSchema;
}
2 changes: 2 additions & 0 deletions frontend/src/openapi/models/healthReportSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import type { HealthReportSchemaMode } from './healthReportSchemaMode';
import type { ProjectEnvironmentSchema } from './projectEnvironmentSchema';
import type { FeatureSchema } from './featureSchema';
import type { ProjectStatsSchema } from './projectStatsSchema';
import type { CreateFeatureNamingPatternSchema } from './createFeatureNamingPatternSchema';

/**
* A report of the current health of the requested project, with datapoints like counters of currently active, stale, and potentially stale feature toggles.
Expand Down Expand Up @@ -40,6 +41,7 @@ export interface HealthReportSchema {
favorite?: boolean;
/** Project statistics */
stats?: ProjectStatsSchema;
featureNaming?: CreateFeatureNamingPatternSchema;
/** The number of potentially stale feature toggles. */
potentiallyStaleCount: number;
/** The number of active feature toggles. */
Expand Down
Loading

0 comments on commit 3ffaafe

Please sign in to comment.