@xano/cli 0.0.20 → 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.
Files changed (107) hide show
  1. package/dist/base-command.d.ts +1 -1
  2. package/dist/base-command.js +6 -6
  3. package/dist/commands/branch/create/index.d.ts +17 -0
  4. package/dist/commands/branch/create/index.js +164 -0
  5. package/dist/commands/branch/delete/index.d.ts +18 -0
  6. package/dist/commands/branch/delete/index.js +156 -0
  7. package/dist/commands/branch/edit/index.d.ts +19 -0
  8. package/dist/commands/branch/edit/index.js +166 -0
  9. package/dist/commands/branch/get/index.d.ts +16 -0
  10. package/dist/commands/branch/get/index.js +135 -0
  11. package/dist/commands/branch/list/index.d.ts +18 -0
  12. package/dist/commands/branch/list/index.js +138 -0
  13. package/dist/commands/branch/set-live/index.d.ts +18 -0
  14. package/dist/commands/branch/set-live/index.js +155 -0
  15. package/dist/commands/function/create/index.d.ts +6 -6
  16. package/dist/commands/function/create/index.js +55 -55
  17. package/dist/commands/function/edit/index.d.ts +10 -10
  18. package/dist/commands/function/edit/index.js +155 -162
  19. package/dist/commands/function/get/index.d.ts +5 -5
  20. package/dist/commands/function/get/index.js +55 -60
  21. package/dist/commands/function/list/index.d.ts +5 -5
  22. package/dist/commands/function/list/index.js +52 -52
  23. package/dist/commands/profile/create/index.d.ts +6 -6
  24. package/dist/commands/profile/create/index.js +37 -37
  25. package/dist/commands/profile/delete/index.d.ts +2 -2
  26. package/dist/commands/profile/delete/index.js +9 -9
  27. package/dist/commands/profile/edit/index.d.ts +7 -7
  28. package/dist/commands/profile/edit/index.js +47 -47
  29. package/dist/commands/profile/get-default/index.js +1 -1
  30. package/dist/commands/profile/list/index.d.ts +2 -2
  31. package/dist/commands/profile/list/index.js +9 -9
  32. package/dist/commands/profile/me/index.d.ts +3 -3
  33. package/dist/commands/profile/me/index.js +21 -21
  34. package/dist/commands/profile/project/index.js +1 -1
  35. package/dist/commands/profile/set-default/index.js +1 -1
  36. package/dist/commands/profile/token/index.js +1 -1
  37. package/dist/commands/profile/wizard/index.d.ts +4 -4
  38. package/dist/commands/profile/wizard/index.js +118 -122
  39. package/dist/commands/run/env/delete/index.d.ts +2 -2
  40. package/dist/commands/run/env/delete/index.js +9 -9
  41. package/dist/commands/run/env/get/index.d.ts +2 -2
  42. package/dist/commands/run/env/get/index.js +10 -10
  43. package/dist/commands/run/env/list/index.d.ts +2 -2
  44. package/dist/commands/run/env/list/index.js +16 -18
  45. package/dist/commands/run/env/set/index.d.ts +2 -2
  46. package/dist/commands/run/env/set/index.js +4 -4
  47. package/dist/commands/run/exec/index.d.ts +11 -11
  48. package/dist/commands/run/exec/index.js +109 -109
  49. package/dist/commands/run/info/index.d.ts +4 -4
  50. package/dist/commands/run/info/index.js +26 -26
  51. package/dist/commands/run/projects/create/index.d.ts +3 -3
  52. package/dist/commands/run/projects/create/index.js +22 -22
  53. package/dist/commands/run/projects/delete/index.d.ts +2 -2
  54. package/dist/commands/run/projects/delete/index.js +9 -9
  55. package/dist/commands/run/projects/list/index.d.ts +2 -2
  56. package/dist/commands/run/projects/list/index.js +11 -11
  57. package/dist/commands/run/projects/update/index.d.ts +3 -3
  58. package/dist/commands/run/projects/update/index.js +20 -20
  59. package/dist/commands/run/secrets/delete/index.d.ts +2 -2
  60. package/dist/commands/run/secrets/delete/index.js +9 -9
  61. package/dist/commands/run/secrets/get/index.d.ts +2 -2
  62. package/dist/commands/run/secrets/get/index.js +10 -10
  63. package/dist/commands/run/secrets/list/index.d.ts +2 -2
  64. package/dist/commands/run/secrets/list/index.js +21 -23
  65. package/dist/commands/run/secrets/set/index.d.ts +3 -3
  66. package/dist/commands/run/secrets/set/index.js +15 -15
  67. package/dist/commands/run/sessions/delete/index.d.ts +2 -2
  68. package/dist/commands/run/sessions/delete/index.js +9 -9
  69. package/dist/commands/run/sessions/get/index.d.ts +2 -2
  70. package/dist/commands/run/sessions/get/index.js +10 -10
  71. package/dist/commands/run/sessions/list/index.d.ts +2 -2
  72. package/dist/commands/run/sessions/list/index.js +10 -10
  73. package/dist/commands/run/sessions/start/index.d.ts +2 -2
  74. package/dist/commands/run/sessions/start/index.js +10 -10
  75. package/dist/commands/run/sessions/stop/index.d.ts +2 -2
  76. package/dist/commands/run/sessions/stop/index.js +10 -10
  77. package/dist/commands/run/sink/get/index.d.ts +2 -2
  78. package/dist/commands/run/sink/get/index.js +10 -10
  79. package/dist/commands/static_host/build/create/index.d.ts +4 -4
  80. package/dist/commands/static_host/build/create/index.js +33 -33
  81. package/dist/commands/static_host/build/get/index.d.ts +4 -4
  82. package/dist/commands/static_host/build/get/index.js +20 -20
  83. package/dist/commands/static_host/build/list/index.d.ts +3 -3
  84. package/dist/commands/static_host/build/list/index.js +31 -31
  85. package/dist/commands/static_host/list/index.d.ts +3 -3
  86. package/dist/commands/static_host/list/index.js +31 -31
  87. package/dist/commands/workspace/create/index.d.ts +14 -0
  88. package/dist/commands/workspace/create/index.js +131 -0
  89. package/dist/commands/workspace/delete/index.d.ts +20 -0
  90. package/dist/commands/workspace/delete/index.js +141 -0
  91. package/dist/commands/workspace/edit/index.d.ts +22 -0
  92. package/dist/commands/workspace/edit/index.js +176 -0
  93. package/dist/commands/workspace/get/index.d.ts +18 -0
  94. package/dist/commands/workspace/get/index.js +136 -0
  95. package/dist/commands/workspace/list/index.d.ts +2 -2
  96. package/dist/commands/workspace/list/index.js +15 -15
  97. package/dist/commands/workspace/pull/index.d.ts +4 -4
  98. package/dist/commands/workspace/pull/index.js +46 -51
  99. package/dist/commands/workspace/push/index.js +3 -3
  100. package/dist/help.d.ts +1 -1
  101. package/dist/lib/base-run-command.d.ts +4 -4
  102. package/dist/lib/base-run-command.js +3 -3
  103. package/dist/lib/run-http-client.d.ts +21 -21
  104. package/dist/lib/run-http-client.js +72 -72
  105. package/dist/lib/run-types.d.ts +80 -80
  106. package/oclif.manifest.json +1633 -791
  107. package/package.json +1 -1
@@ -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
- id: string;
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
- id: string;
84
+ args: Record<string, unknown> | unknown[];
85
85
  created_at: string;
86
- updated_at: string;
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
- args: unknown[] | Record<string, unknown>;
93
- doc: string;
92
+ updated_at: string;
93
+ user_id: number;
94
94
  }
95
95
  export interface SessionExecution {
96
- id: string;
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
- response: unknown;
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
- total_time: number;
107
+ pre_time: number;
108
+ response: unknown;
109
+ run_id: string;
110
+ state: 'complete' | 'error' | string;
110
111
  tenant_id: number;
111
- access: string;
112
- backup: RunBackup;
113
- _run: RunDefinition;
112
+ total_time: number;
113
+ updated_at: string;
114
114
  }
115
115
  export interface EndpointInput {
116
- source: string;
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
- id?: string | number;
134
- session?: SessionExecution;
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
- debug?: string[];
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 = 'running' | 'stopped' | 'error';
174
+ export type SessionStatus = 'error' | 'running' | 'stopped';
175
175
  export interface Session {
176
- id: string;
177
176
  created_at: string;
178
- updated_at: string;
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: number | null;
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
- log_object: object;
212
- output?: string | Record<string, unknown>;
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
  }