1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-20 00:08:02 +01:00

chore: generate frontend openapi types (#5988)

Update for dashboard types
This commit is contained in:
Tymoteusz Czech 2024-01-22 14:16:07 +01:00 committed by GitHub
parent fd91cd1771
commit b7483e8989
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
23 changed files with 184 additions and 36 deletions

View File

@ -0,0 +1,24 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/
import type { ActionSchemaExecutionParams } from './actionSchemaExecutionParams';
/**
* Represents a single action response
*/
export interface ActionSchema {
/** The name of the action to execute */
action: string;
/** The date and time of when the action was created. */
createdAt: string;
/** The id of user that created this action set */
createdByUserId: number;
/** A map of parameters to pass to the action */
executionParams?: ActionSchemaExecutionParams;
/** The id of the action set */
id: number;
/** The order in which the action should be executed */
sortOrder: number;
}

View File

@ -7,4 +7,4 @@
/** /**
* A map of parameters to pass to the action * A map of parameters to pass to the action
*/ */
export type ActionsSchemaActionsItemParams = { [key: string]: any }; export type ActionSchemaExecutionParams = { [key: string]: any };

View File

@ -3,7 +3,7 @@
* Do not edit manually. * Do not edit manually.
* See `gen:api` script in package.json * See `gen:api` script in package.json
*/ */
import type { ActionsSchemaActionsItem } from './actionsSchemaActionsItem'; import type { ActionSchema } from './actionSchema';
import type { ActionsSchemaMatch } from './actionsSchemaMatch'; import type { ActionsSchemaMatch } from './actionsSchemaMatch';
/** /**
@ -11,13 +11,19 @@ import type { ActionsSchemaMatch } from './actionsSchemaMatch';
*/ */
export interface ActionsSchema { export interface ActionsSchema {
/** The list of actions to execute in sequential order when the action set is triggered */ /** The list of actions to execute in sequential order when the action set is triggered */
actions: ActionsSchemaActionsItem[]; actions: ActionSchema[];
/** The id of the service account that will execute the action */ /** The id of the service account that will execute the action */
actor: number; actorId: number;
/** The date and time of when the action was created. */
createdAt?: string;
/** The id of user that created this action set */
createdByUserId?: number;
/** The id of the action set */ /** The id of the action set */
id: number; id: number;
/** Defines a matching rule for the observable event that will trigger the action set */ /** Defines a matching rule for the observable event that will trigger the action set */
match: ActionsSchemaMatch; match: ActionsSchemaMatch;
/** The name of the action set */ /** The name of the action set */
name: string; name: string;
/** The project of the action set is added to */
project: string;
} }

View File

@ -14,5 +14,5 @@ export type ActionsSchemaMatch = {
/** Match the source of the observable event */ /** Match the source of the observable event */
source: string; source: string;
/** Match the source id of the observable event */ /** Match the source id of the observable event */
sourceId: string; sourceId: number;
}; };

View File

