mirror of
https://github.com/Unleash/unleash.git
synced 2024-11-01 19:07:38 +01:00
e8d542af0f
* refactor: remove unused API definition routes * feat: add support for proxy keys * feat: support listening for any event * feat: embed proxy endpoints * refactor: add an experimental flag for the embedded proxy
45 lines
1.2 KiB
TypeScript
45 lines
1.2 KiB
TypeScript
import { FromSchema } from 'json-schema-to-ts';
|
|
|
|
export const proxyFeatureSchema = {
|
|
$id: '#/components/schemas/proxyFeatureSchema',
|
|
type: 'object',
|
|
required: ['name', 'enabled', 'impressionData'],
|
|
additionalProperties: false,
|
|
properties: {
|
|
name: {
|
|
type: 'string',
|
|
},
|
|
enabled: {
|
|
type: 'boolean',
|
|
},
|
|
impressionData: {
|
|
type: 'boolean',
|
|
},
|
|
variant: {
|
|
type: 'object',
|
|
required: ['name', 'enabled'],
|
|
additionalProperties: false,
|
|
properties: {
|
|
name: {
|
|
type: 'string',
|
|
},
|
|
enabled: {
|
|
type: 'boolean',
|
|
},
|
|
payload: {
|
|
type: 'object',
|
|
additionalProperties: false,
|
|
required: ['type', 'value'],
|
|
properties: {
|
|
type: { type: 'string', enum: ['string'] },
|
|
value: { type: 'string' },
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
components: {},
|
|
} as const;
|
|
|
|
export type ProxyFeatureSchema = FromSchema<typeof proxyFeatureSchema>;
|