Skip to content

Commit

Permalink
chore: generate orval types (#6310)
Browse files Browse the repository at this point in the history
  • Loading branch information
kwasniew authored Feb 22, 2024
1 parent 81ab77c commit dc214d3
Show file tree
Hide file tree
Showing 21 changed files with 251 additions and 106 deletions.
31 changes: 17 additions & 14 deletions frontend/src/openapi/models/actionEventSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,27 @@
* Do not edit manually.
* See `gen:api` script in package.json
*/
import type { ActionStateSchema } from './actionStateSchema';
import type { ActionEventSchemaPayload } from './actionEventSchemaPayload';
import type { ActionEventSchemaSource } from './actionEventSchemaSource';
import type { ActionEventSchemaExecutionParams } from './actionEventSchemaExecutionParams';
import type { ActionEventSchemaState } from './actionEventSchemaState';

/**
* An object describing an action event.
*/
export interface ActionEventSchema {
/** The individual action events. */
actions: ActionStateSchema[];
/** The date and time of when the observable event was created. */
/** The name of the action to execute */
action: string;
/** The date and time of when the action was created. */
createdAt: string;
/** The observable event's ID. Observable event IDs are incrementing integers. In other words, a more recently created observable event will always have a higher ID than an older one. */
id?: number;
/** The payload of the observable event. */
payload?: ActionEventSchemaPayload;
/** The observable event source type. Should be used along with `sourceId` to uniquely identify the resource that created this observable event. */
source: ActionEventSchemaSource;
/** The ID of the source that created this observable event. Should be used along with `source` to uniquely identify the resource that created this observable event. */
sourceId: number;
/** The id of user that created this action set */
createdByUserId: number;
/** The details of the action event, if any. */
details?: string | null;
/** A map of parameters to pass to the action */
executionParams?: ActionEventSchemaExecutionParams;
/** The id of the action set */
id: number;
/** The order in which the action should be executed */
sortOrder: number;
/** The state of the action. Can be one of `not started`, `started`, `success`, or `failed`. */
state: ActionEventSchemaState;
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
/**
* A map of parameters to pass to the action
*/
export type ActionStateSchemaExecutionParams = { [key: string]: any };
export type ActionEventSchemaExecutionParams = { [key: string]: any };
10 changes: 0 additions & 10 deletions frontend/src/openapi/models/actionEventSchemaPayload.ts

This file was deleted.

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

This file was deleted.

19 changes: 19 additions & 0 deletions frontend/src/openapi/models/actionEventSchemaState.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/

/**
* The state of the action. Can be one of `not started`, `started`, `success`, or `failed`.
*/
export type ActionEventSchemaState =
(typeof ActionEventSchemaState)[keyof typeof ActionEventSchemaState];

// eslint-disable-next-line @typescript-eslint/no-redeclare
export const ActionEventSchemaState = {
not_started: 'not started',
started: 'started',
success: 'success',
failed: 'failed',
} as const;
14 changes: 0 additions & 14 deletions frontend/src/openapi/models/actionEventsSchema.ts

This file was deleted.

28 changes: 28 additions & 0 deletions frontend/src/openapi/models/actionSetEventSchema.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/
import type { ActionSetEventSchemaActionSet } from './actionSetEventSchemaActionSet';
import type { ObservableEventSchema } from './observableEventSchema';
import type { ActionSetEventSchemaState } from './actionSetEventSchemaState';

/**
* An object describing an action event.
*/
export interface ActionSetEventSchema {
/** The action set this action set event belongs to, where the individual actions are decorated with the respective action states. */
actionSet: ActionSetEventSchemaActionSet;
/** The ID of the action set that the action set event belongs to. */
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. */
id: number;
/** The observable event that triggered this action set event. */
observableEvent: ObservableEventSchema;
/** The ID of the observable event that triggered this action set event. */
observableEventId: number;
/** The state of the action set event. Can be one of `started`, `success`, or `failed`. */
state: ActionSetEventSchemaState;
}
31 changes: 31 additions & 0 deletions frontend/src/openapi/models/actionSetEventSchemaActionSet.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/
import type { ActionEventSchema } from './actionEventSchema';
import type { ActionSetEventSchemaActionSetMatch } from './actionSetEventSchemaActionSetMatch';

/**
* The action set this action set event belongs to, where the individual actions are decorated with the respective action states.
*/
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 */
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;
/** Whether this action set is enabled or not */
enabled?: boolean;
/** The ID of the action set. */
id: number;
/** Defines a matching rule for the observable event that will trigger the action set */
match: ActionSetEventSchemaActionSetMatch;
/** The name of the action set */
name: string;
/** The project that this action set belongs to. */
project: string;
};
18 changes: 18 additions & 0 deletions frontend/src/openapi/models/actionSetEventSchemaActionSetMatch.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/
import type { ActionSetEventSchemaActionSetMatchPayload } from './actionSetEventSchemaActionSetMatchPayload';

/**
* Defines a matching rule for the observable event that will trigger the action set
*/
export type ActionSetEventSchemaActionSetMatch = {
/** Match the payload of the observable event */
payload: ActionSetEventSchemaActionSetMatchPayload;
/** Match the source of the observable event */
source: string;
/** Match the source id of the observable event */
sourceId: number;
};
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
*/

/**
* Match the payload of the observable event
*/
export type ActionSetEventSchemaActionSetMatchPayload = { [key: string]: any };
18 changes: 18 additions & 0 deletions frontend/src/openapi/models/actionSetEventSchemaState.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/

/**
* The state of the action set event. Can be one of `started`, `success`, or `failed`.
*/
export type ActionSetEventSchemaState =
(typeof ActionSetEventSchemaState)[keyof typeof ActionSetEventSchemaState];

// eslint-disable-next-line @typescript-eslint/no-redeclare
export const ActionSetEventSchemaState = {
started: 'started',
success: 'success',
failed: 'failed',
} as const;
14 changes: 14 additions & 0 deletions frontend/src/openapi/models/actionSetEventsSchema.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 { ActionSetEventSchema } from './actionSetEventSchema';

/**
* A response model with a list of action set events.
*/
export interface ActionSetEventsSchema {
/** A list of action set events. */
actionSetEvents: ActionSetEventSchema[];
}
25 changes: 0 additions & 25 deletions frontend/src/openapi/models/actionStateSchema.ts

This file was deleted.

18 changes: 0 additions & 18 deletions frontend/src/openapi/models/actionStateSchemaState.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/

/**
* Data about an application environment
*/
export interface ApplicationOverviewEnvironmentSchema {
/** The number of instances of the application environment */
instanceCount: number;
/** The last time the application environment was seen */
lastSeen: string;
/** Name of the application environment */
name: string;
/** SDKs used in the application environment */
sdks: string[];
}
18 changes: 18 additions & 0 deletions frontend/src/openapi/models/applicationOverviewSchema.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/
import type { ApplicationOverviewEnvironmentSchema } from './applicationOverviewEnvironmentSchema';

/**
* Data about an application that's connected to Unleash via an SDK.
*/
export interface ApplicationOverviewSchema {
/** The list of environments the application has been using. */
environments: ApplicationOverviewEnvironmentSchema[];
/** The number of features the application has been using. */
featureCount: number;
/** The list of projects the application has been using. */
projects: string[];
}
4 changes: 3 additions & 1 deletion frontend/src/openapi/models/applicationsSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,7 @@ import type { ApplicationSchema } from './applicationSchema';
*/
export interface ApplicationsSchema {
/** The list of applications that have connected to this Unleash instance. */
applications?: ApplicationSchema[];
applications: ApplicationSchema[];
/** The total number of project applications. */
total: number;
}
14 changes: 14 additions & 0 deletions frontend/src/openapi/models/getApplicationOverview404.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 GetApplicationOverview404 = {
/** The ID of the error instance */
id?: string;
/** A description of what went wrong. */
message?: string;
/** The name of the error kind */
name?: string;
};
28 changes: 28 additions & 0 deletions frontend/src/openapi/models/getApplicationsParams.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/

export type GetApplicationsParams = {
/**
* The search query for the application name
*/
query?: string;
/**
* The number of applications to skip when returning a page. By default it is set to 0.
*/
offset?: string;
/**
* The number of applications to return in a page. By default it is set to 1000.
*/
limit?: string;
/**
* The field to sort the results by. By default it is set to "appName".
*/
sortBy?: string;
/**
* The sort order for the sortBy. By default it is det to "asc".
*/
sortOrder?: string;
};
Loading

0 comments on commit dc214d3

Please sign in to comment.