Skip to content

Commit

Permalink
chore: update orval types (#4402)
Browse files Browse the repository at this point in the history
Includes a lot of openapi updates + some new segment change requests models etc
  • Loading branch information
thomasheartman authored Aug 3, 2023
1 parent 7cab19d commit dbc7d08
Show file tree
Hide file tree
Showing 220 changed files with 2,166 additions and 319 deletions.
14 changes: 14 additions & 0 deletions frontend/src/openapi/models/addAccessToProject400.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 AddAccessToProject400 = {
/** 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/addAccessToProject401.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 AddAccessToProject401 = {
/** 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/addAccessToProject403.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 AddAccessToProject403 = {
/** 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/addAccessToProject404.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 AddAccessToProject404 = {
/** 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/addAccessToProject415.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 AddAccessToProject415 = {
/** 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/addRoleToUser401.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 AddRoleToUser401 = {
/** 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/addRoleToUser403.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 AddRoleToUser403 = {
/** 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/addRoleToUser404.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 AddRoleToUser404 = {
/** The ID of the error instance */
id?: string;
/** The name of the error kind */
name?: string;
/** A description of what went wrong. */
message?: string;
};
3 changes: 3 additions & 0 deletions frontend/src/openapi/models/adminFeaturesQuerySchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
* See `gen:api` script in package.json
*/

/**
* Query parameters used to modify the list of features returned.
*/
export interface AdminFeaturesQuerySchema {
/** Used to filter by tags. For each entry, a TAGTYPE:TAGVALUE is expected */
tag?: string[];
Expand Down
6 changes: 5 additions & 1 deletion frontend/src/openapi/models/adminSegmentSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
*/
import type { ConstraintSchema } from './constraintSchema';

/**
* A description of a [segment](https://docs.getunleash.io/reference/segments)
*/
export interface AdminSegmentSchema {
/** The ID of this segment */
id: number;
Expand All @@ -18,9 +21,10 @@ export interface AdminSegmentSchema {
usedInFeatures?: number | null;
/** The number of projects that use this segment */
usedInProjects?: number | null;
/** The project the segment belongs to. Only present if the segment is a project-specific segment. */
project?: string | null;
/** The creator's email or username */
createdBy?: string;
createdBy?: string | null;
/** When the segment was created */
createdAt: string;
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export interface AdvancedPlaygroundEnvironmentFeatureSchema {
/** 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 the feature's defined variants. */
variant: AdvancedPlaygroundEnvironmentFeatureSchemaVariant;
/** The feature variants. */
variants: VariantSchema[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type { AdvancedPlaygroundEnvironmentFeatureSchemaVariantPayload } from '.
* 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 the feature's defined variants.
*/
export type AdvancedPlaygroundEnvironmentFeatureSchemaVariant = {
/** The variant's name. If there is no variant or if the toggle is disabled, this will be `disabled` */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@
* Do not edit manually.
* See `gen:api` script in package.json
*/
import type { AdvancedPlaygroundEnvironmentFeatureSchemaVariantPayloadType } from './advancedPlaygroundEnvironmentFeatureSchemaVariantPayloadType';

/**
* An optional payload attached to the variant.
*/
export type AdvancedPlaygroundEnvironmentFeatureSchemaVariantPayload = {
/** The format of the payload. */
type: AdvancedPlaygroundEnvironmentFeatureSchemaVariantPayloadType;
type: string;
/** The payload value stringified. */
value: string;
};

This file was deleted.

3 changes: 3 additions & 0 deletions frontend/src/openapi/models/applicationSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
* See `gen:api` script in package.json
*/

/**
* Data about an application that's connected to Unleash via an SDK.
*/
export interface ApplicationSchema {
/** Name of the application */
appName: string;
Expand Down
5 changes: 4 additions & 1 deletion frontend/src/openapi/models/applicationsSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
*/
import type { ApplicationSchema } from './applicationSchema';

/**
* An object containing a list of applications that have connected to Unleash via an SDK.
*/
export interface ApplicationsSchema {
/** Contains a list of applications that have connected via an SDK */
/** The list of applications that have connected to this Unleash instance. */
applications?: ApplicationSchema[];
}
4 changes: 4 additions & 0 deletions frontend/src/openapi/models/changeRequestAddCommentSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
* See `gen:api` script in package.json
*/

/**
* Data used to add a comment to a [change request](https://docs.getunleash.io/reference/change-requests).
*/
export interface ChangeRequestAddCommentSchema {
/** The content of the comment. */
text: string;
}
5 changes: 5 additions & 0 deletions frontend/src/openapi/models/changeRequestApprovalSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@
*/
import type { ChangeRequestApprovalSchemaCreatedBy } from './changeRequestApprovalSchemaCreatedBy';

/**
* Information about a [change request](https://docs.getunleash.io/reference/change-requests) approval.
*/
export interface ChangeRequestApprovalSchema {
/** Information about the user who gave this approval. */
createdBy: ChangeRequestApprovalSchemaCreatedBy;
/** When the approval was given. */
createdAt: string;
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@
* See `gen:api` script in package.json
*/

/**
* Information about the user who gave this approval.
*/
export type ChangeRequestApprovalSchemaCreatedBy = {
/** The ID of the user who gave this approval. */
id?: number;
/** The approving user's username. */
username?: string;
/** The URL where the user's image can be found. */
imageUrl?: string;
};
25 changes: 25 additions & 0 deletions frontend/src/openapi/models/changeRequestChangeSchema.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/
import type { ChangeRequestChangeSchemaPayload } from './changeRequestChangeSchemaPayload';
import type { ChangeRequestChangeSchemaCreatedBy } from './changeRequestChangeSchemaCreatedBy';

/**
* A change request event, containing info about the type of change and the specific changes.
*/
export interface ChangeRequestChangeSchema {
/** The ID of this change. */
id: number;
/** The kind of action that the change contains information about. */
action: string;
/** A description of the conflict caused by this change. Only present if there are any conflicts. */
conflict?: string;
/** The data required to perform this action. */
payload: ChangeRequestChangeSchemaPayload;
/** The user who created this change. */
createdBy?: ChangeRequestChangeSchemaCreatedBy;
/** When this change was suggested */
createdAt?: string;
}
15 changes: 15 additions & 0 deletions frontend/src/openapi/models/changeRequestChangeSchemaCreatedBy.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 user who created this change.
*/
export type ChangeRequestChangeSchemaCreatedBy = {
/** The user's username. */
username?: string | null;
/** The URL where the user's image can be found. */
imageUrl?: string | null;
};
17 changes: 17 additions & 0 deletions frontend/src/openapi/models/changeRequestChangeSchemaPayload.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
*/
import type { ChangeRequestChangeSchemaPayloadOneOf } from './changeRequestChangeSchemaPayloadOneOf';
import type { SetStrategySortOrderSchema } from './setStrategySortOrderSchema';

/**
* The data required to perform this action.
*/
export type ChangeRequestChangeSchemaPayload =
| string
| boolean
| ChangeRequestChangeSchemaPayloadOneOf
| number
| SetStrategySortOrderSchema;
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
* See `gen:api` script in package.json
*/

export type ChangeRequestEventSchemaPayloadOneOf = { [key: string]: any };
export type ChangeRequestChangeSchemaPayloadOneOf = { [key: string]: any };
7 changes: 7 additions & 0 deletions frontend/src/openapi/models/changeRequestCommentSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,16 @@
*/
import type { ChangeRequestCommentSchemaCreatedBy } from './changeRequestCommentSchemaCreatedBy';

/**
* A comment belonging to a [change request](https://docs.getunleash.io/reference/change-requests).
*/
export interface ChangeRequestCommentSchema {
/** The comment's ID. Unique per change request. */
id?: number;
/** The content of the comment. */
text: string;
/** Information about the user who posted the comment */
createdBy: ChangeRequestCommentSchemaCreatedBy;
/** When the comment was made. */
createdAt: string;
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
* See `gen:api` script in package.json
*/

/**
* Information about the user who posted the comment
*/
export type ChangeRequestCommentSchemaCreatedBy = {
/** The user's username. */
username?: string | null;
/** The URL where the user's image can be found. */
imageUrl?: string | null;
};
3 changes: 3 additions & 0 deletions frontend/src/openapi/models/changeRequestConfigSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@
*/
import type { ChangeRequestEnvironmentConfigSchema } from './changeRequestEnvironmentConfigSchema';

/**
* A list of environment-specific [change request](https://docs.getunleash.io/reference/change-requests) configurations.
*/
export type ChangeRequestConfigSchema = ChangeRequestEnvironmentConfigSchema[];
Loading

0 comments on commit dbc7d08

Please sign in to comment.