@tillstack/cli 0.2.0
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/README.md +57 -0
- package/dist/api.d.ts +1579 -0
- package/dist/api.d.ts.map +1 -0
- package/dist/api.js +759 -0
- package/dist/api.js.map +1 -0
- package/dist/config.d.ts +14 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +50 -0
- package/dist/config.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3447 -0
- package/dist/index.js.map +1 -0
- package/dist/output.d.ts +29 -0
- package/dist/output.d.ts.map +1 -0
- package/dist/output.js +90 -0
- package/dist/output.js.map +1 -0
- package/dist/rules.d.ts +52 -0
- package/dist/rules.d.ts.map +1 -0
- package/dist/rules.js +175 -0
- package/dist/rules.js.map +1 -0
- package/package.json +49 -0
package/dist/api.d.ts
ADDED
|
@@ -0,0 +1,1579 @@
|
|
|
1
|
+
export declare class ApiError extends Error {
|
|
2
|
+
status: number;
|
|
3
|
+
constructor(status: number, message: string);
|
|
4
|
+
}
|
|
5
|
+
export interface ApiOptions {
|
|
6
|
+
apiUrl: string;
|
|
7
|
+
token?: string;
|
|
8
|
+
}
|
|
9
|
+
/** Generic JSON request against the dashboard API. */
|
|
10
|
+
export declare function request<T>(opts: ApiOptions, method: string, path: string, body?: unknown): Promise<T>;
|
|
11
|
+
export interface StackModuleRef {
|
|
12
|
+
module: string;
|
|
13
|
+
status: 'active' | 'paused';
|
|
14
|
+
}
|
|
15
|
+
export interface Stack {
|
|
16
|
+
id: string;
|
|
17
|
+
name: string;
|
|
18
|
+
slug: string;
|
|
19
|
+
description: string;
|
|
20
|
+
accent: string;
|
|
21
|
+
status: 'active' | 'archived';
|
|
22
|
+
created_at: string;
|
|
23
|
+
updated_at: string;
|
|
24
|
+
modules?: StackModuleRef[];
|
|
25
|
+
}
|
|
26
|
+
export interface StackDetail {
|
|
27
|
+
stack: Stack;
|
|
28
|
+
modules: Array<{
|
|
29
|
+
module: string;
|
|
30
|
+
status: string;
|
|
31
|
+
enabled_at?: string;
|
|
32
|
+
}>;
|
|
33
|
+
counts: Record<string, number>;
|
|
34
|
+
}
|
|
35
|
+
export interface CreateStackInput {
|
|
36
|
+
name: string;
|
|
37
|
+
slug?: string;
|
|
38
|
+
description?: string;
|
|
39
|
+
accent?: string;
|
|
40
|
+
modules?: string[];
|
|
41
|
+
}
|
|
42
|
+
export declare function listStacks(opts: ApiOptions): Promise<{
|
|
43
|
+
stacks: Stack[];
|
|
44
|
+
}>;
|
|
45
|
+
export declare function createStack(opts: ApiOptions, input: CreateStackInput): Promise<{
|
|
46
|
+
stack: Stack;
|
|
47
|
+
}>;
|
|
48
|
+
export declare function getStack(opts: ApiOptions, slug: string): Promise<StackDetail>;
|
|
49
|
+
export declare function updateStack(opts: ApiOptions, slug: string, patch: {
|
|
50
|
+
name?: string;
|
|
51
|
+
description?: string;
|
|
52
|
+
accent?: string;
|
|
53
|
+
status?: 'active' | 'archived';
|
|
54
|
+
}): Promise<{
|
|
55
|
+
stack: Stack;
|
|
56
|
+
}>;
|
|
57
|
+
export declare function deleteStack(opts: ApiOptions, slug: string): Promise<{
|
|
58
|
+
ok: boolean;
|
|
59
|
+
}>;
|
|
60
|
+
export declare function setStackModule(opts: ApiOptions, slug: string, module: string, status: 'active' | 'paused'): Promise<{
|
|
61
|
+
module: string;
|
|
62
|
+
status: string;
|
|
63
|
+
}>;
|
|
64
|
+
export declare function setStackResource(opts: ApiOptions, slug: string, module: string, resourceId: string, action: 'attach' | 'detach'): Promise<{
|
|
65
|
+
ok: boolean;
|
|
66
|
+
in_stack: boolean;
|
|
67
|
+
}>;
|
|
68
|
+
export declare function login(opts: ApiOptions, email: string, password: string, totp?: string): Promise<{
|
|
69
|
+
token: string;
|
|
70
|
+
refresh?: string;
|
|
71
|
+
org: string;
|
|
72
|
+
totpRequired?: boolean;
|
|
73
|
+
}>;
|
|
74
|
+
export interface Me {
|
|
75
|
+
user?: {
|
|
76
|
+
id?: string;
|
|
77
|
+
email?: string;
|
|
78
|
+
name?: string | null;
|
|
79
|
+
};
|
|
80
|
+
org?: {
|
|
81
|
+
slug?: string;
|
|
82
|
+
name?: string;
|
|
83
|
+
role?: string;
|
|
84
|
+
};
|
|
85
|
+
role?: string;
|
|
86
|
+
}
|
|
87
|
+
export declare function getMe(opts: ApiOptions): Promise<Me>;
|
|
88
|
+
export interface Project {
|
|
89
|
+
id: string;
|
|
90
|
+
name: string;
|
|
91
|
+
slug?: string;
|
|
92
|
+
platform?: string;
|
|
93
|
+
dsn?: string;
|
|
94
|
+
created_at?: string;
|
|
95
|
+
}
|
|
96
|
+
export declare function listProjects(opts: ApiOptions): Promise<{
|
|
97
|
+
projects: Project[];
|
|
98
|
+
}>;
|
|
99
|
+
export declare function createProject(opts: ApiOptions, name: string, platform: string): Promise<{
|
|
100
|
+
project: Project;
|
|
101
|
+
}>;
|
|
102
|
+
export declare function getProject(opts: ApiOptions, projectId: string): Promise<{
|
|
103
|
+
project: Project;
|
|
104
|
+
}>;
|
|
105
|
+
export declare function rotateDsn(opts: ApiOptions, projectId: string): Promise<unknown>;
|
|
106
|
+
export interface Issue {
|
|
107
|
+
id: string;
|
|
108
|
+
title?: string;
|
|
109
|
+
culprit?: string | null;
|
|
110
|
+
level?: string;
|
|
111
|
+
status?: string;
|
|
112
|
+
events_count?: number;
|
|
113
|
+
last_seen?: string;
|
|
114
|
+
first_seen?: string;
|
|
115
|
+
}
|
|
116
|
+
export declare function listIssues(opts: ApiOptions, params?: {
|
|
117
|
+
projectId?: string;
|
|
118
|
+
limit?: number;
|
|
119
|
+
}): Promise<{
|
|
120
|
+
issues: Issue[];
|
|
121
|
+
total?: number;
|
|
122
|
+
}>;
|
|
123
|
+
export declare function getIssue(opts: ApiOptions, issueId: string): Promise<unknown>;
|
|
124
|
+
export declare function getMetrics(opts: ApiOptions, projectId?: string): Promise<unknown>;
|
|
125
|
+
export interface Alert {
|
|
126
|
+
id: string;
|
|
127
|
+
title?: string;
|
|
128
|
+
source?: string;
|
|
129
|
+
project?: string;
|
|
130
|
+
severity?: string;
|
|
131
|
+
acknowledged?: boolean;
|
|
132
|
+
created_at?: string;
|
|
133
|
+
}
|
|
134
|
+
export declare function listAlerts(opts: ApiOptions, limit?: number): Promise<{
|
|
135
|
+
alerts: Alert[];
|
|
136
|
+
unread?: number;
|
|
137
|
+
}>;
|
|
138
|
+
export interface AlertRule {
|
|
139
|
+
id: string;
|
|
140
|
+
name?: string;
|
|
141
|
+
trigger_type?: string;
|
|
142
|
+
enabled?: boolean;
|
|
143
|
+
project_id?: string;
|
|
144
|
+
quiet_period_minutes?: number;
|
|
145
|
+
}
|
|
146
|
+
export declare function listAlertRules(opts: ApiOptions, projectId?: string): Promise<{
|
|
147
|
+
rules: AlertRule[];
|
|
148
|
+
total?: number;
|
|
149
|
+
}>;
|
|
150
|
+
export declare function createRelease(opts: ApiOptions, projectId: string, body: {
|
|
151
|
+
version: string;
|
|
152
|
+
build?: string;
|
|
153
|
+
environment?: string;
|
|
154
|
+
commit_sha?: string;
|
|
155
|
+
}): Promise<unknown>;
|
|
156
|
+
export declare function uploadSourceMap(opts: ApiOptions, projectId: string, p: {
|
|
157
|
+
release: string;
|
|
158
|
+
filePath: string;
|
|
159
|
+
}): Promise<unknown>;
|
|
160
|
+
export declare function uploadProguardMapping(opts: ApiOptions, projectId: string, p: {
|
|
161
|
+
release: string;
|
|
162
|
+
filePath: string;
|
|
163
|
+
}): Promise<unknown>;
|
|
164
|
+
export declare function uploadDsym(opts: ApiOptions, projectId: string, p: {
|
|
165
|
+
release: string;
|
|
166
|
+
filePath: string;
|
|
167
|
+
}): Promise<unknown>;
|
|
168
|
+
export interface ApiKey {
|
|
169
|
+
id: string;
|
|
170
|
+
name: string;
|
|
171
|
+
scopes?: string[];
|
|
172
|
+
last_used_at?: string | null;
|
|
173
|
+
expires_at?: string | null;
|
|
174
|
+
created_at?: string;
|
|
175
|
+
}
|
|
176
|
+
export declare function listApiKeys(opts: ApiOptions): Promise<{
|
|
177
|
+
keys: ApiKey[];
|
|
178
|
+
}>;
|
|
179
|
+
export declare function createApiKey(opts: ApiOptions, name: string, scopes: string[]): Promise<{
|
|
180
|
+
key?: string;
|
|
181
|
+
api_key?: string;
|
|
182
|
+
id?: string;
|
|
183
|
+
}>;
|
|
184
|
+
export interface TillAuthApp {
|
|
185
|
+
id: string;
|
|
186
|
+
public_id?: string;
|
|
187
|
+
name: string;
|
|
188
|
+
slug?: string;
|
|
189
|
+
created_at?: string;
|
|
190
|
+
}
|
|
191
|
+
export declare function listAuthApps(opts: ApiOptions): Promise<{
|
|
192
|
+
apps: TillAuthApp[];
|
|
193
|
+
}>;
|
|
194
|
+
export declare function createAuthApp(opts: ApiOptions, name: string): Promise<{
|
|
195
|
+
app: TillAuthApp;
|
|
196
|
+
}>;
|
|
197
|
+
export declare function getAuthApp(opts: ApiOptions, appId: string): Promise<unknown>;
|
|
198
|
+
export interface TeamMember {
|
|
199
|
+
user_id?: string;
|
|
200
|
+
id?: string;
|
|
201
|
+
email?: string;
|
|
202
|
+
name?: string | null;
|
|
203
|
+
role?: string;
|
|
204
|
+
}
|
|
205
|
+
export declare function listTeam(opts: ApiOptions): Promise<{
|
|
206
|
+
members?: TeamMember[];
|
|
207
|
+
team?: TeamMember[];
|
|
208
|
+
}>;
|
|
209
|
+
export interface EdgeRuleMatch {
|
|
210
|
+
ip_cidrs?: string[];
|
|
211
|
+
paths?: string[];
|
|
212
|
+
methods?: string[];
|
|
213
|
+
countries?: string[];
|
|
214
|
+
user_agent_regex?: string;
|
|
215
|
+
threat_intel?: boolean;
|
|
216
|
+
}
|
|
217
|
+
export interface EdgeRuleRateLimit {
|
|
218
|
+
requests: number;
|
|
219
|
+
window_seconds: number;
|
|
220
|
+
by?: 'ip' | 'ip_path';
|
|
221
|
+
}
|
|
222
|
+
export interface EdgeRule {
|
|
223
|
+
id: string;
|
|
224
|
+
name: string;
|
|
225
|
+
description?: string | null;
|
|
226
|
+
project_id?: string | null;
|
|
227
|
+
enabled: boolean;
|
|
228
|
+
priority: number;
|
|
229
|
+
mode: 'block' | 'challenge' | 'log';
|
|
230
|
+
match: EdgeRuleMatch;
|
|
231
|
+
rate_limit?: EdgeRuleRateLimit | null;
|
|
232
|
+
response_status: number;
|
|
233
|
+
response_body?: string | null;
|
|
234
|
+
escalate_to_incident: boolean;
|
|
235
|
+
created_at?: string;
|
|
236
|
+
updated_at?: string;
|
|
237
|
+
}
|
|
238
|
+
/** The authored shape — everything except server-managed identity/timestamps. */
|
|
239
|
+
export type EdgeRuleInput = Omit<EdgeRule, 'id' | 'created_at' | 'updated_at'>;
|
|
240
|
+
export declare function listEdgeRules(opts: ApiOptions): Promise<{
|
|
241
|
+
rules: EdgeRule[];
|
|
242
|
+
}>;
|
|
243
|
+
export declare function createEdgeRule(opts: ApiOptions, body: Partial<EdgeRuleInput>): Promise<{
|
|
244
|
+
rule: EdgeRule;
|
|
245
|
+
}>;
|
|
246
|
+
export declare function updateEdgeRule(opts: ApiOptions, id: string, body: Partial<EdgeRuleInput>): Promise<{
|
|
247
|
+
rule: EdgeRule;
|
|
248
|
+
}>;
|
|
249
|
+
export declare function deleteEdgeRule(opts: ApiOptions, id: string): Promise<{
|
|
250
|
+
ok: boolean;
|
|
251
|
+
}>;
|
|
252
|
+
export interface EdgeKey {
|
|
253
|
+
id: string;
|
|
254
|
+
name: string;
|
|
255
|
+
project_id: string;
|
|
256
|
+
key_prefix: string;
|
|
257
|
+
last_used_at?: string | null;
|
|
258
|
+
revoked_at?: string | null;
|
|
259
|
+
created_at?: string;
|
|
260
|
+
secret?: string;
|
|
261
|
+
}
|
|
262
|
+
export declare function listEdgeKeys(opts: ApiOptions): Promise<{
|
|
263
|
+
keys: EdgeKey[];
|
|
264
|
+
}>;
|
|
265
|
+
export declare function createEdgeKey(opts: ApiOptions, projectId: string, name: string): Promise<{
|
|
266
|
+
key: EdgeKey;
|
|
267
|
+
}>;
|
|
268
|
+
export declare function revokeEdgeKey(opts: ApiOptions, id: string): Promise<{
|
|
269
|
+
ok: boolean;
|
|
270
|
+
}>;
|
|
271
|
+
export interface ShieldSettings {
|
|
272
|
+
auto_quarantine_compromised?: boolean;
|
|
273
|
+
auto_incident_on_confirmed_indicator?: boolean;
|
|
274
|
+
panic_mode?: boolean;
|
|
275
|
+
contribute_threat_intel?: boolean;
|
|
276
|
+
}
|
|
277
|
+
export declare function getShieldSettings(opts: ApiOptions): Promise<{
|
|
278
|
+
settings: ShieldSettings;
|
|
279
|
+
}>;
|
|
280
|
+
export interface Incident {
|
|
281
|
+
id: string;
|
|
282
|
+
title: string;
|
|
283
|
+
severity?: string;
|
|
284
|
+
status?: string;
|
|
285
|
+
security_type?: string | null;
|
|
286
|
+
created_at?: string;
|
|
287
|
+
}
|
|
288
|
+
export declare function listIncidents(opts: ApiOptions, status?: string): Promise<{
|
|
289
|
+
incidents: Incident[];
|
|
290
|
+
}>;
|
|
291
|
+
export interface GateSite {
|
|
292
|
+
id: string;
|
|
293
|
+
project_id: string;
|
|
294
|
+
name: string;
|
|
295
|
+
site_key: string;
|
|
296
|
+
secret_prefix?: string;
|
|
297
|
+
mode: string;
|
|
298
|
+
difficulty: number;
|
|
299
|
+
token_ttl_seconds: number;
|
|
300
|
+
hostname_allowlist: string[];
|
|
301
|
+
last_verified_at?: string | null;
|
|
302
|
+
created_at?: string;
|
|
303
|
+
secret?: string;
|
|
304
|
+
}
|
|
305
|
+
export interface GateSiteInput {
|
|
306
|
+
project_id: string;
|
|
307
|
+
name?: string;
|
|
308
|
+
mode?: string;
|
|
309
|
+
difficulty?: number;
|
|
310
|
+
token_ttl_seconds?: number;
|
|
311
|
+
hostname_allowlist?: string[];
|
|
312
|
+
}
|
|
313
|
+
export declare function listGateSites(opts: ApiOptions): Promise<{
|
|
314
|
+
sites: GateSite[];
|
|
315
|
+
}>;
|
|
316
|
+
export declare function createGateSite(opts: ApiOptions, body: GateSiteInput): Promise<{
|
|
317
|
+
site: GateSite;
|
|
318
|
+
}>;
|
|
319
|
+
export declare function updateGateSite(opts: ApiOptions, id: string, body: Partial<Omit<GateSiteInput, 'project_id'>>): Promise<{
|
|
320
|
+
site: GateSite;
|
|
321
|
+
}>;
|
|
322
|
+
export declare function deleteGateSite(opts: ApiOptions, id: string): Promise<{
|
|
323
|
+
ok: boolean;
|
|
324
|
+
}>;
|
|
325
|
+
export type TrackerProvider = 'jira' | 'linear';
|
|
326
|
+
export interface TrackerIntegration {
|
|
327
|
+
id: string;
|
|
328
|
+
provider: TrackerProvider;
|
|
329
|
+
site_url?: string | null;
|
|
330
|
+
auth_email?: string | null;
|
|
331
|
+
default_target: string;
|
|
332
|
+
default_issue_type?: string | null;
|
|
333
|
+
has_webhook_secret?: boolean;
|
|
334
|
+
created_at?: string;
|
|
335
|
+
}
|
|
336
|
+
export interface TrackerConnectInput {
|
|
337
|
+
provider: TrackerProvider;
|
|
338
|
+
api_token?: string;
|
|
339
|
+
site_url?: string;
|
|
340
|
+
auth_email?: string;
|
|
341
|
+
default_target: string;
|
|
342
|
+
default_issue_type?: string;
|
|
343
|
+
}
|
|
344
|
+
export declare function listTracker(opts: ApiOptions, projectId: string): Promise<{
|
|
345
|
+
integrations: TrackerIntegration[];
|
|
346
|
+
}>;
|
|
347
|
+
export declare function connectTracker(opts: ApiOptions, projectId: string, body: TrackerConnectInput): Promise<{
|
|
348
|
+
ok: boolean;
|
|
349
|
+
}>;
|
|
350
|
+
export declare function disconnectTracker(opts: ApiOptions, projectId: string, provider: TrackerProvider): Promise<{
|
|
351
|
+
ok: boolean;
|
|
352
|
+
}>;
|
|
353
|
+
export interface TrackerWebhookStatus {
|
|
354
|
+
provider: TrackerProvider;
|
|
355
|
+
configured: boolean;
|
|
356
|
+
webhook_url: string;
|
|
357
|
+
header?: string;
|
|
358
|
+
}
|
|
359
|
+
export declare function getTrackerWebhook(opts: ApiOptions, projectId: string, provider: TrackerProvider): Promise<TrackerWebhookStatus>;
|
|
360
|
+
export interface TrackerWebhookResult {
|
|
361
|
+
ok: boolean;
|
|
362
|
+
secret?: string;
|
|
363
|
+
webhook_url: string;
|
|
364
|
+
header?: string;
|
|
365
|
+
hint?: string;
|
|
366
|
+
}
|
|
367
|
+
export declare function setTrackerWebhook(opts: ApiOptions, projectId: string, body: {
|
|
368
|
+
provider: TrackerProvider;
|
|
369
|
+
secret?: string;
|
|
370
|
+
}): Promise<TrackerWebhookResult>;
|
|
371
|
+
export declare function askStream(opts: ApiOptions, orgSlug: string, question: string, onChunk: (text: string) => void): Promise<void>;
|
|
372
|
+
export interface CacheNamespace {
|
|
373
|
+
id: string;
|
|
374
|
+
name: string;
|
|
375
|
+
slug: string;
|
|
376
|
+
backend: 'upstash' | 'durable' | 'byo' | 'auto';
|
|
377
|
+
consistency: 'strong' | 'eventual';
|
|
378
|
+
region: string;
|
|
379
|
+
status: 'active' | 'paused' | 'archived';
|
|
380
|
+
default_ttl_sec: number;
|
|
381
|
+
max_commands_per_day: number;
|
|
382
|
+
project_id?: string | null;
|
|
383
|
+
byo_configured?: boolean;
|
|
384
|
+
created_at?: string;
|
|
385
|
+
}
|
|
386
|
+
export interface CacheNamespaceInput {
|
|
387
|
+
name: string;
|
|
388
|
+
slug: string;
|
|
389
|
+
backend?: CacheNamespace['backend'];
|
|
390
|
+
consistency?: CacheNamespace['consistency'];
|
|
391
|
+
region?: string;
|
|
392
|
+
default_ttl_sec?: number;
|
|
393
|
+
project_id?: string | null;
|
|
394
|
+
byo?: {
|
|
395
|
+
url: string;
|
|
396
|
+
token: string;
|
|
397
|
+
};
|
|
398
|
+
}
|
|
399
|
+
export interface CacheToken {
|
|
400
|
+
id: string;
|
|
401
|
+
name: string;
|
|
402
|
+
scope: 'rw' | 'ro';
|
|
403
|
+
token_prefix: string;
|
|
404
|
+
last_used_at?: string | null;
|
|
405
|
+
revoked_at?: string | null;
|
|
406
|
+
created_at?: string;
|
|
407
|
+
secret?: string;
|
|
408
|
+
}
|
|
409
|
+
export interface CacheQueue {
|
|
410
|
+
name: string;
|
|
411
|
+
depth: number;
|
|
412
|
+
in_flight: number;
|
|
413
|
+
dead_lettered: number;
|
|
414
|
+
delivered_total: number;
|
|
415
|
+
max_retries: number;
|
|
416
|
+
visibility_timeout_sec: number;
|
|
417
|
+
}
|
|
418
|
+
export interface CacheKeyMeta {
|
|
419
|
+
key: string;
|
|
420
|
+
kind: string;
|
|
421
|
+
bytes: number;
|
|
422
|
+
hits: number;
|
|
423
|
+
hot: boolean;
|
|
424
|
+
ttl_alert_sec?: number | null;
|
|
425
|
+
last_access_at?: string | null;
|
|
426
|
+
}
|
|
427
|
+
export declare function listNamespaces(opts: ApiOptions): Promise<{
|
|
428
|
+
namespaces: CacheNamespace[];
|
|
429
|
+
}>;
|
|
430
|
+
export declare function createNamespace(opts: ApiOptions, input: CacheNamespaceInput): Promise<{
|
|
431
|
+
namespace: CacheNamespace;
|
|
432
|
+
}>;
|
|
433
|
+
export declare function getNamespace(opts: ApiOptions, id: string): Promise<{
|
|
434
|
+
namespace: CacheNamespace;
|
|
435
|
+
}>;
|
|
436
|
+
export declare function updateNamespace(opts: ApiOptions, id: string, patch: Partial<CacheNamespaceInput> & {
|
|
437
|
+
status?: string;
|
|
438
|
+
max_commands_per_day?: number;
|
|
439
|
+
}): Promise<{
|
|
440
|
+
namespace: CacheNamespace;
|
|
441
|
+
}>;
|
|
442
|
+
export declare function deleteNamespace(opts: ApiOptions, id: string): Promise<{
|
|
443
|
+
ok: boolean;
|
|
444
|
+
}>;
|
|
445
|
+
export declare function listCacheTokens(opts: ApiOptions, nsId: string): Promise<{
|
|
446
|
+
tokens: CacheToken[];
|
|
447
|
+
}>;
|
|
448
|
+
export declare function createCacheToken(opts: ApiOptions, nsId: string, name: string, scope: 'rw' | 'ro'): Promise<{
|
|
449
|
+
token: CacheToken;
|
|
450
|
+
}>;
|
|
451
|
+
export declare function revokeCacheToken(opts: ApiOptions, nsId: string, tokenId: string): Promise<{
|
|
452
|
+
ok: boolean;
|
|
453
|
+
}>;
|
|
454
|
+
export declare function listCacheQueues(opts: ApiOptions, nsId: string): Promise<{
|
|
455
|
+
queues: CacheQueue[];
|
|
456
|
+
}>;
|
|
457
|
+
export declare function listCacheKeys(opts: ApiOptions, nsId: string): Promise<{
|
|
458
|
+
keys: CacheKeyMeta[];
|
|
459
|
+
}>;
|
|
460
|
+
export declare function getCacheUsage(opts: ApiOptions, nsId: string): Promise<{
|
|
461
|
+
usage: unknown[];
|
|
462
|
+
totals: {
|
|
463
|
+
commands: number;
|
|
464
|
+
queue_messages: number;
|
|
465
|
+
publishes: number;
|
|
466
|
+
storage_bytes: number;
|
|
467
|
+
};
|
|
468
|
+
}>;
|
|
469
|
+
export interface SecretsProject {
|
|
470
|
+
id: string;
|
|
471
|
+
name: string;
|
|
472
|
+
slug: string;
|
|
473
|
+
description?: string;
|
|
474
|
+
created_at?: string;
|
|
475
|
+
}
|
|
476
|
+
export interface SecretsEnvironment {
|
|
477
|
+
id: string;
|
|
478
|
+
project_id: string;
|
|
479
|
+
name: string;
|
|
480
|
+
slug: string;
|
|
481
|
+
sensitivity?: number;
|
|
482
|
+
created_at?: string;
|
|
483
|
+
}
|
|
484
|
+
export interface SecretMeta {
|
|
485
|
+
id: string;
|
|
486
|
+
key: string;
|
|
487
|
+
kind: 'static' | 'dynamic';
|
|
488
|
+
current_version: number;
|
|
489
|
+
updated_at?: string;
|
|
490
|
+
}
|
|
491
|
+
export interface SecretsServiceToken {
|
|
492
|
+
id: string;
|
|
493
|
+
name: string;
|
|
494
|
+
scope: 'read' | 'read_write';
|
|
495
|
+
environment_id?: string | null;
|
|
496
|
+
token_prefix: string;
|
|
497
|
+
last_used_at?: string | null;
|
|
498
|
+
expires_at?: string | null;
|
|
499
|
+
revoked_at?: string | null;
|
|
500
|
+
created_at?: string;
|
|
501
|
+
secret?: string;
|
|
502
|
+
}
|
|
503
|
+
export interface SecretVersion {
|
|
504
|
+
version: number;
|
|
505
|
+
value_hash: string;
|
|
506
|
+
comment?: string;
|
|
507
|
+
created_at?: string;
|
|
508
|
+
}
|
|
509
|
+
export declare function listSecretsProjects(opts: ApiOptions): Promise<{
|
|
510
|
+
projects: SecretsProject[];
|
|
511
|
+
}>;
|
|
512
|
+
export declare function createSecretsProject(opts: ApiOptions, name: string, slug: string, description?: string): Promise<{
|
|
513
|
+
project: SecretsProject;
|
|
514
|
+
}>;
|
|
515
|
+
export declare function listSecretsEnvironments(opts: ApiOptions, projectId: string): Promise<{
|
|
516
|
+
environments: SecretsEnvironment[];
|
|
517
|
+
}>;
|
|
518
|
+
export declare function createSecretsEnvironment(opts: ApiOptions, projectId: string, name: string, slug: string): Promise<{
|
|
519
|
+
environment: SecretsEnvironment;
|
|
520
|
+
}>;
|
|
521
|
+
export declare function listSecrets(opts: ApiOptions, envId: string): Promise<{
|
|
522
|
+
secrets: SecretMeta[];
|
|
523
|
+
}>;
|
|
524
|
+
export declare function setSecret(opts: ApiOptions, envId: string, key: string, value: string, comment?: string): Promise<{
|
|
525
|
+
secret: {
|
|
526
|
+
id: string;
|
|
527
|
+
key: string;
|
|
528
|
+
version: number;
|
|
529
|
+
};
|
|
530
|
+
}>;
|
|
531
|
+
export declare function revealSecret(opts: ApiOptions, secretId: string, version?: number): Promise<{
|
|
532
|
+
key: string;
|
|
533
|
+
version: number;
|
|
534
|
+
value: string;
|
|
535
|
+
}>;
|
|
536
|
+
export declare function listSecretVersions(opts: ApiOptions, secretId: string): Promise<{
|
|
537
|
+
current_version: number;
|
|
538
|
+
versions: SecretVersion[];
|
|
539
|
+
}>;
|
|
540
|
+
export declare function rollbackSecret(opts: ApiOptions, secretId: string, version: number): Promise<{
|
|
541
|
+
ok: boolean;
|
|
542
|
+
current_version: number;
|
|
543
|
+
}>;
|
|
544
|
+
export declare function deleteSecret(opts: ApiOptions, secretId: string): Promise<{
|
|
545
|
+
ok: boolean;
|
|
546
|
+
}>;
|
|
547
|
+
export declare function listSecretsTokens(opts: ApiOptions, projectId: string): Promise<{
|
|
548
|
+
tokens: SecretsServiceToken[];
|
|
549
|
+
}>;
|
|
550
|
+
export declare function createSecretsToken(opts: ApiOptions, projectId: string, body: {
|
|
551
|
+
name?: string;
|
|
552
|
+
scope?: 'read' | 'read_write';
|
|
553
|
+
environment_id?: string | null;
|
|
554
|
+
expires_in_days?: number | null;
|
|
555
|
+
}): Promise<{
|
|
556
|
+
token: SecretsServiceToken;
|
|
557
|
+
}>;
|
|
558
|
+
export declare function revokeSecretsToken(opts: ApiOptions, projectId: string, tokenId: string): Promise<{
|
|
559
|
+
ok: boolean;
|
|
560
|
+
}>;
|
|
561
|
+
export type SyncProviderName = 'cloudflare' | 'vercel' | 'railway' | 'github' | 'aws_ssm' | 'dotenv' | 'custom';
|
|
562
|
+
export interface SyncTarget {
|
|
563
|
+
id: string;
|
|
564
|
+
environment_id: string;
|
|
565
|
+
provider: SyncProviderName;
|
|
566
|
+
status: 'active' | 'paused' | 'error';
|
|
567
|
+
last_synced_at: string | null;
|
|
568
|
+
last_error: string | null;
|
|
569
|
+
created_at: string;
|
|
570
|
+
}
|
|
571
|
+
export declare function listSyncTargets(opts: ApiOptions, projectId: string): Promise<{
|
|
572
|
+
targets: SyncTarget[];
|
|
573
|
+
}>;
|
|
574
|
+
export declare function createSyncTarget(opts: ApiOptions, projectId: string, input: {
|
|
575
|
+
environment_id: string;
|
|
576
|
+
provider: SyncProviderName;
|
|
577
|
+
config: unknown;
|
|
578
|
+
}): Promise<{
|
|
579
|
+
target: SyncTarget;
|
|
580
|
+
}>;
|
|
581
|
+
export declare function setSyncTargetStatus(opts: ApiOptions, projectId: string, targetId: string, status: 'active' | 'paused'): Promise<{
|
|
582
|
+
ok: boolean;
|
|
583
|
+
status: string;
|
|
584
|
+
}>;
|
|
585
|
+
export declare function deleteSyncTarget(opts: ApiOptions, projectId: string, targetId: string): Promise<{
|
|
586
|
+
ok: boolean;
|
|
587
|
+
}>;
|
|
588
|
+
export declare function pushSyncTarget(opts: ApiOptions, projectId: string, targetId: string): Promise<unknown>;
|
|
589
|
+
export interface SecretPullResult {
|
|
590
|
+
/** Decrypted key → value map (static secrets only). */
|
|
591
|
+
secrets: Record<string, string>;
|
|
592
|
+
/** Keys declared dynamic — not resolved here; lease them separately. */
|
|
593
|
+
dynamic: string[];
|
|
594
|
+
}
|
|
595
|
+
export declare function pullSecrets(opts: ApiOptions, environmentId?: string): Promise<SecretPullResult>;
|
|
596
|
+
export interface LeaseResult {
|
|
597
|
+
lease_id: string;
|
|
598
|
+
credential: Record<string, string>;
|
|
599
|
+
expires_at: string;
|
|
600
|
+
ttl_seconds: number;
|
|
601
|
+
}
|
|
602
|
+
export declare function leaseSecret(opts: ApiOptions, body: {
|
|
603
|
+
secret_key?: string;
|
|
604
|
+
backend_id?: string;
|
|
605
|
+
ttl_seconds?: number;
|
|
606
|
+
}): Promise<LeaseResult>;
|
|
607
|
+
export declare function revokeLease(opts: ApiOptions, leaseId: string): Promise<{
|
|
608
|
+
ok: boolean;
|
|
609
|
+
already?: string;
|
|
610
|
+
}>;
|
|
611
|
+
export interface ArkSource {
|
|
612
|
+
id: string;
|
|
613
|
+
name: string;
|
|
614
|
+
type: 'postgres' | 'mysql' | 'mongo' | 'clickhouse' | 'meili' | 'redis' | 'object';
|
|
615
|
+
provider: string;
|
|
616
|
+
region: string;
|
|
617
|
+
residency_zone: string;
|
|
618
|
+
managed: boolean;
|
|
619
|
+
status: 'active' | 'paused' | 'error';
|
|
620
|
+
has_dsn: boolean;
|
|
621
|
+
created_at?: string;
|
|
622
|
+
}
|
|
623
|
+
export interface ArkSourceInput {
|
|
624
|
+
name: string;
|
|
625
|
+
type: ArkSource['type'];
|
|
626
|
+
provider: string;
|
|
627
|
+
region?: string;
|
|
628
|
+
residency_zone?: string;
|
|
629
|
+
managed?: boolean;
|
|
630
|
+
dsn?: string;
|
|
631
|
+
}
|
|
632
|
+
export interface ArkTarget {
|
|
633
|
+
id: string;
|
|
634
|
+
name: string;
|
|
635
|
+
provider: 's3' | 'r2' | 'b2' | 'wasabi' | 'gcs' | 'azure' | 'minio' | 'sftp';
|
|
636
|
+
bucket: string;
|
|
637
|
+
region: string;
|
|
638
|
+
residency_zone: string;
|
|
639
|
+
immutable: boolean;
|
|
640
|
+
object_lock_days: number;
|
|
641
|
+
credential_domain: string;
|
|
642
|
+
status: 'active' | 'paused' | 'error';
|
|
643
|
+
has_creds: boolean;
|
|
644
|
+
created_at?: string;
|
|
645
|
+
}
|
|
646
|
+
export interface ArkTargetInput {
|
|
647
|
+
name: string;
|
|
648
|
+
provider: ArkTarget['provider'];
|
|
649
|
+
bucket?: string;
|
|
650
|
+
region?: string;
|
|
651
|
+
residency_zone?: string;
|
|
652
|
+
endpoint?: string;
|
|
653
|
+
immutable?: boolean;
|
|
654
|
+
object_lock_days?: number;
|
|
655
|
+
credential_domain?: string;
|
|
656
|
+
creds?: Record<string, unknown>;
|
|
657
|
+
}
|
|
658
|
+
export interface ArkRetention {
|
|
659
|
+
keepLast: number;
|
|
660
|
+
keepHourly: number;
|
|
661
|
+
keepDaily: number;
|
|
662
|
+
keepWeekly: number;
|
|
663
|
+
keepMonthly: number;
|
|
664
|
+
keepYearly: number;
|
|
665
|
+
}
|
|
666
|
+
export interface ArkPolicy {
|
|
667
|
+
id: string;
|
|
668
|
+
source_id: string;
|
|
669
|
+
name: string;
|
|
670
|
+
schedule_cron: string;
|
|
671
|
+
retention: ArkRetention;
|
|
672
|
+
rpo_slo_sec: number;
|
|
673
|
+
rto_slo_sec: number;
|
|
674
|
+
verify_cadence: string;
|
|
675
|
+
byok: boolean;
|
|
676
|
+
enabled: boolean;
|
|
677
|
+
created_at?: string;
|
|
678
|
+
}
|
|
679
|
+
export interface ArkPolicyInput {
|
|
680
|
+
source_id: string;
|
|
681
|
+
name?: string;
|
|
682
|
+
schedule_cron?: string;
|
|
683
|
+
retention?: ArkRetention;
|
|
684
|
+
rpo_slo_sec?: number;
|
|
685
|
+
rto_slo_sec?: number;
|
|
686
|
+
verify_cadence?: string;
|
|
687
|
+
byok?: boolean;
|
|
688
|
+
}
|
|
689
|
+
export interface ArkBackup {
|
|
690
|
+
id: string;
|
|
691
|
+
source_id: string;
|
|
692
|
+
policy_id?: string | null;
|
|
693
|
+
target_id?: string | null;
|
|
694
|
+
engine: 'restic' | 'kopia' | 'walg' | 'pgbackrest' | 'chbackup';
|
|
695
|
+
status: 'pending' | 'running' | 'succeeded' | 'failed' | 'verifying' | 'verified' | 'pruning' | 'pruned';
|
|
696
|
+
size_bytes: number;
|
|
697
|
+
dedup_ratio: number;
|
|
698
|
+
/** Server re-verified the signed manifest at report time (F4). */
|
|
699
|
+
manifest_verified?: boolean;
|
|
700
|
+
/** Barred as a restore/clone source by a ransomware-canary alarm. */
|
|
701
|
+
quarantined?: boolean;
|
|
702
|
+
snapshot_ref?: string | null;
|
|
703
|
+
consistency_epoch: number;
|
|
704
|
+
started_at?: string | null;
|
|
705
|
+
finished_at?: string | null;
|
|
706
|
+
created_at?: string;
|
|
707
|
+
}
|
|
708
|
+
export interface ArkRestore {
|
|
709
|
+
id: string;
|
|
710
|
+
backup_id: string;
|
|
711
|
+
kind: 'real' | 'verification';
|
|
712
|
+
target_ref?: string | null;
|
|
713
|
+
status: 'pending' | 'running' | 'passed' | 'failed';
|
|
714
|
+
authorized_by?: string | null;
|
|
715
|
+
approval_ref?: string | null;
|
|
716
|
+
rto_observed_sec?: number | null;
|
|
717
|
+
created_at?: string;
|
|
718
|
+
}
|
|
719
|
+
export interface ArkReplica {
|
|
720
|
+
id: string;
|
|
721
|
+
source_id: string;
|
|
722
|
+
provider: string;
|
|
723
|
+
region: string;
|
|
724
|
+
residency_zone: string;
|
|
725
|
+
mode: 'sync' | 'async' | 'logical';
|
|
726
|
+
role: 'primary' | 'replica';
|
|
727
|
+
promotable: boolean;
|
|
728
|
+
lag_bytes: number;
|
|
729
|
+
lag_sec: number;
|
|
730
|
+
health: 'healthy' | 'lagging' | 'down' | 'unknown';
|
|
731
|
+
last_heartbeat?: string | null;
|
|
732
|
+
}
|
|
733
|
+
export interface ArkFailover {
|
|
734
|
+
id: string;
|
|
735
|
+
source_id: string;
|
|
736
|
+
from_node?: string | null;
|
|
737
|
+
to_node?: string | null;
|
|
738
|
+
trigger: 'auto' | 'manual';
|
|
739
|
+
state: 'healthy' | 'suspect' | 'fencing' | 'promoted' | 'reverse_sync' | 'failback' | 'failed';
|
|
740
|
+
fence_status: 'none' | 'pending' | 'fenced' | 'failed';
|
|
741
|
+
approved_by?: string | null;
|
|
742
|
+
reason?: string | null;
|
|
743
|
+
started_at?: string;
|
|
744
|
+
finished_at?: string | null;
|
|
745
|
+
}
|
|
746
|
+
export interface ArkToken {
|
|
747
|
+
id: string;
|
|
748
|
+
name: string;
|
|
749
|
+
scope: 'read' | 'operator' | 'admin';
|
|
750
|
+
can_approve: boolean;
|
|
751
|
+
token_prefix: string;
|
|
752
|
+
last_used_at?: string | null;
|
|
753
|
+
expires_at?: string | null;
|
|
754
|
+
revoked_at?: string | null;
|
|
755
|
+
created_at?: string;
|
|
756
|
+
secret?: string;
|
|
757
|
+
}
|
|
758
|
+
export interface ArkAuditEntry {
|
|
759
|
+
id: number;
|
|
760
|
+
actor_type: string;
|
|
761
|
+
actor_id?: string | null;
|
|
762
|
+
action: string;
|
|
763
|
+
source_id?: string | null;
|
|
764
|
+
target_id?: string | null;
|
|
765
|
+
backup_id?: string | null;
|
|
766
|
+
metadata?: Record<string, unknown>;
|
|
767
|
+
ip?: string | null;
|
|
768
|
+
created_at?: string;
|
|
769
|
+
}
|
|
770
|
+
/** A four-eyes approval envelope carried on dangerous actions. */
|
|
771
|
+
export interface ArkApproval {
|
|
772
|
+
approved_by: string;
|
|
773
|
+
approval_ref: string;
|
|
774
|
+
}
|
|
775
|
+
export declare function listArkSources(opts: ApiOptions): Promise<{
|
|
776
|
+
sources: ArkSource[];
|
|
777
|
+
}>;
|
|
778
|
+
export declare function createArkSource(opts: ApiOptions, body: ArkSourceInput): Promise<{
|
|
779
|
+
source: ArkSource;
|
|
780
|
+
}>;
|
|
781
|
+
export declare function getArkSource(opts: ApiOptions, id: string): Promise<{
|
|
782
|
+
source: ArkSource;
|
|
783
|
+
}>;
|
|
784
|
+
export declare function deleteArkSource(opts: ApiOptions, id: string): Promise<{
|
|
785
|
+
deleted: string;
|
|
786
|
+
}>;
|
|
787
|
+
export declare function listArkTargets(opts: ApiOptions): Promise<{
|
|
788
|
+
targets: ArkTarget[];
|
|
789
|
+
}>;
|
|
790
|
+
export declare function createArkTarget(opts: ApiOptions, body: ArkTargetInput): Promise<{
|
|
791
|
+
target: ArkTarget;
|
|
792
|
+
}>;
|
|
793
|
+
export declare function getArkTarget(opts: ApiOptions, id: string): Promise<{
|
|
794
|
+
target: ArkTarget;
|
|
795
|
+
}>;
|
|
796
|
+
export declare function deleteArkTarget(opts: ApiOptions, id: string): Promise<{
|
|
797
|
+
deleted: string;
|
|
798
|
+
}>;
|
|
799
|
+
export declare function listArkPolicies(opts: ApiOptions, sourceId?: string): Promise<{
|
|
800
|
+
policies: ArkPolicy[];
|
|
801
|
+
}>;
|
|
802
|
+
export declare function createArkPolicy(opts: ApiOptions, body: ArkPolicyInput): Promise<{
|
|
803
|
+
policy: ArkPolicy;
|
|
804
|
+
}>;
|
|
805
|
+
export declare function listArkBackups(opts: ApiOptions, sourceId?: string): Promise<{
|
|
806
|
+
backups: ArkBackup[];
|
|
807
|
+
}>;
|
|
808
|
+
export declare function runArkBackup(opts: ApiOptions, sourceId: string, policyId?: string): Promise<{
|
|
809
|
+
backup: ArkBackup;
|
|
810
|
+
}>;
|
|
811
|
+
export declare function listArkRestores(opts: ApiOptions, backupId?: string): Promise<{
|
|
812
|
+
restores: ArkRestore[];
|
|
813
|
+
}>;
|
|
814
|
+
export declare function startArkRestore(opts: ApiOptions, body: {
|
|
815
|
+
backup_id: string;
|
|
816
|
+
kind: 'real' | 'verification';
|
|
817
|
+
target_source_id?: string;
|
|
818
|
+
} & Partial<ArkApproval>): Promise<{
|
|
819
|
+
restore: ArkRestore;
|
|
820
|
+
}>;
|
|
821
|
+
export declare function getArkFailover(opts: ApiOptions, sourceId: string): Promise<{
|
|
822
|
+
failover: ArkFailover | null;
|
|
823
|
+
replicas: ArkReplica[];
|
|
824
|
+
config: unknown;
|
|
825
|
+
}>;
|
|
826
|
+
export declare function promoteArkFailover(opts: ApiOptions, body: {
|
|
827
|
+
source_id: string;
|
|
828
|
+
to_node?: string;
|
|
829
|
+
} & ArkApproval): Promise<{
|
|
830
|
+
failover: ArkFailover;
|
|
831
|
+
next: unknown;
|
|
832
|
+
note: string;
|
|
833
|
+
}>;
|
|
834
|
+
export declare function failbackArkFailover(opts: ApiOptions, body: {
|
|
835
|
+
source_id: string;
|
|
836
|
+
replica_lag_sec?: number;
|
|
837
|
+
} & ArkApproval): Promise<{
|
|
838
|
+
failover_id: string;
|
|
839
|
+
state: string;
|
|
840
|
+
effects: string[];
|
|
841
|
+
}>;
|
|
842
|
+
export declare function listArkReplicas(opts: ApiOptions): Promise<{
|
|
843
|
+
replicas: ArkReplica[];
|
|
844
|
+
}>;
|
|
845
|
+
export declare function listArkTokens(opts: ApiOptions): Promise<{
|
|
846
|
+
tokens: ArkToken[];
|
|
847
|
+
}>;
|
|
848
|
+
export declare function createArkToken(opts: ApiOptions, body: {
|
|
849
|
+
name?: string;
|
|
850
|
+
scope?: 'read' | 'operator' | 'admin';
|
|
851
|
+
can_approve?: boolean;
|
|
852
|
+
expires_in_days?: number | null;
|
|
853
|
+
}): Promise<{
|
|
854
|
+
token: ArkToken;
|
|
855
|
+
}>;
|
|
856
|
+
export declare function revokeArkToken(opts: ApiOptions, id: string): Promise<{
|
|
857
|
+
revoked: string;
|
|
858
|
+
}>;
|
|
859
|
+
export declare function listArkAudit(opts: ApiOptions, limit?: number): Promise<{
|
|
860
|
+
audit: ArkAuditEntry[];
|
|
861
|
+
}>;
|
|
862
|
+
export interface ArkCanaryReason {
|
|
863
|
+
code: string;
|
|
864
|
+
detail: string;
|
|
865
|
+
}
|
|
866
|
+
export interface ArkCanaryEvent {
|
|
867
|
+
id: string;
|
|
868
|
+
source_id: string;
|
|
869
|
+
backup_id?: string | null;
|
|
870
|
+
verdict: 'watch' | 'alarm';
|
|
871
|
+
severity: 'critical' | 'high' | 'medium' | 'low' | 'info';
|
|
872
|
+
entropy_bpb: number;
|
|
873
|
+
dedup_ratio: number;
|
|
874
|
+
baseline_entropy_bpb: number;
|
|
875
|
+
baseline_dedup_ratio: number;
|
|
876
|
+
baseline_samples: number;
|
|
877
|
+
reasons: ArkCanaryReason[];
|
|
878
|
+
status: 'open' | 'acknowledged' | 'dismissed' | 'confirmed';
|
|
879
|
+
acknowledged_by?: string | null;
|
|
880
|
+
created_at?: string;
|
|
881
|
+
}
|
|
882
|
+
export declare function listArkCanary(opts: ApiOptions): Promise<{
|
|
883
|
+
events: ArkCanaryEvent[];
|
|
884
|
+
}>;
|
|
885
|
+
export declare function ackArkCanary(opts: ApiOptions, id: string, status: 'acknowledged' | 'confirmed' | 'dismissed'): Promise<{
|
|
886
|
+
ok: boolean;
|
|
887
|
+
}>;
|
|
888
|
+
export interface ArkCloneMaskEntry {
|
|
889
|
+
table: string;
|
|
890
|
+
column: string;
|
|
891
|
+
pii: string;
|
|
892
|
+
transform: string;
|
|
893
|
+
}
|
|
894
|
+
export interface ArkClone {
|
|
895
|
+
id: string;
|
|
896
|
+
backup_id: string;
|
|
897
|
+
source_id: string;
|
|
898
|
+
restore_id?: string | null;
|
|
899
|
+
name: string;
|
|
900
|
+
masking_profile: 'standard' | 'strict' | 'none';
|
|
901
|
+
status: 'pending' | 'restoring' | 'masking' | 'ready' | 'expired' | 'failed';
|
|
902
|
+
mask_plan: ArkCloneMaskEntry[];
|
|
903
|
+
columns_masked: number;
|
|
904
|
+
rows_masked: number;
|
|
905
|
+
scratch_ref?: string | null;
|
|
906
|
+
has_connection: boolean;
|
|
907
|
+
expires_at?: string | null;
|
|
908
|
+
requested_by?: string | null;
|
|
909
|
+
error?: string | null;
|
|
910
|
+
created_at?: string;
|
|
911
|
+
}
|
|
912
|
+
export interface ArkCloneInput {
|
|
913
|
+
backup_id: string;
|
|
914
|
+
name?: string;
|
|
915
|
+
masking_profile?: 'standard' | 'strict' | 'none';
|
|
916
|
+
ttl_minutes?: number;
|
|
917
|
+
approved_by?: string;
|
|
918
|
+
approval_ref?: string;
|
|
919
|
+
}
|
|
920
|
+
export declare function listArkClones(opts: ApiOptions): Promise<{
|
|
921
|
+
clones: ArkClone[];
|
|
922
|
+
}>;
|
|
923
|
+
export declare function createArkClone(opts: ApiOptions, body: ArkCloneInput): Promise<{
|
|
924
|
+
clone: ArkClone;
|
|
925
|
+
}>;
|
|
926
|
+
export declare function expireArkClone(opts: ApiOptions, id: string): Promise<{
|
|
927
|
+
ok: boolean;
|
|
928
|
+
}>;
|
|
929
|
+
export interface ForgeRepo {
|
|
930
|
+
id: string;
|
|
931
|
+
name: string;
|
|
932
|
+
slug: string;
|
|
933
|
+
description: string;
|
|
934
|
+
visibility: 'private' | 'internal' | 'public';
|
|
935
|
+
default_branch: string;
|
|
936
|
+
size_bytes: number;
|
|
937
|
+
is_empty: boolean;
|
|
938
|
+
is_mirror: boolean;
|
|
939
|
+
status: 'active' | 'archived' | 'disabled';
|
|
940
|
+
created_at: string;
|
|
941
|
+
updated_at: string;
|
|
942
|
+
}
|
|
943
|
+
export interface ForgeToken {
|
|
944
|
+
id: string;
|
|
945
|
+
name: string;
|
|
946
|
+
scope: 'read' | 'write' | 'admin';
|
|
947
|
+
repo_id: string | null;
|
|
948
|
+
mfa_verified: boolean;
|
|
949
|
+
token_prefix: string;
|
|
950
|
+
last_used_at: string | null;
|
|
951
|
+
expires_at: string | null;
|
|
952
|
+
revoked_at: string | null;
|
|
953
|
+
created_at: string;
|
|
954
|
+
}
|
|
955
|
+
export interface ForgePolicy {
|
|
956
|
+
id: string;
|
|
957
|
+
repo_id: string;
|
|
958
|
+
pattern: string;
|
|
959
|
+
protected: boolean;
|
|
960
|
+
require_signed: boolean;
|
|
961
|
+
require_linear: boolean;
|
|
962
|
+
required_approvals: number;
|
|
963
|
+
required_checks: string[];
|
|
964
|
+
allow_force_push: boolean;
|
|
965
|
+
allow_deletions: boolean;
|
|
966
|
+
require_mfa_to_push: boolean;
|
|
967
|
+
dismiss_stale_reviews: boolean;
|
|
968
|
+
updated_at: string;
|
|
969
|
+
}
|
|
970
|
+
export interface ForgePR {
|
|
971
|
+
id: string;
|
|
972
|
+
number: number;
|
|
973
|
+
title: string;
|
|
974
|
+
body: string;
|
|
975
|
+
source_ref: string;
|
|
976
|
+
target_ref: string;
|
|
977
|
+
source_sha: string | null;
|
|
978
|
+
state: 'open' | 'draft' | 'merged' | 'closed';
|
|
979
|
+
merge_strategy: 'merge' | 'squash' | 'rebase' | null;
|
|
980
|
+
merged_sha: string | null;
|
|
981
|
+
author_id: string | null;
|
|
982
|
+
merged_by: string | null;
|
|
983
|
+
created_at: string;
|
|
984
|
+
updated_at: string;
|
|
985
|
+
merged_at: string | null;
|
|
986
|
+
closed_at: string | null;
|
|
987
|
+
}
|
|
988
|
+
export interface ForgeReview {
|
|
989
|
+
id: string;
|
|
990
|
+
reviewer_id: string | null;
|
|
991
|
+
state: 'pending' | 'approved' | 'changes_requested' | 'commented' | 'dismissed';
|
|
992
|
+
commit_sha: string | null;
|
|
993
|
+
submitted_at: string | null;
|
|
994
|
+
created_at: string;
|
|
995
|
+
}
|
|
996
|
+
export interface ForgeCheck {
|
|
997
|
+
id: string;
|
|
998
|
+
commit_sha: string;
|
|
999
|
+
context: string;
|
|
1000
|
+
state: 'pending' | 'success' | 'failure' | 'error' | 'cancelled';
|
|
1001
|
+
target_url: string | null;
|
|
1002
|
+
description: string;
|
|
1003
|
+
updated_at: string;
|
|
1004
|
+
}
|
|
1005
|
+
export interface ForgeFinding {
|
|
1006
|
+
id: string;
|
|
1007
|
+
repo_id: string;
|
|
1008
|
+
rule: string;
|
|
1009
|
+
file_path: string | null;
|
|
1010
|
+
line: number | null;
|
|
1011
|
+
commit_sha: string | null;
|
|
1012
|
+
ref: string | null;
|
|
1013
|
+
action: 'rejected' | 'allowlisted';
|
|
1014
|
+
allowlisted_by: string | null;
|
|
1015
|
+
allowlist_reason: string | null;
|
|
1016
|
+
created_at: string;
|
|
1017
|
+
}
|
|
1018
|
+
export interface ForgeRefLogEntry {
|
|
1019
|
+
id: number;
|
|
1020
|
+
ref: string;
|
|
1021
|
+
old_oid: string;
|
|
1022
|
+
new_oid: string;
|
|
1023
|
+
operation: 'create' | 'update' | 'force_update' | 'delete';
|
|
1024
|
+
actor_type: 'user' | 'token' | 'system';
|
|
1025
|
+
actor_id: string | null;
|
|
1026
|
+
recoverable_until: string | null;
|
|
1027
|
+
created_at: string;
|
|
1028
|
+
}
|
|
1029
|
+
export interface ForgeCommit {
|
|
1030
|
+
oid: string;
|
|
1031
|
+
short: string;
|
|
1032
|
+
author: string;
|
|
1033
|
+
author_email: string;
|
|
1034
|
+
date: string;
|
|
1035
|
+
subject: string;
|
|
1036
|
+
parents: number;
|
|
1037
|
+
}
|
|
1038
|
+
export interface ForgeRef {
|
|
1039
|
+
name: string;
|
|
1040
|
+
oid: string;
|
|
1041
|
+
target: string;
|
|
1042
|
+
kind: 'branch' | 'tag';
|
|
1043
|
+
}
|
|
1044
|
+
export interface ForgeTreeEntry {
|
|
1045
|
+
name: string;
|
|
1046
|
+
path: string;
|
|
1047
|
+
type: 'blob' | 'tree' | 'commit';
|
|
1048
|
+
mode: string;
|
|
1049
|
+
oid: string;
|
|
1050
|
+
size: number;
|
|
1051
|
+
}
|
|
1052
|
+
export interface ForgeBlob {
|
|
1053
|
+
path: string;
|
|
1054
|
+
oid: string;
|
|
1055
|
+
size: number;
|
|
1056
|
+
binary: boolean;
|
|
1057
|
+
truncated: boolean;
|
|
1058
|
+
content: string;
|
|
1059
|
+
}
|
|
1060
|
+
export interface ForgeCorrelationEntry {
|
|
1061
|
+
commit_sha: string;
|
|
1062
|
+
short: string;
|
|
1063
|
+
subject: string;
|
|
1064
|
+
author: string;
|
|
1065
|
+
date: string;
|
|
1066
|
+
release: {
|
|
1067
|
+
version: string;
|
|
1068
|
+
environment: string;
|
|
1069
|
+
grade: 'A' | 'B' | 'C' | 'D' | 'F' | null;
|
|
1070
|
+
crash_free_pct: number | null;
|
|
1071
|
+
deployed_at: string;
|
|
1072
|
+
project_id: string;
|
|
1073
|
+
};
|
|
1074
|
+
}
|
|
1075
|
+
export interface ForgeAuditEntry {
|
|
1076
|
+
id: number;
|
|
1077
|
+
actor_type: string;
|
|
1078
|
+
actor_id: string | null;
|
|
1079
|
+
action: string;
|
|
1080
|
+
repo_id: string | null;
|
|
1081
|
+
target_ref: string | null;
|
|
1082
|
+
metadata: Record<string, unknown>;
|
|
1083
|
+
ip: string | null;
|
|
1084
|
+
created_at: string;
|
|
1085
|
+
}
|
|
1086
|
+
export interface ForgeDeviceGrant {
|
|
1087
|
+
device_code: string;
|
|
1088
|
+
user_code: string;
|
|
1089
|
+
verification_uri: string;
|
|
1090
|
+
expires_in: number;
|
|
1091
|
+
interval: number;
|
|
1092
|
+
}
|
|
1093
|
+
export declare function forgeDeviceCode(opts: ApiOptions, scope: 'read' | 'write'): Promise<ForgeDeviceGrant>;
|
|
1094
|
+
export type ForgeDevicePoll = {
|
|
1095
|
+
status: 'pending';
|
|
1096
|
+
} | {
|
|
1097
|
+
status: 'slow_down';
|
|
1098
|
+
} | {
|
|
1099
|
+
status: 'expired';
|
|
1100
|
+
} | {
|
|
1101
|
+
status: 'ok';
|
|
1102
|
+
token: string;
|
|
1103
|
+
scope: string;
|
|
1104
|
+
};
|
|
1105
|
+
/** One poll of the device-token endpoint. `authorization_pending` (and a 429
|
|
1106
|
+
* slow_down) are normal mid-flow answers, not errors — so this speaks fetch
|
|
1107
|
+
* directly instead of request(), which throws on any non-2xx. */
|
|
1108
|
+
export declare function forgeDeviceToken(opts: ApiOptions, deviceCode: string): Promise<ForgeDevicePoll>;
|
|
1109
|
+
export declare function listForgeRepos(opts: ApiOptions): Promise<{
|
|
1110
|
+
repos: ForgeRepo[];
|
|
1111
|
+
}>;
|
|
1112
|
+
export declare function createForgeRepo(opts: ApiOptions, body: {
|
|
1113
|
+
name: string;
|
|
1114
|
+
slug?: string;
|
|
1115
|
+
description?: string;
|
|
1116
|
+
visibility?: ForgeRepo['visibility'];
|
|
1117
|
+
default_branch?: string;
|
|
1118
|
+
}): Promise<{
|
|
1119
|
+
repo: ForgeRepo;
|
|
1120
|
+
}>;
|
|
1121
|
+
export declare function getForgeRepo(opts: ApiOptions, repo: string): Promise<{
|
|
1122
|
+
repo: ForgeRepo;
|
|
1123
|
+
}>;
|
|
1124
|
+
export declare function deleteForgeRepo(opts: ApiOptions, repo: string): Promise<{
|
|
1125
|
+
deleted: string;
|
|
1126
|
+
}>;
|
|
1127
|
+
export declare function forgeTree(opts: ApiOptions, repo: string, rev?: string, path?: string): Promise<{
|
|
1128
|
+
entries: ForgeTreeEntry[];
|
|
1129
|
+
}>;
|
|
1130
|
+
export declare function forgeBlob(opts: ApiOptions, repo: string, path: string, rev?: string): Promise<{
|
|
1131
|
+
blob: ForgeBlob;
|
|
1132
|
+
}>;
|
|
1133
|
+
export declare function forgeCommits(opts: ApiOptions, repo: string, rev?: string, limit?: number): Promise<{
|
|
1134
|
+
commits: ForgeCommit[];
|
|
1135
|
+
}>;
|
|
1136
|
+
export declare function forgeRefs(opts: ApiOptions, repo: string): Promise<{
|
|
1137
|
+
refs: ForgeRef[];
|
|
1138
|
+
}>;
|
|
1139
|
+
export declare function forgeBlame(opts: ApiOptions, repo: string, path: string, rev?: string): Promise<{
|
|
1140
|
+
blame: unknown[];
|
|
1141
|
+
}>;
|
|
1142
|
+
export declare function listForgePolicies(opts: ApiOptions, repo: string): Promise<{
|
|
1143
|
+
policies: ForgePolicy[];
|
|
1144
|
+
}>;
|
|
1145
|
+
export declare function putForgePolicy(opts: ApiOptions, repo: string, body: Record<string, unknown>): Promise<{
|
|
1146
|
+
policy: ForgePolicy;
|
|
1147
|
+
}>;
|
|
1148
|
+
export declare function listForgeReflog(opts: ApiOptions, repo: string, limit?: number): Promise<{
|
|
1149
|
+
reflog: ForgeRefLogEntry[];
|
|
1150
|
+
}>;
|
|
1151
|
+
export declare function recoverForgeRef(opts: ApiOptions, repo: string, id: string): Promise<{
|
|
1152
|
+
recovered: {
|
|
1153
|
+
ref: string;
|
|
1154
|
+
oid: string;
|
|
1155
|
+
};
|
|
1156
|
+
}>;
|
|
1157
|
+
export declare function listForgeFindings(opts: ApiOptions, repo: string, limit?: number): Promise<{
|
|
1158
|
+
findings: ForgeFinding[];
|
|
1159
|
+
}>;
|
|
1160
|
+
export declare function allowlistForgeFinding(opts: ApiOptions, repo: string, id: string, reason: string): Promise<{
|
|
1161
|
+
finding: ForgeFinding;
|
|
1162
|
+
}>;
|
|
1163
|
+
export declare function listForgePulls(opts: ApiOptions, repo: string, state?: string): Promise<{
|
|
1164
|
+
pulls: ForgePR[];
|
|
1165
|
+
}>;
|
|
1166
|
+
export declare function createForgePull(opts: ApiOptions, repo: string, body: {
|
|
1167
|
+
title: string;
|
|
1168
|
+
body?: string;
|
|
1169
|
+
source_ref: string;
|
|
1170
|
+
target_ref?: string;
|
|
1171
|
+
draft?: boolean;
|
|
1172
|
+
}): Promise<{
|
|
1173
|
+
pull: ForgePR;
|
|
1174
|
+
}>;
|
|
1175
|
+
export declare function getForgePull(opts: ApiOptions, repo: string, number: number): Promise<{
|
|
1176
|
+
pull: ForgePR;
|
|
1177
|
+
reviews: ForgeReview[];
|
|
1178
|
+
}>;
|
|
1179
|
+
export declare function mergeForgePull(opts: ApiOptions, repo: string, number: number, body: {
|
|
1180
|
+
strategy?: 'merge' | 'squash' | 'rebase';
|
|
1181
|
+
message?: string;
|
|
1182
|
+
}): Promise<{
|
|
1183
|
+
pull: ForgePR;
|
|
1184
|
+
merged_sha: string;
|
|
1185
|
+
}>;
|
|
1186
|
+
export declare function reviewForgePull(opts: ApiOptions, repo: string, number: number, body: {
|
|
1187
|
+
state: 'approved' | 'changes_requested' | 'commented';
|
|
1188
|
+
body?: string;
|
|
1189
|
+
}): Promise<{
|
|
1190
|
+
review: ForgeReview;
|
|
1191
|
+
}>;
|
|
1192
|
+
export declare function listForgeChecks(opts: ApiOptions, repo: string, sha?: string): Promise<{
|
|
1193
|
+
checks: ForgeCheck[];
|
|
1194
|
+
}>;
|
|
1195
|
+
export declare function reportForgeCheck(opts: ApiOptions, repo: string, body: {
|
|
1196
|
+
commit_sha: string;
|
|
1197
|
+
context: string;
|
|
1198
|
+
state: string;
|
|
1199
|
+
target_url?: string;
|
|
1200
|
+
description?: string;
|
|
1201
|
+
}): Promise<{
|
|
1202
|
+
check: ForgeCheck;
|
|
1203
|
+
}>;
|
|
1204
|
+
export interface ForgeCiJob {
|
|
1205
|
+
id: string;
|
|
1206
|
+
repo_id: string;
|
|
1207
|
+
pr_id: string | null;
|
|
1208
|
+
sha: string;
|
|
1209
|
+
ref: string;
|
|
1210
|
+
workflow: string;
|
|
1211
|
+
trigger: 'push' | 'pull_request' | 'manual';
|
|
1212
|
+
status: 'queued' | 'running' | 'success' | 'failure' | 'error' | 'cancelled' | 'timed_out';
|
|
1213
|
+
runner_id: string | null;
|
|
1214
|
+
runner_name?: string | null;
|
|
1215
|
+
log_bytes: number;
|
|
1216
|
+
log_truncated: boolean;
|
|
1217
|
+
failure_reason: string | null;
|
|
1218
|
+
created_by: string | null;
|
|
1219
|
+
started_at: string | null;
|
|
1220
|
+
finished_at: string | null;
|
|
1221
|
+
created_at: string;
|
|
1222
|
+
}
|
|
1223
|
+
export interface ForgeCiJobDetail extends ForgeCiJob {
|
|
1224
|
+
config: {
|
|
1225
|
+
image?: string;
|
|
1226
|
+
steps?: string[];
|
|
1227
|
+
timeout?: number;
|
|
1228
|
+
env?: Record<string, string>;
|
|
1229
|
+
};
|
|
1230
|
+
log: string;
|
|
1231
|
+
}
|
|
1232
|
+
export declare function listForgeCiJobs(opts: ApiOptions, repo: string, status?: string, workflow?: string, limit?: number): Promise<{
|
|
1233
|
+
jobs: ForgeCiJob[];
|
|
1234
|
+
next_cursor: string | null;
|
|
1235
|
+
}>;
|
|
1236
|
+
export declare function getForgeCiJob(opts: ApiOptions, repo: string, id: string): Promise<{
|
|
1237
|
+
job: ForgeCiJobDetail;
|
|
1238
|
+
}>;
|
|
1239
|
+
export declare function runForgeCi(opts: ApiOptions, repo: string, sha?: string, ref?: string): Promise<{
|
|
1240
|
+
enqueued: number;
|
|
1241
|
+
sha: string;
|
|
1242
|
+
ref: string;
|
|
1243
|
+
config_missing?: boolean;
|
|
1244
|
+
config_error?: string;
|
|
1245
|
+
}>;
|
|
1246
|
+
export declare function forgeCorrelation(opts: ApiOptions, repo: string, rev?: string): Promise<{
|
|
1247
|
+
granularity: string;
|
|
1248
|
+
shipped: number;
|
|
1249
|
+
commits_scanned: number;
|
|
1250
|
+
correlation: ForgeCorrelationEntry[];
|
|
1251
|
+
}>;
|
|
1252
|
+
export declare function listForgeTokens(opts: ApiOptions): Promise<{
|
|
1253
|
+
tokens: ForgeToken[];
|
|
1254
|
+
}>;
|
|
1255
|
+
export declare function createForgeToken(opts: ApiOptions, body: {
|
|
1256
|
+
name?: string;
|
|
1257
|
+
scope?: 'read' | 'write' | 'admin';
|
|
1258
|
+
repo?: string;
|
|
1259
|
+
expires_in_days?: number | null;
|
|
1260
|
+
}): Promise<{
|
|
1261
|
+
token: ForgeToken & {
|
|
1262
|
+
secret: string;
|
|
1263
|
+
};
|
|
1264
|
+
}>;
|
|
1265
|
+
export declare function revokeForgeToken(opts: ApiOptions, id: string): Promise<{
|
|
1266
|
+
revoked: string;
|
|
1267
|
+
}>;
|
|
1268
|
+
export declare function listForgeAudit(opts: ApiOptions, limit?: number): Promise<{
|
|
1269
|
+
audit: ForgeAuditEntry[];
|
|
1270
|
+
}>;
|
|
1271
|
+
export interface ForgeAiPolicy {
|
|
1272
|
+
repo_id: string | null;
|
|
1273
|
+
allow_egress: boolean;
|
|
1274
|
+
sensitive: boolean;
|
|
1275
|
+
redact_secrets: boolean;
|
|
1276
|
+
allowed_providers: string[];
|
|
1277
|
+
max_context_bytes: number;
|
|
1278
|
+
default?: boolean;
|
|
1279
|
+
}
|
|
1280
|
+
export interface ForgeKey {
|
|
1281
|
+
id: string;
|
|
1282
|
+
name: string;
|
|
1283
|
+
kind: 'ssh_public' | 'deploy_token';
|
|
1284
|
+
scope: 'read' | 'write';
|
|
1285
|
+
fingerprint: string | null;
|
|
1286
|
+
expires_at: string | null;
|
|
1287
|
+
last_used_at: string | null;
|
|
1288
|
+
revoked_at: string | null;
|
|
1289
|
+
created_at: string;
|
|
1290
|
+
repo_id?: string | null;
|
|
1291
|
+
}
|
|
1292
|
+
export declare function getForgeAiPolicy(opts: ApiOptions, repo: string): Promise<{
|
|
1293
|
+
policy: ForgeAiPolicy;
|
|
1294
|
+
}>;
|
|
1295
|
+
export declare function putForgeAiPolicy(opts: ApiOptions, repo: string, body: Record<string, unknown>): Promise<{
|
|
1296
|
+
policy: ForgeAiPolicy;
|
|
1297
|
+
}>;
|
|
1298
|
+
export declare function listForgeEgress(opts: ApiOptions, limit?: number): Promise<{
|
|
1299
|
+
egress: Array<Record<string, unknown>>;
|
|
1300
|
+
}>;
|
|
1301
|
+
export declare function setForgeMirror(opts: ApiOptions, repo: string, body: {
|
|
1302
|
+
url: string;
|
|
1303
|
+
direction?: 'pull' | 'push';
|
|
1304
|
+
}): Promise<{
|
|
1305
|
+
ok: boolean;
|
|
1306
|
+
}>;
|
|
1307
|
+
export declare function removeForgeMirror(opts: ApiOptions, repo: string): Promise<{
|
|
1308
|
+
ok: boolean;
|
|
1309
|
+
}>;
|
|
1310
|
+
export declare function listForgeKeys(opts: ApiOptions, repo: string): Promise<{
|
|
1311
|
+
keys: ForgeKey[];
|
|
1312
|
+
}>;
|
|
1313
|
+
export declare function addForgeKey(opts: ApiOptions, repo: string, body: {
|
|
1314
|
+
name: string;
|
|
1315
|
+
public_key: string;
|
|
1316
|
+
scope?: 'read' | 'write';
|
|
1317
|
+
expires_in_days?: number;
|
|
1318
|
+
}): Promise<{
|
|
1319
|
+
key: ForgeKey;
|
|
1320
|
+
}>;
|
|
1321
|
+
export declare function revokeForgeKey(opts: ApiOptions, repo: string, keyId: string): Promise<{
|
|
1322
|
+
revoked: string;
|
|
1323
|
+
}>;
|
|
1324
|
+
export declare function getForgeCodeowners(opts: ApiOptions, repo: string, rev?: string): Promise<{
|
|
1325
|
+
configured: boolean;
|
|
1326
|
+
source?: string;
|
|
1327
|
+
rules: Array<{
|
|
1328
|
+
pattern: string;
|
|
1329
|
+
owners: string[];
|
|
1330
|
+
}>;
|
|
1331
|
+
}>;
|
|
1332
|
+
export interface ForgeIssue {
|
|
1333
|
+
id: string;
|
|
1334
|
+
number: number;
|
|
1335
|
+
title: string;
|
|
1336
|
+
body?: string;
|
|
1337
|
+
state: 'open' | 'closed';
|
|
1338
|
+
author_id: string | null;
|
|
1339
|
+
assignee_id: string | null;
|
|
1340
|
+
labels: string[];
|
|
1341
|
+
comment_count: number;
|
|
1342
|
+
created_at: string;
|
|
1343
|
+
updated_at: string;
|
|
1344
|
+
closed_at?: string | null;
|
|
1345
|
+
closed_by?: string | null;
|
|
1346
|
+
}
|
|
1347
|
+
export interface ForgeIssueComment {
|
|
1348
|
+
id: string;
|
|
1349
|
+
author_id: string | null;
|
|
1350
|
+
body: string;
|
|
1351
|
+
created_at: string;
|
|
1352
|
+
}
|
|
1353
|
+
export interface ForgeLabel {
|
|
1354
|
+
id: string;
|
|
1355
|
+
name: string;
|
|
1356
|
+
color: string;
|
|
1357
|
+
description: string;
|
|
1358
|
+
}
|
|
1359
|
+
export interface ForgeCollaborator {
|
|
1360
|
+
id: string;
|
|
1361
|
+
user_id: string;
|
|
1362
|
+
role: 'read' | 'triage' | 'write' | 'admin';
|
|
1363
|
+
added_by: string | null;
|
|
1364
|
+
created_at: string;
|
|
1365
|
+
}
|
|
1366
|
+
export interface ForgeReviewComment {
|
|
1367
|
+
id: string;
|
|
1368
|
+
author_id: string | null;
|
|
1369
|
+
file_path: string | null;
|
|
1370
|
+
line: number | null;
|
|
1371
|
+
commit_sha: string | null;
|
|
1372
|
+
body: string;
|
|
1373
|
+
resolved: boolean;
|
|
1374
|
+
outdated: boolean;
|
|
1375
|
+
created_at: string;
|
|
1376
|
+
}
|
|
1377
|
+
export interface ForgeDiff {
|
|
1378
|
+
base: string;
|
|
1379
|
+
head: string;
|
|
1380
|
+
files: Array<{
|
|
1381
|
+
path: string;
|
|
1382
|
+
status?: string;
|
|
1383
|
+
}>;
|
|
1384
|
+
}
|
|
1385
|
+
export declare function listForgeIssues(opts: ApiOptions, repo: string, params?: {
|
|
1386
|
+
state?: string;
|
|
1387
|
+
label?: string;
|
|
1388
|
+
}): Promise<{
|
|
1389
|
+
issues: ForgeIssue[];
|
|
1390
|
+
}>;
|
|
1391
|
+
export declare function createForgeIssue(opts: ApiOptions, repo: string, body: {
|
|
1392
|
+
title: string;
|
|
1393
|
+
body?: string;
|
|
1394
|
+
labels?: string[];
|
|
1395
|
+
assignee_id?: string;
|
|
1396
|
+
}): Promise<{
|
|
1397
|
+
issue: ForgeIssue;
|
|
1398
|
+
}>;
|
|
1399
|
+
export declare function getForgeIssue(opts: ApiOptions, repo: string, number: number): Promise<{
|
|
1400
|
+
issue: ForgeIssue;
|
|
1401
|
+
comments: ForgeIssueComment[];
|
|
1402
|
+
}>;
|
|
1403
|
+
export declare function updateForgeIssue(opts: ApiOptions, repo: string, number: number, body: {
|
|
1404
|
+
state?: 'open' | 'closed';
|
|
1405
|
+
title?: string;
|
|
1406
|
+
body?: string;
|
|
1407
|
+
labels?: string[];
|
|
1408
|
+
assignee_id?: string | null;
|
|
1409
|
+
}): Promise<{
|
|
1410
|
+
issue: ForgeIssue;
|
|
1411
|
+
}>;
|
|
1412
|
+
export declare function commentForgeIssue(opts: ApiOptions, repo: string, number: number, body: string): Promise<{
|
|
1413
|
+
comment: ForgeIssueComment;
|
|
1414
|
+
}>;
|
|
1415
|
+
export declare function listForgeLabels(opts: ApiOptions, repo: string): Promise<{
|
|
1416
|
+
labels: ForgeLabel[];
|
|
1417
|
+
}>;
|
|
1418
|
+
export declare function createForgeLabel(opts: ApiOptions, repo: string, body: {
|
|
1419
|
+
name: string;
|
|
1420
|
+
color?: string;
|
|
1421
|
+
description?: string;
|
|
1422
|
+
}): Promise<{
|
|
1423
|
+
label: ForgeLabel;
|
|
1424
|
+
}>;
|
|
1425
|
+
export declare function listForgeCollaborators(opts: ApiOptions, repo: string): Promise<{
|
|
1426
|
+
collaborators: ForgeCollaborator[];
|
|
1427
|
+
}>;
|
|
1428
|
+
export declare function addForgeCollaborator(opts: ApiOptions, repo: string, body: {
|
|
1429
|
+
user_id: string;
|
|
1430
|
+
role?: 'read' | 'triage' | 'write' | 'admin';
|
|
1431
|
+
}): Promise<{
|
|
1432
|
+
collaborator: ForgeCollaborator;
|
|
1433
|
+
}>;
|
|
1434
|
+
export declare function removeForgeCollaborator(opts: ApiOptions, repo: string, id: string): Promise<{
|
|
1435
|
+
removed: string;
|
|
1436
|
+
}>;
|
|
1437
|
+
export declare function updateForgePull(opts: ApiOptions, repo: string, number: number, body: {
|
|
1438
|
+
state?: 'open' | 'closed';
|
|
1439
|
+
title?: string;
|
|
1440
|
+
body?: string;
|
|
1441
|
+
}): Promise<{
|
|
1442
|
+
pull: ForgePR;
|
|
1443
|
+
}>;
|
|
1444
|
+
export declare function listForgePullComments(opts: ApiOptions, repo: string, number: number): Promise<{
|
|
1445
|
+
comments: ForgeReviewComment[];
|
|
1446
|
+
}>;
|
|
1447
|
+
export declare function commentForgePull(opts: ApiOptions, repo: string, number: number, body: {
|
|
1448
|
+
body: string;
|
|
1449
|
+
file_path?: string;
|
|
1450
|
+
line?: number;
|
|
1451
|
+
commit_sha?: string;
|
|
1452
|
+
}): Promise<{
|
|
1453
|
+
comment: ForgeReviewComment;
|
|
1454
|
+
}>;
|
|
1455
|
+
export declare function forgePullDiff(opts: ApiOptions, repo: string, number: number): Promise<ForgeDiff>;
|
|
1456
|
+
export declare function forgeCompare(opts: ApiOptions, repo: string, base: string, head: string): Promise<ForgeDiff>;
|
|
1457
|
+
export interface ForgeSearchMatch {
|
|
1458
|
+
path: string;
|
|
1459
|
+
line: number;
|
|
1460
|
+
text: string;
|
|
1461
|
+
}
|
|
1462
|
+
export declare function forgeSearch(opts: ApiOptions, repo: string, q: string, rev?: string, limit?: number): Promise<{
|
|
1463
|
+
query: string;
|
|
1464
|
+
rev: string;
|
|
1465
|
+
matches: ForgeSearchMatch[];
|
|
1466
|
+
}>;
|
|
1467
|
+
export interface ForgeEnvironment {
|
|
1468
|
+
id: string;
|
|
1469
|
+
name: string;
|
|
1470
|
+
production: boolean;
|
|
1471
|
+
url: string;
|
|
1472
|
+
required_approvals: number;
|
|
1473
|
+
}
|
|
1474
|
+
export interface ForgeDeployment {
|
|
1475
|
+
id: string;
|
|
1476
|
+
environment: string;
|
|
1477
|
+
ref: string;
|
|
1478
|
+
sha: string | null;
|
|
1479
|
+
state: string;
|
|
1480
|
+
url: string;
|
|
1481
|
+
description: string;
|
|
1482
|
+
pr_number: number | null;
|
|
1483
|
+
created_at: string;
|
|
1484
|
+
}
|
|
1485
|
+
export interface ForgeReleaseAsset {
|
|
1486
|
+
id: string;
|
|
1487
|
+
name: string;
|
|
1488
|
+
platform: string;
|
|
1489
|
+
arch: string;
|
|
1490
|
+
size_bytes: number;
|
|
1491
|
+
url: string | null;
|
|
1492
|
+
sha256: string | null;
|
|
1493
|
+
}
|
|
1494
|
+
export interface ForgeRelease {
|
|
1495
|
+
id: string;
|
|
1496
|
+
tag: string;
|
|
1497
|
+
name: string;
|
|
1498
|
+
body: string;
|
|
1499
|
+
prerelease: boolean;
|
|
1500
|
+
draft: boolean;
|
|
1501
|
+
published_at: string | null;
|
|
1502
|
+
created_at: string;
|
|
1503
|
+
assets: ForgeReleaseAsset[];
|
|
1504
|
+
}
|
|
1505
|
+
export interface ForgeWebhook {
|
|
1506
|
+
id: string;
|
|
1507
|
+
repo_id: string | null;
|
|
1508
|
+
url: string;
|
|
1509
|
+
events: string[];
|
|
1510
|
+
active: boolean;
|
|
1511
|
+
created_at: string;
|
|
1512
|
+
}
|
|
1513
|
+
export interface ForgeWebhookDelivery {
|
|
1514
|
+
id: number;
|
|
1515
|
+
event: string;
|
|
1516
|
+
status_code: number;
|
|
1517
|
+
success: boolean;
|
|
1518
|
+
duration_ms: number;
|
|
1519
|
+
error: string | null;
|
|
1520
|
+
created_at: string;
|
|
1521
|
+
}
|
|
1522
|
+
export declare function forgeEnvironments(opts: ApiOptions, repo: string): Promise<{
|
|
1523
|
+
environments: ForgeEnvironment[];
|
|
1524
|
+
}>;
|
|
1525
|
+
export declare function forgeSetEnvironment(opts: ApiOptions, repo: string, body: Record<string, unknown>): Promise<{
|
|
1526
|
+
environment: ForgeEnvironment;
|
|
1527
|
+
}>;
|
|
1528
|
+
export declare function forgeDeployments(opts: ApiOptions, repo: string, environment?: string): Promise<{
|
|
1529
|
+
deployments: ForgeDeployment[];
|
|
1530
|
+
}>;
|
|
1531
|
+
export declare function forgeCreateDeployment(opts: ApiOptions, repo: string, body: Record<string, unknown>): Promise<{
|
|
1532
|
+
deployment: ForgeDeployment;
|
|
1533
|
+
}>;
|
|
1534
|
+
export declare function forgeUpdateDeployment(opts: ApiOptions, repo: string, id: string, body: Record<string, unknown>): Promise<{
|
|
1535
|
+
deployment: ForgeDeployment;
|
|
1536
|
+
}>;
|
|
1537
|
+
export declare function forgeReleases(opts: ApiOptions, repo: string): Promise<{
|
|
1538
|
+
releases: ForgeRelease[];
|
|
1539
|
+
}>;
|
|
1540
|
+
export declare function forgeGetRelease(opts: ApiOptions, repo: string, tag: string): Promise<{
|
|
1541
|
+
release: ForgeRelease;
|
|
1542
|
+
assets: ForgeReleaseAsset[];
|
|
1543
|
+
}>;
|
|
1544
|
+
export declare function forgeCreateRelease(opts: ApiOptions, repo: string, body: Record<string, unknown>): Promise<{
|
|
1545
|
+
release: ForgeRelease;
|
|
1546
|
+
}>;
|
|
1547
|
+
export declare function forgeDeleteRelease(opts: ApiOptions, repo: string, tag: string): Promise<unknown>;
|
|
1548
|
+
export declare function forgeAddAsset(opts: ApiOptions, repo: string, tag: string, body: Record<string, unknown>): Promise<{
|
|
1549
|
+
asset: ForgeReleaseAsset;
|
|
1550
|
+
}>;
|
|
1551
|
+
export declare function forgeRemoveAsset(opts: ApiOptions, repo: string, tag: string, id: string): Promise<unknown>;
|
|
1552
|
+
export declare function forgeWebhooks(opts: ApiOptions): Promise<{
|
|
1553
|
+
webhooks: ForgeWebhook[];
|
|
1554
|
+
}>;
|
|
1555
|
+
export declare function forgeCreateWebhook(opts: ApiOptions, body: Record<string, unknown>): Promise<{
|
|
1556
|
+
webhook: ForgeWebhook;
|
|
1557
|
+
}>;
|
|
1558
|
+
export declare function forgeDeleteWebhook(opts: ApiOptions, id: string): Promise<unknown>;
|
|
1559
|
+
export declare function forgePingWebhook(opts: ApiOptions, id: string): Promise<{
|
|
1560
|
+
delivery: ForgeWebhookDelivery;
|
|
1561
|
+
}>;
|
|
1562
|
+
export declare function forgeWebhookDeliveries(opts: ApiOptions, id: string): Promise<{
|
|
1563
|
+
deliveries: ForgeWebhookDelivery[];
|
|
1564
|
+
}>;
|
|
1565
|
+
export declare function listForgeAccountKeys(opts: ApiOptions): Promise<{
|
|
1566
|
+
keys: ForgeKey[];
|
|
1567
|
+
}>;
|
|
1568
|
+
export declare function addForgeAccountKey(opts: ApiOptions, body: {
|
|
1569
|
+
name: string;
|
|
1570
|
+
public_key: string;
|
|
1571
|
+
scope?: 'read' | 'write';
|
|
1572
|
+
expires_in_days?: number;
|
|
1573
|
+
}): Promise<{
|
|
1574
|
+
key: ForgeKey;
|
|
1575
|
+
}>;
|
|
1576
|
+
export declare function revokeForgeAccountKey(opts: ApiOptions, id: string): Promise<{
|
|
1577
|
+
revoked: string;
|
|
1578
|
+
}>;
|
|
1579
|
+
//# sourceMappingURL=api.d.ts.map
|