@xano/cli 0.0.21 → 0.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/base-command.d.ts +1 -1
- package/dist/base-command.js +6 -6
- package/dist/commands/branch/create/index.d.ts +17 -0
- package/dist/commands/branch/create/index.js +164 -0
- package/dist/commands/branch/delete/index.d.ts +18 -0
- package/dist/commands/branch/delete/index.js +156 -0
- package/dist/commands/branch/edit/index.d.ts +19 -0
- package/dist/commands/branch/edit/index.js +166 -0
- package/dist/commands/branch/get/index.d.ts +16 -0
- package/dist/commands/branch/get/index.js +135 -0
- package/dist/commands/branch/list/index.d.ts +18 -0
- package/dist/commands/branch/list/index.js +138 -0
- package/dist/commands/branch/set-live/index.d.ts +18 -0
- package/dist/commands/branch/set-live/index.js +155 -0
- package/dist/commands/function/create/index.d.ts +6 -6
- package/dist/commands/function/create/index.js +55 -55
- package/dist/commands/function/edit/index.d.ts +10 -10
- package/dist/commands/function/edit/index.js +155 -162
- package/dist/commands/function/get/index.d.ts +5 -5
- package/dist/commands/function/get/index.js +55 -60
- package/dist/commands/function/list/index.d.ts +5 -5
- package/dist/commands/function/list/index.js +52 -52
- package/dist/commands/profile/create/index.d.ts +6 -6
- package/dist/commands/profile/create/index.js +37 -37
- package/dist/commands/profile/delete/index.d.ts +2 -2
- package/dist/commands/profile/delete/index.js +9 -9
- package/dist/commands/profile/edit/index.d.ts +7 -7
- package/dist/commands/profile/edit/index.js +47 -47
- package/dist/commands/profile/get-default/index.js +1 -1
- package/dist/commands/profile/list/index.d.ts +2 -2
- package/dist/commands/profile/list/index.js +9 -9
- package/dist/commands/profile/me/index.d.ts +3 -3
- package/dist/commands/profile/me/index.js +21 -21
- package/dist/commands/profile/project/index.js +1 -1
- package/dist/commands/profile/set-default/index.js +1 -1
- package/dist/commands/profile/token/index.js +1 -1
- package/dist/commands/profile/wizard/index.d.ts +4 -4
- package/dist/commands/profile/wizard/index.js +118 -122
- package/dist/commands/run/env/delete/index.d.ts +2 -2
- package/dist/commands/run/env/delete/index.js +9 -9
- package/dist/commands/run/env/get/index.d.ts +2 -2
- package/dist/commands/run/env/get/index.js +10 -10
- package/dist/commands/run/env/list/index.d.ts +2 -2
- package/dist/commands/run/env/list/index.js +16 -18
- package/dist/commands/run/env/set/index.d.ts +2 -2
- package/dist/commands/run/env/set/index.js +4 -4
- package/dist/commands/run/exec/index.d.ts +11 -11
- package/dist/commands/run/exec/index.js +109 -109
- package/dist/commands/run/info/index.d.ts +4 -4
- package/dist/commands/run/info/index.js +26 -26
- package/dist/commands/run/projects/create/index.d.ts +3 -3
- package/dist/commands/run/projects/create/index.js +22 -22
- package/dist/commands/run/projects/delete/index.d.ts +2 -2
- package/dist/commands/run/projects/delete/index.js +9 -9
- package/dist/commands/run/projects/list/index.d.ts +2 -2
- package/dist/commands/run/projects/list/index.js +11 -11
- package/dist/commands/run/projects/update/index.d.ts +3 -3
- package/dist/commands/run/projects/update/index.js +20 -20
- package/dist/commands/run/secrets/delete/index.d.ts +2 -2
- package/dist/commands/run/secrets/delete/index.js +9 -9
- package/dist/commands/run/secrets/get/index.d.ts +2 -2
- package/dist/commands/run/secrets/get/index.js +10 -10
- package/dist/commands/run/secrets/list/index.d.ts +2 -2
- package/dist/commands/run/secrets/list/index.js +21 -23
- package/dist/commands/run/secrets/set/index.d.ts +3 -3
- package/dist/commands/run/secrets/set/index.js +15 -15
- package/dist/commands/run/sessions/delete/index.d.ts +2 -2
- package/dist/commands/run/sessions/delete/index.js +9 -9
- package/dist/commands/run/sessions/get/index.d.ts +2 -2
- package/dist/commands/run/sessions/get/index.js +10 -10
- package/dist/commands/run/sessions/list/index.d.ts +2 -2
- package/dist/commands/run/sessions/list/index.js +10 -10
- package/dist/commands/run/sessions/start/index.d.ts +2 -2
- package/dist/commands/run/sessions/start/index.js +10 -10
- package/dist/commands/run/sessions/stop/index.d.ts +2 -2
- package/dist/commands/run/sessions/stop/index.js +10 -10
- package/dist/commands/run/sink/get/index.d.ts +2 -2
- package/dist/commands/run/sink/get/index.js +10 -10
- package/dist/commands/static_host/build/create/index.d.ts +4 -4
- package/dist/commands/static_host/build/create/index.js +33 -33
- package/dist/commands/static_host/build/get/index.d.ts +4 -4
- package/dist/commands/static_host/build/get/index.js +20 -20
- package/dist/commands/static_host/build/list/index.d.ts +3 -3
- package/dist/commands/static_host/build/list/index.js +31 -31
- package/dist/commands/static_host/list/index.d.ts +3 -3
- package/dist/commands/static_host/list/index.js +31 -31
- package/dist/commands/workspace/create/index.d.ts +3 -3
- package/dist/commands/workspace/create/index.js +24 -24
- package/dist/commands/workspace/delete/index.d.ts +2 -2
- package/dist/commands/workspace/delete/index.js +18 -18
- package/dist/commands/workspace/edit/index.d.ts +5 -5
- package/dist/commands/workspace/edit/index.js +34 -34
- package/dist/commands/workspace/get/index.d.ts +2 -2
- package/dist/commands/workspace/get/index.js +12 -12
- package/dist/commands/workspace/list/index.d.ts +2 -2
- package/dist/commands/workspace/list/index.js +15 -15
- package/dist/commands/workspace/pull/index.d.ts +4 -4
- package/dist/commands/workspace/pull/index.js +46 -51
- package/dist/commands/workspace/push/index.js +3 -3
- package/dist/help.d.ts +1 -1
- package/dist/lib/base-run-command.d.ts +4 -4
- package/dist/lib/base-run-command.js +3 -3
- package/dist/lib/run-http-client.d.ts +20 -20
- package/dist/lib/run-http-client.js +71 -71
- package/dist/lib/run-types.d.ts +80 -80
- package/oclif.manifest.json +1336 -815
- package/package.json +1 -1
|
@@ -9,20 +9,20 @@ export class RunHttpClient {
|
|
|
9
9
|
this.config = config;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* Build a URL scoped to the current project
|
|
13
13
|
*/
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
buildProjectUrl(path, queryParams) {
|
|
15
|
+
const { projectId } = this.config;
|
|
16
|
+
if (!projectId) {
|
|
17
|
+
throw new Error('Project ID is required. Set it in your profile.');
|
|
18
|
+
}
|
|
19
|
+
return this.buildUrl(`/project/${projectId}${path}`, queryParams);
|
|
16
20
|
}
|
|
17
21
|
/**
|
|
18
|
-
* Build
|
|
22
|
+
* Build a URL scoped to a specific session
|
|
19
23
|
*/
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
'Content-Type': contentType,
|
|
23
|
-
'Authorization': `Bearer ${this.config.authToken}`,
|
|
24
|
-
};
|
|
25
|
-
return headers;
|
|
24
|
+
buildSessionUrl(sessionId, path = '', queryParams) {
|
|
25
|
+
return this.buildUrl(`/session/${sessionId}${path}`, queryParams);
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
28
|
* Build a URL with optional query parameters
|
|
@@ -47,28 +47,69 @@ export class RunHttpClient {
|
|
|
47
47
|
return url.toString();
|
|
48
48
|
}
|
|
49
49
|
/**
|
|
50
|
-
*
|
|
50
|
+
* Make a DELETE request
|
|
51
51
|
*/
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
52
|
+
async delete(url, body) {
|
|
53
|
+
return this.request(url, {
|
|
54
|
+
body: body ? JSON.stringify(body) : undefined,
|
|
55
|
+
headers: this.getHeaders(),
|
|
56
|
+
method: 'DELETE',
|
|
57
|
+
});
|
|
58
58
|
}
|
|
59
59
|
/**
|
|
60
|
-
*
|
|
60
|
+
* Make a GET request
|
|
61
61
|
*/
|
|
62
|
-
|
|
63
|
-
return this.
|
|
62
|
+
async get(url) {
|
|
63
|
+
return this.request(url, {
|
|
64
|
+
headers: this.getHeaders(),
|
|
65
|
+
method: 'GET',
|
|
66
|
+
});
|
|
64
67
|
}
|
|
65
68
|
/**
|
|
66
|
-
*
|
|
69
|
+
* Build headers for a request
|
|
67
70
|
*/
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
this.config.
|
|
71
|
-
|
|
71
|
+
getHeaders(contentType = 'application/json') {
|
|
72
|
+
const headers = {
|
|
73
|
+
'Authorization': `Bearer ${this.config.authToken}`,
|
|
74
|
+
'Content-Type': contentType,
|
|
75
|
+
};
|
|
76
|
+
return headers;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Get the project ID
|
|
80
|
+
*/
|
|
81
|
+
getProjectId() {
|
|
82
|
+
return this.config.projectId;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Make a PATCH request
|
|
86
|
+
*/
|
|
87
|
+
async patch(url, body) {
|
|
88
|
+
return this.request(url, {
|
|
89
|
+
body: JSON.stringify(body),
|
|
90
|
+
headers: this.getHeaders(),
|
|
91
|
+
method: 'PATCH',
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Make a POST request with JSON body
|
|
96
|
+
*/
|
|
97
|
+
async post(url, body) {
|
|
98
|
+
return this.request(url, {
|
|
99
|
+
body: body ? JSON.stringify(body) : undefined,
|
|
100
|
+
headers: this.getHeaders(),
|
|
101
|
+
method: 'POST',
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Make a POST request with XanoScript body
|
|
106
|
+
*/
|
|
107
|
+
async postXanoScript(url, code) {
|
|
108
|
+
return this.request(url, {
|
|
109
|
+
body: code,
|
|
110
|
+
headers: this.getHeaders('text/x-xanoscript'),
|
|
111
|
+
method: 'POST',
|
|
112
|
+
});
|
|
72
113
|
}
|
|
73
114
|
/**
|
|
74
115
|
* Make an HTTP request
|
|
@@ -120,52 +161,11 @@ export class RunHttpClient {
|
|
|
120
161
|
return parsed;
|
|
121
162
|
}
|
|
122
163
|
/**
|
|
123
|
-
*
|
|
124
|
-
*/
|
|
125
|
-
async get(url) {
|
|
126
|
-
return this.request(url, {
|
|
127
|
-
method: 'GET',
|
|
128
|
-
headers: this.getHeaders(),
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* Make a POST request with JSON body
|
|
133
|
-
*/
|
|
134
|
-
async post(url, body) {
|
|
135
|
-
return this.request(url, {
|
|
136
|
-
method: 'POST',
|
|
137
|
-
headers: this.getHeaders(),
|
|
138
|
-
body: body ? JSON.stringify(body) : undefined,
|
|
139
|
-
});
|
|
140
|
-
}
|
|
141
|
-
/**
|
|
142
|
-
* Make a POST request with XanoScript body
|
|
143
|
-
*/
|
|
144
|
-
async postXanoScript(url, code) {
|
|
145
|
-
return this.request(url, {
|
|
146
|
-
method: 'POST',
|
|
147
|
-
headers: this.getHeaders('text/x-xanoscript'),
|
|
148
|
-
body: code,
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
/**
|
|
152
|
-
* Make a PATCH request
|
|
153
|
-
*/
|
|
154
|
-
async patch(url, body) {
|
|
155
|
-
return this.request(url, {
|
|
156
|
-
method: 'PATCH',
|
|
157
|
-
headers: this.getHeaders(),
|
|
158
|
-
body: JSON.stringify(body),
|
|
159
|
-
});
|
|
160
|
-
}
|
|
161
|
-
/**
|
|
162
|
-
* Make a DELETE request
|
|
164
|
+
* Log a message if verbose mode is enabled
|
|
163
165
|
*/
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
body: body ? JSON.stringify(body) : undefined,
|
|
169
|
-
});
|
|
166
|
+
log(message) {
|
|
167
|
+
if (this.config.verbose && this.config.logger) {
|
|
168
|
+
this.config.logger(message);
|
|
169
|
+
}
|
|
170
170
|
}
|
|
171
171
|
}
|
package/dist/lib/run-types.d.ts
CHANGED
|
@@ -3,35 +3,35 @@
|
|
|
3
3
|
* Based on @xano/run-sdk types
|
|
4
4
|
*/
|
|
5
5
|
export interface PaginatedResponse<T> {
|
|
6
|
+
curPage?: number;
|
|
6
7
|
items: T[];
|
|
7
8
|
itemsReceived?: number;
|
|
8
|
-
curPage?: number;
|
|
9
|
-
nextPage?: number | null;
|
|
10
|
-
prevPage?: number | null;
|
|
11
|
-
offset?: number;
|
|
12
|
-
perPage?: number;
|
|
13
9
|
itemsTotal?: number;
|
|
10
|
+
nextPage?: null | number;
|
|
11
|
+
offset?: number;
|
|
14
12
|
pageTotal?: number;
|
|
13
|
+
perPage?: number;
|
|
14
|
+
prevPage?: null | number;
|
|
15
15
|
}
|
|
16
16
|
export interface XanoRunError extends Error {
|
|
17
|
-
status?: number;
|
|
18
17
|
response?: unknown;
|
|
18
|
+
status?: number;
|
|
19
19
|
}
|
|
20
20
|
export interface Project {
|
|
21
|
-
|
|
21
|
+
access: 'private' | 'public';
|
|
22
22
|
created_at: string;
|
|
23
|
-
name: string;
|
|
24
23
|
description: string;
|
|
24
|
+
id: string;
|
|
25
|
+
name: string;
|
|
25
26
|
user_id: number;
|
|
26
|
-
access: 'private' | 'public';
|
|
27
27
|
}
|
|
28
28
|
export interface CreateProjectInput {
|
|
29
|
-
name: string;
|
|
30
29
|
description: string;
|
|
30
|
+
name: string;
|
|
31
31
|
}
|
|
32
32
|
export interface UpdateProjectInput {
|
|
33
|
-
name?: string;
|
|
34
33
|
description?: string;
|
|
34
|
+
name?: string;
|
|
35
35
|
}
|
|
36
36
|
export interface EnvKeysResponse {
|
|
37
37
|
env: string[];
|
|
@@ -41,34 +41,34 @@ export interface EnvValueResponse {
|
|
|
41
41
|
value: string;
|
|
42
42
|
}
|
|
43
43
|
export interface UpdateEnvInput {
|
|
44
|
-
name: string;
|
|
45
44
|
env: {
|
|
46
45
|
name: string;
|
|
47
46
|
value: string;
|
|
48
47
|
};
|
|
48
|
+
name: string;
|
|
49
49
|
}
|
|
50
50
|
export type SecretType = 'kubernetes.io/dockerconfigjson' | 'kubernetes.io/service-account-token';
|
|
51
51
|
export interface SecretMetadata {
|
|
52
52
|
name: string;
|
|
53
|
-
type: SecretType;
|
|
54
53
|
repo?: string;
|
|
54
|
+
type: SecretType;
|
|
55
55
|
}
|
|
56
56
|
export interface SecretKeysResponse {
|
|
57
57
|
secrets: SecretMetadata[];
|
|
58
58
|
}
|
|
59
59
|
export interface SecretValueResponse {
|
|
60
60
|
name: string;
|
|
61
|
-
type: SecretType;
|
|
62
61
|
repo?: string;
|
|
62
|
+
type: SecretType;
|
|
63
63
|
value: string;
|
|
64
64
|
}
|
|
65
65
|
export interface UpdateSecretInput {
|
|
66
66
|
name: string;
|
|
67
67
|
secret: {
|
|
68
68
|
name: string;
|
|
69
|
+
repo?: string;
|
|
69
70
|
type: SecretType;
|
|
70
71
|
value: string;
|
|
71
|
-
repo?: string;
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
74
|
export type RunType = 'job' | 'service';
|
|
@@ -81,70 +81,83 @@ export interface RunBackup {
|
|
|
81
81
|
size: number;
|
|
82
82
|
}
|
|
83
83
|
export interface RunDefinition {
|
|
84
|
-
|
|
84
|
+
args: Record<string, unknown> | unknown[];
|
|
85
85
|
created_at: string;
|
|
86
|
-
|
|
86
|
+
doc: string;
|
|
87
|
+
id: string;
|
|
87
88
|
name: string;
|
|
88
|
-
user_id: number;
|
|
89
89
|
project_id: string;
|
|
90
90
|
sig: string;
|
|
91
91
|
type: RunType;
|
|
92
|
-
|
|
93
|
-
|
|
92
|
+
updated_at: string;
|
|
93
|
+
user_id: number;
|
|
94
94
|
}
|
|
95
95
|
export interface SessionExecution {
|
|
96
|
-
|
|
96
|
+
_run: RunDefinition;
|
|
97
|
+
access: string;
|
|
98
|
+
backup: RunBackup;
|
|
99
|
+
batch_id: null | string;
|
|
100
|
+
boot_time: number;
|
|
97
101
|
created_at: string;
|
|
98
|
-
updated_at: string;
|
|
99
|
-
run_id: string;
|
|
100
|
-
batch_id: string | null;
|
|
101
|
-
state: 'complete' | 'error' | string;
|
|
102
102
|
error_msg: string;
|
|
103
|
-
|
|
103
|
+
id: string;
|
|
104
104
|
label: string;
|
|
105
|
-
boot_time: number;
|
|
106
|
-
pre_time: number;
|
|
107
105
|
main_time: number;
|
|
108
106
|
post_time: number;
|
|
109
|
-
|
|
107
|
+
pre_time: number;
|
|
108
|
+
response: unknown;
|
|
109
|
+
run_id: string;
|
|
110
|
+
state: 'complete' | 'error' | string;
|
|
110
111
|
tenant_id: number;
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
_run: RunDefinition;
|
|
112
|
+
total_time: number;
|
|
113
|
+
updated_at: string;
|
|
114
114
|
}
|
|
115
115
|
export interface EndpointInput {
|
|
116
|
-
|
|
116
|
+
default: string;
|
|
117
117
|
name: string;
|
|
118
|
-
type: string;
|
|
119
118
|
nullable: boolean;
|
|
120
|
-
default: string;
|
|
121
119
|
required: boolean;
|
|
120
|
+
source: string;
|
|
121
|
+
type: string;
|
|
122
122
|
}
|
|
123
123
|
export interface Endpoint {
|
|
124
|
+
input: EndpointInput[];
|
|
124
125
|
url: string;
|
|
125
126
|
verb: string;
|
|
126
|
-
input: EndpointInput[];
|
|
127
127
|
}
|
|
128
128
|
export interface MetadataApi {
|
|
129
129
|
url: string;
|
|
130
130
|
}
|
|
131
131
|
export interface RunResult {
|
|
132
|
+
logs?: unknown[];
|
|
133
|
+
result?: {
|
|
134
|
+
boot_time?: number;
|
|
135
|
+
endpoints?: Endpoint[];
|
|
136
|
+
main_time?: number;
|
|
137
|
+
metadata_api?: MetadataApi;
|
|
138
|
+
post_time?: number;
|
|
139
|
+
pre_result?: unknown;
|
|
140
|
+
pre_time?: number;
|
|
141
|
+
response?: unknown;
|
|
142
|
+
state?: 'complete';
|
|
143
|
+
total_time?: number;
|
|
144
|
+
};
|
|
132
145
|
run?: {
|
|
133
|
-
|
|
134
|
-
|
|
146
|
+
debug?: string[];
|
|
147
|
+
id?: number | string;
|
|
148
|
+
problems?: Array<{
|
|
149
|
+
message?: string;
|
|
150
|
+
severity?: string;
|
|
151
|
+
}>;
|
|
135
152
|
result?: {
|
|
136
|
-
response?: unknown;
|
|
137
153
|
boot_time?: number;
|
|
138
154
|
main_time?: number;
|
|
139
|
-
pre_time?: number;
|
|
140
155
|
post_time?: number;
|
|
156
|
+
pre_time?: number;
|
|
157
|
+
response?: unknown;
|
|
141
158
|
total_time?: number;
|
|
142
159
|
};
|
|
143
|
-
|
|
144
|
-
problems?: Array<{
|
|
145
|
-
message?: string;
|
|
146
|
-
severity?: string;
|
|
147
|
-
}>;
|
|
160
|
+
session?: SessionExecution;
|
|
148
161
|
};
|
|
149
162
|
service?: {
|
|
150
163
|
id: number;
|
|
@@ -152,75 +165,62 @@ export interface RunResult {
|
|
|
152
165
|
id: number;
|
|
153
166
|
};
|
|
154
167
|
};
|
|
155
|
-
logs?: unknown[];
|
|
156
|
-
result?: {
|
|
157
|
-
state?: 'complete';
|
|
158
|
-
response?: unknown;
|
|
159
|
-
boot_time?: number;
|
|
160
|
-
pre_time?: number;
|
|
161
|
-
main_time?: number;
|
|
162
|
-
post_time?: number;
|
|
163
|
-
total_time?: number;
|
|
164
|
-
pre_result?: unknown;
|
|
165
|
-
endpoints?: Endpoint[];
|
|
166
|
-
metadata_api?: MetadataApi;
|
|
167
|
-
};
|
|
168
168
|
}
|
|
169
169
|
export interface DocInfoResult {
|
|
170
|
-
type: RunType;
|
|
171
|
-
input?: Record<string, unknown>;
|
|
172
170
|
env?: string[];
|
|
171
|
+
input?: Record<string, unknown>;
|
|
172
|
+
type: RunType;
|
|
173
173
|
}
|
|
174
|
-
export type SessionStatus = '
|
|
174
|
+
export type SessionStatus = 'error' | 'running' | 'stopped';
|
|
175
175
|
export interface Session {
|
|
176
|
-
id: string;
|
|
177
176
|
created_at: string;
|
|
178
|
-
|
|
177
|
+
id: string;
|
|
179
178
|
project_id: string;
|
|
180
179
|
state: string;
|
|
180
|
+
updated_at: string;
|
|
181
181
|
}
|
|
182
182
|
export interface SessionDetail {
|
|
183
|
+
access: 'private' | 'public';
|
|
184
|
+
backupResource: null | string;
|
|
185
|
+
createdAt: string;
|
|
186
|
+
doc: string;
|
|
183
187
|
id: string;
|
|
184
188
|
name: string;
|
|
189
|
+
projectId: null | string;
|
|
185
190
|
status: SessionStatus;
|
|
186
|
-
uptime:
|
|
191
|
+
uptime: null | number;
|
|
187
192
|
url?: string;
|
|
188
|
-
doc: string;
|
|
189
|
-
createdAt: string;
|
|
190
|
-
access: 'private' | 'public';
|
|
191
|
-
projectId: string | null;
|
|
192
|
-
backupResource: string | null;
|
|
193
193
|
}
|
|
194
194
|
export interface UpdateSessionInput {
|
|
195
|
-
name?: string;
|
|
196
195
|
access?: 'private' | 'public';
|
|
196
|
+
name?: string;
|
|
197
197
|
}
|
|
198
198
|
export interface TableColumn {
|
|
199
|
-
name: string;
|
|
200
|
-
type: string;
|
|
201
199
|
description?: string;
|
|
202
200
|
isPrimaryKey: boolean;
|
|
201
|
+
name: string;
|
|
202
|
+
type: string;
|
|
203
203
|
}
|
|
204
204
|
export interface RunLogEntry {
|
|
205
|
-
id: number;
|
|
206
205
|
created_at: string;
|
|
207
|
-
log_type: string;
|
|
208
206
|
duration: number;
|
|
209
|
-
function_name?: string;
|
|
210
207
|
error_msg: string;
|
|
211
|
-
|
|
212
|
-
|
|
208
|
+
function_name?: string;
|
|
209
|
+
id: number;
|
|
213
210
|
input?: unknown[];
|
|
211
|
+
log_object: object;
|
|
212
|
+
log_type: string;
|
|
213
|
+
output?: Record<string, unknown> | string;
|
|
214
214
|
stack?: unknown[];
|
|
215
215
|
value_store?: Record<string, unknown>;
|
|
216
216
|
}
|
|
217
217
|
export interface SinkTable {
|
|
218
|
-
guid: string;
|
|
219
|
-
name: string;
|
|
220
218
|
columns: TableColumn[];
|
|
221
219
|
content: Record<string, unknown>[];
|
|
220
|
+
guid: string;
|
|
221
|
+
name: string;
|
|
222
222
|
}
|
|
223
223
|
export interface SinkData {
|
|
224
|
-
tables: SinkTable[];
|
|
225
224
|
logs: RunLogEntry[];
|
|
225
|
+
tables: SinkTable[];
|
|
226
226
|
}
|