@runlot/api 0.1.0-rc.11 → 0.1.0-rc.111

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