1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-06 00:07:44 +01:00
unleash.unleash/src/lib/openapi/spec/feature-search-query-parameters.ts

85 lines
2.2 KiB
TypeScript
Raw Normal View History

import { FromQueryParams } from '../util/from-query-params';
export const featureSearchQueryParameters = [
{
name: 'query',
schema: {
2023-10-26 10:05:47 +02:00
type: 'string',
example: 'feature_a',
},
description: 'The search query for the feature or tag',
in: 'query',
},
{
name: 'projectId',
schema: {
2023-10-26 10:05:47 +02:00
type: 'string',
example: 'default',
},
2023-10-26 15:29:30 +02:00
description: 'Id of the project where search and filter is performed',
in: 'query',
},
{
name: 'type',
schema: {
type: 'array',
items: {
type: 'string',
example: 'release',
},
},
description: 'The list of feature types to filter by',
in: 'query',
},
2023-10-26 17:20:57 +02:00
{
name: 'tag',
schema: {
type: 'array',
items: {
type: 'string',
example: 'simple:my_tag',
},
},
description:
'The list of feature tags to filter by. Feature tag has to specify a type and a value joined with a colon.',
in: 'query',
},
{
name: 'status',
schema: {
type: 'array',
items: {
type: 'string',
example: 'production:enabled',
},
},
description:
'The list of feature environment status to filter by. Feature environment has to specify a name and a status joined with a colon.',
2023-10-26 17:20:57 +02:00
in: 'query',
},
{
name: 'cursor',
schema: {
type: 'string',
2023-10-31 14:10:31 +01:00
example: '2023-10-31T09:21:04.056Z',
},
description:
2023-10-31 14:10:31 +01:00
'The next feature created at date the client has not seen. Used for cursor-based pagination. Empty if starting from the beginning.',
in: 'query',
},
{
name: 'limit',
schema: {
2023-10-31 14:10:31 +01:00
type: 'string',
example: '10',
},
description:
'The number of results to return in a page. By default it is set to 50',
in: 'query',
},
] as const;
2023-10-26 15:29:30 +02:00
export type FeatureSearchQueryParameters = Partial<
FromQueryParams<typeof featureSearchQueryParameters>
>;