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

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 (135) hide show
  1. package/dist/AnnotationList-DcyhF2kU.d.cts +27691 -0
  2. package/dist/AnnotationList-DcyhF2kU.d.ts +27691 -0
  3. package/dist/Change-Ct-dB8D5.cjs +1133 -0
  4. package/dist/Change-Ct-dB8D5.cjs.map +1 -0
  5. package/dist/Change-tMR34hTU.js +978 -0
  6. package/dist/Change-tMR34hTU.js.map +1 -0
  7. package/dist/DocumentRenderService-9IjSQEIU.cjs +121 -0
  8. package/dist/DocumentRenderService-9IjSQEIU.cjs.map +1 -0
  9. package/dist/DocumentRenderService-DFrZ9wfW.js +86 -0
  10. package/dist/DocumentRenderService-DFrZ9wfW.js.map +1 -0
  11. package/dist/{DocumentSecurityService-Ca6EK3-3.d.ts → DocumentSecurityService-D2zA4NKi.d.cts} +100 -112
  12. package/dist/{DocumentSecurityService-CIx1MT0T.d.cts → DocumentSecurityService-YJV9df8P.d.ts} +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-DBt2-GWF.d.ts +1649 -0
  18. package/dist/LocalEngine-IA9zh3Jh.d.cts +1649 -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-BFp6XM04.cjs +2997 -0
  24. package/dist/authority-BFp6XM04.cjs.map +1 -0
  25. package/dist/authority-PuxpGFhJ.js +2506 -0
  26. package/dist/authority-PuxpGFhJ.js.map +1 -0
  27. package/dist/builders-DV62HA3I.js +165 -0
  28. package/dist/builders-DV62HA3I.js.map +1 -0
  29. package/dist/builders-DgTAj_tP.cjs +188 -0
  30. package/dist/builders-DgTAj_tP.cjs.map +1 -0
  31. package/dist/calibrate-DJbi1wuK.cjs +3012 -0
  32. package/dist/calibrate-DJbi1wuK.cjs.map +1 -0
  33. package/dist/calibrate-nQFgCuki.js +2461 -0
  34. package/dist/calibrate-nQFgCuki.js.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 +18146 -5258
  40. package/dist/conformance.cjs.map +1 -1
  41. package/dist/conformance.d.cts +1024 -170
  42. package/dist/conformance.d.ts +1024 -170
  43. package/dist/conformance.js +18148 -5309
  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 +342 -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 +59 -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-BBggAxQc.js} +298 -145
  66. package/dist/resolver-BBggAxQc.js.map +1 -0
  67. package/dist/{resolver-CYVNV4hn.cjs → resolver-BWSWSF6R.cjs} +351 -144
  68. package/dist/resolver-BWSWSF6R.cjs.map +1 -0
  69. package/dist/runtime-BaDKjxiu.d.ts +1959 -0
  70. package/dist/runtime-CWEuiwbk.d.cts +1959 -0
  71. package/dist/runtime.cjs +986 -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 +634 -179
  76. package/dist/runtime.js.map +1 -1
  77. package/dist/schema-6S2VmlAj.js +2087 -0
  78. package/dist/schema-6S2VmlAj.js.map +1 -0
  79. package/dist/schema-miH6tWQC.cjs +3046 -0
  80. package/dist/schema-miH6tWQC.cjs.map +1 -0
  81. package/dist/schemas-BE2QGOit.js +1851 -0
  82. package/dist/schemas-BE2QGOit.js.map +1 -0
  83. package/dist/schemas-DljJR9ut.cjs +2798 -0
  84. package/dist/schemas-DljJR9ut.cjs.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-CHG9qQUb.cjs +671 -0
  100. package/dist/viewport-CHG9qQUb.cjs.map +1 -0
  101. package/dist/viewport-DQR5LyX3.js +540 -0
  102. package/dist/viewport-DQR5LyX3.js.map +1 -0
  103. package/dist/wire.cjs +1242 -420
  104. package/dist/wire.cjs.map +1 -1
  105. package/dist/wire.d.cts +14840 -830
  106. package/dist/wire.d.ts +14840 -830
  107. package/dist/wire.js +985 -261
  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 +0 -3503
  133. package/dist/viewport-BWeNHZmb.cjs.map +0 -1
  134. package/dist/viewport-CvMcadfQ.js +0 -3072
  135. 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-BWSWSF6R.cjs");
