@runlot/api 0.1.0-rc.20 → 0.1.0-rc.201

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
@@ -1,12 +1,16 @@
1
1
  import type { components, operations } from "./schema.js";
2
2
  export type { components, paths, operations } from "./schema.js";
3
3
  export declare const API_VERSION: "v1";
4
+ /** The shared query for browsing. Empty values are not carried — the server reads "empty means default". */
5
+ /** base64url of the UTF-8 JSON, no padding — the `draft` parameter's encoding. */
6
+ export declare function base64urlJson(v: unknown): string;
4
7
  type Schemas = components["schemas"];
5
8
  /**
6
- * 오퍼레이션의 성공 응답 본문.
9
+ * The success response body of an operation.
7
10
  *
8
- * 메서드 반환형을 손으로 적지 않는 이유는, 손으로 적으면 스펙이 바뀌어도
9
- * 컴파일이 통과하기 때문이다 — 그 어긋남은 런타임에 `undefined` 로 나타난다.
11
+ * We do not write the method return types by hand because a hand-written type
12
+ * still compiles after the spec changes — and that drift shows up at runtime as
13
+ * `undefined`.
10
14
  */
11
15
  type Ok<K extends keyof operations> = operations[K]["responses"] extends {
12
16
  200: {
@@ -29,12 +33,141 @@ type Ok<K extends keyof operations> = operations[K]["responses"] extends {
29
33
  } ? B : never;
30
34
  export type Session = Schemas["Session"];
31
35
  export type User = Schemas["User"];
36
+ export type AuthEmailAccepted = Schemas["AuthEmailAccepted"];
37
+ export type TotpStatus = Schemas["TotpStatus"];
38
+ export type TotpEnrollment = Schemas["TotpEnrollment"];
32
39
  export type Org = Schemas["Org"];
33
40
  export type Project = Schemas["Project"];
34
41
  export type ProjectDetail = Schemas["ProjectDetail"];
35
42
  export type Placement = Schemas["Placement"];
36
43
  export type Deployment = Schemas["Deployment"];
44
+ export type Preview = Schemas["Preview"];
45
+ export type PreviewState = NonNullable<Preview["state"]>;
46
+ export type PreviewDbMode = NonNullable<Preview["dbMode"]>;
47
+ /**
48
+ * What `createDeployment` answers to a `?preview=` upload.
49
+ *
50
+ * The extra field is written here rather than in the 201 response schema because
51
+ * the schema is `Deployment` — shared with `listDeployments`, `rollback` and the
52
+ * overview, none of which have a preview to report. Widening it there would put an
53
+ * optional `preview` on every deployment a reader ever sees, which reads as "a
54
+ * deployment may belong to a preview" instead of "this one call returns the
55
+ * preview it just made". `proto/openapi.yaml` `createDeployment` says the same
56
+ * thing in prose.
57
+ */
58
+ export type DeployedPreview = Deployment & {
59
+ preview?: Preview;
60
+ };
61
+ export type ProjectOverview = Schemas["ProjectOverview"];
62
+ export type OverviewDeployment = Schemas["OverviewDeployment"];
37
63
  export type Manifest = Schemas["Manifest"];
64
+ export type CronOverview = Schemas["CronOverview"];
65
+ export type ErrorIssue = Schemas["ErrorIssue"];
66
+ export type ErrorIssuePage = Schemas["ErrorIssuePage"];
67
+ export type ErrorIssueDetail = Schemas["ErrorIssueDetail"];
68
+ export type ErrorIssueUpdate = Schemas["ErrorIssueUpdate"];
69
+ export type ErrorEvent = Schemas["ErrorEvent"];
70
+ export type ErrorEventSummary = Schemas["ErrorEventSummary"];
71
+ export type ErrorEventPage = Schemas["ErrorEventPage"];
72
+ export type ErrorFrame = Schemas["ErrorFrame"];
73
+ export type ErrorException = Schemas["ErrorException"];
74
+ export type ErrorBreadcrumb = Schemas["ErrorBreadcrumb"];
75
+ export type ErrorActivity = Schemas["ErrorActivity"];
76
+ export type ErrorOwnershipPolicy = Schemas["ErrorOwnershipPolicy"];
77
+ export type ErrorOwnershipPinInput = Schemas["ErrorOwnershipPinInput"];
78
+ export type ErrorOwnershipPin = Schemas["ErrorOwnershipPin"];
79
+ export type ErrorSettings = Schemas["ErrorSettings"];
80
+ export type RelatedErrorEvents = Schemas["RelatedErrorEvents"];
81
+ export type ErrorHistory = Schemas["ErrorHistory"];
82
+ export type UptimeCheck = Schemas["UptimeCheck"];
83
+ export type ObservabilityPermission = Schemas["ObservabilityPermission"];
84
+ export type ObservabilityCaps = Schemas["ObservabilityCaps"];
85
+ export type ObservabilityExport = Schemas["ObservabilityExport"];
86
+ export type ObservabilityRehydration = Schemas["ObservabilityRehydration"];
87
+ export type ObservabilityAuditEntry = Schemas["ObservabilityAuditEntry"];
88
+ export type ObservabilityData = Schemas["ObservabilityData"];
89
+ export type BugReport = Schemas["BugReport"];
90
+ export type UptimeCheckInput = Schemas["UptimeCheckInput"];
91
+ export type UptimeCheckList = Schemas["UptimeCheckList"];
92
+ export type ObsProfilerSettings = Schemas["ObsProfilerSettings"];
93
+ export type ObsSampling = Schemas["ObsSampling"];
94
+ export type ObsProfileList = Schemas["ObsProfileList"];
95
+ export type ObsFlamegraph = Schemas["ObsFlamegraph"];
96
+ export type ObsFlameNode = Schemas["ObsFlameNode"];
97
+ export type ObsProfileTop = Schemas["ObsProfileTop"];
98
+ export type ObsProfileCompare = Schemas["ObsProfileCompare"];
99
+ export type ObsHeapSnapshot = Schemas["ObsHeapSnapshot"];
100
+ export type ObsHeapSnapshotList = Schemas["ObsHeapSnapshotList"];
101
+ export type ObsRUMAggregate = Schemas["ObsRUMAggregate"];
102
+ export type ObsRUMOverview = Schemas["ObsRUMOverview"];
103
+ export type ObsRUMPages = Schemas["ObsRUMPages"];
104
+ export type ObsRUMDevices = Schemas["ObsRUMDevices"];
105
+ export type ObsRUMViewList = Schemas["ObsRUMViewList"];
106
+ export type ObsRUMView = Schemas["ObsRUMView"];
107
+ export type ObsRUMViewSummary = Schemas["ObsRUMViewSummary"];
108
+ export type ObsRUMTiming = Schemas["ObsRUMTiming"];
109
+ /** Filters of the RUM reads (customer-observability.md §17.12). */
110
+ export interface ObsRUMQuery {
111
+ from?: string;
112
+ to?: string;
113
+ step?: string;
114
+ template?: string;
115
+ device?: "mobile" | "tablet" | "desktop";
116
+ }
117
+ /** The window and filters of a profile read (customer-observability.md §17.13). */
118
+ export interface ObsProfileQuery {
119
+ from?: string;
120
+ to?: string;
121
+ version?: number;
122
+ route?: string;
123
+ limit?: number;
124
+ }
125
+ export type UptimeRun = Schemas["UptimeRun"];
126
+ export type ErrorPerformanceThresholds = Schemas["ErrorPerformanceThresholds"];
127
+ export type ErrorCapturePolicy = Schemas["ErrorCapturePolicy"];
128
+ export type ErrorCapturePolicyView = Schemas["ErrorCapturePolicyView"];
129
+ export type ErrorComment = Schemas["ErrorComment"];
130
+ export type ErrorCommentPage = Schemas["ErrorCommentPage"];
131
+ export type ErrorSimilar = Schemas["ErrorSimilar"];
132
+ export type ErrorFingerprintRule = Schemas["ErrorFingerprintRule"];
133
+ export type ErrorFingerprintRules = Schemas["ErrorFingerprintRules"];
134
+ export type ErrorInsights = Schemas["ErrorInsights"];
135
+ export type ErrorInsightSourceContext = Schemas["ErrorInsightSourceContext"];
136
+ export type ErrorSuspectCommit = Schemas["ErrorSuspectCommit"];
137
+ export type ErrorInsightOwners = Schemas["ErrorInsightOwners"];
138
+ export type ErrorDiagnosis = Schemas["ErrorDiagnosis"];
139
+ export type ErrorFixProposal = Schemas["ErrorFixProposal"];
140
+ export type ErrorFixPreview = Schemas["ErrorFixPreview"];
141
+ export type ErrorFixPreviewVerification = Schemas["ErrorFixPreviewVerification"];
142
+ export type ErrorFixPreviewApproval = Schemas["ErrorFixPreviewApproval"];
143
+ export type ErrorFixPreviewVerificationApproval = Schemas["ErrorFixPreviewVerificationApproval"];
144
+ export type ErrorFixApplyResult = Schemas["ErrorFixApplyResult"];
145
+ /** Masked structural replay (not a pixel recording): settings, metadata and one batch. */
146
+ export type ErrorErasureResult = Schemas["ErrorErasureResult"];
147
+ export type BrowserTelemetrySummary = Schemas["BrowserTelemetrySummary"];
148
+ export type BrowserFeedback = Schemas["BrowserFeedback"];
149
+ export type ErrorReplaySettings = Schemas["ErrorReplaySettings"];
150
+ export type ErrorReplay = Schemas["ErrorReplay"];
151
+ export type ErrorReplayBatch = Schemas["ErrorReplayBatch"];
152
+ export type CronSchedule = Schemas["CronSchedule"];
153
+ export type CronMonitor = Schemas["CronMonitor"];
154
+ export type CronMonitorIncident = Schemas["CronMonitorIncident"];
155
+ export type CronRun = Schemas["CronRun"];
156
+ export type CronSummary = Schemas["CronSummary"];
157
+ export type QueueOverview = Schemas["QueueOverview"];
158
+ export type QueueStatus = Schemas["QueueStatus"];
159
+ export type QueueRun = Schemas["QueueRun"];
160
+ export type QueueDepth = Schemas["QueueDepth"];
161
+ export type QueueMessage = Schemas["QueueMessage"];
162
+ export type AppUser = Schemas["AppUser"];
163
+ export type AppUserPage = Schemas["AppUserPage"];
164
+ export type AILedgerRow = Schemas["AILedgerRow"];
165
+ /** The body of one development-lane `env.ai.run` (`devAIRun`). */
166
+ export type DevAIRunRequest = operations["devAIRun"]["requestBody"]["content"]["application/json"];
167
+ export type DevAIRunResult = Ok<"devAIRun">;
168
+ export type DurableObjectUsage = Schemas["DurableObjectUsage"];
169
+ export type VectorOverview = Schemas["VectorOverview"];
170
+ export type VectorNamespace = Schemas["VectorNamespace"];
38
171
  export type DatabaseConnect = Schemas["DatabaseConnect"];
39
172
  export type DatabaseEndpoint = Schemas["DatabaseEndpoint"];
40
173
  export type DatabaseToken = Schemas["DatabaseToken"];
@@ -47,35 +180,211 @@ export type GenerationRow = Schemas["GenerationRow"];
47
180
  export type OperationStarted = Schemas["OperationStarted"];
48
181
  export type Operation = Schemas["Operation"];
49
182
  export type ErrorEnvelope = Schemas["Error"];
183
+ export type License = Schemas["License"];
184
+ export type LicenseState = License["state"];
50
185
  export type Role = Schemas["Role"];
51
186
  export type Member = Schemas["Member"];
187
+ export type Invite = Schemas["Invite"];
188
+ export type OrgHolding = Schemas["OrgHolding"];
189
+ export type InviteView = Schemas["InviteView"];
190
+ export type InviteState = Schemas["InviteState"];
52
191
  export type SecretMeta = Schemas["SecretMeta"];
53
192
  export type SecretList = Schemas["SecretList"];
54
193
  export type LogEvent = Schemas["LogEvent"];
194
+ export type LogRecord = Schemas["LogRecord"];
195
+ export type ObsQuery = Schemas["ObsQuery"];
196
+ export type ObsFilter = Schemas["ObsFilter"];
197
+ export type ObsQueryResult = Schemas["ObsQueryResult"];
198
+ export type ObsInvocation = Schemas["ObsInvocation"];
199
+ export type ObsEvent = Schemas["ObsEvent"];
200
+ export type ObsRequestView = Schemas["ObsRequestView"];
201
+ export type SavedQuery = Schemas["SavedQuery"];
202
+ export type SavedQueryInput = Schemas["SavedQueryInput"];
203
+ export type ObsProcessor = Schemas["ObsProcessor"];
204
+ export type ObsScannerConfig = Schemas["ObsScannerConfig"];
205
+ export type ObsLogMetric = Schemas["ObsLogMetric"];
206
+ export type ObsLogsConfig = Schemas["ObsLogsConfig"];
207
+ /** Live-tail filters, applied on the node before a line is sent. */
208
+ export type LogTailFilter = {
209
+ level?: "debug" | "log" | "info" | "warn" | "error";
210
+ source?: "stdout" | "stderr" | "runlot";
211
+ q?: string;
212
+ requestId?: string;
213
+ };
214
+ export type LogHistoryLine = {
215
+ ts: string;
216
+ seq: number;
217
+ epoch?: number;
218
+ generation?: number;
219
+ stream: "stdout" | "stderr" | "runlot";
220
+ line: string;
221
+ };
222
+ export type LogHistoryPage = {
223
+ lines: LogHistoryLine[];
224
+ /** Absent means there is nothing older. */
225
+ cursor?: string | undefined;
226
+ keepDays: number;
227
+ linesPerDay: number;
228
+ };
55
229
  export type Usage = Schemas["Usage"];
230
+ export type ExecuteResult = Schemas["ExecuteResult"];
56
231
  export type StorageStatus = Schemas["StorageStatus"];
232
+ export type StorageObject = Schemas["StorageObject"];
233
+ export type StorageObjectPage = Schemas["StorageObjectPage"];
234
+ export type StorageObjectSigned = Schemas["StorageObjectSigned"];
235
+ export type BillingStatus = Schemas["BillingStatus"];
236
+ export type PlanLimits = Schemas["PlanLimits"];
237
+ export type EmailStatus = Schemas["EmailStatus"];
238
+ export type EmailDomain = Schemas["EmailDomain"];
239
+ export type EmailDNSRecord = Schemas["EmailDNSRecord"];
240
+ export type EmailDomainState = NonNullable<EmailDomain["state"]>;
241
+ export type MailLogEntry = Schemas["MailLogEntry"];
242
+ export type MailLogPage = Schemas["MailLogPage"];
243
+ export type Repo = Schemas["Repo"];
244
+ export type RepoVisibility = NonNullable<Repo["visibility"]>;
245
+ export type DeployHook = Schemas["DeployHook"];
246
+ export type Build = Schemas["Build"];
247
+ export type BuildState = NonNullable<Build["state"]>;
248
+ export type RefUpdate = Schemas["RefUpdate"];
249
+ export type SSHKey = Schemas["SSHKey"];
250
+ export type AccessToken = Schemas["AccessToken"];
251
+ export type AccessTokenCreated = Schemas["AccessTokenCreated"];
252
+ export type TokenScope = NonNullable<AccessToken["scope"]>;
253
+ /**
254
+ * One name from the REST scope vocabulary (0067).
255
+ *
256
+ * `TokenScope` above is the **git** verdict and stays two-valued; this is the
257
+ * set a token actually carries. Keeping the two names apart is what stops the
258
+ * git front end and the REST middleware from drifting into one another.
259
+ */
260
+ export type ApiScope = Schemas["ApiScope"];
261
+ export declare const API_SCOPES: readonly ApiScope[];
262
+ export type RepoRefs = Schemas["RepoRefs"];
263
+ export type RepoRef = RepoRefs["refs"][number];
264
+ export type RepoTree = Schemas["RepoTree"];
265
+ export type RepoTreeEntry = Schemas["RepoTreeEntry"];
266
+ export type RepoBlob = Schemas["RepoBlob"];
267
+ export type RepoCommit = Schemas["RepoCommit"];
57
268
  export type AccessPolicy = Schemas["AccessPolicy"];
58
269
  export type AccessBypass = Schemas["AccessBypass"];
59
270
  export type AccessAuthorize = Schemas["AccessAuthorize"];
60
- /** 정책 셋. 라디오 셋이 이 유니온에 붙는다 (docs/access.md §3.1). */
271
+ /** The four policies (`app` is docs/auth-access-unify.md §3). The radio buttons hang off this union (docs/access.md §3.1). */
61
272
  export type AccessMode = NonNullable<AccessPolicy["mode"]>;
62
273
  export type UsageRow = Schemas["UsageRow"];
63
274
  export type Notification = Schemas["Notification"];
64
- /** 알림 종류. 대시보드의 라벨 표가 이 유니온에 붙는다 (§3.1). */
275
+ /** The notification kinds. The dashboard's label table hangs off this union (§3.1). */
65
276
  export type NotificationKind = NonNullable<Notification["kind"]>;
66
277
  export type AuthStatus = Schemas["AuthStatus"];
67
278
  export type AuthSettings = Schemas["AuthSettings"];
68
279
  export type AuthBrand = Schemas["AuthBrand"];
280
+ /**
281
+ * One provider row (docs/auth-access-unify.md §5, §5A): `builtin` is the
282
+ * project's own GitHub or Google app, `oidc` a generic OpenID Connect provider
283
+ * under a project-chosen id, `runlot` Runlot's sign-in.
284
+ */
69
285
  export type AuthProviderMeta = Schemas["AuthProviderMeta"];
70
- /** 프로바이더 셋. 화면의 행과 CLI 의 인자가 이 유니온에 붙는다. */
286
+ export type AuthProviderKind = AuthProviderMeta["kind"];
287
+ /** The PUT body; its shape depends on `kind` (see `AuthProviderPut`). */
288
+ export type AuthProviderPut = Schemas["AuthProviderPut"];
289
+ /** Provider ids with a built-in meaning; any other id is an OIDC provider. */
290
+ export type BuiltinAuthProvider = "github" | "google";
291
+ export declare const BUILTIN_AUTH_PROVIDERS: readonly BuiltinAuthProvider[];
292
+ export declare const RESERVED_AUTH_PROVIDER_IDS: readonly string[];
293
+ /** The id pattern for an OIDC provider (`^[a-z][a-z0-9-]{1,30}$`). */
294
+ export declare const AUTH_PROVIDER_ID: RegExp;
295
+ /**
296
+ * `GET …/auth/schema`: the statements that install `runlot_auth` idempotently,
297
+ * one transaction from `BEGIN` to `COMMIT`. A migration that references
298
+ * `runlot_auth` runs them first.
299
+ */
300
+ export interface AuthSchema {
301
+ version: number;
302
+ statements: string[];
303
+ }
304
+ /** A provider id: `github`, `google`, `runlot`, or an OIDC id. */
71
305
  export type AuthProvider = Schemas["AuthProvider"];
72
- /** PATCH 의 본문 — `AuthSettings` 의 부분집합. 준 칸만 바뀐다. */
73
- export type AuthSettingsInput = NonNullable<Schemas["AuthSettingsPatch"]["settings"]>;
306
+ /** The PATCH body — a subset of `AuthSettings`. Only the fields given change. */
307
+ export type AuthSettingsInput = Omit<NonNullable<Schemas["AuthSettingsPatch"]["settings"]>, "brand"> & {
308
+ /** §12.3: attach a `runlot` identity to an existing user with the same verified email. Default true. */
309
+ linkByEmail?: boolean;
310
+ brand?: Partial<AuthBranding>;
311
+ };
312
+ export type AuthTheme = "light" | "dark" | "system";
313
+ export type AuthLayout = "centered" | "split" | "minimal";
314
+ export type AuthButtonShape = "rounded" | "pill" | "square";
315
+ export type AuthBackgroundKind = "none" | "color" | "gradient" | "image";
316
+ export type AuthBrandLang = "ko" | "en" | "ja";
317
+ export type AuthRunlotMethod = "password" | "google" | "github" | "passkey";
318
+ export declare const AUTH_RUNLOT_METHODS: readonly AuthRunlotMethod[];
319
+ export interface AuthBrandCopy {
320
+ /** ≤ 80 characters. */
321
+ title: string;
322
+ /** ≤ 200 characters. */
323
+ subtitle: string;
324
+ /** ≤ 200 characters. */
325
+ footer: string;
326
+ }
327
+ /** The whole branding object (`project_auth.settings.brand`, §12.3). */
328
+ export interface AuthBranding {
329
+ name: string;
330
+ logo: string;
331
+ color: string;
332
+ /** https URL or "". */
333
+ logoDark: string;
334
+ theme: AuthTheme;
335
+ layout: AuthLayout;
336
+ buttonShape: AuthButtonShape;
337
+ background: {
338
+ kind: AuthBackgroundKind;
339
+ value: string;
340
+ };
341
+ copy: Partial<Record<AuthBrandLang, AuthBrandCopy>>;
342
+ links: {
343
+ terms: string;
344
+ privacy: string;
345
+ support: string;
346
+ };
347
+ defaultLang: AuthBrandLang | "";
348
+ /** Empty = every method the deployment can broker. */
349
+ methods: AuthRunlotMethod[];
350
+ }
351
+ /** GET/PUT /auth/branding answer. */
352
+ export interface AuthBrandingAnswer {
353
+ brand: AuthBranding;
354
+ effectiveMethods: AuthRunlotMethod[];
355
+ }
356
+ /** `400 invalid_branding` carries one entry per bad field. */
357
+ export interface AuthBrandingFieldError {
358
+ path: string;
359
+ message: string;
360
+ }
361
+ export type AuthPreviewState = "password" | "passkey" | `error:${string}`;
362
+ export interface AuthPreviewOpts {
363
+ lang?: AuthBrandLang;
364
+ theme?: AuthTheme;
365
+ state?: AuthPreviewState;
366
+ /** Unsaved branding to render instead of the stored one. */
367
+ draft?: Partial<AuthBranding>;
368
+ }
369
+ /** One counter of `app_auth_funnel` (§12.2): per day, event and key. */
370
+ export interface AuthFunnelRow {
371
+ /** YYYY-MM-DD. */
372
+ day: string;
373
+ /** e.g. `start`, `chooser_view`, `method`, `success`, `error`. */
374
+ event: string;
375
+ /** The idp, method or error code the event is about; "" when none. */
376
+ key: string;
377
+ n: number;
378
+ }
379
+ export interface AuthFunnel {
380
+ days: number;
381
+ rows: AuthFunnelRow[];
382
+ }
74
383
  export type Hostname = Schemas["Hostname"];
75
384
  export type HostnameList = Schemas["HostnameList"];
76
385
  export type HostnameVerify = Schemas["HostnameVerify"];
77
386
  export type HostnameRecord = Schemas["HostnameRecord"];
78
- /** 상태 넷. 화면의 배지가 이 값에 붙는다 (docs/domains.md §3.3). */
387
+ /** The four states. The badge on screen hangs off this value (docs/domains.md §3.3). */
79
388
  export type HostnameState = NonNullable<Hostname["state"]>;
80
389
  export type Zone = Schemas["Zone"];
81
390
  export type ZoneDetail = Schemas["ZoneDetail"];
@@ -86,10 +395,41 @@ export type DomainDetail = Schemas["DomainDetail"];
86
395
  export type DomainList = Schemas["DomainList"];
87
396
  export type DomainAvailability = Schemas["DomainAvailability"];
88
397
  export type DomainContact = Schemas["DomainContact"];
398
+ export type DomainCharge = Schemas["DomainCharge"];
399
+ /**
400
+ * A purchase or renewal answers with the domain once it is paid and done, or with
401
+ * the charge while payment is still on its way (a checkout to pay in, or a charge
402
+ * settling). The charge is the one with a `chargeId`.
403
+ */
404
+ export declare function isDomainCharge(v: Domain | DomainCharge): v is DomainCharge;
89
405
  export type DomainEvent = Schemas["DomainEvent"];
90
- /** `Domain["state"]` 을 따로 내보낸다 — 화면이 배지 표를 이 유니온으로 못박는다. */
406
+ /** `Domain["state"]` is exported separately — the screen pins its badge table to this union. */
91
407
  export type DomainState = Domain["state"];
92
- /** 서버가 돌려준 오류 봉투를 그대로 들고 있는 예외. */
408
+ /**
409
+ * A status the edge in front of cp-public can produce on its own: 502–504, and
410
+ * Cloudflare's 520–527 (524 is its 100 s origin timeout). With no JSON body these
411
+ * are the edge's words, not the server's, and are raised as `edge_<status>`.
412
+ */
413
+ export declare function isEdgeStatus(status: number): boolean;
414
+ /** True for the `edge_<status>` ApiError `isEdgeStatus` produces. */
415
+ export declare function isEdgeError(err: unknown): boolean;
416
+ /** One entry of an incremental upload's list, in tar order (docs/incremental-deploy-upload.md §1.1). */
417
+ export type DeploymentUploadEntry = {
418
+ path: string;
419
+ sha256: string;
420
+ size: number;
421
+ type?: "file";
422
+ } | {
423
+ path: string;
424
+ type: "dir";
425
+ };
426
+ export type DeploymentUpload = Schemas["DeploymentUpload"];
427
+ export interface PreviewTarget {
428
+ preview: string;
429
+ db?: string | undefined;
430
+ from?: string | undefined;
431
+ }
432
+ /** The exception that carries the server's error envelope unchanged. */
93
433
  export declare class ApiError extends Error {
94
434
  readonly status: number;
95
435
  readonly code: string;
@@ -99,258 +439,1284 @@ export declare class ApiError extends Error {
99
439
  export interface ClientOptions {
100
440
  baseUrl: string;
101
441
  token?: string | undefined;
442
+ /**
443
+ * Sends a GET or HEAD again when the edge answered for the server (`edge_<status>`)
444
+ * or `transport` says the connection failed in a way worth another try. Never a
445
+ * write: after a cut its effect is unknown, and the caller has to check (the CLI's
446
+ * upload does, docs/incremental-deploy-upload.md §3). The delay doubles from
447
+ * `backoffMs`. Off when absent, so a screen shows a failure at once.
448
+ */
449
+ retry?: {
450
+ attempts: number;
451
+ backoffMs: number;
452
+ transport: (err: unknown) => boolean;
453
+ } | undefined;
102
454
  }
103
455
  export declare class Client {
104
456
  private readonly opts;
105
457
  constructor(opts: ClientOptions);
106
458
  private headers;
459
+ /** Runs one attempt again under `opts.retry`, for a safe method only. */
460
+ private retrying;
107
461
  private request;
462
+ private requestOnce;
463
+ /** A body that is not JSON (the raw mail). Error handling is the same as request. */
464
+ private text;
465
+ private textOnce;
108
466
  private json;
109
467
  devLogin(subject: string): Promise<Ok<"devLogin">>;
110
- /** 켜진 로그인 방식. 로그인 화면이 버튼을 그리는 데 쓴다. */
111
- authProviders(): Promise<Ok<"listAuthProviders">>;
112
468
  /**
113
- * GitHub OAuth 시작 URL. 브라우저가 따라가는 302 라 fetch 로 부르지 않고
114
- * `window.location` 에 넣는다. `redirect` 는 서버 허용 목록에 있어야 한다.
469
+ * Takes the sign-up and sends the confirmation mail. Neither a session nor a
470
+ * password is created here — the password is chosen in `verifyEmail` by
471
+ * whoever opens the mailbox.
472
+ */
473
+ passwordSignUp(email: string, name?: string): Promise<Ok<"passwordSignUp">>;
474
+ passwordSignIn(email: string, password: string): Promise<Ok<"passwordSignIn">>;
475
+ /** The same accepted response comes back whether or not the email exists. */
476
+ passwordForgot(email: string): Promise<Ok<"passwordForgot">>;
477
+ passwordReset(token: string, password: string): Promise<Ok<"passwordReset">>;
478
+ /** Uses the confirmation link and sets the account's first password. */
479
+ verifyEmail(token: string, password: string): Promise<Ok<"verifyEmail">>;
480
+ /**
481
+ * Finishes a sign-in that came back `{mfa:"totp"}`.
482
+ *
483
+ * Callable without a token: `pending` is the credential, and it is not a
484
+ * session — no other endpoint accepts it.
485
+ */
486
+ completeTotpLogin(pending: string, factor: {
487
+ code: string;
488
+ } | {
489
+ recovery: string;
490
+ }): Promise<Ok<"completeTotpLogin">>;
491
+ /** This account's two-factor state, including which orgs require it. */
492
+ getTotp(): Promise<Ok<"getTotp">>;
493
+ /**
494
+ * Draws a secret to scan. It does **not** turn the factor on — `confirmTotp`
495
+ * does, after the app has proved it can produce a code.
496
+ */
497
+ enrollTotp(): Promise<Ok<"enrollTotp">>;
498
+ /** Turns the factor on and hands back the ten recovery codes. They are shown once. */
499
+ confirmTotp(code: string): Promise<Ok<"confirmTotp">>;
500
+ /** Turns it off. A code or a recovery code is required — the session alone is not. */
501
+ disableTotp(factor: {
502
+ code: string;
503
+ } | {
504
+ recovery: string;
505
+ }): Promise<void>;
506
+ /**
507
+ * The GitHub OAuth start URL. It is a 302 the browser follows, so it goes into
508
+ * `window.location` rather than being called with fetch. `redirect` has to be
509
+ * on the server's allow-list.
115
510
  */
116
511
  githubStartUrl(redirect: string): string;
512
+ /** The Google OAuth start URL. Uses the same dashboard callback shape as GitHub. */
513
+ googleStartUrl(redirect: string): string;
514
+ /**
515
+ * The generic OIDC start URL (docs/onprem-delivery.md §7.7). Same 302-and-fragment
516
+ * shape as the other two; which provider is behind it is the installation's choice.
517
+ */
518
+ oidcStartUrl(redirect: string): string;
519
+ /**
520
+ * Does this deployment federate an identity provider?
521
+ *
522
+ * **There is no endpoint that answers "which logins are on"** — one existed and was
523
+ * deleted, because its only reader was the login screen and it put a round trip in
524
+ * front of every login button (cp/internal/public/public.go). This is not that
525
+ * endpoint coming back: cp-public **does not register** the two OIDC routes when no
526
+ * issuer is configured, so the mux's own 404 is the answer, and the probe is a HEAD
527
+ * that no handler runs.
528
+ *
529
+ * Any other status means the route is there — a 400 (this probe carries no
530
+ * `redirect`) or a 502 (the provider's discovery document could not be read) both say
531
+ * the handler exists, and a button that leads to a readable error beats no button.
532
+ * A network failure answers false: on SaaS, where the answer is false anyway, a dead
533
+ * API address must not draw a login that cannot work.
534
+ */
535
+ oidcAvailable(): Promise<boolean>;
536
+ /**
537
+ * This installation's licence (docs/onprem-delivery.md §6.5). Readable by any
538
+ * signed-in user: the footer it feeds is on every page for everybody.
539
+ *
540
+ * On SaaS it answers `onPrem: false` rather than 404, so the caller has one shape to
541
+ * read and the surfaces draw nothing on the flag.
542
+ */
543
+ license(): Promise<Ok<"getLicense">>;
544
+ /**
545
+ * The names of this deployment (app domain, docs address). Callable without auth.
546
+ *
547
+ * This exists so the dashboard does not hard-code a domain into the screen
548
+ * (docs/environments.md §3.2) — hard-coded, the dev screen tells people a
549
+ * production address, and because that address opens, nobody ever says it is
550
+ * wrong.
551
+ */
552
+ siteConfig(): Promise<Ok<"getSiteConfig">>;
117
553
  me(): Promise<Ok<"getMe">>;
118
554
  listOrgs(): Promise<Ok<"listOrgs">>;
555
+ /** Changes the display name only (admin). The slug is the name that becomes an address, so it is not on this surface. */
556
+ /**
557
+ * `requireTotp` is left out when it is not given, on purpose: the server reads
558
+ * an absent field as "leave it alone". Sending `false` by default would mean a
559
+ * rename silently switched the org's second-factor requirement off.
560
+ */
561
+ updateOrg(org: string, name: string, requireTotp?: boolean): Promise<Ok<"updateOrg">>;
562
+ /**
563
+ * Deletes the organization (admin). **This cannot be undone.**
564
+ *
565
+ * `confirm` has to be the organization slug exactly — the confirmation lives on
566
+ * the server because three places call this surface (the screen, the CLI, and
567
+ * scripts). If a live project, domain, repository, or DNS zone is left, it is a
568
+ * 409 `org_not_empty` and `details.holdings` says what is left — **projects
569
+ * already deleted are not counted.**
570
+ *
571
+ * The `purgeAfter` in the answer is when the rows actually disappear. By the
572
+ * moment it returns the organization is already gone from every surface; what
573
+ * remains is retention until that time.
574
+ */
575
+ deleteOrg(org: string, confirm: string): Promise<Ok<"deleteOrg">>;
119
576
  createOrg(slug: string, name: string): Promise<Ok<"createOrg">>;
120
577
  /**
121
- * org 의 최근 알림 (docs/limits.md §3.4).
578
+ * The organization's recent notifications (docs/limits.md §3.4).
122
579
  *
123
- * `sentAt` 이 없는 행은 아직 큐에 있거나 받을 이메일이 없는 것이다 — 후자에게
124
- * 이 목록이 유일한 통로라, 화면은 두 상태를 같게 그린다.
580
+ * A row with no `sentAt` is either still queued or has no email address to
581
+ * reach — and for the second, this list is the only channel, so the screen
582
+ * draws both states the same way.
125
583
  */
126
584
  listNotifications(org: string, limit?: number): Promise<Ok<"listNotifications">>;
585
+ /**
586
+ * The plan and billing state (docs/billing.md). If `enabled` is false, this
587
+ * deployment has no billing — the screen shows only a contact address.
588
+ */
589
+ getBilling(org: string): Promise<Ok<"getBilling">>;
590
+ /**
591
+ * A Pro checkout session. Send the browser to the `url` that comes back. Even
592
+ * once payment finishes, the thing that changes the plan is the webhook, so
593
+ * read `getBilling` again after the browser returns.
594
+ */
595
+ createBillingCheckout(org: string, returnTo: string): Promise<Ok<"createBillingCheckout">>;
596
+ /** A one-time `url` for the customer portal (payment method, receipts, cancellation). */
597
+ createBillingPortal(org: string, returnTo: string): Promise<Ok<"createBillingPortal">>;
598
+ /** The customer session token for the payment-method embed (1 hour). An org with no payment history gets a 404. */
599
+ createBillingSession(org: string): Promise<Ok<"createBillingSession">>;
600
+ /** Schedules cancellation at the end of the period (`cancel: true`), or undoes it. There is no immediate revocation. */
601
+ cancelBilling(org: string, body: {
602
+ cancel: boolean;
603
+ reason?: string;
604
+ comment?: string;
605
+ }): Promise<Ok<"cancelBilling">>;
127
606
  listProjects(org: string): Promise<Ok<"listProjects">>;
128
607
  createProject(org: string, name: string): Promise<Ok<"createProject">>;
129
608
  getProject(org: string, name: string): Promise<Ok<"getProject">>;
609
+ /**
610
+ * Renames the project (admin). **The default address moves with it and there is
611
+ * no alias** — which is why the response carries the new address. Unlike the
612
+ * org slug, this name can change because it is the inner label of the org
613
+ * wildcard certificate.
614
+ */
615
+ updateProject(org: string, name: string, next: string): Promise<Ok<"updateProject">>;
616
+ /**
617
+ * Starts tearing the project down (admin). **This cannot be undone and leaves
618
+ * no recovery generation.** `confirm` has to be the project name exactly.
619
+ */
620
+ deleteProject(org: string, name: string, confirm: string): Promise<Ok<"deleteProject">>;
621
+ /**
622
+ * Disables a project (admin): it stops serving and taking new backups, and
623
+ * keeps everything it has. A project disabled for a year is deleted for good.
624
+ */
625
+ disableProject(org: string, name: string): Promise<Ok<"disableProject">>;
626
+ /** Enables a disabled project (admin). 409 `project_limit` when there is no room for it. */
627
+ enableProject(org: string, name: string): Promise<Ok<"enableProject">>;
628
+ /** Watches the teardown operation to its end even after the project is gone. */
629
+ getOrgOperation(org: string, opId: string): Promise<Ok<"getOrgOperation">>;
630
+ /** Everything the project's first screen takes in one call. Usage calls `getUsage` alongside it. */
631
+ getProjectOverview(org: string, name: string): Promise<Ok<"getProjectOverview">>;
130
632
  listDeployments(org: string, name: string): Promise<Ok<"listDeployments">>;
131
- /** 본문이 곧 번들이다. 다이제스트 하나가 코드와 자산 전부를 덮는다. */
132
- deploy(org: string, name: string, bundle: Uint8Array): Promise<Ok<"createDeployment">>;
133
- /** 멱등이다. 두 번 불러도 비밀번호는 굴지 않고 같은 접속 정보가 온다. */
633
+ /**
634
+ * One deployment, with `migrations` when the control plane applied its
635
+ * `migrations/` — which today means a preview deployed with `db=branch`
636
+ * (docs/studio.md §6.6 step 2).
637
+ *
638
+ * A preview's deployment is read under **the parent project's name**, the name
639
+ * the caller deployed through: the preview is a project of its own, but the
640
+ * caller never learns its name.
641
+ */
642
+ getDeployment(org: string, name: string, deploymentId: string): Promise<Ok<"getDeployment">>;
643
+ /** Completed-front HTTP outcomes only; native crash-free health is unknown. */
644
+ getReleaseHealth(org: string, name: string): Promise<Ok<"getReleaseHealth">>;
645
+ /** Historical first transition per issue; never substitutes a latest occurrence. */
646
+ listReleaseIssues(org: string, name: string, version: number, opts: {
647
+ kind: "new" | "regressed";
648
+ windowStart: string;
649
+ windowEnd: string;
650
+ cursor?: string;
651
+ }): Promise<Ok<"listReleaseIssues">>;
652
+ /** Runlot Errors: the issue stream (docs/customer-error-tracking.md). */
653
+ listErrorIssues(org: string, name: string, opts?: {
654
+ status?: "unresolved" | "resolved" | "archived" | "all";
655
+ query?: string;
656
+ cursor?: string;
657
+ limit?: number;
658
+ }): Promise<Ok<"listErrorIssues">>;
659
+ getErrorIssue(org: string, name: string, issueId: string): Promise<Ok<"getErrorIssue">>;
660
+ updateErrorIssue(org: string, name: string, issueId: string, update: ErrorIssueUpdate): Promise<Ok<"updateErrorIssue">>;
661
+ /** Source context, suspects and owners for the selected stored occurrence, or latest when omitted. */
662
+ getErrorInsights(org: string, name: string, issueId: string, opts?: {
663
+ eventId?: string;
664
+ }): Promise<Ok<"getErrorInsights">>;
665
+ listErrorEvents(org: string, name: string, issueId: string, opts?: {
666
+ cursor?: string;
667
+ limit?: number;
668
+ }): Promise<Ok<"listErrorEvents">>;
669
+ getErrorEvent(org: string, name: string, issueId: string, eventId: string): Promise<Ok<"getErrorEvent">>;
670
+ /**
671
+ * Other events of the project joined to this one by front's request ID or a
672
+ * browser-minted trace ID (§12). Correlation only: issues are never merged.
673
+ */
674
+ getRelatedErrorEvents(org: string, name: string, issueId: string, eventId: string): Promise<Ok<"getRelatedErrorEvents">>;
675
+ /** An issue's hourly history from the ClickHouse store; `available: false` where there is none. */
676
+ getErrorHistory(org: string, name: string, issueId: string, days?: number): Promise<Ok<"getErrorHistory">>;
677
+ /** Assign an issue to an org member, or clear it with null. */
678
+ assignErrorIssue(org: string, name: string, issueId: string, userId: string | null): Promise<Ok<"assignErrorIssue">>;
679
+ listErrorComments(org: string, name: string, issueId: string): Promise<Ok<"listErrorComments">>;
680
+ /** Plain text, at most 4000 characters; the author is the signed-in user. */
681
+ addErrorComment(org: string, name: string, issueId: string, body: string): Promise<Ok<"addErrorComment">>;
682
+ /** Merge up to ten issues of the same origin into `targetIssueId`. */
683
+ mergeErrorIssues(org: string, name: string, targetIssueId: string, sourceIssueIds: string[]): Promise<Ok<"mergeErrorIssues">>;
684
+ /** Take a merged source back out of the issue it was merged into. */
685
+ unmergeErrorIssue(org: string, name: string, issueId: string): Promise<Ok<"unmergeErrorIssue">>;
686
+ /** Shared stack hints: frame overlap, never a merge or a causal claim. */
687
+ similarErrorIssues(org: string, name: string, issueId: string): Promise<Ok<"similarErrorIssues">>;
688
+ getErrorFingerprintRules(org: string, name: string): Promise<Ok<"getErrorFingerprintRules">>;
689
+ putErrorFingerprintRules(org: string, name: string, rules: ErrorFingerprintRule[]): Promise<Ok<"putErrorFingerprintRules">>;
690
+ getErrorAlerts(org: string, name: string): Promise<Ok<"getErrorAlerts">>;
691
+ putErrorAlertRule(org: string, name: string, id: string, rule: components["schemas"]["ErrorAlertRule"]): Promise<Ok<"putErrorAlertRule">>;
692
+ deleteErrorAlertRule(org: string, name: string, id: string): Promise<void>;
693
+ putErrorAlertDestination(org: string, name: string, id: string, input: components["schemas"]["ErrorAlertDestinationInput"]): Promise<Ok<"putErrorAlertDestination">>;
694
+ deleteErrorAlertDestination(org: string, name: string, id: string): Promise<void>;
695
+ getErrorAlertMail(org: string, name: string): Promise<Ok<"getErrorAlertMail">>;
696
+ putErrorAlertMail(org: string, name: string, preference: components["schemas"]["ErrorAlertMailPreference"]): Promise<Ok<"putErrorAlertMail">>;
697
+ listErrorAlertDeliveries(org: string, name: string): Promise<Ok<"listErrorAlertDeliveries">>;
698
+ listMonitors(org: string, name: string): Promise<Ok<"listMonitors">>;
699
+ exportMonitors(org: string, name: string): Promise<Ok<"exportMonitors">>;
700
+ getMonitor(org: string, name: string, id: string): Promise<Ok<"getMonitor">>;
701
+ putMonitor(org: string, name: string, id: string, monitor: components["schemas"]["Monitor"]): Promise<Ok<"putMonitor">>;
702
+ deleteMonitor(org: string, name: string, id: string): Promise<void>;
703
+ getMonitorHistory(org: string, name: string, id: string, limit?: number): Promise<Ok<"getMonitorHistory">>;
704
+ testMonitor(org: string, name: string, id: string): Promise<Ok<"testMonitor">>;
705
+ listDowntimes(org: string, name: string): Promise<Ok<"listDowntimes">>;
706
+ putDowntime(org: string, name: string, id: string, downtime: components["schemas"]["Downtime"]): Promise<Ok<"putDowntime">>;
707
+ deleteDowntime(org: string, name: string, id: string): Promise<void>;
708
+ listSLOs(org: string, name: string): Promise<Ok<"listSLOs">>;
709
+ getSLO(org: string, name: string, id: string): Promise<Ok<"getSLO">>;
710
+ putSLO(org: string, name: string, id: string, slo: components["schemas"]["SLO"]): Promise<Ok<"putSLO">>;
711
+ deleteSLO(org: string, name: string, id: string): Promise<void>;
712
+ /**
713
+ * Observability access and governance (customer-observability.md §12, §16, §17.15):
714
+ * the caller's grants, per-project role overrides, the audit trail, the data page,
715
+ * caps, export destinations and rehydration.
716
+ */
717
+ getObservabilityPermissions(org: string, name: string): Promise<Ok<"getObservabilityPermissions">>;
718
+ listObservabilityRoles(org: string, name: string): Promise<Ok<"listObservabilityRoles">>;
719
+ putObservabilityRole(org: string, name: string, userId: string, grants: ObservabilityPermission[]): Promise<Ok<"putObservabilityRole">>;
720
+ deleteObservabilityRole(org: string, name: string, userId: string): Promise<void>;
721
+ listObservabilityAudit(org: string, name: string, opts?: {
722
+ limit?: number;
723
+ before?: string;
724
+ }): Promise<Ok<"listObservabilityAudit">>;
725
+ getObservabilityData(org: string, name: string): Promise<Ok<"getObservabilityData">>;
726
+ getObservabilityCaps(org: string, name: string): Promise<Ok<"getObservabilityCaps">>;
727
+ /** Named meters only: a number, -1 (no cap, Pro) or null (the plan's included amount). */
728
+ putObservabilityCaps(org: string, name: string, caps: Schemas["ObservabilityCapsUpdate"]): Promise<Ok<"putObservabilityCaps">>;
729
+ listObservabilityExports(org: string, name: string): Promise<Ok<"listObservabilityExports">>;
730
+ getObservabilityExport(org: string, name: string, exportId: string): Promise<Ok<"getObservabilityExport">>;
731
+ createObservabilityExport(org: string, name: string, input: Schemas["ObservabilityExportCreate"]): Promise<Ok<"createObservabilityExport">>;
732
+ updateObservabilityExport(org: string, name: string, exportId: string, input: Schemas["ObservabilityExportUpdate"]): Promise<Ok<"updateObservabilityExport">>;
733
+ deleteObservabilityExport(org: string, name: string, exportId: string): Promise<void>;
734
+ listObservabilityRehydrations(org: string, name: string): Promise<Ok<"listObservabilityRehydrations">>;
735
+ getObservabilityRehydration(org: string, name: string, jobId: string): Promise<Ok<"getObservabilityRehydration">>;
736
+ /** Loads an archived range back for seven days; the answer is the queued job. */
737
+ createObservabilityRehydration(org: string, name: string, input: {
738
+ exportId: string;
739
+ from: string;
740
+ to: string;
741
+ }): Promise<Ok<"createObservabilityRehydration">>;
742
+ /** `runlot bug-report` (customer-observability.md §14): the CP snapshots what the references name. */
743
+ createBugReport(org: string, input: Schemas["BugReportCreate"]): Promise<Ok<"createBugReport">>;
744
+ listBugReports(org: string): Promise<Ok<"listBugReports">>;
745
+ getBugReport(org: string, reportId: string, opts?: {
746
+ snapshot?: boolean;
747
+ }): Promise<Ok<"getBugReport">>;
748
+ deleteBugReport(org: string, reportId: string): Promise<void>;
749
+ /** Synthetic HTTP checks of the project's own addresses (customer-observability.md §17.11). */
750
+ listUptimeChecks(org: string, name: string): Promise<Ok<"listUptimeChecks">>;
751
+ putUptimeCheck(org: string, name: string, id: string, input: components["schemas"]["UptimeCheckInput"]): Promise<Ok<"putUptimeCheck">>;
752
+ deleteUptimeCheck(org: string, name: string, id: string): Promise<void>;
753
+ listUptimeRuns(org: string, name: string, id: string, limit?: number): Promise<Ok<"listUptimeRuns">>;
754
+ /** Dashboards (customer-observability.md §17.7). A built-in's id is `builtin:<key>`. */
755
+ listDashboards(org: string, name: string): Promise<Ok<"listDashboards">>;
756
+ createDashboard(org: string, name: string, input: Schemas["DashboardInput"]): Promise<Ok<"createDashboard">>;
757
+ getDashboard(org: string, name: string, id: string): Promise<Ok<"getDashboard">>;
758
+ putDashboard(org: string, name: string, id: string, input: Schemas["DashboardInput"]): Promise<Ok<"putDashboard">>;
759
+ deleteDashboard(org: string, name: string, id: string): Promise<void>;
760
+ /** The `.runlot/dashboards/<key>.json` form of a dashboard. */
761
+ exportDashboard(org: string, name: string, id: string): Promise<Ok<"exportDashboard">>;
762
+ /** Make (or rotate) the public link; the token is shown once. */
763
+ shareDashboard(org: string, name: string, id: string, isPublic?: boolean): Promise<Ok<"shareDashboard">>;
764
+ unshareDashboard(org: string, name: string, id: string): Promise<void>;
765
+ getDashboardWidgetData(org: string, name: string, id: string, widgetId: string, req?: Schemas["WidgetDataRequest"]): Promise<Ok<"getDashboardWidgetData">>;
766
+ getDashboardSettings(org: string, name: string): Promise<Ok<"getDashboardSettings">>;
767
+ putDashboardSettings(org: string, name: string, settings: Schemas["DashboardSettings"]): Promise<Ok<"putDashboardSettings">>;
768
+ /** Deploy and OOM markers for every time series. */
769
+ getObservabilityMarkers(org: string, name: string, range?: {
770
+ from?: string;
771
+ to?: string;
772
+ }): Promise<Ok<"getObservabilityMarkers">>;
773
+ /** Watchdog insights (§17.10). Free: deploy regressions only. */
774
+ listInsights(org: string, name: string, opts?: {
775
+ state?: "open" | "resolved" | "all";
776
+ limit?: number;
777
+ }): Promise<Ok<"listInsights">>;
778
+ resolveInsight(org: string, name: string, id: string): Promise<void>;
779
+ /** Synthetic checks (§17.11): the uptime checks, including multi-step API checks. */
780
+ listSynthetics(org: string, name: string): Promise<Ok<"listSynthetics">>;
781
+ putSynthetic(org: string, name: string, id: string, input: Schemas["UptimeCheckInput"]): Promise<Ok<"putSynthetic">>;
782
+ deleteSynthetic(org: string, name: string, id: string): Promise<void>;
783
+ listSyntheticRuns(org: string, name: string, id: string, limit?: number): Promise<Ok<"listSyntheticRuns">>;
784
+ /** A public dashboard link. Needs no credential. */
785
+ getSharedDashboard(token: string): Promise<Ok<"getSharedDashboard">>;
786
+ getSharedDashboardWidgetData(token: string, widgetId: string, req?: Schemas["WidgetDataRequest"]): Promise<Ok<"getSharedDashboardWidgetData">>;
787
+ private obsApmPath;
788
+ getObsMetricsOverview(org: string, name: string, opts?: ObsRangeQuery & ObsRedQuery & {
789
+ groupBy?: "version";
790
+ }): Promise<Ok<"getObsMetricsOverview">>;
791
+ getObsMetricsMemory(org: string, name: string, opts?: ObsRangeQuery): Promise<Ok<"getObsMetricsMemory">>;
792
+ getObsMetricsInfrastructure(org: string, name: string, opts?: ObsRangeQuery): Promise<Ok<"getObsMetricsInfrastructure">>;
793
+ getObsMetricsCustom(org: string, name: string, opts: ObsRangeQuery & {
794
+ name: string;
795
+ agg?: string;
796
+ tags?: string;
797
+ groupBy?: string;
798
+ }): Promise<Ok<"getObsMetricsCustom">>;
799
+ getObsMetricsCustomNames(org: string, name: string): Promise<Ok<"getObsMetricsCustomNames">>;
800
+ listObsRoutes(org: string, name: string): Promise<Ok<"listObsRoutes">>;
801
+ putObsRoute(org: string, name: string, input: components["schemas"]["ObsRouteStateInput"]): Promise<Ok<"putObsRoute">>;
802
+ getObsAPMRoutes(org: string, name: string, opts?: ObsRangeQuery & ObsRedQuery): Promise<Ok<"getObsAPMRoutes">>;
803
+ getObsAPMBreakdown(org: string, name: string, route: string, opts?: ObsRangeQuery & {
804
+ version?: number;
805
+ }): Promise<Ok<"getObsAPMBreakdown">>;
806
+ getObsAPMServiceMap(org: string, name: string, opts?: ObsRangeQuery & {
807
+ version?: number;
808
+ }): Promise<Ok<"getObsAPMServiceMap">>;
809
+ getObsAPMCompare(org: string, name: string, a: number, b: number, opts?: ObsRangeQuery): Promise<Ok<"getObsAPMCompare">>;
810
+ listObsAPMTraces(org: string, name: string, opts?: {
811
+ from?: string;
812
+ to?: string;
813
+ before?: string;
814
+ route?: string;
815
+ status?: string;
816
+ minDuration?: number;
817
+ hasError?: boolean;
818
+ version?: number;
819
+ }): Promise<Ok<"listObsAPMTraces">>;
820
+ getObsAPMTrace(org: string, name: string, traceId: string): Promise<Ok<"getObsAPMTrace">>;
821
+ listObsTraceFilters(org: string, name: string): Promise<Ok<"listObsTraceFilters">>;
822
+ createObsTraceFilter(org: string, name: string, input: components["schemas"]["ObsTraceFilterInput"]): Promise<Ok<"createObsTraceFilter">>;
823
+ updateObsTraceFilter(org: string, name: string, id: string, input: components["schemas"]["ObsTraceFilterInput"]): Promise<Ok<"updateObsTraceFilter">>;
824
+ deleteObsTraceFilter(org: string, name: string, id: string): Promise<void>;
825
+ listObsDBQueries(org: string, name: string, opts?: {
826
+ from?: string;
827
+ to?: string;
828
+ }): Promise<Ok<"listObsDBQueries">>;
829
+ getObsDBQuery(org: string, name: string, fingerprint: string, opts?: {
830
+ from?: string;
831
+ to?: string;
832
+ }): Promise<Ok<"getObsDBQuery">>;
833
+ getObsDBHealth(org: string, name: string): Promise<Ok<"getObsDBHealth">>;
834
+ /** The continuous profiler's switch (customer-observability.md §17.13). */
835
+ getObsProfilerSettings(org: string, name: string): Promise<ObsProfilerSettings>;
836
+ /** On, off, or null for the default. Applies from the next deployment or restart. Admin. */
837
+ putObsProfilerSettings(org: string, name: string, enabled: boolean | null): Promise<ObsProfilerSettings>;
838
+ /** The logs/traces sampling override; a null field is the manifest's. */
839
+ getObsSampling(org: string, name: string): Promise<ObsSampling>;
840
+ /** Replaces the override (null = the manifest's). Admin. */
841
+ putObsSampling(org: string, name: string, body: ObsSampling): Promise<ObsSampling>;
842
+ listObsProfiles(org: string, name: string, q?: ObsProfileQuery): Promise<ObsProfileList>;
843
+ /** The windows within a minute of `ts` — the profile of a slow trace's minute. */
844
+ nearObsProfiles(org: string, name: string, ts: string): Promise<ObsProfileList>;
845
+ getObsFlamegraph(org: string, name: string, q?: Omit<ObsProfileQuery, "limit">): Promise<ObsFlamegraph>;
846
+ getObsProfileTop(org: string, name: string, q?: ObsProfileQuery): Promise<ObsProfileTop>;
847
+ /** Self-time share per function, version a against version b. */
848
+ compareObsProfiles(org: string, name: string, a: number, b: number, q?: Pick<ObsProfileQuery, "from" | "to">): Promise<ObsProfileCompare>;
849
+ /** RUM: page views, sessions and p75 vitals over time (Pro). */
850
+ getObsRUMOverview(org: string, name: string, q?: ObsRUMQuery): Promise<ObsRUMOverview>;
851
+ /** RUM by page template, with vitals, long tasks and resource/fetch timings (Pro). */
852
+ listObsRUMPages(org: string, name: string, q?: ObsRUMQuery & {
853
+ sort?: "views" | "lcp" | "inp" | "cls";
854
+ }): Promise<ObsRUMPages>;
855
+ /** RUM by device class (Pro). */
856
+ listObsRUMDevices(org: string, name: string, q?: ObsRUMQuery): Promise<ObsRUMDevices>;
857
+ /** RUM page views, newest (or slowest LCP) first (Pro). */
858
+ listObsRUMViews(org: string, name: string, q?: ObsRUMQuery & {
859
+ session?: string;
860
+ sort?: "recent" | "slowest";
861
+ limit?: number;
862
+ }): Promise<ObsRUMViewList>;
863
+ /** One page view and the server requests it caused (Pro). */
864
+ getObsRUMView(org: string, name: string, viewId: string): Promise<ObsRUMView>;
865
+ /** Starts one heap snapshot (Pro, admin; pauses the app while taken). Poll the list. */
866
+ createObsHeapSnapshot(org: string, name: string): Promise<ObsHeapSnapshot>;
867
+ listObsHeapSnapshots(org: string, name: string): Promise<ObsHeapSnapshotList>;
868
+ /** The download URL of a ready snapshot (a `.heapsnapshot` file). */
869
+ obsHeapSnapshotURL(org: string, name: string, snapshotId: string): string;
870
+ /** A ready snapshot's text (Chrome DevTools heap snapshot JSON). */
871
+ downloadObsHeapSnapshot(org: string, name: string, snapshotId: string): Promise<string>;
872
+ getErrorOwnership(org: string, name: string): Promise<Ok<"getErrorOwnership">>;
873
+ createErrorOwnershipPin(org: string, name: string, input: Schemas["ErrorOwnershipPinInput"]): Promise<Ok<"createErrorOwnershipPin">>;
874
+ revokeErrorOwnershipPin(org: string, name: string, deploymentId: string, selector: string): Promise<void>;
875
+ getErrorCapturePolicy(org: string, name: string): Promise<Ok<"getErrorCapturePolicy">>;
876
+ putErrorCapturePolicy(org: string, name: string, policy: ErrorCapturePolicy, acknowledgePII?: boolean): Promise<Ok<"putErrorCapturePolicy">>;
877
+ private obsPath;
878
+ getObservabilityCapabilities(org: string, name: string): Promise<Ok<"getObservabilityCapabilities">>;
879
+ /** Runs a query; `{ available: false }` where there is no event store. */
880
+ queryObservability(org: string, name: string, query: ObsQuery): Promise<Ok<"queryObservability">>;
881
+ listObservabilityKeys(org: string, name: string, opts?: {
882
+ since?: string;
883
+ until?: string;
884
+ view?: "events" | "invocations" | "spans";
885
+ }): Promise<Ok<"listObservabilityKeys">>;
886
+ listObservabilityValues(org: string, name: string, key: string, opts?: {
887
+ since?: string;
888
+ until?: string;
889
+ view?: "events" | "invocations" | "spans";
890
+ }): Promise<Ok<"listObservabilityValues">>;
891
+ listObservabilityPatterns(org: string, name: string, opts?: {
892
+ since?: string;
893
+ until?: string;
894
+ level?: string;
895
+ }): Promise<Ok<"listObservabilityPatterns">>;
896
+ getObservabilityRequest(org: string, name: string, requestId: string): Promise<Ok<"getObservabilityRequest">>;
897
+ listSavedQueries(org: string, name: string): Promise<Ok<"listSavedQueries">>;
898
+ getSavedQuery(org: string, name: string, queryId: string): Promise<Ok<"getSavedQuery">>;
899
+ createSavedQuery(org: string, name: string, input: SavedQueryInput): Promise<Ok<"createSavedQuery">>;
900
+ updateSavedQuery(org: string, name: string, queryId: string, input: SavedQueryInput): Promise<Ok<"updateSavedQuery">>;
901
+ deleteSavedQuery(org: string, name: string, queryId: string): Promise<void>;
902
+ starSavedQuery(org: string, name: string, queryId: string): Promise<Ok<"starSavedQuery">>;
903
+ unstarSavedQuery(org: string, name: string, queryId: string): Promise<Ok<"unstarSavedQuery">>;
904
+ getObservabilityPipeline(org: string, name: string): Promise<Ok<"getObservabilityPipeline">>;
905
+ putObservabilityPipeline(org: string, name: string, processors: ObsProcessor[]): Promise<Ok<"putObservabilityPipeline">>;
906
+ getObservabilityScanner(org: string, name: string): Promise<Ok<"getObservabilityScanner">>;
907
+ putObservabilityScanner(org: string, name: string, scanner: ObsScannerConfig): Promise<Ok<"putObservabilityScanner">>;
908
+ /** Runs a scanner (the project's, or `scanner`) over a sample; nothing is stored. */
909
+ testObservabilityScanner(org: string, name: string, text: string, scanner?: ObsScannerConfig): Promise<Ok<"testObservabilityScanner">>;
910
+ /** The whole ingest configuration, shaped as `.runlot/logs.json`. */
911
+ exportObservabilityLogsConfig(org: string, name: string): Promise<Ok<"exportObservabilityLogsConfig">>;
912
+ listObservabilityLogMetrics(org: string, name: string): Promise<Ok<"listObservabilityLogMetrics">>;
913
+ putObservabilityLogMetric(org: string, name: string, metric: string, def: ObsLogMetric): Promise<Ok<"putObservabilityLogMetric">>;
914
+ deleteObservabilityLogMetric(org: string, name: string, metric: string): Promise<void>;
915
+ getErrorEventPII(org: string, name: string, issueId: string, eventId: string): Promise<Ok<"getErrorEvent">>;
916
+ getErrorSettings(org: string, name: string): Promise<Ok<"getErrorSettings">>;
917
+ putErrorSettings(org: string, name: string,
918
+ /** Omitted writable fields preserve their values; ownership assignment defaults off. */
919
+ settings: Schemas["ErrorSettingsUpdate"]): Promise<Ok<"putErrorSettings">>;
920
+ /**
921
+ * One AI diagnosis of an issue, billed to the org's AI credit. There is no
922
+ * prompt to pass: the control plane builds it from the issue's stored event.
923
+ * The same `idempotencyKey` again returns the stored answer without a second
924
+ * charge, so a caller retrying after a timeout must reuse its key.
925
+ */
926
+ diagnoseErrorIssue(org: string, name: string, issueId: string, body: {
927
+ model: string;
928
+ idempotencyKey: string;
929
+ }): Promise<Ok<"diagnoseErrorIssue">>;
930
+ listErrorDiagnoses(org: string, name: string, issueId: string): Promise<Ok<"listErrorDiagnoses">>;
931
+ private fixPath;
932
+ /**
933
+ * Ask a model to propose a fix for an issue. Billed to the org's AI credit and
934
+ * writes nothing: the repository, base commit and files are chosen by the control
935
+ * plane. Reuse `idempotencyKey` on a retry so it is not charged twice.
936
+ */
937
+ proposeErrorFix(org: string, name: string, issueId: string, body: {
938
+ model: string;
939
+ idempotencyKey: string;
940
+ }): Promise<Ok<"proposeErrorFix">>;
941
+ listErrorFixProposals(org: string, name: string, issueId: string): Promise<Ok<"listErrorFixProposals">>;
942
+ getErrorFixProposal(org: string, name: string, issueId: string, proposalId: string): Promise<Ok<"getErrorFixProposal">>;
943
+ /**
944
+ * Write a ready proposal as one commit on its own `runlot/autofix/` branch. It
945
+ * builds, deploys and merges nothing. `proposalSha` must be the proposal's exactly.
946
+ */
947
+ applyErrorFix(org: string, name: string, issueId: string, proposalId: string, proposalSha: string): Promise<Ok<"applyErrorFix">>;
948
+ lookupErrorFixProposal(org: string, name: string, issueId: string, key: string): Promise<ErrorFixProposal>;
949
+ lookupErrorFixPreview(org: string, name: string, issueId: string, proposalId: string, key: string): Promise<ErrorFixPreview>;
950
+ lookupErrorFixVerification(org: string, name: string, issueId: string, proposalId: string, jobId: string, key: string): Promise<ErrorFixPreviewVerification>;
951
+ approveErrorFixPreview(org: string, name: string, issueId: string, proposalId: string, body: ErrorFixPreviewApproval): Promise<Ok<"approveErrorFixPreview">>;
952
+ getErrorFixPreview(org: string, name: string, issueId: string, proposalId: string, jobId: string): Promise<Ok<"getErrorFixPreview">>;
953
+ approveErrorFixPreviewVerification(org: string, name: string, issueId: string, proposalId: string, jobId: string, body: ErrorFixPreviewVerificationApproval): Promise<Ok<"approveErrorFixPreviewVerification">>;
954
+ /** Erase captured issue data, after explicit review. Admin; unmerge first. */
955
+ deleteErrorIssue(org: string, name: string, issueId: string): Promise<Ok<"deleteErrorIssue">>;
956
+ /** Erase an exact application user ID; anonymous aggregates remain. Admin. */
957
+ eraseErrorUser(org: string, name: string, userId: string): Promise<Ok<"eraseErrorUser">>;
958
+ /** Untrusted browser histograms and technical-fuse counters, not billed usage. Viewer. */
959
+ getBrowserTelemetry(org: string, name: string): Promise<Ok<"getBrowserTelemetry">>;
960
+ /** Unverified feedback whose exact browser error anchor belongs to this issue. Never includes email. */
961
+ listBrowserFeedback(org: string, name: string, issueId: string): Promise<Ok<"listBrowserFeedback">>;
962
+ /** Explicit sensitive read. Admin + errors:pii; optional unverified email only while feedback-email retention is on. */
963
+ listBrowserFeedbackWithPII(org: string, name: string, issueId: string): Promise<Ok<"listBrowserFeedback">>;
964
+ /** The masked structural replay switch, cap and this month's count. Viewer. */
965
+ getErrorReplaySettings(org: string, name: string): Promise<Ok<"getErrorReplaySettings">>;
966
+ /**
967
+ * Both fields are required: `monthlyCap` null is the plan's amount, `0` stops collection,
968
+ * `-1` removes the cap (Pro). Admin.
969
+ */
970
+ putErrorReplaySettings(org: string, name: string, settings: {
971
+ enabled: boolean;
972
+ monthlyCap: number | null;
973
+ }): Promise<Ok<"putErrorReplaySettings">>;
974
+ /** An issue's complete masked structural replays. Admin, until a granular PII scope exists. */
975
+ listErrorReplays(org: string, name: string, issueId: string): Promise<Ok<"listErrorReplays">>;
976
+ /** One replay and its re-validated batches, for the sandboxed player. Admin. */
977
+ getErrorReplay(org: string, name: string, issueId: string, replayId: string): Promise<Ok<"getErrorReplay">>;
978
+ /**
979
+ * Scheduled runs: what the live deployment declares, when each fires next, and
980
+ * the recent history (docs/cron.md §8). `limit` bounds the history rows only —
981
+ * the schedules and the per-schedule last run are never paged.
982
+ */
983
+ getProjectCron(org: string, name: string, limit?: number): Promise<Ok<"getProjectCron">>;
984
+ /**
985
+ * Queues: what the live deployment declares, how deep each one is, and the
986
+ * recent batch history (docs/queues.md §6). The depth is read from the
987
+ * project's own database; `depthError` on the answer says when it could not be.
988
+ */
989
+ getProjectQueues(org: string, name: string, limit?: number): Promise<Ok<"getProjectQueues">>;
990
+ /**
991
+ * Durable Objects: how many this project has placed, against the two caps
992
+ * (docs/durable-objects.md).
993
+ *
994
+ * **It answers how much, never which.** There is no actor id in the response
995
+ * and none is coming — those name individual objects, and a list of them would
996
+ * be an object enumeration wearing a quota's name. `nodes` is keyed by node id
997
+ * because `nodeLimit` is a separate bound that can refuse a placement while
998
+ * the project-wide cap still has room.
999
+ */
1000
+ getProjectDurableObjects(org: string, name: string): Promise<Ok<"getProjectDurableObjects">>;
1001
+ private queuePath;
1002
+ listQueueRuns(org: string, name: string, queue: string, limit?: number): Promise<Ok<"listQueueRuns">>;
1003
+ /** The head of the queue without leasing it — looking cannot delay a delivery. */
1004
+ peekQueue(org: string, name: string, queue: string, limit?: number): Promise<Ok<"peekQueue">>;
1005
+ /** Irreversible. The confirmation is the caller's — the server holds none. */
1006
+ purgeQueue(org: string, name: string, queue: string): Promise<Ok<"purgeQueue">>;
1007
+ /**
1008
+ * Moves a dead-letter queue's messages back. `to` is required only when the
1009
+ * dead-letter queue belongs to more than one consumer, or to none.
1010
+ */
1011
+ redriveQueue(org: string, name: string, queue: string, to?: string): Promise<Ok<"redriveQueue">>;
1012
+ /**
1013
+ * The vector store: every namespace with its count and width, and the plan's
1014
+ * bounds (docs/vectors.md §4). Read from the project's own database;
1015
+ * `readError` on the answer says when it could not be.
1016
+ */
1017
+ getProjectVectors(org: string, name: string): Promise<Ok<"getProjectVectors">>;
1018
+ /** Irreversible. The confirmation is the caller's — the server holds none. */
1019
+ deleteVectorNamespace(org: string, name: string, namespace: string): Promise<Ok<"deleteVectorNamespace">>;
1020
+ /** The body is the bundle. One digest covers all of the code and the assets. */
1021
+ /**
1022
+ * Uploads the bundle. `headers` carries the provenance headers
1023
+ * (`X-Runlot-Git-*`, openapi createDeployment) — the body is the bundle
1024
+ * itself, so the metadata can only travel in headers.
1025
+ */
1026
+ deploy(org: string, name: string, bundle: Uint8Array, headers?: Record<string, string>): Promise<Ok<"createDeployment">>;
1027
+ /**
1028
+ * The same upload, aimed at a preview (docs/preview.md). **It does not move
1029
+ * production's live pointer** — that is the whole difference, and it is why
1030
+ * this is a named method rather than an optional argument on `deploy`: a
1031
+ * caller that forgets the argument deploys to production.
1032
+ *
1033
+ * `db` picks what `env.db` points at (`branch` by default, `shared` at
1034
+ * production's own database, `none` for no database), and `from` pours the
1035
+ * branch from a named generation instead of the newest one.
1036
+ */
1037
+ deployPreview(org: string, name: string, bundle: Uint8Array, opts: {
1038
+ preview: string;
1039
+ db?: string | undefined;
1040
+ from?: string | undefined;
1041
+ }, headers?: Record<string, string>): Promise<DeployedPreview>;
1042
+ /**
1043
+ * Opens an incremental upload (docs/incremental-deploy-upload.md §1.1). `files` is
1044
+ * the bundle's entry list in tar order; the answer names the hashes to upload.
1045
+ * An older CP answers 404 here — the caller falls back to `deploy`.
1046
+ */
1047
+ createDeploymentUpload(org: string, name: string, files: DeploymentUploadEntry[], preview?: PreviewTarget): Promise<DeploymentUpload>;
1048
+ /** One batch: a gzip tar whose entries are named by their content's sha256 (§1.2). */
1049
+ uploadDeploymentBlobs(org: string, name: string, uploadId: string, batch: Uint8Array): Promise<{
1050
+ received: string[];
1051
+ missing: string[];
1052
+ }>;
1053
+ /**
1054
+ * Assembles and deploys the session (§1.3). The answer is `createDeployment`'s
1055
+ * (with `preview` for a preview session). Idempotent per session, so a retry
1056
+ * after an edge timeout returns the same deployment.
1057
+ */
1058
+ commitDeploymentUpload(org: string, name: string, uploadId: string, headers?: Record<string, string>): Promise<DeployedPreview>;
1059
+ /** The parent's live previews (viewer). A deleted preview is not listed. */
1060
+ listPreviews(org: string, name: string): Promise<Ok<"listPreviews">>;
1061
+ /**
1062
+ * Deletes a preview and its branch (member).
1063
+ *
1064
+ * No confirmation string, unlike `deleteProject`: a branch is a copy taken at a
1065
+ * moment and nothing in it is the only copy of anything.
1066
+ */
1067
+ deletePreview(org: string, name: string, preview: string): Promise<void>;
1068
+ /**
1069
+ * Makes the preview's artifact the parent's live deployment (member).
1070
+ *
1071
+ * **The code, never the data** (docs/preview.md §7). The branch is not merged
1072
+ * and production's database is not replaced. The preview stays alive.
1073
+ */
1074
+ promotePreview(org: string, name: string, preview: string): Promise<Ok<"promotePreview">>;
1075
+ /**
1076
+ * The project's share link — `<label>.share.<app-domain>`, the one address
1077
+ * Studio hands to somebody who is not a developer (docs/studio.md §6.9).
1078
+ *
1079
+ * 404 when the project has never been shared: a link is minted by
1080
+ * `putShareLink`, never as a side effect of reading.
1081
+ */
1082
+ getShareLink(org: string, name: string): Promise<Ok<"getShareLink">>;
1083
+ /**
1084
+ * Points the share link at a preview, minting the label if there is none.
1085
+ *
1086
+ * Idempotent: the label is kept across shares, so somebody holding the link
1087
+ * keeps working. `rotate` mints a new label and retires the old name in the
1088
+ * same request ("링크 재발급"), so the project never has two live links.
1089
+ */
1090
+ putShareLink(org: string, name: string, opts?: {
1091
+ preview?: string;
1092
+ rotate?: boolean;
1093
+ }): Promise<Ok<"putShareLink">>;
1094
+ /** Stops the link answering and forgets the label. The preview keeps running. */
1095
+ deleteShareLink(org: string, name: string): Promise<void>;
1096
+ /** Idempotent. Called twice, the password is not rolled and the same connection details come back. */
134
1097
  createDatabase(org: string, name: string): Promise<Ok<"createDatabase">>;
135
1098
  getDatabase(org: string, name: string): Promise<Ok<"getDatabase">>;
136
1099
  /**
137
- * 접속 자격까지. `getDatabase` 와 라우트가 갈린 것은 역할 때문이다 —
138
- * viewer 는 여부를 알아도 되지만 비밀번호는 아니다 (proto/openapi.yaml).
1100
+ * The connection credentials as well. The route is split from `getDatabase`
1101
+ * because of roles — a viewer may know whether there is a database, but not
1102
+ * the password (proto/openapi.yaml).
139
1103
  */
140
1104
  getDatabaseConnect(org: string, name: string): Promise<Ok<"getDatabaseConnect">>;
141
- /** 접속 끝점만 — 자격 없음. viewer 도 받는다. `runlot port-forward` 가 쓴다. */
1105
+ /** The endpoint only — no credentials. A viewer gets it too. Used by `runlot port-forward`. */
142
1106
  getDatabaseEndpoint(org: string, name: string): Promise<Ok<"getDatabaseEndpoint">>;
143
- /** 단기 기계 자격 발급. 비밀번호는 이 응답에만 실린다. */
1107
+ /** Issues a short-lived machine credential. The password is carried in this response and nowhere else. */
144
1108
  createDatabaseToken(org: string, name: string, ttlSeconds?: number): Promise<Ok<"createDatabaseToken">>;
145
1109
  listDatabaseTokens(org: string, name: string): Promise<Ok<"listDatabaseTokens">>;
146
1110
  deleteDatabaseToken(org: string, name: string, user: string): Promise<void>;
147
1111
  /**
148
- * 진단 이미지를 하나 만든다.
1112
+ * Makes one diagnostic image.
149
1113
  *
150
- * **멱등이 아니다** — 부를 때마다 이미지가 하나 생긴다. 그리고 느리다:
151
- * 응답은 덤프가 끝난 뒤에 오고, 그동안 그 프로젝트의 액터는 붙잡혀 있다
152
- * (proto/openapi.yaml).
1114
+ * **Not idempotent** — every call makes another image. And it is slow: the
1115
+ * response comes after the dump finishes, and that project's actor is held
1116
+ * for the whole of it (proto/openapi.yaml).
153
1117
  */
154
1118
  exportDatabase(org: string, name: string): Promise<Ok<"exportDatabase">>;
155
1119
  /**
156
- * 복원이 고를 수 있는 세대 전부. 최신 순이고, `lastCheckedAt` 은 무변경
157
- * 스킵의 하트비트다 — 세대가 늘지 않는 것과 백업이 죽은 것을 가른다.
1120
+ * Every generation a restore can choose, newest first. `lastCheckedAt` is the
1121
+ * heartbeat of the no-change skip — it is what tells "no new generations"
1122
+ * apart from "the backup is dead".
158
1123
  */
159
1124
  listGenerations(org: string, name: string): Promise<Ok<"listGenerations">>;
160
1125
  /**
161
- * 세대로 되돌린다. **그 사이의 쓰기는 사라진다.**
1126
+ * Runs one statement in the project's database (the dashboard console).
162
1127
  *
163
- * 202 로 끝난다 — 돌아오는 것은 연산 id 이고, 진행은
164
- * `getDatabaseOperation` 으로 본다. `latest` 는 서버가 풀지 않는다:
165
- * 목록에서 고른 `(epoch, seq)` 를 그대로 싣는다 (proto/openapi.yaml).
1128
+ * `readOnly` is **omitted, not sent as false**, when the caller wants the safe
1129
+ * mode: the server treats an absent field as read-only, so leaving it out is the
1130
+ * one spelling that cannot be misread. Sending `false` is the explicit ask for
1131
+ * write mode, and only then does the server run outside a transaction.
1132
+ *
1133
+ * SQL failures arrive as an `ApiError` whose body carries `details.sqlstate` —
1134
+ * PostgreSQL's own code, which is what the error panel shows.
1135
+ */
1136
+ executeSQL(org: string, name: string, sql: string, opts?: {
1137
+ readOnly?: boolean;
1138
+ params?: unknown[];
1139
+ }): Promise<Ok<"executeSQL">>;
1140
+ /**
1141
+ * Rolls back to a generation. **Writes made since then are lost.**
1142
+ *
1143
+ * It ends at 202 — what comes back is an operation id, and progress is read
1144
+ * through `getDatabaseOperation`. The server does not resolve `latest`: the
1145
+ * `(epoch, seq)` chosen from the list is carried as-is (proto/openapi.yaml).
166
1146
  */
167
1147
  restoreDatabase(org: string, name: string, epoch: number, seq: number): Promise<Ok<"restoreDatabase">>;
168
1148
  /**
169
- * 데이터베이스를 없앤다. `confirm` 은 프로젝트 이름과 **정확히** 같아야
170
- * 하고, 다르면 서버가 400 `confirm_mismatch` 로 거절한다.
1149
+ * Rolls back to a restore point **inside** a backup (pg-feather docs/37):
1150
+ * `txnId` is that commit, `at` is the last commit at or before that time. One
1151
+ * backup carries the commits in between in order, so the place you can roll
1152
+ * back to is not tied to a backup boundary. Everything else is as in
1153
+ * restoreDatabase — 202, an operation id, and one safety backup before the
1154
+ * rollback.
1155
+ */
1156
+ restoreDatabaseTo(org: string, name: string, target: {
1157
+ txnId: number;
1158
+ } | {
1159
+ at: string;
1160
+ }): Promise<Ok<"restoreDatabase">>;
1161
+ /**
1162
+ * Removes the database. `confirm` has to match the project name **exactly**;
1163
+ * if it does not, the server refuses with 400 `confirm_mismatch`.
171
1164
  */
172
1165
  deleteDatabase(org: string, name: string, confirm: string): Promise<Ok<"deleteDatabase">>;
173
- /** 연산 하나의 진행. 연산 id 는 자격이 아니라 프로젝트 경로 아래에 있다. */
1166
+ /** The progress of one operation. The operation id is not a credential; it lives under the project path. */
174
1167
  getDatabaseOperation(org: string, name: string, opId: string): Promise<Ok<"getDatabaseOperation">>;
175
- /** 되돌릴 수 없는 phase 앞의 연산을 중단한다. */
1168
+ /** Aborts an operation that has not yet reached a phase it cannot come back from. */
176
1169
  abortDatabaseOperation(org: string, name: string, opId: string): Promise<Ok<"abortDatabaseOperation">>;
177
1170
  /**
178
- * 로그 라이브 테일. **JSON 이 아니라 스트림**이라 `request` 를 안 지난다 —
179
- * 돌려주는 것은 줄 단위 `LogEvent` 의 async iterable 이고, `signal` 을 abort
180
- * 하면 연결이 끊긴다. 오류 응답(4xx/5xx)은 다른 메서드와 같은 `ApiError` 다.
1171
+ * A live tail of the logs. It is **a stream, not JSON**, so it does not go
1172
+ * through `request` — what comes back is an async iterable of line-by-line
1173
+ * `LogEvent`, and aborting `signal` closes the connection. An error response
1174
+ * (4xx/5xx) is the same `ApiError` as in every other method.
181
1175
  */
182
1176
  tailLogs(org: string, name: string, opts?: {
183
1177
  tail?: number;
184
1178
  follow?: boolean;
185
1179
  signal?: AbortSignal;
186
- }): AsyncGenerator<LogEvent, void, undefined>;
1180
+ } & LogTailFilter): AsyncGenerator<LogEvent, void, undefined>;
1181
+ /**
1182
+ * The live tail as `LogRecord`s — the stored event's shape (`--format json`).
1183
+ * Pings and the end event still arrive as `LogEvent`s.
1184
+ */
1185
+ tailLogRecords(org: string, name: string, opts?: {
1186
+ tail?: number;
1187
+ follow?: boolean;
1188
+ signal?: AbortSignal;
1189
+ } & LogTailFilter): AsyncGenerator<LogRecord | LogEvent, void, undefined>;
1190
+ private tailStream;
1191
+ /**
1192
+ * The stored lane (0062). It is a plain JSON page, not a stream: the history
1193
+ * does not reach a node, so it answers for a project that is cold, parked, or
1194
+ * has moved since the lines were written — every one of which is a 409 on
1195
+ * `tailLogs`.
1196
+ *
1197
+ * `q` is a plain substring, matched case-insensitively. It is not a regular
1198
+ * expression — `%` and `_` match themselves.
1199
+ *
1200
+ * Paging is keyset: pass the `cursor` from a page back to get the next, older
1201
+ * one. A page with no `cursor` is the end of what is kept.
1202
+ */
1203
+ getLogHistory(org: string, name: string, opts?: {
1204
+ since?: string | undefined;
1205
+ until?: string | undefined;
1206
+ q?: string | undefined;
1207
+ stream?: "stdout" | "stderr" | "runlot" | undefined;
1208
+ limit?: number | undefined;
1209
+ cursor?: string | undefined;
1210
+ }): Promise<LogHistoryPage>;
187
1211
  listSecrets(org: string, name: string): Promise<Ok<"listSecrets">>;
188
- /** 값은 이 호출로만 나간다. 어떤 응답에도 값은 없다. */
1212
+ /** The value travels in this call only. It is in no response at all. */
189
1213
  setSecret(org: string, name: string, secret: string, value: string): Promise<Ok<"setSecret">>;
190
1214
  deleteSecret(org: string, name: string, secret: string): Promise<void>;
191
1215
  getUsage(org: string, name: string, hours?: number): Promise<Ok<"getUsage">>;
192
- /** 부여 여부·접두·쿼터·사용량. `usedBytes` 는 노드 보고 주기만큼 늦다. */
1216
+ /** Grant, prefix, quota, usage. `usedBytes` lags by the node's reporting interval. */
193
1217
  getStorage(org: string, name: string): Promise<Ok<"getStorage">>;
194
1218
  /**
195
- * 스토리지를 부여한다. 멱등이라 두 번 눌러도 접두는 그대로다. 접두·쿼터를
196
- * 인자로 받지 않는 것이 요점이다 — 접두는 격리의 경계이고 쿼터는 요금제가
197
- * 정한다 (proto/openapi.yaml).
1219
+ * Grants storage. It is idempotent, so pressing twice leaves the prefix as it
1220
+ * was. Taking neither the prefix nor the quota as an argument is the point —
1221
+ * the prefix is the isolation boundary and the quota is set by the plan
1222
+ * (proto/openapi.yaml).
198
1223
  */
199
1224
  grantStorage(org: string, name: string): Promise<Ok<"grantStorage">>;
200
- /** 부여를 뗀다. **객체는 지워지지 않는다** (docs/storage.md §7). */
1225
+ /** Removes the grant. **The objects are not deleted** (docs/storage.md §7). */
201
1226
  revokeStorage(org: string, name: string): Promise<void>;
202
1227
  /**
203
- * 부여 여부·설정·프로바이더·호스트. **가입자는 안 온다** — 그 표는 프로젝트
204
- * DB 안이고 (docs/auth.md §6) 워커의 `env.auth` 만 본다.
1228
+ * The key prefixes this project serves unsigned (docs/storage.md §4.7).
205
1229
  *
206
- * `providers` 에는 client id 만 있다. 클라이언트 시크릿은 봉인돼 어느
207
- * 응답에도 안 나온다.
1230
+ * A prefix is stored normalized — `assets` becomes `assets/`, and `/` becomes
1231
+ * the empty string, which means every key. The value that comes back is the
1232
+ * value that governs, so a screen must render the response rather than what
1233
+ * the user typed.
208
1234
  */
209
- getAuth(org: string, name: string): Promise<Ok<"getAuth">>;
1235
+ listStoragePublic(org: string, name: string): Promise<Ok<"listStoragePublic">>;
1236
+ /** Publishes a prefix. Idempotent. All three verbs answer with the whole list. */
1237
+ addStoragePublic(org: string, name: string, prefix: string): Promise<Ok<"addStoragePublic">>;
210
1238
  /**
211
- * 인증을 켠다 (member). 멱등이다.
1239
+ * Unpublishes a prefix. Idempotent.
212
1240
  *
213
- * **데이터베이스가 없으면 409 `database_required`** 다 — 가입자 표가
214
- * 프로젝트 DB 안이라 부여만 세우면 워커가 뜨는 순간 표가 없다. 부르는 쪽은
215
- * 그 코드를 잡아 `runlot pg create` 를 안내한다.
1241
+ * **The world keeps reading for up to a minute.** The object front caches the
1242
+ * list, so this call is not a revocation that takes effect at the instant it
1243
+ * returns — a screen that says "no longer public" the moment this resolves is
1244
+ * telling a small lie.
216
1245
  */
217
- grantAuth(org: string, name: string): Promise<Ok<"grantAuth">>;
1246
+ removeStoragePublic(org: string, name: string, prefix: string): Promise<Ok<"removeStoragePublic">>;
218
1247
  /**
219
- * 설정을 바꾼다 (member). **부분 갱신이다** — 준 칸만 바뀐다. 스위치 하나에
220
- * 전체를 실어 보내면 두 사람이 같은 카드를 만질 때 나중 저장이 앞 저장을
221
- * 덮는다. 부여가 없으면 404 `not_granted`.
1248
+ * One page of objects grouped by `/` (`runlot storage ls`). `prefixes` are the
1249
+ * folders one level down; feed `cursor` back unchanged, its absence is the end.
222
1250
  */
223
- updateAuthSettings(org: string, name: string, settings: AuthSettingsInput): Promise<Ok<"updateAuthSettings">>;
1251
+ listStorageObjects(org: string, name: string, opts?: {
1252
+ prefix?: string;
1253
+ cursor?: string;
1254
+ limit?: number;
1255
+ }): Promise<Ok<"listStorageObjects">>;
224
1256
  /**
225
- * 인증을 해제한다 (admin). **가입자는 안 지워진다** — `runlot_auth` 의 표는
226
- * 프로젝트 DB 에 남고, 다시 켜면 같은 사람들이 그대로 로그인한다.
1257
+ * A five-minute signed GET for one object (`runlot storage download`). The key's
1258
+ * `/` segments stay in the path; each segment is encoded on its own.
1259
+ */
1260
+ signStorageObject(org: string, name: string, key: string): Promise<Ok<"signStorageObject">>;
1261
+ /** Grant, address, sender, limits, recent counts. The address comes back as a preview even without a grant. */
1262
+ getEmail(org: string, name: string): Promise<Ok<"getEmail">>;
1263
+ /** Turns it on. **Idempotent** — we choose the address. The deploy reads `"email": true` and calls this. */
1264
+ grantEmail(org: string, name: string): Promise<Ok<"grantEmail">>;
1265
+ /** Turns it off. Mail arriving at that address now gets a 550. */
1266
+ revokeEmail(org: string, name: string): Promise<void>;
1267
+ /** The project's own sending domains, each with the records to publish. */
1268
+ listEmailDomains(org: string, name: string): Promise<Ok<"listEmailDomains">>;
1269
+ /**
1270
+ * Creates the provider identity and answers with the records to publish.
1271
+ * `publish` writes them into the zone when we host one covering the domain.
1272
+ */
1273
+ addEmailDomain(org: string, name: string, domain: string, publish?: boolean): Promise<Ok<"addEmailDomain">>;
1274
+ /** Re-checks now. The background loop does the same once a minute while pending. */
1275
+ verifyEmailDomain(org: string, name: string, domain: string): Promise<Ok<"verifyEmailDomain">>;
1276
+ /** Deletes the identity and the row. Sending from it is refused from the next convergence. */
1277
+ removeEmailDomain(org: string, name: string, domain: string): Promise<void>;
1278
+ /**
1279
+ * The model catalogue. **Being logged in is enough to see it** — what you can
1280
+ * buy is not an organization's secret, and this list is the price table.
1281
+ *
1282
+ * Prices are integer **micro-cents** per million tokens (1 µ¢ = 1e-8 USD).
1283
+ * Not letting the server pick the decimal place is the point — a small call
1284
+ * rounded to cents becomes 0.
1285
+ */
1286
+ listAIModels(): Promise<Ok<"listAIModels">>;
1287
+ /** Grant, limits, the org balance, 24 h usage. The limits come back as a preview even without a grant. */
1288
+ getAI(org: string, name: string): Promise<Ok<"getAI">>;
1289
+ /** Turns it on. **Idempotent.** The deploy reads `"ai": true` and calls this. */
1290
+ grantAI(org: string, name: string): Promise<Ok<"grantAI">>;
1291
+ /**
1292
+ * Lends the org's own Claude/Codex subscriptions to this project's
1293
+ * `anthropic/*` and `openai/*` calls (docs/studio-byos-ai.md §3.1).
1294
+ *
1295
+ * **Omitting a field leaves it as it was**, so turning lending on does not
1296
+ * clear a fallback that was already set. Admin only: the subscription that
1297
+ * carries the vendor-terms risk belongs to a person, not to the org.
1298
+ */
1299
+ patchAI(org: string, name: string, body: {
1300
+ byos?: boolean;
1301
+ byosCreditFallback?: boolean;
1302
+ }): Promise<Ok<"patchAI">>;
1303
+ /** Turns it off. **The ledger and the balance are untouched** — the balance belongs to the org and the grant belongs to the project. */
1304
+ revokeAI(org: string, name: string): Promise<void>;
1305
+ /** The org's credit balance and its automatic top-up settings. The balance is in micro-cents and can be negative. */
1306
+ getAICredit(org: string): Promise<Ok<"getAICredit">>;
1307
+ /**
1308
+ * One page of this project's AI calls, newest first (docs/ai-observability.md §6.1).
1309
+ * `before` is the previous page's opaque `nextBefore`.
1310
+ */
1311
+ listAICalls(org: string, name: string, opts?: {
1312
+ from?: string;
1313
+ to?: string;
1314
+ model?: string;
1315
+ op?: "run" | "embed" | "judge";
1316
+ lane?: "credit" | "byos" | "none";
1317
+ byos?: "served" | "fellBack" | "refused" | "attempted";
1318
+ status?: "ok" | "error";
1319
+ sessionId?: string;
1320
+ userId?: string;
1321
+ requestId?: string;
1322
+ tag?: string;
1323
+ before?: string;
1324
+ limit?: number;
1325
+ }): Promise<Ok<"listAICalls">>;
1326
+ /** One AI call; the input and output ride only for a reader with observability:pii. */
1327
+ getAICall(org: string, name: string, callId: string): Promise<Ok<"getAICall">>;
1328
+ /** AI calls over time, by model, and the reasons lending did not serve (§6.3). */
1329
+ getAISummary(org: string, name: string, opts?: {
1330
+ from?: string;
1331
+ to?: string;
1332
+ }): Promise<Ok<"getAISummary">>;
1333
+ /** AI calls grouped by the app's `metadata.sessionId` (§6.4). */
1334
+ listAISessions(org: string, name: string, opts?: {
1335
+ from?: string;
1336
+ to?: string;
1337
+ before?: string;
1338
+ limit?: number;
1339
+ }): Promise<Ok<"listAISessions">>;
1340
+ /** The org members' desktops that can lend to this project right now (§6.5). */
1341
+ getAILenders(org: string, name: string): Promise<Ok<"getAILenders">>;
1342
+ /** Whether this project records prompts and answers (§5). */
1343
+ getAICapture(org: string, name: string): Promise<Ok<"getAICapture">>;
1344
+ /** Turns prompt capture on or off. observability:admin; audited. */
1345
+ setAICapture(org: string, name: string, captureBodies: boolean): Promise<Ok<"setAICapture">>;
1346
+ /** One page of the org ledger. The cursor is `ledger_id` — cutting on time splits the same millisecond. */
1347
+ listAILedger(org: string, opts?: {
1348
+ limit?: number;
1349
+ before?: number;
1350
+ kind?: "call" | "topup" | "adjust";
1351
+ since?: string;
1352
+ }): Promise<Ok<"listAILedger">>;
1353
+ /**
1354
+ * The credit top-up checkout. **A browser coming back is not evidence** — the
1355
+ * one thing that raises the balance is the `order.paid` webhook, and the
1356
+ * screen polls the balance after the success event.
1357
+ */
1358
+ createAICreditCheckout(org: string, microCents: number, returnTo: string): Promise<Ok<"createAICreditCheckout">>;
1359
+ /**
1360
+ * Turns automatic top-up on or off. **Turning it on is explicit consent**
1361
+ * (docs/ai.md §3.5) — the screen shows the charging terms verbatim and calls
1362
+ * this only after the box is checked.
1363
+ */
1364
+ setAIAutoTopup(org: string, body: {
1365
+ enabled: boolean;
1366
+ belowMicroCents?: number;
1367
+ microCents?: number;
1368
+ }): Promise<Ok<"setAIAutoTopup"> | void>;
1369
+ /** One page of the mail log (docs/email.md §6.1). Newest first, cursor-paged. */
1370
+ listMailLog(org: string, name: string, opts?: {
1371
+ direction?: "in" | "out";
1372
+ cursor?: string;
1373
+ limit?: number;
1374
+ }): Promise<Ok<"listMailLog">>;
1375
+ /** The metadata of one message. */
1376
+ getMailLog(org: string, name: string, mailId: string): Promise<Ok<"getMailLog">>;
1377
+ /** The URL of the raw message — the screen uses it as a download link (.eml). */
1378
+ mailLogRawURL(org: string, name: string, mailId: string): string;
1379
+ /** The raw text. What the detail view draws the headers and body from. */
1380
+ getMailLogRaw(org: string, name: string, mailId: string): Promise<string>;
1381
+ /**
1382
+ * Grant, settings, providers, hosts. **The signed-up users do not come** —
1383
+ * that table is inside the project DB (docs/auth.md §6) and only the worker's
1384
+ * `env.auth` sees it.
1385
+ *
1386
+ * `providers` carries the client id only. The client secret is sealed and
1387
+ * appears in no response.
1388
+ */
1389
+ getAuth(org: string, name: string): Promise<AuthStatus>;
1390
+ /**
1391
+ * Turns auth on (member). Idempotent.
1392
+ *
1393
+ * **With no database it is 409 `database_required`** — the user table lives
1394
+ * inside the project DB, so standing up the grant alone leaves no table the
1395
+ * moment the worker starts. The caller catches that code and points at the
1396
+ * `"database": true` declaration — the deploy never sees this code, because
1397
+ * its ordering rules it out.
1398
+ */
1399
+ grantAuth(org: string, name: string): Promise<AuthStatus>;
1400
+ /**
1401
+ * The app's end users, newest first (`runlot auth users`). Read-only, and read
1402
+ * from the project's own database — a parked or unreachable one answers 502/504.
1403
+ * Feed `cursor` back unchanged; its absence is the end.
1404
+ */
1405
+ listAppUsers(org: string, name: string, opts?: {
1406
+ search?: string;
1407
+ cursor?: string;
1408
+ limit?: number;
1409
+ }): Promise<Ok<"listAppUsers">>;
1410
+ /**
1411
+ * One `env.ai.run` on the development lane: catalog models, the free plan's caps,
1412
+ * the org's credit, recorded as `lane = dev`. One JSON answer, no streaming.
1413
+ */
1414
+ devAIRun(org: string, name: string, body: DevAIRunRequest): Promise<Ok<"devAIRun">>;
1415
+ /**
1416
+ * Changes the settings (member). **A partial update** — only the fields given
1417
+ * change. Sending the whole thing on one switch means that when two people
1418
+ * touch the same card, the later save overwrites the earlier one. With no
1419
+ * grant it is 404 `not_granted`.
1420
+ */
1421
+ updateAuthSettings(org: string, name: string, settings: AuthSettingsInput): Promise<AuthStatus>;
1422
+ /**
1423
+ * Turns auth off (admin). **The signed-up users are not deleted** — the
1424
+ * `runlot_auth` tables stay in the project DB, and turning it back on lets the
1425
+ * same people log in unchanged.
227
1426
  */
228
1427
  revokeAuth(org: string, name: string): Promise<void>;
229
1428
  /**
230
- * 소셜 프로바이더를 등록하거나 교체한다 (admin). 같은 PUT 이라 멱등이다.
1429
+ * Registers or replaces a social provider (admin). It is the same PUT, so it
1430
+ * is idempotent.
231
1431
  *
232
- * **`clientSecret` 은 다시 볼 수 없다.** 콜백 URL 은 호스트마다
233
- * `https://<host>/__runlot/auth/callback/<provider>` 이고, 호스트 목록은
234
- * 응답의 `hosts` 에 있다.
1432
+ * **`clientSecret` cannot be read back.** The callback URL is
1433
+ * `https://<host>/__runlot/auth/callback/<provider>` for each host, and the
1434
+ * list of hosts is in the response's `hosts`.
1435
+ *
1436
+ * `issuer` is the base URL of your own GitHub Enterprise Server installation,
1437
+ * and only `github` takes one. **This PUT is the whole row** — the same reason
1438
+ * `clientSecret` has to be sent every time — so an empty string clears it and
1439
+ * puts that provider back on github.com. The key is left out entirely when the
1440
+ * argument is omitted, so a caller that does not know about issuers sends the
1441
+ * body it always sent.
1442
+ */
1443
+ setAuthProvider(org: string, name: string, provider: AuthProvider, clientId: string, clientSecret: string, issuer?: string): Promise<AuthStatus>;
1444
+ /**
1445
+ * Turns on the Runlot provider (admin): "Continue with Runlot", with email,
1446
+ * Google and GitHub at Runlot behind it and nothing to register. 409
1447
+ * `runlot_unavailable` when this deployment has no sign-in broker.
1448
+ */
1449
+ setRunlotAuthProvider(org: string, name: string): Promise<AuthStatus>;
1450
+ /**
1451
+ * Registers or replaces a generic OIDC provider under a project-chosen id
1452
+ * (admin). The CP reads `<issuer>/.well-known/openid-configuration` when
1453
+ * saving; a failure is 400 `oidc_discovery_failed` quoting the provider.
1454
+ */
1455
+ setOidcAuthProvider(org: string, name: string, id: string, body: {
1456
+ issuer: string;
1457
+ clientId: string;
1458
+ clientSecret: string;
1459
+ displayName?: string;
1460
+ iconUrl?: string;
1461
+ scopes?: string;
1462
+ }): Promise<AuthStatus>;
1463
+ /**
1464
+ * The statements that create the `runlot_auth` schema (member). 404 when
1465
+ * login is not turned on for the project.
1466
+ */
1467
+ getAuthSchema(org: string, name: string): Promise<AuthSchema>;
1468
+ /** The project's sign-in branding with defaults filled (docs/custom-sign-in.md §12.3). */
1469
+ getAuthBranding(org: string, name: string): Promise<AuthBranding>;
1470
+ /** The GET answer whole: the filled brand plus the methods the chooser would draw now. */
1471
+ getAuthBrandingAnswer(org: string, name: string): Promise<AuthBrandingAnswer>;
1472
+ /**
1473
+ * Replaces the whole branding object (member). Validated server-side; a bad
1474
+ * field is 400 `invalid_branding` with `fields: [{path, message}]`.
1475
+ */
1476
+ putAuthBranding(org: string, name: string, branding: Partial<AuthBranding>): Promise<AuthBranding>;
1477
+ /**
1478
+ * The URL of the rendered chooser with (draft) branding (§12.4). A page, not
1479
+ * JSON: the dashboard puts it in an iframe and the CLI opens it in a browser.
1480
+ * `draft` travels as base64url JSON.
235
1481
  */
236
- setAuthProvider(org: string, name: string, provider: AuthProvider, clientId: string, clientSecret: string): Promise<Ok<"setAuthProvider">>;
1482
+ authBrandingPreviewUrl(org: string, name: string, opts?: AuthPreviewOpts): string;
1483
+ /** Sign-in funnel counters for the last `days` days (§9.4). No per-person data. */
1484
+ getAuthFunnel(org: string, name: string, days?: number): Promise<AuthFunnel>;
237
1485
  /**
238
- * 프로바이더를 뗀다 (admin). 그 프로바이더로만 가입한 사람은 로그인할 길을
239
- * 잃지만 사용자 행은 남는다 — 다시 등록하면 같은 계정으로 돌아온다.
1486
+ * Removes a provider (admin). Someone who signed up only through that provider
1487
+ * loses their way in, but the user row stays — register it again and they come
1488
+ * back to the same account.
240
1489
  */
241
1490
  deleteAuthProvider(org: string, name: string, provider: AuthProvider): Promise<void>;
242
1491
  /**
243
- * 이 배포에 누가 닿을 수 있는가. **값은 없다** — 비밀번호도 우회 시크릿도
244
- * 해시로만 살고, 여기 오는 것은 `hasPassword`·`hasBypass` 라는 사실이다.
1492
+ * Who can reach this deployment. **No values** — both the password and the
1493
+ * bypass secret live only as hashes, and what comes back here is the fact that
1494
+ * there is one: `hasPassword` and `hasBypass`.
245
1495
  *
246
- * 정책을 한 번도 안 정한 프로젝트는 `mode: "public"` 에 `updatedAt` 이
247
- * 없다. 화면이 그 둘을 가르는 이유는 §7 — 빈 상태 대신 상태 문장이다.
1496
+ * A project that has never set a policy is `mode: "public"` with no
1497
+ * `updatedAt`. The screen tells those two apart for the reason in §7 — a
1498
+ * sentence about the state instead of an empty state.
248
1499
  */
249
1500
  getAccess(org: string, name: string): Promise<Ok<"getAccess">>;
250
1501
  /**
251
- * 정책을 바꾼다 (admin). `password` 를 안 보내면 **있던 비밀번호가 남는다** —
252
- * 모드만 바꾸는 저장이 비밀번호를 지우면 되돌아왔을 때 다시 정해야 한다.
1502
+ * Changes the policy (admin). Without a `password`, **the existing password
1503
+ * stays** — if a save that only changes the mode wiped the password, coming
1504
+ * back to that mode would mean setting it again.
253
1505
  */
254
1506
  setAccess(org: string, name: string, mode: AccessMode, password?: string): Promise<Ok<"setAccess">>;
255
1507
  /**
256
- * 자동화 우회 시크릿을 만든다 (admin). **값은 이 답에만 있다** — 화면은
257
- * 받은 즉시 한 번 보여주고 다시 못 가져온다. 다시 부르면 옛 값이 죽는다.
1508
+ * Makes a bypass secret for automation (admin). **The value is in this answer
1509
+ * and nowhere else** — the screen shows it once on arrival and can never fetch
1510
+ * it again. Calling again kills the old value.
258
1511
  */
259
1512
  newAccessBypass(org: string, name: string): Promise<Ok<"newAccessBypass">>;
260
- /** 우회를 뗀다 (admin). 없는 우회를 떼는 것도 성공이다. */
1513
+ /** Removes the bypass (admin). Removing one that does not exist also succeeds. */
261
1514
  revokeAccessBypass(org: string, name: string): Promise<void>;
262
1515
  /**
263
- * 보호된 배포로 돌아가는 1 회용 주소를 받는다 (docs/access.md §3.4-3).
1516
+ * Gets a one-time address back into a protected deployment (docs/access.md §3.4-3).
264
1517
  *
265
- * 프로젝트 경로 아래가 **아니다**: 부르는 화면이 아는 것은 호스트네임뿐이고
266
- * (원 요청이 그리로 갔다), org·프로젝트 이름은 서버가 그것에서 유도한다.
267
- * 받은 `redirect` 로 `location.replace` 하는 것이 호출부의 일이다.
1518
+ * It is **not** under the project path: all the calling screen knows is the
1519
+ * hostname (the original request went there), and the server derives the org
1520
+ * and project names from it. Doing `location.replace` with the `redirect` that
1521
+ * comes back is the caller's job.
268
1522
  */
269
1523
  authorizeAccess(to: string, next?: string): Promise<Ok<"authorizeAccess">>;
270
1524
  listMembers(org: string): Promise<Ok<"listMembers">>;
271
- /** 초대가 아니다 — 사용자는 이미 한 번 로그인해 있어야 한다 (404 `user_not_found`). */
1525
+ /** This is not an invite — the user must already have logged in once (404 `user_not_found`). */
272
1526
  addMember(org: string, provider: "dev" | "github", subject: string, role: Role): Promise<Ok<"addMember">>;
273
1527
  setMemberRole(org: string, userId: string, role: Role): Promise<Ok<"setMemberRole">>;
1528
+ /**
1529
+ * Removing someone else is admin; **removing yourself is leaving**, which
1530
+ * anyone can do (docs/members.md). The last admin can do neither
1531
+ * (409 `last_admin`).
1532
+ */
274
1533
  removeMember(org: string, userId: string): Promise<void>;
275
- /** 기본 호스트네임과 커스텀 도메인이 함께 온다 (viewer). */
1534
+ /** Pending and expired invites (admin). Accepted and revoked ones are history, so they do not come. */
1535
+ listInvites(org: string): Promise<Ok<"listInvites">>;
1536
+ /**
1537
+ * Invites by email (admin). **Calling again with the same address is a
1538
+ * resend** — the same row is updated rather than a new one created, and the
1539
+ * server gives 200 instead of 201.
1540
+ */
1541
+ createInvite(org: string, email: string, role: Role): Promise<Ok<"createInvite">>;
1542
+ /** Revokes an invite (admin). Mail that has not gone out yet does not go out. */
1543
+ revokeInvite(org: string, inviteId: string): Promise<void>;
1544
+ /**
1545
+ * A preview of the invite. **No session needed** — whoever got the link has
1546
+ * not logged in yet, and they need to know what they are accepting before
1547
+ * they do.
1548
+ */
1549
+ getInvite(token: string): Promise<Ok<"getInvite">>;
1550
+ /** Accepts (login required). If they are already a member the role does not change. */
1551
+ acceptInvite(token: string): Promise<Ok<"acceptInvite">>;
1552
+ /** The default hostname and the custom domains come together (viewer). */
276
1553
  listHostnames(org: string, name: string): Promise<Ok<"listHostnames">>;
277
1554
  /**
278
- * 커스텀 도메인을 건다 (member).
1555
+ * Attaches a custom domain (member).
279
1556
  *
280
- * 멱등이다 — 같은 이름을 다시 보내면 있던 행이 그대로 온다. 응답의 `verify`
281
- * 가 고객이 넣어야 하는 CNAME·TXT 다.
1557
+ * Idempotent — sending the same name again returns the existing row
1558
+ * unchanged. The response's `verify` is the CNAME and TXT the customer has to
1559
+ * add.
282
1560
  */
283
- addHostname(org: string, name: string, hostname: string): Promise<Ok<"addHostname">>;
284
- /** 배경 검증과 같은 판정을 즉시 부른다 (member). */
1561
+ addHostname(org: string, name: string, hostname: string, role?: "app" | "login"): Promise<Ok<"addHostname">>;
1562
+ /** Runs the same check the background verifier makes, right now (member). */
285
1563
  verifyHostname(org: string, name: string, host: string): Promise<Ok<"verifyHostname">>;
286
- /** 커스텀 도메인을 뗀다 (member). 기본 호스트네임은 400 이다. */
1564
+ /** Detaches a custom domain (member). The default hostname gives a 400. */
287
1565
  deleteHostname(org: string, name: string, host: string): Promise<void>;
288
- /** 이 조직의 존 목록. `rrsets` 는 없다 — 단건 조회에만 실려요. */
1566
+ /** The organization's zones. No `rrsets` — those ride only on a single-zone lookup. */
289
1567
  listZones(org: string): Promise<Ok<"listZones">>;
290
- /** 멱등이에요. 이미 있는 존은 그대로 돌아와요. */
1568
+ /** Idempotent. A zone that already exists comes back unchanged. */
291
1569
  createZone(org: string, name: string): Promise<Ok<"createZone">>;
292
1570
  getZone(org: string, zone: string): Promise<Ok<"getZone">>;
293
1571
  deleteZone(org: string, zone: string): Promise<void>;
294
1572
  /**
295
- * rrset 하나를 **통째로** 바꿔요. `records` 가 그 (이름, 타입) 의 새 전부라,
296
- * 값 하나를 더하려면 지금 값을 함께 보내야 해요.
1573
+ * Replaces one rrset **whole**. `records` is the complete new set for that
1574
+ * (name, type), so adding a single value means sending the current ones with
1575
+ * it.
297
1576
  */
298
1577
  putRRset(org: string, zone: string, name: string, type: RRsetType, ttl: number, records: string[]): Promise<Ok<"putRRset">>;
299
1578
  deleteRRset(org: string, zone: string, name: string, type: RRsetType): Promise<void>;
300
1579
  setZoneDNSSEC(org: string, zone: string, enabled: boolean): Promise<Ok<"setZoneDNSSEC">>;
301
1580
  setZoneDS(org: string, zone: string, ds: string[]): Promise<Ok<"setZoneDS">>;
302
- /** DNS 표면의 공통 접두. */
1581
+ /** The shared prefix of the DNS surface. */
303
1582
  private dnsPath;
304
- /** `@` 도 `*` 도 이름으로 와요. 네 군데에 같은 문자열을 적지 않아요. */
1583
+ /** Both `@` and `*` arrive as a name. Keeps the same string out of four places. */
305
1584
  private rrsetPath;
306
1585
  /**
307
- * 이름을 찾아본다 (member 이상).
1586
+ * Looks a name up (member or above).
308
1587
  *
309
- * `priceCents` 는 첫 등록 1 년, `renewalCents` 는 갱신 1 년이다. 둘이
310
- * 나뉘어 있는 이유는 첫해 할인이 흔해서다 — 하나로 접으면 "1 달러에 사서
311
- * 다음 해 15 달러" 를 화면이 말할 수 없다.
1588
+ * `priceCents` is the first year of registration; `renewalCents` is one year
1589
+ * of renewal. They are separate because a first-year discount is common —
1590
+ * folded into one, the screen cannot say "buy it for $1, then $15 next year".
312
1591
  */
313
1592
  checkDomains(org: string, names: string[]): Promise<Ok<"checkDomains">>;
314
1593
  /**
315
- * 도메인을 산다 (admin — 돈을 써요).
1594
+ * Buys a domain (admin — this spends money).
316
1595
  *
317
- * **ICANN 검증 메일이 `contact.email` 로 가요.** 화면은 사기 전에 그
318
- * 사실을 알려야 해요 (docs/domains.md §5.5).
1596
+ * **Payment comes first** (docs/domains.md §5.8). With a saved payment method
1597
+ * the answer is the registered domain; otherwise a `DomainCharge` whose
1598
+ * `checkoutUrl` is where to pay — follow it with `getDomainCharge`. Paying also
1599
+ * agrees to the automatic yearly renewal charge.
319
1600
  *
320
- * 같은 요청을 다시 보내는 것이 안전해요 — 끝난 도메인이면 그대로 오고,
321
- * 중간에 멈춘 구매면 그 자리에서 이어 가요.
1601
+ * **The ICANN verification mail goes to `contact.email`.** The screen has to
1602
+ * say so before the purchase (docs/domains.md §5.5).
322
1603
  */
323
1604
  purchaseDomain(org: string, body: {
324
1605
  name: string;
325
1606
  years?: number;
326
1607
  contact: DomainContact;
327
1608
  projectId?: string;
328
- }): Promise<Ok<"purchaseDomain">>;
329
- /** 이미 가진 도메인을 가져와요 (admin). 등록기관을 부르지 않고 존만 만들어요. */
1609
+ checkout?: boolean;
1610
+ returnTo?: string;
1611
+ }): Promise<Domain | DomainCharge>;
1612
+ /** One domain payment — how a `DomainCharge` from purchase or renewal is followed. */
1613
+ getDomainCharge(org: string, chargeId: string): Promise<Ok<"getDomainCharge">>;
1614
+ /** Domain payments, newest first. */
1615
+ listDomainCharges(org: string): Promise<Ok<"listDomainCharges">>;
1616
+ /** Imports a domain you already own (admin). Creates the zone only; the registrar is not called. */
330
1617
  importDomain(org: string, name: string): Promise<Ok<"importDomain">>;
331
1618
  listDomains(org: string): Promise<Ok<"listDomains">>;
332
1619
  getDomain(org: string, name: string): Promise<Ok<"getDomain">>;
333
- renewDomain(org: string, name: string, years: number): Promise<Ok<"renewDomain">>;
1620
+ /** Renews now, paid the same way as a purchase. */
1621
+ renewDomain(org: string, name: string, years: number, pay?: {
1622
+ checkout?: boolean;
1623
+ returnTo?: string;
1624
+ }): Promise<Domain | DomainCharge>;
334
1625
  /**
335
- * 자동 갱신 **의사**만 바꿔요.
336
- *
337
- * 등록기관 쪽 자동 갱신은 그대로 켜져 있어요 — 도메인은 하루 늦으면 잃는
338
- * 자산이라 우리가 먼저 갱신하고 뒤에 청구해요. 화면은 이 사실을 함께
339
- * 말해야 해요.
1626
+ * Turns automatic renewal on or off. On: one year is charged 30 days before
1627
+ * expiry. Off: nothing is charged and the domain lapses at expiry.
340
1628
  */
341
1629
  setDomainAutoRenew(org: string, name: string, enabled: boolean): Promise<Ok<"setDomainAutoRenew">>;
342
1630
  setDomainLock(org: string, name: string, locked: boolean): Promise<Ok<"setDomainLock">>;
343
- /** 이전 코드예요. 감사에 발급 사실이 남고 **코드는 남지 않아요**. */
1631
+ /** The transfer auth code. The audit records that one was issued and **not the code itself**. */
344
1632
  domainAuthCode(org: string, name: string): Promise<Ok<"getDomainAuthCode">>;
345
- /** 지금 등록기관에서 다시 읽어요 (member). */
1633
+ /** Re-reads from the registrar right now (member). */
346
1634
  syncDomain(org: string, name: string): Promise<Ok<"syncDomain">>;
347
- /** 도메인 표면의 공통 접두. 열 군데에 같은 문자열을 적지 않아요. */
1635
+ /** The shared prefix of the domain surface. Keeps the same string out of ten places. */
348
1636
  private domainsPath;
349
1637
  private domainPath;
350
- /** 프로젝트 표면의 공통 접두다. */
1638
+ /** The shared prefix of the project surface. */
351
1639
  private projectPath;
352
- /** 데이터베이스 표면의 공통 접두다. 다섯 군데에 같은 문자열을 적지 않는다. */
1640
+ /** The shared prefix of the database surface. Keeps the same string out of five places. */
353
1641
  private dbPath;
1642
+ listRepos(org: string, project: string): Promise<Ok<"listRepos">>;
1643
+ createRepo(org: string, project: string, body: {
1644
+ name: string;
1645
+ visibility?: RepoVisibility | undefined;
1646
+ defaultBranch?: string | undefined;
1647
+ }): Promise<Ok<"createRepo">>;
1648
+ getRepo(org: string, project: string, name: string): Promise<Ok<"getRepo">>;
1649
+ updateRepo(org: string, project: string, name: string, body: {
1650
+ name?: string | undefined;
1651
+ visibility?: RepoVisibility | undefined;
1652
+ defaultBranch?: string | undefined;
1653
+ }): Promise<void>;
1654
+ deleteRepo(org: string, project: string, name: string): Promise<void>;
1655
+ /** The ref history. The lead for recovering a commit lost to a force-push is here. */
1656
+ listRefUpdates(org: string, project: string, name: string): Promise<Ok<"listRefUpdates">>;
1657
+ getDeployHook(org: string, project: string, name: string): Promise<Ok<"getDeployHook">>;
1658
+ setDeployHook(org: string, project: string, name: string, body: {
1659
+ enabled?: boolean | undefined;
1660
+ branch?: string | undefined;
1661
+ rootDir?: string | undefined;
1662
+ }): Promise<Ok<"setDeployHook">>;
1663
+ deleteDeployHook(org: string, project: string, name: string): Promise<void>;
1664
+ /** Build a commit without pushing. Omit `commitSha` for the hooked branch's tip. */
1665
+ deployRepoNow(org: string, project: string, name: string, commitSha?: string): Promise<Ok<"deployRepoNow">>;
1666
+ listBuilds(org: string, project: string, limit?: number): Promise<Ok<"listBuilds">>;
1667
+ getBuild(org: string, project: string, buildId: string): Promise<Ok<"getBuild">>;
1668
+ /**
1669
+ * A build's output. It comes back as **text**, not JSON — see the endpoint's
1670
+ * description. `json()` would try to parse it and fail on the first line.
1671
+ */
1672
+ getBuildLog(org: string, project: string, buildId: string): Promise<string>;
1673
+ cancelBuild(org: string, project: string, buildId: string): Promise<void>;
1674
+ listSSHKeys(): Promise<Ok<"listSSHKeys">>;
1675
+ addSSHKey(publicKey: string, name?: string): Promise<Ok<"addSSHKey">>;
1676
+ deleteSSHKey(keyId: string): Promise<void>;
1677
+ listAccessTokens(): Promise<Ok<"listAccessTokens">>;
1678
+ /** The plaintext is carried in this response **once** and never again. */
1679
+ createAccessToken(body: {
1680
+ name: string;
1681
+ /** 0032's single-valued field. `scopes` is the one to send. */
1682
+ scope?: TokenScope | undefined;
1683
+ scopes?: readonly ApiScope[] | undefined;
1684
+ /** Restrict the token to one org, and optionally to one project inside it. */
1685
+ org?: string | undefined;
1686
+ project?: string | undefined;
1687
+ ttlHours?: number | undefined;
1688
+ /** Days until expiry. The server defaults to 90 and refuses more than 365. */
1689
+ expiresInDays?: number | undefined;
1690
+ noExpiry?: boolean | undefined;
1691
+ }): Promise<Ok<"createAccessToken">>;
1692
+ revokeAccessToken(tokenId: string): Promise<void>;
1693
+ getRepoRefs(org: string, project: string, name: string): Promise<Ok<"getRepoRefs">>;
1694
+ getRepoTree(org: string, project: string, name: string, ref?: string, path?: string): Promise<Ok<"getRepoTree">>;
1695
+ getRepoBlob(org: string, project: string, name: string, ref?: string, path?: string): Promise<Ok<"getRepoBlob">>;
1696
+ getRepoCommits(org: string, project: string, name: string, ref?: string, limit?: number): Promise<Ok<"getRepoCommits">>;
1697
+ /** The shared prefix of the repository surface. It sits under the project (§19). */
1698
+ private repoPath;
354
1699
  rollback(org: string, name: string, version: number): Promise<Ok<"rollback">>;
355
1700
  }
