@embedpdf/engine-core 3.0.0-next.13 → 3.0.0-next.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AnnotationList-CkijRHet.d.cts +27163 -0
- package/dist/AnnotationList-CkijRHet.d.ts +27163 -0
- package/dist/Change-CKoxfTNY.js +889 -0
- package/dist/Change-CKoxfTNY.js.map +1 -0
- package/dist/Change-CjImsrN0.cjs +1020 -0
- package/dist/Change-CjImsrN0.cjs.map +1 -0
- package/dist/DocumentRenderService-BfFdFSwI.cjs +120 -0
- package/dist/DocumentRenderService-BfFdFSwI.cjs.map +1 -0
- package/dist/DocumentRenderService-DV3J9lMz.js +85 -0
- package/dist/DocumentRenderService-DV3J9lMz.js.map +1 -0
- package/dist/{DocumentSecurityService-_JRjqvoI.d.ts → DocumentSecurityService-CU1M6Q7m.d.ts} +100 -112
- package/dist/{DocumentSecurityService-ClTZc0zO.d.cts → DocumentSecurityService-e6vp2de8.d.cts} +100 -112
- package/dist/LocalDocumentHandle-D02FMm-Z.cjs +53 -0
- package/dist/LocalDocumentHandle-D02FMm-Z.cjs.map +1 -0
- package/dist/LocalDocumentHandle-DAPdaOt_.js +30 -0
- package/dist/LocalDocumentHandle-DAPdaOt_.js.map +1 -0
- package/dist/LocalEngine-DFoBm4B3.d.cts +1565 -0
- package/dist/LocalEngine-DPriFujS.d.ts +1565 -0
- package/dist/PageInsertBlankInput-CXHAM7l6.cjs +17 -0
- package/dist/PageInsertBlankInput-CXHAM7l6.cjs.map +1 -0
- package/dist/PageInsertBlankInput-DhVYVJ_S.js +12 -0
- package/dist/PageInsertBlankInput-DhVYVJ_S.js.map +1 -0
- package/dist/authority-B3BklsB4.js +2239 -0
- package/dist/authority-B3BklsB4.js.map +1 -0
- package/dist/authority-DLMNR7ff.cjs +2676 -0
- package/dist/authority-DLMNR7ff.cjs.map +1 -0
- package/dist/builders-CNj0POeY.js +161 -0
- package/dist/builders-CNj0POeY.js.map +1 -0
- package/dist/builders-Cgdp_YCn.cjs +184 -0
- package/dist/builders-Cgdp_YCn.cjs.map +1 -0
- package/dist/calibrate-7T3fnP8-.js +2404 -0
- package/dist/calibrate-7T3fnP8-.js.map +1 -0
- package/dist/calibrate-DJBXnhLE.cjs +2919 -0
- package/dist/calibrate-DJBXnhLE.cjs.map +1 -0
- package/dist/charmap-Cprti1ta.js +239 -0
- package/dist/charmap-Cprti1ta.js.map +1 -0
- package/dist/charmap-aYlefQP9.cjs +304 -0
- package/dist/charmap-aYlefQP9.cjs.map +1 -0
- package/dist/conformance.cjs +16753 -5247
- package/dist/conformance.cjs.map +1 -1
- package/dist/conformance.d.cts +928 -165
- package/dist/conformance.d.ts +928 -165
- package/dist/conformance.js +16731 -5268
- package/dist/conformance.js.map +1 -1
- package/dist/format-Bp3QFSH1.cjs +574 -0
- package/dist/format-Bp3QFSH1.cjs.map +1 -0
- package/dist/format-Dgg428Kb.js +461 -0
- package/dist/format-Dgg428Kb.js.map +1 -0
- package/dist/index.cjs +330 -103
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +14 -5
- package/dist/pageRefs-B3ur7Ckm.cjs +51 -0
- package/dist/pageRefs-B3ur7Ckm.cjs.map +1 -0
- package/dist/pageRefs-DkbuxSCV.js +40 -0
- package/dist/pageRefs-DkbuxSCV.js.map +1 -0
- package/dist/public.cjs +57 -0
- package/dist/public.d.cts +5 -0
- package/dist/public.d.ts +5 -0
- package/dist/public.js +9 -0
- package/dist/resolveAnnotationDraft-7Ke4nV7F.cjs +3646 -0
- package/dist/resolveAnnotationDraft-7Ke4nV7F.cjs.map +1 -0
- package/dist/resolveAnnotationDraft-CUpf0SMh.js +3167 -0
- package/dist/resolveAnnotationDraft-CUpf0SMh.js.map +1 -0
- package/dist/{resolver-inAVzsWt.js → resolver-CzxmD9Ck.js} +294 -144
- package/dist/resolver-CzxmD9Ck.js.map +1 -0
- package/dist/{resolver-CYVNV4hn.cjs → resolver-D2OCtE8F.cjs} +347 -143
- package/dist/resolver-D2OCtE8F.cjs.map +1 -0
- package/dist/runtime-Cl0v56mm.d.ts +2032 -0
- package/dist/runtime-p1WDzDo4.d.cts +2032 -0
- package/dist/runtime.cjs +733 -284
- package/dist/runtime.cjs.map +1 -1
- package/dist/runtime.d.cts +5 -1348
- package/dist/runtime.d.ts +5 -1348
- package/dist/runtime.js +396 -179
- package/dist/runtime.js.map +1 -1
- package/dist/schema-C-gU4vj7.cjs +3034 -0
- package/dist/schema-C-gU4vj7.cjs.map +1 -0
- package/dist/schema-DzlUNk38.js +2081 -0
- package/dist/schema-DzlUNk38.js.map +1 -0
- package/dist/schemas-Berf1swF.cjs +2481 -0
- package/dist/schemas-Berf1swF.cjs.map +1 -0
- package/dist/schemas-D6xOGjqg.js +1654 -0
- package/dist/schemas-D6xOGjqg.js.map +1 -0
- package/dist/subtype-CG4WpIRj.js +129 -0
- package/dist/subtype-CG4WpIRj.js.map +1 -0
- package/dist/subtype-aDt5TFmK.cjs +158 -0
- package/dist/subtype-aDt5TFmK.cjs.map +1 -0
- package/dist/validation.cjs +578 -0
- package/dist/validation.cjs.map +1 -0
- package/dist/validation.d.cts +174 -0
- package/dist/validation.d.ts +174 -0
- package/dist/validation.js +571 -0
- package/dist/validation.js.map +1 -0
- package/dist/value-BFS1R8ek.cjs +435 -0
- package/dist/value-BFS1R8ek.cjs.map +1 -0
- package/dist/value-Dhc8eYcx.js +340 -0
- package/dist/value-Dhc8eYcx.js.map +1 -0
- package/dist/viewport-BJW13EGZ.js +540 -0
- package/dist/viewport-BJW13EGZ.js.map +1 -0
- package/dist/viewport-DlL5Bxbg.cjs +671 -0
- package/dist/viewport-DlL5Bxbg.cjs.map +1 -0
- package/dist/wire.cjs +1056 -379
- package/dist/wire.cjs.map +1 -1
- package/dist/wire.d.cts +15069 -725
- package/dist/wire.d.ts +15069 -725
- package/dist/wire.js +825 -239
- package/dist/wire.js.map +1 -1
- package/package.json +10 -1
- package/dist/AbortError-Cq2igpZ6.cjs +0 -38
- package/dist/AbortError-Cq2igpZ6.cjs.map +0 -1
- package/dist/AbortError-DHqPBnYc.js +0 -27
- package/dist/AbortError-DHqPBnYc.js.map +0 -1
- package/dist/AnnotationListSnapshot-D3mFut1e.d.cts +0 -6871
- package/dist/AnnotationListSnapshot-D3mFut1e.d.ts +0 -6871
- package/dist/Engine-Bx0NOfmd.d.cts +0 -1264
- package/dist/Engine-DxtpCYcP.d.ts +0 -1264
- package/dist/PageInsertBlankInput-CqXBmFhN.cjs +0 -449
- package/dist/PageInsertBlankInput-CqXBmFhN.cjs.map +0 -1
- package/dist/PageInsertBlankInput-cHq9-i-z.js +0 -378
- package/dist/PageInsertBlankInput-cHq9-i-z.js.map +0 -1
- package/dist/builders-Bqm8yTpi.cjs +0 -3564
- package/dist/builders-Bqm8yTpi.cjs.map +0 -1
- package/dist/builders-Dqo2X-dt.js +0 -3121
- package/dist/builders-Dqo2X-dt.js.map +0 -1
- package/dist/fold-2V29cxCV.cjs +0 -447
- package/dist/fold-2V29cxCV.cjs.map +0 -1
- package/dist/fold-CdEJTBTn.js +0 -334
- package/dist/fold-CdEJTBTn.js.map +0 -1
- package/dist/resolver-CYVNV4hn.cjs.map +0 -1
- package/dist/resolver-inAVzsWt.js.map +0 -1
- package/dist/schemas-BLARNCgx.js +0 -3113
- package/dist/schemas-BLARNCgx.js.map +0 -1
- package/dist/schemas-DIqFMmrC.cjs +0 -4468
- package/dist/schemas-DIqFMmrC.cjs.map +0 -1
package/dist/wire.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { f as toPageRef, i as encodeFieldRefKey, r as decodeFieldRefKey, u as encodePageKey } from "./format-Dgg428Kb.js";
|
|
2
|
+
import { D as decodeAnnotKey, O as encodeAnnotKey, r as checkCapability, t as checkAnyCapability } from "./resolver-CzxmD9Ck.js";
|
|
3
|
+
import { c as toBase64, s as fromBase64, u as appearanceModesOf } from "./charmap-Cprti1ta.js";
|
|
4
|
+
import { $ as PolylineDTOSchema, $t as PolylineIntentSchema, A as UnderlineDTOSchema, An as LineEndingSchema, At as FileResourceKeysSchema, B as StampDTOSchema, Bn as CalloutLineSchema, Bt as LineCaptionPatchSchema, Cn as BlendModeSchema, Ct as FileAttachmentIconSchema, D as UnsupportedDTOSchema, Dn as FreeTextIntentSchema, Dt as WireAttachmentFileSchema, E as FormFieldRefSchema, En as DrawnBorderStyleSchema, Et as AttachmentSchema, F as TextPatchSchema, Fn as StrikeoutIntentSchema, Ft as CircleDraftSchema, G as SquigglyDraftSchema, Gn as PageQuadSchema, Gt as PageMeasurementViewportSchema, H as StampPatchSchema, Hn as LinePointsSchema, Ht as LineIntentSchema, I as NoteIconSchema, In as TextAlignmentSchema, It as CirclePatchSchema, J as SquareDraftSchema, Jn as PdfRectSchema, Jt as PdfMeasureSchema, K as SquigglyPatchSchema, Kn as PdfPointSchema, Kt as PageScaleInputSchema, L as StrikeoutDTOSchema, Ln as VerticalAlignmentSchema, Lt as CaretDTOSchema, M as UnderlinePatchSchema, Mn as PointSchema, Mt as ResourceKeySchema, N as TextDTOSchema, Nn as RectSchema, Nt as SourceResourceKeysSchema, O as UnsupportedDraftSchema, On as FreeTextIntentWriteSchema, Ot as AnnotationResourceKeysSchema, P as TextDraftSchema, Pn as StandardFontSchema, Pt as CircleDTOSchema, Q as PopupPatchSchema, Qt as PolygonIntentSchema, R as StrikeoutDraftSchema, Rn as WidgetBorderStyleSchema, Rt as CaretDraftSchema, S as WidgetAppearanceSchema, Sn as AnnotationRefSchema, St as FileAttachmentPatchSchema, T as WidgetPatchSchema, Tn as ColorSchema, Tt as AttachmentRefSchema, U as StampFitSchema, Un as PageBoxSchema, Ut as LineLeaderSchema, V as StampDraftSchema, Vn as InkListSchema, Vt as LineDimensionCaptionSchema, W as SquigglyDTOSchema, Wn as PagePointSchema, Wt as PageMeasurementViewportListSchema, X as PopupDTOSchema, Xn as PdfSizeSchema, Xt as PdfMeasurementSchema, Y as SquarePatchSchema, Yn as PdfRotationSchema, Yt as PdfMeasureWriteSchema, Z as PopupDraftSchema, Zn as PageRefSchema, Zt as PdfNumberFormatSchema, _ as AnnotationSchema, _n as WidgetActionsPatchSchema, _t as FreeTextDTOSchema, a as FormFieldPatchSchema, an as FieldActionsPatchSchema, at as LinkDTOSchema, b as annotationPatchSchemaOf, bn as PdfDestinationSchema, bt as FileAttachmentDTOSchema, c as FormKindSchema, cn as PdfActionNodeSchema, ct as LineDTOSchema, d as FormWidgetSchema, dn as PdfActionTypeSchema, dt as InkDTOSchema, en as ShapeCaptionPatchSchema, et as PolylineDraftSchema, f as ToggleFieldWidgetSchema, fn as PdfActionWireComponents, ft as InkDraftSchema, g as AnnotationPatchSchema, gn as PdfPageActionsSchema, gt as HighlightPatchSchema, h as AnnotationDraftSchema, hn as PdfFieldActionsSchema, ht as HighlightDraftSchema, i as FormFieldOptionSchema, in as DocumentActionsSnapshotSchema, it as PolygonPatchSchema, j as UnderlineDraftSchema, jn as LineEndingsSchema, jt as ImageResourceKeysSchema, k as UnsupportedPatchSchema, kn as InkIntentSchema, kt as AppearanceResourceKeysSchema, l as FormSnapshotSchema, ln as PdfActionTargetRefSchema, lt as LineDraftSchema, m as ANNOTATION_KINDS, mn as PdfAnnotationActionsSchema, mt as HighlightDTOSchema, n as FormFieldDraftSchema, nn as DateInputSchema, nt as PolygonDTOSchema, o as FormFieldValueSchema, on as FieldScriptWriteSchema, ot as LinkDraftSchema, p as WidgetPlacementSchema, pn as PdfActionWriteSchema, pt as InkPatchSchema, q as SquareDTOSchema, qn as PdfQuadSchema, qt as PdfForeignMeasureSchema, r as FormFieldOptionInputSchema, rn as IsoDateTimeSchema, rt as PolygonDraftSchema, sn as FileWidgetActionsPatchSchema, st as LinkPatchSchema, t as FormFieldDTOSchema, tn as ShapeDimensionCaptionSchema, tt as PolylinePatchSchema, u as FormValueEntrySchema, un as PdfActionTreeSchema, ut as LinePatchSchema, vn as PdfLinkTargetSchema, vt as FreeTextDraftSchema, w as WidgetDTOSchema, wn as CaretIntentSchema, wt as AttachmentFileInfoSchema, xn as AnnotationBorderStyleSchema, xt as FileAttachmentDraftSchema, y as KIND_BY_SUBTYPE, yn as PdfLinkTargetWritableSchema, yt as FreeTextPatchSchema, z as StrikeoutPatchSchema, zn as WidgetCheckStyleSchema, zt as CaretPatchSchema } from "./schema-DzlUNk38.js";
|
|
5
|
+
import { $ as FormExportRequestSchema, $t as PageRenderQuerySchemas, A as CacheDeltaSchema, An as pageRenderFamilyOf, At as MutationMetaSchema, B as DocumentProtectionSchema, Bt as PageFlattenInputSchema, C as AttachmentCreateResultSchema, Cn as SignatureSnapshotSchema, Ct as IdentitySchema, D as BaseVersionInfoSchema, Dn as decodePrepared, Dt as MetadataPatchSchema, E as AttachmentMutationMetaSchema, En as analyzeInputFromQuery, Et as ManifestPageSchema, F as CustomMetadataUpdateResultSchema, Ft as OpenDocumentResponseSchema, G as DocumentWireComponents, Gt as PageInsertResultSchema, H as DocumentVersionRefSchema, Ht as PageGeometrySnapshotSchema, I as DigestAlgorithmSchema, It as PageBoxesSchema, J as EngineErrorPayloadSchema, Jt as PageNameInputSchema, K as EditSessionAccessSchema, Kt as PageLayoutSchema, L as DocumentHeadSchema, Lt as PageDeleteInputSchema, M as ChangeAnalysisSchema, Mt as ObjectNumberRangeSchema, N as CustomMetadataPatchSchema, Nt as ObjectNumberReservationRequestSchema, O as BundleLimitsSchema, On as encodePrepared, Ot as MetadataUpdateResultSchema, P as CustomMetadataSchema, Pt as ObjectNumberReservationResponseSchema, Q as FormCalculationsReorderResultSchema, Qt as PageRemoveNameInputSchema, R as DocumentManifestSchema, Rt as PageDeleteResultSchema, S as AppearanceOutcomeSchema, Sn as SignatureSeedValueSchema, St as FormWireComponents, T as AttachmentListSchema, Tn as WidgetAppearancesQuerySchema, Tt as LayerScopesSchema, U as DocumentVersionSchema, Ut as PageInsertBlankInputSchema, V as DocumentSecurityStateSchema, Vt as PageFlattenResultSchema, W as DocumentVersionsSchema, Wt as PageInsertInputSchema, X as FieldPositionSchema, Xt as PageNetworkRenderFormatSchema, Y as FieldLockSpecSchema, Yt as PageNameResultSchema, Z as FormCalculationsReorderBodySchema, Zt as PagePositionSchema, _ as AnnotationReorderBodySchema, _n as SignatureCompleteBodySchema, _t as FormWidgetRestoreResultSchema, a as AnnotationAppearancesQuerySchema, an as PageTextSnapshotSchema, at as FormImportOptionsSchema, b as AnnotationWireComponents, bn as SignaturePrepareBodySchema, bt as FormWidgetsReorderBodySchema, c as AnnotationExportSelectionSchema, cn as RedactionApplyResultSchema, ct as FormRepairResultSchema, d as AnnotationImportBodySchema, dn as SearchQuerySchema, dt as FormSetValueResultSchema, en as PageReorderInputSchema, et as FormExportSelectionSchema, f as AnnotationImportOptionsSchema, fn as SearchRequestSchema, ft as FormValuesImportBodySchema, g as AnnotationPositionSchema, gn as SignatureCancelResultSchema, gt as FormWidgetLinkResultSchema, h as AnnotationListSchema, hn as SignatureAppearanceBodySchema, ht as FormWidgetDeleteResultSchema, i as AnnotationAppearanceExportInputSchema, in as PageScaleResultSchema, it as FormImportBodySchema, j as CachePinsSchema, jt as NamedPageEntrySchema, k as ByteRangeSchema, kn as PAGE_RENDER_FAMILIES, kt as ModificationLevelSchema, l as AnnotationFlattenInputSchema, ln as RedactionApplyScopeSchema, lt as FormResetBodySchema, m as AnnotationListMutationMetaSchema, mn as SearchSnippetSchema, mt as FormValuesImportResultSchema, n as AccessResponseSchema, nn as PageRotateInputSchema, nt as FormFieldDeleteResultSchema, o as AnnotationCreateResultSchema, on as PdfRevisionSchema, ot as FormImportResultSchema, p as AnnotationImportResultSchema, pn as SearchSliceSchema, pt as FormValuesImportOptionsSchema, q as EditSessionStatusSchema, qt as PageListSnapshotSchema, r as AnnotationAppearanceBatchSchema, rn as PageRotateResultSchema, rt as FormFieldUpdateResultSchema, s as AnnotationDeleteResultSchema, sn as PdfSaveModeSchema, st as FormMutationMetaSchema, t as AccessRequestSchema, tn as PageReorderResultSchema, tt as FormFieldCreateResultSchema, u as AnnotationFlattenResultSchema, un as SearchMatchSchema, ut as FormResetResultSchema, v as AnnotationReorderResultSchema, vn as SignatureCompleteResultSchema, vt as FormWidgetUpdateBodySchema, w as AttachmentDeleteResultSchema, wn as VersionAnalysisQuerySchema, wt as LayerAnalysisQuerySchema, x as AnnotationsExportRequestSchema, xn as SignaturePreparedWireSchema, xt as FormWidgetsReorderResultSchema, y as AnnotationUpdateResultSchema, yn as SignatureDTOSchema, yt as FormWidgetUpdateResultSchema, z as DocumentMetadataSchema, zt as PageExtractInputSchema } from "./schemas-D6xOGjqg.js";
|
|
3
6
|
import { z } from "zod";
|
|
4
7
|
//#region src/forms/submission.ts
|
|
5
8
|
const FormSubmissionEntrySchema = z.object({
|
|
@@ -29,11 +32,11 @@ const FormSubmissionRequestSchema = z.object({
|
|
|
29
32
|
"hover",
|
|
30
33
|
"lifecycle"
|
|
31
34
|
]),
|
|
32
|
-
|
|
35
|
+
sentAt: IsoDateTimeSchema
|
|
33
36
|
});
|
|
34
37
|
const FormSubmissionReceiptSchema = z.object({
|
|
35
38
|
submissionId: z.string().min(1),
|
|
36
|
-
receivedAt:
|
|
39
|
+
receivedAt: IsoDateTimeSchema
|
|
37
40
|
});
|
|
38
41
|
//#endregion
|
|
39
42
|
//#region src/wire/token.ts
|
|
@@ -114,6 +117,30 @@ const AnnotationTokenSchema = { fields: ["annotationVersion"] };
|
|
|
114
117
|
/** Doc-level bulk annotations listing pin (plural, vs the per-page
|
|
115
118
|
* `annotationVersion` token above). */
|
|
116
119
|
const AnnotationsAllTokenSchema = { fields: ["annotationsVersion"] };
|
|
120
|
+
/** The form (`form@`): its fields, widget rows and calculation order. */
|
|
121
|
+
const FormTokenSchema = { fields: ["formsVersion"] };
|
|
122
|
+
/**
|
|
123
|
+
* `doc.annotations.export` leaf: the annotation and layout pins (the bundle
|
|
124
|
+
* carries each page's position and box, which only the layout pin covers)
|
|
125
|
+
* and the selection, canonical so one selection is one URL.
|
|
126
|
+
*/
|
|
127
|
+
const AnnotationsExportTokenSchema = {
|
|
128
|
+
fields: [
|
|
129
|
+
"annotationsVersion",
|
|
130
|
+
"include",
|
|
131
|
+
"layoutVersion",
|
|
132
|
+
"selection"
|
|
133
|
+
],
|
|
134
|
+
maxLength: 4096
|
|
135
|
+
};
|
|
136
|
+
const FormExportTokenSchema = {
|
|
137
|
+
fields: [
|
|
138
|
+
"formsVersion",
|
|
139
|
+
"layoutVersion",
|
|
140
|
+
"selection"
|
|
141
|
+
],
|
|
142
|
+
maxLength: 4096
|
|
143
|
+
};
|
|
117
144
|
const ActionsTokenSchema = { fields: ["actionsVersion"] };
|
|
118
145
|
const AttachmentsTokenSchema = { fields: ["attachmentsVersion"] };
|
|
119
146
|
/**
|
|
@@ -140,12 +167,13 @@ const DownloadTokenSchema = {
|
|
|
140
167
|
* dotted path here and a matching branch in `PageImageOptionsWireSchema`.
|
|
141
168
|
* No encoder/decoder code changes.
|
|
142
169
|
*
|
|
143
|
-
* `includeAnnotations` is
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
*
|
|
148
|
-
*
|
|
170
|
+
* What a picture draws (`includeAnnotations`, `includeFormFields`) is not a
|
|
171
|
+
* token field: it's the picture's family, which is its path
|
|
172
|
+
* (`PAGE_RENDER_FAMILIES`). Each family needs its own rights and depends on
|
|
173
|
+
* its own planes, and a CDN grant is a path prefix. The pins are: every
|
|
174
|
+
* family's `contentVersion`, and `annotationVersion` and `widgetVersion` in
|
|
175
|
+
* the families that draw annotations and form fields; each family's query
|
|
176
|
+
* schema refuses the others.
|
|
149
177
|
*/
|
|
150
178
|
const RenderTokenSchema = {
|
|
151
179
|
fields: [
|
|
@@ -156,13 +184,14 @@ const RenderTokenSchema = {
|
|
|
156
184
|
"quality",
|
|
157
185
|
"rotation",
|
|
158
186
|
"target.kind",
|
|
159
|
-
"target.rect.
|
|
160
|
-
"target.rect.
|
|
161
|
-
"target.rect.
|
|
162
|
-
"target.rect.
|
|
187
|
+
"target.rect.height",
|
|
188
|
+
"target.rect.width",
|
|
189
|
+
"target.rect.x",
|
|
190
|
+
"target.rect.y",
|
|
163
191
|
"viewport.kind",
|
|
164
192
|
"viewport.scale",
|
|
165
|
-
"viewport.width"
|
|
193
|
+
"viewport.width",
|
|
194
|
+
"widgetVersion"
|
|
166
195
|
],
|
|
167
196
|
maxLength: 512
|
|
168
197
|
};
|
|
@@ -173,21 +202,22 @@ const RenderTokenSchema = {
|
|
|
173
202
|
* charset excludes free text), and the resume position. Canonical by
|
|
174
203
|
* construction: the codec sorts fields and the encoder omits every
|
|
175
204
|
* default, so equal searches produce byte-equal tokens — the property CDN
|
|
176
|
-
* cache hits live on. Mode is
|
|
205
|
+
* cache hits live on. Mode is not a field; it is the endpoint (separate
|
|
177
206
|
* permission tiers must never share cache entries).
|
|
178
207
|
*/
|
|
179
208
|
const SearchTokenSchema = {
|
|
180
209
|
fields: [
|
|
181
210
|
"epoch",
|
|
182
211
|
"format",
|
|
212
|
+
"from",
|
|
213
|
+
"ignoreWhitespace",
|
|
214
|
+
"limitMatches",
|
|
215
|
+
"limitPages",
|
|
183
216
|
"matchCase",
|
|
184
217
|
"matchDiacritics",
|
|
185
|
-
"maxMatches",
|
|
186
|
-
"maxPages",
|
|
187
218
|
"q",
|
|
188
219
|
"regex",
|
|
189
220
|
"skip",
|
|
190
|
-
"startPage",
|
|
191
221
|
"wholeWord"
|
|
192
222
|
],
|
|
193
223
|
maxLength: 2048
|
|
@@ -195,18 +225,40 @@ const SearchTokenSchema = {
|
|
|
195
225
|
/**
|
|
196
226
|
* Token for the batch annotation-appearance render endpoint. Narrower than
|
|
197
227
|
* the page render token: appearance bitmaps are sized per annotation `/Rect`
|
|
198
|
-
* so there is no target
|
|
199
|
-
* `
|
|
200
|
-
*
|
|
201
|
-
*
|
|
228
|
+
* so there is no target — only the page's `viewport` and `rotation`. Keyed by
|
|
229
|
+
* `annotationVersion` only (appearances do not depend on page base content).
|
|
230
|
+
* `modes` is present only when a request asks for fewer than every mode, as
|
|
231
|
+
* one value (`normal-down`, in the engine's mode order), so one request for
|
|
232
|
+
* every mode is one URL.
|
|
202
233
|
*/
|
|
203
234
|
const AnnotationAppearancesRenderTokenSchema = {
|
|
204
235
|
fields: [
|
|
205
236
|
"annotationVersion",
|
|
206
237
|
"format",
|
|
238
|
+
"modes",
|
|
239
|
+
"quality",
|
|
240
|
+
"rotation",
|
|
241
|
+
"viewport.kind",
|
|
242
|
+
"viewport.scale",
|
|
243
|
+
"viewport.width"
|
|
244
|
+
],
|
|
245
|
+
maxLength: 256
|
|
246
|
+
};
|
|
247
|
+
/**
|
|
248
|
+
* Token for a page's widget images (`form/pages/{p}/appearances@`): the
|
|
249
|
+
* annotation appearance token's options, keyed by the page's
|
|
250
|
+
* `widgetVersion`.
|
|
251
|
+
*/
|
|
252
|
+
const WidgetAppearancesRenderTokenSchema = {
|
|
253
|
+
fields: [
|
|
254
|
+
"format",
|
|
255
|
+
"modes",
|
|
207
256
|
"quality",
|
|
208
257
|
"rotation",
|
|
209
|
-
"
|
|
258
|
+
"viewport.kind",
|
|
259
|
+
"viewport.scale",
|
|
260
|
+
"viewport.width",
|
|
261
|
+
"widgetVersion"
|
|
210
262
|
],
|
|
211
263
|
maxLength: 256
|
|
212
264
|
};
|
|
@@ -264,6 +316,95 @@ const encodeAnnotationToken = (annotationVersion) => encodeToken(AnnotationToken
|
|
|
264
316
|
const decodeAnnotationToken = (raw) => decodePositiveInteger(decodeToken(AnnotationTokenSchema, raw).annotationVersion, "annotationVersion");
|
|
265
317
|
const encodeAnnotationsAllToken = (annotationsVersion) => encodeToken(AnnotationsAllTokenSchema, { annotationsVersion });
|
|
266
318
|
const decodeAnnotationsAllToken = (raw) => decodePositiveInteger(decodeToken(AnnotationsAllTokenSchema, raw).annotationsVersion, "annotationsVersion");
|
|
319
|
+
const encodeFormToken = (formsVersion) => encodeToken(FormTokenSchema, { formsVersion });
|
|
320
|
+
const decodeFormToken = (raw) => decodePositiveInteger(decodeToken(FormTokenSchema, raw).formsVersion, "formsVersion");
|
|
321
|
+
const encodeAnnotationsExportToken = (token) => {
|
|
322
|
+
const { selection } = token;
|
|
323
|
+
const wire = {};
|
|
324
|
+
if (selection.pages) wire.p = [...new Set(selection.pages.map((page) => page.objectNumber))].sort((left, right) => left - right);
|
|
325
|
+
if (selection.refs) {
|
|
326
|
+
const refs = /* @__PURE__ */ new Map();
|
|
327
|
+
for (const ref of selection.refs) {
|
|
328
|
+
const entry = [ref.page.objectNumber, encodeAnnotKey(ref)];
|
|
329
|
+
refs.set(JSON.stringify(entry), entry);
|
|
330
|
+
}
|
|
331
|
+
wire.r = [...refs.keys()].sort().map((key) => refs.get(key));
|
|
332
|
+
}
|
|
333
|
+
return encodeToken(AnnotationsExportTokenSchema, {
|
|
334
|
+
annotationsVersion: token.annotationsVersion,
|
|
335
|
+
layoutVersion: token.layoutVersion,
|
|
336
|
+
include: selection.include === "references" ? "references" : void 0,
|
|
337
|
+
selection: wire.p || wire.r ? encodeTokenText(JSON.stringify(wire)) : void 0
|
|
338
|
+
});
|
|
339
|
+
};
|
|
340
|
+
const decodeAnnotationsExportToken = (raw) => {
|
|
341
|
+
const query = decodeToken(AnnotationsExportTokenSchema, raw);
|
|
342
|
+
const selection = {};
|
|
343
|
+
if (query.include !== void 0) {
|
|
344
|
+
if (query.include !== "references") throw new Error(`unknown include "${query.include}"`);
|
|
345
|
+
selection.include = "references";
|
|
346
|
+
}
|
|
347
|
+
if (query.selection !== void 0) {
|
|
348
|
+
const wire = JSON.parse(decodeTokenText(query.selection));
|
|
349
|
+
const isNumber = (value) => Number.isInteger(value) && value > 0;
|
|
350
|
+
if (typeof wire !== "object" || wire === null) throw new Error("malformed export selection");
|
|
351
|
+
if (wire.p !== void 0) {
|
|
352
|
+
if (!Array.isArray(wire.p) || !wire.p.every(isNumber)) throw new Error("malformed export pages");
|
|
353
|
+
selection.pages = wire.p.map((pageObjectNumber) => toPageRef(pageObjectNumber));
|
|
354
|
+
}
|
|
355
|
+
if (wire.r !== void 0) {
|
|
356
|
+
if (!Array.isArray(wire.r)) throw new Error("malformed export refs");
|
|
357
|
+
selection.refs = wire.r.map((entry) => {
|
|
358
|
+
if (!Array.isArray(entry) || entry.length !== 2 || !isNumber(entry[0])) throw new Error("malformed export ref");
|
|
359
|
+
const ref = typeof entry[1] === "string" ? decodeAnnotKey(toPageRef(entry[0]), entry[1]) : null;
|
|
360
|
+
if (!ref) throw new Error("malformed export ref");
|
|
361
|
+
return ref;
|
|
362
|
+
});
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
return {
|
|
366
|
+
annotationsVersion: decodePositiveInteger(query.annotationsVersion, "annotationsVersion"),
|
|
367
|
+
layoutVersion: decodePositiveInteger(query.layoutVersion, "layoutVersion"),
|
|
368
|
+
selection
|
|
369
|
+
};
|
|
370
|
+
};
|
|
371
|
+
const encodeFormExportToken = (token) => {
|
|
372
|
+
const { selection } = token;
|
|
373
|
+
const wire = {};
|
|
374
|
+
if (selection.pages) wire.p = [...new Set(selection.pages.map((page) => page.objectNumber))].sort((left, right) => left - right);
|
|
375
|
+
if (selection.fields) wire.f = [...new Set(selection.fields.map(encodeFieldRefKey))].sort();
|
|
376
|
+
return encodeToken(FormExportTokenSchema, {
|
|
377
|
+
formsVersion: token.formsVersion,
|
|
378
|
+
layoutVersion: token.layoutVersion,
|
|
379
|
+
selection: wire.p || wire.f ? encodeTokenText(JSON.stringify(wire)) : void 0
|
|
380
|
+
});
|
|
381
|
+
};
|
|
382
|
+
const decodeFormExportToken = (raw) => {
|
|
383
|
+
const query = decodeToken(FormExportTokenSchema, raw);
|
|
384
|
+
const selection = {};
|
|
385
|
+
if (query.selection !== void 0) {
|
|
386
|
+
const wire = JSON.parse(decodeTokenText(query.selection));
|
|
387
|
+
if (typeof wire !== "object" || wire === null) throw new Error("malformed export selection");
|
|
388
|
+
if (wire.p !== void 0) {
|
|
389
|
+
const isNumber = (value) => Number.isInteger(value) && value > 0;
|
|
390
|
+
if (!Array.isArray(wire.p) || !wire.p.every(isNumber)) throw new Error("malformed export pages");
|
|
391
|
+
selection.pages = wire.p.map((pageObjectNumber) => toPageRef(pageObjectNumber));
|
|
392
|
+
}
|
|
393
|
+
if (wire.f !== void 0) {
|
|
394
|
+
if (!Array.isArray(wire.f)) throw new Error("malformed export fields");
|
|
395
|
+
selection.fields = wire.f.map((key) => {
|
|
396
|
+
const ref = typeof key === "string" ? decodeFieldRefKey(key) : null;
|
|
397
|
+
if (!ref) throw new Error("malformed export field");
|
|
398
|
+
return ref;
|
|
399
|
+
});
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
return {
|
|
403
|
+
formsVersion: decodePositiveInteger(query.formsVersion, "formsVersion"),
|
|
404
|
+
layoutVersion: decodePositiveInteger(query.layoutVersion, "layoutVersion"),
|
|
405
|
+
selection
|
|
406
|
+
};
|
|
407
|
+
};
|
|
267
408
|
const encodeActionsToken = (actionsVersion) => encodeToken(ActionsTokenSchema, { actionsVersion });
|
|
268
409
|
const decodeActionsToken = (raw) => decodePositiveInteger(decodeToken(ActionsTokenSchema, raw).actionsVersion, "actionsVersion");
|
|
269
410
|
const encodeAttachmentsToken = (attachmentsVersion) => encodeToken(AttachmentsTokenSchema, { attachmentsVersion });
|
|
@@ -283,7 +424,7 @@ const decodeDownloadToken = (raw) => {
|
|
|
283
424
|
* Encode a render token from a flat wire-shape input. The input is the
|
|
284
425
|
* output of `flatten(...)` over an SDK `PageImageOptions`-shaped object plus
|
|
285
426
|
* cache versions. Semantic invariants (viewport-kind XOR fields, per-family
|
|
286
|
-
* pin grammar — annotatedness itself is
|
|
427
|
+
* pin grammar — annotatedness itself is path-expressed, never a token key —
|
|
287
428
|
* target rect coherence) live in the per-family render query schemas —
|
|
288
429
|
* running them here would duplicate the spec.
|
|
289
430
|
*/
|
|
@@ -300,18 +441,24 @@ const decodeRenderToken = (raw) => decodeToken(RenderTokenSchema, raw);
|
|
|
300
441
|
* plus cache versions). Semantic validation lives in
|
|
301
442
|
* `AnnotationAppearancesQuerySchema`.
|
|
302
443
|
*/
|
|
444
|
+
/** `modes` as one token value: the modes in engine order, joined by `-`. */
|
|
445
|
+
const encodeAppearanceModes = (modes) => modes.join("-");
|
|
303
446
|
const encodeAnnotationAppearancesRenderToken = (input) => encodeToken(AnnotationAppearancesRenderTokenSchema, input);
|
|
304
447
|
/** Decode an annotation-appearance render token to a flat field map. */
|
|
305
448
|
const decodeAnnotationAppearancesRenderToken = (raw) => decodeToken(AnnotationAppearancesRenderTokenSchema, raw);
|
|
449
|
+
/** Encode a widget-appearance render token, the annotation one's twin keyed by `widgetVersion`. */
|
|
450
|
+
const encodeWidgetAppearancesRenderToken = (input) => encodeToken(WidgetAppearancesRenderTokenSchema, input);
|
|
451
|
+
/** Decode a widget-appearance render token to a flat field map. */
|
|
452
|
+
const decodeWidgetAppearancesRenderToken = (raw) => decodeToken(WidgetAppearancesRenderTokenSchema, raw);
|
|
306
453
|
/**
|
|
307
|
-
* The search
|
|
454
|
+
* The search result representation this client speaks — part of the token
|
|
308
455
|
* (and therefore the versioned URL), so a response-shape change can never
|
|
309
456
|
* serve a stale CDN body to a newer client: new tokens are new cache keys,
|
|
310
|
-
* and old tokens fail decode on new servers. Deliberately
|
|
457
|
+
* and old tokens fail decode on new servers. Deliberately always encoded —
|
|
311
458
|
* an exception to the omit-defaults rule, because its entire job is to
|
|
312
459
|
* change the token bytes when the format changes.
|
|
313
460
|
*/
|
|
314
|
-
const SEARCH_RESULT_FORMAT = "
|
|
461
|
+
const SEARCH_RESULT_FORMAT = "ranges1";
|
|
315
462
|
const encodeSearchToken = (input) => {
|
|
316
463
|
const q = input.query;
|
|
317
464
|
return encodeToken(SearchTokenSchema, {
|
|
@@ -322,34 +469,36 @@ const encodeSearchToken = (input) => {
|
|
|
322
469
|
matchCase: q.matchCase ? true : void 0,
|
|
323
470
|
matchDiacritics: q.matchDiacritics ? true : void 0,
|
|
324
471
|
wholeWord: q.wholeWord ? true : void 0,
|
|
325
|
-
|
|
472
|
+
ignoreWhitespace: q.ignoreWhitespace ? true : void 0,
|
|
473
|
+
from: input.from,
|
|
326
474
|
skip: input.skip > 0 ? input.skip : void 0,
|
|
327
|
-
|
|
328
|
-
|
|
475
|
+
limitPages: input.limit?.pages,
|
|
476
|
+
limitMatches: input.limit?.matches
|
|
329
477
|
});
|
|
330
478
|
};
|
|
331
479
|
const decodeSearchToken = (raw) => {
|
|
332
480
|
const t = decodeToken(SearchTokenSchema, raw);
|
|
333
481
|
if (t.epoch === void 0) throw new Error("search token is missing \"epoch\"");
|
|
334
482
|
if (t.q === void 0) throw new Error("search token is missing \"q\"");
|
|
335
|
-
if (t.format !== "
|
|
483
|
+
if (t.format !== "ranges1") throw new Error(`search token has unsupported result format "${t.format ?? "legacy"}" (expected "${SEARCH_RESULT_FORMAT}")`);
|
|
336
484
|
const query = {
|
|
337
485
|
text: decodeTokenText(t.q),
|
|
338
486
|
...t.regex === "true" ? { regex: true } : {},
|
|
339
487
|
...t.matchCase === "true" ? { matchCase: true } : {},
|
|
340
488
|
...t.matchDiacritics === "true" ? { matchDiacritics: true } : {},
|
|
341
|
-
...t.wholeWord === "true" ? { wholeWord: true } : {}
|
|
489
|
+
...t.wholeWord === "true" ? { wholeWord: true } : {},
|
|
490
|
+
...t.ignoreWhitespace === "true" ? { ignoreWhitespace: true } : {}
|
|
342
491
|
};
|
|
343
|
-
const
|
|
344
|
-
const
|
|
492
|
+
const pages = t.limitPages === void 0 ? void 0 : decodePositiveInteger(t.limitPages, "limitPages");
|
|
493
|
+
const matches = t.limitMatches === void 0 ? void 0 : decodePositiveInteger(t.limitMatches, "limitMatches");
|
|
345
494
|
return {
|
|
346
495
|
epoch: t.epoch,
|
|
347
496
|
query,
|
|
348
|
-
...t.
|
|
497
|
+
...t.from === void 0 ? {} : { from: decodePositiveInteger(t.from, "from") },
|
|
349
498
|
skip: t.skip === void 0 ? 0 : decodePositiveInteger(t.skip, "skip"),
|
|
350
|
-
...
|
|
351
|
-
...
|
|
352
|
-
...
|
|
499
|
+
...pages !== void 0 || matches !== void 0 ? { limit: {
|
|
500
|
+
...matches !== void 0 ? { matches } : {},
|
|
501
|
+
...pages !== void 0 ? { pages } : {}
|
|
353
502
|
} } : {}
|
|
354
503
|
};
|
|
355
504
|
};
|
|
@@ -403,7 +552,7 @@ function decodePdfSaveMode(raw) {
|
|
|
403
552
|
* Single source of truth for cloud HTTP paths. Both @cloudpdf/engine and
|
|
404
553
|
* @cloudpdf/server import these so they cannot drift.
|
|
405
554
|
*
|
|
406
|
-
* **URL layout convention
|
|
555
|
+
* **URL layout convention**
|
|
407
556
|
*
|
|
408
557
|
* Each resource type lives at its own distinct path prefix. This
|
|
409
558
|
* lets prefix-matching CDNs (Bunny, Cloud CDN, Azure FD) enforce
|
|
@@ -415,28 +564,39 @@ function decodePdfSaveMode(raw) {
|
|
|
415
564
|
* /v1/docs/{id} — doc root
|
|
416
565
|
* /v1/docs/{id}/manifest@{ver} — doc-level read
|
|
417
566
|
* /v1/docs/{id}/render/pages/{N}/data@{ver} — render is its own prefix
|
|
567
|
+
* /v1/docs/{id}/render/{annotations,fields,all}/pages/{N}/data@{ver} — and each picture family
|
|
418
568
|
* /v1/docs/{id}/text/pages/{N}/data@{ver} — text is its own prefix
|
|
419
569
|
* /v1/docs/{id}/geometry/pages/{N}/data@{ver} — geometry is its own prefix
|
|
420
570
|
* /v1/docs/{id}/layers/{L}/manifest@{ver}
|
|
421
571
|
* /v1/docs/{id}/layers/{L}/metadata@{ver}
|
|
572
|
+
* /v1/docs/{id}/layers/{L}/metadata/custom@{ver} — the Info dict's own keys
|
|
422
573
|
* /v1/docs/{id}/layers/{L}/render/pages/{N}/data@{ver}
|
|
423
574
|
* /v1/docs/{id}/layers/{L}/text/pages/{N}/data@{ver}
|
|
424
575
|
* /v1/docs/{id}/layers/{L}/geometry/pages/{N}/data@{ver}
|
|
425
576
|
* /v1/docs/{id}/layers/{L}/annotations/pages/{N}/items@{ver} — collection (read)
|
|
426
577
|
* /v1/docs/{id}/layers/{L}/annotations/pages/{N}/items — collection (create)
|
|
427
578
|
* /v1/docs/{id}/layers/{L}/annotations/pages/{N}/items/{key} — member
|
|
428
|
-
* /v1/docs/{id}/layers/{L}/annotations/pages/{N}/items/
|
|
429
|
-
* /v1/docs/{id}/layers/{L}/pages/
|
|
579
|
+
* /v1/docs/{id}/layers/{L}/annotations/pages/{N}/items/reorder — stacking order
|
|
580
|
+
* /v1/docs/{id}/layers/{L}/pages/reorder — page order
|
|
430
581
|
* /v1/docs/{id}/layers/{L}/pages/rotate — batch absolute rotation
|
|
431
582
|
* /v1/docs/{id}/layers/{L}/pages/delete — batch page delete
|
|
432
|
-
* /v1/docs/{id}/
|
|
583
|
+
* /v1/docs/{id}/form@{ver} — the form: fields + widget rows (read)
|
|
584
|
+
* /v1/docs/{id}/form/pages/{N}/appearances@{ver} — a page's widget images (read)
|
|
585
|
+
* /v1/docs/{id}/layers/{L}/form@{ver}
|
|
586
|
+
* /v1/docs/{id}/layers/{L}/form/pages/{N}/appearances@{ver}
|
|
587
|
+
* /v1/docs/{id}/layers/{L}/form — the form, current (read)
|
|
588
|
+
* /v1/docs/{id}/layers/{L}/form/widgets/{N}/{key} — a widget's place and look (patch)
|
|
589
|
+
* /v1/docs/{id}/layers/{L}/form/widgets/{N}/reorder — the widgets' stacking order
|
|
433
590
|
* /v1/docs/{id}/layers/{L}/form/fields — field collection (create)
|
|
434
591
|
* /v1/docs/{id}/layers/{L}/form/fields/{key} — field member (read/patch/delete)
|
|
435
592
|
* /v1/docs/{id}/layers/{L}/form/fields/{key}/value — value write (fill)
|
|
436
593
|
* /v1/docs/{id}/layers/{L}/form/fields/{key}/reset — reset to /DV (fill)
|
|
437
594
|
* /v1/docs/{id}/layers/{L}/form/fields/{key}/widgets — adopt a widget (attach)
|
|
438
595
|
* /v1/docs/{id}/layers/{L}/form/fields/{key}/widgets/detach — release a widget
|
|
439
|
-
* /v1/docs/{id}/layers/{L}/form/
|
|
596
|
+
* /v1/docs/{id}/layers/{L}/form/export@{token} — form bundle export (GET)
|
|
597
|
+
* /v1/docs/{id}/layers/{L}/form/export — form bundle export by body (POST)
|
|
598
|
+
* /v1/docs/{id}/layers/{L}/form/import — design import (multipart POST)
|
|
599
|
+
* /v1/docs/{id}/layers/{L}/form/import-values — values import (multipart POST)
|
|
440
600
|
* /v1/docs/{id}/layers/{L}/form/repair — durable reconciliation
|
|
441
601
|
* /v1/docs/{id}/layers/{L}/download@{ver}
|
|
442
602
|
*
|
|
@@ -453,16 +613,21 @@ const wirePaths = {
|
|
|
453
613
|
* against the token like every layer route — the grant is
|
|
454
614
|
* layer-scoped in substance: CDN coverage, scopes, and the client's
|
|
455
615
|
* binding all carry the layer). Path-addressed so the affinity tier —
|
|
456
|
-
* the `X-CloudPDF-Doc` header derivation
|
|
616
|
+
* the `X-CloudPDF-Doc` header derivation and the chart's uri-mode
|
|
457
617
|
* regex — pins the session bootstrap to the document's pod from the
|
|
458
618
|
* very first request. Default-layer callers spell `layers/default/`,
|
|
459
619
|
* same as every other layer route.
|
|
460
620
|
*/
|
|
461
621
|
access: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/access`,
|
|
462
|
-
/** Deprecated alias (docId in the
|
|
622
|
+
/** Deprecated alias (docId in the body) — served for one prerelease
|
|
463
623
|
* cycle so pre-rename clients keep working; remove after. */
|
|
464
624
|
accessLegacy: "/v1/access",
|
|
465
625
|
/**
|
|
626
|
+
* POST `{ count }`: hand the caller's editing session `count` more object
|
|
627
|
+
* numbers at once (at most 1,000), for a large paste.
|
|
628
|
+
*/
|
|
629
|
+
objectNumbers: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/object-numbers`,
|
|
630
|
+
/**
|
|
466
631
|
* GET: open the document referenced by the doc-scoped JWT and
|
|
467
632
|
* return its `DocumentHead`. The server materialises the base
|
|
468
633
|
* PDF into its file cache and binds it to a worker the first
|
|
@@ -500,9 +665,9 @@ const wirePaths = {
|
|
|
500
665
|
*/
|
|
501
666
|
layerLayout: (docId, layerName, layoutVersion) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/layout@${encodeLayoutToken(layoutVersion)}`,
|
|
502
667
|
/**
|
|
503
|
-
* Immutable
|
|
668
|
+
* Immutable base page-geometry list (plane-scope model): the shared-URL
|
|
504
669
|
* variant a layout-inheriting layer resolves at — every visitor's page
|
|
505
|
-
* list is
|
|
670
|
+
* list is one CDN object served from the base worker session.
|
|
506
671
|
*/
|
|
507
672
|
docLayout: (docId, layoutVersion) => `/v1/docs/${encodeURIComponent(docId)}/layout@${encodeLayoutToken(layoutVersion)}`,
|
|
508
673
|
layerLayoutCurrent: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/layout`,
|
|
@@ -516,12 +681,21 @@ const wirePaths = {
|
|
|
516
681
|
*/
|
|
517
682
|
layerMetadata: (docId, layerName, metadataVersion) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/metadata@${encodeMetadataToken(metadataVersion)}`,
|
|
518
683
|
layerMetadataCurrent: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/metadata`,
|
|
519
|
-
/** Immutable
|
|
684
|
+
/** Immutable base metadata (plane-scope model): the shared-URL variant a
|
|
520
685
|
* metadata-inheriting layer resolves at. */
|
|
521
686
|
docMetadata: (docId, metadataVersion) => `/v1/docs/${encodeURIComponent(docId)}/metadata@${encodeMetadataToken(metadataVersion)}`,
|
|
687
|
+
/**
|
|
688
|
+
* GET: the Info dict's custom keys for the layer at a specific
|
|
689
|
+
* `metadataVersion` — the same version pointer as `layerMetadata`, since
|
|
690
|
+
* both halves live in one dict. Content-addressed like it.
|
|
691
|
+
*/
|
|
692
|
+
layerCustomMetadata: (docId, layerName, metadataVersion) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/metadata/custom@${encodeMetadataToken(metadataVersion)}`,
|
|
693
|
+
layerCustomMetadataCurrent: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/metadata/custom`,
|
|
694
|
+
/** Immutable base custom keys: the shared-URL twin of `layerCustomMetadata`. */
|
|
695
|
+
docCustomMetadata: (docId, metadataVersion) => `/v1/docs/${encodeURIComponent(docId)}/metadata/custom@${encodeMetadataToken(metadataVersion)}`,
|
|
522
696
|
/** Immutable catalog-owned actions, independently pinned in the manifest. */
|
|
523
697
|
layerActions: (docId, layerName, actionsVersion) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/actions@${encodeActionsToken(actionsVersion)}`,
|
|
524
|
-
/** Immutable
|
|
698
|
+
/** Immutable base catalog actions (plane-scope model): the shared-URL
|
|
525
699
|
* variant an actions-inheriting layer resolves at. */
|
|
526
700
|
docActions: (docId, actionsVersion) => `/v1/docs/${encodeURIComponent(docId)}/actions@${encodeActionsToken(actionsVersion)}`,
|
|
527
701
|
/** Immutable layer signature snapshot (base signatures + the layer's fields + protection). */
|
|
@@ -535,7 +709,7 @@ const wirePaths = {
|
|
|
535
709
|
/** POST (JSON): install the CMS and publish the sealed bytes as the next base version. */
|
|
536
710
|
layerSignatureComplete: (docId, layerName, signingId) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/signatures/${encodeURIComponent(signingId)}/complete`,
|
|
537
711
|
/** DELETE: discard a pending signing. */
|
|
538
|
-
|
|
712
|
+
layerSignatureCancel: (docId, layerName, signingId) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/signatures/${encodeURIComponent(signingId)}`,
|
|
539
713
|
/** The document's base versions, oldest first (grows; never cached). */
|
|
540
714
|
docVersions: (docId) => `/v1/docs/${encodeURIComponent(docId)}/versions`,
|
|
541
715
|
/** Immutable: the signature snapshot of one base version. */
|
|
@@ -554,13 +728,15 @@ const wirePaths = {
|
|
|
554
728
|
layerFormFieldSignatureAppearance: (docId, layerName, fieldKey) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/fields/${encodeURIComponent(fieldKey)}/signature-appearance`,
|
|
555
729
|
/** POST: rewrite the document Info dict for the layer (metadata edit). */
|
|
556
730
|
layerMetadataUpdate: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/metadata`,
|
|
731
|
+
/** POST: set and remove the Info dict's custom keys for the layer. */
|
|
732
|
+
layerCustomMetadataUpdate: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/metadata/custom`,
|
|
557
733
|
/**
|
|
558
|
-
* Immutable
|
|
734
|
+
* Immutable base /EmbeddedFiles listing: the shared-URL variant an
|
|
559
735
|
* attachments-undiverged layer resolves at — every visitor's sidebar list
|
|
560
|
-
* is
|
|
736
|
+
* is one CDN object served from the base worker session.
|
|
561
737
|
*/
|
|
562
738
|
docAttachments: (docId, attachmentsVersion) => `/v1/docs/${encodeURIComponent(docId)}/attachments@${encodeAttachmentsToken(attachmentsVersion)}`,
|
|
563
|
-
/** Immutable
|
|
739
|
+
/** Immutable base decoded bytes of one embedded file (twin of
|
|
564
740
|
* `layerAttachmentFile` — same capability tier split). */
|
|
565
741
|
docAttachmentFile: (docId, key, attachmentsVersion) => `/v1/docs/${encodeURIComponent(docId)}/attachment-files/${encodeTokenText(key)}/data@${encodeAttachmentsToken(attachmentsVersion)}`,
|
|
566
742
|
/** Immutable /EmbeddedFiles listing, pinned by `attachmentsVersion`. */
|
|
@@ -577,14 +753,14 @@ const wirePaths = {
|
|
|
577
753
|
*/
|
|
578
754
|
layerAttachmentFile: (docId, layerName, key, attachmentsVersion) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/attachment-files/${encodeTokenText(key)}/data@${encodeAttachmentsToken(attachmentsVersion)}`,
|
|
579
755
|
/** Immutable decoded bytes of a FileAttachment annotation's embedded file. */
|
|
580
|
-
layerAnnotationFile: (docId, layerName,
|
|
756
|
+
layerAnnotationFile: (docId, layerName, page, annotKey, attachmentsVersion) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/attachment-files/pages/${encodeURIComponent(encodePageKey(page))}/items/${encodeURIComponent(annotKey)}/data@${encodeAttachmentsToken(attachmentsVersion)}`,
|
|
581
757
|
/**
|
|
582
|
-
* Immutable
|
|
758
|
+
* Immutable base bytes of a FileAttachment annotation's embedded file
|
|
583
759
|
* (plane-scope model). Depends on the `annotations` plane (the annotation
|
|
584
|
-
* exists in this view)
|
|
760
|
+
* exists in this view) and the `attachments` plane (the pin); the origin
|
|
585
761
|
* guard requires both inherited.
|
|
586
762
|
*/
|
|
587
|
-
docAnnotationFile: (docId,
|
|
763
|
+
docAnnotationFile: (docId, page, annotKey, attachmentsVersion) => `/v1/docs/${encodeURIComponent(docId)}/attachment-files/pages/${encodeURIComponent(encodePageKey(page))}/items/${encodeURIComponent(annotKey)}/data@${encodeAttachmentsToken(attachmentsVersion)}`,
|
|
588
764
|
/**
|
|
589
765
|
* GET: full plain-text extraction for a single page at a specific
|
|
590
766
|
* `contentVersion`. Content-addressed; CDN may cache forever.
|
|
@@ -592,55 +768,60 @@ const wirePaths = {
|
|
|
592
768
|
* retry walks `/head` → `/manifest@docVersion=N` to learn the new
|
|
593
769
|
* `contentVersion`.
|
|
594
770
|
*/
|
|
595
|
-
docPageText: (docId,
|
|
596
|
-
layerPageText: (docId, layerName,
|
|
597
|
-
layerPageTextCurrent: (docId, layerName,
|
|
598
|
-
docPageGeometry: (docId,
|
|
599
|
-
docPageGeometryCurrent: (docId,
|
|
600
|
-
docPageRender: (docId, pageObjectNumber, token) => `/v1/docs/${encodeURIComponent(docId)}/render/pages/${pageObjectNumber}/data@${encodeRenderToken(token)}`,
|
|
601
|
-
docPageRenderCurrent: (docId, pageObjectNumber) => `/v1/docs/${encodeURIComponent(docId)}/render/pages/${pageObjectNumber}/data`,
|
|
771
|
+
docPageText: (docId, page, contentVersion) => `/v1/docs/${encodeURIComponent(docId)}/text/pages/${encodeURIComponent(encodePageKey(page))}/data@${encodeContentToken(contentVersion)}`,
|
|
772
|
+
layerPageText: (docId, layerName, page, contentVersion) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/text/pages/${encodeURIComponent(encodePageKey(page))}/data@${encodeContentToken(contentVersion)}`,
|
|
773
|
+
layerPageTextCurrent: (docId, layerName, page) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/text/pages/${encodeURIComponent(encodePageKey(page))}/data`,
|
|
774
|
+
docPageGeometry: (docId, page, contentVersion) => `/v1/docs/${encodeURIComponent(docId)}/geometry/pages/${encodeURIComponent(encodePageKey(page))}/data@${encodeContentToken(contentVersion)}`,
|
|
775
|
+
docPageGeometryCurrent: (docId, page) => `/v1/docs/${encodeURIComponent(docId)}/geometry/pages/${encodeURIComponent(encodePageKey(page))}/data`,
|
|
602
776
|
/**
|
|
603
|
-
*
|
|
604
|
-
*
|
|
605
|
-
*
|
|
606
|
-
*
|
|
607
|
-
* identify its full plane-dependency set. Annotatedness is therefore
|
|
608
|
-
* PATH-ONLY (the token/path law): the wire token has no
|
|
609
|
-
* `includeAnnotations` key at all; the annotated family's token carries
|
|
610
|
-
* `annotationVersion`, the free family's cannot.
|
|
777
|
+
* A page picture of one family (`PAGE_RENDER_FAMILIES`). The family is a
|
|
778
|
+
* path of its own, never a token field: each depends on its own planes and
|
|
779
|
+
* needs its own rights, and an edge grant sees only prefixes. Its token
|
|
780
|
+
* carries the family's pins.
|
|
611
781
|
*/
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
* annotatedness is path-only at BOTH tiers. */
|
|
619
|
-
layerPageRenderAnnotated: (docId, layerName, pageObjectNumber, token) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/render/annotated/pages/${pageObjectNumber}/data@${encodeRenderToken(token)}`,
|
|
620
|
-
layerPageRenderAnnotatedCurrent: (docId, layerName, pageObjectNumber) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/render/annotated/pages/${pageObjectNumber}/data`,
|
|
782
|
+
docPageRender: (docId, family, page, token) => `/v1/docs/${encodeURIComponent(docId)}/${PAGE_RENDER_FAMILIES[family].path}/${encodeURIComponent(encodePageKey(page))}/data@${encodeRenderToken(token)}`,
|
|
783
|
+
docPageRenderCurrent: (docId, family, page) => `/v1/docs/${encodeURIComponent(docId)}/${PAGE_RENDER_FAMILIES[family].path}/${encodeURIComponent(encodePageKey(page))}/data`,
|
|
784
|
+
layerPageGeometry: (docId, layerName, page, contentVersion) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/geometry/pages/${encodeURIComponent(encodePageKey(page))}/data@${encodeContentToken(contentVersion)}`,
|
|
785
|
+
layerPageGeometryCurrent: (docId, layerName, page) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/geometry/pages/${encodeURIComponent(encodePageKey(page))}/data`,
|
|
786
|
+
layerPageRender: (docId, layerName, family, page, token) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/${PAGE_RENDER_FAMILIES[family].path}/${encodeURIComponent(encodePageKey(page))}/data@${encodeRenderToken(token)}`,
|
|
787
|
+
layerPageRenderCurrent: (docId, layerName, family, page) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/${PAGE_RENDER_FAMILIES[family].path}/${encodeURIComponent(encodePageKey(page))}/data`,
|
|
621
788
|
/**
|
|
622
|
-
* Immutable
|
|
789
|
+
* Immutable base annotation list for a single page (plane-scope model):
|
|
623
790
|
* the shared-URL variant an annotations-inheriting layer resolves at — a
|
|
624
|
-
* base's own annotations (
|
|
625
|
-
* through every pristine layer, so 1,000 visitors' sidebars are
|
|
791
|
+
* base's own annotations (inline ones included) are simply visible
|
|
792
|
+
* through every pristine layer, so 1,000 visitors' sidebars are one CDN
|
|
626
793
|
* object served from the base worker session.
|
|
627
794
|
*/
|
|
628
|
-
docPageAnnotations: (docId,
|
|
629
|
-
/** Immutable
|
|
795
|
+
docPageAnnotations: (docId, page, annotationVersion) => `/v1/docs/${encodeURIComponent(docId)}/annotations/pages/${encodeURIComponent(encodePageKey(page))}/items@${encodeAnnotationToken(annotationVersion)}`,
|
|
796
|
+
/** Immutable base whole-document annotation listing (bulk hydration). */
|
|
630
797
|
docAnnotationsAll: (docId, annotationsVersion) => `/v1/docs/${encodeURIComponent(docId)}/annotations/items@${encodeAnnotationsAllToken(annotationsVersion)}`,
|
|
631
|
-
/** Immutable
|
|
798
|
+
/** Immutable base appearance batch (twin of
|
|
632
799
|
* `layerPageAnnotationAppearances` — same `annotations` plane gate). */
|
|
633
|
-
docPageAnnotationAppearances: (docId,
|
|
800
|
+
docPageAnnotationAppearances: (docId, page, token) => `/v1/docs/${encodeURIComponent(docId)}/annotations/pages/${encodeURIComponent(encodePageKey(page))}/appearances@${encodeAnnotationAppearancesRenderToken(token)}`,
|
|
634
801
|
/**
|
|
635
802
|
* GET: full annotation list for a single page at a specific
|
|
636
803
|
* `annotationVersion`. Same cache-control rules and 404-retry
|
|
637
804
|
* semantics as `docPageText`. The `items` suffix is the
|
|
638
805
|
* collection name — see file-level docstring.
|
|
639
806
|
*/
|
|
640
|
-
layerPageAnnotations: (docId, layerName,
|
|
641
|
-
/** Immutable
|
|
807
|
+
layerPageAnnotations: (docId, layerName, page, annotationVersion) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/pages/${encodeURIComponent(encodePageKey(page))}/items@${encodeAnnotationToken(annotationVersion)}`,
|
|
808
|
+
/** Immutable base annotation export: a bundle as multipart, needing
|
|
809
|
+
* `doc.annotate.read` and `doc.download`. */
|
|
810
|
+
docAnnotationsExport: (docId, token) => `/v1/docs/${encodeURIComponent(docId)}/annotations/export@${encodeAnnotationsExportToken(token)}`,
|
|
811
|
+
/** Immutable layer annotation export (twin of `docAnnotationsExport`). */
|
|
812
|
+
layerAnnotationsExport: (docId, layerName, token) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/export@${encodeAnnotationsExportToken(token)}`,
|
|
813
|
+
/**
|
|
814
|
+
* A layer annotation export whose selection a URL can't carry (position
|
|
815
|
+
* refs, long ref lists): a POST of the pins and the selection, not cached.
|
|
816
|
+
*/
|
|
817
|
+
layerAnnotationsExportRequest: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/export`,
|
|
818
|
+
/** A layer's changes: user actions, each its ops in one transaction, or an undo (`doc.apply`). */
|
|
819
|
+
layerChanges: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/changes`,
|
|
820
|
+
/** A bundle's annotations, created in the layer as one change (`doc.annotations.import`). */
|
|
821
|
+
layerAnnotationsImport: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/import`,
|
|
822
|
+
/** Immutable layer whole-document annotation listing (bulk hydration). */
|
|
642
823
|
layerAnnotationsAll: (docId, layerName, annotationsVersion) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/items@${encodeAnnotationsAllToken(annotationsVersion)}`,
|
|
643
|
-
layerPageAnnotationsCurrent: (docId, layerName,
|
|
824
|
+
layerPageAnnotationsCurrent: (docId, layerName, page) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/pages/${encodeURIComponent(encodePageKey(page))}/items`,
|
|
644
825
|
/**
|
|
645
826
|
* GET: batch-rendered annotation appearance bitmaps for a single page as a
|
|
646
827
|
* `multipart/form-data` body. Sibling collection of `items` under the same
|
|
@@ -651,28 +832,52 @@ const wirePaths = {
|
|
|
651
832
|
* Content-addressed via the appearance render token (`annotationVersion`
|
|
652
833
|
* plus render options like scale/format); CDN may cache forever. Appearance
|
|
653
834
|
* pixels depend only on the annotation `/AP` stream, so `contentVersion` is
|
|
654
|
-
* deliberately
|
|
835
|
+
* deliberately not part of the key.
|
|
655
836
|
*/
|
|
656
|
-
layerPageAnnotationAppearances: (docId, layerName,
|
|
657
|
-
layerPageAnnotationAppearancesCurrent: (docId, layerName,
|
|
658
|
-
layerPageAnnotationsCreate: (docId, layerName,
|
|
659
|
-
layerAnnotationByKey: (docId, layerName,
|
|
660
|
-
|
|
837
|
+
layerPageAnnotationAppearances: (docId, layerName, page, token) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/pages/${encodeURIComponent(encodePageKey(page))}/appearances@${encodeAnnotationAppearancesRenderToken(token)}`,
|
|
838
|
+
layerPageAnnotationAppearancesCurrent: (docId, layerName, page) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/pages/${encodeURIComponent(encodePageKey(page))}/appearances`,
|
|
839
|
+
layerPageAnnotationsCreate: (docId, layerName, page) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/pages/${encodeURIComponent(encodePageKey(page))}/items`,
|
|
840
|
+
layerAnnotationByKey: (docId, layerName, page, key) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/pages/${encodeURIComponent(encodePageKey(page))}/items/${encodeURIComponent(key)}`,
|
|
841
|
+
/** GET: an annotation's `appearance` resource, its drawing as a one-page
|
|
842
|
+
* PDF — a derived read (application/pdf, no-store), gated like pages/extract. */
|
|
843
|
+
layerAnnotationAppearanceResource: (docId, layerName, page, key) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/pages/${encodeURIComponent(encodePageKey(page))}/items/${encodeURIComponent(key)}/resources/appearance`,
|
|
844
|
+
layerPageAnnotationsReorder: (docId, layerName, page) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/pages/${encodeURIComponent(encodePageKey(page))}/items/reorder`,
|
|
661
845
|
/** POST: flatten a chosen set of the page's annotations into its content
|
|
662
846
|
* (a content + annotation mutation of that page). */
|
|
663
|
-
layerPageAnnotationsFlatten: (docId, layerName,
|
|
847
|
+
layerPageAnnotationsFlatten: (docId, layerName, page) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/pages/${encodeURIComponent(encodePageKey(page))}/items/flatten`,
|
|
664
848
|
/** POST: the chosen annotations' appearances as one single-page PDF — a
|
|
665
849
|
* derived read (application/pdf, no-store), gated like pages/extract. */
|
|
666
|
-
layerPageAnnotationsAppearance: (docId, layerName,
|
|
850
|
+
layerPageAnnotationsAppearance: (docId, layerName, page) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/pages/${encodeURIComponent(encodePageKey(page))}/items/appearance`,
|
|
851
|
+
/**
|
|
852
|
+
* Immutable base form: the fields, every widget row, the calculation
|
|
853
|
+
* order (`doc.forms.list()`), at the document's `formsVersion`. Needs
|
|
854
|
+
* `doc.forms.read`, under its own prefix, so the CDN signs it apart from
|
|
855
|
+
* the annotations.
|
|
856
|
+
*/
|
|
857
|
+
docForm: (docId, formsVersion) => `/v1/docs/${encodeURIComponent(docId)}/form@${encodeFormToken(formsVersion)}`,
|
|
858
|
+
/** Immutable layer form (twin of `docForm`). */
|
|
859
|
+
layerForm: (docId, layerName, formsVersion) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form@${encodeFormToken(formsVersion)}`,
|
|
860
|
+
/** GET: the layer's form as it is now — for API callers, served `no-store`. */
|
|
861
|
+
layerFormCurrent: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form`,
|
|
862
|
+
/**
|
|
863
|
+
* Immutable base batch of a page's widget images, every mode and state, as
|
|
864
|
+
* `multipart/form-data` (`page.forms.renderAppearances()`), keyed by the
|
|
865
|
+
* page's `widgetVersion`.
|
|
866
|
+
*/
|
|
867
|
+
docPageFormAppearances: (docId, page, token) => `/v1/docs/${encodeURIComponent(docId)}/form/pages/${encodeURIComponent(encodePageKey(page))}/appearances@${encodeWidgetAppearancesRenderToken(token)}`,
|
|
868
|
+
/** Immutable layer twin of `docPageFormAppearances`. */
|
|
869
|
+
layerPageFormAppearances: (docId, layerName, page, token) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/pages/${encodeURIComponent(encodePageKey(page))}/appearances@${encodeWidgetAppearancesRenderToken(token)}`,
|
|
870
|
+
layerPageFormAppearancesCurrent: (docId, layerName, page) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/pages/${encodeURIComponent(encodePageKey(page))}/appearances`,
|
|
667
871
|
/**
|
|
668
|
-
*
|
|
669
|
-
*
|
|
670
|
-
*
|
|
671
|
-
* no content-addressed `@version` variant: the snapshot is always served
|
|
672
|
-
* `no-store`. Mutation results carry the per-page `cacheDelta` that keeps
|
|
673
|
-
* annotation/render caches coherent when widget appearances change.
|
|
872
|
+
* PATCH: a widget's place and look (`doc.forms.updateWidget`). `key` is
|
|
873
|
+
* the widget's annotation key. Not under `form/pages/`, which the CDN
|
|
874
|
+
* signs for reads.
|
|
674
875
|
*/
|
|
675
|
-
|
|
876
|
+
/** POST: the form's calculation order (`doc.forms.reorderCalculations`). */
|
|
877
|
+
layerFormCalculationsReorder: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/calculations/reorder`,
|
|
878
|
+
/** POST: the stacking order of a page's widgets (`doc.forms.reorderWidgets`). */
|
|
879
|
+
layerFormWidgetsReorder: (docId, layerName, page) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/widgets/${encodeURIComponent(encodePageKey(page))}/reorder`,
|
|
880
|
+
layerFormWidget: (docId, layerName, page, key) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/widgets/${encodeURIComponent(encodePageKey(page))}/${encodeURIComponent(key)}`,
|
|
676
881
|
/** POST: create a field (optionally with styled widget placements). */
|
|
677
882
|
layerFormFields: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/fields`,
|
|
678
883
|
/**
|
|
@@ -683,9 +888,9 @@ const wirePaths = {
|
|
|
683
888
|
layerFormFieldByKey: (docId, layerName, fieldKey) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/fields/${encodeURIComponent(fieldKey)}`,
|
|
684
889
|
/** POST: replace the field's value (`{ value: FormFieldValue }`). */
|
|
685
890
|
layerFormFieldValue: (docId, layerName, fieldKey) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/fields/${encodeURIComponent(fieldKey)}/value`,
|
|
686
|
-
/** POST: reset
|
|
687
|
-
|
|
688
|
-
/** POST:
|
|
891
|
+
/** POST: reset fields to /DV (or clear): `{ refs? }`, the whole form without `refs`. */
|
|
892
|
+
layerFormReset: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/reset`,
|
|
893
|
+
/** POST: add a widget to the field, the body its placement (`WidgetPlacement`). */
|
|
689
894
|
layerFormFieldWidgets: (docId, layerName, fieldKey) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/fields/${encodeURIComponent(fieldKey)}/widgets`,
|
|
690
895
|
/**
|
|
691
896
|
* POST: release a widget back to the inert annotation plane
|
|
@@ -694,18 +899,21 @@ const wirePaths = {
|
|
|
694
899
|
* one codec instead of inventing a second composite key syntax.
|
|
695
900
|
*/
|
|
696
901
|
layerFormFieldWidgetsDetach: (docId, layerName, fieldKey) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/fields/${encodeURIComponent(fieldKey)}/widgets/detach`,
|
|
697
|
-
/**
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
*/
|
|
702
|
-
|
|
902
|
+
/** Immutable base form export: a bundle as multipart, needing `doc.forms.read` and `doc.download`. */
|
|
903
|
+
docFormExport: (docId, token) => `/v1/docs/${encodeURIComponent(docId)}/form/export@${encodeFormExportToken(token)}`,
|
|
904
|
+
/** Immutable layer form export (twin of `docFormExport`). */
|
|
905
|
+
layerFormExport: (docId, layerName, token) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/export@${encodeFormExportToken(token)}`,
|
|
906
|
+
/** A layer form export whose selection a URL can't carry: a POST of the pins and the selection, not cached. */
|
|
907
|
+
layerFormExportRequest: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/export`,
|
|
908
|
+
/** A bundle's design, created in the layer as one change (`doc.forms.import`). */
|
|
909
|
+
layerFormImport: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/import`,
|
|
910
|
+
/** A bundle's values, written in the layer as one change (`doc.forms.importValues`). */
|
|
911
|
+
layerFormImportValues: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/import-values`,
|
|
703
912
|
/** POST: durable reconciliation (`{ bakeAppearances? }`). */
|
|
704
913
|
layerFormRepair: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/repair`,
|
|
705
|
-
layerFormEffects: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/effects`,
|
|
706
914
|
/**
|
|
707
915
|
* GET: one budgeted search slice, versioned form. The token
|
|
708
|
-
* (`encodeSearchToken`)
|
|
916
|
+
* (`encodeSearchToken`) is the cache key: content epoch + query +
|
|
709
917
|
* position. Immutable; CDN may cache forever. Mode is the path — rects
|
|
710
918
|
* and full are separate resources so permission tiers never share
|
|
711
919
|
* cache entries (`'rects'` needs `doc.text.search`; `'full'` also
|
|
@@ -715,15 +923,17 @@ const wirePaths = {
|
|
|
715
923
|
layerSearchFull: (docId, layerName, token) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/search/full/data@${token}`,
|
|
716
924
|
/**
|
|
717
925
|
* GET: unversioned form — same fields as flat query params (`q` as
|
|
718
|
-
* plain text), served from the
|
|
926
|
+
* plain text), served from the current content, always `no-store`.
|
|
719
927
|
* The debug/simple-client variant; the SDK uses the versioned form.
|
|
720
928
|
*/
|
|
721
929
|
layerSearchRectsCurrent: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/search/rects/data`,
|
|
722
930
|
layerSearchFullCurrent: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/search/full/data`,
|
|
723
|
-
|
|
931
|
+
layerPageViewports: (docId, layerName, page) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/pages/${encodeURIComponent(encodePageKey(page))}/viewports`,
|
|
932
|
+
layerPageScale: (docId, layerName, page) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/pages/${encodeURIComponent(encodePageKey(page))}/scale`,
|
|
933
|
+
layerPagesReorder: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/pages/reorder`,
|
|
724
934
|
layerPagesRotate: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/pages/rotate`,
|
|
725
935
|
layerPagesDelete: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/pages/delete`,
|
|
726
|
-
/** POST: register/rename a `/Names /Pages` entry — a page-
|
|
936
|
+
/** POST: register/rename a `/Names /Pages` entry — a page-structure
|
|
727
937
|
* mutation (docVersion + layoutVersion advance; reads ride `/layout`). */
|
|
728
938
|
layerPagesNames: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/pages/names`,
|
|
729
939
|
/** POST: remove a `/Names /Pages` entry (the page stays). */
|
|
@@ -731,14 +941,14 @@ const wirePaths = {
|
|
|
731
941
|
layerPagesFlatten: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/pages/flatten`,
|
|
732
942
|
/**
|
|
733
943
|
* POST (multipart mutation envelope): copy every page of the `source`
|
|
734
|
-
* resource part (a standalone PDF) in at the body's `
|
|
944
|
+
* resource part (a standalone PDF) in at the body's `toIndex`.
|
|
735
945
|
*/
|
|
736
946
|
layerPagesInsert: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/pages/insert`,
|
|
737
947
|
/** POST (plain JSON): create blank pages — pages.insert minus the bytes. */
|
|
738
948
|
layerPagesInsertBlank: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/pages/insert-blank`,
|
|
739
949
|
/**
|
|
740
950
|
* POST (plain JSON → `application/pdf` bytes): export the listed pages,
|
|
741
|
-
* in caller order, as a standalone PDF. A
|
|
951
|
+
* in caller order, as a standalone PDF. A read over the current layer
|
|
742
952
|
* state (gated like /download), so it is a POST only for its body —
|
|
743
953
|
* nothing mutates and no event is published.
|
|
744
954
|
*/
|
|
@@ -748,15 +958,6 @@ const wirePaths = {
|
|
|
748
958
|
layerDownload: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/download`,
|
|
749
959
|
layerDownloadVersioned: (docId, layerName, token) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/download@${encodeDownloadToken(token)}`,
|
|
750
960
|
/**
|
|
751
|
-
* Weak-annotation-sessions: pluralized in v2 so the collection
|
|
752
|
-
* lives at `/weak-annotation-sessions` and members at
|
|
753
|
-
* `/weak-annotation-sessions/{sessionId}` — REST-conventional.
|
|
754
|
-
*/
|
|
755
|
-
layerWeakAnnotationSession: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/weak-annotation-sessions`,
|
|
756
|
-
layerWeakAnnotationSessionHeartbeat: (docId, layerName, sessionId) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/weak-annotation-sessions/${encodeURIComponent(sessionId)}/heartbeat`,
|
|
757
|
-
layerWeakAnnotationSessionPages: (docId, layerName, sessionId) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/weak-annotation-sessions/${encodeURIComponent(sessionId)}/pages`,
|
|
758
|
-
layerWeakAnnotationSessionRelease: (docId, layerName, sessionId) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/weak-annotation-sessions/${encodeURIComponent(sessionId)}`,
|
|
759
|
-
/**
|
|
760
961
|
* POST: pre-warm the doc cache + worker open before any user
|
|
761
962
|
* request lands. Body is `{ docId }`. Doc-scoped token required.
|
|
762
963
|
*/
|
|
@@ -775,20 +976,30 @@ function analysisQueryString(query) {
|
|
|
775
976
|
const wireTemplates = {
|
|
776
977
|
docHead: "/v1/docs/:docId/head",
|
|
777
978
|
layerManifest: "/v1/docs/:docId/layers/:layerName/manifest",
|
|
979
|
+
layerChanges: "/v1/docs/:docId/layers/:layerName/changes",
|
|
778
980
|
layerMetadata: "/v1/docs/:docId/layers/:layerName/metadata",
|
|
779
|
-
|
|
780
|
-
|
|
981
|
+
layerCustomMetadata: "/v1/docs/:docId/layers/:layerName/metadata/custom",
|
|
982
|
+
layerRenderPage: "/v1/docs/:docId/layers/:layerName/render/pages/:pageKey/data",
|
|
983
|
+
layerTextPage: "/v1/docs/:docId/layers/:layerName/text/pages/:pageKey/data",
|
|
781
984
|
layerAnnotationItemsAll: "/v1/docs/:docId/layers/:layerName/annotations/items",
|
|
782
|
-
layerAnnotationItems: "/v1/docs/:docId/layers/:layerName/annotations/pages/:
|
|
783
|
-
layerAnnotationItem: "/v1/docs/:docId/layers/:layerName/annotations/pages/:
|
|
784
|
-
|
|
785
|
-
|
|
985
|
+
layerAnnotationItems: "/v1/docs/:docId/layers/:layerName/annotations/pages/:pageKey/items",
|
|
986
|
+
layerAnnotationItem: "/v1/docs/:docId/layers/:layerName/annotations/pages/:pageKey/items/:annotKey",
|
|
987
|
+
layerAnnotationItemsReorder: "/v1/docs/:docId/layers/:layerName/annotations/pages/:pageKey/items/reorder",
|
|
988
|
+
layerAnnotationItemsFlatten: "/v1/docs/:docId/layers/:layerName/annotations/pages/:pageKey/items/flatten",
|
|
989
|
+
layerAnnotationItemsAppearance: "/v1/docs/:docId/layers/:layerName/annotations/pages/:pageKey/items/appearance",
|
|
990
|
+
layerAnnotationItemAppearanceResource: "/v1/docs/:docId/layers/:layerName/annotations/pages/:pageKey/items/:annotKey/resources/appearance",
|
|
786
991
|
layerForm: "/v1/docs/:docId/layers/:layerName/form",
|
|
992
|
+
layerFormWidget: "/v1/docs/:docId/layers/:layerName/form/widgets/:pageKey/:annotKey",
|
|
993
|
+
layerFormWidgetsReorder: "/v1/docs/:docId/layers/:layerName/form/widgets/:pageKey/reorder",
|
|
994
|
+
layerFormCalculationsReorder: "/v1/docs/:docId/layers/:layerName/form/calculations/reorder",
|
|
787
995
|
layerFormFieldValue: "/v1/docs/:docId/layers/:layerName/form/fields/:fieldKey/value",
|
|
788
|
-
|
|
996
|
+
layerFormReset: "/v1/docs/:docId/layers/:layerName/form/reset",
|
|
789
997
|
layerFormFieldSignatureAppearance: "/v1/docs/:docId/layers/:layerName/form/fields/:fieldKey/signature-appearance",
|
|
790
|
-
|
|
791
|
-
|
|
998
|
+
layerFormImport: "/v1/docs/:docId/layers/:layerName/form/import",
|
|
999
|
+
layerFormImportValues: "/v1/docs/:docId/layers/:layerName/form/import-values",
|
|
1000
|
+
layerPageViewports: "/v1/docs/:docId/layers/:layerName/pages/:pageKey/viewports",
|
|
1001
|
+
layerPageScale: "/v1/docs/:docId/layers/:layerName/pages/:pageKey/scale",
|
|
1002
|
+
layerPagesReorder: "/v1/docs/:docId/layers/:layerName/pages/reorder",
|
|
792
1003
|
layerPagesRotate: "/v1/docs/:docId/layers/:layerName/pages/rotate",
|
|
793
1004
|
layerPagesDelete: "/v1/docs/:docId/layers/:layerName/pages/delete",
|
|
794
1005
|
layerPagesNames: "/v1/docs/:docId/layers/:layerName/pages/names",
|
|
@@ -803,7 +1014,7 @@ const wireTemplates = {
|
|
|
803
1014
|
layerSignaturesAnalysis: "/v1/docs/:docId/layers/:layerName/signatures/analysis",
|
|
804
1015
|
layerSignaturesPrepare: "/v1/docs/:docId/layers/:layerName/signatures/prepare",
|
|
805
1016
|
layerSignatureComplete: "/v1/docs/:docId/layers/:layerName/signatures/:signingId/complete",
|
|
806
|
-
|
|
1017
|
+
layerSignatureCancel: "/v1/docs/:docId/layers/:layerName/signatures/:signingId",
|
|
807
1018
|
docVersions: "/v1/docs/:docId/versions",
|
|
808
1019
|
docVersionSignatures: "/v1/docs/:docId/versions/signatures/:sha",
|
|
809
1020
|
docVersionSignatureContents: "/v1/docs/:docId/versions/signatures/:sha/:fieldKey/contents",
|
|
@@ -814,8 +1025,45 @@ const wireTemplates = {
|
|
|
814
1025
|
};
|
|
815
1026
|
//#endregion
|
|
816
1027
|
//#region src/wire/resources.ts
|
|
1028
|
+
/** A page picture of one family, at the document's shared path. */
|
|
1029
|
+
function pageRenderResource(family) {
|
|
1030
|
+
const { resource, path, needs } = PAGE_RENDER_FAMILIES[family];
|
|
1031
|
+
return {
|
|
1032
|
+
id: resource,
|
|
1033
|
+
pathPattern: `/v1/docs/{docId}/${path}/*/data@*`,
|
|
1034
|
+
resolvePathPattern: (docId) => `/v1/docs/${docId}/${path}/*/data@*`,
|
|
1035
|
+
pathPrefix: `/v1/docs/{docId}/${path}/`,
|
|
1036
|
+
resolvePathPrefix: (docId) => `/v1/docs/${docId}/${path}/`,
|
|
1037
|
+
requirement: requirementOf(needs),
|
|
1038
|
+
routeKind: "versioned-read",
|
|
1039
|
+
cdnCacheable: true
|
|
1040
|
+
};
|
|
1041
|
+
}
|
|
1042
|
+
/** A page picture of one family, at a layer's path. */
|
|
1043
|
+
function layerPageRenderResource(family) {
|
|
1044
|
+
const { layerResource, path, needs } = PAGE_RENDER_FAMILIES[family];
|
|
1045
|
+
return {
|
|
1046
|
+
id: layerResource,
|
|
1047
|
+
pathPattern: `/v1/docs/{docId}/layers/{layerName}/${path}/*/data@*`,
|
|
1048
|
+
resolvePathPattern: (docId, layerName = "default") => `/v1/docs/${docId}/layers/${layerName}/${path}/*/data@*`,
|
|
1049
|
+
pathPrefix: `/v1/docs/{docId}/layers/{layerName}/${path}/`,
|
|
1050
|
+
resolvePathPrefix: (docId, layerName = "default") => `/v1/docs/${docId}/layers/${layerName}/${path}/`,
|
|
1051
|
+
requirement: requirementOf(needs),
|
|
1052
|
+
routeKind: "versioned-read",
|
|
1053
|
+
cdnCacheable: true
|
|
1054
|
+
};
|
|
1055
|
+
}
|
|
1056
|
+
function requirementOf(needs) {
|
|
1057
|
+
return needs.length === 1 ? {
|
|
1058
|
+
kind: "single",
|
|
1059
|
+
capability: needs[0]
|
|
1060
|
+
} : {
|
|
1061
|
+
kind: "all",
|
|
1062
|
+
capabilities: needs
|
|
1063
|
+
};
|
|
1064
|
+
}
|
|
817
1065
|
/**
|
|
818
|
-
* URL layout
|
|
1066
|
+
* URL layout: each resource type lives at a distinct path
|
|
819
1067
|
* prefix so prefix-matching CDNs (Bunny, Cloud CDN, Azure FD) can
|
|
820
1068
|
* enforce per-resource scope at the edge. See wire/paths.ts for the
|
|
821
1069
|
* full shape and rationale.
|
|
@@ -860,32 +1108,10 @@ const DOC_RESOURCES = {
|
|
|
860
1108
|
routeKind: "versioned-read",
|
|
861
1109
|
cdnCacheable: true
|
|
862
1110
|
},
|
|
863
|
-
"page-render":
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
pathPrefix: "/v1/docs/{docId}/render/pages/",
|
|
868
|
-
resolvePathPrefix: (docId) => `/v1/docs/${docId}/render/pages/`,
|
|
869
|
-
requirement: {
|
|
870
|
-
kind: "single",
|
|
871
|
-
capability: "doc.render"
|
|
872
|
-
},
|
|
873
|
-
routeKind: "versioned-read",
|
|
874
|
-
cdnCacheable: true
|
|
875
|
-
},
|
|
876
|
-
"page-render-annotated": {
|
|
877
|
-
id: "page-render-annotated",
|
|
878
|
-
pathPattern: "/v1/docs/{docId}/render/annotated/pages/*/data@*",
|
|
879
|
-
resolvePathPattern: (docId) => `/v1/docs/${docId}/render/annotated/pages/*/data@*`,
|
|
880
|
-
pathPrefix: "/v1/docs/{docId}/render/annotated/pages/",
|
|
881
|
-
resolvePathPrefix: (docId) => `/v1/docs/${docId}/render/annotated/pages/`,
|
|
882
|
-
requirement: {
|
|
883
|
-
kind: "single",
|
|
884
|
-
capability: "doc.render"
|
|
885
|
-
},
|
|
886
|
-
routeKind: "versioned-read",
|
|
887
|
-
cdnCacheable: true
|
|
888
|
-
},
|
|
1111
|
+
"page-render": pageRenderResource("pages"),
|
|
1112
|
+
"page-render-annotations": pageRenderResource("annotations"),
|
|
1113
|
+
"page-render-fields": pageRenderResource("fields"),
|
|
1114
|
+
"page-render-all": pageRenderResource("all"),
|
|
889
1115
|
"page-annotations": {
|
|
890
1116
|
id: "page-annotations",
|
|
891
1117
|
pathPattern: "/v1/docs/{docId}/annotations/pages/*/items@*",
|
|
@@ -912,6 +1138,58 @@ const DOC_RESOURCES = {
|
|
|
912
1138
|
routeKind: "versioned-read",
|
|
913
1139
|
cdnCacheable: true
|
|
914
1140
|
},
|
|
1141
|
+
"annotations-export": {
|
|
1142
|
+
id: "annotations-export",
|
|
1143
|
+
pathPattern: "/v1/docs/{docId}/annotations/export@*",
|
|
1144
|
+
resolvePathPattern: (docId) => `/v1/docs/${docId}/annotations/export@*`,
|
|
1145
|
+
pathPrefix: "/v1/docs/{docId}/annotations/export@",
|
|
1146
|
+
resolvePathPrefix: (docId) => `/v1/docs/${docId}/annotations/export@`,
|
|
1147
|
+
requirement: {
|
|
1148
|
+
kind: "all",
|
|
1149
|
+
capabilities: ["doc.annotate.read", "doc.download"]
|
|
1150
|
+
},
|
|
1151
|
+
routeKind: "versioned-read",
|
|
1152
|
+
cdnCacheable: true
|
|
1153
|
+
},
|
|
1154
|
+
"form-export": {
|
|
1155
|
+
id: "form-export",
|
|
1156
|
+
pathPattern: "/v1/docs/{docId}/form/export@*",
|
|
1157
|
+
resolvePathPattern: (docId) => `/v1/docs/${docId}/form/export@*`,
|
|
1158
|
+
pathPrefix: "/v1/docs/{docId}/form/export@",
|
|
1159
|
+
resolvePathPrefix: (docId) => `/v1/docs/${docId}/form/export@`,
|
|
1160
|
+
requirement: {
|
|
1161
|
+
kind: "all",
|
|
1162
|
+
capabilities: ["doc.forms.read", "doc.download"]
|
|
1163
|
+
},
|
|
1164
|
+
routeKind: "versioned-read",
|
|
1165
|
+
cdnCacheable: true
|
|
1166
|
+
},
|
|
1167
|
+
form: {
|
|
1168
|
+
id: "form",
|
|
1169
|
+
pathPattern: "/v1/docs/{docId}/form@*",
|
|
1170
|
+
resolvePathPattern: (docId) => `/v1/docs/${docId}/form@*`,
|
|
1171
|
+
pathPrefix: "/v1/docs/{docId}/form@",
|
|
1172
|
+
resolvePathPrefix: (docId) => `/v1/docs/${docId}/form@`,
|
|
1173
|
+
requirement: {
|
|
1174
|
+
kind: "single",
|
|
1175
|
+
capability: "doc.forms.read"
|
|
1176
|
+
},
|
|
1177
|
+
routeKind: "versioned-read",
|
|
1178
|
+
cdnCacheable: true
|
|
1179
|
+
},
|
|
1180
|
+
"page-form": {
|
|
1181
|
+
id: "page-form",
|
|
1182
|
+
pathPattern: "/v1/docs/{docId}/form/pages/*/appearances@*",
|
|
1183
|
+
resolvePathPattern: (docId) => `/v1/docs/${docId}/form/pages/*/appearances@*`,
|
|
1184
|
+
pathPrefix: "/v1/docs/{docId}/form/pages/",
|
|
1185
|
+
resolvePathPrefix: (docId) => `/v1/docs/${docId}/form/pages/`,
|
|
1186
|
+
requirement: {
|
|
1187
|
+
kind: "single",
|
|
1188
|
+
capability: "doc.forms.read"
|
|
1189
|
+
},
|
|
1190
|
+
routeKind: "versioned-read",
|
|
1191
|
+
cdnCacheable: true
|
|
1192
|
+
},
|
|
915
1193
|
layout: {
|
|
916
1194
|
id: "layout",
|
|
917
1195
|
pathPattern: "/v1/docs/{docId}/layout@*",
|
|
@@ -938,6 +1216,19 @@ const DOC_RESOURCES = {
|
|
|
938
1216
|
routeKind: "versioned-read",
|
|
939
1217
|
cdnCacheable: true
|
|
940
1218
|
},
|
|
1219
|
+
"metadata-custom": {
|
|
1220
|
+
id: "metadata-custom",
|
|
1221
|
+
pathPattern: "/v1/docs/{docId}/metadata/custom@*",
|
|
1222
|
+
resolvePathPattern: (docId) => `/v1/docs/${docId}/metadata/custom@*`,
|
|
1223
|
+
pathPrefix: "/v1/docs/{docId}/metadata/custom@",
|
|
1224
|
+
resolvePathPrefix: (docId) => `/v1/docs/${docId}/metadata/custom@`,
|
|
1225
|
+
requirement: {
|
|
1226
|
+
kind: "single",
|
|
1227
|
+
capability: "doc.open"
|
|
1228
|
+
},
|
|
1229
|
+
routeKind: "versioned-read",
|
|
1230
|
+
cdnCacheable: true
|
|
1231
|
+
},
|
|
941
1232
|
actions: {
|
|
942
1233
|
id: "actions",
|
|
943
1234
|
pathPattern: "/v1/docs/{docId}/actions@*",
|
|
@@ -977,6 +1268,19 @@ const DOC_RESOURCES = {
|
|
|
977
1268
|
routeKind: "versioned-read",
|
|
978
1269
|
cdnCacheable: true
|
|
979
1270
|
},
|
|
1271
|
+
"layer-metadata-custom": {
|
|
1272
|
+
id: "layer-metadata-custom",
|
|
1273
|
+
pathPattern: "/v1/docs/{docId}/layers/{layerName}/metadata/custom@*",
|
|
1274
|
+
resolvePathPattern: (docId, layerName = "default") => `/v1/docs/${docId}/layers/${layerName}/metadata/custom@*`,
|
|
1275
|
+
pathPrefix: "/v1/docs/{docId}/layers/{layerName}/metadata/custom@",
|
|
1276
|
+
resolvePathPrefix: (docId, layerName = "default") => `/v1/docs/${docId}/layers/${layerName}/metadata/custom@`,
|
|
1277
|
+
requirement: {
|
|
1278
|
+
kind: "single",
|
|
1279
|
+
capability: "doc.open"
|
|
1280
|
+
},
|
|
1281
|
+
routeKind: "versioned-read",
|
|
1282
|
+
cdnCacheable: true
|
|
1283
|
+
},
|
|
980
1284
|
"layer-actions": {
|
|
981
1285
|
id: "layer-actions",
|
|
982
1286
|
pathPattern: "/v1/docs/{docId}/layers/{layerName}/actions@*",
|
|
@@ -1042,32 +1346,10 @@ const DOC_RESOURCES = {
|
|
|
1042
1346
|
routeKind: "versioned-read",
|
|
1043
1347
|
cdnCacheable: true
|
|
1044
1348
|
},
|
|
1045
|
-
"layer-page-render":
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
pathPrefix: "/v1/docs/{docId}/layers/{layerName}/render/pages/",
|
|
1050
|
-
resolvePathPrefix: (docId, layerName = "default") => `/v1/docs/${docId}/layers/${layerName}/render/pages/`,
|
|
1051
|
-
requirement: {
|
|
1052
|
-
kind: "single",
|
|
1053
|
-
capability: "doc.render"
|
|
1054
|
-
},
|
|
1055
|
-
routeKind: "versioned-read",
|
|
1056
|
-
cdnCacheable: true
|
|
1057
|
-
},
|
|
1058
|
-
"layer-page-render-annotated": {
|
|
1059
|
-
id: "layer-page-render-annotated",
|
|
1060
|
-
pathPattern: "/v1/docs/{docId}/layers/{layerName}/render/annotated/pages/*/data@*",
|
|
1061
|
-
resolvePathPattern: (docId, layerName = "default") => `/v1/docs/${docId}/layers/${layerName}/render/annotated/pages/*/data@*`,
|
|
1062
|
-
pathPrefix: "/v1/docs/{docId}/layers/{layerName}/render/annotated/pages/",
|
|
1063
|
-
resolvePathPrefix: (docId, layerName = "default") => `/v1/docs/${docId}/layers/${layerName}/render/annotated/pages/`,
|
|
1064
|
-
requirement: {
|
|
1065
|
-
kind: "single",
|
|
1066
|
-
capability: "doc.render"
|
|
1067
|
-
},
|
|
1068
|
-
routeKind: "versioned-read",
|
|
1069
|
-
cdnCacheable: true
|
|
1070
|
-
},
|
|
1349
|
+
"layer-page-render": layerPageRenderResource("pages"),
|
|
1350
|
+
"layer-page-render-annotations": layerPageRenderResource("annotations"),
|
|
1351
|
+
"layer-page-render-fields": layerPageRenderResource("fields"),
|
|
1352
|
+
"layer-page-render-all": layerPageRenderResource("all"),
|
|
1071
1353
|
"page-text": {
|
|
1072
1354
|
id: "page-text",
|
|
1073
1355
|
pathPattern: "/v1/docs/{docId}/text/pages/*/data@*",
|
|
@@ -1159,6 +1441,19 @@ const DOC_RESOURCES = {
|
|
|
1159
1441
|
routeKind: "versioned-read",
|
|
1160
1442
|
cdnCacheable: true
|
|
1161
1443
|
},
|
|
1444
|
+
"layer-annotations-export": {
|
|
1445
|
+
id: "layer-annotations-export",
|
|
1446
|
+
pathPattern: "/v1/docs/{docId}/layers/{layerName}/annotations/export@*",
|
|
1447
|
+
resolvePathPattern: (docId, layerName = "default") => `/v1/docs/${docId}/layers/${layerName}/annotations/export@*`,
|
|
1448
|
+
pathPrefix: "/v1/docs/{docId}/layers/{layerName}/annotations/export@",
|
|
1449
|
+
resolvePathPrefix: (docId, layerName = "default") => `/v1/docs/${docId}/layers/${layerName}/annotations/export@`,
|
|
1450
|
+
requirement: {
|
|
1451
|
+
kind: "all",
|
|
1452
|
+
capabilities: ["doc.annotate.read", "doc.download"]
|
|
1453
|
+
},
|
|
1454
|
+
routeKind: "versioned-read",
|
|
1455
|
+
cdnCacheable: true
|
|
1456
|
+
},
|
|
1162
1457
|
"layer-annotations-all": {
|
|
1163
1458
|
id: "layer-annotations-all",
|
|
1164
1459
|
pathPattern: "/v1/docs/{docId}/layers/{layerName}/annotations/items@*",
|
|
@@ -1172,6 +1467,45 @@ const DOC_RESOURCES = {
|
|
|
1172
1467
|
routeKind: "versioned-read",
|
|
1173
1468
|
cdnCacheable: true
|
|
1174
1469
|
},
|
|
1470
|
+
"layer-form-export": {
|
|
1471
|
+
id: "layer-form-export",
|
|
1472
|
+
pathPattern: "/v1/docs/{docId}/layers/{layerName}/form/export@*",
|
|
1473
|
+
resolvePathPattern: (docId, layerName = "default") => `/v1/docs/${docId}/layers/${layerName}/form/export@*`,
|
|
1474
|
+
pathPrefix: "/v1/docs/{docId}/layers/{layerName}/form/export@",
|
|
1475
|
+
resolvePathPrefix: (docId, layerName = "default") => `/v1/docs/${docId}/layers/${layerName}/form/export@`,
|
|
1476
|
+
requirement: {
|
|
1477
|
+
kind: "all",
|
|
1478
|
+
capabilities: ["doc.forms.read", "doc.download"]
|
|
1479
|
+
},
|
|
1480
|
+
routeKind: "versioned-read",
|
|
1481
|
+
cdnCacheable: true
|
|
1482
|
+
},
|
|
1483
|
+
"layer-form": {
|
|
1484
|
+
id: "layer-form",
|
|
1485
|
+
pathPattern: "/v1/docs/{docId}/layers/{layerName}/form@*",
|
|
1486
|
+
resolvePathPattern: (docId, layerName = "default") => `/v1/docs/${docId}/layers/${layerName}/form@*`,
|
|
1487
|
+
pathPrefix: "/v1/docs/{docId}/layers/{layerName}/form@",
|
|
1488
|
+
resolvePathPrefix: (docId, layerName = "default") => `/v1/docs/${docId}/layers/${layerName}/form@`,
|
|
1489
|
+
requirement: {
|
|
1490
|
+
kind: "single",
|
|
1491
|
+
capability: "doc.forms.read"
|
|
1492
|
+
},
|
|
1493
|
+
routeKind: "versioned-read",
|
|
1494
|
+
cdnCacheable: true
|
|
1495
|
+
},
|
|
1496
|
+
"layer-page-form": {
|
|
1497
|
+
id: "layer-page-form",
|
|
1498
|
+
pathPattern: "/v1/docs/{docId}/layers/{layerName}/form/pages/*/appearances@*",
|
|
1499
|
+
resolvePathPattern: (docId, layerName = "default") => `/v1/docs/${docId}/layers/${layerName}/form/pages/*/appearances@*`,
|
|
1500
|
+
pathPrefix: "/v1/docs/{docId}/layers/{layerName}/form/pages/",
|
|
1501
|
+
resolvePathPrefix: (docId, layerName = "default") => `/v1/docs/${docId}/layers/${layerName}/form/pages/`,
|
|
1502
|
+
requirement: {
|
|
1503
|
+
kind: "single",
|
|
1504
|
+
capability: "doc.forms.read"
|
|
1505
|
+
},
|
|
1506
|
+
routeKind: "versioned-read",
|
|
1507
|
+
cdnCacheable: true
|
|
1508
|
+
},
|
|
1175
1509
|
"download-current": {
|
|
1176
1510
|
id: "download-current",
|
|
1177
1511
|
pathPattern: "/v1/docs/{docId}/layers/{layerName}/download",
|
|
@@ -1318,15 +1652,14 @@ function checkResourceAccess(resourceId, rawScope, pdfBits) {
|
|
|
1318
1652
|
* `requirement` at the origin route, but the CDN never gets a
|
|
1319
1653
|
* credential for them.
|
|
1320
1654
|
*
|
|
1321
|
-
* The URL
|
|
1322
|
-
*
|
|
1323
|
-
*
|
|
1324
|
-
*
|
|
1325
|
-
* never text or annotations.
|
|
1655
|
+
* The URL layout gives each cacheable resource type a distinct prefix,
|
|
1656
|
+
* so prefix-matching adapters get per-resource scope enforcement at the
|
|
1657
|
+
* edge — a Bunny token signed at `/v1/docs/{id}/render/pages/` can only
|
|
1658
|
+
* authorize render bytes, never text or annotations.
|
|
1326
1659
|
*/
|
|
1327
1660
|
/**
|
|
1328
|
-
* Plane map: the planes each
|
|
1329
|
-
* layer token's edge credential covers a resource's prefix iff
|
|
1661
|
+
* Plane map: the planes each doc-level shared resource depends on. A
|
|
1662
|
+
* layer token's edge credential covers a resource's prefix iff every listed
|
|
1330
1663
|
* plane is inherited (`'base'`) in the caller's scopes — the same condition
|
|
1331
1664
|
* the origin guard enforces (origin is the truth; this grant is the
|
|
1332
1665
|
* TTL-bounded optimization). Resources absent from this map (head, manifest,
|
|
@@ -1341,14 +1674,20 @@ function checkResourceAccess(resourceId, rawScope, pdfBits) {
|
|
|
1341
1674
|
* as every edge grant.
|
|
1342
1675
|
*/
|
|
1343
1676
|
const RESOURCE_PLANES = {
|
|
1344
|
-
"page-render":
|
|
1677
|
+
"page-render": PAGE_RENDER_FAMILIES.pages.planes,
|
|
1678
|
+
"page-render-annotations": PAGE_RENDER_FAMILIES.annotations.planes,
|
|
1679
|
+
"page-render-fields": PAGE_RENDER_FAMILIES.fields.planes,
|
|
1680
|
+
"page-render-all": PAGE_RENDER_FAMILIES.all.planes,
|
|
1345
1681
|
"page-text": ["content"],
|
|
1346
1682
|
"page-geometry": ["content"],
|
|
1347
|
-
"page-render-annotated": ["content", "annotations"],
|
|
1348
1683
|
"page-annotations": ["annotations"],
|
|
1349
1684
|
"annotations-all": ["annotations"],
|
|
1685
|
+
form: ["forms"],
|
|
1686
|
+
"page-form": ["forms"],
|
|
1687
|
+
"annotations-export": ["annotations", "layout"],
|
|
1350
1688
|
layout: ["layout"],
|
|
1351
1689
|
metadata: ["metadata"],
|
|
1690
|
+
"metadata-custom": ["metadata"],
|
|
1352
1691
|
actions: ["actions"],
|
|
1353
1692
|
attachments: ["attachments"],
|
|
1354
1693
|
"attachment-files": ["attachments"]
|
|
@@ -1378,11 +1717,11 @@ function cdnCoverageForScope(rawScope, pdfBits, context) {
|
|
|
1378
1717
|
* effects to attach. Used by both:
|
|
1379
1718
|
* - the @cloudpdf/engine HttpClient (to actually route requests through
|
|
1380
1719
|
* the CDN edge when an /access response says it can)
|
|
1381
|
-
* - the smoke/diagnostic inspector (to
|
|
1720
|
+
* - the smoke/diagnostic inspector (to preview what the SDK would do
|
|
1382
1721
|
* for a given path, with no network)
|
|
1383
1722
|
*
|
|
1384
1723
|
* Keeping this in engine-core means cloud-side request routing and
|
|
1385
|
-
* server-side test fixtures use the
|
|
1724
|
+
* server-side test fixtures use the same algorithm. If a regression
|
|
1386
1725
|
* sneaks in, both ends break together.
|
|
1387
1726
|
*
|
|
1388
1727
|
* Selection rules
|
|
@@ -1396,7 +1735,7 @@ function cdnCoverageForScope(rawScope, pdfBits, context) {
|
|
|
1396
1735
|
* origin — that's how scope narrowing works at the edge: the
|
|
1397
1736
|
* server only emits overrides for resources the caller's scope
|
|
1398
1737
|
* grants.
|
|
1399
|
-
* 3. Find the
|
|
1738
|
+
* 3. Find the longest-matching `signedPathPolicies` entry (its
|
|
1400
1739
|
* `pathPrefix` is a prefix of the request path). Append its
|
|
1401
1740
|
* `queryParams`. No match falls back to `signedQueryParams` if
|
|
1402
1741
|
* the adapter emitted a global token.
|
|
@@ -1457,8 +1796,8 @@ function applyCdnAccess(input) {
|
|
|
1457
1796
|
* is a (longest) prefix of `path`. Returns null when no resource
|
|
1458
1797
|
* matches — admin routes, /access, /warm fall into this bucket.
|
|
1459
1798
|
*
|
|
1460
|
-
* Each cacheable resource has a
|
|
1461
|
-
*
|
|
1799
|
+
* Each cacheable resource has a distinct prefix, so longest-match is
|
|
1800
|
+
* deterministic.
|
|
1462
1801
|
*/
|
|
1463
1802
|
function resolveResourceIdForPath(path, docId, layerName) {
|
|
1464
1803
|
let best = null;
|
|
@@ -1540,33 +1879,22 @@ function unflatten(flat) {
|
|
|
1540
1879
|
/**
|
|
1541
1880
|
* Project image render options plus cache versions into the flat wire shape
|
|
1542
1881
|
* the render token encoder consumes. The output is a generic dotted-key map
|
|
1543
|
-
* (`viewport.kind`, `target.rect.
|
|
1882
|
+
* (`viewport.kind`, `target.rect.x`, …) — the schema and codec never need
|
|
1544
1883
|
* to know about specific option fields. Adding a new render option means
|
|
1545
1884
|
* extending `PageImageOptions`, the render query schemas, and
|
|
1546
1885
|
* `RenderTokenSchema.fields`; this function does not change.
|
|
1547
1886
|
*
|
|
1548
|
-
*
|
|
1549
|
-
*
|
|
1550
|
-
*
|
|
1551
|
-
*
|
|
1552
|
-
*
|
|
1553
|
-
* (`…/render/pages/` vs `…/render/annotated/pages/`) and passes
|
|
1554
|
-
* `annotationVersion` iff it chose the annotated one. Contradictory states
|
|
1555
|
-
* are unrepresentable; each family's query schema enforces its own pin
|
|
1556
|
-
* grammar structurally.
|
|
1557
|
-
*
|
|
1558
|
-
* Semantic validation (viewport-kind invariants, per-family pin presence,
|
|
1559
|
-
* rect coherence) lives in `PageRenderQuerySchema` /
|
|
1560
|
-
* `PageRenderAnnotatedQuerySchema` and runs when the resulting URL is
|
|
1561
|
-
* decoded server-side. Round-tripping (flatten → encode → decode →
|
|
1562
|
-
* unflatten → schema parse) recovers the original SDK options.
|
|
1887
|
+
* What the picture draws is never in the token: the caller picks the
|
|
1888
|
+
* family's path (`PAGE_RENDER_FAMILIES`) and passes that family's pins.
|
|
1889
|
+
* Each family's query schema checks its own pins when the URL is decoded
|
|
1890
|
+
* server-side. Round-tripping (flatten → encode → decode → unflatten →
|
|
1891
|
+
* schema parse) recovers the original SDK options.
|
|
1563
1892
|
*/
|
|
1564
1893
|
function renderImageOptionsToWire(options, versions) {
|
|
1565
|
-
const { includeAnnotations:
|
|
1894
|
+
const { includeAnnotations: _inThePath, includeFormFields: _alsoInThePath, ...wireOptions } = options;
|
|
1566
1895
|
return flatten({
|
|
1567
1896
|
...wireOptions,
|
|
1568
|
-
|
|
1569
|
-
...versions.annotationVersion !== void 0 ? { annotationVersion: versions.annotationVersion } : {}
|
|
1897
|
+
...versions
|
|
1570
1898
|
});
|
|
1571
1899
|
}
|
|
1572
1900
|
/**
|
|
@@ -1577,17 +1905,18 @@ function renderImageOptionsToToken(options, versions) {
|
|
|
1577
1905
|
return encodeRenderToken(renderImageOptionsToWire(options, versions));
|
|
1578
1906
|
}
|
|
1579
1907
|
/**
|
|
1580
|
-
*
|
|
1581
|
-
*
|
|
1582
|
-
*
|
|
1908
|
+
* The worker-side `PageRenderOptions` of a parsed picture request: the
|
|
1909
|
+
* render options, and what its family draws (stamped by the family's query
|
|
1910
|
+
* schema). Pure shape transform; image encoding stays out.
|
|
1583
1911
|
*/
|
|
1584
|
-
function pageRenderOptionsFromImageOptions(options
|
|
1912
|
+
function pageRenderOptionsFromImageOptions(options) {
|
|
1585
1913
|
return {
|
|
1586
1914
|
...options.target ? { target: options.target } : {},
|
|
1587
1915
|
...options.viewport ? { viewport: options.viewport } : {},
|
|
1588
1916
|
...options.rotation !== void 0 ? { rotation: options.rotation } : {},
|
|
1589
1917
|
...options.background !== void 0 ? { background: options.background } : {},
|
|
1590
|
-
includeAnnotations
|
|
1918
|
+
includeAnnotations: options.includeAnnotations ?? false,
|
|
1919
|
+
includeFormFields: options.includeFormFields ?? false
|
|
1591
1920
|
};
|
|
1592
1921
|
}
|
|
1593
1922
|
/**
|
|
@@ -1596,15 +1925,33 @@ function pageRenderOptionsFromImageOptions(options, includeAnnotations) {
|
|
|
1596
1925
|
* Mirrors {@link renderImageOptionsToWire}.
|
|
1597
1926
|
*/
|
|
1598
1927
|
function annotationAppearancesImageOptionsToWire(options, versions) {
|
|
1599
|
-
return
|
|
1600
|
-
...options,
|
|
1601
|
-
annotationVersion: versions.annotationVersion
|
|
1602
|
-
});
|
|
1928
|
+
return appearancesToWire(options, { annotationVersion: versions.annotationVersion });
|
|
1603
1929
|
}
|
|
1604
1930
|
/** Convenience: build the full encoded appearance render token in one call. */
|
|
1605
1931
|
function annotationAppearancesImageOptionsToToken(options, versions) {
|
|
1606
1932
|
return encodeAnnotationAppearancesRenderToken(annotationAppearancesImageOptionsToWire(options, versions));
|
|
1607
1933
|
}
|
|
1934
|
+
/** The widget twin of {@link annotationAppearancesImageOptionsToWire}. */
|
|
1935
|
+
function widgetAppearancesImageOptionsToWire(options, versions) {
|
|
1936
|
+
return appearancesToWire(options, { widgetVersion: versions.widgetVersion });
|
|
1937
|
+
}
|
|
1938
|
+
/** The widget twin of {@link annotationAppearancesImageOptionsToToken}. */
|
|
1939
|
+
function widgetAppearancesImageOptionsToToken(options, versions) {
|
|
1940
|
+
return encodeWidgetAppearancesRenderToken(widgetAppearancesImageOptionsToWire(options, versions));
|
|
1941
|
+
}
|
|
1942
|
+
/**
|
|
1943
|
+
* Appearance options and a pin, flat. `modes` only when it asks for fewer
|
|
1944
|
+
* than every mode, as one value, so every request for all of them is one URL.
|
|
1945
|
+
*/
|
|
1946
|
+
function appearancesToWire(options, pin) {
|
|
1947
|
+
const { modes, ...rest } = options;
|
|
1948
|
+
const asked = appearanceModesOf(modes);
|
|
1949
|
+
return flatten({
|
|
1950
|
+
...rest,
|
|
1951
|
+
...asked ? { modes: encodeAppearanceModes(asked) } : {},
|
|
1952
|
+
...pin
|
|
1953
|
+
});
|
|
1954
|
+
}
|
|
1608
1955
|
/**
|
|
1609
1956
|
* Strip image-encoding fields, leaving the worker-side
|
|
1610
1957
|
* `AnnotationAppearanceRenderOptions`. Pure shape transform consumed by the
|
|
@@ -1613,12 +1960,251 @@ function annotationAppearancesImageOptionsToToken(options, versions) {
|
|
|
1613
1960
|
*/
|
|
1614
1961
|
function annotationRenderOptionsFromImageOptions(options) {
|
|
1615
1962
|
return {
|
|
1616
|
-
...options.
|
|
1963
|
+
...options.viewport ? { viewport: options.viewport } : {},
|
|
1617
1964
|
...options.rotation !== void 0 ? { rotation: options.rotation } : {},
|
|
1618
1965
|
...options.modes ? { modes: options.modes } : {}
|
|
1619
1966
|
};
|
|
1620
1967
|
}
|
|
1621
1968
|
//#endregion
|
|
1622
|
-
|
|
1969
|
+
//#region src/wire/changeSchemas.ts
|
|
1970
|
+
/**
|
|
1971
|
+
* `POST /v1/docs/{docId}/layers/{layerName}/changes`: a request's changes and
|
|
1972
|
+
* their answers. A change's bytes (a stamp's drawing, an attached file, a
|
|
1973
|
+
* signature's artwork) travel as multipart parts beside the JSON
|
|
1974
|
+
* (`resource:{key}`), which names them by key where the change takes them.
|
|
1975
|
+
*/
|
|
1976
|
+
/** An op's id for its change: 1 to 255 visible ASCII characters, as `opId` always is. */
|
|
1977
|
+
const OpIdSchema = z.string().regex(/^[\x21-\x7e]{1,255}$/);
|
|
1978
|
+
const FormFieldDisplaySchema = z.enum([
|
|
1979
|
+
"visible",
|
|
1980
|
+
"hidden",
|
|
1981
|
+
"noPrint",
|
|
1982
|
+
"noView"
|
|
1983
|
+
]);
|
|
1984
|
+
/** One op of a change, as the request sends it. */
|
|
1985
|
+
const ChangeOpWireSchema = z.discriminatedUnion("type", [
|
|
1986
|
+
z.object({
|
|
1987
|
+
type: z.literal("annotations.create"),
|
|
1988
|
+
page: PageRefSchema,
|
|
1989
|
+
data: AnnotationDraftSchema,
|
|
1990
|
+
objectNumber: z.number().int().positive().optional(),
|
|
1991
|
+
resources: AnnotationResourceKeysSchema.optional()
|
|
1992
|
+
}),
|
|
1993
|
+
z.object({
|
|
1994
|
+
type: z.literal("annotations.update"),
|
|
1995
|
+
ref: AnnotationRefSchema,
|
|
1996
|
+
patch: AnnotationPatchSchema,
|
|
1997
|
+
resources: AnnotationResourceKeysSchema.optional(),
|
|
1998
|
+
expect: AnnotationPatchSchema.optional()
|
|
1999
|
+
}),
|
|
2000
|
+
z.object({
|
|
2001
|
+
type: z.literal("annotations.delete"),
|
|
2002
|
+
ref: AnnotationRefSchema,
|
|
2003
|
+
expect: AnnotationPatchSchema.optional()
|
|
2004
|
+
}),
|
|
2005
|
+
z.object({
|
|
2006
|
+
type: z.literal("annotations.reorder"),
|
|
2007
|
+
page: PageRefSchema,
|
|
2008
|
+
refs: z.array(AnnotationRefSchema).min(1),
|
|
2009
|
+
position: AnnotationPositionSchema
|
|
2010
|
+
}),
|
|
2011
|
+
z.object({
|
|
2012
|
+
type: z.literal("forms.setValue"),
|
|
2013
|
+
field: FormFieldRefSchema,
|
|
2014
|
+
value: FormFieldValueSchema,
|
|
2015
|
+
expect: FormFieldValueSchema.optional()
|
|
2016
|
+
}),
|
|
2017
|
+
z.object({
|
|
2018
|
+
type: z.literal("forms.setDisplay"),
|
|
2019
|
+
field: FormFieldRefSchema,
|
|
2020
|
+
display: FormFieldDisplaySchema
|
|
2021
|
+
}),
|
|
2022
|
+
z.object({
|
|
2023
|
+
type: z.literal("forms.setAppearanceText"),
|
|
2024
|
+
field: FormFieldRefSchema,
|
|
2025
|
+
text: z.string()
|
|
2026
|
+
}),
|
|
2027
|
+
z.object({
|
|
2028
|
+
type: z.literal("forms.reset"),
|
|
2029
|
+
fields: z.array(FormFieldRefSchema).optional()
|
|
2030
|
+
}),
|
|
2031
|
+
z.object({
|
|
2032
|
+
type: z.literal("forms.create"),
|
|
2033
|
+
draft: FormFieldDraftSchema,
|
|
2034
|
+
objectNumber: z.number().int().positive().optional(),
|
|
2035
|
+
widgetObjectNumbers: z.array(z.number().int().positive()).optional()
|
|
2036
|
+
}),
|
|
2037
|
+
z.object({
|
|
2038
|
+
type: z.literal("forms.update"),
|
|
2039
|
+
field: FormFieldRefSchema,
|
|
2040
|
+
patch: FormFieldPatchSchema,
|
|
2041
|
+
expect: FormFieldPatchSchema.optional()
|
|
2042
|
+
}),
|
|
2043
|
+
z.object({
|
|
2044
|
+
type: z.literal("forms.delete"),
|
|
2045
|
+
field: FormFieldRefSchema,
|
|
2046
|
+
expect: FormFieldPatchSchema.optional()
|
|
2047
|
+
}),
|
|
2048
|
+
z.object({
|
|
2049
|
+
type: z.literal("forms.addWidget"),
|
|
2050
|
+
field: FormFieldRefSchema,
|
|
2051
|
+
placement: WidgetPlacementSchema,
|
|
2052
|
+
objectNumber: z.number().int().positive().optional(),
|
|
2053
|
+
splitObjectNumber: z.number().int().positive().optional()
|
|
2054
|
+
}),
|
|
2055
|
+
z.object({
|
|
2056
|
+
type: z.literal("forms.removeWidget"),
|
|
2057
|
+
field: FormFieldRefSchema,
|
|
2058
|
+
widget: AnnotationRefSchema
|
|
2059
|
+
}),
|
|
2060
|
+
z.object({
|
|
2061
|
+
type: z.literal("forms.deleteWidget"),
|
|
2062
|
+
widget: AnnotationRefSchema,
|
|
2063
|
+
expect: WidgetPatchSchema.optional()
|
|
2064
|
+
}),
|
|
2065
|
+
z.object({
|
|
2066
|
+
type: z.literal("forms.reorderCalculations"),
|
|
2067
|
+
fields: z.array(FormFieldRefSchema).min(1),
|
|
2068
|
+
position: FieldPositionSchema
|
|
2069
|
+
}),
|
|
2070
|
+
z.object({
|
|
2071
|
+
type: z.literal("forms.reorderWidgets"),
|
|
2072
|
+
page: PageRefSchema,
|
|
2073
|
+
widgets: z.array(AnnotationRefSchema).min(1),
|
|
2074
|
+
position: AnnotationPositionSchema
|
|
2075
|
+
}),
|
|
2076
|
+
z.object({
|
|
2077
|
+
type: z.literal("forms.updateWidget"),
|
|
2078
|
+
widget: AnnotationRefSchema,
|
|
2079
|
+
patch: WidgetPatchSchema,
|
|
2080
|
+
expect: WidgetPatchSchema.optional()
|
|
2081
|
+
}),
|
|
2082
|
+
z.object({
|
|
2083
|
+
type: z.literal("forms.setSignatureAppearance"),
|
|
2084
|
+
field: FormFieldRefSchema,
|
|
2085
|
+
/** The one-page PDF drawn in, as the key of its multipart part. */
|
|
2086
|
+
resources: AppearanceResourceKeysSchema
|
|
2087
|
+
}),
|
|
2088
|
+
z.object({
|
|
2089
|
+
type: z.literal("metadata.update"),
|
|
2090
|
+
patch: MetadataPatchSchema,
|
|
2091
|
+
expect: MetadataPatchSchema.optional()
|
|
2092
|
+
}),
|
|
2093
|
+
z.object({
|
|
2094
|
+
type: z.literal("metadata.updateCustom"),
|
|
2095
|
+
patch: CustomMetadataPatchSchema
|
|
2096
|
+
})
|
|
2097
|
+
]);
|
|
2098
|
+
/**
|
|
2099
|
+
* One change of a request: its `ops`, or `undoOf`, the undo of an earlier
|
|
2100
|
+
* change. One object with exactly one of the two, so the wire has no untagged
|
|
2101
|
+
* union (the API reference labels variants by a discriminating literal).
|
|
2102
|
+
*/
|
|
2103
|
+
const ChangeEntryWireSchema = z.object({
|
|
2104
|
+
opId: OpIdSchema,
|
|
2105
|
+
ops: z.array(ChangeOpWireSchema).optional(),
|
|
2106
|
+
undoOf: OpIdSchema.optional()
|
|
2107
|
+
}).strict().refine((entry) => entry.ops === void 0 !== (entry.undoOf === void 0), { message: "exactly one of ops or undoOf" });
|
|
2108
|
+
/** What a request may hold. */
|
|
2109
|
+
const CHANGE_REQUEST_LIMITS = {
|
|
2110
|
+
/** Changes per request. */
|
|
2111
|
+
changes: 64,
|
|
2112
|
+
/** Ops per change. */
|
|
2113
|
+
ops: 512
|
|
2114
|
+
};
|
|
2115
|
+
/** A `POST …/changes` body: the changes, applied in order, each on its own. */
|
|
2116
|
+
const ChangeRequestSchema = z.object({ changes: z.array(ChangeEntryWireSchema).min(1).max(CHANGE_REQUEST_LIMITS.changes) });
|
|
2117
|
+
/** What an item can be: an op's type, or a restore (only in an undo). */
|
|
2118
|
+
const ChangeItemTypeSchema = z.enum([
|
|
2119
|
+
...ChangeOpWireSchema.options.map((op) => op.shape.type.value),
|
|
2120
|
+
"annotations.restore",
|
|
2121
|
+
"forms.restore"
|
|
2122
|
+
]);
|
|
2123
|
+
/** What an undo left alone, by name. */
|
|
2124
|
+
const SkippedFieldsSchema = z.array(z.string()).optional();
|
|
2125
|
+
/** An item of `type`: its verb's result, after the type and what else the item adds. */
|
|
2126
|
+
function itemOf(type, result, extra = {}) {
|
|
2127
|
+
return z.object({
|
|
2128
|
+
type: z.literal(type),
|
|
2129
|
+
...extra
|
|
2130
|
+
}).merge(result);
|
|
2131
|
+
}
|
|
2132
|
+
/**
|
|
2133
|
+
* One item of a change's result: what one op did, or that an undo left it
|
|
2134
|
+
* alone (`skipped`). Every item names itself by `type`.
|
|
2135
|
+
*/
|
|
2136
|
+
const ChangeItemSchema = z.union([
|
|
2137
|
+
z.object({
|
|
2138
|
+
type: z.literal("skipped"),
|
|
2139
|
+
/** The item it would have been. */
|
|
2140
|
+
op: ChangeItemTypeSchema,
|
|
2141
|
+
meta: MutationMetaSchema
|
|
2142
|
+
}),
|
|
2143
|
+
itemOf("annotations.create", AnnotationCreateResultSchema, { page: PageRefSchema }),
|
|
2144
|
+
itemOf("annotations.update", AnnotationUpdateResultSchema, {
|
|
2145
|
+
page: PageRefSchema,
|
|
2146
|
+
skipped: SkippedFieldsSchema
|
|
2147
|
+
}),
|
|
2148
|
+
itemOf("annotations.delete", AnnotationDeleteResultSchema, { page: PageRefSchema }),
|
|
2149
|
+
itemOf("annotations.reorder", AnnotationReorderResultSchema, { page: PageRefSchema }),
|
|
2150
|
+
z.object({
|
|
2151
|
+
type: z.literal("annotations.restore"),
|
|
2152
|
+
page: PageRefSchema,
|
|
2153
|
+
annotations: z.array(AnnotationSchema),
|
|
2154
|
+
meta: AnnotationListMutationMetaSchema
|
|
2155
|
+
}),
|
|
2156
|
+
itemOf("forms.setValue", FormSetValueResultSchema),
|
|
2157
|
+
itemOf("forms.setDisplay", FormFieldUpdateResultSchema),
|
|
2158
|
+
itemOf("forms.setAppearanceText", FormFieldUpdateResultSchema),
|
|
2159
|
+
itemOf("forms.reset", FormResetResultSchema, { skipped: SkippedFieldsSchema }),
|
|
2160
|
+
itemOf("forms.create", FormFieldCreateResultSchema),
|
|
2161
|
+
itemOf("forms.update", FormFieldUpdateResultSchema, { skipped: SkippedFieldsSchema }),
|
|
2162
|
+
itemOf("forms.delete", FormFieldDeleteResultSchema),
|
|
2163
|
+
z.object({
|
|
2164
|
+
type: z.literal("forms.restore"),
|
|
2165
|
+
field: FormFieldDTOSchema,
|
|
2166
|
+
widgets: z.array(WidgetDTOSchema),
|
|
2167
|
+
meta: FormMutationMetaSchema
|
|
2168
|
+
}),
|
|
2169
|
+
itemOf("forms.setSignatureAppearance", FormFieldUpdateResultSchema),
|
|
2170
|
+
itemOf("forms.addWidget", FormWidgetLinkResultSchema),
|
|
2171
|
+
itemOf("forms.removeWidget", FormWidgetLinkResultSchema),
|
|
2172
|
+
itemOf("forms.deleteWidget", FormWidgetDeleteResultSchema),
|
|
2173
|
+
itemOf("forms.restoreWidget", FormWidgetRestoreResultSchema),
|
|
2174
|
+
itemOf("forms.reorderWidgets", FormWidgetsReorderResultSchema),
|
|
2175
|
+
itemOf("forms.reorderCalculations", FormCalculationsReorderResultSchema),
|
|
2176
|
+
itemOf("forms.updateWidget", FormWidgetUpdateResultSchema, { skipped: SkippedFieldsSchema }),
|
|
2177
|
+
itemOf("metadata.update", MetadataUpdateResultSchema, { skipped: SkippedFieldsSchema }),
|
|
2178
|
+
itemOf("metadata.updateCustom", CustomMetadataUpdateResultSchema, { skipped: SkippedFieldsSchema })
|
|
2179
|
+
]);
|
|
2180
|
+
/** What a change did: one item per op (per step of an undo), and its meta. */
|
|
2181
|
+
const ChangeResultSchema = z.object({
|
|
2182
|
+
items: z.array(ChangeItemSchema),
|
|
2183
|
+
meta: MutationMetaSchema
|
|
2184
|
+
});
|
|
2185
|
+
/** One change's answer: applied with its result, or refused with the error. */
|
|
2186
|
+
const ChangeAnswerSchema = z.discriminatedUnion("status", [z.object({
|
|
2187
|
+
opId: z.string(),
|
|
2188
|
+
status: z.literal("applied"),
|
|
2189
|
+
result: ChangeResultSchema
|
|
2190
|
+
}), z.object({
|
|
2191
|
+
opId: z.string(),
|
|
2192
|
+
status: z.literal("refused"),
|
|
2193
|
+
error: EngineErrorPayloadSchema
|
|
2194
|
+
})]);
|
|
2195
|
+
/** A `POST …/changes` response: one answer per change, in order. */
|
|
2196
|
+
const ChangeResponseSchema = z.object({ changes: z.array(ChangeAnswerSchema) });
|
|
2197
|
+
/**
|
|
2198
|
+
* Stable public component names for the change wire model, so an OpenAPI
|
|
2199
|
+
* projection names an op, an item and a result once, like
|
|
2200
|
+
* `AnnotationWireComponents`.
|
|
2201
|
+
*/
|
|
2202
|
+
const ChangeWireComponents = {
|
|
2203
|
+
ChangeOp: ChangeOpWireSchema,
|
|
2204
|
+
ChangeItem: ChangeItemSchema,
|
|
2205
|
+
ChangeResult: ChangeResultSchema
|
|
2206
|
+
};
|
|
2207
|
+
//#endregion
|
|
2208
|
+
export { ANNOTATION_KINDS, AccessRequestSchema, AccessResponseSchema, ActionsTokenSchema, AnnotationAppearanceBatchSchema, AnnotationAppearanceExportInputSchema, AnnotationAppearancesQuerySchema, AnnotationAppearancesRenderTokenSchema, AnnotationBorderStyleSchema, AnnotationCreateResultSchema, AnnotationDeleteResultSchema, AnnotationDraftSchema, AnnotationExportSelectionSchema, AnnotationFlattenInputSchema, AnnotationFlattenResultSchema, AnnotationImportBodySchema, AnnotationImportOptionsSchema, AnnotationImportResultSchema, AnnotationListMutationMetaSchema, AnnotationListSchema, AnnotationPatchSchema, AnnotationPositionSchema, AnnotationRefSchema, AnnotationReorderBodySchema, AnnotationReorderResultSchema, AnnotationResourceKeysSchema, AnnotationSchema, AnnotationTokenSchema, AnnotationUpdateResultSchema, AnnotationWireComponents, AnnotationsExportRequestSchema, AppearanceOutcomeSchema, AppearanceResourceKeysSchema, AttachmentCreateResultSchema, AttachmentDeleteResultSchema, AttachmentFileInfoSchema, AttachmentListSchema, AttachmentMutationMetaSchema, AttachmentRefSchema, AttachmentSchema, BaseVersionInfoSchema, BlendModeSchema, BundleLimitsSchema, ByteRangeSchema, CHANGE_REQUEST_LIMITS, CacheDeltaSchema, CachePinsSchema, CalloutLineSchema, CaretDTOSchema, CaretDraftSchema, CaretIntentSchema, CaretPatchSchema, ChangeAnalysisSchema, ChangeAnswerSchema, ChangeEntryWireSchema, ChangeItemSchema, ChangeOpWireSchema, ChangeRequestSchema, ChangeResponseSchema, ChangeResultSchema, ChangeWireComponents, CircleDTOSchema, CircleDraftSchema, CirclePatchSchema, ColorSchema, ContentTokenSchema, CustomMetadataPatchSchema, CustomMetadataSchema, CustomMetadataUpdateResultSchema, DEFAULT_LAYER_NAME, DOC_RESOURCES, DateInputSchema, DigestAlgorithmSchema, DocTokenSchema, DocumentActionsSnapshotSchema, DocumentHeadSchema, DocumentManifestSchema, DocumentMetadataSchema, DocumentProtectionSchema, DocumentSecurityStateSchema, DocumentVersionRefSchema, DocumentVersionSchema, DocumentVersionsSchema, DocumentWireComponents, DrawnBorderStyleSchema, EditSessionAccessSchema, EditSessionStatusSchema, EngineErrorPayloadSchema, FieldActionsPatchSchema, FieldLockSpecSchema, FieldPositionSchema, FieldScriptWriteSchema, FileAttachmentDTOSchema, FileAttachmentDraftSchema, FileAttachmentIconSchema, FileAttachmentPatchSchema, FileResourceKeysSchema, FileWidgetActionsPatchSchema, FormCalculationsReorderBodySchema, FormCalculationsReorderResultSchema, FormExportRequestSchema, FormExportSelectionSchema, FormFieldCreateResultSchema, FormFieldDTOSchema, FormFieldDeleteResultSchema, FormFieldDraftSchema, FormFieldOptionInputSchema, FormFieldOptionSchema, FormFieldPatchSchema, FormFieldRefSchema, FormFieldUpdateResultSchema, FormFieldValueSchema, FormImportBodySchema, FormImportOptionsSchema, FormImportResultSchema, FormKindSchema, FormMutationMetaSchema, FormRepairResultSchema, FormResetBodySchema, FormResetResultSchema, FormSetValueResultSchema, FormSnapshotSchema, FormSubmissionEntrySchema, FormSubmissionReceiptSchema, FormSubmissionRequestSchema, FormTokenSchema, FormValueEntrySchema, FormValuesImportBodySchema, FormValuesImportOptionsSchema, FormValuesImportResultSchema, FormWidgetDeleteResultSchema, FormWidgetLinkResultSchema, FormWidgetRestoreResultSchema, FormWidgetSchema, FormWidgetUpdateBodySchema, FormWidgetUpdateResultSchema, FormWidgetsReorderBodySchema, FormWidgetsReorderResultSchema, FormWireComponents, FreeTextDTOSchema, FreeTextDraftSchema, FreeTextIntentSchema, FreeTextIntentWriteSchema, FreeTextPatchSchema, HighlightDTOSchema, HighlightDraftSchema, HighlightPatchSchema, IdentitySchema, ImageResourceKeysSchema, InkDTOSchema, InkDraftSchema, InkIntentSchema, InkListSchema, InkPatchSchema, IsoDateTimeSchema, KIND_BY_SUBTYPE, LayerAnalysisQuerySchema, LayerScopesSchema, LayoutTokenSchema, LineCaptionPatchSchema, LineDTOSchema, LineDimensionCaptionSchema, LineDraftSchema, LineEndingSchema, LineEndingsSchema, LineIntentSchema, LineLeaderSchema, LinePatchSchema, LinePointsSchema, LinkDTOSchema, LinkDraftSchema, LinkPatchSchema, ManifestPageSchema, MetadataPatchSchema, MetadataTokenSchema, MetadataUpdateResultSchema, ModificationLevelSchema, MutationMetaSchema, NamedPageEntrySchema, NoteIconSchema, ObjectNumberRangeSchema, ObjectNumberReservationRequestSchema, ObjectNumberReservationResponseSchema, OpenDocumentResponseSchema, PAGE_RENDER_FAMILIES, PageBoxSchema, PageBoxesSchema, PageDeleteInputSchema, PageDeleteResultSchema, PageExtractInputSchema, PageFlattenInputSchema, PageFlattenResultSchema, PageGeometrySnapshotSchema, PageInsertBlankInputSchema, PageInsertInputSchema, PageInsertResultSchema, PageLayoutSchema, PageListSnapshotSchema, PageMeasurementViewportListSchema, PageMeasurementViewportSchema, PageNameInputSchema, PageNameResultSchema, PageNetworkRenderFormatSchema, PagePointSchema, PagePositionSchema, PageQuadSchema, PageRefSchema, PageRemoveNameInputSchema, PageRenderQuerySchemas, PageReorderInputSchema, PageReorderResultSchema, PageRotateInputSchema, PageRotateResultSchema, PageScaleInputSchema, PageScaleResultSchema, PageTextSnapshotSchema, PdfActionNodeSchema, PdfActionTargetRefSchema, PdfActionTreeSchema, PdfActionTypeSchema, PdfActionWireComponents, PdfActionWriteSchema, PdfAnnotationActionsSchema, PdfDestinationSchema, PdfFieldActionsSchema, PdfForeignMeasureSchema, PdfLinkTargetSchema, PdfLinkTargetWritableSchema, PdfMeasureSchema, PdfMeasureWriteSchema, PdfMeasurementSchema, PdfNumberFormatSchema, PdfPageActionsSchema, PdfPointSchema, PdfQuadSchema, PdfRectSchema, PdfRevisionSchema, PdfRotationSchema, PdfSaveModeSchema, PdfSizeSchema, PointSchema, PolygonDTOSchema, PolygonDraftSchema, PolygonIntentSchema, PolygonPatchSchema, PolylineDTOSchema, PolylineDraftSchema, PolylineIntentSchema, PolylinePatchSchema, PopupDTOSchema, PopupDraftSchema, PopupPatchSchema, RectSchema, RedactionApplyResultSchema, RedactionApplyScopeSchema, RenderTokenSchema, ResourceKeySchema, SEARCH_RESULT_FORMAT, SearchMatchSchema, SearchQuerySchema, SearchRequestSchema, SearchSliceSchema, SearchSnippetSchema, SearchTokenSchema, ShapeCaptionPatchSchema, ShapeDimensionCaptionSchema, SignatureAppearanceBodySchema, SignatureCancelResultSchema, SignatureCompleteBodySchema, SignatureCompleteResultSchema, SignatureDTOSchema, SignaturePrepareBodySchema, SignaturePreparedWireSchema, SignatureSeedValueSchema, SignatureSnapshotSchema, SourceResourceKeysSchema, SquareDTOSchema, SquareDraftSchema, SquarePatchSchema, SquigglyDTOSchema, SquigglyDraftSchema, SquigglyPatchSchema, StampDTOSchema, StampDraftSchema, StampFitSchema, StampPatchSchema, StandardFontSchema, StrikeoutDTOSchema, StrikeoutDraftSchema, StrikeoutIntentSchema, StrikeoutPatchSchema, TextAlignmentSchema, TextDTOSchema, TextDraftSchema, TextPatchSchema, ToggleFieldWidgetSchema, UnderlineDTOSchema, UnderlineDraftSchema, UnderlinePatchSchema, UnsupportedDTOSchema, UnsupportedDraftSchema, UnsupportedPatchSchema, VersionAnalysisQuerySchema, VerticalAlignmentSchema, WidgetActionsPatchSchema, WidgetAppearanceSchema, WidgetAppearancesQuerySchema, WidgetAppearancesRenderTokenSchema, WidgetBorderStyleSchema, WidgetCheckStyleSchema, WidgetDTOSchema, WidgetPatchSchema, WidgetPlacementSchema, WireAttachmentFileSchema, analysisQueryString, analyzeInputFromQuery, annotationAppearancesImageOptionsToToken, annotationAppearancesImageOptionsToWire, annotationPatchSchemaOf, annotationRenderOptionsFromImageOptions, applyCdnAccess, cdnCoverageForScope, checkResourceAccess, decodeActionsToken, decodeAnalysisToken, decodeAnnotationAppearancesRenderToken, decodeAnnotationToken, decodeAnnotationsAllToken, decodeAnnotationsExportToken, decodeAttachmentsToken, decodeContentToken, decodeDocToken, decodeDownloadToken, decodeFormExportToken, decodeFormToken, decodeLayoutToken, decodeMetadataToken, decodePrepared, decodeRenderToken, decodeSearchToken, decodeToken, decodeTokenText, decodeWidgetAppearancesRenderToken, encodeActionsToken, encodeAnalysisToken, encodeAnnotationAppearancesRenderToken, encodeAnnotationToken, encodeAnnotationsAllToken, encodeAnnotationsExportToken, encodeAppearanceModes, encodeAttachmentsToken, encodeContentToken, encodeDocToken, encodeDownloadToken, encodeFormExportToken, encodeFormToken, encodeLayoutToken, encodeMetadataToken, encodePrepared, encodeRenderToken, encodeSearchToken, encodeToken, encodeTokenText, encodeWidgetAppearancesRenderToken, flatten, fromBase64, pageRenderFamilyOf, pageRenderOptionsFromImageOptions, renderImageOptionsToToken, renderImageOptionsToWire, resolveResourceIdForPath, toBase64, unflatten, widgetAppearancesImageOptionsToToken, widgetAppearancesImageOptionsToWire, wirePaths, wireTemplates };
|
|
1623
2209
|
|
|
1624
2210
|
//# sourceMappingURL=wire.js.map
|