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

feat: orval types with change request for dependencies #4961

Merged
merged 1 commit into from
Oct 9, 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
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import type { ChangeRequestCreateFeatureSchemaOneOfEight } from './changeRequest
import type { ChangeRequestCreateFeatureSchemaOneOfOneone } from './changeRequestCreateFeatureSchemaOneOfOneone';
import type { ChangeRequestCreateFeatureSchemaOneOfOnethree } from './changeRequestCreateFeatureSchemaOneOfOnethree';
import type { ChangeRequestCreateFeatureSchemaOneOfOnesix } from './changeRequestCreateFeatureSchemaOneOfOnesix';
import type { ChangeRequestCreateFeatureSchemaOneOfOneeight } from './changeRequestCreateFeatureSchemaOneOfOneeight';
import type { ChangeRequestCreateFeatureSchemaOneOfTwozero } from './changeRequestCreateFeatureSchemaOneOfTwozero';

/**
* Data used to create a [change request](https://docs.getunleash.io/reference/change-requests) for a single feature change.
Expand All @@ -21,4 +23,6 @@ export type ChangeRequestCreateFeatureSchema =
| ChangeRequestCreateFeatureSchemaOneOfEight
| ChangeRequestCreateFeatureSchemaOneOfOneone
| ChangeRequestCreateFeatureSchemaOneOfOnethree
| ChangeRequestCreateFeatureSchemaOneOfOnesix;
| ChangeRequestCreateFeatureSchemaOneOfOnesix
| ChangeRequestCreateFeatureSchemaOneOfOneeight
| ChangeRequestCreateFeatureSchemaOneOfTwozero;
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 { ChangeRequestCreateFeatureSchemaOneOfOneeightAction } from './changeRequestCreateFeatureSchemaOneOfOneeightAction';
import type { CreateDependentFeatureSchema } from './createDependentFeatureSchema';

/**
* Add a parent feature dependency.
*/
export type ChangeRequestCreateFeatureSchemaOneOfOneeight = {
/** The name of the feature that this change applies to. */
feature: string;
/** The name of this action. */
action: ChangeRequestCreateFeatureSchemaOneOfOneeightAction;
payload: CreateDependentFeatureSchema;
};
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 name of this action.
*/
export type ChangeRequestCreateFeatureSchemaOneOfOneeightAction =
typeof ChangeRequestCreateFeatureSchemaOneOfOneeightAction[keyof typeof ChangeRequestCreateFeatureSchemaOneOfOneeightAction];

// eslint-disable-next-line @typescript-eslint/no-redeclare
export const ChangeRequestCreateFeatureSchemaOneOfOneeightAction = {
addDependency: 'addDependency',
} as const;
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 { ChangeRequestCreateFeatureSchemaOneOfTwozeroAction } from './changeRequestCreateFeatureSchemaOneOfTwozeroAction';
import type { ChangeRequestCreateFeatureSchemaOneOfTwozeroPayload } from './changeRequestCreateFeatureSchemaOneOfTwozeroPayload';

/**
* Remove a parent feature dependency.
*/
export type ChangeRequestCreateFeatureSchemaOneOfTwozero = {
/** The name of the feature that this change applies to. */
feature: string;
/** The name of this action. */
action: ChangeRequestCreateFeatureSchemaOneOfTwozeroAction;
payload: ChangeRequestCreateFeatureSchemaOneOfTwozeroPayload;
};
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 name of this action.
*/
export type ChangeRequestCreateFeatureSchemaOneOfTwozeroAction =
typeof ChangeRequestCreateFeatureSchemaOneOfTwozeroAction[keyof typeof ChangeRequestCreateFeatureSchemaOneOfTwozeroAction];

// eslint-disable-next-line @typescript-eslint/no-redeclare
export const ChangeRequestCreateFeatureSchemaOneOfTwozeroAction = {
deleteDependency: 'deleteDependency',
} as const;
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
*/

