Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update orval schemas #5249

Merged
merged 2 commits into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions frontend/src/openapi/models/bannerSchema.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/

/**
* An object describing a banner to be displayed to all users.
*/
export interface BannerSchema {
/** 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. */
id: number;
/** The message to display to all users. Supports markdown. */
message: string;
/** Whether the banner should be displayed currently. If not specified, defaults to true. */
enabled?: boolean;
/** The variant of the banner. One of "info", "warning", "error", or "success". If not specified, defaults to "info". */
variant?: string;
/** Whether the banner should be sticky on the screen. If not specified, defaults to `false`. */
sticky?: 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. */
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. */
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;
/** The date and time of when the banner was created. */
createdAt: string;
}
14 changes: 14 additions & 0 deletions frontend/src/openapi/models/bannersSchema.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
*/
import type { BannerSchema } from './bannerSchema';

/**
* A response model with a list of banners.
*/
export interface BannersSchema {
/** A list of banners. */
banners: BannerSchema[];
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +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 */
/** 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 @@ -7,6 +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 */
/** 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 @@ -7,6 +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 */
/** 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;
};
16 changes: 16 additions & 0 deletions frontend/src/openapi/models/changeRequestScheduleSchema.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 { ChangeRequestScheduleSchemaStatus } from './changeRequestScheduleSchemaStatus';

/**
* A schedule for a change request.
*/
export interface ChangeRequestScheduleSchema {
/** When this change request is to be applied. */
scheduledAt: string;
/** The status of the schedule. */
status: ChangeRequestScheduleSchemaStatus;
}
17 changes: 17 additions & 0 deletions frontend/src/openapi/models/changeRequestScheduleSchemaStatus.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
*/

/**
* The status of the schedule.
*/
export type ChangeRequestScheduleSchemaStatus =
typeof ChangeRequestScheduleSchemaStatus[keyof typeof ChangeRequestScheduleSchemaStatus];

// eslint-disable-next-line @typescript-eslint/no-redeclare
export const ChangeRequestScheduleSchemaStatus = {
pending: 'pending',
failed: 'failed',
} as const;
39 changes: 5 additions & 34 deletions frontend/src/openapi/models/changeRequestSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,12 @@
* Do not edit manually.
* See `gen:api` script in package.json
*/
import type { ChangeRequestSchemaState } from './changeRequestSchemaState';
import type { ChangeRequestFeatureSchema } from './changeRequestFeatureSchema';
import type { ChangeRequestSegmentChangeSchema } from './changeRequestSegmentChangeSchema';
import type { ChangeRequestApprovalSchema } from './changeRequestApprovalSchema';
import type { ChangeRequestCommentSchema } from './changeRequestCommentSchema';
import type { ChangeRequestSchemaCreatedBy } from './changeRequestSchemaCreatedBy';
import type { ChangeRequestSchemaOneOf } from './changeRequestSchemaOneOf';
import type { ChangeRequestSchemaOneOfFour } from './changeRequestSchemaOneOfFour';

/**
* A [change request](https://docs.getunleash.io/reference/change-requests)
*/
export interface ChangeRequestSchema {
/** This change requests's ID. */
id: number;
/** A title describing the change request's content. */
title?: string;
/** The environment in which the changes should be applied. */
environment: string;
/** The current state of the change request. */
state: ChangeRequestSchemaState;
/** The minimum number of approvals required before this change request can be applied. */
minApprovals: number;
/** The project this change request belongs to. */
project: string;
/** The list of features and their changes that relate to this change request. */
features: ChangeRequestFeatureSchema[];
/** The list of segments and their changes that relate to this change request. */
segments: ChangeRequestSegmentChangeSchema[];
/** A list of approvals that this change request has received. */
approvals?: ChangeRequestApprovalSchema[];
/** A list of rejections that this change request has received. */
rejections?: ChangeRequestApprovalSchema[];
/** All comments that have been made on this change request. */
comments?: ChangeRequestCommentSchema[];
/** The user who created this change request. */
createdBy: ChangeRequestSchemaCreatedBy;
/** When this change request was created. */
createdAt: string;
}
export type ChangeRequestSchema =
| ChangeRequestSchemaOneOf
| ChangeRequestSchemaOneOfFour;
40 changes: 40 additions & 0 deletions frontend/src/openapi/models/changeRequestSchemaOneOf.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/
import type { ChangeRequestFeatureSchema } from './changeRequestFeatureSchema';
import type { ChangeRequestSegmentChangeSchema } from './changeRequestSegmentChangeSchema';
import type { ChangeRequestApprovalSchema } from './changeRequestApprovalSchema';
import type { ChangeRequestCommentSchema } from './changeRequestCommentSchema';
import type { ChangeRequestSchemaOneOfCreatedBy } from './changeRequestSchemaOneOfCreatedBy';
import type { ChangeRequestSchemaOneOfState } from './changeRequestSchemaOneOfState';

export type ChangeRequestSchemaOneOf = {
/** This change requests's ID. */
id: number;
/** A title describing the change request's content. */
title?: string;
/** The environment in which the changes should be applied. */
environment: string;
/** The minimum number of approvals required before this change request can be applied. */
minApprovals: number;
/** The project this change request belongs to. */
project: string;
/** The list of features and their changes that relate to this change request. */
features: ChangeRequestFeatureSchema[];
/** The list of segments and their changes that relate to this change request. */
segments: ChangeRequestSegmentChangeSchema[];
/** A list of approvals that this change request has received. */
approvals?: ChangeRequestApprovalSchema[];
/** A list of rejections that this change request has received. */
rejections?: ChangeRequestApprovalSchema[];
/** All comments that have been made on this change request. */
comments?: ChangeRequestCommentSchema[];
/** The user who created this change request. */
createdBy: ChangeRequestSchemaOneOfCreatedBy;
/** When this change request was created. */
createdAt: string;
/** The current state of the change request. */
state: ChangeRequestSchemaOneOfState;
};
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/**
* The user who created this change request.
*/
export type ChangeRequestSchemaCreatedBy = {
export type ChangeRequestSchemaOneOfCreatedBy = {
username?: string | null;
/** The URL of the user's profile image. */
imageUrl?: string | null;
Expand Down
42 changes: 42 additions & 0 deletions frontend/src/openapi/models/changeRequestSchemaOneOfFour.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/
import type { ChangeRequestFeatureSchema } from './changeRequestFeatureSchema';
import type { ChangeRequestSegmentChangeSchema } from './changeRequestSegmentChangeSchema';
import type { ChangeRequestApprovalSchema } from './changeRequestApprovalSchema';
import type { ChangeRequestCommentSchema } from './changeRequestCommentSchema';
import type { ChangeRequestSchemaOneOfFourCreatedBy } from './changeRequestSchemaOneOfFourCreatedBy';
import type { ChangeRequestSchemaOneOfFourState } from './changeRequestSchemaOneOfFourState';
import type { ChangeRequestScheduleSchema } from './changeRequestScheduleSchema';

export type ChangeRequestSchemaOneOfFour = {
/** This change requests's ID. */
id: number;
/** A title describing the change request's content. */
title?: string;
/** The environment in which the changes should be applied. */
environment: string;
/** The minimum number of approvals required before this change request can be applied. */
minApprovals: number;
/** The project this change request belongs to. */
project: string;
/** The list of features and their changes that relate to this change request. */
features: ChangeRequestFeatureSchema[];
/** The list of segments and their changes that relate to this change request. */
segments: ChangeRequestSegmentChangeSchema[];
/** A list of approvals that this change request has received. */
approvals?: ChangeRequestApprovalSchema[];
/** A list of rejections that this change request has received. */
rejections?: ChangeRequestApprovalSchema[];
/** All comments that have been made on this change request. */
comments?: ChangeRequestCommentSchema[];
/** The user who created this change request. */
createdBy: ChangeRequestSchemaOneOfFourCreatedBy;
/** When this change request was created. */
createdAt: string;
/** The current state of the change request. */
state: ChangeRequestSchemaOneOfFourState;
schedule: ChangeRequestScheduleSchema;
};
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
*/

/**
* The user who created this change request.
*/
export type ChangeRequestSchemaOneOfFourCreatedBy = {
username?: string | null;
/** The URL of the user's profile image. */
imageUrl?: string | null;
};
16 changes: 16 additions & 0 deletions frontend/src/openapi/models/changeRequestSchemaOneOfFourState.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
*/

/**
* The current state of the change request.
*/
export type ChangeRequestSchemaOneOfFourState =
typeof ChangeRequestSchemaOneOfFourState[keyof typeof ChangeRequestSchemaOneOfFourState];

// eslint-disable-next-line @typescript-eslint/no-redeclare
export const ChangeRequestSchemaOneOfFourState = {
Scheduled: 'Scheduled',
} as const;
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
/**
* The current state of the change request.
*/
export type ChangeRequestSchemaState =
typeof ChangeRequestSchemaState[keyof typeof ChangeRequestSchemaState];
export type ChangeRequestSchemaOneOfState =
typeof ChangeRequestSchemaOneOfState[keyof typeof ChangeRequestSchemaOneOfState];

// eslint-disable-next-line @typescript-eslint/no-redeclare
export const ChangeRequestSchemaState = {
export const ChangeRequestSchemaOneOfState = {
Draft: 'Draft',
In_review: 'In review',
Approved: 'Approved',
Expand Down
12 changes: 5 additions & 7 deletions frontend/src/openapi/models/changeRequestStateSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@
* Do not edit manually.
* See `gen:api` script in package.json
*/
import type { ChangeRequestStateSchemaState } from './changeRequestStateSchemaState';
import type { ChangeRequestStateSchemaOneOf } from './changeRequestStateSchemaOneOf';
import type { ChangeRequestStateSchemaOneOfThree } from './changeRequestStateSchemaOneOfThree';

/**
* Data used to update the state of a [change request](https://docs.getunleash.io/reference/change-requests).
*/
export interface ChangeRequestStateSchema {
/** The new desired state for the change request */
state: ChangeRequestStateSchemaState;
/** Any comments accompanying the state changed. Used when sending a draft to review. */
comment?: string;
}
export type ChangeRequestStateSchema =
| ChangeRequestStateSchemaOneOf
| ChangeRequestStateSchemaOneOfThree;
13 changes: 13 additions & 0 deletions frontend/src/openapi/models/changeRequestStateSchemaOneOf.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/
import type { ChangeRequestStateSchemaOneOfState } from './changeRequestStateSchemaOneOfState';

export type ChangeRequestStateSchemaOneOf = {
/** The new desired state for the change request */
state: ChangeRequestStateSchemaOneOfState;
/** Any comments accompanying the state changed. Used when sending a draft to review. */
comment?: string;
};
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
/**
* The new desired state for the change request
*/
export type ChangeRequestStateSchemaState =
typeof ChangeRequestStateSchemaState[keyof typeof ChangeRequestStateSchemaState];
export type ChangeRequestStateSchemaOneOfState =
typeof ChangeRequestStateSchemaOneOfState[keyof typeof ChangeRequestStateSchemaOneOfState];

// eslint-disable-next-line @typescript-eslint/no-redeclare
export const ChangeRequestStateSchemaState = {
export const ChangeRequestStateSchemaOneOfState = {
Draft: 'Draft',
In_review: 'In review',
Approved: 'Approved',
Expand Down
15 changes: 15 additions & 0 deletions frontend/src/openapi/models/changeRequestStateSchemaOneOfThree.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
*/
import type { ChangeRequestStateSchemaOneOfThreeState } from './changeRequestStateSchemaOneOfThreeState';

export type ChangeRequestStateSchemaOneOfThree = {
/** The new desired state for the change request */
state: ChangeRequestStateSchemaOneOfThreeState;
/** The time at which the change request should be applied. */
scheduledAt: string;
/** Any comments accompanying the state changed. Used when sending a draft to review. */
comment?: string;
};
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
*/

/**
* The new desired state for the change request
*/
export type ChangeRequestStateSchemaOneOfThreeState =
typeof ChangeRequestStateSchemaOneOfThreeState[keyof typeof ChangeRequestStateSchemaOneOfThreeState];

// eslint-disable-next-line @typescript-eslint/no-redeclare
export const ChangeRequestStateSchemaOneOfThreeState = {
Scheduled: 'Scheduled',
} as const;
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* See `gen:api` script in package.json
*/

export type GetMessageBanners401 = {
export type CreateBanner400 = {
/** The ID of the error instance */
id?: string;
/** The name of the error kind */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* See `gen:api` script in package.json
*/

export type CreateMessageBanner403 = {
export type CreateBanner401 = {
/** The ID of the error instance */
id?: string;
/** The name of the error kind */
Expand Down
Loading