Skip to content

Commit

Permalink
chore: generate types
Browse files Browse the repository at this point in the history
Signed-off-by: andreas-unleash <[email protected]>
  • Loading branch information
andreas-unleash committed Oct 17, 2023
1 parent 163545d commit 41e7c51
Show file tree
Hide file tree
Showing 47 changed files with 529 additions and 45 deletions.
32 changes: 32 additions & 0 deletions frontend/src/openapi/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,33 @@
export * from './models';
export * from './apis/auth';
export * from './apis/users';
export * from './apis/environments';
export * from './apis/change-requests';
export * from './apis/service-accounts';
export * from './apis/import-export';
export * from './apis/instance-admin';
export * from './apis/unstable';
export * from './apis/projects';
export * from './apis/features';
export * from './apis/metrics';
export * from './apis/notifications';
export * from './apis/operational';
export * from './apis/public-signup-tokens';
export * from './apis/feature-types';
export * from './apis/archive';
export * from './apis/strategies';
export * from './apis/events';
export * from './apis/playground';
export * from './apis/personal-access-tokens';
export * from './apis/admin-ui';
export * from './apis/context';
export * from './apis/tags';
export * from './apis/addons';
export * from './apis/api-tokens';
export * from './apis/dependencies';
export * from './apis/segments';
export * from './apis/maintenance';
export * from './apis/telemetry';
export * from './apis/client';
export * from './apis/frontend-api';
export * from './apis/edge';
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@
export type ChangeRequestCreateFeatureSchemaOneOfPayload = {
/** The new state of the feature. */
enabled: boolean;
/** Only relevant when ALL the strategies are disabled. If true, all the disabled strategies will be enabled. If false, the default strategy will be added */
shouldActivateDisabledStrategies?: boolean;
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@
* See `gen:api` script in package.json
*/
import type { ChangeRequestCreateFeatureSchemaOneOfTwozeroAction } from './changeRequestCreateFeatureSchemaOneOfTwozeroAction';
import type { ChangeRequestCreateFeatureSchemaOneOfTwozeroPayload } from './changeRequestCreateFeatureSchemaOneOfTwozeroPayload';

/**
* Remove a parent feature dependency.
* Remove a parent feature dependency or all dependencies if no payload.
*/
export type ChangeRequestCreateFeatureSchemaOneOfTwozero = {
/** The name of the feature that this change applies to. */
feature: string;
/** The name of this action. */
action: ChangeRequestCreateFeatureSchemaOneOfTwozeroAction;
payload: ChangeRequestCreateFeatureSchemaOneOfTwozeroPayload;
};

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@
export type ChangeRequestCreateSchemaOneOfSixPayload = {
/** The new state of the feature. */
enabled: boolean;
/** Only relevant when ALL the strategies are disabled. If true, all the disabled strategies will be enabled. If false, the default strategy will be added */
shouldActivateDisabledStrategies?: boolean;
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@
* See `gen:api` script in package.json
*/
import type { ChangeRequestCreateSchemaOneOfTwofiveAction } from './changeRequestCreateSchemaOneOfTwofiveAction';
import type { ChangeRequestCreateSchemaOneOfTwofivePayload } from './changeRequestCreateSchemaOneOfTwofivePayload';

/**
* Remove a parent feature dependency.
* Remove a parent feature dependency or all dependencies if no payload.
*/
export type ChangeRequestCreateSchemaOneOfTwofive = {
/** The name of the feature that this change applies to. */
feature: string;
/** The name of this action. */
action: ChangeRequestCreateSchemaOneOfTwofiveAction;
payload: ChangeRequestCreateSchemaOneOfTwofivePayload;
};

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@
export type ChangeRequestOneOrManyCreateSchemaOneOfSixPayload = {
/** The new state of the feature. */
enabled: boolean;
/** Only relevant when ALL the strategies are disabled. If true, all the disabled strategies will be enabled. If false, the default strategy will be added */
shouldActivateDisabledStrategies?: boolean;
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@
* See `gen:api` script in package.json
*/
import type { ChangeRequestOneOrManyCreateSchemaOneOfTwofiveAction } from './changeRequestOneOrManyCreateSchemaOneOfTwofiveAction';
import type { ChangeRequestOneOrManyCreateSchemaOneOfTwofivePayload } from './changeRequestOneOrManyCreateSchemaOneOfTwofivePayload';

/**
* Remove a parent feature dependency.
* Remove a parent feature dependency or all dependencies if no payload.
*/
export type ChangeRequestOneOrManyCreateSchemaOneOfTwofive = {
/** The name of the feature that this change applies to. */
feature: string;
/** The name of this action. */
action: ChangeRequestOneOrManyCreateSchemaOneOfTwofiveAction;
payload: ChangeRequestOneOrManyCreateSchemaOneOfTwofivePayload;
};

This file was deleted.

14 changes: 14 additions & 0 deletions frontend/src/openapi/models/checkDependenciesExist401.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 CheckDependenciesExist401 = {
/** 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/checkDependenciesExist403.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 CheckDependenciesExist403 = {
/** 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/createMessageBanner400.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 CreateMessageBanner400 = {
/** 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/createMessageBanner401.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 CreateMessageBanner401 = {
/** 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/createMessageBanner403.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 CreateMessageBanner403 = {
/** 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/createMessageBanner415.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 CreateMessageBanner415 = {
/** The ID of the error instance */
id?: string;
/** The name of the error kind */
name?: string;
/** A description of what went wrong. */
message?: string;
};
29 changes: 29 additions & 0 deletions frontend/src/openapi/models/createMessageBannerSchema.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/

/**
* Describes the properties required to create or update a message banner.
*/
export interface CreateMessageBannerSchema {
/** The message to display to all users. Supports markdown. */
message: string;
/** Whether the message banner should be displayed to all users. If not specified, defaults to true. */
enabled?: boolean;
/** The variant of the message banner. One of "info", "warning", "error", or "success". If not specified, defaults to "info". */
variant?: string;
/** Whether the message banner should be sticky on the screen. If not specified, defaults to `false`. */
sticky?: boolean;
/** The icon to display on the message 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. */
icon?: string | null;
/** The link to display on the message 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. */
link?: string | null;
/** The text to display on the link. If not specified, will be displayed as "More info". */
linkText?: string | null;
/** The title to display on the dialog. If not specified, this will be the same as `linkText`. */
dialogTitle?: string | null;
/** The markdown to display on the dialog. If not specified, no dialog will be displayed. */
dialog?: string | null;
}
14 changes: 14 additions & 0 deletions frontend/src/openapi/models/deleteMessageBanner401.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 DeleteMessageBanner401 = {
/** 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/deleteMessageBanner403.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 DeleteMessageBanner403 = {
/** 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/deleteMessageBanner404.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 DeleteMessageBanner404 = {
/** The ID of the error instance */
id?: string;
/** The name of the error kind */
name?: string;
/** A description of what went wrong. */
message?: string;
};
10 changes: 10 additions & 0 deletions frontend/src/openapi/models/dependenciesExistSchema.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/

/**
* `true` when any dependencies exist, `false` when no dependencies exist.
*/
export type DependenciesExistSchema = boolean;
4 changes: 4 additions & 0 deletions frontend/src/openapi/models/eventSchemaType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export const EventSchemaType = {
'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-access-updated': 'project-access-updated',
'project-created': 'project-created',
'project-updated': 'project-updated',
'project-deleted': 'project-deleted',
Expand Down Expand Up @@ -124,4 +125,7 @@ export const EventSchemaType = {
'feature-dependency-added': 'feature-dependency-added',
'feature-dependency-removed': 'feature-dependency-removed',
'feature-dependencies-removed': 'feature-dependencies-removed',
'message-banner-created': 'message-banner-created',
'message-banner-updated': 'message-banner-updated',
'message-banner-deleted': 'message-banner-deleted',
} as const;
3 changes: 3 additions & 0 deletions frontend/src/openapi/models/exportResultSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import type { ContextFieldSchema } from './contextFieldSchema';
import type { FeatureTagSchema } from './featureTagSchema';
import type { ExportResultSchemaSegmentsItem } from './exportResultSchemaSegmentsItem';
import type { TagTypeSchema } from './tagTypeSchema';
import type { FeatureDependenciesSchema } from './featureDependenciesSchema';

/**
* The result of the export operation, providing you with the feature toggle definitions, strategy definitions and the rest of the elements relevant to the features (tags, environments etc.)
Expand All @@ -29,4 +30,6 @@ export interface ExportResultSchema {
segments?: ExportResultSchemaSegmentsItem[];
/** A list of all of the tag types that are used in the `featureTags` list. */
tagTypes: TagTypeSchema[];
/** A list of all the dependencies for features in `features` list. */
dependencies?: FeatureDependenciesSchema[];
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@

export type ExportResultSchemaSegmentsItem = {
id: number;
name?: string;
name: string;
};
16 changes: 16 additions & 0 deletions frontend/src/openapi/models/featureDependenciesSchema.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/
import type { DependentFeatureSchema } from './dependentFeatureSchema';

/**
* Feature dependency connection between a child feature and its dependencies
*/
export interface FeatureDependenciesSchema {
/** The name of the child feature. */
feature: string;
/** List of parent features for the child feature */
dependencies: DependentFeatureSchema[];
}
14 changes: 14 additions & 0 deletions frontend/src/openapi/models/getMessageBanners401.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 GetMessageBanners401 = {
/** The ID of the error instance */
id?: string;
/** The name of the error kind */
name?: string;
/** A description of what went wrong. */
message?: string;
};
Loading

0 comments on commit 41e7c51

Please sign in to comment.