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 @@ -10,10 +10,10 @@
"base-exception-class-name": "CloudPDFException",
"base-api-exception-class-name": "CloudPDFApiException"
},
"originGitCommit": "0606e988ebff3773183ef02e0a820c36b3a25f8d",
"originGitCommit": "622018abaf6e4578d1f4d8377982c48b92c9ced3",
"originGitCommitIsDirty": false,
"invokedBy": "ci",
"requestedVersion": "3.0.0-next.19",
"requestedVersion": "3.0.0-next.20",
"ciProvider": "github",
"sdkVersion": "3.0.0-next.19"
"sdkVersion": "3.0.0-next.20"
}
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ The official .NET SDK for the CloudPDF API.
- [Installation](#installation)
- [Reference](#reference)
- [Usage](#usage)
- [Environments](#environments)
- [Exception Handling](#exception-handling)
- [Advanced](#advanced)
- [Retries](#retries)
Expand Down Expand Up @@ -57,6 +58,19 @@ await client.Doc.ChangesAsync(
);
```

## Environments

This SDK allows you to configure different environments for API requests.

```csharp
using CloudPDF;

var client = new CloudPDFClient(clientOptions: new ClientOptions
{
BaseUrl = CloudPDFEnvironment.Saas
});
```

## Exception Handling

When the API returns a non-success status code (4xx or 5xx response), a subclass of the following error
Expand Down
8 changes: 4 additions & 4 deletions cloudpdf-generation.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"language": "csharp",
"canonicalVersion": "3.0.0-next.19",
"sdkVersion": "3.0.0-next.19",
"canonicalVersion": "3.0.0-next.20",
"sdkVersion": "3.0.0-next.20",
"source": {
"repository": "embedpdf/embed-pdf-viewer",
"openapi": "cloudpdf/contract/openapi.json",
"openapiSha256": "e88e02ed71f422ad08b2393abeda474e8dcf6707b6e753af74ba2f40da8e7d6b",
"gitCommit": "0606e988ebff3773183ef02e0a820c36b3a25f8d",
"openapiSha256": "47d739acb956ce8ba0c3990117e505be2e9406038d9e0cd1729608921a40b2d9",
"gitCommit": "622018abaf6e4578d1f4d8377982c48b92c9ced3",
"gitCommitIsDirty": false
},
"fern": {
Expand Down
234 changes: 231 additions & 3 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ await client.Grants.ListAsync(new ListGrantsRequest { TenantId = "tenantId" });
<dl>
<dd>

The returned id is what a link page or an embed opens. Mounted only when the deployment can sign (HS256 mode) — exchange mints session JWTs, so grants exist only where minting does.
The returned id is what a link page or an embed opens. Its scope gives only document permissions the caller holds itself, as tokens.issue does. Mounted only when the deployment can sign (HS256 mode) — exchange mints session JWTs, so grants exist only where minting does.
</dd>
</dl>
</dd>
Expand Down Expand Up @@ -1219,6 +1219,20 @@ await client.Documents.UpdateAsync(
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

An upload token commits only the documents it started; any other document answers 404.
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
Expand Down Expand Up @@ -1358,7 +1372,7 @@ await client.Documents.ThumbnailAsync(
<dl>
<dd>

This bounded origin-mediated fallback must only be used after documents.init returns upload.kind=proxy. Auto mode prefers a presigned object-store PUT whenever available.
This bounded origin-mediated fallback must only be used after documents.init returns upload.kind=proxy. Auto mode prefers a presigned object-store PUT whenever available. An upload token sends files only to the documents it started.
</dd>
</dl>
</dd>
Expand Down Expand Up @@ -1470,6 +1484,20 @@ await client.Documents.ImportFromAsync(
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

With an upload token, the document goes into the token's folder with the token's metadata, whatever the request says; contentLength must be within the token's maxBytes, and the token makes at most maxFiles documents (403 after). docId, idempotencyKey and dedupMode reuse-existing are refused (400): each could reach a document the token didn't make.
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
Expand Down Expand Up @@ -1836,7 +1864,7 @@ await client.Folders.MoveIntoAsync(
<dl>
<dd>

kind "tenant" requires the API token — authority mints only downward. Mounted only when the deployment can sign (HS256 mode); asymmetric deployments mint with their own private key.
Authority mints only downward: kind "doc" gives only document permissions the caller holds itself, kind "tenant" requires the API token, and kind "upload" requires docs.create instead of tokens.issue-doc, since an upload token can do only what docs.create allows. Mounted only when the deployment can sign (HS256 mode); asymmetric deployments mint with their own private key.
</dd>
</dl>
</dd>
Expand Down Expand Up @@ -2597,6 +2625,97 @@ await client.Doc.Attachments.ListAsync(
</dl>


</dd>
</dl>
</details>

## Doc Fonts
<details><summary><code>client.Doc.Fonts.<a href="/src/CloudPDF/Doc/Fonts/FontsClient.cs">ListAsync</a>(ListFontsRequest { ... }) -> WithRawResponseTask&lt;FontList&gt;</code></summary>
<dl>
<dd>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```csharp
await client.Doc.Fonts.ListAsync(new ListFontsRequest { DocId = "docId", LayerName = "layerName" });
```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**request:** `ListFontsRequest`

</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>

<details><summary><code>client.Doc.Fonts.<a href="/src/CloudPDF/Doc/Fonts/FontsClient.cs">ResolveAsync</a>(ResolveFontsRequest { ... }) -> WithRawResponseTask&lt;FontResolution&gt;</code></summary>
<dl>
<dd>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```csharp
await client.Doc.Fonts.ResolveAsync(
new ResolveFontsRequest
{
DocId = "docId",
LayerName = "layerName",
Body = new FontResolveRequest
{
Runs = new List<FontResolveRun>() { new FontResolveRun { Text = "text" } },
},
}
);
```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**request:** `ResolveFontsRequest`

</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>
Expand Down Expand Up @@ -4038,6 +4157,115 @@ await client.Doc.Versions.SignatureDigestAsync(
</dl>


</dd>
</dl>
</details>

## Doc Fonts Programs
<details><summary><code>client.Doc.Fonts.Programs.<a href="/src/CloudPDF/Doc/Fonts/Programs/ProgramsClient.cs">DownloadAsync</a>(DownloadProgramsRequest { ... }) -> WithRawResponseTask&lt;Stream&gt;</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

A document token needs any one of the listed capabilities: one that may write text in the document. A file the list says can't be downloaded (`canDownload: false`) is not found.
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```csharp
await client.Doc.Fonts.Programs.DownloadAsync(
new DownloadProgramsRequest
{
DocId = "docId",
LayerName = "layerName",
DisplayHash = "displayHash",
}
);
```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**request:** `DownloadProgramsRequest`

</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>

<details><summary><code>client.Doc.Fonts.Programs.<a href="/src/CloudPDF/Doc/Fonts/Programs/ProgramsClient.cs">GetAsync</a>(GetProgramsRequest { ... }) -> WithRawResponseTask&lt;FontProgramInfo&gt;</code></summary>
<dl>
<dd>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```csharp
await client.Doc.Fonts.Programs.GetAsync(
new GetProgramsRequest
{
DocId = "docId",
LayerName = "layerName",
DisplayHash = "displayHash",
}
);
```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**request:** `GetProgramsRequest`

</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>
Expand Down
Loading
Loading