export type ChangeRequestCreateFeatureSchemaOneOfTwozeroPayload = {
/** The name of the feature we want to remove dependency on. */
feature: string;
};
6 changes: 5 additions & 1 deletion frontend/src/openapi/models/changeRequestCreateSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import type { ChangeRequestCreateSchemaOneOfOnethree } from './changeRequestCrea
import type { ChangeRequestCreateSchemaOneOfOnesix } from './changeRequestCreateSchemaOneOfOnesix';
import type { ChangeRequestCreateSchemaOneOfOneeight } from './changeRequestCreateSchemaOneOfOneeight';
import type { ChangeRequestCreateSchemaOneOfTwoone } from './changeRequestCreateSchemaOneOfTwoone';
import type { ChangeRequestCreateSchemaOneOfTwothree } from './changeRequestCreateSchemaOneOfTwothree';
import type { ChangeRequestCreateSchemaOneOfTwofive } from './changeRequestCreateSchemaOneOfTwofive';

/**
* Data used to create a [change request](https://docs.getunleash.io/reference/change-requests) for a single feature or segment change.
Expand All @@ -25,4 +27,6 @@ export type ChangeRequestCreateSchema =
| ChangeRequestCreateSchemaOneOfOnethree
| ChangeRequestCreateSchemaOneOfOnesix
| ChangeRequestCreateSchemaOneOfOneeight
| ChangeRequestCreateSchemaOneOfTwoone;
| ChangeRequestCreateSchemaOneOfTwoone
| ChangeRequestCreateSchemaOneOfTwothree
| ChangeRequestCreateSchemaOneOfTwofive;
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 { ChangeRequestCreateSchemaOneOfTwofiveAction } from './changeRequestCreateSchemaOneOfTwofiveAction';
import type { ChangeRequestCreateSchemaOneOfTwofivePayload } from './changeRequestCreateSchemaOneOfTwofivePayload';

/**
* Remove a parent feature dependency.
*/
export type ChangeRequestCreateSchemaOneOfTwofive = {
/** The name of the feature that this change applies to. */
feature: string;
/** The name of this action. */
action: ChangeRequestCreateSchemaOneOfTwofiveAction;
payload: ChangeRequestCreateSchemaOneOfTwofivePayload;
};
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 name of this action.
*/
export type ChangeRequestCreateSchemaOneOfTwofiveAction =
typeof ChangeRequestCreateSchemaOneOfTwofiveAction[keyof typeof ChangeRequestCreateSchemaOneOfTwofiveAction];

// eslint-disable-next-line @typescript-eslint/no-redeclare
export const ChangeRequestCreateSchemaOneOfTwofiveAction = {
deleteDependency: 'deleteDependency',
} as const;
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
*/

export type ChangeRequestCreateSchemaOneOfTwofivePayload = {
/** The name of the feature we want to remove dependency on. */
feature: string;
};
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 { ChangeRequestCreateSchemaOneOfTwothreeAction } from './changeRequestCreateSchemaOneOfTwothreeAction';
import type { CreateDependentFeatureSchema } from './createDependentFeatureSchema';

/**
* Add a parent feature dependency.
*/
export type ChangeRequestCreateSchemaOneOfTwothree = {
/** The name of the feature that this change applies to. */
feature: string;
/** The name of this action. */
action: ChangeRequestCreateSchemaOneOfTwothreeAction;
payload: CreateDependentFeatureSchema;
};
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 name of this action.
*/
export type ChangeRequestCreateSchemaOneOfTwothreeAction =
typeof ChangeRequestCreateSchemaOneOfTwothreeAction[keyof typeof ChangeRequestCreateSchemaOneOfTwothreeAction];

// eslint-disable-next-line @typescript-eslint/no-redeclare
export const ChangeRequestCreateSchemaOneOfTwothreeAction = {
addDependency: 'addDependency',
} as const;
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import type { ChangeRequestOneOrManyCreateSchemaOneOfOnethree } from './changeRe
import type { ChangeRequestOneOrManyCreateSchemaOneOfOnesix } from './changeRequestOneOrManyCreateSchemaOneOfOnesix';
import type { ChangeRequestOneOrManyCreateSchemaOneOfOneeight } from './changeRequestOneOrManyCreateSchemaOneOfOneeight';
import type { ChangeRequestOneOrManyCreateSchemaOneOfTwoone } from './changeRequestOneOrManyCreateSchemaOneOfTwoone';
import type { ChangeRequestOneOrManyCreateSchemaOneOfTwothree } from './changeRequestOneOrManyCreateSchemaOneOfTwothree';
import type { ChangeRequestOneOrManyCreateSchemaOneOfTwofive } from './changeRequestOneOrManyCreateSchemaOneOfTwofive';
import type { ChangeRequestCreateSchema } from './changeRequestCreateSchema';

