@cloudpdf/contract 3.0.0-next.13 → 3.0.0-next.14

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/index.js CHANGED
@@ -1,4 +1,9 @@
1
1
  // src/index.ts
2
+ import {
3
+ PageScaleInputSchema,
4
+ PageScaleResultSchema,
5
+ PageMeasurementViewportSchema
6
+ } from "@embedpdf/engine-core/wire";
2
7
  import {
3
8
  AnnotationListPageSnapshotSchema,
4
9
  AnnotationListSnapshotAllPagesSchema,
@@ -1400,6 +1405,40 @@ var docOperations = {
1400
1405
  404: { contentType: "application/json", schema: EngineErrorPayloadSchema }
1401
1406
  }
1402
1407
  },
1408
+ "doc.pages.viewports": {
1409
+ operationId: "doc.pages.viewports",
1410
+ title: "Read measurement viewports",
1411
+ summary: "Read page measurement viewports in drawing order from the current layer.",
1412
+ method: "GET",
1413
+ path: wireTemplates.layerPageViewports,
1414
+ credentials: docCredentials,
1415
+ scope: [],
1416
+ docCapabilities: ["doc.open"],
1417
+ requestHeaders: [documentPasswordHeader],
1418
+ params: DocPageParamsSchema,
1419
+ responses: {
1420
+ 200: { contentType: "application/json", schema: z.array(PageMeasurementViewportSchema) },
1421
+ 404: { contentType: "application/json", schema: EngineErrorPayloadSchema }
1422
+ }
1423
+ },
1424
+ "doc.pages.setScale": {
1425
+ operationId: "doc.pages.setScale",
1426
+ title: "Set page measurement scale",
1427
+ summary: "Upsert or remove EmbedPDF calibration while preserving foreign viewports. Existing annotation scales are unchanged.",
1428
+ method: "PUT",
1429
+ path: wireTemplates.layerPageScale,
1430
+ credentials: docCredentials,
1431
+ scope: [],
1432
+ docCapabilities: ["doc.annotate.modify"],
1433
+ requestHeaders: [documentPasswordHeader],
1434
+ params: DocPageParamsSchema,
1435
+ body: { contentType: "application/json", schema: PageScaleInputSchema },
1436
+ responses: {
1437
+ 200: { contentType: "application/json", schema: PageScaleResultSchema },
1438
+ 400: { contentType: "application/json", schema: EngineErrorPayloadSchema },
1439
+ 404: { contentType: "application/json", schema: EngineErrorPayloadSchema }
1440
+ }
1441
+ },
1403
1442
  "doc.pages.move": {
1404
1443
  operationId: "doc.pages.move",
1405
1444
  title: "Move pages",