@run402/sdk 1.70.0 → 2.0.0

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.
Files changed (47) hide show
  1. package/README.md +47 -34
  2. package/dist/errors.d.ts +23 -0
  3. package/dist/errors.d.ts.map +1 -1
  4. package/dist/errors.js +30 -0
  5. package/dist/errors.js.map +1 -1
  6. package/dist/index.d.ts +13 -6
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +13 -6
  9. package/dist/index.js.map +1 -1
  10. package/dist/namespaces/{blobs.d.ts → assets.d.ts} +3 -3
  11. package/dist/namespaces/assets.d.ts.map +1 -0
  12. package/dist/namespaces/{blobs.js → assets.js} +2 -2
  13. package/dist/namespaces/assets.js.map +1 -0
  14. package/dist/namespaces/{blobs.types.d.ts → assets.types.d.ts} +1 -1
  15. package/dist/namespaces/assets.types.d.ts.map +1 -0
  16. package/dist/namespaces/{blobs.types.js → assets.types.js} +1 -1
  17. package/dist/namespaces/assets.types.js.map +1 -0
  18. package/dist/namespaces/billing.d.ts +31 -2
  19. package/dist/namespaces/billing.d.ts.map +1 -1
  20. package/dist/namespaces/billing.js +8 -2
  21. package/dist/namespaces/billing.js.map +1 -1
  22. package/dist/namespaces/deploy.d.ts +3 -3
  23. package/dist/namespaces/deploy.js +20 -20
  24. package/dist/namespaces/deploy.js.map +1 -1
  25. package/dist/namespaces/deploy.types.d.ts +130 -4
  26. package/dist/namespaces/deploy.types.d.ts.map +1 -1
  27. package/dist/namespaces/deploy.types.js +1 -1
  28. package/dist/namespaces/deploy.types.js.map +1 -1
  29. package/dist/node/assets-node.d.ts +205 -0
  30. package/dist/node/assets-node.d.ts.map +1 -0
  31. package/dist/node/assets-node.js +368 -0
  32. package/dist/node/assets-node.js.map +1 -0
  33. package/dist/node/canonicalize.d.ts +1 -1
  34. package/dist/node/canonicalize.js +1 -1
  35. package/dist/node/index.d.ts +9 -2
  36. package/dist/node/index.d.ts.map +1 -1
  37. package/dist/node/index.js +9 -0
  38. package/dist/node/index.js.map +1 -1
  39. package/dist/scoped.d.ts +38 -12
  40. package/dist/scoped.d.ts.map +1 -1
  41. package/dist/scoped.js +52 -35
  42. package/dist/scoped.js.map +1 -1
  43. package/package.json +1 -1
  44. package/dist/namespaces/blobs.d.ts.map +0 -1
  45. package/dist/namespaces/blobs.js.map +0 -1
  46. package/dist/namespaces/blobs.types.d.ts.map +0 -1
  47. package/dist/namespaces/blobs.types.js.map +0 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @run402/sdk
2
2
 
