1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00

docs: add relevant types for this API

This commit is contained in:
Thomas Heartman 2022-04-01 16:03:50 +02:00
parent fc6ea25ebd
commit 5d164db46c

View File

@ -54,3 +54,31 @@ You tried to remove the only user with the role `owner` in the project:
### List segments applied to a specific strategy: `GET /strategies/:strategyId` ### List segments applied to a specific strategy: `GET /strategies/:strategyId`
### Replace activation strategy segments `POST /strategies/:strategyId` ### Replace activation strategy segments `POST /strategies/:strategyId`
## Types
### `ISegment`: segment interface {#isegment}
``` ts
export interface ISegment {
id: number;
name: string;
description?: string;
constraints: IConstraint[];
createdBy?: string;
createdAt: Date;
}
```
### `IConstraint`: constraint interface {#iconstraint}
```ts
export interface IConstraint {
contextName: string;
operator: string;
values?: string[];
value?: string;
inverted?: boolean;
caseInsensitive?: boolean;
}
```