export interface BooleanType { type: 'boolean'; value: boolean; } export interface NumberType { type: 'number'; value: number; } export interface StringType { type: 'string'; value: string; } export interface DateType { type: 'date'; value: string; } export interface TimeType { type: 'time'; value: string; } export interface DateTimeType { type: 'datetime'; value: string; } export interface DateRange { end: string; start: string; } export interface DateRangeType { type: 'daterange'; value: DateRange; } export interface Tag { color?: 'standard' | 'green' | 'lime' | 'blue' | 'red' | 'purple' | 'magenta' | 'grey' | 'teal' | 'orange' | 'yellow' | 'limeLight' | 'orangeLight' | 'magentaLight' | 'greenLight' | 'blueLight' | 'redLight' | 'purpleLight' | 'greyLight' | 'tealLight' | 'yellowLight'; id?: string; text: string; url?: string; } export interface TagType { type: 'tag'; value: Tag; } export interface User { atlassianUserId?: string; avatarSource?: string; displayName?: string; url?: string; } export interface UserType { type: 'user'; value: User; } export interface Status { id?: string; style?: { appearance?: 'default' | 'inprogress' | 'moved' | 'new' | 'removed' | 'success'; isBold?: boolean; }; text: string; transitionId?: string; } export interface StatusType { type: 'status'; value: Status; } export interface Link { style?: { appearance?: 'default' | 'key'; }; text?: string; url: string; } export interface LinkType { type: 'link'; value: Link; } export interface Icon { id?: string; label?: string; source: string; text?: string; } export interface IconType { type: 'icon'; value: Icon; } export type DatasourceType = BooleanType | DateTimeType | DateRangeType | DateType | IconType | LinkType | NumberType | RichTextType | StatusType | StringType | TagType | TimeType | UserType; export interface DatasourceResponseSchemaProperty { isList?: boolean; key: string; title: string; type: DatasourceType['type']; } export interface DatasourceDataResponseItem { [key: string]: { data: DatasourceType['value'] | DatasourceType['value'][]; }; } export interface DatasourceParameters { [key: string]: any; } export interface DatasourceDataRequest { fields?: string[]; includeSchema?: boolean; pageCursor?: string; pageSize: number; parameters: DatasourceParameters; } export interface DatasourceResponseParameter { description: string; isList?: boolean; isRequired?: boolean; key: string; type: DatasourceType['type']; } interface DatasourceResponse { data: TData; meta: DatasourceMeta; } export interface DatasourceDetailsResponse extends DatasourceResponse { } export interface DatasourceDataResponse extends DatasourceResponse { } export type Visibility = 'public' | 'restricted' | 'other' | 'not_found'; export type Access = 'granted' | 'forbidden' | 'unauthorized' | 'not_found'; export interface AuthService { displayName: string; key: string; url: string; } export type DatasourceDetails = { ari: string; description: string; id: string; name: string; parameters: DatasourceResponseParameter[]; schema: DatasourceDetailsSchema; }; export type DatasourceData = { items: DatasourceDataResponseItem[]; nextPageCursor?: string; schema?: DatasourceDataSchema; totalCount?: number; }; export type DatasourceDataSchema = { defaultProperties?: string[]; properties: DatasourceResponseSchemaProperty[]; }; export type DatasourceDetailsSchema = { defaultProperties: string[]; properties: DatasourceResponseSchemaProperty[]; }; export type DatasourceMeta = { [k: string]: any; access: Access; auth?: AuthService[]; visibility: Visibility; }; export type DatasourceTableStatusType = 'empty' | 'forbidden' | 'loading' | 'resolved' | 'rejected' | 'unauthorized'; export type DatasourceDetailsRequest = { parameters: DatasourceParameters; }; export interface RichText { html?: string; text: string; type: 'adf'; } export interface RichTextType { type: 'richtext'; value: RichText; } export {};