pulse-ts-sdk 1.0.8 → 1.0.10

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 (249) hide show
  1. package/README.md +22 -22
  2. package/dist/cjs/BaseClient.js +3 -2
  3. package/dist/cjs/Client.d.ts +12 -0
  4. package/dist/cjs/Client.js +78 -28
  5. package/dist/cjs/api/client/requests/ExtractAsyncRequest.d.ts +17 -5
  6. package/dist/cjs/api/client/requests/ExtractAsyncRequest.js +3 -2
  7. package/dist/cjs/api/client/requests/ExtractRequest.d.ts +17 -5
  8. package/dist/cjs/api/client/requests/ExtractRequest.js +3 -2
  9. package/dist/cjs/api/errors/GoneError.d.ts +6 -0
  10. package/dist/cjs/api/errors/GoneError.js +54 -0
  11. package/dist/cjs/api/errors/index.d.ts +1 -0
  12. package/dist/cjs/api/errors/index.js +1 -0
  13. package/dist/cjs/api/resources/batch/client/Client.js +32 -16
  14. package/dist/cjs/api/resources/form/client/Client.d.ts +148 -0
  15. package/dist/cjs/api/resources/form/client/Client.js +350 -0
  16. package/dist/cjs/api/resources/form/client/index.d.ts +1 -0
  17. package/dist/cjs/api/resources/form/client/index.js +17 -0
  18. package/dist/cjs/api/resources/form/client/requests/FormClearJsonInput.d.ts +19 -0
  19. package/dist/cjs/api/resources/form/client/requests/FormClearJsonInput.js +3 -0
  20. package/dist/cjs/api/resources/form/client/requests/FormDetectJsonInput.d.ts +14 -0
  21. package/dist/cjs/api/resources/form/client/requests/FormDetectJsonInput.js +3 -0
  22. package/dist/cjs/api/resources/form/client/requests/FormFillJsonInput.d.ts +21 -0
  23. package/dist/cjs/api/resources/form/client/requests/FormFillJsonInput.js +3 -0
  24. package/dist/cjs/api/resources/form/client/requests/index.d.ts +3 -0
  25. package/dist/cjs/api/resources/form/client/requests/index.js +2 -0
  26. package/dist/cjs/api/resources/form/index.d.ts +1 -0
  27. package/dist/cjs/api/resources/form/index.js +17 -0
  28. package/dist/cjs/api/resources/index.d.ts +8 -0
  29. package/dist/cjs/api/resources/index.js +9 -1
  30. package/dist/cjs/api/resources/jobs/client/Client.js +16 -8
  31. package/dist/cjs/api/resources/largeResults/client/Client.d.ts +41 -0
  32. package/dist/cjs/api/resources/largeResults/client/Client.js +131 -0
  33. package/dist/cjs/api/resources/largeResults/client/index.d.ts +1 -0
  34. package/dist/cjs/api/resources/largeResults/client/index.js +17 -0
  35. package/dist/cjs/api/resources/largeResults/client/requests/GetLargeResultLargeResultsRequest.d.ts +10 -0
  36. package/dist/cjs/api/resources/largeResults/client/requests/GetLargeResultLargeResultsRequest.js +3 -0
  37. package/dist/cjs/api/resources/largeResults/client/requests/index.d.ts +1 -0
  38. package/dist/cjs/api/resources/largeResults/client/requests/index.js +2 -0
  39. package/dist/cjs/api/resources/largeResults/index.d.ts +1 -0
  40. package/dist/cjs/api/resources/largeResults/index.js +17 -0
  41. package/dist/cjs/api/resources/pipeline/client/Client.d.ts +57 -0
  42. package/dist/cjs/api/resources/pipeline/client/Client.js +151 -0
  43. package/dist/cjs/api/resources/pipeline/client/index.d.ts +1 -0
  44. package/dist/cjs/api/resources/pipeline/client/index.js +17 -0
  45. package/dist/cjs/api/resources/pipeline/client/requests/PipelineExecuteInput.d.ts +17 -0
  46. package/dist/cjs/api/resources/pipeline/client/requests/PipelineExecuteInput.js +3 -0
  47. package/dist/cjs/api/resources/pipeline/client/requests/index.d.ts +1 -0
  48. package/dist/cjs/api/resources/pipeline/client/requests/index.js +2 -0
  49. package/dist/cjs/api/resources/pipeline/index.d.ts +1 -0
  50. package/dist/cjs/api/resources/pipeline/index.js +17 -0
  51. package/dist/cjs/api/resources/results/client/Client.d.ts +27 -0
  52. package/dist/cjs/api/resources/results/client/Client.js +116 -0
  53. package/dist/cjs/api/resources/results/client/index.d.ts +1 -0
  54. package/dist/cjs/api/resources/results/client/index.js +17 -0
  55. package/dist/cjs/api/resources/results/client/requests/GetPdfResultsRequest.d.ts +10 -0
  56. package/dist/cjs/api/resources/results/client/requests/GetPdfResultsRequest.js +3 -0
  57. package/dist/cjs/api/resources/results/client/requests/index.d.ts +1 -0
  58. package/dist/cjs/api/resources/results/client/requests/index.js +2 -0
  59. package/dist/cjs/api/resources/results/index.d.ts +1 -0
  60. package/dist/cjs/api/resources/results/index.js +17 -0
  61. package/dist/cjs/api/resources/webhooks/client/Client.js +8 -4
  62. package/dist/cjs/api/types/AsyncSubmissionResponse.d.ts +2 -0
  63. package/dist/cjs/api/types/ExtractInput.d.ts +17 -5
  64. package/dist/cjs/api/types/ExtractInput.js +3 -2
  65. package/dist/cjs/api/types/ExtractLargeResultResponse.d.ts +25 -0
  66. package/dist/cjs/api/types/ExtractLargeResultResponse.js +3 -0
  67. package/dist/cjs/api/types/ExtractOptions.d.ts +17 -5
  68. package/dist/cjs/api/types/ExtractOptions.js +3 -2
  69. package/dist/cjs/api/types/ExtractResponse.d.ts +3 -3
  70. package/dist/cjs/api/types/ExtractResultCore.d.ts +112 -0
  71. package/dist/cjs/api/types/ExtractResultCore.js +3 -0
  72. package/dist/cjs/api/types/FormCell.d.ts +40 -0
  73. package/dist/cjs/api/types/FormCell.js +13 -0
  74. package/dist/cjs/api/types/FormCheckboxDetail.d.ts +11 -0
  75. package/dist/cjs/api/types/FormCheckboxDetail.js +3 -0
  76. package/dist/cjs/api/types/FormClearMultipartInput.d.ts +21 -0
  77. package/dist/cjs/api/types/FormClearMultipartInput.js +3 -0
  78. package/dist/cjs/api/types/FormDetectMultipartInput.d.ts +16 -0
  79. package/dist/cjs/api/types/FormDetectMultipartInput.js +3 -0
  80. package/dist/cjs/api/types/FormFillMultipartInput.d.ts +21 -0
  81. package/dist/cjs/api/types/FormFillMultipartInput.js +3 -0
  82. package/dist/cjs/api/types/FormFillSharedOptions.d.ts +12 -0
  83. package/dist/cjs/api/types/FormFillSharedOptions.js +3 -0
  84. package/dist/cjs/api/types/FormPlanInfo.d.ts +11 -0
  85. package/dist/cjs/api/types/FormPlanInfo.js +3 -0
  86. package/dist/cjs/api/types/FormResult.d.ts +24 -0
  87. package/dist/cjs/api/types/FormResult.js +3 -0
  88. package/dist/cjs/api/types/FormSharedOptions.d.ts +9 -0
  89. package/dist/cjs/api/types/FormSharedOptions.js +3 -0
  90. package/dist/cjs/api/types/GoneErrorBody.d.ts +9 -0
  91. package/dist/cjs/api/types/GoneErrorBody.js +3 -0
  92. package/dist/cjs/api/types/JobStatusResponse.d.ts +1 -1
  93. package/dist/cjs/api/types/PipelineBatchExtractResult.d.ts +13 -0
  94. package/dist/cjs/api/types/PipelineBatchExtractResult.js +3 -0
  95. package/dist/cjs/api/types/PipelineExecuteMultipartInput.d.ts +13 -0
  96. package/dist/cjs/api/types/PipelineExecuteMultipartInput.js +3 -0
  97. package/dist/cjs/api/types/PipelineExecuteResponse.d.ts +21 -0
  98. package/dist/cjs/api/types/PipelineExecuteResponse.js +11 -0
  99. package/dist/cjs/api/types/PipelineExtractResult.d.ts +118 -0
  100. package/dist/cjs/api/types/PipelineExtractResult.js +3 -0
  101. package/dist/cjs/api/types/PipelineResults.d.ts +16 -0
  102. package/dist/cjs/api/types/PipelineResults.js +3 -0
  103. package/dist/cjs/api/types/PipelineSchemaResult.d.ts +14 -0
  104. package/dist/cjs/api/types/PipelineSchemaResult.js +3 -0
  105. package/dist/cjs/api/types/PipelineSplitResult.d.ts +18 -0
  106. package/dist/cjs/api/types/PipelineSplitResult.js +3 -0
  107. package/dist/cjs/api/types/PipelineStepBatchExtractConfig.d.ts +147 -0
  108. package/dist/cjs/api/types/PipelineStepBatchExtractConfig.js +27 -0
  109. package/dist/cjs/api/types/PipelineSteps.d.ts +16 -0
  110. package/dist/cjs/api/types/PipelineSteps.js +3 -0
  111. package/dist/cjs/api/types/PipelineTablesResult.d.ts +33 -0
  112. package/dist/cjs/api/types/PipelineTablesResult.js +3 -0
  113. package/dist/cjs/api/types/SingleSchemaResponse.d.ts +2 -0
  114. package/dist/cjs/api/types/SplitResponse.d.ts +1 -6
  115. package/dist/cjs/api/types/SplitResultCore.d.ts +12 -0
  116. package/dist/cjs/api/types/SplitResultCore.js +3 -0
  117. package/dist/cjs/api/types/SplitSchemaResponse.d.ts +2 -0
  118. package/dist/cjs/api/types/TablesConfig.d.ts +5 -2
  119. package/dist/cjs/api/types/TablesConfig.js +2 -1
  120. package/dist/cjs/api/types/TablesResponse.d.ts +4 -2
  121. package/dist/cjs/api/types/index.d.ts +23 -0
  122. package/dist/cjs/api/types/index.js +23 -0
  123. package/dist/cjs/version.d.ts +1 -1
  124. package/dist/cjs/version.js +1 -1
  125. package/dist/esm/BaseClient.mjs +3 -2
  126. package/dist/esm/Client.d.mts +12 -0
  127. package/dist/esm/Client.mjs +74 -24
  128. package/dist/esm/api/client/requests/ExtractAsyncRequest.d.mts +17 -5
  129. package/dist/esm/api/client/requests/ExtractAsyncRequest.mjs +3 -2
  130. package/dist/esm/api/client/requests/ExtractRequest.d.mts +17 -5
  131. package/dist/esm/api/client/requests/ExtractRequest.mjs +3 -2
  132. package/dist/esm/api/errors/GoneError.d.mts +6 -0
  133. package/dist/esm/api/errors/GoneError.mjs +17 -0
  134. package/dist/esm/api/errors/index.d.mts +1 -0
  135. package/dist/esm/api/errors/index.mjs +1 -0
  136. package/dist/esm/api/resources/batch/client/Client.mjs +32 -16
  137. package/dist/esm/api/resources/form/client/Client.d.mts +148 -0
  138. package/dist/esm/api/resources/form/client/Client.mjs +313 -0
  139. package/dist/esm/api/resources/form/client/index.d.mts +1 -0
  140. package/dist/esm/api/resources/form/client/index.mjs +1 -0
  141. package/dist/esm/api/resources/form/client/requests/FormClearJsonInput.d.mts +19 -0
  142. package/dist/esm/api/resources/form/client/requests/FormClearJsonInput.mjs +2 -0
  143. package/dist/esm/api/resources/form/client/requests/FormDetectJsonInput.d.mts +14 -0
  144. package/dist/esm/api/resources/form/client/requests/FormDetectJsonInput.mjs +2 -0
  145. package/dist/esm/api/resources/form/client/requests/FormFillJsonInput.d.mts +21 -0
  146. package/dist/esm/api/resources/form/client/requests/FormFillJsonInput.mjs +2 -0
  147. package/dist/esm/api/resources/form/client/requests/index.d.mts +3 -0
  148. package/dist/esm/api/resources/form/client/requests/index.mjs +1 -0
  149. package/dist/esm/api/resources/form/index.d.mts +1 -0
  150. package/dist/esm/api/resources/form/index.mjs +1 -0
  151. package/dist/esm/api/resources/index.d.mts +8 -0
  152. package/dist/esm/api/resources/index.mjs +8 -0
  153. package/dist/esm/api/resources/jobs/client/Client.mjs +16 -8
  154. package/dist/esm/api/resources/largeResults/client/Client.d.mts +41 -0
  155. package/dist/esm/api/resources/largeResults/client/Client.mjs +94 -0
  156. package/dist/esm/api/resources/largeResults/client/index.d.mts +1 -0
  157. package/dist/esm/api/resources/largeResults/client/index.mjs +1 -0
  158. package/dist/esm/api/resources/largeResults/client/requests/GetLargeResultLargeResultsRequest.d.mts +10 -0
  159. package/dist/esm/api/resources/largeResults/client/requests/GetLargeResultLargeResultsRequest.mjs +2 -0
  160. package/dist/esm/api/resources/largeResults/client/requests/index.d.mts +1 -0
  161. package/dist/esm/api/resources/largeResults/client/requests/index.mjs +1 -0
  162. package/dist/esm/api/resources/largeResults/index.d.mts +1 -0
  163. package/dist/esm/api/resources/largeResults/index.mjs +1 -0
  164. package/dist/esm/api/resources/pipeline/client/Client.d.mts +57 -0
  165. package/dist/esm/api/resources/pipeline/client/Client.mjs +114 -0
  166. package/dist/esm/api/resources/pipeline/client/index.d.mts +1 -0
  167. package/dist/esm/api/resources/pipeline/client/index.mjs +1 -0
  168. package/dist/esm/api/resources/pipeline/client/requests/PipelineExecuteInput.d.mts +17 -0
  169. package/dist/esm/api/resources/pipeline/client/requests/PipelineExecuteInput.mjs +2 -0
  170. package/dist/esm/api/resources/pipeline/client/requests/index.d.mts +1 -0
  171. package/dist/esm/api/resources/pipeline/client/requests/index.mjs +1 -0
  172. package/dist/esm/api/resources/pipeline/index.d.mts +1 -0
  173. package/dist/esm/api/resources/pipeline/index.mjs +1 -0
  174. package/dist/esm/api/resources/results/client/Client.d.mts +27 -0
  175. package/dist/esm/api/resources/results/client/Client.mjs +79 -0
  176. package/dist/esm/api/resources/results/client/index.d.mts +1 -0
  177. package/dist/esm/api/resources/results/client/index.mjs +1 -0
  178. package/dist/esm/api/resources/results/client/requests/GetPdfResultsRequest.d.mts +10 -0
  179. package/dist/esm/api/resources/results/client/requests/GetPdfResultsRequest.mjs +2 -0
  180. package/dist/esm/api/resources/results/client/requests/index.d.mts +1 -0
  181. package/dist/esm/api/resources/results/client/requests/index.mjs +1 -0
  182. package/dist/esm/api/resources/results/index.d.mts +1 -0
  183. package/dist/esm/api/resources/results/index.mjs +1 -0
  184. package/dist/esm/api/resources/webhooks/client/Client.mjs +8 -4
  185. package/dist/esm/api/types/AsyncSubmissionResponse.d.mts +2 -0
  186. package/dist/esm/api/types/ExtractInput.d.mts +17 -5
  187. package/dist/esm/api/types/ExtractInput.mjs +3 -2
  188. package/dist/esm/api/types/ExtractLargeResultResponse.d.mts +25 -0
  189. package/dist/esm/api/types/ExtractLargeResultResponse.mjs +2 -0
  190. package/dist/esm/api/types/ExtractOptions.d.mts +17 -5
  191. package/dist/esm/api/types/ExtractOptions.mjs +3 -2
  192. package/dist/esm/api/types/ExtractResponse.d.mts +3 -3
  193. package/dist/esm/api/types/ExtractResultCore.d.mts +112 -0
  194. package/dist/esm/api/types/ExtractResultCore.mjs +2 -0
  195. package/dist/esm/api/types/FormCell.d.mts +40 -0
  196. package/dist/esm/api/types/FormCell.mjs +10 -0
  197. package/dist/esm/api/types/FormCheckboxDetail.d.mts +11 -0
  198. package/dist/esm/api/types/FormCheckboxDetail.mjs +2 -0
  199. package/dist/esm/api/types/FormClearMultipartInput.d.mts +21 -0
  200. package/dist/esm/api/types/FormClearMultipartInput.mjs +2 -0
  201. package/dist/esm/api/types/FormDetectMultipartInput.d.mts +16 -0
  202. package/dist/esm/api/types/FormDetectMultipartInput.mjs +2 -0
  203. package/dist/esm/api/types/FormFillMultipartInput.d.mts +21 -0
  204. package/dist/esm/api/types/FormFillMultipartInput.mjs +2 -0
  205. package/dist/esm/api/types/FormFillSharedOptions.d.mts +12 -0
  206. package/dist/esm/api/types/FormFillSharedOptions.mjs +2 -0
  207. package/dist/esm/api/types/FormPlanInfo.d.mts +11 -0
  208. package/dist/esm/api/types/FormPlanInfo.mjs +2 -0
  209. package/dist/esm/api/types/FormResult.d.mts +24 -0
  210. package/dist/esm/api/types/FormResult.mjs +2 -0
  211. package/dist/esm/api/types/FormSharedOptions.d.mts +9 -0
  212. package/dist/esm/api/types/FormSharedOptions.mjs +2 -0
  213. package/dist/esm/api/types/GoneErrorBody.d.mts +9 -0
  214. package/dist/esm/api/types/GoneErrorBody.mjs +2 -0
  215. package/dist/esm/api/types/JobStatusResponse.d.mts +1 -1
  216. package/dist/esm/api/types/PipelineBatchExtractResult.d.mts +13 -0
  217. package/dist/esm/api/types/PipelineBatchExtractResult.mjs +2 -0
  218. package/dist/esm/api/types/PipelineExecuteMultipartInput.d.mts +13 -0
  219. package/dist/esm/api/types/PipelineExecuteMultipartInput.mjs +2 -0
  220. package/dist/esm/api/types/PipelineExecuteResponse.d.mts +21 -0
  221. package/dist/esm/api/types/PipelineExecuteResponse.mjs +8 -0
  222. package/dist/esm/api/types/PipelineExtractResult.d.mts +118 -0
  223. package/dist/esm/api/types/PipelineExtractResult.mjs +2 -0
  224. package/dist/esm/api/types/PipelineResults.d.mts +16 -0
  225. package/dist/esm/api/types/PipelineResults.mjs +2 -0
  226. package/dist/esm/api/types/PipelineSchemaResult.d.mts +14 -0
  227. package/dist/esm/api/types/PipelineSchemaResult.mjs +2 -0
  228. package/dist/esm/api/types/PipelineSplitResult.d.mts +18 -0
  229. package/dist/esm/api/types/PipelineSplitResult.mjs +2 -0
  230. package/dist/esm/api/types/PipelineStepBatchExtractConfig.d.mts +147 -0
  231. package/dist/esm/api/types/PipelineStepBatchExtractConfig.mjs +24 -0
  232. package/dist/esm/api/types/PipelineSteps.d.mts +16 -0
  233. package/dist/esm/api/types/PipelineSteps.mjs +2 -0
  234. package/dist/esm/api/types/PipelineTablesResult.d.mts +33 -0
  235. package/dist/esm/api/types/PipelineTablesResult.mjs +2 -0
  236. package/dist/esm/api/types/SingleSchemaResponse.d.mts +2 -0
  237. package/dist/esm/api/types/SplitResponse.d.mts +1 -6
  238. package/dist/esm/api/types/SplitResultCore.d.mts +12 -0
  239. package/dist/esm/api/types/SplitResultCore.mjs +2 -0
  240. package/dist/esm/api/types/SplitSchemaResponse.d.mts +2 -0
  241. package/dist/esm/api/types/TablesConfig.d.mts +5 -2
  242. package/dist/esm/api/types/TablesConfig.mjs +2 -1
  243. package/dist/esm/api/types/TablesResponse.d.mts +4 -2
  244. package/dist/esm/api/types/index.d.mts +23 -0
  245. package/dist/esm/api/types/index.mjs +23 -0
  246. package/dist/esm/version.d.mts +1 -1
  247. package/dist/esm/version.mjs +1 -1
  248. package/package.json +1 -1
  249. package/reference.md +513 -0
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * jobId: "jobId"
5
+ * }
6
+ */
7
+ export interface GetPdfResultsRequest {
8
+ /** Job identifier from a form endpoint. */
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 { GetPdfResultsRequest } from "./GetPdfResultsRequest.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);
@@ -71,7 +71,7 @@ class WebhooksClient {
71
71
  }
72
72
  __createWebhookLink(requestOptions) {
73
73
  return __awaiter(this, void 0, void 0, function* () {
74
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
74
+ var _a, _b, _c, _d, _e, _f, _g, _h;
75
75
  const _authRequest = yield this._options.authProvider.getAuthRequest();
76
76
  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);
77
77
  const _response = yield core.fetcher({
@@ -79,10 +79,14 @@ class WebhooksClient {
79
79
  method: "POST",
80
80
  headers: _headers,
81
81
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
82
- 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,
83
- 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,
82
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null
83
+ ? requestOptions.timeoutInSeconds * 1000
84
+ : ((_d = this._options) === null || _d === void 0 ? void 0 : _d.timeoutInSeconds) != null
85
+ ? ((_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) * 1000
86
+ : undefined,
87
+ 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,
84
88
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
85
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
89
+ fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
86
90
  logging: this._options.logging,
87
91
  });
88
92
  if (_response.ok) {
@@ -10,6 +10,8 @@ export interface AsyncSubmissionResponse {
10
10
  message?: string;
11
11
  /** **Deprecated** — Timestamp indicating when the job was accepted. Retained for backward compatibility. Use `GET /job/{jobId}` for timing details. */
12
12
  queuedAt?: string;
13
+ /** Number of credits consumed by this request. Only present when the organization has the credit billing system enabled. */
14
+ credits_used?: number | null;
13
15
  }
14
16
  export declare namespace AsyncSubmissionResponse {
15
17
  /** Initial status reported by the server. */
@@ -6,7 +6,7 @@ export interface ExtractInput {
6
6
  file?: string;
7
7
  /** Public or pre-signed URL that Pulse will download and extract. Required unless file is provided. */
8
8
  fileUrl?: string;
9
- /** Extraction model to use. When set to `enterprise-preview`, routes the request through Pulse's self-hosted VPC extraction model instead of the default cloud-based service. If omitted or set to any other value, the default model is used. */
9
+ /** Extraction model to use. When set to `pulse-ultra-2`, routes the request through Pulse Ultra 2 (self-hosted VPC model) instead of the default cloud-based service. If omitted or set to `default`, the default model is used. */
10
10
  model?: ExtractInput.Model;
11
11
  /** Page range filter supporting segments such as `1-2` or mixed ranges like `1-2,5`. */
12
12
  pages?: string;
@@ -14,6 +14,8 @@ export interface ExtractInput {
14
14
  figureProcessing?: ExtractInput.FigureProcessing;
15
15
  /** Settings that enable additional processing passes or alternate output formats. Each enabled extension produces a corresponding output field under `response.extensions.*`. */
16
16
  extensions?: ExtractInput.Extensions;
17
+ /** 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. */
18
+ spreadsheet?: ExtractInput.Spreadsheet;
17
19
  /** Options for persisting extraction artifacts. When enabled (default), artifacts are saved to storage and a database record is created. */
18
20
  storage?: ExtractInput.Storage;
19
21
  /** If true, returns immediately with a job_id for polling via GET /job/{jobId}. Otherwise processes synchronously. */
@@ -42,9 +44,10 @@ export interface ExtractInput {
42
44
  thinking?: boolean;
43
45
  }
44
46
  export declare namespace ExtractInput {
45
- /** Extraction model to use. When set to `enterprise-preview`, routes the request through Pulse's self-hosted VPC extraction model instead of the default cloud-based service. If omitted or set to any other value, the default model is used. */
47
+ /** Extraction model to use. When set to `pulse-ultra-2`, routes the request through Pulse Ultra 2 (self-hosted VPC model) instead of the default cloud-based service. If omitted or set to `default`, the default model is used. */
46
48
  const Model: {
47
- readonly EnterprisePreview: "enterprise-preview";
49
+ readonly Default: "default";
50
+ readonly PulseUltra2: "pulse-ultra-2";
48
51
  };
49
52
  type Model = (typeof Model)[keyof typeof Model];
50
53
  /**
@@ -60,8 +63,6 @@ export declare namespace ExtractInput {
60
63
  * Settings that enable additional processing passes or alternate output formats. Each enabled extension produces a corresponding output field under `response.extensions.*`.
61
64
  */
62
65
  interface Extensions {
63
- /** Merge tables that span multiple pages into a single table. */
64
- mergeTables?: boolean;
65
66
  /** Link footnote markers to their corresponding footnote text. */
66
67
  footnoteReferences?: boolean;
67
68
  /** Chunking configuration. When provided, the document is split into chunks using the specified strategies. Results appear in `response.extensions.chunking`. */
@@ -103,6 +104,17 @@ export declare namespace ExtractInput {
103
104
  returnXml?: boolean;
104
105
  }
105
106
  }
107
+ /**
108
+ * 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.
109
+ */
110
+ interface Spreadsheet {
111
+ /** Include rows that are hidden in the Excel workbook. */
112
+ includeHiddenRows?: boolean;
113
+ /** Include columns that are hidden in the Excel workbook. */
114
+ includeHiddenCols?: boolean;
115
+ /** Include sheets that are hidden in the Excel workbook. */
116
+ includeHiddenSheets?: boolean;
117
+ }
106
118
  /**
107
119
  * Options for persisting extraction artifacts. When enabled (default), artifacts are saved to storage and a database record is created.
108
120
  */
@@ -4,9 +4,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.ExtractInput = void 0;
5
5
  var ExtractInput;
6
6
  (function (ExtractInput) {
7
- /** Extraction model to use. When set to `enterprise-preview`, routes the request through Pulse's self-hosted VPC extraction model instead of the default cloud-based service. If omitted or set to any other value, the default model is used. */
7
+ /** Extraction model to use. When set to `pulse-ultra-2`, routes the request through Pulse Ultra 2 (self-hosted VPC model) instead of the default cloud-based service. If omitted or set to `default`, the default model is used. */
8
8
  ExtractInput.Model = {
9
- EnterprisePreview: "enterprise-preview",
9
+ Default: "default",
10
+ PulseUltra2: "pulse-ultra-2",
10
11
  };
11
12
  let Extensions;
12
13
  (function (Extensions) {
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Returned instead of the full extraction result when the document has 70 or more pages. The `url` field is a single-use download link; fetch it once to retrieve the complete `ExtractResultCore` payload. Subsequent requests to the same URL return 410 Gone.
3
+ */
4
+ export interface ExtractLargeResultResponse {
5
+ /** Always `true` for large document responses. */
6
+ is_url: boolean;
7
+ /** Single-use URL to download the full extraction result. After one successful download the resource is deleted and further requests return 410 Gone. */
8
+ url: string;
9
+ /** Extraction identifier (when storage is enabled). */
10
+ extraction_id?: string;
11
+ /** Number of pages in the document. */
12
+ page_count?: number;
13
+ /** Billing tier and usage information. */
14
+ plan_info?: ExtractLargeResultResponse.PlanInfo;
15
+ }
16
+ export declare namespace ExtractLargeResultResponse {
17
+ /**
18
+ * Billing tier and usage information.
19
+ */
20
+ interface PlanInfo {
21
+ tier?: string;
22
+ pages_used?: number;
23
+ note?: string;
24
+ }
25
+ }
@@ -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 });
@@ -2,7 +2,7 @@
2
2
  * Common extraction options shared by synchronous and asynchronous endpoints.
3
3
  */
4
4
  export interface ExtractOptions {
5
- /** Extraction model to use. When set to `enterprise-preview`, routes the request through Pulse's self-hosted VPC extraction model instead of the default cloud-based service. If omitted or set to any other value, the default model is used. */
5
+ /** Extraction model to use. When set to `pulse-ultra-2`, routes the request through Pulse Ultra 2 (self-hosted VPC model) instead of the default cloud-based service. If omitted or set to `default`, the default model is used. */
6
6
  model?: ExtractOptions.Model;
7
7
  /** Page range filter supporting segments such as `1-2` or mixed ranges like `1-2,5`. */
8
8
  pages?: string;
@@ -10,6 +10,8 @@ export interface ExtractOptions {
10
10
  figureProcessing?: ExtractOptions.FigureProcessing;
11
11
  /** Settings that enable additional processing passes or alternate output formats. Each enabled extension produces a corresponding output field under `response.extensions.*`. */
12
12
  extensions?: ExtractOptions.Extensions;
13
+ /** 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. */
14
+ spreadsheet?: ExtractOptions.Spreadsheet;
13
15
  /** Options for persisting extraction artifacts. When enabled (default), artifacts are saved to storage and a database record is created. */
14
16
  storage?: ExtractOptions.Storage;
15
17
  /** If true, returns immediately with a job_id for polling via GET /job/{jobId}. Otherwise processes synchronously. */
@@ -38,9 +40,10 @@ export interface ExtractOptions {
38
40
  thinking?: boolean;
39
41
  }
40
42
  export declare namespace ExtractOptions {
41
- /** Extraction model to use. When set to `enterprise-preview`, routes the request through Pulse's self-hosted VPC extraction model instead of the default cloud-based service. If omitted or set to any other value, the default model is used. */
43
+ /** Extraction model to use. When set to `pulse-ultra-2`, routes the request through Pulse Ultra 2 (self-hosted VPC model) instead of the default cloud-based service. If omitted or set to `default`, the default model is used. */
42
44
  const Model: {
43
- readonly EnterprisePreview: "enterprise-preview";
45
+ readonly Default: "default";
46
+ readonly PulseUltra2: "pulse-ultra-2";
44
47
  };
45
48
  type Model = (typeof Model)[keyof typeof Model];
46
49
  /**
@@ -56,8 +59,6 @@ export declare namespace ExtractOptions {
56
59
  * Settings that enable additional processing passes or alternate output formats. Each enabled extension produces a corresponding output field under `response.extensions.*`.
57
60
  */
58
61
  interface Extensions {
59
- /** Merge tables that span multiple pages into a single table. */
60
- mergeTables?: boolean;
61
62
  /** Link footnote markers to their corresponding footnote text. */
62
63
  footnoteReferences?: boolean;
63
64
  /** Chunking configuration. When provided, the document is split into chunks using the specified strategies. Results appear in `response.extensions.chunking`. */
@@ -99,6 +100,17 @@ export declare namespace ExtractOptions {
99
100
  returnXml?: boolean;
100
101
  }
101
102
  }
103
+ /**
104
+ * 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.
105
+ */
106
+ interface Spreadsheet {
107
+ /** Include rows that are hidden in the Excel workbook. */
108
+ includeHiddenRows?: boolean;
109
+ /** Include columns that are hidden in the Excel workbook. */
110
+ includeHiddenCols?: boolean;
111
+ /** Include sheets that are hidden in the Excel workbook. */
112
+ includeHiddenSheets?: boolean;
113
+ }
102
114
  /**
103
115
  * Options for persisting extraction artifacts. When enabled (default), artifacts are saved to storage and a database record is created.
104
116
  */
@@ -4,9 +4,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.ExtractOptions = void 0;
5
5
  var ExtractOptions;
6
6
  (function (ExtractOptions) {
7
- /** Extraction model to use. When set to `enterprise-preview`, routes the request through Pulse's self-hosted VPC extraction model instead of the default cloud-based service. If omitted or set to any other value, the default model is used. */
7
+ /** Extraction model to use. When set to `pulse-ultra-2`, routes the request through Pulse Ultra 2 (self-hosted VPC model) instead of the default cloud-based service. If omitted or set to `default`, the default model is used. */
8
8
  ExtractOptions.Model = {
9
- EnterprisePreview: "enterprise-preview",
9
+ Default: "default",
10
+ PulseUltra2: "pulse-ultra-2",
10
11
  };
11
12
  let Extensions;
12
13
  (function (Extensions) {
@@ -1,6 +1,6 @@
1
1
  import type * as Pulse from "../index.js";
2
2
  /**
3
- * Full extraction result returned by the synchronous `/extract` endpoint. Contains the extracted markdown, optional extensions output, bounding boxes, and storage metadata.
3
+ * Full extraction result returned by the synchronous `/extract` endpoint. Inherits all core fields and adds deprecated backward-compatibility fields.
4
4
  */
5
5
  export interface ExtractResponse {
6
6
  /** Primary markdown content extracted from the document. Always present in the new format. */
@@ -19,6 +19,8 @@ export interface ExtractResponse {
19
19
  plan_info?: ExtractResponse.PlanInfo;
20
20
  /** Non-fatal warnings generated during extraction. Includes deprecation notices when legacy input parameters are used, as well as processing warnings (e.g. word-level bounding box limitations). */
21
21
  warnings?: string[];
22
+ /** Number of credits consumed by this request. Only present when the organization has the credit billing system enabled. */
23
+ credits_used?: number | null;
22
24
  /** **Deprecated** — Use `extensions.altOutputs.html` instead. HTML representation of the extracted content. Present when the legacy `returnHtml` input was used. */
23
25
  html?: string;
24
26
  /** **Deprecated** — Use `extensions.chunking` instead. Document content split into chunks. Present when the legacy `chunking` input was used. */
@@ -45,8 +47,6 @@ export declare namespace ExtractResponse {
45
47
  interface Extensions {
46
48
  /** Chunk results by strategy. Present when `extensions.chunking` was provided in the request. */
47
49
  chunking?: Extensions.Chunking;
48
- /** Merge tables result/metadata. Present when `extensions.mergeTables` was enabled. */
49
- mergeTables?: Record<string, unknown>;
50
50
  /** List of detected footnotes with their in-text references. Present when `extensions.footnoteReferences` was enabled. Each item links a footnote paragraph to the body-text paragraphs that reference it, using bounding-box text IDs. */
51
51
  footnoteReferences?: Extensions.FootnoteReferences.Item[];
52
52
  /** Alternate output formats. Each key corresponds to an enabled alt output. */
@@ -0,0 +1,112 @@
1
+ /**
2
+ * Core extraction result fields shared by the synchronous `/extract` endpoint and the pipeline extract step.
3
+ */
4
+ export interface ExtractResultCore {
5
+ /** Primary markdown content extracted from the document. Always present in the new format. */
6
+ markdown?: string;
7
+ /** Output from enabled extensions. Each key corresponds to an extension that was enabled in the request under `extensions.*`. Only keys for enabled extensions are present. */
8
+ extensions?: ExtractResultCore.Extensions;
9
+ /** Positional bounding-box data for text, titles, headers, footers, images, and tables. Used by the frontend for annotation overlays. */
10
+ bounding_boxes?: Record<string, unknown>;
11
+ /** Persisted extraction ID. Present when storage is enabled (default). Use this ID with `/split` and `/schema` endpoints. */
12
+ extraction_id?: string;
13
+ /** URL to view the extraction on the Pulse platform. Present when storage is enabled. */
14
+ extraction_url?: string;
15
+ /** Number of pages processed. */
16
+ page_count?: number;
17
+ /** Billing tier and usage information. */
18
+ plan_info?: ExtractResultCore.PlanInfo;
19
+ /** Non-fatal warnings generated during extraction. Includes deprecation notices when legacy input parameters are used, as well as processing warnings (e.g. word-level bounding box limitations). */
20
+ warnings?: string[];
21
+ /** Number of credits consumed by this request. Only present when the organization has the credit billing system enabled. */
22
+ credits_used?: number | null;
23
+ }
24
+ export declare namespace ExtractResultCore {
25
+ /**
26
+ * Output from enabled extensions. Each key corresponds to an extension that was enabled in the request under `extensions.*`. Only keys for enabled extensions are present.
27
+ */
28
+ interface Extensions {
29
+ /** Chunk results by strategy. Present when `extensions.chunking` was provided in the request. */
30
+ chunking?: Extensions.Chunking;
31
+ /** List of detected footnotes with their in-text references. Present when `extensions.footnoteReferences` was enabled. Each item links a footnote paragraph to the body-text paragraphs that reference it, using bounding-box text IDs. */
32
+ footnoteReferences?: Extensions.FootnoteReferences.Item[];
33
+ /** Alternate output formats. Each key corresponds to an enabled alt output. */
34
+ altOutputs?: Extensions.AltOutputs;
35
+ }
36
+ namespace Extensions {
37
+ /**
38
+ * Chunk results by strategy. Present when `extensions.chunking` was provided in the request.
39
+ */
40
+ interface Chunking {
41
+ /** Semantically-segmented chunks. */
42
+ semantic?: string[];
43
+ /** Chunks split by document headers/headings. */
44
+ header?: string[];
45
+ /** One chunk per page. */
46
+ page?: string[];
47
+ /** Recursively-split chunks respecting size limits. */
48
+ recursive?: string[];
49
+ }
50
+ type FootnoteReferences = FootnoteReferences.Item[];
51
+ namespace FootnoteReferences {
52
+ interface Item {
53
+ /** The footnote marker symbol (e.g. "*", "†", "1", "#"). */
54
+ symbol?: string;
55
+ /** The bounding-box text ID (e.g. "txt-15") of the footnote explanation paragraph. */
56
+ footnoteTextId?: string;
57
+ /** Bounding-box text IDs of body-text paragraphs that contain a reference to this footnote marker. */
58
+ referenceTextIds?: string[];
59
+ }
60
+ }
61
+ /**
62
+ * Alternate output formats. Each key corresponds to an enabled alt output.
63
+ */
64
+ interface AltOutputs {
65
+ /** Word-level bounding box data. Present when `extensions.altOutputs.wlbb` was enabled and input is a PDF. */
66
+ wlbb?: AltOutputs.Wlbb;
67
+ /** HTML representation of the document. Present when `extensions.altOutputs.returnHtml` was enabled. */
68
+ html?: string;
69
+ /** XML representation of the document. Present when `extensions.altOutputs.returnXml` was enabled. (WIP) */
70
+ xml?: string;
71
+ }
72
+ namespace AltOutputs {
73
+ /**
74
+ * Word-level bounding box data. Present when `extensions.altOutputs.wlbb` was enabled and input is a PDF.
75
+ */
76
+ interface Wlbb {
77
+ /** List of detected words with their positions. */
78
+ words?: Wlbb.Words.Item[];
79
+ /** Error message if word-level extraction failed. */
80
+ error?: string;
81
+ }
82
+ namespace Wlbb {
83
+ type Words = Words.Item[];
84
+ namespace Words {
85
+ interface Item {
86
+ /** Unique identifier for the word (e.g. "w-1", "w-2", …). */
87
+ id?: string;
88
+ /** The recognised word text. */
89
+ text?: string;
90
+ /** 1-indexed page number in the original document. */
91
+ page_number?: number;
92
+ /** Flat 4-corner polygon: [x1,y1, x2,y2, x3,y3, x4,y4]. All coordinates normalised to 0–1 range. */
93
+ bounding_box?: number[];
94
+ /** Recognition confidence score (0–1). */
95
+ average_word_confidence?: number;
96
+ }
97
+ }
98
+ }
99
+ }
100
+ }
101
+ /**
102
+ * Billing tier and usage information.
103
+ */
104
+ interface PlanInfo {
105
+ /** Current plan tier name. */
106
+ tier?: string;
107
+ /** Cumulative pages used after this extraction. */
108
+ pages_used?: number;
109
+ /** Human-readable plan note. */
110
+ note?: string;
111
+ }
112
+ }
@@ -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,40 @@
1
+ import type * as Pulse from "../index.js";
2
+ /**
3
+ * A single detected cell on a form page. Cells are produced by Pulse
4
+ * cell detection during a `/form/detect`, `/form/fill`, or
5
+ * `/form/clear` call and may be passed back via `form_fields` to
6
+ * override what Pulse uses when filling or clearing.
7
+ *
8
+ * All coordinate fields (`bounding_box`, `checkbox_coord`) are
9
+ * normalized to `[0, 1]` relative to the page width / height, so
10
+ * they're independent of the renderer's pixel resolution. Multiply
11
+ * by your render width / height to convert to your own pixel space.
12
+ * `page_number` is 1-indexed.
13
+ */
14
+ export interface FormCell {
15
+ /** 1-indexed page the cell belongs to. */
16
+ page_number?: number;
17
+ /** Cell bounding box `[x1, y1, x2, y2]` normalized to the range `[0, 1]` (top-left origin). Same shape as the `bounding_box` field returned by `/extract`. */
18
+ bounding_box?: number[];
19
+ /** Current text content of the cell. Empty string for unfilled cells. */
20
+ text?: string;
21
+ /** Detected cell type. Common values are `text`, `checkbox`, and `signature`. Additional values may be returned as the detector evolves. */
22
+ type?: FormCell.Type;
23
+ /** Row index inside the detected table this cell belongs to, when the cell sits in a tabular region. */
24
+ row?: number;
25
+ /** Column index inside the detected table this cell belongs to, when the cell sits in a tabular region. */
26
+ col?: number;
27
+ /** Index of the detected table on the page this cell belongs to (0-indexed). Cells outside any detected table may omit this field. */
28
+ table_idx?: number;
29
+ /** Only present when `type == "checkbox"`. One entry per individual checkbox inside this cell — a single cell often contains multiple checkboxes (e.g. a "Filing Status" row with Single / MFJ / MFS / HoH / QSS). The cell-level `text` is the raw OCR'd line covering the whole cell; per-box labels live here on each detail. */
30
+ checkbox_details?: Pulse.FormCheckboxDetail[];
31
+ }
32
+ export declare namespace FormCell {
33
+ /** Detected cell type. Common values are `text`, `checkbox`, and `signature`. Additional values may be returned as the detector evolves. */
34
+ const Type: {
35
+ readonly Text: "text";
36
+ readonly Checkbox: "checkbox";
37
+ readonly Signature: "signature";
38
+ };
39
+ type Type = (typeof Type)[keyof typeof Type];
40
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.FormCell = void 0;
5
+ var FormCell;
6
+ (function (FormCell) {
7
+ /** Detected cell type. Common values are `text`, `checkbox`, and `signature`. Additional values may be returned as the detector evolves. */
8
+ FormCell.Type = {
9
+ Text: "text",
10
+ Checkbox: "checkbox",
11
+ Signature: "signature",
12
+ };
13
+ })(FormCell || (exports.FormCell = FormCell = {}));
@@ -0,0 +1,11 @@
1
+ /**
2
+ * A single checkbox inside a `FormCell` of `type == "checkbox"`. Bundles the checkbox's normalized center coordinate, current selection state, and the per-box text label.
3
+ */
4
+ export interface FormCheckboxDetail {
5
+ /** Normalized `[x, y]` center of the checkbox (in `[0, 1]`, top-left origin), in the same coordinate system as `FormCell.bounding_box`. */
6
+ center_coord?: number[];
7
+ /** `true` when the checkbox is currently filled in (selected), `false` otherwise. */
8
+ selected?: boolean;
9
+ /** Per-checkbox text label (e.g. `"Individual/sole proprietor"`, `"S corporation"`). May be an empty string when no label could be confidently associated with this specific box. */
10
+ text?: string;
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,21 @@
1
+ /**
2
+ * Multipart `/form/clear` request. Use this variant to upload a
3
+ * PDF directly via `file`. Provide exactly one of `file`,
4
+ * `file_url`, or `form_id`.
5
+ */
6
+ export interface FormClearMultipartInput {
7
+ /** PDF file to upload directly. */
8
+ file?: string;
9
+ /** Alternative to `file`: a public or pre-signed URL Pulse will download. */
10
+ file_url?: string;
11
+ /** Reference to a previously processed form. Mutually exclusive with `file` / `file_url`. */
12
+ form_id?: string;
13
+ /** Optional natural language description of what to clear. When omitted, Pulse clears everything user-filled deterministically. */
14
+ instructions?: string;
15
+ /** Optional JSON-encoded array of `FormCell` objects to override detected cells. Multipart bodies must serialise this field as a string. */
16
+ form_fields?: string;
17
+ /** Restrict the operation to a subset of pages, e.g. `"1-3,5"`. */
18
+ page_range?: string;
19
+ /** Set to `"true"` to run asynchronously and receive `{job_id, status}` immediately. */
20
+ async?: string;
21
+ }
@@ -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,16 @@
1
+ /**
2
+ * Multipart `/form/detect` request. Use this variant to upload a
3
+ * PDF directly via `file`.
4
+ */
5
+ export interface FormDetectMultipartInput {
6
+ /** PDF file to upload directly. */
7
+ file?: string;
8
+ /** Alternative to `file`: a public or pre-signed URL Pulse will download. */
9
+ file_url?: string;
10
+ /** Reference to a previously processed form. Mutually exclusive with `file` / `file_url`. */
11
+ form_id?: string;
12
+ /** Restrict the operation to a subset of pages, e.g. `"1-3,5"`. */
13
+ page_range?: string;
14
+ /** Set to `"true"` to run asynchronously and receive `{job_id, status}` immediately. */
15
+ async?: string;
16
+ }
@@ -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,21 @@
1
+ /**
2
+ * Multipart `/form/fill` request. Use this variant to upload a
3
+ * PDF directly via `file`. Provide exactly one of `file`,
4
+ * `file_url`, or `form_id`.
5
+ */
6
+ export interface FormFillMultipartInput {
7
+ /** PDF file to upload directly. */
8
+ file?: string;
9
+ /** Alternative to `file`: a public or pre-signed URL Pulse will download. */
10
+ file_url?: string;
11
+ /** Reference to a previously processed form. Mutually exclusive with `file` / `file_url`. */
12
+ form_id?: string;
13
+ /** Required natural-language fill prompt. */
14
+ instructions?: string;
15
+ /** Optional JSON-encoded array of `FormCell` objects to override detected cells. Multipart bodies must serialise this field as a string. */
16
+ form_fields?: string;
17
+ /** Restrict the operation to a subset of pages, e.g. `"1-3,5"`. */
18
+ page_range?: string;
19
+ /** Set to `"true"` to run asynchronously and receive `{job_id, status}` immediately. */
20
+ async?: string;
21
+ }
@@ -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,12 @@
1
+ import type * as Pulse from "../index.js";
2
+ /**
3
+ * Cell-level overrides accepted by `/form/fill` and `/form/clear`.
4
+ */
5
+ export interface FormFillSharedOptions {
6
+ /** Optional override for the cells used when filling / clearing. When omitted, Pulse uses the cells stored on the referenced `form_id` (fast path) or runs detection on the uploaded PDF. Useful for editing detected cells before filling. */
7
+ form_fields?: Pulse.FormCell[];
8
+ /** Restrict the operation to a subset of pages. Accepts comma-separated page numbers and ranges, e.g. `"1-3,5"`. Alias: `pages`. */
9
+ page_range?: string;
10
+ /** When `true`, the endpoint returns immediately with `{job_id, status: "pending"}` (HTTP 202) and processes the job in the background. Poll [GET /job/{jobId}](api:GET/job/{jobId}) for the result. Default `false` — return the full result inline. */
11
+ async?: boolean;
12
+ }
@@ -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
+ /**
2
+ * Cumulative billing snapshot for the calling organization. Sourced from the `pulse-org-stats` aggregate table maintained asynchronously by the org-stats Lambda; the in-flight request's contribution is added on top so every response reflects post-request state.
3
+ */
4
+ export interface FormPlanInfo {
5
+ /** Billing tier, e.g. `"trial"`, `"pulse_ultra_2"`. */
6
+ tier?: string;
7
+ /** Total credits consumed by the organization to date, including this request. The primary billing metric going forward. */
8
+ total_credits_used?: number;
9
+ /** Total pages processed by the organization to date, including this request. Kept for backward compatibility with clients that haven't migrated to `total_credits_used`. */
10
+ pages_used?: number;
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,24 @@
1
+ import type * as Pulse from "../index.js";
2
+ /**
3
+ * Result body returned by `/form/detect`, `/form/fill`, and
4
+ * `/form/clear`. For async jobs (`async: true`) the same shape is
5
+ * served back under `result` on
6
+ * [GET /job/{jobId}](api:GET/job/{jobId}).
7
+ */
8
+ export interface FormResult {
9
+ /** ID of the form record produced by this run. Pass to a subsequent `/form/detect`, `/form/fill`, or `/form/clear` call as the single input source to iterate without re-uploading the PDF. */
10
+ form_id?: string;
11
+ /** Number of pages in the output PDF. */
12
+ page_count?: number;
13
+ /** URL to download the resulting PDF binary. Always points at [GET /results/{jobId}/pdf](api:GET/results/{jobId}/pdf) for the originating job. Authenticated callers can replay this URL until the underlying artifact is garbage-collected. */
14
+ pdf_url?: string;
15
+ /** Detected cells of the resulting PDF (refreshed from the filled/cleared output for fill/clear, or freshly detected for `/form/detect`). Use these as a starting point for further edits. */
16
+ form_fields?: Pulse.FormCell[];
17
+ /** Number of cells that were filled by this run. Present on `/form/fill` responses only. */
18
+ fields_filled?: number;
19
+ /** Number of cells that were cleared by this run. Present on `/form/clear` responses only. */
20
+ fields_cleared?: number;
21
+ /** Number of credits consumed by **this request**. Detect charges 1 credit per page; fill and clear charge 3 credits per page. */
22
+ credits_used?: number;
23
+ plan_info?: Pulse.FormPlanInfo;
24
+ }
@@ -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 });