@ -9,7 +9,7 @@ import type { ChangeRequestScheduleSchemaOneOfFiveStatus } from './changeRequest
* A suspended schedule for a change request. * A suspended schedule for a change request.
*/ */
export type ChangeRequestScheduleSchemaOneOfFive = { export type ChangeRequestScheduleSchemaOneOfFive = {
/** Why the scheduled was suspended. */ /** Why the schedule was suspended. */
reason: string; reason: string;
/** When Unleash would have attempted to apply this change request if the schedule was not suspended. */ /** When Unleash would have attempted to apply this change request if the schedule was not suspended. */
scheduledAt: string; scheduledAt: string;

View File

@ -3,13 +3,16 @@
* Do not edit manually. * Do not edit manually.
* See `gen:api` script in package.json * See `gen:api` script in package.json
*/ */
import type { ActionsSchemaActionsItemParams } from './actionsSchemaActionsItemParams'; import type { CreateActionSchemaExecutionParams } from './createActionSchemaExecutionParams';
export type ActionsSchemaActionsItem = { /**
* Represents a single action
*/
export interface CreateActionSchema {
/** The name of the action to execute */ /** The name of the action to execute */
action: string; action: string;
/** A map of parameters to pass to the action */ /** A map of parameters to pass to the action */
params?: ActionsSchemaActionsItemParams; executionParams?: CreateActionSchemaExecutionParams;
/** The order in which the action should be executed */ /** The order in which the action should be executed */
sortOrder: number; sortOrder: number;
}; }

View File

@ -7,4 +7,4 @@
/** /**
* A map of parameters to pass to the action * A map of parameters to pass to the action
*/ */
export type CreateActionsSchemaActionsItemParams = { [key: string]: any }; export type CreateActionSchemaExecutionParams = { [key: string]: any };

View File

@ -3,7 +3,7 @@
* Do not edit manually. * Do not edit manually.
* See `gen:api` script in package.json * See `gen:api` script in package.json
*/ */
import type { CreateActionsSchemaActionsItem } from './createActionsSchemaActionsItem'; import type { CreateActionSchema } from './createActionSchema';
import type { CreateActionsSchemaMatch } from './createActionsSchemaMatch'; import type { CreateActionsSchemaMatch } from './createActionsSchemaMatch';
/** /**
@ -11,11 +11,13 @@ import type { CreateActionsSchemaMatch } from './createActionsSchemaMatch';
*/ */
export interface CreateActionsSchema { export interface CreateActionsSchema {
/** The list of actions to execute in sequential order when the action set is triggered */ /** The list of actions to execute in sequential order when the action set is triggered */
actions: CreateActionsSchemaActionsItem[]; actions: CreateActionSchema[];
/** The id of the service account that will execute the action */ /** The id of the service account that will execute the action */
actor: number; actorId: number;
/** Defines a matching rule for the observable event that will trigger the action set */ /** Defines a matching rule for the observable event that will trigger the action set */
match: CreateActionsSchemaMatch; match: CreateActionsSchemaMatch;
/** The name of the action set */ /** The name of the action set */
name: string; name: string;
/** The project of the action set is added to */
project: string;
} }

View File

@ -1,15 +0,0 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/
import type { CreateActionsSchemaActionsItemParams } from './createActionsSchemaActionsItemParams';
export type CreateActionsSchemaActionsItem = {
/** The name of the action to execute */
action: string;
/** A map of parameters to pass to the action */
params?: CreateActionsSchemaActionsItemParams;
/** The order in which the action should be executed */
sortOrder: number;
};

View File

@ -14,5 +14,5 @@ export type CreateActionsSchemaMatch = {
/** Match the source of the observable event */ /** Match the source of the observable event */
source: string; source: string;
/** Match the source id of the observable event */ /** Match the source id of the observable event */
sourceId: string; sourceId: number;
}; };

View File

@ -117,7 +117,6 @@ export const EventSchemaType = {
'change-request-approval-added': 'change-request-approval-added', 'change-request-approval-added': 'change-request-approval-added',
'change-request-cancelled': 'change-request-cancelled', 'change-request-cancelled': 'change-request-cancelled',
'change-request-sent-to-review': 'change-request-sent-to-review', 'change-request-sent-to-review': 'change-request-sent-to-review',
'scheduled-change-request-executed': 'scheduled-change-request-executed',
'change-request-schedule-suspended': 'change-request-schedule-suspended', 'change-request-schedule-suspended': 'change-request-schedule-suspended',
'change-request-applied': 'change-request-applied', 'change-request-applied': 'change-request-applied',
'change-request-scheduled': 'change-request-scheduled', 'change-request-scheduled': 'change-request-scheduled',
@ -156,4 +155,7 @@ export const EventSchemaType = {
'incoming-webhook-token-created': 'incoming-webhook-token-created', 'incoming-webhook-token-created': 'incoming-webhook-token-created',
'incoming-webhook-token-updated': 'incoming-webhook-token-updated', 'incoming-webhook-token-updated': 'incoming-webhook-token-updated',
'incoming-webhook-token-deleted': 'incoming-webhook-token-deleted', 'incoming-webhook-token-deleted': 'incoming-webhook-token-deleted',
'actions-created': 'actions-created',
'actions-updated': 'actions-updated',
'actions-deleted': 'actions-deleted',
} as const; } as const;

View File

@ -0,0 +1,22 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/
import type { ExecutiveSummarySchemaFlagsTrendsItem } from './executiveSummarySchemaFlagsTrendsItem';
import type { ExecutiveSummarySchemaUserStats } from './executiveSummarySchemaUserStats';
import type { ExecutiveSummarySchemaUserTrendsItem } from './executiveSummarySchemaUserTrendsItem';
/**
* Executive summary of Unleash usage
*/
export interface ExecutiveSummarySchema {
/** How number of flags changed over time */
flagsTrends: ExecutiveSummarySchemaFlagsTrendsItem[];
/** The type of single-sign option configured for the Unleash instance */
ssoType?: string;
/** High level user count statistics */
userStats: ExecutiveSummarySchemaUserStats;
/** How number of users changed over time */
userTrends: ExecutiveSummarySchemaUserTrendsItem[];
}

View File

@ -0,0 +1,16 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/
export type ExecutiveSummarySchemaFlagsTrendsItem = {
/** The number of non-archived flags on a particular day */
active: number;
/** The number of archived flags on a particular day */
archived: number;
/** A UTC date when the stats were captured. Time is the very end of a given day. */
date: string;
/** The number of all flags on a particular day */
total: number;
};

View File

@ -0,0 +1,22 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/
import type { ExecutiveSummarySchemaUserStatsRoles } from './executiveSummarySchemaUserStatsRoles';
/**
* High level user count statistics
*/
export type ExecutiveSummarySchemaUserStats = {
/** The number of active Unleash users who have logged in in the past 90 days */
active: number;
/** The number of inactive Unleash users who have not logged in in the past 90 days. */
inactive: number;
/** The number of users licensed to use Unleash */
licensed: number;
/** The number of users with a given [root role](https://docs.getunleash.io/reference/rbac#predefined-roles) */
roles: ExecutiveSummarySchemaUserStatsRoles;
/** The number of actual Unleash users */
total: number;
};

View File

@ -0,0 +1,17 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/
/**
* The number of users with a given [root role](https://docs.getunleash.io/reference/rbac#predefined-roles)
*/
export type ExecutiveSummarySchemaUserStatsRoles = {
/** The number of users with the `admin` root role */
admin: number;
/** The number of users with the `editor` root role */
editor: number;
/** The number of users with the `viewer` root role */
viewer: number;
};

View File

@ -0,0 +1,16 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/
export type ExecutiveSummarySchemaUserTrendsItem = {
/** The number of active Unleash users on a particular day */
active: number;
/** A UTC date when the stats were captured. Time is the very end of a given day. */
date: string;
/** The number of inactive Unleash users on a particular day */
inactive: number;
/** The number of actual Unleash users on a particular day */
total: number;
};

View File

@ -3,6 +3,7 @@
* Do not edit manually. * Do not edit manually.
* See `gen:api` script in package.json * See `gen:api` script in package.json
*/ */
import type { IncomingWebhookTokenSchema } from './incomingWebhookTokenSchema';
/** /**
* An object describing an incoming webhook. * An object describing an incoming webhook.
@ -20,6 +21,8 @@ export interface IncomingWebhookSchema {
id: number; id: number;
/** The incoming webhook name. Must be URL-safe. */ /** The incoming webhook name. Must be URL-safe. */
name: string; name: string;
/** The list of tokens associated with the incoming webhook. */
tokens?: IncomingWebhookTokenSchema[];
/** The full URL that should be used to call the incoming webhook. This property is only returned for newly created or updated incoming webhooks. */ /** The full URL that should be used to call the incoming webhook. This property is only returned for newly created or updated incoming webhooks. */
url?: string; url?: string;
} }

