@embedpdf/engine-core 3.0.0-next.6 → 3.0.0-next.8

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/wire.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_resolver = require("./resolver-DAZWVoJL.cjs");
3
- const require_schemas = require("./schemas-CyWwm0Zf.cjs");
3
+ const require_schemas = require("./schemas-BPA_F2HV.cjs");
4
4
  //#region src/wire/token.ts
5
5
  const DEFAULT_MAX_TOKEN_LENGTH = 256;
6
6
  const FIELD_NAME_RE = /^[A-Za-z][A-Za-z0-9]*(?:\.[A-Za-z][A-Za-z0-9]*)*$/;
@@ -354,8 +354,18 @@ function decodePdfSaveMode(raw) {
354
354
  */
355
355
  const DEFAULT_LAYER_NAME = "default";
356
356
  const wirePaths = {
357
- /** POST: grant document access/caching credentials for the current bearer. */
358
- access: "/v1/access",
357
+ /**
358
+ * POST: grant document access/caching credentials for the current
359
+ * bearer, on the document the path names (cross-checked against the
360
+ * token like every doc route). Doc-scoped BY PATH so the affinity tier
361
+ * — the `X-CloudPDF-Doc` header derivation AND the chart's uri-mode
362
+ * regex — pins the session bootstrap to the document's pod: the very
363
+ * first request of a session opens on the right replica.
364
+ */
365
+ access: (docId) => `/v1/docs/${encodeURIComponent(docId)}/access`,
366
+ /** Deprecated alias (docId in the BODY) — served for one prerelease
367
+ * cycle so pre-rename clients keep working; remove after. */
368
+ accessLegacy: "/v1/access",
359
369
  /**
360
370
  * GET: open the document referenced by the doc-scoped JWT and
361
371
  * return its `DocumentHead`. The server materialises the base