1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00
unleash.unleash/frontend/src/interfaces/segment.ts
Nuno Góis fe1e3566ee
fix: assume undefined instead of null on segment project (#3304)
Assume `undefined` instead of `null` for project in terms of interfacing
with segments: If the `project` field is not present, that means that it
is not set, which means we're dealing with a "global" segment. If we
want to unset `project` and make a segment global, we simply don't send
the `project` property on our PUT method.
2023-03-13 10:25:48 +00:00

17 lines
329 B
TypeScript

import { IConstraint } from './strategy';
export interface ISegment {
id: number;
name: string;
description: string;
project?: string;
createdAt: string;
createdBy: string;
constraints: IConstraint[];
}
export type ISegmentPayload = Pick<
ISegment,
'name' | 'description' | 'constraints'
>;