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