4
+ const require_charmap = require("./charmap-aYlefQP9.cjs");
5
+ const require_schema = require("./schema-miH6tWQC.cjs");
6
+ const require_schemas = require("./schemas-DljJR9ut.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,9 +118,38 @@ 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
  /**
148
+ * The outline leaf: its own pin and the layout pin. The outline is read in
149
+ * page space, so a page delete or a box change moves what it reads.
150
+ */
151
+ const OutlineTokenSchema = { fields: ["layoutVersion", "outlineVersion"] };
152
+ /**
121
153
  * Layer signature analysis: the working copy judged against the base,
122
154
  * pinned by `docVersion`; `since.signature` XOR `since.revision`; `level`
123
155
  * only in exploratory mode.
@@ -141,12 +173,13 @@ const DownloadTokenSchema = {
141
173
  * dotted path here and a matching branch in `PageImageOptionsWireSchema`.
142
174
  * No encoder/decoder code changes.
143
175
  *
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.
176
+ * What a picture draws (`includeAnnotations`, `includeFormFields`) is not a
177
+ * token field: it's the picture's family, which is its path
178
+ * (`PAGE_RENDER_FAMILIES`). Each family needs its own rights and depends on
179
+ * its own planes, and a CDN grant is a path prefix. The pins are: every
180
+ * family's `contentVersion`, and `annotationVersion` and `widgetVersion` in
181
+ * the families that draw annotations and form fields; each family's query
182
+ * schema refuses the others.
150
183
  */
151
184
  const RenderTokenSchema = {
152
185
  fields: [
@@ -157,13 +190,14 @@ const RenderTokenSchema = {
157
190
  "quality",
158
191
  "rotation",
159
192
  "target.kind",
160
- "target.rect.bottom",
161
- "target.rect.left",
162
- "target.rect.right",
163
- "target.rect.top",
193
+ "target.rect.height",
194
+ "target.rect.width",
195
+ "target.rect.x",
196
+ "target.rect.y",
164
197
  "viewport.kind",
165
198
  "viewport.scale",
166
- "viewport.width"
199
+ "viewport.width",
200
+ "widgetVersion"
167
201
  ],
168
202
  maxLength: 512
169
203
  };
@@ -174,22 +208,22 @@ const RenderTokenSchema = {
174
208
  * charset excludes free text), and the resume position. Canonical by
175
209
  * construction: the codec sorts fields and the encoder omits every
176
210
  * 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
211
+ * cache hits live on. Mode is not a field; it is the endpoint (separate
178
212
  * permission tiers must never share cache entries).
179
213
  */
180
214
  const SearchTokenSchema = {
181
215
  fields: [
182
216
  "epoch",
183
217
  "format",
218
+ "from",
184
219
  "ignoreWhitespace",
220
+ "limitMatches",
221
+ "limitPages",
185
222
  "matchCase",
186
223
  "matchDiacritics",
187
- "maxMatches",
188
- "maxPages",
189
224
  "q",
190
225
  "regex",
191
226
  "skip",
192
- "startPage",
193
227
  "wholeWord"
194
228
  ],
195
229
  maxLength: 2048
@@ -197,18 +231,40 @@ const SearchTokenSchema = {
197
231
  /**
198
232
  * Token for the batch annotation-appearance render endpoint. Narrower than
199
233
  * 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).
234
+ * so there is no target — only the page's `viewport` and `rotation`. Keyed by
235
+ * `annotationVersion` only (appearances do not depend on page base content).
236
+ * `modes` is present only when a request asks for fewer than every mode, as
237
+ * one value (`normal-down`, in the engine's mode order), so one request for
238
+ * every mode is one URL.
204
239
  */
205
240
  const AnnotationAppearancesRenderTokenSchema = {
206
241
  fields: [
207
242
  "annotationVersion",
208
243
  "format",
244
+ "modes",
209
245
  "quality",
210
246
  "rotation",
211
- "scale"
247
+ "viewport.kind",
248
+ "viewport.scale",
249
+ "viewport.width"
250
+ ],
251
+ maxLength: 256
252
+ };
253
+ /**
254
+ * Token for a page's widget images (`form/pages/{p}/appearances@`): the
255
+ * annotation appearance token's options, keyed by the page's
256
+ * `widgetVersion`.
257
+ */
258
+ const WidgetAppearancesRenderTokenSchema = {
259
+ fields: [
260
+ "format",
261
+ "modes",
262
+ "quality",
263
+ "rotation",
264
+ "viewport.kind",
265
+ "viewport.scale",
266
+ "viewport.width",
267
+ "widgetVersion"
212
268
  ],
213
269
  maxLength: 256
214
270
  };
@@ -266,8 +322,108 @@ const encodeAnnotationToken = (annotationVersion) => encodeToken(AnnotationToken
266
322
  const decodeAnnotationToken = (raw) => decodePositiveInteger(decodeToken(AnnotationTokenSchema, raw).annotationVersion, "annotationVersion");
267
323
  const encodeAnnotationsAllToken = (annotationsVersion) => encodeToken(AnnotationsAllTokenSchema, { annotationsVersion });
268
324
  const decodeAnnotationsAllToken = (raw) => decodePositiveInteger(decodeToken(AnnotationsAllTokenSchema, raw).annotationsVersion, "annotationsVersion");
325
+ const encodeFormToken = (formsVersion) => encodeToken(FormTokenSchema, { formsVersion });
326
+ const decodeFormToken = (raw) => decodePositiveInteger(decodeToken(FormTokenSchema, raw).formsVersion, "formsVersion");
327
+ const encodeAnnotationsExportToken = (token) => {
328
+ const { selection } = token;
329
+ const wire = {};
330
+ if (selection.pages) wire.p = [...new Set(selection.pages.map((page) => page.objectNumber))].sort((left, right) => left - right);
331
+ if (selection.refs) {
332
+ const refs = /* @__PURE__ */ new Map();
333
+ for (const ref of selection.refs) {
334
+ const entry = [ref.page.objectNumber, require_resolver.encodeAnnotKey(ref)];
335
+ refs.set(JSON.stringify(entry), entry);
336
+ }
337
+ wire.r = [...refs.keys()].sort().map((key) => refs.get(key));
338
+ }
339
+ return encodeToken(AnnotationsExportTokenSchema, {
340
+ annotationsVersion: token.annotationsVersion,
341
+ layoutVersion: token.layoutVersion,
342
+ include: selection.include === "references" ? "references" : void 0,
343
+ selection: wire.p || wire.r ? encodeTokenText(JSON.stringify(wire)) : void 0
344
+ });
345
+ };
346
+ const decodeAnnotationsExportToken = (raw) => {
347
+ const query = decodeToken(AnnotationsExportTokenSchema, raw);
348
+ const selection = {};
349
+ if (query.include !== void 0) {
350
+ if (query.include !== "references") throw new Error(`unknown include "${query.include}"`);
351
+ selection.include = "references";
352
+ }
353
+ if (query.selection !== void 0) {
354
+ const wire = JSON.parse(decodeTokenText(query.selection));
355
+ const isNumber = (value) => Number.isInteger(value) && value > 0;
356
+ if (typeof wire !== "object" || wire === null) throw new Error("malformed export selection");
357
+ if (wire.p !== void 0) {
358
+ if (!Array.isArray(wire.p) || !wire.p.every(isNumber)) throw new Error("malformed export pages");
359
+ selection.pages = wire.p.map((pageObjectNumber) => require_format.toPageRef(pageObjectNumber));
360
+ }
361
+ if (wire.r !== void 0) {
362
+ if (!Array.isArray(wire.r)) throw new Error("malformed export refs");
363
+ selection.refs = wire.r.map((entry) => {
364
+ if (!Array.isArray(entry) || entry.length !== 2 || !isNumber(entry[0])) throw new Error("malformed export ref");
365
+ const ref = typeof entry[1] === "string" ? require_resolver.decodeAnnotKey(require_format.toPageRef(entry[0]), entry[1]) : null;
366
+ if (!ref) throw new Error("malformed export ref");
367
+ return ref;
368
+ });
369
+ }
370
+ }
371
+ return {
372
+ annotationsVersion: decodePositiveInteger(query.annotationsVersion, "annotationsVersion"),
373
+ layoutVersion: decodePositiveInteger(query.layoutVersion, "layoutVersion"),
374
+ selection
375
+ };
376
+ };
377
+ const encodeFormExportToken = (token) => {
378
+ const { selection } = token;
379
+ const wire = {};
380
+ if (selection.pages) wire.p = [...new Set(selection.pages.map((page) => page.objectNumber))].sort((left, right) => left - right);
381
+ if (selection.fields) wire.f = [...new Set(selection.fields.map(require_format.encodeFieldRefKey))].sort();
382
+ return encodeToken(FormExportTokenSchema, {
383
+ formsVersion: token.formsVersion,
384
+ layoutVersion: token.layoutVersion,
385
+ selection: wire.p || wire.f ? encodeTokenText(JSON.stringify(wire)) : void 0
386
+ });
387
+ };
388
+ const decodeFormExportToken = (raw) => {
389
+ const query = decodeToken(FormExportTokenSchema, raw);
390
+ const selection = {};
391
+ if (query.selection !== void 0) {
392
+ const wire = JSON.parse(decodeTokenText(query.selection));
393
+ if (typeof wire !== "object" || wire === null) throw new Error("malformed export selection");
394
+ if (wire.p !== void 0) {
395
+ const isNumber = (value) => Number.isInteger(value) && value > 0;
396
+ if (!Array.isArray(wire.p) || !wire.p.every(isNumber)) throw new Error("malformed export pages");
397
+ selection.pages = wire.p.map((pageObjectNumber) => require_format.toPageRef(pageObjectNumber));
398
+ }
399
+ if (wire.f !== void 0) {
400
+ if (!Array.isArray(wire.f)) throw new Error("malformed export fields");
401
+ selection.fields = wire.f.map((key) => {
402
+ const ref = typeof key === "string" ? require_format.decodeFieldRefKey(key) : null;
403
+ if (!ref) throw new Error("malformed export field");
404
+ return ref;
405
+ });
406
+ }
407
+ }
408
+ return {
409
+ formsVersion: decodePositiveInteger(query.formsVersion, "formsVersion"),
410
+ layoutVersion: decodePositiveInteger(query.layoutVersion, "layoutVersion"),
411
+ selection
412
+ };
413
+ };
269
414
  const encodeActionsToken = (actionsVersion) => encodeToken(ActionsTokenSchema, { actionsVersion });
270
415
  const decodeActionsToken = (raw) => decodePositiveInteger(decodeToken(ActionsTokenSchema, raw).actionsVersion, "actionsVersion");
416
+ const encodeOutlineToken = (token) => encodeToken(OutlineTokenSchema, {
417
+ layoutVersion: token.layoutVersion,
418
+ outlineVersion: token.outlineVersion
419
+ });
420
+ const decodeOutlineToken = (raw) => {
421
+ const query = decodeToken(OutlineTokenSchema, raw);
422
+ return {
423
+ outlineVersion: decodePositiveInteger(query.outlineVersion, "outlineVersion"),
424
+ layoutVersion: decodePositiveInteger(query.layoutVersion, "layoutVersion")
425
+ };
426
+ };
271
427
  const encodeAttachmentsToken = (attachmentsVersion) => encodeToken(AttachmentsTokenSchema, { attachmentsVersion });
272
428
  const decodeAttachmentsToken = (raw) => decodePositiveInteger(decodeToken(AttachmentsTokenSchema, raw).attachmentsVersion, "attachmentsVersion");
273
429
  const encodeDownloadToken = (input) => encodeToken(DownloadTokenSchema, {
@@ -285,7 +441,7 @@ const decodeDownloadToken = (raw) => {
285
441
  * Encode a render token from a flat wire-shape input. The input is the
286
442
  * output of `flatten(...)` over an SDK `PageImageOptions`-shaped object plus
287
443
  * cache versions. Semantic invariants (viewport-kind XOR fields, per-family
288
- * pin grammar — annotatedness itself is PATH-expressed, never a token key —
444
+ * pin grammar — annotatedness itself is path-expressed, never a token key —
289
445
  * target rect coherence) live in the per-family render query schemas —
290
446
  * running them here would duplicate the spec.
291
447
  */
@@ -302,18 +458,24 @@ const decodeRenderToken = (raw) => decodeToken(RenderTokenSchema, raw);
302
458
  * plus cache versions). Semantic validation lives in
303
459
  * `AnnotationAppearancesQuerySchema`.
304
460
  */
461
+ /** `modes` as one token value: the modes in engine order, joined by `-`. */
462
+ const encodeAppearanceModes = (modes) => modes.join("-");
305
463
  const encodeAnnotationAppearancesRenderToken = (input) => encodeToken(AnnotationAppearancesRenderTokenSchema, input);
306
464
  /** Decode an annotation-appearance render token to a flat field map. */
307
465
  const decodeAnnotationAppearancesRenderToken = (raw) => decodeToken(AnnotationAppearancesRenderTokenSchema, raw);
466
+ /** Encode a widget-appearance render token, the annotation one's twin keyed by `widgetVersion`. */
467
+ const encodeWidgetAppearancesRenderToken = (input) => encodeToken(WidgetAppearancesRenderTokenSchema, input);
468
+ /** Decode a widget-appearance render token to a flat field map. */
469
+ const decodeWidgetAppearancesRenderToken = (raw) => decodeToken(WidgetAppearancesRenderTokenSchema, raw);
308
470
  /**
309
- * The search RESULT representation this client speaks — part of the token
471
+ * The search result representation this client speaks — part of the token
310
472
  * (and therefore the versioned URL), so a response-shape change can never
311
473
  * 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 —
474
+ * and old tokens fail decode on new servers. Deliberately always encoded —
313
475
  * an exception to the omit-defaults rule, because its entire job is to
314
476
  * change the token bytes when the format changes.
315
477
  */
316
- const SEARCH_RESULT_FORMAT = "segments1";
478
+ const SEARCH_RESULT_FORMAT = "ranges1";
317
479
  const encodeSearchToken = (input) => {
318
480
  const q = input.query;
319
481
  return encodeToken(SearchTokenSchema, {
@@ -325,17 +487,17 @@ const encodeSearchToken = (input) => {
325
487
  matchDiacritics: q.matchDiacritics ? true : void 0,
326
488
  wholeWord: q.wholeWord ? true : void 0,
327
489
  ignoreWhitespace: q.ignoreWhitespace ? true : void 0,
328
- startPage: input.startPage,
490
+ from: input.from,
329
491
  skip: input.skip > 0 ? input.skip : void 0,
330
- maxPages: input.budget?.maxPages,
331
- maxMatches: input.budget?.maxMatches
492
+ limitPages: input.limit?.pages,
493
+ limitMatches: input.limit?.matches
332
494
  });
333
495
  };
334
496
  const decodeSearchToken = (raw) => {
335
497
  const t = decodeToken(SearchTokenSchema, raw);
336
498
  if (t.epoch === void 0) throw new Error("search token is missing \"epoch\"");
337
499
  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}")`);
500
+ if (t.format !== "ranges1") throw new Error(`search token has unsupported result format "${t.format ?? "legacy"}" (expected "${SEARCH_RESULT_FORMAT}")`);
339
501
  const query = {
340
502
  text: decodeTokenText(t.q),
341
503
  ...t.regex === "true" ? { regex: true } : {},
@@ -344,16 +506,16 @@ const decodeSearchToken = (raw) => {
344
506
  ...t.wholeWord === "true" ? { wholeWord: true } : {},
345
507
  ...t.ignoreWhitespace === "true" ? { ignoreWhitespace: true } : {}
346
508
  };
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");
509
+ const pages = t.limitPages === void 0 ? void 0 : decodePositiveInteger(t.limitPages, "limitPages");
510
+ const matches = t.limitMatches === void 0 ? void 0 : decodePositiveInteger(t.limitMatches, "limitMatches");
349
511
  return {
350
512
  epoch: t.epoch,
351
513
  query,
352
- ...t.startPage === void 0 ? {} : { startPage: decodePositiveInteger(t.startPage, "startPage") },
514
+ ...t.from === void 0 ? {} : { from: decodePositiveInteger(t.from, "from") },
353
515
  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 } : {}
516
+ ...pages !== void 0 || matches !== void 0 ? { limit: {
517
+ ...matches !== void 0 ? { matches } : {},
518
+ ...pages !== void 0 ? { pages } : {}
357
519
  } } : {}
358
520
  };
359
521
  };
@@ -407,7 +569,7 @@ function decodePdfSaveMode(raw) {
407
569
  * Single source of truth for cloud HTTP paths. Both @cloudpdf/engine and
408
570
  * @cloudpdf/server import these so they cannot drift.
409
571
  *
410
- * **URL layout convention (paths v2)**
572
+ * **URL layout convention**
411
573
  *
412
574
  * Each resource type lives at its own distinct path prefix. This
413
575
  * lets prefix-matching CDNs (Bunny, Cloud CDN, Azure FD) enforce
@@ -419,28 +581,37 @@ function decodePdfSaveMode(raw) {
419
581
  * /v1/docs/{id} — doc root
420
582
  * /v1/docs/{id}/manifest@{ver} — doc-level read
421
583
  * /v1/docs/{id}/render/pages/{N}/data@{ver} — render is its own prefix
584
+ * /v1/docs/{id}/render/{annotations,fields,all}/pages/{N}/data@{ver} — and each picture family
585
+ * /v1/docs/{id}/render/{print,print-high}/…/pages/{N}/data@{ver} — and each print tier of each
422
586
  * /v1/docs/{id}/text/pages/{N}/data@{ver} — text is its own prefix
423
587
  * /v1/docs/{id}/geometry/pages/{N}/data@{ver} — geometry is its own prefix
424
588
  * /v1/docs/{id}/layers/{L}/manifest@{ver}
425
589
  * /v1/docs/{id}/layers/{L}/metadata@{ver}
590
+ * /v1/docs/{id}/layers/{L}/metadata/custom@{ver} — the Info dict's own keys
426
591
  * /v1/docs/{id}/layers/{L}/render/pages/{N}/data@{ver}
427
592
  * /v1/docs/{id}/layers/{L}/text/pages/{N}/data@{ver}
428
593
  * /v1/docs/{id}/layers/{L}/geometry/pages/{N}/data@{ver}
429
594
  * /v1/docs/{id}/layers/{L}/annotations/pages/{N}/items@{ver} — collection (read)
430
595
  * /v1/docs/{id}/layers/{L}/annotations/pages/{N}/items — collection (create)
431
596
  * /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
434
- * /v1/docs/{id}/layers/{L}/pages/rotate — batch absolute rotation
435
- * /v1/docs/{id}/layers/{L}/pages/delete — batch page delete
436
- * /v1/docs/{id}/layers/{L}/form — reconciled snapshot (read)
597
+ * /v1/docs/{id}/layers/{L}/annotations/pages/{N}/items/reorder — stacking order
598
+ * /v1/docs/{id}/form@{ver} — the form: fields + widget rows (read)
599
+ * /v1/docs/{id}/form/pages/{N}/appearances@{ver} — a page's widget images (read)
600
+ * /v1/docs/{id}/layers/{L}/form@{ver}
601
+ * /v1/docs/{id}/layers/{L}/form/pages/{N}/appearances@{ver}
602
+ * /v1/docs/{id}/layers/{L}/form — the form, current (read)
603
+ * /v1/docs/{id}/layers/{L}/form/widgets/{N}/{key} — a widget's place and look (patch)
604
+ * /v1/docs/{id}/layers/{L}/form/widgets/{N}/reorder — the widgets' stacking order
437
605
  * /v1/docs/{id}/layers/{L}/form/fields — field collection (create)
438
606
  * /v1/docs/{id}/layers/{L}/form/fields/{key} — field member (read/patch/delete)
439
607
  * /v1/docs/{id}/layers/{L}/form/fields/{key}/value — value write (fill)
440
608
  * /v1/docs/{id}/layers/{L}/form/fields/{key}/reset — reset to /DV (fill)
441
609
  * /v1/docs/{id}/layers/{L}/form/fields/{key}/widgets — adopt a widget (attach)
442
610
  * /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)
611
+ * /v1/docs/{id}/layers/{L}/form/export@{token} — form bundle export (GET)
612
+ * /v1/docs/{id}/layers/{L}/form/export — form bundle export by body (POST)
613
+ * /v1/docs/{id}/layers/{L}/form/import — design import (multipart POST)
614
+ * /v1/docs/{id}/layers/{L}/form/import-values — values import (multipart POST)
444
615
  * /v1/docs/{id}/layers/{L}/form/repair — durable reconciliation
445
616
  * /v1/docs/{id}/layers/{L}/download@{ver}
446
617
  *
@@ -457,16 +628,21 @@ const wirePaths = {
457
628
  * against the token like every layer route — the grant is
458
629
  * layer-scoped in substance: CDN coverage, scopes, and the client's
459
630
  * binding all carry the layer). Path-addressed so the affinity tier —
460
- * the `X-CloudPDF-Doc` header derivation AND the chart's uri-mode
631
+ * the `X-CloudPDF-Doc` header derivation and the chart's uri-mode
461
632
  * regex — pins the session bootstrap to the document's pod from the
462
633
  * very first request. Default-layer callers spell `layers/default/`,
463
634
  * same as every other layer route.
464
635
  */
465
636
  access: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/access`,
466
- /** Deprecated alias (docId in the BODY) — served for one prerelease
637
+ /** Deprecated alias (docId in the body) — served for one prerelease
467
638
  * cycle so pre-rename clients keep working; remove after. */
468
639
  accessLegacy: "/v1/access",
469
640
  /**
641
+ * POST `{ count }`: hand the caller's editing session `count` more object
642
+ * numbers at once (at most 1,000), for a large paste.
643
+ */
644
+ objectNumbers: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/object-numbers`,
645
+ /**
470
646
  * GET: open the document referenced by the doc-scoped JWT and
471
647
  * return its `DocumentHead`. The server materialises the base
472
648
  * PDF into its file cache and binds it to a worker the first
@@ -504,9 +680,9 @@ const wirePaths = {
504
680
  */
505
681
  layerLayout: (docId, layerName, layoutVersion) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/layout@${encodeLayoutToken(layoutVersion)}`,
506
682
  /**
507
- * Immutable BASE page-geometry list (plane-scope model): the shared-URL
683
+ * Immutable base page-geometry list (plane-scope model): the shared-URL
508
684
  * variant a layout-inheriting layer resolves at — every visitor's page
509
- * list is ONE CDN object served from the base worker session.
685
+ * list is one CDN object served from the base worker session.
510
686
  */
511
687
  docLayout: (docId, layoutVersion) => `/v1/docs/${encodeURIComponent(docId)}/layout@${encodeLayoutToken(layoutVersion)}`,
512
688
  layerLayoutCurrent: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/layout`,
@@ -520,12 +696,30 @@ const wirePaths = {
520
696
  */
521
697
  layerMetadata: (docId, layerName, metadataVersion) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/metadata@${encodeMetadataToken(metadataVersion)}`,
522
698
  layerMetadataCurrent: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/metadata`,
523
- /** Immutable BASE metadata (plane-scope model): the shared-URL variant a
699
+ /** Immutable base metadata (plane-scope model): the shared-URL variant a
524
700
  * metadata-inheriting layer resolves at. */
525
701
  docMetadata: (docId, metadataVersion) => `/v1/docs/${encodeURIComponent(docId)}/metadata@${encodeMetadataToken(metadataVersion)}`,
702
+ /**
703
+ * GET: the Info dict's custom keys for the layer at a specific
704
+ * `metadataVersion` — the same version pointer as `layerMetadata`, since
705
+ * both halves live in one dict. Content-addressed like it.
706
+ */
707
+ layerCustomMetadata: (docId, layerName, metadataVersion) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/metadata/custom@${encodeMetadataToken(metadataVersion)}`,
708
+ layerCustomMetadataCurrent: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/metadata/custom`,
709
+ /** Immutable base custom keys: the shared-URL twin of `layerCustomMetadata`. */
710
+ docCustomMetadata: (docId, metadataVersion) => `/v1/docs/${encodeURIComponent(docId)}/metadata/custom@${encodeMetadataToken(metadataVersion)}`,
711
+ /**
712
+ * GET: the layer's outline at its `outlineVersion` and `layoutVersion`
713
+ * (the outline is read in page space). Content-addressed: a stale pin 404s
714
+ * and the client refreshes its manifest.
715
+ */
716
+ layerOutline: (docId, layerName, token) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/outline@${encodeOutlineToken(token)}`,
717
+ layerOutlineCurrent: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/outline`,
718
+ /** Immutable base outline: the shared-URL twin an outline-inheriting layer resolves at. */
719
+ docOutline: (docId, token) => `/v1/docs/${encodeURIComponent(docId)}/outline@${encodeOutlineToken(token)}`,
526
720
  /** Immutable catalog-owned actions, independently pinned in the manifest. */
527
721
  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
722
+ /** Immutable base catalog actions (plane-scope model): the shared-URL
529
723
  * variant an actions-inheriting layer resolves at. */
530
724
  docActions: (docId, actionsVersion) => `/v1/docs/${encodeURIComponent(docId)}/actions@${encodeActionsToken(actionsVersion)}`,
531
725
  /** Immutable layer signature snapshot (base signatures + the layer's fields + protection). */
@@ -539,7 +733,7 @@ const wirePaths = {
539
733
  /** POST (JSON): install the CMS and publish the sealed bytes as the next base version. */
540
734
  layerSignatureComplete: (docId, layerName, signingId) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/signatures/${encodeURIComponent(signingId)}/complete`,
541
735
  /** DELETE: discard a pending signing. */
542
- layerSignatureAbort: (docId, layerName, signingId) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/signatures/${encodeURIComponent(signingId)}`,
736
+ layerSignatureCancel: (docId, layerName, signingId) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/signatures/${encodeURIComponent(signingId)}`,
543
737
  /** The document's base versions, oldest first (grows; never cached). */
544
738
  docVersions: (docId) => `/v1/docs/${encodeURIComponent(docId)}/versions`,
545
739
  /** Immutable: the signature snapshot of one base version. */
@@ -558,21 +752,19 @@ const wirePaths = {
558
752
  layerFormFieldSignatureAppearance: (docId, layerName, fieldKey) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/fields/${encodeURIComponent(fieldKey)}/signature-appearance`,
559
753
  /** POST: rewrite the document Info dict for the layer (metadata edit). */
560
754
  layerMetadataUpdate: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/metadata`,
755
+ /** POST: set and remove the Info dict's custom keys for the layer. */
756
+ layerCustomMetadataUpdate: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/metadata/custom`,
561
757
  /**
562
- * Immutable BASE /EmbeddedFiles listing: the shared-URL variant an
758
+ * Immutable base /EmbeddedFiles listing: the shared-URL variant an
563
759
  * attachments-undiverged layer resolves at — every visitor's sidebar list
564
- * is ONE CDN object served from the base worker session.
760
+ * is one CDN object served from the base worker session.
565
761
  */
566
762
  docAttachments: (docId, attachmentsVersion) => `/v1/docs/${encodeURIComponent(docId)}/attachments@${encodeAttachmentsToken(attachmentsVersion)}`,
567
- /** Immutable BASE decoded bytes of one embedded file (twin of
763
+ /** Immutable base decoded bytes of one embedded file (twin of
568
764
  * `layerAttachmentFile` — same capability tier split). */
569
765
  docAttachmentFile: (docId, key, attachmentsVersion) => `/v1/docs/${encodeURIComponent(docId)}/attachment-files/${encodeTokenText(key)}/data@${encodeAttachmentsToken(attachmentsVersion)}`,
570
766
  /** Immutable /EmbeddedFiles listing, pinned by `attachmentsVersion`. */
571
767
  layerAttachments: (docId, layerName, attachmentsVersion) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/attachments@${encodeAttachmentsToken(attachmentsVersion)}`,
572
- /** POST: create a document-level embedded file (multipart mutation envelope). */
573
- layerAttachmentsCollection: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/attachments`,
574
- /** DELETE: remove a document-level embedded file by name-tree key. */
575
- layerAttachmentItem: (docId, layerName, key) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/attachments/${encodeTokenText(key)}`,
576
768
  /**
577
769
  * Immutable decoded bytes of one document-level embedded file. Lives
578
770
  * under its own `attachment-files` prefix — a stronger capability tier
@@ -581,14 +773,14 @@ const wirePaths = {
581
773
  */
582
774
  layerAttachmentFile: (docId, layerName, key, attachmentsVersion) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/attachment-files/${encodeTokenText(key)}/data@${encodeAttachmentsToken(attachmentsVersion)}`,
583
775
  /** 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)}`,
776
+ 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
777
  /**
586
- * Immutable BASE bytes of a FileAttachment annotation's embedded file
778
+ * Immutable base bytes of a FileAttachment annotation's embedded file
587
779
  * (plane-scope model). Depends on the `annotations` plane (the annotation
588
- * exists in this view) AND the `attachments` plane (the pin); the origin
780
+ * exists in this view) and the `attachments` plane (the pin); the origin
589
781
  * guard requires both inherited.
590
782
  */
591
- docAnnotationFile: (docId, pageObjectNumber, annotKey, attachmentsVersion) => `/v1/docs/${encodeURIComponent(docId)}/attachment-files/pages/${pageObjectNumber}/items/${encodeURIComponent(annotKey)}/data@${encodeAttachmentsToken(attachmentsVersion)}`,
783
+ docAnnotationFile: (docId, page, annotKey, attachmentsVersion) => `/v1/docs/${encodeURIComponent(docId)}/attachment-files/pages/${encodeURIComponent(require_format.encodePageKey(page))}/items/${encodeURIComponent(annotKey)}/data@${encodeAttachmentsToken(attachmentsVersion)}`,
592
784
  /**
593
785
  * GET: full plain-text extraction for a single page at a specific
594
786
  * `contentVersion`. Content-addressed; CDN may cache forever.
@@ -596,55 +788,70 @@ const wirePaths = {
596
788
  * retry walks `/head` → `/manifest@docVersion=N` to learn the new
597
789
  * `contentVersion`.
598
790
  */
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`,
791
+ docPageText: (docId, page, contentVersion) => `/v1/docs/${encodeURIComponent(docId)}/text/pages/${encodeURIComponent(require_format.encodePageKey(page))}/data@${encodeContentToken(contentVersion)}`,
792
+ layerPageText: (docId, layerName, page, contentVersion) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/text/pages/${encodeURIComponent(require_format.encodePageKey(page))}/data@${encodeContentToken(contentVersion)}`,
793
+ layerPageTextCurrent: (docId, layerName, page) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/text/pages/${encodeURIComponent(require_format.encodePageKey(page))}/data`,
794
+ docPageGeometry: (docId, page, contentVersion) => `/v1/docs/${encodeURIComponent(docId)}/geometry/pages/${encodeURIComponent(require_format.encodePageKey(page))}/data@${encodeContentToken(contentVersion)}`,
795
+ docPageGeometryCurrent: (docId, page) => `/v1/docs/${encodeURIComponent(docId)}/geometry/pages/${encodeURIComponent(require_format.encodePageKey(page))}/data`,
606
796
  /**
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.
797
+ * A page picture of one family (`PAGE_RENDER_FAMILIES`). The family is a
798
+ * path of its own, never a token field: each depends on its own planes and
799
+ * needs its own rights, and an edge grant sees only prefixes. Its token
800
+ * carries the family's pins.
615
801
  */
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`,
802
+ docPageRender: (docId, family, page, token) => `/v1/docs/${encodeURIComponent(docId)}/${require_schemas.PAGE_RENDER_FAMILIES[family].path}/${encodeURIComponent(require_format.encodePageKey(page))}/data@${encodeRenderToken(token)}`,
803
+ docPageRenderCurrent: (docId, family, page) => `/v1/docs/${encodeURIComponent(docId)}/${require_schemas.PAGE_RENDER_FAMILIES[family].path}/${encodeURIComponent(require_format.encodePageKey(page))}/data`,
625
804
  /**
626
- * Immutable BASE annotation list for a single page (plane-scope model):
805
+ * A print picture (`PAGE_PRINT_FAMILIES`): a family printed at a tier. The
806
+ * tier is a right, so it is in the path like the family; the token carries
807
+ * the family's pins and the image format, nothing that sizes the picture.
808
+ */
809
+ docPagePrint: (docId, tier, family, page, token) => `/v1/docs/${encodeURIComponent(docId)}/${require_schemas.PAGE_PRINT_FAMILIES[tier][family].path}/${encodeURIComponent(require_format.encodePageKey(page))}/data@${encodeRenderToken(token)}`,
810
+ docPagePrintCurrent: (docId, tier, family, page) => `/v1/docs/${encodeURIComponent(docId)}/${require_schemas.PAGE_PRINT_FAMILIES[tier][family].path}/${encodeURIComponent(require_format.encodePageKey(page))}/data`,
811
+ layerPageGeometry: (docId, layerName, page, contentVersion) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/geometry/pages/${encodeURIComponent(require_format.encodePageKey(page))}/data@${encodeContentToken(contentVersion)}`,
812
+ layerPageGeometryCurrent: (docId, layerName, page) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/geometry/pages/${encodeURIComponent(require_format.encodePageKey(page))}/data`,
813
+ 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)}`,
814
+ 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`,
815
+ /** Layer twin of `docPagePrint`. */
816
+ layerPagePrint: (docId, layerName, tier, family, page, token) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/${require_schemas.PAGE_PRINT_FAMILIES[tier][family].path}/${encodeURIComponent(require_format.encodePageKey(page))}/data@${encodeRenderToken(token)}`,
817
+ layerPagePrintCurrent: (docId, layerName, tier, family, page) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/${require_schemas.PAGE_PRINT_FAMILIES[tier][family].path}/${encodeURIComponent(require_format.encodePageKey(page))}/data`,
818
+ /**
819
+ * Immutable base annotation list for a single page (plane-scope model):
627
820
  * 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
821
+ * base's own annotations (inline ones included) are simply visible
822
+ * through every pristine layer, so 1,000 visitors' sidebars are one CDN
630
823
  * object served from the base worker session.
631
824
  */
632
- docPageAnnotations: (docId, pageObjectNumber, annotationVersion) => `/v1/docs/${encodeURIComponent(docId)}/annotations/pages/${pageObjectNumber}/items@${encodeAnnotationToken(annotationVersion)}`,
633
- /** Immutable BASE whole-document annotation listing (bulk hydration). */
825
+ docPageAnnotations: (docId, page, annotationVersion) => `/v1/docs/${encodeURIComponent(docId)}/annotations/pages/${encodeURIComponent(require_format.encodePageKey(page))}/items@${encodeAnnotationToken(annotationVersion)}`,
826
+ /** Immutable base whole-document annotation listing (bulk hydration). */
634
827
  docAnnotationsAll: (docId, annotationsVersion) => `/v1/docs/${encodeURIComponent(docId)}/annotations/items@${encodeAnnotationsAllToken(annotationsVersion)}`,
635
- /** Immutable BASE appearance batch (twin of
828
+ /** Immutable base appearance batch (twin of
636
829
  * `layerPageAnnotationAppearances` — same `annotations` plane gate). */
637
- docPageAnnotationAppearances: (docId, pageObjectNumber, token) => `/v1/docs/${encodeURIComponent(docId)}/annotations/pages/${pageObjectNumber}/appearances@${encodeAnnotationAppearancesRenderToken(token)}`,
830
+ docPageAnnotationAppearances: (docId, page, token) => `/v1/docs/${encodeURIComponent(docId)}/annotations/pages/${encodeURIComponent(require_format.encodePageKey(page))}/appearances@${encodeAnnotationAppearancesRenderToken(token)}`,
638
831
  /**
639
832
  * GET: full annotation list for a single page at a specific
640
833
  * `annotationVersion`. Same cache-control rules and 404-retry
641
834
  * semantics as `docPageText`. The `items` suffix is the
642
835
  * collection name — see file-level docstring.
643
836
  */
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). */
837
+ layerPageAnnotations: (docId, layerName, page, annotationVersion) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/pages/${encodeURIComponent(require_format.encodePageKey(page))}/items@${encodeAnnotationToken(annotationVersion)}`,
838
+ /** Immutable base annotation export: a bundle as multipart, needing
839
+ * `doc.annotate.read` and `doc.download`. */
840
+ docAnnotationsExport: (docId, token) => `/v1/docs/${encodeURIComponent(docId)}/annotations/export@${encodeAnnotationsExportToken(token)}`,
841
+ /** Immutable layer annotation export (twin of `docAnnotationsExport`). */
842
+ layerAnnotationsExport: (docId, layerName, token) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/export@${encodeAnnotationsExportToken(token)}`,
843
+ /**
844
+ * A layer annotation export whose selection a URL can't carry (position
845
+ * refs, long ref lists): a POST of the pins and the selection, not cached.
846
+ */
847
+ layerAnnotationsExportRequest: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/export`,
848
+ /** A layer's changes: user actions, each its ops in one transaction, or an undo (`doc.apply`). */
849
+ layerChanges: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/changes`,
850
+ /** A bundle's annotations, created in the layer as one change (`doc.annotations.import`). */
851
+ layerAnnotationsImport: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/import`,
852
+ /** Immutable layer whole-document annotation listing (bulk hydration). */
646
853
  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`,
854
+ layerPageAnnotationsCurrent: (docId, layerName, page) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/pages/${encodeURIComponent(require_format.encodePageKey(page))}/items`,
648
855
  /**
649
856
  * GET: batch-rendered annotation appearance bitmaps for a single page as a
650
857
  * `multipart/form-data` body. Sibling collection of `items` under the same
@@ -655,28 +862,52 @@ const wirePaths = {
655
862
  * Content-addressed via the appearance render token (`annotationVersion`
656
863
  * plus render options like scale/format); CDN may cache forever. Appearance
657
864
  * pixels depend only on the annotation `/AP` stream, so `contentVersion` is
658
- * deliberately NOT part of the key.
865
+ * deliberately not part of the key.
659
866
  */
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`,
867
+ layerPageAnnotationAppearances: (docId, layerName, page, token) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/pages/${encodeURIComponent(require_format.encodePageKey(page))}/appearances@${encodeAnnotationAppearancesRenderToken(token)}`,
868
+ layerPageAnnotationAppearancesCurrent: (docId, layerName, page) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/pages/${encodeURIComponent(require_format.encodePageKey(page))}/appearances`,
869
+ layerPageAnnotationsCreate: (docId, layerName, page) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/pages/${encodeURIComponent(require_format.encodePageKey(page))}/items`,
870
+ layerAnnotationByKey: (docId, layerName, page, key) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/pages/${encodeURIComponent(require_format.encodePageKey(page))}/items/${encodeURIComponent(key)}`,
871
+ /** GET: an annotation's `appearance` resource, its drawing as a one-page
872
+ * PDF — a derived read (application/pdf, no-store), gated like pages/extract. */
873
+ layerAnnotationAppearanceResource: (docId, layerName, page, key) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/pages/${encodeURIComponent(require_format.encodePageKey(page))}/items/${encodeURIComponent(key)}/resources/appearance`,
874
+ layerPageAnnotationsReorder: (docId, layerName, page) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/pages/${encodeURIComponent(require_format.encodePageKey(page))}/items/reorder`,
665
875
  /** POST: flatten a chosen set of the page's annotations into its content
666
876
  * (a content + annotation mutation of that page). */
667
- layerPageAnnotationsFlatten: (docId, layerName, pageObjectNumber) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/pages/${pageObjectNumber}/items/flatten`,
877
+ layerPageAnnotationsFlatten: (docId, layerName, page) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/pages/${encodeURIComponent(require_format.encodePageKey(page))}/items/flatten`,
668
878
  /** POST: the chosen annotations' appearances as one single-page PDF — a
669
879
  * 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`,
880
+ layerPageAnnotationsAppearance: (docId, layerName, page) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/pages/${encodeURIComponent(require_format.encodePageKey(page))}/items/appearance`,
881
+ /**
882
+ * Immutable base form: the fields, every widget row, the calculation
883
+ * order (`doc.forms.list()`), at the document's `formsVersion`. Needs
884
+ * `doc.forms.read`, under its own prefix, so the CDN signs it apart from
885
+ * the annotations.
886
+ */
887
+ docForm: (docId, formsVersion) => `/v1/docs/${encodeURIComponent(docId)}/form@${encodeFormToken(formsVersion)}`,
888
+ /** Immutable layer form (twin of `docForm`). */
889
+ layerForm: (docId, layerName, formsVersion) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form@${encodeFormToken(formsVersion)}`,
890
+ /** GET: the layer's form as it is now — for API callers, served `no-store`. */
891
+ layerFormCurrent: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form`,
892
+ /**
893
+ * Immutable base batch of a page's widget images, every mode and state, as
894
+ * `multipart/form-data` (`page.forms.renderAppearances()`), keyed by the
895
+ * page's `widgetVersion`.
896
+ */
897
+ docPageFormAppearances: (docId, page, token) => `/v1/docs/${encodeURIComponent(docId)}/form/pages/${encodeURIComponent(require_format.encodePageKey(page))}/appearances@${encodeWidgetAppearancesRenderToken(token)}`,
898
+ /** Immutable layer twin of `docPageFormAppearances`. */
899
+ layerPageFormAppearances: (docId, layerName, page, token) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/pages/${encodeURIComponent(require_format.encodePageKey(page))}/appearances@${encodeWidgetAppearancesRenderToken(token)}`,
900
+ layerPageFormAppearancesCurrent: (docId, layerName, page) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/pages/${encodeURIComponent(require_format.encodePageKey(page))}/appearances`,
671
901
  /**
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.
902
+ * PATCH: a widget's place and look (`doc.forms.updateWidget`). `key` is
903
+ * the widget's annotation key. Not under `form/pages/`, which the CDN
904
+ * signs for reads.
678
905
  */
679
- layerForm: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form`,
906
+ /** POST: the form's calculation order (`doc.forms.reorderCalculations`). */
907
+ layerFormCalculationsReorder: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/calculations/reorder`,
908
+ /** POST: the stacking order of a page's widgets (`doc.forms.reorderWidgets`). */
909
+ layerFormWidgetsReorder: (docId, layerName, page) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/widgets/${encodeURIComponent(require_format.encodePageKey(page))}/reorder`,
910
+ layerFormWidget: (docId, layerName, page, key) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/widgets/${encodeURIComponent(require_format.encodePageKey(page))}/${encodeURIComponent(key)}`,
680
911
  /** POST: create a field (optionally with styled widget placements). */
681
912
  layerFormFields: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/fields`,
682
913
  /**
@@ -687,9 +918,9 @@ const wirePaths = {
687
918
  layerFormFieldByKey: (docId, layerName, fieldKey) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/fields/${encodeURIComponent(fieldKey)}`,
688
919
  /** POST: replace the field's value (`{ value: FormFieldValue }`). */
689
920
  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? }`). */
921
+ /** POST: reset fields to /DV (or clear): `{ refs? }`, the whole form without `refs`. */
922
+ layerFormReset: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/reset`,
923
+ /** POST: add a widget to the field, the body its placement (`WidgetPlacement`). */
693
924
  layerFormFieldWidgets: (docId, layerName, fieldKey) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/fields/${encodeURIComponent(fieldKey)}/widgets`,
694
925
  /**
695
926
  * POST: release a widget back to the inert annotation plane
@@ -698,18 +929,21 @@ const wirePaths = {
698
929
  * one codec instead of inventing a second composite key syntax.
699
930
  */
700
931
  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}` : ""}`,
932
+ /** Immutable base form export: a bundle as multipart, needing `doc.forms.read` and `doc.download`. */
933
+ docFormExport: (docId, token) => `/v1/docs/${encodeURIComponent(docId)}/form/export@${encodeFormExportToken(token)}`,
934
+ /** Immutable layer form export (twin of `docFormExport`). */
935
+ layerFormExport: (docId, layerName, token) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/export@${encodeFormExportToken(token)}`,
936
+ /** A layer form export whose selection a URL can't carry: a POST of the pins and the selection, not cached. */
937
+ layerFormExportRequest: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/export`,
938
+ /** A bundle's design, created in the layer as one change (`doc.forms.import`). */
939
+ layerFormImport: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/import`,
940
+ /** A bundle's values, written in the layer as one change (`doc.forms.importValues`). */
941
+ layerFormImportValues: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/import-values`,
707
942
  /** POST: durable reconciliation (`{ bakeAppearances? }`). */
708
943
  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
944
  /**
711
945
  * GET: one budgeted search slice, versioned form. The token
712
- * (`encodeSearchToken`) IS the cache key: content epoch + query +
946
+ * (`encodeSearchToken`) is the cache key: content epoch + query +
713
947
  * position. Immutable; CDN may cache forever. Mode is the path — rects
714
948
  * and full are separate resources so permission tiers never share
715
949
  * cache entries (`'rects'` needs `doc.text.search`; `'full'` also
@@ -719,32 +953,22 @@ const wirePaths = {
719
953
  layerSearchFull: (docId, layerName, token) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/search/full/data@${token}`,
720
954
  /**
721
955
  * GET: unversioned form — same fields as flat query params (`q` as
722
- * plain text), served from the CURRENT content, always `no-store`.
956
+ * plain text), served from the current content, always `no-store`.
723
957
  * The debug/simple-client variant; the SDK uses the versioned form.
724
958
  */
725
959
  layerSearchRectsCurrent: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/search/rects/data`,
726
960
  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`,
730
- layerPagesRotate: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/pages/rotate`,
731
- layerPagesDelete: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/pages/delete`,
732
- /** POST: register/rename a `/Names /Pages` entry — a page-STRUCTURE
961
+ layerPageViewports: (docId, layerName, page) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/pages/${encodeURIComponent(require_format.encodePageKey(page))}/viewports`,
962
+ layerPageScale: (docId, layerName, page) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/pages/${encodeURIComponent(require_format.encodePageKey(page))}/scale`,
963
+ /** POST: register/rename a `/Names /Pages` entry — a page-structure
733
964
  * mutation (docVersion + layoutVersion advance; reads ride `/layout`). */
734
965
  layerPagesNames: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/pages/names`,
735
966
  /** POST: remove a `/Names /Pages` entry (the page stays). */
736
967
  layerPagesNamesDelete: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/pages/names/delete`,
737
968
  layerPagesFlatten: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/pages/flatten`,
738
969
  /**
739
- * POST (multipart mutation envelope): copy every page of the `source`
740
- * resource part (a standalone PDF) in at the body's `destIndex`.
741
- */
742
- layerPagesInsert: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/pages/insert`,
743
- /** POST (plain JSON): create blank pages — pages.insert minus the bytes. */
744
- layerPagesInsertBlank: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/pages/insert-blank`,
745
- /**
746
970
  * POST (plain JSON → `application/pdf` bytes): export the listed pages,
747
- * in caller order, as a standalone PDF. A READ over the current layer
971
+ * in caller order, as a standalone PDF. A read over the current layer
748
972
  * state (gated like /download), so it is a POST only for its body —
749
973
  * nothing mutates and no event is published.
750
974
  */
@@ -754,15 +978,6 @@ const wirePaths = {
754
978
  layerDownload: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/download`,
755
979
  layerDownloadVersioned: (docId, layerName, token) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/download@${encodeDownloadToken(token)}`,
756
980
  /**
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
981
  * POST: pre-warm the doc cache + worker open before any user
767
982
  * request lands. Body is `{ docId }`. Doc-scoped token required.
768
983
  */
@@ -781,29 +996,36 @@ function analysisQueryString(query) {
781
996
  const wireTemplates = {
782
997
  docHead: "/v1/docs/:docId/head",
783
998
  layerManifest: "/v1/docs/:docId/layers/:layerName/manifest",
999
+ layerChanges: "/v1/docs/:docId/layers/:layerName/changes",
784
1000
  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",
1001
+ layerCustomMetadata: "/v1/docs/:docId/layers/:layerName/metadata/custom",
1002
+ layerOutline: "/v1/docs/:docId/layers/:layerName/outline",
1003
+ layerAttachments: "/v1/docs/:docId/layers/:layerName/attachments",
1004
+ layerAttachmentFile: "/v1/docs/:docId/layers/:layerName/attachment-files/:fileKey/data",
1005
+ layerRenderPage: "/v1/docs/:docId/layers/:layerName/render/pages/:pageKey/data",
1006
+ layerTextPage: "/v1/docs/:docId/layers/:layerName/text/pages/:pageKey/data",
787
1007
  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",
1008
+ layerAnnotationItems: "/v1/docs/:docId/layers/:layerName/annotations/pages/:pageKey/items",
1009
+ layerAnnotationItem: "/v1/docs/:docId/layers/:layerName/annotations/pages/:pageKey/items/:annotKey",
1010
+ layerAnnotationItemsReorder: "/v1/docs/:docId/layers/:layerName/annotations/pages/:pageKey/items/reorder",
1011
+ layerAnnotationItemsFlatten: "/v1/docs/:docId/layers/:layerName/annotations/pages/:pageKey/items/flatten",
1012
+ layerAnnotationItemsAppearance: "/v1/docs/:docId/layers/:layerName/annotations/pages/:pageKey/items/appearance",
1013
+ layerAnnotationItemAppearanceResource: "/v1/docs/:docId/layers/:layerName/annotations/pages/:pageKey/items/:annotKey/resources/appearance",
1014
+ layerAnnotationItemFileResource: "/v1/docs/:docId/layers/:layerName/annotations/pages/:pageKey/items/:annotKey/resources/file",
792
1015
  layerForm: "/v1/docs/:docId/layers/:layerName/form",
1016
+ layerFormWidget: "/v1/docs/:docId/layers/:layerName/form/widgets/:pageKey/:annotKey",
1017
+ layerFormWidgetsReorder: "/v1/docs/:docId/layers/:layerName/form/widgets/:pageKey/reorder",
1018
+ layerFormCalculationsReorder: "/v1/docs/:docId/layers/:layerName/form/calculations/reorder",
793
1019
  layerFormFieldValue: "/v1/docs/:docId/layers/:layerName/form/fields/:fieldKey/value",
794
- layerFormFieldReset: "/v1/docs/:docId/layers/:layerName/form/fields/:fieldKey/reset",
1020
+ layerFormReset: "/v1/docs/:docId/layers/:layerName/form/reset",
795
1021
  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",
800
- layerPagesRotate: "/v1/docs/:docId/layers/:layerName/pages/rotate",
801
- layerPagesDelete: "/v1/docs/:docId/layers/:layerName/pages/delete",
1022
+ layerFormImport: "/v1/docs/:docId/layers/:layerName/form/import",
1023
+ layerFormImportValues: "/v1/docs/:docId/layers/:layerName/form/import-values",
1024
+ layerPageViewports: "/v1/docs/:docId/layers/:layerName/pages/:pageKey/viewports",
1025
+ layerPageScale: "/v1/docs/:docId/layers/:layerName/pages/:pageKey/scale",
802
1026
  layerPagesNames: "/v1/docs/:docId/layers/:layerName/pages/names",
803
1027
  layerPagesNamesDelete: "/v1/docs/:docId/layers/:layerName/pages/names/delete",
804
1028
  layerPagesFlatten: "/v1/docs/:docId/layers/:layerName/pages/flatten",
805
- layerPagesInsert: "/v1/docs/:docId/layers/:layerName/pages/insert",
806
- layerPagesInsertBlank: "/v1/docs/:docId/layers/:layerName/pages/insert-blank",
807
1029
  layerPagesExtract: "/v1/docs/:docId/layers/:layerName/pages/extract",
808
1030
  layerRedactionsApply: "/v1/docs/:docId/layers/:layerName/redactions/apply",
809
1031
  layerDownload: "/v1/docs/:docId/layers/:layerName/download",
@@ -811,7 +1033,7 @@ const wireTemplates = {
811
1033
  layerSignaturesAnalysis: "/v1/docs/:docId/layers/:layerName/signatures/analysis",
812
1034
  layerSignaturesPrepare: "/v1/docs/:docId/layers/:layerName/signatures/prepare",
813
1035
  layerSignatureComplete: "/v1/docs/:docId/layers/:layerName/signatures/:signingId/complete",
814
- layerSignatureAbort: "/v1/docs/:docId/layers/:layerName/signatures/:signingId",
1036
+ layerSignatureCancel: "/v1/docs/:docId/layers/:layerName/signatures/:signingId",
815
1037
  docVersions: "/v1/docs/:docId/versions",
816
1038
  docVersionSignatures: "/v1/docs/:docId/versions/signatures/:sha",
817
1039
  docVersionSignatureContents: "/v1/docs/:docId/versions/signatures/:sha/:fieldKey/contents",
@@ -822,8 +1044,45 @@ const wireTemplates = {
822
1044
  };
823
1045
  //#endregion
824
1046
  //#region src/wire/resources.ts
1047
+ /** A page picture of one family, at the document's shared path. */
1048
+ function pageRenderResource(picture) {
1049
+ const { resource, path, needs } = picture;
1050
+ return {
1051
+ id: resource,
1052
+ pathPattern: `/v1/docs/{docId}/${path}/*/data@*`,
1053
+ resolvePathPattern: (docId) => `/v1/docs/${docId}/${path}/*/data@*`,
1054
+ pathPrefix: `/v1/docs/{docId}/${path}/`,
1055
+ resolvePathPrefix: (docId) => `/v1/docs/${docId}/${path}/`,
1056
+ requirement: requirementOf(needs),
1057
+ routeKind: "versioned-read",
1058
+ cdnCacheable: true
1059
+ };
1060
+ }
1061
+ /** A page picture of one family, at a layer's path. */
1062
+ function layerPageRenderResource(picture) {
1063
+ const { layerResource, path, needs } = picture;
1064
+ return {
1065
+ id: layerResource,
1066
+ pathPattern: `/v1/docs/{docId}/layers/{layerName}/${path}/*/data@*`,
1067
+ resolvePathPattern: (docId, layerName = "default") => `/v1/docs/${docId}/layers/${layerName}/${path}/*/data@*`,
1068
+ pathPrefix: `/v1/docs/{docId}/layers/{layerName}/${path}/`,
1069
+ resolvePathPrefix: (docId, layerName = "default") => `/v1/docs/${docId}/layers/${layerName}/${path}/`,
1070
+ requirement: requirementOf(needs),
1071
+ routeKind: "versioned-read",
1072
+ cdnCacheable: true
1073
+ };
1074
+ }
1075
+ function requirementOf(needs) {
1076
+ return needs.length === 1 ? {
1077
+ kind: "single",
1078
+ capability: needs[0]
1079
+ } : {
1080
+ kind: "all",
1081
+ capabilities: needs
1082
+ };
1083
+ }
825
1084
  /**
826
- * URL layout (paths v2): each resource type lives at a distinct path
1085
+ * URL layout: each resource type lives at a distinct path
827
1086
  * prefix so prefix-matching CDNs (Bunny, Cloud CDN, Azure FD) can
828
1087
  * enforce per-resource scope at the edge. See wire/paths.ts for the
829
1088
  * full shape and rationale.
@@ -868,32 +1127,18 @@ const DOC_RESOURCES = {
868
1127
  routeKind: "versioned-read",
869
1128
  cdnCacheable: true
870
1129
  },
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
- },
1130
+ "page-render": pageRenderResource(require_schemas.PAGE_RENDER_FAMILIES.pages),
1131
+ "page-render-annotations": pageRenderResource(require_schemas.PAGE_RENDER_FAMILIES.annotations),
1132
+ "page-render-fields": pageRenderResource(require_schemas.PAGE_RENDER_FAMILIES.fields),
1133
+ "page-render-all": pageRenderResource(require_schemas.PAGE_RENDER_FAMILIES.all),
1134
+ "page-print": pageRenderResource(require_schemas.PAGE_PRINT_FAMILIES.print.pages),
1135
+ "page-print-annotations": pageRenderResource(require_schemas.PAGE_PRINT_FAMILIES.print.annotations),
1136
+ "page-print-fields": pageRenderResource(require_schemas.PAGE_PRINT_FAMILIES.print.fields),
1137
+ "page-print-all": pageRenderResource(require_schemas.PAGE_PRINT_FAMILIES.print.all),
1138
+ "page-print-high": pageRenderResource(require_schemas.PAGE_PRINT_FAMILIES["print-high"].pages),
1139
+ "page-print-high-annotations": pageRenderResource(require_schemas.PAGE_PRINT_FAMILIES["print-high"].annotations),
1140
+ "page-print-high-fields": pageRenderResource(require_schemas.PAGE_PRINT_FAMILIES["print-high"].fields),
1141
+ "page-print-high-all": pageRenderResource(require_schemas.PAGE_PRINT_FAMILIES["print-high"].all),
897
1142
  "page-annotations": {
898
1143
  id: "page-annotations",
899
1144
  pathPattern: "/v1/docs/{docId}/annotations/pages/*/items@*",
@@ -920,6 +1165,58 @@ const DOC_RESOURCES = {
920
1165
  routeKind: "versioned-read",
921
1166
  cdnCacheable: true
922
1167
  },
1168
+ "annotations-export": {
1169
+ id: "annotations-export",
1170
+ pathPattern: "/v1/docs/{docId}/annotations/export@*",
1171
+ resolvePathPattern: (docId) => `/v1/docs/${docId}/annotations/export@*`,
1172
+ pathPrefix: "/v1/docs/{docId}/annotations/export@",
1173
+ resolvePathPrefix: (docId) => `/v1/docs/${docId}/annotations/export@`,
1174
+ requirement: {
1175
+ kind: "all",
1176
+ capabilities: ["doc.annotate.read", "doc.download"]
1177
+ },
1178
+ routeKind: "versioned-read",
1179
+ cdnCacheable: true
1180
+ },
1181
+ "form-export": {
1182
+ id: "form-export",
1183
+ pathPattern: "/v1/docs/{docId}/form/export@*",
1184
+ resolvePathPattern: (docId) => `/v1/docs/${docId}/form/export@*`,
1185
+ pathPrefix: "/v1/docs/{docId}/form/export@",
1186
+ resolvePathPrefix: (docId) => `/v1/docs/${docId}/form/export@`,
1187
+ requirement: {
1188
+ kind: "all",
1189
+ capabilities: ["doc.forms.read", "doc.download"]
1190
+ },
1191
+ routeKind: "versioned-read",
1192
+ cdnCacheable: true
1193
+ },
1194
+ form: {
1195
+ id: "form",
1196
+ pathPattern: "/v1/docs/{docId}/form@*",
1197
+ resolvePathPattern: (docId) => `/v1/docs/${docId}/form@*`,
1198
+ pathPrefix: "/v1/docs/{docId}/form@",
1199
+ resolvePathPrefix: (docId) => `/v1/docs/${docId}/form@`,
1200
+ requirement: {
1201
+ kind: "single",
1202
+ capability: "doc.forms.read"
1203
+ },
1204
+ routeKind: "versioned-read",
1205
+ cdnCacheable: true
1206
+ },
1207
+ "page-form": {
1208
+ id: "page-form",
1209
+ pathPattern: "/v1/docs/{docId}/form/pages/*/appearances@*",
1210
+ resolvePathPattern: (docId) => `/v1/docs/${docId}/form/pages/*/appearances@*`,
1211
+ pathPrefix: "/v1/docs/{docId}/form/pages/",
1212
+ resolvePathPrefix: (docId) => `/v1/docs/${docId}/form/pages/`,
1213
+ requirement: {
1214
+ kind: "single",
1215
+ capability: "doc.forms.read"
1216
+ },
1217
+ routeKind: "versioned-read",
1218
+ cdnCacheable: true
1219
+ },
923
1220
  layout: {
924
1221
  id: "layout",
925
1222
  pathPattern: "/v1/docs/{docId}/layout@*",
@@ -946,6 +1243,19 @@ const DOC_RESOURCES = {
946
1243
  routeKind: "versioned-read",
947
1244
  cdnCacheable: true
948
1245
  },
1246
+ "metadata-custom": {
1247
+ id: "metadata-custom",
1248
+ pathPattern: "/v1/docs/{docId}/metadata/custom@*",
1249
+ resolvePathPattern: (docId) => `/v1/docs/${docId}/metadata/custom@*`,
1250
+ pathPrefix: "/v1/docs/{docId}/metadata/custom@",
1251
+ resolvePathPrefix: (docId) => `/v1/docs/${docId}/metadata/custom@`,
1252
+ requirement: {
1253
+ kind: "single",
1254
+ capability: "doc.open"
1255
+ },
1256
+ routeKind: "versioned-read",
1257
+ cdnCacheable: true
1258
+ },
949
1259
  actions: {
950
1260
  id: "actions",
951
1261
  pathPattern: "/v1/docs/{docId}/actions@*",
@@ -985,6 +1295,19 @@ const DOC_RESOURCES = {
985
1295
  routeKind: "versioned-read",
986
1296
  cdnCacheable: true
987
1297
  },
1298
+ "layer-metadata-custom": {
1299
+ id: "layer-metadata-custom",
1300
+ pathPattern: "/v1/docs/{docId}/layers/{layerName}/metadata/custom@*",
1301
+ resolvePathPattern: (docId, layerName = "default") => `/v1/docs/${docId}/layers/${layerName}/metadata/custom@*`,
1302
+ pathPrefix: "/v1/docs/{docId}/layers/{layerName}/metadata/custom@",
1303
+ resolvePathPrefix: (docId, layerName = "default") => `/v1/docs/${docId}/layers/${layerName}/metadata/custom@`,
1304
+ requirement: {
1305
+ kind: "single",
1306
+ capability: "doc.open"
1307
+ },
1308
+ routeKind: "versioned-read",
1309
+ cdnCacheable: true
1310
+ },
988
1311
  "layer-actions": {
989
1312
  id: "layer-actions",
990
1313
  pathPattern: "/v1/docs/{docId}/layers/{layerName}/actions@*",
@@ -1011,6 +1334,19 @@ const DOC_RESOURCES = {
1011
1334
  routeKind: "versioned-read",
1012
1335
  cdnCacheable: true
1013
1336
  },
1337
+ outline: {
1338
+ id: "outline",
1339
+ pathPattern: "/v1/docs/{docId}/outline@*",
1340
+ resolvePathPattern: (docId) => `/v1/docs/${docId}/outline@*`,
1341
+ pathPrefix: "/v1/docs/{docId}/outline@",
1342
+ resolvePathPrefix: (docId) => `/v1/docs/${docId}/outline@`,
1343
+ requirement: {
1344
+ kind: "single",
1345
+ capability: "doc.open"
1346
+ },
1347
+ routeKind: "versioned-read",
1348
+ cdnCacheable: true
1349
+ },
1014
1350
  "attachment-files": {
1015
1351
  id: "attachment-files",
1016
1352
  pathPattern: "/v1/docs/{docId}/attachment-files/*",
@@ -1037,6 +1373,19 @@ const DOC_RESOURCES = {
1037
1373
  routeKind: "versioned-read",
1038
1374
  cdnCacheable: true
1039
1375
  },
1376
+ "layer-outline": {
1377
+ id: "layer-outline",
1378
+ pathPattern: "/v1/docs/{docId}/layers/{layerName}/outline@*",
1379
+ resolvePathPattern: (docId, layerName = "default") => `/v1/docs/${docId}/layers/${layerName}/outline@*`,
1380
+ pathPrefix: "/v1/docs/{docId}/layers/{layerName}/outline@",
1381
+ resolvePathPrefix: (docId, layerName = "default") => `/v1/docs/${docId}/layers/${layerName}/outline@`,
1382
+ requirement: {
1383
+ kind: "single",
1384
+ capability: "doc.open"
1385
+ },
1386
+ routeKind: "versioned-read",
1387
+ cdnCacheable: true
1388
+ },
1040
1389
  "layer-attachment-files": {
1041
1390
  id: "layer-attachment-files",
1042
1391
  pathPattern: "/v1/docs/{docId}/layers/{layerName}/attachment-files/*",
@@ -1050,32 +1399,18 @@ const DOC_RESOURCES = {
1050
1399
  routeKind: "versioned-read",
1051
1400
  cdnCacheable: true
1052
1401
  },
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
- },
1402
+ "layer-page-render": layerPageRenderResource(require_schemas.PAGE_RENDER_FAMILIES.pages),
1403
+ "layer-page-render-annotations": layerPageRenderResource(require_schemas.PAGE_RENDER_FAMILIES.annotations),
1404
+ "layer-page-render-fields": layerPageRenderResource(require_schemas.PAGE_RENDER_FAMILIES.fields),
1405
+ "layer-page-render-all": layerPageRenderResource(require_schemas.PAGE_RENDER_FAMILIES.all),
1406
+ "layer-page-print": layerPageRenderResource(require_schemas.PAGE_PRINT_FAMILIES.print.pages),
1407
+ "layer-page-print-annotations": layerPageRenderResource(require_schemas.PAGE_PRINT_FAMILIES.print.annotations),
1408
+ "layer-page-print-fields": layerPageRenderResource(require_schemas.PAGE_PRINT_FAMILIES.print.fields),
1409
+ "layer-page-print-all": layerPageRenderResource(require_schemas.PAGE_PRINT_FAMILIES.print.all),
1410
+ "layer-page-print-high": layerPageRenderResource(require_schemas.PAGE_PRINT_FAMILIES["print-high"].pages),
1411
+ "layer-page-print-high-annotations": layerPageRenderResource(require_schemas.PAGE_PRINT_FAMILIES["print-high"].annotations),
1412
+ "layer-page-print-high-fields": layerPageRenderResource(require_schemas.PAGE_PRINT_FAMILIES["print-high"].fields),
1413
+ "layer-page-print-high-all": layerPageRenderResource(require_schemas.PAGE_PRINT_FAMILIES["print-high"].all),
1079
1414
  "page-text": {
1080
1415
  id: "page-text",
1081
1416
  pathPattern: "/v1/docs/{docId}/text/pages/*/data@*",
@@ -1167,6 +1502,19 @@ const DOC_RESOURCES = {
1167
1502
  routeKind: "versioned-read",
1168
1503
  cdnCacheable: true
1169
1504
  },
1505
+ "layer-annotations-export": {
1506
+ id: "layer-annotations-export",
1507
+ pathPattern: "/v1/docs/{docId}/layers/{layerName}/annotations/export@*",
1508
+ resolvePathPattern: (docId, layerName = "default") => `/v1/docs/${docId}/layers/${layerName}/annotations/export@*`,
1509
+ pathPrefix: "/v1/docs/{docId}/layers/{layerName}/annotations/export@",
1510
+ resolvePathPrefix: (docId, layerName = "default") => `/v1/docs/${docId}/layers/${layerName}/annotations/export@`,
1511
+ requirement: {
1512
+ kind: "all",
1513
+ capabilities: ["doc.annotate.read", "doc.download"]
1514
+ },
1515
+ routeKind: "versioned-read",
1516
+ cdnCacheable: true
1517
+ },
1170
1518
  "layer-annotations-all": {
1171
1519
  id: "layer-annotations-all",
1172
1520
  pathPattern: "/v1/docs/{docId}/layers/{layerName}/annotations/items@*",
@@ -1180,6 +1528,45 @@ const DOC_RESOURCES = {
1180
1528
  routeKind: "versioned-read",
1181
1529
  cdnCacheable: true
1182
1530
  },
1531
+ "layer-form-export": {
1532
+ id: "layer-form-export",
1533
+ pathPattern: "/v1/docs/{docId}/layers/{layerName}/form/export@*",
1534
+ resolvePathPattern: (docId, layerName = "default") => `/v1/docs/${docId}/layers/${layerName}/form/export@*`,
1535
+ pathPrefix: "/v1/docs/{docId}/layers/{layerName}/form/export@",
1536
+ resolvePathPrefix: (docId, layerName = "default") => `/v1/docs/${docId}/layers/${layerName}/form/export@`,
1537
+ requirement: {
1538
+ kind: "all",
1539
+ capabilities: ["doc.forms.read", "doc.download"]
1540
+ },
1541
+ routeKind: "versioned-read",
1542
+ cdnCacheable: true
1543
+ },
1544
+ "layer-form": {
1545
+ id: "layer-form",
1546
+ pathPattern: "/v1/docs/{docId}/layers/{layerName}/form@*",
1547
+ resolvePathPattern: (docId, layerName = "default") => `/v1/docs/${docId}/layers/${layerName}/form@*`,
1548
+ pathPrefix: "/v1/docs/{docId}/layers/{layerName}/form@",
1549
+ resolvePathPrefix: (docId, layerName = "default") => `/v1/docs/${docId}/layers/${layerName}/form@`,
1550
+ requirement: {
1551
+ kind: "single",
1552
+ capability: "doc.forms.read"
1553
+ },
1554
+ routeKind: "versioned-read",
1555
+ cdnCacheable: true
1556
+ },
1557
+ "layer-page-form": {
1558
+ id: "layer-page-form",
1559
+ pathPattern: "/v1/docs/{docId}/layers/{layerName}/form/pages/*/appearances@*",
1560
+ resolvePathPattern: (docId, layerName = "default") => `/v1/docs/${docId}/layers/${layerName}/form/pages/*/appearances@*`,
1561
+ pathPrefix: "/v1/docs/{docId}/layers/{layerName}/form/pages/",
1562
+ resolvePathPrefix: (docId, layerName = "default") => `/v1/docs/${docId}/layers/${layerName}/form/pages/`,
1563
+ requirement: {
1564
+ kind: "single",
1565
+ capability: "doc.forms.read"
1566
+ },
1567
+ routeKind: "versioned-read",
1568
+ cdnCacheable: true
1569
+ },
1183
1570
  "download-current": {
1184
1571
  id: "download-current",
1185
1572
  pathPattern: "/v1/docs/{docId}/layers/{layerName}/download",
@@ -1326,15 +1713,14 @@ function checkResourceAccess(resourceId, rawScope, pdfBits) {
1326
1713
  * `requirement` at the origin route, but the CDN never gets a
1327
1714
  * credential for them.
1328
1715
  *
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.
1716
+ * The URL layout gives each cacheable resource type a distinct prefix,
1717
+ * so prefix-matching adapters get per-resource scope enforcement at the
1718
+ * edge — a Bunny token signed at `/v1/docs/{id}/render/pages/` can only
1719
+ * authorize render bytes, never text or annotations.
1334
1720
  */
1335
1721
  /**
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
1722
+ * Plane map: the planes each doc-level shared resource depends on. A
1723
+ * layer token's edge credential covers a resource's prefix iff every listed
1338
1724
  * plane is inherited (`'base'`) in the caller's scopes — the same condition
1339
1725
  * the origin guard enforces (origin is the truth; this grant is the
1340
1726
  * TTL-bounded optimization). Resources absent from this map (head, manifest,
@@ -1349,17 +1735,21 @@ function checkResourceAccess(resourceId, rawScope, pdfBits) {
1349
1735
  * as every edge grant.
1350
1736
  */
1351
1737
  const RESOURCE_PLANES = {
1352
- "page-render": ["content"],
1738
+ ...Object.fromEntries(require_schemas.PAGE_PICTURES.map((picture) => [picture.resource, picture.planes])),
1353
1739
  "page-text": ["content"],
1354
1740
  "page-geometry": ["content"],
1355
- "page-render-annotated": ["content", "annotations"],
1356
1741
  "page-annotations": ["annotations"],
1357
1742
  "annotations-all": ["annotations"],
1743
+ form: ["forms"],
1744
+ "page-form": ["forms"],
1745
+ "annotations-export": ["annotations", "layout"],
1358
1746
  layout: ["layout"],
1359
1747
  metadata: ["metadata"],
1748
+ "metadata-custom": ["metadata"],
1360
1749
  actions: ["actions"],
1361
1750
  attachments: ["attachments"],
1362
- "attachment-files": ["attachments"]
1751
+ "attachment-files": ["attachments"],
1752
+ outline: ["outline", "layout"]
1363
1753
  };
1364
1754
  function cdnCoverageForScope(rawScope, pdfBits, context) {
1365
1755
  const out = [];
@@ -1386,11 +1776,11 @@ function cdnCoverageForScope(rawScope, pdfBits, context) {
1386
1776
  * effects to attach. Used by both:
1387
1777
  * - the @cloudpdf/engine HttpClient (to actually route requests through
1388
1778
  * the CDN edge when an /access response says it can)
1389
- * - the smoke/diagnostic inspector (to PREVIEW what the SDK would do
1779
+ * - the smoke/diagnostic inspector (to preview what the SDK would do
1390
1780
  * for a given path, with no network)
1391
1781
  *
1392
1782
  * Keeping this in engine-core means cloud-side request routing and
1393
- * server-side test fixtures use the SAME algorithm. If a regression
1783
+ * server-side test fixtures use the same algorithm. If a regression
1394
1784
  * sneaks in, both ends break together.
1395
1785
  *
1396
1786
  * Selection rules
@@ -1404,7 +1794,7 @@ function cdnCoverageForScope(rawScope, pdfBits, context) {
1404
1794
  * origin — that's how scope narrowing works at the edge: the
1405
1795
  * server only emits overrides for resources the caller's scope
1406
1796
  * grants.
1407
- * 3. Find the LONGEST-matching `signedPathPolicies` entry (its
1797
+ * 3. Find the longest-matching `signedPathPolicies` entry (its
1408
1798
  * `pathPrefix` is a prefix of the request path). Append its
1409
1799
  * `queryParams`. No match falls back to `signedQueryParams` if
1410
1800
  * the adapter emitted a global token.
@@ -1465,8 +1855,8 @@ function applyCdnAccess(input) {
1465
1855
  * is a (longest) prefix of `path`. Returns null when no resource
1466
1856
  * matches — admin routes, /access, /warm fall into this bucket.
1467
1857
  *
1468
- * Each cacheable resource has a DISTINCT prefix (paths v2 invariant),
1469
- * so longest-match is deterministic.
1858
+ * Each cacheable resource has a distinct prefix, so longest-match is
1859
+ * deterministic.
1470
1860
  */
1471
1861
  function resolveResourceIdForPath(path, docId, layerName) {
1472
1862
  let best = null;
@@ -1548,33 +1938,25 @@ function unflatten(flat) {
1548
1938
  /**
1549
1939
  * Project image render options plus cache versions into the flat wire shape
1550
1940
  * 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
1941
+ * (`viewport.kind`, `target.rect.x`, …) — the schema and codec never need
1552
1942
  * to know about specific option fields. Adding a new render option means
1553
1943
  * extending `PageImageOptions`, the render query schemas, and
1554
1944
  * `RenderTokenSchema.fields`; this function does not change.
1555
1945
  *
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.
1946
+ * What the picture draws, and whether and at which DPI it prints, is never
1947
+ * in the token: the caller picks the picture's path (`PAGE_RENDER_FAMILIES`,
1948
+ * `PAGE_PRINT_FAMILIES`) and passes that family's pins.
1949
+ * Each family's query schema checks its own pins when the URL is decoded
1950
+ * server-side. Round-tripping (flatten → encode → decode → unflatten →
1951
+ * schema parse) recovers the original SDK options.
1571
1952
  */
1572
1953
  function renderImageOptionsToWire(options, versions) {
1573
- const { includeAnnotations: _pathExpressed, ...wireOptions } = options;
1954
+ const { includeAnnotations: _inThePath, includeFormFields: _alsoInThePath, usage, viewport, ...wireOptions } = options;
1955
+ const sized = usage === "print" || viewport === void 0 ? {} : { viewport };
1574
1956
  return flatten({
1575
1957
  ...wireOptions,
1576
- contentVersion: versions.contentVersion,
1577
- ...versions.annotationVersion !== void 0 ? { annotationVersion: versions.annotationVersion } : {}
1958
+ ...sized,
1959
+ ...versions
1578
1960
  });
1579
1961
  }
1580
1962
  /**
@@ -1585,17 +1967,20 @@ function renderImageOptionsToToken(options, versions) {
1585
1967
  return encodeRenderToken(renderImageOptionsToWire(options, versions));
1586
1968
  }
1587
1969
  /**
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.
1970
+ * The worker-side `PageRenderOptions` of a parsed picture request: the
1971
+ * render options, and what its family draws and whether it prints (stamped
1972
+ * by the picture's query schema). Pure shape transform; image encoding stays
1973
+ * out.
1591
1974
  */
1592
- function pageRenderOptionsFromImageOptions(options, includeAnnotations) {
1975
+ function pageRenderOptionsFromImageOptions(options) {
1593
1976
  return {
1594
1977
  ...options.target ? { target: options.target } : {},
1595
1978
  ...options.viewport ? { viewport: options.viewport } : {},
1596
1979
  ...options.rotation !== void 0 ? { rotation: options.rotation } : {},
1597
1980
  ...options.background !== void 0 ? { background: options.background } : {},
1598
- includeAnnotations
1981
+ includeAnnotations: options.includeAnnotations ?? false,
1982
+ includeFormFields: options.includeFormFields ?? false,
1983
+ ...options.usage !== void 0 ? { usage: options.usage } : {}
1599
1984
  };
1600
1985
  }
1601
1986
  /**
@@ -1604,15 +1989,33 @@ function pageRenderOptionsFromImageOptions(options, includeAnnotations) {
1604
1989
  * Mirrors {@link renderImageOptionsToWire}.
1605
1990
  */
1606
1991
  function annotationAppearancesImageOptionsToWire(options, versions) {
1607
- return flatten({
1608
- ...options,
1609
- annotationVersion: versions.annotationVersion
1610
- });
1992
+ return appearancesToWire(options, { annotationVersion: versions.annotationVersion });
1611
1993
  }
1612
1994
  /** Convenience: build the full encoded appearance render token in one call. */
1613
1995
  function annotationAppearancesImageOptionsToToken(options, versions) {
1614
1996
  return encodeAnnotationAppearancesRenderToken(annotationAppearancesImageOptionsToWire(options, versions));
1615
1997
  }
1998
+ /** The widget twin of {@link annotationAppearancesImageOptionsToWire}. */
1999
+ function widgetAppearancesImageOptionsToWire(options, versions) {
2000
+ return appearancesToWire(options, { widgetVersion: versions.widgetVersion });
2001
+ }
2002
+ /** The widget twin of {@link annotationAppearancesImageOptionsToToken}. */
2003
+ function widgetAppearancesImageOptionsToToken(options, versions) {
2004
+ return encodeWidgetAppearancesRenderToken(widgetAppearancesImageOptionsToWire(options, versions));
2005
+ }
2006
+ /**
2007
+ * Appearance options and a pin, flat. `modes` only when it asks for fewer
2008
+ * than every mode, as one value, so every request for all of them is one URL.
2009
+ */
2010
+ function appearancesToWire(options, pin) {
2011
+ const { modes, ...rest } = options;
2012
+ const asked = require_charmap.appearanceModesOf(modes);
2013
+ return flatten({
2014
+ ...rest,
2015
+ ...asked ? { modes: encodeAppearanceModes(asked) } : {},
2016
+ ...pin
2017
+ });
2018
+ }
1616
2019
  /**
1617
2020
  * Strip image-encoding fields, leaving the worker-side
1618
2021
  * `AnnotationAppearanceRenderOptions`. Pure shape transform consumed by the
@@ -1621,137 +2024,509 @@ function annotationAppearancesImageOptionsToToken(options, versions) {
1621
2024
  */
1622
2025
  function annotationRenderOptionsFromImageOptions(options) {
1623
2026
  return {
1624
- ...options.scale !== void 0 ? { scale: options.scale } : {},
2027
+ ...options.viewport ? { viewport: options.viewport } : {},
1625
2028
  ...options.rotation !== void 0 ? { rotation: options.rotation } : {},
1626
2029
  ...options.modes ? { modes: options.modes } : {}
1627
2030
  };
1628
2031
  }
1629
2032
  //#endregion
1630
- exports.ANNOTATION_KINDS = require_schemas.ANNOTATION_KINDS;
2033
+ //#region src/wire/changeSchemas.ts
2034
+ /**
2035
+ * `POST /v1/docs/{docId}/layers/{layerName}/changes`: a request's changes and
2036
+ * their answers. A change's bytes (a stamp's drawing, an attached file, a
2037
+ * signature's artwork, a PDF whose pages come in) travel as multipart parts
2038
+ * beside the JSON (`resource:{key}`), which names them by key where the change
2039
+ * takes them.
2040
+ */
2041
+ /** An op's id for its change: 1 to 255 visible ASCII characters, as `opId` always is. */
2042
+ const OpIdSchema = zod.z.string().regex(/^[\x21-\x7e]{1,255}$/);
2043
+ const FormFieldDisplaySchema = zod.z.enum([
2044
+ "visible",
2045
+ "hidden",
2046
+ "noPrint",
2047
+ "noView"
2048
+ ]);
2049
+ /** One op of a change, as the request sends it. */
2050
+ const ChangeOpWireSchema = zod.z.discriminatedUnion("type", [
2051
+ zod.z.object({
2052
+ type: zod.z.literal("annotations.create"),
2053
+ page: require_schema.PageRefSchema,
2054
+ data: require_schema.AnnotationDraftSchema,
2055
+ objectNumber: zod.z.number().int().positive().optional(),
2056
+ resources: require_schema.AnnotationResourceKeysSchema.optional()
2057
+ }),
2058
+ zod.z.object({
2059
+ type: zod.z.literal("annotations.update"),
2060
+ ref: require_schema.AnnotationRefSchema,
2061
+ patch: require_schema.AnnotationPatchSchema,
2062
+ resources: require_schema.AnnotationResourceKeysSchema.optional(),
2063
+ expect: require_schema.AnnotationPatchSchema.optional()
2064
+ }),
2065
+ zod.z.object({
2066
+ type: zod.z.literal("annotations.delete"),
2067
+ ref: require_schema.AnnotationRefSchema,
2068
+ expect: require_schema.AnnotationPatchSchema.optional()
2069
+ }),
2070
+ zod.z.object({
2071
+ type: zod.z.literal("annotations.reorder"),
2072
+ page: require_schema.PageRefSchema,
2073
+ refs: zod.z.array(require_schema.AnnotationRefSchema).min(1),
2074
+ position: require_schemas.AnnotationPositionSchema
2075
+ }),
2076
+ zod.z.object({
2077
+ type: zod.z.literal("forms.setValue"),
2078
+ field: require_schema.FormFieldRefSchema,
2079
+ value: require_schema.FormFieldValueSchema,
2080
+ expect: require_schema.FormFieldValueSchema.optional()
2081
+ }),
2082
+ zod.z.object({
2083
+ type: zod.z.literal("forms.setDisplay"),
2084
+ field: require_schema.FormFieldRefSchema,
2085
+ display: FormFieldDisplaySchema
2086
+ }),
2087
+ zod.z.object({
2088
+ type: zod.z.literal("forms.setAppearanceText"),
2089
+ field: require_schema.FormFieldRefSchema,
2090
+ text: zod.z.string()
2091
+ }),
2092
+ zod.z.object({
2093
+ type: zod.z.literal("forms.reset"),
2094
+ fields: zod.z.array(require_schema.FormFieldRefSchema).optional()
2095
+ }),
2096
+ zod.z.object({
2097
+ type: zod.z.literal("forms.create"),
2098
+ draft: require_schema.FormFieldDraftSchema,
2099
+ objectNumber: zod.z.number().int().positive().optional(),
2100
+ widgetObjectNumbers: zod.z.array(zod.z.number().int().positive()).optional()
2101
+ }),
2102
+ zod.z.object({
2103
+ type: zod.z.literal("forms.update"),
2104
+ field: require_schema.FormFieldRefSchema,
2105
+ patch: require_schema.FormFieldPatchSchema,
2106
+ expect: require_schema.FormFieldPatchSchema.optional()
2107
+ }),
2108
+ zod.z.object({
2109
+ type: zod.z.literal("forms.delete"),
2110
+ field: require_schema.FormFieldRefSchema,
2111
+ expect: require_schema.FormFieldPatchSchema.optional()
2112
+ }),
2113
+ zod.z.object({
2114
+ type: zod.z.literal("forms.addWidget"),
2115
+ field: require_schema.FormFieldRefSchema,
2116
+ placement: require_schema.WidgetPlacementSchema,
2117
+ objectNumber: zod.z.number().int().positive().optional(),
2118
+ splitObjectNumber: zod.z.number().int().positive().optional()
2119
+ }),
2120
+ zod.z.object({
2121
+ type: zod.z.literal("forms.removeWidget"),
2122
+ field: require_schema.FormFieldRefSchema,
2123
+ widget: require_schema.AnnotationRefSchema
2124
+ }),
2125
+ zod.z.object({
2126
+ type: zod.z.literal("forms.deleteWidget"),
2127
+ widget: require_schema.AnnotationRefSchema,
2128
+ expect: require_schema.WidgetPatchSchema.optional()
2129
+ }),
2130
+ zod.z.object({
2131
+ type: zod.z.literal("forms.reorderCalculations"),
2132
+ fields: zod.z.array(require_schema.FormFieldRefSchema).min(1),
2133
+ position: require_schemas.FieldPositionSchema
2134
+ }),
2135
+ zod.z.object({
2136
+ type: zod.z.literal("forms.reorderWidgets"),
2137
+ page: require_schema.PageRefSchema,
2138
+ widgets: zod.z.array(require_schema.AnnotationRefSchema).min(1),
2139
+ position: require_schemas.AnnotationPositionSchema
2140
+ }),
2141
+ zod.z.object({
2142
+ type: zod.z.literal("forms.updateWidget"),
2143
+ widget: require_schema.AnnotationRefSchema,
2144
+ patch: require_schema.WidgetPatchSchema,
2145
+ expect: require_schema.WidgetPatchSchema.optional()
2146
+ }),
2147
+ zod.z.object({
2148
+ type: zod.z.literal("forms.setSignatureAppearance"),
2149
+ field: require_schema.FormFieldRefSchema,
2150
+ /** The one-page PDF drawn in, as the key of its multipart part. */
2151
+ resources: require_schema.AppearanceResourceKeysSchema
2152
+ }),
2153
+ zod.z.object({
2154
+ type: zod.z.literal("metadata.update"),
2155
+ patch: require_schemas.MetadataPatchSchema,
2156
+ expect: require_schemas.MetadataPatchSchema.optional()
2157
+ }),
2158
+ zod.z.object({
2159
+ type: zod.z.literal("metadata.updateCustom"),
2160
+ patch: require_schemas.CustomMetadataPatchSchema
2161
+ }),
2162
+ zod.z.object({
2163
+ type: zod.z.literal("outline.create"),
2164
+ parent: require_schemas.OutlineItemRefSchema.nullable(),
2165
+ position: require_schemas.OutlinePositionSchema.optional(),
2166
+ data: require_schemas.OutlineItemDraftSchema,
2167
+ objectNumber: zod.z.number().int().positive().optional()
2168
+ }),
2169
+ zod.z.object({
2170
+ type: zod.z.literal("outline.update"),
2171
+ ref: require_schemas.OutlineItemRefSchema,
2172
+ patch: require_schemas.OutlineItemPatchSchema,
2173
+ expect: require_schemas.OutlineItemPatchSchema.optional()
2174
+ }),
2175
+ zod.z.object({
2176
+ type: zod.z.literal("outline.move"),
2177
+ refs: zod.z.array(require_schemas.OutlineItemRefSchema).min(1),
2178
+ parent: require_schemas.OutlineItemRefSchema.nullable(),
2179
+ position: require_schemas.OutlinePositionSchema
2180
+ }),
2181
+ zod.z.object({
2182
+ type: zod.z.literal("outline.delete"),
2183
+ ref: require_schemas.OutlineItemRefSchema,
2184
+ expect: require_schemas.OutlineItemPatchSchema.optional()
2185
+ }),
2186
+ zod.z.object({
2187
+ type: zod.z.literal("pages.rotate"),
2188
+ pages: zod.z.array(require_schema.PageRefSchema).min(1),
2189
+ rotation: require_schema.PdfRotationSchema
2190
+ }),
2191
+ zod.z.object({
2192
+ type: zod.z.literal("pages.reorder"),
2193
+ pages: zod.z.array(require_schema.PageRefSchema).min(1),
2194
+ position: require_schemas.PagePositionSchema
2195
+ }),
2196
+ zod.z.object({
2197
+ type: zod.z.literal("pages.delete"),
2198
+ pages: zod.z.array(require_schema.PageRefSchema).min(1)
2199
+ }),
2200
+ zod.z.object({
2201
+ type: zod.z.literal("pages.insertBlank"),
2202
+ spec: require_schemas.PageInsertBlankSpecSchema,
2203
+ position: require_schemas.PagePositionSchema.optional(),
2204
+ objectNumbers: zod.z.array(zod.z.number().int().positive()).optional()
2205
+ }),
2206
+ zod.z.object({
2207
+ type: zod.z.literal("pages.insert"),
2208
+ /** The PDF whose pages come in, as the key of its multipart part. */
2209
+ resources: require_schema.SourceResourceKeysSchema,
2210
+ position: require_schemas.PagePositionSchema.optional()
2211
+ }),
2212
+ zod.z.object({
2213
+ type: zod.z.literal("attachments.create"),
2214
+ file: require_schema.AttachmentFileBaseSchema,
2215
+ /** The file's bytes, as the key of their multipart part. */
2216
+ resources: require_schema.FileResourceKeysSchema
2217
+ }),
2218
+ zod.z.object({
2219
+ type: zod.z.literal("attachments.delete"),
2220
+ ref: require_schema.AttachmentRefSchema
2221
+ })
2222
+ ]);
2223
+ /**
2224
+ * One change of a request: its `ops`, or `undoOf`, the undo of an earlier
2225
+ * change. One object with exactly one of the two, so the wire has no untagged
2226
+ * union (the API reference labels variants by a discriminating literal).
2227
+ */
2228
+ const ChangeEntryWireSchema = zod.z.object({
2229
+ opId: OpIdSchema,
2230
+ ops: zod.z.array(ChangeOpWireSchema).optional(),
2231
+ undoOf: OpIdSchema.optional()
2232
+ }).strict().refine((entry) => entry.ops === void 0 !== (entry.undoOf === void 0), { message: "exactly one of ops or undoOf" });
2233
+ /** What a request may hold. */
2234
+ const CHANGE_REQUEST_LIMITS = {
2235
+ /** Changes per request. */
2236
+ changes: 64,
2237
+ /** Ops per change. */
2238
+ ops: 512
2239
+ };
2240
+ /** A `POST …/changes` body: the changes, applied in order, each on its own. */
2241
+ const ChangeRequestSchema = zod.z.object({ changes: zod.z.array(ChangeEntryWireSchema).min(1).max(CHANGE_REQUEST_LIMITS.changes) });
2242
+ /** What an item can be: an op's type, or a restore (only in an undo). */
2243
+ const ChangeItemTypeSchema = zod.z.enum([
2244
+ ...ChangeOpWireSchema.options.map((op) => op.shape.type.value),
2245
+ "annotations.restore",
2246
+ "forms.restore",
2247
+ "forms.restoreWidget",
2248
+ "outline.restore",
2249
+ "pages.restore",
2250
+ "attachments.restore"
2251
+ ]);
2252
+ /** What an undo left alone, by name. */
2253
+ const SkippedFieldsSchema = zod.z.array(zod.z.string()).optional();
2254
+ /** An item of `type`: its verb's result, after the type and what else the item adds. */
2255
+ function itemOf(type, result, extra = {}) {
2256
+ return zod.z.object({
2257
+ type: zod.z.literal(type),
2258
+ ...extra
2259
+ }).merge(result);
2260
+ }
2261
+ /**
2262
+ * One item of a change's result: what one op did, or that an undo left it
2263
+ * alone (`skipped`). Every item names itself by `type`.
2264
+ */
2265
+ const ChangeItemSchema = zod.z.union([
2266
+ zod.z.object({
2267
+ type: zod.z.literal("skipped"),
2268
+ /** The item it would have been. */
2269
+ op: ChangeItemTypeSchema,
2270
+ meta: require_schemas.MutationMetaSchema
2271
+ }),
2272
+ itemOf("annotations.create", require_schemas.AnnotationCreateResultSchema, { page: require_schema.PageRefSchema }),
2273
+ itemOf("annotations.update", require_schemas.AnnotationUpdateResultSchema, {
2274
+ page: require_schema.PageRefSchema,
2275
+ skipped: SkippedFieldsSchema
2276
+ }),
2277
+ itemOf("annotations.delete", require_schemas.AnnotationDeleteResultSchema, { page: require_schema.PageRefSchema }),
2278
+ itemOf("annotations.reorder", require_schemas.AnnotationReorderResultSchema, { page: require_schema.PageRefSchema }),
2279
+ zod.z.object({
2280
+ type: zod.z.literal("annotations.restore"),
2281
+ page: require_schema.PageRefSchema,
2282
+ annotations: zod.z.array(require_schema.AnnotationSchema),
2283
+ meta: require_schemas.AnnotationListMutationMetaSchema
2284
+ }),
2285
+ itemOf("forms.setValue", require_schemas.FormSetValueResultSchema),
2286
+ itemOf("forms.setDisplay", require_schemas.FormFieldUpdateResultSchema),
2287
+ itemOf("forms.setAppearanceText", require_schemas.FormFieldUpdateResultSchema),
2288
+ itemOf("forms.reset", require_schemas.FormResetResultSchema, { skipped: SkippedFieldsSchema }),
2289
+ itemOf("forms.create", require_schemas.FormFieldCreateResultSchema),
2290
+ itemOf("forms.update", require_schemas.FormFieldUpdateResultSchema, { skipped: SkippedFieldsSchema }),
2291
+ itemOf("forms.delete", require_schemas.FormFieldDeleteResultSchema),
2292
+ zod.z.object({
2293
+ type: zod.z.literal("forms.restore"),
2294
+ field: require_schema.FormFieldDTOSchema,
2295
+ widgets: zod.z.array(require_schema.WidgetDTOSchema),
2296
+ meta: require_schemas.FormMutationMetaSchema
2297
+ }),
2298
+ itemOf("forms.setSignatureAppearance", require_schemas.FormFieldUpdateResultSchema),
2299
+ itemOf("forms.addWidget", require_schemas.FormWidgetLinkResultSchema),
2300
+ itemOf("forms.removeWidget", require_schemas.FormWidgetLinkResultSchema),
2301
+ itemOf("forms.deleteWidget", require_schemas.FormWidgetDeleteResultSchema),
2302
+ itemOf("forms.restoreWidget", require_schemas.FormWidgetRestoreResultSchema),
2303
+ itemOf("forms.reorderWidgets", require_schemas.FormWidgetsReorderResultSchema),
2304
+ itemOf("forms.reorderCalculations", require_schemas.FormCalculationsReorderResultSchema),
2305
+ itemOf("forms.updateWidget", require_schemas.FormWidgetUpdateResultSchema, { skipped: SkippedFieldsSchema }),
2306
+ itemOf("metadata.update", require_schemas.MetadataUpdateResultSchema, { skipped: SkippedFieldsSchema }),
2307
+ itemOf("metadata.updateCustom", require_schemas.CustomMetadataUpdateResultSchema, { skipped: SkippedFieldsSchema }),
2308
+ itemOf("outline.create", require_schemas.OutlineCreateResultSchema),
2309
+ itemOf("outline.update", require_schemas.OutlineUpdateResultSchema, { skipped: SkippedFieldsSchema }),
2310
+ itemOf("outline.move", require_schemas.OutlineMoveResultSchema),
2311
+ itemOf("outline.delete", require_schemas.OutlineDeleteResultSchema),
2312
+ itemOf("outline.restore", require_schemas.OutlineRestoreResultSchema),
2313
+ itemOf("pages.rotate", require_schemas.PageRotateResultSchema, {
2314
+ pages: zod.z.array(require_schema.PageRefSchema),
2315
+ rotation: require_schema.PdfRotationSchema
2316
+ }),
2317
+ itemOf("pages.reorder", require_schemas.PageReorderResultSchema),
2318
+ itemOf("pages.delete", require_schemas.PageDeleteResultSchema, { pages: zod.z.array(require_schema.PageRefSchema) }),
2319
+ itemOf("pages.insertBlank", require_schemas.PageInsertResultSchema),
2320
+ itemOf("pages.insert", require_schemas.PageInsertResultSchema),
2321
+ itemOf("pages.restore", require_schemas.PageRestoreResultSchema),
2322
+ itemOf("attachments.create", require_schemas.AttachmentCreateResultSchema),
2323
+ itemOf("attachments.delete", require_schemas.AttachmentDeleteResultSchema),
2324
+ itemOf("attachments.restore", require_schemas.AttachmentRestoreResultSchema)
2325
+ ]);
2326
+ /** What a change did: one item per op (per step of an undo), and its meta. */
2327
+ const ChangeResultSchema = zod.z.object({
2328
+ items: zod.z.array(ChangeItemSchema),
2329
+ meta: require_schemas.MutationMetaSchema
2330
+ });
2331
+ /** One change's answer: applied with its result, or refused with the error. */
2332
+ const ChangeAnswerSchema = zod.z.discriminatedUnion("status", [zod.z.object({
2333
+ opId: zod.z.string(),
2334
+ status: zod.z.literal("applied"),
2335
+ result: ChangeResultSchema
2336
+ }), zod.z.object({
2337
+ opId: zod.z.string(),
2338
+ status: zod.z.literal("refused"),
2339
+ error: require_schemas.EngineErrorPayloadSchema
2340
+ })]);
2341
+ /** A `POST …/changes` response: one answer per change, in order. */
2342
+ const ChangeResponseSchema = zod.z.object({ changes: zod.z.array(ChangeAnswerSchema) });
2343
+ /**
2344
+ * Stable public component names for the change wire model, so an OpenAPI
2345
+ * projection names an op, an item and a result once, like
2346
+ * `AnnotationWireComponents`.
2347
+ */
2348
+ const ChangeWireComponents = {
2349
+ ChangeOp: ChangeOpWireSchema,
2350
+ ChangeItem: ChangeItemSchema,
2351
+ ChangeResult: ChangeResultSchema
2352
+ };
2353
+ //#endregion
2354
+ exports.ANNOTATION_KINDS = require_schema.ANNOTATION_KINDS;
1631
2355
  exports.AccessRequestSchema = require_schemas.AccessRequestSchema;
1632
2356
  exports.AccessResponseSchema = require_schemas.AccessResponseSchema;
1633
2357
  exports.ActionsTokenSchema = ActionsTokenSchema;
2358
+ exports.AnnotationAppearanceBatchSchema = require_schemas.AnnotationAppearanceBatchSchema;
1634
2359
  exports.AnnotationAppearanceExportInputSchema = require_schemas.AnnotationAppearanceExportInputSchema;
1635
- exports.AnnotationAppearanceManifestSchema = require_schemas.AnnotationAppearanceManifestSchema;
1636
2360
  exports.AnnotationAppearancesQuerySchema = require_schemas.AnnotationAppearancesQuerySchema;
1637
2361
  exports.AnnotationAppearancesRenderTokenSchema = AnnotationAppearancesRenderTokenSchema;
1638
- exports.AnnotationBaseShape = require_schemas.AnnotationBaseShape;
1639
- exports.AnnotationBorderStyleSchema = require_schemas.AnnotationBorderStyleSchema;
2362
+ exports.AnnotationBorderStyleSchema = require_schema.AnnotationBorderStyleSchema;
1640
2363
  exports.AnnotationCreateResultSchema = require_schemas.AnnotationCreateResultSchema;
1641
- exports.AnnotationDTOSchema = require_schemas.AnnotationDTOSchema;
1642
2364
  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;
2365
+ exports.AnnotationDraftSchema = require_schema.AnnotationDraftSchema;
2366
+ exports.AnnotationExportSelectionSchema = require_schemas.AnnotationExportSelectionSchema;
1647
2367
  exports.AnnotationFlattenInputSchema = require_schemas.AnnotationFlattenInputSchema;
1648
2368
  exports.AnnotationFlattenResultSchema = require_schemas.AnnotationFlattenResultSchema;
2369
+ exports.AnnotationImportBodySchema = require_schemas.AnnotationImportBodySchema;
2370
+ exports.AnnotationImportOptionsSchema = require_schemas.AnnotationImportOptionsSchema;
2371
+ exports.AnnotationImportResultSchema = require_schemas.AnnotationImportResultSchema;
1649
2372
  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;
2373
+ exports.AnnotationListSchema = require_schemas.AnnotationListSchema;
2374
+ exports.AnnotationPatchSchema = require_schema.AnnotationPatchSchema;
2375
+ exports.AnnotationPositionSchema = require_schemas.AnnotationPositionSchema;
2376
+ exports.AnnotationRefSchema = require_schema.AnnotationRefSchema;
2377
+ exports.AnnotationReorderBodySchema = require_schemas.AnnotationReorderBodySchema;
2378
+ exports.AnnotationReorderResultSchema = require_schemas.AnnotationReorderResultSchema;
2379
+ exports.AnnotationResourceKeysSchema = require_schema.AnnotationResourceKeysSchema;
2380
+ exports.AnnotationSchema = require_schema.AnnotationSchema;
1657
2381
  exports.AnnotationTokenSchema = AnnotationTokenSchema;
1658
2382
  exports.AnnotationUpdateResultSchema = require_schemas.AnnotationUpdateResultSchema;
2383
+ exports.AnnotationWireComponents = require_schemas.AnnotationWireComponents;
2384
+ exports.AnnotationsExportRequestSchema = require_schemas.AnnotationsExportRequestSchema;
1659
2385
  exports.AppearanceOutcomeSchema = require_schemas.AppearanceOutcomeSchema;
2386
+ exports.AppearanceResourceKeysSchema = require_schema.AppearanceResourceKeysSchema;
1660
2387
  exports.AttachmentCreateResultSchema = require_schemas.AttachmentCreateResultSchema;
1661
2388
  exports.AttachmentDeleteResultSchema = require_schemas.AttachmentDeleteResultSchema;
1662
- exports.AttachmentFileInfoSchema = require_schemas.AttachmentFileInfoSchema;
1663
- exports.AttachmentsCacheSchema = require_schemas.AttachmentsCacheSchema;
2389
+ exports.AttachmentFileBaseSchema = require_schema.AttachmentFileBaseSchema;
2390
+ exports.AttachmentFileInfoSchema = require_schema.AttachmentFileInfoSchema;
2391
+ exports.AttachmentListSchema = require_schemas.AttachmentListSchema;
2392
+ exports.AttachmentMutationMetaSchema = require_schemas.AttachmentMutationMetaSchema;
2393
+ exports.AttachmentRefSchema = require_schema.AttachmentRefSchema;
2394
+ exports.AttachmentRestoreResultSchema = require_schemas.AttachmentRestoreResultSchema;
2395
+ exports.AttachmentSchema = require_schema.AttachmentSchema;
2396
+ exports.AttachmentWireComponents = require_schemas.AttachmentWireComponents;
1664
2397
  exports.BaseVersionInfoSchema = require_schemas.BaseVersionInfoSchema;
1665
- exports.BlendModeSchema = require_schemas.BlendModeSchema;
2398
+ exports.BlendModeSchema = require_schema.BlendModeSchema;
2399
+ exports.BundleLimitsSchema = require_schemas.BundleLimitsSchema;
1666
2400
  exports.ByteRangeSchema = require_schemas.ByteRangeSchema;
2401
+ exports.CHANGE_REQUEST_LIMITS = CHANGE_REQUEST_LIMITS;
1667
2402
  exports.CacheDeltaSchema = require_schemas.CacheDeltaSchema;
1668
2403
  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;
2404
+ exports.CalloutLineSchema = require_schema.CalloutLineSchema;
2405
+ exports.CaretDTOSchema = require_schema.CaretDTOSchema;
2406
+ exports.CaretDraftSchema = require_schema.CaretDraftSchema;
2407
+ exports.CaretIntentSchema = require_schema.CaretIntentSchema;
2408
+ exports.CaretPatchSchema = require_schema.CaretPatchSchema;
1674
2409
  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;
2410
+ exports.ChangeAnswerSchema = ChangeAnswerSchema;
2411
+ exports.ChangeEntryWireSchema = ChangeEntryWireSchema;
2412
+ exports.ChangeItemSchema = ChangeItemSchema;
2413
+ exports.ChangeOpWireSchema = ChangeOpWireSchema;
2414
+ exports.ChangeRequestSchema = ChangeRequestSchema;
2415
+ exports.ChangeResponseSchema = ChangeResponseSchema;
2416
+ exports.ChangeResultSchema = ChangeResultSchema;
2417
+ exports.ChangeWireComponents = ChangeWireComponents;
2418
+ exports.CircleDTOSchema = require_schema.CircleDTOSchema;
2419
+ exports.CircleDraftSchema = require_schema.CircleDraftSchema;
2420
+ exports.CirclePatchSchema = require_schema.CirclePatchSchema;
2421
+ exports.ColorSchema = require_schema.ColorSchema;
1679
2422
  exports.ContentTokenSchema = ContentTokenSchema;
2423
+ exports.CustomMetadataPatchSchema = require_schemas.CustomMetadataPatchSchema;
2424
+ exports.CustomMetadataSchema = require_schemas.CustomMetadataSchema;
2425
+ exports.CustomMetadataUpdateResultSchema = require_schemas.CustomMetadataUpdateResultSchema;
1680
2426
  exports.DEFAULT_LAYER_NAME = DEFAULT_LAYER_NAME;
1681
2427
  exports.DOC_RESOURCES = DOC_RESOURCES;
2428
+ exports.DateInputSchema = require_schema.DateInputSchema;
1682
2429
  exports.DigestAlgorithmSchema = require_schemas.DigestAlgorithmSchema;
1683
2430
  exports.DocTokenSchema = DocTokenSchema;
1684
- exports.DocumentActionsSnapshotSchema = require_schemas.DocumentActionsSnapshotSchema;
2431
+ exports.DocumentActionsSnapshotSchema = require_schema.DocumentActionsSnapshotSchema;
1685
2432
  exports.DocumentHeadSchema = require_schemas.DocumentHeadSchema;
1686
2433
  exports.DocumentManifestSchema = require_schemas.DocumentManifestSchema;
1687
2434
  exports.DocumentMetadataSchema = require_schemas.DocumentMetadataSchema;
2435
+ exports.DocumentOutlineSchema = require_schemas.DocumentOutlineSchema;
1688
2436
  exports.DocumentProtectionSchema = require_schemas.DocumentProtectionSchema;
1689
2437
  exports.DocumentSecurityStateSchema = require_schemas.DocumentSecurityStateSchema;
1690
2438
  exports.DocumentVersionRefSchema = require_schemas.DocumentVersionRefSchema;
1691
2439
  exports.DocumentVersionSchema = require_schemas.DocumentVersionSchema;
1692
2440
  exports.DocumentVersionsSchema = require_schemas.DocumentVersionsSchema;
1693
- exports.EmbeddedFileItemSchema = require_schemas.EmbeddedFileItemSchema;
1694
- exports.EmbeddedFileRefSchema = require_schemas.EmbeddedFileRefSchema;
2441
+ exports.DocumentWireComponents = require_schemas.DocumentWireComponents;
2442
+ exports.DrawnBorderStyleSchema = require_schema.DrawnBorderStyleSchema;
2443
+ exports.EditSessionAccessSchema = require_schemas.EditSessionAccessSchema;
2444
+ exports.EditSessionStatusSchema = require_schemas.EditSessionStatusSchema;
1695
2445
  exports.EngineErrorPayloadSchema = require_schemas.EngineErrorPayloadSchema;
2446
+ exports.FieldActionsPatchSchema = require_schema.FieldActionsPatchSchema;
1696
2447
  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;
2448
+ exports.FieldPositionSchema = require_schemas.FieldPositionSchema;
2449
+ exports.FieldScriptWriteSchema = require_schema.FieldScriptWriteSchema;
2450
+ exports.FileAttachmentDTOSchema = require_schema.FileAttachmentDTOSchema;
2451
+ exports.FileAttachmentDraftSchema = require_schema.FileAttachmentDraftSchema;
2452
+ exports.FileAttachmentIconSchema = require_schema.FileAttachmentIconSchema;
2453
+ exports.FileAttachmentPatchSchema = require_schema.FileAttachmentPatchSchema;
2454
+ exports.FileResourceKeysSchema = require_schema.FileResourceKeysSchema;
2455
+ exports.FileWidgetActionsPatchSchema = require_schema.FileWidgetActionsPatchSchema;
2456
+ exports.FormCalculationsReorderBodySchema = require_schemas.FormCalculationsReorderBodySchema;
2457
+ exports.FormCalculationsReorderResultSchema = require_schemas.FormCalculationsReorderResultSchema;
2458
+ exports.FormExportRequestSchema = require_schemas.FormExportRequestSchema;
2459
+ exports.FormExportSelectionSchema = require_schemas.FormExportSelectionSchema;
1704
2460
  exports.FormFieldCreateResultSchema = require_schemas.FormFieldCreateResultSchema;
1705
- exports.FormFieldDTOSchema = require_schemas.FormFieldDTOSchema;
2461
+ exports.FormFieldDTOSchema = require_schema.FormFieldDTOSchema;
1706
2462
  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;
2463
+ exports.FormFieldDraftSchema = require_schema.FormFieldDraftSchema;
2464
+ exports.FormFieldOptionInputSchema = require_schema.FormFieldOptionInputSchema;
2465
+ exports.FormFieldOptionSchema = require_schema.FormFieldOptionSchema;
2466
+ exports.FormFieldPatchSchema = require_schema.FormFieldPatchSchema;
2467
+ exports.FormFieldRefSchema = require_schema.FormFieldRefSchema;
1713
2468
  exports.FormFieldUpdateResultSchema = require_schemas.FormFieldUpdateResultSchema;
1714
- exports.FormFieldValueSchema = require_schemas.FormFieldValueSchema;
2469
+ exports.FormFieldValueSchema = require_schema.FormFieldValueSchema;
2470
+ exports.FormImportBodySchema = require_schemas.FormImportBodySchema;
2471
+ exports.FormImportOptionsSchema = require_schemas.FormImportOptionsSchema;
1715
2472
  exports.FormImportResultSchema = require_schemas.FormImportResultSchema;
1716
- exports.FormKindSchema = require_schemas.FormKindSchema;
2473
+ exports.FormKindSchema = require_schema.FormKindSchema;
2474
+ exports.FormMutationMetaSchema = require_schemas.FormMutationMetaSchema;
1717
2475
  exports.FormRepairResultSchema = require_schemas.FormRepairResultSchema;
2476
+ exports.FormResetBodySchema = require_schemas.FormResetBodySchema;
2477
+ exports.FormResetResultSchema = require_schemas.FormResetResultSchema;
1718
2478
  exports.FormSetValueResultSchema = require_schemas.FormSetValueResultSchema;
1719
- exports.FormSnapshotSchema = require_schemas.FormSnapshotSchema;
2479
+ exports.FormSnapshotSchema = require_schema.FormSnapshotSchema;
1720
2480
  exports.FormSubmissionEntrySchema = FormSubmissionEntrySchema;
1721
2481
  exports.FormSubmissionReceiptSchema = FormSubmissionReceiptSchema;
1722
2482
  exports.FormSubmissionRequestSchema = FormSubmissionRequestSchema;
1723
- exports.FormValueEntrySchema = require_schemas.FormValueEntrySchema;
2483
+ exports.FormTokenSchema = FormTokenSchema;
2484
+ exports.FormValueEntrySchema = require_schema.FormValueEntrySchema;
2485
+ exports.FormValuesImportBodySchema = require_schemas.FormValuesImportBodySchema;
2486
+ exports.FormValuesImportOptionsSchema = require_schemas.FormValuesImportOptionsSchema;
2487
+ exports.FormValuesImportResultSchema = require_schemas.FormValuesImportResultSchema;
2488
+ exports.FormWidgetDeleteResultSchema = require_schemas.FormWidgetDeleteResultSchema;
1724
2489
  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;
2490
+ exports.FormWidgetRestoreResultSchema = require_schemas.FormWidgetRestoreResultSchema;
2491
+ exports.FormWidgetSchema = require_schema.FormWidgetSchema;
2492
+ exports.FormWidgetUpdateBodySchema = require_schemas.FormWidgetUpdateBodySchema;
2493
+ exports.FormWidgetUpdateResultSchema = require_schemas.FormWidgetUpdateResultSchema;
2494
+ exports.FormWidgetsReorderBodySchema = require_schemas.FormWidgetsReorderBodySchema;
2495
+ exports.FormWidgetsReorderResultSchema = require_schemas.FormWidgetsReorderResultSchema;
2496
+ exports.FormWireComponents = require_schemas.FormWireComponents;
2497
+ exports.FreeTextDTOSchema = require_schema.FreeTextDTOSchema;
2498
+ exports.FreeTextDraftSchema = require_schema.FreeTextDraftSchema;
2499
+ exports.FreeTextIntentSchema = require_schema.FreeTextIntentSchema;
2500
+ exports.FreeTextIntentWriteSchema = require_schema.FreeTextIntentWriteSchema;
2501
+ exports.FreeTextPatchSchema = require_schema.FreeTextPatchSchema;
2502
+ exports.HighlightDTOSchema = require_schema.HighlightDTOSchema;
2503
+ exports.HighlightDraftSchema = require_schema.HighlightDraftSchema;
2504
+ exports.HighlightPatchSchema = require_schema.HighlightPatchSchema;
2505
+ exports.IdentitySchema = require_schemas.IdentitySchema;
2506
+ exports.ImageResourceKeysSchema = require_schema.ImageResourceKeysSchema;
2507
+ exports.InkDTOSchema = require_schema.InkDTOSchema;
2508
+ exports.InkDraftSchema = require_schema.InkDraftSchema;
2509
+ exports.InkIntentSchema = require_schema.InkIntentSchema;
2510
+ exports.InkListSchema = require_schema.InkListSchema;
2511
+ exports.InkPatchSchema = require_schema.InkPatchSchema;
2512
+ exports.IsoDateTimeSchema = require_schema.IsoDateTimeSchema;
2513
+ exports.KIND_BY_SUBTYPE = require_schema.KIND_BY_SUBTYPE;
1739
2514
  exports.LayerAnalysisQuerySchema = require_schemas.LayerAnalysisQuerySchema;
1740
2515
  exports.LayerScopesSchema = require_schemas.LayerScopesSchema;
1741
2516
  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;
2517
+ exports.LineCaptionPatchSchema = require_schema.LineCaptionPatchSchema;
2518
+ exports.LineDTOSchema = require_schema.LineDTOSchema;
2519
+ exports.LineDimensionCaptionSchema = require_schema.LineDimensionCaptionSchema;
2520
+ exports.LineDraftSchema = require_schema.LineDraftSchema;
2521
+ exports.LineEndingSchema = require_schema.LineEndingSchema;
2522
+ exports.LineEndingsSchema = require_schema.LineEndingsSchema;
2523
+ exports.LineIntentSchema = require_schema.LineIntentSchema;
2524
+ exports.LineLeaderSchema = require_schema.LineLeaderSchema;
2525
+ exports.LinePatchSchema = require_schema.LinePatchSchema;
2526
+ exports.LinePointsSchema = require_schema.LinePointsSchema;
2527
+ exports.LinkDTOSchema = require_schema.LinkDTOSchema;
2528
+ exports.LinkDraftSchema = require_schema.LinkDraftSchema;
2529
+ exports.LinkPatchSchema = require_schema.LinkPatchSchema;
1755
2530
  exports.ManifestPageSchema = require_schemas.ManifestPageSchema;
1756
2531
  exports.MetadataPatchSchema = require_schemas.MetadataPatchSchema;
1757
2532
  exports.MetadataTokenSchema = MetadataTokenSchema;
@@ -1759,88 +2534,109 @@ exports.MetadataUpdateResultSchema = require_schemas.MetadataUpdateResultSchema;
1759
2534
  exports.ModificationLevelSchema = require_schemas.ModificationLevelSchema;
1760
2535
  exports.MutationMetaSchema = require_schemas.MutationMetaSchema;
1761
2536
  exports.NamedPageEntrySchema = require_schemas.NamedPageEntrySchema;
1762
- exports.NoteIconSchema = require_schemas.NoteIconSchema;
2537
+ exports.NoteIconSchema = require_schema.NoteIconSchema;
2538
+ exports.ObjectNumberRangeSchema = require_schemas.ObjectNumberRangeSchema;
2539
+ exports.ObjectNumberReservationRequestSchema = require_schemas.ObjectNumberReservationRequestSchema;
2540
+ exports.ObjectNumberReservationResponseSchema = require_schemas.ObjectNumberReservationResponseSchema;
1763
2541
  exports.OpenDocumentResponseSchema = require_schemas.OpenDocumentResponseSchema;
2542
+ exports.OutlineCreateResultSchema = require_schemas.OutlineCreateResultSchema;
2543
+ exports.OutlineDeleteResultSchema = require_schemas.OutlineDeleteResultSchema;
2544
+ exports.OutlineItemDraftSchema = require_schemas.OutlineItemDraftSchema;
2545
+ exports.OutlineItemPatchSchema = require_schemas.OutlineItemPatchSchema;
2546
+ exports.OutlineItemRefSchema = require_schemas.OutlineItemRefSchema;
2547
+ exports.OutlineItemSchema = require_schemas.OutlineItemSchema;
2548
+ exports.OutlineMoveResultSchema = require_schemas.OutlineMoveResultSchema;
2549
+ exports.OutlineMutationMetaSchema = require_schemas.OutlineMutationMetaSchema;
2550
+ exports.OutlineOrderSchema = require_schemas.OutlineOrderSchema;
2551
+ exports.OutlinePositionSchema = require_schemas.OutlinePositionSchema;
2552
+ exports.OutlineRestoreResultSchema = require_schemas.OutlineRestoreResultSchema;
2553
+ exports.OutlineUpdateResultSchema = require_schemas.OutlineUpdateResultSchema;
2554
+ exports.OutlineWireComponents = require_schemas.OutlineWireComponents;
2555
+ exports.PAGE_PICTURES = require_schemas.PAGE_PICTURES;
2556
+ exports.PAGE_PRINT_FAMILIES = require_schemas.PAGE_PRINT_FAMILIES;
2557
+ exports.PAGE_PRINT_TIERS = require_schemas.PAGE_PRINT_TIERS;
2558
+ exports.PAGE_RENDER_FAMILIES = require_schemas.PAGE_RENDER_FAMILIES;
2559
+ exports.PageBoxSchema = require_schema.PageBoxSchema;
1764
2560
  exports.PageBoxesSchema = require_schemas.PageBoxesSchema;
1765
- exports.PageDeleteInputSchema = require_schemas.PageDeleteInputSchema;
1766
2561
  exports.PageDeleteResultSchema = require_schemas.PageDeleteResultSchema;
1767
2562
  exports.PageExtractInputSchema = require_schemas.PageExtractInputSchema;
1768
2563
  exports.PageFlattenInputSchema = require_schemas.PageFlattenInputSchema;
1769
2564
  exports.PageFlattenResultSchema = require_schemas.PageFlattenResultSchema;
1770
2565
  exports.PageGeometrySnapshotSchema = require_schemas.PageGeometrySnapshotSchema;
1771
- exports.PageInsertBlankInputSchema = require_schemas.PageInsertBlankInputSchema;
1772
- exports.PageInsertInputSchema = require_schemas.PageInsertInputSchema;
2566
+ exports.PageInsertBlankSpecSchema = require_schemas.PageInsertBlankSpecSchema;
1773
2567
  exports.PageInsertResultSchema = require_schemas.PageInsertResultSchema;
1774
2568
  exports.PageLayoutSchema = require_schemas.PageLayoutSchema;
1775
2569
  exports.PageListSnapshotSchema = require_schemas.PageListSnapshotSchema;
1776
- exports.PageMeasurementViewportSchema = require_schemas.PageMeasurementViewportSchema;
1777
- exports.PageMoveInputSchema = require_schemas.PageMoveInputSchema;
1778
- exports.PageMoveResultSchema = require_schemas.PageMoveResultSchema;
2570
+ exports.PageMeasurementViewportListSchema = require_schema.PageMeasurementViewportListSchema;
2571
+ exports.PageMeasurementViewportSchema = require_schema.PageMeasurementViewportSchema;
1779
2572
  exports.PageNameInputSchema = require_schemas.PageNameInputSchema;
1780
2573
  exports.PageNameResultSchema = require_schemas.PageNameResultSchema;
1781
2574
  exports.PageNetworkRenderFormatSchema = require_schemas.PageNetworkRenderFormatSchema;
2575
+ exports.PagePointSchema = require_schema.PagePointSchema;
2576
+ exports.PagePositionSchema = require_schemas.PagePositionSchema;
2577
+ exports.PagePrintQuerySchemas = require_schemas.PagePrintQuerySchemas;
2578
+ exports.PageQuadSchema = require_schema.PageQuadSchema;
2579
+ exports.PageRefSchema = require_schema.PageRefSchema;
1782
2580
  exports.PageRemoveNameInputSchema = require_schemas.PageRemoveNameInputSchema;
1783
- exports.PageRenderAnnotatedQuerySchema = require_schemas.PageRenderAnnotatedQuerySchema;
1784
- exports.PageRenderQuerySchema = require_schemas.PageRenderQuerySchema;
1785
- exports.PageRotateInputSchema = require_schemas.PageRotateInputSchema;
2581
+ exports.PageRenderQuerySchemas = require_schemas.PageRenderQuerySchemas;
2582
+ exports.PageReorderResultSchema = require_schemas.PageReorderResultSchema;
2583
+ exports.PageRestoreResultSchema = require_schemas.PageRestoreResultSchema;
1786
2584
  exports.PageRotateResultSchema = require_schemas.PageRotateResultSchema;
1787
- exports.PageScaleInputSchema = require_schemas.PageScaleInputSchema;
2585
+ exports.PageScaleInputSchema = require_schema.PageScaleInputSchema;
1788
2586
  exports.PageScaleResultSchema = require_schemas.PageScaleResultSchema;
1789
- exports.PageStateSchema = require_schemas.PageStateSchema;
1790
- exports.PageStructureCacheSchema = require_schemas.PageStructureCacheSchema;
1791
2587
  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;
2588
+ exports.PdfActionNodeSchema = require_schema.PdfActionNodeSchema;
2589
+ exports.PdfActionTargetRefSchema = require_schema.PdfActionTargetRefSchema;
2590
+ exports.PdfActionTreeSchema = require_schema.PdfActionTreeSchema;
2591
+ exports.PdfActionTypeSchema = require_schema.PdfActionTypeSchema;
2592
+ exports.PdfActionWireComponents = require_schema.PdfActionWireComponents;
2593
+ exports.PdfActionWriteSchema = require_schema.PdfActionWriteSchema;
2594
+ exports.PdfAnnotationActionsSchema = require_schema.PdfAnnotationActionsSchema;
2595
+ exports.PdfDestinationSchema = require_schema.PdfDestinationSchema;
2596
+ exports.PdfFieldActionsSchema = require_schema.PdfFieldActionsSchema;
2597
+ exports.PdfForeignMeasureSchema = require_schema.PdfForeignMeasureSchema;
2598
+ exports.PdfLinkTargetSchema = require_schema.PdfLinkTargetSchema;
2599
+ exports.PdfLinkTargetWritableSchema = require_schema.PdfLinkTargetWritableSchema;
2600
+ exports.PdfMeasureSchema = require_schema.PdfMeasureSchema;
2601
+ exports.PdfMeasureWriteSchema = require_schema.PdfMeasureWriteSchema;
2602
+ exports.PdfMeasurementSchema = require_schema.PdfMeasurementSchema;
2603
+ exports.PdfNumberFormatSchema = require_schema.PdfNumberFormatSchema;
2604
+ exports.PdfPageActionsSchema = require_schema.PdfPageActionsSchema;
2605
+ exports.PdfPointSchema = require_schema.PdfPointSchema;
2606
+ exports.PdfQuadSchema = require_schema.PdfQuadSchema;
2607
+ exports.PdfRectSchema = require_schema.PdfRectSchema;
1812
2608
  exports.PdfRevisionSchema = require_schemas.PdfRevisionSchema;
1813
- exports.PdfRotationSchema = require_schemas.PdfRotationSchema;
2609
+ exports.PdfRotationSchema = require_schema.PdfRotationSchema;
1814
2610
  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;
2611
+ exports.PdfSizeSchema = require_schema.PdfSizeSchema;
2612
+ exports.PointSchema = require_schema.PointSchema;
2613
+ exports.PolygonDTOSchema = require_schema.PolygonDTOSchema;
2614
+ exports.PolygonDraftSchema = require_schema.PolygonDraftSchema;
2615
+ exports.PolygonIntentSchema = require_schema.PolygonIntentSchema;
2616
+ exports.PolygonPatchSchema = require_schema.PolygonPatchSchema;
2617
+ exports.PolylineDTOSchema = require_schema.PolylineDTOSchema;
2618
+ exports.PolylineDraftSchema = require_schema.PolylineDraftSchema;
2619
+ exports.PolylineIntentSchema = require_schema.PolylineIntentSchema;
2620
+ exports.PolylinePatchSchema = require_schema.PolylinePatchSchema;
2621
+ exports.PopupDTOSchema = require_schema.PopupDTOSchema;
2622
+ exports.PopupDraftSchema = require_schema.PopupDraftSchema;
2623
+ exports.PopupPatchSchema = require_schema.PopupPatchSchema;
2624
+ exports.RectSchema = require_schema.RectSchema;
1826
2625
  exports.RedactionApplyResultSchema = require_schemas.RedactionApplyResultSchema;
1827
2626
  exports.RedactionApplyScopeSchema = require_schemas.RedactionApplyScopeSchema;
1828
- exports.RefetchReasonSchema = require_schemas.RefetchReasonSchema;
1829
2627
  exports.RenderTokenSchema = RenderTokenSchema;
1830
- exports.ResourceRefSchema = require_schemas.ResourceRefSchema;
1831
- exports.RevisionTokenSchema = require_schemas.RevisionTokenSchema;
2628
+ exports.ResourceKeySchema = require_schema.ResourceKeySchema;
1832
2629
  exports.SEARCH_RESULT_FORMAT = SEARCH_RESULT_FORMAT;
1833
2630
  exports.SearchMatchSchema = require_schemas.SearchMatchSchema;
1834
- exports.SearchModeSchema = require_schemas.SearchModeSchema;
1835
2631
  exports.SearchQuerySchema = require_schemas.SearchQuerySchema;
1836
2632
  exports.SearchRequestSchema = require_schemas.SearchRequestSchema;
1837
2633
  exports.SearchSliceSchema = require_schemas.SearchSliceSchema;
1838
2634
  exports.SearchSnippetSchema = require_schemas.SearchSnippetSchema;
1839
2635
  exports.SearchTokenSchema = SearchTokenSchema;
1840
- exports.ShapeCaptionPatchSchema = require_schemas.ShapeCaptionPatchSchema;
1841
- exports.ShapeDimensionCaptionSchema = require_schemas.ShapeDimensionCaptionSchema;
1842
- exports.SignatureAbortResultSchema = require_schemas.SignatureAbortResultSchema;
2636
+ exports.ShapeCaptionPatchSchema = require_schema.ShapeCaptionPatchSchema;
2637
+ exports.ShapeDimensionCaptionSchema = require_schema.ShapeDimensionCaptionSchema;
1843
2638
  exports.SignatureAppearanceBodySchema = require_schemas.SignatureAppearanceBodySchema;
2639
+ exports.SignatureCancelResultSchema = require_schemas.SignatureCancelResultSchema;
1844
2640
  exports.SignatureCompleteBodySchema = require_schemas.SignatureCompleteBodySchema;
1845
2641
  exports.SignatureCompleteResultSchema = require_schemas.SignatureCompleteResultSchema;
1846
2642
  exports.SignatureDTOSchema = require_schemas.SignatureDTOSchema;
@@ -1848,41 +2644,50 @@ exports.SignaturePrepareBodySchema = require_schemas.SignaturePrepareBodySchema;
1848
2644
  exports.SignaturePreparedWireSchema = require_schemas.SignaturePreparedWireSchema;
1849
2645
  exports.SignatureSeedValueSchema = require_schemas.SignatureSeedValueSchema;
1850
2646
  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;
2647
+ exports.SourceResourceKeysSchema = require_schema.SourceResourceKeysSchema;
2648
+ exports.SquareDTOSchema = require_schema.SquareDTOSchema;
2649
+ exports.SquareDraftSchema = require_schema.SquareDraftSchema;
2650
+ exports.SquarePatchSchema = require_schema.SquarePatchSchema;
2651
+ exports.SquigglyDTOSchema = require_schema.SquigglyDTOSchema;
2652
+ exports.SquigglyDraftSchema = require_schema.SquigglyDraftSchema;
2653
+ exports.SquigglyPatchSchema = require_schema.SquigglyPatchSchema;
2654
+ exports.StampDTOSchema = require_schema.StampDTOSchema;
2655
+ exports.StampDraftSchema = require_schema.StampDraftSchema;
2656
+ exports.StampFitSchema = require_schema.StampFitSchema;
2657
+ exports.StampPatchSchema = require_schema.StampPatchSchema;
2658
+ exports.StandardFontSchema = require_schema.StandardFontSchema;
2659
+ exports.StrikeoutDTOSchema = require_schema.StrikeoutDTOSchema;
2660
+ exports.StrikeoutDraftSchema = require_schema.StrikeoutDraftSchema;
2661
+ exports.StrikeoutIntentSchema = require_schema.StrikeoutIntentSchema;
2662
+ exports.StrikeoutPatchSchema = require_schema.StrikeoutPatchSchema;
2663
+ exports.TextAlignmentSchema = require_schema.TextAlignmentSchema;
2664
+ exports.TextDTOSchema = require_schema.TextDTOSchema;
2665
+ exports.TextDraftSchema = require_schema.TextDraftSchema;
2666
+ exports.TextPatchSchema = require_schema.TextPatchSchema;
2667
+ exports.ToggleFieldWidgetSchema = require_schema.ToggleFieldWidgetSchema;
2668
+ exports.UnderlineDTOSchema = require_schema.UnderlineDTOSchema;
2669
+ exports.UnderlineDraftSchema = require_schema.UnderlineDraftSchema;
2670
+ exports.UnderlinePatchSchema = require_schema.UnderlinePatchSchema;
2671
+ exports.UnsupportedDTOSchema = require_schema.UnsupportedDTOSchema;
2672
+ exports.UnsupportedDraftSchema = require_schema.UnsupportedDraftSchema;
2673
+ exports.UnsupportedPatchSchema = require_schema.UnsupportedPatchSchema;
1876
2674
  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;
2675
+ exports.VerticalAlignmentSchema = require_schema.VerticalAlignmentSchema;
2676
+ exports.WidgetActionsPatchSchema = require_schema.WidgetActionsPatchSchema;
2677
+ exports.WidgetAppearanceSchema = require_schema.WidgetAppearanceSchema;
2678
+ exports.WidgetAppearancesQuerySchema = require_schemas.WidgetAppearancesQuerySchema;
2679
+ exports.WidgetAppearancesRenderTokenSchema = WidgetAppearancesRenderTokenSchema;
2680
+ exports.WidgetBorderStyleSchema = require_schema.WidgetBorderStyleSchema;
2681
+ exports.WidgetCheckStyleSchema = require_schema.WidgetCheckStyleSchema;
2682
+ exports.WidgetDTOSchema = require_schema.WidgetDTOSchema;
2683
+ exports.WidgetPatchSchema = require_schema.WidgetPatchSchema;
2684
+ exports.WidgetPlacementSchema = require_schema.WidgetPlacementSchema;
2685
+ exports.WireAttachmentFileSchema = require_schema.WireAttachmentFileSchema;
1882
2686
  exports.analysisQueryString = analysisQueryString;
1883
2687
  exports.analyzeInputFromQuery = require_schemas.analyzeInputFromQuery;
1884
2688
  exports.annotationAppearancesImageOptionsToToken = annotationAppearancesImageOptionsToToken;
1885
2689
  exports.annotationAppearancesImageOptionsToWire = annotationAppearancesImageOptionsToWire;
2690
+ exports.annotationPatchSchemaOf = require_schema.annotationPatchSchemaOf;
1886
2691
  exports.annotationRenderOptionsFromImageOptions = annotationRenderOptionsFromImageOptions;
1887
2692
  exports.applyCdnAccess = applyCdnAccess;
1888
2693
  exports.cdnCoverageForScope = cdnCoverageForScope;
@@ -1892,41 +2697,58 @@ exports.decodeAnalysisToken = decodeAnalysisToken;
1892
2697
  exports.decodeAnnotationAppearancesRenderToken = decodeAnnotationAppearancesRenderToken;
1893
2698
  exports.decodeAnnotationToken = decodeAnnotationToken;
1894
2699
  exports.decodeAnnotationsAllToken = decodeAnnotationsAllToken;
2700
+ exports.decodeAnnotationsExportToken = decodeAnnotationsExportToken;
1895
2701
  exports.decodeAttachmentsToken = decodeAttachmentsToken;
1896
2702
  exports.decodeContentToken = decodeContentToken;
1897
2703
  exports.decodeDocToken = decodeDocToken;
1898
2704
  exports.decodeDownloadToken = decodeDownloadToken;
2705
+ exports.decodeFormExportToken = decodeFormExportToken;
2706
+ exports.decodeFormToken = decodeFormToken;
1899
2707
  exports.decodeLayoutToken = decodeLayoutToken;
1900
2708
  exports.decodeMetadataToken = decodeMetadataToken;
2709
+ exports.decodeOutlineToken = decodeOutlineToken;
1901
2710
  exports.decodePrepared = require_schemas.decodePrepared;
1902
2711
  exports.decodeRenderToken = decodeRenderToken;
1903
2712
  exports.decodeSearchToken = decodeSearchToken;
1904
2713
  exports.decodeToken = decodeToken;
1905
2714
  exports.decodeTokenText = decodeTokenText;
2715
+ exports.decodeWidgetAppearancesRenderToken = decodeWidgetAppearancesRenderToken;
1906
2716
  exports.encodeActionsToken = encodeActionsToken;
1907
2717
  exports.encodeAnalysisToken = encodeAnalysisToken;
1908
2718
  exports.encodeAnnotationAppearancesRenderToken = encodeAnnotationAppearancesRenderToken;
1909
2719
  exports.encodeAnnotationToken = encodeAnnotationToken;
1910
2720
  exports.encodeAnnotationsAllToken = encodeAnnotationsAllToken;
2721
+ exports.encodeAnnotationsExportToken = encodeAnnotationsExportToken;
2722
+ exports.encodeAppearanceModes = encodeAppearanceModes;
1911
2723
  exports.encodeAttachmentsToken = encodeAttachmentsToken;
1912
2724
  exports.encodeContentToken = encodeContentToken;
1913
2725
  exports.encodeDocToken = encodeDocToken;
1914
2726
  exports.encodeDownloadToken = encodeDownloadToken;
2727
+ exports.encodeFormExportToken = encodeFormExportToken;
2728
+ exports.encodeFormToken = encodeFormToken;
1915
2729
  exports.encodeLayoutToken = encodeLayoutToken;
1916
2730
  exports.encodeMetadataToken = encodeMetadataToken;
2731
+ exports.encodeOutlineToken = encodeOutlineToken;
1917
2732
  exports.encodePrepared = require_schemas.encodePrepared;
1918
2733
  exports.encodeRenderToken = encodeRenderToken;
1919
2734
  exports.encodeSearchToken = encodeSearchToken;
1920
2735
  exports.encodeToken = encodeToken;
1921
2736
  exports.encodeTokenText = encodeTokenText;
2737
+ exports.encodeWidgetAppearancesRenderToken = encodeWidgetAppearancesRenderToken;
1922
2738
  exports.flatten = flatten;
1923
- exports.fromBase64 = require_schemas.fromBase64;
2739
+ exports.fromBase64 = require_charmap.fromBase64;
2740
+ exports.pagePictureOf = require_schemas.pagePictureOf;
2741
+ exports.pagePictureQuerySchema = require_schemas.pagePictureQuerySchema;
2742
+ exports.pagePrintTierOf = require_schemas.pagePrintTierOf;
2743
+ exports.pageRenderFamilyOf = require_schemas.pageRenderFamilyOf;
1924
2744
  exports.pageRenderOptionsFromImageOptions = pageRenderOptionsFromImageOptions;
1925
2745
  exports.renderImageOptionsToToken = renderImageOptionsToToken;
1926
2746
  exports.renderImageOptionsToWire = renderImageOptionsToWire;
1927
2747
  exports.resolveResourceIdForPath = resolveResourceIdForPath;
1928
- exports.toBase64 = require_schemas.toBase64;
2748
+ exports.toBase64 = require_charmap.toBase64;
1929
2749
  exports.unflatten = unflatten;
2750
+ exports.widgetAppearancesImageOptionsToToken = widgetAppearancesImageOptionsToToken;
2751
+ exports.widgetAppearancesImageOptionsToWire = widgetAppearancesImageOptionsToWire;
1930
2752
  exports.wirePaths = wirePaths;
1931
2753
  exports.wireTemplates = wireTemplates;
1932
2754