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