-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathAPI.ts
More file actions
36 lines (30 loc) · 926 Bytes
/
API.ts
File metadata and controls
36 lines (30 loc) · 926 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
export interface API {
name: string
parameters: APIParam
type: "SYNC" | "ASYNC"
category: string
subcategory?: string
subsubcategory?: string
url: string
definition: string
hint?: string
description?: string
samples?: string
hasDependencies?: boolean
}
export interface APIParam {
[key: string]: APIParamProperty
}
export interface APIParamProperty {
type: APIParamType;
required: boolean;
defaultValue?: standardTypes;
position?: number;
nestObject?: APIParam;
arrayType?: APIParamType;
}
export type APIParamType = "string" | "boolean" | "number" | "null" | "undefined" | "Object" | "Array" | "Function" | "any" ;
export interface TransformedParam {
[key: string]: standardTypes | TransformedParam
}
export type standardTypes = string | number | boolean | Function | Array<standardTypes | APIParam> | TransformedParam | null | undefined;