/**
Expand All @@ -27,4 +29,6 @@ export type ChangeRequestOneOrManyCreateSchema =
| ChangeRequestOneOrManyCreateSchemaOneOfOnesix
| ChangeRequestOneOrManyCreateSchemaOneOfOneeight
| ChangeRequestOneOrManyCreateSchemaOneOfTwoone
| ChangeRequestOneOrManyCreateSchemaOneOfTwothree
| ChangeRequestOneOrManyCreateSchemaOneOfTwofive
| ChangeRequestCreateSchema[];
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 { ChangeRequestOneOrManyCreateSchemaOneOfTwofiveAction } from './changeRequestOneOrManyCreateSchemaOneOfTwofiveAction';
import type { ChangeRequestOneOrManyCreateSchemaOneOfTwofivePayload } from './changeRequestOneOrManyCreateSchemaOneOfTwofivePayload';

/**
* Remove a parent feature dependency.
*/
export type ChangeRequestOneOrManyCreateSchemaOneOfTwofive = {
/** The name of the feature that this change applies to. */
feature: string;
/** The name of this action. */
action: ChangeRequestOneOrManyCreateSchemaOneOfTwofiveAction;
payload: ChangeRequestOneOrManyCreateSchemaOneOfTwofivePayload;
};
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 name of this action.
*/
export type ChangeRequestOneOrManyCreateSchemaOneOfTwofiveAction =
typeof ChangeRequestOneOrManyCreateSchemaOneOfTwofiveAction[keyof typeof ChangeRequestOneOrManyCreateSchemaOneOfTwofiveAction];

// eslint-disable-next-line @typescript-eslint/no-redeclare
export const ChangeRequestOneOrManyCreateSchemaOneOfTwofiveAction = {
deleteDependency: 'deleteDependency',
} as const;
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
*/

export type ChangeRequestOneOrManyCreateSchemaOneOfTwofivePayload = {
/** The name of the feature we want to remove dependency on. */
feature: string;
};
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 { ChangeRequestOneOrManyCreateSchemaOneOfTwothreeAction } from './changeRequestOneOrManyCreateSchemaOneOfTwothreeAction';
import type { CreateDependentFeatureSchema } from './createDependentFeatureSchema';

/**
* Add a parent feature dependency.
*/
export type ChangeRequestOneOrManyCreateSchemaOneOfTwothree = {
/** The name of the feature that this change applies to. */
feature: string;
/** The name of this action. */
action: ChangeRequestOneOrManyCreateSchemaOneOfTwothreeAction;
payload: CreateDependentFeatureSchema;
};
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 name of this action.
*/
export type ChangeRequestOneOrManyCreateSchemaOneOfTwothreeAction =
typeof ChangeRequestOneOrManyCreateSchemaOneOfTwothreeAction[keyof typeof ChangeRequestOneOrManyCreateSchemaOneOfTwothreeAction];

// eslint-disable-next-line @typescript-eslint/no-redeclare
export const ChangeRequestOneOrManyCreateSchemaOneOfTwothreeAction = {
addDependency: 'addDependency',
} as const;
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
* Do not edit manually.
* See `gen:api` script in package.json
*/
import type { CreateRoleWithPermissionsSchemaOneOf } from './createRoleWithPermissionsSchemaOneOf';
import type { CreateRoleWithPermissionsSchemaOneOfFour } from './createRoleWithPermissionsSchemaOneOfFour';
import type { CreateRoleWithPermissionsSchemaAnyOf } from './createRoleWithPermissionsSchemaAnyOf';
import type { CreateRoleWithPermissionsSchemaAnyOfFour } from './createRoleWithPermissionsSchemaAnyOfFour';

