pulse-ts-sdk 1.0.7 → 1.0.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 (150) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/Client.d.ts +6 -0
  3. package/dist/cjs/Client.js +18 -2
  4. package/dist/cjs/api/client/requests/ExtractAsyncRequest.d.ts +13 -2
  5. package/dist/cjs/api/client/requests/ExtractRequest.d.ts +13 -2
  6. package/dist/cjs/api/errors/GoneError.d.ts +6 -0
  7. package/dist/cjs/api/errors/GoneError.js +54 -0
  8. package/dist/cjs/api/errors/index.d.ts +1 -0
  9. package/dist/cjs/api/errors/index.js +1 -0
  10. package/dist/cjs/api/resources/index.d.ts +4 -0
  11. package/dist/cjs/api/resources/index.js +5 -1
  12. package/dist/cjs/api/resources/largeResults/client/Client.d.ts +35 -0
  13. package/dist/cjs/api/resources/largeResults/client/Client.js +121 -0
  14. package/dist/cjs/api/resources/largeResults/client/index.d.ts +1 -0
  15. package/dist/cjs/api/resources/largeResults/client/index.js +17 -0
  16. package/dist/cjs/api/resources/largeResults/client/requests/GetLargeResultLargeResultsRequest.d.ts +10 -0
  17. package/dist/cjs/api/resources/largeResults/client/requests/GetLargeResultLargeResultsRequest.js +3 -0
  18. package/dist/cjs/api/resources/largeResults/client/requests/index.d.ts +1 -0
  19. package/dist/cjs/api/resources/largeResults/client/requests/index.js +2 -0
  20. package/dist/cjs/api/resources/largeResults/index.d.ts +1 -0
  21. package/dist/cjs/api/resources/largeResults/index.js +17 -0
  22. package/dist/cjs/api/resources/pipeline/client/Client.d.ts +55 -0
  23. package/dist/cjs/api/resources/pipeline/client/Client.js +145 -0
  24. package/dist/cjs/api/resources/pipeline/client/index.d.ts +1 -0
  25. package/dist/cjs/api/resources/pipeline/client/index.js +17 -0
  26. package/dist/cjs/api/resources/pipeline/client/requests/PipelineExecuteInput.d.ts +17 -0
  27. package/dist/cjs/api/resources/pipeline/client/requests/PipelineExecuteInput.js +3 -0
  28. package/dist/cjs/api/resources/pipeline/client/requests/index.d.ts +1 -0
  29. package/dist/cjs/api/resources/pipeline/client/requests/index.js +2 -0
  30. package/dist/cjs/api/resources/pipeline/index.d.ts +1 -0
  31. package/dist/cjs/api/resources/pipeline/index.js +17 -0
  32. package/dist/cjs/api/types/AsyncSubmissionResponse.d.ts +2 -0
  33. package/dist/cjs/api/types/BatchFileUpload.d.ts +6 -0
  34. package/dist/cjs/api/types/BatchFileUpload.js +3 -0
  35. package/dist/cjs/api/types/BatchInputSource.d.ts +4 -3
  36. package/dist/cjs/api/types/ExtractInput.d.ts +13 -2
  37. package/dist/cjs/api/types/ExtractLargeResultResponse.d.ts +25 -0
  38. package/dist/cjs/api/types/ExtractLargeResultResponse.js +3 -0
  39. package/dist/cjs/api/types/ExtractOptions.d.ts +13 -2
  40. package/dist/cjs/api/types/ExtractResponse.d.ts +3 -3
  41. package/dist/cjs/api/types/ExtractResultCore.d.ts +112 -0
  42. package/dist/cjs/api/types/ExtractResultCore.js +3 -0
  43. package/dist/cjs/api/types/GoneErrorBody.d.ts +9 -0
  44. package/dist/cjs/api/types/GoneErrorBody.js +3 -0
  45. package/dist/cjs/api/types/JobStatusResponse.d.ts +1 -1
  46. package/dist/cjs/api/types/PipelineBatchExtractResult.d.ts +13 -0
  47. package/dist/cjs/api/types/PipelineBatchExtractResult.js +3 -0
  48. package/dist/cjs/api/types/PipelineExecuteMultipartInput.d.ts +13 -0
  49. package/dist/cjs/api/types/PipelineExecuteMultipartInput.js +3 -0
  50. package/dist/cjs/api/types/PipelineExecuteResponse.d.ts +21 -0
  51. package/dist/cjs/api/types/PipelineExecuteResponse.js +11 -0
  52. package/dist/cjs/api/types/PipelineExtractResult.d.ts +118 -0
  53. package/dist/cjs/api/types/PipelineExtractResult.js +3 -0
  54. package/dist/cjs/api/types/PipelineResults.d.ts +14 -0
  55. package/dist/cjs/api/types/PipelineResults.js +3 -0
  56. package/dist/cjs/api/types/PipelineSchemaResult.d.ts +14 -0
  57. package/dist/cjs/api/types/PipelineSchemaResult.js +3 -0
  58. package/dist/cjs/api/types/PipelineSplitResult.d.ts +18 -0
  59. package/dist/cjs/api/types/PipelineSplitResult.js +3 -0
  60. package/dist/cjs/api/types/PipelineStepBatchExtractConfig.d.ts +146 -0
  61. package/dist/cjs/api/types/PipelineStepBatchExtractConfig.js +26 -0
  62. package/dist/cjs/api/types/PipelineSteps.d.ts +14 -0
  63. package/dist/cjs/api/types/PipelineSteps.js +3 -0
  64. package/dist/cjs/api/types/SingleSchemaResponse.d.ts +2 -0
  65. package/dist/cjs/api/types/SplitResponse.d.ts +1 -6
  66. package/dist/cjs/api/types/SplitResultCore.d.ts +12 -0
  67. package/dist/cjs/api/types/SplitResultCore.js +3 -0
  68. package/dist/cjs/api/types/SplitSchemaResponse.d.ts +2 -0
  69. package/dist/cjs/api/types/TablesConfig.d.ts +2 -0
  70. package/dist/cjs/api/types/TablesResponse.d.ts +2 -0
  71. package/dist/cjs/api/types/index.d.ts +14 -0
  72. package/dist/cjs/api/types/index.js +14 -0
  73. package/dist/cjs/version.d.ts +1 -1
  74. package/dist/cjs/version.js +1 -1
  75. package/dist/esm/BaseClient.mjs +2 -2
  76. package/dist/esm/Client.d.mts +6 -0
  77. package/dist/esm/Client.mjs +16 -0
  78. package/dist/esm/api/client/requests/ExtractAsyncRequest.d.mts +13 -2
  79. package/dist/esm/api/client/requests/ExtractRequest.d.mts +13 -2
  80. package/dist/esm/api/errors/GoneError.d.mts +6 -0
  81. package/dist/esm/api/errors/GoneError.mjs +17 -0
  82. package/dist/esm/api/errors/index.d.mts +1 -0
  83. package/dist/esm/api/errors/index.mjs +1 -0
  84. package/dist/esm/api/resources/index.d.mts +4 -0
  85. package/dist/esm/api/resources/index.mjs +4 -0
  86. package/dist/esm/api/resources/largeResults/client/Client.d.mts +35 -0
  87. package/dist/esm/api/resources/largeResults/client/Client.mjs +84 -0
  88. package/dist/esm/api/resources/largeResults/client/index.d.mts +1 -0
  89. package/dist/esm/api/resources/largeResults/client/index.mjs +1 -0
  90. package/dist/esm/api/resources/largeResults/client/requests/GetLargeResultLargeResultsRequest.d.mts +10 -0
  91. package/dist/esm/api/resources/largeResults/client/requests/GetLargeResultLargeResultsRequest.mjs +2 -0
  92. package/dist/esm/api/resources/largeResults/client/requests/index.d.mts +1 -0
  93. package/dist/esm/api/resources/largeResults/client/requests/index.mjs +1 -0
  94. package/dist/esm/api/resources/largeResults/index.d.mts +1 -0
  95. package/dist/esm/api/resources/largeResults/index.mjs +1 -0
  96. package/dist/esm/api/resources/pipeline/client/Client.d.mts +55 -0
  97. package/dist/esm/api/resources/pipeline/client/Client.mjs +108 -0
  98. package/dist/esm/api/resources/pipeline/client/index.d.mts +1 -0
  99. package/dist/esm/api/resources/pipeline/client/index.mjs +1 -0
  100. package/dist/esm/api/resources/pipeline/client/requests/PipelineExecuteInput.d.mts +17 -0
  101. package/dist/esm/api/resources/pipeline/client/requests/PipelineExecuteInput.mjs +2 -0
  102. package/dist/esm/api/resources/pipeline/client/requests/index.d.mts +1 -0
  103. package/dist/esm/api/resources/pipeline/client/requests/index.mjs +1 -0
  104. package/dist/esm/api/resources/pipeline/index.d.mts +1 -0
  105. package/dist/esm/api/resources/pipeline/index.mjs +1 -0
  106. package/dist/esm/api/types/AsyncSubmissionResponse.d.mts +2 -0
  107. package/dist/esm/api/types/BatchFileUpload.d.mts +6 -0
  108. package/dist/esm/api/types/BatchFileUpload.mjs +2 -0
  109. package/dist/esm/api/types/BatchInputSource.d.mts +4 -3
  110. package/dist/esm/api/types/ExtractInput.d.mts +13 -2
  111. package/dist/esm/api/types/ExtractLargeResultResponse.d.mts +25 -0
  112. package/dist/esm/api/types/ExtractLargeResultResponse.mjs +2 -0
  113. package/dist/esm/api/types/ExtractOptions.d.mts +13 -2
  114. package/dist/esm/api/types/ExtractResponse.d.mts +3 -3
  115. package/dist/esm/api/types/ExtractResultCore.d.mts +112 -0
  116. package/dist/esm/api/types/ExtractResultCore.mjs +2 -0
  117. package/dist/esm/api/types/GoneErrorBody.d.mts +9 -0
  118. package/dist/esm/api/types/GoneErrorBody.mjs +2 -0
  119. package/dist/esm/api/types/JobStatusResponse.d.mts +1 -1
  120. package/dist/esm/api/types/PipelineBatchExtractResult.d.mts +13 -0
  121. package/dist/esm/api/types/PipelineBatchExtractResult.mjs +2 -0
  122. package/dist/esm/api/types/PipelineExecuteMultipartInput.d.mts +13 -0
  123. package/dist/esm/api/types/PipelineExecuteMultipartInput.mjs +2 -0
  124. package/dist/esm/api/types/PipelineExecuteResponse.d.mts +21 -0
  125. package/dist/esm/api/types/PipelineExecuteResponse.mjs +8 -0
  126. package/dist/esm/api/types/PipelineExtractResult.d.mts +118 -0
  127. package/dist/esm/api/types/PipelineExtractResult.mjs +2 -0
  128. package/dist/esm/api/types/PipelineResults.d.mts +14 -0
  129. package/dist/esm/api/types/PipelineResults.mjs +2 -0
  130. package/dist/esm/api/types/PipelineSchemaResult.d.mts +14 -0
  131. package/dist/esm/api/types/PipelineSchemaResult.mjs +2 -0
  132. package/dist/esm/api/types/PipelineSplitResult.d.mts +18 -0
  133. package/dist/esm/api/types/PipelineSplitResult.mjs +2 -0
  134. package/dist/esm/api/types/PipelineStepBatchExtractConfig.d.mts +146 -0
  135. package/dist/esm/api/types/PipelineStepBatchExtractConfig.mjs +23 -0
  136. package/dist/esm/api/types/PipelineSteps.d.mts +14 -0
  137. package/dist/esm/api/types/PipelineSteps.mjs +2 -0
  138. package/dist/esm/api/types/SingleSchemaResponse.d.mts +2 -0
  139. package/dist/esm/api/types/SplitResponse.d.mts +1 -6
  140. package/dist/esm/api/types/SplitResultCore.d.mts +12 -0
  141. package/dist/esm/api/types/SplitResultCore.mjs +2 -0
  142. package/dist/esm/api/types/SplitSchemaResponse.d.mts +2 -0
  143. package/dist/esm/api/types/TablesConfig.d.mts +2 -0
  144. package/dist/esm/api/types/TablesResponse.d.mts +2 -0
  145. package/dist/esm/api/types/index.d.mts +14 -0
  146. package/dist/esm/api/types/index.mjs +14 -0
  147. package/dist/esm/version.d.mts +1 -1
  148. package/dist/esm/version.mjs +1 -1
  149. package/package.json +1 -1
  150. package/reference.md +161 -0
