UNPKG

3.86 kBTypeScriptView Raw
1import { ColumnConfigInput, EventPayload, EventMetadata } from './proto/service_pb';
2export interface TreelabConfig {
3 token?: string;
4 endPoint?: string;
5}
6export interface AddColumnsDTO {
7 workspaceId: string;
8 coreId: string;
9 tableId: string;
10 columnConfigs: ColumnConfigInput.AsObject[];
11}
12export declare enum ColumnType {
13 TEXT = "TEXT",
14 RECORD_REFERENCE = "RECORD_REFERENCE",
15 NUMBER = "NUMBER",
16 MULTI_SELECT = "MULTI_SELECT",
17 SELECT = "SELECT",
18 FORMULA = "FORMULA",
19 MULTI_ATTACHMENT = "MULTI_ATTACHMENT",
20 LOOKUP = "LOOKUP",
21 DATETIME = "DATETIME"
22}
23export interface ColumnConfig {
24 type: ColumnType;
25 name: string;
26 order?: number;
27 visibility?: boolean;
28 foreignTableId?: string;
29 defaultNumber?: number;
30 precision?: number;
31 choices?: Choice[];
32 dateFormat?: string;
33 includeTime?: boolean;
34 timeFormat?: string;
35 useGMT?: boolean;
36}
37export interface Choice {
38 id: string;
39 name: string;
40 color: SelectColor;
41}
42export declare enum ViewType {
43 GRID = "GRID",
44 TIMELINE = "TIMELINE"
45}
46export interface Attachment {
47 name: string;
48 url: string;
49}
50export interface ForeignRowVisibleNameValue {
51 value: string;
52}
53export interface ForeignRowValue {
54 id: string;
55 visibleNameList: ForeignRowVisibleNameValue[];
56}
57export interface Value {
58 type: ColumnType;
59 text?: string;
60 foreignRowList?: ForeignRowValue[];
61 number?: number;
62 selectedItems?: Choice[];
63 selectedItem?: Choice;
64 attachments?: Attachment[];
65 dateTime?: string;
66}
67export interface ValueInput {
68 type: ColumnType;
69 text?: string;
70 foreignRowId?: string;
71 number?: number;
72 selectedItems?: Choice[];
73 selectedItem?: Choice;
74 attachments?: Attachment[];
75 dateTime?: string;
76}
77export interface Resource {
78 workspaceId: string;
79 coreId?: string;
80 tableId?: string;
81 viewId?: string;
82 columnId?: string;
83 dashboardId?: string;
84 branchId?: string;
85 rowId?: string;
86}
87export interface EventPayloadNew extends EventPayload.AsObject {
88 metadata: EventMetadata.AsObject;
89}
90export declare type EventCallback = (e: EventPayloadNew) => any;
91export declare type FilterFn = (value: any, index: number, array: any[]) => any;
92export declare type SortFn = (a: any, b: any) => number;
93export declare enum CoreColor {
94 lightRed = "lightRed",
95 blue = "blue",
96 red = "red",
97 gray = "gray",
98 magenta = "magenta",
99 yellow = "yellow",
100 orange = "orange",
101 green = "green",
102 black = "black",
103 pink = "pink",
104 purple = "purple",
105 lightBlue = "lightBlue",
106 lightGray = "lightGray",
107 lightMagenta = "lightMagenta",
108 lightYellow = "lightYellow",
109 lightOrange = "lightOrange",
110 lightGreen = "lightGreen",
111 lightBlack = "lightBlack",
112 lightPink = "lightPink",
113 lightPurple = "lightPurple"
114}
115export declare enum Icon {
116 briefcase = "briefcase",
117 untitle = "untitle",
118 asterisk = "asterisk",
119 barChart = "barChart",
120 check = "check",
121 circleBlank = "circleBlank",
122 cloud = "cloud",
123 barcode = "barcode",
124 beaker = "beaker",
125 bell = "bell",
126 bolt = "bolt",
127 book = "book",
128 bug = "bug",
129 building = "building",
130 bullhorn = "bullhorn",
131 calculator = "calculator",
132 calendar = "calendar",
133 camera = "camera",
134 sun = "sun",
135 flow = "flow",
136 coffee = "coffee",
137 handUp = "handUp",
138 anchor = "anchor",
139 cogs = "cogs",
140 comment = "comment",
141 compass = "compass",
142 creditCard = "creditCard",
143 dashboard = "dashboard",
144 edit = "edit",
145 food = "food"
146}
147export declare enum SelectColor {
148 blue = "blue",
149 cyan = "cyan",
150 teal = "teal",
151 green = "green",
152 yellow = "yellow",
153 orange = "orange",
154 red = "red",
155 pink = "pink",
156 purple = "purple",
157 gray = "gray"
158}