Skip to content

Commit

Permalink
chore: generate missing orval types (#5722)
Browse files Browse the repository at this point in the history
  • Loading branch information
sjaanus authored Dec 22, 2023
1 parent fb94138 commit d8a7d76
Show file tree
Hide file tree
Showing 32 changed files with 360 additions and 33 deletions.
14 changes: 0 additions & 14 deletions frontend/src/openapi/models/adminStrategiesSchema.ts

This file was deleted.

2 changes: 2 additions & 0 deletions frontend/src/openapi/models/changeRequestScheduleSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import type { ChangeRequestScheduleSchemaStatus } from './changeRequestScheduleS
* A schedule for a change request.
*/
export interface ChangeRequestScheduleSchema {
/** The reason the scheduled failed to apply. */
failureReason?: string | null;
/** When this change request is to be applied. */
scheduledAt: string;
/** The status of the schedule. */
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/
import type { ChangeRequestScheduledQueryParamsSchemaFeature } from './changeRequestScheduledQueryParamsSchemaFeature';
import type { ChangeRequestScheduledQueryParamsSchemaStrategyId } from './changeRequestScheduledQueryParamsSchemaStrategyId';
import type { ChangeRequestScheduledQueryParamsSchemaVariantForFlag } from './changeRequestScheduledQueryParamsSchemaVariantForFlag';

/**
* Query parameters used to modify the list of scheduled change requests returned. For each parameter you add, the list will add any scheduled change requests matching that parameter.
*/
export interface ChangeRequestScheduledQueryParamsSchema {
/** The name of one or more feature flags. */
feature?: ChangeRequestScheduledQueryParamsSchemaFeature;
/** One or more strategy IDs. */
strategyId?: ChangeRequestScheduledQueryParamsSchemaStrategyId;
/** One or more features whose variants have been changed in a scheduled change request. This applies to flag-level variants. For changes to strategy variants, use the `strategyId` query parameter with the relevant strategy's ID. */
variantForFlag?: ChangeRequestScheduledQueryParamsSchemaVariantForFlag;
}
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
*/

/**
* The name of one or more feature flags.
*/
export type ChangeRequestScheduledQueryParamsSchemaFeature = string[] | string;
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/

/**
* One or more strategy IDs.
*/
export type ChangeRequestScheduledQueryParamsSchemaStrategyId =
| string[]
| string;
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/

/**
* One or more features whose variants have been changed in a scheduled change request. This applies to flag-level variants. For changes to strategy variants, use the `strategyId` query parameter with the relevant strategy's ID.
*/
export type ChangeRequestScheduledQueryParamsSchemaVariantForFlag =
| string[]
| string;
12 changes: 12 additions & 0 deletions frontend/src/openapi/models/changeRequestScheduledResultSchema.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/
import type { ScheduledChangeRequestViewModelSchema } from './scheduledChangeRequestViewModelSchema';

/**
* A list of scheduled change request view models
*/
export type ChangeRequestScheduledResultSchema =
ScheduledChangeRequestViewModelSchema[];
15 changes: 15 additions & 0 deletions frontend/src/openapi/models/createIncomingWebhookSchema.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
*/

/**
* Describes the properties required to create or update an incoming webhook.
*/
export interface CreateIncomingWebhookSchema {
/** Whether the incoming webhook is currently enabled. If not specified, defaults to true. */
enabled?: boolean;
/** The incoming webhook name. Must be URL-safe. */
name: string;
}
13 changes: 13 additions & 0 deletions frontend/src/openapi/models/createIncomingWebhookTokenSchema.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
*/

/**
* Describes the properties required to create or update an incoming webhook token.
*/
export interface CreateIncomingWebhookTokenSchema {
/** The incoming webhook token name. */
name: string;
}
2 changes: 1 addition & 1 deletion frontend/src/openapi/models/createUserResponseSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ export interface CreateUserResponseSchema {
/** The last time this user logged in */
seenAt?: string | null;
/** A unique username for the user */
username?: string;
username?: string | null;
}
2 changes: 2 additions & 0 deletions frontend/src/openapi/models/eventSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ export interface EventSchema {
createdAt: string;
/** Which user created this event */
createdBy: string;
/** The is of the user that created this event */
createdByUserId?: number | null;
/** Extra associated data related to the event, such as feature toggle state, segment configuration, etc., if applicable. */
data?: EventSchemaData;
/** The feature toggle environment the event relates to, if applicable. */
Expand Down
7 changes: 7 additions & 0 deletions frontend/src/openapi/models/eventSchemaType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,4 +148,11 @@ export const EventSchemaType = {
'project-environment-added': 'project-environment-added',
'project-environment-removed': 'project-environment-removed',
'default-strategy-updated': 'default-strategy-updated',
'segment-import': 'segment-import',
'incoming-webhook-created': 'incoming-webhook-created',
'incoming-webhook-updated': 'incoming-webhook-updated',
'incoming-webhook-deleted': 'incoming-webhook-deleted',
'incoming-webhook-token-created': 'incoming-webhook-token-created',
'incoming-webhook-token-updated': 'incoming-webhook-token-updated',
'incoming-webhook-token-deleted': 'incoming-webhook-token-deleted',
} as const;
10 changes: 6 additions & 4 deletions frontend/src/openapi/models/exportQuerySchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
* Do not edit manually.
* See `gen:api` script in package.json
*/
import type { ExportQuerySchemaOneOf } from './exportQuerySchemaOneOf';
import type { ExportQuerySchemaOneOfTwo } from './exportQuerySchemaOneOfTwo';
import type { ExportQuerySchemaAnyOf } from './exportQuerySchemaAnyOf';
import type { ExportQuerySchemaAnyOfTwo } from './exportQuerySchemaAnyOfTwo';
import type { ExportQuerySchemaAnyOfThree } from './exportQuerySchemaAnyOfThree';

/**
* Available query parameters for the [deprecated export/import](https://docs.getunleash.io/reference/deploy/import-export) functionality.
*/
export type ExportQuerySchema =
| ExportQuerySchemaOneOf
| ExportQuerySchemaOneOfTwo;
| ExportQuerySchemaAnyOf
| ExportQuerySchemaAnyOfTwo
| ExportQuerySchemaAnyOfThree;
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
* See `gen:api` script in package.json
*/

export type ExportQuerySchemaOneOfTwo = {
export type ExportQuerySchemaAnyOf = {
/** Whether to return a downloadable file */
downloadFile?: boolean;
/** The environment to export from */
environment: string;
/** Selects features to export by tag. Takes precedence over the features field. */
tag: string;
/** Selects features to export by name. If the list is empty all features are returned. */
features: string[];
};
14 changes: 14 additions & 0 deletions frontend/src/openapi/models/exportQuerySchemaAnyOfThree.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 ExportQuerySchemaAnyOfThree = {
/** Whether to return a downloadable file */
downloadFile?: boolean;
/** The environment to export from */
environment: string;
/** Selects project to export the features from. Used when no tags or features are provided. */
project: string;
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
* See `gen:api` script in package.json
*/

export type ExportQuerySchemaOneOf = {
export type ExportQuerySchemaAnyOfTwo = {
/** Whether to return a downloadable file */
downloadFile?: boolean;
/** The environment to export from */
environment: string;
/** Selects features to export by name. */
features: string[];
/** Selects features to export by tag. */
tag: string;
};
4 changes: 2 additions & 2 deletions frontend/src/openapi/models/featureTagSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* Describes a tag applied to a feature
*/
export interface FeatureTagSchema {
/** The id of the user who created this tag */
createdByUserId?: number | null;
/** The name of the feature this tag is applied to */
featureName: string;
/** The [type](https://docs.getunleash.io/reference/tags#tag-types tag types) of the tag */
Expand All @@ -24,6 +26,4 @@ export interface FeatureTagSchema {
* @deprecated
*/
value?: string;
/** The id of the user who created this tag */
createdByUserId?: number;
}
11 changes: 11 additions & 0 deletions frontend/src/openapi/models/feedbackListSchema.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/
import type { FeedbackSchema } from './feedbackSchema';

/**
* A list of feedback items.
*/
export type FeedbackListSchema = FeedbackSchema[];
25 changes: 25 additions & 0 deletions frontend/src/openapi/models/feedbackSchema.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
*/

/**
* Schema representing feedback information.
*/
export interface FeedbackSchema {
/** Details aspects of the service or product that could benefit from enhancements or modifications. Aids in pinpointing areas needing attention for improvement. */
areasForImprovement: string;
/** The category of the feedback. */
category: string;
/** The date and time when the feedback was provided. */
createdAt: string;
/** A score indicating the difficulty experienced by the user. */
difficultyScore: number;
/** The unique identifier of the feedback. */
id: number;
/** This field is for users to mention what they liked. */
positive: string;
/** The type of user providing the feedback. */
userType: string;
}
14 changes: 14 additions & 0 deletions frontend/src/openapi/models/getScheduledChangeRequests404.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 GetScheduledChangeRequests404 = {
/** The ID of the error instance */
id?: string;
/** A description of what went wrong. */
message?: string;
/** The name of the error kind */
name?: string;
};
21 changes: 21 additions & 0 deletions frontend/src/openapi/models/incomingWebhookSchema.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/

/**
* An object describing an incoming webhook.
*/
export interface IncomingWebhookSchema {
/** The date and time of when the incoming webhook was created. */
createdAt: string;
/** The ID of the user that created this incoming webhook. */
createdByUserId: number;
/** Whether the incoming webhook is currently enabled. If not specified, defaults to true. */
enabled: boolean;
/** The incoming webhook's ID. Incoming webhook IDs are incrementing integers. In other words, a more recently created incoming webhook will always have a higher ID than an older one. */
id: number;
/** The incoming webhook name. Must be URL-safe. */
name: string;
}
23 changes: 23 additions & 0 deletions frontend/src/openapi/models/incomingWebhookTokenSchema.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/

/**
* An object describing an incoming webhook token.
*/
export interface IncomingWebhookTokenSchema {
/** The date and time of when the incoming webhook token was created. */
createdAt: string;
/** The ID of the user that created this incoming webhook token. */
createdByUserId: number;
/** The incoming webhook token's ID. Incoming webhook token IDs are incrementing integers. In other words, a more recently created incoming webhook token will always have a higher ID than an older one. */
id: number;
/** The incoming webhook ID that this token belongs to. */
incomingWebhookId: number;
/** The incoming webhook token name. */
name: string;
/** The token used for authentication. It is automatically generated by Unleash when the token is created and that is the only time this property is returned. */
token?: string;
}
14 changes: 14 additions & 0 deletions frontend/src/openapi/models/incomingWebhookTokensSchema.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 { IncomingWebhookTokenSchema } from './incomingWebhookTokenSchema';

/**
* A response model with a list of incoming webhook tokens.
*/
export interface IncomingWebhookTokensSchema {
/** A list of incoming webhook tokens. */
incoming_webhook_tokens: IncomingWebhookTokenSchema[];
}
14 changes: 14 additions & 0 deletions frontend/src/openapi/models/incomingWebhooksSchema.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 { IncomingWebhookSchema } from './incomingWebhookSchema';

/**
* A response model with a list of incoming webhooks.
*/
export interface IncomingWebhooksSchema {
/** A list of incoming webhooks. */
incoming_webhooks: IncomingWebhookSchema[];
}
Loading

0 comments on commit d8a7d76

Please sign in to comment.