@@ -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": "pulse-ts-sdk",
46
- "X-Fern-SDK-Version": "1.0.7",
47
- "User-Agent": "pulse-ts-sdk/1.0.7",
46
+ "X-Fern-SDK-Version": "1.0.9",
47
+ "User-Agent": "pulse-ts-sdk/1.0.9",
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);
@@ -1,6 +1,8 @@
1
1
  import * as Pulse from "./api/index.js";
2
2
  import { BatchClient } from "./api/resources/batch/client/Client.js";
3
3
  import { JobsClient } from "./api/resources/jobs/client/Client.js";
4
+ import { LargeResultsClient } from "./api/resources/largeResults/client/Client.js";
5
+ import { PipelineClient } from "./api/resources/pipeline/client/Client.js";
4
6
  import { WebhooksClient } from "./api/resources/webhooks/client/Client.js";
5
7
  import type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.js";
6
8
  import { type NormalizedClientOptionsWithAuth } from "./BaseClient.js";
@@ -13,11 +15,15 @@ export declare namespace PulseClient {
13
15
  export declare class PulseClient {
14
16
  protected readonly _options: NormalizedClientOptionsWithAuth<PulseClient.Options>;
15
17
  protected _batch: BatchClient | undefined;
18
+ protected _pipeline: PipelineClient | undefined;
16
19
  protected _jobs: JobsClient | undefined;
20
+ protected _largeResults: LargeResultsClient | undefined;
17
21
  protected _webhooks: WebhooksClient | undefined;
18
22
  constructor(options?: PulseClient.Options);
19
23
  get batch(): BatchClient;
24
+ get pipeline(): PipelineClient;
20
25
  get jobs(): JobsClient;
26
+ get largeResults(): LargeResultsClient;
21
27
  get webhooks(): WebhooksClient;
22
28
  /**
23
29
  * The primary endpoint for the Pulse API. Parses uploaded documents or remote
@@ -47,7 +47,9 @@ exports.PulseClient = void 0;
47
47
  const Pulse = __importStar(require("./api/index.js"));
48
48
  const Client_js_1 = require("./api/resources/batch/client/Client.js");
49
49
  const Client_js_2 = require("./api/resources/jobs/client/Client.js");
50
- const Client_js_3 = require("./api/resources/webhooks/client/Client.js");
50
+ const Client_js_3 = require("./api/resources/largeResults/client/Client.js");
51
+ const Client_js_4 = require("./api/resources/pipeline/client/Client.js");
52
+ const Client_js_5 = require("./api/resources/webhooks/client/Client.js");
51
53
  const BaseClient_js_1 = require("./BaseClient.js");
52
54
  const headers_js_1 = require("./core/headers.js");
53
55
  const core = __importStar(require("./core/index.js"));
@@ -63,13 +65,21 @@ class PulseClient {
63
65
  var _a;
64
66
  return ((_a = this._batch) !== null && _a !== void 0 ? _a : (this._batch = new Client_js_1.BatchClient(this._options)));
65
67
  }
68
+ get pipeline() {
69
+ var _a;
70
+ return ((_a = this._pipeline) !== null && _a !== void 0 ? _a : (this._pipeline = new Client_js_4.PipelineClient(this._options)));
71
+ }
66
72
  get jobs() {
67
73
  var _a;
68
74
  return ((_a = this._jobs) !== null && _a !== void 0 ? _a : (this._jobs = new Client_js_2.JobsClient(this._options)));
69
75
  }
76
+ get largeResults() {
77
+ var _a;
78
+ return ((_a = this._largeResults) !== null && _a !== void 0 ? _a : (this._largeResults = new Client_js_3.LargeResultsClient(this._options)));
79
+ }
70
80
  get webhooks() {
71
81
  var _a;
72
- return ((_a = this._webhooks) !== null && _a !== void 0 ? _a : (this._webhooks = new Client_js_3.WebhooksClient(this._options)));
82
+ return ((_a = this._webhooks) !== null && _a !== void 0 ? _a : (this._webhooks = new Client_js_5.WebhooksClient(this._options)));
73
83
  }
74
84
  /**
75
85
  * The primary endpoint for the Pulse API. Parses uploaded documents or remote
@@ -118,6 +128,9 @@ class PulseClient {
118
128
  if (request.extensions != null) {
119
129
  _request.append("extensions", (0, json_js_1.toJson)(request.extensions));
120
130
  }
131
+ if (request.spreadsheet != null) {
132
+ _request.append("spreadsheet", (0, json_js_1.toJson)(request.spreadsheet));
133
+ }
121
134
  if (request.storage != null) {
122
135
  _request.append("storage", (0, json_js_1.toJson)(request.storage));
123
136
  }
@@ -239,6 +252,9 @@ class PulseClient {
239
252
  if (request.extensions != null) {
240
253
  _request.append("extensions", (0, json_js_1.toJson)(request.extensions));
241
254
  }
255
+ if (request.spreadsheet != null) {
256
+ _request.append("spreadsheet", (0, json_js_1.toJson)(request.spreadsheet));
257
+ }
242
258
  if (request.storage != null) {
243
259
  _request.append("storage", (0, json_js_1.toJson)(request.storage));
244
260
  }
@@ -16,6 +16,8 @@ export interface ExtractAsyncRequest {
16
16
  figureProcessing?: ExtractAsyncRequest.FigureProcessing;
17
17
  /** Settings that enable additional processing passes or alternate output formats. Each enabled extension produces a corresponding output field under `response.extensions.*`. */
18
18
  extensions?: ExtractAsyncRequest.Extensions;
19
+ /** Settings for Excel/spreadsheet extraction. Controls handling of hidden rows, columns, and sheets. Only applies to `.xlsx` and `.xls` files. Accepts both camelCase and snake_case field names. */
20
+ spreadsheet?: ExtractAsyncRequest.Spreadsheet;
19
21
  /** Options for persisting extraction artifacts. When enabled (default), artifacts are saved to storage and a database record is created. */
20
22
  storage?: ExtractAsyncRequest.Storage;
21
23
  /** If true, returns immediately with a job_id for polling via GET /job/{jobId}. Otherwise processes synchronously. */
@@ -62,8 +64,6 @@ export declare namespace ExtractAsyncRequest {
62
64
  * Settings that enable additional processing passes or alternate output formats. Each enabled extension produces a corresponding output field under `response.extensions.*`.
63
65
  */
64
66
  interface Extensions {
65
- /** Merge tables that span multiple pages into a single table. */
66
- mergeTables?: boolean;
67
67
  /** Link footnote markers to their corresponding footnote text. */
68
68
  footnoteReferences?: boolean;
69
69
  /** Chunking configuration. When provided, the document is split into chunks using the specified strategies. Results appear in `response.extensions.chunking`. */
@@ -105,6 +105,17 @@ export declare namespace ExtractAsyncRequest {
105
105
  returnXml?: boolean;
106
106
  }
107
107
  }
108
+ /**
109
+ * Settings for Excel/spreadsheet extraction. Controls handling of hidden rows, columns, and sheets. Only applies to `.xlsx` and `.xls` files. Accepts both camelCase and snake_case field names.
110
+ */
111
+ interface Spreadsheet {
112
+ /** Include rows that are hidden in the Excel workbook. */
113
+ includeHiddenRows?: boolean;
114
+ /** Include columns that are hidden in the Excel workbook. */
115
+ includeHiddenCols?: boolean;
116
+ /** Include sheets that are hidden in the Excel workbook. */
117
+ includeHiddenSheets?: boolean;
118
+ }
108
119
  /**
109
120
  * Options for persisting extraction artifacts. When enabled (default), artifacts are saved to storage and a database record is created.
110
121
  */
@@ -16,6 +16,8 @@ export interface ExtractRequest {
16
16
  figureProcessing?: ExtractRequest.FigureProcessing;
17
17
  /** Settings that enable additional processing passes or alternate output formats. Each enabled extension produces a corresponding output field under `response.extensions.*`. */
18
18
  extensions?: ExtractRequest.Extensions;
19
+ /** Settings for Excel/spreadsheet extraction. Controls handling of hidden rows, columns, and sheets. Only applies to `.xlsx` and `.xls` files. Accepts both camelCase and snake_case field names. */
20
+ spreadsheet?: ExtractRequest.Spreadsheet;
19
21
  /** Options for persisting extraction artifacts. When enabled (default), artifacts are saved to storage and a database record is created. */
20
22
  storage?: ExtractRequest.Storage;
21
23
  /** If true, returns immediately with a job_id for polling via GET /job/{jobId}. Otherwise processes synchronously. */
@@ -62,8 +64,6 @@ export declare namespace ExtractRequest {
62
64
  * Settings that enable additional processing passes or alternate output formats. Each enabled extension produces a corresponding output field under `response.extensions.*`.
63
65
  */
64
66
  interface Extensions {
65
- /** Merge tables that span multiple pages into a single table. */
66
- mergeTables?: boolean;
67
67
  /** Link footnote markers to their corresponding footnote text. */
68
68
  footnoteReferences?: boolean;
69
69
  /** Chunking configuration. When provided, the document is split into chunks using the specified strategies. Results appear in `response.extensions.chunking`. */
@@ -105,6 +105,17 @@ export declare namespace ExtractRequest {
105
105
  returnXml?: boolean;
106
106
  }
107
107
  }
108
+ /**
109
+ * Settings for Excel/spreadsheet extraction. Controls handling of hidden rows, columns, and sheets. Only applies to `.xlsx` and `.xls` files. Accepts both camelCase and snake_case field names.
110
+ */
111
+ interface Spreadsheet {
112
+ /** Include rows that are hidden in the Excel workbook. */
113
+ includeHiddenRows?: boolean;
114
+ /** Include columns that are hidden in the Excel workbook. */
115
+ includeHiddenCols?: boolean;
116
+ /** Include sheets that are hidden in the Excel workbook. */
117
+ includeHiddenSheets?: boolean;
118
+ }
108
119
  /**
109
120
  * Options for persisting extraction artifacts. When enabled (default), artifacts are saved to storage and a database record is created.
110
121
  */
@@ -0,0 +1,6 @@
1
+ import type * as core from "../../core/index.js";
2
+ import * as errors from "../../errors/index.js";
3
+ import type * as Pulse from "../index.js";
4
+ export declare class GoneError extends errors.PulseError {
5
+ constructor(body: Pulse.GoneErrorBody, rawResponse?: core.RawResponse);
6
+ }
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.GoneError = void 0;
38
+ const errors = __importStar(require("../../errors/index.js"));
39
+ class GoneError extends errors.PulseError {
40
+ constructor(body, rawResponse) {
41
+ super({
42
+ message: "GoneError",
43
+ statusCode: 410,
44
+ body: body,
45
+ rawResponse: rawResponse,
46
+ });
47
+ Object.setPrototypeOf(this, new.target.prototype);
48
+ if (Error.captureStackTrace) {
49
+ Error.captureStackTrace(this, this.constructor);
50
+ }
51
+ this.name = this.constructor.name;
52
+ }
53
+ }
54
+ exports.GoneError = GoneError;
@@ -1,5 +1,6 @@
1
1
  export * from "./BadRequestError.js";
2
2
  export * from "./ForbiddenError.js";
3
+ export * from "./GoneError.js";
3
4
  export * from "./InternalServerError.js";
4
5
  export * from "./NotFoundError.js";
5
6
  export * from "./TooManyRequestsError.js";
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./BadRequestError.js"), exports);
18
18
  __exportStar(require("./ForbiddenError.js"), exports);
19
+ __exportStar(require("./GoneError.js"), exports);
19
20
  __exportStar(require("./InternalServerError.js"), exports);
20
21
  __exportStar(require("./NotFoundError.js"), exports);
21
22
  __exportStar(require("./TooManyRequestsError.js"), exports);
@@ -2,5 +2,9 @@ export * from "./batch/client/requests/index.js";
2
2
  export * as batch from "./batch/index.js";
3
3
  export * from "./jobs/client/requests/index.js";
4
4
  export * as jobs from "./jobs/index.js";
5
+ export * from "./largeResults/client/requests/index.js";
6
+ export * as largeResults from "./largeResults/index.js";
7
+ export * from "./pipeline/client/requests/index.js";
8
+ export * as pipeline from "./pipeline/index.js";
5
9
  export * as webhooks from "./webhooks/index.js";
6
10
  export * from "./webhooks/types/index.js";
@@ -36,10 +36,14 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  };
37
37
  })();
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.webhooks = exports.jobs = exports.batch = void 0;
39
+ exports.webhooks = exports.pipeline = exports.largeResults = exports.jobs = exports.batch = void 0;
40
40
  __exportStar(require("./batch/client/requests/index.js"), exports);
41
41
  exports.batch = __importStar(require("./batch/index.js"));
42
42
  __exportStar(require("./jobs/client/requests/index.js"), exports);
43
43
  exports.jobs = __importStar(require("./jobs/index.js"));
44
+ __exportStar(require("./largeResults/client/requests/index.js"), exports);
45
+ exports.largeResults = __importStar(require("./largeResults/index.js"));
46
+ __exportStar(require("./pipeline/client/requests/index.js"), exports);
47
+ exports.pipeline = __importStar(require("./pipeline/index.js"));
44
48
  exports.webhooks = __importStar(require("./webhooks/index.js"));
45
49
  __exportStar(require("./webhooks/types/index.js"), exports);
@@ -0,0 +1,35 @@
1
+ import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
3
+ import * as core from "../../../../core/index.js";
4
+ import * as Pulse from "../../../index.js";
5
+ export declare namespace LargeResultsClient {
6
+ type Options = BaseClientOptions;
7
+ interface RequestOptions extends BaseRequestOptions {
8
+ }
9
+ }
10
+ export declare class LargeResultsClient {
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<LargeResultsClient.Options>;
12
+ constructor(options?: LargeResultsClient.Options);
13
+ /**
14
+ * Download the full result for a large extraction (70+ pages).
15
+ *
16
+ * When `/extract` or `GET /job/{jobId}` returns `is_url: true`, fetch
17
+ * the complete result from the URL provided. The URL is single-use:
18
+ * after a successful download the resource is deleted and subsequent
19
+ * requests return 410 Gone.
20
+ *
21
+ * @param {Pulse.GetLargeResultLargeResultsRequest} request
22
+ * @param {LargeResultsClient.RequestOptions} requestOptions - Request-specific configuration.
23
+ *
24
+ * @throws {@link Pulse.NotFoundError}
25
+ * @throws {@link Pulse.GoneError}
26
+ * @throws {@link Pulse.InternalServerError}
27
+ *
28
+ * @example
29
+ * await client.largeResults.getLargeResult({
30
+ * jobId: "jobId"
31
+ * })
32
+ */
33
+ getLargeResult(request: Pulse.GetLargeResultLargeResultsRequest, requestOptions?: LargeResultsClient.RequestOptions): core.HttpResponsePromise<Pulse.ExtractResultCore>;
34
+ private __getLargeResult;
35
+ }
@@ -0,0 +1,121 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
37
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
38
+ return new (P || (P = Promise))(function (resolve, reject) {
39
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
40
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
41
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
42
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
43
+ });
44
+ };
45
+ Object.defineProperty(exports, "__esModule", { value: true });
46
+ exports.LargeResultsClient = void 0;
47
+ const BaseClient_js_1 = require("../../../../BaseClient.js");
48
+ const headers_js_1 = require("../../../../core/headers.js");
49
+ const core = __importStar(require("../../../../core/index.js"));
50
+ const environments = __importStar(require("../../../../environments.js"));
51
+ const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
52
+ const errors = __importStar(require("../../../../errors/index.js"));
53
+ const Pulse = __importStar(require("../../../index.js"));
54
+ class LargeResultsClient {
55
+ constructor(options = {}) {
56
+ this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
57
+ }
58
+ /**
59
+ * Download the full result for a large extraction (70+ pages).
60
+ *
61
+ * When `/extract` or `GET /job/{jobId}` returns `is_url: true`, fetch
62
+ * the complete result from the URL provided. The URL is single-use:
63
+ * after a successful download the resource is deleted and subsequent
64
+ * requests return 410 Gone.
65
+ *
66
+ * @param {Pulse.GetLargeResultLargeResultsRequest} request
67
+ * @param {LargeResultsClient.RequestOptions} requestOptions - Request-specific configuration.
68
+ *
69
+ * @throws {@link Pulse.NotFoundError}
70
+ * @throws {@link Pulse.GoneError}
71
+ * @throws {@link Pulse.InternalServerError}
72
+ *
73
+ * @example
74
+ * await client.largeResults.getLargeResult({
75
+ * jobId: "jobId"
76
+ * })
77
+ */
78
+ getLargeResult(request, requestOptions) {
79
+ return core.HttpResponsePromise.fromPromise(this.__getLargeResult(request, requestOptions));
80
+ }
81
+ __getLargeResult(request, requestOptions) {
82
+ return __awaiter(this, void 0, void 0, function* () {
83
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
84
+ const { jobId } = request;
85
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
86
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
87
+ const _response = yield core.fetcher({
88
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PulseEnvironment.Default, `large_results/${core.url.encodePathParam(jobId)}`),
89
+ method: "GET",
90
+ headers: _headers,
91
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
92
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
93
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
94
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
95
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
96
+ logging: this._options.logging,
97
+ });
98
+ if (_response.ok) {
99
+ return { data: _response.body, rawResponse: _response.rawResponse };
100
+ }
101
+ if (_response.error.reason === "status-code") {
102
+ switch (_response.error.statusCode) {
103
+ case 404:
104
+ throw new Pulse.NotFoundError(_response.error.body, _response.rawResponse);
105
+ case 410:
106
+ throw new Pulse.GoneError(_response.error.body, _response.rawResponse);
107
+ case 500:
108
+ throw new Pulse.InternalServerError(_response.error.body, _response.rawResponse);
109
+ default:
110
+ throw new errors.PulseError({
111
+ statusCode: _response.error.statusCode,
112
+ body: _response.error.body,
113
+ rawResponse: _response.rawResponse,
114
+ });
115
+ }
116
+ }
117
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/large_results/{jobId}");
118
+ });
119
+ }
120
+ }
121
+ exports.LargeResultsClient = LargeResultsClient;
@@ -0,0 +1 @@
1
+ export * from "./requests/index.js";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests/index.js"), exports);
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * jobId: "jobId"
5
+ * }
6
+ */
7
+ export interface GetLargeResultLargeResultsRequest {
8
+ /** Job identifier from the extraction response. */
9
+ jobId: string;
10
+ }
@@ -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 @@
1
+ export type { GetLargeResultLargeResultsRequest } from "./GetLargeResultLargeResultsRequest.js";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from "./client/index.js";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./client/index.js"), exports);
@@ -0,0 +1,55 @@
1
+ import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
3
+ import * as core from "../../../../core/index.js";
4
+ import * as Pulse from "../../../index.js";
5
+ export declare namespace PipelineClient {
6
+ type Options = BaseClientOptions;
7
+ interface RequestOptions extends BaseRequestOptions {
8
+ }
9
+ }
10
+ export declare class PipelineClient {
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<PipelineClient.Options>;
12
+ constructor(options?: PipelineClient.Options);
13
+ /**
14
+ * Chain multiple processing steps (extract, schema, split) into a single
15
+ * request with inline configurations. No saved pipeline required.
16
+ *
17
+ * The `steps` object defines what to run and in what order. Outputs flow
18
+ * forward automatically — you never need to pass extraction IDs between
19
+ * steps.
20
+ *
21
+ * **Supported step combinations:**
22
+ * - `extract` — extract a single document
23
+ * - `extract` → `schema` — extract then apply structured schema
24
+ * - `extract` → `split` — extract then split into topics
25
+ * - `batch_extract` → `schema` — extract multiple files, combine into one schema output
26
+ *
27
+ * **Document input:**
28
+ * - Single file: provide `fileUrl` in JSON or `file` via multipart
29
+ * - Multiple files (batch_extract): provide `fileUrls` in JSON or multiple `file` fields via multipart
30
+ *
31
+ * Set `async: true` to return immediately with a `job_id` for polling via
32
+ * `GET /job/{jobId}`.
33
+ *
34
+ * Set `autoDelete: true` for zero-retention mode — all stored artifacts
35
+ * are deleted immediately after you receive the results. Requires
36
+ * `save_extractions` to be disabled for your organization.
37
+ *
38
+ * Requires the `enable_adhoc_pipeline` feature flag.
39
+ *
40
+ * @param {Pulse.PipelineExecuteInput} request
41
+ * @param {PipelineClient.RequestOptions} requestOptions - Request-specific configuration.
42
+ *
43
+ * @throws {@link Pulse.BadRequestError}
44
+ * @throws {@link Pulse.UnauthorizedError}
45
+ * @throws {@link Pulse.ForbiddenError}
46
+ * @throws {@link Pulse.TooManyRequestsError}
47
+ *
48
+ * @example
49
+ * await client.pipeline.execute({
50
+ * steps: {}
51
+ * })
52
+ */
53
+ execute(request: Pulse.PipelineExecuteInput, requestOptions?: PipelineClient.RequestOptions): core.HttpResponsePromise<Pulse.PipelineExecuteResponse>;
54
+ private __execute;
55
+ }