3
- Typed TypeScript client for the [Run402](https://run402.com) API. The kernel shared by `run402-mcp`, the `run402` CLI, and (eventually) user-deployed functions. Every operation is a method on a resource namespace — `r.projects.provision()`, `r.blobs.put()`, `r.deploy.apply()`, `r.functions.deploy()`,
3
+ Typed TypeScript client for the [Run402](https://run402.com) API. The kernel shared by `run402-mcp`, the `run402` CLI, and (eventually) user-deployed functions. Most operations are project-scoped bind once with `r.project(id)` and call `.apply()` for atomic mixed writes, `.assets.put()` for blob uploads, `.functions.deploy()`, etc.
4
4
 
5
5
  ```bash
6
6
  npm install @run402/sdk
@@ -20,20 +20,20 @@ import { run402 } from "@run402/sdk/node";
20
20
 
21
21
  const r = run402();
22
22
  const project = await r.projects.provision({ tier: "prototype" });
23
- await r.blobs.put(project.project_id, "hello.txt", { content: "hi" });
23
+ await (await r.project(project.project_id)).assets.put("hello.txt", { content: "hi" });
24
24
  ```
25
25
 
26
26
  That's it — credentials are read, x402 payments are signed, results are typed.
27
27
 
28
28
  ### Project-scoped sub-client
29
29
 
30
- If you're working on a single project for the duration of a script, bind it once and skip the id arg on every call:
30
+ Most operations are project-scoped. Bind once and skip the id arg on every call:
31
31
 
32
32
  ```ts
33
33
  const p = await r.useProject(projectId); // persists active project + returns scoped handle
34
- await p.blobs.put("hello.txt", { content: "hi" }); // no projectId arg
34
+ await p.assets.put("hello.txt", { content: "hi" }); // no projectId arg
35
35
  await p.functions.list();
36
- await p.deploy.apply({ site: { replace: files({ "index.html": "<h1>hi</h1>" }) } });
36
+ await p.apply({ site: { replace: files({ "index.html": "<h1>hi</h1>" }) } });
37
37
  ```
38
38
 
39
39
  `r.useProject(id)` writes the active project to the keystore (shared with concurrent CLI runs). For transient in-script scoping that does NOT mutate that state, use `r.project(id)` (or `r.project()` with no arg to resolve from whatever the keystore currently considers active).
@@ -59,13 +59,14 @@ The `CredentialsProvider` interface has two required methods (`getAuth`, `getPro
59
59
  | Namespace | Highlights |
60
60
  |---|---|
61
61
  | `projects` | `provision`, `delete`, `list`, `sql`, `rest`, `validateExpose`, `applyExpose`, `getExpose`, `getUsage`, `getSchema`, `info`, `keys`, `use`, `active`, `pin`, `getQuote` |
62
- | `deploy` | **The unified deploy primitive (v1.34+).** `apply` / `start` / `resume` / `status` / `list` / `events` / `resolve` / `getRelease` / `getActiveRelease` / `diff` / `plan` / `upload` / `commit` |
63
- | `ci` | GitHub Actions OIDC federation over `/ci/v1/*`: `createBinding`, `listBindings`, `getBinding`, `revokeBinding`, `exchangeToken`; plus canonical delegation helpers |
64
- | `sites` | `deployDir` Node entry only (`@run402/sdk/node`); thin wrapper over `r.deploy.apply` |
65
- | `blobs` | `put` (returns `AssetRef` with `cdnUrl` / `sri` / `etag` / `cacheKind` and `scriptTag()`/`linkTag()`/`imgTag()` emitters), `get`, `ls`, `rm`, `sign`, `diagnoseUrl`, `waitFresh` |
62
+ | `r.project(id).apply` | **The unified-apply primitive (v1.48+).** Callable hero `r.project(id).apply(spec)` for atomic mixed writes (release slices + assets slice). Sub-methods: `.plan(spec)`, `.start(spec)`, `.resume(operation_id)`. Underlying engine routes to `/apply/v1/*`. |
63
+ | `r.project(id).deploy` | Read-only namespace for deploy status: `status` / `list` / `events` / `diagnoseUrl` / `getRelease` / `getActiveRelease` / `diff`. The legacy write aliases `.deploy.apply/.start/.plan` are gone — use `r.project(id).apply` directly. |
64
+ | `ci` | GitHub Actions OIDC federation over `/ci/v1/*`: `createBinding`, `listBindings`, `getBinding`, `revokeBinding`, `exchangeToken`; plus canonical delegation helpers. `createBinding` accepts `asset_key_scopes` for per-key CI write authorization. |
65
+ | `r.project(id).sites` | `deployDir` Node entry only (`@run402/sdk/node`); thin wrapper over `r.project(id).apply({ site: dir(...) })` |
66
+ | `r.project(id).assets` | `put` (single asset), `putMany`, `uploadDir` (Node, additive), `syncDir` (Node, destructive only with `prune: true` + confirm token), `prepareDir` (returns `{ manifest, applySlice }` for pre-commit URL injection), `get`, `ls`, `rm`, `sign`, `diagnoseUrl`, `waitFresh`, `diff`. Returns `AssetRef` (single) or `AssetManifest` (batch). |
66
67
  | `functions` | `deploy`, `invoke`, `logs`, `update`, `list`, `delete` |
67
68
  | `secrets` | `set`, `list`, `delete` |
68
- | `subdomains` | `claim`, `list`, `delete` (most agents declare subdomains in `r.deploy.apply({ subdomains: { set: [...] } })` instead) |
69
+ | `subdomains` | `claim`, `list`, `delete` (most agents declare subdomains in `r.project(id).apply({ subdomains: { set: [...] } })` instead) |
69
70
  | `domains` | `add`, `list`, `status`, `remove` |
70
71
  | `email` | `createMailbox`, `getMailbox`, `deleteMailbox`, `send`, `list`, `get`, `getRaw`, `webhooks.*` |
71
72
  | `senderDomain` | `register`, `status`, `remove`, `enableInbound`, `disableInbound` |
@@ -116,23 +117,34 @@ field that does not exist on the actual type.
116
117
 
117
118
  ### Paste-and-go assets — content-addressed URLs with SRI
118
119
 
119
- `r.blobs.put` returns an `AssetRef`. The `cdnUrl` is content-addressed (`pr-<public_id>.run402.com/_blob/<key>-<8hex>.<ext>`), served through CloudFront, and never needs cache invalidation. The browser refuses execution on byte mismatch via SRI:
120
+ `(await r.project(id)).assets.put` returns an `AssetRef`. The `cdnUrl` is content-addressed (`pr-<public_id>.run402.com/_blob/<key>-<8hex>.<ext>`), served through CloudFront, and never needs cache invalidation. The browser refuses execution on byte mismatch via SRI:
120
121
 
121
122
  ```ts
122
- const logo = await r.blobs.put(projectId, "logo.png", { bytes });
123
+ const logo = await (await r.project(projectId)).assets.put("logo.png", { bytes });
123
124
  // logo.cdnUrl → drop into <img src="…">
124
125
  // logo.sri → "sha256-…" for <script integrity="…">
125
126
  // logo.etag → strong "sha256-<hex>"
126
127
  // logo.cacheKind → "immutable" | "mutable" | "private"
127
128
  ```
128
129
 
129
- `immutable: true` is the default since v1.45. The SDK always computes and sends the object SHA-256 because upload sessions require it; pass `false` only when you specifically need mutable URL/cache semantics.
130
+ `immutable: true` is the default since v1.45. The SDK always computes and sends the object SHA-256; pass `false` only when you specifically need mutable URL/cache semantics.
130
131
 
131
- For custom resumable upload UX, use the low-level session primitives:
132
- `r.blobs.initUploadSession(...)`, `r.blobs.getUploadSession(...)`, and
133
- `r.blobs.completeUploadSession(...)`. Bytes still go directly to the presigned
134
- part URLs; the Run402 gateway sees only session metadata.
135
- Low-level callers must provide the whole-object `sha256`, send per-part checksums to S3 when the presigned URL requires them, and include each part's `sha256` at completion.
132
+ For bulk asset uploads, use the Node-only helpers `uploadDir` (additive), `syncDir` (destructive with explicit `prune: true` + confirmation token), and `prepareDir` (returns `{ manifest, applySlice }` so the agent can render HTML against resolved URLs before committing in one apply transaction):
133
+
134
+ ```ts
135
+ import { run402, type AssetManifest, type FileSet } from "@run402/sdk/node";
136
+ const r = run402();
137
+ const p = await r.project(projectId);
138
+ const renderHtml = (_m: AssetManifest) => "<h1>hi</h1>";
139
+ const siteFiles: FileSet = {};
140
+
141
+ const { manifest, applySlice } = await r.assets.prepareDir("./assets", { project: projectId, prefix: "static/" });
142
+ const html = renderHtml(manifest); // urls already populated
143
+ await p.apply({
144
+ site: { replace: { ...siteFiles, "index.html": html } }, // atomic with assets
145
+ assets: applySlice,
146
+ });
147
+ ```
136
148
 
137
149
  ### Expose manifest validation
138
150
 
@@ -150,7 +162,7 @@ if (result.hasErrors) console.log(result.errors);
150
162
 
151
163
  `migrationSql` is reference context only; it is not executed as a PostgreSQL dry run. This method validates authorization manifests, not deploy manifests.
152
164
 
153
- ### Unified deploy (v1.34+) — `r.deploy.apply`
165
+ ### Unified deploy (v1.34+) — `r.project(spec.project).apply`
154
166
 
155
167
  The canonical primitive for any deploy (database + migrations + manifest + value-free secret declarations + functions + site + subdomain). Three layers:
156
168
 
@@ -175,28 +187,28 @@ const spec: ReleaseSpec = {
175
187
  };
176
188
 
177
189
  // One-shot — most agents use this.
178
- const result = await r.deploy.apply(spec);
190
+ const result = await (await r.project(spec.project)).apply(spec);
179
191
  const summary = summarizeDeployResult(result);
180
192
  console.log(summary.headline);
181
193
 
182
194
  // Long-running with progress events. Events are a discriminated union on `type`.
183
- const op = await r.deploy.start(spec);
195
+ const op = await (await r.project(spec.project)).apply.start(spec);
184
196
  for await (const ev of op.events()) console.log(ev.type);
185
197
  const final = await op.result();
186
198
 
187
199
  // Resume a previously-started deploy by id.
188
- const resumed = await r.deploy.resume("op_...");
200
+ const resumed = await (await r.project(projectId)).apply.resume("op_...");
189
201
  ```
190
202
 
191
203
  - **All bytes ride through CAS.** The plan request body never carries inline bytes — only `ContentRef` objects. When the spec exceeds 5 MB JSON, the SDK uploads the manifest itself as a CAS object (`manifest_ref` escape hatch).
192
204
  - **Per-resource semantics on the spec.** `site.replace` = "this is the whole site" (files absent are removed). `site.patch.put` / `patch.delete` are surgical updates. `site.public_paths` controls browser-visible static paths separately from backing release asset paths: explicit mode uses a complete map such as `{ "/events": { asset: "events.html", cache_class: "html" } }`, so `/events` serves `events.html` while `/events.html` is not public unless separately declared. Implicit mode restores filename-derived reachability and can widen access. A public-path-only site spec is deployable. `functions.replace` / `functions.patch.set` / `functions.patch.delete` mirror that. Secrets are value-free: set values first with `r.secrets.set(project, key, value)`, then deploy with `secrets.require` and/or `secrets.delete`. `subdomains.set` / `subdomains.add` / `subdomains.remove` use their own shape. Top-level absence = leave untouched.
193
205
  - **Same-origin web routes.** `routes` is `undefined | null | { replace: RouteSpec[] }`. Omit it or pass `null` to carry forward base routes, pass `{ replace: [] }` to clear routes, or pass route entries to replace the table. Function targets use `{ type: "function", name }`; exact static route targets use `{ type: "static", file }` with methods `["GET"]` or `["GET","HEAD"]`, no wildcard pattern, and a relative deployed asset path with no leading slash. `file` is not a public path, URL, CAS hash, rewrite, or redirect. Prefer `site.public_paths` for ordinary clean static URLs like `/events -> events.html`; use static route targets for method-aware aliases such as static `GET /login` plus function `POST /login`. Routed browser ingress invokes Node 22 Fetch Request -> Response handlers; `req.url` is the full public URL on managed subdomains, deployment hosts, and verified custom domains. Direct `/functions/v1/:name` invocation remains API-key protected. Runtime route failure codes include `ROUTE_MANIFEST_LOAD_FAILED`, `ROUTED_INVOKE_WORKER_SECRET_MISSING`, `ROUTED_INVOKE_AUTH_FAILED`, `ROUTED_ROUTE_STALE`, `ROUTE_METHOD_NOT_ALLOWED`, and `ROUTED_RESPONSE_TOO_LARGE`.
194
206
  - **Strict spec validation happens before network calls.** Raw `ReleaseSpec` objects reject unknown fields (for example `project_id` or `subdomain`) instead of silently dropping them during normalization, and project/base-only or empty nested specs fail with `Run402DeployError.code === "MANIFEST_EMPTY"`. Use the Node manifest helpers when starting from CLI/MCP-style JSON.
195
- - **Tier preflight happens before deploy side effects.** After normalization and before manifest CAS upload or `/deploy/v2/plans`, deploy checks literal function timeout, memory, cron minimum interval, and scheduled-function count when known. Violations throw `Run402DeployError.code === "BAD_FIELD"` with `details.field`, `details.value`, `details.tier`, the relevant cap, and `details.limit_source`; gateway validation remains authoritative.
207
+ - **Tier preflight happens before deploy side effects.** After normalization and before manifest CAS upload or `/apply/v1/plans`, deploy checks literal function timeout, memory, cron minimum interval, and scheduled-function count when known. Violations throw `Run402DeployError.code === "BAD_FIELD"` with `details.field`, `details.value`, `details.tier`, the relevant cap, and `details.limit_source`; gateway validation remains authoritative.
196
208
  - **Warnings are structured.** `DeployResult.warnings` contains `WarningEntry[]` (`code`, `severity`, `requires_confirmation`, `message`, optional `affected`/`details`/`confidence`); the type preserves legacy low/medium/high plan warnings and modern deploy-observability info/warn/high warnings. `apply()` emits `plan.warnings` and stops before upload/commit on confirmation-required warnings unless broad `allowWarnings` is set or every blocking code is listed in `allowWarningCodes`. For `MISSING_REQUIRED_SECRET`, set the affected keys with `r.secrets.set`, then retry.
197
209
  - **Deploy summaries are SDK-owned convenience.** `summarizeDeployResult(result)` returns `DeploySummary` (`schema_version: "deploy-summary.v1"`) with a headline plus reliable current buckets for site path counts, CAS new/reused bytes, functions, migrations, routes, secrets, subdomains, and warning counts. It is derived from `DeployResult.diff` / `DeployResult.warnings`; it makes no extra gateway calls, omits sections the gateway did not return, and intentionally excludes timings, client-side duration estimates, and function old/new code hashes.
198
210
  - **Safe release-race retries are SDK-owned.** `deploy.apply()` automatically re-plans and retries omitted/current-base specs when the gateway returns `BASE_RELEASE_CONFLICT` with `safe_to_retry: true`. Static activation/config failures reported from `activation_pending` throw immediately with gateway metadata preserved. The default retry budget is two retries after the initial attempt; pass `{ maxRetries: 0 }` to opt out.
199
- - **Planning supports dry-runs.** `r.deploy.plan(spec, { dryRun: true })` calls the server-authoritative dry-run route and returns the normalized v2 plan envelope without uploading bytes or creating plan/operation rows (`plan_id` and `operation_id` are `null`).
211
+ - **Planning supports dry-runs.** `(await r.project(spec.project)).apply.plan(spec, { dryRun: true })` calls the server-authoritative dry-run route and returns the normalized v2 plan envelope without uploading bytes or creating plan/operation rows (`plan_id` and `operation_id` are `null`).
200
212
  - **Release observability is typed.** Use `r.deploy.getRelease({ project, releaseId, siteLimit? })`, `r.deploy.getActiveRelease({ project, siteLimit? })`, and `r.deploy.diff({ project, from, to, limit? })` to inspect release inventory and release-to-release diffs. Inventories include `release_generation`, `static_manifest_sha256`, nullable `static_manifest_metadata` (`file_count`, `total_bytes`, `cache_classes`, `cache_class_sources`, `spa_fallback`), and `static_public_paths[]` when returned. `site.paths` lists release static assets; `static_public_paths[]` lists browser reachability with `public_path`, `asset_path`, `reachability_authority`, `direct`, cache class, and content type. `diff` returns `ReleaseToReleaseDiff` with `migrations.applied_between_releases`; secret diffs expose keys only; `static_assets` exposes unchanged/changed/added/removed files, CAS byte reuse, eliminated deployment-copy bytes, and immutable/CAS warning counts.
201
213
  - **Server-authoritative manifest digest** — no byte-for-byte canonicalize requirement on the client.
202
214
  - The Node entry adds `fileSetFromDir(path)` for filesystem byte sources:
@@ -204,8 +216,8 @@ const resumed = await r.deploy.resume("op_...");
204
216
  ```ts
205
217
  import { run402, fileSetFromDir } from "@run402/sdk/node";
206
218
  const r = run402();
207
- await r.deploy.apply({
208
- project: projectId,
219
+ const p = await r.project(projectId);
220
+ await p.apply({
209
221
  site: { replace: await fileSetFromDir("./dist") },
210
222
  subdomains: { set: ["my-app"] },
211
223
  });
@@ -241,7 +253,7 @@ const resumed = await r.deploy.resume("op_...");
241
253
  routes: { replace: routes },
242
254
  };
243
255
 
244
- await r.deploy.apply(spec);
256
+ await (await r.project(spec.project)).apply(spec);
245
257
  ```
246
258
 
247
259
  Matching is exact or final `/*` prefix only. `/admin/*` does not match `/admin`; deploy both `/admin` and `/admin/*` when the section root is dynamic. Release static asset paths and public browser paths are distinct. In the example, `events.html` is a release asset and `/events` is the public static URL declared by `site.public_paths`; `/events.html` is not public in explicit mode unless separately declared. A route-only static alias looks like `{ pattern: "/events", methods: ["GET", "HEAD"], target: { type: "static", file: "events.html" } }`; prefer `site.public_paths` for ordinary clean URLs and reserve static route targets for exact method-aware route-table behavior. Avoid routing every static file, wildcard static targets, leading-slash files, directory shorthand, broad method lists by default, and one-static-route-target-per-page route-table exhaustion. Query strings are ignored for matching and preserved in the handler's full public `req.url`. Exact beats prefix, longest prefix wins, and method-compatible dynamic routes beat static files. A method-specific `POST /login` route lets static `GET /login` serve HTML. Unsafe method mismatch returns `405`; matched dynamic route failures do not fall back to static assets.
@@ -267,7 +279,8 @@ const resumed = await r.deploy.resume("op_...");
267
279
  url: "https://example.com/events?utm=x#hero",
268
280
  method: "GET",
269
281
  });
270
- const resolution: DeployResolveResponse = await r.deploy.resolve(request);
282
+ const p = await r.project(projectId);
283
+ const resolution: DeployResolveResponse = await p.deploy.resolve(request);
271
284
  const summary = buildDeployResolveSummary(resolution, request);
272
285
  const auth: DeployResolveAuthorizationResult | undefined = resolution.authorization_result ?? undefined;
273
286
  const cas: DeployResolveCasObject | undefined = resolution.cas_object ?? undefined;
@@ -300,7 +313,7 @@ const resumed = await r.deploy.resume("op_...");
300
313
 
301
314
  const r = run402();
302
315
  const { spec, idempotencyKey } = await loadDeployManifest("./run402.deploy.json");
303
- await r.deploy.apply(spec, { idempotencyKey });
316
+ await (await r.project(spec.project)).apply(spec, { idempotencyKey });
304
317
  ```
305
318
 
306
319
  `loadDeployManifest(path)` parses JSON relative to the manifest file, maps
@@ -312,7 +325,7 @@ const resumed = await r.deploy.resume("op_...");
312
325
 
313
326
  ### GitHub Actions OIDC — CI credentials drive deploy
314
327
 
315
- The v1 CI path keeps the deploy primitive simple: link a GitHub repository once, then call the existing `r.deploy.apply` with CI-marked credentials. There is no separate `r.ci.deployApply` method and no public `ci: true` deploy option.
328
+ The v1 CI path keeps the deploy primitive simple: link a GitHub repository once, then call the existing `r.project(spec.project).apply` with CI-marked credentials. There is no separate `r.ci.deployApply` method and no public `ci: true` deploy option.
316
329
 
317
330
  The CLI is the easiest setup path (`run402 ci link github`), but the SDK exposes the building blocks:
318
331
 
@@ -363,7 +376,7 @@ const ciSpec: ReleaseSpec = {
363
376
  site: { patch: { put: { "index.html": "<h1>ship</h1>" } } },
364
377
  };
365
378
 
366
- await r.deploy.apply(ciSpec);
379
+ await (await r.project(ciSpec.project)).apply(ciSpec);
367
380
  ```
368
381
 
369
382
  CI deploys intentionally allow only `project`, `database`, `functions`, `site`, absent/current `base`, and `routes` authorized by the binding's `route_scopes`. Omitted or empty `route_scopes` preserves the original no-routes CI posture. The SDK normalizes scopes, sends `route_scopes` only when non-empty, and still rejects `secrets`, `subdomains`, `checks`, unknown future top-level fields, non-current `base`, and specs large enough to require `manifest_ref` before upload/plan. Gateway planning enforces route diffs and can return `CI_ROUTE_SCOPE_DENIED`; re-link with covering exact scopes like `/admin` or final-wildcard scopes like `/api/*`, or deploy locally. Use the canonical builders (`buildCiDelegationStatement`, `buildCiDelegationResourceUri`) instead of hand-rolling SIWX text; gateway tests pin those strings as golden vectors.
@@ -403,7 +416,7 @@ declare const spec: ReleaseSpec;
403
416
  const r = run402();
404
417
 
405
418
  try {
406
- await r.deploy.apply(spec);
419
+ await (await r.project(spec.project)).apply(spec);
407
420
  } catch (e) {
408
421
  if (isPaymentRequired(e)) {
409
422
  // e is narrowed to PaymentRequired
@@ -431,7 +444,7 @@ should not duplicate or corrupt state, not that lifecycle/payment/auth gates
431
444
  will become allowed without an action. Pair retries with the SDK method's own
432
445
  `idempotencyKey` so retried mutations dedup server-side:
433
446
 
434
- For `r.deploy.apply()`, safe `BASE_RELEASE_CONFLICT` release races are already
447
+ For `r.project(spec.project).apply()`, safe `BASE_RELEASE_CONFLICT` release races are already
435
448
  handled by the deploy namespace with a fresh plan and visible `deploy.retry`
436
449
  events. Use `withRetry` for caller-owned retry policies around other operations,
437
450
  or pass `maxRetries: 0` to `deploy.apply` when you want to handle deploy races
@@ -451,7 +464,7 @@ const r = run402();
451
464
 
452
465
  try {
453
466
  const release = await withRetry(
454
- () => r.deploy.apply(spec, { idempotencyKey: "deploy-2026-05-01" }),
467
+ async () => (await r.project(spec.project)).apply(spec, { idempotencyKey: "deploy-2026-05-01" }),
455
468
  {
456
469
  attempts: 3,
457
470
  onRetry: (e, attempt, delayMs) =>
package/dist/errors.d.ts CHANGED
@@ -16,6 +16,14 @@
16
16
  * and realms — value comparison, no class-identity dependency.
17
17
  */
18
18
  export type Run402ErrorKind = "payment_required" | "project_not_found" | "unauthorized" | "api_error" | "network_error" | "local_error" | "deploy_error";
19
+ /**
20
+ * Quota-denial scope discriminator (v1.46+). Indicates whether a quota-related
21
+ * denial was enforced against the pooled billing-account total (`"account"`)
22
+ * or against an orphan project whose billing account row has been purged but
23
+ * cascade has not yet run (`"project"`). Lifted from `details.scope` on the
24
+ * gateway envelope; absent for errors unrelated to quota.
25
+ */
26
+ export type Run402QuotaScope = "account" | "project";
19
27
  export declare abstract class Run402Error extends Error {
20
28
  /**
21
29
  * Structural brand. Always `true` on any {@link Run402Error} subclass
@@ -52,6 +60,14 @@ export declare abstract class Run402Error extends Error {
52
60
  readonly details?: unknown;
53
61
  /** Advisory next actions from the gateway. Rendering them must not execute them. */
54
62
  readonly nextActions?: unknown[];
63
+ /**
64
+ * Quota-denial scope (v1.46+). `"account"` for pooled billing-account
65
+ * denials; `"project"` for the orphan fallback (project whose billing
66
+ * account row was purged but cascade has not yet run). Lifted from
67
+ * `details.scope` when the gateway returned it. Undefined for errors
68
+ * that are not quota-related.
69
+ */
70
+ readonly quotaScope?: Run402QuotaScope;
55
71
  constructor(message: string, status: number | null, body: unknown, context: string);
56
72
  /**
57
73
  * Canonical structured envelope for `JSON.stringify`. Without this, an
@@ -175,6 +191,13 @@ export declare function isNetworkError(e: unknown): e is NetworkError;
175
191
  export declare function isLocalError(e: unknown): e is LocalError;
176
192
  /** True if `e` is a {@link Run402DeployError}. */
177
193
  export declare function isDeployError(e: unknown): e is Run402DeployError;
194
+ /**
195
+ * Extract the v1.46+ quota-denial scope from an error. Returns `"account"`
196
+ * for pooled denials, `"project"` for the orphan fallback, or `undefined`
197
+ * when the error is not quota-related (or originated from a pre-v1.46
198
+ * gateway that did not set `details.scope`). Safe to call with `unknown`.
199
+ */
200
+ export declare function getQuotaScope(e: unknown): Run402QuotaScope | undefined;
178
201
  /**
179
202
  * Canonical "should I retry this?" policy. Returns true when `e` is a
180
203
  * {@link Run402Error} AND any of:
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH;;;;GAIG;AACH,MAAM,MAAM,eAAe,GACvB,kBAAkB,GAClB,mBAAmB,GACnB,cAAc,GACd,WAAW,GACX,eAAe,GACf,aAAa,GACb,cAAc,CAAC;AAEnB,8BAAsB,WAAY,SAAQ,KAAK;IAC7C;;;;;OAKG;IACH,QAAQ,CA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AChD,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,eAAe,CAElE;AAED,8CAA8C;AAC9C,wBAAgB,cAAc,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,YAAY,CAE5D;AAED,0CAA0C;AAC1C,wBAAgB,UAAU,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,QAAQ,CAEpD;AAED,6CAA6C;AAC7C,wBAAgB,cAAc,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,YAAY,CAE5D;AAED,2CAA2C;AAC3C,wBAAgB,YAAY,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,UAAU,CAExD;AAED,kDAAkD;AAClD,wBAAgB,aAAa,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,iBAAiB,CAEhE;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,OAAO,GAAG,gBAAgB,GAAG,SAAS,CAEtE;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,OAAO,GAAG,OAAO,CAU1D"}
package/dist/errors.js CHANGED
@@ -40,6 +40,14 @@ export class Run402Error extends Error {
40
40
  details;
41
41
  /** Advisory next actions from the gateway. Rendering them must not execute them. */
42
42
  nextActions;
43
+ /**
44
+ * Quota-denial scope (v1.46+). `"account"` for pooled billing-account
45
+ * denials; `"project"` for the orphan fallback (project whose billing
46
+ * account row was purged but cascade has not yet run). Lifted from
47
+ * `details.scope` when the gateway returned it. Undefined for errors
48
+ * that are not quota-related.
49
+ */
50
+ quotaScope;
43
51
  constructor(message, status, body, context) {
44
52
  super(message);
45
53
  this.name = this.constructor.name;
@@ -74,6 +82,9 @@ export class Run402Error extends Error {
74
82
  }
75
83
  if (Array.isArray(envelope?.next_actions))
76
84
  this.nextActions = envelope.next_actions;
85
+ const scope = extractQuotaScope(envelope);
86
+ if (scope !== undefined)
87
+ this.quotaScope = scope;
77
88
  }
78
89
  /**
79
90
  * Canonical structured envelope for `JSON.stringify`. Without this, an
@@ -97,6 +108,7 @@ export class Run402Error extends Error {
97
108
  context: this.context,
98
109
  details: this.details,
99
110
  nextActions: this.nextActions,
111
+ quotaScope: this.quotaScope,
100
112
  body: this.body,
101
113
  };
102
114
  }
@@ -106,6 +118,15 @@ function canonicalEnvelope(body) {
106
118
  ? body
107
119
  : null;
108
120
  }
121
+ function extractQuotaScope(envelope) {
122
+ if (!envelope)
123
+ return undefined;
124
+ const details = envelope.details;
125
+ if (!details || typeof details !== "object" || Array.isArray(details))
126
+ return undefined;
127
+ const scope = details.scope;
128
+ return scope === "account" || scope === "project" ? scope : undefined;
129
+ }
109
130
  /** HTTP 402 — the gateway requires payment (lease expired, insufficient balance, or x402 quote). */
110
131
  export class PaymentRequired extends Run402Error {
111
132
  static DEFAULT_CODE = "PAYMENT_REQUIRED";
@@ -254,6 +275,15 @@ export function isLocalError(e) {
254
275
  export function isDeployError(e) {
255
276
  return isRun402Error(e) && e.kind === "deploy_error";
256
277
  }
278
+ /**
279
+ * Extract the v1.46+ quota-denial scope from an error. Returns `"account"`
280
+ * for pooled denials, `"project"` for the orphan fallback, or `undefined`
281
+ * when the error is not quota-related (or originated from a pre-v1.46
282
+ * gateway that did not set `details.scope`). Safe to call with `unknown`.
283
+ */
284
+ export function getQuotaScope(e) {
285
+ return isRun402Error(e) ? e.quotaScope : undefined;
286
+ }
257
287
  /**
258
288
  * Canonical "should I retry this?" policy. Returns true when `e` is a
259
289
  * {@link Run402Error} AND any of:
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAgBH,MAAM,OAAgB,WAAY,SAAQ,KAAK;IAC7C;;;;;OAKG;IACM,aAAa,GAAG,IAAa,CAAC;IAOvC,iFAAiF;IACxE,MAAM,CAAgB;IAC/B,+DAA+D;IACtD,IAAI,CAAU;IACvB,2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CAAC,SAAS,KAAK,KAAK;QAAE,OAAO,KAAK,CAAC;IACrE,IAAI,yBAAyB,CAAC,CAAC,CAAC,IAAI,CAAC;QAAE,OAAO,KAAK,CAAC;IACpD,IAAI,CAAC,CAAC,IAAI,KAAK,eAAe;QAAE,OAAO,IAAI,CAAC;IAC5C,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC;IACnB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,GAAG;QAAE,OAAO,IAAI,CAAC;IACrD,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,IAAI,GAAG;QAAE,OAAO,IAAI,CAAC;IACnD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,yBAAyB,CAAC,IAAa;IAC9C,OAAO,OAAO,CACZ,IAAI;QACF,OAAO,IAAI,KAAK,QAAQ;QACxB,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;QACpB,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,WAAW,CAAC;QACtD,IAAgC,CAAC,SAAS,KAAK,KAAK,CACxD,CAAC;AACJ,CAAC"}
package/dist/index.d.ts CHANGED
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import type { CredentialsProvider } from "./credentials.js";
9
9
  import { Projects } from "./namespaces/projects.js";
10
- import { Blobs } from "./namespaces/blobs.js";
10
+ import { Assets } from "./namespaces/assets.js";
11
11
  import { Functions } from "./namespaces/functions.js";
12
12
  import { Secrets } from "./namespaces/secrets.js";
13
13
  import { Subdomains } from "./namespaces/subdomains.js";
@@ -43,7 +43,7 @@ export interface Run402Options {
43
43
  export declare class Run402 {
44
44
  #private;
45
45
  readonly projects: Projects;
46
- readonly blobs: Blobs;
46
+ readonly assets: Assets;
47
47
  readonly functions: Functions;
48
48
  readonly secrets: Secrets;
49
49
  readonly subdomains: Subdomains;
@@ -61,7 +61,14 @@ export declare class Run402 {
61
61
  readonly email: Email;
62
62
  readonly contracts: Contracts;
63
63
  readonly admin: Admin;
64
- readonly deploy: Deploy;
64
+ /**
65
+ * Internal engine. v1.48 unified-apply removed `r.deploy.apply` and
66
+ * `r.apply` as public surfaces — the sole hero is `r.project(id).apply`.
67
+ * This property exists only so the scoped sub-client can delegate to the
68
+ * engine implementation; do not call directly from user code.
69
+ * @internal
70
+ */
71
+ readonly _applyEngine: Deploy;
65
72
  readonly ci: Ci;
66
73
  constructor(opts: Run402Options);
67
74
  /**
@@ -118,8 +125,8 @@ export declare function files(record: Record<string, ContentSource>): FileSet;
118
125
  * sandbox examples: `const r = run402({ ... })`.
119
126
  */
120
127
  export declare function run402(opts: Run402Options): Run402;
121
- export { Run402Error, PaymentRequired, ProjectNotFound, Unauthorized, ApiError, NetworkError, LocalError, Run402DeployError, isRun402Error, isPaymentRequired, isProjectNotFound, isUnauthorized, isApiError, isNetworkError, isLocalError, isDeployError, isRetryableRun402Error, } from "./errors.js";
122
- export type { Run402DeployErrorCode, Run402DeployErrorFix, Run402ErrorKind, } from "./errors.js";
128
+ export { Run402Error, PaymentRequired, ProjectNotFound, Unauthorized, ApiError, NetworkError, LocalError, Run402DeployError, isRun402Error, isPaymentRequired, isProjectNotFound, isUnauthorized, isApiError, isNetworkError, isLocalError, isDeployError, isRetryableRun402Error, getQuotaScope, } from "./errors.js";
129
+ export type { Run402DeployErrorCode, Run402DeployErrorFix, Run402ErrorKind, Run402QuotaScope, } from "./errors.js";
123
130
  export { withRetry } from "./retry.js";
124
131
  export type * from "./retry.js";
125
132
  export type * from "./credentials.js";
@@ -136,7 +143,7 @@ export type * from "./namespaces/allowance.js";
136
143
  export type * from "./namespaces/apps.js";
137
144
  export type * from "./namespaces/auth.js";
138
145
  export type * from "./namespaces/billing.js";
139
- export type * from "./namespaces/blobs.types.js";
146
+ export type * from "./namespaces/assets.types.js";
140
147
  export type * from "./namespaces/ci.types.js";
141
148
  export type * from "./namespaces/contracts.js";
142
149
  export type * from "./namespaces/deploy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AAC;AAC/C,mBAAmB,sBAAsB,CAAC;AAC1C,mBAAmB,sBAAsB,CAAC;AAC1C,mBAAmB,yBAAyB,CAAC;AAC7C,mBAAmB,8BAA8B,CAAC;AAClD,mBAAmB,0BAA0B,CAAC;AAC9C,mBAAmB,2BAA2B,CAAC;AAC/C,mBAAmB,8BAA8B,CAAC;AAClD,YAAY,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,mBAAmB,yBAAyB,CAAC;AAC7C,mBAAmB,uBAAuB,CAAC;AAC3C,mBAAmB,iCAAiC,CAAC;AACrD,mBAAmB,gCAAgC,CAAC;AACpD,mBAAmB,yBAAyB,CAAC;AAC7C,mBAAmB,+BAA+B,CAAC;AACnD,mBAAmB,yBAAyB,CAAC;AAC7C,mBAAmB,uBAAuB,CAAC;AAC3C,mBAAmB,4BAA4B,CAAC;AAChD,mBAAmB,sBAAsB,CAAC"}
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import { buildClient } from "./kernel.js";
9
9
  import { Projects } from "./namespaces/projects.js";
10
- import { Blobs } from "./namespaces/blobs.js";
10
+ import { Assets } from "./namespaces/assets.js";
11
11
  import { Functions } from "./namespaces/functions.js";
12
12
  import { Secrets } from "./namespaces/secrets.js";
13
13
  import { Subdomains } from "./namespaces/subdomains.js";
@@ -30,7 +30,7 @@ import { ScopedRun402 } from "./scoped.js";
30
30
  import { LocalError } from "./errors.js";
31
31
  export class Run402 {
32
32
  projects;
33
- blobs;
33
+ assets;
34
34
  functions;
35
35
  secrets;
36
36
  subdomains;
@@ -48,7 +48,14 @@ export class Run402 {
48
48
  email;
49
49
  contracts;
50
50
  admin;
51
- deploy;
51
+ /**
52
+ * Internal engine. v1.48 unified-apply removed `r.deploy.apply` and
53
+ * `r.apply` as public surfaces — the sole hero is `r.project(id).apply`.
54
+ * This property exists only so the scoped sub-client can delegate to the
55
+ * engine implementation; do not call directly from user code.
56
+ * @internal
57
+ */
58
+ _applyEngine;
52
59
  ci;
53
60
  #client;
54
61
  constructor(opts) {
@@ -73,7 +80,7 @@ export class Run402 {
73
80
  const client = buildClient(kernel);
74
81
  this.#client = client;
75
82
  this.projects = new Projects(client);
76
- this.blobs = new Blobs(client);
83
+ this.assets = new Assets(client);
77
84
  this.functions = new Functions(client);
78
85
  this.secrets = new Secrets(client);
79
86
  this.subdomains = new Subdomains(client);
@@ -94,7 +101,7 @@ export class Run402 {
94
101
  this.email = new Email(client);
95
102
  this.contracts = new Contracts(client);
96
103
  this.admin = new Admin(client);
97
- this.deploy = new Deploy(client);
104
+ this._applyEngine = new Deploy(client);
98
105
  this.ci = new Ci(client);
99
106
  }
100
107
  /**
@@ -172,7 +179,7 @@ export function files(record) {
172
179
  export function run402(opts) {
173
180
  return new Run402(opts);
174
181
  }
175
- export { Run402Error, PaymentRequired, ProjectNotFound, Unauthorized, ApiError, NetworkError, LocalError, Run402DeployError, isRun402Error, isPaymentRequired, isProjectNotFound, isUnauthorized, isApiError, isNetworkError, isLocalError, isDeployError, isRetryableRun402Error, } from "./errors.js";
182
+ export { Run402Error, PaymentRequired, ProjectNotFound, Unauthorized, ApiError, NetworkError, LocalError, Run402DeployError, isRun402Error, isPaymentRequired, isProjectNotFound, isUnauthorized, isApiError, isNetworkError, isLocalError, isDeployError, isRetryableRun402Error, getQuotaScope, } from "./errors.js";
176
183
  export { withRetry } from "./retry.js";
177
184
  export { CI_SESSION_CREDENTIALS, createCiSessionCredentials, githubActionsCredentials, isCiSessionCredentials, } from "./ci-credentials.js";
178
185
  export { Deploy } from "./namespaces/deploy.js";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,WAAW,EAAkC,MAAM,aAAa,CAAC;AAE1E,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAA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,eAAe,EACf,eAAe,EACf,YAAY,EACZ,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,iBAAiB,EACjB,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EACd,UAAU,EACV,cAAc,EACd,YAAY,EACZ,aAAa,EACb,sBAAsB,EACtB,aAAa,GACd,MAAM,aAAa,CAAC;AAOrB,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAIvC,OAAO,EACL,sBAAsB,EACtB,0BAA0B,EAC1B,wBAAwB,EACxB,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EACL,8BAA8B,EAC9B,kBAAkB,EAClB,yBAAyB,EACzB,uBAAuB,EACvB,wBAAwB,EACxB,6BAA6B,EAC7B,+BAA+B,EAC/B,qBAAqB,GACtB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,EAAE,EACF,WAAW,EACX,wBAAwB,EACxB,0BAA0B,EAC1B,8BAA8B,EAC9B,qBAAqB,EACrB,4BAA4B,EAC5B,sBAAsB,EACtB,4BAA4B,EAC5B,0BAA0B,EAC1B,sBAAsB,EACtB,2BAA2B,EAC3B,eAAe,EACf,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC"}
@@ -7,8 +7,8 @@
7
7
  * configured fetch still flows through any wrappers (e.g. test mocks).
8
8
  */
9
9
  import type { Client } from "../kernel.js";
10
- import type { BlobDiagnoseEnvelope, BlobLsOptions, BlobLsResult, BlobPutOptions, BlobPutResult, BlobPutSource, BlobSignOptions, BlobSignResult, BlobUploadCompleteOptions, BlobUploadCompleteResult, BlobUploadInitOptions, BlobUploadInitResult, BlobUploadStatusResult, BlobWaitFreshOptions, BlobWaitFreshResult } from "./blobs.types.js";
11
- export declare class Blobs {
10
+ import type { BlobDiagnoseEnvelope, BlobLsOptions, BlobLsResult, BlobPutOptions, BlobPutResult, BlobPutSource, BlobSignOptions, BlobSignResult, BlobUploadCompleteOptions, BlobUploadCompleteResult, BlobUploadInitOptions, BlobUploadInitResult, BlobUploadStatusResult, BlobWaitFreshOptions, BlobWaitFreshResult } from "./assets.types.js";
11
+ export declare class Assets {
12
12
  private readonly client;
13
13
  constructor(client: Client);
14
14
  /**
@@ -94,4 +94,4 @@ export declare class Blobs {
94
94
  /** Generate a time-boxed S3 presigned GET URL for a blob. Default TTL 1 hour, max 7 days. */
95
95
  sign(projectId: string, key: string, opts?: BlobSignOptions): Promise<BlobSignResult>;
96
96
  }
97
- //# sourceMappingURL=blobs.d.ts.map
97
+ //# sourceMappingURL=assets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../../src/namespaces/assets.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAG3C,OAAO,KAAK,EAGV,oBAAoB,EACpB,aAAa,EACb,YAAY,EACZ,cAAc,EACd,aAAa,EACb,aAAa,EACb,eAAe,EACf,cAAc,EACd,yBAAyB,EACzB,wBAAwB,EACxB,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,EACpB,mBAAmB,EACpB,MAAM,mBAAmB,CAAC;AAiQ3B,qBAAa,MAAM;IACL,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,MAAM;IAE3C;;;;;;;;;;OAUG;IACG,GAAG,CACP,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,aAAa,EACrB,IAAI,GAAE,cAAmB,GACxB,OAAO,CAAC,aAAa,CAAC;IAsFzB;;;;OAIG;IACG,iBAAiB,CACrB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,qBAAqB,GAC1B,OAAO,CAAC,oBAAoB,CAAC;IAwBhC,+EAA+E;IACzE,gBAAgB,CACpB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,sBAAsB,CAAC;IAgBlC;;;OAGG;IACG,qBAAqB,CACzB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,IAAI,GAAE,yBAA8B,EACpC,KAAK,GAAE;QAAE,WAAW,CAAC,EAAE,MAAM,CAAA;KAAO,GACnC,OAAO,CAAC,wBAAwB,CAAC;IAoBpC;;;;;;;;;;;;;;;;;;;OAmBG;IACG,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAchF;;;;;;;;;;;;;;;;;OAiBG;IACG,SAAS,CACb,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,oBAAoB,GACzB,OAAO,CAAC,mBAAmB,CAAC;IA6C/B;;;;;;;OAOG;IACG,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;IAuB5D,oDAAoD;IAC9C,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,GAAE,aAAkB,GAAG,OAAO,CAAC,YAAY,CAAC;IAwB5E,+DAA+D;IACzD,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAcvD,6FAA6F;IACvF,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,eAAoB,GAAG,OAAO,CAAC,cAAc,CAAC;CAwBhG"}
@@ -211,7 +211,7 @@ function buildAssetRef(resp, contentType) {
211
211
  },
212
212
  };
213
213
  }
214
- export class Blobs {
214
+ export class Assets {
215
215
  client;
216
216
  constructor(client) {
217
217
  this.client = client;
@@ -536,4 +536,4 @@ export class Blobs {
536
536
  });
537
537
  }
538
538
  }
539
- //# sourceMappingURL=blobs.js.map
539
+ //# sourceMappingURL=assets.js.map