View File

@ -7,10 +7,10 @@
export * from './_exportFormat'; export * from './_exportFormat';
export * from './_exportParams'; export * from './_exportParams';
export * from './accessOverviewSchema'; export * from './accessOverviewSchema';
export * from './actionSchema';
export * from './actionSchemaExecutionParams';
export * from './actionsListSchema'; export * from './actionsListSchema';
export * from './actionsSchema'; export * from './actionsSchema';
export * from './actionsSchemaActionsItem';
export * from './actionsSchemaActionsItemParams';
export * from './actionsSchemaMatch'; export * from './actionsSchemaMatch';
export * from './actionsSchemaMatchPayload'; export * from './actionsSchemaMatchPayload';
export * from './addAccessToProject400'; export * from './addAccessToProject400';
@ -290,9 +290,9 @@ export * from './contextFieldSchema';
export * from './contextFieldStrategiesSchema'; export * from './contextFieldStrategiesSchema';
export * from './contextFieldStrategiesSchemaStrategiesItem'; export * from './contextFieldStrategiesSchemaStrategiesItem';
export * from './contextFieldsSchema'; export * from './contextFieldsSchema';
export * from './createActionSchema';
export * from './createActionSchemaExecutionParams';
export * from './createActionsSchema'; export * from './createActionsSchema';
export * from './createActionsSchemaActionsItem';
export * from './createActionsSchemaActionsItemParams';
export * from './createActionsSchemaMatch'; export * from './createActionsSchemaMatch';
export * from './createActionsSchemaMatchPayload'; export * from './createActionsSchemaMatchPayload';
export * from './createAddon400'; export * from './createAddon400';
@ -494,6 +494,11 @@ export * from './eventSchemaPreData';
export * from './eventSchemaType'; export * from './eventSchemaType';
export * from './eventsSchema'; export * from './eventsSchema';
export * from './eventsSchemaVersion'; export * from './eventsSchemaVersion';
export * from './executiveSummarySchema';
export * from './executiveSummarySchemaFlagsTrendsItem';
export * from './executiveSummarySchemaUserStats';
export * from './executiveSummarySchemaUserStatsRoles';
export * from './executiveSummarySchemaUserTrendsItem';
export * from './exportFeatures404'; export * from './exportFeatures404';
export * from './exportQuerySchema'; export * from './exportQuerySchema';
export * from './exportQuerySchemaAnyOf'; export * from './exportQuerySchemaAnyOf';
@ -705,6 +710,7 @@ export * from './instanceAdminStatsSchema';
export * from './instanceAdminStatsSchemaActiveUsers'; export * from './instanceAdminStatsSchemaActiveUsers';
export * from './instanceAdminStatsSchemaClientAppsItem'; export * from './instanceAdminStatsSchemaClientAppsItem';
export * from './instanceAdminStatsSchemaClientAppsItemRange'; export * from './instanceAdminStatsSchemaClientAppsItemRange';
export * from './instanceAdminStatsSchemaPreviousDayMetricsBucketsCount';
export * from './instanceAdminStatsSchemaProductionChanges'; export * from './instanceAdminStatsSchemaProductionChanges';
export * from './invoicesSchema'; export * from './invoicesSchema';
export * from './invoicesSchemaItem'; export * from './invoicesSchemaItem';