1701
+ /** A metric read's range (customer-observability.md §8). */
1702
+ export type ObsRangeQuery = {
1703
+ from?: string;
1704
+ to?: string;
1705
+ step?: string;
1706
+ };
1707
+ /** RED filters shared by the overview and the APM routes. */
1708
+ export type ObsRedQuery = {
1709
+ version?: number;
1710
+ handler?: string;
1711
+ route?: string;
1712
+ synthetic?: "exclude" | "include" | "only";
1713
+ };
1714
+ export type ObsMetricsOverview = components["schemas"]["ObsMetricsOverview"];
1715
+ export type ObsAPMRoutes = components["schemas"]["ObsAPMRoutes"];
1716
+ export type ObsTrace = components["schemas"]["ObsTrace"];
1717
+ export type ObsTraceFilter = components["schemas"]["ObsTraceFilter"];
1718
+ export type ReleaseIssuePage = components["schemas"]["ReleaseIssuePage"];
1719
+ export type ReleaseIssueTransition = components["schemas"]["ReleaseIssueTransition"];
1720
+ export type ReleaseHealthSummary = components["schemas"]["ReleaseHealthSummary"];
1721
+ export type ReleaseHealthRelease = components["schemas"]["ReleaseHealthRelease"];
356
1722
  //# sourceMappingURL=index.d.ts.map