diff --git a/frontend/src/hooks/api/actions/useFeatureLinkApi/useFeatureLinkApi.ts b/frontend/src/hooks/api/actions/useFeatureLinkApi/useFeatureLinkApi.ts index 4d335116cc..ff65a090d7 100644 --- a/frontend/src/hooks/api/actions/useFeatureLinkApi/useFeatureLinkApi.ts +++ b/frontend/src/hooks/api/actions/useFeatureLinkApi/useFeatureLinkApi.ts @@ -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`, { diff --git a/frontend/src/openapi/models/applicationEnvironmentInstancesSchemaInstancesItem.ts b/frontend/src/openapi/models/applicationEnvironmentInstancesSchemaInstancesItem.ts index 4e24016c51..1ef2a117a2 100644 --- a/frontend/src/openapi/models/applicationEnvironmentInstancesSchemaInstancesItem.ts +++ b/frontend/src/openapi/models/applicationEnvironmentInstancesSchemaInstancesItem.ts @@ -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 */ diff --git a/frontend/src/openapi/models/applicationOverviewEnvironmentSchema.ts b/frontend/src/openapi/models/applicationOverviewEnvironmentSchema.ts index a5e6a0ca0b..f25b272339 100644 --- a/frontend/src/openapi/models/applicationOverviewEnvironmentSchema.ts +++ b/frontend/src/openapi/models/applicationOverviewEnvironmentSchema.ts @@ -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[]; } diff --git a/frontend/src/openapi/models/bulkRegistrationSchema.ts b/frontend/src/openapi/models/bulkRegistrationSchema.ts index d6a72cd7b1..1e4f293a8f 100644 --- a/frontend/src/openapi/models/bulkRegistrationSchema.ts +++ b/frontend/src/openapi/models/bulkRegistrationSchema.ts @@ -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 : */ sdkVersion?: string; /** The application started at */ diff --git a/frontend/src/openapi/models/bulkRegistrationSchemaSdkType.ts b/frontend/src/openapi/models/bulkRegistrationSchemaSdkType.ts new file mode 100644 index 0000000000..ed358d1d66 --- /dev/null +++ b/frontend/src/openapi/models/bulkRegistrationSchemaSdkType.ts @@ -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; diff --git a/frontend/src/openapi/models/createFeatureLink400.ts b/frontend/src/openapi/models/createFeatureLink400.ts new file mode 100644 index 0000000000..09dcfc4359 --- /dev/null +++ b/frontend/src/openapi/models/createFeatureLink400.ts @@ -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; +}; diff --git a/frontend/src/openapi/models/createFeatureLink401.ts b/frontend/src/openapi/models/createFeatureLink401.ts new file mode 100644 index 0000000000..5705ca8ec7 --- /dev/null +++ b/frontend/src/openapi/models/createFeatureLink401.ts @@ -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; +}; diff --git a/frontend/src/openapi/models/createFeatureLink403.ts b/frontend/src/openapi/models/createFeatureLink403.ts new file mode 100644 index 0000000000..beafe46321 --- /dev/null +++ b/frontend/src/openapi/models/createFeatureLink403.ts @@ -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; +}; diff --git a/frontend/src/openapi/models/createFeatureLink415.ts b/frontend/src/openapi/models/createFeatureLink415.ts new file mode 100644 index 0000000000..94b08b3f9c --- /dev/null +++ b/frontend/src/openapi/models/createFeatureLink415.ts @@ -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; +}; diff --git a/frontend/src/openapi/models/deleteFeatureLink401.ts b/frontend/src/openapi/models/deleteFeatureLink401.ts new file mode 100644 index 0000000000..2fe2ccbfb3 --- /dev/null +++ b/frontend/src/openapi/models/deleteFeatureLink401.ts @@ -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; +}; diff --git a/frontend/src/openapi/models/deleteFeatureLink403.ts b/frontend/src/openapi/models/deleteFeatureLink403.ts new file mode 100644 index 0000000000..b661a4f11e --- /dev/null +++ b/frontend/src/openapi/models/deleteFeatureLink403.ts @@ -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; +}; diff --git a/frontend/src/openapi/models/deleteFeatureLink404.ts b/frontend/src/openapi/models/deleteFeatureLink404.ts new file mode 100644 index 0000000000..88c113d94f --- /dev/null +++ b/frontend/src/openapi/models/deleteFeatureLink404.ts @@ -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; +}; diff --git a/frontend/src/openapi/models/deprecatedSearchEventsSchemaType.ts b/frontend/src/openapi/models/deprecatedSearchEventsSchemaType.ts index 490b2162dd..f837404163 100644 --- a/frontend/src/openapi/models/deprecatedSearchEventsSchemaType.ts +++ b/frontend/src/openapi/models/deprecatedSearchEventsSchemaType.ts @@ -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', diff --git a/frontend/src/openapi/models/eventSchemaType.ts b/frontend/src/openapi/models/eventSchemaType.ts index 21fc3d6d67..1ced43b7e0 100644 --- a/frontend/src/openapi/models/eventSchemaType.ts +++ b/frontend/src/openapi/models/eventSchemaType.ts @@ -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', diff --git a/frontend/src/openapi/models/featureLinkSchema.ts b/frontend/src/openapi/models/featureLinkSchema.ts new file mode 100644 index 0000000000..77fae54266 --- /dev/null +++ b/frontend/src/openapi/models/featureLinkSchema.ts @@ -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; +} diff --git a/frontend/src/openapi/models/featureSchema.ts b/frontend/src/openapi/models/featureSchema.ts index ef4b5f82fc..16cb39c1bc 100644 --- a/frontend/src/openapi/models/featureSchema.ts +++ b/frontend/src/openapi/models/featureSchema.ts @@ -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 */ diff --git a/frontend/src/openapi/models/featureSchemaLinksItem.ts b/frontend/src/openapi/models/featureSchemaLinksItem.ts new file mode 100644 index 0000000000..54b00e5ae1 --- /dev/null +++ b/frontend/src/openapi/models/featureSchemaLinksItem.ts @@ -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; +}; diff --git a/frontend/src/openapi/models/index.ts b/frontend/src/openapi/models/index.ts index 5cf973bf76..13548c0489 100644 --- a/frontend/src/openapi/models/index.ts +++ b/frontend/src/openapi/models/index.ts @@ -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'; diff --git a/frontend/src/openapi/models/unknownFlagSchema.ts b/frontend/src/openapi/models/unknownFlagSchema.ts new file mode 100644 index 0000000000..2aa475fe96 --- /dev/null +++ b/frontend/src/openapi/models/unknownFlagSchema.ts @@ -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[]; +} diff --git a/frontend/src/openapi/models/unknownFlagSchemaReportedByItem.ts b/frontend/src/openapi/models/unknownFlagSchemaReportedByItem.ts new file mode 100644 index 0000000000..ec1f7c4e05 --- /dev/null +++ b/frontend/src/openapi/models/unknownFlagSchemaReportedByItem.ts @@ -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; +}; diff --git a/frontend/src/openapi/models/unknownFlagsResponseSchema.ts b/frontend/src/openapi/models/unknownFlagsResponseSchema.ts new file mode 100644 index 0000000000..393a7c716e --- /dev/null +++ b/frontend/src/openapi/models/unknownFlagsResponseSchema.ts @@ -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[]; +} diff --git a/frontend/src/openapi/models/updateFeatureLink400.ts b/frontend/src/openapi/models/updateFeatureLink400.ts new file mode 100644 index 0000000000..addb88a594 --- /dev/null +++ b/frontend/src/openapi/models/updateFeatureLink400.ts @@ -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; +}; diff --git a/frontend/src/openapi/models/updateFeatureLink401.ts b/frontend/src/openapi/models/updateFeatureLink401.ts new file mode 100644 index 0000000000..cea616f057 --- /dev/null +++ b/frontend/src/openapi/models/updateFeatureLink401.ts @@ -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; +}; diff --git a/frontend/src/openapi/models/updateFeatureLink403.ts b/frontend/src/openapi/models/updateFeatureLink403.ts new file mode 100644 index 0000000000..c7a5fd47fb --- /dev/null +++ b/frontend/src/openapi/models/updateFeatureLink403.ts @@ -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; +}; diff --git a/frontend/src/openapi/models/updateFeatureLink404.ts b/frontend/src/openapi/models/updateFeatureLink404.ts new file mode 100644 index 0000000000..589a279009 --- /dev/null +++ b/frontend/src/openapi/models/updateFeatureLink404.ts @@ -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; +}; diff --git a/frontend/src/openapi/models/updateFeatureLink415.ts b/frontend/src/openapi/models/updateFeatureLink415.ts new file mode 100644 index 0000000000..41247f7b09 --- /dev/null +++ b/frontend/src/openapi/models/updateFeatureLink415.ts @@ -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; +}; diff --git a/frontend/src/openapi/models/validatePasswordSchema.ts b/frontend/src/openapi/models/validatePasswordSchema.ts index d32de1669c..989a9f2d43 100644 --- a/frontend/src/openapi/models/validatePasswordSchema.ts +++ b/frontend/src/openapi/models/validatePasswordSchema.ts @@ -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 */