@embedpdf/engine-core 3.0.0-next.14 → 3.0.0-next.15

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 (134) hide show
  1. package/dist/AnnotationList-CkijRHet.d.cts +27163 -0
  2. package/dist/AnnotationList-CkijRHet.d.ts +27163 -0
  3. package/dist/Change-CKoxfTNY.js +889 -0
  4. package/dist/Change-CKoxfTNY.js.map +1 -0
  5. package/dist/Change-CjImsrN0.cjs +1020 -0
  6. package/dist/Change-CjImsrN0.cjs.map +1 -0
  7. package/dist/DocumentRenderService-BfFdFSwI.cjs +120 -0
  8. package/dist/DocumentRenderService-BfFdFSwI.cjs.map +1 -0
  9. package/dist/DocumentRenderService-DV3J9lMz.js +85 -0
  10. package/dist/DocumentRenderService-DV3J9lMz.js.map +1 -0
  11. package/dist/{DocumentSecurityService-Ca6EK3-3.d.ts → DocumentSecurityService-CU1M6Q7m.d.ts} +100 -112
  12. package/dist/{DocumentSecurityService-CIx1MT0T.d.cts → DocumentSecurityService-e6vp2de8.d.cts} +100 -112
  13. package/dist/LocalDocumentHandle-D02FMm-Z.cjs +53 -0
  14. package/dist/LocalDocumentHandle-D02FMm-Z.cjs.map +1 -0
  15. package/dist/LocalDocumentHandle-DAPdaOt_.js +30 -0
  16. package/dist/LocalDocumentHandle-DAPdaOt_.js.map +1 -0
  17. package/dist/LocalEngine-DFoBm4B3.d.cts +1565 -0
  18. package/dist/LocalEngine-DPriFujS.d.ts +1565 -0
  19. package/dist/PageInsertBlankInput-CXHAM7l6.cjs +17 -0
  20. package/dist/PageInsertBlankInput-CXHAM7l6.cjs.map +1 -0
  21. package/dist/PageInsertBlankInput-DhVYVJ_S.js +12 -0
  22. package/dist/PageInsertBlankInput-DhVYVJ_S.js.map +1 -0
  23. package/dist/authority-B3BklsB4.js +2239 -0
  24. package/dist/authority-B3BklsB4.js.map +1 -0
  25. package/dist/{viewport-BWeNHZmb.cjs → authority-DLMNR7ff.cjs} +820 -1647
  26. package/dist/authority-DLMNR7ff.cjs.map +1 -0
  27. package/dist/builders-CNj0POeY.js +161 -0
  28. package/dist/builders-CNj0POeY.js.map +1 -0
  29. package/dist/builders-Cgdp_YCn.cjs +184 -0
  30. package/dist/builders-Cgdp_YCn.cjs.map +1 -0
  31. package/dist/calibrate-7T3fnP8-.js +2404 -0
  32. package/dist/calibrate-7T3fnP8-.js.map +1 -0
  33. package/dist/calibrate-DJBXnhLE.cjs +2919 -0
  34. package/dist/calibrate-DJBXnhLE.cjs.map +1 -0
  35. package/dist/charmap-Cprti1ta.js +239 -0
  36. package/dist/charmap-Cprti1ta.js.map +1 -0
  37. package/dist/charmap-aYlefQP9.cjs +304 -0
  38. package/dist/charmap-aYlefQP9.cjs.map +1 -0
  39. package/dist/conformance.cjs +16466 -5247
  40. package/dist/conformance.cjs.map +1 -1
  41. package/dist/conformance.d.cts +924 -165
  42. package/dist/conformance.d.ts +924 -165
  43. package/dist/conformance.js +16429 -5252
  44. package/dist/conformance.js.map +1 -1
  45. package/dist/format-Bp3QFSH1.cjs +574 -0
  46. package/dist/format-Bp3QFSH1.cjs.map +1 -0
  47. package/dist/format-Dgg428Kb.js +461 -0
  48. package/dist/format-Dgg428Kb.js.map +1 -0
  49. package/dist/index.cjs +323 -116
  50. package/dist/index.d.cts +2 -2
  51. package/dist/index.d.ts +2 -2
  52. package/dist/index.js +14 -5
  53. package/dist/pageRefs-B3ur7Ckm.cjs +51 -0
  54. package/dist/pageRefs-B3ur7Ckm.cjs.map +1 -0
  55. package/dist/pageRefs-DkbuxSCV.js +40 -0
  56. package/dist/pageRefs-DkbuxSCV.js.map +1 -0
  57. package/dist/public.cjs +57 -0
  58. package/dist/public.d.cts +5 -0
  59. package/dist/public.d.ts +5 -0
  60. package/dist/public.js +9 -0
  61. package/dist/resolveAnnotationDraft-7Ke4nV7F.cjs +3646 -0
  62. package/dist/resolveAnnotationDraft-7Ke4nV7F.cjs.map +1 -0
  63. package/dist/resolveAnnotationDraft-CUpf0SMh.js +3167 -0
  64. package/dist/resolveAnnotationDraft-CUpf0SMh.js.map +1 -0
  65. package/dist/{resolver-inAVzsWt.js → resolver-CzxmD9Ck.js} +294 -144
  66. package/dist/resolver-CzxmD9Ck.js.map +1 -0
  67. package/dist/{resolver-CYVNV4hn.cjs → resolver-D2OCtE8F.cjs} +347 -143
  68. package/dist/resolver-D2OCtE8F.cjs.map +1 -0
  69. package/dist/runtime-Cl0v56mm.d.ts +2032 -0
  70. package/dist/runtime-p1WDzDo4.d.cts +2032 -0
  71. package/dist/runtime.cjs +726 -297
  72. package/dist/runtime.cjs.map +1 -1
  73. package/dist/runtime.d.cts +5 -1372
  74. package/dist/runtime.d.ts +5 -1372
  75. package/dist/runtime.js +396 -179
  76. package/dist/runtime.js.map +1 -1
  77. package/dist/schema-C-gU4vj7.cjs +3034 -0
  78. package/dist/schema-C-gU4vj7.cjs.map +1 -0
  79. package/dist/schema-DzlUNk38.js +2081 -0
  80. package/dist/schema-DzlUNk38.js.map +1 -0
  81. package/dist/schemas-Berf1swF.cjs +2481 -0
  82. package/dist/schemas-Berf1swF.cjs.map +1 -0
  83. package/dist/schemas-D6xOGjqg.js +1654 -0
  84. package/dist/schemas-D6xOGjqg.js.map +1 -0
  85. package/dist/subtype-CG4WpIRj.js +129 -0
  86. package/dist/subtype-CG4WpIRj.js.map +1 -0
  87. package/dist/subtype-aDt5TFmK.cjs +158 -0
  88. package/dist/subtype-aDt5TFmK.cjs.map +1 -0
  89. package/dist/validation.cjs +578 -0
  90. package/dist/validation.cjs.map +1 -0
  91. package/dist/validation.d.cts +174 -0
  92. package/dist/validation.d.ts +174 -0
  93. package/dist/validation.js +571 -0
  94. package/dist/validation.js.map +1 -0
  95. package/dist/value-BFS1R8ek.cjs +435 -0
  96. package/dist/value-BFS1R8ek.cjs.map +1 -0
  97. package/dist/value-Dhc8eYcx.js +340 -0
  98. package/dist/value-Dhc8eYcx.js.map +1 -0
  99. package/dist/viewport-BJW13EGZ.js +540 -0
  100. package/dist/viewport-BJW13EGZ.js.map +1 -0
  101. package/dist/viewport-DlL5Bxbg.cjs +671 -0
  102. package/dist/viewport-DlL5Bxbg.cjs.map +1 -0
  103. package/dist/wire.cjs +1051 -397
  104. package/dist/wire.cjs.map +1 -1
  105. package/dist/wire.d.cts +12403 -790
  106. package/dist/wire.d.ts +12403 -790
  107. package/dist/wire.js +821 -242
  108. package/dist/wire.js.map +1 -1
  109. package/package.json +10 -1
  110. package/dist/AbortError-DwuHPK_I.js +0 -27
  111. package/dist/AbortError-DwuHPK_I.js.map +0 -1
  112. package/dist/AbortError-P0RU0Mgg.cjs +0 -38
  113. package/dist/AbortError-P0RU0Mgg.cjs.map +0 -1
  114. package/dist/AnnotationListSnapshot-D9R5n2Kf.d.cts +0 -7101
  115. package/dist/AnnotationListSnapshot-D9R5n2Kf.d.ts +0 -7101
  116. package/dist/Engine-EWWHhEIi.d.ts +0 -1277
  117. package/dist/Engine-FNaAEjfb.d.cts +0 -1277
  118. package/dist/derive-BbsDk_Kz.cjs +0 -880
  119. package/dist/derive-BbsDk_Kz.cjs.map +0 -1
  120. package/dist/derive-DAFJolWu.js +0 -647
  121. package/dist/derive-DAFJolWu.js.map +0 -1
  122. package/dist/format-Bbphf4zR.js +0 -435
  123. package/dist/format-Bbphf4zR.js.map +0 -1
  124. package/dist/format-D_epWlob.cjs +0 -518
  125. package/dist/format-D_epWlob.cjs.map +0 -1
  126. package/dist/resolver-CYVNV4hn.cjs.map +0 -1
  127. package/dist/resolver-inAVzsWt.js.map +0 -1
  128. package/dist/schemas-CFQGvWiu.js +0 -3243
  129. package/dist/schemas-CFQGvWiu.js.map +0 -1
  130. package/dist/schemas-D0g6tKa9.cjs +0 -4694
  131. package/dist/schemas-D0g6tKa9.cjs.map +0 -1
  132. package/dist/viewport-BWeNHZmb.cjs.map +0 -1
  133. package/dist/viewport-CvMcadfQ.js +0 -3072
  134. package/dist/viewport-CvMcadfQ.js.map +0 -1
package/dist/wire.cjs CHANGED
@@ -1,6 +1,9 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_resolver = require("./resolver-CYVNV4hn.cjs");
3
- const require_schemas = require("./schemas-D0g6tKa9.cjs");
2
+ const require_format = require("./format-Bp3QFSH1.cjs");
3
+ const require_resolver = require("./resolver-D2OCtE8F.cjs");
4
+ const require_charmap = require("./charmap-aYlefQP9.cjs");
5
+ const require_schema = require("./schema-C-gU4vj7.cjs");
6
+ const require_schemas = require("./schemas-Berf1swF.cjs");
4
7
  let zod = require("zod");
5
8
  //#region src/forms/submission.ts
6
9
  const FormSubmissionEntrySchema = zod.z.object({
@@ -30,11 +33,11 @@ const FormSubmissionRequestSchema = zod.z.object({
30
33
  "hover",
31
34
  "lifecycle"
32
35
  ]),
33
- clientTimeMs: zod.z.number().finite()
36
+ sentAt: require_schema.IsoDateTimeSchema
34
37
  });
35
38
  const FormSubmissionReceiptSchema = zod.z.object({
36
39
  submissionId: zod.z.string().min(1),
37
- receivedAt: zod.z.string().min(1)
40
+ receivedAt: require_schema.IsoDateTimeSchema
38
41
  });
39
42
  //#endregion
40
43
  //#region src/wire/token.ts
@@ -115,6 +118,30 @@ const AnnotationTokenSchema = { fields: ["annotationVersion"] };
115
118
  /** Doc-level bulk annotations listing pin (plural, vs the per-page
116
119
  * `annotationVersion` token above). */
117
120
  const AnnotationsAllTokenSchema = { fields: ["annotationsVersion"] };
121
+ /** The form (`form@`): its fields, widget rows and calculation order. */
122
+ const FormTokenSchema = { fields: ["formsVersion"] };
123
+ /**
124
+ * `doc.annotations.export` leaf: the annotation and layout pins (the bundle
125
+ * carries each page's position and box, which only the layout pin covers)
126
+ * and the selection, canonical so one selection is one URL.
127
+ */
128
+ const AnnotationsExportTokenSchema = {
129
+ fields: [
130
+ "annotationsVersion",
131
+ "include",
132
+ "layoutVersion",
133
+ "selection"
134
+ ],
135
+ maxLength: 4096
136
+ };
137
+ const FormExportTokenSchema = {
138
+ fields: [
139
+ "formsVersion",
140
+ "layoutVersion",
141
+ "selection"
142
+ ],
143
+ maxLength: 4096
144
+ };
118
145
  const ActionsTokenSchema = { fields: ["actionsVersion"] };
119
146
  const AttachmentsTokenSchema = { fields: ["attachmentsVersion"] };
120
147
  /**
@@ -141,12 +168,13 @@ const DownloadTokenSchema = {
141
168
  * dotted path here and a matching branch in `PageImageOptionsWireSchema`.
142
169
  * No encoder/decoder code changes.
143
170
  *
144
- * `includeAnnotations` is deliberately NOT a token field: annotatedness
145
- * changes the artifact's plane-dependency
146
- * set, so it is expressed by the path FAMILY (`…/render/pages/` vs
147
- * `…/render/annotated/pages/`), never inside the token. `annotationVersion`
148
- * belongs to the annotated family's tokens only — each family's query
149
- * schema enforces its own pin grammar.
171
+ * What a picture draws (`includeAnnotations`, `includeFormFields`) is not a
172
+ * token field: it's the picture's family, which is its path
173
+ * (`PAGE_RENDER_FAMILIES`). Each family needs its own rights and depends on
174
+ * its own planes, and a CDN grant is a path prefix. The pins are: every
175
+ * family's `contentVersion`, and `annotationVersion` and `widgetVersion` in
176
+ * the families that draw annotations and form fields; each family's query
177
+ * schema refuses the others.
150
178
  */
