@builder.io/ai-utils 0.18.0 → 0.18.2
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/package.json +1 -1
- package/src/codegen.d.ts +62 -0
- package/src/completion.d.ts +147 -151
- package/src/events.d.ts +281 -333
- package/src/mapping.d.ts +66 -66
- package/src/messages.d.ts +214 -283
- package/src/messages.js +12 -12
- package/src/organization.d.ts +366 -351
- package/src/projects.d.ts +433 -571
- package/src/projects.js +17 -18
- package/src/repo-indexing.d.ts +96 -114
- package/src/repo-indexing.js +5 -5
- package/src/settings.d.ts +13 -15
- package/src/settings.js +26 -27
- package/src/vscode-tunnel.d.ts +8 -23
- package/src/vscode-tunnel.js +22 -36
package/src/projects.d.ts
CHANGED
|
@@ -1,13 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
EnvironmentVariable,
|
|
4
|
-
LaunchServerState,
|
|
5
|
-
LaunchServerStatus,
|
|
6
|
-
BranchBackup,
|
|
7
|
-
CommitMode,
|
|
8
|
-
CustomInstruction,
|
|
9
|
-
CustomAgentDefinition,
|
|
10
|
-
} from "./codegen";
|
|
1
|
+
import type { FileOverride, EnvironmentVariable, LaunchServerState, LaunchServerStatus, BranchBackup, CommitMode, CustomInstruction, CustomAgentDefinition } from "./codegen";
|
|
2
|
+
import type { FallbackTokensPrivate } from "./organization";
|
|
11
3
|
/**
|
|
12
4
|
* Temporary type for date fields during migration.
|
|
13
5
|
* Handles both old (string) and new (number) formats.
|
|
@@ -20,291 +12,162 @@ export type InMigrationDate = string | number;
|
|
|
20
12
|
*/
|
|
21
13
|
export type InMigrationDateNullable = InMigrationDate | null | undefined;
|
|
22
14
|
export interface ConfigStatus {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
15
|
+
isReady: boolean;
|
|
16
|
+
lastUpdated: string;
|
|
17
|
+
[key: string]: unknown;
|
|
26
18
|
}
|
|
27
19
|
interface BaseMessage {
|
|
28
|
-
|
|
20
|
+
timestamp: string;
|
|
29
21
|
}
|
|
30
22
|
export interface InitializingMessage extends BaseMessage {
|
|
31
|
-
|
|
32
|
-
|
|
23
|
+
state: "initializing";
|
|
24
|
+
message: string;
|
|
33
25
|
}
|
|
34
26
|
export interface FetchingGithubTokenMessage extends BaseMessage {
|
|
35
|
-
|
|
36
|
-
|
|
27
|
+
state: "fetchingGithubToken";
|
|
28
|
+
message: string;
|
|
37
29
|
}
|
|
38
30
|
export interface FetchingFusionKeyMessage extends BaseMessage {
|
|
39
|
-
|
|
40
|
-
|
|
31
|
+
state: "fetchingFusionKey";
|
|
32
|
+
message: string;
|
|
41
33
|
}
|
|
42
34
|
export interface CheckingAppMessage extends BaseMessage {
|
|
43
|
-
|
|
44
|
-
|
|
35
|
+
state: "checkingApp";
|
|
36
|
+
message: string;
|
|
45
37
|
}
|
|
46
38
|
export interface CleaningUpAppMessage extends BaseMessage {
|
|
47
|
-
|
|
48
|
-
|
|
39
|
+
state: "cleaningUpApp";
|
|
40
|
+
message: string;
|
|
49
41
|
}
|
|
50
42
|
export interface CreatingAppMessage extends BaseMessage {
|
|
51
|
-
|
|
52
|
-
|
|
43
|
+
state: "creatingApp";
|
|
44
|
+
message: string;
|
|
53
45
|
}
|
|
54
46
|
export interface CheckingIPMessage extends BaseMessage {
|
|
55
|
-
|
|
56
|
-
|
|
47
|
+
state: "checkingIP";
|
|
48
|
+
message: string;
|
|
57
49
|
}
|
|
58
50
|
export interface AllocatingIPMessage extends BaseMessage {
|
|
59
|
-
|
|
60
|
-
|
|
51
|
+
state: "allocatingIP";
|
|
52
|
+
message: string;
|
|
61
53
|
}
|
|
62
54
|
export interface CheckingMachineMessage extends BaseMessage {
|
|
63
|
-
|
|
64
|
-
|
|
55
|
+
state: "checkingMachine";
|
|
56
|
+
message: string;
|
|
65
57
|
}
|
|
66
58
|
export interface CheckingVolumeMessage extends BaseMessage {
|
|
67
|
-
|
|
68
|
-
|
|
59
|
+
state: "checkingVolume";
|
|
60
|
+
message: string;
|
|
69
61
|
}
|
|
70
62
|
export interface ForkingVolumeMessage extends BaseMessage {
|
|
71
|
-
|
|
72
|
-
|
|
63
|
+
state: "forkingVolume";
|
|
64
|
+
message: string;
|
|
73
65
|
}
|
|
74
66
|
export interface RetryingWithNewRegionMessage extends BaseMessage {
|
|
75
|
-
|
|
76
|
-
|
|
67
|
+
state: "retryingWithNewRegion";
|
|
68
|
+
message: string;
|
|
77
69
|
}
|
|
78
70
|
export interface WaitingBeforePollingMessage extends BaseMessage {
|
|
79
|
-
|
|
80
|
-
|
|
71
|
+
state: "waitingBeforePolling";
|
|
72
|
+
message: string;
|
|
81
73
|
}
|
|
82
74
|
export interface PollingMachineStatusMessage extends BaseMessage {
|
|
83
|
-
|
|
84
|
-
|
|
75
|
+
state: "pollingMachineStatus";
|
|
76
|
+
message: string;
|
|
85
77
|
}
|
|
86
78
|
export interface WarningStateMessage extends BaseMessage {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
79
|
+
state: "warning";
|
|
80
|
+
message: string;
|
|
81
|
+
errors?: string[];
|
|
90
82
|
}
|
|
91
83
|
export interface PingMessage extends BaseMessage {
|
|
92
|
-
|
|
84
|
+
type: "ping";
|
|
93
85
|
}
|
|
94
86
|
export interface PlainMessage extends BaseMessage {
|
|
95
|
-
|
|
87
|
+
message: string;
|
|
96
88
|
}
|
|
97
89
|
export interface DebugMessage extends BaseMessage {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
90
|
+
type: "debug";
|
|
91
|
+
message: string;
|
|
92
|
+
lockInfo?: any;
|
|
93
|
+
error?: string;
|
|
102
94
|
}
|
|
103
95
|
export interface ErrorMessage extends BaseMessage {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
96
|
+
type: "error";
|
|
97
|
+
error: string;
|
|
98
|
+
details?: any;
|
|
99
|
+
message?: string;
|
|
100
|
+
code?: string;
|
|
109
101
|
}
|
|
110
102
|
export interface InfoMessage extends BaseMessage {
|
|
111
|
-
|
|
112
|
-
|
|
103
|
+
type: "info";
|
|
104
|
+
message: string;
|
|
113
105
|
}
|
|
114
106
|
export interface WarningMessage extends BaseMessage {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
107
|
+
type: "warning";
|
|
108
|
+
message: string;
|
|
109
|
+
errors?: string[];
|
|
118
110
|
}
|
|
119
111
|
export interface MachineStatusMessage extends BaseMessage {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
| "unknown"
|
|
123
|
-
| "created"
|
|
124
|
-
| "starting"
|
|
125
|
-
| "started"
|
|
126
|
-
| "stopping"
|
|
127
|
-
| "stopped"
|
|
128
|
-
| "suspending"
|
|
129
|
-
| "suspended"
|
|
130
|
-
| "replacing"
|
|
131
|
-
| "destroying"
|
|
132
|
-
| "destroyed"
|
|
133
|
-
| "not-found"
|
|
134
|
-
| "running"
|
|
135
|
-
| "failed";
|
|
112
|
+
type: "machineStatus";
|
|
113
|
+
status: "unknown" | "created" | "starting" | "started" | "stopping" | "stopped" | "suspending" | "suspended" | "replacing" | "destroying" | "destroyed" | "not-found" | "running" | "failed";
|
|
136
114
|
}
|
|
137
115
|
export interface LogsMessage extends BaseMessage {
|
|
138
|
-
|
|
139
|
-
|
|
116
|
+
type: "logs";
|
|
117
|
+
logs: string[];
|
|
140
118
|
}
|
|
141
119
|
export interface ConfigStatusMessage extends BaseMessage {
|
|
142
|
-
|
|
143
|
-
|
|
120
|
+
type: "configStatus";
|
|
121
|
+
configStatus: ConfigStatus;
|
|
144
122
|
}
|
|
145
123
|
export interface AppCreatedMessage extends BaseMessage {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
124
|
+
state: "appCreated";
|
|
125
|
+
message: string;
|
|
126
|
+
appName: string;
|
|
149
127
|
}
|
|
150
128
|
export interface MachineCreatedMessage extends BaseMessage {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
129
|
+
state: "machineCreated";
|
|
130
|
+
message: string;
|
|
131
|
+
machineId: string;
|
|
154
132
|
}
|
|
155
133
|
export interface IpAllocatedMessage extends BaseMessage {
|
|
156
|
-
|
|
157
|
-
|
|
134
|
+
state: "ipAllocated";
|
|
135
|
+
message: string;
|
|
158
136
|
}
|
|
159
137
|
export interface VolumeForkedMessage extends BaseMessage {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
138
|
+
state: "volumeForked";
|
|
139
|
+
message: string;
|
|
140
|
+
volumeId: string;
|
|
163
141
|
}
|
|
164
142
|
export interface ReadyMessage extends BaseMessage {
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
}
|
|
170
|
-
export type MachineState =
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
| "started"
|
|
175
|
-
| "stopping"
|
|
176
|
-
| "stopped"
|
|
177
|
-
| "suspending"
|
|
178
|
-
| "suspended"
|
|
179
|
-
| "replacing"
|
|
180
|
-
| "destroying"
|
|
181
|
-
| "destroyed"
|
|
182
|
-
| "not-found"
|
|
183
|
-
| "running"
|
|
184
|
-
| "failed";
|
|
185
|
-
export type FlyVolumeState =
|
|
186
|
-
| "unknown"
|
|
187
|
-
| "creating"
|
|
188
|
-
| "created"
|
|
189
|
-
| "extending"
|
|
190
|
-
| "restoring"
|
|
191
|
-
| "enabling_remote_export"
|
|
192
|
-
| "hydrating"
|
|
193
|
-
| "recovering"
|
|
194
|
-
| "scheduling_destroy"
|
|
195
|
-
| "pending_destroy"
|
|
196
|
-
| "failed";
|
|
197
|
-
export type GitAuthErrorCode =
|
|
198
|
-
| "git-auth-failed"
|
|
199
|
-
| "git-auth-failed-root-repo"
|
|
200
|
-
| "git-auth-failed-folder-added-by"
|
|
201
|
-
| "git-auth-failed-folder-created-by"
|
|
202
|
-
| "git-auth-failed-repo-not-found"
|
|
203
|
-
| "git-auth-failed-repo-renamed"
|
|
204
|
-
| "git-auth-failed-folder-server-token"
|
|
205
|
-
| "git-auth-failed-root-repo-server-token"
|
|
206
|
-
| "git-auth-failed-ghes-unreachable";
|
|
207
|
-
export type EnsureContainerErrorCode =
|
|
208
|
-
| "FAILED_TO_START_MACHINE_ERROR"
|
|
209
|
-
| "FLY_APP_CHECK_ERROR"
|
|
210
|
-
| "FLY_CAPACITY_ERROR"
|
|
211
|
-
| "FLY_PERMISSIONS_TOKEN_ERROR"
|
|
212
|
-
| "FLY_VOLUME_CREATE_ERROR"
|
|
213
|
-
| "FLY_VOLUME_FORK_ERROR"
|
|
214
|
-
| "FLY_VOLUME_DELETE_RECENTLY_FORKED_ERROR"
|
|
215
|
-
| "FLY_MACHINE_CREATE_ERROR"
|
|
216
|
-
| "FLY_VOLUME_CHECK_ERROR"
|
|
217
|
-
| "FLY_NON_MOUNTABLE_VOLUME_ERROR"
|
|
218
|
-
| "FLY_DEPRECATED_REGION_ERROR"
|
|
219
|
-
| "FLY_VOLUME_NOT_FOUND"
|
|
220
|
-
| "FLY_MACHINE_LIMIT_ERROR"
|
|
221
|
-
| "KUBE_CAPACITY_ERROR"
|
|
222
|
-
| "KUBE_PERMISSIONS_ERROR"
|
|
223
|
-
| "KUBE_POD_LIMIT_ERROR"
|
|
224
|
-
| "KUBE_RESOURCE_QUOTA_ERROR"
|
|
225
|
-
| "KUBE_NAMESPACE_CHECK_ERROR"
|
|
226
|
-
| "KUBE_PVC_CREATE_ERROR"
|
|
227
|
-
| "KUBE_PVC_CHECK_ERROR"
|
|
228
|
-
| "KUBE_POD_CREATE_ERROR"
|
|
229
|
-
| "KUBE_SERVICE_CREATE_ERROR"
|
|
230
|
-
| "KUBE_INGRESS_CREATE_ERROR"
|
|
231
|
-
| "KUBE_POD_FAILED_TO_START_ERROR"
|
|
232
|
-
| "ensure-checking-existing-machines"
|
|
233
|
-
| "found-multiple-failed-machine"
|
|
234
|
-
| "maximun-retries-machine-creation"
|
|
235
|
-
| GitAuthErrorCode
|
|
236
|
-
| "unknown"
|
|
237
|
-
| "project-bad-state"
|
|
238
|
-
| "project-not-found"
|
|
239
|
-
| "project-deleted"
|
|
240
|
-
| "project-branch-not-found"
|
|
241
|
-
| "project-branch-deleted"
|
|
242
|
-
| "project-branch-no-session-id"
|
|
243
|
-
| "project-repo-full-name-not-found"
|
|
244
|
-
| "project-org-not-found"
|
|
245
|
-
| "invalid-project-repo-url-already-in-use"
|
|
246
|
-
| "no-available-regions"
|
|
247
|
-
| "invalid-backup-without-volume-id"
|
|
248
|
-
| "missing-app-with-machine-or-volume"
|
|
249
|
-
| "update-branch-info-in-firebase"
|
|
250
|
-
| "update-branch-app-name-in-firebase"
|
|
251
|
-
| `machine-status-polling-${MachineState}`
|
|
252
|
-
| `machine-image-exited-immediately`
|
|
253
|
-
| `volume-not-found-${FlyVolumeState}`
|
|
254
|
-
| "trying-to-remove-used-volume"
|
|
255
|
-
| "missing-container-url"
|
|
256
|
-
| "timeout"
|
|
257
|
-
| "fatal:zod-validation-error"
|
|
258
|
-
| `fatal:${string}`;
|
|
143
|
+
state: "ready";
|
|
144
|
+
message: string;
|
|
145
|
+
url: string;
|
|
146
|
+
status?: LaunchServerStatus;
|
|
147
|
+
}
|
|
148
|
+
export type MachineState = "unknown" | "created" | "starting" | "started" | "stopping" | "stopped" | "suspending" | "suspended" | "replacing" | "destroying" | "destroyed" | "not-found" | "running" | "failed";
|
|
149
|
+
export type FlyVolumeState = "unknown" | "creating" | "created" | "extending" | "restoring" | "enabling_remote_export" | "hydrating" | "recovering" | "scheduling_destroy" | "pending_destroy" | "failed";
|
|
150
|
+
export type GitAuthErrorCode = "git-auth-failed" | "git-auth-failed-root-repo" | "git-auth-failed-folder-added-by" | "git-auth-failed-folder-created-by" | "git-auth-failed-repo-not-found" | "git-auth-failed-repo-renamed" | "git-auth-failed-folder-server-token" | "git-auth-failed-root-repo-server-token" | "git-auth-failed-ghes-unreachable";
|
|
151
|
+
export type EnsureContainerErrorCode = "FAILED_TO_START_MACHINE_ERROR" | "FLY_APP_CHECK_ERROR" | "FLY_CAPACITY_ERROR" | "FLY_PERMISSIONS_TOKEN_ERROR" | "FLY_VOLUME_CREATE_ERROR" | "FLY_VOLUME_FORK_ERROR" | "FLY_VOLUME_DELETE_RECENTLY_FORKED_ERROR" | "FLY_MACHINE_CREATE_ERROR" | "FLY_VOLUME_CHECK_ERROR" | "FLY_NON_MOUNTABLE_VOLUME_ERROR" | "FLY_DEPRECATED_REGION_ERROR" | "FLY_VOLUME_NOT_FOUND" | "FLY_MACHINE_LIMIT_ERROR" | "KUBE_CAPACITY_ERROR" | "KUBE_PERMISSIONS_ERROR" | "KUBE_POD_LIMIT_ERROR" | "KUBE_RESOURCE_QUOTA_ERROR" | "KUBE_NAMESPACE_CHECK_ERROR" | "KUBE_PVC_CREATE_ERROR" | "KUBE_PVC_CHECK_ERROR" | "KUBE_POD_CREATE_ERROR" | "KUBE_SERVICE_CREATE_ERROR" | "KUBE_INGRESS_CREATE_ERROR" | "KUBE_POD_FAILED_TO_START_ERROR" | "ensure-checking-existing-machines" | "found-multiple-failed-machine" | "maximun-retries-machine-creation" | GitAuthErrorCode | "unknown" | "project-bad-state" | "project-not-found" | "project-deleted" | "project-branch-not-found" | "project-branch-deleted" | "project-branch-no-session-id" | "project-repo-full-name-not-found" | "project-org-not-found" | "invalid-project-repo-url-already-in-use" | "no-available-regions" | "invalid-backup-without-volume-id" | "missing-app-with-machine-or-volume" | "update-branch-info-in-firebase" | "update-branch-app-name-in-firebase" | `machine-status-polling-${MachineState}` | `machine-image-exited-immediately` | `volume-not-found-${FlyVolumeState}` | "trying-to-remove-used-volume" | "missing-container-url" | "timeout" | "fatal:zod-validation-error" | `fatal:${string}`;
|
|
259
152
|
export interface ErrorStateMessage extends BaseMessage {
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
153
|
+
state: "error";
|
|
154
|
+
message: string;
|
|
155
|
+
error: string;
|
|
156
|
+
code: EnsureContainerErrorCode;
|
|
157
|
+
causeError: string;
|
|
265
158
|
}
|
|
266
159
|
export interface CleanupCompletedMessage extends BaseMessage {
|
|
267
|
-
|
|
268
|
-
|
|
160
|
+
state: "cleanupCompleted";
|
|
161
|
+
message: string;
|
|
269
162
|
}
|
|
270
163
|
/**
|
|
271
164
|
* Messages sent by the container orchestrator.
|
|
272
165
|
*/
|
|
273
|
-
export type ProjectsChunkMessage =
|
|
274
|
-
| InitializingMessage
|
|
275
|
-
| FetchingGithubTokenMessage
|
|
276
|
-
| FetchingFusionKeyMessage
|
|
277
|
-
| CheckingAppMessage
|
|
278
|
-
| CleaningUpAppMessage
|
|
279
|
-
| CreatingAppMessage
|
|
280
|
-
| CheckingIPMessage
|
|
281
|
-
| AllocatingIPMessage
|
|
282
|
-
| CheckingMachineMessage
|
|
283
|
-
| CheckingVolumeMessage
|
|
284
|
-
| ForkingVolumeMessage
|
|
285
|
-
| RetryingWithNewRegionMessage
|
|
286
|
-
| WaitingBeforePollingMessage
|
|
287
|
-
| PollingMachineStatusMessage
|
|
288
|
-
| WarningStateMessage
|
|
289
|
-
| PingMessage
|
|
290
|
-
| DebugMessage
|
|
291
|
-
| ErrorMessage
|
|
292
|
-
| InfoMessage
|
|
293
|
-
| WarningMessage
|
|
294
|
-
| MachineStatusMessage
|
|
295
|
-
| LogsMessage
|
|
296
|
-
| ConfigStatusMessage
|
|
297
|
-
| AppCreatedMessage
|
|
298
|
-
| MachineCreatedMessage
|
|
299
|
-
| IpAllocatedMessage
|
|
300
|
-
| VolumeForkedMessage
|
|
301
|
-
| ReadyMessage
|
|
302
|
-
| ErrorStateMessage
|
|
303
|
-
| CleanupCompletedMessage;
|
|
166
|
+
export type ProjectsChunkMessage = InitializingMessage | FetchingGithubTokenMessage | FetchingFusionKeyMessage | CheckingAppMessage | CleaningUpAppMessage | CreatingAppMessage | CheckingIPMessage | AllocatingIPMessage | CheckingMachineMessage | CheckingVolumeMessage | ForkingVolumeMessage | RetryingWithNewRegionMessage | WaitingBeforePollingMessage | PollingMachineStatusMessage | WarningStateMessage | PingMessage | DebugMessage | ErrorMessage | InfoMessage | WarningMessage | MachineStatusMessage | LogsMessage | ConfigStatusMessage | AppCreatedMessage | MachineCreatedMessage | IpAllocatedMessage | VolumeForkedMessage | ReadyMessage | ErrorStateMessage | CleanupCompletedMessage;
|
|
304
167
|
export interface GitConfig {
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
168
|
+
url: string;
|
|
169
|
+
provider: "github" | "bitbucket" | "gitlab" | "azure" | "unknown";
|
|
170
|
+
token: string | undefined;
|
|
308
171
|
}
|
|
309
172
|
export type GitConfigs = Record<string, GitConfig>;
|
|
310
173
|
export declare const EXAMPLE_REPOS: string[];
|
|
@@ -312,248 +175,245 @@ export declare const STARTER_REPO = "BuilderIO/fusion-starter";
|
|
|
312
175
|
export declare const EXAMPLE_OR_STARTER_REPOS: string[];
|
|
313
176
|
export declare const EXAMPLE_OR_STARTER_REPOS_URLS: string[];
|
|
314
177
|
export interface GitBackupUploadUrlResult {
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
178
|
+
signedUrl: string;
|
|
179
|
+
filePath: string;
|
|
180
|
+
expiresAt: string;
|
|
318
181
|
}
|
|
319
182
|
export interface GitBackupUploadUrlOptions {
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
183
|
+
projectId: string;
|
|
184
|
+
branchName: string;
|
|
185
|
+
size: number;
|
|
186
|
+
partial: boolean;
|
|
187
|
+
contentMd5: string;
|
|
325
188
|
}
|
|
326
189
|
export interface GitBackupDownloadUrlOptions {
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
190
|
+
spaceId: string;
|
|
191
|
+
projectId: string;
|
|
192
|
+
branchName: string;
|
|
193
|
+
partial: boolean;
|
|
331
194
|
}
|
|
332
195
|
export type ForcedBackup = "offline-full" | "offline" | undefined;
|
|
333
196
|
export interface GitBackupRecordOptions {
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
197
|
+
projectId: string;
|
|
198
|
+
branchName: string;
|
|
199
|
+
size: number;
|
|
200
|
+
gitBranchName: string;
|
|
201
|
+
initialBranch: string;
|
|
202
|
+
initialCommitHash: string | undefined;
|
|
203
|
+
lastCommitHash: string;
|
|
204
|
+
partial: boolean;
|
|
205
|
+
empty: boolean;
|
|
206
|
+
status: "completed";
|
|
207
|
+
contentMd5?: string;
|
|
208
|
+
repoUrl: string;
|
|
209
|
+
version: "v1" | "v2";
|
|
210
|
+
forced: ForcedBackup;
|
|
211
|
+
metadata?: Record<string, string | string[] | undefined>;
|
|
349
212
|
}
|
|
350
213
|
export interface GitBackupRecordResult {
|
|
351
|
-
|
|
214
|
+
success: boolean;
|
|
352
215
|
}
|
|
353
216
|
export interface CodegenSetLastCommit {
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
217
|
+
projectId: string;
|
|
218
|
+
branchName: string;
|
|
219
|
+
lastCommitHash: string;
|
|
220
|
+
clearSecondaryVolumeId: boolean;
|
|
358
221
|
}
|
|
359
222
|
export interface CodegenRuntimeStatus {
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
223
|
+
projectId: string;
|
|
224
|
+
branchName: string;
|
|
225
|
+
lastCommitHash?: string;
|
|
226
|
+
clearSecondaryVolumeId?: boolean;
|
|
227
|
+
lastServerState?: LaunchServerState;
|
|
228
|
+
lastServerVersion?: string;
|
|
366
229
|
}
|
|
367
230
|
export interface BackupGitRepoResultValid {
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
231
|
+
success: true;
|
|
232
|
+
partial: boolean;
|
|
233
|
+
repoUrl: string;
|
|
234
|
+
empty: boolean;
|
|
235
|
+
lastCommitHash: string;
|
|
236
|
+
backupRef: string | undefined;
|
|
374
237
|
}
|
|
375
238
|
export interface BackupGitRepoResultInvalid {
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
}
|
|
379
|
-
export type BackupGitRepoResult =
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
skipped?: boolean;
|
|
393
|
-
reason?: string;
|
|
394
|
-
error?: Error;
|
|
395
|
-
}
|
|
396
|
-
| BackupGitRepoResult;
|
|
239
|
+
success: false;
|
|
240
|
+
reason: "project_removed";
|
|
241
|
+
}
|
|
242
|
+
export type BackupGitRepoResult = BackupGitRepoResultValid | BackupGitRepoResultInvalid;
|
|
243
|
+
export type ShutdownResponse = {
|
|
244
|
+
success: true;
|
|
245
|
+
message: string;
|
|
246
|
+
skipped: boolean;
|
|
247
|
+
reason: string;
|
|
248
|
+
} | {
|
|
249
|
+
success: false;
|
|
250
|
+
message?: string;
|
|
251
|
+
skipped?: boolean;
|
|
252
|
+
reason?: string;
|
|
253
|
+
error?: Error;
|
|
254
|
+
} | BackupGitRepoResult;
|
|
397
255
|
export type ShutdownResponseSerialized = Omit<ShutdownResponse, "error"> & {
|
|
398
|
-
|
|
256
|
+
error?: string;
|
|
399
257
|
};
|
|
400
258
|
export type SetupDependency = SetupMiseDependency | SetupScriptDependency;
|
|
401
259
|
export interface SetupMiseDependency {
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
260
|
+
key: string;
|
|
261
|
+
type: "mise";
|
|
262
|
+
tool: string;
|
|
263
|
+
version?: string;
|
|
406
264
|
}
|
|
407
265
|
export interface SetupScriptDependency {
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
}
|
|
413
|
-
export type FusionExecutionEnvironment =
|
|
414
|
-
| "containerized"
|
|
415
|
-
| "container-less"
|
|
416
|
-
| "cloud"
|
|
417
|
-
| "cloud-v2";
|
|
266
|
+
key: string;
|
|
267
|
+
type: "script";
|
|
268
|
+
name: string;
|
|
269
|
+
script: string;
|
|
270
|
+
}
|
|
271
|
+
export type FusionExecutionEnvironment = "containerized" | "container-less" | "cloud" | "cloud-v2";
|
|
418
272
|
export interface PartialBranchData {
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
273
|
+
name?: string;
|
|
274
|
+
createdBy: string;
|
|
275
|
+
friendlyName: string;
|
|
276
|
+
isDefault: boolean;
|
|
277
|
+
isPublic: boolean;
|
|
278
|
+
lockedFusionEnvironment?: FusionExecutionEnvironment;
|
|
279
|
+
metadata?: BranchMetadata;
|
|
280
|
+
backup?: BranchBackup;
|
|
281
|
+
gitAiBranch?: string | null;
|
|
282
|
+
lastCommitHash?: string | null;
|
|
283
|
+
lastCommitDate?: number | null;
|
|
284
|
+
commitMode?: CommitMode;
|
|
285
|
+
useHomeDir?: boolean;
|
|
286
|
+
checkoutBranch?: string | null;
|
|
287
|
+
/** Whether this branch is for a fork PR - affects git operations (read-only, can't push) */
|
|
288
|
+
isFork?: boolean | null;
|
|
289
|
+
cloneFrom?: {
|
|
290
|
+
projectId: string;
|
|
291
|
+
branchName: string;
|
|
292
|
+
};
|
|
439
293
|
}
|
|
440
294
|
export type EntityState = "active" | "deleted" | "archived";
|
|
295
|
+
/**
|
|
296
|
+
* PR information for a single repository
|
|
297
|
+
*/
|
|
298
|
+
export interface PrInfo {
|
|
299
|
+
prNumber: number;
|
|
300
|
+
prUrl: string;
|
|
301
|
+
}
|
|
441
302
|
/**
|
|
442
303
|
* Metadata stored in branches for integration tracking and PR description generation.
|
|
443
304
|
* This type documents the integration context that can be attached to a branch.
|
|
444
305
|
*/
|
|
445
306
|
export interface BranchMetadata {
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
307
|
+
/** How the branch was created (e.g., "slack", "jira", "api", "cli") */
|
|
308
|
+
createdVia?: string;
|
|
309
|
+
/** JIRA issue key (e.g., "PROJ-123") - used to link back to the JIRA ticket in PR descriptions */
|
|
310
|
+
jiraIssueKey?: string;
|
|
311
|
+
/** JIRA cloud ID - UUID identifier for the Atlassian cloud instance */
|
|
312
|
+
jiraCloudId?: string;
|
|
313
|
+
/** JIRA site name - the subdomain used in the JIRA URL (e.g., "mycompany" for mycompany.atlassian.net) */
|
|
314
|
+
jiraSiteName?: string;
|
|
315
|
+
/** JIRA issue ID - internal JIRA identifier */
|
|
316
|
+
jiraIssueId?: string;
|
|
317
|
+
/** Slack team/workspace ID - used to ensure deep links open in the correct workspace for multi-workspace users */
|
|
318
|
+
slackTeamId?: string;
|
|
319
|
+
/** Slack channel ID - used to link back to the Slack thread in PR descriptions */
|
|
320
|
+
slackChannelId?: string;
|
|
321
|
+
/** Slack thread timestamp - used to construct the Slack thread URL */
|
|
322
|
+
slackThreadTs?: string;
|
|
323
|
+
[key: string]: unknown;
|
|
463
324
|
}
|
|
464
325
|
export type PRStatus = "open" | "closed" | "merged" | "draft" | "approved";
|
|
465
326
|
interface BranchSharedData {
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
327
|
+
appName?: string | null;
|
|
328
|
+
prNumber?: number | null;
|
|
329
|
+
prUrl?: string | null;
|
|
330
|
+
prInfoByFolder?: Record<string, PrInfo> | null;
|
|
331
|
+
prStatus?: PRStatus;
|
|
332
|
+
machineId?: string | null;
|
|
333
|
+
lastMachineIdRemovedAt?: number | null;
|
|
334
|
+
volumeId?: string | null;
|
|
335
|
+
secondaryVolumeId?: string | null;
|
|
336
|
+
volumeName?: string | null;
|
|
337
|
+
gitAiBranch?: string | null;
|
|
338
|
+
lastCommitHash?: string | null;
|
|
339
|
+
lastCommitDate?: number | null;
|
|
340
|
+
lastServerState?: LaunchServerState | null;
|
|
341
|
+
lastServerStateDate?: number | null;
|
|
342
|
+
lastServerVersion?: string | null;
|
|
343
|
+
name?: string;
|
|
344
|
+
agentType?: string | null;
|
|
345
|
+
createdBy?: string;
|
|
346
|
+
isPublic?: boolean;
|
|
347
|
+
isDefault?: boolean;
|
|
348
|
+
friendlyName?: string;
|
|
349
|
+
useHomeDir?: boolean;
|
|
350
|
+
useCloudHomeDir?: boolean;
|
|
351
|
+
ipv4?: {
|
|
352
|
+
address: string | null;
|
|
353
|
+
allocated: boolean | null;
|
|
354
|
+
} | null;
|
|
355
|
+
ipv6?: {
|
|
356
|
+
address: string | null;
|
|
357
|
+
allocated: boolean | null;
|
|
358
|
+
} | null;
|
|
359
|
+
backup?: BranchBackup;
|
|
360
|
+
metadata?: BranchMetadata;
|
|
361
|
+
needsCleanup?: boolean;
|
|
362
|
+
/** @deprecated Use `state` field instead. Kept for backwards compatibility. */
|
|
363
|
+
deleted?: boolean;
|
|
364
|
+
/** MIGRATION: accepts both string and number during migration period */
|
|
365
|
+
deletedAt?: InMigrationDateNullable;
|
|
366
|
+
deletedBy?: string;
|
|
367
|
+
kubePodName?: string | null;
|
|
368
|
+
kubeNamespace?: string | null;
|
|
369
|
+
kubePvcName?: string | null;
|
|
370
|
+
kubeHostname?: string | null;
|
|
371
|
+
checkoutBranch?: string | null;
|
|
372
|
+
/** Whether this branch is for a fork PR - affects git operations (read-only, can't push) */
|
|
373
|
+
isFork?: boolean | null;
|
|
374
|
+
vscodeTunnelUrl?: string | null;
|
|
375
|
+
vscodeTunnelName?: string | null;
|
|
376
|
+
vscodeTunnelExpiresAt?: string | null;
|
|
377
|
+
commitMode?: CommitMode;
|
|
378
|
+
/** Timestamp when an AI agent started activity on this branch, null when inactive (in milliseconds since epoch) */
|
|
379
|
+
lastAgentActivityAt?: number | null;
|
|
380
|
+
/** Timestamp of last activity on this branch - includes both agent and user activity (in milliseconds since epoch) */
|
|
381
|
+
lastActivityAt?: number;
|
|
520
382
|
}
|
|
521
383
|
/**
|
|
522
384
|
* fields that are required in the new branch format, but optional in the legacy branch format.
|
|
523
385
|
*/
|
|
524
386
|
interface RequiredBranchSharedData {
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
387
|
+
/** The state of the branch. Use `isBranchDeleted()` helper for backwards-compatible checks. */
|
|
388
|
+
state: EntityState;
|
|
389
|
+
lockedFusionEnvironment: FusionExecutionEnvironment;
|
|
390
|
+
id: string;
|
|
391
|
+
sessionId: string;
|
|
392
|
+
/** MIGRATION: accepts both string and number during migration period */
|
|
393
|
+
createdAt: InMigrationDate;
|
|
394
|
+
/** MIGRATION: accepts both string and number during migration period */
|
|
395
|
+
updatedAt: InMigrationDate;
|
|
396
|
+
lastUpdatedAt: number;
|
|
535
397
|
}
|
|
536
398
|
/**
|
|
537
399
|
* LegacyBranch represents branch data as stored in the nested project.branches field.
|
|
538
400
|
* This type does NOT include projectId or legacyId as those don't exist in the legacy format.
|
|
539
401
|
*/
|
|
540
|
-
export interface LegacyBranch
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
recoveryDate: Date;
|
|
545
|
-
};
|
|
402
|
+
export interface LegacyBranch extends BranchSharedData, Partial<RequiredBranchSharedData> {
|
|
403
|
+
preRecoveryData?: Partial<LegacyBranch> & {
|
|
404
|
+
recoveryDate: Date;
|
|
405
|
+
};
|
|
546
406
|
}
|
|
547
407
|
/**
|
|
548
408
|
* NewBranch represents branch data as stored in the standalone branches collection.
|
|
549
409
|
* Extends LegacyBranch with required projectId, name, and optional legacyId fields.
|
|
550
410
|
*/
|
|
551
411
|
export interface NewBranch extends BranchSharedData, RequiredBranchSharedData {
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
412
|
+
ownerId: string;
|
|
413
|
+
projectId: string;
|
|
414
|
+
name: string;
|
|
415
|
+
/** Legacy ID for mapping to project.branches[branchName] format: ${projectId}-${branchName} */
|
|
416
|
+
legacyId: string;
|
|
557
417
|
}
|
|
558
418
|
/**
|
|
559
419
|
* Branch is a union type that can represent either a legacy branch or a new branch.
|
|
@@ -564,140 +424,141 @@ export declare const checkIsNewBranch: (branch: Branch) => branch is NewBranch;
|
|
|
564
424
|
export type CpuKind = "performance" | "standard" | "shared";
|
|
565
425
|
export type MachineAutoStop = "stop" | "off" | "suspend";
|
|
566
426
|
export interface ProjectRolePermissions {
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
427
|
+
view?: boolean;
|
|
428
|
+
editCode?: boolean;
|
|
429
|
+
sendPullRequests?: boolean;
|
|
430
|
+
createBranches?: boolean;
|
|
431
|
+
modifyMcpServers?: boolean;
|
|
432
|
+
modifyWorkflowIntegrations?: boolean;
|
|
433
|
+
modifyProjectSettings?: boolean;
|
|
574
434
|
}
|
|
575
435
|
export interface ProjectAccessControl {
|
|
576
|
-
|
|
577
|
-
|
|
436
|
+
roles: Record<string, ProjectRolePermissions | null>;
|
|
437
|
+
users: Record<string, ProjectRolePermissions>;
|
|
578
438
|
}
|
|
579
439
|
export interface Project {
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
440
|
+
id: string;
|
|
441
|
+
name: string;
|
|
442
|
+
ownerId: string;
|
|
443
|
+
repoFullName: string | undefined;
|
|
444
|
+
repoProvider: string;
|
|
445
|
+
repoProtocol: string | undefined;
|
|
446
|
+
repoDescription?: string;
|
|
447
|
+
repoPrivate: boolean;
|
|
448
|
+
repoUrl: string | undefined;
|
|
449
|
+
/** MIGRATION: accepts both string and number during migration period */
|
|
450
|
+
createdDate: InMigrationDate;
|
|
451
|
+
/** MIGRATION: accepts both string and number during migration period */
|
|
452
|
+
updatedAt: InMigrationDate;
|
|
453
|
+
pinned?: boolean;
|
|
454
|
+
archived?: boolean;
|
|
455
|
+
createdBy: string;
|
|
456
|
+
checkRunCounts?: Record<string, number>;
|
|
457
|
+
repoAddedBy?: string;
|
|
458
|
+
pipelineCounts?: Record<string, number>;
|
|
459
|
+
needSetup?: boolean;
|
|
460
|
+
projectType?: "app" | "repo-indexing";
|
|
461
|
+
domains?: string[];
|
|
462
|
+
accessMode?: "public" | "private";
|
|
463
|
+
projectAccess?: ProjectAccessControl;
|
|
464
|
+
settings: {
|
|
465
|
+
isNativeApp?: boolean;
|
|
466
|
+
autoDetectDevServer?: boolean;
|
|
467
|
+
autoDetectDevServerPatterns?: string[];
|
|
468
|
+
fusionEnvironment?: FusionExecutionEnvironment;
|
|
469
|
+
devServerPort?: number;
|
|
470
|
+
devServerUrl?: string;
|
|
471
|
+
refreshPreview?: boolean;
|
|
472
|
+
installCommand?: string;
|
|
473
|
+
validateCommand?: string;
|
|
474
|
+
proxyOrigin?: string;
|
|
475
|
+
proxyDefaultOrigin?: string;
|
|
476
|
+
gitBranchNamingStrategy?: "ai-session" | "branch-name" | "custom";
|
|
477
|
+
setupDependencies?: SetupDependency[];
|
|
478
|
+
gitBranchNamingCustom?: string;
|
|
479
|
+
askUserForBranchName?: boolean;
|
|
480
|
+
devServerCommand?: string;
|
|
481
|
+
cpuKind?: CpuKind;
|
|
482
|
+
cpus?: 1 | 2 | 4;
|
|
483
|
+
memory?: 2048 | 4096 | 8192 | 16384;
|
|
484
|
+
/** @deprecated */
|
|
485
|
+
memoryLimit?: 1024 | 2048 | 4096 | 8192 | 16384;
|
|
486
|
+
autoStop?: MachineAutoStop;
|
|
487
|
+
mainBranchName?: string;
|
|
488
|
+
minMachinesRunning?: number;
|
|
489
|
+
volumeSize?: 5 | 10 | 12 | 15 | 20;
|
|
490
|
+
includePath?: string;
|
|
491
|
+
includePatterns?: string[];
|
|
492
|
+
environmentVariables?: EnvironmentVariable[];
|
|
493
|
+
fileOverrides?: FileOverride[];
|
|
494
|
+
customInstructions?: CustomInstruction[];
|
|
495
|
+
customAgents?: CustomAgentDefinition[];
|
|
496
|
+
commitMode?: CommitMode;
|
|
497
|
+
defaultBranchType?: "shared" | "private";
|
|
498
|
+
dockerImagePath?: string;
|
|
499
|
+
nodeVersion?: string;
|
|
500
|
+
designSystems?: string[];
|
|
501
|
+
useNI?: boolean;
|
|
502
|
+
folders?: Array<{
|
|
503
|
+
name: string;
|
|
504
|
+
remoteUrl: string;
|
|
505
|
+
mainBranchName?: string;
|
|
506
|
+
includePath?: string;
|
|
507
|
+
addedBy?: string;
|
|
508
|
+
repoProvider?: string;
|
|
509
|
+
repoProtocol?: string;
|
|
510
|
+
enableGit?: boolean;
|
|
511
|
+
}>;
|
|
512
|
+
agentsMD?: string;
|
|
513
|
+
initializationCommand?: string;
|
|
514
|
+
repoSubpath?: string;
|
|
515
|
+
recommendedRoot?: string;
|
|
516
|
+
https?: boolean;
|
|
517
|
+
localHttpsDomain?: string;
|
|
518
|
+
browserAutomation?: {
|
|
519
|
+
backgroundAgents?: boolean;
|
|
520
|
+
instructions?: string;
|
|
521
|
+
authUser?: string;
|
|
522
|
+
authPassword?: string;
|
|
523
|
+
};
|
|
524
|
+
qaBot?: boolean;
|
|
525
|
+
httpsServerKeyPath?: string;
|
|
526
|
+
httpsServerCertPath?: string;
|
|
527
|
+
httpsServerCaPath?: string;
|
|
528
|
+
httpsServerKeyContent?: string;
|
|
529
|
+
httpsServerCertContent?: string;
|
|
530
|
+
httpsServerCaContent?: string;
|
|
531
|
+
httpsServerPfx?: string;
|
|
532
|
+
httpsServerPassphrase?: string;
|
|
533
|
+
httpsServerSecureProtocol?: string;
|
|
534
|
+
httpsServerSecureOptions?: number;
|
|
535
|
+
httpsServerCiphers?: string;
|
|
536
|
+
httpsServerHonorCipherOrder?: boolean;
|
|
537
|
+
httpsServerRequestCert?: boolean;
|
|
538
|
+
httpsServerRejectUnauthorized?: boolean;
|
|
539
|
+
};
|
|
540
|
+
screenshot: string | null;
|
|
541
|
+
isExample?: boolean;
|
|
542
|
+
isPublic?: boolean;
|
|
543
|
+
snapshotVolume?: {
|
|
544
|
+
volumeId: string;
|
|
545
|
+
appName: string;
|
|
546
|
+
createdAt: number;
|
|
547
|
+
};
|
|
548
|
+
isFromUserTemplate?: boolean;
|
|
549
|
+
templateId?: string | null;
|
|
550
|
+
localPath?: string | null;
|
|
551
|
+
/** The state of the project. Use `isProjectDeleted()` helper for backwards-compatible checks. */
|
|
552
|
+
state?: EntityState;
|
|
553
|
+
/** MIGRATION: accepts both string and number during migration period */
|
|
554
|
+
deletedAt?: InMigrationDateNullable;
|
|
555
|
+
deletedBy?: string;
|
|
556
|
+
/**
|
|
557
|
+
* When true, branches are stored in the standalone `branches` collection
|
|
558
|
+
* instead of embedded in project.branches field.
|
|
559
|
+
* Defaults to false for backwards compatibility with existing projects.
|
|
560
|
+
*/
|
|
561
|
+
useBranchesCollection?: boolean;
|
|
701
562
|
}
|
|
702
563
|
/**
|
|
703
564
|
* Get the state of a branch, checking `state` first and falling back to `deleted` for backwards compatibility.
|
|
@@ -721,31 +582,32 @@ export declare const isBranchArchived: (branch: Branch) => boolean;
|
|
|
721
582
|
*/
|
|
722
583
|
export declare const isProjectDeleted: (project: Project) => boolean;
|
|
723
584
|
export interface ProjectWithBranches extends Project {
|
|
724
|
-
|
|
585
|
+
branches: Record<string, Branch>;
|
|
725
586
|
}
|
|
726
587
|
export interface OrganizationPrivate {
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
588
|
+
ownerId: string;
|
|
589
|
+
id: string;
|
|
590
|
+
installs?: {
|
|
591
|
+
ids: number[];
|
|
592
|
+
host: string;
|
|
593
|
+
}[];
|
|
594
|
+
createdAt: number;
|
|
595
|
+
updatedAt: number;
|
|
596
|
+
fallbackTokens?: FallbackTokensPrivate;
|
|
735
597
|
}
|
|
736
598
|
export interface CreateProjectOptions {
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
599
|
+
name?: string;
|
|
600
|
+
repoFullName: string;
|
|
601
|
+
repoProvider: string;
|
|
602
|
+
repoProtocol?: string;
|
|
603
|
+
repoDescription?: string;
|
|
604
|
+
repoPrivate: boolean;
|
|
605
|
+
repoUrl: string;
|
|
606
|
+
needSetup: boolean;
|
|
607
|
+
domains?: string[];
|
|
608
|
+
settings?: Partial<Project["settings"]>;
|
|
609
|
+
isPublic?: boolean;
|
|
610
|
+
isExample?: boolean;
|
|
611
|
+
templateId?: string;
|
|
750
612
|
}
|
|
751
613
|
export {};
|