@runlot/api 0.1.0-rc.12 → 0.1.0-rc.121

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 CHANGED
@@ -3,10 +3,11 @@ export type { components, paths, operations } from "./schema.js";
3
3
  export declare const API_VERSION: "v1";
4
4
  type Schemas = components["schemas"];
5
5
  /**
6
- * 오퍼레이션의 성공 응답 본문.
6
+ * The success response body of an operation.
7
7
  *
8
- * 메서드 반환형을 손으로 적지 않는 이유는, 손으로 적으면 스펙이 바뀌어도
9
- * 컴파일이 통과하기 때문이다 — 그 어긋남은 런타임에 `undefined` 로 나타난다.
8
+ * We do not write the method return types by hand because a hand-written type
9
+ * still compiles after the spec changes — and that drift shows up at runtime as
10
+ * `undefined`.
10
11
  */
11
12
  type Ok<K extends keyof operations> = operations[K]["responses"] extends {
12
13
  200: {
@@ -29,12 +30,46 @@ type Ok<K extends keyof operations> = operations[K]["responses"] extends {
29
30
  } ? B : never;
30
31
  export type Session = Schemas["Session"];
31
32
  export type User = Schemas["User"];
33
+ export type AuthEmailAccepted = Schemas["AuthEmailAccepted"];
34
+ export type TotpStatus = Schemas["TotpStatus"];
35
+ export type TotpEnrollment = Schemas["TotpEnrollment"];
32
36
  export type Org = Schemas["Org"];
33
37
  export type Project = Schemas["Project"];
34
38
  export type ProjectDetail = Schemas["ProjectDetail"];
35
39
  export type Placement = Schemas["Placement"];
36
40
  export type Deployment = Schemas["Deployment"];
41
+ export type Preview = Schemas["Preview"];
42
+ export type PreviewState = NonNullable<Preview["state"]>;
43
+ export type PreviewDbMode = NonNullable<Preview["dbMode"]>;
44
+ /**
45
+ * What `createDeployment` answers to a `?preview=` upload.
46
+ *
47
+ * The extra field is written here rather than in the 201 response schema because
48
+ * the schema is `Deployment` — shared with `listDeployments`, `rollback` and the
49
+ * overview, none of which have a preview to report. Widening it there would put an
50
+ * optional `preview` on every deployment a reader ever sees, which reads as "a
51
+ * deployment may belong to a preview" instead of "this one call returns the
52
+ * preview it just made". `proto/openapi.yaml` `createDeployment` says the same
53
+ * thing in prose.
54
+ */
55
+ export type DeployedPreview = Deployment & {
56
+ preview?: Preview;
57
+ };
58
+ export type ProjectOverview = Schemas["ProjectOverview"];
59
+ export type OverviewDeployment = Schemas["OverviewDeployment"];
37
60
  export type Manifest = Schemas["Manifest"];
61
+ export type CronOverview = Schemas["CronOverview"];
62
+ export type CronSchedule = Schemas["CronSchedule"];
63
+ export type CronRun = Schemas["CronRun"];
64
+ export type CronSummary = Schemas["CronSummary"];
65
+ export type QueueOverview = Schemas["QueueOverview"];
66
+ export type QueueStatus = Schemas["QueueStatus"];
67
+ export type QueueRun = Schemas["QueueRun"];
68
+ export type QueueDepth = Schemas["QueueDepth"];
69
+ export type QueueMessage = Schemas["QueueMessage"];
70
+ export type DurableObjectUsage = Schemas["DurableObjectUsage"];
71
+ export type VectorOverview = Schemas["VectorOverview"];
72
+ export type VectorNamespace = Schemas["VectorNamespace"];
38
73
  export type DatabaseConnect = Schemas["DatabaseConnect"];
39
74
  export type DatabaseEndpoint = Schemas["DatabaseEndpoint"];
40
75
  export type DatabaseToken = Schemas["DatabaseToken"];
@@ -47,35 +82,90 @@ export type GenerationRow = Schemas["GenerationRow"];
47
82
  export type OperationStarted = Schemas["OperationStarted"];
48
83
  export type Operation = Schemas["Operation"];
49
84
  export type ErrorEnvelope = Schemas["Error"];
85
+ export type License = Schemas["License"];
86
+ export type LicenseState = License["state"];
50
87
  export type Role = Schemas["Role"];
51
88
  export type Member = Schemas["Member"];
89
+ export type Invite = Schemas["Invite"];
90
+ export type OrgHolding = Schemas["OrgHolding"];
91
+ export type InviteView = Schemas["InviteView"];
92
+ export type InviteState = Schemas["InviteState"];
52
93
  export type SecretMeta = Schemas["SecretMeta"];
53
94
  export type SecretList = Schemas["SecretList"];
54
95
  export type LogEvent = Schemas["LogEvent"];
96
+ export type LogHistoryLine = {
97
+ ts: string;
98
+ seq: number;
99
+ epoch?: number;
100
+ generation?: number;
101
+ stream: "stdout" | "stderr" | "runlot";
102
+ line: string;
103
+ };
104
+ export type LogHistoryPage = {
105
+ lines: LogHistoryLine[];
106
+ /** Absent means there is nothing older. */
107
+ cursor?: string | undefined;
108
+ keepDays: number;
109
+ linesPerDay: number;
110
+ };
55
111
  export type Usage = Schemas["Usage"];
112
+ export type ExecuteResult = Schemas["ExecuteResult"];
56
113
  export type StorageStatus = Schemas["StorageStatus"];
114
+ export type BillingStatus = Schemas["BillingStatus"];
115
+ export type PlanLimits = Schemas["PlanLimits"];
116
+ export type EmailStatus = Schemas["EmailStatus"];
117
+ export type EmailDomain = Schemas["EmailDomain"];
118
+ export type EmailDNSRecord = Schemas["EmailDNSRecord"];
119
+ export type EmailDomainState = NonNullable<EmailDomain["state"]>;
120
+ export type MailLogEntry = Schemas["MailLogEntry"];
121
+ export type MailLogPage = Schemas["MailLogPage"];
122
+ export type Repo = Schemas["Repo"];
123
+ export type RepoVisibility = NonNullable<Repo["visibility"]>;
124
+ export type DeployHook = Schemas["DeployHook"];
125
+ export type Build = Schemas["Build"];
126
+ export type BuildState = NonNullable<Build["state"]>;
127
+ export type RefUpdate = Schemas["RefUpdate"];
128
+ export type SSHKey = Schemas["SSHKey"];
129
+ export type AccessToken = Schemas["AccessToken"];
130
+ export type AccessTokenCreated = Schemas["AccessTokenCreated"];
131
+ export type TokenScope = NonNullable<AccessToken["scope"]>;
132
+ /**
133
+ * One name from the REST scope vocabulary (0067).
134
+ *
135
+ * `TokenScope` above is the **git** verdict and stays two-valued; this is the
136
+ * set a token actually carries. Keeping the two names apart is what stops the
137
+ * git front end and the REST middleware from drifting into one another.
138
+ */
139
+ export type ApiScope = Schemas["ApiScope"];
140
+ export declare const API_SCOPES: readonly ApiScope[];
141
+ export type RepoRefs = Schemas["RepoRefs"];
142
+ export type RepoRef = RepoRefs["refs"][number];
143
+ export type RepoTree = Schemas["RepoTree"];
144
+ export type RepoTreeEntry = Schemas["RepoTreeEntry"];
145
+ export type RepoBlob = Schemas["RepoBlob"];
146
+ export type RepoCommit = Schemas["RepoCommit"];
57
147
  export type AccessPolicy = Schemas["AccessPolicy"];
58
148
  export type AccessBypass = Schemas["AccessBypass"];
59
149
  export type AccessAuthorize = Schemas["AccessAuthorize"];
60
- /** 정책 셋. 라디오 셋이 이 유니온에 붙는다 (docs/access.md §3.1). */
150
+ /** The three policies. The three radio buttons hang off this union (docs/access.md §3.1). */
61
151
  export type AccessMode = NonNullable<AccessPolicy["mode"]>;
62
152
  export type UsageRow = Schemas["UsageRow"];
63
153
  export type Notification = Schemas["Notification"];
64
- /** 알림 종류. 대시보드의 라벨 표가 이 유니온에 붙는다 (§3.1). */
154
+ /** The notification kinds. The dashboard's label table hangs off this union (§3.1). */
65
155
  export type NotificationKind = NonNullable<Notification["kind"]>;
66
156
  export type AuthStatus = Schemas["AuthStatus"];
67
157
  export type AuthSettings = Schemas["AuthSettings"];
68
158
  export type AuthBrand = Schemas["AuthBrand"];
69
159
  export type AuthProviderMeta = Schemas["AuthProviderMeta"];
70
- /** 프로바이더 셋. 화면의 행과 CLI 의 인자가 이 유니온에 붙는다. */
160
+ /** The three providers. The rows on screen and the CLI's argument hang off this union. */
71
161
  export type AuthProvider = Schemas["AuthProvider"];
72
- /** PATCH 의 본문 — `AuthSettings` 의 부분집합. 준 칸만 바뀐다. */
162
+ /** The PATCH body — a subset of `AuthSettings`. Only the fields given change. */
73
163
  export type AuthSettingsInput = NonNullable<Schemas["AuthSettingsPatch"]["settings"]>;
74
164
  export type Hostname = Schemas["Hostname"];
75
165
  export type HostnameList = Schemas["HostnameList"];
76
166
  export type HostnameVerify = Schemas["HostnameVerify"];
77
167
  export type HostnameRecord = Schemas["HostnameRecord"];
78
- /** 상태 넷. 화면의 배지가 이 값에 붙는다 (docs/domains.md §3.3). */
168
+ /** The four states. The badge on screen hangs off this value (docs/domains.md §3.3). */
79
169
  export type HostnameState = NonNullable<Hostname["state"]>;
80
170
  export type Zone = Schemas["Zone"];
81
171
  export type ZoneDetail = Schemas["ZoneDetail"];
@@ -87,9 +177,9 @@ export type DomainList = Schemas["DomainList"];
87
177
  export type DomainAvailability = Schemas["DomainAvailability"];
88
178
  export type DomainContact = Schemas["DomainContact"];
89
179
  export type DomainEvent = Schemas["DomainEvent"];
90
- /** `Domain["state"]` 을 따로 내보낸다 — 화면이 배지 표를 이 유니온으로 못박는다. */
180
+ /** `Domain["state"]` is exported separately — the screen pins its badge table to this union. */
91
181
  export type DomainState = Domain["state"];
92
- /** 서버가 돌려준 오류 봉투를 그대로 들고 있는 예외. */
182
+ /** The exception that carries the server's error envelope unchanged. */
93
183
  export declare class ApiError extends Error {
94
184
  readonly status: number;
95
185
  readonly code: string;
@@ -105,220 +195,659 @@ export declare class Client {
105
195
  constructor(opts: ClientOptions);
106
196
  private headers;
107
197
  private request;
198
+ /** A body that is not JSON (the raw mail). Error handling is the same as request. */
199
+ private text;
108
200
  private json;
109
201
  devLogin(subject: string): Promise<Ok<"devLogin">>;
110
- /** 켜진 로그인 방식. 로그인 화면이 버튼을 그리는 데 쓴다. */
111
- authProviders(): Promise<Ok<"listAuthProviders">>;
112
202
  /**
113
- * GitHub OAuth 시작 URL. 브라우저가 따라가는 302 라 fetch 로 부르지 않고
114
- * `window.location` 에 넣는다. `redirect` 는 서버 허용 목록에 있어야 한다.
203
+ * Takes the sign-up and sends the confirmation mail. Neither a session nor a
204
+ * password is created here — the password is chosen in `verifyEmail` by
205
+ * whoever opens the mailbox.
206
+ */
207
+ passwordSignUp(email: string, name?: string): Promise<Ok<"passwordSignUp">>;
208
+ passwordSignIn(email: string, password: string): Promise<Ok<"passwordSignIn">>;
209
+ /** The same accepted response comes back whether or not the email exists. */
210
+ passwordForgot(email: string): Promise<Ok<"passwordForgot">>;
211
+ passwordReset(token: string, password: string): Promise<Ok<"passwordReset">>;
212
+ /** Uses the confirmation link and sets the account's first password. */
213
+ verifyEmail(token: string, password: string): Promise<Ok<"verifyEmail">>;
214
+ /**
215
+ * Finishes a sign-in that came back `{mfa:"totp"}`.
216
+ *
217
+ * Callable without a token: `pending` is the credential, and it is not a
218
+ * session — no other endpoint accepts it.
219
+ */
220
+ completeTotpLogin(pending: string, factor: {
221
+ code: string;
222
+ } | {
223
+ recovery: string;
224
+ }): Promise<Ok<"completeTotpLogin">>;
225
+ /** This account's two-factor state, including which orgs require it. */
226
+ getTotp(): Promise<Ok<"getTotp">>;
227
+ /**
228
+ * Draws a secret to scan. It does **not** turn the factor on — `confirmTotp`
229
+ * does, after the app has proved it can produce a code.
230
+ */
231
+ enrollTotp(): Promise<Ok<"enrollTotp">>;
232
+ /** Turns the factor on and hands back the ten recovery codes. They are shown once. */
233
+ confirmTotp(code: string): Promise<Ok<"confirmTotp">>;
234
+ /** Turns it off. A code or a recovery code is required — the session alone is not. */
235
+ disableTotp(factor: {
236
+ code: string;
237
+ } | {
238
+ recovery: string;
239
+ }): Promise<void>;
240
+ /**
241
+ * The GitHub OAuth start URL. It is a 302 the browser follows, so it goes into
242
+ * `window.location` rather than being called with fetch. `redirect` has to be
243
+ * on the server's allow-list.
115
244
  */
116
245
  githubStartUrl(redirect: string): string;
246
+ /** The Google OAuth start URL. Uses the same dashboard callback shape as GitHub. */
247
+ googleStartUrl(redirect: string): string;
248
+ /**
249
+ * The generic OIDC start URL (docs/onprem-delivery.md §7.7). Same 302-and-fragment
250
+ * shape as the other two; which provider is behind it is the installation's choice.
251
+ */
252
+ oidcStartUrl(redirect: string): string;
253
+ /**
254
+ * Does this deployment federate an identity provider?
255
+ *
256
+ * **There is no endpoint that answers "which logins are on"** — one existed and was
257
+ * deleted, because its only reader was the login screen and it put a round trip in
258
+ * front of every login button (cp/internal/public/public.go). This is not that
259
+ * endpoint coming back: cp-public **does not register** the two OIDC routes when no
260
+ * issuer is configured, so the mux's own 404 is the answer, and the probe is a HEAD
261
+ * that no handler runs.
262
+ *
263
+ * Any other status means the route is there — a 400 (this probe carries no
264
+ * `redirect`) or a 502 (the provider's discovery document could not be read) both say
265
+ * the handler exists, and a button that leads to a readable error beats no button.
266
+ * A network failure answers false: on SaaS, where the answer is false anyway, a dead
267
+ * API address must not draw a login that cannot work.
268
+ */
269
+ oidcAvailable(): Promise<boolean>;
270
+ /**
271
+ * This installation's licence (docs/onprem-delivery.md §6.5). Readable by any
272
+ * signed-in user: the footer it feeds is on every page for everybody.
273
+ *
274
+ * On SaaS it answers `onPrem: false` rather than 404, so the caller has one shape to
275
+ * read and the surfaces draw nothing on the flag.
276
+ */
277
+ license(): Promise<Ok<"getLicense">>;
278
+ /**
279
+ * The names of this deployment (app domain, docs address). Callable without auth.
280
+ *
281
+ * This exists so the dashboard does not hard-code a domain into the screen
282
+ * (docs/environments.md §3.2) — hard-coded, the dev screen tells people a
283
+ * production address, and because that address opens, nobody ever says it is
284
+ * wrong.
285
+ */
286
+ siteConfig(): Promise<Ok<"getSiteConfig">>;
117
287
  me(): Promise<Ok<"getMe">>;
118
288
  listOrgs(): Promise<Ok<"listOrgs">>;
289
+ /** Changes the display name only (admin). The slug is the name that becomes an address, so it is not on this surface. */
290
+ /**
291
+ * `requireTotp` is left out when it is not given, on purpose: the server reads
292
+ * an absent field as "leave it alone". Sending `false` by default would mean a
293
+ * rename silently switched the org's second-factor requirement off.
294
+ */
295
+ updateOrg(org: string, name: string, requireTotp?: boolean): Promise<Ok<"updateOrg">>;
296
+ /**
297
+ * Deletes the organization (admin). **This cannot be undone.**
298
+ *
299
+ * `confirm` has to be the organization slug exactly — the confirmation lives on
300
+ * the server because three places call this surface (the screen, the CLI, and
301
+ * scripts). If a live project, domain, repository, or DNS zone is left, it is a
302
+ * 409 `org_not_empty` and `details.holdings` says what is left — **projects
303
+ * already deleted are not counted.**
304
+ *
305
+ * The `purgeAfter` in the answer is when the rows actually disappear. By the
306
+ * moment it returns the organization is already gone from every surface; what
307
+ * remains is retention until that time.
308
+ */
309
+ deleteOrg(org: string, confirm: string): Promise<Ok<"deleteOrg">>;
119
310
  createOrg(slug: string, name: string): Promise<Ok<"createOrg">>;
120
311
  /**
121
- * org 의 최근 알림 (docs/limits.md §3.4).
312
+ * The organization's recent notifications (docs/limits.md §3.4).
122
313
  *
123
- * `sentAt` 이 없는 행은 아직 큐에 있거나 받을 이메일이 없는 것이다 — 후자에게
124
- * 이 목록이 유일한 통로라, 화면은 두 상태를 같게 그린다.
314
+ * A row with no `sentAt` is either still queued or has no email address to
315
+ * reach — and for the second, this list is the only channel, so the screen
316
+ * draws both states the same way.
125
317
  */
126
318
  listNotifications(org: string, limit?: number): Promise<Ok<"listNotifications">>;
319
+ /**
320
+ * The plan and billing state (docs/billing.md). If `enabled` is false, this
321
+ * deployment has no billing — the screen shows only a contact address.
322
+ */
323
+ getBilling(org: string): Promise<Ok<"getBilling">>;
324
+ /**
325
+ * A Pro checkout session. Send the browser to the `url` that comes back. Even
326
+ * once payment finishes, the thing that changes the plan is the webhook, so
327
+ * read `getBilling` again after the browser returns.
328
+ */
329
+ createBillingCheckout(org: string, returnTo: string): Promise<Ok<"createBillingCheckout">>;
330
+ /** A one-time `url` for the customer portal (payment method, receipts, cancellation). */
331
+ createBillingPortal(org: string, returnTo: string): Promise<Ok<"createBillingPortal">>;
332
+ /** The customer session token for the payment-method embed (1 hour). An org with no payment history gets a 404. */
333
+ createBillingSession(org: string): Promise<Ok<"createBillingSession">>;
334
+ /** Schedules cancellation at the end of the period (`cancel: true`), or undoes it. There is no immediate revocation. */
335
+ cancelBilling(org: string, body: {
336
+ cancel: boolean;
337
+ reason?: string;
338
+ comment?: string;
339
+ }): Promise<Ok<"cancelBilling">>;
127
340
  listProjects(org: string): Promise<Ok<"listProjects">>;
128
341
  createProject(org: string, name: string): Promise<Ok<"createProject">>;
129
342
  getProject(org: string, name: string): Promise<Ok<"getProject">>;
343
+ /**
344
+ * Renames the project (admin). **The default address moves with it and there is
345
+ * no alias** — which is why the response carries the new address. Unlike the
346
+ * org slug, this name can change because it is the inner label of the org
347
+ * wildcard certificate.
348
+ */
349
+ updateProject(org: string, name: string, next: string): Promise<Ok<"updateProject">>;
350
+ /**
351
+ * Starts tearing the project down (admin). **This cannot be undone and leaves
352
+ * no recovery generation.** `confirm` has to be the project name exactly.
353
+ */
354
+ deleteProject(org: string, name: string, confirm: string): Promise<Ok<"deleteProject">>;
355
+ /**
356
+ * Disables a project (admin): it stops serving and taking new backups, and
357
+ * keeps everything it has. A project disabled for a year is deleted for good.
358
+ */
359
+ disableProject(org: string, name: string): Promise<Ok<"disableProject">>;
360
+ /** Enables a disabled project (admin). 409 `project_limit` when there is no room for it. */
361
+ enableProject(org: string, name: string): Promise<Ok<"enableProject">>;
362
+ /** Watches the teardown operation to its end even after the project is gone. */
363
+ getOrgOperation(org: string, opId: string): Promise<Ok<"getOrgOperation">>;
364
+ /** Everything the project's first screen takes in one call. Usage calls `getUsage` alongside it. */
365
+ getProjectOverview(org: string, name: string): Promise<Ok<"getProjectOverview">>;
130
366
  listDeployments(org: string, name: string): Promise<Ok<"listDeployments">>;
131
- /** 본문이 곧 번들이다. 다이제스트 하나가 코드와 자산 전부를 덮는다. */
132
- deploy(org: string, name: string, bundle: Uint8Array): Promise<Ok<"createDeployment">>;
133
- /** 멱등이다. 두 번 불러도 비밀번호는 굴지 않고 같은 접속 정보가 온다. */
367
+ /**
368
+ * One deployment, with `migrations` when the control plane applied its
369
+ * `migrations/` — which today means a preview deployed with `db=branch`
370
+ * (docs/studio.md §6.6 step 2).
371
+ *
372
+ * A preview's deployment is read under **the parent project's name**, the name
373
+ * the caller deployed through: the preview is a project of its own, but the
374
+ * caller never learns its name.
375
+ */
376
+ getDeployment(org: string, name: string, deploymentId: string): Promise<Ok<"getDeployment">>;
377
+ /**
378
+ * Scheduled runs: what the live deployment declares, when each fires next, and
379
+ * the recent history (docs/cron.md §8). `limit` bounds the history rows only —
380
+ * the schedules and the per-schedule last run are never paged.
381
+ */
382
+ getProjectCron(org: string, name: string, limit?: number): Promise<Ok<"getProjectCron">>;
383
+ /**
384
+ * Queues: what the live deployment declares, how deep each one is, and the
385
+ * recent batch history (docs/queues.md §6). The depth is read from the
386
+ * project's own database; `depthError` on the answer says when it could not be.
387
+ */
388
+ getProjectQueues(org: string, name: string, limit?: number): Promise<Ok<"getProjectQueues">>;
389
+ /**
390
+ * Durable Objects: how many this project has placed, against the two caps
391
+ * (docs/durable-objects.md).
392
+ *
393
+ * **It answers how much, never which.** There is no actor id in the response
394
+ * and none is coming — those name individual objects, and a list of them would
395
+ * be an object enumeration wearing a quota's name. `nodes` is keyed by node id
396
+ * because `nodeLimit` is a separate bound that can refuse a placement while
397
+ * the project-wide cap still has room.
398
+ */
399
+ getProjectDurableObjects(org: string, name: string): Promise<Ok<"getProjectDurableObjects">>;
400
+ private queuePath;
401
+ listQueueRuns(org: string, name: string, queue: string, limit?: number): Promise<Ok<"listQueueRuns">>;
402
+ /** The head of the queue without leasing it — looking cannot delay a delivery. */
403
+ peekQueue(org: string, name: string, queue: string, limit?: number): Promise<Ok<"peekQueue">>;
404
+ /** Irreversible. The confirmation is the caller's — the server holds none. */
405
+ purgeQueue(org: string, name: string, queue: string): Promise<Ok<"purgeQueue">>;
406
+ /**
407
+ * Moves a dead-letter queue's messages back. `to` is required only when the
408
+ * dead-letter queue belongs to more than one consumer, or to none.
409
+ */
410
+ redriveQueue(org: string, name: string, queue: string, to?: string): Promise<Ok<"redriveQueue">>;
411
+ /**
412
+ * The vector store: every namespace with its count and width, and the plan's
413
+ * bounds (docs/vectors.md §4). Read from the project's own database;
414
+ * `readError` on the answer says when it could not be.
415
+ */
416
+ getProjectVectors(org: string, name: string): Promise<Ok<"getProjectVectors">>;
417
+ /** Irreversible. The confirmation is the caller's — the server holds none. */
418
+ deleteVectorNamespace(org: string, name: string, namespace: string): Promise<Ok<"deleteVectorNamespace">>;
419
+ /** The body is the bundle. One digest covers all of the code and the assets. */
420
+ /**
421
+ * Uploads the bundle. `headers` carries the provenance headers
422
+ * (`X-Runlot-Git-*`, openapi createDeployment) — the body is the bundle
423
+ * itself, so the metadata can only travel in headers.
424
+ */
425
+ deploy(org: string, name: string, bundle: Uint8Array, headers?: Record<string, string>): Promise<Ok<"createDeployment">>;
426
+ /**
427
+ * The same upload, aimed at a preview (docs/preview.md). **It does not move
428
+ * production's live pointer** — that is the whole difference, and it is why
429
+ * this is a named method rather than an optional argument on `deploy`: a
430
+ * caller that forgets the argument deploys to production.
431
+ *
432
+ * `db` picks what `env.db` points at (`branch` by default, `shared` at
433
+ * production's own database, `none` for no database), and `from` pours the
434
+ * branch from a named generation instead of the newest one.
435
+ */
436
+ deployPreview(org: string, name: string, bundle: Uint8Array, opts: {
437
+ preview: string;
438
+ db?: string | undefined;
439
+ from?: string | undefined;
440
+ }, headers?: Record<string, string>): Promise<DeployedPreview>;
441
+ /** The parent's live previews (viewer). A deleted preview is not listed. */
442
+ listPreviews(org: string, name: string): Promise<Ok<"listPreviews">>;
443
+ /**
444
+ * Deletes a preview and its branch (member).
445
+ *
446
+ * No confirmation string, unlike `deleteProject`: a branch is a copy taken at a
447
+ * moment and nothing in it is the only copy of anything.
448
+ */
449
+ deletePreview(org: string, name: string, preview: string): Promise<void>;
450
+ /**
451
+ * Makes the preview's artifact the parent's live deployment (member).
452
+ *
453
+ * **The code, never the data** (docs/preview.md §7). The branch is not merged
454
+ * and production's database is not replaced. The preview stays alive.
455
+ */
456
+ promotePreview(org: string, name: string, preview: string): Promise<Ok<"promotePreview">>;
457
+ /**
458
+ * The project's share link — `<label>.share.<app-domain>`, the one address
459
+ * Studio hands to somebody who is not a developer (docs/studio.md §6.9).
460
+ *
461
+ * 404 when the project has never been shared: a link is minted by
462
+ * `putShareLink`, never as a side effect of reading.
463
+ */
464
+ getShareLink(org: string, name: string): Promise<Ok<"getShareLink">>;
465
+ /**
466
+ * Points the share link at a preview, minting the label if there is none.
467
+ *
468
+ * Idempotent: the label is kept across shares, so somebody holding the link
469
+ * keeps working. `rotate` mints a new label and retires the old name in the
470
+ * same request ("링크 재발급"), so the project never has two live links.
471
+ */
472
+ putShareLink(org: string, name: string, opts?: {
473
+ preview?: string;
474
+ rotate?: boolean;
475
+ }): Promise<Ok<"putShareLink">>;
476
+ /** Stops the link answering and forgets the label. The preview keeps running. */
477
+ deleteShareLink(org: string, name: string): Promise<void>;
478
+ /** Idempotent. Called twice, the password is not rolled and the same connection details come back. */
134
479
  createDatabase(org: string, name: string): Promise<Ok<"createDatabase">>;
135
480
  getDatabase(org: string, name: string): Promise<Ok<"getDatabase">>;
136
481
  /**
137
- * 접속 자격까지. `getDatabase` 와 라우트가 갈린 것은 역할 때문이다 —
138
- * viewer 는 여부를 알아도 되지만 비밀번호는 아니다 (proto/openapi.yaml).
482
+ * The connection credentials as well. The route is split from `getDatabase`
483
+ * because of roles — a viewer may know whether there is a database, but not
484
+ * the password (proto/openapi.yaml).
139
485
  */
140
486
  getDatabaseConnect(org: string, name: string): Promise<Ok<"getDatabaseConnect">>;
141
- /** 접속 끝점만 — 자격 없음. viewer 도 받는다. `runlot port-forward` 가 쓴다. */
487
+ /** The endpoint only — no credentials. A viewer gets it too. Used by `runlot port-forward`. */
142
488
  getDatabaseEndpoint(org: string, name: string): Promise<Ok<"getDatabaseEndpoint">>;
143
- /** 단기 기계 자격 발급. 비밀번호는 이 응답에만 실린다. */
489
+ /** Issues a short-lived machine credential. The password is carried in this response and nowhere else. */
144
490
  createDatabaseToken(org: string, name: string, ttlSeconds?: number): Promise<Ok<"createDatabaseToken">>;
145
491
  listDatabaseTokens(org: string, name: string): Promise<Ok<"listDatabaseTokens">>;
146
492
  deleteDatabaseToken(org: string, name: string, user: string): Promise<void>;
147
493
  /**
148
- * 진단 이미지를 하나 만든다.
494
+ * Makes one diagnostic image.
149
495
  *
150
- * **멱등이 아니다** — 부를 때마다 이미지가 하나 생긴다. 그리고 느리다:
151
- * 응답은 덤프가 끝난 뒤에 오고, 그동안 그 프로젝트의 액터는 붙잡혀 있다
152
- * (proto/openapi.yaml).
496
+ * **Not idempotent** — every call makes another image. And it is slow: the
497
+ * response comes after the dump finishes, and that project's actor is held
498
+ * for the whole of it (proto/openapi.yaml).
153
499
  */
154
500
  exportDatabase(org: string, name: string): Promise<Ok<"exportDatabase">>;
155
501
  /**
156
- * 복원이 고를 수 있는 세대 전부. 최신 순이고, `lastCheckedAt` 은 무변경
157
- * 스킵의 하트비트다 — 세대가 늘지 않는 것과 백업이 죽은 것을 가른다.
502
+ * Every generation a restore can choose, newest first. `lastCheckedAt` is the
503
+ * heartbeat of the no-change skip — it is what tells "no new generations"
504
+ * apart from "the backup is dead".
158
505
  */
159
506
  listGenerations(org: string, name: string): Promise<Ok<"listGenerations">>;
160
507
  /**
161
- * 세대로 되돌린다. **그 사이의 쓰기는 사라진다.**
508
+ * Runs one statement in the project's database (the dashboard console).
509
+ *
510
+ * `readOnly` is **omitted, not sent as false**, when the caller wants the safe
511
+ * mode: the server treats an absent field as read-only, so leaving it out is the
512
+ * one spelling that cannot be misread. Sending `false` is the explicit ask for
513
+ * write mode, and only then does the server run outside a transaction.
514
+ *
515
+ * SQL failures arrive as an `ApiError` whose body carries `details.sqlstate` —
516
+ * PostgreSQL's own code, which is what the error panel shows.
517
+ */
518
+ executeSQL(org: string, name: string, sql: string, opts?: {
519
+ readOnly?: boolean;
520
+ params?: unknown[];
521
+ }): Promise<Ok<"executeSQL">>;
522
+ /**
523
+ * Rolls back to a generation. **Writes made since then are lost.**
162
524
  *
163
- * 202 로 끝난다 — 돌아오는 것은 연산 id 이고, 진행은
164
- * `getDatabaseOperation` 으로 본다. `latest` 는 서버가 풀지 않는다:
165
- * 목록에서 고른 `(epoch, seq)` 를 그대로 싣는다 (proto/openapi.yaml).
525
+ * It ends at 202 — what comes back is an operation id, and progress is read
526
+ * through `getDatabaseOperation`. The server does not resolve `latest`: the
527
+ * `(epoch, seq)` chosen from the list is carried as-is (proto/openapi.yaml).
166
528
  */
167
529
  restoreDatabase(org: string, name: string, epoch: number, seq: number): Promise<Ok<"restoreDatabase">>;
168
530
  /**
169
- * 데이터베이스를 없앤다. `confirm` 은 프로젝트 이름과 **정확히** 같아야
170
- * 하고, 다르면 서버가 400 `confirm_mismatch` 로 거절한다.
531
+ * Rolls back to a restore point **inside** a backup (pg-feather docs/37):
532
+ * `txnId` is that commit, `at` is the last commit at or before that time. One
533
+ * backup carries the commits in between in order, so the place you can roll
534
+ * back to is not tied to a backup boundary. Everything else is as in
535
+ * restoreDatabase — 202, an operation id, and one safety backup before the
536
+ * rollback.
537
+ */
538
+ restoreDatabaseTo(org: string, name: string, target: {
539
+ txnId: number;
540
+ } | {
541
+ at: string;
542
+ }): Promise<Ok<"restoreDatabase">>;
543
+ /**
544
+ * Removes the database. `confirm` has to match the project name **exactly**;
545
+ * if it does not, the server refuses with 400 `confirm_mismatch`.
171
546
  */
172
547
  deleteDatabase(org: string, name: string, confirm: string): Promise<Ok<"deleteDatabase">>;
173
- /** 연산 하나의 진행. 연산 id 는 자격이 아니라 프로젝트 경로 아래에 있다. */
548
+ /** The progress of one operation. The operation id is not a credential; it lives under the project path. */
174
549
  getDatabaseOperation(org: string, name: string, opId: string): Promise<Ok<"getDatabaseOperation">>;
175
- /** 되돌릴 수 없는 phase 앞의 연산을 중단한다. */
550
+ /** Aborts an operation that has not yet reached a phase it cannot come back from. */
176
551
  abortDatabaseOperation(org: string, name: string, opId: string): Promise<Ok<"abortDatabaseOperation">>;
177
552
  /**
178
- * 로그 라이브 테일. **JSON 이 아니라 스트림**이라 `request` 를 안 지난다 —
179
- * 돌려주는 것은 줄 단위 `LogEvent` 의 async iterable 이고, `signal` 을 abort
180
- * 하면 연결이 끊긴다. 오류 응답(4xx/5xx)은 다른 메서드와 같은 `ApiError` 다.
553
+ * A live tail of the logs. It is **a stream, not JSON**, so it does not go
554
+ * through `request` — what comes back is an async iterable of line-by-line
555
+ * `LogEvent`, and aborting `signal` closes the connection. An error response
556
+ * (4xx/5xx) is the same `ApiError` as in every other method.
181
557
  */
182
558
  tailLogs(org: string, name: string, opts?: {
183
559
  tail?: number;
184
560
  follow?: boolean;
185
561
  signal?: AbortSignal;
186
562
  }): AsyncGenerator<LogEvent, void, undefined>;
563
+ /**
564
+ * The stored lane (0062). It is a plain JSON page, not a stream: the history
565
+ * does not reach a node, so it answers for a project that is cold, parked, or
566
+ * has moved since the lines were written — every one of which is a 409 on
567
+ * `tailLogs`.
568
+ *
569
+ * `q` is a plain substring, matched case-insensitively. It is not a regular
570
+ * expression — `%` and `_` match themselves.
571
+ *
572
+ * Paging is keyset: pass the `cursor` from a page back to get the next, older
573
+ * one. A page with no `cursor` is the end of what is kept.
574
+ */
575
+ getLogHistory(org: string, name: string, opts?: {
576
+ since?: string | undefined;
577
+ until?: string | undefined;
578
+ q?: string | undefined;
579
+ stream?: "stdout" | "stderr" | "runlot" | undefined;
580
+ limit?: number | undefined;
581
+ cursor?: string | undefined;
582
+ }): Promise<LogHistoryPage>;
187
583
  listSecrets(org: string, name: string): Promise<Ok<"listSecrets">>;
188
- /** 값은 이 호출로만 나간다. 어떤 응답에도 값은 없다. */
584
+ /** The value travels in this call only. It is in no response at all. */
189
585
  setSecret(org: string, name: string, secret: string, value: string): Promise<Ok<"setSecret">>;
190
586
  deleteSecret(org: string, name: string, secret: string): Promise<void>;
191
587
  getUsage(org: string, name: string, hours?: number): Promise<Ok<"getUsage">>;
192
- /** 부여 여부·접두·쿼터·사용량. `usedBytes` 는 노드 보고 주기만큼 늦다. */
588
+ /** Grant, prefix, quota, usage. `usedBytes` lags by the node's reporting interval. */
193
589
  getStorage(org: string, name: string): Promise<Ok<"getStorage">>;
194
590
  /**
195
- * 스토리지를 부여한다. 멱등이라 두 번 눌러도 접두는 그대로다. 접두·쿼터를
196
- * 인자로 받지 않는 것이 요점이다 — 접두는 격리의 경계이고 쿼터는 요금제가
197
- * 정한다 (proto/openapi.yaml).
591
+ * Grants storage. It is idempotent, so pressing twice leaves the prefix as it
592
+ * was. Taking neither the prefix nor the quota as an argument is the point —
593
+ * the prefix is the isolation boundary and the quota is set by the plan
594
+ * (proto/openapi.yaml).
198
595
  */
199
596
  grantStorage(org: string, name: string): Promise<Ok<"grantStorage">>;
200
- /** 부여를 뗀다. **객체는 지워지지 않는다** (docs/storage.md §7). */
597
+ /** Removes the grant. **The objects are not deleted** (docs/storage.md §7). */
201
598
  revokeStorage(org: string, name: string): Promise<void>;
202
599
  /**
203
- * 부여 여부·설정·프로바이더·호스트. **가입자는 안 온다** — 그 표는 프로젝트
204
- * DB 안이고 (docs/auth.md §6) 워커의 `env.auth` 만 본다.
600
+ * The key prefixes this project serves unsigned (docs/storage.md §4.7).
601
+ *
602
+ * A prefix is stored normalized — `assets` becomes `assets/`, and `/` becomes
603
+ * the empty string, which means every key. The value that comes back is the
604
+ * value that governs, so a screen must render the response rather than what
605
+ * the user typed.
606
+ */
607
+ listStoragePublic(org: string, name: string): Promise<Ok<"listStoragePublic">>;
608
+ /** Publishes a prefix. Idempotent. All three verbs answer with the whole list. */
609
+ addStoragePublic(org: string, name: string, prefix: string): Promise<Ok<"addStoragePublic">>;
610
+ /**
611
+ * Unpublishes a prefix. Idempotent.
612
+ *
613
+ * **The world keeps reading for up to a minute.** The object front caches the
614
+ * list, so this call is not a revocation that takes effect at the instant it
615
+ * returns — a screen that says "no longer public" the moment this resolves is
616
+ * telling a small lie.
617
+ */
618
+ removeStoragePublic(org: string, name: string, prefix: string): Promise<Ok<"removeStoragePublic">>;
619
+ /** Grant, address, sender, limits, recent counts. The address comes back as a preview even without a grant. */
620
+ getEmail(org: string, name: string): Promise<Ok<"getEmail">>;
621
+ /** Turns it on. **Idempotent** — we choose the address. The deploy reads `"email": true` and calls this. */
622
+ grantEmail(org: string, name: string): Promise<Ok<"grantEmail">>;
623
+ /** Turns it off. Mail arriving at that address now gets a 550. */
624
+ revokeEmail(org: string, name: string): Promise<void>;
625
+ /** The project's own sending domains, each with the records to publish. */
626
+ listEmailDomains(org: string, name: string): Promise<Ok<"listEmailDomains">>;
627
+ /**
628
+ * Creates the provider identity and answers with the records to publish.
629
+ * `publish` writes them into the zone when we host one covering the domain.
630
+ */
631
+ addEmailDomain(org: string, name: string, domain: string, publish?: boolean): Promise<Ok<"addEmailDomain">>;
632
+ /** Re-checks now. The background loop does the same once a minute while pending. */
633
+ verifyEmailDomain(org: string, name: string, domain: string): Promise<Ok<"verifyEmailDomain">>;
634
+ /** Deletes the identity and the row. Sending from it is refused from the next convergence. */
635
+ removeEmailDomain(org: string, name: string, domain: string): Promise<void>;
636
+ /**
637
+ * The model catalogue. **Being logged in is enough to see it** — what you can
638
+ * buy is not an organization's secret, and this list is the price table.
205
639
  *
206
- * `providers` 에는 client id 만 있다. 클라이언트 시크릿은 봉인돼 어느
207
- * 응답에도 안 나온다.
640
+ * Prices are integer **micro-cents** per million tokens (1 µ¢ = 1e-8 USD).
641
+ * Not letting the server pick the decimal place is the point — a small call
642
+ * rounded to cents becomes 0.
643
+ */
644
+ listAIModels(): Promise<Ok<"listAIModels">>;
645
+ /** Grant, limits, the org balance, 24 h usage. The limits come back as a preview even without a grant. */
646
+ getAI(org: string, name: string): Promise<Ok<"getAI">>;
647
+ /** Turns it on. **Idempotent.** The deploy reads `"ai": true` and calls this. */
648
+ grantAI(org: string, name: string): Promise<Ok<"grantAI">>;
649
+ /** Turns it off. **The ledger and the balance are untouched** — the balance belongs to the org and the grant belongs to the project. */
650
+ revokeAI(org: string, name: string): Promise<void>;
651
+ /** The org's credit balance and its automatic top-up settings. The balance is in micro-cents and can be negative. */
652
+ getAICredit(org: string): Promise<Ok<"getAICredit">>;
653
+ /** One page of the org ledger. The cursor is `ledger_id` — cutting on time splits the same millisecond. */
654
+ listAILedger(org: string, opts?: {
655
+ limit?: number;
656
+ before?: number;
657
+ }): Promise<Ok<"listAILedger">>;
658
+ /**
659
+ * The credit top-up checkout. **A browser coming back is not evidence** — the
660
+ * one thing that raises the balance is the `order.paid` webhook, and the
661
+ * screen polls the balance after the success event.
662
+ */
663
+ createAICreditCheckout(org: string, microCents: number, returnTo: string): Promise<Ok<"createAICreditCheckout">>;
664
+ /**
665
+ * Turns automatic top-up on or off. **Turning it on is explicit consent**
666
+ * (docs/ai.md §3.5) — the screen shows the charging terms verbatim and calls
667
+ * this only after the box is checked.
668
+ */
669
+ setAIAutoTopup(org: string, body: {
670
+ enabled: boolean;
671
+ belowMicroCents?: number;
672
+ microCents?: number;
673
+ }): Promise<Ok<"setAIAutoTopup"> | void>;
674
+ /** One page of the mail log (docs/email.md §6.1). Newest first, cursor-paged. */
675
+ listMailLog(org: string, name: string, opts?: {
676
+ direction?: "in" | "out";
677
+ cursor?: string;
678
+ limit?: number;
679
+ }): Promise<Ok<"listMailLog">>;
680
+ /** The metadata of one message. */
681
+ getMailLog(org: string, name: string, mailId: string): Promise<Ok<"getMailLog">>;
682
+ /** The URL of the raw message — the screen uses it as a download link (.eml). */
683
+ mailLogRawURL(org: string, name: string, mailId: string): string;
684
+ /** The raw text. What the detail view draws the headers and body from. */
685
+ getMailLogRaw(org: string, name: string, mailId: string): Promise<string>;
686
+ /**
687
+ * Grant, settings, providers, hosts. **The signed-up users do not come** —
688
+ * that table is inside the project DB (docs/auth.md §6) and only the worker's
689
+ * `env.auth` sees it.
690
+ *
691
+ * `providers` carries the client id only. The client secret is sealed and
692
+ * appears in no response.
208
693
  */
209
694
  getAuth(org: string, name: string): Promise<Ok<"getAuth">>;
210
695
  /**
211
- * 인증을 켠다 (member). 멱등이다.
696
+ * Turns auth on (member). Idempotent.
212
697
  *
213
- * **데이터베이스가 없으면 409 `database_required`** 다 — 가입자 표가
214
- * 프로젝트 DB 안이라 부여만 세우면 워커가 뜨는 순간 표가 없다. 부르는 쪽은
215
- * 그 코드를 잡아 `runlot pg create` 를 안내한다.
698
+ * **With no database it is 409 `database_required`** — the user table lives
699
+ * inside the project DB, so standing up the grant alone leaves no table the
700
+ * moment the worker starts. The caller catches that code and points at the
701
+ * `"database": true` declaration — the deploy never sees this code, because
702
+ * its ordering rules it out.
216
703
  */
217
704
  grantAuth(org: string, name: string): Promise<Ok<"grantAuth">>;
218
705
  /**
219
- * 설정을 바꾼다 (member). **부분 갱신이다** — 준 칸만 바뀐다. 스위치 하나에
220
- * 전체를 실어 보내면 두 사람이 같은 카드를 만질 때 나중 저장이 앞 저장을
221
- * 덮는다. 부여가 없으면 404 `not_granted`.
706
+ * Changes the settings (member). **A partial update** — only the fields given
707
+ * change. Sending the whole thing on one switch means that when two people
708
+ * touch the same card, the later save overwrites the earlier one. With no
709
+ * grant it is 404 `not_granted`.
222
710
  */
223
711
  updateAuthSettings(org: string, name: string, settings: AuthSettingsInput): Promise<Ok<"updateAuthSettings">>;
224
712
  /**
225
- * 인증을 해제한다 (admin). **가입자는 안 지워진다** — `runlot_auth` 의 표는
226
- * 프로젝트 DB 에 남고, 다시 켜면 같은 사람들이 그대로 로그인한다.
713
+ * Turns auth off (admin). **The signed-up users are not deleted** — the
714
+ * `runlot_auth` tables stay in the project DB, and turning it back on lets the
715
+ * same people log in unchanged.
227
716
  */
228
717
  revokeAuth(org: string, name: string): Promise<void>;
229
718
  /**
230
- * 소셜 프로바이더를 등록하거나 교체한다 (admin). 같은 PUT 이라 멱등이다.
719
+ * Registers or replaces a social provider (admin). It is the same PUT, so it
720
+ * is idempotent.
231
721
  *
232
- * **`clientSecret` 은 다시 볼 수 없다.** 콜백 URL 은 호스트마다
233
- * `https://<host>/__runlot/auth/callback/<provider>` 이고, 호스트 목록은
234
- * 응답의 `hosts` 에 있다.
722
+ * **`clientSecret` cannot be read back.** The callback URL is
723
+ * `https://<host>/__runlot/auth/callback/<provider>` for each host, and the
724
+ * list of hosts is in the response's `hosts`.
725
+ *
726
+ * `issuer` is the base URL of your own GitHub Enterprise Server installation,
727
+ * and only `github` takes one. **This PUT is the whole row** — the same reason
728
+ * `clientSecret` has to be sent every time — so an empty string clears it and
729
+ * puts that provider back on github.com. The key is left out entirely when the
730
+ * argument is omitted, so a caller that does not know about issuers sends the
731
+ * body it always sent.
235
732
  */
236
- setAuthProvider(org: string, name: string, provider: AuthProvider, clientId: string, clientSecret: string): Promise<Ok<"setAuthProvider">>;
733
+ setAuthProvider(org: string, name: string, provider: AuthProvider, clientId: string, clientSecret: string, issuer?: string): Promise<Ok<"setAuthProvider">>;
237
734
  /**
238
- * 프로바이더를 뗀다 (admin). 그 프로바이더로만 가입한 사람은 로그인할 길을
239
- * 잃지만 사용자 행은 남는다 — 다시 등록하면 같은 계정으로 돌아온다.
735
+ * Removes a provider (admin). Someone who signed up only through that provider
736
+ * loses their way in, but the user row stays — register it again and they come
737
+ * back to the same account.
240
738
  */
241
739
  deleteAuthProvider(org: string, name: string, provider: AuthProvider): Promise<void>;
242
740
  /**
243
- * 이 배포에 누가 닿을 수 있는가. **값은 없다** — 비밀번호도 우회 시크릿도
244
- * 해시로만 살고, 여기 오는 것은 `hasPassword`·`hasBypass` 라는 사실이다.
741
+ * Who can reach this deployment. **No values** — both the password and the
742
+ * bypass secret live only as hashes, and what comes back here is the fact that
743
+ * there is one: `hasPassword` and `hasBypass`.
245
744
  *
246
- * 정책을 한 번도 안 정한 프로젝트는 `mode: "public"` 에 `updatedAt` 이
247
- * 없다. 화면이 그 둘을 가르는 이유는 §7 — 빈 상태 대신 상태 문장이다.
745
+ * A project that has never set a policy is `mode: "public"` with no
746
+ * `updatedAt`. The screen tells those two apart for the reason in §7 — a
747
+ * sentence about the state instead of an empty state.
248
748
  */
249
749
  getAccess(org: string, name: string): Promise<Ok<"getAccess">>;
250
750
  /**
251
- * 정책을 바꾼다 (admin). `password` 를 안 보내면 **있던 비밀번호가 남는다** —
252
- * 모드만 바꾸는 저장이 비밀번호를 지우면 되돌아왔을 때 다시 정해야 한다.
751
+ * Changes the policy (admin). Without a `password`, **the existing password
752
+ * stays** — if a save that only changes the mode wiped the password, coming
753
+ * back to that mode would mean setting it again.
253
754
  */
254
755
  setAccess(org: string, name: string, mode: AccessMode, password?: string): Promise<Ok<"setAccess">>;
255
756
  /**
256
- * 자동화 우회 시크릿을 만든다 (admin). **값은 이 답에만 있다** — 화면은
257
- * 받은 즉시 한 번 보여주고 다시 못 가져온다. 다시 부르면 옛 값이 죽는다.
757
+ * Makes a bypass secret for automation (admin). **The value is in this answer
758
+ * and nowhere else** — the screen shows it once on arrival and can never fetch
759
+ * it again. Calling again kills the old value.
258
760
  */
259
761
  newAccessBypass(org: string, name: string): Promise<Ok<"newAccessBypass">>;
260
- /** 우회를 뗀다 (admin). 없는 우회를 떼는 것도 성공이다. */
762
+ /** Removes the bypass (admin). Removing one that does not exist also succeeds. */
261
763
  revokeAccessBypass(org: string, name: string): Promise<void>;
262
764
  /**
263
- * 보호된 배포로 돌아가는 1 회용 주소를 받는다 (docs/access.md §3.4-3).
765
+ * Gets a one-time address back into a protected deployment (docs/access.md §3.4-3).
264
766
  *
265
- * 프로젝트 경로 아래가 **아니다**: 부르는 화면이 아는 것은 호스트네임뿐이고
266
- * (원 요청이 그리로 갔다), org·프로젝트 이름은 서버가 그것에서 유도한다.
267
- * 받은 `redirect` 로 `location.replace` 하는 것이 호출부의 일이다.
767
+ * It is **not** under the project path: all the calling screen knows is the
768
+ * hostname (the original request went there), and the server derives the org
769
+ * and project names from it. Doing `location.replace` with the `redirect` that
770
+ * comes back is the caller's job.
268
771
  */
269
772
  authorizeAccess(to: string, next?: string): Promise<Ok<"authorizeAccess">>;
270
773
  listMembers(org: string): Promise<Ok<"listMembers">>;
271
- /** 초대가 아니다 — 사용자는 이미 한 번 로그인해 있어야 한다 (404 `user_not_found`). */
774
+ /** This is not an invite — the user must already have logged in once (404 `user_not_found`). */
272
775
  addMember(org: string, provider: "dev" | "github", subject: string, role: Role): Promise<Ok<"addMember">>;
273
776
  setMemberRole(org: string, userId: string, role: Role): Promise<Ok<"setMemberRole">>;
777
+ /**
778
+ * Removing someone else is admin; **removing yourself is leaving**, which
779
+ * anyone can do (docs/members.md). The last admin can do neither
780
+ * (409 `last_admin`).
781
+ */
274
782
  removeMember(org: string, userId: string): Promise<void>;
275
- /** 기본 호스트네임과 커스텀 도메인이 함께 온다 (viewer). */
783
+ /** Pending and expired invites (admin). Accepted and revoked ones are history, so they do not come. */
784
+ listInvites(org: string): Promise<Ok<"listInvites">>;
785
+ /**
786
+ * Invites by email (admin). **Calling again with the same address is a
787
+ * resend** — the same row is updated rather than a new one created, and the
788
+ * server gives 200 instead of 201.
789
+ */
790
+ createInvite(org: string, email: string, role: Role): Promise<Ok<"createInvite">>;
791
+ /** Revokes an invite (admin). Mail that has not gone out yet does not go out. */
792
+ revokeInvite(org: string, inviteId: string): Promise<void>;
793
+ /**
794
+ * A preview of the invite. **No session needed** — whoever got the link has
795
+ * not logged in yet, and they need to know what they are accepting before
796
+ * they do.
797
+ */
798
+ getInvite(token: string): Promise<Ok<"getInvite">>;
799
+ /** Accepts (login required). If they are already a member the role does not change. */
800
+ acceptInvite(token: string): Promise<Ok<"acceptInvite">>;
801
+ /** The default hostname and the custom domains come together (viewer). */
276
802
  listHostnames(org: string, name: string): Promise<Ok<"listHostnames">>;
277
803
  /**
278
- * 커스텀 도메인을 건다 (member).
804
+ * Attaches a custom domain (member).
279
805
  *
280
- * 멱등이다 — 같은 이름을 다시 보내면 있던 행이 그대로 온다. 응답의 `verify`
281
- * 가 고객이 넣어야 하는 CNAME·TXT 다.
806
+ * Idempotent — sending the same name again returns the existing row
807
+ * unchanged. The response's `verify` is the CNAME and TXT the customer has to
808
+ * add.
282
809
  */
283
810
  addHostname(org: string, name: string, hostname: string): Promise<Ok<"addHostname">>;
284
- /** 배경 검증과 같은 판정을 즉시 부른다 (member). */
811
+ /** Runs the same check the background verifier makes, right now (member). */
285
812
  verifyHostname(org: string, name: string, host: string): Promise<Ok<"verifyHostname">>;
286
- /** 커스텀 도메인을 뗀다 (member). 기본 호스트네임은 400 이다. */
813
+ /** Detaches a custom domain (member). The default hostname gives a 400. */
287
814
  deleteHostname(org: string, name: string, host: string): Promise<void>;
288
- /** 이 조직의 존 목록. `rrsets` 는 없다 — 단건 조회에만 실려요. */
815
+ /** The organization's zones. No `rrsets` — those ride only on a single-zone lookup. */
289
816
  listZones(org: string): Promise<Ok<"listZones">>;
290
- /** 멱등이에요. 이미 있는 존은 그대로 돌아와요. */
817
+ /** Idempotent. A zone that already exists comes back unchanged. */
291
818
  createZone(org: string, name: string): Promise<Ok<"createZone">>;
292
819
  getZone(org: string, zone: string): Promise<Ok<"getZone">>;
293
820
  deleteZone(org: string, zone: string): Promise<void>;
294
821
  /**
295
- * rrset 하나를 **통째로** 바꿔요. `records` 가 그 (이름, 타입) 의 새 전부라,
296
- * 값 하나를 더하려면 지금 값을 함께 보내야 해요.
822
+ * Replaces one rrset **whole**. `records` is the complete new set for that
823
+ * (name, type), so adding a single value means sending the current ones with
824
+ * it.
297
825
  */
298
826
  putRRset(org: string, zone: string, name: string, type: RRsetType, ttl: number, records: string[]): Promise<Ok<"putRRset">>;
299
827
  deleteRRset(org: string, zone: string, name: string, type: RRsetType): Promise<void>;
300
828
  setZoneDNSSEC(org: string, zone: string, enabled: boolean): Promise<Ok<"setZoneDNSSEC">>;
301
829
  setZoneDS(org: string, zone: string, ds: string[]): Promise<Ok<"setZoneDS">>;
302
- /** DNS 표면의 공통 접두. */
830
+ /** The shared prefix of the DNS surface. */
303
831
  private dnsPath;
304
- /** `@` 도 `*` 도 이름으로 와요. 네 군데에 같은 문자열을 적지 않아요. */
832
+ /** Both `@` and `*` arrive as a name. Keeps the same string out of four places. */
305
833
  private rrsetPath;
306
834
  /**
307
- * 이름을 찾아본다 (member 이상).
835
+ * Looks a name up (member or above).
308
836
  *
309
- * `priceCents` 는 첫 등록 1 년, `renewalCents` 는 갱신 1 년이다. 둘이
310
- * 나뉘어 있는 이유는 첫해 할인이 흔해서다 — 하나로 접으면 "1 달러에 사서
311
- * 다음 해 15 달러" 를 화면이 말할 수 없다.
837
+ * `priceCents` is the first year of registration; `renewalCents` is one year
838
+ * of renewal. They are separate because a first-year discount is common —
839
+ * folded into one, the screen cannot say "buy it for $1, then $15 next year".
312
840
  */
313
841
  checkDomains(org: string, names: string[]): Promise<Ok<"checkDomains">>;
314
842
  /**
315
- * 도메인을 산다 (admin — 돈을 써요).
843
+ * Buys a domain (admin — this spends money).
316
844
  *
317
- * **ICANN 검증 메일이 `contact.email` 로 가요.** 화면은 사기 전에 그
318
- * 사실을 알려야 해요 (docs/domains.md §5.5).
845
+ * **The ICANN verification mail goes to `contact.email`.** The screen has to
846
+ * say so before the purchase (docs/domains.md §5.5).
319
847
  *
320
- * 같은 요청을 다시 보내는 것이 안전해요 — 끝난 도메인이면 그대로 오고,
321
- * 중간에 멈춘 구매면 그 자리에서 이어 가요.
848
+ * Sending the same request again is safe — a finished domain comes back
849
+ * unchanged, and a purchase that stopped part way resumes from where it
850
+ * stopped.
322
851
  */
323
852
  purchaseDomain(org: string, body: {
324
853
  name: string;
@@ -326,31 +855,88 @@ export declare class Client {
326
855
  contact: DomainContact;
327
856
  projectId?: string;
328
857
  }): Promise<Ok<"purchaseDomain">>;
329
- /** 이미 가진 도메인을 가져와요 (admin). 등록기관을 부르지 않고 존만 만들어요. */
858
+ /** Imports a domain you already own (admin). Creates the zone only; the registrar is not called. */
330
859
  importDomain(org: string, name: string): Promise<Ok<"importDomain">>;
331
860
  listDomains(org: string): Promise<Ok<"listDomains">>;
332
861
  getDomain(org: string, name: string): Promise<Ok<"getDomain">>;
333
862
  renewDomain(org: string, name: string, years: number): Promise<Ok<"renewDomain">>;
334
863
  /**
335
- * 자동 갱신 **의사**만 바꿔요.
864
+ * Changes only the **intent** to auto-renew.
336
865
  *
337
- * 등록기관 쪽 자동 갱신은 그대로 켜져 있어요 — 도메인은 하루 늦으면 잃는
338
- * 자산이라 우리가 먼저 갱신하고 뒤에 청구해요. 화면은 이 사실을 함께
339
- * 말해야 해요.
866
+ * Auto-renew at the registrar stays on — a domain is an asset you lose if you
867
+ * are a day late, so we renew first and bill afterwards. The screen has to say
868
+ * this alongside.
340
869
  */
341
870
  setDomainAutoRenew(org: string, name: string, enabled: boolean): Promise<Ok<"setDomainAutoRenew">>;
342
871
  setDomainLock(org: string, name: string, locked: boolean): Promise<Ok<"setDomainLock">>;
343
- /** 이전 코드예요. 감사에 발급 사실이 남고 **코드는 남지 않아요**. */
872
+ /** The transfer auth code. The audit records that one was issued and **not the code itself**. */
344
873
  domainAuthCode(org: string, name: string): Promise<Ok<"getDomainAuthCode">>;
345
- /** 지금 등록기관에서 다시 읽어요 (member). */
874
+ /** Re-reads from the registrar right now (member). */
346
875
  syncDomain(org: string, name: string): Promise<Ok<"syncDomain">>;
347
- /** 도메인 표면의 공통 접두. 열 군데에 같은 문자열을 적지 않아요. */
876
+ /** The shared prefix of the domain surface. Keeps the same string out of ten places. */
348
877
  private domainsPath;
349
878
  private domainPath;
350
- /** 프로젝트 표면의 공통 접두다. */
879
+ /** The shared prefix of the project surface. */
351
880
  private projectPath;
352
- /** 데이터베이스 표면의 공통 접두다. 다섯 군데에 같은 문자열을 적지 않는다. */
881
+ /** The shared prefix of the database surface. Keeps the same string out of five places. */
353
882
  private dbPath;
883
+ listRepos(org: string, project: string): Promise<Ok<"listRepos">>;
884
+ createRepo(org: string, project: string, body: {
885
+ name: string;
886
+ visibility?: RepoVisibility | undefined;
887
+ defaultBranch?: string | undefined;
888
+ }): Promise<Ok<"createRepo">>;
889
+ getRepo(org: string, project: string, name: string): Promise<Ok<"getRepo">>;
890
+ updateRepo(org: string, project: string, name: string, body: {
891
+ name?: string | undefined;
892
+ visibility?: RepoVisibility | undefined;
893
+ defaultBranch?: string | undefined;
894
+ }): Promise<void>;
895
+ deleteRepo(org: string, project: string, name: string): Promise<void>;
896
+ /** The ref history. The lead for recovering a commit lost to a force-push is here. */
897
+ listRefUpdates(org: string, project: string, name: string): Promise<Ok<"listRefUpdates">>;
898
+ getDeployHook(org: string, project: string, name: string): Promise<Ok<"getDeployHook">>;
899
+ setDeployHook(org: string, project: string, name: string, body: {
900
+ enabled?: boolean | undefined;
901
+ branch?: string | undefined;
902
+ rootDir?: string | undefined;
903
+ }): Promise<Ok<"setDeployHook">>;
904
+ deleteDeployHook(org: string, project: string, name: string): Promise<void>;
905
+ /** Build a commit without pushing. Omit `commitSha` for the hooked branch's tip. */
906
+ deployRepoNow(org: string, project: string, name: string, commitSha?: string): Promise<Ok<"deployRepoNow">>;
907
+ listBuilds(org: string, project: string, limit?: number): Promise<Ok<"listBuilds">>;
908
+ getBuild(org: string, project: string, buildId: string): Promise<Ok<"getBuild">>;
909
+ /**
910
+ * A build's output. It comes back as **text**, not JSON — see the endpoint's
911
+ * description. `json()` would try to parse it and fail on the first line.
912
+ */
913
+ getBuildLog(org: string, project: string, buildId: string): Promise<string>;
914
+ cancelBuild(org: string, project: string, buildId: string): Promise<void>;
915
+ listSSHKeys(): Promise<Ok<"listSSHKeys">>;
916
+ addSSHKey(publicKey: string, name?: string): Promise<Ok<"addSSHKey">>;
917
+ deleteSSHKey(keyId: string): Promise<void>;
918
+ listAccessTokens(): Promise<Ok<"listAccessTokens">>;
919
+ /** The plaintext is carried in this response **once** and never again. */
920
+ createAccessToken(body: {
921
+ name: string;
922
+ /** 0032's single-valued field. `scopes` is the one to send. */
923
+ scope?: TokenScope | undefined;
924
+ scopes?: readonly ApiScope[] | undefined;
925
+ /** Restrict the token to one org, and optionally to one project inside it. */
926
+ org?: string | undefined;
927
+ project?: string | undefined;
928
+ ttlHours?: number | undefined;
929
+ /** Days until expiry. The server defaults to 90 and refuses more than 365. */
930
+ expiresInDays?: number | undefined;
931
+ noExpiry?: boolean | undefined;
932
+ }): Promise<Ok<"createAccessToken">>;
933
+ revokeAccessToken(tokenId: string): Promise<void>;
934
+ getRepoRefs(org: string, project: string, name: string): Promise<Ok<"getRepoRefs">>;
935
+ getRepoTree(org: string, project: string, name: string, ref?: string, path?: string): Promise<Ok<"getRepoTree">>;
936
+ getRepoBlob(org: string, project: string, name: string, ref?: string, path?: string): Promise<Ok<"getRepoBlob">>;
937
+ getRepoCommits(org: string, project: string, name: string, ref?: string, limit?: number): Promise<Ok<"getRepoCommits">>;
938
+ /** The shared prefix of the repository surface. It sits under the project (§19). */
939
+ private repoPath;
354
940
  rollback(org: string, name: string, version: number): Promise<Ok<"rollback">>;
355
941
  }
356
942
  //# sourceMappingURL=index.d.ts.map