151
179
  const RenderTokenSchema = {
152
180
  fields: [
@@ -157,13 +185,14 @@ const RenderTokenSchema = {
157
185
  "quality",
158
186
  "rotation",
159
187
  "target.kind",
160
- "target.rect.bottom",
161
- "target.rect.left",
162
- "target.rect.right",
163
- "target.rect.top",
188
+ "target.rect.height",
189
+ "target.rect.width",
190
+ "target.rect.x",
191
+ "target.rect.y",
164
192
  "viewport.kind",
165
193
  "viewport.scale",
166
- "viewport.width"
194
+ "viewport.width",
195
+ "widgetVersion"
167
196
  ],
168
197
  maxLength: 512
169
198
  };
@@ -174,22 +203,22 @@ const RenderTokenSchema = {
174
203
  * charset excludes free text), and the resume position. Canonical by
175
204
  * construction: the codec sorts fields and the encoder omits every
176
205
  * default, so equal searches produce byte-equal tokens — the property CDN
177
- * cache hits live on. Mode is NOT a field; it is the endpoint (separate
206
+ * cache hits live on. Mode is not a field; it is the endpoint (separate
178
207
  * permission tiers must never share cache entries).
179
208
  */
180
209
  const SearchTokenSchema = {
181
210
  fields: [
182
211
  "epoch",
183
212
  "format",
213
+ "from",
184
214
  "ignoreWhitespace",
215
+ "limitMatches",
216
+ "limitPages",
185
217
  "matchCase",
186
218
  "matchDiacritics",
187
- "maxMatches",
188
- "maxPages",
189
219
  "q",
190
220
  "regex",
191
221
  "skip",
192
- "startPage",
193
222
  "wholeWord"
194
223
  ],
195
224
  maxLength: 2048
@@ -197,18 +226,40 @@ const SearchTokenSchema = {
197
226
  /**
198
227
  * Token for the batch annotation-appearance render endpoint. Narrower than
199
228
  * the page render token: appearance bitmaps are sized per annotation `/Rect`
200
- * so there is no target/viewport — only a uniform `scale` and page
201
- * `rotation`. Keyed by `annotationVersion` only (appearances do not depend on
202
- * page base content). The cloud endpoint renders the Normal appearance only,
203
- * so `modes` is intentionally absent here (it is a worker/local-only option).
229
+ * so there is no target — only the page's `viewport` and `rotation`. Keyed by
230
+ * `annotationVersion` only (appearances do not depend on page base content).
231
+ * `modes` is present only when a request asks for fewer than every mode, as
232
+ * one value (`normal-down`, in the engine's mode order), so one request for
233
+ * every mode is one URL.
204
234
  */
205
235
  const AnnotationAppearancesRenderTokenSchema = {
206
236
  fields: [
207
237
  "annotationVersion",
208
238
  "format",
239
+ "modes",
240
+ "quality",
241
+ "rotation",
242
+ "viewport.kind",
243
+ "viewport.scale",
244
+ "viewport.width"
245
+ ],
246
+ maxLength: 256
247
+ };
248
+ /**
249
+ * Token for a page's widget images (`form/pages/{p}/appearances@`): the
250
+ * annotation appearance token's options, keyed by the page's
251
+ * `widgetVersion`.
252
+ */
253
+ const WidgetAppearancesRenderTokenSchema = {
254
+ fields: [
255
+ "format",
256
+ "modes",
209
257
  "quality",
210
258
  "rotation",
211
- "scale"
259
+ "viewport.kind",
260
+ "viewport.scale",
261
+ "viewport.width",
262
+ "widgetVersion"
212
263
  ],
213
264
  maxLength: 256
214
265
  };
@@ -266,6 +317,95 @@ const encodeAnnotationToken = (annotationVersion) => encodeToken(AnnotationToken
266
317
  const decodeAnnotationToken = (raw) => decodePositiveInteger(decodeToken(AnnotationTokenSchema, raw).annotationVersion, "annotationVersion");
267
318
  const encodeAnnotationsAllToken = (annotationsVersion) => encodeToken(AnnotationsAllTokenSchema, { annotationsVersion });
268
319
  const decodeAnnotationsAllToken = (raw) => decodePositiveInteger(decodeToken(AnnotationsAllTokenSchema, raw).annotationsVersion, "annotationsVersion");
320
+ const encodeFormToken = (formsVersion) => encodeToken(FormTokenSchema, { formsVersion });
321
+ const decodeFormToken = (raw) => decodePositiveInteger(decodeToken(FormTokenSchema, raw).formsVersion, "formsVersion");
322
+ const encodeAnnotationsExportToken = (token) => {
323
+ const { selection } = token;
324
+ const wire = {};
325
+ if (selection.pages) wire.p = [...new Set(selection.pages.map((page) => page.objectNumber))].sort((left, right) => left - right);
326
+ if (selection.refs) {
327
+ const refs = /* @__PURE__ */ new Map();
328
+ for (const ref of selection.refs) {
329
+ const entry = [ref.page.objectNumber, require_resolver.encodeAnnotKey(ref)];
330
+ refs.set(JSON.stringify(entry), entry);
331
+ }
332
+ wire.r = [...refs.keys()].sort().map((key) => refs.get(key));
333
+ }
334
+ return encodeToken(AnnotationsExportTokenSchema, {
335
+ annotationsVersion: token.annotationsVersion,
336
+ layoutVersion: token.layoutVersion,
337
+ include: selection.include === "references" ? "references" : void 0,
338
+ selection: wire.p || wire.r ? encodeTokenText(JSON.stringify(wire)) : void 0
339
+ });
340
+ };
341
+ const decodeAnnotationsExportToken = (raw) => {
342
+ const query = decodeToken(AnnotationsExportTokenSchema, raw);
343
+ const selection = {};
344
+ if (query.include !== void 0) {
345
+ if (query.include !== "references") throw new Error(`unknown include "${query.include}"`);
346
+ selection.include = "references";
347
+ }
348
+ if (query.selection !== void 0) {
349
+ const wire = JSON.parse(decodeTokenText(query.selection));
350
+ const isNumber = (value) => Number.isInteger(value) && value > 0;
351
+ if (typeof wire !== "object" || wire === null) throw new Error("malformed export selection");
352
+ if (wire.p !== void 0) {
353
+ if (!Array.isArray(wire.p) || !wire.p.every(isNumber)) throw new Error("malformed export pages");
354
+ selection.pages = wire.p.map((pageObjectNumber) => require_format.toPageRef(pageObjectNumber));
355
+ }
356
+ if (wire.r !== void 0) {
357
+ if (!Array.isArray(wire.r)) throw new Error("malformed export refs");
358
+ selection.refs = wire.r.map((entry) => {
359
+ if (!Array.isArray(entry) || entry.length !== 2 || !isNumber(entry[0])) throw new Error("malformed export ref");
360
+ const ref = typeof entry[1] === "string" ? require_resolver.decodeAnnotKey(require_format.toPageRef(entry[0]), entry[1]) : null;
361
+ if (!ref) throw new Error("malformed export ref");
362
+ return ref;
363
+ });
364
+ }
365
+ }
366
+ return {
367
+ annotationsVersion: decodePositiveInteger(query.annotationsVersion, "annotationsVersion"),
368
+ layoutVersion: decodePositiveInteger(query.layoutVersion, "layoutVersion"),
369
+ selection
370
+ };
371
+ };
372
+ const encodeFormExportToken = (token) => {
373
+ const { selection } = token;
374
+ const wire = {};
375
+ if (selection.pages) wire.p = [...new Set(selection.pages.map((page) => page.objectNumber))].sort((left, right) => left - right);
376
+ if (selection.fields) wire.f = [...new Set(selection.fields.map(require_format.encodeFieldRefKey))].sort();
377
+ return encodeToken(FormExportTokenSchema, {
378
+ formsVersion: token.formsVersion,
379
+ layoutVersion: token.layoutVersion,
380
+ selection: wire.p || wire.f ? encodeTokenText(JSON.stringify(wire)) : void 0
381
+ });
382
+ };
383
+ const decodeFormExportToken = (raw) => {
384
+ const query = decodeToken(FormExportTokenSchema, raw);
385
+ const selection = {};
386
+ if (query.selection !== void 0) {
387
+ const wire = JSON.parse(decodeTokenText(query.selection));
388
+ if (typeof wire !== "object" || wire === null) throw new Error("malformed export selection");
389
+ if (wire.p !== void 0) {
390
+ const isNumber = (value) => Number.isInteger(value) && value > 0;
391
+ if (!Array.isArray(wire.p) || !wire.p.every(isNumber)) throw new Error("malformed export pages");
392
+ selection.pages = wire.p.map((pageObjectNumber) => require_format.toPageRef(pageObjectNumber));
393
+ }
394
+ if (wire.f !== void 0) {
395
+ if (!Array.isArray(wire.f)) throw new Error("malformed export fields");
396
+ selection.fields = wire.f.map((key) => {
397
+ const ref = typeof key === "string" ? require_format.decodeFieldRefKey(key) : null;
398
+ if (!ref) throw new Error("malformed export field");
399
+ return ref;
400
+ });
401
+ }
402
+ }
403
+ return {
404
+ formsVersion: decodePositiveInteger(query.formsVersion, "formsVersion"),
405
+ layoutVersion: decodePositiveInteger(query.layoutVersion, "layoutVersion"),
406
+ selection
407
+ };
408
+ };
269
409
  const encodeActionsToken = (actionsVersion) => encodeToken(ActionsTokenSchema, { actionsVersion });
270
410
  const decodeActionsToken = (raw) => decodePositiveInteger(decodeToken(ActionsTokenSchema, raw).actionsVersion, "actionsVersion");
271
411
  const encodeAttachmentsToken = (attachmentsVersion) => encodeToken(AttachmentsTokenSchema, { attachmentsVersion });
@@ -285,7 +425,7 @@ const decodeDownloadToken = (raw) => {
285
425
  * Encode a render token from a flat wire-shape input. The input is the
286
426
  * output of `flatten(...)` over an SDK `PageImageOptions`-shaped object plus
287
427
  * cache versions. Semantic invariants (viewport-kind XOR fields, per-family
288
- * pin grammar — annotatedness itself is PATH-expressed, never a token key —
428
+ * pin grammar — annotatedness itself is path-expressed, never a token key —
289
429
  * target rect coherence) live in the per-family render query schemas —
290
430
  * running them here would duplicate the spec.
291
431
  */
@@ -302,18 +442,24 @@ const decodeRenderToken = (raw) => decodeToken(RenderTokenSchema, raw);
302
442
  * plus cache versions). Semantic validation lives in
303
443
  * `AnnotationAppearancesQuerySchema`.
304
444
  */
445
+ /** `modes` as one token value: the modes in engine order, joined by `-`. */
446
+ const encodeAppearanceModes = (modes) => modes.join("-");
305
447
  const encodeAnnotationAppearancesRenderToken = (input) => encodeToken(AnnotationAppearancesRenderTokenSchema, input);
306
448
  /** Decode an annotation-appearance render token to a flat field map. */
307
449
  const decodeAnnotationAppearancesRenderToken = (raw) => decodeToken(AnnotationAppearancesRenderTokenSchema, raw);
450
+ /** Encode a widget-appearance render token, the annotation one's twin keyed by `widgetVersion`. */
451
+ const encodeWidgetAppearancesRenderToken = (input) => encodeToken(WidgetAppearancesRenderTokenSchema, input);
452
+ /** Decode a widget-appearance render token to a flat field map. */
453
+ const decodeWidgetAppearancesRenderToken = (raw) => decodeToken(WidgetAppearancesRenderTokenSchema, raw);
308
454
  /**
309
- * The search RESULT representation this client speaks — part of the token
455
+ * The search result representation this client speaks — part of the token
310
456
  * (and therefore the versioned URL), so a response-shape change can never
311
457
  * serve a stale CDN body to a newer client: new tokens are new cache keys,
312
- * and old tokens fail decode on new servers. Deliberately ALWAYS encoded —
458
+ * and old tokens fail decode on new servers. Deliberately always encoded —
313
459
  * an exception to the omit-defaults rule, because its entire job is to
314
460
  * change the token bytes when the format changes.
315
461
  */
316
- const SEARCH_RESULT_FORMAT = "segments1";
462
+ const SEARCH_RESULT_FORMAT = "ranges1";
317
463
  const encodeSearchToken = (input) => {
318
464
  const q = input.query;
319
465
  return encodeToken(SearchTokenSchema, {
@@ -325,17 +471,17 @@ const encodeSearchToken = (input) => {
325
471
  matchDiacritics: q.matchDiacritics ? true : void 0,
326
472
  wholeWord: q.wholeWord ? true : void 0,
327
473
  ignoreWhitespace: q.ignoreWhitespace ? true : void 0,
328
- startPage: input.startPage,
474
+ from: input.from,
329
475
  skip: input.skip > 0 ? input.skip : void 0,
330
- maxPages: input.budget?.maxPages,
331
- maxMatches: input.budget?.maxMatches
476
+ limitPages: input.limit?.pages,
477
+ limitMatches: input.limit?.matches
332
478
  });
333
479
  };
334
480
  const decodeSearchToken = (raw) => {
335
481
  const t = decodeToken(SearchTokenSchema, raw);
336
482
  if (t.epoch === void 0) throw new Error("search token is missing \"epoch\"");
337
483
  if (t.q === void 0) throw new Error("search token is missing \"q\"");
338
- if (t.format !== "segments1") throw new Error(`search token has unsupported result format "${t.format ?? "legacy"}" (expected "${SEARCH_RESULT_FORMAT}")`);
484
+ if (t.format !== "ranges1") throw new Error(`search token has unsupported result format "${t.format ?? "legacy"}" (expected "${SEARCH_RESULT_FORMAT}")`);
339
485
  const query = {
340
486
  text: decodeTokenText(t.q),
341
487
  ...t.regex === "true" ? { regex: true } : {},
@@ -344,16 +490,16 @@ const decodeSearchToken = (raw) => {
344
490
  ...t.wholeWord === "true" ? { wholeWord: true } : {},
345
491
  ...t.ignoreWhitespace === "true" ? { ignoreWhitespace: true } : {}
346
492
  };
347
- const maxPages = t.maxPages === void 0 ? void 0 : decodePositiveInteger(t.maxPages, "maxPages");
348
- const maxMatches = t.maxMatches === void 0 ? void 0 : decodePositiveInteger(t.maxMatches, "maxMatches");
493
+ const pages = t.limitPages === void 0 ? void 0 : decodePositiveInteger(t.limitPages, "limitPages");
494
+ const matches = t.limitMatches === void 0 ? void 0 : decodePositiveInteger(t.limitMatches, "limitMatches");
349
495
  return {
350
496
  epoch: t.epoch,
351
497
  query,
352
- ...t.startPage === void 0 ? {} : { startPage: decodePositiveInteger(t.startPage, "startPage") },
498
+ ...t.from === void 0 ? {} : { from: decodePositiveInteger(t.from, "from") },
353
499
  skip: t.skip === void 0 ? 0 : decodePositiveInteger(t.skip, "skip"),
354
- ...maxPages !== void 0 || maxMatches !== void 0 ? { budget: {
355
- ...maxPages !== void 0 ? { maxPages } : {},
356
- ...maxMatches !== void 0 ? { maxMatches } : {}
500
+ ...pages !== void 0 || matches !== void 0 ? { limit: {
501
+ ...matches !== void 0 ? { matches } : {},
502
+ ...pages !== void 0 ? { pages } : {}
357
503
  } } : {}
358
504
  };
359
505
  };
@@ -407,7 +553,7 @@ function decodePdfSaveMode(raw) {
407
553
  * Single source of truth for cloud HTTP paths. Both @cloudpdf/engine and
408
554
  * @cloudpdf/server import these so they cannot drift.
409
555
  *
410
- * **URL layout convention (paths v2)**
556
+ * **URL layout convention**
411
557
  *
412
558
  * Each resource type lives at its own distinct path prefix. This
413
559
  * lets prefix-matching CDNs (Bunny, Cloud CDN, Azure FD) enforce
@@ -419,28 +565,39 @@ function decodePdfSaveMode(raw) {
419
565
  * /v1/docs/{id} — doc root
420
566
  * /v1/docs/{id}/manifest@{ver} — doc-level read
421
567
  * /v1/docs/{id}/render/pages/{N}/data@{ver} — render is its own prefix
568
+ * /v1/docs/{id}/render/{annotations,fields,all}/pages/{N}/data@{ver} — and each picture family
422
569
  * /v1/docs/{id}/text/pages/{N}/data@{ver} — text is its own prefix
423
570
  * /v1/docs/{id}/geometry/pages/{N}/data@{ver} — geometry is its own prefix
424
571
  * /v1/docs/{id}/layers/{L}/manifest@{ver}
425
572
  * /v1/docs/{id}/layers/{L}/metadata@{ver}
573
+ * /v1/docs/{id}/layers/{L}/metadata/custom@{ver} — the Info dict's own keys
426
574
  * /v1/docs/{id}/layers/{L}/render/pages/{N}/data@{ver}
427
575
  * /v1/docs/{id}/layers/{L}/text/pages/{N}/data@{ver}
428
576
  * /v1/docs/{id}/layers/{L}/geometry/pages/{N}/data@{ver}
429
577
  * /v1/docs/{id}/layers/{L}/annotations/pages/{N}/items@{ver} — collection (read)
430
578
  * /v1/docs/{id}/layers/{L}/annotations/pages/{N}/items — collection (create)
431
579
  * /v1/docs/{id}/layers/{L}/annotations/pages/{N}/items/{key} — member
432
- * /v1/docs/{id}/layers/{L}/annotations/pages/{N}/items/move — batch reorder
433
- * /v1/docs/{id}/layers/{L}/pages/move — batch page reorder
580
+ * /v1/docs/{id}/layers/{L}/annotations/pages/{N}/items/reorder — stacking order
581
+ * /v1/docs/{id}/layers/{L}/pages/reorder — page order
434
582
  * /v1/docs/{id}/layers/{L}/pages/rotate — batch absolute rotation
435
583
  * /v1/docs/{id}/layers/{L}/pages/delete — batch page delete
436
- * /v1/docs/{id}/layers/{L}/form — reconciled snapshot (read)
584
+ * /v1/docs/{id}/form@{ver} — the form: fields + widget rows (read)
585
+ * /v1/docs/{id}/form/pages/{N}/appearances@{ver} — a page's widget images (read)
586
+ * /v1/docs/{id}/layers/{L}/form@{ver}
587
+ * /v1/docs/{id}/layers/{L}/form/pages/{N}/appearances@{ver}
588
+ * /v1/docs/{id}/layers/{L}/form — the form, current (read)
589
+ * /v1/docs/{id}/layers/{L}/form/widgets/{N}/{key} — a widget's place and look (patch)
590
+ * /v1/docs/{id}/layers/{L}/form/widgets/{N}/reorder — the widgets' stacking order
437
591
  * /v1/docs/{id}/layers/{L}/form/fields — field collection (create)
438
592
  * /v1/docs/{id}/layers/{L}/form/fields/{key} — field member (read/patch/delete)
439
593
  * /v1/docs/{id}/layers/{L}/form/fields/{key}/value — value write (fill)
440
594
  * /v1/docs/{id}/layers/{L}/form/fields/{key}/reset — reset to /DV (fill)
441
595
  * /v1/docs/{id}/layers/{L}/form/fields/{key}/widgets — adopt a widget (attach)
442
596
  * /v1/docs/{id}/layers/{L}/form/fields/{key}/widgets/detach — release a widget
443
- * /v1/docs/{id}/layers/{L}/form/data — FDF/XFDF export (GET) / import (POST)
597
+ * /v1/docs/{id}/layers/{L}/form/export@{token} — form bundle export (GET)
598
+ * /v1/docs/{id}/layers/{L}/form/export — form bundle export by body (POST)
599
+ * /v1/docs/{id}/layers/{L}/form/import — design import (multipart POST)
600
+ * /v1/docs/{id}/layers/{L}/form/import-values — values import (multipart POST)
444
601
  * /v1/docs/{id}/layers/{L}/form/repair — durable reconciliation
445
602
  * /v1/docs/{id}/layers/{L}/download@{ver}
446
603
  *
@@ -457,16 +614,21 @@ const wirePaths = {
457
614
  * against the token like every layer route — the grant is
458
615
  * layer-scoped in substance: CDN coverage, scopes, and the client's
459
616
  * binding all carry the layer). Path-addressed so the affinity tier —
460
- * the `X-CloudPDF-Doc` header derivation AND the chart's uri-mode
617
+ * the `X-CloudPDF-Doc` header derivation and the chart's uri-mode
461
618
  * regex — pins the session bootstrap to the document's pod from the
462
619
  * very first request. Default-layer callers spell `layers/default/`,
463
620
  * same as every other layer route.
464
621
  */
465
622
  access: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/access`,
466
- /** Deprecated alias (docId in the BODY) — served for one prerelease
623
+ /** Deprecated alias (docId in the body) — served for one prerelease
467
624
  * cycle so pre-rename clients keep working; remove after. */
468
625
  accessLegacy: "/v1/access",
469
626
  /**
627
+ * POST `{ count }`: hand the caller's editing session `count` more object
628
+ * numbers at once (at most 1,000), for a large paste.
629
+ */
630
+ objectNumbers: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/object-numbers`,
631
+ /**
470
632
  * GET: open the document referenced by the doc-scoped JWT and
471
633
  * return its `DocumentHead`. The server materialises the base
472
634
  * PDF into its file cache and binds it to a worker the first
@@ -504,9 +666,9 @@ const wirePaths = {
504
666
  */
505
667
  layerLayout: (docId, layerName, layoutVersion) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/layout@${encodeLayoutToken(layoutVersion)}`,
506
668
  /**
507
- * Immutable BASE page-geometry list (plane-scope model): the shared-URL
669
+ * Immutable base page-geometry list (plane-scope model): the shared-URL
508
670
  * variant a layout-inheriting layer resolves at — every visitor's page
509
- * list is ONE CDN object served from the base worker session.
671
+ * list is one CDN object served from the base worker session.
510
672
  */
511
673
  docLayout: (docId, layoutVersion) => `/v1/docs/${encodeURIComponent(docId)}/layout@${encodeLayoutToken(layoutVersion)}`,
512
674
  layerLayoutCurrent: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/layout`,
@@ -520,12 +682,21 @@ const wirePaths = {
520
682
  */
521
683
  layerMetadata: (docId, layerName, metadataVersion) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/metadata@${encodeMetadataToken(metadataVersion)}`,
522
684
  layerMetadataCurrent: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/metadata`,
523
- /** Immutable BASE metadata (plane-scope model): the shared-URL variant a
685
+ /** Immutable base metadata (plane-scope model): the shared-URL variant a
524
686
  * metadata-inheriting layer resolves at. */
525
687
  docMetadata: (docId, metadataVersion) => `/v1/docs/${encodeURIComponent(docId)}/metadata@${encodeMetadataToken(metadataVersion)}`,
688
+ /**
689
+ * GET: the Info dict's custom keys for the layer at a specific
690
+ * `metadataVersion` — the same version pointer as `layerMetadata`, since
691
+ * both halves live in one dict. Content-addressed like it.
692
+ */
693
+ layerCustomMetadata: (docId, layerName, metadataVersion) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/metadata/custom@${encodeMetadataToken(metadataVersion)}`,
694
+ layerCustomMetadataCurrent: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/metadata/custom`,
695
+ /** Immutable base custom keys: the shared-URL twin of `layerCustomMetadata`. */
696
+ docCustomMetadata: (docId, metadataVersion) => `/v1/docs/${encodeURIComponent(docId)}/metadata/custom@${encodeMetadataToken(metadataVersion)}`,
526
697
  /** Immutable catalog-owned actions, independently pinned in the manifest. */
527
698
  layerActions: (docId, layerName, actionsVersion) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/actions@${encodeActionsToken(actionsVersion)}`,
528
- /** Immutable BASE catalog actions (plane-scope model): the shared-URL
699
+ /** Immutable base catalog actions (plane-scope model): the shared-URL
529
700
  * variant an actions-inheriting layer resolves at. */
530
701
  docActions: (docId, actionsVersion) => `/v1/docs/${encodeURIComponent(docId)}/actions@${encodeActionsToken(actionsVersion)}`,
531
702
  /** Immutable layer signature snapshot (base signatures + the layer's fields + protection). */
@@ -539,7 +710,7 @@ const wirePaths = {
539
710
  /** POST (JSON): install the CMS and publish the sealed bytes as the next base version. */
540
711
  layerSignatureComplete: (docId, layerName, signingId) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/signatures/${encodeURIComponent(signingId)}/complete`,
541
712
  /** DELETE: discard a pending signing. */
542
- layerSignatureAbort: (docId, layerName, signingId) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/signatures/${encodeURIComponent(signingId)}`,
713
+ layerSignatureCancel: (docId, layerName, signingId) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/signatures/${encodeURIComponent(signingId)}`,
543
714
  /** The document's base versions, oldest first (grows; never cached). */
544
715
  docVersions: (docId) => `/v1/docs/${encodeURIComponent(docId)}/versions`,
545
716
  /** Immutable: the signature snapshot of one base version. */
@@ -558,13 +729,15 @@ const wirePaths = {
558
729
  layerFormFieldSignatureAppearance: (docId, layerName, fieldKey) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/fields/${encodeURIComponent(fieldKey)}/signature-appearance`,
559
730
  /** POST: rewrite the document Info dict for the layer (metadata edit). */
560
731
  layerMetadataUpdate: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/metadata`,
732
+ /** POST: set and remove the Info dict's custom keys for the layer. */
733
+ layerCustomMetadataUpdate: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/metadata/custom`,
561
734
  /**
562
- * Immutable BASE /EmbeddedFiles listing: the shared-URL variant an
735
+ * Immutable base /EmbeddedFiles listing: the shared-URL variant an
563
736
  * attachments-undiverged layer resolves at — every visitor's sidebar list
564
- * is ONE CDN object served from the base worker session.
737
+ * is one CDN object served from the base worker session.
565
738
  */
566
739
  docAttachments: (docId, attachmentsVersion) => `/v1/docs/${encodeURIComponent(docId)}/attachments@${encodeAttachmentsToken(attachmentsVersion)}`,
567
- /** Immutable BASE decoded bytes of one embedded file (twin of
740
+ /** Immutable base decoded bytes of one embedded file (twin of
568
741
  * `layerAttachmentFile` — same capability tier split). */
569
742
  docAttachmentFile: (docId, key, attachmentsVersion) => `/v1/docs/${encodeURIComponent(docId)}/attachment-files/${encodeTokenText(key)}/data@${encodeAttachmentsToken(attachmentsVersion)}`,
570
743
  /** Immutable /EmbeddedFiles listing, pinned by `attachmentsVersion`. */
@@ -581,14 +754,14 @@ const wirePaths = {
581
754
  */
582
755
  layerAttachmentFile: (docId, layerName, key, attachmentsVersion) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/attachment-files/${encodeTokenText(key)}/data@${encodeAttachmentsToken(attachmentsVersion)}`,
583
756
  /** Immutable decoded bytes of a FileAttachment annotation's embedded file. */
584
- layerAnnotationFile: (docId, layerName, pageObjectNumber, annotKey, attachmentsVersion) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/attachment-files/pages/${pageObjectNumber}/items/${encodeURIComponent(annotKey)}/data@${encodeAttachmentsToken(attachmentsVersion)}`,
757
+ layerAnnotationFile: (docId, layerName, page, annotKey, attachmentsVersion) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/attachment-files/pages/${encodeURIComponent(require_format.encodePageKey(page))}/items/${encodeURIComponent(annotKey)}/data@${encodeAttachmentsToken(attachmentsVersion)}`,
585
758
  /**
586
- * Immutable BASE bytes of a FileAttachment annotation's embedded file
759
+ * Immutable base bytes of a FileAttachment annotation's embedded file
587
760
  * (plane-scope model). Depends on the `annotations` plane (the annotation
588
- * exists in this view) AND the `attachments` plane (the pin); the origin
761
+ * exists in this view) and the `attachments` plane (the pin); the origin
589
762
  * guard requires both inherited.
590
763
  */
591
- docAnnotationFile: (docId, pageObjectNumber, annotKey, attachmentsVersion) => `/v1/docs/${encodeURIComponent(docId)}/attachment-files/pages/${pageObjectNumber}/items/${encodeURIComponent(annotKey)}/data@${encodeAttachmentsToken(attachmentsVersion)}`,
764
+ docAnnotationFile: (docId, page, annotKey, attachmentsVersion) => `/v1/docs/${encodeURIComponent(docId)}/attachment-files/pages/${encodeURIComponent(require_format.encodePageKey(page))}/items/${encodeURIComponent(annotKey)}/data@${encodeAttachmentsToken(attachmentsVersion)}`,
592
765
  /**
593
766
  * GET: full plain-text extraction for a single page at a specific
594
767
  * `contentVersion`. Content-addressed; CDN may cache forever.
@@ -596,55 +769,60 @@ const wirePaths = {
596
769
  * retry walks `/head` → `/manifest@docVersion=N` to learn the new
597
770
  * `contentVersion`.
598
771
  */
599
- docPageText: (docId, pageObjectNumber, contentVersion) => `/v1/docs/${encodeURIComponent(docId)}/text/pages/${pageObjectNumber}/data@${encodeContentToken(contentVersion)}`,
600
- layerPageText: (docId, layerName, pageObjectNumber, contentVersion) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/text/pages/${pageObjectNumber}/data@${encodeContentToken(contentVersion)}`,
601
- layerPageTextCurrent: (docId, layerName, pageObjectNumber) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/text/pages/${pageObjectNumber}/data`,
602
- docPageGeometry: (docId, pageObjectNumber, contentVersion) => `/v1/docs/${encodeURIComponent(docId)}/geometry/pages/${pageObjectNumber}/data@${encodeContentToken(contentVersion)}`,
603
- docPageGeometryCurrent: (docId, pageObjectNumber) => `/v1/docs/${encodeURIComponent(docId)}/geometry/pages/${pageObjectNumber}/data`,
604
- docPageRender: (docId, pageObjectNumber, token) => `/v1/docs/${encodeURIComponent(docId)}/render/pages/${pageObjectNumber}/data@${encodeRenderToken(token)}`,
605
- docPageRenderCurrent: (docId, pageObjectNumber) => `/v1/docs/${encodeURIComponent(docId)}/render/pages/${pageObjectNumber}/data`,
772
+ docPageText: (docId, page, contentVersion) => `/v1/docs/${encodeURIComponent(docId)}/text/pages/${encodeURIComponent(require_format.encodePageKey(page))}/data@${encodeContentToken(contentVersion)}`,
773
+ layerPageText: (docId, layerName, page, contentVersion) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/text/pages/${encodeURIComponent(require_format.encodePageKey(page))}/data@${encodeContentToken(contentVersion)}`,
774
+ layerPageTextCurrent: (docId, layerName, page) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/text/pages/${encodeURIComponent(require_format.encodePageKey(page))}/data`,
775
+ docPageGeometry: (docId, page, contentVersion) => `/v1/docs/${encodeURIComponent(docId)}/geometry/pages/${encodeURIComponent(require_format.encodePageKey(page))}/data@${encodeContentToken(contentVersion)}`,
776
+ docPageGeometryCurrent: (docId, page) => `/v1/docs/${encodeURIComponent(docId)}/geometry/pages/${encodeURIComponent(require_format.encodePageKey(page))}/data`,
606
777
  /**
607
- * Immutable BASE annotated render (plane-scope model). Its OWN path family,
608
- * not a token flag under `/render/pages/`: an annotated render depends on
609
- * `content + annotations`, an annotation-free one on `content` alone, and
610
- * edge grants are prefix-scoped — the prefix law says a path's prefix must
611
- * identify its full plane-dependency set. Annotatedness is therefore
612
- * PATH-ONLY (the token/path law): the wire token has no
613
- * `includeAnnotations` key at all; the annotated family's token carries
614
- * `annotationVersion`, the free family's cannot.
778
+ * A page picture of one family (`PAGE_RENDER_FAMILIES`). The family is a
779
+ * path of its own, never a token field: each depends on its own planes and
780
+ * needs its own rights, and an edge grant sees only prefixes. Its token
781
+ * carries the family's pins.
615
782
  */
616
- docPageRenderAnnotated: (docId, pageObjectNumber, token) => `/v1/docs/${encodeURIComponent(docId)}/render/annotated/pages/${pageObjectNumber}/data@${encodeRenderToken(token)}`,
617
- layerPageGeometry: (docId, layerName, pageObjectNumber, contentVersion) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/geometry/pages/${pageObjectNumber}/data@${encodeContentToken(contentVersion)}`,
618
- layerPageGeometryCurrent: (docId, layerName, pageObjectNumber) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/geometry/pages/${pageObjectNumber}/data`,
619
- layerPageRender: (docId, layerName, pageObjectNumber, token) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/render/pages/${pageObjectNumber}/data@${encodeRenderToken(token)}`,
620
- layerPageRenderCurrent: (docId, layerName, pageObjectNumber) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/render/pages/${pageObjectNumber}/data`,
621
- /** Layer twin of `docPageRenderAnnotated` — the grammar is uniform:
622
- * annotatedness is path-only at BOTH tiers. */
623
- layerPageRenderAnnotated: (docId, layerName, pageObjectNumber, token) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/render/annotated/pages/${pageObjectNumber}/data@${encodeRenderToken(token)}`,
624
- layerPageRenderAnnotatedCurrent: (docId, layerName, pageObjectNumber) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/render/annotated/pages/${pageObjectNumber}/data`,
783
+ docPageRender: (docId, family, page, token) => `/v1/docs/${encodeURIComponent(docId)}/${require_schemas.PAGE_RENDER_FAMILIES[family].path}/${encodeURIComponent(require_format.encodePageKey(page))}/data@${encodeRenderToken(token)}`,
784
+ docPageRenderCurrent: (docId, family, page) => `/v1/docs/${encodeURIComponent(docId)}/${require_schemas.PAGE_RENDER_FAMILIES[family].path}/${encodeURIComponent(require_format.encodePageKey(page))}/data`,
785
+ layerPageGeometry: (docId, layerName, page, contentVersion) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/geometry/pages/${encodeURIComponent(require_format.encodePageKey(page))}/data@${encodeContentToken(contentVersion)}`,
786
+ layerPageGeometryCurrent: (docId, layerName, page) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/geometry/pages/${encodeURIComponent(require_format.encodePageKey(page))}/data`,
787
+ layerPageRender: (docId, layerName, family, page, token) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/${require_schemas.PAGE_RENDER_FAMILIES[family].path}/${encodeURIComponent(require_format.encodePageKey(page))}/data@${encodeRenderToken(token)}`,
788
+ layerPageRenderCurrent: (docId, layerName, family, page) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/${require_schemas.PAGE_RENDER_FAMILIES[family].path}/${encodeURIComponent(require_format.encodePageKey(page))}/data`,
625
789
  /**
626
- * Immutable BASE annotation list for a single page (plane-scope model):
790
+ * Immutable base annotation list for a single page (plane-scope model):
627
791
  * the shared-URL variant an annotations-inheriting layer resolves at — a
628
- * base's own annotations (weak-identity ones included) are simply visible
629
- * through every pristine layer, so 1,000 visitors' sidebars are ONE CDN
792
+ * base's own annotations (inline ones included) are simply visible
793
+ * through every pristine layer, so 1,000 visitors' sidebars are one CDN
630
794
  * object served from the base worker session.
631
795
  */
632
- docPageAnnotations: (docId, pageObjectNumber, annotationVersion) => `/v1/docs/${encodeURIComponent(docId)}/annotations/pages/${pageObjectNumber}/items@${encodeAnnotationToken(annotationVersion)}`,
633
- /** Immutable BASE whole-document annotation listing (bulk hydration). */
796
+ docPageAnnotations: (docId, page, annotationVersion) => `/v1/docs/${encodeURIComponent(docId)}/annotations/pages/${encodeURIComponent(require_format.encodePageKey(page))}/items@${encodeAnnotationToken(annotationVersion)}`,
797
+ /** Immutable base whole-document annotation listing (bulk hydration). */
634
798
  docAnnotationsAll: (docId, annotationsVersion) => `/v1/docs/${encodeURIComponent(docId)}/annotations/items@${encodeAnnotationsAllToken(annotationsVersion)}`,
635
- /** Immutable BASE appearance batch (twin of
799
+ /** Immutable base appearance batch (twin of
636
800
  * `layerPageAnnotationAppearances` — same `annotations` plane gate). */
637
- docPageAnnotationAppearances: (docId, pageObjectNumber, token) => `/v1/docs/${encodeURIComponent(docId)}/annotations/pages/${pageObjectNumber}/appearances@${encodeAnnotationAppearancesRenderToken(token)}`,
801
+ docPageAnnotationAppearances: (docId, page, token) => `/v1/docs/${encodeURIComponent(docId)}/annotations/pages/${encodeURIComponent(require_format.encodePageKey(page))}/appearances@${encodeAnnotationAppearancesRenderToken(token)}`,
638
802
  /**
639
803
  * GET: full annotation list for a single page at a specific
640
804
  * `annotationVersion`. Same cache-control rules and 404-retry
641
805
  * semantics as `docPageText`. The `items` suffix is the
642
806
  * collection name — see file-level docstring.
643
807
  */
644
- layerPageAnnotations: (docId, layerName, pageObjectNumber, annotationVersion) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/pages/${pageObjectNumber}/items@${encodeAnnotationToken(annotationVersion)}`,
645
- /** Immutable LAYER whole-document annotation listing (bulk hydration). */
808
+ layerPageAnnotations: (docId, layerName, page, annotationVersion) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/pages/${encodeURIComponent(require_format.encodePageKey(page))}/items@${encodeAnnotationToken(annotationVersion)}`,
809
+ /** Immutable base annotation export: a bundle as multipart, needing
810
+ * `doc.annotate.read` and `doc.download`. */
811
+ docAnnotationsExport: (docId, token) => `/v1/docs/${encodeURIComponent(docId)}/annotations/export@${encodeAnnotationsExportToken(token)}`,
812
+ /** Immutable layer annotation export (twin of `docAnnotationsExport`). */
813
+ layerAnnotationsExport: (docId, layerName, token) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/export@${encodeAnnotationsExportToken(token)}`,
814
+ /**
815
+ * A layer annotation export whose selection a URL can't carry (position
816
+ * refs, long ref lists): a POST of the pins and the selection, not cached.
817
+ */
818
+ layerAnnotationsExportRequest: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/export`,
819
+ /** A layer's changes: user actions, each its ops in one transaction, or an undo (`doc.apply`). */
820
+ layerChanges: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/changes`,
821
+ /** A bundle's annotations, created in the layer as one change (`doc.annotations.import`). */
822
+ layerAnnotationsImport: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/import`,
823
+ /** Immutable layer whole-document annotation listing (bulk hydration). */
646
824
  layerAnnotationsAll: (docId, layerName, annotationsVersion) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/items@${encodeAnnotationsAllToken(annotationsVersion)}`,
647
- layerPageAnnotationsCurrent: (docId, layerName, pageObjectNumber) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/pages/${pageObjectNumber}/items`,
825
+ layerPageAnnotationsCurrent: (docId, layerName, page) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/pages/${encodeURIComponent(require_format.encodePageKey(page))}/items`,
648
826
  /**
649
827
  * GET: batch-rendered annotation appearance bitmaps for a single page as a
650
828
  * `multipart/form-data` body. Sibling collection of `items` under the same
@@ -655,28 +833,52 @@ const wirePaths = {
655
833
  * Content-addressed via the appearance render token (`annotationVersion`
656
834
  * plus render options like scale/format); CDN may cache forever. Appearance
657
835
  * pixels depend only on the annotation `/AP` stream, so `contentVersion` is
658
- * deliberately NOT part of the key.
836
+ * deliberately not part of the key.
659
837
  */
660
- layerPageAnnotationAppearances: (docId, layerName, pageObjectNumber, token) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/pages/${pageObjectNumber}/appearances@${encodeAnnotationAppearancesRenderToken(token)}`,
661
- layerPageAnnotationAppearancesCurrent: (docId, layerName, pageObjectNumber) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/pages/${pageObjectNumber}/appearances`,
662
- layerPageAnnotationsCreate: (docId, layerName, pageObjectNumber) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/pages/${pageObjectNumber}/items`,
663
- layerAnnotationByKey: (docId, layerName, pageObjectNumber, key) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/pages/${pageObjectNumber}/items/${encodeURIComponent(key)}`,
664
- layerPageAnnotationsMove: (docId, layerName, pageObjectNumber) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/pages/${pageObjectNumber}/items/move`,
838
+ layerPageAnnotationAppearances: (docId, layerName, page, token) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/pages/${encodeURIComponent(require_format.encodePageKey(page))}/appearances@${encodeAnnotationAppearancesRenderToken(token)}`,
839
+ layerPageAnnotationAppearancesCurrent: (docId, layerName, page) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/pages/${encodeURIComponent(require_format.encodePageKey(page))}/appearances`,
840
+ layerPageAnnotationsCreate: (docId, layerName, page) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/pages/${encodeURIComponent(require_format.encodePageKey(page))}/items`,
841
+ layerAnnotationByKey: (docId, layerName, page, key) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/pages/${encodeURIComponent(require_format.encodePageKey(page))}/items/${encodeURIComponent(key)}`,
842
+ /** GET: an annotation's `appearance` resource, its drawing as a one-page
843
+ * PDF — a derived read (application/pdf, no-store), gated like pages/extract. */
844
+ layerAnnotationAppearanceResource: (docId, layerName, page, key) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/pages/${encodeURIComponent(require_format.encodePageKey(page))}/items/${encodeURIComponent(key)}/resources/appearance`,
845
+ layerPageAnnotationsReorder: (docId, layerName, page) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/pages/${encodeURIComponent(require_format.encodePageKey(page))}/items/reorder`,
665
846
  /** POST: flatten a chosen set of the page's annotations into its content
666
847
  * (a content + annotation mutation of that page). */
667
- layerPageAnnotationsFlatten: (docId, layerName, pageObjectNumber) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/pages/${pageObjectNumber}/items/flatten`,
848
+ layerPageAnnotationsFlatten: (docId, layerName, page) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/pages/${encodeURIComponent(require_format.encodePageKey(page))}/items/flatten`,
668
849
  /** POST: the chosen annotations' appearances as one single-page PDF — a
669
850
  * derived read (application/pdf, no-store), gated like pages/extract. */
670
- layerPageAnnotationsAppearance: (docId, layerName, pageObjectNumber) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/pages/${pageObjectNumber}/items/appearance`,
851
+ layerPageAnnotationsAppearance: (docId, layerName, page) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/pages/${encodeURIComponent(require_format.encodePageKey(page))}/items/appearance`,
852
+ /**
853
+ * Immutable base form: the fields, every widget row, the calculation
854
+ * order (`doc.forms.list()`), at the document's `formsVersion`. Needs
855
+ * `doc.forms.read`, under its own prefix, so the CDN signs it apart from
856
+ * the annotations.
857
+ */
858
+ docForm: (docId, formsVersion) => `/v1/docs/${encodeURIComponent(docId)}/form@${encodeFormToken(formsVersion)}`,
859
+ /** Immutable layer form (twin of `docForm`). */
860
+ layerForm: (docId, layerName, formsVersion) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form@${encodeFormToken(formsVersion)}`,
861
+ /** GET: the layer's form as it is now — for API callers, served `no-store`. */
862
+ layerFormCurrent: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form`,
863
+ /**
864
+ * Immutable base batch of a page's widget images, every mode and state, as
865
+ * `multipart/form-data` (`page.forms.renderAppearances()`), keyed by the
866
+ * page's `widgetVersion`.
867
+ */
868
+ docPageFormAppearances: (docId, page, token) => `/v1/docs/${encodeURIComponent(docId)}/form/pages/${encodeURIComponent(require_format.encodePageKey(page))}/appearances@${encodeWidgetAppearancesRenderToken(token)}`,
869
+ /** Immutable layer twin of `docPageFormAppearances`. */
870
+ layerPageFormAppearances: (docId, layerName, page, token) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/pages/${encodeURIComponent(require_format.encodePageKey(page))}/appearances@${encodeWidgetAppearancesRenderToken(token)}`,
871
+ layerPageFormAppearancesCurrent: (docId, layerName, page) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/pages/${encodeURIComponent(require_format.encodePageKey(page))}/appearances`,
671
872
  /**
672
- * GET: the reconciled form snapshot (field tree + widget joins) for the
673
- * layer's CURRENT state. Forms are document-scoped (one AcroForm per
674
- * document), so there is no per-page collection and — unlike annotations —
675
- * no content-addressed `@version` variant: the snapshot is always served
676
- * `no-store`. Mutation results carry the per-page `cacheDelta` that keeps
677
- * annotation/render caches coherent when widget appearances change.
873
+ * PATCH: a widget's place and look (`doc.forms.updateWidget`). `key` is
874
+ * the widget's annotation key. Not under `form/pages/`, which the CDN
875
+ * signs for reads.
678
876
  */
679
- layerForm: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form`,
877
+ /** POST: the form's calculation order (`doc.forms.reorderCalculations`). */
878
+ layerFormCalculationsReorder: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/calculations/reorder`,
879
+ /** POST: the stacking order of a page's widgets (`doc.forms.reorderWidgets`). */
880
+ layerFormWidgetsReorder: (docId, layerName, page) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/widgets/${encodeURIComponent(require_format.encodePageKey(page))}/reorder`,
881
+ layerFormWidget: (docId, layerName, page, key) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/widgets/${encodeURIComponent(require_format.encodePageKey(page))}/${encodeURIComponent(key)}`,
680
882
  /** POST: create a field (optionally with styled widget placements). */
681
883
  layerFormFields: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/fields`,
682
884
  /**
@@ -687,9 +889,9 @@ const wirePaths = {
687
889
  layerFormFieldByKey: (docId, layerName, fieldKey) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/fields/${encodeURIComponent(fieldKey)}`,
688
890
  /** POST: replace the field's value (`{ value: FormFieldValue }`). */
689
891
  layerFormFieldValue: (docId, layerName, fieldKey) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/fields/${encodeURIComponent(fieldKey)}/value`,
690
- /** POST: reset the field to /DV (or clear). Empty body. */
691
- layerFormFieldReset: (docId, layerName, fieldKey) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/fields/${encodeURIComponent(fieldKey)}/reset`,
692
- /** POST: adopt an inert widget annotation (`{ widget, onState? }`). */
892
+ /** POST: reset fields to /DV (or clear): `{ refs? }`, the whole form without `refs`. */
893
+ layerFormReset: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/reset`,
894
+ /** POST: add a widget to the field, the body its placement (`WidgetPlacement`). */
693
895
  layerFormFieldWidgets: (docId, layerName, fieldKey) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/fields/${encodeURIComponent(fieldKey)}/widgets`,
694
896
  /**
695
897
  * POST: release a widget back to the inert annotation plane
@@ -698,18 +900,21 @@ const wirePaths = {
698
900
  * one codec instead of inventing a second composite key syntax.
699
901
  */
700
902
  layerFormFieldWidgetsDetach: (docId, layerName, fieldKey) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/fields/${encodeURIComponent(fieldKey)}/widgets/detach`,
701
- /**
702
- * GET: serialized form data (`?format=fdf|xfdf`, default `xfdf`).
703
- * POST: import an FDF/XFDF payload (raw bytes body; format sniffed
704
- * server-side unless `?format=` pins it).
705
- */
706
- layerFormData: (docId, layerName, format) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/data${format ? `?format=${format}` : ""}`,
903
+ /** Immutable base form export: a bundle as multipart, needing `doc.forms.read` and `doc.download`. */
904
+ docFormExport: (docId, token) => `/v1/docs/${encodeURIComponent(docId)}/form/export@${encodeFormExportToken(token)}`,
905
+ /** Immutable layer form export (twin of `docFormExport`). */
906
+ layerFormExport: (docId, layerName, token) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/export@${encodeFormExportToken(token)}`,
907
+ /** A layer form export whose selection a URL can't carry: a POST of the pins and the selection, not cached. */
908
+ layerFormExportRequest: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/export`,
909
+ /** A bundle's design, created in the layer as one change (`doc.forms.import`). */
910
+ layerFormImport: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/import`,
911
+ /** A bundle's values, written in the layer as one change (`doc.forms.importValues`). */
912
+ layerFormImportValues: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/import-values`,
707
913
  /** POST: durable reconciliation (`{ bakeAppearances? }`). */
708
914
  layerFormRepair: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/repair`,
709
- layerFormEffects: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/effects`,
710
915
  /**
711
916
  * GET: one budgeted search slice, versioned form. The token
712
- * (`encodeSearchToken`) IS the cache key: content epoch + query +
917
+ * (`encodeSearchToken`) is the cache key: content epoch + query +
713
918
  * position. Immutable; CDN may cache forever. Mode is the path — rects
714
919
  * and full are separate resources so permission tiers never share
715
920
  * cache entries (`'rects'` needs `doc.text.search`; `'full'` also
@@ -719,17 +924,17 @@ const wirePaths = {
719
924
  layerSearchFull: (docId, layerName, token) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/search/full/data@${token}`,
720
925
  /**
721
926
  * GET: unversioned form — same fields as flat query params (`q` as
722
- * plain text), served from the CURRENT content, always `no-store`.
927
+ * plain text), served from the current content, always `no-store`.
723
928
  * The debug/simple-client variant; the SDK uses the versioned form.
724
929
  */
725
930
  layerSearchRectsCurrent: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/search/rects/data`,
726
931
  layerSearchFullCurrent: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/search/full/data`,
727
- layerPageViewports: (docId, layerName, pon) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/pages/${pon}/viewports`,
728
- layerPageScale: (docId, layerName, pon) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/pages/${pon}/scale`,
729
- layerPagesMove: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/pages/move`,
932
+ layerPageViewports: (docId, layerName, page) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/pages/${encodeURIComponent(require_format.encodePageKey(page))}/viewports`,
933
+ layerPageScale: (docId, layerName, page) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/pages/${encodeURIComponent(require_format.encodePageKey(page))}/scale`,
934
+ layerPagesReorder: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/pages/reorder`,
730
935
  layerPagesRotate: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/pages/rotate`,
731
936
  layerPagesDelete: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/pages/delete`,
732
- /** POST: register/rename a `/Names /Pages` entry — a page-STRUCTURE
937
+ /** POST: register/rename a `/Names /Pages` entry — a page-structure
733
938
  * mutation (docVersion + layoutVersion advance; reads ride `/layout`). */
734
939
  layerPagesNames: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/pages/names`,
735
940
  /** POST: remove a `/Names /Pages` entry (the page stays). */
@@ -737,14 +942,14 @@ const wirePaths = {
737
942
  layerPagesFlatten: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/pages/flatten`,
738
943
  /**
739
944
  * POST (multipart mutation envelope): copy every page of the `source`
740
- * resource part (a standalone PDF) in at the body's `destIndex`.
945
+ * resource part (a standalone PDF) in at the body's `toIndex`.
741
946
  */
742
947
  layerPagesInsert: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/pages/insert`,
743
948
  /** POST (plain JSON): create blank pages — pages.insert minus the bytes. */
744
949
  layerPagesInsertBlank: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/pages/insert-blank`,
745
950
  /**
746
951
  * POST (plain JSON → `application/pdf` bytes): export the listed pages,
747
- * in caller order, as a standalone PDF. A READ over the current layer
952
+ * in caller order, as a standalone PDF. A read over the current layer
748
953
  * state (gated like /download), so it is a POST only for its body —
749
954
  * nothing mutates and no event is published.
750
955
  */
@@ -754,15 +959,6 @@ const wirePaths = {
754
959
  layerDownload: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/download`,
755
960
  layerDownloadVersioned: (docId, layerName, token) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/download@${encodeDownloadToken(token)}`,
756
961
  /**
757
- * Weak-annotation-sessions: pluralized in v2 so the collection
758
- * lives at `/weak-annotation-sessions` and members at
759
- * `/weak-annotation-sessions/{sessionId}` — REST-conventional.
760
- */
761
- layerWeakAnnotationSession: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/weak-annotation-sessions`,
762
- layerWeakAnnotationSessionHeartbeat: (docId, layerName, sessionId) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/weak-annotation-sessions/${encodeURIComponent(sessionId)}/heartbeat`,
763
- layerWeakAnnotationSessionPages: (docId, layerName, sessionId) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/weak-annotation-sessions/${encodeURIComponent(sessionId)}/pages`,
764
- layerWeakAnnotationSessionRelease: (docId, layerName, sessionId) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/weak-annotation-sessions/${encodeURIComponent(sessionId)}`,
765
- /**
766
962
  * POST: pre-warm the doc cache + worker open before any user
767
963
  * request lands. Body is `{ docId }`. Doc-scoped token required.
768
964
  */
@@ -781,22 +977,30 @@ function analysisQueryString(query) {
781
977
  const wireTemplates = {
782
978
  docHead: "/v1/docs/:docId/head",
783
979
  layerManifest: "/v1/docs/:docId/layers/:layerName/manifest",
980
+ layerChanges: "/v1/docs/:docId/layers/:layerName/changes",
784
981
  layerMetadata: "/v1/docs/:docId/layers/:layerName/metadata",
785
- layerRenderPage: "/v1/docs/:docId/layers/:layerName/render/pages/:pon/data",
786
- layerTextPage: "/v1/docs/:docId/layers/:layerName/text/pages/:pon/data",
982
+ layerCustomMetadata: "/v1/docs/:docId/layers/:layerName/metadata/custom",
983
+ layerRenderPage: "/v1/docs/:docId/layers/:layerName/render/pages/:pageKey/data",
984
+ layerTextPage: "/v1/docs/:docId/layers/:layerName/text/pages/:pageKey/data",
787
985
  layerAnnotationItemsAll: "/v1/docs/:docId/layers/:layerName/annotations/items",
788
- layerAnnotationItems: "/v1/docs/:docId/layers/:layerName/annotations/pages/:pon/items",
789
- layerAnnotationItem: "/v1/docs/:docId/layers/:layerName/annotations/pages/:pon/items/:annotKey",
790
- layerAnnotationItemsFlatten: "/v1/docs/:docId/layers/:layerName/annotations/pages/:pon/items/flatten",
791
- layerAnnotationItemsAppearance: "/v1/docs/:docId/layers/:layerName/annotations/pages/:pon/items/appearance",
986
+ layerAnnotationItems: "/v1/docs/:docId/layers/:layerName/annotations/pages/:pageKey/items",
987
+ layerAnnotationItem: "/v1/docs/:docId/layers/:layerName/annotations/pages/:pageKey/items/:annotKey",
988
+ layerAnnotationItemsReorder: "/v1/docs/:docId/layers/:layerName/annotations/pages/:pageKey/items/reorder",
989
+ layerAnnotationItemsFlatten: "/v1/docs/:docId/layers/:layerName/annotations/pages/:pageKey/items/flatten",
990
+ layerAnnotationItemsAppearance: "/v1/docs/:docId/layers/:layerName/annotations/pages/:pageKey/items/appearance",
991
+ layerAnnotationItemAppearanceResource: "/v1/docs/:docId/layers/:layerName/annotations/pages/:pageKey/items/:annotKey/resources/appearance",
792
992
  layerForm: "/v1/docs/:docId/layers/:layerName/form",
993
+ layerFormWidget: "/v1/docs/:docId/layers/:layerName/form/widgets/:pageKey/:annotKey",
994
+ layerFormWidgetsReorder: "/v1/docs/:docId/layers/:layerName/form/widgets/:pageKey/reorder",
995
+ layerFormCalculationsReorder: "/v1/docs/:docId/layers/:layerName/form/calculations/reorder",
793
996
  layerFormFieldValue: "/v1/docs/:docId/layers/:layerName/form/fields/:fieldKey/value",
794
- layerFormFieldReset: "/v1/docs/:docId/layers/:layerName/form/fields/:fieldKey/reset",
997
+ layerFormReset: "/v1/docs/:docId/layers/:layerName/form/reset",
795
998
  layerFormFieldSignatureAppearance: "/v1/docs/:docId/layers/:layerName/form/fields/:fieldKey/signature-appearance",
796
- layerFormData: "/v1/docs/:docId/layers/:layerName/form/data",
797
- layerPageViewports: "/v1/docs/:docId/layers/:layerName/pages/:pon/viewports",
798
- layerPageScale: "/v1/docs/:docId/layers/:layerName/pages/:pon/scale",
799
- layerPagesMove: "/v1/docs/:docId/layers/:layerName/pages/move",
999
+ layerFormImport: "/v1/docs/:docId/layers/:layerName/form/import",
1000
+ layerFormImportValues: "/v1/docs/:docId/layers/:layerName/form/import-values",
1001
+ layerPageViewports: "/v1/docs/:docId/layers/:layerName/pages/:pageKey/viewports",
1002
+ layerPageScale: "/v1/docs/:docId/layers/:layerName/pages/:pageKey/scale",
1003
+ layerPagesReorder: "/v1/docs/:docId/layers/:layerName/pages/reorder",
800
1004
  layerPagesRotate: "/v1/docs/:docId/layers/:layerName/pages/rotate",
801
1005
  layerPagesDelete: "/v1/docs/:docId/layers/:layerName/pages/delete",
802
1006
  layerPagesNames: "/v1/docs/:docId/layers/:layerName/pages/names",
@@ -811,7 +1015,7 @@ const wireTemplates = {
811
1015
  layerSignaturesAnalysis: "/v1/docs/:docId/layers/:layerName/signatures/analysis",
812
1016
  layerSignaturesPrepare: "/v1/docs/:docId/layers/:layerName/signatures/prepare",
813
1017
  layerSignatureComplete: "/v1/docs/:docId/layers/:layerName/signatures/:signingId/complete",
814
- layerSignatureAbort: "/v1/docs/:docId/layers/:layerName/signatures/:signingId",
1018
+ layerSignatureCancel: "/v1/docs/:docId/layers/:layerName/signatures/:signingId",
815
1019
  docVersions: "/v1/docs/:docId/versions",
816
1020
  docVersionSignatures: "/v1/docs/:docId/versions/signatures/:sha",
817
1021
  docVersionSignatureContents: "/v1/docs/:docId/versions/signatures/:sha/:fieldKey/contents",
@@ -822,8 +1026,45 @@ const wireTemplates = {
822
1026
  };
823
1027
  //#endregion
824
1028
  //#region src/wire/resources.ts
1029
+ /** A page picture of one family, at the document's shared path. */
1030
+ function pageRenderResource(family) {
1031
+ const { resource, path, needs } = require_schemas.PAGE_RENDER_FAMILIES[family];
1032
+ return {
1033
+ id: resource,
1034
+ pathPattern: `/v1/docs/{docId}/${path}/*/data@*`,
1035
+ resolvePathPattern: (docId) => `/v1/docs/${docId}/${path}/*/data@*`,
1036
+ pathPrefix: `/v1/docs/{docId}/${path}/`,
1037
+ resolvePathPrefix: (docId) => `/v1/docs/${docId}/${path}/`,
1038
+ requirement: requirementOf(needs),
1039
+ routeKind: "versioned-read",
1040
+ cdnCacheable: true
1041
+ };
1042
+ }
1043
+ /** A page picture of one family, at a layer's path. */
1044
+ function layerPageRenderResource(family) {
1045
+ const { layerResource, path, needs } = require_schemas.PAGE_RENDER_FAMILIES[family];
1046
+ return {
1047
+ id: layerResource,
1048
+ pathPattern: `/v1/docs/{docId}/layers/{layerName}/${path}/*/data@*`,
1049
+ resolvePathPattern: (docId, layerName = "default") => `/v1/docs/${docId}/layers/${layerName}/${path}/*/data@*`,
1050
+ pathPrefix: `/v1/docs/{docId}/layers/{layerName}/${path}/`,
1051
+ resolvePathPrefix: (docId, layerName = "default") => `/v1/docs/${docId}/layers/${layerName}/${path}/`,
1052
+ requirement: requirementOf(needs),
1053
+ routeKind: "versioned-read",
1054
+ cdnCacheable: true
1055
+ };
1056
+ }
1057
+ function requirementOf(needs) {
1058
+ return needs.length === 1 ? {
1059
+ kind: "single",
1060
+ capability: needs[0]
1061
+ } : {
1062
+ kind: "all",
1063
+ capabilities: needs
1064
+ };
1065
+ }
825
1066
  /**
826
- * URL layout (paths v2): each resource type lives at a distinct path
1067
+ * URL layout: each resource type lives at a distinct path
827
1068
  * prefix so prefix-matching CDNs (Bunny, Cloud CDN, Azure FD) can
828
1069
  * enforce per-resource scope at the edge. See wire/paths.ts for the
829
1070
  * full shape and rationale.
@@ -868,32 +1109,10 @@ const DOC_RESOURCES = {
868
1109
  routeKind: "versioned-read",
869
1110
  cdnCacheable: true
870
1111
  },
871
- "page-render": {
872
- id: "page-render",
873
- pathPattern: "/v1/docs/{docId}/render/pages/*/data@*",
874
- resolvePathPattern: (docId) => `/v1/docs/${docId}/render/pages/*/data@*`,
875
- pathPrefix: "/v1/docs/{docId}/render/pages/",
876
- resolvePathPrefix: (docId) => `/v1/docs/${docId}/render/pages/`,
877
- requirement: {
878
- kind: "single",
879
- capability: "doc.render"
880
- },
881
- routeKind: "versioned-read",
882
- cdnCacheable: true
883
- },
884
- "page-render-annotated": {
885
- id: "page-render-annotated",
886
- pathPattern: "/v1/docs/{docId}/render/annotated/pages/*/data@*",
887
- resolvePathPattern: (docId) => `/v1/docs/${docId}/render/annotated/pages/*/data@*`,
888
- pathPrefix: "/v1/docs/{docId}/render/annotated/pages/",
889
- resolvePathPrefix: (docId) => `/v1/docs/${docId}/render/annotated/pages/`,
890
- requirement: {
891
- kind: "single",
892
- capability: "doc.render"
893
- },
894
- routeKind: "versioned-read",
895
- cdnCacheable: true
896
- },
1112
+ "page-render": pageRenderResource("pages"),
1113
+ "page-render-annotations": pageRenderResource("annotations"),
1114
+ "page-render-fields": pageRenderResource("fields"),
1115
+ "page-render-all": pageRenderResource("all"),
897
1116
  "page-annotations": {
898
1117
  id: "page-annotations",
899
1118
  pathPattern: "/v1/docs/{docId}/annotations/pages/*/items@*",
@@ -920,6 +1139,58 @@ const DOC_RESOURCES = {
920
1139
  routeKind: "versioned-read",
921
1140
  cdnCacheable: true
922
1141
  },
1142
+ "annotations-export": {
1143
+ id: "annotations-export",
1144
+ pathPattern: "/v1/docs/{docId}/annotations/export@*",
1145
+ resolvePathPattern: (docId) => `/v1/docs/${docId}/annotations/export@*`,
1146
+ pathPrefix: "/v1/docs/{docId}/annotations/export@",
1147
+ resolvePathPrefix: (docId) => `/v1/docs/${docId}/annotations/export@`,
1148
+ requirement: {
1149
+ kind: "all",
1150
+ capabilities: ["doc.annotate.read", "doc.download"]
1151
+ },
1152
+ routeKind: "versioned-read",
1153
+ cdnCacheable: true
1154
+ },
1155
+ "form-export": {
1156
+ id: "form-export",
1157
+ pathPattern: "/v1/docs/{docId}/form/export@*",
1158
+ resolvePathPattern: (docId) => `/v1/docs/${docId}/form/export@*`,
1159
+ pathPrefix: "/v1/docs/{docId}/form/export@",
1160
+ resolvePathPrefix: (docId) => `/v1/docs/${docId}/form/export@`,
1161
+ requirement: {
1162
+ kind: "all",
1163
+ capabilities: ["doc.forms.read", "doc.download"]
1164
+ },
1165
+ routeKind: "versioned-read",
1166
+ cdnCacheable: true
1167
+ },
1168
+ form: {
1169
+ id: "form",
1170
+ pathPattern: "/v1/docs/{docId}/form@*",
1171
+ resolvePathPattern: (docId) => `/v1/docs/${docId}/form@*`,
1172
+ pathPrefix: "/v1/docs/{docId}/form@",
1173
+ resolvePathPrefix: (docId) => `/v1/docs/${docId}/form@`,
1174
+ requirement: {
1175
+ kind: "single",
1176
+ capability: "doc.forms.read"
1177
+ },
1178
+ routeKind: "versioned-read",
1179
+ cdnCacheable: true
1180
+ },
1181
+ "page-form": {
1182
+ id: "page-form",
1183
+ pathPattern: "/v1/docs/{docId}/form/pages/*/appearances@*",
1184
+ resolvePathPattern: (docId) => `/v1/docs/${docId}/form/pages/*/appearances@*`,
1185
+ pathPrefix: "/v1/docs/{docId}/form/pages/",
1186
+ resolvePathPrefix: (docId) => `/v1/docs/${docId}/form/pages/`,
1187
+ requirement: {
1188
+ kind: "single",
1189
+ capability: "doc.forms.read"
1190
+ },
1191
+ routeKind: "versioned-read",
1192
+ cdnCacheable: true
1193
+ },
923
1194
  layout: {
924
1195
  id: "layout",
925
1196
  pathPattern: "/v1/docs/{docId}/layout@*",
@@ -946,6 +1217,19 @@ const DOC_RESOURCES = {
946
1217
  routeKind: "versioned-read",
947
1218
  cdnCacheable: true
948
1219
  },
1220
+ "metadata-custom": {
1221
+ id: "metadata-custom",
1222
+ pathPattern: "/v1/docs/{docId}/metadata/custom@*",
1223
+ resolvePathPattern: (docId) => `/v1/docs/${docId}/metadata/custom@*`,
1224
+ pathPrefix: "/v1/docs/{docId}/metadata/custom@",
1225
+ resolvePathPrefix: (docId) => `/v1/docs/${docId}/metadata/custom@`,
1226
+ requirement: {
1227
+ kind: "single",
1228
+ capability: "doc.open"
1229
+ },
1230
+ routeKind: "versioned-read",
1231
+ cdnCacheable: true
1232
+ },
949
1233
  actions: {
950
1234
  id: "actions",
951
1235
  pathPattern: "/v1/docs/{docId}/actions@*",
@@ -985,6 +1269,19 @@ const DOC_RESOURCES = {
985
1269
  routeKind: "versioned-read",
986
1270
  cdnCacheable: true
987
1271
  },
1272
+ "layer-metadata-custom": {
1273
+ id: "layer-metadata-custom",
1274
+ pathPattern: "/v1/docs/{docId}/layers/{layerName}/metadata/custom@*",
1275
+ resolvePathPattern: (docId, layerName = "default") => `/v1/docs/${docId}/layers/${layerName}/metadata/custom@*`,
1276
+ pathPrefix: "/v1/docs/{docId}/layers/{layerName}/metadata/custom@",
1277
+ resolvePathPrefix: (docId, layerName = "default") => `/v1/docs/${docId}/layers/${layerName}/metadata/custom@`,
1278
+ requirement: {
1279
+ kind: "single",
1280
+ capability: "doc.open"
1281
+ },
1282
+ routeKind: "versioned-read",
1283
+ cdnCacheable: true
1284
+ },
988
1285
  "layer-actions": {
989
1286
  id: "layer-actions",
990
1287
  pathPattern: "/v1/docs/{docId}/layers/{layerName}/actions@*",
@@ -1050,32 +1347,10 @@ const DOC_RESOURCES = {
1050
1347
  routeKind: "versioned-read",
1051
1348
  cdnCacheable: true
1052
1349
  },
1053
- "layer-page-render": {
1054
- id: "layer-page-render",
1055
- pathPattern: "/v1/docs/{docId}/layers/{layerName}/render/pages/*/data@*",
1056
- resolvePathPattern: (docId, layerName = "default") => `/v1/docs/${docId}/layers/${layerName}/render/pages/*/data@*`,
1057
- pathPrefix: "/v1/docs/{docId}/layers/{layerName}/render/pages/",
1058
- resolvePathPrefix: (docId, layerName = "default") => `/v1/docs/${docId}/layers/${layerName}/render/pages/`,
1059
- requirement: {
1060
- kind: "single",
1061
- capability: "doc.render"
1062
- },
1063
- routeKind: "versioned-read",
1064
- cdnCacheable: true
1065
- },
1066
- "layer-page-render-annotated": {
1067
- id: "layer-page-render-annotated",
1068
- pathPattern: "/v1/docs/{docId}/layers/{layerName}/render/annotated/pages/*/data@*",
1069
- resolvePathPattern: (docId, layerName = "default") => `/v1/docs/${docId}/layers/${layerName}/render/annotated/pages/*/data@*`,
1070
- pathPrefix: "/v1/docs/{docId}/layers/{layerName}/render/annotated/pages/",
1071
- resolvePathPrefix: (docId, layerName = "default") => `/v1/docs/${docId}/layers/${layerName}/render/annotated/pages/`,
1072
- requirement: {
1073
- kind: "single",
1074
- capability: "doc.render"
1075
- },
1076
- routeKind: "versioned-read",
1077
- cdnCacheable: true
1078
- },
1350
+ "layer-page-render": layerPageRenderResource("pages"),
1351
+ "layer-page-render-annotations": layerPageRenderResource("annotations"),
1352
+ "layer-page-render-fields": layerPageRenderResource("fields"),
1353
+ "layer-page-render-all": layerPageRenderResource("all"),
1079
1354
  "page-text": {
1080
1355
  id: "page-text",
1081
1356
  pathPattern: "/v1/docs/{docId}/text/pages/*/data@*",
@@ -1167,6 +1442,19 @@ const DOC_RESOURCES = {
1167
1442
  routeKind: "versioned-read",
1168
1443
  cdnCacheable: true
1169
1444
  },
1445
+ "layer-annotations-export": {
1446
+ id: "layer-annotations-export",
1447
+ pathPattern: "/v1/docs/{docId}/layers/{layerName}/annotations/export@*",
1448
+ resolvePathPattern: (docId, layerName = "default") => `/v1/docs/${docId}/layers/${layerName}/annotations/export@*`,
1449
+ pathPrefix: "/v1/docs/{docId}/layers/{layerName}/annotations/export@",
1450
+ resolvePathPrefix: (docId, layerName = "default") => `/v1/docs/${docId}/layers/${layerName}/annotations/export@`,
1451
+ requirement: {
1452
+ kind: "all",
1453
+ capabilities: ["doc.annotate.read", "doc.download"]
1454
+ },
1455
+ routeKind: "versioned-read",
1456
+ cdnCacheable: true
1457
+ },
1170
1458
  "layer-annotations-all": {
1171
1459
  id: "layer-annotations-all",
1172
1460
  pathPattern: "/v1/docs/{docId}/layers/{layerName}/annotations/items@*",
@@ -1180,6 +1468,45 @@ const DOC_RESOURCES = {
1180
1468
  routeKind: "versioned-read",
1181
1469
  cdnCacheable: true
1182
1470
  },
1471
+ "layer-form-export": {
1472
+ id: "layer-form-export",
1473
+ pathPattern: "/v1/docs/{docId}/layers/{layerName}/form/export@*",
1474
+ resolvePathPattern: (docId, layerName = "default") => `/v1/docs/${docId}/layers/${layerName}/form/export@*`,
1475
+ pathPrefix: "/v1/docs/{docId}/layers/{layerName}/form/export@",
1476
+ resolvePathPrefix: (docId, layerName = "default") => `/v1/docs/${docId}/layers/${layerName}/form/export@`,
1477
+ requirement: {
1478
+ kind: "all",
1479
+ capabilities: ["doc.forms.read", "doc.download"]
1480
+ },
1481
+ routeKind: "versioned-read",
1482
+ cdnCacheable: true
1483
+ },
1484
+ "layer-form": {
1485
+ id: "layer-form",
1486
+ pathPattern: "/v1/docs/{docId}/layers/{layerName}/form@*",
1487
+ resolvePathPattern: (docId, layerName = "default") => `/v1/docs/${docId}/layers/${layerName}/form@*`,
1488
+ pathPrefix: "/v1/docs/{docId}/layers/{layerName}/form@",
1489
+ resolvePathPrefix: (docId, layerName = "default") => `/v1/docs/${docId}/layers/${layerName}/form@`,
1490
+ requirement: {
1491
+ kind: "single",
1492
+ capability: "doc.forms.read"
1493
+ },
1494
+ routeKind: "versioned-read",
1495
+ cdnCacheable: true
1496
+ },
1497
+ "layer-page-form": {
1498
+ id: "layer-page-form",
1499
+ pathPattern: "/v1/docs/{docId}/layers/{layerName}/form/pages/*/appearances@*",
1500
+ resolvePathPattern: (docId, layerName = "default") => `/v1/docs/${docId}/layers/${layerName}/form/pages/*/appearances@*`,
1501
+ pathPrefix: "/v1/docs/{docId}/layers/{layerName}/form/pages/",
1502
+ resolvePathPrefix: (docId, layerName = "default") => `/v1/docs/${docId}/layers/${layerName}/form/pages/`,
1503
+ requirement: {
1504
+ kind: "single",
1505
+ capability: "doc.forms.read"
1506
+ },
1507
+ routeKind: "versioned-read",
1508
+ cdnCacheable: true
1509
+ },
1183
1510
  "download-current": {
1184
1511
  id: "download-current",
1185
1512
  pathPattern: "/v1/docs/{docId}/layers/{layerName}/download",
@@ -1326,15 +1653,14 @@ function checkResourceAccess(resourceId, rawScope, pdfBits) {
1326
1653
  * `requirement` at the origin route, but the CDN never gets a
1327
1654
  * credential for them.
1328
1655
  *
1329
- * The URL restructure (paths v2) guarantees each cacheable resource
1330
- * type has a distinct prefix, so prefix-matching adapters get
1331
- * per-resource scope enforcement at the edge — a Bunny token signed
1332
- * at `/v1/docs/{id}/render/pages/` can only authorize render bytes,
1333
- * never text or annotations.
1656
+ * The URL layout gives each cacheable resource type a distinct prefix,
1657
+ * so prefix-matching adapters get per-resource scope enforcement at the
1658
+ * edge — a Bunny token signed at `/v1/docs/{id}/render/pages/` can only
1659
+ * authorize render bytes, never text or annotations.
1334
1660
  */
1335
1661
  /**
1336
- * Plane map: the planes each DOC-LEVEL shared resource depends on. A
1337
- * layer token's edge credential covers a resource's prefix iff EVERY listed
1662
+ * Plane map: the planes each doc-level shared resource depends on. A
1663
+ * layer token's edge credential covers a resource's prefix iff every listed
1338
1664
  * plane is inherited (`'base'`) in the caller's scopes — the same condition
1339
1665
  * the origin guard enforces (origin is the truth; this grant is the
1340
1666
  * TTL-bounded optimization). Resources absent from this map (head, manifest,
@@ -1349,14 +1675,20 @@ function checkResourceAccess(resourceId, rawScope, pdfBits) {
1349
1675
  * as every edge grant.
1350
1676
  */
1351
1677
  const RESOURCE_PLANES = {
1352
- "page-render": ["content"],
1678
+ "page-render": require_schemas.PAGE_RENDER_FAMILIES.pages.planes,
1679
+ "page-render-annotations": require_schemas.PAGE_RENDER_FAMILIES.annotations.planes,
1680
+ "page-render-fields": require_schemas.PAGE_RENDER_FAMILIES.fields.planes,
1681
+ "page-render-all": require_schemas.PAGE_RENDER_FAMILIES.all.planes,
1353
1682
  "page-text": ["content"],
1354
1683
  "page-geometry": ["content"],
1355
- "page-render-annotated": ["content", "annotations"],
1356
1684
  "page-annotations": ["annotations"],
1357
1685
  "annotations-all": ["annotations"],
1686
+ form: ["forms"],
1687
+ "page-form": ["forms"],
1688
+ "annotations-export": ["annotations", "layout"],
1358
1689
  layout: ["layout"],
1359
1690
  metadata: ["metadata"],
1691
+ "metadata-custom": ["metadata"],
1360
1692
  actions: ["actions"],
1361
1693
  attachments: ["attachments"],
1362
1694
  "attachment-files": ["attachments"]
@@ -1386,11 +1718,11 @@ function cdnCoverageForScope(rawScope, pdfBits, context) {
1386
1718
  * effects to attach. Used by both:
1387
1719
  * - the @cloudpdf/engine HttpClient (to actually route requests through
1388
1720
  * the CDN edge when an /access response says it can)
1389
- * - the smoke/diagnostic inspector (to PREVIEW what the SDK would do
1721
+ * - the smoke/diagnostic inspector (to preview what the SDK would do
1390
1722
  * for a given path, with no network)
1391
1723
  *
1392
1724
  * Keeping this in engine-core means cloud-side request routing and
1393
- * server-side test fixtures use the SAME algorithm. If a regression
1725
+ * server-side test fixtures use the same algorithm. If a regression
1394
1726
  * sneaks in, both ends break together.
1395
1727
  *
1396
1728
  * Selection rules
@@ -1404,7 +1736,7 @@ function cdnCoverageForScope(rawScope, pdfBits, context) {
1404
1736
  * origin — that's how scope narrowing works at the edge: the
1405
1737
  * server only emits overrides for resources the caller's scope
1406
1738
  * grants.
1407
- * 3. Find the LONGEST-matching `signedPathPolicies` entry (its
1739
+ * 3. Find the longest-matching `signedPathPolicies` entry (its
1408
1740
  * `pathPrefix` is a prefix of the request path). Append its
1409
1741
  * `queryParams`. No match falls back to `signedQueryParams` if
1410
1742
  * the adapter emitted a global token.
@@ -1465,8 +1797,8 @@ function applyCdnAccess(input) {
1465
1797
  * is a (longest) prefix of `path`. Returns null when no resource
1466
1798
  * matches — admin routes, /access, /warm fall into this bucket.
1467
1799
  *
1468
- * Each cacheable resource has a DISTINCT prefix (paths v2 invariant),
1469
- * so longest-match is deterministic.
1800
+ * Each cacheable resource has a distinct prefix, so longest-match is
1801
+ * deterministic.
1470
1802
  */
1471
1803
  function resolveResourceIdForPath(path, docId, layerName) {
1472
1804
  let best = null;
@@ -1548,33 +1880,22 @@ function unflatten(flat) {
1548
1880
  /**
1549
1881
  * Project image render options plus cache versions into the flat wire shape
1550
1882
  * the render token encoder consumes. The output is a generic dotted-key map
1551
- * (`viewport.kind`, `target.rect.left`, …) — the schema and codec never need
1883
+ * (`viewport.kind`, `target.rect.x`, …) — the schema and codec never need
1552
1884
  * to know about specific option fields. Adding a new render option means
1553
1885
  * extending `PageImageOptions`, the render query schemas, and
1554
1886
  * `RenderTokenSchema.fields`; this function does not change.
1555
1887
  *
1556
- * Token/path rule: tokens carry VERSION PINS and RENDER
1557
- * PARAMETERS; anything that changes the artifact's plane-dependency set is
1558
- * PATH-expressed. Annotatedness changes the planes (`content` vs
1559
- * `content + annotations`), so the wire map never carries
1560
- * `includeAnnotations` — the caller picks the path FAMILY
1561
- * (`…/render/pages/` vs `…/render/annotated/pages/`) and passes
1562
- * `annotationVersion` iff it chose the annotated one. Contradictory states
1563
- * are unrepresentable; each family's query schema enforces its own pin
1564
- * grammar structurally.
1565
- *
1566
- * Semantic validation (viewport-kind invariants, per-family pin presence,
1567
- * rect coherence) lives in `PageRenderQuerySchema` /
1568
- * `PageRenderAnnotatedQuerySchema` and runs when the resulting URL is
1569
- * decoded server-side. Round-tripping (flatten → encode → decode →
1570
- * unflatten → schema parse) recovers the original SDK options.
1888
+ * What the picture draws is never in the token: the caller picks the
1889
+ * family's path (`PAGE_RENDER_FAMILIES`) and passes that family's pins.
1890
+ * Each family's query schema checks its own pins when the URL is decoded
1891
+ * server-side. Round-tripping (flatten → encode → decode → unflatten →
1892
+ * schema parse) recovers the original SDK options.
1571
1893
  */
1572
1894
  function renderImageOptionsToWire(options, versions) {
1573
- const { includeAnnotations: _pathExpressed, ...wireOptions } = options;
1895
+ const { includeAnnotations: _inThePath, includeFormFields: _alsoInThePath, ...wireOptions } = options;
1574
1896
  return flatten({
1575
1897
  ...wireOptions,
1576
- contentVersion: versions.contentVersion,
1577
- ...versions.annotationVersion !== void 0 ? { annotationVersion: versions.annotationVersion } : {}
1898
+ ...versions
1578
1899
  });
1579
1900
  }
1580
1901
  /**
@@ -1585,17 +1906,18 @@ function renderImageOptionsToToken(options, versions) {
1585
1906
  return encodeRenderToken(renderImageOptionsToWire(options, versions));
1586
1907
  }
1587
1908
  /**
1588
- * Re-attach `includeAnnotations` onto the worker-side `PageRenderOptions`
1589
- * shape. Pure shape transform; consumed by the server route after
1590
- * `PageRenderQuerySchema` has produced the SDK-shaped options.
1909
+ * The worker-side `PageRenderOptions` of a parsed picture request: the
1910
+ * render options, and what its family draws (stamped by the family's query
1911
+ * schema). Pure shape transform; image encoding stays out.
1591
1912
  */
1592
- function pageRenderOptionsFromImageOptions(options, includeAnnotations) {
1913
+ function pageRenderOptionsFromImageOptions(options) {
1593
1914
  return {
1594
1915
  ...options.target ? { target: options.target } : {},
1595
1916
  ...options.viewport ? { viewport: options.viewport } : {},
1596
1917
  ...options.rotation !== void 0 ? { rotation: options.rotation } : {},
1597
1918
  ...options.background !== void 0 ? { background: options.background } : {},
1598
- includeAnnotations
1919
+ includeAnnotations: options.includeAnnotations ?? false,
1920
+ includeFormFields: options.includeFormFields ?? false
1599
1921
  };
1600
1922
  }
1601
1923
  /**
@@ -1604,15 +1926,33 @@ function pageRenderOptionsFromImageOptions(options, includeAnnotations) {
1604
1926
  * Mirrors {@link renderImageOptionsToWire}.
1605
1927
  */
1606
1928
  function annotationAppearancesImageOptionsToWire(options, versions) {
1607
- return flatten({
1608
- ...options,
1609
- annotationVersion: versions.annotationVersion
1610
- });
1929
+ return appearancesToWire(options, { annotationVersion: versions.annotationVersion });
1611
1930
  }
1612
1931
  /** Convenience: build the full encoded appearance render token in one call. */
1613
1932
  function annotationAppearancesImageOptionsToToken(options, versions) {
1614
1933
  return encodeAnnotationAppearancesRenderToken(annotationAppearancesImageOptionsToWire(options, versions));
1615
1934
  }
1935
+ /** The widget twin of {@link annotationAppearancesImageOptionsToWire}. */
1936
+ function widgetAppearancesImageOptionsToWire(options, versions) {
1937
+ return appearancesToWire(options, { widgetVersion: versions.widgetVersion });
1938
+ }
1939
+ /** The widget twin of {@link annotationAppearancesImageOptionsToToken}. */
1940
+ function widgetAppearancesImageOptionsToToken(options, versions) {
1941
+ return encodeWidgetAppearancesRenderToken(widgetAppearancesImageOptionsToWire(options, versions));
1942
+ }
1943
+ /**
1944
+ * Appearance options and a pin, flat. `modes` only when it asks for fewer
1945
+ * than every mode, as one value, so every request for all of them is one URL.
1946
+ */
1947
+ function appearancesToWire(options, pin) {
1948
+ const { modes, ...rest } = options;
1949
+ const asked = require_charmap.appearanceModesOf(modes);
1950
+ return flatten({
1951
+ ...rest,
1952
+ ...asked ? { modes: encodeAppearanceModes(asked) } : {},
1953
+ ...pin
1954
+ });
1955
+ }
1616
1956
  /**
1617
1957
  * Strip image-encoding fields, leaving the worker-side
1618
1958
  * `AnnotationAppearanceRenderOptions`. Pure shape transform consumed by the
@@ -1621,67 +1961,326 @@ function annotationAppearancesImageOptionsToToken(options, versions) {
1621
1961
  */
1622
1962
  function annotationRenderOptionsFromImageOptions(options) {
1623
1963
  return {
1624
- ...options.scale !== void 0 ? { scale: options.scale } : {},
1964
+ ...options.viewport ? { viewport: options.viewport } : {},
1625
1965
  ...options.rotation !== void 0 ? { rotation: options.rotation } : {},
1626
1966
  ...options.modes ? { modes: options.modes } : {}
1627
1967
  };
1628
1968
  }
1629
1969
  //#endregion
1630
- exports.ANNOTATION_KINDS = require_schemas.ANNOTATION_KINDS;
1970
+ //#region src/wire/changeSchemas.ts
1971
+ /**
1972
+ * `POST /v1/docs/{docId}/layers/{layerName}/changes`: a request's changes and
1973
+ * their answers. A change's bytes (a stamp's drawing, an attached file, a
1974
+ * signature's artwork) travel as multipart parts beside the JSON
1975
+ * (`resource:{key}`), which names them by key where the change takes them.
1976
+ */
1977
+ /** An op's id for its change: 1 to 255 visible ASCII characters, as `opId` always is. */
1978
+ const OpIdSchema = zod.z.string().regex(/^[\x21-\x7e]{1,255}$/);
1979
+ const FormFieldDisplaySchema = zod.z.enum([
1980
+ "visible",
1981
+ "hidden",
1982
+ "noPrint",
1983
+ "noView"
1984
+ ]);
1985
+ /** One op of a change, as the request sends it. */
1986
+ const ChangeOpWireSchema = zod.z.discriminatedUnion("type", [
1987
+ zod.z.object({
1988
+ type: zod.z.literal("annotations.create"),
1989
+ page: require_schema.PageRefSchema,
1990
+ data: require_schema.AnnotationDraftSchema,
1991
+ objectNumber: zod.z.number().int().positive().optional(),
1992
+ resources: require_schema.AnnotationResourceKeysSchema.optional()
1993
+ }),
1994
+ zod.z.object({
1995
+ type: zod.z.literal("annotations.update"),
1996
+ ref: require_schema.AnnotationRefSchema,
1997
+ patch: require_schema.AnnotationPatchSchema,
1998
+ resources: require_schema.AnnotationResourceKeysSchema.optional(),
1999
+ expect: require_schema.AnnotationPatchSchema.optional()
2000
+ }),
2001
+ zod.z.object({
2002
+ type: zod.z.literal("annotations.delete"),
2003
+ ref: require_schema.AnnotationRefSchema,
2004
+ expect: require_schema.AnnotationPatchSchema.optional()
2005
+ }),
2006
+ zod.z.object({
2007
+ type: zod.z.literal("annotations.reorder"),
2008
+ page: require_schema.PageRefSchema,
2009
+ refs: zod.z.array(require_schema.AnnotationRefSchema).min(1),
2010
+ position: require_schemas.AnnotationPositionSchema
2011
+ }),
2012
+ zod.z.object({
2013
+ type: zod.z.literal("forms.setValue"),
2014
+ field: require_schema.FormFieldRefSchema,
2015
+ value: require_schema.FormFieldValueSchema,
2016
+ expect: require_schema.FormFieldValueSchema.optional()
2017
+ }),
2018
+ zod.z.object({
2019
+ type: zod.z.literal("forms.setDisplay"),
2020
+ field: require_schema.FormFieldRefSchema,
2021
+ display: FormFieldDisplaySchema
2022
+ }),
2023
+ zod.z.object({
2024
+ type: zod.z.literal("forms.setAppearanceText"),
2025
+ field: require_schema.FormFieldRefSchema,
2026
+ text: zod.z.string()
2027
+ }),
2028
+ zod.z.object({
2029
+ type: zod.z.literal("forms.reset"),
2030
+ fields: zod.z.array(require_schema.FormFieldRefSchema).optional()
2031
+ }),
2032
+ zod.z.object({
2033
+ type: zod.z.literal("forms.create"),
2034
+ draft: require_schema.FormFieldDraftSchema,
2035
+ objectNumber: zod.z.number().int().positive().optional(),
2036
+ widgetObjectNumbers: zod.z.array(zod.z.number().int().positive()).optional()
2037
+ }),
2038
+ zod.z.object({
2039
+ type: zod.z.literal("forms.update"),
2040
+ field: require_schema.FormFieldRefSchema,
2041
+ patch: require_schema.FormFieldPatchSchema,
2042
+ expect: require_schema.FormFieldPatchSchema.optional()
2043
+ }),
2044
+ zod.z.object({
2045
+ type: zod.z.literal("forms.delete"),
2046
+ field: require_schema.FormFieldRefSchema,
2047
+ expect: require_schema.FormFieldPatchSchema.optional()
2048
+ }),
2049
+ zod.z.object({
2050
+ type: zod.z.literal("forms.addWidget"),
2051
+ field: require_schema.FormFieldRefSchema,
2052
+ placement: require_schema.WidgetPlacementSchema,
2053
+ objectNumber: zod.z.number().int().positive().optional(),
2054
+ splitObjectNumber: zod.z.number().int().positive().optional()
2055
+ }),
2056
+ zod.z.object({
2057
+ type: zod.z.literal("forms.removeWidget"),
2058
+ field: require_schema.FormFieldRefSchema,
2059
+ widget: require_schema.AnnotationRefSchema
2060
+ }),
2061
+ zod.z.object({
2062
+ type: zod.z.literal("forms.deleteWidget"),
2063
+ widget: require_schema.AnnotationRefSchema,
2064
+ expect: require_schema.WidgetPatchSchema.optional()
2065
+ }),
2066
+ zod.z.object({
2067
+ type: zod.z.literal("forms.reorderCalculations"),
2068
+ fields: zod.z.array(require_schema.FormFieldRefSchema).min(1),
2069
+ position: require_schemas.FieldPositionSchema
2070
+ }),
2071
+ zod.z.object({
2072
+ type: zod.z.literal("forms.reorderWidgets"),
2073
+ page: require_schema.PageRefSchema,
2074
+ widgets: zod.z.array(require_schema.AnnotationRefSchema).min(1),
2075
+ position: require_schemas.AnnotationPositionSchema
2076
+ }),
2077
+ zod.z.object({
2078
+ type: zod.z.literal("forms.updateWidget"),
2079
+ widget: require_schema.AnnotationRefSchema,
2080
+ patch: require_schema.WidgetPatchSchema,
2081
+ expect: require_schema.WidgetPatchSchema.optional()
2082
+ }),
2083
+ zod.z.object({
2084
+ type: zod.z.literal("forms.setSignatureAppearance"),
2085
+ field: require_schema.FormFieldRefSchema,
2086
+ /** The one-page PDF drawn in, as the key of its multipart part. */
2087
+ resources: require_schema.AppearanceResourceKeysSchema
2088
+ }),
2089
+ zod.z.object({
2090
+ type: zod.z.literal("metadata.update"),
2091
+ patch: require_schemas.MetadataPatchSchema,
2092
+ expect: require_schemas.MetadataPatchSchema.optional()
2093
+ }),
2094
+ zod.z.object({
2095
+ type: zod.z.literal("metadata.updateCustom"),
2096
+ patch: require_schemas.CustomMetadataPatchSchema
2097
+ })
2098
+ ]);
2099
+ /**
2100
+ * One change of a request: its `ops`, or `undoOf`, the undo of an earlier
2101
+ * change. One object with exactly one of the two, so the wire has no untagged
2102
+ * union (the API reference labels variants by a discriminating literal).
2103
+ */
2104
+ const ChangeEntryWireSchema = zod.z.object({
2105
+ opId: OpIdSchema,
2106
+ ops: zod.z.array(ChangeOpWireSchema).optional(),
2107
+ undoOf: OpIdSchema.optional()
2108
+ }).strict().refine((entry) => entry.ops === void 0 !== (entry.undoOf === void 0), { message: "exactly one of ops or undoOf" });
2109
+ /** What a request may hold. */
2110
+ const CHANGE_REQUEST_LIMITS = {
2111
+ /** Changes per request. */
2112
+ changes: 64,
2113
+ /** Ops per change. */
2114
+ ops: 512
2115
+ };
2116
+ /** A `POST …/changes` body: the changes, applied in order, each on its own. */
2117
+ const ChangeRequestSchema = zod.z.object({ changes: zod.z.array(ChangeEntryWireSchema).min(1).max(CHANGE_REQUEST_LIMITS.changes) });
2118
+ /** What an item can be: an op's type, or a restore (only in an undo). */
2119
+ const ChangeItemTypeSchema = zod.z.enum([
2120
+ ...ChangeOpWireSchema.options.map((op) => op.shape.type.value),
2121
+ "annotations.restore",
2122
+ "forms.restore"
2123
+ ]);
2124
+ /** What an undo left alone, by name. */
2125
+ const SkippedFieldsSchema = zod.z.array(zod.z.string()).optional();
2126
+ /** An item of `type`: its verb's result, after the type and what else the item adds. */
2127
+ function itemOf(type, result, extra = {}) {
2128
+ return zod.z.object({
2129
+ type: zod.z.literal(type),
2130
+ ...extra
2131
+ }).merge(result);
2132
+ }
2133
+ /**
2134
+ * One item of a change's result: what one op did, or that an undo left it
2135
+ * alone (`skipped`). Every item names itself by `type`.
2136
+ */
2137
+ const ChangeItemSchema = zod.z.union([
2138
+ zod.z.object({
2139
+ type: zod.z.literal("skipped"),
2140
+ /** The item it would have been. */
2141
+ op: ChangeItemTypeSchema,
2142
+ meta: require_schemas.MutationMetaSchema
2143
+ }),
2144
+ itemOf("annotations.create", require_schemas.AnnotationCreateResultSchema, { page: require_schema.PageRefSchema }),
2145
+ itemOf("annotations.update", require_schemas.AnnotationUpdateResultSchema, {
2146
+ page: require_schema.PageRefSchema,
2147
+ skipped: SkippedFieldsSchema
2148
+ }),
2149
+ itemOf("annotations.delete", require_schemas.AnnotationDeleteResultSchema, { page: require_schema.PageRefSchema }),
2150
+ itemOf("annotations.reorder", require_schemas.AnnotationReorderResultSchema, { page: require_schema.PageRefSchema }),
2151
+ zod.z.object({
2152
+ type: zod.z.literal("annotations.restore"),
2153
+ page: require_schema.PageRefSchema,
2154
+ annotations: zod.z.array(require_schema.AnnotationSchema),
2155
+ meta: require_schemas.AnnotationListMutationMetaSchema
2156
+ }),
2157
+ itemOf("forms.setValue", require_schemas.FormSetValueResultSchema),
2158
+ itemOf("forms.setDisplay", require_schemas.FormFieldUpdateResultSchema),
2159
+ itemOf("forms.setAppearanceText", require_schemas.FormFieldUpdateResultSchema),
2160
+ itemOf("forms.reset", require_schemas.FormResetResultSchema, { skipped: SkippedFieldsSchema }),
2161
+ itemOf("forms.create", require_schemas.FormFieldCreateResultSchema),
2162
+ itemOf("forms.update", require_schemas.FormFieldUpdateResultSchema, { skipped: SkippedFieldsSchema }),
2163
+ itemOf("forms.delete", require_schemas.FormFieldDeleteResultSchema),
2164
+ zod.z.object({
2165
+ type: zod.z.literal("forms.restore"),
2166
+ field: require_schema.FormFieldDTOSchema,
2167
+ widgets: zod.z.array(require_schema.WidgetDTOSchema),
2168
+ meta: require_schemas.FormMutationMetaSchema
2169
+ }),
2170
+ itemOf("forms.setSignatureAppearance", require_schemas.FormFieldUpdateResultSchema),
2171
+ itemOf("forms.addWidget", require_schemas.FormWidgetLinkResultSchema),
2172
+ itemOf("forms.removeWidget", require_schemas.FormWidgetLinkResultSchema),
2173
+ itemOf("forms.deleteWidget", require_schemas.FormWidgetDeleteResultSchema),
2174
+ itemOf("forms.restoreWidget", require_schemas.FormWidgetRestoreResultSchema),
2175
+ itemOf("forms.reorderWidgets", require_schemas.FormWidgetsReorderResultSchema),
2176
+ itemOf("forms.reorderCalculations", require_schemas.FormCalculationsReorderResultSchema),
2177
+ itemOf("forms.updateWidget", require_schemas.FormWidgetUpdateResultSchema, { skipped: SkippedFieldsSchema }),
2178
+ itemOf("metadata.update", require_schemas.MetadataUpdateResultSchema, { skipped: SkippedFieldsSchema }),
2179
+ itemOf("metadata.updateCustom", require_schemas.CustomMetadataUpdateResultSchema, { skipped: SkippedFieldsSchema })
2180
+ ]);
2181
+ /** What a change did: one item per op (per step of an undo), and its meta. */
2182
+ const ChangeResultSchema = zod.z.object({
2183
+ items: zod.z.array(ChangeItemSchema),
2184
+ meta: require_schemas.MutationMetaSchema
2185
+ });
2186
+ /** One change's answer: applied with its result, or refused with the error. */
2187
+ const ChangeAnswerSchema = zod.z.discriminatedUnion("status", [zod.z.object({
2188
+ opId: zod.z.string(),
2189
+ status: zod.z.literal("applied"),
2190
+ result: ChangeResultSchema
2191
+ }), zod.z.object({
2192
+ opId: zod.z.string(),
2193
+ status: zod.z.literal("refused"),
2194
+ error: require_schemas.EngineErrorPayloadSchema
2195
+ })]);
2196
+ /** A `POST …/changes` response: one answer per change, in order. */
2197
+ const ChangeResponseSchema = zod.z.object({ changes: zod.z.array(ChangeAnswerSchema) });
2198
+ /**
2199
+ * Stable public component names for the change wire model, so an OpenAPI
2200
+ * projection names an op, an item and a result once, like
2201
+ * `AnnotationWireComponents`.
2202
+ */
2203
+ const ChangeWireComponents = {
2204
+ ChangeOp: ChangeOpWireSchema,
2205
+ ChangeItem: ChangeItemSchema,
2206
+ ChangeResult: ChangeResultSchema
2207
+ };
2208
+ //#endregion
2209
+ exports.ANNOTATION_KINDS = require_schema.ANNOTATION_KINDS;
1631
2210
  exports.AccessRequestSchema = require_schemas.AccessRequestSchema;
1632
2211
  exports.AccessResponseSchema = require_schemas.AccessResponseSchema;
1633
2212
  exports.ActionsTokenSchema = ActionsTokenSchema;
2213
+ exports.AnnotationAppearanceBatchSchema = require_schemas.AnnotationAppearanceBatchSchema;
1634
2214
  exports.AnnotationAppearanceExportInputSchema = require_schemas.AnnotationAppearanceExportInputSchema;
1635
- exports.AnnotationAppearanceManifestSchema = require_schemas.AnnotationAppearanceManifestSchema;
1636
2215
  exports.AnnotationAppearancesQuerySchema = require_schemas.AnnotationAppearancesQuerySchema;
1637
2216
  exports.AnnotationAppearancesRenderTokenSchema = AnnotationAppearancesRenderTokenSchema;
1638
- exports.AnnotationBaseShape = require_schemas.AnnotationBaseShape;
1639
- exports.AnnotationBorderStyleSchema = require_schemas.AnnotationBorderStyleSchema;
2217
+ exports.AnnotationBorderStyleSchema = require_schema.AnnotationBorderStyleSchema;
1640
2218
  exports.AnnotationCreateResultSchema = require_schemas.AnnotationCreateResultSchema;
1641
- exports.AnnotationDTOSchema = require_schemas.AnnotationDTOSchema;
1642
2219
  exports.AnnotationDeleteResultSchema = require_schemas.AnnotationDeleteResultSchema;
1643
- exports.AnnotationDraftBaseShape = require_schemas.AnnotationDraftBaseShape;
1644
- exports.AnnotationDraftSchema = require_schemas.AnnotationDraftSchema;
1645
- exports.AnnotationFlagsPartialSchema = require_schemas.AnnotationFlagsPartialSchema;
1646
- exports.AnnotationFlagsSchema = require_schemas.AnnotationFlagsSchema;
2220
+ exports.AnnotationDraftSchema = require_schema.AnnotationDraftSchema;
2221
+ exports.AnnotationExportSelectionSchema = require_schemas.AnnotationExportSelectionSchema;
1647
2222
  exports.AnnotationFlattenInputSchema = require_schemas.AnnotationFlattenInputSchema;
1648
2223
  exports.AnnotationFlattenResultSchema = require_schemas.AnnotationFlattenResultSchema;
2224
+ exports.AnnotationImportBodySchema = require_schemas.AnnotationImportBodySchema;
2225
+ exports.AnnotationImportOptionsSchema = require_schemas.AnnotationImportOptionsSchema;
2226
+ exports.AnnotationImportResultSchema = require_schemas.AnnotationImportResultSchema;
1649
2227
  exports.AnnotationListMutationMetaSchema = require_schemas.AnnotationListMutationMetaSchema;
1650
- exports.AnnotationListPageSnapshotSchema = require_schemas.AnnotationListPageSnapshotSchema;
1651
- exports.AnnotationListSnapshotAllPagesSchema = require_schemas.AnnotationListSnapshotAllPagesSchema;
1652
- exports.AnnotationMoveResultSchema = require_schemas.AnnotationMoveResultSchema;
1653
- exports.AnnotationPatchBaseShape = require_schemas.AnnotationPatchBaseShape;
1654
- exports.AnnotationPatchSchema = require_schemas.AnnotationPatchSchema;
1655
- exports.AnnotationRefSchema = require_schemas.AnnotationRefSchema;
1656
- exports.AnnotationStableIdSchema = require_schemas.AnnotationStableIdSchema;
2228
+ exports.AnnotationListSchema = require_schemas.AnnotationListSchema;
2229
+ exports.AnnotationPatchSchema = require_schema.AnnotationPatchSchema;
2230
+ exports.AnnotationPositionSchema = require_schemas.AnnotationPositionSchema;
2231
+ exports.AnnotationRefSchema = require_schema.AnnotationRefSchema;
2232
+ exports.AnnotationReorderBodySchema = require_schemas.AnnotationReorderBodySchema;
2233
+ exports.AnnotationReorderResultSchema = require_schemas.AnnotationReorderResultSchema;
2234
+ exports.AnnotationResourceKeysSchema = require_schema.AnnotationResourceKeysSchema;
2235
+ exports.AnnotationSchema = require_schema.AnnotationSchema;
1657
2236
  exports.AnnotationTokenSchema = AnnotationTokenSchema;
1658
2237
  exports.AnnotationUpdateResultSchema = require_schemas.AnnotationUpdateResultSchema;
2238
+ exports.AnnotationWireComponents = require_schemas.AnnotationWireComponents;
2239
+ exports.AnnotationsExportRequestSchema = require_schemas.AnnotationsExportRequestSchema;
1659
2240
  exports.AppearanceOutcomeSchema = require_schemas.AppearanceOutcomeSchema;
2241
+ exports.AppearanceResourceKeysSchema = require_schema.AppearanceResourceKeysSchema;
1660
2242
  exports.AttachmentCreateResultSchema = require_schemas.AttachmentCreateResultSchema;
1661
2243
  exports.AttachmentDeleteResultSchema = require_schemas.AttachmentDeleteResultSchema;
1662
- exports.AttachmentFileInfoSchema = require_schemas.AttachmentFileInfoSchema;
1663
- exports.AttachmentsCacheSchema = require_schemas.AttachmentsCacheSchema;
2244
+ exports.AttachmentFileInfoSchema = require_schema.AttachmentFileInfoSchema;
2245
+ exports.AttachmentListSchema = require_schemas.AttachmentListSchema;
2246
+ exports.AttachmentMutationMetaSchema = require_schemas.AttachmentMutationMetaSchema;
2247
+ exports.AttachmentRefSchema = require_schema.AttachmentRefSchema;
2248
+ exports.AttachmentSchema = require_schema.AttachmentSchema;
1664
2249
  exports.BaseVersionInfoSchema = require_schemas.BaseVersionInfoSchema;
1665
- exports.BlendModeSchema = require_schemas.BlendModeSchema;
2250
+ exports.BlendModeSchema = require_schema.BlendModeSchema;
2251
+ exports.BundleLimitsSchema = require_schemas.BundleLimitsSchema;
1666
2252
  exports.ByteRangeSchema = require_schemas.ByteRangeSchema;
2253
+ exports.CHANGE_REQUEST_LIMITS = CHANGE_REQUEST_LIMITS;
1667
2254
  exports.CacheDeltaSchema = require_schemas.CacheDeltaSchema;
1668
2255
  exports.CachePinsSchema = require_schemas.CachePinsSchema;
1669
- exports.CalloutLineSchema = require_schemas.CalloutLineSchema;
1670
- exports.CaretDTOSchema = require_schemas.CaretDTOSchema;
1671
- exports.CaretDraftSchema = require_schemas.CaretDraftSchema;
1672
- exports.CaretIntentSchema = require_schemas.CaretIntentSchema;
1673
- exports.CaretPatchSchema = require_schemas.CaretPatchSchema;
2256
+ exports.CalloutLineSchema = require_schema.CalloutLineSchema;
2257
+ exports.CaretDTOSchema = require_schema.CaretDTOSchema;
2258
+ exports.CaretDraftSchema = require_schema.CaretDraftSchema;
2259
+ exports.CaretIntentSchema = require_schema.CaretIntentSchema;
2260
+ exports.CaretPatchSchema = require_schema.CaretPatchSchema;
1674
2261
  exports.ChangeAnalysisSchema = require_schemas.ChangeAnalysisSchema;
1675
- exports.CircleDTOSchema = require_schemas.CircleDTOSchema;
1676
- exports.CircleDraftSchema = require_schemas.CircleDraftSchema;
1677
- exports.CirclePatchSchema = require_schemas.CirclePatchSchema;
1678
- exports.ColorSchema = require_schemas.ColorSchema;
2262
+ exports.ChangeAnswerSchema = ChangeAnswerSchema;
2263
+ exports.ChangeEntryWireSchema = ChangeEntryWireSchema;
2264
+ exports.ChangeItemSchema = ChangeItemSchema;
2265
+ exports.ChangeOpWireSchema = ChangeOpWireSchema;
2266
+ exports.ChangeRequestSchema = ChangeRequestSchema;
2267
+ exports.ChangeResponseSchema = ChangeResponseSchema;
2268
+ exports.ChangeResultSchema = ChangeResultSchema;
2269
+ exports.ChangeWireComponents = ChangeWireComponents;
2270
+ exports.CircleDTOSchema = require_schema.CircleDTOSchema;
2271
+ exports.CircleDraftSchema = require_schema.CircleDraftSchema;
2272
+ exports.CirclePatchSchema = require_schema.CirclePatchSchema;
2273
+ exports.ColorSchema = require_schema.ColorSchema;
1679
2274
  exports.ContentTokenSchema = ContentTokenSchema;
2275
+ exports.CustomMetadataPatchSchema = require_schemas.CustomMetadataPatchSchema;
2276
+ exports.CustomMetadataSchema = require_schemas.CustomMetadataSchema;
2277
+ exports.CustomMetadataUpdateResultSchema = require_schemas.CustomMetadataUpdateResultSchema;
1680
2278
  exports.DEFAULT_LAYER_NAME = DEFAULT_LAYER_NAME;
1681
2279
  exports.DOC_RESOURCES = DOC_RESOURCES;
2280
+ exports.DateInputSchema = require_schema.DateInputSchema;
1682
2281
  exports.DigestAlgorithmSchema = require_schemas.DigestAlgorithmSchema;
1683
2282
  exports.DocTokenSchema = DocTokenSchema;
1684
- exports.DocumentActionsSnapshotSchema = require_schemas.DocumentActionsSnapshotSchema;
2283
+ exports.DocumentActionsSnapshotSchema = require_schema.DocumentActionsSnapshotSchema;
1685
2284
  exports.DocumentHeadSchema = require_schemas.DocumentHeadSchema;
1686
2285
  exports.DocumentManifestSchema = require_schemas.DocumentManifestSchema;
1687
2286
  exports.DocumentMetadataSchema = require_schemas.DocumentMetadataSchema;
@@ -1690,68 +2289,95 @@ exports.DocumentSecurityStateSchema = require_schemas.DocumentSecurityStateSchem
1690
2289
  exports.DocumentVersionRefSchema = require_schemas.DocumentVersionRefSchema;
1691
2290
  exports.DocumentVersionSchema = require_schemas.DocumentVersionSchema;
1692
2291
  exports.DocumentVersionsSchema = require_schemas.DocumentVersionsSchema;
1693
- exports.EmbeddedFileItemSchema = require_schemas.EmbeddedFileItemSchema;
1694
- exports.EmbeddedFileRefSchema = require_schemas.EmbeddedFileRefSchema;
2292
+ exports.DocumentWireComponents = require_schemas.DocumentWireComponents;
2293
+ exports.DrawnBorderStyleSchema = require_schema.DrawnBorderStyleSchema;
2294
+ exports.EditSessionAccessSchema = require_schemas.EditSessionAccessSchema;
2295
+ exports.EditSessionStatusSchema = require_schemas.EditSessionStatusSchema;
1695
2296
  exports.EngineErrorPayloadSchema = require_schemas.EngineErrorPayloadSchema;
2297
+ exports.FieldActionsPatchSchema = require_schema.FieldActionsPatchSchema;
1696
2298
  exports.FieldLockSpecSchema = require_schemas.FieldLockSpecSchema;
1697
- exports.FileAttachmentDTOSchema = require_schemas.FileAttachmentDTOSchema;
1698
- exports.FileAttachmentIconSchema = require_schemas.FileAttachmentIconSchema;
1699
- exports.FileAttachmentPatchSchema = require_schemas.FileAttachmentPatchSchema;
1700
- exports.FileAttachmentWireDraftSchema = require_schemas.FileAttachmentWireDraftSchema;
1701
- exports.FormDataFormatSchema = require_schemas.FormDataFormatSchema;
1702
- exports.FormEffectSchema = require_schemas.FormEffectSchema;
1703
- exports.FormEffectsResultSchema = require_schemas.FormEffectsResultSchema;
2299
+ exports.FieldPositionSchema = require_schemas.FieldPositionSchema;
2300
+ exports.FieldScriptWriteSchema = require_schema.FieldScriptWriteSchema;
2301
+ exports.FileAttachmentDTOSchema = require_schema.FileAttachmentDTOSchema;
2302
+ exports.FileAttachmentDraftSchema = require_schema.FileAttachmentDraftSchema;
2303
+ exports.FileAttachmentIconSchema = require_schema.FileAttachmentIconSchema;
2304
+ exports.FileAttachmentPatchSchema = require_schema.FileAttachmentPatchSchema;
2305
+ exports.FileResourceKeysSchema = require_schema.FileResourceKeysSchema;
2306
+ exports.FileWidgetActionsPatchSchema = require_schema.FileWidgetActionsPatchSchema;
2307
+ exports.FormCalculationsReorderBodySchema = require_schemas.FormCalculationsReorderBodySchema;
2308
+ exports.FormCalculationsReorderResultSchema = require_schemas.FormCalculationsReorderResultSchema;
2309
+ exports.FormExportRequestSchema = require_schemas.FormExportRequestSchema;
2310
+ exports.FormExportSelectionSchema = require_schemas.FormExportSelectionSchema;
1704
2311
  exports.FormFieldCreateResultSchema = require_schemas.FormFieldCreateResultSchema;
1705
- exports.FormFieldDTOSchema = require_schemas.FormFieldDTOSchema;
2312
+ exports.FormFieldDTOSchema = require_schema.FormFieldDTOSchema;
1706
2313
  exports.FormFieldDeleteResultSchema = require_schemas.FormFieldDeleteResultSchema;
1707
- exports.FormFieldDraftSchema = require_schemas.FormFieldDraftSchema;
1708
- exports.FormFieldFlagsSchema = require_schemas.FormFieldFlagsSchema;
1709
- exports.FormFieldOptionInputSchema = require_schemas.FormFieldOptionInputSchema;
1710
- exports.FormFieldOptionSchema = require_schemas.FormFieldOptionSchema;
1711
- exports.FormFieldPatchSchema = require_schemas.FormFieldPatchSchema;
1712
- exports.FormFieldRefSchema = require_schemas.FormFieldRefSchema;
2314
+ exports.FormFieldDraftSchema = require_schema.FormFieldDraftSchema;
2315
+ exports.FormFieldOptionInputSchema = require_schema.FormFieldOptionInputSchema;
2316
+ exports.FormFieldOptionSchema = require_schema.FormFieldOptionSchema;
2317
+ exports.FormFieldPatchSchema = require_schema.FormFieldPatchSchema;
2318
+ exports.FormFieldRefSchema = require_schema.FormFieldRefSchema;
1713
2319
  exports.FormFieldUpdateResultSchema = require_schemas.FormFieldUpdateResultSchema;
1714
- exports.FormFieldValueSchema = require_schemas.FormFieldValueSchema;
2320
+ exports.FormFieldValueSchema = require_schema.FormFieldValueSchema;
2321
+ exports.FormImportBodySchema = require_schemas.FormImportBodySchema;
2322
+ exports.FormImportOptionsSchema = require_schemas.FormImportOptionsSchema;
1715
2323
  exports.FormImportResultSchema = require_schemas.FormImportResultSchema;
1716
- exports.FormKindSchema = require_schemas.FormKindSchema;
2324
+ exports.FormKindSchema = require_schema.FormKindSchema;
2325
+ exports.FormMutationMetaSchema = require_schemas.FormMutationMetaSchema;
1717
2326
  exports.FormRepairResultSchema = require_schemas.FormRepairResultSchema;
2327
+ exports.FormResetBodySchema = require_schemas.FormResetBodySchema;
2328
+ exports.FormResetResultSchema = require_schemas.FormResetResultSchema;
1718
2329
  exports.FormSetValueResultSchema = require_schemas.FormSetValueResultSchema;
1719
- exports.FormSnapshotSchema = require_schemas.FormSnapshotSchema;
2330
+ exports.FormSnapshotSchema = require_schema.FormSnapshotSchema;
1720
2331
  exports.FormSubmissionEntrySchema = FormSubmissionEntrySchema;
1721
2332
  exports.FormSubmissionReceiptSchema = FormSubmissionReceiptSchema;
1722
2333
  exports.FormSubmissionRequestSchema = FormSubmissionRequestSchema;
1723
- exports.FormValueEntrySchema = require_schemas.FormValueEntrySchema;
2334
+ exports.FormTokenSchema = FormTokenSchema;
2335
+ exports.FormValueEntrySchema = require_schema.FormValueEntrySchema;
2336
+ exports.FormValuesImportBodySchema = require_schemas.FormValuesImportBodySchema;
2337
+ exports.FormValuesImportOptionsSchema = require_schemas.FormValuesImportOptionsSchema;
2338
+ exports.FormValuesImportResultSchema = require_schemas.FormValuesImportResultSchema;
2339
+ exports.FormWidgetDeleteResultSchema = require_schemas.FormWidgetDeleteResultSchema;
1724
2340
  exports.FormWidgetLinkResultSchema = require_schemas.FormWidgetLinkResultSchema;
1725
- exports.FormWidgetRefSchema = require_schemas.FormWidgetRefSchema;
1726
- exports.FreeTextDTOSchema = require_schemas.FreeTextDTOSchema;
1727
- exports.FreeTextDraftSchema = require_schemas.FreeTextDraftSchema;
1728
- exports.FreeTextIntentSchema = require_schemas.FreeTextIntentSchema;
1729
- exports.FreeTextPatchSchema = require_schemas.FreeTextPatchSchema;
1730
- exports.HighlightDTOSchema = require_schemas.HighlightDTOSchema;
1731
- exports.HighlightDraftSchema = require_schemas.HighlightDraftSchema;
1732
- exports.HighlightPatchSchema = require_schemas.HighlightPatchSchema;
1733
- exports.InkDTOSchema = require_schemas.InkDTOSchema;
1734
- exports.InkDraftSchema = require_schemas.InkDraftSchema;
1735
- exports.InkIntentSchema = require_schemas.InkIntentSchema;
1736
- exports.InkListSchema = require_schemas.InkListSchema;
1737
- exports.InkPatchSchema = require_schemas.InkPatchSchema;
1738
- exports.KIND_BY_SUBTYPE = require_schemas.KIND_BY_SUBTYPE;
2341
+ exports.FormWidgetRestoreResultSchema = require_schemas.FormWidgetRestoreResultSchema;
2342
+ exports.FormWidgetSchema = require_schema.FormWidgetSchema;
2343
+ exports.FormWidgetUpdateBodySchema = require_schemas.FormWidgetUpdateBodySchema;
2344
+ exports.FormWidgetUpdateResultSchema = require_schemas.FormWidgetUpdateResultSchema;
2345
+ exports.FormWidgetsReorderBodySchema = require_schemas.FormWidgetsReorderBodySchema;
2346
+ exports.FormWidgetsReorderResultSchema = require_schemas.FormWidgetsReorderResultSchema;
2347
+ exports.FormWireComponents = require_schemas.FormWireComponents;
2348
+ exports.FreeTextDTOSchema = require_schema.FreeTextDTOSchema;
2349
+ exports.FreeTextDraftSchema = require_schema.FreeTextDraftSchema;
2350
+ exports.FreeTextIntentSchema = require_schema.FreeTextIntentSchema;
2351
+ exports.FreeTextIntentWriteSchema = require_schema.FreeTextIntentWriteSchema;
2352
+ exports.FreeTextPatchSchema = require_schema.FreeTextPatchSchema;
2353
+ exports.HighlightDTOSchema = require_schema.HighlightDTOSchema;
2354
+ exports.HighlightDraftSchema = require_schema.HighlightDraftSchema;
2355
+ exports.HighlightPatchSchema = require_schema.HighlightPatchSchema;
2356
+ exports.IdentitySchema = require_schemas.IdentitySchema;
2357
+ exports.ImageResourceKeysSchema = require_schema.ImageResourceKeysSchema;
2358
+ exports.InkDTOSchema = require_schema.InkDTOSchema;
2359
+ exports.InkDraftSchema = require_schema.InkDraftSchema;
2360
+ exports.InkIntentSchema = require_schema.InkIntentSchema;
2361
+ exports.InkListSchema = require_schema.InkListSchema;
2362
+ exports.InkPatchSchema = require_schema.InkPatchSchema;
2363
+ exports.IsoDateTimeSchema = require_schema.IsoDateTimeSchema;
2364
+ exports.KIND_BY_SUBTYPE = require_schema.KIND_BY_SUBTYPE;
1739
2365
  exports.LayerAnalysisQuerySchema = require_schemas.LayerAnalysisQuerySchema;
1740
2366
  exports.LayerScopesSchema = require_schemas.LayerScopesSchema;
1741
2367
  exports.LayoutTokenSchema = LayoutTokenSchema;
1742
- exports.LineCaptionPatchSchema = require_schemas.LineCaptionPatchSchema;
1743
- exports.LineDTOSchema = require_schemas.LineDTOSchema;
1744
- exports.LineDimensionCaptionSchema = require_schemas.LineDimensionCaptionSchema;
1745
- exports.LineDraftSchema = require_schemas.LineDraftSchema;
1746
- exports.LineEndingSchema = require_schemas.LineEndingSchema;
1747
- exports.LineEndingsSchema = require_schemas.LineEndingsSchema;
1748
- exports.LineIntentSchema = require_schemas.LineIntentSchema;
1749
- exports.LineLeaderSchema = require_schemas.LineLeaderSchema;
1750
- exports.LinePatchSchema = require_schemas.LinePatchSchema;
1751
- exports.LinePointsSchema = require_schemas.LinePointsSchema;
1752
- exports.LinkDTOSchema = require_schemas.LinkDTOSchema;
1753
- exports.LinkDraftSchema = require_schemas.LinkDraftSchema;
1754
- exports.LinkPatchSchema = require_schemas.LinkPatchSchema;
2368
+ exports.LineCaptionPatchSchema = require_schema.LineCaptionPatchSchema;
2369
+ exports.LineDTOSchema = require_schema.LineDTOSchema;
2370
+ exports.LineDimensionCaptionSchema = require_schema.LineDimensionCaptionSchema;
2371
+ exports.LineDraftSchema = require_schema.LineDraftSchema;
2372
+ exports.LineEndingSchema = require_schema.LineEndingSchema;
2373
+ exports.LineEndingsSchema = require_schema.LineEndingsSchema;
2374
+ exports.LineIntentSchema = require_schema.LineIntentSchema;
2375
+ exports.LineLeaderSchema = require_schema.LineLeaderSchema;
2376
+ exports.LinePatchSchema = require_schema.LinePatchSchema;
2377
+ exports.LinePointsSchema = require_schema.LinePointsSchema;
2378
+ exports.LinkDTOSchema = require_schema.LinkDTOSchema;
2379
+ exports.LinkDraftSchema = require_schema.LinkDraftSchema;
2380
+ exports.LinkPatchSchema = require_schema.LinkPatchSchema;
1755
2381
  exports.ManifestPageSchema = require_schemas.ManifestPageSchema;
1756
2382
  exports.MetadataPatchSchema = require_schemas.MetadataPatchSchema;
1757
2383
  exports.MetadataTokenSchema = MetadataTokenSchema;
@@ -1759,8 +2385,13 @@ exports.MetadataUpdateResultSchema = require_schemas.MetadataUpdateResultSchema;
1759
2385
  exports.ModificationLevelSchema = require_schemas.ModificationLevelSchema;
1760
2386
  exports.MutationMetaSchema = require_schemas.MutationMetaSchema;
1761
2387
  exports.NamedPageEntrySchema = require_schemas.NamedPageEntrySchema;
1762
- exports.NoteIconSchema = require_schemas.NoteIconSchema;
2388
+ exports.NoteIconSchema = require_schema.NoteIconSchema;
2389
+ exports.ObjectNumberRangeSchema = require_schemas.ObjectNumberRangeSchema;
2390
+ exports.ObjectNumberReservationRequestSchema = require_schemas.ObjectNumberReservationRequestSchema;
2391
+ exports.ObjectNumberReservationResponseSchema = require_schemas.ObjectNumberReservationResponseSchema;
1763
2392
  exports.OpenDocumentResponseSchema = require_schemas.OpenDocumentResponseSchema;
2393
+ exports.PAGE_RENDER_FAMILIES = require_schemas.PAGE_RENDER_FAMILIES;
2394
+ exports.PageBoxSchema = require_schema.PageBoxSchema;
1764
2395
  exports.PageBoxesSchema = require_schemas.PageBoxesSchema;
1765
2396
  exports.PageDeleteInputSchema = require_schemas.PageDeleteInputSchema;
1766
2397
  exports.PageDeleteResultSchema = require_schemas.PageDeleteResultSchema;
@@ -1773,74 +2404,76 @@ exports.PageInsertInputSchema = require_schemas.PageInsertInputSchema;
1773
2404
  exports.PageInsertResultSchema = require_schemas.PageInsertResultSchema;
1774
2405
  exports.PageLayoutSchema = require_schemas.PageLayoutSchema;
1775
2406
  exports.PageListSnapshotSchema = require_schemas.PageListSnapshotSchema;
1776
- exports.PageMeasurementViewportSchema = require_schemas.PageMeasurementViewportSchema;
1777
- exports.PageMoveInputSchema = require_schemas.PageMoveInputSchema;
1778
- exports.PageMoveResultSchema = require_schemas.PageMoveResultSchema;
2407
+ exports.PageMeasurementViewportListSchema = require_schema.PageMeasurementViewportListSchema;
2408
+ exports.PageMeasurementViewportSchema = require_schema.PageMeasurementViewportSchema;
1779
2409
  exports.PageNameInputSchema = require_schemas.PageNameInputSchema;
1780
2410
  exports.PageNameResultSchema = require_schemas.PageNameResultSchema;
1781
2411
  exports.PageNetworkRenderFormatSchema = require_schemas.PageNetworkRenderFormatSchema;
2412
+ exports.PagePointSchema = require_schema.PagePointSchema;
2413
+ exports.PagePositionSchema = require_schemas.PagePositionSchema;
2414
+ exports.PageQuadSchema = require_schema.PageQuadSchema;
2415
+ exports.PageRefSchema = require_schema.PageRefSchema;
1782
2416
  exports.PageRemoveNameInputSchema = require_schemas.PageRemoveNameInputSchema;
1783
- exports.PageRenderAnnotatedQuerySchema = require_schemas.PageRenderAnnotatedQuerySchema;
1784
- exports.PageRenderQuerySchema = require_schemas.PageRenderQuerySchema;
2417
+ exports.PageRenderQuerySchemas = require_schemas.PageRenderQuerySchemas;
2418
+ exports.PageReorderInputSchema = require_schemas.PageReorderInputSchema;
2419
+ exports.PageReorderResultSchema = require_schemas.PageReorderResultSchema;
1785
2420
  exports.PageRotateInputSchema = require_schemas.PageRotateInputSchema;
1786
2421
  exports.PageRotateResultSchema = require_schemas.PageRotateResultSchema;
1787
- exports.PageScaleInputSchema = require_schemas.PageScaleInputSchema;
2422
+ exports.PageScaleInputSchema = require_schema.PageScaleInputSchema;
1788
2423
  exports.PageScaleResultSchema = require_schemas.PageScaleResultSchema;
1789
- exports.PageStateSchema = require_schemas.PageStateSchema;
1790
- exports.PageStructureCacheSchema = require_schemas.PageStructureCacheSchema;
1791
2424
  exports.PageTextSnapshotSchema = require_schemas.PageTextSnapshotSchema;
1792
- exports.PdfActionNodeSchema = require_schemas.PdfActionNodeSchema;
1793
- exports.PdfActionTargetRefSchema = require_schemas.PdfActionTargetRefSchema;
1794
- exports.PdfActionTreeSchema = require_schemas.PdfActionTreeSchema;
1795
- exports.PdfActionTypeSchema = require_schemas.PdfActionTypeSchema;
1796
- exports.PdfActionWireComponents = require_schemas.PdfActionWireComponents;
1797
- exports.PdfAnnotationActionsSchema = require_schemas.PdfAnnotationActionsSchema;
1798
- exports.PdfDestinationSchema = require_schemas.PdfDestinationSchema;
1799
- exports.PdfFieldActionsSchema = require_schemas.PdfFieldActionsSchema;
1800
- exports.PdfForeignMeasureSchema = require_schemas.PdfForeignMeasureSchema;
1801
- exports.PdfLinkTargetSchema = require_schemas.PdfLinkTargetSchema;
1802
- exports.PdfLinkTargetWritableSchema = require_schemas.PdfLinkTargetWritableSchema;
1803
- exports.PdfMeasureSchema = require_schemas.PdfMeasureSchema;
1804
- exports.PdfMeasureWriteSchema = require_schemas.PdfMeasureWriteSchema;
1805
- exports.PdfMeasurementSchema = require_schemas.PdfMeasurementSchema;
1806
- exports.PdfNumberFormatSchema = require_schemas.PdfNumberFormatSchema;
1807
- exports.PdfPageActionsSchema = require_schemas.PdfPageActionsSchema;
1808
- exports.PdfPointSchema = require_schemas.PdfPointSchema;
1809
- exports.PdfQuadSchema = require_schemas.PdfQuadSchema;
1810
- exports.PdfRectDifferencesSchema = require_schemas.PdfRectDifferencesSchema;
1811
- exports.PdfRectSchema = require_schemas.PdfRectSchema;
2425
+ exports.PdfActionNodeSchema = require_schema.PdfActionNodeSchema;
2426
+ exports.PdfActionTargetRefSchema = require_schema.PdfActionTargetRefSchema;
2427
+ exports.PdfActionTreeSchema = require_schema.PdfActionTreeSchema;
2428
+ exports.PdfActionTypeSchema = require_schema.PdfActionTypeSchema;
2429
+ exports.PdfActionWireComponents = require_schema.PdfActionWireComponents;
2430
+ exports.PdfActionWriteSchema = require_schema.PdfActionWriteSchema;
2431
+ exports.PdfAnnotationActionsSchema = require_schema.PdfAnnotationActionsSchema;
2432
+ exports.PdfDestinationSchema = require_schema.PdfDestinationSchema;
2433
+ exports.PdfFieldActionsSchema = require_schema.PdfFieldActionsSchema;
2434
+ exports.PdfForeignMeasureSchema = require_schema.PdfForeignMeasureSchema;
2435
+ exports.PdfLinkTargetSchema = require_schema.PdfLinkTargetSchema;
2436
+ exports.PdfLinkTargetWritableSchema = require_schema.PdfLinkTargetWritableSchema;
2437
+ exports.PdfMeasureSchema = require_schema.PdfMeasureSchema;
2438
+ exports.PdfMeasureWriteSchema = require_schema.PdfMeasureWriteSchema;
2439
+ exports.PdfMeasurementSchema = require_schema.PdfMeasurementSchema;
2440
+ exports.PdfNumberFormatSchema = require_schema.PdfNumberFormatSchema;
2441
+ exports.PdfPageActionsSchema = require_schema.PdfPageActionsSchema;
2442
+ exports.PdfPointSchema = require_schema.PdfPointSchema;
2443
+ exports.PdfQuadSchema = require_schema.PdfQuadSchema;
2444
+ exports.PdfRectSchema = require_schema.PdfRectSchema;
1812
2445
  exports.PdfRevisionSchema = require_schemas.PdfRevisionSchema;
1813
- exports.PdfRotationSchema = require_schemas.PdfRotationSchema;
2446
+ exports.PdfRotationSchema = require_schema.PdfRotationSchema;
1814
2447
  exports.PdfSaveModeSchema = require_schemas.PdfSaveModeSchema;
1815
- exports.PdfSizeSchema = require_schemas.PdfSizeSchema;
1816
- exports.PointSchema = require_schemas.PointSchema;
1817
- exports.PolygonDTOSchema = require_schemas.PolygonDTOSchema;
1818
- exports.PolygonDraftSchema = require_schemas.PolygonDraftSchema;
1819
- exports.PolygonIntentSchema = require_schemas.PolygonIntentSchema;
1820
- exports.PolygonPatchSchema = require_schemas.PolygonPatchSchema;
1821
- exports.PolylineDTOSchema = require_schemas.PolylineDTOSchema;
1822
- exports.PolylineDraftSchema = require_schemas.PolylineDraftSchema;
1823
- exports.PolylineIntentSchema = require_schemas.PolylineIntentSchema;
1824
- exports.PolylinePatchSchema = require_schemas.PolylinePatchSchema;
1825
- exports.RectSchema = require_schemas.RectSchema;
2448
+ exports.PdfSizeSchema = require_schema.PdfSizeSchema;
2449
+ exports.PointSchema = require_schema.PointSchema;
2450
+ exports.PolygonDTOSchema = require_schema.PolygonDTOSchema;
2451
+ exports.PolygonDraftSchema = require_schema.PolygonDraftSchema;
2452
+ exports.PolygonIntentSchema = require_schema.PolygonIntentSchema;
2453
+ exports.PolygonPatchSchema = require_schema.PolygonPatchSchema;
2454
+ exports.PolylineDTOSchema = require_schema.PolylineDTOSchema;
2455
+ exports.PolylineDraftSchema = require_schema.PolylineDraftSchema;
2456
+ exports.PolylineIntentSchema = require_schema.PolylineIntentSchema;
2457
+ exports.PolylinePatchSchema = require_schema.PolylinePatchSchema;
2458
+ exports.PopupDTOSchema = require_schema.PopupDTOSchema;
2459
+ exports.PopupDraftSchema = require_schema.PopupDraftSchema;
2460
+ exports.PopupPatchSchema = require_schema.PopupPatchSchema;
2461
+ exports.RectSchema = require_schema.RectSchema;
1826
2462
  exports.RedactionApplyResultSchema = require_schemas.RedactionApplyResultSchema;
1827
2463
  exports.RedactionApplyScopeSchema = require_schemas.RedactionApplyScopeSchema;
1828
- exports.RefetchReasonSchema = require_schemas.RefetchReasonSchema;
1829
2464
  exports.RenderTokenSchema = RenderTokenSchema;
1830
- exports.ResourceRefSchema = require_schemas.ResourceRefSchema;
1831
- exports.RevisionTokenSchema = require_schemas.RevisionTokenSchema;
2465
+ exports.ResourceKeySchema = require_schema.ResourceKeySchema;
1832
2466
  exports.SEARCH_RESULT_FORMAT = SEARCH_RESULT_FORMAT;
1833
2467
  exports.SearchMatchSchema = require_schemas.SearchMatchSchema;
1834
- exports.SearchModeSchema = require_schemas.SearchModeSchema;
1835
2468
  exports.SearchQuerySchema = require_schemas.SearchQuerySchema;
1836
2469
  exports.SearchRequestSchema = require_schemas.SearchRequestSchema;
1837
2470
  exports.SearchSliceSchema = require_schemas.SearchSliceSchema;
1838
2471
  exports.SearchSnippetSchema = require_schemas.SearchSnippetSchema;
1839
2472
  exports.SearchTokenSchema = SearchTokenSchema;
1840
- exports.ShapeCaptionPatchSchema = require_schemas.ShapeCaptionPatchSchema;
1841
- exports.ShapeDimensionCaptionSchema = require_schemas.ShapeDimensionCaptionSchema;
1842
- exports.SignatureAbortResultSchema = require_schemas.SignatureAbortResultSchema;
2473
+ exports.ShapeCaptionPatchSchema = require_schema.ShapeCaptionPatchSchema;
2474
+ exports.ShapeDimensionCaptionSchema = require_schema.ShapeDimensionCaptionSchema;
1843
2475
  exports.SignatureAppearanceBodySchema = require_schemas.SignatureAppearanceBodySchema;
2476
+ exports.SignatureCancelResultSchema = require_schemas.SignatureCancelResultSchema;
1844
2477
  exports.SignatureCompleteBodySchema = require_schemas.SignatureCompleteBodySchema;
1845
2478
  exports.SignatureCompleteResultSchema = require_schemas.SignatureCompleteResultSchema;
1846
2479
  exports.SignatureDTOSchema = require_schemas.SignatureDTOSchema;
@@ -1848,41 +2481,50 @@ exports.SignaturePrepareBodySchema = require_schemas.SignaturePrepareBodySchema;
1848
2481
  exports.SignaturePreparedWireSchema = require_schemas.SignaturePreparedWireSchema;
1849
2482
  exports.SignatureSeedValueSchema = require_schemas.SignatureSeedValueSchema;
1850
2483
  exports.SignatureSnapshotSchema = require_schemas.SignatureSnapshotSchema;
1851
- exports.SquareDTOSchema = require_schemas.SquareDTOSchema;
1852
- exports.SquareDraftSchema = require_schemas.SquareDraftSchema;
1853
- exports.SquarePatchSchema = require_schemas.SquarePatchSchema;
1854
- exports.SquigglyDTOSchema = require_schemas.SquigglyDTOSchema;
1855
- exports.SquigglyDraftSchema = require_schemas.SquigglyDraftSchema;
1856
- exports.SquigglyPatchSchema = require_schemas.SquigglyPatchSchema;
1857
- exports.StampDTOSchema = require_schemas.StampDTOSchema;
1858
- exports.StampWireDraftSchema = require_schemas.StampWireDraftSchema;
1859
- exports.StampWirePatchSchema = require_schemas.StampWirePatchSchema;
1860
- exports.StandardFontSchema = require_schemas.StandardFontSchema;
1861
- exports.StrikeoutDTOSchema = require_schemas.StrikeoutDTOSchema;
1862
- exports.StrikeoutDraftSchema = require_schemas.StrikeoutDraftSchema;
1863
- exports.StrikeoutIntentSchema = require_schemas.StrikeoutIntentSchema;
1864
- exports.StrikeoutPatchSchema = require_schemas.StrikeoutPatchSchema;
1865
- exports.TextAlignmentSchema = require_schemas.TextAlignmentSchema;
1866
- exports.TextDTOSchema = require_schemas.TextDTOSchema;
1867
- exports.TextDraftSchema = require_schemas.TextDraftSchema;
1868
- exports.TextPatchSchema = require_schemas.TextPatchSchema;
1869
- exports.ToggleFieldWidgetSchema = require_schemas.ToggleFieldWidgetSchema;
1870
- exports.UnderlineDTOSchema = require_schemas.UnderlineDTOSchema;
1871
- exports.UnderlineDraftSchema = require_schemas.UnderlineDraftSchema;
1872
- exports.UnderlinePatchSchema = require_schemas.UnderlinePatchSchema;
1873
- exports.UnsupportedDTOSchema = require_schemas.UnsupportedDTOSchema;
1874
- exports.UnsupportedDraftSchema = require_schemas.UnsupportedDraftSchema;
1875
- exports.UnsupportedPatchSchema = require_schemas.UnsupportedPatchSchema;
2484
+ exports.SourceResourceKeysSchema = require_schema.SourceResourceKeysSchema;
2485
+ exports.SquareDTOSchema = require_schema.SquareDTOSchema;
2486
+ exports.SquareDraftSchema = require_schema.SquareDraftSchema;
2487
+ exports.SquarePatchSchema = require_schema.SquarePatchSchema;
2488
+ exports.SquigglyDTOSchema = require_schema.SquigglyDTOSchema;
2489
+ exports.SquigglyDraftSchema = require_schema.SquigglyDraftSchema;
2490
+ exports.SquigglyPatchSchema = require_schema.SquigglyPatchSchema;
2491
+ exports.StampDTOSchema = require_schema.StampDTOSchema;
2492
+ exports.StampDraftSchema = require_schema.StampDraftSchema;
2493
+ exports.StampFitSchema = require_schema.StampFitSchema;
2494
+ exports.StampPatchSchema = require_schema.StampPatchSchema;
2495
+ exports.StandardFontSchema = require_schema.StandardFontSchema;
2496
+ exports.StrikeoutDTOSchema = require_schema.StrikeoutDTOSchema;
2497
+ exports.StrikeoutDraftSchema = require_schema.StrikeoutDraftSchema;
2498
+ exports.StrikeoutIntentSchema = require_schema.StrikeoutIntentSchema;
2499
+ exports.StrikeoutPatchSchema = require_schema.StrikeoutPatchSchema;
2500
+ exports.TextAlignmentSchema = require_schema.TextAlignmentSchema;
2501
+ exports.TextDTOSchema = require_schema.TextDTOSchema;
2502
+ exports.TextDraftSchema = require_schema.TextDraftSchema;
2503
+ exports.TextPatchSchema = require_schema.TextPatchSchema;
2504
+ exports.ToggleFieldWidgetSchema = require_schema.ToggleFieldWidgetSchema;
2505
+ exports.UnderlineDTOSchema = require_schema.UnderlineDTOSchema;
2506
+ exports.UnderlineDraftSchema = require_schema.UnderlineDraftSchema;
2507
+ exports.UnderlinePatchSchema = require_schema.UnderlinePatchSchema;
2508
+ exports.UnsupportedDTOSchema = require_schema.UnsupportedDTOSchema;
2509
+ exports.UnsupportedDraftSchema = require_schema.UnsupportedDraftSchema;
2510
+ exports.UnsupportedPatchSchema = require_schema.UnsupportedPatchSchema;
1876
2511
  exports.VersionAnalysisQuerySchema = require_schemas.VersionAnalysisQuerySchema;
1877
- exports.WeakAnnotationSessionPagesRequestSchema = require_schemas.WeakAnnotationSessionPagesRequestSchema;
1878
- exports.WeakAnnotationSessionResponseSchema = require_schemas.WeakAnnotationSessionResponseSchema;
1879
- exports.WidgetAppearanceSchema = require_schemas.WidgetAppearanceSchema;
1880
- exports.WidgetPlacementSchema = require_schemas.WidgetPlacementSchema;
1881
- exports.WireAttachmentFileSchema = require_schemas.WireAttachmentFileSchema;
2512
+ exports.VerticalAlignmentSchema = require_schema.VerticalAlignmentSchema;
2513
+ exports.WidgetActionsPatchSchema = require_schema.WidgetActionsPatchSchema;
2514
+ exports.WidgetAppearanceSchema = require_schema.WidgetAppearanceSchema;
2515
+ exports.WidgetAppearancesQuerySchema = require_schemas.WidgetAppearancesQuerySchema;
2516
+ exports.WidgetAppearancesRenderTokenSchema = WidgetAppearancesRenderTokenSchema;
2517
+ exports.WidgetBorderStyleSchema = require_schema.WidgetBorderStyleSchema;
2518
+ exports.WidgetCheckStyleSchema = require_schema.WidgetCheckStyleSchema;
2519
+ exports.WidgetDTOSchema = require_schema.WidgetDTOSchema;
2520
+ exports.WidgetPatchSchema = require_schema.WidgetPatchSchema;
2521
+ exports.WidgetPlacementSchema = require_schema.WidgetPlacementSchema;
2522
+ exports.WireAttachmentFileSchema = require_schema.WireAttachmentFileSchema;
1882
2523
  exports.analysisQueryString = analysisQueryString;
1883
2524
  exports.analyzeInputFromQuery = require_schemas.analyzeInputFromQuery;
1884
2525
  exports.annotationAppearancesImageOptionsToToken = annotationAppearancesImageOptionsToToken;
1885
2526
  exports.annotationAppearancesImageOptionsToWire = annotationAppearancesImageOptionsToWire;
2527
+ exports.annotationPatchSchemaOf = require_schema.annotationPatchSchemaOf;
1886
2528
  exports.annotationRenderOptionsFromImageOptions = annotationRenderOptionsFromImageOptions;
1887
2529
  exports.applyCdnAccess = applyCdnAccess;
1888
2530
  exports.cdnCoverageForScope = cdnCoverageForScope;
@@ -1892,10 +2534,13 @@ exports.decodeAnalysisToken = decodeAnalysisToken;
1892
2534
  exports.decodeAnnotationAppearancesRenderToken = decodeAnnotationAppearancesRenderToken;
1893
2535
  exports.decodeAnnotationToken = decodeAnnotationToken;
1894
2536
  exports.decodeAnnotationsAllToken = decodeAnnotationsAllToken;
2537
+ exports.decodeAnnotationsExportToken = decodeAnnotationsExportToken;
1895
2538
  exports.decodeAttachmentsToken = decodeAttachmentsToken;
1896
2539
  exports.decodeContentToken = decodeContentToken;
1897
2540
  exports.decodeDocToken = decodeDocToken;
1898
2541
  exports.decodeDownloadToken = decodeDownloadToken;
2542
+ exports.decodeFormExportToken = decodeFormExportToken;
2543
+ exports.decodeFormToken = decodeFormToken;
1899
2544
  exports.decodeLayoutToken = decodeLayoutToken;
1900
2545
  exports.decodeMetadataToken = decodeMetadataToken;
1901
2546
  exports.decodePrepared = require_schemas.decodePrepared;
@@ -1903,15 +2548,20 @@ exports.decodeRenderToken = decodeRenderToken;
1903
2548
  exports.decodeSearchToken = decodeSearchToken;
1904
2549
  exports.decodeToken = decodeToken;
1905
2550
  exports.decodeTokenText = decodeTokenText;
2551
+ exports.decodeWidgetAppearancesRenderToken = decodeWidgetAppearancesRenderToken;
1906
2552
  exports.encodeActionsToken = encodeActionsToken;
1907
2553
  exports.encodeAnalysisToken = encodeAnalysisToken;
1908
2554
  exports.encodeAnnotationAppearancesRenderToken = encodeAnnotationAppearancesRenderToken;
1909
2555
  exports.encodeAnnotationToken = encodeAnnotationToken;
1910
2556
  exports.encodeAnnotationsAllToken = encodeAnnotationsAllToken;
2557
+ exports.encodeAnnotationsExportToken = encodeAnnotationsExportToken;
2558
+ exports.encodeAppearanceModes = encodeAppearanceModes;
1911
2559
  exports.encodeAttachmentsToken = encodeAttachmentsToken;
1912
2560
  exports.encodeContentToken = encodeContentToken;
1913
2561
  exports.encodeDocToken = encodeDocToken;
1914
2562
  exports.encodeDownloadToken = encodeDownloadToken;
2563
+ exports.encodeFormExportToken = encodeFormExportToken;
2564
+ exports.encodeFormToken = encodeFormToken;
1915
2565
  exports.encodeLayoutToken = encodeLayoutToken;
1916
2566
  exports.encodeMetadataToken = encodeMetadataToken;
1917
2567
  exports.encodePrepared = require_schemas.encodePrepared;
@@ -1919,14 +2569,18 @@ exports.encodeRenderToken = encodeRenderToken;
1919
2569
  exports.encodeSearchToken = encodeSearchToken;
1920
2570
  exports.encodeToken = encodeToken;
1921
2571
  exports.encodeTokenText = encodeTokenText;
2572
+ exports.encodeWidgetAppearancesRenderToken = encodeWidgetAppearancesRenderToken;
1922
2573
  exports.flatten = flatten;
1923
- exports.fromBase64 = require_schemas.fromBase64;
2574
+ exports.fromBase64 = require_charmap.fromBase64;
2575
+ exports.pageRenderFamilyOf = require_schemas.pageRenderFamilyOf;
1924
2576
  exports.pageRenderOptionsFromImageOptions = pageRenderOptionsFromImageOptions;
1925
2577
  exports.renderImageOptionsToToken = renderImageOptionsToToken;
1926
2578
  exports.renderImageOptionsToWire = renderImageOptionsToWire;
1927
2579
  exports.resolveResourceIdForPath = resolveResourceIdForPath;
1928
- exports.toBase64 = require_schemas.toBase64;
2580
+ exports.toBase64 = require_charmap.toBase64;
1929
2581
  exports.unflatten = unflatten;
2582
+ exports.widgetAppearancesImageOptionsToToken = widgetAppearancesImageOptionsToToken;
2583
+ exports.widgetAppearancesImageOptionsToWire = widgetAppearancesImageOptionsToWire;
1930
2584
  exports.wirePaths = wirePaths;
1931
2585
  exports.wireTemplates = wireTemplates;
1932
2586