/**
* A write model for the custom role and permissions to allow Unleash to decide what actions a role holder is allowed to perform
*/
export type CreateRoleWithPermissionsSchema =
| CreateRoleWithPermissionsSchemaOneOf
| CreateRoleWithPermissionsSchemaOneOfFour;
| CreateRoleWithPermissionsSchemaAnyOf
| CreateRoleWithPermissionsSchemaAnyOfFour;
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 { CreateRoleWithPermissionsSchemaAnyOfType } from './createRoleWithPermissionsSchemaAnyOfType';
import type { CreateRoleWithPermissionsSchemaAnyOfPermissionsItem } from './createRoleWithPermissionsSchemaAnyOfPermissionsItem';

export type CreateRoleWithPermissionsSchemaAnyOf = {
/** The name of the custom role */
name: string;
/** A more detailed description of the custom role and what use it's intended for */
description?: string;
/** [Custom root roles](https://docs.getunleash.io/reference/rbac#custom-root-roles) (type=root-custom) are root roles with a custom set of permissions. [Custom project roles](https://docs.getunleash.io/reference/rbac#custom-project-roles) (type=custom) contain a specific set of permissions for project resources. */
type?: CreateRoleWithPermissionsSchemaAnyOfType;
/** A list of permissions assigned to this role */
permissions?: CreateRoleWithPermissionsSchemaAnyOfPermissionsItem[];
};
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
* Do not edit manually.
* See `gen:api` script in package.json
*/
import type { CreateRoleWithPermissionsSchemaOneOfFourType } from './createRoleWithPermissionsSchemaOneOfFourType';
import type { CreateRoleWithPermissionsSchemaOneOfFourPermissionsItem } from './createRoleWithPermissionsSchemaOneOfFourPermissionsItem';
import type { CreateRoleWithPermissionsSchemaAnyOfFourType } from './createRoleWithPermissionsSchemaAnyOfFourType';
import type { CreateRoleWithPermissionsSchemaAnyOfFourPermissionsItem } from './createRoleWithPermissionsSchemaAnyOfFourPermissionsItem';

export type CreateRoleWithPermissionsSchemaOneOfFour = {
export type CreateRoleWithPermissionsSchemaAnyOfFour = {
/** The name of the custom role */
name: string;
/** A more detailed description of the custom role and what use it's intended for */
description?: string;
/** [Custom project roles](https://docs.getunleash.io/reference/rbac#custom-project-roles) contain a specific set of permissions for project resources. */
type?: CreateRoleWithPermissionsSchemaOneOfFourType;
type?: CreateRoleWithPermissionsSchemaAnyOfFourType;
/** A list of permissions assigned to this role */
permissions?: CreateRoleWithPermissionsSchemaOneOfFourPermissionsItem[];
permissions?: CreateRoleWithPermissionsSchemaAnyOfFourPermissionsItem[];
};
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 CreateRoleWithPermissionsSchemaOneOfFourPermissionsItem = {
export type CreateRoleWithPermissionsSchemaAnyOfFourPermissionsItem = {
/** The id of the permission */
id: number;
/** The name of the permission */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
/**
* [Custom project roles](https://docs.getunleash.io/reference/rbac#custom-project-roles) contain a specific set of permissions for project resources.
*/
export type CreateRoleWithPermissionsSchemaOneOfFourType =
typeof CreateRoleWithPermissionsSchemaOneOfFourType[keyof typeof CreateRoleWithPermissionsSchemaOneOfFourType];
export type CreateRoleWithPermissionsSchemaAnyOfFourType =
typeof CreateRoleWithPermissionsSchemaAnyOfFourType[keyof typeof CreateRoleWithPermissionsSchemaAnyOfFourType];

// eslint-disable-next-line @typescript-eslint/no-redeclare
export const CreateRoleWithPermissionsSchemaOneOfFourType = {
export const CreateRoleWithPermissionsSchemaAnyOfFourType = {
custom: 'custom',
} 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 CreateRoleWithPermissionsSchemaOneOfPermissionsItem = {
export type CreateRoleWithPermissionsSchemaAnyOfPermissionsItem = {
/** The name of the permission */
name: string;
/** The environments of the permission if the permission is environment specific */
Expand Down
Loading
Loading