View File

@ -5,6 +5,7 @@
*/ */
import type { InstanceAdminStatsSchemaActiveUsers } from './instanceAdminStatsSchemaActiveUsers'; import type { InstanceAdminStatsSchemaActiveUsers } from './instanceAdminStatsSchemaActiveUsers';
import type { InstanceAdminStatsSchemaClientAppsItem } from './instanceAdminStatsSchemaClientAppsItem'; import type { InstanceAdminStatsSchemaClientAppsItem } from './instanceAdminStatsSchemaClientAppsItem';
import type { InstanceAdminStatsSchemaPreviousDayMetricsBucketsCount } from './instanceAdminStatsSchemaPreviousDayMetricsBucketsCount';
import type { InstanceAdminStatsSchemaProductionChanges } from './instanceAdminStatsSchemaProductionChanges'; import type { InstanceAdminStatsSchemaProductionChanges } from './instanceAdminStatsSchemaProductionChanges';
/** /**
@ -31,6 +32,8 @@ export interface InstanceAdminStatsSchema {
instanceId: string; instanceId: string;
/** Whether or not OIDC authentication is enabled for this instance */ /** Whether or not OIDC authentication is enabled for this instance */
OIDCenabled?: boolean; OIDCenabled?: boolean;
/** The number client metrics buckets records recorded in the previous day. # features * # apps * # envs * # hours with metrics */
previousDayMetricsBucketsCount?: InstanceAdminStatsSchemaPreviousDayMetricsBucketsCount;
/** The number of changes to the production environment in the last 30, 60 and 90 days */ /** The number of changes to the production environment in the last 30, 60 and 90 days */
productionChanges?: InstanceAdminStatsSchemaProductionChanges; productionChanges?: InstanceAdminStatsSchemaProductionChanges;
/** The number of projects defined in this instance. */ /** The number of projects defined in this instance. */

