@cloudpdf/contract 3.0.0-next.6 → 3.0.0-next.8

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/openapi.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "openapi": "3.1.0",
3
3
  "info": {
4
4
  "title": "CloudPDF Engine API",
5
- "version": "3.0.0-next.6",
5
+ "version": "3.0.0-next.8",
6
6
  "description": "The backend-callable surface of the CloudPDF document engine: deployment and tenant administration plus the document operations (reads, annotations, forms, page operations, redaction, download). Interactive viewing goes through the CloudPDF viewer SDKs, whose session protocol is deliberately not part of this API. Generated from the @cloudpdf/contract operation registry — do not edit by hand.",
7
7
  "license": {
8
8
  "name": "Apache-2.0",
@@ -4107,7 +4107,8 @@
4107
4107
  },
4108
4108
  "dedupMode": {
4109
4109
  "type": "string",
4110
- "enum": ["always-create", "reuse-existing"]
4110
+ "enum": ["always-create", "reuse-existing"],
4111
+ "description": "always-create (default) creates a new document every time. reuse-existing returns a document that already holds the same content instead of storing it twice."
4111
4112
  },
4112
4113
  "docId": {
4113
4114
  "type": "string",
@@ -4510,11 +4511,13 @@
4510
4511
  "url": {
4511
4512
  "type": "string",
4512
4513
  "format": "uri",
4513
- "maxLength": 8192
4514
+ "maxLength": 8192,
4515
+ "description": "The URL to fetch. Must be allowed by the deployment import policy (scheme, network range, size) and must declare a length."
4514
4516
  }
4515
4517
  },
4516
4518
  "required": ["kind", "url"],
4517
- "additionalProperties": false
4519
+ "additionalProperties": false,
4520
+ "description": "The caller supplies the authority: a presigned S3/GCS/Azure/R2/MinIO GET, or any HTTPS endpoint the deployment import policy allows. The URL is a capability — treat it as a secret. CloudPDF never echoes its query string back in errors, logs, or stored failure reasons."
4518
4521
  },
4519
4522
  {
4520
4523
  "type": "object",
@@ -4526,47 +4529,57 @@
4526
4529
  "connectionId": {
4527
4530
  "type": "string",
4528
4531
  "minLength": 1,
4529
- "maxLength": 128
4532
+ "maxLength": 128,
4533
+ "description": "The operator-registered storage connection to read from."
4530
4534
  },
4531
4535
  "key": {
4532
4536
  "type": "string",
4533
- "minLength": 1
4537
+ "minLength": 1,
4538
+ "description": "The object key to read, inside the connection's configured scope. At most 1024 UTF-8 bytes."
4534
4539
  },
4535
4540
  "revision": {
4536
4541
  "type": "string",
4537
4542
  "minLength": 1,
4538
- "maxLength": 1024
4543
+ "maxLength": 1024,
4544
+ "description": "Pins a specific version of the object. Provider-interpreted (S3 VersionId, GCS generation, Azure version id); providers without versioning reject it."
4539
4545
  }
4540
4546
  },
4541
4547
  "required": ["kind", "connectionId", "key"],
4542
- "additionalProperties": false
4548
+ "additionalProperties": false,
4549
+ "description": "The operator pre-registered the authority: the request names a connection and a key inside it. Which provider backs the connection (S3, GCS, Azure Blob, filesystem, ...) is deployment configuration, never wire surface."
4543
4550
  }
4544
- ]
4551
+ ],
4552
+ "description": "Where CloudPDF pulls the bytes from. The two shapes differ in WHO supplies the authority to read, not in which storage vendor holds the file."
4545
4553
  },
4546
4554
  "expected": {
4547
4555
  "type": "object",
4548
4556
  "properties": {
4549
4557
  "sizeBytes": {
4550
4558
  "type": "integer",
4551
- "minimum": 1
4559
+ "minimum": 1,
4560
+ "description": "Checked against the source's declared Content-Length before the transfer."
4552
4561
  },
4553
4562
  "sha256": {
4554
4563
  "type": "string",
4555
- "pattern": "^[0-9a-f]{64}$"
4564
+ "pattern": "^[0-9a-f]{64}$",
4565
+ "description": "Checked against the server-observed digest after the transfer. Required when dedupMode is reuse-existing."
4556
4566
  }
4557
4567
  },
4558
- "additionalProperties": false
4568
+ "additionalProperties": false,
4569
+ "description": "Integrity pins, enforced when present. When absent, the server-observed values become authoritative."
4559
4570
  },
4560
4571
  "metadata": {
4561
4572
  "type": "object",
4562
4573
  "additionalProperties": {}
4563
4574
  },
4564
4575
  "idempotencyKey": {
4565
- "type": "string"
4576
+ "type": "string",
4577
+ "description": "Retrying with the same key resumes the same document rather than importing a second copy — including after a 502."
4566
4578
  },
4567
4579
  "dedupMode": {
4568
4580
  "type": "string",
4569
- "enum": ["always-create", "reuse-existing"]
4581
+ "enum": ["always-create", "reuse-existing"],
4582
+ "description": "always-create (default) creates a new document every time. reuse-existing returns a document that already holds the same content instead of storing it twice."
4570
4583
  },
4571
4584
  "docId": {
4572
4585
  "type": "string",
@@ -4574,7 +4587,8 @@
4574
4587
  },
4575
4588
  "mode": {
4576
4589
  "type": "string",
4577
- "enum": ["sync", "async"]
4590
+ "enum": ["sync", "async"],
4591
+ "description": "sync (default) holds the response open for the whole transfer. async answers 202 with the document pending and transfers in the background; it requires a connection source, and filesystem connections additionally require expected.sha256."
4578
4592
  }
4579
4593
  },
4580
4594
  "required": ["source"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudpdf/contract",
3
- "version": "3.0.0-next.6",
3
+ "version": "3.0.0-next.8",
4
4
  "private": false,
5
5
  "description": "The CloudPDF engine contract: operation registry, Zod schemas, and OpenAPI emitter for every backend-callable surface — used by @cloudpdf/server and the generated @cloudpdf/sdk, and the source of the committed openapi.json.",
6
6
  "type": "module",
@@ -42,7 +42,7 @@
42
42
  "dependencies": {
43
43
  "zod": "^3.23.8",
44
44
  "zod-to-json-schema": "^3.24.6",
45
- "@embedpdf/engine-core": "3.0.0-next.6"
45
+ "@embedpdf/engine-core": "3.0.0-next.8"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@types/node": "latest",