@runlot/api 0.1.0-rc.115 → 0.1.0-rc.117

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/schema.d.ts CHANGED
@@ -256,6 +256,64 @@ export interface paths {
256
256
  patch?: never;
257
257
  trace?: never;
258
258
  };
259
+ "/v1/auth/oidc/start": {
260
+ parameters: {
261
+ query?: never;
262
+ header?: never;
263
+ path?: never;
264
+ cookie?: never;
265
+ };
266
+ /**
267
+ * Start a generic OIDC login
268
+ * @description The provider is configured per installation (`RUNLOT_OIDC_ISSUER`), and the three
269
+ * endpoints come from that issuer's `/.well-known/openid-configuration` rather than from
270
+ * this document. **The two OIDC routes exist only when an issuer is configured**; without
271
+ * one they are not registered and answer 404, which is how a client can tell whether this
272
+ * deployment federates an identity provider.
273
+ *
274
+ * `redirect` is the client callback the token is carried back to, as a fragment, and it
275
+ * has to match the server allowlist. The redirect to the provider uses PKCE S256 and a
276
+ * `nonce` that binds the resulting `id_token` to this attempt.
277
+ */
278
+ get: operations["oidcStart"];
279
+ put?: never;
280
+ post?: never;
281
+ delete?: never;
282
+ options?: never;
283
+ head?: never;
284
+ patch?: never;
285
+ trace?: never;
286
+ };
287
+ "/v1/auth/oidc/callback": {
288
+ parameters: {
289
+ query?: never;
290
+ header?: never;
291
+ path?: never;
292
+ cookie?: never;
293
+ };
294
+ /**
295
+ * Generic OIDC callback
296
+ * @description This path is the registered redirect URI of the installation's OIDC client. It exchanges
297
+ * the authorization code and PKCE verifier at the token endpoint, **verifies the
298
+ * `id_token`'s signature against the issuer's JWKS** (RS256 and ES256) along with its
299
+ * issuer, audience, expiry and nonce, and then redirects to the client callback with the
300
+ * result in the URL fragment — the same shape as the GitHub and Google callbacks.
301
+ *
302
+ * The identity is stored as `provider = "oidc:<issuer host>"`, so two installations
303
+ * federating different providers never collide on a subject.
304
+ *
305
+ * A sign-up the installation's `RUNLOT_SIGNUP` policy refuses comes back as
306
+ * `#error=signup_closed`, and the account is not created.
307
+ */
308
+ get: operations["oidcCallback"];
309
+ put?: never;
310
+ post?: never;
311
+ delete?: never;
312
+ options?: never;
313
+ head?: never;
314
+ patch?: never;
315
+ trace?: never;
316
+ };
259
317
  "/v1/hooks/ses": {
260
318
  parameters: {
261
319
  query?: never;
@@ -513,6 +571,38 @@ export interface paths {
513
571
  patch?: never;
514
572
  trace?: never;
515
573
  };
574
+ "/v1/license": {
575
+ parameters: {
576
+ query?: never;
577
+ header?: never;
578
+ path?: never;
579
+ cookie?: never;
580
+ };
581
+ /**
582
+ * This installation's licence, its state, and the counts against its ceilings
583
+ * @description What the dashboard footer and `runlot license` read (docs/onprem-delivery.md §6.5).
584
+ *
585
+ * **Any signed-in user may call it**, with the same bearer credential as `/v1/me`. The
586
+ * reason it is not admin-only: the footer is drawn on every page for everybody, and the
587
+ * deterrent the licence actually relies on is that the customer's own name is on every
588
+ * screen (§6.8). Nothing here is a secret — the signature is not returned, and neither is
589
+ * the licence file's path.
590
+ *
591
+ * On SaaS, and on any deployment with no licence file configured, the answer is
592
+ * `onPrem: false` with `state: "none"` and zeroed ceilings, and every surface draws
593
+ * nothing. `state` is never absent: a missing, unparseable or expired-past-grace licence
594
+ * is `restricted` with the reason, because a licence problem that shows as "no licence
595
+ * feature" is the one nobody reports.
596
+ */
597
+ get: operations["getLicense"];
598
+ put?: never;
599
+ post?: never;
600
+ delete?: never;
601
+ options?: never;
602
+ head?: never;
603
+ patch?: never;
604
+ trace?: never;
605
+ };
516
606
  "/v1/me": {
517
607
  parameters: {
518
608
  query?: never;
@@ -4772,7 +4862,9 @@ export interface components {
4772
4862
  * @description How many projects this organization's plan allows (Free 3, Pro 30). It is
4773
4863
  * returned here so clients do not need their own copy of the plan table.
4774
4864
  * Enforcement happens on the server — `createProject` answers 409
4775
- * `project_limit` once the limit is reached.
4865
+ * `project_limit` once the limit is reached. **0 means no per-org cap**: an
4866
+ * on-prem install publishes 0, because its only project bound is the
4867
+ * licence's installation-wide one (`409 license_project_limit`).
4776
4868
  */
4777
4869
  projectLimit: number;
4778
4870
  /**
@@ -4783,7 +4875,37 @@ export interface components {
4783
4875
  dbCapBytes: number;
4784
4876
  /** @description This organization requires its members to use two-factor authentication. */
4785
4877
  requireTotp?: boolean;
4786
- };
4878
+ appCertState?: components["schemas"]["AppCertState"];
4879
+ };
4880
+ /**
4881
+ * @description Whether this organization's default app addresses can be opened yet.
4882
+ *
4883
+ * A default address is three labels — `<project>.<org>.<app-domain>` — so a single
4884
+ * `*.<app-domain>` certificate cannot cover it and each organization gets its own
4885
+ * `*.<org>.<app-domain>`. That certificate is issued **after** the organization
4886
+ * exists, which leaves a window where an address we have already told you about
4887
+ * cannot be opened at all: the edge holds no certificate for that name and drops
4888
+ * the TLS handshake, which browsers report as
4889
+ * `ERR_SSL_VERSION_OR_CIPHER_MISMATCH`. Nothing can be written inside that error,
4890
+ * so this field is how you learn about the window — show it next to the address
4891
+ * rather than letting someone click through to a browser error page.
4892
+ *
4893
+ * - `pending` — being issued. The default addresses do not answer yet. It
4894
+ * normally clears in well under a minute; it is retried with backoff.
4895
+ * - `active` — issued. The address answers.
4896
+ * - `failed` — issuance gave up for now. It is retried when the control plane
4897
+ * restarts. Treat it as "will not open" rather than as a slow `pending`, and
4898
+ * contact support if it persists.
4899
+ * - `none` — this deployment issues no wildcard for app addresses, which is the
4900
+ * local and development shape. **Nothing to wait for** — never render this as
4901
+ * "not ready".
4902
+ *
4903
+ * A custom domain is not covered by this field. Those have their own per-name
4904
+ * certificate and their own state machine, and they appear in `urls` only once
4905
+ * they are serving.
4906
+ * @enum {string}
4907
+ */
4908
+ AppCertState: "none" | "pending" | "active" | "failed";
4787
4909
  Notification: {
4788
4910
  /** Format: int64 */
4789
4911
  id: number;
@@ -4792,7 +4914,7 @@ export interface components {
4792
4914
  * human-readable wording is produced separately by the dashboard and by email.
4793
4915
  * @enum {string}
4794
4916
  */
4795
- kind: "project_limit" | "db_near_cap" | "storage_near_quota" | "storage_quota_hit" | "backup_failed" | "cron_failed" | "queue_failed" | "queue_ops_cap" | "build_failed" | "restore_done" | "dns_publish_stalled" | "billing_past_due" | "overage_charge_failed" | "disabled_project_deletion" | "backup_stalled" | "backup_no_restore_point" | "backup_chain_broken" | "backup_always_full" | "budget_exhausted" | "ai_credit_low" | "ai_credit_exhausted" | "ai_autotopup_failed" | "ai_autotopup_disabled" | "new_device";
4917
+ kind: "project_limit" | "db_near_cap" | "storage_near_quota" | "storage_quota_hit" | "backup_failed" | "cron_failed" | "queue_failed" | "queue_ops_cap" | "build_failed" | "restore_done" | "dns_publish_stalled" | "billing_past_due" | "overage_charge_failed" | "disabled_project_deletion" | "backup_stalled" | "backup_no_restore_point" | "backup_chain_broken" | "backup_always_full" | "budget_exhausted" | "ai_credit_low" | "ai_credit_exhausted" | "ai_autotopup_failed" | "ai_autotopup_disabled" | "license_expiring" | "license_grace" | "license_restricted" | "new_device";
4796
4918
  /** @description If this is a project-related notification, the name of that project. Absent for org-level notifications (`project_limit`) */
4797
4919
  projectName?: string;
4798
4920
  /**
@@ -4829,8 +4951,13 @@ export interface components {
4829
4951
  * @description `hostnames` as full, reachable URLs. The scheme and port depend on the
4830
4952
  * environment (`https://…` in production, `http://…:8787` locally), so use these
4831
4953
  * rather than building URLs yourself.
4954
+ *
4955
+ * A default address is listed here while `appCertState` is `pending` — it is the
4956
+ * address, and it is about to start working. Read that field before presenting
4957
+ * one of these as something to click.
4832
4958
  */
4833
4959
  urls?: string[];
4960
+ appCertState?: components["schemas"]["AppCertState"];
4834
4961
  /** Format: date-time */
4835
4962
  createdAt: string;
4836
4963
  /**
@@ -6985,6 +7112,13 @@ export interface components {
6985
7112
  * @description When it was last registered or replaced
6986
7113
  */
6987
7114
  updatedAt: string;
7115
+ /**
7116
+ * @description The base URL of your own GitHub Enterprise Server installation, when this
7117
+ * provider is pointed at one. **Absent means the public provider** —
7118
+ * github.com — which is the default.
7119
+ * @example https://github.acme.example
7120
+ */
7121
+ issuer?: string;
6988
7122
  };
6989
7123
  /**
6990
7124
  * @description The project's end-user authentication status.
@@ -7055,6 +7189,18 @@ export interface components {
7055
7189
  * new one from the login provider's console and PUT it again.
7056
7190
  */
7057
7191
  clientSecret: string;
7192
+ /**
7193
+ * @description The base URL of your own GitHub Enterprise Server installation, for example
7194
+ * `https://github.acme.example`. Only the `github` provider takes one — the
7195
+ * four OAuth endpoints are derived from this base, and no other provider has a
7196
+ * layout we can derive, so a non-empty value on `google` or `kakao` is a 400.
7197
+ *
7198
+ * **Empty means github.com**, which is the default. This PUT is the whole row,
7199
+ * so send the field on every call: leave it out on a save that means to go back
7200
+ * to github.com and the old installation stays.
7201
+ * @example https://github.acme.example
7202
+ */
7203
+ issuer?: string;
7058
7204
  };
7059
7205
  /**
7060
7206
  * @description A single hostname attached to the project. `state` progresses from
@@ -7267,6 +7413,75 @@ export interface components {
7267
7413
  */
7268
7414
  sandbox: boolean;
7269
7415
  };
7416
+ /**
7417
+ * @description The licence payload minus its signature, the state computed from it, and the counts
7418
+ * against each ceiling. `docs/onprem-delivery.md §6.2` is the payload's definition and
7419
+ * §6.3 the state machine.
7420
+ */
7421
+ License: {
7422
+ /**
7423
+ * @description Whether this deployment is licensed at all — true when a licence file is
7424
+ * configured. False is SaaS, and then `state` is `none` and every surface draws
7425
+ * nothing.
7426
+ */
7427
+ onPrem: boolean;
7428
+ /**
7429
+ * @description `valid` — in force. `expiring` — within 30 days of `expiresAt`; a banner and a
7430
+ * daily notification. `grace` — past `expiresAt` and inside `graceDays`; nothing is
7431
+ * refused yet. `restricted` — past grace, or the file is missing, or it does not
7432
+ * parse or verify; new nodes, projects, deploys and sign-ups are refused and
7433
+ * everything already running keeps running (§6.4). `none` — not an on-prem
7434
+ * deployment.
7435
+ * @enum {string}
7436
+ */
7437
+ state: "valid" | "expiring" | "grace" | "restricted" | "none";
7438
+ /**
7439
+ * @description Why the state is what it is, for the states that have a why: `signature`,
7440
+ * `expired`, `kid unknown`, `missing`. Empty when there is nothing to explain.
7441
+ * **It is a code, not a sentence** — the surfaces translate it, and a sentence from
7442
+ * the server would arrive in one language on a trilingual screen.
7443
+ */
7444
+ reason?: string;
7445
+ /**
7446
+ * @description The licensee's name, as it is printed in the footer on every page.
7447
+ * @example Acme Corp
7448
+ */
7449
+ customer?: string;
7450
+ /**
7451
+ * @description `eval`, `single` or `ha` (§6.1). `eval` is watermarked as an evaluation.
7452
+ * @example single
7453
+ */
7454
+ tier?: string;
7455
+ /**
7456
+ * Format: date-time
7457
+ * @description When the term ends. Null when there is no licence.
7458
+ */
7459
+ expiresAt: string | null;
7460
+ /**
7461
+ * Format: date-time
7462
+ * @description `expiresAt` plus the licence's grace days — the date new deploys stop. Null when
7463
+ * there is no licence.
7464
+ */
7465
+ graceEnd: string | null;
7466
+ /** @description The node ceiling. Never 0 — the node is the unit of price (§6.1). */
7467
+ maxNodes: number;
7468
+ /** @description The project ceiling. **0 means unlimited.** */
7469
+ maxProjects: number;
7470
+ /** @description The user ceiling. **0 means unlimited.** */
7471
+ maxUsers: number;
7472
+ /**
7473
+ * @description The licensed feature names, from a closed set the binary knows (`git`,
7474
+ * `durable_objects`, `ai_byok`). An unknown name is a parse error at issuance, not a
7475
+ * silent grant of nothing.
7476
+ */
7477
+ features: string[];
7478
+ /** @description What the installation is actually using, for `nodes 1/1` and `projects 42/∞`. */
7479
+ counts: {
7480
+ nodes: number;
7481
+ projects: number;
7482
+ users: number;
7483
+ };
7484
+ };
7270
7485
  };
7271
7486
  responses: {
7272
7487
  /** @description Bad request */
@@ -7747,6 +7962,71 @@ export interface operations {
7747
7962
  400: components["responses"]["BadRequest"];
7748
7963
  };
7749
7964
  };
7965
+ oidcStart: {
7966
+ parameters: {
7967
+ query: {
7968
+ redirect: string;
7969
+ };
7970
+ header?: never;
7971
+ path?: never;
7972
+ cookie?: never;
7973
+ };
7974
+ requestBody?: never;
7975
+ responses: {
7976
+ /** @description to the provider's authorization endpoint */
7977
+ 302: {
7978
+ headers: {
7979
+ [name: string]: unknown;
7980
+ };
7981
+ content?: never;
7982
+ };
7983
+ 400: components["responses"]["BadRequest"];
7984
+ /** @description No identity provider is configured on this deployment */
7985
+ 404: {
7986
+ headers: {
7987
+ [name: string]: unknown;
7988
+ };
7989
+ content?: never;
7990
+ };
7991
+ /** @description The provider's discovery document could not be read */
7992
+ 502: {
7993
+ headers: {
7994
+ [name: string]: unknown;
7995
+ };
7996
+ content?: never;
7997
+ };
7998
+ };
7999
+ };
8000
+ oidcCallback: {
8001
+ parameters: {
8002
+ query: {
8003
+ code?: string;
8004
+ state: string;
8005
+ error?: string;
8006
+ };
8007
+ header?: never;
8008
+ path?: never;
8009
+ cookie?: never;
8010
+ };
8011
+ requestBody?: never;
8012
+ responses: {
8013
+ /** @description to the client callback */
8014
+ 302: {
8015
+ headers: {
8016
+ [name: string]: unknown;
8017
+ };
8018
+ content?: never;
8019
+ };
8020
+ 400: components["responses"]["BadRequest"];
8021
+ /** @description No identity provider is configured on this deployment */
8022
+ 404: {
8023
+ headers: {
8024
+ [name: string]: unknown;
8025
+ };
8026
+ content?: never;
8027
+ };
8028
+ };
8029
+ };
7750
8030
  sesHook: {
7751
8031
  parameters: {
7752
8032
  query?: never;
@@ -7875,6 +8155,15 @@ export interface operations {
7875
8155
  * @example KR
7876
8156
  */
7877
8157
  country: string;
8158
+ /**
8159
+ * @description The name of this deployment (`production`, `dev`, `local`, or an
8160
+ * installation's own name). The dashboard tags its error reports with it
8161
+ * and sends nothing on `local`. **This can be empty** — the server did not
8162
+ * say, and the client falls back to its own hostname rule rather than
8163
+ * reading an environment named "".
8164
+ * @example production
8165
+ */
8166
+ environment: string;
7878
8167
  };
7879
8168
  };
7880
8169
  };
@@ -8201,6 +8490,27 @@ export interface operations {
8201
8490
  404: components["responses"]["NotFound"];
8202
8491
  };
8203
8492
  };
8493
+ getLicense: {
8494
+ parameters: {
8495
+ query?: never;
8496
+ header?: never;
8497
+ path?: never;
8498
+ cookie?: never;
8499
+ };
8500
+ requestBody?: never;
8501
+ responses: {
8502
+ /** @description The licence as this installation currently reads it */
8503
+ 200: {
8504
+ headers: {
8505
+ [name: string]: unknown;
8506
+ };
8507
+ content: {
8508
+ "application/json": components["schemas"]["License"];
8509
+ };
8510
+ };
8511
+ 401: components["responses"]["Unauthorized"];
8512
+ };
8513
+ };
8204
8514
  getMe: {
8205
8515
  parameters: {
8206
8516
  query?: never;
@@ -11494,7 +11804,8 @@ export interface operations {
11494
11804
  };
11495
11805
  /**
11496
11806
  * @description `invalid_provider` — the name is outside `github`, `google`, `kakao`, or
11497
- * `clientId`/`clientSecret` is empty.
11807
+ * `clientId`/`clientSecret` is empty. `bad_request` — `issuer` was given for a
11808
+ * provider other than `github`, or it is not an http(s) base URL.
11498
11809
  */
11499
11810
  400: {
11500
11811
  headers: {