mirror of
https://github.com/Unleash/unleash.git
synced 2025-07-21 13:47:39 +02:00
Upgrades biome to 1.6.1, and updates husky pre-commit hook. Most changes here are making type imports explicit.
43 lines
1.3 KiB
TypeScript
43 lines
1.3 KiB
TypeScript
import type { FromSchema } from 'json-schema-to-ts';
|
|
import { constraintSchema } from './constraint-schema';
|
|
|
|
export const upsertSegmentSchema = {
|
|
$id: '#/components/schemas/upsertSegmentSchema',
|
|
type: 'object',
|
|
description: 'Data used to create or update a segment',
|
|
required: ['name', 'constraints'],
|
|
properties: {
|
|
name: {
|
|
description: 'The name of the segment',
|
|
example: 'beta-users',
|
|
type: 'string',
|
|
},
|
|
description: {
|
|
type: 'string',
|
|
nullable: true,
|
|
description: 'A description of what the segment is for',
|
|
example: 'Users willing to help us test and build new features.',
|
|
},
|
|
project: {
|
|
type: 'string',
|
|
nullable: true,
|
|
description: 'The project the segment belongs to if any.',
|
|
example: 'red-vista',
|
|
},
|
|
constraints: {
|
|
type: 'array',
|
|
description: 'The list of constraints that make up this segment',
|
|
items: {
|
|
$ref: '#/components/schemas/constraintSchema',
|
|
},
|
|
},
|
|
},
|
|
components: {
|
|
schemas: {
|
|
constraintSchema,
|
|
},
|
|
},
|
|
} as const;
|
|
|
|
export type UpsertSegmentSchema = FromSchema<typeof upsertSegmentSchema>;
|