View File

@ -0,0 +1,15 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/
/**
* The number client metrics buckets records recorded in the previous day. # features * # apps * # envs * # hours with metrics
*/
export type InstanceAdminStatsSchemaPreviousDayMetricsBucketsCount = {
/** The number of enabled/disabled metrics buckets recorded in the previous day */
enabledCount?: number;
/** The number of variant metrics buckets recorded in the previous day */
variantCount?: number;
};

View File

@ -20,6 +20,8 @@ export interface OidcSettingsSchema {
clientId: string; clientId: string;
/** [Default role](https://docs.getunleash.io/reference/rbac#standard-roles) granted to users auto-created from email. Only relevant if autoCreate is `true` */ /** [Default role](https://docs.getunleash.io/reference/rbac#standard-roles) granted to users auto-created from email. Only relevant if autoCreate is `true` */
defaultRootRole?: OidcSettingsSchemaDefaultRootRole; defaultRootRole?: OidcSettingsSchemaDefaultRootRole;
/** Assign this root role to auto created users. Should be a role ID and takes precedence over `defaultRootRole`. */
defaultRootRoleId?: number;
/** The [.well-known OpenID discover URL](https://swagger.io/docs/specification/authentication/openid-connect-discovery/) */ /** The [.well-known OpenID discover URL](https://swagger.io/docs/specification/authentication/openid-connect-discovery/) */
discoverUrl?: string; discoverUrl?: string;
/** Comma separated list of email domains that are automatically approved for an account in the server. Only relevant if autoCreate is `true` */ /** Comma separated list of email domains that are automatically approved for an account in the server. Only relevant if autoCreate is `true` */

View File

@ -15,6 +15,8 @@ export interface SamlSettingsSchema {
certificate: string; certificate: string;
/** Assign this root role to auto created users */ /** Assign this root role to auto created users */
defaultRootRole?: SamlSettingsSchemaDefaultRootRole; defaultRootRole?: SamlSettingsSchemaDefaultRootRole;
/** Assign this root role to auto created users. Should be a role ID and takes precedence over `defaultRootRole`. */
defaultRootRoleId?: number;
/** A comma separated list of email domains that Unleash will auto create user accounts for. */ /** A comma separated list of email domains that Unleash will auto create user accounts for. */
emailDomains?: string; emailDomains?: string;
/** Is SAML authentication enabled */ /** Is SAML authentication enabled */

View File

@ -117,7 +117,6 @@ export const SearchEventsSchemaType = {
'change-request-approval-added': 'change-request-approval-added', 'change-request-approval-added': 'change-request-approval-added',
'change-request-cancelled': 'change-request-cancelled', 'change-request-cancelled': 'change-request-cancelled',
'change-request-sent-to-review': 'change-request-sent-to-review', 'change-request-sent-to-review': 'change-request-sent-to-review',
'scheduled-change-request-executed': 'scheduled-change-request-executed',
'change-request-schedule-suspended': 'change-request-schedule-suspended', 'change-request-schedule-suspended': 'change-request-schedule-suspended',
'change-request-applied': 'change-request-applied', 'change-request-applied': 'change-request-applied',
'change-request-scheduled': 'change-request-scheduled', 'change-request-scheduled': 'change-request-scheduled',
@ -156,4 +155,7 @@ export const SearchEventsSchemaType = {
'incoming-webhook-token-created': 'incoming-webhook-token-created', 'incoming-webhook-token-created': 'incoming-webhook-token-created',
'incoming-webhook-token-updated': 'incoming-webhook-token-updated', 'incoming-webhook-token-updated': 'incoming-webhook-token-updated',
'incoming-webhook-token-deleted': 'incoming-webhook-token-deleted', 'incoming-webhook-token-deleted': 'incoming-webhook-token-deleted',
'actions-created': 'actions-created',
'actions-updated': 'actions-updated',
'actions-deleted': 'actions-deleted',
} as const; } as const;