Skip to content

Commit

Permalink
chore: generate orval after frontend api refactor (#6512)
Browse files Browse the repository at this point in the history
  • Loading branch information
kwasniew committed Mar 12, 2024
1 parent bc83a4d commit faf2153
Show file tree
Hide file tree
Showing 56 changed files with 466 additions and 313 deletions.
10 changes: 5 additions & 5 deletions frontend/src/openapi/models/actionSetEventSchema.ts
Expand Up @@ -4,7 +4,7 @@
* See `gen:api` script in package.json
*/
import type { ActionSetEventSchemaActionSet } from './actionSetEventSchemaActionSet';
import type { ObservableEventSchema } from './observableEventSchema';
import type { SignalSchema } from './signalSchema';
import type { ActionSetEventSchemaState } from './actionSetEventSchemaState';

/**
Expand All @@ -19,10 +19,10 @@ export interface ActionSetEventSchema {
createdAt: string;
/** The action set event's ID. Action set event IDs are incrementing integers. In other words, a more recently created action set event will always have a higher ID than an older one. */
id: number;
/** The observable event that triggered this action set event. */
observableEvent: ObservableEventSchema;
/** The ID of the observable event that triggered this action set event. */
observableEventId: number;
/** The signal that triggered this action set event. */
signal: SignalSchema;
/** The ID of the signal that triggered this action set event. */
signalId: number;
/** The state of the action set event. Can be one of `started`, `success`, or `failed`. */
state: ActionSetEventSchemaState;
}
4 changes: 3 additions & 1 deletion frontend/src/openapi/models/actionSetEventSchemaActionSet.ts
Expand Up @@ -18,11 +18,13 @@ export type ActionSetEventSchemaActionSet = {
createdAt: string;
/** The ID of the user that created this action set. */
createdByUserId: number;
/** The description of the action set */
description?: string | null;
/** Whether this action set is enabled or not */
enabled?: boolean;
/** The ID of the action set. */
id: number;
/** Defines a matching rule for the observable event that will trigger the action set */
/** Defines a matching rule for the signal that will trigger the action set */
match: ActionSetEventSchemaActionSetMatch;
/** The name of the action set */
name: string;
Expand Down
Expand Up @@ -4,15 +4,16 @@
* See `gen:api` script in package.json
*/
import type { ActionSetEventSchemaActionSetMatchPayload } from './actionSetEventSchemaActionSetMatchPayload';
import type { ActionSetEventSchemaActionSetMatchSource } from './actionSetEventSchemaActionSetMatchSource';

/**
* Defines a matching rule for the observable event that will trigger the action set
* Defines a matching rule for the signal that will trigger the action set
*/
export type ActionSetEventSchemaActionSetMatch = {
/** Match the payload of the observable event */
/** Match the payload of the signal */
payload: ActionSetEventSchemaActionSetMatchPayload;
/** Match the source of the observable event */
source: string;
/** Match the source id of the observable event */
/** Match the source of the signal */
source: ActionSetEventSchemaActionSetMatchSource;
/** Match the source id of the signal */
sourceId: number;
};
Expand Up @@ -5,6 +5,6 @@
*/

/**
* Match the payload of the observable event
* Match the payload of the signal
*/
export type ActionSetEventSchemaActionSetMatchPayload = { [key: string]: any };
@@ -0,0 +1,16 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/

/**
* Match the source of the signal
*/
export type ActionSetEventSchemaActionSetMatchSource =
(typeof ActionSetEventSchemaActionSetMatchSource)[keyof typeof ActionSetEventSchemaActionSetMatchSource];

// eslint-disable-next-line @typescript-eslint/no-redeclare
export const ActionSetEventSchemaActionSetMatchSource = {
'signal-endpoint': 'signal-endpoint',
} as const;
4 changes: 3 additions & 1 deletion frontend/src/openapi/models/actionsSchema.ts
Expand Up @@ -18,11 +18,13 @@ export interface ActionsSchema {
createdAt: string;
/** The ID of the user that created this action set. */
createdByUserId: number;
/** The description of the action set */
description?: string | null;
/** Whether this action set is enabled or not */
enabled?: boolean;
/** The ID of the action set. */
id: number;
/** Defines a matching rule for the observable event that will trigger the action set */
/** Defines a matching rule for the signal that will trigger the action set */
match: ActionsSchemaMatch;
/** The name of the action set */
name: string;
Expand Down
11 changes: 6 additions & 5 deletions frontend/src/openapi/models/actionsSchemaMatch.ts
Expand Up @@ -4,15 +4,16 @@
* See `gen:api` script in package.json
*/
import type { ActionsSchemaMatchPayload } from './actionsSchemaMatchPayload';
import type { ActionsSchemaMatchSource } from './actionsSchemaMatchSource';

/**
* Defines a matching rule for the observable event that will trigger the action set
* Defines a matching rule for the signal that will trigger the action set
*/
export type ActionsSchemaMatch = {
/** Match the payload of the observable event */
/** Match the payload of the signal */
payload: ActionsSchemaMatchPayload;
/** Match the source of the observable event */
source: string;
/** Match the source id of the observable event */
/** Match the source of the signal */
source: ActionsSchemaMatchSource;
/** Match the source id of the signal */
sourceId: number;
};
2 changes: 1 addition & 1 deletion frontend/src/openapi/models/actionsSchemaMatchPayload.ts
Expand Up @@ -5,6 +5,6 @@
*/

/**
* Match the payload of the observable event
* Match the payload of the signal
*/
export type ActionsSchemaMatchPayload = { [key: string]: any };
16 changes: 16 additions & 0 deletions frontend/src/openapi/models/actionsSchemaMatchSource.ts
@@ -0,0 +1,16 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/

/**
* Match the source of the signal
*/
export type ActionsSchemaMatchSource =
(typeof ActionsSchemaMatchSource)[keyof typeof ActionsSchemaMatchSource];

// eslint-disable-next-line @typescript-eslint/no-redeclare
export const ActionsSchemaMatchSource = {
'signal-endpoint': 'signal-endpoint',
} as const;
6 changes: 4 additions & 2 deletions frontend/src/openapi/models/createActionsSchema.ts
Expand Up @@ -7,16 +7,18 @@ import type { CreateActionSchema } from './createActionSchema';
import type { CreateActionsSchemaMatch } from './createActionsSchemaMatch';

/**
* An action set defines actions that Unleash performs when an observable event is matched.
* An action set defines actions that Unleash performs when a signal is matched.
*/
export interface CreateActionsSchema {
/** The list of actions to execute in sequential order when the action set is triggered */
actions: CreateActionSchema[];
/** The id of the service account that will execute the action */
actorId: number;
/** The description of the action set */
description?: string | null;
/** Whether this action set is enabled or not */
enabled?: boolean;
/** Defines a matching rule for the observable event that will trigger the action set */
/** Defines a matching rule for the signal that will trigger the action set */
match: CreateActionsSchemaMatch;
/** The name of the action set */
name: string;
Expand Down
11 changes: 6 additions & 5 deletions frontend/src/openapi/models/createActionsSchemaMatch.ts
Expand Up @@ -4,15 +4,16 @@
* See `gen:api` script in package.json
*/
import type { CreateActionsSchemaMatchPayload } from './createActionsSchemaMatchPayload';
import type { CreateActionsSchemaMatchSource } from './createActionsSchemaMatchSource';

/**
* Defines a matching rule for the observable event that will trigger the action set
* Defines a matching rule for the signal that will trigger the action set
*/
export type CreateActionsSchemaMatch = {
/** Match the payload of the observable event */
/** Match the payload of the signal */
payload: CreateActionsSchemaMatchPayload;
/** Match the source of the observable event */
source: string;
/** Match the source id of the observable event */
/** Match the source of the signal */
source: CreateActionsSchemaMatchSource;
/** Match the source id of the signal */
sourceId: number;
};
Expand Up @@ -5,6 +5,6 @@
*/

/**
* Match the payload of the observable event
* Match the payload of the signal
*/
export type CreateActionsSchemaMatchPayload = { [key: string]: any };
16 changes: 16 additions & 0 deletions frontend/src/openapi/models/createActionsSchemaMatchSource.ts
@@ -0,0 +1,16 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/

/**
* Match the source of the signal
*/
export type CreateActionsSchemaMatchSource =
(typeof CreateActionsSchemaMatchSource)[keyof typeof CreateActionsSchemaMatchSource];

// eslint-disable-next-line @typescript-eslint/no-redeclare
export const CreateActionsSchemaMatchSource = {
'signal-endpoint': 'signal-endpoint',
} as const;
17 changes: 0 additions & 17 deletions frontend/src/openapi/models/createIncomingWebhookSchema.ts

This file was deleted.

13 changes: 0 additions & 13 deletions frontend/src/openapi/models/createIncomingWebhookTokenSchema.ts

This file was deleted.

17 changes: 17 additions & 0 deletions frontend/src/openapi/models/createSignalEndpointSchema.ts
@@ -0,0 +1,17 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/

/**
* Describes the properties required to create or update a signal endpoint.
*/
export interface CreateSignalEndpointSchema {
/** A more detailed description of the signal endpoint and its intended use. */
description?: string | null;
/** Whether the signal endpoint is currently enabled. If not specified, defaults to true. */
enabled?: boolean;
/** The signal endpoint name. Must be URL-safe. */
name: string;
}
13 changes: 13 additions & 0 deletions frontend/src/openapi/models/createSignalEndpointTokenSchema.ts
@@ -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 a signal endpoint token.
*/
export interface CreateSignalEndpointTokenSchema {
/** The signal endpoint token name. */
name: string;
}
12 changes: 6 additions & 6 deletions frontend/src/openapi/models/eventSchemaType.ts
Expand Up @@ -149,12 +149,12 @@ export const EventSchemaType = {
'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',
'signal-endpoint-created': 'signal-endpoint-created',
'signal-endpoint-updated': 'signal-endpoint-updated',
'signal-endpoint-deleted': 'signal-endpoint-deleted',
'signal-endpoint-token-created': 'signal-endpoint-token-created',
'signal-endpoint-token-updated': 'signal-endpoint-token-updated',
'signal-endpoint-token-deleted': 'signal-endpoint-token-deleted',
'actions-created': 'actions-created',
'actions-updated': 'actions-updated',
'actions-deleted': 'actions-deleted',
Expand Down
Expand Up @@ -3,12 +3,12 @@
* Do not edit manually.
* See `gen:api` script in package.json
*/
import type { ProxyClientSchemaStarted } from './proxyClientSchemaStarted';
import type { FrontendApiClientSchemaStarted } from './frontendApiClientSchemaStarted';

/**
* Frontend SDK client registration information
*/
export interface ProxyClientSchema {
export interface FrontendApiClientSchema {
/** Name of the application using Unleash */
appName: string;
/**
Expand All @@ -23,7 +23,7 @@ export interface ProxyClientSchema {
/** Optional field that describes the sdk version (name:version) */
sdkVersion?: string;
/** When this client started. Should be reported as ISO8601 time. */
started: ProxyClientSchemaStarted;
started: FrontendApiClientSchemaStarted;
/** List of strategies implemented by this application */
strategies: string[];
}
Expand Up @@ -7,4 +7,4 @@
/**
* When this client started. Should be reported as ISO8601 time.
*/
export type ProxyClientSchemaStarted = string | number;
export type FrontendApiClientSchemaStarted = string | number;
Expand Up @@ -3,18 +3,18 @@
* Do not edit manually.
* See `gen:api` script in package.json
*/
import type { ProxyFeatureSchemaVariant } from './proxyFeatureSchemaVariant';
import type { FrontendApiFeatureSchemaVariant } from './frontendApiFeatureSchemaVariant';

/**
* Frontend API feature
*/
export interface ProxyFeatureSchema {
export interface FrontendApiFeatureSchema {
/** Always set to `true`. */
enabled: boolean;
/** `true` if the impression data collection is enabled for the feature, otherwise `false`. */
impressionData: boolean;
/** Unique feature name. */
name: string;
/** Variant details */
variant?: ProxyFeatureSchemaVariant;
variant?: FrontendApiFeatureSchemaVariant;
}
Expand Up @@ -3,12 +3,12 @@
* Do not edit manually.
* See `gen:api` script in package.json
*/
import type { ProxyFeatureSchemaVariantPayload } from './proxyFeatureSchemaVariantPayload';
import type { FrontendApiFeatureSchemaVariantPayload } from './frontendApiFeatureSchemaVariantPayload';

/**
* Variant details
*/
export type ProxyFeatureSchemaVariant = {
export type FrontendApiFeatureSchemaVariant = {
/** Whether the variant is enabled or not. */
enabled: boolean;
/** Whether the feature is enabled or not. */
Expand All @@ -21,5 +21,5 @@ export type ProxyFeatureSchemaVariant = {
/** The variants name. Is unique for this feature toggle */
name: string;
/** Extra data configured for this variant */
payload?: ProxyFeatureSchemaVariantPayload;
payload?: FrontendApiFeatureSchemaVariantPayload;
};
Expand Up @@ -3,14 +3,14 @@
* Do not edit manually.
* See `gen:api` script in package.json
*/
import type { ProxyFeatureSchemaVariantPayloadType } from './proxyFeatureSchemaVariantPayloadType';
import type { FrontendApiFeatureSchemaVariantPayloadType } from './frontendApiFeatureSchemaVariantPayloadType';

/**
* Extra data configured for this variant
*/
export type ProxyFeatureSchemaVariantPayload = {
export type FrontendApiFeatureSchemaVariantPayload = {
/** The format of the payload. */
type: ProxyFeatureSchemaVariantPayloadType;
type: FrontendApiFeatureSchemaVariantPayloadType;
/** The payload value stringified. */
value: string;
};

0 comments on commit faf2153

Please sign in to comment.