@cloudpdf/sdk 3.0.0-next.8 → 3.0.0-next.9

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.
Files changed (78) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/doc/resources/pages/client/Client.d.ts +53 -0
  3. package/dist/cjs/api/resources/doc/resources/pages/client/Client.js +182 -0
  4. package/dist/cjs/api/resources/doc/resources/pages/client/requests/ExtractPagesRequest.d.ts +20 -0
  5. package/dist/cjs/api/resources/doc/resources/pages/client/requests/ExtractPagesRequest.js +3 -0
  6. package/dist/cjs/api/resources/doc/resources/pages/client/requests/InsertBlankPagesRequest.d.ts +18 -0
  7. package/dist/cjs/api/resources/doc/resources/pages/client/requests/InsertBlankPagesRequest.js +3 -0
  8. package/dist/cjs/api/resources/doc/resources/pages/client/requests/InsertPagesRequest.d.ts +16 -0
  9. package/dist/cjs/api/resources/doc/resources/pages/client/requests/InsertPagesRequest.js +3 -0
  10. package/dist/cjs/api/resources/doc/resources/pages/client/requests/index.d.ts +3 -0
  11. package/dist/cjs/api/types/DocPagesExtract400Response.d.ts +34 -0
  12. package/dist/cjs/api/types/DocPagesExtract400Response.js +31 -0
  13. package/dist/cjs/api/types/DocPagesExtract404Response.d.ts +34 -0
  14. package/dist/cjs/api/types/DocPagesExtract404Response.js +31 -0
  15. package/dist/cjs/api/types/DocPagesExtractRequest.d.ts +1 -0
  16. package/dist/cjs/api/types/DocPagesExtractRequest.js +3 -0
  17. package/dist/cjs/api/types/DocPagesInsert200Response.d.ts +49 -0
  18. package/dist/cjs/api/types/DocPagesInsert200Response.js +3 -0
  19. package/dist/cjs/api/types/DocPagesInsert200ResponseMetaAffectedPagesItemWeakAnnotationState.d.ts +11 -0
  20. package/dist/cjs/api/types/DocPagesInsert200ResponseMetaAffectedPagesItemWeakAnnotationState.js +3 -0
  21. package/dist/cjs/api/types/DocPagesInsert400Response.d.ts +34 -0
  22. package/dist/cjs/api/types/DocPagesInsert400Response.js +31 -0
  23. package/dist/cjs/api/types/DocPagesInsert404Response.d.ts +34 -0
  24. package/dist/cjs/api/types/DocPagesInsert404Response.js +31 -0
  25. package/dist/cjs/api/types/DocPagesInsertBlank200Response.d.ts +49 -0
  26. package/dist/cjs/api/types/DocPagesInsertBlank200Response.js +3 -0
  27. package/dist/cjs/api/types/DocPagesInsertBlank200ResponseMetaAffectedPagesItemWeakAnnotationState.d.ts +11 -0
  28. package/dist/cjs/api/types/DocPagesInsertBlank200ResponseMetaAffectedPagesItemWeakAnnotationState.js +3 -0
  29. package/dist/cjs/api/types/DocPagesInsertBlank400Response.d.ts +34 -0
  30. package/dist/cjs/api/types/DocPagesInsertBlank400Response.js +31 -0
  31. package/dist/cjs/api/types/DocPagesInsertBlank404Response.d.ts +34 -0
  32. package/dist/cjs/api/types/DocPagesInsertBlank404Response.js +31 -0
  33. package/dist/cjs/api/types/DocPagesInsertBlankRequest.d.ts +1 -0
  34. package/dist/cjs/api/types/DocPagesInsertBlankRequest.js +3 -0
  35. package/dist/cjs/api/types/index.d.ts +12 -0
  36. package/dist/cjs/api/types/index.js +12 -0
  37. package/dist/cjs/version.d.ts +1 -1
  38. package/dist/cjs/version.js +1 -1
  39. package/dist/esm/BaseClient.mjs +2 -2
  40. package/dist/esm/api/resources/doc/resources/pages/client/Client.d.mts +53 -0
  41. package/dist/esm/api/resources/doc/resources/pages/client/Client.mjs +182 -0
  42. package/dist/esm/api/resources/doc/resources/pages/client/requests/ExtractPagesRequest.d.mts +20 -0
  43. package/dist/esm/api/resources/doc/resources/pages/client/requests/ExtractPagesRequest.mjs +2 -0
  44. package/dist/esm/api/resources/doc/resources/pages/client/requests/InsertBlankPagesRequest.d.mts +18 -0
  45. package/dist/esm/api/resources/doc/resources/pages/client/requests/InsertBlankPagesRequest.mjs +2 -0
  46. package/dist/esm/api/resources/doc/resources/pages/client/requests/InsertPagesRequest.d.mts +16 -0
  47. package/dist/esm/api/resources/doc/resources/pages/client/requests/InsertPagesRequest.mjs +2 -0
  48. package/dist/esm/api/resources/doc/resources/pages/client/requests/index.d.mts +3 -0
  49. package/dist/esm/api/types/DocPagesExtract400Response.d.mts +34 -0
  50. package/dist/esm/api/types/DocPagesExtract400Response.mjs +28 -0
  51. package/dist/esm/api/types/DocPagesExtract404Response.d.mts +34 -0
  52. package/dist/esm/api/types/DocPagesExtract404Response.mjs +28 -0
  53. package/dist/esm/api/types/DocPagesExtractRequest.d.mts +1 -0
  54. package/dist/esm/api/types/DocPagesExtractRequest.mjs +2 -0
  55. package/dist/esm/api/types/DocPagesInsert200Response.d.mts +49 -0
  56. package/dist/esm/api/types/DocPagesInsert200Response.mjs +2 -0
  57. package/dist/esm/api/types/DocPagesInsert200ResponseMetaAffectedPagesItemWeakAnnotationState.d.mts +11 -0
  58. package/dist/esm/api/types/DocPagesInsert200ResponseMetaAffectedPagesItemWeakAnnotationState.mjs +2 -0
  59. package/dist/esm/api/types/DocPagesInsert400Response.d.mts +34 -0
  60. package/dist/esm/api/types/DocPagesInsert400Response.mjs +28 -0
  61. package/dist/esm/api/types/DocPagesInsert404Response.d.mts +34 -0
  62. package/dist/esm/api/types/DocPagesInsert404Response.mjs +28 -0
  63. package/dist/esm/api/types/DocPagesInsertBlank200Response.d.mts +49 -0
  64. package/dist/esm/api/types/DocPagesInsertBlank200Response.mjs +2 -0
  65. package/dist/esm/api/types/DocPagesInsertBlank200ResponseMetaAffectedPagesItemWeakAnnotationState.d.mts +11 -0
  66. package/dist/esm/api/types/DocPagesInsertBlank200ResponseMetaAffectedPagesItemWeakAnnotationState.mjs +2 -0
  67. package/dist/esm/api/types/DocPagesInsertBlank400Response.d.mts +34 -0
  68. package/dist/esm/api/types/DocPagesInsertBlank400Response.mjs +28 -0
  69. package/dist/esm/api/types/DocPagesInsertBlank404Response.d.mts +34 -0
  70. package/dist/esm/api/types/DocPagesInsertBlank404Response.mjs +28 -0
  71. package/dist/esm/api/types/DocPagesInsertBlankRequest.d.mts +1 -0
  72. package/dist/esm/api/types/DocPagesInsertBlankRequest.mjs +2 -0
  73. package/dist/esm/api/types/index.d.mts +12 -0
  74. package/dist/esm/api/types/index.mjs +12 -0
  75. package/dist/esm/version.d.mts +1 -1
  76. package/dist/esm/version.mjs +1 -1
  77. package/package.json +1 -1
  78. package/reference.md +207 -0
