mirror of
https://github.com/Unleash/unleash.git
synced 2025-07-17 13:46:47 +02:00
Upgrades biome to 1.6.1, and updates husky pre-commit hook. Most changes here are making type imports explicit.
46 lines
1.4 KiB
TypeScript
46 lines
1.4 KiB
TypeScript
import type { FromSchema } from 'json-schema-to-ts';
|
|
import { ALL } from '../../types/models/api-token';
|
|
import { sdkContextSchema } from './sdk-context-schema';
|
|
|
|
export const playgroundRequestSchema = {
|
|
$id: '#/components/schemas/playgroundRequestSchema',
|
|
description: 'Data for the playground API to evaluate toggles',
|
|
type: 'object',
|
|
required: ['environment', 'context'],
|
|
properties: {
|
|
environment: {
|
|
type: 'string',
|
|
example: 'development',
|
|
description: 'The environment to evaluate toggles in.',
|
|
},
|
|
projects: {
|
|
description: 'A list of projects to check for toggles in.',
|
|
oneOf: [
|
|
{
|
|
type: 'array',
|
|
items: { type: 'string' },
|
|
example: ['my-project'],
|
|
description: 'A list of projects to check for toggles in.',
|
|
},
|
|
{
|
|
type: 'string',
|
|
enum: [ALL],
|
|
description: 'Check toggles in all projects.',
|
|
},
|
|
],
|
|
},
|
|
context: {
|
|
$ref: sdkContextSchema.$id,
|
|
},
|
|
},
|
|
components: {
|
|
schemas: {
|
|
sdkContextSchema,
|
|
},
|
|
},
|
|
} as const;
|
|
|
|
export type PlaygroundRequestSchema = FromSchema<
|
|
typeof playgroundRequestSchema
|
|
>;
|