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.
41 lines
1.4 KiB
TypeScript
41 lines
1.4 KiB
TypeScript
import type { FromSchema } from 'json-schema-to-ts';
|
|
import { createFeatureStrategySchema } from './create-feature-strategy-schema';
|
|
import { createStrategyVariantSchema } from './create-strategy-variant-schema';
|
|
|
|
export const projectEnvironmentSchema = {
|
|
$id: '#/components/schemas/projectEnvironmentSchema',
|
|
type: 'object',
|
|
additionalProperties: false,
|
|
description:
|
|
'Add an environment to a project, optionally also sets if change requests are enabled for this environment on the project',
|
|
required: ['environment'],
|
|
properties: {
|
|
environment: {
|
|
type: 'string',
|
|
description: 'The environment to add to the project',
|
|
example: 'development',
|
|
},
|
|
changeRequestsEnabled: {
|
|
type: 'boolean',
|
|
description:
|
|
'Whether change requests should be enabled or for this environment on the project or not',
|
|
example: true,
|
|
},
|
|
defaultStrategy: {
|
|
$ref: '#/components/schemas/createFeatureStrategySchema',
|
|
description:
|
|
'A default strategy to create for this environment on the project.',
|
|
},
|
|
},
|
|
components: {
|
|
schemas: {
|
|
createFeatureStrategySchema,
|
|
createStrategyVariantSchema,
|
|
},
|
|
},
|
|
} as const;
|
|
|
|
export type ProjectEnvironmentSchema = FromSchema<
|
|
typeof projectEnvironmentSchema
|
|
>;
|