@runlot/api 0.1.0-rc.15 → 0.1.0-rc.151
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +857 -117
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +959 -118
- package/dist/index.js.map +1 -1
- package/dist/schema.d.ts +12680 -2777
- package/dist/schema.d.ts.map +1 -1
- package/package.json +5 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import type { components, operations } from "./schema.js";
|
|
2
2
|
export type { components, paths, operations } from "./schema.js";
|
|
3
3
|
export declare const API_VERSION: "v1";
|
|
4
|
+
/** The shared query for browsing. Empty values are not carried — the server reads "empty means default". */
|
|
5
|
+
/** base64url of the UTF-8 JSON, no padding — the `draft` parameter's encoding. */
|
|
6
|
+
export declare function base64urlJson(v: unknown): string;
|
|
4
7
|
type Schemas = components["schemas"];
|
|
5
8
|
/**
|
|
6
|
-
*
|
|
9
|
+
* The success response body of an operation.
|
|
7
10
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
11
|
+
* We do not write the method return types by hand because a hand-written type
|
|
12
|
+
* still compiles after the spec changes — and that drift shows up at runtime as
|
|
13
|
+
* `undefined`.
|
|
10
14
|
*/
|
|
11
15
|
type Ok<K extends keyof operations> = operations[K]["responses"] extends {
|
|
12
16
|
200: {
|
|
@@ -29,12 +33,46 @@ type Ok<K extends keyof operations> = operations[K]["responses"] extends {
|
|
|
29
33
|
} ? B : never;
|
|
30
34
|
export type Session = Schemas["Session"];
|
|
31
35
|
export type User = Schemas["User"];
|
|
36
|
+
export type AuthEmailAccepted = Schemas["AuthEmailAccepted"];
|
|
37
|
+
export type TotpStatus = Schemas["TotpStatus"];
|
|
38
|
+
export type TotpEnrollment = Schemas["TotpEnrollment"];
|
|
32
39
|
export type Org = Schemas["Org"];
|
|
33
40
|
export type Project = Schemas["Project"];
|
|
34
41
|
export type ProjectDetail = Schemas["ProjectDetail"];
|
|
35
42
|
export type Placement = Schemas["Placement"];
|
|
36
43
|
export type Deployment = Schemas["Deployment"];
|
|
44
|
+
export type Preview = Schemas["Preview"];
|
|
45
|
+
export type PreviewState = NonNullable<Preview["state"]>;
|
|
46
|
+
export type PreviewDbMode = NonNullable<Preview["dbMode"]>;
|
|
47
|
+
/**
|
|
48
|
+
* What `createDeployment` answers to a `?preview=` upload.
|
|
49
|
+
*
|
|
50
|
+
* The extra field is written here rather than in the 201 response schema because
|
|
51
|
+
* the schema is `Deployment` — shared with `listDeployments`, `rollback` and the
|
|
52
|
+
* overview, none of which have a preview to report. Widening it there would put an
|
|
53
|
+
* optional `preview` on every deployment a reader ever sees, which reads as "a
|
|
54
|
+
* deployment may belong to a preview" instead of "this one call returns the
|
|
55
|
+
* preview it just made". `proto/openapi.yaml` `createDeployment` says the same
|
|
56
|
+
* thing in prose.
|
|
57
|
+
*/
|
|
58
|
+
export type DeployedPreview = Deployment & {
|
|
59
|
+
preview?: Preview;
|
|
60
|
+
};
|
|
61
|
+
export type ProjectOverview = Schemas["ProjectOverview"];
|
|
62
|
+
export type OverviewDeployment = Schemas["OverviewDeployment"];
|
|
37
63
|
export type Manifest = Schemas["Manifest"];
|
|
64
|
+
export type CronOverview = Schemas["CronOverview"];
|
|
65
|
+
export type CronSchedule = Schemas["CronSchedule"];
|
|
66
|
+
export type CronRun = Schemas["CronRun"];
|
|
67
|
+
export type CronSummary = Schemas["CronSummary"];
|
|
68
|
+
export type QueueOverview = Schemas["QueueOverview"];
|
|
69
|
+
export type QueueStatus = Schemas["QueueStatus"];
|
|
70
|
+
export type QueueRun = Schemas["QueueRun"];
|
|
71
|
+
export type QueueDepth = Schemas["QueueDepth"];
|
|
72
|
+
export type QueueMessage = Schemas["QueueMessage"];
|
|
73
|
+
export type DurableObjectUsage = Schemas["DurableObjectUsage"];
|
|
74
|
+
export type VectorOverview = Schemas["VectorOverview"];
|
|
75
|
+
export type VectorNamespace = Schemas["VectorNamespace"];
|
|
38
76
|
export type DatabaseConnect = Schemas["DatabaseConnect"];
|
|
39
77
|
export type DatabaseEndpoint = Schemas["DatabaseEndpoint"];
|
|
40
78
|
export type DatabaseToken = Schemas["DatabaseToken"];
|
|
@@ -47,35 +85,188 @@ export type GenerationRow = Schemas["GenerationRow"];
|
|
|
47
85
|
export type OperationStarted = Schemas["OperationStarted"];
|
|
48
86
|
export type Operation = Schemas["Operation"];
|
|
49
87
|
export type ErrorEnvelope = Schemas["Error"];
|
|
88
|
+
export type License = Schemas["License"];
|
|
89
|
+
export type LicenseState = License["state"];
|
|
50
90
|
export type Role = Schemas["Role"];
|
|
51
91
|
export type Member = Schemas["Member"];
|
|
92
|
+
export type Invite = Schemas["Invite"];
|
|
93
|
+
export type OrgHolding = Schemas["OrgHolding"];
|
|
94
|
+
export type InviteView = Schemas["InviteView"];
|
|
95
|
+
export type InviteState = Schemas["InviteState"];
|
|
52
96
|
export type SecretMeta = Schemas["SecretMeta"];
|
|
53
97
|
export type SecretList = Schemas["SecretList"];
|
|
54
98
|
export type LogEvent = Schemas["LogEvent"];
|
|
99
|
+
export type LogHistoryLine = {
|
|
100
|
+
ts: string;
|
|
101
|
+
seq: number;
|
|
102
|
+
epoch?: number;
|
|
103
|
+
generation?: number;
|
|
104
|
+
stream: "stdout" | "stderr" | "runlot";
|
|
105
|
+
line: string;
|
|
106
|
+
};
|
|
107
|
+
export type LogHistoryPage = {
|
|
108
|
+
lines: LogHistoryLine[];
|
|
109
|
+
/** Absent means there is nothing older. */
|
|
110
|
+
cursor?: string | undefined;
|
|
111
|
+
keepDays: number;
|
|
112
|
+
linesPerDay: number;
|
|
113
|
+
};
|
|
55
114
|
export type Usage = Schemas["Usage"];
|
|
115
|
+
export type ExecuteResult = Schemas["ExecuteResult"];
|
|
56
116
|
export type StorageStatus = Schemas["StorageStatus"];
|
|
117
|
+
export type BillingStatus = Schemas["BillingStatus"];
|
|
118
|
+
export type PlanLimits = Schemas["PlanLimits"];
|
|
119
|
+
export type EmailStatus = Schemas["EmailStatus"];
|
|
120
|
+
export type EmailDomain = Schemas["EmailDomain"];
|
|
121
|
+
export type EmailDNSRecord = Schemas["EmailDNSRecord"];
|
|
122
|
+
export type EmailDomainState = NonNullable<EmailDomain["state"]>;
|
|
123
|
+
export type MailLogEntry = Schemas["MailLogEntry"];
|
|
124
|
+
export type MailLogPage = Schemas["MailLogPage"];
|
|
125
|
+
export type Repo = Schemas["Repo"];
|
|
126
|
+
export type RepoVisibility = NonNullable<Repo["visibility"]>;
|
|
127
|
+
export type DeployHook = Schemas["DeployHook"];
|
|
128
|
+
export type Build = Schemas["Build"];
|
|
129
|
+
export type BuildState = NonNullable<Build["state"]>;
|
|
130
|
+
export type RefUpdate = Schemas["RefUpdate"];
|
|
131
|
+
export type SSHKey = Schemas["SSHKey"];
|
|
132
|
+
export type AccessToken = Schemas["AccessToken"];
|
|
133
|
+
export type AccessTokenCreated = Schemas["AccessTokenCreated"];
|
|
134
|
+
export type TokenScope = NonNullable<AccessToken["scope"]>;
|
|
135
|
+
/**
|
|
136
|
+
* One name from the REST scope vocabulary (0067).
|
|
137
|
+
*
|
|
138
|
+
* `TokenScope` above is the **git** verdict and stays two-valued; this is the
|
|
139
|
+
* set a token actually carries. Keeping the two names apart is what stops the
|
|
140
|
+
* git front end and the REST middleware from drifting into one another.
|
|
141
|
+
*/
|
|
142
|
+
export type ApiScope = Schemas["ApiScope"];
|
|
143
|
+
export declare const API_SCOPES: readonly ApiScope[];
|
|
144
|
+
export type RepoRefs = Schemas["RepoRefs"];
|
|
145
|
+
export type RepoRef = RepoRefs["refs"][number];
|
|
146
|
+
export type RepoTree = Schemas["RepoTree"];
|
|
147
|
+
export type RepoTreeEntry = Schemas["RepoTreeEntry"];
|
|
148
|
+
export type RepoBlob = Schemas["RepoBlob"];
|
|
149
|
+
export type RepoCommit = Schemas["RepoCommit"];
|
|
57
150
|
export type AccessPolicy = Schemas["AccessPolicy"];
|
|
58
151
|
export type AccessBypass = Schemas["AccessBypass"];
|
|
59
152
|
export type AccessAuthorize = Schemas["AccessAuthorize"];
|
|
60
|
-
/**
|
|
153
|
+
/** The four policies (`app` is docs/auth-access-unify.md §3). The radio buttons hang off this union (docs/access.md §3.1). */
|
|
61
154
|
export type AccessMode = NonNullable<AccessPolicy["mode"]>;
|
|
62
155
|
export type UsageRow = Schemas["UsageRow"];
|
|
63
156
|
export type Notification = Schemas["Notification"];
|
|
64
|
-
/**
|
|
157
|
+
/** The notification kinds. The dashboard's label table hangs off this union (§3.1). */
|
|
65
158
|
export type NotificationKind = NonNullable<Notification["kind"]>;
|
|
66
159
|
export type AuthStatus = Schemas["AuthStatus"];
|
|
67
160
|
export type AuthSettings = Schemas["AuthSettings"];
|
|
68
161
|
export type AuthBrand = Schemas["AuthBrand"];
|
|
162
|
+
/**
|
|
163
|
+
* One provider row (docs/auth-access-unify.md §5, §5A): `builtin` is the
|
|
164
|
+
* project's own GitHub or Google app, `oidc` a generic OpenID Connect provider
|
|
165
|
+
* under a project-chosen id, `runlot` Runlot's sign-in.
|
|
166
|
+
*/
|
|
69
167
|
export type AuthProviderMeta = Schemas["AuthProviderMeta"];
|
|
70
|
-
|
|
168
|
+
export type AuthProviderKind = AuthProviderMeta["kind"];
|
|
169
|
+
/** The PUT body; its shape depends on `kind` (see `AuthProviderPut`). */
|
|
170
|
+
export type AuthProviderPut = Schemas["AuthProviderPut"];
|
|
171
|
+
/** Provider ids with a built-in meaning; any other id is an OIDC provider. */
|
|
172
|
+
export type BuiltinAuthProvider = "github" | "google";
|
|
173
|
+
export declare const BUILTIN_AUTH_PROVIDERS: readonly BuiltinAuthProvider[];
|
|
174
|
+
export declare const RESERVED_AUTH_PROVIDER_IDS: readonly string[];
|
|
175
|
+
/** The id pattern for an OIDC provider (`^[a-z][a-z0-9-]{1,30}$`). */
|
|
176
|
+
export declare const AUTH_PROVIDER_ID: RegExp;
|
|
177
|
+
/**
|
|
178
|
+
* `GET …/auth/schema`: the statements that install `runlot_auth` idempotently,
|
|
179
|
+
* one transaction from `BEGIN` to `COMMIT`. A migration that references
|
|
180
|
+
* `runlot_auth` runs them first.
|
|
181
|
+
*/
|
|
182
|
+
export interface AuthSchema {
|
|
183
|
+
version: number;
|
|
184
|
+
statements: string[];
|
|
185
|
+
}
|
|
186
|
+
/** A provider id: `github`, `google`, `runlot`, or an OIDC id. */
|
|
71
187
|
export type AuthProvider = Schemas["AuthProvider"];
|
|
72
|
-
/** PATCH
|
|
73
|
-
export type AuthSettingsInput = NonNullable<Schemas["AuthSettingsPatch"]["settings"]
|
|
188
|
+
/** The PATCH body — a subset of `AuthSettings`. Only the fields given change. */
|
|
189
|
+
export type AuthSettingsInput = Omit<NonNullable<Schemas["AuthSettingsPatch"]["settings"]>, "brand"> & {
|
|
190
|
+
/** §12.3: attach a `runlot` identity to an existing user with the same verified email. Default true. */
|
|
191
|
+
linkByEmail?: boolean;
|
|
192
|
+
brand?: Partial<AuthBranding>;
|
|
193
|
+
};
|
|
194
|
+
export type AuthTheme = "light" | "dark" | "system";
|
|
195
|
+
export type AuthLayout = "centered" | "split" | "minimal";
|
|
196
|
+
export type AuthButtonShape = "rounded" | "pill" | "square";
|
|
197
|
+
export type AuthBackgroundKind = "none" | "color" | "gradient" | "image";
|
|
198
|
+
export type AuthBrandLang = "ko" | "en" | "ja";
|
|
199
|
+
export type AuthRunlotMethod = "password" | "google" | "github" | "passkey";
|
|
200
|
+
export declare const AUTH_RUNLOT_METHODS: readonly AuthRunlotMethod[];
|
|
201
|
+
export interface AuthBrandCopy {
|
|
202
|
+
/** ≤ 80 characters. */
|
|
203
|
+
title: string;
|
|
204
|
+
/** ≤ 200 characters. */
|
|
205
|
+
subtitle: string;
|
|
206
|
+
/** ≤ 200 characters. */
|
|
207
|
+
footer: string;
|
|
208
|
+
}
|
|
209
|
+
/** The whole branding object (`project_auth.settings.brand`, §12.3). */
|
|
210
|
+
export interface AuthBranding {
|
|
211
|
+
name: string;
|
|
212
|
+
logo: string;
|
|
213
|
+
color: string;
|
|
214
|
+
/** https URL or "". */
|
|
215
|
+
logoDark: string;
|
|
216
|
+
theme: AuthTheme;
|
|
217
|
+
layout: AuthLayout;
|
|
218
|
+
buttonShape: AuthButtonShape;
|
|
219
|
+
background: {
|
|
220
|
+
kind: AuthBackgroundKind;
|
|
221
|
+
value: string;
|
|
222
|
+
};
|
|
223
|
+
copy: Partial<Record<AuthBrandLang, AuthBrandCopy>>;
|
|
224
|
+
links: {
|
|
225
|
+
terms: string;
|
|
226
|
+
privacy: string;
|
|
227
|
+
support: string;
|
|
228
|
+
};
|
|
229
|
+
defaultLang: AuthBrandLang | "";
|
|
230
|
+
/** Empty = every method the deployment can broker. */
|
|
231
|
+
methods: AuthRunlotMethod[];
|
|
232
|
+
}
|
|
233
|
+
/** GET/PUT /auth/branding answer. */
|
|
234
|
+
export interface AuthBrandingAnswer {
|
|
235
|
+
brand: AuthBranding;
|
|
236
|
+
effectiveMethods: AuthRunlotMethod[];
|
|
237
|
+
}
|
|
238
|
+
/** `400 invalid_branding` carries one entry per bad field. */
|
|
239
|
+
export interface AuthBrandingFieldError {
|
|
240
|
+
path: string;
|
|
241
|
+
message: string;
|
|
242
|
+
}
|
|
243
|
+
export type AuthPreviewState = "password" | "passkey" | `error:${string}`;
|
|
244
|
+
export interface AuthPreviewOpts {
|
|
245
|
+
lang?: AuthBrandLang;
|
|
246
|
+
theme?: AuthTheme;
|
|
247
|
+
state?: AuthPreviewState;
|
|
248
|
+
/** Unsaved branding to render instead of the stored one. */
|
|
249
|
+
draft?: Partial<AuthBranding>;
|
|
250
|
+
}
|
|
251
|
+
/** One counter of `app_auth_funnel` (§12.2): per day, event and key. */
|
|
252
|
+
export interface AuthFunnelRow {
|
|
253
|
+
/** YYYY-MM-DD. */
|
|
254
|
+
day: string;
|
|
255
|
+
/** e.g. `start`, `chooser_view`, `method`, `success`, `error`. */
|
|
256
|
+
event: string;
|
|
257
|
+
/** The idp, method or error code the event is about; "" when none. */
|
|
258
|
+
key: string;
|
|
259
|
+
n: number;
|
|
260
|
+
}
|
|
261
|
+
export interface AuthFunnel {
|
|
262
|
+
days: number;
|
|
263
|
+
rows: AuthFunnelRow[];
|
|
264
|
+
}
|
|
74
265
|
export type Hostname = Schemas["Hostname"];
|
|
75
266
|
export type HostnameList = Schemas["HostnameList"];
|
|
76
267
|
export type HostnameVerify = Schemas["HostnameVerify"];
|
|
77
268
|
export type HostnameRecord = Schemas["HostnameRecord"];
|
|
78
|
-
/**
|
|
269
|
+
/** The four states. The badge on screen hangs off this value (docs/domains.md §3.3). */
|
|
79
270
|
export type HostnameState = NonNullable<Hostname["state"]>;
|
|
80
271
|
export type Zone = Schemas["Zone"];
|
|
81
272
|
export type ZoneDetail = Schemas["ZoneDetail"];
|
|
@@ -87,9 +278,9 @@ export type DomainList = Schemas["DomainList"];
|
|
|
87
278
|
export type DomainAvailability = Schemas["DomainAvailability"];
|
|
88
279
|
export type DomainContact = Schemas["DomainContact"];
|
|
89
280
|
export type DomainEvent = Schemas["DomainEvent"];
|
|
90
|
-
/** `Domain["state"]`
|
|
281
|
+
/** `Domain["state"]` is exported separately — the screen pins its badge table to this union. */
|
|
91
282
|
export type DomainState = Domain["state"];
|
|
92
|
-
/**
|
|
283
|
+
/** The exception that carries the server's error envelope unchanged. */
|
|
93
284
|
export declare class ApiError extends Error {
|
|
94
285
|
readonly status: number;
|
|
95
286
|
readonly code: string;
|
|
@@ -105,220 +296,712 @@ export declare class Client {
|
|
|
105
296
|
constructor(opts: ClientOptions);
|
|
106
297
|
private headers;
|
|
107
298
|
private request;
|
|
299
|
+
/** A body that is not JSON (the raw mail). Error handling is the same as request. */
|
|
300
|
+
private text;
|
|
108
301
|
private json;
|
|
109
302
|
devLogin(subject: string): Promise<Ok<"devLogin">>;
|
|
110
|
-
/** 켜진 로그인 방식. 로그인 화면이 버튼을 그리는 데 쓴다. */
|
|
111
|
-
authProviders(): Promise<Ok<"listAuthProviders">>;
|
|
112
303
|
/**
|
|
113
|
-
*
|
|
114
|
-
*
|
|
304
|
+
* Takes the sign-up and sends the confirmation mail. Neither a session nor a
|
|
305
|
+
* password is created here — the password is chosen in `verifyEmail` by
|
|
306
|
+
* whoever opens the mailbox.
|
|
307
|
+
*/
|
|
308
|
+
passwordSignUp(email: string, name?: string): Promise<Ok<"passwordSignUp">>;
|
|
309
|
+
passwordSignIn(email: string, password: string): Promise<Ok<"passwordSignIn">>;
|
|
310
|
+
/** The same accepted response comes back whether or not the email exists. */
|
|
311
|
+
passwordForgot(email: string): Promise<Ok<"passwordForgot">>;
|
|
312
|
+
passwordReset(token: string, password: string): Promise<Ok<"passwordReset">>;
|
|
313
|
+
/** Uses the confirmation link and sets the account's first password. */
|
|
314
|
+
verifyEmail(token: string, password: string): Promise<Ok<"verifyEmail">>;
|
|
315
|
+
/**
|
|
316
|
+
* Finishes a sign-in that came back `{mfa:"totp"}`.
|
|
317
|
+
*
|
|
318
|
+
* Callable without a token: `pending` is the credential, and it is not a
|
|
319
|
+
* session — no other endpoint accepts it.
|
|
320
|
+
*/
|
|
321
|
+
completeTotpLogin(pending: string, factor: {
|
|
322
|
+
code: string;
|
|
323
|
+
} | {
|
|
324
|
+
recovery: string;
|
|
325
|
+
}): Promise<Ok<"completeTotpLogin">>;
|
|
326
|
+
/** This account's two-factor state, including which orgs require it. */
|
|
327
|
+
getTotp(): Promise<Ok<"getTotp">>;
|
|
328
|
+
/**
|
|
329
|
+
* Draws a secret to scan. It does **not** turn the factor on — `confirmTotp`
|
|
330
|
+
* does, after the app has proved it can produce a code.
|
|
331
|
+
*/
|
|
332
|
+
enrollTotp(): Promise<Ok<"enrollTotp">>;
|
|
333
|
+
/** Turns the factor on and hands back the ten recovery codes. They are shown once. */
|
|
334
|
+
confirmTotp(code: string): Promise<Ok<"confirmTotp">>;
|
|
335
|
+
/** Turns it off. A code or a recovery code is required — the session alone is not. */
|
|
336
|
+
disableTotp(factor: {
|
|
337
|
+
code: string;
|
|
338
|
+
} | {
|
|
339
|
+
recovery: string;
|
|
340
|
+
}): Promise<void>;
|
|
341
|
+
/**
|
|
342
|
+
* The GitHub OAuth start URL. It is a 302 the browser follows, so it goes into
|
|
343
|
+
* `window.location` rather than being called with fetch. `redirect` has to be
|
|
344
|
+
* on the server's allow-list.
|
|
115
345
|
*/
|
|
116
346
|
githubStartUrl(redirect: string): string;
|
|
347
|
+
/** The Google OAuth start URL. Uses the same dashboard callback shape as GitHub. */
|
|
348
|
+
googleStartUrl(redirect: string): string;
|
|
349
|
+
/**
|
|
350
|
+
* The generic OIDC start URL (docs/onprem-delivery.md §7.7). Same 302-and-fragment
|
|
351
|
+
* shape as the other two; which provider is behind it is the installation's choice.
|
|
352
|
+
*/
|
|
353
|
+
oidcStartUrl(redirect: string): string;
|
|
354
|
+
/**
|
|
355
|
+
* Does this deployment federate an identity provider?
|
|
356
|
+
*
|
|
357
|
+
* **There is no endpoint that answers "which logins are on"** — one existed and was
|
|
358
|
+
* deleted, because its only reader was the login screen and it put a round trip in
|
|
359
|
+
* front of every login button (cp/internal/public/public.go). This is not that
|
|
360
|
+
* endpoint coming back: cp-public **does not register** the two OIDC routes when no
|
|
361
|
+
* issuer is configured, so the mux's own 404 is the answer, and the probe is a HEAD
|
|
362
|
+
* that no handler runs.
|
|
363
|
+
*
|
|
364
|
+
* Any other status means the route is there — a 400 (this probe carries no
|
|
365
|
+
* `redirect`) or a 502 (the provider's discovery document could not be read) both say
|
|
366
|
+
* the handler exists, and a button that leads to a readable error beats no button.
|
|
367
|
+
* A network failure answers false: on SaaS, where the answer is false anyway, a dead
|
|
368
|
+
* API address must not draw a login that cannot work.
|
|
369
|
+
*/
|
|
370
|
+
oidcAvailable(): Promise<boolean>;
|
|
371
|
+
/**
|
|
372
|
+
* This installation's licence (docs/onprem-delivery.md §6.5). Readable by any
|
|
373
|
+
* signed-in user: the footer it feeds is on every page for everybody.
|
|
374
|
+
*
|
|
375
|
+
* On SaaS it answers `onPrem: false` rather than 404, so the caller has one shape to
|
|
376
|
+
* read and the surfaces draw nothing on the flag.
|
|
377
|
+
*/
|
|
378
|
+
license(): Promise<Ok<"getLicense">>;
|
|
379
|
+
/**
|
|
380
|
+
* The names of this deployment (app domain, docs address). Callable without auth.
|
|
381
|
+
*
|
|
382
|
+
* This exists so the dashboard does not hard-code a domain into the screen
|
|
383
|
+
* (docs/environments.md §3.2) — hard-coded, the dev screen tells people a
|
|
384
|
+
* production address, and because that address opens, nobody ever says it is
|
|
385
|
+
* wrong.
|
|
386
|
+
*/
|
|
387
|
+
siteConfig(): Promise<Ok<"getSiteConfig">>;
|
|
117
388
|
me(): Promise<Ok<"getMe">>;
|
|
118
389
|
listOrgs(): Promise<Ok<"listOrgs">>;
|
|
390
|
+
/** Changes the display name only (admin). The slug is the name that becomes an address, so it is not on this surface. */
|
|
391
|
+
/**
|
|
392
|
+
* `requireTotp` is left out when it is not given, on purpose: the server reads
|
|
393
|
+
* an absent field as "leave it alone". Sending `false` by default would mean a
|
|
394
|
+
* rename silently switched the org's second-factor requirement off.
|
|
395
|
+
*/
|
|
396
|
+
updateOrg(org: string, name: string, requireTotp?: boolean): Promise<Ok<"updateOrg">>;
|
|
397
|
+
/**
|
|
398
|
+
* Deletes the organization (admin). **This cannot be undone.**
|
|
399
|
+
*
|
|
400
|
+
* `confirm` has to be the organization slug exactly — the confirmation lives on
|
|
401
|
+
* the server because three places call this surface (the screen, the CLI, and
|
|
402
|
+
* scripts). If a live project, domain, repository, or DNS zone is left, it is a
|
|
403
|
+
* 409 `org_not_empty` and `details.holdings` says what is left — **projects
|
|
404
|
+
* already deleted are not counted.**
|
|
405
|
+
*
|
|
406
|
+
* The `purgeAfter` in the answer is when the rows actually disappear. By the
|
|
407
|
+
* moment it returns the organization is already gone from every surface; what
|
|
408
|
+
* remains is retention until that time.
|
|
409
|
+
*/
|
|
410
|
+
deleteOrg(org: string, confirm: string): Promise<Ok<"deleteOrg">>;
|
|
119
411
|
createOrg(slug: string, name: string): Promise<Ok<"createOrg">>;
|
|
120
412
|
/**
|
|
121
|
-
*
|
|
413
|
+
* The organization's recent notifications (docs/limits.md §3.4).
|
|
122
414
|
*
|
|
123
|
-
* `sentAt`
|
|
124
|
-
*
|
|
415
|
+
* A row with no `sentAt` is either still queued or has no email address to
|
|
416
|
+
* reach — and for the second, this list is the only channel, so the screen
|
|
417
|
+
* draws both states the same way.
|
|
125
418
|
*/
|
|
126
419
|
listNotifications(org: string, limit?: number): Promise<Ok<"listNotifications">>;
|
|
420
|
+
/**
|
|
421
|
+
* The plan and billing state (docs/billing.md). If `enabled` is false, this
|
|
422
|
+
* deployment has no billing — the screen shows only a contact address.
|
|
423
|
+
*/
|
|
424
|
+
getBilling(org: string): Promise<Ok<"getBilling">>;
|
|
425
|
+
/**
|
|
426
|
+
* A Pro checkout session. Send the browser to the `url` that comes back. Even
|
|
427
|
+
* once payment finishes, the thing that changes the plan is the webhook, so
|
|
428
|
+
* read `getBilling` again after the browser returns.
|
|
429
|
+
*/
|
|
430
|
+
createBillingCheckout(org: string, returnTo: string): Promise<Ok<"createBillingCheckout">>;
|
|
431
|
+
/** A one-time `url` for the customer portal (payment method, receipts, cancellation). */
|
|
432
|
+
createBillingPortal(org: string, returnTo: string): Promise<Ok<"createBillingPortal">>;
|
|
433
|
+
/** The customer session token for the payment-method embed (1 hour). An org with no payment history gets a 404. */
|
|
434
|
+
createBillingSession(org: string): Promise<Ok<"createBillingSession">>;
|
|
435
|
+
/** Schedules cancellation at the end of the period (`cancel: true`), or undoes it. There is no immediate revocation. */
|
|
436
|
+
cancelBilling(org: string, body: {
|
|
437
|
+
cancel: boolean;
|
|
438
|
+
reason?: string;
|
|
439
|
+
comment?: string;
|
|
440
|
+
}): Promise<Ok<"cancelBilling">>;
|
|
127
441
|
listProjects(org: string): Promise<Ok<"listProjects">>;
|
|
128
442
|
createProject(org: string, name: string): Promise<Ok<"createProject">>;
|
|
129
443
|
getProject(org: string, name: string): Promise<Ok<"getProject">>;
|
|
444
|
+
/**
|
|
445
|
+
* Renames the project (admin). **The default address moves with it and there is
|
|
446
|
+
* no alias** — which is why the response carries the new address. Unlike the
|
|
447
|
+
* org slug, this name can change because it is the inner label of the org
|
|
448
|
+
* wildcard certificate.
|
|
449
|
+
*/
|
|
450
|
+
updateProject(org: string, name: string, next: string): Promise<Ok<"updateProject">>;
|
|
451
|
+
/**
|
|
452
|
+
* Starts tearing the project down (admin). **This cannot be undone and leaves
|
|
453
|
+
* no recovery generation.** `confirm` has to be the project name exactly.
|
|
454
|
+
*/
|
|
455
|
+
deleteProject(org: string, name: string, confirm: string): Promise<Ok<"deleteProject">>;
|
|
456
|
+
/**
|
|
457
|
+
* Disables a project (admin): it stops serving and taking new backups, and
|
|
458
|
+
* keeps everything it has. A project disabled for a year is deleted for good.
|
|
459
|
+
*/
|
|
460
|
+
disableProject(org: string, name: string): Promise<Ok<"disableProject">>;
|
|
461
|
+
/** Enables a disabled project (admin). 409 `project_limit` when there is no room for it. */
|
|
462
|
+
enableProject(org: string, name: string): Promise<Ok<"enableProject">>;
|
|
463
|
+
/** Watches the teardown operation to its end even after the project is gone. */
|
|
464
|
+
getOrgOperation(org: string, opId: string): Promise<Ok<"getOrgOperation">>;
|
|
465
|
+
/** Everything the project's first screen takes in one call. Usage calls `getUsage` alongside it. */
|
|
466
|
+
getProjectOverview(org: string, name: string): Promise<Ok<"getProjectOverview">>;
|
|
130
467
|
listDeployments(org: string, name: string): Promise<Ok<"listDeployments">>;
|
|
131
|
-
/**
|
|
132
|
-
|
|
133
|
-
|
|
468
|
+
/**
|
|
469
|
+
* One deployment, with `migrations` when the control plane applied its
|
|
470
|
+
* `migrations/` — which today means a preview deployed with `db=branch`
|
|
471
|
+
* (docs/studio.md §6.6 step 2).
|
|
472
|
+
*
|
|
473
|
+
* A preview's deployment is read under **the parent project's name**, the name
|
|
474
|
+
* the caller deployed through: the preview is a project of its own, but the
|
|
475
|
+
* caller never learns its name.
|
|
476
|
+
*/
|
|
477
|
+
getDeployment(org: string, name: string, deploymentId: string): Promise<Ok<"getDeployment">>;
|
|
478
|
+
/**
|
|
479
|
+
* Scheduled runs: what the live deployment declares, when each fires next, and
|
|
480
|
+
* the recent history (docs/cron.md §8). `limit` bounds the history rows only —
|
|
481
|
+
* the schedules and the per-schedule last run are never paged.
|
|
482
|
+
*/
|
|
483
|
+
getProjectCron(org: string, name: string, limit?: number): Promise<Ok<"getProjectCron">>;
|
|
484
|
+
/**
|
|
485
|
+
* Queues: what the live deployment declares, how deep each one is, and the
|
|
486
|
+
* recent batch history (docs/queues.md §6). The depth is read from the
|
|
487
|
+
* project's own database; `depthError` on the answer says when it could not be.
|
|
488
|
+
*/
|
|
489
|
+
getProjectQueues(org: string, name: string, limit?: number): Promise<Ok<"getProjectQueues">>;
|
|
490
|
+
/**
|
|
491
|
+
* Durable Objects: how many this project has placed, against the two caps
|
|
492
|
+
* (docs/durable-objects.md).
|
|
493
|
+
*
|
|
494
|
+
* **It answers how much, never which.** There is no actor id in the response
|
|
495
|
+
* and none is coming — those name individual objects, and a list of them would
|
|
496
|
+
* be an object enumeration wearing a quota's name. `nodes` is keyed by node id
|
|
497
|
+
* because `nodeLimit` is a separate bound that can refuse a placement while
|
|
498
|
+
* the project-wide cap still has room.
|
|
499
|
+
*/
|
|
500
|
+
getProjectDurableObjects(org: string, name: string): Promise<Ok<"getProjectDurableObjects">>;
|
|
501
|
+
private queuePath;
|
|
502
|
+
listQueueRuns(org: string, name: string, queue: string, limit?: number): Promise<Ok<"listQueueRuns">>;
|
|
503
|
+
/** The head of the queue without leasing it — looking cannot delay a delivery. */
|
|
504
|
+
peekQueue(org: string, name: string, queue: string, limit?: number): Promise<Ok<"peekQueue">>;
|
|
505
|
+
/** Irreversible. The confirmation is the caller's — the server holds none. */
|
|
506
|
+
purgeQueue(org: string, name: string, queue: string): Promise<Ok<"purgeQueue">>;
|
|
507
|
+
/**
|
|
508
|
+
* Moves a dead-letter queue's messages back. `to` is required only when the
|
|
509
|
+
* dead-letter queue belongs to more than one consumer, or to none.
|
|
510
|
+
*/
|
|
511
|
+
redriveQueue(org: string, name: string, queue: string, to?: string): Promise<Ok<"redriveQueue">>;
|
|
512
|
+
/**
|
|
513
|
+
* The vector store: every namespace with its count and width, and the plan's
|
|
514
|
+
* bounds (docs/vectors.md §4). Read from the project's own database;
|
|
515
|
+
* `readError` on the answer says when it could not be.
|
|
516
|
+
*/
|
|
517
|
+
getProjectVectors(org: string, name: string): Promise<Ok<"getProjectVectors">>;
|
|
518
|
+
/** Irreversible. The confirmation is the caller's — the server holds none. */
|
|
519
|
+
deleteVectorNamespace(org: string, name: string, namespace: string): Promise<Ok<"deleteVectorNamespace">>;
|
|
520
|
+
/** The body is the bundle. One digest covers all of the code and the assets. */
|
|
521
|
+
/**
|
|
522
|
+
* Uploads the bundle. `headers` carries the provenance headers
|
|
523
|
+
* (`X-Runlot-Git-*`, openapi createDeployment) — the body is the bundle
|
|
524
|
+
* itself, so the metadata can only travel in headers.
|
|
525
|
+
*/
|
|
526
|
+
deploy(org: string, name: string, bundle: Uint8Array, headers?: Record<string, string>): Promise<Ok<"createDeployment">>;
|
|
527
|
+
/**
|
|
528
|
+
* The same upload, aimed at a preview (docs/preview.md). **It does not move
|
|
529
|
+
* production's live pointer** — that is the whole difference, and it is why
|
|
530
|
+
* this is a named method rather than an optional argument on `deploy`: a
|
|
531
|
+
* caller that forgets the argument deploys to production.
|
|
532
|
+
*
|
|
533
|
+
* `db` picks what `env.db` points at (`branch` by default, `shared` at
|
|
534
|
+
* production's own database, `none` for no database), and `from` pours the
|
|
535
|
+
* branch from a named generation instead of the newest one.
|
|
536
|
+
*/
|
|
537
|
+
deployPreview(org: string, name: string, bundle: Uint8Array, opts: {
|
|
538
|
+
preview: string;
|
|
539
|
+
db?: string | undefined;
|
|
540
|
+
from?: string | undefined;
|
|
541
|
+
}, headers?: Record<string, string>): Promise<DeployedPreview>;
|
|
542
|
+
/** The parent's live previews (viewer). A deleted preview is not listed. */
|
|
543
|
+
listPreviews(org: string, name: string): Promise<Ok<"listPreviews">>;
|
|
544
|
+
/**
|
|
545
|
+
* Deletes a preview and its branch (member).
|
|
546
|
+
*
|
|
547
|
+
* No confirmation string, unlike `deleteProject`: a branch is a copy taken at a
|
|
548
|
+
* moment and nothing in it is the only copy of anything.
|
|
549
|
+
*/
|
|
550
|
+
deletePreview(org: string, name: string, preview: string): Promise<void>;
|
|
551
|
+
/**
|
|
552
|
+
* Makes the preview's artifact the parent's live deployment (member).
|
|
553
|
+
*
|
|
554
|
+
* **The code, never the data** (docs/preview.md §7). The branch is not merged
|
|
555
|
+
* and production's database is not replaced. The preview stays alive.
|
|
556
|
+
*/
|
|
557
|
+
promotePreview(org: string, name: string, preview: string): Promise<Ok<"promotePreview">>;
|
|
558
|
+
/**
|
|
559
|
+
* The project's share link — `<label>.share.<app-domain>`, the one address
|
|
560
|
+
* Studio hands to somebody who is not a developer (docs/studio.md §6.9).
|
|
561
|
+
*
|
|
562
|
+
* 404 when the project has never been shared: a link is minted by
|
|
563
|
+
* `putShareLink`, never as a side effect of reading.
|
|
564
|
+
*/
|
|
565
|
+
getShareLink(org: string, name: string): Promise<Ok<"getShareLink">>;
|
|
566
|
+
/**
|
|
567
|
+
* Points the share link at a preview, minting the label if there is none.
|
|
568
|
+
*
|
|
569
|
+
* Idempotent: the label is kept across shares, so somebody holding the link
|
|
570
|
+
* keeps working. `rotate` mints a new label and retires the old name in the
|
|
571
|
+
* same request ("링크 재발급"), so the project never has two live links.
|
|
572
|
+
*/
|
|
573
|
+
putShareLink(org: string, name: string, opts?: {
|
|
574
|
+
preview?: string;
|
|
575
|
+
rotate?: boolean;
|
|
576
|
+
}): Promise<Ok<"putShareLink">>;
|
|
577
|
+
/** Stops the link answering and forgets the label. The preview keeps running. */
|
|
578
|
+
deleteShareLink(org: string, name: string): Promise<void>;
|
|
579
|
+
/** Idempotent. Called twice, the password is not rolled and the same connection details come back. */
|
|
134
580
|
createDatabase(org: string, name: string): Promise<Ok<"createDatabase">>;
|
|
135
581
|
getDatabase(org: string, name: string): Promise<Ok<"getDatabase">>;
|
|
136
582
|
/**
|
|
137
|
-
*
|
|
138
|
-
* viewer
|
|
583
|
+
* The connection credentials as well. The route is split from `getDatabase`
|
|
584
|
+
* because of roles — a viewer may know whether there is a database, but not
|
|
585
|
+
* the password (proto/openapi.yaml).
|
|
139
586
|
*/
|
|
140
587
|
getDatabaseConnect(org: string, name: string): Promise<Ok<"getDatabaseConnect">>;
|
|
141
|
-
/**
|
|
588
|
+
/** The endpoint only — no credentials. A viewer gets it too. Used by `runlot port-forward`. */
|
|
142
589
|
getDatabaseEndpoint(org: string, name: string): Promise<Ok<"getDatabaseEndpoint">>;
|
|
143
|
-
/**
|
|
590
|
+
/** Issues a short-lived machine credential. The password is carried in this response and nowhere else. */
|
|
144
591
|
createDatabaseToken(org: string, name: string, ttlSeconds?: number): Promise<Ok<"createDatabaseToken">>;
|
|
145
592
|
listDatabaseTokens(org: string, name: string): Promise<Ok<"listDatabaseTokens">>;
|
|
146
593
|
deleteDatabaseToken(org: string, name: string, user: string): Promise<void>;
|
|
147
594
|
/**
|
|
148
|
-
*
|
|
595
|
+
* Makes one diagnostic image.
|
|
149
596
|
*
|
|
150
|
-
*
|
|
151
|
-
*
|
|
152
|
-
* (proto/openapi.yaml).
|
|
597
|
+
* **Not idempotent** — every call makes another image. And it is slow: the
|
|
598
|
+
* response comes after the dump finishes, and that project's actor is held
|
|
599
|
+
* for the whole of it (proto/openapi.yaml).
|
|
153
600
|
*/
|
|
154
601
|
exportDatabase(org: string, name: string): Promise<Ok<"exportDatabase">>;
|
|
155
602
|
/**
|
|
156
|
-
*
|
|
157
|
-
*
|
|
603
|
+
* Every generation a restore can choose, newest first. `lastCheckedAt` is the
|
|
604
|
+
* heartbeat of the no-change skip — it is what tells "no new generations"
|
|
605
|
+
* apart from "the backup is dead".
|
|
158
606
|
*/
|
|
159
607
|
listGenerations(org: string, name: string): Promise<Ok<"listGenerations">>;
|
|
160
608
|
/**
|
|
161
|
-
*
|
|
609
|
+
* Runs one statement in the project's database (the dashboard console).
|
|
610
|
+
*
|
|
611
|
+
* `readOnly` is **omitted, not sent as false**, when the caller wants the safe
|
|
612
|
+
* mode: the server treats an absent field as read-only, so leaving it out is the
|
|
613
|
+
* one spelling that cannot be misread. Sending `false` is the explicit ask for
|
|
614
|
+
* write mode, and only then does the server run outside a transaction.
|
|
615
|
+
*
|
|
616
|
+
* SQL failures arrive as an `ApiError` whose body carries `details.sqlstate` —
|
|
617
|
+
* PostgreSQL's own code, which is what the error panel shows.
|
|
618
|
+
*/
|
|
619
|
+
executeSQL(org: string, name: string, sql: string, opts?: {
|
|
620
|
+
readOnly?: boolean;
|
|
621
|
+
params?: unknown[];
|
|
622
|
+
}): Promise<Ok<"executeSQL">>;
|
|
623
|
+
/**
|
|
624
|
+
* Rolls back to a generation. **Writes made since then are lost.**
|
|
162
625
|
*
|
|
163
|
-
*
|
|
164
|
-
* `getDatabaseOperation
|
|
165
|
-
*
|
|
626
|
+
* It ends at 202 — what comes back is an operation id, and progress is read
|
|
627
|
+
* through `getDatabaseOperation`. The server does not resolve `latest`: the
|
|
628
|
+
* `(epoch, seq)` chosen from the list is carried as-is (proto/openapi.yaml).
|
|
166
629
|
*/
|
|
167
630
|
restoreDatabase(org: string, name: string, epoch: number, seq: number): Promise<Ok<"restoreDatabase">>;
|
|
168
631
|
/**
|
|
169
|
-
*
|
|
170
|
-
*
|
|
632
|
+
* Rolls back to a restore point **inside** a backup (pg-feather docs/37):
|
|
633
|
+
* `txnId` is that commit, `at` is the last commit at or before that time. One
|
|
634
|
+
* backup carries the commits in between in order, so the place you can roll
|
|
635
|
+
* back to is not tied to a backup boundary. Everything else is as in
|
|
636
|
+
* restoreDatabase — 202, an operation id, and one safety backup before the
|
|
637
|
+
* rollback.
|
|
638
|
+
*/
|
|
639
|
+
restoreDatabaseTo(org: string, name: string, target: {
|
|
640
|
+
txnId: number;
|
|
641
|
+
} | {
|
|
642
|
+
at: string;
|
|
643
|
+
}): Promise<Ok<"restoreDatabase">>;
|
|
644
|
+
/**
|
|
645
|
+
* Removes the database. `confirm` has to match the project name **exactly**;
|
|
646
|
+
* if it does not, the server refuses with 400 `confirm_mismatch`.
|
|
171
647
|
*/
|
|
172
648
|
deleteDatabase(org: string, name: string, confirm: string): Promise<Ok<"deleteDatabase">>;
|
|
173
|
-
/**
|
|
649
|
+
/** The progress of one operation. The operation id is not a credential; it lives under the project path. */
|
|
174
650
|
getDatabaseOperation(org: string, name: string, opId: string): Promise<Ok<"getDatabaseOperation">>;
|
|
175
|
-
/**
|
|
651
|
+
/** Aborts an operation that has not yet reached a phase it cannot come back from. */
|
|
176
652
|
abortDatabaseOperation(org: string, name: string, opId: string): Promise<Ok<"abortDatabaseOperation">>;
|
|
177
653
|
/**
|
|
178
|
-
*
|
|
179
|
-
*
|
|
180
|
-
*
|
|
654
|
+
* A live tail of the logs. It is **a stream, not JSON**, so it does not go
|
|
655
|
+
* through `request` — what comes back is an async iterable of line-by-line
|
|
656
|
+
* `LogEvent`, and aborting `signal` closes the connection. An error response
|
|
657
|
+
* (4xx/5xx) is the same `ApiError` as in every other method.
|
|
181
658
|
*/
|
|
182
659
|
tailLogs(org: string, name: string, opts?: {
|
|
183
660
|
tail?: number;
|
|
184
661
|
follow?: boolean;
|
|
185
662
|
signal?: AbortSignal;
|
|
186
663
|
}): AsyncGenerator<LogEvent, void, undefined>;
|
|
664
|
+
/**
|
|
665
|
+
* The stored lane (0062). It is a plain JSON page, not a stream: the history
|
|
666
|
+
* does not reach a node, so it answers for a project that is cold, parked, or
|
|
667
|
+
* has moved since the lines were written — every one of which is a 409 on
|
|
668
|
+
* `tailLogs`.
|
|
669
|
+
*
|
|
670
|
+
* `q` is a plain substring, matched case-insensitively. It is not a regular
|
|
671
|
+
* expression — `%` and `_` match themselves.
|
|
672
|
+
*
|
|
673
|
+
* Paging is keyset: pass the `cursor` from a page back to get the next, older
|
|
674
|
+
* one. A page with no `cursor` is the end of what is kept.
|
|
675
|
+
*/
|
|
676
|
+
getLogHistory(org: string, name: string, opts?: {
|
|
677
|
+
since?: string | undefined;
|
|
678
|
+
until?: string | undefined;
|
|
679
|
+
q?: string | undefined;
|
|
680
|
+
stream?: "stdout" | "stderr" | "runlot" | undefined;
|
|
681
|
+
limit?: number | undefined;
|
|
682
|
+
cursor?: string | undefined;
|
|
683
|
+
}): Promise<LogHistoryPage>;
|
|
187
684
|
listSecrets(org: string, name: string): Promise<Ok<"listSecrets">>;
|
|
188
|
-
/**
|
|
685
|
+
/** The value travels in this call only. It is in no response at all. */
|
|
189
686
|
setSecret(org: string, name: string, secret: string, value: string): Promise<Ok<"setSecret">>;
|
|
190
687
|
deleteSecret(org: string, name: string, secret: string): Promise<void>;
|
|
191
688
|
getUsage(org: string, name: string, hours?: number): Promise<Ok<"getUsage">>;
|
|
192
|
-
/**
|
|
689
|
+
/** Grant, prefix, quota, usage. `usedBytes` lags by the node's reporting interval. */
|
|
193
690
|
getStorage(org: string, name: string): Promise<Ok<"getStorage">>;
|
|
194
691
|
/**
|
|
195
|
-
*
|
|
196
|
-
*
|
|
197
|
-
*
|
|
692
|
+
* Grants storage. It is idempotent, so pressing twice leaves the prefix as it
|
|
693
|
+
* was. Taking neither the prefix nor the quota as an argument is the point —
|
|
694
|
+
* the prefix is the isolation boundary and the quota is set by the plan
|
|
695
|
+
* (proto/openapi.yaml).
|
|
198
696
|
*/
|
|
199
697
|
grantStorage(org: string, name: string): Promise<Ok<"grantStorage">>;
|
|
200
|
-
/**
|
|
698
|
+
/** Removes the grant. **The objects are not deleted** (docs/storage.md §7). */
|
|
201
699
|
revokeStorage(org: string, name: string): Promise<void>;
|
|
202
700
|
/**
|
|
203
|
-
*
|
|
204
|
-
*
|
|
701
|
+
* The key prefixes this project serves unsigned (docs/storage.md §4.7).
|
|
702
|
+
*
|
|
703
|
+
* A prefix is stored normalized — `assets` becomes `assets/`, and `/` becomes
|
|
704
|
+
* the empty string, which means every key. The value that comes back is the
|
|
705
|
+
* value that governs, so a screen must render the response rather than what
|
|
706
|
+
* the user typed.
|
|
707
|
+
*/
|
|
708
|
+
listStoragePublic(org: string, name: string): Promise<Ok<"listStoragePublic">>;
|
|
709
|
+
/** Publishes a prefix. Idempotent. All three verbs answer with the whole list. */
|
|
710
|
+
addStoragePublic(org: string, name: string, prefix: string): Promise<Ok<"addStoragePublic">>;
|
|
711
|
+
/**
|
|
712
|
+
* Unpublishes a prefix. Idempotent.
|
|
713
|
+
*
|
|
714
|
+
* **The world keeps reading for up to a minute.** The object front caches the
|
|
715
|
+
* list, so this call is not a revocation that takes effect at the instant it
|
|
716
|
+
* returns — a screen that says "no longer public" the moment this resolves is
|
|
717
|
+
* telling a small lie.
|
|
718
|
+
*/
|
|
719
|
+
removeStoragePublic(org: string, name: string, prefix: string): Promise<Ok<"removeStoragePublic">>;
|
|
720
|
+
/** Grant, address, sender, limits, recent counts. The address comes back as a preview even without a grant. */
|
|
721
|
+
getEmail(org: string, name: string): Promise<Ok<"getEmail">>;
|
|
722
|
+
/** Turns it on. **Idempotent** — we choose the address. The deploy reads `"email": true` and calls this. */
|
|
723
|
+
grantEmail(org: string, name: string): Promise<Ok<"grantEmail">>;
|
|
724
|
+
/** Turns it off. Mail arriving at that address now gets a 550. */
|
|
725
|
+
revokeEmail(org: string, name: string): Promise<void>;
|
|
726
|
+
/** The project's own sending domains, each with the records to publish. */
|
|
727
|
+
listEmailDomains(org: string, name: string): Promise<Ok<"listEmailDomains">>;
|
|
728
|
+
/**
|
|
729
|
+
* Creates the provider identity and answers with the records to publish.
|
|
730
|
+
* `publish` writes them into the zone when we host one covering the domain.
|
|
731
|
+
*/
|
|
732
|
+
addEmailDomain(org: string, name: string, domain: string, publish?: boolean): Promise<Ok<"addEmailDomain">>;
|
|
733
|
+
/** Re-checks now. The background loop does the same once a minute while pending. */
|
|
734
|
+
verifyEmailDomain(org: string, name: string, domain: string): Promise<Ok<"verifyEmailDomain">>;
|
|
735
|
+
/** Deletes the identity and the row. Sending from it is refused from the next convergence. */
|
|
736
|
+
removeEmailDomain(org: string, name: string, domain: string): Promise<void>;
|
|
737
|
+
/**
|
|
738
|
+
* The model catalogue. **Being logged in is enough to see it** — what you can
|
|
739
|
+
* buy is not an organization's secret, and this list is the price table.
|
|
205
740
|
*
|
|
206
|
-
*
|
|
207
|
-
*
|
|
741
|
+
* Prices are integer **micro-cents** per million tokens (1 µ¢ = 1e-8 USD).
|
|
742
|
+
* Not letting the server pick the decimal place is the point — a small call
|
|
743
|
+
* rounded to cents becomes 0.
|
|
208
744
|
*/
|
|
209
|
-
|
|
745
|
+
listAIModels(): Promise<Ok<"listAIModels">>;
|
|
746
|
+
/** Grant, limits, the org balance, 24 h usage. The limits come back as a preview even without a grant. */
|
|
747
|
+
getAI(org: string, name: string): Promise<Ok<"getAI">>;
|
|
748
|
+
/** Turns it on. **Idempotent.** The deploy reads `"ai": true` and calls this. */
|
|
749
|
+
grantAI(org: string, name: string): Promise<Ok<"grantAI">>;
|
|
210
750
|
/**
|
|
211
|
-
*
|
|
751
|
+
* Lends the org's own Claude/Codex subscriptions to this project's
|
|
752
|
+
* `anthropic/*` and `openai/*` calls (docs/studio-byos-ai.md §3.1).
|
|
212
753
|
*
|
|
213
|
-
*
|
|
214
|
-
*
|
|
215
|
-
*
|
|
754
|
+
* **Omitting a field leaves it as it was**, so turning lending on does not
|
|
755
|
+
* clear a fallback that was already set. Admin only: the subscription that
|
|
756
|
+
* carries the vendor-terms risk belongs to a person, not to the org.
|
|
757
|
+
*/
|
|
758
|
+
patchAI(org: string, name: string, body: {
|
|
759
|
+
byos?: boolean;
|
|
760
|
+
byosCreditFallback?: boolean;
|
|
761
|
+
}): Promise<Ok<"patchAI">>;
|
|
762
|
+
/** Turns it off. **The ledger and the balance are untouched** — the balance belongs to the org and the grant belongs to the project. */
|
|
763
|
+
revokeAI(org: string, name: string): Promise<void>;
|
|
764
|
+
/** The org's credit balance and its automatic top-up settings. The balance is in micro-cents and can be negative. */
|
|
765
|
+
getAICredit(org: string): Promise<Ok<"getAICredit">>;
|
|
766
|
+
/** One page of the org ledger. The cursor is `ledger_id` — cutting on time splits the same millisecond. */
|
|
767
|
+
listAILedger(org: string, opts?: {
|
|
768
|
+
limit?: number;
|
|
769
|
+
before?: number;
|
|
770
|
+
}): Promise<Ok<"listAILedger">>;
|
|
771
|
+
/**
|
|
772
|
+
* The credit top-up checkout. **A browser coming back is not evidence** — the
|
|
773
|
+
* one thing that raises the balance is the `order.paid` webhook, and the
|
|
774
|
+
* screen polls the balance after the success event.
|
|
216
775
|
*/
|
|
217
|
-
|
|
776
|
+
createAICreditCheckout(org: string, microCents: number, returnTo: string): Promise<Ok<"createAICreditCheckout">>;
|
|
218
777
|
/**
|
|
219
|
-
*
|
|
220
|
-
*
|
|
221
|
-
*
|
|
778
|
+
* Turns automatic top-up on or off. **Turning it on is explicit consent**
|
|
779
|
+
* (docs/ai.md §3.5) — the screen shows the charging terms verbatim and calls
|
|
780
|
+
* this only after the box is checked.
|
|
222
781
|
*/
|
|
223
|
-
|
|
782
|
+
setAIAutoTopup(org: string, body: {
|
|
783
|
+
enabled: boolean;
|
|
784
|
+
belowMicroCents?: number;
|
|
785
|
+
microCents?: number;
|
|
786
|
+
}): Promise<Ok<"setAIAutoTopup"> | void>;
|
|
787
|
+
/** One page of the mail log (docs/email.md §6.1). Newest first, cursor-paged. */
|
|
788
|
+
listMailLog(org: string, name: string, opts?: {
|
|
789
|
+
direction?: "in" | "out";
|
|
790
|
+
cursor?: string;
|
|
791
|
+
limit?: number;
|
|
792
|
+
}): Promise<Ok<"listMailLog">>;
|
|
793
|
+
/** The metadata of one message. */
|
|
794
|
+
getMailLog(org: string, name: string, mailId: string): Promise<Ok<"getMailLog">>;
|
|
795
|
+
/** The URL of the raw message — the screen uses it as a download link (.eml). */
|
|
796
|
+
mailLogRawURL(org: string, name: string, mailId: string): string;
|
|
797
|
+
/** The raw text. What the detail view draws the headers and body from. */
|
|
798
|
+
getMailLogRaw(org: string, name: string, mailId: string): Promise<string>;
|
|
224
799
|
/**
|
|
225
|
-
*
|
|
226
|
-
*
|
|
800
|
+
* Grant, settings, providers, hosts. **The signed-up users do not come** —
|
|
801
|
+
* that table is inside the project DB (docs/auth.md §6) and only the worker's
|
|
802
|
+
* `env.auth` sees it.
|
|
803
|
+
*
|
|
804
|
+
* `providers` carries the client id only. The client secret is sealed and
|
|
805
|
+
* appears in no response.
|
|
806
|
+
*/
|
|
807
|
+
getAuth(org: string, name: string): Promise<AuthStatus>;
|
|
808
|
+
/**
|
|
809
|
+
* Turns auth on (member). Idempotent.
|
|
810
|
+
*
|
|
811
|
+
* **With no database it is 409 `database_required`** — the user table lives
|
|
812
|
+
* inside the project DB, so standing up the grant alone leaves no table the
|
|
813
|
+
* moment the worker starts. The caller catches that code and points at the
|
|
814
|
+
* `"database": true` declaration — the deploy never sees this code, because
|
|
815
|
+
* its ordering rules it out.
|
|
816
|
+
*/
|
|
817
|
+
grantAuth(org: string, name: string): Promise<AuthStatus>;
|
|
818
|
+
/**
|
|
819
|
+
* Changes the settings (member). **A partial update** — only the fields given
|
|
820
|
+
* change. Sending the whole thing on one switch means that when two people
|
|
821
|
+
* touch the same card, the later save overwrites the earlier one. With no
|
|
822
|
+
* grant it is 404 `not_granted`.
|
|
823
|
+
*/
|
|
824
|
+
updateAuthSettings(org: string, name: string, settings: AuthSettingsInput): Promise<AuthStatus>;
|
|
825
|
+
/**
|
|
826
|
+
* Turns auth off (admin). **The signed-up users are not deleted** — the
|
|
827
|
+
* `runlot_auth` tables stay in the project DB, and turning it back on lets the
|
|
828
|
+
* same people log in unchanged.
|
|
227
829
|
*/
|
|
228
830
|
revokeAuth(org: string, name: string): Promise<void>;
|
|
229
831
|
/**
|
|
230
|
-
*
|
|
832
|
+
* Registers or replaces a social provider (admin). It is the same PUT, so it
|
|
833
|
+
* is idempotent.
|
|
231
834
|
*
|
|
232
|
-
* **`clientSecret`
|
|
233
|
-
* `https://<host>/__runlot/auth/callback/<provider>`
|
|
234
|
-
*
|
|
835
|
+
* **`clientSecret` cannot be read back.** The callback URL is
|
|
836
|
+
* `https://<host>/__runlot/auth/callback/<provider>` for each host, and the
|
|
837
|
+
* list of hosts is in the response's `hosts`.
|
|
838
|
+
*
|
|
839
|
+
* `issuer` is the base URL of your own GitHub Enterprise Server installation,
|
|
840
|
+
* and only `github` takes one. **This PUT is the whole row** — the same reason
|
|
841
|
+
* `clientSecret` has to be sent every time — so an empty string clears it and
|
|
842
|
+
* puts that provider back on github.com. The key is left out entirely when the
|
|
843
|
+
* argument is omitted, so a caller that does not know about issuers sends the
|
|
844
|
+
* body it always sent.
|
|
845
|
+
*/
|
|
846
|
+
setAuthProvider(org: string, name: string, provider: AuthProvider, clientId: string, clientSecret: string, issuer?: string): Promise<AuthStatus>;
|
|
847
|
+
/**
|
|
848
|
+
* Turns on the Runlot provider (admin): "Continue with Runlot", with email,
|
|
849
|
+
* Google and GitHub at Runlot behind it and nothing to register. 409
|
|
850
|
+
* `runlot_unavailable` when this deployment has no sign-in broker.
|
|
851
|
+
*/
|
|
852
|
+
setRunlotAuthProvider(org: string, name: string): Promise<AuthStatus>;
|
|
853
|
+
/**
|
|
854
|
+
* Registers or replaces a generic OIDC provider under a project-chosen id
|
|
855
|
+
* (admin). The CP reads `<issuer>/.well-known/openid-configuration` when
|
|
856
|
+
* saving; a failure is 400 `oidc_discovery_failed` quoting the provider.
|
|
857
|
+
*/
|
|
858
|
+
setOidcAuthProvider(org: string, name: string, id: string, body: {
|
|
859
|
+
issuer: string;
|
|
860
|
+
clientId: string;
|
|
861
|
+
clientSecret: string;
|
|
862
|
+
displayName?: string;
|
|
863
|
+
iconUrl?: string;
|
|
864
|
+
scopes?: string;
|
|
865
|
+
}): Promise<AuthStatus>;
|
|
866
|
+
/**
|
|
867
|
+
* The statements that create the `runlot_auth` schema (member). 404 when
|
|
868
|
+
* login is not turned on for the project.
|
|
869
|
+
*/
|
|
870
|
+
getAuthSchema(org: string, name: string): Promise<AuthSchema>;
|
|
871
|
+
/** The project's sign-in branding with defaults filled (docs/custom-sign-in.md §12.3). */
|
|
872
|
+
getAuthBranding(org: string, name: string): Promise<AuthBranding>;
|
|
873
|
+
/** The GET answer whole: the filled brand plus the methods the chooser would draw now. */
|
|
874
|
+
getAuthBrandingAnswer(org: string, name: string): Promise<AuthBrandingAnswer>;
|
|
875
|
+
/**
|
|
876
|
+
* Replaces the whole branding object (member). Validated server-side; a bad
|
|
877
|
+
* field is 400 `invalid_branding` with `fields: [{path, message}]`.
|
|
235
878
|
*/
|
|
236
|
-
|
|
879
|
+
putAuthBranding(org: string, name: string, branding: Partial<AuthBranding>): Promise<AuthBranding>;
|
|
237
880
|
/**
|
|
238
|
-
*
|
|
239
|
-
*
|
|
881
|
+
* The URL of the rendered chooser with (draft) branding (§12.4). A page, not
|
|
882
|
+
* JSON: the dashboard puts it in an iframe and the CLI opens it in a browser.
|
|
883
|
+
* `draft` travels as base64url JSON.
|
|
884
|
+
*/
|
|
885
|
+
authBrandingPreviewUrl(org: string, name: string, opts?: AuthPreviewOpts): string;
|
|
886
|
+
/** Sign-in funnel counters for the last `days` days (§9.4). No per-person data. */
|
|
887
|
+
getAuthFunnel(org: string, name: string, days?: number): Promise<AuthFunnel>;
|
|
888
|
+
/**
|
|
889
|
+
* Removes a provider (admin). Someone who signed up only through that provider
|
|
890
|
+
* loses their way in, but the user row stays — register it again and they come
|
|
891
|
+
* back to the same account.
|
|
240
892
|
*/
|
|
241
893
|
deleteAuthProvider(org: string, name: string, provider: AuthProvider): Promise<void>;
|
|
242
894
|
/**
|
|
243
|
-
*
|
|
244
|
-
*
|
|
895
|
+
* Who can reach this deployment. **No values** — both the password and the
|
|
896
|
+
* bypass secret live only as hashes, and what comes back here is the fact that
|
|
897
|
+
* there is one: `hasPassword` and `hasBypass`.
|
|
245
898
|
*
|
|
246
|
-
*
|
|
247
|
-
*
|
|
899
|
+
* A project that has never set a policy is `mode: "public"` with no
|
|
900
|
+
* `updatedAt`. The screen tells those two apart for the reason in §7 — a
|
|
901
|
+
* sentence about the state instead of an empty state.
|
|
248
902
|
*/
|
|
249
903
|
getAccess(org: string, name: string): Promise<Ok<"getAccess">>;
|
|
250
904
|
/**
|
|
251
|
-
*
|
|
252
|
-
*
|
|
905
|
+
* Changes the policy (admin). Without a `password`, **the existing password
|
|
906
|
+
* stays** — if a save that only changes the mode wiped the password, coming
|
|
907
|
+
* back to that mode would mean setting it again.
|
|
253
908
|
*/
|
|
254
909
|
setAccess(org: string, name: string, mode: AccessMode, password?: string): Promise<Ok<"setAccess">>;
|
|
255
910
|
/**
|
|
256
|
-
*
|
|
257
|
-
*
|
|
911
|
+
* Makes a bypass secret for automation (admin). **The value is in this answer
|
|
912
|
+
* and nowhere else** — the screen shows it once on arrival and can never fetch
|
|
913
|
+
* it again. Calling again kills the old value.
|
|
258
914
|
*/
|
|
259
915
|
newAccessBypass(org: string, name: string): Promise<Ok<"newAccessBypass">>;
|
|
260
|
-
/**
|
|
916
|
+
/** Removes the bypass (admin). Removing one that does not exist also succeeds. */
|
|
261
917
|
revokeAccessBypass(org: string, name: string): Promise<void>;
|
|
262
918
|
/**
|
|
263
|
-
*
|
|
919
|
+
* Gets a one-time address back into a protected deployment (docs/access.md §3.4-3).
|
|
264
920
|
*
|
|
265
|
-
*
|
|
266
|
-
* (
|
|
267
|
-
*
|
|
921
|
+
* It is **not** under the project path: all the calling screen knows is the
|
|
922
|
+
* hostname (the original request went there), and the server derives the org
|
|
923
|
+
* and project names from it. Doing `location.replace` with the `redirect` that
|
|
924
|
+
* comes back is the caller's job.
|
|
268
925
|
*/
|
|
269
926
|
authorizeAccess(to: string, next?: string): Promise<Ok<"authorizeAccess">>;
|
|
270
927
|
listMembers(org: string): Promise<Ok<"listMembers">>;
|
|
271
|
-
/**
|
|
928
|
+
/** This is not an invite — the user must already have logged in once (404 `user_not_found`). */
|
|
272
929
|
addMember(org: string, provider: "dev" | "github", subject: string, role: Role): Promise<Ok<"addMember">>;
|
|
273
930
|
setMemberRole(org: string, userId: string, role: Role): Promise<Ok<"setMemberRole">>;
|
|
931
|
+
/**
|
|
932
|
+
* Removing someone else is admin; **removing yourself is leaving**, which
|
|
933
|
+
* anyone can do (docs/members.md). The last admin can do neither
|
|
934
|
+
* (409 `last_admin`).
|
|
935
|
+
*/
|
|
274
936
|
removeMember(org: string, userId: string): Promise<void>;
|
|
275
|
-
/**
|
|
937
|
+
/** Pending and expired invites (admin). Accepted and revoked ones are history, so they do not come. */
|
|
938
|
+
listInvites(org: string): Promise<Ok<"listInvites">>;
|
|
939
|
+
/**
|
|
940
|
+
* Invites by email (admin). **Calling again with the same address is a
|
|
941
|
+
* resend** — the same row is updated rather than a new one created, and the
|
|
942
|
+
* server gives 200 instead of 201.
|
|
943
|
+
*/
|
|
944
|
+
createInvite(org: string, email: string, role: Role): Promise<Ok<"createInvite">>;
|
|
945
|
+
/** Revokes an invite (admin). Mail that has not gone out yet does not go out. */
|
|
946
|
+
revokeInvite(org: string, inviteId: string): Promise<void>;
|
|
947
|
+
/**
|
|
948
|
+
* A preview of the invite. **No session needed** — whoever got the link has
|
|
949
|
+
* not logged in yet, and they need to know what they are accepting before
|
|
950
|
+
* they do.
|
|
951
|
+
*/
|
|
952
|
+
getInvite(token: string): Promise<Ok<"getInvite">>;
|
|
953
|
+
/** Accepts (login required). If they are already a member the role does not change. */
|
|
954
|
+
acceptInvite(token: string): Promise<Ok<"acceptInvite">>;
|
|
955
|
+
/** The default hostname and the custom domains come together (viewer). */
|
|
276
956
|
listHostnames(org: string, name: string): Promise<Ok<"listHostnames">>;
|
|
277
957
|
/**
|
|
278
|
-
*
|
|
958
|
+
* Attaches a custom domain (member).
|
|
279
959
|
*
|
|
280
|
-
*
|
|
281
|
-
*
|
|
960
|
+
* Idempotent — sending the same name again returns the existing row
|
|
961
|
+
* unchanged. The response's `verify` is the CNAME and TXT the customer has to
|
|
962
|
+
* add.
|
|
282
963
|
*/
|
|
283
|
-
addHostname(org: string, name: string, hostname: string): Promise<Ok<"addHostname">>;
|
|
284
|
-
/**
|
|
964
|
+
addHostname(org: string, name: string, hostname: string, role?: "app" | "login"): Promise<Ok<"addHostname">>;
|
|
965
|
+
/** Runs the same check the background verifier makes, right now (member). */
|
|
285
966
|
verifyHostname(org: string, name: string, host: string): Promise<Ok<"verifyHostname">>;
|
|
286
|
-
/**
|
|
967
|
+
/** Detaches a custom domain (member). The default hostname gives a 400. */
|
|
287
968
|
deleteHostname(org: string, name: string, host: string): Promise<void>;
|
|
288
|
-
/**
|
|
969
|
+
/** The organization's zones. No `rrsets` — those ride only on a single-zone lookup. */
|
|
289
970
|
listZones(org: string): Promise<Ok<"listZones">>;
|
|
290
|
-
/**
|
|
971
|
+
/** Idempotent. A zone that already exists comes back unchanged. */
|
|
291
972
|
createZone(org: string, name: string): Promise<Ok<"createZone">>;
|
|
292
973
|
getZone(org: string, zone: string): Promise<Ok<"getZone">>;
|
|
293
974
|
deleteZone(org: string, zone: string): Promise<void>;
|
|
294
975
|
/**
|
|
295
|
-
*
|
|
296
|
-
*
|
|
976
|
+
* Replaces one rrset **whole**. `records` is the complete new set for that
|
|
977
|
+
* (name, type), so adding a single value means sending the current ones with
|
|
978
|
+
* it.
|
|
297
979
|
*/
|
|
298
980
|
putRRset(org: string, zone: string, name: string, type: RRsetType, ttl: number, records: string[]): Promise<Ok<"putRRset">>;
|
|
299
981
|
deleteRRset(org: string, zone: string, name: string, type: RRsetType): Promise<void>;
|
|
300
982
|
setZoneDNSSEC(org: string, zone: string, enabled: boolean): Promise<Ok<"setZoneDNSSEC">>;
|
|
301
983
|
setZoneDS(org: string, zone: string, ds: string[]): Promise<Ok<"setZoneDS">>;
|
|
302
|
-
/**
|
|
984
|
+
/** The shared prefix of the DNS surface. */
|
|
303
985
|
private dnsPath;
|
|
304
|
-
/** `@`
|
|
986
|
+
/** Both `@` and `*` arrive as a name. Keeps the same string out of four places. */
|
|
305
987
|
private rrsetPath;
|
|
306
988
|
/**
|
|
307
|
-
*
|
|
989
|
+
* Looks a name up (member or above).
|
|
308
990
|
*
|
|
309
|
-
* `priceCents`
|
|
310
|
-
*
|
|
311
|
-
*
|
|
991
|
+
* `priceCents` is the first year of registration; `renewalCents` is one year
|
|
992
|
+
* of renewal. They are separate because a first-year discount is common —
|
|
993
|
+
* folded into one, the screen cannot say "buy it for $1, then $15 next year".
|
|
312
994
|
*/
|
|
313
995
|
checkDomains(org: string, names: string[]): Promise<Ok<"checkDomains">>;
|
|
314
996
|
/**
|
|
315
|
-
*
|
|
997
|
+
* Buys a domain (admin — this spends money).
|
|
316
998
|
*
|
|
317
|
-
* **ICANN
|
|
318
|
-
*
|
|
999
|
+
* **The ICANN verification mail goes to `contact.email`.** The screen has to
|
|
1000
|
+
* say so before the purchase (docs/domains.md §5.5).
|
|
319
1001
|
*
|
|
320
|
-
*
|
|
321
|
-
*
|
|
1002
|
+
* Sending the same request again is safe — a finished domain comes back
|
|
1003
|
+
* unchanged, and a purchase that stopped part way resumes from where it
|
|
1004
|
+
* stopped.
|
|
322
1005
|
*/
|
|
323
1006
|
purchaseDomain(org: string, body: {
|
|
324
1007
|
name: string;
|
|
@@ -326,31 +1009,88 @@ export declare class Client {
|
|
|
326
1009
|
contact: DomainContact;
|
|
327
1010
|
projectId?: string;
|
|
328
1011
|
}): Promise<Ok<"purchaseDomain">>;
|
|
329
|
-
/**
|
|
1012
|
+
/** Imports a domain you already own (admin). Creates the zone only; the registrar is not called. */
|
|
330
1013
|
importDomain(org: string, name: string): Promise<Ok<"importDomain">>;
|
|
331
1014
|
listDomains(org: string): Promise<Ok<"listDomains">>;
|
|
332
1015
|
getDomain(org: string, name: string): Promise<Ok<"getDomain">>;
|
|
333
1016
|
renewDomain(org: string, name: string, years: number): Promise<Ok<"renewDomain">>;
|
|
334
1017
|
/**
|
|
335
|
-
*
|
|
1018
|
+
* Changes only the **intent** to auto-renew.
|
|
336
1019
|
*
|
|
337
|
-
*
|
|
338
|
-
*
|
|
339
|
-
*
|
|
1020
|
+
* Auto-renew at the registrar stays on — a domain is an asset you lose if you
|
|
1021
|
+
* are a day late, so we renew first and bill afterwards. The screen has to say
|
|
1022
|
+
* this alongside.
|
|
340
1023
|
*/
|
|
341
1024
|
setDomainAutoRenew(org: string, name: string, enabled: boolean): Promise<Ok<"setDomainAutoRenew">>;
|
|
342
1025
|
setDomainLock(org: string, name: string, locked: boolean): Promise<Ok<"setDomainLock">>;
|
|
343
|
-
/**
|
|
1026
|
+
/** The transfer auth code. The audit records that one was issued and **not the code itself**. */
|
|
344
1027
|
domainAuthCode(org: string, name: string): Promise<Ok<"getDomainAuthCode">>;
|
|
345
|
-
/**
|
|
1028
|
+
/** Re-reads from the registrar right now (member). */
|
|
346
1029
|
syncDomain(org: string, name: string): Promise<Ok<"syncDomain">>;
|
|
347
|
-
/**
|
|
1030
|
+
/** The shared prefix of the domain surface. Keeps the same string out of ten places. */
|
|
348
1031
|
private domainsPath;
|
|
349
1032
|
private domainPath;
|
|
350
|
-
/**
|
|
1033
|
+
/** The shared prefix of the project surface. */
|
|
351
1034
|
private projectPath;
|
|
352
|
-
/**
|
|
1035
|
+
/** The shared prefix of the database surface. Keeps the same string out of five places. */
|
|
353
1036
|
private dbPath;
|
|
1037
|
+
listRepos(org: string, project: string): Promise<Ok<"listRepos">>;
|
|
1038
|
+
createRepo(org: string, project: string, body: {
|
|
1039
|
+
name: string;
|
|
1040
|
+
visibility?: RepoVisibility | undefined;
|
|
1041
|
+
defaultBranch?: string | undefined;
|
|
1042
|
+
}): Promise<Ok<"createRepo">>;
|
|
1043
|
+
getRepo(org: string, project: string, name: string): Promise<Ok<"getRepo">>;
|
|
1044
|
+
updateRepo(org: string, project: string, name: string, body: {
|
|
1045
|
+
name?: string | undefined;
|
|
1046
|
+
visibility?: RepoVisibility | undefined;
|
|
1047
|
+
defaultBranch?: string | undefined;
|
|
1048
|
+
}): Promise<void>;
|
|
1049
|
+
deleteRepo(org: string, project: string, name: string): Promise<void>;
|
|
1050
|
+
/** The ref history. The lead for recovering a commit lost to a force-push is here. */
|
|
1051
|
+
listRefUpdates(org: string, project: string, name: string): Promise<Ok<"listRefUpdates">>;
|
|
1052
|
+
getDeployHook(org: string, project: string, name: string): Promise<Ok<"getDeployHook">>;
|
|
1053
|
+
setDeployHook(org: string, project: string, name: string, body: {
|
|
1054
|
+
enabled?: boolean | undefined;
|
|
1055
|
+
branch?: string | undefined;
|
|
1056
|
+
rootDir?: string | undefined;
|
|
1057
|
+
}): Promise<Ok<"setDeployHook">>;
|
|
1058
|
+
deleteDeployHook(org: string, project: string, name: string): Promise<void>;
|
|
1059
|
+
/** Build a commit without pushing. Omit `commitSha` for the hooked branch's tip. */
|
|
1060
|
+
deployRepoNow(org: string, project: string, name: string, commitSha?: string): Promise<Ok<"deployRepoNow">>;
|
|
1061
|
+
listBuilds(org: string, project: string, limit?: number): Promise<Ok<"listBuilds">>;
|
|
1062
|
+
getBuild(org: string, project: string, buildId: string): Promise<Ok<"getBuild">>;
|
|
1063
|
+
/**
|
|
1064
|
+
* A build's output. It comes back as **text**, not JSON — see the endpoint's
|
|
1065
|
+
* description. `json()` would try to parse it and fail on the first line.
|
|
1066
|
+
*/
|
|
1067
|
+
getBuildLog(org: string, project: string, buildId: string): Promise<string>;
|
|
1068
|
+
cancelBuild(org: string, project: string, buildId: string): Promise<void>;
|
|
1069
|
+
listSSHKeys(): Promise<Ok<"listSSHKeys">>;
|
|
1070
|
+
addSSHKey(publicKey: string, name?: string): Promise<Ok<"addSSHKey">>;
|
|
1071
|
+
deleteSSHKey(keyId: string): Promise<void>;
|
|
1072
|
+
listAccessTokens(): Promise<Ok<"listAccessTokens">>;
|
|
1073
|
+
/** The plaintext is carried in this response **once** and never again. */
|
|
1074
|
+
createAccessToken(body: {
|
|
1075
|
+
name: string;
|
|
1076
|
+
/** 0032's single-valued field. `scopes` is the one to send. */
|
|
1077
|
+
scope?: TokenScope | undefined;
|
|
1078
|
+
scopes?: readonly ApiScope[] | undefined;
|
|
1079
|
+
/** Restrict the token to one org, and optionally to one project inside it. */
|
|
1080
|
+
org?: string | undefined;
|
|
1081
|
+
project?: string | undefined;
|
|
1082
|
+
ttlHours?: number | undefined;
|
|
1083
|
+
/** Days until expiry. The server defaults to 90 and refuses more than 365. */
|
|
1084
|
+
expiresInDays?: number | undefined;
|
|
1085
|
+
noExpiry?: boolean | undefined;
|
|
1086
|
+
}): Promise<Ok<"createAccessToken">>;
|
|
1087
|
+
revokeAccessToken(tokenId: string): Promise<void>;
|
|
1088
|
+
getRepoRefs(org: string, project: string, name: string): Promise<Ok<"getRepoRefs">>;
|
|
1089
|
+
getRepoTree(org: string, project: string, name: string, ref?: string, path?: string): Promise<Ok<"getRepoTree">>;
|
|
1090
|
+
getRepoBlob(org: string, project: string, name: string, ref?: string, path?: string): Promise<Ok<"getRepoBlob">>;
|
|
1091
|
+
getRepoCommits(org: string, project: string, name: string, ref?: string, limit?: number): Promise<Ok<"getRepoCommits">>;
|
|
1092
|
+
/** The shared prefix of the repository surface. It sits under the project (§19). */
|
|
1093
|
+
private repoPath;
|
|
354
1094
|
rollback(org: string, name: string, version: number): Promise<Ok<"rollback">>;
|
|
355
1095
|
}
|
|
356
1096
|
//# sourceMappingURL=index.d.ts.map
|