mirror of
https://github.com/Unleash/unleash.git
synced 2025-08-13 13:48:59 +02:00
chore: generate orval types (#9919)
This commit is contained in:
parent
36c8efceae
commit
193c6274fc
@ -1,16 +1,14 @@
|
||||
import useAPI from '../useApi/useApi';
|
||||
import { formatUnknownError } from 'utils/formatUnknownError';
|
||||
import { useCallback } from 'react';
|
||||
import type { FeatureLinkSchema } from '../../../../openapi';
|
||||
|
||||
export const useFeatureLinkApi = (project: string, feature: string) => {
|
||||
const { makeRequest, createRequest, errors, loading } = useAPI({
|
||||
propagateErrors: true,
|
||||
});
|
||||
|
||||
const addLink = async (linkSchema: {
|
||||
url: string;
|
||||
title: string | null;
|
||||
}) => {
|
||||
const addLink = async (linkSchema: FeatureLinkSchema) => {
|
||||
const req = createRequest(
|
||||
`/api/admin/projects/${project}/features/${feature}/link`,
|
||||
{
|
||||
|
@ -5,8 +5,11 @@
|
||||
*/
|
||||
|
||||
export type ApplicationEnvironmentInstancesSchemaInstancesItem = {
|
||||
/** An IP address identifying the instance of the application running the SDK */
|
||||
clientIp?: string;
|
||||
/**
|
||||
* An IP address identifying the instance of the application running the SDK
|
||||
* @nullable
|
||||
*/
|
||||
clientIp?: string | null;
|
||||
/** A unique identifier identifying the instance of the application running the SDK. Often changes based on execution environment. For instance: two pods in Kubernetes will have two different instanceIds */
|
||||
instanceId: string;
|
||||
/** The last time the application environment instance was seen */
|
||||
|
@ -9,6 +9,10 @@ import type { ApplicationEnvironmentIssuesSchema } from './applicationEnvironmen
|
||||
* Data about an application environment
|
||||
*/
|
||||
export interface ApplicationOverviewEnvironmentSchema {
|
||||
/** Backend SDKs used in the application environment */
|
||||
backendSdks: string[];
|
||||
/** Frontend SDKs used in the application environment */
|
||||
frontendSdks: string[];
|
||||
/** The number of instances of the application environment */
|
||||
instanceCount: number;
|
||||
/** This list of issues that might be wrong with the application */
|
||||
@ -22,6 +26,4 @@ export interface ApplicationOverviewEnvironmentSchema {
|
||||
name: string;
|
||||
/** SDKs used in the application environment */
|
||||
sdks: string[];
|
||||
backendSdks: string[];
|
||||
frontendSdks: string[];
|
||||
}
|
||||
|
@ -4,6 +4,7 @@
|
||||
* See `gen:api` script in package.json
|
||||
*/
|
||||
import type { BulkRegistrationSchemaConnectViaItem } from './bulkRegistrationSchemaConnectViaItem';
|
||||
import type { BulkRegistrationSchemaSdkType } from './bulkRegistrationSchemaSdkType';
|
||||
import type { DateSchema } from './dateSchema';
|
||||
|
||||
/**
|
||||
@ -21,6 +22,13 @@ export interface BulkRegistrationSchema {
|
||||
instanceId: string;
|
||||
/** How often (in seconds) the application refreshes its features */
|
||||
interval?: number;
|
||||
/** The list of projects used in the application */
|
||||
projects?: string[];
|
||||
/**
|
||||
* The sdk type
|
||||
* @nullable
|
||||
*/
|
||||
sdkType?: BulkRegistrationSchemaSdkType;
|
||||
/** The version the sdk is running. Typically <client>:<version> */
|
||||
sdkVersion?: string;
|
||||
/** The application started at */
|
||||
|
19
frontend/src/openapi/models/bulkRegistrationSchemaSdkType.ts
Normal file
19
frontend/src/openapi/models/bulkRegistrationSchemaSdkType.ts
Normal file
@ -0,0 +1,19 @@
|
||||
/**
|
||||
* Generated by Orval
|
||||
* Do not edit manually.
|
||||
* See `gen:api` script in package.json
|
||||
*/
|
||||
|
||||
/**
|
||||
* The sdk type
|
||||
* @nullable
|
||||
*/
|
||||
export type BulkRegistrationSchemaSdkType =
|
||||
| (typeof BulkRegistrationSchemaSdkType)[keyof typeof BulkRegistrationSchemaSdkType]
|
||||
| null;
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
||||
export const BulkRegistrationSchemaSdkType = {
|
||||
frontend: 'frontend',
|
||||
backend: 'backend',
|
||||
} as const;
|
14
frontend/src/openapi/models/createFeatureLink400.ts
Normal file
14
frontend/src/openapi/models/createFeatureLink400.ts
Normal file
@ -0,0 +1,14 @@
|
||||
/**
|
||||
* Generated by Orval
|
||||
* Do not edit manually.
|
||||
* See `gen:api` script in package.json
|
||||
*/
|
||||
|
||||
export type CreateFeatureLink400 = {
|
||||
/** The ID of the error instance */
|
||||
id?: string;
|
||||
/** A description of what went wrong. */
|
||||
message?: string;
|
||||
/** The name of the error kind */
|
||||
name?: string;
|
||||
};
|
14
frontend/src/openapi/models/createFeatureLink401.ts
Normal file
14
frontend/src/openapi/models/createFeatureLink401.ts
Normal file
@ -0,0 +1,14 @@
|
||||
/**
|
||||
* Generated by Orval
|
||||
* Do not edit manually.
|
||||
* See `gen:api` script in package.json
|
||||
*/
|
||||
|
||||
export type CreateFeatureLink401 = {
|
||||
/** The ID of the error instance */
|
||||
id?: string;
|
||||
/** A description of what went wrong. */
|
||||
message?: string;
|
||||
/** The name of the error kind */
|
||||
name?: string;
|
||||
};
|
14
frontend/src/openapi/models/createFeatureLink403.ts
Normal file
14
frontend/src/openapi/models/createFeatureLink403.ts
Normal file
@ -0,0 +1,14 @@
|
||||
/**
|
||||
* Generated by Orval
|
||||
* Do not edit manually.
|
||||
* See `gen:api` script in package.json
|
||||
*/
|
||||
|
||||
export type CreateFeatureLink403 = {
|
||||
/** The ID of the error instance */
|
||||
id?: string;
|
||||
/** A description of what went wrong. */
|
||||
message?: string;
|
||||
/** The name of the error kind */
|
||||
name?: string;
|
||||
};
|
14
frontend/src/openapi/models/createFeatureLink415.ts
Normal file
14
frontend/src/openapi/models/createFeatureLink415.ts
Normal file
@ -0,0 +1,14 @@
|
||||
/**
|
||||
* Generated by Orval
|
||||
* Do not edit manually.
|
||||
* See `gen:api` script in package.json
|
||||
*/
|
||||
|
||||
export type CreateFeatureLink415 = {
|
||||
/** The ID of the error instance */
|
||||
id?: string;
|
||||
/** A description of what went wrong. */
|
||||
message?: string;
|
||||
/** The name of the error kind */
|
||||
name?: string;
|
||||
};
|
14
frontend/src/openapi/models/deleteFeatureLink401.ts
Normal file
14
frontend/src/openapi/models/deleteFeatureLink401.ts
Normal file
@ -0,0 +1,14 @@
|
||||
/**
|
||||
* Generated by Orval
|
||||
* Do not edit manually.
|
||||
* See `gen:api` script in package.json
|
||||
*/
|
||||
|
||||
export type DeleteFeatureLink401 = {
|
||||
/** The ID of the error instance */
|
||||
id?: string;
|
||||
/** A description of what went wrong. */
|
||||
message?: string;
|
||||
/** The name of the error kind */
|
||||
name?: string;
|
||||
};
|
14
frontend/src/openapi/models/deleteFeatureLink403.ts
Normal file
14
frontend/src/openapi/models/deleteFeatureLink403.ts
Normal file
@ -0,0 +1,14 @@
|
||||
/**
|
||||
* Generated by Orval
|
||||
* Do not edit manually.
|
||||
* See `gen:api` script in package.json
|
||||
*/
|
||||
|
||||
export type DeleteFeatureLink403 = {
|
||||
/** The ID of the error instance */
|
||||
id?: string;
|
||||
/** A description of what went wrong. */
|
||||
message?: string;
|
||||
/** The name of the error kind */
|
||||
name?: string;
|
||||
};
|
14
frontend/src/openapi/models/deleteFeatureLink404.ts
Normal file
14
frontend/src/openapi/models/deleteFeatureLink404.ts
Normal file
@ -0,0 +1,14 @@
|
||||
/**
|
||||
* Generated by Orval
|
||||
* Do not edit manually.
|
||||
* See `gen:api` script in package.json
|
||||
*/
|
||||
|
||||
export type DeleteFeatureLink404 = {
|
||||
/** The ID of the error instance */
|
||||
id?: string;
|
||||
/** A description of what went wrong. */
|
||||
message?: string;
|
||||
/** The name of the error kind */
|
||||
name?: string;
|
||||
};
|
@ -32,6 +32,9 @@ export const DeprecatedSearchEventsSchemaType = {
|
||||
'feature-type-updated': 'feature-type-updated',
|
||||
'feature-completed': 'feature-completed',
|
||||
'feature-uncompleted': 'feature-uncompleted',
|
||||
'feature-link-added': 'feature-link-added',
|
||||
'feature-link-removed': 'feature-link-removed',
|
||||
'feature-link-updated': 'feature-link-updated',
|
||||
'strategy-order-changed': 'strategy-order-changed',
|
||||
'drop-feature-tags': 'drop-feature-tags',
|
||||
'feature-untagged': 'feature-untagged',
|
||||
|
@ -32,6 +32,9 @@ export const EventSchemaType = {
|
||||
'feature-type-updated': 'feature-type-updated',
|
||||
'feature-completed': 'feature-completed',
|
||||
'feature-uncompleted': 'feature-uncompleted',
|
||||
'feature-link-added': 'feature-link-added',
|
||||
'feature-link-removed': 'feature-link-removed',
|
||||
'feature-link-updated': 'feature-link-updated',
|
||||
'strategy-order-changed': 'strategy-order-changed',
|
||||
'drop-feature-tags': 'drop-feature-tags',
|
||||
'feature-untagged': 'feature-untagged',
|
||||
|
18
frontend/src/openapi/models/featureLinkSchema.ts
Normal file
18
frontend/src/openapi/models/featureLinkSchema.ts
Normal file
@ -0,0 +1,18 @@
|
||||
/**
|
||||
* Generated by Orval
|
||||
* Do not edit manually.
|
||||
* See `gen:api` script in package.json
|
||||
*/
|
||||
|
||||
/**
|
||||
* The link to any URL related to the feature
|
||||
*/
|
||||
export interface FeatureLinkSchema {
|
||||
/**
|
||||
* The description of the link
|
||||
* @nullable
|
||||
*/
|
||||
title?: string | null;
|
||||
/** The URL the feature is linked to */
|
||||
url: string;
|
||||
}
|
@ -8,6 +8,7 @@ import type { FeatureSchemaCreatedBy } from './featureSchemaCreatedBy';
|
||||
import type { FeatureSchemaDependenciesItem } from './featureSchemaDependenciesItem';
|
||||
import type { FeatureEnvironmentSchema } from './featureEnvironmentSchema';
|
||||
import type { FeatureSchemaLifecycle } from './featureSchemaLifecycle';
|
||||
import type { FeatureSchemaLinksItem } from './featureSchemaLinksItem';
|
||||
import type { FeatureSchemaStrategiesItem } from './featureSchemaStrategiesItem';
|
||||
import type { TagSchema } from './tagSchema';
|
||||
import type { VariantSchema } from './variantSchema';
|
||||
@ -57,6 +58,8 @@ export interface FeatureSchema {
|
||||
lastSeenAt?: string | null;
|
||||
/** Current lifecycle stage of the feature */
|
||||
lifecycle?: FeatureSchemaLifecycle;
|
||||
/** The list of links. This is an experimental field and may change. */
|
||||
links?: FeatureSchemaLinksItem[];
|
||||
/** Unique feature name */
|
||||
name: string;
|
||||
/** Name of the project the feature belongs to */
|
||||
|
17
frontend/src/openapi/models/featureSchemaLinksItem.ts
Normal file
17
frontend/src/openapi/models/featureSchemaLinksItem.ts
Normal file
@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Generated by Orval
|
||||
* Do not edit manually.
|
||||
* See `gen:api` script in package.json
|
||||
*/
|
||||
|
||||
export type FeatureSchemaLinksItem = {
|
||||
/** The id of the link */
|
||||
id: string;
|
||||
/**
|
||||
* The description of the link
|
||||
* @nullable
|
||||
*/
|
||||
title?: string | null;
|
||||
/** The URL the feature is linked to */
|
||||
url: string;
|
||||
};
|
@ -134,6 +134,7 @@ export * from './batchStaleSchema';
|
||||
export * from './bulkMetricsSchema';
|
||||
export * from './bulkRegistrationSchema';
|
||||
export * from './bulkRegistrationSchemaConnectViaItem';
|
||||
export * from './bulkRegistrationSchemaSdkType';
|
||||
export * from './bulkToggleFeaturesEnvironmentOff400';
|
||||
export * from './bulkToggleFeaturesEnvironmentOff401';
|
||||
export * from './bulkToggleFeaturesEnvironmentOff403';
|
||||
@ -412,6 +413,10 @@ export * from './createFeature401';
|
||||
export * from './createFeature403';
|
||||
export * from './createFeature404';
|
||||
export * from './createFeature415';
|
||||
export * from './createFeatureLink400';
|
||||
export * from './createFeatureLink401';
|
||||
export * from './createFeatureLink403';
|
||||
export * from './createFeatureLink415';
|
||||
export * from './createFeatureNamingPatternSchema';
|
||||
export * from './createFeatureSchema';
|
||||
export * from './createFeatureSchemaType';
|
||||
@ -527,6 +532,9 @@ export * from './deleteFeatureDependencies404';
|
||||
export * from './deleteFeatureDependency401';
|
||||
export * from './deleteFeatureDependency403';
|
||||
export * from './deleteFeatureDependency404';
|
||||
export * from './deleteFeatureLink401';
|
||||
export * from './deleteFeatureLink403';
|
||||
export * from './deleteFeatureLink404';
|
||||
export * from './deleteFeatureStrategy401';
|
||||
export * from './deleteFeatureStrategy403';
|
||||
export * from './deleteFeatureStrategy404';
|
||||
@ -635,6 +643,7 @@ export * from './featureLifecycleCountSchema';
|
||||
export * from './featureLifecycleSchema';
|
||||
export * from './featureLifecycleSchemaItem';
|
||||
export * from './featureLifecycleSchemaItemStage';
|
||||
export * from './featureLinkSchema';
|
||||
export * from './featureMetricsSchema';
|
||||
export * from './featureSchema';
|
||||
export * from './featureSchemaCollaborators';
|
||||
@ -643,6 +652,7 @@ export * from './featureSchemaCreatedBy';
|
||||
export * from './featureSchemaDependenciesItem';
|
||||
export * from './featureSchemaLifecycle';
|
||||
export * from './featureSchemaLifecycleStage';
|
||||
export * from './featureSchemaLinksItem';
|
||||
export * from './featureSchemaStrategiesItem';
|
||||
export * from './featureSearchEnvironmentSchema';
|
||||
export * from './featureSearchResponseSchema';
|
||||
@ -1365,6 +1375,9 @@ export * from './uiObservability403';
|
||||
export * from './uncomplete401';
|
||||
export * from './uncomplete403';
|
||||
export * from './uncomplete404';
|
||||
export * from './unknownFlagSchema';
|
||||
export * from './unknownFlagSchemaReportedByItem';
|
||||
export * from './unknownFlagsResponseSchema';
|
||||
export * from './unsubscribeEmailSubscription401';
|
||||
export * from './unsubscribeEmailSubscription404';
|
||||
export * from './updateAddon400';
|
||||
@ -1391,6 +1404,11 @@ export * from './updateFeature401';
|
||||
export * from './updateFeature403';
|
||||
export * from './updateFeature404';
|
||||
export * from './updateFeature415';
|
||||
export * from './updateFeatureLink400';
|
||||
export * from './updateFeatureLink401';
|
||||
export * from './updateFeatureLink403';
|
||||
export * from './updateFeatureLink404';
|
||||
export * from './updateFeatureLink415';
|
||||
export * from './updateFeatureSchema';
|
||||
export * from './updateFeatureSchemaType';
|
||||
export * from './updateFeatureStrategy400';
|
||||
|
16
frontend/src/openapi/models/unknownFlagSchema.ts
Normal file
16
frontend/src/openapi/models/unknownFlagSchema.ts
Normal file
@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Generated by Orval
|
||||
* Do not edit manually.
|
||||
* See `gen:api` script in package.json
|
||||
*/
|
||||
import type { UnknownFlagSchemaReportedByItem } from './unknownFlagSchemaReportedByItem';
|
||||
|
||||
/**
|
||||
* An unknown flag that has been reported by the system
|
||||
*/
|
||||
export interface UnknownFlagSchema {
|
||||
/** The name of the unknown flag. */
|
||||
name: string;
|
||||
/** Details about the application that reported the unknown flag. */
|
||||
reportedBy: UnknownFlagSchemaReportedByItem[];
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
/**
|
||||
* Generated by Orval
|
||||
* Do not edit manually.
|
||||
* See `gen:api` script in package.json
|
||||
*/
|
||||
|
||||
export type UnknownFlagSchemaReportedByItem = {
|
||||
/** The name of the application that reported the unknown flag. */
|
||||
appName: string;
|
||||
/** The date and time when the unknown flag was reported. */
|
||||
seenAt: string;
|
||||
};
|
14
frontend/src/openapi/models/unknownFlagsResponseSchema.ts
Normal file
14
frontend/src/openapi/models/unknownFlagsResponseSchema.ts
Normal file
@ -0,0 +1,14 @@
|
||||
/**
|
||||
* Generated by Orval
|
||||
* Do not edit manually.
|
||||
* See `gen:api` script in package.json
|
||||
*/
|
||||
import type { UnknownFlagSchema } from './unknownFlagSchema';
|
||||
|
||||
/**
|
||||
* A list of unknown flags that have been reported by the system
|
||||
*/
|
||||
export interface UnknownFlagsResponseSchema {
|
||||
/** The list of recently reported unknown flags. */
|
||||
unknownFlags: UnknownFlagSchema[];
|
||||
}
|
14
frontend/src/openapi/models/updateFeatureLink400.ts
Normal file
14
frontend/src/openapi/models/updateFeatureLink400.ts
Normal file
@ -0,0 +1,14 @@
|
||||
/**
|
||||
* Generated by Orval
|
||||
* Do not edit manually.
|
||||
* See `gen:api` script in package.json
|
||||
*/
|
||||
|
||||
export type UpdateFeatureLink400 = {
|
||||
/** The ID of the error instance */
|
||||
id?: string;
|
||||
/** A description of what went wrong. */
|
||||
message?: string;
|
||||
/** The name of the error kind */
|
||||
name?: string;
|
||||
};
|
14
frontend/src/openapi/models/updateFeatureLink401.ts
Normal file
14
frontend/src/openapi/models/updateFeatureLink401.ts
Normal file
@ -0,0 +1,14 @@
|
||||
/**
|
||||
* Generated by Orval
|
||||
* Do not edit manually.
|
||||
* See `gen:api` script in package.json
|
||||
*/
|
||||
|
||||
export type UpdateFeatureLink401 = {
|
||||
/** The ID of the error instance */
|
||||
id?: string;
|
||||
/** A description of what went wrong. */
|
||||
message?: string;
|
||||
/** The name of the error kind */
|
||||
name?: string;
|
||||
};
|
14
frontend/src/openapi/models/updateFeatureLink403.ts
Normal file
14
frontend/src/openapi/models/updateFeatureLink403.ts
Normal file
@ -0,0 +1,14 @@
|
||||
/**
|
||||
* Generated by Orval
|
||||
* Do not edit manually.
|
||||
* See `gen:api` script in package.json
|
||||
*/
|
||||
|
||||
export type UpdateFeatureLink403 = {
|
||||
/** The ID of the error instance */
|
||||
id?: string;
|
||||
/** A description of what went wrong. */
|
||||
message?: string;
|
||||
/** The name of the error kind */
|
||||
name?: string;
|
||||
};
|
14
frontend/src/openapi/models/updateFeatureLink404.ts
Normal file
14
frontend/src/openapi/models/updateFeatureLink404.ts
Normal file
@ -0,0 +1,14 @@
|
||||
/**
|
||||
* Generated by Orval
|
||||
* Do not edit manually.
|
||||
* See `gen:api` script in package.json
|
||||
*/
|
||||
|
||||
export type UpdateFeatureLink404 = {
|
||||
/** The ID of the error instance */
|
||||
id?: string;
|
||||
/** A description of what went wrong. */
|
||||
message?: string;
|
||||
/** The name of the error kind */
|
||||
name?: string;
|
||||
};
|
14
frontend/src/openapi/models/updateFeatureLink415.ts
Normal file
14
frontend/src/openapi/models/updateFeatureLink415.ts
Normal file
@ -0,0 +1,14 @@
|
||||
/**
|
||||
* Generated by Orval
|
||||
* Do not edit manually.
|
||||
* See `gen:api` script in package.json
|
||||
*/
|
||||
|
||||
export type UpdateFeatureLink415 = {
|
||||
/** The ID of the error instance */
|
||||
id?: string;
|
||||
/** A description of what went wrong. */
|
||||
message?: string;
|
||||
/** The name of the error kind */
|
||||
name?: string;
|
||||
};
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Used to validate passwords obeying [Unleash password guidelines](https://docs.getunleash.io/reference/deploy/securing-unleash#password-requirements)
|
||||
* Used to validate passwords obeying [Unleash password guidelines](https://docs.getunleash.io/using-unleash/deploy/configuring-unleash#securing-unleash)
|
||||
*/
|
||||
export interface ValidatePasswordSchema {
|
||||
/** The password to validate */
|
||||
|
Loading…
Reference in New Issue
Block a user