mirror of
https://github.com/Unleash/unleash.git
synced 2024-11-01 19:07:38 +01:00
fe1e3566ee
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.
17 lines
329 B
TypeScript
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'
|
|
>;
|