@cloudpdf/sdk 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/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/documents/client/requests/DocumentsImportFromRequest.d.ts +12 -0
- package/dist/cjs/api/resources/documents/client/requests/DocumentsImportFromRequest.js +2 -0
- package/dist/cjs/api/resources/documents/client/requests/DocumentsInitRequest.d.ts +2 -0
- package/dist/cjs/api/resources/documents/client/requests/DocumentsInitRequest.js +1 -0
- package/dist/cjs/api/resources/documents/types/DocumentsImportFromRequestSource.d.ts +14 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/documents/client/requests/DocumentsImportFromRequest.d.mts +12 -0
- package/dist/esm/api/resources/documents/client/requests/DocumentsImportFromRequest.mjs +2 -0
- package/dist/esm/api/resources/documents/client/requests/DocumentsInitRequest.d.mts +2 -0
- package/dist/esm/api/resources/documents/client/requests/DocumentsInitRequest.mjs +1 -0
- package/dist/esm/api/resources/documents/types/DocumentsImportFromRequestSource.d.mts +14 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
|
|
|
43
43
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
44
44
|
"X-Fern-Language": "JavaScript",
|
|
45
45
|
"X-Fern-SDK-Name": "@cloudpdf/sdk",
|
|
46
|
-
"X-Fern-SDK-Version": "3.0.0-next.
|
|
47
|
-
"User-Agent": "@cloudpdf/sdk/3.0.0-next.
|
|
46
|
+
"X-Fern-SDK-Version": "3.0.0-next.8",
|
|
47
|
+
"User-Agent": "@cloudpdf/sdk/3.0.0-next.8",
|
|
48
48
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
49
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
50
50
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -11,24 +11,36 @@ import type * as CloudPDF from "../../../../index.js";
|
|
|
11
11
|
*/
|
|
12
12
|
export interface DocumentsImportFromRequest {
|
|
13
13
|
tenantId: string;
|
|
14
|
+
/** 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. */
|
|
14
15
|
source: CloudPDF.DocumentsImportFromRequestSource;
|
|
16
|
+
/** Integrity pins, enforced when present. When absent, the server-observed values become authoritative. */
|
|
15
17
|
expected?: DocumentsImportFromRequest.Expected;
|
|
16
18
|
metadata?: Record<string, unknown>;
|
|
19
|
+
/** Retrying with the same key resumes the same document rather than importing a second copy — including after a 502. */
|
|
17
20
|
idempotencyKey?: string;
|
|
21
|
+
/** 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. */
|
|
18
22
|
dedupMode?: DocumentsImportFromRequest.DedupMode;
|
|
19
23
|
docId?: string;
|
|
24
|
+
/** 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. */
|
|
20
25
|
mode?: DocumentsImportFromRequest.Mode;
|
|
21
26
|
}
|
|
22
27
|
export declare namespace DocumentsImportFromRequest {
|
|
28
|
+
/**
|
|
29
|
+
* Integrity pins, enforced when present. When absent, the server-observed values become authoritative.
|
|
30
|
+
*/
|
|
23
31
|
interface Expected {
|
|
32
|
+
/** Checked against the source's declared Content-Length before the transfer. */
|
|
24
33
|
sizeBytes?: number | undefined;
|
|
34
|
+
/** Checked against the server-observed digest after the transfer. Required when dedupMode is reuse-existing. */
|
|
25
35
|
sha256?: string | undefined;
|
|
26
36
|
}
|
|
37
|
+
/** 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. */
|
|
27
38
|
const DedupMode: {
|
|
28
39
|
readonly AlwaysCreate: "always-create";
|
|
29
40
|
readonly ReuseExisting: "reuse-existing";
|
|
30
41
|
};
|
|
31
42
|
type DedupMode = (typeof DedupMode)[keyof typeof DedupMode];
|
|
43
|
+
/** 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. */
|
|
32
44
|
const Mode: {
|
|
33
45
|
readonly Sync: "sync";
|
|
34
46
|
readonly Async: "async";
|
|
@@ -4,10 +4,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.DocumentsImportFromRequest = void 0;
|
|
5
5
|
var DocumentsImportFromRequest;
|
|
6
6
|
(function (DocumentsImportFromRequest) {
|
|
7
|
+
/** 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. */
|
|
7
8
|
DocumentsImportFromRequest.DedupMode = {
|
|
8
9
|
AlwaysCreate: "always-create",
|
|
9
10
|
ReuseExisting: "reuse-existing",
|
|
10
11
|
};
|
|
12
|
+
/** 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. */
|
|
11
13
|
DocumentsImportFromRequest.Mode = {
|
|
12
14
|
Sync: "sync",
|
|
13
15
|
Async: "async",
|
|
@@ -12,12 +12,14 @@ export interface DocumentsInitRequest {
|
|
|
12
12
|
contentSha256: string;
|
|
13
13
|
metadata?: Record<string, unknown>;
|
|
14
14
|
idempotencyKey?: string;
|
|
15
|
+
/** 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. */
|
|
15
16
|
dedupMode?: DocumentsInitRequest.DedupMode;
|
|
16
17
|
docId?: string;
|
|
17
18
|
uploadTtlSec?: number;
|
|
18
19
|
uploadPreference?: DocumentsInitRequest.UploadPreference;
|
|
19
20
|
}
|
|
20
21
|
export declare namespace DocumentsInitRequest {
|
|
22
|
+
/** 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. */
|
|
21
23
|
const DedupMode: {
|
|
22
24
|
readonly AlwaysCreate: "always-create";
|
|
23
25
|
readonly ReuseExisting: "reuse-existing";
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.DocumentsInitRequest = void 0;
|
|
5
5
|
var DocumentsInitRequest;
|
|
6
6
|
(function (DocumentsInitRequest) {
|
|
7
|
+
/** 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. */
|
|
7
8
|
DocumentsInitRequest.DedupMode = {
|
|
8
9
|
AlwaysCreate: "always-create",
|
|
9
10
|
ReuseExisting: "reuse-existing",
|
|
@@ -1,14 +1,27 @@
|
|
|
1
1
|
import type * as CloudPDF from "../../../index.js";
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* 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.
|
|
4
|
+
*/
|
|
5
|
+
export type DocumentsImportFromRequestSource =
|
|
6
|
+
/**
|
|
7
|
+
* 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. */
|
|
8
|
+
CloudPDF.DocumentsImportFromRequestSource.Url
|
|
9
|
+
/**
|
|
10
|
+
* 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. */
|
|
11
|
+
| CloudPDF.DocumentsImportFromRequestSource.Connection;
|
|
3
12
|
export declare namespace DocumentsImportFromRequestSource {
|
|
4
13
|
interface Url {
|
|
5
14
|
kind: "url";
|
|
15
|
+
/** The URL to fetch. Must be allowed by the deployment import policy (scheme, network range, size) and must declare a length. */
|
|
6
16
|
url: string;
|
|
7
17
|
}
|
|
8
18
|
interface Connection {
|
|
9
19
|
kind: "connection";
|
|
20
|
+
/** The operator-registered storage connection to read from. */
|
|
10
21
|
connectionId: string;
|
|
22
|
+
/** The object key to read, inside the connection's configured scope. At most 1024 UTF-8 bytes. */
|
|
11
23
|
key: string;
|
|
24
|
+
/** Pins a specific version of the object. Provider-interpreted (S3 VersionId, GCS generation, Azure version id); providers without versioning reject it. */
|
|
12
25
|
revision?: string | undefined;
|
|
13
26
|
}
|
|
14
27
|
}
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "3.0.0-next.
|
|
1
|
+
export declare const SDK_VERSION = "3.0.0-next.8";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
|
|
|
6
6
|
const headers = mergeHeaders({
|
|
7
7
|
"X-Fern-Language": "JavaScript",
|
|
8
8
|
"X-Fern-SDK-Name": "@cloudpdf/sdk",
|
|
9
|
-
"X-Fern-SDK-Version": "3.0.0-next.
|
|
10
|
-
"User-Agent": "@cloudpdf/sdk/3.0.0-next.
|
|
9
|
+
"X-Fern-SDK-Version": "3.0.0-next.8",
|
|
10
|
+
"User-Agent": "@cloudpdf/sdk/3.0.0-next.8",
|
|
11
11
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
12
12
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
13
13
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -11,24 +11,36 @@ import type * as CloudPDF from "../../../../index.mjs";
|
|
|
11
11
|
*/
|
|
12
12
|
export interface DocumentsImportFromRequest {
|
|
13
13
|
tenantId: string;
|
|
14
|
+
/** 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. */
|
|
14
15
|
source: CloudPDF.DocumentsImportFromRequestSource;
|
|
16
|
+
/** Integrity pins, enforced when present. When absent, the server-observed values become authoritative. */
|
|
15
17
|
expected?: DocumentsImportFromRequest.Expected;
|
|
16
18
|
metadata?: Record<string, unknown>;
|
|
19
|
+
/** Retrying with the same key resumes the same document rather than importing a second copy — including after a 502. */
|
|
17
20
|
idempotencyKey?: string;
|
|
21
|
+
/** 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. */
|
|
18
22
|
dedupMode?: DocumentsImportFromRequest.DedupMode;
|
|
19
23
|
docId?: string;
|
|
24
|
+
/** 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. */
|
|
20
25
|
mode?: DocumentsImportFromRequest.Mode;
|
|
21
26
|
}
|
|
22
27
|
export declare namespace DocumentsImportFromRequest {
|
|
28
|
+
/**
|
|
29
|
+
* Integrity pins, enforced when present. When absent, the server-observed values become authoritative.
|
|
30
|
+
*/
|
|
23
31
|
interface Expected {
|
|
32
|
+
/** Checked against the source's declared Content-Length before the transfer. */
|
|
24
33
|
sizeBytes?: number | undefined;
|
|
34
|
+
/** Checked against the server-observed digest after the transfer. Required when dedupMode is reuse-existing. */
|
|
25
35
|
sha256?: string | undefined;
|
|
26
36
|
}
|
|
37
|
+
/** 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. */
|
|
27
38
|
const DedupMode: {
|
|
28
39
|
readonly AlwaysCreate: "always-create";
|
|
29
40
|
readonly ReuseExisting: "reuse-existing";
|
|
30
41
|
};
|
|
31
42
|
type DedupMode = (typeof DedupMode)[keyof typeof DedupMode];
|
|
43
|
+
/** 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. */
|
|
32
44
|
const Mode: {
|
|
33
45
|
readonly Sync: "sync";
|
|
34
46
|
readonly Async: "async";
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
export var DocumentsImportFromRequest;
|
|
3
3
|
(function (DocumentsImportFromRequest) {
|
|
4
|
+
/** 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. */
|
|
4
5
|
DocumentsImportFromRequest.DedupMode = {
|
|
5
6
|
AlwaysCreate: "always-create",
|
|
6
7
|
ReuseExisting: "reuse-existing",
|
|
7
8
|
};
|
|
9
|
+
/** 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. */
|
|
8
10
|
DocumentsImportFromRequest.Mode = {
|
|
9
11
|
Sync: "sync",
|
|
10
12
|
Async: "async",
|
|
@@ -12,12 +12,14 @@ export interface DocumentsInitRequest {
|
|
|
12
12
|
contentSha256: string;
|
|
13
13
|
metadata?: Record<string, unknown>;
|
|
14
14
|
idempotencyKey?: string;
|
|
15
|
+
/** 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. */
|
|
15
16
|
dedupMode?: DocumentsInitRequest.DedupMode;
|
|
16
17
|
docId?: string;
|
|
17
18
|
uploadTtlSec?: number;
|
|
18
19
|
uploadPreference?: DocumentsInitRequest.UploadPreference;
|
|
19
20
|
}
|
|
20
21
|
export declare namespace DocumentsInitRequest {
|
|
22
|
+
/** 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. */
|
|
21
23
|
const DedupMode: {
|
|
22
24
|
readonly AlwaysCreate: "always-create";
|
|
23
25
|
readonly ReuseExisting: "reuse-existing";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
export var DocumentsInitRequest;
|
|
3
3
|
(function (DocumentsInitRequest) {
|
|
4
|
+
/** 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. */
|
|
4
5
|
DocumentsInitRequest.DedupMode = {
|
|
5
6
|
AlwaysCreate: "always-create",
|
|
6
7
|
ReuseExisting: "reuse-existing",
|
|
@@ -1,14 +1,27 @@
|
|
|
1
1
|
import type * as CloudPDF from "../../../index.mjs";
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* 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.
|
|
4
|
+
*/
|
|
5
|
+
export type DocumentsImportFromRequestSource =
|
|
6
|
+
/**
|
|
7
|
+
* 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. */
|
|
8
|
+
CloudPDF.DocumentsImportFromRequestSource.Url
|
|
9
|
+
/**
|
|
10
|
+
* 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. */
|
|
11
|
+
| CloudPDF.DocumentsImportFromRequestSource.Connection;
|
|
3
12
|
export declare namespace DocumentsImportFromRequestSource {
|
|
4
13
|
interface Url {
|
|
5
14
|
kind: "url";
|
|
15
|
+
/** The URL to fetch. Must be allowed by the deployment import policy (scheme, network range, size) and must declare a length. */
|
|
6
16
|
url: string;
|
|
7
17
|
}
|
|
8
18
|
interface Connection {
|
|
9
19
|
kind: "connection";
|
|
20
|
+
/** The operator-registered storage connection to read from. */
|
|
10
21
|
connectionId: string;
|
|
22
|
+
/** The object key to read, inside the connection's configured scope. At most 1024 UTF-8 bytes. */
|
|
11
23
|
key: string;
|
|
24
|
+
/** Pins a specific version of the object. Provider-interpreted (S3 VersionId, GCS generation, Azure version id); providers without versioning reject it. */
|
|
12
25
|
revision?: string | undefined;
|
|
13
26
|
}
|
|
14
27
|
}
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "3.0.0-next.
|
|
1
|
+
export declare const SDK_VERSION = "3.0.0-next.8";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "3.0.0-next.
|
|
1
|
+
export const SDK_VERSION = "3.0.0-next.8";
|