@@ -0,0 +1,34 @@
1
+ export interface DocPagesInsert404Response {
2
+ name: DocPagesInsert404Response.Name;
3
+ code: DocPagesInsert404Response.Code;
4
+ message: string;
5
+ details?: Record<string, unknown> | undefined;
6
+ }
7
+ export declare namespace DocPagesInsert404Response {
8
+ const Name: {
9
+ readonly EngineError: "EngineError";
10
+ };
11
+ type Name = (typeof Name)[keyof typeof Name];
12
+ const Code: {
13
+ readonly Unknown: "Unknown";
14
+ readonly InvalidArg: "InvalidArg";
15
+ readonly DocNotOpen: "DocNotOpen";
16
+ readonly DocOpenFailed: "DocOpenFailed";
17
+ readonly DocPasswordRequired: "DocPasswordRequired";
18
+ readonly DocPasswordIncorrect: "DocPasswordIncorrect";
19
+ readonly SharePasswordRequired: "SharePasswordRequired";
20
+ readonly Aborted: "Aborted";
21
+ readonly Network: "Network";
22
+ readonly Unauthenticated: "Unauthenticated";
23
+ readonly Forbidden: "Forbidden";
24
+ readonly NotFound: "NotFound";
25
+ readonly WireFormat: "WireFormat";
26
+ readonly RuntimeUnavailable: "RuntimeUnavailable";
27
+ readonly InvalidReference: "InvalidReference";
28
+ readonly WeakAnnotationSessionConflict: "WeakAnnotationSessionConflict";
29
+ readonly LayerVersionConflict: "LayerVersionConflict";
30
+ readonly NotImplemented: "NotImplemented";
31
+ readonly MalformedPdf: "MalformedPdf";
32
+ };
33
+ type Code = (typeof Code)[keyof typeof Code];
34
+ }
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.DocPagesInsert404Response = void 0;
5
+ var DocPagesInsert404Response;
6
+ (function (DocPagesInsert404Response) {
7
+ DocPagesInsert404Response.Name = {
8
+ EngineError: "EngineError",
9
+ };
10
+ DocPagesInsert404Response.Code = {
11
+ Unknown: "Unknown",
12
+ InvalidArg: "InvalidArg",
13
+ DocNotOpen: "DocNotOpen",
14
+ DocOpenFailed: "DocOpenFailed",
15
+ DocPasswordRequired: "DocPasswordRequired",
16
+ DocPasswordIncorrect: "DocPasswordIncorrect",
17
+ SharePasswordRequired: "SharePasswordRequired",
18
+ Aborted: "Aborted",
19
+ Network: "Network",
20
+ Unauthenticated: "Unauthenticated",
21
+ Forbidden: "Forbidden",
22
+ NotFound: "NotFound",
23
+ WireFormat: "WireFormat",
24
+ RuntimeUnavailable: "RuntimeUnavailable",
25
+ InvalidReference: "InvalidReference",
26
+ WeakAnnotationSessionConflict: "WeakAnnotationSessionConflict",
27
+ LayerVersionConflict: "LayerVersionConflict",
28
+ NotImplemented: "NotImplemented",
29
+ MalformedPdf: "MalformedPdf",
30
+ };
31
+ })(DocPagesInsert404Response || (exports.DocPagesInsert404Response = DocPagesInsert404Response = {}));
@@ -0,0 +1,49 @@
1
+ import type * as CloudPDF from "../index.js";
2
+ export interface DocPagesInsertBlank200Response {
3
+ meta: DocPagesInsertBlank200Response.Meta;
4
+ /** Accepts any additional properties */
5
+ [key: string]: any;
6
+ }
7
+ export declare namespace DocPagesInsertBlank200Response {
8
+ interface Meta {
9
+ affectedPages: Meta.AffectedPages.Item[];
10
+ cacheDelta: Meta.CacheDelta | null;
11
+ }
12
+ namespace Meta {
13
+ type AffectedPages = AffectedPages.Item[];
14
+ namespace AffectedPages {
15
+ interface Item {
16
+ pageObjectNumber: number;
17
+ revision: Item.Revision;
18
+ weakAnnotationState: CloudPDF.DocPagesInsertBlank200ResponseMetaAffectedPagesItemWeakAnnotationState;
19
+ }
20
+ namespace Item {
21
+ interface Revision {
22
+ docSessionId: string;
23
+ pageObjectNumber: number;
24
+ generation: number;
25
+ }
26
+ }
27
+ }
28
+ interface CacheDelta {
29
+ previousDocVersion: number;
30
+ docVersion: number;
31
+ pages: CacheDelta.Pages.Item[];
32
+ }
33
+ namespace CacheDelta {
34
+ type Pages = Pages.Item[];
35
+ namespace Pages {
36
+ interface Item {
37
+ pageObjectNumber: number;
38
+ cache: Item.Cache;
39
+ }
40
+ namespace Item {
41
+ interface Cache {
42
+ contentVersion: number;
43
+ annotationVersion: number;
44
+ }
45
+ }
46
+ }
47
+ }
48
+ }
49
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,11 @@
1
+ import type * as CloudPDF from "../index.js";
2
+ export type DocPagesInsertBlank200ResponseMetaAffectedPagesItemWeakAnnotationState = CloudPDF.DocPagesInsertBlank200ResponseMetaAffectedPagesItemWeakAnnotationState.Unknown | CloudPDF.DocPagesInsertBlank200ResponseMetaAffectedPagesItemWeakAnnotationState.Known;
3
+ export declare namespace DocPagesInsertBlank200ResponseMetaAffectedPagesItemWeakAnnotationState {
4
+ interface Unknown {
5
+ kind: "unknown";
6
+ }
7
+ interface Known {
8
+ kind: "known";
9
+ hasAnyWeakAnnotations: boolean;
10
+ }
11
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,34 @@
1
+ export interface DocPagesInsertBlank400Response {
2
+ name: DocPagesInsertBlank400Response.Name;
3
+ code: DocPagesInsertBlank400Response.Code;
4
+ message: string;
5
+ details?: Record<string, unknown> | undefined;
6
+ }
7
+ export declare namespace DocPagesInsertBlank400Response {
8
+ const Name: {
9
+ readonly EngineError: "EngineError";
10
+ };
11
+ type Name = (typeof Name)[keyof typeof Name];
12
+ const Code: {
13
+ readonly Unknown: "Unknown";
14
+ readonly InvalidArg: "InvalidArg";
15
+ readonly DocNotOpen: "DocNotOpen";
16
+ readonly DocOpenFailed: "DocOpenFailed";
17
+ readonly DocPasswordRequired: "DocPasswordRequired";
18
+ readonly DocPasswordIncorrect: "DocPasswordIncorrect";
19
+ readonly SharePasswordRequired: "SharePasswordRequired";
20
+ readonly Aborted: "Aborted";
21
+ readonly Network: "Network";
22
+ readonly Unauthenticated: "Unauthenticated";
23
+ readonly Forbidden: "Forbidden";
24
+ readonly NotFound: "NotFound";
25
+ readonly WireFormat: "WireFormat";
26
+ readonly RuntimeUnavailable: "RuntimeUnavailable";
27
+ readonly InvalidReference: "InvalidReference";
28
+ readonly WeakAnnotationSessionConflict: "WeakAnnotationSessionConflict";
29
+ readonly LayerVersionConflict: "LayerVersionConflict";
30
+ readonly NotImplemented: "NotImplemented";
31
+ readonly MalformedPdf: "MalformedPdf";
32
+ };
33
+ type Code = (typeof Code)[keyof typeof Code];
34
+ }
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.DocPagesInsertBlank400Response = void 0;
5
+ var DocPagesInsertBlank400Response;
6
+ (function (DocPagesInsertBlank400Response) {
7
+ DocPagesInsertBlank400Response.Name = {
8
+ EngineError: "EngineError",
9
+ };
10
+ DocPagesInsertBlank400Response.Code = {
11
+ Unknown: "Unknown",
12
+ InvalidArg: "InvalidArg",
13
+ DocNotOpen: "DocNotOpen",
14
+ DocOpenFailed: "DocOpenFailed",
15
+ DocPasswordRequired: "DocPasswordRequired",
16
+ DocPasswordIncorrect: "DocPasswordIncorrect",
17
+ SharePasswordRequired: "SharePasswordRequired",
18
+ Aborted: "Aborted",
19
+ Network: "Network",
20
+ Unauthenticated: "Unauthenticated",
21
+ Forbidden: "Forbidden",
22
+ NotFound: "NotFound",
23
+ WireFormat: "WireFormat",
24
+ RuntimeUnavailable: "RuntimeUnavailable",
25
+ InvalidReference: "InvalidReference",
26
+ WeakAnnotationSessionConflict: "WeakAnnotationSessionConflict",
27
+ LayerVersionConflict: "LayerVersionConflict",
28
+ NotImplemented: "NotImplemented",
29
+ MalformedPdf: "MalformedPdf",
30
+ };
31
+ })(DocPagesInsertBlank400Response || (exports.DocPagesInsertBlank400Response = DocPagesInsertBlank400Response = {}));
@@ -0,0 +1,34 @@
1
+ export interface DocPagesInsertBlank404Response {
2
+ name: DocPagesInsertBlank404Response.Name;
3
+ code: DocPagesInsertBlank404Response.Code;
4
+ message: string;
5
+ details?: Record<string, unknown> | undefined;
6
+ }
7
+ export declare namespace DocPagesInsertBlank404Response {
8
+ const Name: {
9
+ readonly EngineError: "EngineError";
10
+ };
11
+ type Name = (typeof Name)[keyof typeof Name];
12
+ const Code: {
13
+ readonly Unknown: "Unknown";
14
+ readonly InvalidArg: "InvalidArg";
15
+ readonly DocNotOpen: "DocNotOpen";
16
+ readonly DocOpenFailed: "DocOpenFailed";
17
+ readonly DocPasswordRequired: "DocPasswordRequired";
18
+ readonly DocPasswordIncorrect: "DocPasswordIncorrect";
19
+ readonly SharePasswordRequired: "SharePasswordRequired";
20
+ readonly Aborted: "Aborted";
21
+ readonly Network: "Network";
22
+ readonly Unauthenticated: "Unauthenticated";
23
+ readonly Forbidden: "Forbidden";
24
+ readonly NotFound: "NotFound";
25
+ readonly WireFormat: "WireFormat";
26
+ readonly RuntimeUnavailable: "RuntimeUnavailable";
27
+ readonly InvalidReference: "InvalidReference";
28
+ readonly WeakAnnotationSessionConflict: "WeakAnnotationSessionConflict";
29
+ readonly LayerVersionConflict: "LayerVersionConflict";
30
+ readonly NotImplemented: "NotImplemented";
31
+ readonly MalformedPdf: "MalformedPdf";
32
+ };
33
+ type Code = (typeof Code)[keyof typeof Code];
34
+ }
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.DocPagesInsertBlank404Response = void 0;
5
+ var DocPagesInsertBlank404Response;
6
+ (function (DocPagesInsertBlank404Response) {
7
+ DocPagesInsertBlank404Response.Name = {
8
+ EngineError: "EngineError",
9
+ };
10
+ DocPagesInsertBlank404Response.Code = {
11
+ Unknown: "Unknown",
12
+ InvalidArg: "InvalidArg",
13
+ DocNotOpen: "DocNotOpen",
14
+ DocOpenFailed: "DocOpenFailed",
15
+ DocPasswordRequired: "DocPasswordRequired",
16
+ DocPasswordIncorrect: "DocPasswordIncorrect",
17
+ SharePasswordRequired: "SharePasswordRequired",
18
+ Aborted: "Aborted",
19
+ Network: "Network",
20
+ Unauthenticated: "Unauthenticated",
21
+ Forbidden: "Forbidden",
22
+ NotFound: "NotFound",
23
+ WireFormat: "WireFormat",
24
+ RuntimeUnavailable: "RuntimeUnavailable",
25
+ InvalidReference: "InvalidReference",
26
+ WeakAnnotationSessionConflict: "WeakAnnotationSessionConflict",
27
+ LayerVersionConflict: "LayerVersionConflict",
28
+ NotImplemented: "NotImplemented",
29
+ MalformedPdf: "MalformedPdf",
30
+ };
31
+ })(DocPagesInsertBlank404Response || (exports.DocPagesInsertBlank404Response = DocPagesInsertBlank404Response = {}));
@@ -0,0 +1 @@
1
+ export type DocPagesInsertBlankRequest = Record<string, unknown>;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -112,11 +112,23 @@ export * from "./DocPagesDelete200ResponseMetaAffectedPagesItemWeakAnnotationSta
112
112
  export * from "./DocPagesDelete400Response.js";
113
113
  export * from "./DocPagesDelete404Response.js";
114
114
  export * from "./DocPagesDeleteRequest.js";
115
+ export * from "./DocPagesExtract400Response.js";
116
+ export * from "./DocPagesExtract404Response.js";
117
+ export * from "./DocPagesExtractRequest.js";
115
118
  export * from "./DocPagesFlatten200Response.js";
116
119
  export * from "./DocPagesFlatten200ResponseMetaAffectedPagesItemWeakAnnotationState.js";
117
120
  export * from "./DocPagesFlatten400Response.js";
118
121
  export * from "./DocPagesFlatten404Response.js";
119
122
  export * from "./DocPagesFlattenRequest.js";
123
+ export * from "./DocPagesInsert200Response.js";
124
+ export * from "./DocPagesInsert200ResponseMetaAffectedPagesItemWeakAnnotationState.js";
125
+ export * from "./DocPagesInsert400Response.js";
126
+ export * from "./DocPagesInsert404Response.js";
127
+ export * from "./DocPagesInsertBlank200Response.js";
128
+ export * from "./DocPagesInsertBlank200ResponseMetaAffectedPagesItemWeakAnnotationState.js";
129
+ export * from "./DocPagesInsertBlank400Response.js";
130
+ export * from "./DocPagesInsertBlank404Response.js";
131
+ export * from "./DocPagesInsertBlankRequest.js";
120
132
  export * from "./DocPagesMove200Response.js";
121
133
  export * from "./DocPagesMove200ResponseMetaAffectedPagesItemWeakAnnotationState.js";
122
134
  export * from "./DocPagesMove400Response.js";
@@ -128,11 +128,23 @@ __exportStar(require("./DocPagesDelete200ResponseMetaAffectedPagesItemWeakAnnota
128
128
  __exportStar(require("./DocPagesDelete400Response.js"), exports);
129
129
  __exportStar(require("./DocPagesDelete404Response.js"), exports);
130
130
  __exportStar(require("./DocPagesDeleteRequest.js"), exports);
131
+ __exportStar(require("./DocPagesExtract400Response.js"), exports);
132
+ __exportStar(require("./DocPagesExtract404Response.js"), exports);
133
+ __exportStar(require("./DocPagesExtractRequest.js"), exports);
131
134
  __exportStar(require("./DocPagesFlatten200Response.js"), exports);
132
135
  __exportStar(require("./DocPagesFlatten200ResponseMetaAffectedPagesItemWeakAnnotationState.js"), exports);
133
136
  __exportStar(require("./DocPagesFlatten400Response.js"), exports);
134
137
  __exportStar(require("./DocPagesFlatten404Response.js"), exports);
135
138
  __exportStar(require("./DocPagesFlattenRequest.js"), exports);
139
+ __exportStar(require("./DocPagesInsert200Response.js"), exports);
140
+ __exportStar(require("./DocPagesInsert200ResponseMetaAffectedPagesItemWeakAnnotationState.js"), exports);
141
+ __exportStar(require("./DocPagesInsert400Response.js"), exports);
142
+ __exportStar(require("./DocPagesInsert404Response.js"), exports);
143
+ __exportStar(require("./DocPagesInsertBlank200Response.js"), exports);
144
+ __exportStar(require("./DocPagesInsertBlank200ResponseMetaAffectedPagesItemWeakAnnotationState.js"), exports);
145
+ __exportStar(require("./DocPagesInsertBlank400Response.js"), exports);
146
+ __exportStar(require("./DocPagesInsertBlank404Response.js"), exports);
147
+ __exportStar(require("./DocPagesInsertBlankRequest.js"), exports);
136
148
  __exportStar(require("./DocPagesMove200Response.js"), exports);
137
149
  __exportStar(require("./DocPagesMove200ResponseMetaAffectedPagesItemWeakAnnotationState.js"), exports);
138
150
  __exportStar(require("./DocPagesMove400Response.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "3.0.0-next.8";
1
+ export declare const SDK_VERSION = "3.0.0-next.9";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "3.0.0-next.8";
4
+ exports.SDK_VERSION = "3.0.0-next.9";
@@ -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.8",
10
- "User-Agent": "@cloudpdf/sdk/3.0.0-next.8",
9
+ "X-Fern-SDK-Version": "3.0.0-next.9",
10
+ "User-Agent": "@cloudpdf/sdk/3.0.0-next.9",
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);
@@ -30,6 +30,16 @@ export declare class PagesClient {
30
30
  */
31
31
  delete(request: CloudPDF.doc.DeletePagesRequest, requestOptions?: PagesClient.RequestOptions): core.HttpResponsePromise<CloudPDF.DocPagesDelete200Response>;
32
32
  private __delete;
33
+ /**
34
+ * A read, not a mutation: the source document is untouched and no event is published. Body is `{"pageObjectNumbers": number[]}`; the response body is the new PDF.
35
+ *
36
+ * @throws {@link CloudPDF.BadRequestError}
37
+ * @throws {@link CloudPDF.NotFoundError}
38
+ * @throws {@link errors.CloudPDFError}
39
+ * @throws {@link errors.CloudPDFTimeoutError}
40
+ */
41
+ extract(request: CloudPDF.doc.ExtractPagesRequest, requestOptions?: PagesClient.RequestOptions): core.HttpResponsePromise<core.BinaryResponse>;
42
+ private __extract;
33
43
  /**
34
44
  * @param {CloudPDF.doc.FlattenPagesRequest} request
35
45
  * @param {PagesClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -50,6 +60,49 @@ export declare class PagesClient {
50
60
  */
51
61
  flatten(request: CloudPDF.doc.FlattenPagesRequest, requestOptions?: PagesClient.RequestOptions): core.HttpResponsePromise<CloudPDF.DocPagesFlatten200Response>;
52
62
  private __flatten;
63
+ /**
64
+ * Multipart mutation envelope: a `body` field holding `{"destIndex"?: number}` (omitted → append) plus a `resource:source` file part carrying the standalone PDF whose pages are copied in. The inserted copies get fresh page object numbers, returned in insertion order.
65
+ *
66
+ * @param {CloudPDF.doc.InsertPagesRequest} request
67
+ * @param {PagesClient.RequestOptions} requestOptions - Request-specific configuration.
68
+ *
69
+ * @throws {@link CloudPDF.BadRequestError}
70
+ * @throws {@link CloudPDF.NotFoundError}
71
+ * @throws {@link errors.CloudPDFError}
72
+ * @throws {@link errors.CloudPDFTimeoutError}
73
+ *
74
+ * @example
75
+ * import { createReadStream } from "fs";
76
+ * await client.doc.pages.insert({
77
+ * file: fs.createReadStream("/path/to/your/file"),
78
+ * docId: "docId",
79
+ * layerName: "layerName"
80
+ * })
81
+ */
82
+ insert(request: CloudPDF.doc.InsertPagesRequest, requestOptions?: PagesClient.RequestOptions): core.HttpResponsePromise<CloudPDF.DocPagesInsert200Response>;
83
+ private __insert;
84
+ /**
85
+ * Body is `{"size": {"width", "height"}, "count"?, "destIndex"?}` — size in PDF points, count in [1, 100], destIndex omitted → append.
86
+ *
87
+ * @param {CloudPDF.doc.InsertBlankPagesRequest} request
88
+ * @param {PagesClient.RequestOptions} requestOptions - Request-specific configuration.
89
+ *
90
+ * @throws {@link CloudPDF.BadRequestError}
91
+ * @throws {@link CloudPDF.NotFoundError}
92
+ * @throws {@link errors.CloudPDFError}
93
+ * @throws {@link errors.CloudPDFTimeoutError}
94
+ *
95
+ * @example
96
+ * await client.doc.pages.insertBlank({
97
+ * docId: "docId",
98
+ * layerName: "layerName",
99
+ * body: {
100
+ * "key": "value"
101
+ * }
102
+ * })
103
+ */
104
+ insertBlank(request: CloudPDF.doc.InsertBlankPagesRequest, requestOptions?: PagesClient.RequestOptions): core.HttpResponsePromise<CloudPDF.DocPagesInsertBlank200Response>;
105
+ private __insertBlank;
53
106
  /**
54
107
  * @param {CloudPDF.doc.MovePagesRequest} request
55
108
  * @param {PagesClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -80,6 +80,58 @@ export class PagesClient {
80
80
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v1/docs/{docId}/layers/{layerName}/pages/delete");
81
81
  });
82
82
  }
83
+ /**
84
+ * A read, not a mutation: the source document is untouched and no event is published. Body is `{"pageObjectNumbers": number[]}`; the response body is the new PDF.
85
+ *
86
+ * @throws {@link CloudPDF.BadRequestError}
87
+ * @throws {@link CloudPDF.NotFoundError}
88
+ * @throws {@link errors.CloudPDFError}
89
+ * @throws {@link errors.CloudPDFTimeoutError}
90
+ */
91
+ extract(request, requestOptions) {
92
+ return core.HttpResponsePromise.fromPromise(this.__extract(request, requestOptions));
93
+ }
94
+ __extract(request, requestOptions) {
95
+ return __awaiter(this, void 0, void 0, function* () {
96
+ var _a, _b, _c, _d, _e, _f, _g, _h;
97
+ const { docId, layerName, "X-Document-Password": documentPassword, body: _body } = request;
98
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
99
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "X-Document-Password": documentPassword }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
100
+ const _response = yield core.fetcher({
101
+ url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), `v1/docs/${core.url.encodePathParam(docId)}/layers/${core.url.encodePathParam(layerName)}/pages/extract`),
102
+ method: "POST",
103
+ headers: _headers,
104
+ contentType: "application/json",
105
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
106
+ requestType: "json",
107
+ body: mergeAdditionalBodyParameters(_body, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
108
+ responseType: "binary-response",
109
+ timeoutMs: ((_e = (_c = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _c !== void 0 ? _c : (_d = this._options) === null || _d === void 0 ? void 0 : _d.timeoutInSeconds) !== null && _e !== void 0 ? _e : 60) * 1000,
110
+ maxRetries: (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.maxRetries,
111
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
112
+ fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
113
+ logging: this._options.logging,
114
+ });
115
+ if (_response.ok) {
116
+ return { data: _response.body, rawResponse: _response.rawResponse };
117
+ }
118
+ if (_response.error.reason === "status-code") {
119
+ switch (_response.error.statusCode) {
120
+ case 400:
121
+ throw new CloudPDF.BadRequestError(_response.error.body, _response.rawResponse);
122
+ case 404:
123
+ throw new CloudPDF.NotFoundError(_response.error.body, _response.rawResponse);
124
+ default:
125
+ throw new errors.CloudPDFError({
126
+ statusCode: _response.error.statusCode,
127
+ body: _response.error.body,
128
+ rawResponse: _response.rawResponse,
129
+ });
130
+ }
131
+ }
132
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v1/docs/{docId}/layers/{layerName}/pages/extract");
133
+ });
134
+ }
83
135
  /**
84
136
  * @param {CloudPDF.doc.FlattenPagesRequest} request
85
137
  * @param {PagesClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -141,6 +193,136 @@ export class PagesClient {
141
193
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v1/docs/{docId}/layers/{layerName}/pages/flatten");
142
194
  });
143
195
  }
196
+ /**
197
+ * Multipart mutation envelope: a `body` field holding `{"destIndex"?: number}` (omitted → append) plus a `resource:source` file part carrying the standalone PDF whose pages are copied in. The inserted copies get fresh page object numbers, returned in insertion order.
198
+ *
199
+ * @param {CloudPDF.doc.InsertPagesRequest} request
200
+ * @param {PagesClient.RequestOptions} requestOptions - Request-specific configuration.
201
+ *
202
+ * @throws {@link CloudPDF.BadRequestError}
203
+ * @throws {@link CloudPDF.NotFoundError}
204
+ * @throws {@link errors.CloudPDFError}
205
+ * @throws {@link errors.CloudPDFTimeoutError}
206
+ *
207
+ * @example
208
+ * import { createReadStream } from "fs";
209
+ * await client.doc.pages.insert({
210
+ * file: fs.createReadStream("/path/to/your/file"),
211
+ * docId: "docId",
212
+ * layerName: "layerName"
213
+ * })
214
+ */
215
+ insert(request, requestOptions) {
216
+ return core.HttpResponsePromise.fromPromise(this.__insert(request, requestOptions));
217
+ }
218
+ __insert(request, requestOptions) {
219
+ return __awaiter(this, void 0, void 0, function* () {
220
+ var _a, _b, _c, _d, _e, _f, _g, _h;
221
+ const _body = yield core.newFormData();
222
+ yield _body.appendFile("file", request.file);
223
+ const _maybeEncodedRequest = yield _body.getRequest();
224
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
225
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({ "X-Document-Password": request["X-Document-Password"] }, _maybeEncodedRequest.headers)), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
226
+ const _response = yield core.fetcher({
227
+ url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), `v1/docs/${core.url.encodePathParam(request.docId)}/layers/${core.url.encodePathParam(request.layerName)}/pages/insert`),
228
+ method: "POST",
229
+ headers: _headers,
230
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
231
+ requestType: "file",
232
+ duplex: _maybeEncodedRequest.duplex,
233
+ body: _maybeEncodedRequest.body,
234
+ timeoutMs: ((_e = (_c = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _c !== void 0 ? _c : (_d = this._options) === null || _d === void 0 ? void 0 : _d.timeoutInSeconds) !== null && _e !== void 0 ? _e : 60) * 1000,
235
+ maxRetries: (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.maxRetries,
236
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
237
+ fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
238
+ logging: this._options.logging,
239
+ });
240
+ if (_response.ok) {
241
+ return { data: _response.body, rawResponse: _response.rawResponse };
242
+ }
243
+ if (_response.error.reason === "status-code") {
244
+ switch (_response.error.statusCode) {
245
+ case 400:
246
+ throw new CloudPDF.BadRequestError(_response.error.body, _response.rawResponse);
247
+ case 404:
248
+ throw new CloudPDF.NotFoundError(_response.error.body, _response.rawResponse);
249
+ default:
250
+ throw new errors.CloudPDFError({
251
+ statusCode: _response.error.statusCode,
252
+ body: _response.error.body,
253
+ rawResponse: _response.rawResponse,
254
+ });
255
+ }
256
+ }
257
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v1/docs/{docId}/layers/{layerName}/pages/insert");
258
+ });
259
+ }
260
+ /**
261
+ * Body is `{"size": {"width", "height"}, "count"?, "destIndex"?}` — size in PDF points, count in [1, 100], destIndex omitted → append.
262
+ *
263
+ * @param {CloudPDF.doc.InsertBlankPagesRequest} request
264
+ * @param {PagesClient.RequestOptions} requestOptions - Request-specific configuration.
265
+ *
266
+ * @throws {@link CloudPDF.BadRequestError}
267
+ * @throws {@link CloudPDF.NotFoundError}
268
+ * @throws {@link errors.CloudPDFError}
269
+ * @throws {@link errors.CloudPDFTimeoutError}
270
+ *
271
+ * @example
272
+ * await client.doc.pages.insertBlank({
273
+ * docId: "docId",
274
+ * layerName: "layerName",
275
+ * body: {
276
+ * "key": "value"
277
+ * }
278
+ * })
279
+ */
280
+ insertBlank(request, requestOptions) {
281
+ return core.HttpResponsePromise.fromPromise(this.__insertBlank(request, requestOptions));
282
+ }
283
+ __insertBlank(request, requestOptions) {
284
+ return __awaiter(this, void 0, void 0, function* () {
285
+ var _a, _b, _c, _d, _e, _f, _g, _h;
286
+ const { docId, layerName, "X-Document-Password": documentPassword, body: _body } = request;
287
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
288
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "X-Document-Password": documentPassword }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
289
+ const _response = yield core.fetcher({
290
+ url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), `v1/docs/${core.url.encodePathParam(docId)}/layers/${core.url.encodePathParam(layerName)}/pages/insert-blank`),
291
+ method: "POST",
292
+ headers: _headers,
293
+ contentType: "application/json",
294
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
295
+ requestType: "json",
296
+ body: mergeAdditionalBodyParameters(_body, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
297
+ timeoutMs: ((_e = (_c = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _c !== void 0 ? _c : (_d = this._options) === null || _d === void 0 ? void 0 : _d.timeoutInSeconds) !== null && _e !== void 0 ? _e : 60) * 1000,
298
+ maxRetries: (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.maxRetries,
299
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
300
+ fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
301
+ logging: this._options.logging,
302
+ });
303
+ if (_response.ok) {
304
+ return {
305
+ data: _response.body,
306
+ rawResponse: _response.rawResponse,
307
+ };
308
+ }
309
+ if (_response.error.reason === "status-code") {
310
+ switch (_response.error.statusCode) {
311
+ case 400:
312
+ throw new CloudPDF.BadRequestError(_response.error.body, _response.rawResponse);
313
+ case 404:
314
+ throw new CloudPDF.NotFoundError(_response.error.body, _response.rawResponse);
315
+ default:
316
+ throw new errors.CloudPDFError({
317
+ statusCode: _response.error.statusCode,
318
+ body: _response.error.body,
319
+ rawResponse: _response.rawResponse,
320
+ });
321
+ }
322
+ }
323
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v1/docs/{docId}/layers/{layerName}/pages/insert-blank");
324
+ });
325
+ }
144
326
  /**
145
327
  * @param {CloudPDF.doc.MovePagesRequest} request
146
328
  * @param {PagesClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -0,0 +1,20 @@
1
+ import type * as CloudPDF from "../../../../../../index.mjs";
2
+ /**
3
+ * @example
4
+ * {
5
+ * docId: "docId",
6
+ * layerName: "layerName",
7
+ * body: {
8
+ * "string": {
9
+ * "key": "value"
10
+ * }
11
+ * }
12
+ * }
13
+ */
14
+ export interface ExtractPagesRequest {
15
+ docId: string;
16
+ layerName: string;
17
+ /** Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead. */
18
+ "X-Document-Password"?: string;
19
+ body: CloudPDF.DocPagesExtractRequest;
20
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};