2023-10-25 16:12:21 +02:00
|
|
|
import { FromQueryParams } from '../util/from-query-params';
|
|
|
|
|
|
|
|
export const featureSearchQueryParameters = [
|
|
|
|
{
|
|
|
|
name: 'query',
|
|
|
|
schema: {
|
2023-10-26 10:05:47 +02:00
|
|
|
type: 'string',
|
2023-10-25 16:12:21 +02:00
|
|
|
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',
|
2023-10-25 16:12:21 +02:00
|
|
|
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',
|
2023-10-25 16:12:21 +02:00
|
|
|
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 type and value joined with a colon.',
|
|
|
|
in: 'query',
|
|
|
|
},
|
2023-10-25 16:12:21 +02:00
|
|
|
] as const;
|
|
|
|
|
2023-10-26 15:29:30 +02:00
|
|
|
export type FeatureSearchQueryParameters = Partial<
|
|
|
|
FromQueryParams<typeof featureSearchQueryParameters>
|
2023-10-25 16:12:21 +02:00
|
|
|
>;
|