@embedpdf/engine-core 3.0.0-next.1 → 3.0.0-next.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AbortError-CjSasIlL.js → AbortError-8-9JAX1Y.js} +2 -2
- package/dist/{AbortError-CjSasIlL.js.map → AbortError-8-9JAX1Y.js.map} +1 -1
- package/dist/{AbortError-ByBflvEl.cjs → AbortError-CRSooKsk.cjs} +2 -2
- package/dist/{AbortError-ByBflvEl.cjs.map → AbortError-CRSooKsk.cjs.map} +1 -1
- package/dist/{AnnotationListSnapshot-W0RCsyDE.d.cts → AnnotationListSnapshot-C1U3XUxP.d.cts} +846 -127
- package/dist/{AnnotationListSnapshot-W0RCsyDE.d.ts → AnnotationListSnapshot-C1U3XUxP.d.ts} +846 -127
- package/dist/{DocumentSecurityService-Df79fgpe.d.cts → DocumentSecurityService-6rhztZlz.d.cts} +33 -2
- package/dist/{DocumentSecurityService-B-tULKNY.d.ts → DocumentSecurityService-7nL9aY75.d.ts} +33 -2
- package/dist/{Engine-B7Oe7f5i.d.ts → Engine-CWnAKccD.d.ts} +62 -19
- package/dist/{Engine-D9loFZc1.d.cts → Engine-D3868xIU.d.cts} +62 -19
- package/dist/{subtype-qejjVr6h.cjs → PageInsertBlankInput-CzShuSJI.cjs} +184 -1
- package/dist/PageInsertBlankInput-CzShuSJI.cjs.map +1 -0
- package/dist/{subtype-BvAzLCGC.js → PageInsertBlankInput-WKY0tr6S.js} +149 -2
- package/dist/PageInsertBlankInput-WKY0tr6S.js.map +1 -0
- package/dist/{builders-C548U47M.js → builders-Cdz34nbF.js} +566 -164
- package/dist/builders-Cdz34nbF.js.map +1 -0
- package/dist/{builders-BvikWRuO.cjs → builders-Do6_4KnS.cjs} +628 -220
- package/dist/builders-Do6_4KnS.cjs.map +1 -0
- package/dist/conformance.cjs +1039 -204
- package/dist/conformance.cjs.map +1 -1
- package/dist/conformance.d.cts +130 -6
- package/dist/conformance.d.ts +130 -6
- package/dist/conformance.js +994 -163
- package/dist/conformance.js.map +1 -1
- package/dist/{fold-CB4fAOOy.js → fold-BfyxxwS6.js} +162 -3
- package/dist/fold-BfyxxwS6.js.map +1 -0
- package/dist/{fold-IaMph3CO.cjs → fold-C7I5GpBz.cjs} +235 -4
- package/dist/fold-C7I5GpBz.cjs.map +1 -0
- package/dist/index.cjs +38 -19
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +5 -5
- package/dist/{resolver-DiPMTfcy.js → resolver-CHG4waXL.js} +2 -1
- package/dist/resolver-CHG4waXL.js.map +1 -0
- package/dist/{resolver-DAZWVoJL.cjs → resolver-D-jumvgM.cjs} +2 -1
- package/dist/resolver-D-jumvgM.cjs.map +1 -0
- package/dist/runtime.cjs +43 -24
- package/dist/runtime.cjs.map +1 -1
- package/dist/runtime.d.cts +103 -5
- package/dist/runtime.d.ts +103 -5
- package/dist/runtime.js +6 -6
- package/dist/{schemas-B_1VyFsm.cjs → schemas-CS5iPpX5.cjs} +305 -111
- package/dist/schemas-CS5iPpX5.cjs.map +1 -0
- package/dist/{schemas-9OpSSeM6.js → schemas-XGrNVMDd.js} +250 -92
- package/dist/schemas-XGrNVMDd.js.map +1 -0
- package/dist/wire.cjs +131 -4
- package/dist/wire.cjs.map +1 -1
- package/dist/wire.d.cts +277 -20
- package/dist/wire.d.ts +277 -20
- package/dist/wire.js +120 -5
- package/dist/wire.js.map +1 -1
- package/package.json +1 -1
- package/dist/builders-BvikWRuO.cjs.map +0 -1
- package/dist/builders-C548U47M.js.map +0 -1
- package/dist/fold-CB4fAOOy.js.map +0 -1
- package/dist/fold-IaMph3CO.cjs.map +0 -1
- package/dist/resolver-DAZWVoJL.cjs.map +0 -1
- package/dist/resolver-DiPMTfcy.js.map +0 -1
- package/dist/schemas-9OpSSeM6.js.map +0 -1
- package/dist/schemas-B_1VyFsm.cjs.map +0 -1
- package/dist/subtype-BvAzLCGC.js.map +0 -1
- package/dist/subtype-qejjVr6h.cjs.map +0 -1
package/dist/wire.js
CHANGED
|
@@ -1,5 +1,41 @@
|
|
|
1
|
-
import { n as checkCapability, t as checkAnyCapability } from "./resolver-
|
|
2
|
-
import { $ as
|
|
1
|
+
import { n as checkCapability, t as checkAnyCapability } from "./resolver-CHG4waXL.js";
|
|
2
|
+
import { $ as PageRenderAnnotatedQuerySchema, $n as BlendModeSchema, $t as StampDTOSchema, A as FormSetValueResultSchema, An as FreeTextPatchSchema, Ar as PdfSizeSchema, At as FormWidgetRefSchema, B as PageDeleteResultSchema, Bn as CircleDraftSchema, Bt as UnsupportedDraftSchema, C as FormEffectSchema, Cn as InkDraftSchema, Cr as CalloutLineSchema, Ct as FormFieldOptionSchema, D as FormFieldUpdateResultSchema, Dn as HighlightPatchSchema, Dr as PdfQuadSchema, Dt as FormKindSchema, E as FormFieldDeleteResultSchema, En as HighlightDraftSchema, Er as PdfPointSchema, Et as FormFieldValueSchema, F as MetadataUpdateResultSchema, Fn as WireAttachmentFileSchema, Ft as AnnotationDraftSchema, G as PageInsertBlankInputSchema, Gn as AnnotationBaseShape, Gt as NoteIconSchema, H as PageFlattenInputSchema, Hn as CaretDTOSchema, Ht as UnderlineDTOSchema, I as MutationMetaSchema, In as AttachmentFileInfoSchema, It as AnnotationPatchSchema, J as PageLayoutSchema, Jn as AnnotationFlagsPartialSchema, Jt as TextPatchSchema, K as PageInsertInputSchema, Kn as AnnotationBorderStyleSchema, Kt as TextDTOSchema, L as OpenDocumentResponseSchema, Ln as EmbeddedFileItemSchema, Lt as KIND_BY_SUBTYPE, M as LayerScopesSchema, Mn as FileAttachmentIconSchema, Mt as WidgetPlacementSchema, N as ManifestPageSchema, Nn as FileAttachmentPatchSchema, Nt as ANNOTATION_KINDS, O as FormImportResultSchema, On as FreeTextDTOSchema, Or as PdfRectSchema, Ot as FormSnapshotSchema, P as MetadataPatchSchema, Pn as FileAttachmentWireDraftSchema, Pt as AnnotationDTOSchema, Q as PageNetworkRenderFormatSchema, Qn as AnnotationStableIdSchema, Qt as ResourceRefSchema, R as PageBoxesSchema, Rn as EmbeddedFileRefSchema, Rt as WidgetAppearanceSchema, S as EngineErrorPayloadSchema, Sn as InkDTOSchema, Sr as PdfDestinationSchema, St as FormFieldOptionInputSchema, T as FormFieldCreateResultSchema, Tn as HighlightDTOSchema, Tr as LinePointsSchema, Tt as FormFieldRefSchema, U as PageFlattenResultSchema, Un as CaretDraftSchema, Ut as UnderlineDraftSchema, V as PageExtractInputSchema, Vn as CirclePatchSchema, Vt as UnsupportedPatchSchema, W as PageGeometrySnapshotSchema, Wn as CaretPatchSchema, Wt as UnderlinePatchSchema, X as PageMoveInputSchema, Xn as AnnotationPatchBaseShape, Xt as StrikeoutDraftSchema, Y as PageListSnapshotSchema, Yn as AnnotationFlagsSchema, Yt as StrikeoutDTOSchema, Z as PageMoveResultSchema, Zn as AnnotationRefSchema, Zt as StrikeoutPatchSchema, _ as CachePinsSchema, _n as PdfLinkTargetSchema, _r as PdfActionTypeSchema, _t as WeakAnnotationSessionResponseSchema, a as AnnotationCreateResultSchema, an as SquareDTOSchema, ar as LineEndingsSchema, at as PageTextSnapshotSchema, b as DocumentMetadataSchema, bn as LineDraftSchema, br as PdfFieldActionsSchema, bt as FormFieldDraftSchema, c as AnnotationListPageSnapshotSchema, cn as PolylineDTOSchema, cr as RectSchema, ct as RedactionApplyScopeSchema, d as AnnotationUpdateResultSchema, dn as PolygonDTOSchema, dr as StrikeoutIntentSchema, dt as SearchModeSchema, en as StampWireDraftSchema, er as CaretIntentSchema, et as PageRenderQuerySchema, f as AppearanceOutcomeSchema, fn as PolygonDraftSchema, fr as TextAlignmentSchema, ft as SearchQuerySchema, g as CacheDeltaSchema, gn as LinkPatchSchema, gr as PdfActionTreeSchema, gt as WeakAnnotationSessionPagesRequestSchema, h as AttachmentsCacheSchema, hn as LinkDraftSchema, hr as PdfActionTargetRefSchema, ht as SearchSnippetSchema, i as AnnotationAppearancesQuerySchema, in as SquigglyPatchSchema, ir as LineEndingSchema, it as PageStructureCacheSchema, j as FormWidgetLinkResultSchema, jn as FileAttachmentDTOSchema, jt as ToggleFieldWidgetSchema, k as FormRepairResultSchema, kn as FreeTextDraftSchema, kr as PdfRotationSchema, kt as FormValueEntrySchema, l as AnnotationListSnapshotAllPagesSchema, ln as PolylineDraftSchema, lr as RevisionTokenSchema, lt as RefetchReasonSchema, m as AttachmentDeleteResultSchema, mn as LinkDTOSchema, mr as PdfActionNodeSchema, mt as SearchSliceSchema, n as AccessResponseSchema, nn as SquigglyDTOSchema, nr as FreeTextIntentSchema, nt as PageRotateResultSchema, o as AnnotationDeleteResultSchema, on as SquareDraftSchema, or as PdfRectDifferencesSchema, ot as PdfSaveModeSchema, p as AttachmentCreateResultSchema, pn as PolygonPatchSchema, pr as DocumentActionsSnapshotSchema, pt as SearchRequestSchema, q as PageInsertResultSchema, qn as AnnotationDraftBaseShape, qt as TextDraftSchema, r as AnnotationAppearanceManifestSchema, rn as SquigglyDraftSchema, rr as InkIntentSchema, rt as PageStateSchema, s as AnnotationListMutationMetaSchema, sn as SquarePatchSchema, sr as PointSchema, st as RedactionApplyResultSchema, t as AccessRequestSchema, tn as StampWirePatchSchema, tr as ColorSchema, tt as PageRotateInputSchema, u as AnnotationMoveResultSchema, un as PolylinePatchSchema, ur as StandardFontSchema, ut as SearchMatchSchema, v as DocumentHeadSchema, vn as PdfLinkTargetWritableSchema, vr as PdfActionWireComponents, vt as FormDataFormatSchema, w as FormEffectsResultSchema, wn as InkPatchSchema, wr as InkListSchema, wt as FormFieldPatchSchema, x as DocumentSecurityStateSchema, xn as LinePatchSchema, xr as PdfPageActionsSchema, xt as FormFieldFlagsSchema, y as DocumentManifestSchema, yn as LineDTOSchema, yr as PdfAnnotationActionsSchema, yt as FormFieldDTOSchema, z as PageDeleteInputSchema, zn as CircleDTOSchema, zt as UnsupportedDTOSchema } from "./schemas-XGrNVMDd.js";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
//#region src/forms/submission.ts
|
|
5
|
+
const FormSubmissionEntrySchema = z.object({
|
|
6
|
+
name: z.string(),
|
|
7
|
+
value: z.union([
|
|
8
|
+
z.string(),
|
|
9
|
+
z.array(z.string()),
|
|
10
|
+
z.null()
|
|
11
|
+
])
|
|
12
|
+
});
|
|
13
|
+
const FormSubmissionRequestSchema = z.object({
|
|
14
|
+
entries: z.array(FormSubmissionEntrySchema),
|
|
15
|
+
intent: z.object({
|
|
16
|
+
url: z.string().nullable(),
|
|
17
|
+
format: z.enum([
|
|
18
|
+
"fdf",
|
|
19
|
+
"html",
|
|
20
|
+
"xfdf",
|
|
21
|
+
"pdf"
|
|
22
|
+
]),
|
|
23
|
+
method: z.enum(["post", "get"]),
|
|
24
|
+
flagsRaw: z.number().int().nonnegative(),
|
|
25
|
+
charSet: z.string().optional()
|
|
26
|
+
}),
|
|
27
|
+
origin: z.enum([
|
|
28
|
+
"user",
|
|
29
|
+
"hover",
|
|
30
|
+
"lifecycle"
|
|
31
|
+
]),
|
|
32
|
+
clientTimeMs: z.number().finite()
|
|
33
|
+
});
|
|
34
|
+
const FormSubmissionReceiptSchema = z.object({
|
|
35
|
+
submissionId: z.string().min(1),
|
|
36
|
+
receivedAt: z.string().min(1)
|
|
37
|
+
});
|
|
38
|
+
//#endregion
|
|
3
39
|
//#region src/wire/token.ts
|
|
4
40
|
const DEFAULT_MAX_TOKEN_LENGTH = 256;
|
|
5
41
|
const FIELD_NAME_RE = /^[A-Za-z][A-Za-z0-9]*(?:\.[A-Za-z][A-Za-z0-9]*)*$/;
|
|
@@ -75,6 +111,9 @@ const ContentTokenSchema = { fields: ["contentVersion"] };
|
|
|
75
111
|
const LayoutTokenSchema = { fields: ["layoutVersion"] };
|
|
76
112
|
const MetadataTokenSchema = { fields: ["metadataVersion"] };
|
|
77
113
|
const AnnotationTokenSchema = { fields: ["annotationVersion"] };
|
|
114
|
+
/** Doc-level bulk annotations listing pin (plural, vs the per-page
|
|
115
|
+
* `annotationVersion` token above). */
|
|
116
|
+
const AnnotationsAllTokenSchema = { fields: ["annotationsVersion"] };
|
|
78
117
|
const ActionsTokenSchema = { fields: ["actionsVersion"] };
|
|
79
118
|
const AttachmentsTokenSchema = { fields: ["attachmentsVersion"] };
|
|
80
119
|
const DownloadTokenSchema = {
|
|
@@ -127,6 +166,7 @@ const RenderTokenSchema = {
|
|
|
127
166
|
const SearchTokenSchema = {
|
|
128
167
|
fields: [
|
|
129
168
|
"epoch",
|
|
169
|
+
"format",
|
|
130
170
|
"matchCase",
|
|
131
171
|
"matchDiacritics",
|
|
132
172
|
"maxMatches",
|
|
@@ -169,6 +209,8 @@ const encodeMetadataToken = (metadataVersion) => encodeToken(MetadataTokenSchema
|
|
|
169
209
|
const decodeMetadataToken = (raw) => decodePositiveInteger(decodeToken(MetadataTokenSchema, raw).metadataVersion, "metadataVersion");
|
|
170
210
|
const encodeAnnotationToken = (annotationVersion) => encodeToken(AnnotationTokenSchema, { annotationVersion });
|
|
171
211
|
const decodeAnnotationToken = (raw) => decodePositiveInteger(decodeToken(AnnotationTokenSchema, raw).annotationVersion, "annotationVersion");
|
|
212
|
+
const encodeAnnotationsAllToken = (annotationsVersion) => encodeToken(AnnotationsAllTokenSchema, { annotationsVersion });
|
|
213
|
+
const decodeAnnotationsAllToken = (raw) => decodePositiveInteger(decodeToken(AnnotationsAllTokenSchema, raw).annotationsVersion, "annotationsVersion");
|
|
172
214
|
const encodeActionsToken = (actionsVersion) => encodeToken(ActionsTokenSchema, { actionsVersion });
|
|
173
215
|
const decodeActionsToken = (raw) => decodePositiveInteger(decodeToken(ActionsTokenSchema, raw).actionsVersion, "actionsVersion");
|
|
174
216
|
const encodeAttachmentsToken = (attachmentsVersion) => encodeToken(AttachmentsTokenSchema, { attachmentsVersion });
|
|
@@ -208,10 +250,20 @@ const decodeRenderToken = (raw) => decodeToken(RenderTokenSchema, raw);
|
|
|
208
250
|
const encodeAnnotationAppearancesRenderToken = (input) => encodeToken(AnnotationAppearancesRenderTokenSchema, input);
|
|
209
251
|
/** Decode an annotation-appearance render token to a flat field map. */
|
|
210
252
|
const decodeAnnotationAppearancesRenderToken = (raw) => decodeToken(AnnotationAppearancesRenderTokenSchema, raw);
|
|
253
|
+
/**
|
|
254
|
+
* The search RESULT representation this client speaks — part of the token
|
|
255
|
+
* (and therefore the versioned URL), so a response-shape change can never
|
|
256
|
+
* serve a stale CDN body to a newer client: new tokens are new cache keys,
|
|
257
|
+
* and old tokens fail decode on new servers. Deliberately ALWAYS encoded —
|
|
258
|
+
* an exception to the omit-defaults rule, because its entire job is to
|
|
259
|
+
* change the token bytes when the format changes.
|
|
260
|
+
*/
|
|
261
|
+
const SEARCH_RESULT_FORMAT = "segments1";
|
|
211
262
|
const encodeSearchToken = (input) => {
|
|
212
263
|
const q = input.query;
|
|
213
264
|
return encodeToken(SearchTokenSchema, {
|
|
214
265
|
epoch: input.epoch,
|
|
266
|
+
format: SEARCH_RESULT_FORMAT,
|
|
215
267
|
q: encodeTokenText(q.text),
|
|
216
268
|
regex: q.regex ? true : void 0,
|
|
217
269
|
matchCase: q.matchCase ? true : void 0,
|
|
@@ -227,6 +279,7 @@ const decodeSearchToken = (raw) => {
|
|
|
227
279
|
const t = decodeToken(SearchTokenSchema, raw);
|
|
228
280
|
if (t.epoch === void 0) throw new Error("search token is missing \"epoch\"");
|
|
229
281
|
if (t.q === void 0) throw new Error("search token is missing \"q\"");
|
|
282
|
+
if (t.format !== "segments1") throw new Error(`search token has unsupported result format "${t.format ?? "legacy"}" (expected "${SEARCH_RESULT_FORMAT}")`);
|
|
230
283
|
const query = {
|
|
231
284
|
text: decodeTokenText(t.q),
|
|
232
285
|
...t.regex === "true" ? { regex: true } : {},
|
|
@@ -341,8 +394,21 @@ function decodePdfSaveMode(raw) {
|
|
|
341
394
|
*/
|
|
342
395
|
const DEFAULT_LAYER_NAME = "default";
|
|
343
396
|
const wirePaths = {
|
|
344
|
-
/**
|
|
345
|
-
|
|
397
|
+
/**
|
|
398
|
+
* POST: grant access/caching credentials for the current bearer on
|
|
399
|
+
* the document + layer namespace the path names (cross-checked
|
|
400
|
+
* against the token like every layer route — the grant is
|
|
401
|
+
* layer-scoped in substance: CDN coverage, scopes, and the client's
|
|
402
|
+
* binding all carry the layer). Path-addressed so the affinity tier —
|
|
403
|
+
* the `X-CloudPDF-Doc` header derivation AND the chart's uri-mode
|
|
404
|
+
* regex — pins the session bootstrap to the document's pod from the
|
|
405
|
+
* very first request. Default-layer callers spell `layers/default/`,
|
|
406
|
+
* same as every other layer route.
|
|
407
|
+
*/
|
|
408
|
+
access: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/access`,
|
|
409
|
+
/** Deprecated alias (docId in the BODY) — served for one prerelease
|
|
410
|
+
* cycle so pre-rename clients keep working; remove after. */
|
|
411
|
+
accessLegacy: "/v1/access",
|
|
346
412
|
/**
|
|
347
413
|
* GET: open the document referenced by the doc-scoped JWT and
|
|
348
414
|
* return its `DocumentHead`. The server materialises the base
|
|
@@ -479,6 +545,8 @@ const wirePaths = {
|
|
|
479
545
|
* object served from the base worker session.
|
|
480
546
|
*/
|
|
481
547
|
docPageAnnotations: (docId, pageObjectNumber, annotationVersion) => `/v1/docs/${encodeURIComponent(docId)}/annotations/pages/${pageObjectNumber}/items@${encodeAnnotationToken(annotationVersion)}`,
|
|
548
|
+
/** Immutable BASE whole-document annotation listing (bulk hydration). */
|
|
549
|
+
docAnnotationsAll: (docId, annotationsVersion) => `/v1/docs/${encodeURIComponent(docId)}/annotations/items@${encodeAnnotationsAllToken(annotationsVersion)}`,
|
|
482
550
|
/** Immutable BASE appearance batch (twin of
|
|
483
551
|
* `layerPageAnnotationAppearances` — same `annotations` plane gate). */
|
|
484
552
|
docPageAnnotationAppearances: (docId, pageObjectNumber, token) => `/v1/docs/${encodeURIComponent(docId)}/annotations/pages/${pageObjectNumber}/appearances@${encodeAnnotationAppearancesRenderToken(token)}`,
|
|
@@ -489,6 +557,8 @@ const wirePaths = {
|
|
|
489
557
|
* collection name — see file-level docstring.
|
|
490
558
|
*/
|
|
491
559
|
layerPageAnnotations: (docId, layerName, pageObjectNumber, annotationVersion) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/pages/${pageObjectNumber}/items@${encodeAnnotationToken(annotationVersion)}`,
|
|
560
|
+
/** Immutable LAYER whole-document annotation listing (bulk hydration). */
|
|
561
|
+
layerAnnotationsAll: (docId, layerName, annotationsVersion) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/items@${encodeAnnotationsAllToken(annotationsVersion)}`,
|
|
492
562
|
layerPageAnnotationsCurrent: (docId, layerName, pageObjectNumber) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/pages/${pageObjectNumber}/items`,
|
|
493
563
|
/**
|
|
494
564
|
* GET: batch-rendered annotation appearance bitmaps for a single page as a
|
|
@@ -567,6 +637,20 @@ const wirePaths = {
|
|
|
567
637
|
layerPagesRotate: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/pages/rotate`,
|
|
568
638
|
layerPagesDelete: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/pages/delete`,
|
|
569
639
|
layerPagesFlatten: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/pages/flatten`,
|
|
640
|
+
/**
|
|
641
|
+
* POST (multipart mutation envelope): copy every page of the `source`
|
|
642
|
+
* resource part (a standalone PDF) in at the body's `destIndex`.
|
|
643
|
+
*/
|
|
644
|
+
layerPagesInsert: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/pages/insert`,
|
|
645
|
+
/** POST (plain JSON): create blank pages — pages.insert minus the bytes. */
|
|
646
|
+
layerPagesInsertBlank: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/pages/insert-blank`,
|
|
647
|
+
/**
|
|
648
|
+
* POST (plain JSON → `application/pdf` bytes): export the listed pages,
|
|
649
|
+
* in caller order, as a standalone PDF. A READ over the current layer
|
|
650
|
+
* state (gated like /download), so it is a POST only for its body —
|
|
651
|
+
* nothing mutates and no event is published.
|
|
652
|
+
*/
|
|
653
|
+
layerPagesExtract: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/pages/extract`,
|
|
570
654
|
layerRedactionsApply: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/redactions/apply`,
|
|
571
655
|
layerEvents: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/events`,
|
|
572
656
|
layerDownload: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/download`,
|
|
@@ -601,6 +685,7 @@ const wireTemplates = {
|
|
|
601
685
|
layerMetadata: "/v1/docs/:docId/layers/:layerName/metadata",
|
|
602
686
|
layerRenderPage: "/v1/docs/:docId/layers/:layerName/render/pages/:pon/data",
|
|
603
687
|
layerTextPage: "/v1/docs/:docId/layers/:layerName/text/pages/:pon/data",
|
|
688
|
+
layerAnnotationItemsAll: "/v1/docs/:docId/layers/:layerName/annotations/items",
|
|
604
689
|
layerAnnotationItems: "/v1/docs/:docId/layers/:layerName/annotations/pages/:pon/items",
|
|
605
690
|
layerAnnotationItem: "/v1/docs/:docId/layers/:layerName/annotations/pages/:pon/items/:annotKey",
|
|
606
691
|
layerForm: "/v1/docs/:docId/layers/:layerName/form",
|
|
@@ -611,6 +696,9 @@ const wireTemplates = {
|
|
|
611
696
|
layerPagesRotate: "/v1/docs/:docId/layers/:layerName/pages/rotate",
|
|
612
697
|
layerPagesDelete: "/v1/docs/:docId/layers/:layerName/pages/delete",
|
|
613
698
|
layerPagesFlatten: "/v1/docs/:docId/layers/:layerName/pages/flatten",
|
|
699
|
+
layerPagesInsert: "/v1/docs/:docId/layers/:layerName/pages/insert",
|
|
700
|
+
layerPagesInsertBlank: "/v1/docs/:docId/layers/:layerName/pages/insert-blank",
|
|
701
|
+
layerPagesExtract: "/v1/docs/:docId/layers/:layerName/pages/extract",
|
|
614
702
|
layerRedactionsApply: "/v1/docs/:docId/layers/:layerName/redactions/apply",
|
|
615
703
|
layerDownload: "/v1/docs/:docId/layers/:layerName/download"
|
|
616
704
|
};
|
|
@@ -701,6 +789,19 @@ const DOC_RESOURCES = {
|
|
|
701
789
|
routeKind: "versioned-read",
|
|
702
790
|
cdnCacheable: true
|
|
703
791
|
},
|
|
792
|
+
"annotations-all": {
|
|
793
|
+
id: "annotations-all",
|
|
794
|
+
pathPattern: "/v1/docs/{docId}/annotations/items@*",
|
|
795
|
+
resolvePathPattern: (docId) => `/v1/docs/${docId}/annotations/items@*`,
|
|
796
|
+
pathPrefix: "/v1/docs/{docId}/annotations/items@",
|
|
797
|
+
resolvePathPrefix: (docId) => `/v1/docs/${docId}/annotations/items@`,
|
|
798
|
+
requirement: {
|
|
799
|
+
kind: "single",
|
|
800
|
+
capability: "doc.annotate.read"
|
|
801
|
+
},
|
|
802
|
+
routeKind: "versioned-read",
|
|
803
|
+
cdnCacheable: true
|
|
804
|
+
},
|
|
704
805
|
layout: {
|
|
705
806
|
id: "layout",
|
|
706
807
|
pathPattern: "/v1/docs/{docId}/layout@*",
|
|
@@ -948,6 +1049,19 @@ const DOC_RESOURCES = {
|
|
|
948
1049
|
routeKind: "versioned-read",
|
|
949
1050
|
cdnCacheable: true
|
|
950
1051
|
},
|
|
1052
|
+
"layer-annotations-all": {
|
|
1053
|
+
id: "layer-annotations-all",
|
|
1054
|
+
pathPattern: "/v1/docs/{docId}/layers/{layerName}/annotations/items@*",
|
|
1055
|
+
resolvePathPattern: (docId, layerName = "default") => `/v1/docs/${docId}/layers/${layerName}/annotations/items@*`,
|
|
1056
|
+
pathPrefix: "/v1/docs/{docId}/layers/{layerName}/annotations/items@",
|
|
1057
|
+
resolvePathPrefix: (docId, layerName = "default") => `/v1/docs/${docId}/layers/${layerName}/annotations/items@`,
|
|
1058
|
+
requirement: {
|
|
1059
|
+
kind: "single",
|
|
1060
|
+
capability: "doc.annotate.read"
|
|
1061
|
+
},
|
|
1062
|
+
routeKind: "versioned-read",
|
|
1063
|
+
cdnCacheable: true
|
|
1064
|
+
},
|
|
951
1065
|
"download-current": {
|
|
952
1066
|
id: "download-current",
|
|
953
1067
|
pathPattern: "/v1/docs/{docId}/layers/{layerName}/download",
|
|
@@ -1031,6 +1145,7 @@ const RESOURCE_PLANES = {
|
|
|
1031
1145
|
"page-geometry": ["content"],
|
|
1032
1146
|
"page-render-annotated": ["content", "annotations"],
|
|
1033
1147
|
"page-annotations": ["annotations"],
|
|
1148
|
+
"annotations-all": ["annotations"],
|
|
1034
1149
|
layout: ["layout"],
|
|
1035
1150
|
metadata: ["metadata"],
|
|
1036
1151
|
actions: ["actions"],
|
|
@@ -1303,6 +1418,6 @@ function annotationRenderOptionsFromImageOptions(options) {
|
|
|
1303
1418
|
};
|
|
1304
1419
|
}
|
|
1305
1420
|
//#endregion
|
|
1306
|
-
export { ANNOTATION_KINDS, AccessRequestSchema, AccessResponseSchema, ActionsTokenSchema, AnnotationAppearanceManifestSchema, AnnotationAppearancesQuerySchema, AnnotationAppearancesRenderTokenSchema, AnnotationBaseShape, AnnotationBorderStyleSchema, AnnotationCreateResultSchema, AnnotationDTOSchema, AnnotationDeleteResultSchema, AnnotationDraftBaseShape, AnnotationDraftSchema, AnnotationFlagsPartialSchema, AnnotationFlagsSchema, AnnotationListMutationMetaSchema, AnnotationListPageSnapshotSchema, AnnotationListSnapshotAllPagesSchema, AnnotationMoveResultSchema, AnnotationPatchBaseShape, AnnotationPatchSchema, AnnotationRefSchema, AnnotationStableIdSchema, AnnotationTokenSchema, AnnotationUpdateResultSchema, AppearanceOutcomeSchema, AttachmentCreateResultSchema, AttachmentDeleteResultSchema, AttachmentFileInfoSchema, AttachmentsCacheSchema, BlendModeSchema, CacheDeltaSchema, CachePinsSchema, CalloutLineSchema, CaretDTOSchema, CaretDraftSchema, CaretIntentSchema, CaretPatchSchema, CircleDTOSchema, CircleDraftSchema, CirclePatchSchema, ColorSchema, ContentTokenSchema, DEFAULT_LAYER_NAME, DOC_RESOURCES, DocTokenSchema, DocumentActionsSnapshotSchema, DocumentHeadSchema, DocumentManifestSchema, DocumentMetadataSchema, DocumentSecurityStateSchema, EmbeddedFileItemSchema, EmbeddedFileRefSchema, EngineErrorPayloadSchema, FileAttachmentDTOSchema, FileAttachmentIconSchema, FileAttachmentPatchSchema, FileAttachmentWireDraftSchema, FormDataFormatSchema, FormEffectSchema, FormEffectsResultSchema, FormFieldCreateResultSchema, FormFieldDTOSchema, FormFieldDeleteResultSchema, FormFieldDraftSchema, FormFieldFlagsSchema, FormFieldOptionInputSchema, FormFieldOptionSchema, FormFieldPatchSchema, FormFieldRefSchema, FormFieldUpdateResultSchema, FormFieldValueSchema, FormImportResultSchema, FormKindSchema, FormRepairResultSchema, FormSetValueResultSchema, FormSnapshotSchema, FormValueEntrySchema, FormWidgetLinkResultSchema, FormWidgetRefSchema, FreeTextDTOSchema, FreeTextDraftSchema, FreeTextIntentSchema, FreeTextPatchSchema, HighlightDTOSchema, HighlightDraftSchema, HighlightPatchSchema, InkDTOSchema, InkDraftSchema, InkIntentSchema, InkListSchema, InkPatchSchema, KIND_BY_SUBTYPE, LayerScopesSchema, LayoutTokenSchema, LineDTOSchema, LineDraftSchema, LineEndingSchema, LineEndingsSchema, LinePatchSchema, LinePointsSchema, LinkDTOSchema, LinkDraftSchema, LinkPatchSchema, ManifestPageSchema, MetadataPatchSchema, MetadataTokenSchema, MetadataUpdateResultSchema, MutationMetaSchema, NoteIconSchema, OpenDocumentResponseSchema, PageBoxesSchema, PageDeleteInputSchema, PageDeleteResultSchema, PageFlattenInputSchema, PageFlattenResultSchema, PageGeometrySnapshotSchema, PageLayoutSchema, PageListSnapshotSchema, PageMoveInputSchema, PageMoveResultSchema, PageNetworkRenderFormatSchema, PageRenderAnnotatedQuerySchema, PageRenderQuerySchema, PageRotateInputSchema, PageRotateResultSchema, PageStateSchema, PageStructureCacheSchema, PageTextSnapshotSchema, PdfActionNodeSchema, PdfActionTreeSchema, PdfActionTypeSchema, PdfAnnotationActionsSchema, PdfDestinationSchema, PdfFieldActionsSchema, PdfLinkTargetSchema, PdfLinkTargetWritableSchema, PdfPageActionsSchema, PdfPointSchema, PdfQuadSchema, PdfRectDifferencesSchema, PdfRectSchema, PdfRotationSchema, PdfSaveModeSchema, PdfSizeSchema, PointSchema, PolygonDTOSchema, PolygonDraftSchema, PolygonPatchSchema, PolylineDTOSchema, PolylineDraftSchema, PolylinePatchSchema, RectSchema, RedactionApplyResultSchema, RedactionApplyScopeSchema, RefetchReasonSchema, RenderTokenSchema, ResourceRefSchema, RevisionTokenSchema, SearchMatchSchema, SearchModeSchema, SearchQuerySchema, SearchRequestSchema, SearchSliceSchema, SearchSnippetSchema, SearchTokenSchema, SquareDTOSchema, SquareDraftSchema, SquarePatchSchema, SquigglyDTOSchema, SquigglyDraftSchema, SquigglyPatchSchema, StampDTOSchema, StampWireDraftSchema, StampWirePatchSchema, StandardFontSchema, StrikeoutDTOSchema, StrikeoutDraftSchema, StrikeoutIntentSchema, StrikeoutPatchSchema, TextAlignmentSchema, TextDTOSchema, TextDraftSchema, TextPatchSchema, ToggleFieldWidgetSchema, UnderlineDTOSchema, UnderlineDraftSchema, UnderlinePatchSchema, UnsupportedDTOSchema, UnsupportedDraftSchema, UnsupportedPatchSchema, WeakAnnotationSessionPagesRequestSchema, WeakAnnotationSessionResponseSchema, WidgetAppearanceSchema, WidgetPlacementSchema, WireAttachmentFileSchema, annotationAppearancesImageOptionsToToken, annotationAppearancesImageOptionsToWire, annotationRenderOptionsFromImageOptions, applyCdnAccess, cdnCoverageForScope, checkResourceAccess, decodeActionsToken, decodeAnnotationAppearancesRenderToken, decodeAnnotationToken, decodeAttachmentsToken, decodeContentToken, decodeDocToken, decodeDownloadToken, decodeLayoutToken, decodeMetadataToken, decodeRenderToken, decodeSearchToken, decodeToken, decodeTokenText, encodeActionsToken, encodeAnnotationAppearancesRenderToken, encodeAnnotationToken, encodeAttachmentsToken, encodeContentToken, encodeDocToken, encodeDownloadToken, encodeLayoutToken, encodeMetadataToken, encodeRenderToken, encodeSearchToken, encodeToken, encodeTokenText, flatten, pageRenderOptionsFromImageOptions, renderImageOptionsToToken, renderImageOptionsToWire, resolveResourceIdForPath, unflatten, wirePaths, wireTemplates };
|
|
1421
|
+
export { ANNOTATION_KINDS, AccessRequestSchema, AccessResponseSchema, ActionsTokenSchema, AnnotationAppearanceManifestSchema, AnnotationAppearancesQuerySchema, AnnotationAppearancesRenderTokenSchema, AnnotationBaseShape, AnnotationBorderStyleSchema, AnnotationCreateResultSchema, AnnotationDTOSchema, AnnotationDeleteResultSchema, AnnotationDraftBaseShape, AnnotationDraftSchema, AnnotationFlagsPartialSchema, AnnotationFlagsSchema, AnnotationListMutationMetaSchema, AnnotationListPageSnapshotSchema, AnnotationListSnapshotAllPagesSchema, AnnotationMoveResultSchema, AnnotationPatchBaseShape, AnnotationPatchSchema, AnnotationRefSchema, AnnotationStableIdSchema, AnnotationTokenSchema, AnnotationUpdateResultSchema, AppearanceOutcomeSchema, AttachmentCreateResultSchema, AttachmentDeleteResultSchema, AttachmentFileInfoSchema, AttachmentsCacheSchema, BlendModeSchema, CacheDeltaSchema, CachePinsSchema, CalloutLineSchema, CaretDTOSchema, CaretDraftSchema, CaretIntentSchema, CaretPatchSchema, CircleDTOSchema, CircleDraftSchema, CirclePatchSchema, ColorSchema, ContentTokenSchema, DEFAULT_LAYER_NAME, DOC_RESOURCES, DocTokenSchema, DocumentActionsSnapshotSchema, DocumentHeadSchema, DocumentManifestSchema, DocumentMetadataSchema, DocumentSecurityStateSchema, EmbeddedFileItemSchema, EmbeddedFileRefSchema, EngineErrorPayloadSchema, FileAttachmentDTOSchema, FileAttachmentIconSchema, FileAttachmentPatchSchema, FileAttachmentWireDraftSchema, FormDataFormatSchema, FormEffectSchema, FormEffectsResultSchema, FormFieldCreateResultSchema, FormFieldDTOSchema, FormFieldDeleteResultSchema, FormFieldDraftSchema, FormFieldFlagsSchema, FormFieldOptionInputSchema, FormFieldOptionSchema, FormFieldPatchSchema, FormFieldRefSchema, FormFieldUpdateResultSchema, FormFieldValueSchema, FormImportResultSchema, FormKindSchema, FormRepairResultSchema, FormSetValueResultSchema, FormSnapshotSchema, FormSubmissionEntrySchema, FormSubmissionReceiptSchema, FormSubmissionRequestSchema, FormValueEntrySchema, FormWidgetLinkResultSchema, FormWidgetRefSchema, FreeTextDTOSchema, FreeTextDraftSchema, FreeTextIntentSchema, FreeTextPatchSchema, HighlightDTOSchema, HighlightDraftSchema, HighlightPatchSchema, InkDTOSchema, InkDraftSchema, InkIntentSchema, InkListSchema, InkPatchSchema, KIND_BY_SUBTYPE, LayerScopesSchema, LayoutTokenSchema, LineDTOSchema, LineDraftSchema, LineEndingSchema, LineEndingsSchema, LinePatchSchema, LinePointsSchema, LinkDTOSchema, LinkDraftSchema, LinkPatchSchema, ManifestPageSchema, MetadataPatchSchema, MetadataTokenSchema, MetadataUpdateResultSchema, MutationMetaSchema, NoteIconSchema, OpenDocumentResponseSchema, PageBoxesSchema, PageDeleteInputSchema, PageDeleteResultSchema, PageExtractInputSchema, PageFlattenInputSchema, PageFlattenResultSchema, PageGeometrySnapshotSchema, PageInsertBlankInputSchema, PageInsertInputSchema, PageInsertResultSchema, PageLayoutSchema, PageListSnapshotSchema, PageMoveInputSchema, PageMoveResultSchema, PageNetworkRenderFormatSchema, PageRenderAnnotatedQuerySchema, PageRenderQuerySchema, PageRotateInputSchema, PageRotateResultSchema, PageStateSchema, PageStructureCacheSchema, PageTextSnapshotSchema, PdfActionNodeSchema, PdfActionTargetRefSchema, PdfActionTreeSchema, PdfActionTypeSchema, PdfActionWireComponents, PdfAnnotationActionsSchema, PdfDestinationSchema, PdfFieldActionsSchema, PdfLinkTargetSchema, PdfLinkTargetWritableSchema, PdfPageActionsSchema, PdfPointSchema, PdfQuadSchema, PdfRectDifferencesSchema, PdfRectSchema, PdfRotationSchema, PdfSaveModeSchema, PdfSizeSchema, PointSchema, PolygonDTOSchema, PolygonDraftSchema, PolygonPatchSchema, PolylineDTOSchema, PolylineDraftSchema, PolylinePatchSchema, RectSchema, RedactionApplyResultSchema, RedactionApplyScopeSchema, RefetchReasonSchema, RenderTokenSchema, ResourceRefSchema, RevisionTokenSchema, SEARCH_RESULT_FORMAT, SearchMatchSchema, SearchModeSchema, SearchQuerySchema, SearchRequestSchema, SearchSliceSchema, SearchSnippetSchema, SearchTokenSchema, SquareDTOSchema, SquareDraftSchema, SquarePatchSchema, SquigglyDTOSchema, SquigglyDraftSchema, SquigglyPatchSchema, StampDTOSchema, StampWireDraftSchema, StampWirePatchSchema, StandardFontSchema, StrikeoutDTOSchema, StrikeoutDraftSchema, StrikeoutIntentSchema, StrikeoutPatchSchema, TextAlignmentSchema, TextDTOSchema, TextDraftSchema, TextPatchSchema, ToggleFieldWidgetSchema, UnderlineDTOSchema, UnderlineDraftSchema, UnderlinePatchSchema, UnsupportedDTOSchema, UnsupportedDraftSchema, UnsupportedPatchSchema, WeakAnnotationSessionPagesRequestSchema, WeakAnnotationSessionResponseSchema, WidgetAppearanceSchema, WidgetPlacementSchema, WireAttachmentFileSchema, annotationAppearancesImageOptionsToToken, annotationAppearancesImageOptionsToWire, annotationRenderOptionsFromImageOptions, applyCdnAccess, cdnCoverageForScope, checkResourceAccess, decodeActionsToken, decodeAnnotationAppearancesRenderToken, decodeAnnotationToken, decodeAnnotationsAllToken, decodeAttachmentsToken, decodeContentToken, decodeDocToken, decodeDownloadToken, decodeLayoutToken, decodeMetadataToken, decodeRenderToken, decodeSearchToken, decodeToken, decodeTokenText, encodeActionsToken, encodeAnnotationAppearancesRenderToken, encodeAnnotationToken, encodeAnnotationsAllToken, encodeAttachmentsToken, encodeContentToken, encodeDocToken, encodeDownloadToken, encodeLayoutToken, encodeMetadataToken, encodeRenderToken, encodeSearchToken, encodeToken, encodeTokenText, flatten, pageRenderOptionsFromImageOptions, renderImageOptionsToToken, renderImageOptionsToWire, resolveResourceIdForPath, unflatten, wirePaths, wireTemplates };
|
|
1307
1422
|
|
|
1308
1423
|
//# sourceMappingURL=wire.js.map
|