@embedpdf/engine-core 3.0.0-next.14 → 3.0.0-next.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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-Ca6EK3-3.d.ts → DocumentSecurityService-CU1M6Q7m.d.ts} +100 -112
- package/dist/{DocumentSecurityService-CIx1MT0T.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/{viewport-BWeNHZmb.cjs → authority-DLMNR7ff.cjs} +820 -1647
- 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 +16466 -5247
- package/dist/conformance.cjs.map +1 -1
- package/dist/conformance.d.cts +924 -165
- package/dist/conformance.d.ts +924 -165
- package/dist/conformance.js +16429 -5252
- 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 +323 -116
- 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 +726 -297
- package/dist/runtime.cjs.map +1 -1
- package/dist/runtime.d.cts +5 -1372
- package/dist/runtime.d.ts +5 -1372
- 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 +1051 -397
- package/dist/wire.cjs.map +1 -1
- package/dist/wire.d.cts +12403 -790
- package/dist/wire.d.ts +12403 -790
- package/dist/wire.js +821 -242
- package/dist/wire.js.map +1 -1
- package/package.json +10 -1
- package/dist/AbortError-DwuHPK_I.js +0 -27
- package/dist/AbortError-DwuHPK_I.js.map +0 -1
- package/dist/AbortError-P0RU0Mgg.cjs +0 -38
- package/dist/AbortError-P0RU0Mgg.cjs.map +0 -1
- package/dist/AnnotationListSnapshot-D9R5n2Kf.d.cts +0 -7101
- package/dist/AnnotationListSnapshot-D9R5n2Kf.d.ts +0 -7101
- package/dist/Engine-EWWHhEIi.d.ts +0 -1277
- package/dist/Engine-FNaAEjfb.d.cts +0 -1277
- package/dist/derive-BbsDk_Kz.cjs +0 -880
- package/dist/derive-BbsDk_Kz.cjs.map +0 -1
- package/dist/derive-DAFJolWu.js +0 -647
- package/dist/derive-DAFJolWu.js.map +0 -1
- package/dist/format-Bbphf4zR.js +0 -435
- package/dist/format-Bbphf4zR.js.map +0 -1
- package/dist/format-D_epWlob.cjs +0 -518
- package/dist/format-D_epWlob.cjs.map +0 -1
- package/dist/resolver-CYVNV4hn.cjs.map +0 -1
- package/dist/resolver-inAVzsWt.js.map +0 -1
- package/dist/schemas-CFQGvWiu.js +0 -3243
- package/dist/schemas-CFQGvWiu.js.map +0 -1
- package/dist/schemas-D0g6tKa9.cjs +0 -4694
- package/dist/schemas-D0g6tKa9.cjs.map +0 -1
- package/dist/viewport-BWeNHZmb.cjs.map +0 -1
- package/dist/viewport-CvMcadfQ.js +0 -3072
- package/dist/viewport-CvMcadfQ.js.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,22 +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",
|
|
183
213
|
"ignoreWhitespace",
|
|
214
|
+
"limitMatches",
|
|
215
|
+
"limitPages",
|
|
184
216
|
"matchCase",
|
|
185
217
|
"matchDiacritics",
|
|
186
|
-
"maxMatches",
|
|
187
|
-
"maxPages",
|
|
188
218
|
"q",
|
|
189
219
|
"regex",
|
|
190
220
|
"skip",
|
|
191
|
-
"startPage",
|
|
192
221
|
"wholeWord"
|
|
193
222
|
],
|
|
194
223
|
maxLength: 2048
|
|
@@ -196,18 +225,40 @@ const SearchTokenSchema = {
|
|
|
196
225
|
/**
|
|
197
226
|
* Token for the batch annotation-appearance render endpoint. Narrower than
|
|
198
227
|
* the page render token: appearance bitmaps are sized per annotation `/Rect`
|
|
199
|
-
* so there is no target
|
|
200
|
-
* `
|
|
201
|
-
*
|
|
202
|
-
*
|
|
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.
|
|
203
233
|
*/
|
|
204
234
|
const AnnotationAppearancesRenderTokenSchema = {
|
|
205
235
|
fields: [
|
|
206
236
|
"annotationVersion",
|
|
207
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",
|
|
208
256
|
"quality",
|
|
209
257
|
"rotation",
|
|
210
|
-
"
|
|
258
|
+
"viewport.kind",
|
|
259
|
+
"viewport.scale",
|
|
260
|
+
"viewport.width",
|
|
261
|
+
"widgetVersion"
|
|
211
262
|
],
|
|
212
263
|
maxLength: 256
|
|
213
264
|
};
|
|
@@ -265,6 +316,95 @@ const encodeAnnotationToken = (annotationVersion) => encodeToken(AnnotationToken
|
|
|
265
316
|
const decodeAnnotationToken = (raw) => decodePositiveInteger(decodeToken(AnnotationTokenSchema, raw).annotationVersion, "annotationVersion");
|
|
266
317
|
const encodeAnnotationsAllToken = (annotationsVersion) => encodeToken(AnnotationsAllTokenSchema, { annotationsVersion });
|
|
267
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
|
+
};
|
|
268
408
|
const encodeActionsToken = (actionsVersion) => encodeToken(ActionsTokenSchema, { actionsVersion });
|
|
269
409
|
const decodeActionsToken = (raw) => decodePositiveInteger(decodeToken(ActionsTokenSchema, raw).actionsVersion, "actionsVersion");
|
|
270
410
|
const encodeAttachmentsToken = (attachmentsVersion) => encodeToken(AttachmentsTokenSchema, { attachmentsVersion });
|
|
@@ -284,7 +424,7 @@ const decodeDownloadToken = (raw) => {
|
|
|
284
424
|
* Encode a render token from a flat wire-shape input. The input is the
|
|
285
425
|
* output of `flatten(...)` over an SDK `PageImageOptions`-shaped object plus
|
|
286
426
|
* cache versions. Semantic invariants (viewport-kind XOR fields, per-family
|
|
287
|
-
* pin grammar — annotatedness itself is
|
|
427
|
+
* pin grammar — annotatedness itself is path-expressed, never a token key —
|
|
288
428
|
* target rect coherence) live in the per-family render query schemas —
|
|
289
429
|
* running them here would duplicate the spec.
|
|
290
430
|
*/
|
|
@@ -301,18 +441,24 @@ const decodeRenderToken = (raw) => decodeToken(RenderTokenSchema, raw);
|
|
|
301
441
|
* plus cache versions). Semantic validation lives in
|
|
302
442
|
* `AnnotationAppearancesQuerySchema`.
|
|
303
443
|
*/
|
|
444
|
+
/** `modes` as one token value: the modes in engine order, joined by `-`. */
|
|
445
|
+
const encodeAppearanceModes = (modes) => modes.join("-");
|
|
304
446
|
const encodeAnnotationAppearancesRenderToken = (input) => encodeToken(AnnotationAppearancesRenderTokenSchema, input);
|
|
305
447
|
/** Decode an annotation-appearance render token to a flat field map. */
|
|
306
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);
|
|
307
453
|
/**
|
|
308
|
-
* The search
|
|
454
|
+
* The search result representation this client speaks — part of the token
|
|
309
455
|
* (and therefore the versioned URL), so a response-shape change can never
|
|
310
456
|
* serve a stale CDN body to a newer client: new tokens are new cache keys,
|
|
311
|
-
* and old tokens fail decode on new servers. Deliberately
|
|
457
|
+
* and old tokens fail decode on new servers. Deliberately always encoded —
|
|
312
458
|
* an exception to the omit-defaults rule, because its entire job is to
|
|
313
459
|
* change the token bytes when the format changes.
|
|
314
460
|
*/
|
|
315
|
-
const SEARCH_RESULT_FORMAT = "
|
|
461
|
+
const SEARCH_RESULT_FORMAT = "ranges1";
|
|
316
462
|
const encodeSearchToken = (input) => {
|
|
317
463
|
const q = input.query;
|
|
318
464
|
return encodeToken(SearchTokenSchema, {
|
|
@@ -324,17 +470,17 @@ const encodeSearchToken = (input) => {
|
|
|
324
470
|
matchDiacritics: q.matchDiacritics ? true : void 0,
|
|
325
471
|
wholeWord: q.wholeWord ? true : void 0,
|
|
326
472
|
ignoreWhitespace: q.ignoreWhitespace ? true : void 0,
|
|
327
|
-
|
|
473
|
+
from: input.from,
|
|
328
474
|
skip: input.skip > 0 ? input.skip : void 0,
|
|
329
|
-
|
|
330
|
-
|
|
475
|
+
limitPages: input.limit?.pages,
|
|
476
|
+
limitMatches: input.limit?.matches
|
|
331
477
|
});
|
|
332
478
|
};
|
|
333
479
|
const decodeSearchToken = (raw) => {
|
|
334
480
|
const t = decodeToken(SearchTokenSchema, raw);
|
|
335
481
|
if (t.epoch === void 0) throw new Error("search token is missing \"epoch\"");
|
|
336
482
|
if (t.q === void 0) throw new Error("search token is missing \"q\"");
|
|
337
|
-
if (t.format !== "
|
|
483
|
+
if (t.format !== "ranges1") throw new Error(`search token has unsupported result format "${t.format ?? "legacy"}" (expected "${SEARCH_RESULT_FORMAT}")`);
|
|
338
484
|
const query = {
|
|
339
485
|
text: decodeTokenText(t.q),
|
|
340
486
|
...t.regex === "true" ? { regex: true } : {},
|
|
@@ -343,16 +489,16 @@ const decodeSearchToken = (raw) => {
|
|
|
343
489
|
...t.wholeWord === "true" ? { wholeWord: true } : {},
|
|
344
490
|
...t.ignoreWhitespace === "true" ? { ignoreWhitespace: true } : {}
|
|
345
491
|
};
|
|
346
|
-
const
|
|
347
|
-
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");
|
|
348
494
|
return {
|
|
349
495
|
epoch: t.epoch,
|
|
350
496
|
query,
|
|
351
|
-
...t.
|
|
497
|
+
...t.from === void 0 ? {} : { from: decodePositiveInteger(t.from, "from") },
|
|
352
498
|
skip: t.skip === void 0 ? 0 : decodePositiveInteger(t.skip, "skip"),
|
|
353
|
-
...
|
|
354
|
-
...
|
|
355
|
-
...
|
|
499
|
+
...pages !== void 0 || matches !== void 0 ? { limit: {
|
|
500
|
+
...matches !== void 0 ? { matches } : {},
|
|
501
|
+
...pages !== void 0 ? { pages } : {}
|
|
356
502
|
} } : {}
|
|
357
503
|
};
|
|
358
504
|
};
|
|
@@ -406,7 +552,7 @@ function decodePdfSaveMode(raw) {
|
|
|
406
552
|
* Single source of truth for cloud HTTP paths. Both @cloudpdf/engine and
|
|
407
553
|
* @cloudpdf/server import these so they cannot drift.
|
|
408
554
|
*
|
|
409
|
-
* **URL layout convention
|
|
555
|
+
* **URL layout convention**
|
|
410
556
|
*
|
|
411
557
|
* Each resource type lives at its own distinct path prefix. This
|
|
412
558
|
* lets prefix-matching CDNs (Bunny, Cloud CDN, Azure FD) enforce
|
|
@@ -418,28 +564,39 @@ function decodePdfSaveMode(raw) {
|
|
|
418
564
|
* /v1/docs/{id} — doc root
|
|
419
565
|
* /v1/docs/{id}/manifest@{ver} — doc-level read
|
|
420
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
|
|
421
568
|
* /v1/docs/{id}/text/pages/{N}/data@{ver} — text is its own prefix
|
|
422
569
|
* /v1/docs/{id}/geometry/pages/{N}/data@{ver} — geometry is its own prefix
|
|
423
570
|
* /v1/docs/{id}/layers/{L}/manifest@{ver}
|
|
424
571
|
* /v1/docs/{id}/layers/{L}/metadata@{ver}
|
|
572
|
+
* /v1/docs/{id}/layers/{L}/metadata/custom@{ver} — the Info dict's own keys
|
|
425
573
|
* /v1/docs/{id}/layers/{L}/render/pages/{N}/data@{ver}
|
|
426
574
|
* /v1/docs/{id}/layers/{L}/text/pages/{N}/data@{ver}
|
|
427
575
|
* /v1/docs/{id}/layers/{L}/geometry/pages/{N}/data@{ver}
|
|
428
576
|
* /v1/docs/{id}/layers/{L}/annotations/pages/{N}/items@{ver} — collection (read)
|
|
429
577
|
* /v1/docs/{id}/layers/{L}/annotations/pages/{N}/items — collection (create)
|
|
430
578
|
* /v1/docs/{id}/layers/{L}/annotations/pages/{N}/items/{key} — member
|
|
431
|
-
* /v1/docs/{id}/layers/{L}/annotations/pages/{N}/items/
|
|
432
|
-
* /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
|
|
433
581
|
* /v1/docs/{id}/layers/{L}/pages/rotate — batch absolute rotation
|
|
434
582
|
* /v1/docs/{id}/layers/{L}/pages/delete — batch page delete
|
|
435
|
-
* /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
|
|
436
590
|
* /v1/docs/{id}/layers/{L}/form/fields — field collection (create)
|
|
437
591
|
* /v1/docs/{id}/layers/{L}/form/fields/{key} — field member (read/patch/delete)
|
|
438
592
|
* /v1/docs/{id}/layers/{L}/form/fields/{key}/value — value write (fill)
|
|
439
593
|
* /v1/docs/{id}/layers/{L}/form/fields/{key}/reset — reset to /DV (fill)
|
|
440
594
|
* /v1/docs/{id}/layers/{L}/form/fields/{key}/widgets — adopt a widget (attach)
|
|
441
595
|
* /v1/docs/{id}/layers/{L}/form/fields/{key}/widgets/detach — release a widget
|
|
442
|
-
* /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)
|
|
443
600
|
* /v1/docs/{id}/layers/{L}/form/repair — durable reconciliation
|
|
444
601
|
* /v1/docs/{id}/layers/{L}/download@{ver}
|
|
445
602
|
*
|
|
@@ -456,16 +613,21 @@ const wirePaths = {
|
|
|
456
613
|
* against the token like every layer route — the grant is
|
|
457
614
|
* layer-scoped in substance: CDN coverage, scopes, and the client's
|
|
458
615
|
* binding all carry the layer). Path-addressed so the affinity tier —
|
|
459
|
-
* the `X-CloudPDF-Doc` header derivation
|
|
616
|
+
* the `X-CloudPDF-Doc` header derivation and the chart's uri-mode
|
|
460
617
|
* regex — pins the session bootstrap to the document's pod from the
|
|
461
618
|
* very first request. Default-layer callers spell `layers/default/`,
|
|
462
619
|
* same as every other layer route.
|
|
463
620
|
*/
|
|
464
621
|
access: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/access`,
|
|
465
|
-
/** Deprecated alias (docId in the
|
|
622
|
+
/** Deprecated alias (docId in the body) — served for one prerelease
|
|
466
623
|
* cycle so pre-rename clients keep working; remove after. */
|
|
467
624
|
accessLegacy: "/v1/access",
|
|
468
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
|
+
/**
|
|
469
631
|
* GET: open the document referenced by the doc-scoped JWT and
|
|
470
632
|
* return its `DocumentHead`. The server materialises the base
|
|
471
633
|
* PDF into its file cache and binds it to a worker the first
|
|
@@ -503,9 +665,9 @@ const wirePaths = {
|
|
|
503
665
|
*/
|
|
504
666
|
layerLayout: (docId, layerName, layoutVersion) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/layout@${encodeLayoutToken(layoutVersion)}`,
|
|
505
667
|
/**
|
|
506
|
-
* Immutable
|
|
668
|
+
* Immutable base page-geometry list (plane-scope model): the shared-URL
|
|
507
669
|
* variant a layout-inheriting layer resolves at — every visitor's page
|
|
508
|
-
* list is
|
|
670
|
+
* list is one CDN object served from the base worker session.
|
|
509
671
|
*/
|
|
510
672
|
docLayout: (docId, layoutVersion) => `/v1/docs/${encodeURIComponent(docId)}/layout@${encodeLayoutToken(layoutVersion)}`,
|
|
511
673
|
layerLayoutCurrent: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/layout`,
|
|
@@ -519,12 +681,21 @@ const wirePaths = {
|
|
|
519
681
|
*/
|
|
520
682
|
layerMetadata: (docId, layerName, metadataVersion) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/metadata@${encodeMetadataToken(metadataVersion)}`,
|
|
521
683
|
layerMetadataCurrent: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/metadata`,
|
|
522
|
-
/** Immutable
|
|
684
|
+
/** Immutable base metadata (plane-scope model): the shared-URL variant a
|
|
523
685
|
* metadata-inheriting layer resolves at. */
|
|
524
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)}`,
|
|
525
696
|
/** Immutable catalog-owned actions, independently pinned in the manifest. */
|
|
526
697
|
layerActions: (docId, layerName, actionsVersion) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/actions@${encodeActionsToken(actionsVersion)}`,
|
|
527
|
-
/** Immutable
|
|
698
|
+
/** Immutable base catalog actions (plane-scope model): the shared-URL
|
|
528
699
|
* variant an actions-inheriting layer resolves at. */
|
|
529
700
|
docActions: (docId, actionsVersion) => `/v1/docs/${encodeURIComponent(docId)}/actions@${encodeActionsToken(actionsVersion)}`,
|
|
530
701
|
/** Immutable layer signature snapshot (base signatures + the layer's fields + protection). */
|
|
@@ -538,7 +709,7 @@ const wirePaths = {
|
|
|
538
709
|
/** POST (JSON): install the CMS and publish the sealed bytes as the next base version. */
|
|
539
710
|
layerSignatureComplete: (docId, layerName, signingId) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/signatures/${encodeURIComponent(signingId)}/complete`,
|
|
540
711
|
/** DELETE: discard a pending signing. */
|
|
541
|
-
|
|
712
|
+
layerSignatureCancel: (docId, layerName, signingId) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/signatures/${encodeURIComponent(signingId)}`,
|
|
542
713
|
/** The document's base versions, oldest first (grows; never cached). */
|
|
543
714
|
docVersions: (docId) => `/v1/docs/${encodeURIComponent(docId)}/versions`,
|
|
544
715
|
/** Immutable: the signature snapshot of one base version. */
|
|
@@ -557,13 +728,15 @@ const wirePaths = {
|
|
|
557
728
|
layerFormFieldSignatureAppearance: (docId, layerName, fieldKey) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/fields/${encodeURIComponent(fieldKey)}/signature-appearance`,
|
|
558
729
|
/** POST: rewrite the document Info dict for the layer (metadata edit). */
|
|
559
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`,
|
|
560
733
|
/**
|
|
561
|
-
* Immutable
|
|
734
|
+
* Immutable base /EmbeddedFiles listing: the shared-URL variant an
|
|
562
735
|
* attachments-undiverged layer resolves at — every visitor's sidebar list
|
|
563
|
-
* is
|
|
736
|
+
* is one CDN object served from the base worker session.
|
|
564
737
|
*/
|
|
565
738
|
docAttachments: (docId, attachmentsVersion) => `/v1/docs/${encodeURIComponent(docId)}/attachments@${encodeAttachmentsToken(attachmentsVersion)}`,
|
|
566
|
-
/** Immutable
|
|
739
|
+
/** Immutable base decoded bytes of one embedded file (twin of
|
|
567
740
|
* `layerAttachmentFile` — same capability tier split). */
|
|
568
741
|
docAttachmentFile: (docId, key, attachmentsVersion) => `/v1/docs/${encodeURIComponent(docId)}/attachment-files/${encodeTokenText(key)}/data@${encodeAttachmentsToken(attachmentsVersion)}`,
|
|
569
742
|
/** Immutable /EmbeddedFiles listing, pinned by `attachmentsVersion`. */
|
|
@@ -580,14 +753,14 @@ const wirePaths = {
|
|
|
580
753
|
*/
|
|
581
754
|
layerAttachmentFile: (docId, layerName, key, attachmentsVersion) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/attachment-files/${encodeTokenText(key)}/data@${encodeAttachmentsToken(attachmentsVersion)}`,
|
|
582
755
|
/** Immutable decoded bytes of a FileAttachment annotation's embedded file. */
|
|
583
|
-
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)}`,
|
|
584
757
|
/**
|
|
585
|
-
* Immutable
|
|
758
|
+
* Immutable base bytes of a FileAttachment annotation's embedded file
|
|
586
759
|
* (plane-scope model). Depends on the `annotations` plane (the annotation
|
|
587
|
-
* exists in this view)
|
|
760
|
+
* exists in this view) and the `attachments` plane (the pin); the origin
|
|
588
761
|
* guard requires both inherited.
|
|
589
762
|
*/
|
|
590
|
-
docAnnotationFile: (docId,
|
|
763
|
+
docAnnotationFile: (docId, page, annotKey, attachmentsVersion) => `/v1/docs/${encodeURIComponent(docId)}/attachment-files/pages/${encodeURIComponent(encodePageKey(page))}/items/${encodeURIComponent(annotKey)}/data@${encodeAttachmentsToken(attachmentsVersion)}`,
|
|
591
764
|
/**
|
|
592
765
|
* GET: full plain-text extraction for a single page at a specific
|
|
593
766
|
* `contentVersion`. Content-addressed; CDN may cache forever.
|
|
@@ -595,55 +768,60 @@ const wirePaths = {
|
|
|
595
768
|
* retry walks `/head` → `/manifest@docVersion=N` to learn the new
|
|
596
769
|
* `contentVersion`.
|
|
597
770
|
*/
|
|
598
|
-
docPageText: (docId,
|
|
599
|
-
layerPageText: (docId, layerName,
|
|
600
|
-
layerPageTextCurrent: (docId, layerName,
|
|
601
|
-
docPageGeometry: (docId,
|
|
602
|
-
docPageGeometryCurrent: (docId,
|
|
603
|
-
docPageRender: (docId, pageObjectNumber, token) => `/v1/docs/${encodeURIComponent(docId)}/render/pages/${pageObjectNumber}/data@${encodeRenderToken(token)}`,
|
|
604
|
-
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`,
|
|
605
776
|
/**
|
|
606
|
-
*
|
|
607
|
-
*
|
|
608
|
-
*
|
|
609
|
-
*
|
|
610
|
-
* identify its full plane-dependency set. Annotatedness is therefore
|
|
611
|
-
* PATH-ONLY (the token/path law): the wire token has no
|
|
612
|
-
* `includeAnnotations` key at all; the annotated family's token carries
|
|
613
|
-
* `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.
|
|
614
781
|
*/
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
* annotatedness is path-only at BOTH tiers. */
|
|
622
|
-
layerPageRenderAnnotated: (docId, layerName, pageObjectNumber, token) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/render/annotated/pages/${pageObjectNumber}/data@${encodeRenderToken(token)}`,
|
|
623
|
-
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`,
|
|
624
788
|
/**
|
|
625
|
-
* Immutable
|
|
789
|
+
* Immutable base annotation list for a single page (plane-scope model):
|
|
626
790
|
* the shared-URL variant an annotations-inheriting layer resolves at — a
|
|
627
|
-
* base's own annotations (
|
|
628
|
-
* 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
|
|
629
793
|
* object served from the base worker session.
|
|
630
794
|
*/
|
|
631
|
-
docPageAnnotations: (docId,
|
|
632
|
-
/** 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). */
|
|
633
797
|
docAnnotationsAll: (docId, annotationsVersion) => `/v1/docs/${encodeURIComponent(docId)}/annotations/items@${encodeAnnotationsAllToken(annotationsVersion)}`,
|
|
634
|
-
/** Immutable
|
|
798
|
+
/** Immutable base appearance batch (twin of
|
|
635
799
|
* `layerPageAnnotationAppearances` — same `annotations` plane gate). */
|
|
636
|
-
docPageAnnotationAppearances: (docId,
|
|
800
|
+
docPageAnnotationAppearances: (docId, page, token) => `/v1/docs/${encodeURIComponent(docId)}/annotations/pages/${encodeURIComponent(encodePageKey(page))}/appearances@${encodeAnnotationAppearancesRenderToken(token)}`,
|
|
637
801
|
/**
|
|
638
802
|
* GET: full annotation list for a single page at a specific
|
|
639
803
|
* `annotationVersion`. Same cache-control rules and 404-retry
|
|
640
804
|
* semantics as `docPageText`. The `items` suffix is the
|
|
641
805
|
* collection name — see file-level docstring.
|
|
642
806
|
*/
|
|
643
|
-
layerPageAnnotations: (docId, layerName,
|
|
644
|
-
/** 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). */
|
|
645
823
|
layerAnnotationsAll: (docId, layerName, annotationsVersion) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/items@${encodeAnnotationsAllToken(annotationsVersion)}`,
|
|
646
|
-
layerPageAnnotationsCurrent: (docId, layerName,
|
|
824
|
+
layerPageAnnotationsCurrent: (docId, layerName, page) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/pages/${encodeURIComponent(encodePageKey(page))}/items`,
|
|
647
825
|
/**
|
|
648
826
|
* GET: batch-rendered annotation appearance bitmaps for a single page as a
|
|
649
827
|
* `multipart/form-data` body. Sibling collection of `items` under the same
|
|
@@ -654,28 +832,52 @@ const wirePaths = {
|
|
|
654
832
|
* Content-addressed via the appearance render token (`annotationVersion`
|
|
655
833
|
* plus render options like scale/format); CDN may cache forever. Appearance
|
|
656
834
|
* pixels depend only on the annotation `/AP` stream, so `contentVersion` is
|
|
657
|
-
* deliberately
|
|
835
|
+
* deliberately not part of the key.
|
|
658
836
|
*/
|
|
659
|
-
layerPageAnnotationAppearances: (docId, layerName,
|
|
660
|
-
layerPageAnnotationAppearancesCurrent: (docId, layerName,
|
|
661
|
-
layerPageAnnotationsCreate: (docId, layerName,
|
|
662
|
-
layerAnnotationByKey: (docId, layerName,
|
|
663
|
-
|
|
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`,
|
|
664
845
|
/** POST: flatten a chosen set of the page's annotations into its content
|
|
665
846
|
* (a content + annotation mutation of that page). */
|
|
666
|
-
layerPageAnnotationsFlatten: (docId, layerName,
|
|
847
|
+
layerPageAnnotationsFlatten: (docId, layerName, page) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/annotations/pages/${encodeURIComponent(encodePageKey(page))}/items/flatten`,
|
|
667
848
|
/** POST: the chosen annotations' appearances as one single-page PDF — a
|
|
668
849
|
* derived read (application/pdf, no-store), gated like pages/extract. */
|
|
669
|
-
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`,
|
|
670
871
|
/**
|
|
671
|
-
*
|
|
672
|
-
*
|
|
673
|
-
*
|
|
674
|
-
* no content-addressed `@version` variant: the snapshot is always served
|
|
675
|
-
* `no-store`. Mutation results carry the per-page `cacheDelta` that keeps
|
|
676
|
-
* 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.
|
|
677
875
|
*/
|
|
678
|
-
|
|
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)}`,
|
|
679
881
|
/** POST: create a field (optionally with styled widget placements). */
|
|
680
882
|
layerFormFields: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/fields`,
|
|
681
883
|
/**
|
|
@@ -686,9 +888,9 @@ const wirePaths = {
|
|
|
686
888
|
layerFormFieldByKey: (docId, layerName, fieldKey) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/fields/${encodeURIComponent(fieldKey)}`,
|
|
687
889
|
/** POST: replace the field's value (`{ value: FormFieldValue }`). */
|
|
688
890
|
layerFormFieldValue: (docId, layerName, fieldKey) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/fields/${encodeURIComponent(fieldKey)}/value`,
|
|
689
|
-
/** POST: reset
|
|
690
|
-
|
|
691
|
-
/** 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`). */
|
|
692
894
|
layerFormFieldWidgets: (docId, layerName, fieldKey) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/fields/${encodeURIComponent(fieldKey)}/widgets`,
|
|
693
895
|
/**
|
|
694
896
|
* POST: release a widget back to the inert annotation plane
|
|
@@ -697,18 +899,21 @@ const wirePaths = {
|
|
|
697
899
|
* one codec instead of inventing a second composite key syntax.
|
|
698
900
|
*/
|
|
699
901
|
layerFormFieldWidgetsDetach: (docId, layerName, fieldKey) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/fields/${encodeURIComponent(fieldKey)}/widgets/detach`,
|
|
700
|
-
/**
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
*/
|
|
705
|
-
|
|
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`,
|
|
706
912
|
/** POST: durable reconciliation (`{ bakeAppearances? }`). */
|
|
707
913
|
layerFormRepair: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/repair`,
|
|
708
|
-
layerFormEffects: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/form/effects`,
|
|
709
914
|
/**
|
|
710
915
|
* GET: one budgeted search slice, versioned form. The token
|
|
711
|
-
* (`encodeSearchToken`)
|
|
916
|
+
* (`encodeSearchToken`) is the cache key: content epoch + query +
|
|
712
917
|
* position. Immutable; CDN may cache forever. Mode is the path — rects
|
|
713
918
|
* and full are separate resources so permission tiers never share
|
|
714
919
|
* cache entries (`'rects'` needs `doc.text.search`; `'full'` also
|
|
@@ -718,17 +923,17 @@ const wirePaths = {
|
|
|
718
923
|
layerSearchFull: (docId, layerName, token) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/search/full/data@${token}`,
|
|
719
924
|
/**
|
|
720
925
|
* GET: unversioned form — same fields as flat query params (`q` as
|
|
721
|
-
* plain text), served from the
|
|
926
|
+
* plain text), served from the current content, always `no-store`.
|
|
722
927
|
* The debug/simple-client variant; the SDK uses the versioned form.
|
|
723
928
|
*/
|
|
724
929
|
layerSearchRectsCurrent: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/search/rects/data`,
|
|
725
930
|
layerSearchFullCurrent: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/search/full/data`,
|
|
726
|
-
layerPageViewports: (docId, layerName,
|
|
727
|
-
layerPageScale: (docId, layerName,
|
|
728
|
-
|
|
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`,
|
|
729
934
|
layerPagesRotate: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/pages/rotate`,
|
|
730
935
|
layerPagesDelete: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/pages/delete`,
|
|
731
|
-
/** POST: register/rename a `/Names /Pages` entry — a page-
|
|
936
|
+
/** POST: register/rename a `/Names /Pages` entry — a page-structure
|
|
732
937
|
* mutation (docVersion + layoutVersion advance; reads ride `/layout`). */
|
|
733
938
|
layerPagesNames: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/pages/names`,
|
|
734
939
|
/** POST: remove a `/Names /Pages` entry (the page stays). */
|
|
@@ -736,14 +941,14 @@ const wirePaths = {
|
|
|
736
941
|
layerPagesFlatten: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/pages/flatten`,
|
|
737
942
|
/**
|
|
738
943
|
* POST (multipart mutation envelope): copy every page of the `source`
|
|
739
|
-
* resource part (a standalone PDF) in at the body's `
|
|
944
|
+
* resource part (a standalone PDF) in at the body's `toIndex`.
|
|
740
945
|
*/
|
|
741
946
|
layerPagesInsert: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/pages/insert`,
|
|
742
947
|
/** POST (plain JSON): create blank pages — pages.insert minus the bytes. */
|
|
743
948
|
layerPagesInsertBlank: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/pages/insert-blank`,
|
|
744
949
|
/**
|
|
745
950
|
* POST (plain JSON → `application/pdf` bytes): export the listed pages,
|
|
746
|
-
* in caller order, as a standalone PDF. A
|
|
951
|
+
* in caller order, as a standalone PDF. A read over the current layer
|
|
747
952
|
* state (gated like /download), so it is a POST only for its body —
|
|
748
953
|
* nothing mutates and no event is published.
|
|
749
954
|
*/
|
|
@@ -753,15 +958,6 @@ const wirePaths = {
|
|
|
753
958
|
layerDownload: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/download`,
|
|
754
959
|
layerDownloadVersioned: (docId, layerName, token) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/download@${encodeDownloadToken(token)}`,
|
|
755
960
|
/**
|
|
756
|
-
* Weak-annotation-sessions: pluralized in v2 so the collection
|
|
757
|
-
* lives at `/weak-annotation-sessions` and members at
|
|
758
|
-
* `/weak-annotation-sessions/{sessionId}` — REST-conventional.
|
|
759
|
-
*/
|
|
760
|
-
layerWeakAnnotationSession: (docId, layerName) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/weak-annotation-sessions`,
|
|
761
|
-
layerWeakAnnotationSessionHeartbeat: (docId, layerName, sessionId) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/weak-annotation-sessions/${encodeURIComponent(sessionId)}/heartbeat`,
|
|
762
|
-
layerWeakAnnotationSessionPages: (docId, layerName, sessionId) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/weak-annotation-sessions/${encodeURIComponent(sessionId)}/pages`,
|
|
763
|
-
layerWeakAnnotationSessionRelease: (docId, layerName, sessionId) => `/v1/docs/${encodeURIComponent(docId)}/layers/${encodeURIComponent(layerName)}/weak-annotation-sessions/${encodeURIComponent(sessionId)}`,
|
|
764
|
-
/**
|
|
765
961
|
* POST: pre-warm the doc cache + worker open before any user
|
|
766
962
|
* request lands. Body is `{ docId }`. Doc-scoped token required.
|
|
767
963
|
*/
|
|
@@ -780,22 +976,30 @@ function analysisQueryString(query) {
|
|
|
780
976
|
const wireTemplates = {
|
|
781
977
|
docHead: "/v1/docs/:docId/head",
|
|
782
978
|
layerManifest: "/v1/docs/:docId/layers/:layerName/manifest",
|
|
979
|
+
layerChanges: "/v1/docs/:docId/layers/:layerName/changes",
|
|
783
980
|
layerMetadata: "/v1/docs/:docId/layers/:layerName/metadata",
|
|
784
|
-
|
|
785
|
-
|
|
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",
|
|
786
984
|
layerAnnotationItemsAll: "/v1/docs/:docId/layers/:layerName/annotations/items",
|
|
787
|
-
layerAnnotationItems: "/v1/docs/:docId/layers/:layerName/annotations/pages/:
|
|
788
|
-
layerAnnotationItem: "/v1/docs/:docId/layers/:layerName/annotations/pages/:
|
|
789
|
-
|
|
790
|
-
|
|
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",
|
|
791
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",
|
|
792
995
|
layerFormFieldValue: "/v1/docs/:docId/layers/:layerName/form/fields/:fieldKey/value",
|
|
793
|
-
|
|
996
|
+
layerFormReset: "/v1/docs/:docId/layers/:layerName/form/reset",
|
|
794
997
|
layerFormFieldSignatureAppearance: "/v1/docs/:docId/layers/:layerName/form/fields/:fieldKey/signature-appearance",
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
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",
|
|
799
1003
|
layerPagesRotate: "/v1/docs/:docId/layers/:layerName/pages/rotate",
|
|
800
1004
|
layerPagesDelete: "/v1/docs/:docId/layers/:layerName/pages/delete",
|
|
801
1005
|
layerPagesNames: "/v1/docs/:docId/layers/:layerName/pages/names",
|
|
@@ -810,7 +1014,7 @@ const wireTemplates = {
|
|
|
810
1014
|
layerSignaturesAnalysis: "/v1/docs/:docId/layers/:layerName/signatures/analysis",
|
|
811
1015
|
layerSignaturesPrepare: "/v1/docs/:docId/layers/:layerName/signatures/prepare",
|
|
812
1016
|
layerSignatureComplete: "/v1/docs/:docId/layers/:layerName/signatures/:signingId/complete",
|
|
813
|
-
|
|
1017
|
+
layerSignatureCancel: "/v1/docs/:docId/layers/:layerName/signatures/:signingId",
|
|
814
1018
|
docVersions: "/v1/docs/:docId/versions",
|
|
815
1019
|
docVersionSignatures: "/v1/docs/:docId/versions/signatures/:sha",
|
|
816
1020
|
docVersionSignatureContents: "/v1/docs/:docId/versions/signatures/:sha/:fieldKey/contents",
|
|
@@ -821,8 +1025,45 @@ const wireTemplates = {
|
|
|
821
1025
|
};
|
|
822
1026
|
//#endregion
|
|
823
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
|
+
}
|
|
824
1065
|
/**
|
|
825
|
-
* URL layout
|
|
1066
|
+
* URL layout: each resource type lives at a distinct path
|
|
826
1067
|
* prefix so prefix-matching CDNs (Bunny, Cloud CDN, Azure FD) can
|
|
827
1068
|
* enforce per-resource scope at the edge. See wire/paths.ts for the
|
|
828
1069
|
* full shape and rationale.
|
|
@@ -867,32 +1108,10 @@ const DOC_RESOURCES = {
|
|
|
867
1108
|
routeKind: "versioned-read",
|
|
868
1109
|
cdnCacheable: true
|
|
869
1110
|
},
|
|
870
|
-
"page-render":
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
pathPrefix: "/v1/docs/{docId}/render/pages/",
|
|
875
|
-
resolvePathPrefix: (docId) => `/v1/docs/${docId}/render/pages/`,
|
|
876
|
-
requirement: {
|
|
877
|
-
kind: "single",
|
|
878
|
-
capability: "doc.render"
|
|
879
|
-
},
|
|
880
|
-
routeKind: "versioned-read",
|
|
881
|
-
cdnCacheable: true
|
|
882
|
-
},
|
|
883
|
-
"page-render-annotated": {
|
|
884
|
-
id: "page-render-annotated",
|
|
885
|
-
pathPattern: "/v1/docs/{docId}/render/annotated/pages/*/data@*",
|
|
886
|
-
resolvePathPattern: (docId) => `/v1/docs/${docId}/render/annotated/pages/*/data@*`,
|
|
887
|
-
pathPrefix: "/v1/docs/{docId}/render/annotated/pages/",
|
|
888
|
-
resolvePathPrefix: (docId) => `/v1/docs/${docId}/render/annotated/pages/`,
|
|
889
|
-
requirement: {
|
|
890
|
-
kind: "single",
|
|
891
|
-
capability: "doc.render"
|
|
892
|
-
},
|
|
893
|
-
routeKind: "versioned-read",
|
|
894
|
-
cdnCacheable: true
|
|
895
|
-
},
|
|
1111
|
+
"page-render": pageRenderResource("pages"),
|
|
1112
|
+
"page-render-annotations": pageRenderResource("annotations"),
|
|
1113
|
+
"page-render-fields": pageRenderResource("fields"),
|
|
1114
|
+
"page-render-all": pageRenderResource("all"),
|
|
896
1115
|
"page-annotations": {
|
|
897
1116
|
id: "page-annotations",
|
|
898
1117
|
pathPattern: "/v1/docs/{docId}/annotations/pages/*/items@*",
|
|
@@ -919,6 +1138,58 @@ const DOC_RESOURCES = {
|
|
|
919
1138
|
routeKind: "versioned-read",
|
|
920
1139
|
cdnCacheable: true
|
|
921
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
|
+
},
|
|
922
1193
|
layout: {
|
|
923
1194
|
id: "layout",
|
|
924
1195
|
pathPattern: "/v1/docs/{docId}/layout@*",
|
|
@@ -945,6 +1216,19 @@ const DOC_RESOURCES = {
|
|
|
945
1216
|
routeKind: "versioned-read",
|
|
946
1217
|
cdnCacheable: true
|
|
947
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
|
+
},
|
|
948
1232
|
actions: {
|
|
949
1233
|
id: "actions",
|
|
950
1234
|
pathPattern: "/v1/docs/{docId}/actions@*",
|
|
@@ -984,6 +1268,19 @@ const DOC_RESOURCES = {
|
|
|
984
1268
|
routeKind: "versioned-read",
|
|
985
1269
|
cdnCacheable: true
|
|
986
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
|
+
},
|
|
987
1284
|
"layer-actions": {
|
|
988
1285
|
id: "layer-actions",
|
|
989
1286
|
pathPattern: "/v1/docs/{docId}/layers/{layerName}/actions@*",
|
|
@@ -1049,32 +1346,10 @@ const DOC_RESOURCES = {
|
|
|
1049
1346
|
routeKind: "versioned-read",
|
|
1050
1347
|
cdnCacheable: true
|
|
1051
1348
|
},
|
|
1052
|
-
"layer-page-render":
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
pathPrefix: "/v1/docs/{docId}/layers/{layerName}/render/pages/",
|
|
1057
|
-
resolvePathPrefix: (docId, layerName = "default") => `/v1/docs/${docId}/layers/${layerName}/render/pages/`,
|
|
1058
|
-
requirement: {
|
|
1059
|
-
kind: "single",
|
|
1060
|
-
capability: "doc.render"
|
|
1061
|
-
},
|
|
1062
|
-
routeKind: "versioned-read",
|
|
1063
|
-
cdnCacheable: true
|
|
1064
|
-
},
|
|
1065
|
-
"layer-page-render-annotated": {
|
|
1066
|
-
id: "layer-page-render-annotated",
|
|
1067
|
-
pathPattern: "/v1/docs/{docId}/layers/{layerName}/render/annotated/pages/*/data@*",
|
|
1068
|
-
resolvePathPattern: (docId, layerName = "default") => `/v1/docs/${docId}/layers/${layerName}/render/annotated/pages/*/data@*`,
|
|
1069
|
-
pathPrefix: "/v1/docs/{docId}/layers/{layerName}/render/annotated/pages/",
|
|
1070
|
-
resolvePathPrefix: (docId, layerName = "default") => `/v1/docs/${docId}/layers/${layerName}/render/annotated/pages/`,
|
|
1071
|
-
requirement: {
|
|
1072
|
-
kind: "single",
|
|
1073
|
-
capability: "doc.render"
|
|
1074
|
-
},
|
|
1075
|
-
routeKind: "versioned-read",
|
|
1076
|
-
cdnCacheable: true
|
|
1077
|
-
},
|
|
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"),
|
|
1078
1353
|
"page-text": {
|
|
1079
1354
|
id: "page-text",
|
|
1080
1355
|
pathPattern: "/v1/docs/{docId}/text/pages/*/data@*",
|
|
@@ -1166,6 +1441,19 @@ const DOC_RESOURCES = {
|
|
|
1166
1441
|
routeKind: "versioned-read",
|
|
1167
1442
|
cdnCacheable: true
|
|
1168
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
|
+
},
|
|
1169
1457
|
"layer-annotations-all": {
|
|
1170
1458
|
id: "layer-annotations-all",
|
|
1171
1459
|
pathPattern: "/v1/docs/{docId}/layers/{layerName}/annotations/items@*",
|
|
@@ -1179,6 +1467,45 @@ const DOC_RESOURCES = {
|
|
|
1179
1467
|
routeKind: "versioned-read",
|
|
1180
1468
|
cdnCacheable: true
|
|
1181
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
|
+
},
|
|
1182
1509
|
"download-current": {
|
|
1183
1510
|
id: "download-current",
|
|
1184
1511
|
pathPattern: "/v1/docs/{docId}/layers/{layerName}/download",
|
|
@@ -1325,15 +1652,14 @@ function checkResourceAccess(resourceId, rawScope, pdfBits) {
|
|
|
1325
1652
|
* `requirement` at the origin route, but the CDN never gets a
|
|
1326
1653
|
* credential for them.
|
|
1327
1654
|
*
|
|
1328
|
-
* The URL
|
|
1329
|
-
*
|
|
1330
|
-
*
|
|
1331
|
-
*
|
|
1332
|
-
* 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.
|
|
1333
1659
|
*/
|
|
1334
1660
|
/**
|
|
1335
|
-
* Plane map: the planes each
|
|
1336
|
-
* 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
|
|
1337
1663
|
* plane is inherited (`'base'`) in the caller's scopes — the same condition
|
|
1338
1664
|
* the origin guard enforces (origin is the truth; this grant is the
|
|
1339
1665
|
* TTL-bounded optimization). Resources absent from this map (head, manifest,
|
|
@@ -1348,14 +1674,20 @@ function checkResourceAccess(resourceId, rawScope, pdfBits) {
|
|
|
1348
1674
|
* as every edge grant.
|
|
1349
1675
|
*/
|
|
1350
1676
|
const RESOURCE_PLANES = {
|
|
1351
|
-
"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,
|
|
1352
1681
|
"page-text": ["content"],
|
|
1353
1682
|
"page-geometry": ["content"],
|
|
1354
|
-
"page-render-annotated": ["content", "annotations"],
|
|
1355
1683
|
"page-annotations": ["annotations"],
|
|
1356
1684
|
"annotations-all": ["annotations"],
|
|
1685
|
+
form: ["forms"],
|
|
1686
|
+
"page-form": ["forms"],
|
|
1687
|
+
"annotations-export": ["annotations", "layout"],
|
|
1357
1688
|
layout: ["layout"],
|
|
1358
1689
|
metadata: ["metadata"],
|
|
1690
|
+
"metadata-custom": ["metadata"],
|
|
1359
1691
|
actions: ["actions"],
|
|
1360
1692
|
attachments: ["attachments"],
|
|
1361
1693
|
"attachment-files": ["attachments"]
|
|
@@ -1385,11 +1717,11 @@ function cdnCoverageForScope(rawScope, pdfBits, context) {
|
|
|
1385
1717
|
* effects to attach. Used by both:
|
|
1386
1718
|
* - the @cloudpdf/engine HttpClient (to actually route requests through
|
|
1387
1719
|
* the CDN edge when an /access response says it can)
|
|
1388
|
-
* - the smoke/diagnostic inspector (to
|
|
1720
|
+
* - the smoke/diagnostic inspector (to preview what the SDK would do
|
|
1389
1721
|
* for a given path, with no network)
|
|
1390
1722
|
*
|
|
1391
1723
|
* Keeping this in engine-core means cloud-side request routing and
|
|
1392
|
-
* server-side test fixtures use the
|
|
1724
|
+
* server-side test fixtures use the same algorithm. If a regression
|
|
1393
1725
|
* sneaks in, both ends break together.
|
|
1394
1726
|
*
|
|
1395
1727
|
* Selection rules
|
|
@@ -1403,7 +1735,7 @@ function cdnCoverageForScope(rawScope, pdfBits, context) {
|
|
|
1403
1735
|
* origin — that's how scope narrowing works at the edge: the
|
|
1404
1736
|
* server only emits overrides for resources the caller's scope
|
|
1405
1737
|
* grants.
|
|
1406
|
-
* 3. Find the
|
|
1738
|
+
* 3. Find the longest-matching `signedPathPolicies` entry (its
|
|
1407
1739
|
* `pathPrefix` is a prefix of the request path). Append its
|
|
1408
1740
|
* `queryParams`. No match falls back to `signedQueryParams` if
|
|
1409
1741
|
* the adapter emitted a global token.
|
|
@@ -1464,8 +1796,8 @@ function applyCdnAccess(input) {
|
|
|
1464
1796
|
* is a (longest) prefix of `path`. Returns null when no resource
|
|
1465
1797
|
* matches — admin routes, /access, /warm fall into this bucket.
|
|
1466
1798
|
*
|
|
1467
|
-
* Each cacheable resource has a
|
|
1468
|
-
*
|
|
1799
|
+
* Each cacheable resource has a distinct prefix, so longest-match is
|
|
1800
|
+
* deterministic.
|
|
1469
1801
|
*/
|
|
1470
1802
|
function resolveResourceIdForPath(path, docId, layerName) {
|
|
1471
1803
|
let best = null;
|
|
@@ -1547,33 +1879,22 @@ function unflatten(flat) {
|
|
|
1547
1879
|
/**
|
|
1548
1880
|
* Project image render options plus cache versions into the flat wire shape
|
|
1549
1881
|
* the render token encoder consumes. The output is a generic dotted-key map
|
|
1550
|
-
* (`viewport.kind`, `target.rect.
|
|
1882
|
+
* (`viewport.kind`, `target.rect.x`, …) — the schema and codec never need
|
|
1551
1883
|
* to know about specific option fields. Adding a new render option means
|
|
1552
1884
|
* extending `PageImageOptions`, the render query schemas, and
|
|
1553
1885
|
* `RenderTokenSchema.fields`; this function does not change.
|
|
1554
1886
|
*
|
|
1555
|
-
*
|
|
1556
|
-
*
|
|
1557
|
-
*
|
|
1558
|
-
*
|
|
1559
|
-
*
|
|
1560
|
-
* (`…/render/pages/` vs `…/render/annotated/pages/`) and passes
|
|
1561
|
-
* `annotationVersion` iff it chose the annotated one. Contradictory states
|
|
1562
|
-
* are unrepresentable; each family's query schema enforces its own pin
|
|
1563
|
-
* grammar structurally.
|
|
1564
|
-
*
|
|
1565
|
-
* Semantic validation (viewport-kind invariants, per-family pin presence,
|
|
1566
|
-
* rect coherence) lives in `PageRenderQuerySchema` /
|
|
1567
|
-
* `PageRenderAnnotatedQuerySchema` and runs when the resulting URL is
|
|
1568
|
-
* decoded server-side. Round-tripping (flatten → encode → decode →
|
|
1569
|
-
* 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.
|
|
1570
1892
|
*/
|
|
1571
1893
|
function renderImageOptionsToWire(options, versions) {
|
|
1572
|
-
const { includeAnnotations:
|
|
1894
|
+
const { includeAnnotations: _inThePath, includeFormFields: _alsoInThePath, ...wireOptions } = options;
|
|
1573
1895
|
return flatten({
|
|
1574
1896
|
...wireOptions,
|
|
1575
|
-
|
|
1576
|
-
...versions.annotationVersion !== void 0 ? { annotationVersion: versions.annotationVersion } : {}
|
|
1897
|
+
...versions
|
|
1577
1898
|
});
|
|
1578
1899
|
}
|
|
1579
1900
|
/**
|
|
@@ -1584,17 +1905,18 @@ function renderImageOptionsToToken(options, versions) {
|
|
|
1584
1905
|
return encodeRenderToken(renderImageOptionsToWire(options, versions));
|
|
1585
1906
|
}
|
|
1586
1907
|
/**
|
|
1587
|
-
*
|
|
1588
|
-
*
|
|
1589
|
-
*
|
|
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.
|
|
1590
1911
|
*/
|
|
1591
|
-
function pageRenderOptionsFromImageOptions(options
|
|
1912
|
+
function pageRenderOptionsFromImageOptions(options) {
|
|
1592
1913
|
return {
|
|
1593
1914
|
...options.target ? { target: options.target } : {},
|
|
1594
1915
|
...options.viewport ? { viewport: options.viewport } : {},
|
|
1595
1916
|
...options.rotation !== void 0 ? { rotation: options.rotation } : {},
|
|
1596
1917
|
...options.background !== void 0 ? { background: options.background } : {},
|
|
1597
|
-
includeAnnotations
|
|
1918
|
+
includeAnnotations: options.includeAnnotations ?? false,
|
|
1919
|
+
includeFormFields: options.includeFormFields ?? false
|
|
1598
1920
|
};
|
|
1599
1921
|
}
|
|
1600
1922
|
/**
|
|
@@ -1603,15 +1925,33 @@ function pageRenderOptionsFromImageOptions(options, includeAnnotations) {
|
|
|
1603
1925
|
* Mirrors {@link renderImageOptionsToWire}.
|
|
1604
1926
|
*/
|
|
1605
1927
|
function annotationAppearancesImageOptionsToWire(options, versions) {
|
|
1606
|
-
return
|
|
1607
|
-
...options,
|
|
1608
|
-
annotationVersion: versions.annotationVersion
|
|
1609
|
-
});
|
|
1928
|
+
return appearancesToWire(options, { annotationVersion: versions.annotationVersion });
|
|
1610
1929
|
}
|
|
1611
1930
|
/** Convenience: build the full encoded appearance render token in one call. */
|
|
1612
1931
|
function annotationAppearancesImageOptionsToToken(options, versions) {
|
|
1613
1932
|
return encodeAnnotationAppearancesRenderToken(annotationAppearancesImageOptionsToWire(options, versions));
|
|
1614
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
|
+
}
|
|
1615
1955
|
/**
|
|
1616
1956
|
* Strip image-encoding fields, leaving the worker-side
|
|
1617
1957
|
* `AnnotationAppearanceRenderOptions`. Pure shape transform consumed by the
|
|
@@ -1620,12 +1960,251 @@ function annotationAppearancesImageOptionsToToken(options, versions) {
|
|
|
1620
1960
|
*/
|
|
1621
1961
|
function annotationRenderOptionsFromImageOptions(options) {
|
|
1622
1962
|
return {
|
|
1623
|
-
...options.
|
|
1963
|
+
...options.viewport ? { viewport: options.viewport } : {},
|
|
1624
1964
|
...options.rotation !== void 0 ? { rotation: options.rotation } : {},
|
|
1625
1965
|
...options.modes ? { modes: options.modes } : {}
|
|
1626
1966
|
};
|
|
1627
1967
|
}
|
|
1628
1968
|
//#endregion
|
|
1629
|
-
|
|
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 };
|
|
1630
2209
|
|
|
1631
2210
|
//# sourceMappingURL=wire.js.map
|