Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .fern/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
"homepage": "https://www.cloudpdf.com"
}
},
"originGitCommit": "32635f40577b214f6a6b3189a2271425c3a574fd",
"originGitCommit": "1345fb7a45ee660a352774d29decce25cb54b8ea",
"originGitCommitIsDirty": false,
"invokedBy": "ci",
"requestedVersion": "3.0.0-alpha.6",
"requestedVersion": "3.0.0-alpha.7",
"ciProvider": "github",
"sdkVersion": "3.0.0-alpha.6"
"sdkVersion": "3.0.0-alpha.7"
}
8 changes: 4 additions & 4 deletions cloudpdf-generation.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"language": "php",
"canonicalVersion": "3.0.0-next.6",
"sdkVersion": "3.0.0-alpha.6",
"canonicalVersion": "3.0.0-next.7",
"sdkVersion": "3.0.0-alpha.7",
"source": {
"repository": "embedpdf/embed-pdf-viewer",
"openapi": "cloudpdf/contract/openapi.json",
"openapiSha256": "b3e236a932673e27e05825352e1bc3675369d7505040bf7d7760e542aae8d38d",
"gitCommit": "32635f40577b214f6a6b3189a2271425c3a574fd",
"openapiSha256": "f6fc610bfd193f278a7e8ec063d9e96b8fef86bdec7ade5e7bc4b19879673147",
"gitCommit": "1345fb7a45ee660a352774d29decce25cb54b8ea",
"gitCommitIsDirty": false
},
"fern": {
Expand Down
12 changes: 6 additions & 6 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -1635,15 +1635,15 @@ $client->documents->importFrom(
<dl>
<dd>

**$source:** `DocumentsImportFromRequestSource`
**$source:** `DocumentsImportFromRequestSource` — 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.

</dd>
</dl>

<dl>
<dd>

**$expected:** `?DocumentsImportFromRequestExpected`
**$expected:** `?DocumentsImportFromRequestExpected` — Integrity pins, enforced when present. When absent, the server-observed values become authoritative.

</dd>
</dl>
Expand All @@ -1659,15 +1659,15 @@ $client->documents->importFrom(
<dl>
<dd>

**$idempotencyKey:** `?string`
**$idempotencyKey:** `?string` — Retrying with the same key resumes the same document rather than importing a second copy — including after a 502.

</dd>
</dl>

<dl>
<dd>

**$dedupMode:** `?string`
**$dedupMode:** `?string` — 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.

</dd>
</dl>
Expand All @@ -1683,7 +1683,7 @@ $client->documents->importFrom(
<dl>
<dd>

**$mode:** `?string`
**$mode:** `?string` — 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.

</dd>
</dl>
Expand Down Expand Up @@ -1769,7 +1769,7 @@ $client->documents->init(
<dl>
<dd>

**$dedupMode:** `?string`
**$dedupMode:** `?string` — 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.

</dd>
</dl>
Expand Down
4 changes: 2 additions & 2 deletions src/CloudPDFClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ public function __construct(
$defaultHeaders = [
'X-Fern-Language' => 'PHP',
'X-Fern-SDK-Name' => 'CloudPDF',
'X-Fern-SDK-Version' => '3.0.0-alpha.6',
'User-Agent' => 'cloudpdf/sdk/3.0.0-alpha.6',
'X-Fern-SDK-Version' => '3.0.0-alpha.7',
'User-Agent' => 'cloudpdf/sdk/3.0.0-alpha.7',
];
if ($token != null) {
$defaultHeaders['Authorization'] = "Bearer $token";
Expand Down
10 changes: 5 additions & 5 deletions src/Documents/Requests/DocumentsImportFromRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
class DocumentsImportFromRequest extends JsonSerializableType
{
/**
* @var DocumentsImportFromRequestSource $source
* @var DocumentsImportFromRequestSource $source 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.
*/
#[JsonProperty('source')]
public DocumentsImportFromRequestSource $source;

/**
* @var ?DocumentsImportFromRequestExpected $expected
* @var ?DocumentsImportFromRequestExpected $expected Integrity pins, enforced when present. When absent, the server-observed values become authoritative.
*/
#[JsonProperty('expected')]
public ?DocumentsImportFromRequestExpected $expected;
Expand All @@ -31,13 +31,13 @@ class DocumentsImportFromRequest extends JsonSerializableType
public ?array $metadata;

/**
* @var ?string $idempotencyKey
* @var ?string $idempotencyKey Retrying with the same key resumes the same document rather than importing a second copy — including after a 502.
*/
#[JsonProperty('idempotencyKey')]
public ?string $idempotencyKey;

/**
* @var ?value-of<DocumentsImportFromRequestDedupMode> $dedupMode
* @var ?value-of<DocumentsImportFromRequestDedupMode> $dedupMode 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.
*/
#[JsonProperty('dedupMode')]
public ?string $dedupMode;
Expand All @@ -49,7 +49,7 @@ class DocumentsImportFromRequest extends JsonSerializableType
public ?string $docId;

/**
* @var ?value-of<DocumentsImportFromRequestMode> $mode
* @var ?value-of<DocumentsImportFromRequestMode> $mode 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.
*/
#[JsonProperty('mode')]
public ?string $mode;
Expand Down
2 changes: 1 addition & 1 deletion src/Documents/Requests/DocumentsInitRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class DocumentsInitRequest extends JsonSerializableType
public ?string $idempotencyKey;

/**
* @var ?value-of<DocumentsInitRequestDedupMode> $dedupMode
* @var ?value-of<DocumentsInitRequestDedupMode> $dedupMode 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.
*/
#[JsonProperty('dedupMode')]
public ?string $dedupMode;
Expand Down
7 changes: 5 additions & 2 deletions src/Documents/Types/DocumentsImportFromRequestExpected.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,19 @@
use CloudPDF\Core\Json\JsonSerializableType;
use CloudPDF\Core\Json\JsonProperty;

/**
* Integrity pins, enforced when present. When absent, the server-observed values become authoritative.
*/
class DocumentsImportFromRequestExpected extends JsonSerializableType
{
/**
* @var ?int $sizeBytes
* @var ?int $sizeBytes Checked against the source's declared Content-Length before the transfer.
*/
#[JsonProperty('sizeBytes')]
public ?int $sizeBytes;

/**
* @var ?string $sha256
* @var ?string $sha256 Checked against the server-observed digest after the transfer. Required when dedupMode is reuse-existing.
*/
#[JsonProperty('sha256')]
public ?string $sha256;
Expand Down
3 changes: 3 additions & 0 deletions src/Documents/Types/DocumentsImportFromRequestSource.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
use CloudPDF\Core\Json\JsonSerializableType;
use Exception;

/**
* 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.
*/
class DocumentsImportFromRequestSource extends JsonSerializableType
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,25 @@
use CloudPDF\Core\Json\JsonSerializableType;
use CloudPDF\Core\Json\JsonProperty;

/**
* 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.
*/
class DocumentsImportFromRequestSourceConnection extends JsonSerializableType
{
/**
* @var string $connectionId
* @var string $connectionId The operator-registered storage connection to read from.
*/
#[JsonProperty('connectionId')]
public string $connectionId;

/**
* @var string $key
* @var string $key The object key to read, inside the connection's configured scope. At most 1024 UTF-8 bytes.
*/
#[JsonProperty('key')]
public string $key;

/**
* @var ?string $revision
* @var ?string $revision Pins a specific version of the object. Provider-interpreted (S3 VersionId, GCS generation, Azure version id); providers without versioning reject it.
*/
#[JsonProperty('revision')]
public ?string $revision;
Expand Down
5 changes: 4 additions & 1 deletion src/Documents/Types/DocumentsImportFromRequestSourceUrl.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@
use CloudPDF\Core\Json\JsonSerializableType;
use CloudPDF\Core\Json\JsonProperty;

/**
* 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.
*/
class DocumentsImportFromRequestSourceUrl extends JsonSerializableType
{
/**
* @var string $url
* @var string $url The URL to fetch. Must be allowed by the deployment import policy (scheme, network range, size) and must declare a length.
*/
#[JsonProperty('url')]
public string $url;
Expand Down
Loading