1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-09-19 17:52:45 +02:00

chore: add orval schemas for change request search (#10661)

Adds first iteration of orval charts for change request searching.
This commit is contained in:
Thomas Heartman 2025-09-12 10:43:22 +02:00 committed by GitHub
parent c843518de4
commit f9267d9cb4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 166 additions and 0 deletions

View File

@ -0,0 +1,31 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/
import type { ChangeRequestSearchItemSchemaCreatedBy } from './changeRequestSearchItemSchemaCreatedBy.js';
import type { ChangeRequestSearchItemSchemaState } from './changeRequestSearchItemSchemaState.js';
/**
* A single change request item in search results.
*/
export interface ChangeRequestSearchItemSchema {
/** Date and time when the change request was created. */
createdAt: string;
/** User who created the change request. */
createdBy: ChangeRequestSearchItemSchemaCreatedBy;
/** Environment where the change request applies. */
environment: string;
/** List of feature names affected by this change request. */
features: string[];
/** Unique identifier for the change request. */
id: number;
/** Project ID where the change request belongs. */
project: string;
/** List of segment names affected by this change request. */
segments: string[];
/** Current state of the change request. */
state: ChangeRequestSearchItemSchemaState;
/** Title of the change request. */
title: string;
}

View File

@ -0,0 +1,23 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/
/**
* User who created the change request.
*/
export type ChangeRequestSearchItemSchemaCreatedBy = {
/** Unique identifier of the user. */
id: number;
/**
* Avatar image URL for the user.
* @nullable
*/
imageUrl?: string | null;
/**
* Username of the user.
* @nullable
*/
username?: string | null;
};

View File

@ -0,0 +1,22 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/
/**
* Current state of the change request.
*/
export type ChangeRequestSearchItemSchemaState =
(typeof ChangeRequestSearchItemSchemaState)[keyof typeof ChangeRequestSearchItemSchemaState];
// eslint-disable-next-line @typescript-eslint/no-redeclare
export const ChangeRequestSearchItemSchemaState = {
Draft: 'Draft',
Approved: 'Approved',
In_review: 'In review',
Applied: 'Applied',
Scheduled: 'Scheduled',
Rejected: 'Rejected',
Cancelled: 'Cancelled',
} as const;

View File

@ -0,0 +1,16 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/
import type { ChangeRequestSearchItemSchema } from './changeRequestSearchItemSchema.js';
/**
* Response containing a list of change requests and total count.
*/
export interface ChangeRequestSearchResponseSchema {
/** List of change requests matching the search criteria. */
changeRequests: ChangeRequestSearchItemSchema[];
/** Total number of change requests matching the search criteria. */
total: number;
}

View File

@ -298,6 +298,10 @@ export * from './changeRequestSchemaOneOfFiveState.js';
export * from './changeRequestSchemaOneOfFiveStateTimestamps.js'; export * from './changeRequestSchemaOneOfFiveStateTimestamps.js';
export * from './changeRequestSchemaOneOfState.js'; export * from './changeRequestSchemaOneOfState.js';
export * from './changeRequestSchemaOneOfStateTimestamps.js'; export * from './changeRequestSchemaOneOfStateTimestamps.js';
export * from './changeRequestSearchItemSchema.js';
export * from './changeRequestSearchItemSchemaCreatedBy.js';
export * from './changeRequestSearchItemSchemaState.js';
export * from './changeRequestSearchResponseSchema.js';
export * from './changeRequestSegmentChangeSchema.js'; export * from './changeRequestSegmentChangeSchema.js';
export * from './changeRequestSegmentChangeSchemaCreatedBy.js'; export * from './changeRequestSegmentChangeSchemaCreatedBy.js';
export * from './changeRequestSegmentChangeSchemaPayload.js'; export * from './changeRequestSegmentChangeSchemaPayload.js';
@ -1238,6 +1242,10 @@ export * from './scimTokenSchema.js';
export * from './sdkContextSchema.js'; export * from './sdkContextSchema.js';
export * from './sdkContextSchemaProperties.js'; export * from './sdkContextSchemaProperties.js';
export * from './sdkFlatContextSchema.js'; export * from './sdkFlatContextSchema.js';
export * from './searchChangeRequests401.js';
export * from './searchChangeRequests403.js';
export * from './searchChangeRequests404.js';
export * from './searchChangeRequestsParams.js';
export * from './searchEventsParams.js'; export * from './searchEventsParams.js';
export * from './searchFeatures401.js'; export * from './searchFeatures401.js';
export * from './searchFeatures403.js'; export * from './searchFeatures403.js';

View File

@ -0,0 +1,14 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/
export type SearchChangeRequests401 = {
/** The ID of the error instance */
id?: string;
/** A description of what went wrong. */
message?: string;
/** The name of the error kind */
name?: string;
};

View File

@ -0,0 +1,14 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/
export type SearchChangeRequests403 = {
/** The ID of the error instance */
id?: string;
/** A description of what went wrong. */
message?: string;
/** The name of the error kind */
name?: string;
};

View File

@ -0,0 +1,14 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/
export type SearchChangeRequests404 = {
/** The ID of the error instance */
id?: string;
/** A description of what went wrong. */
message?: string;
/** The name of the error kind */
name?: string;
};

View File

@ -0,0 +1,24 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/
export type SearchChangeRequestsParams = {
/**
* Filter by change request creator user ID
*/
createdBy?: string;
/**
* Filter by requested approver user ID
*/
requestedApproverId?: string;
/**
* The number of change requests to skip when returning a page. By default it is set to 0.
*/
offset?: string;
/**
* The number of change requests to return in a page. By default it is set to 50. The maximum is 1000.
*/
limit?: string;
};