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,350 @@
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.FormClient = 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 FormClient {
55
+ constructor(options = {}) {
56
+ this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
57
+ }
58
+ /**
59
+ * Run cell detection on a PDF and return the detected `form_fields`
60
+ * along with a reusable `form_id`. No LLM matching, no fill, no
61
+ * clear — this is the OCR / layout step that `/form/fill` and
62
+ * `/form/clear` would otherwise run internally.
63
+ *
64
+ * The returned `form_id` references the uploaded PDF and its
65
+ * detected layout, and can be passed back to a subsequent
66
+ * `/form/fill`, `/form/clear`, or `/form/detect` call as the
67
+ * single input source — Pulse will skip detection on the fast
68
+ * path and reuse the cached cells.
69
+ *
70
+ * **Input modes** — provide exactly one of:
71
+ * - `form_id` (JSON) — re-detect cells on a previously stored
72
+ * PDF. Useful when callers want to refresh layout after editing
73
+ * or when chaining detect calls.
74
+ * - `file` (multipart) or `file_url` (JSON or multipart) — start
75
+ * from a raw PDF.
76
+ *
77
+ * Optional `page_range` (alias `pages`, e.g. `"1-3,5"`) restricts
78
+ * the operation to a subset of pages.
79
+ *
80
+ * Synchronous by default — returns the detected layout inline.
81
+ * Set `async: true` to receive `{job_id, status: "pending"}`
82
+ * immediately and poll [GET /job/{jobId}](api:GET/job/{jobId}).
83
+ *
84
+ * Billed at **1 credit per page**. Requires the `form_filler`
85
+ * feature flag to be enabled for your organization.
86
+ *
87
+ * @param {Pulse.FormDetectJsonInput} request
88
+ * @param {FormClient.RequestOptions} requestOptions - Request-specific configuration.
89
+ *
90
+ * @throws {@link Pulse.BadRequestError}
91
+ * @throws {@link Pulse.UnauthorizedError}
92
+ * @throws {@link Pulse.ForbiddenError}
93
+ * @throws {@link Pulse.NotFoundError}
94
+ * @throws {@link Pulse.TooManyRequestsError}
95
+ * @throws {@link Pulse.InternalServerError}
96
+ *
97
+ * @example
98
+ * await client.form.detect()
99
+ */
100
+ detect(request = {}, requestOptions) {
101
+ return core.HttpResponsePromise.fromPromise(this.__detect(request, requestOptions));
102
+ }
103
+ __detect() {
104
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
105
+ var _a, _b, _c, _d, _e, _f, _g, _h;
106
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
107
+ 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);
108
+ const _response = yield core.fetcher({
109
+ 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, "form/detect"),
110
+ method: "POST",
111
+ headers: _headers,
112
+ contentType: "application/json",
113
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
114
+ requestType: "json",
115
+ body: request,
116
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null
117
+ ? requestOptions.timeoutInSeconds * 1000
118
+ : ((_d = this._options) === null || _d === void 0 ? void 0 : _d.timeoutInSeconds) != null
119
+ ? ((_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) * 1000
120
+ : undefined,
121
+ 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,
122
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
123
+ fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
124
+ logging: this._options.logging,
125
+ });
126
+ if (_response.ok) {
127
+ return { data: _response.body, rawResponse: _response.rawResponse };
128
+ }
129
+ if (_response.error.reason === "status-code") {
130
+ switch (_response.error.statusCode) {
131
+ case 400:
132
+ throw new Pulse.BadRequestError(_response.error.body, _response.rawResponse);
133
+ case 401:
134
+ throw new Pulse.UnauthorizedError(_response.error.body, _response.rawResponse);
135
+ case 403:
136
+ throw new Pulse.ForbiddenError(_response.error.body, _response.rawResponse);
137
+ case 404:
138
+ throw new Pulse.NotFoundError(_response.error.body, _response.rawResponse);
139
+ case 429:
140
+ throw new Pulse.TooManyRequestsError(_response.error.body, _response.rawResponse);
141
+ case 500:
142
+ throw new Pulse.InternalServerError(_response.error.body, _response.rawResponse);
143
+ default:
144
+ throw new errors.PulseError({
145
+ statusCode: _response.error.statusCode,
146
+ body: _response.error.body,
147
+ rawResponse: _response.rawResponse,
148
+ });
149
+ }
150
+ }
151
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/form/detect");
152
+ });
153
+ }
154
+ /**
155
+ * Fill the fields of a PDF form with values inferred from a natural
156
+ * language `instructions` prompt. Works on both AcroForm PDFs
157
+ * (true form fields are written) and flat/scanned PDFs (values
158
+ * are rendered as an overlay using detected cells from OCR).
159
+ *
160
+ * **Input modes** — provide exactly one of:
161
+ * - `form_id` (JSON) — reuse a previously processed form from a
162
+ * prior `/form/detect`, `/form/fill`, or `/form/clear` call.
163
+ * Skips re-detection (fast path); the cached `form_fields` are
164
+ * reused.
165
+ * - `file` (multipart) or `file_url` (JSON or multipart) — start
166
+ * from a raw PDF. Pulse runs cell detection internally before
167
+ * filling.
168
+ *
169
+ * Optional `form_fields` lets callers supply or edit the detected
170
+ * cells before filling. Optional `page_range` (alias `pages`,
171
+ * e.g. `"1-3,5"`) restricts the operation to a subset of pages.
172
+ *
173
+ * Synchronous by default — returns the filled `FormResult` inline
174
+ * (including a `pdf_url` you can `GET` to download the PDF
175
+ * binary). Set `async: true` to receive `{job_id, status:
176
+ * "pending"}` and poll [GET /job/{jobId}](api:GET/job/{jobId}).
177
+ *
178
+ * Billed at **3 credits per page**. Requires the `form_filler`
179
+ * feature flag to be enabled for your organization.
180
+ *
181
+ * @param {Pulse.FormFillJsonInput} request
182
+ * @param {FormClient.RequestOptions} requestOptions - Request-specific configuration.
183
+ *
184
+ * @throws {@link Pulse.BadRequestError}
185
+ * @throws {@link Pulse.UnauthorizedError}
186
+ * @throws {@link Pulse.ForbiddenError}
187
+ * @throws {@link Pulse.NotFoundError}
188
+ * @throws {@link Pulse.TooManyRequestsError}
189
+ * @throws {@link Pulse.InternalServerError}
190
+ *
191
+ * @example
192
+ * await client.form.fill({
193
+ * instructions: "instructions"
194
+ * })
195
+ */
196
+ fill(request, requestOptions) {
197
+ return core.HttpResponsePromise.fromPromise(this.__fill(request, requestOptions));
198
+ }
199
+ __fill(request, requestOptions) {
200
+ return __awaiter(this, void 0, void 0, function* () {
201
+ var _a, _b, _c, _d, _e, _f, _g, _h;
202
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
203
+ 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);
204
+ const _response = yield core.fetcher({
205
+ 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, "form/fill"),
206
+ method: "POST",
207
+ headers: _headers,
208
+ contentType: "application/json",
209
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
210
+ requestType: "json",
211
+ body: request,
212
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null
213
+ ? requestOptions.timeoutInSeconds * 1000
214
+ : ((_d = this._options) === null || _d === void 0 ? void 0 : _d.timeoutInSeconds) != null
215
+ ? ((_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) * 1000
216
+ : undefined,
217
+ 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,
218
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
219
+ fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
220
+ logging: this._options.logging,
221
+ });
222
+ if (_response.ok) {
223
+ return { data: _response.body, rawResponse: _response.rawResponse };
224
+ }
225
+ if (_response.error.reason === "status-code") {
226
+ switch (_response.error.statusCode) {
227
+ case 400:
228
+ throw new Pulse.BadRequestError(_response.error.body, _response.rawResponse);
229
+ case 401:
230
+ throw new Pulse.UnauthorizedError(_response.error.body, _response.rawResponse);
231
+ case 403:
232
+ throw new Pulse.ForbiddenError(_response.error.body, _response.rawResponse);
233
+ case 404:
234
+ throw new Pulse.NotFoundError(_response.error.body, _response.rawResponse);
235
+ case 429:
236
+ throw new Pulse.TooManyRequestsError(_response.error.body, _response.rawResponse);
237
+ case 500:
238
+ throw new Pulse.InternalServerError(_response.error.body, _response.rawResponse);
239
+ default:
240
+ throw new errors.PulseError({
241
+ statusCode: _response.error.statusCode,
242
+ body: _response.error.body,
243
+ rawResponse: _response.rawResponse,
244
+ });
245
+ }
246
+ }
247
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/form/fill");
248
+ });
249
+ }
250
+ /**
251
+ * Remove user-entered data from a PDF form, leaving the blank
252
+ * form template intact. Erases handwritten entries, typed values,
253
+ * and unchecks selected checkboxes — printed labels, field
254
+ * titles, section headers, and other static template content are
255
+ * preserved.
256
+ *
257
+ * **Input modes** — provide exactly one of:
258
+ * - `form_id` (JSON) — reuse a previously processed form from a
259
+ * prior `/form/detect`, `/form/fill`, or `/form/clear` call
260
+ * (fast path; cached layout reused).
261
+ * - `file` (multipart) or `file_url` (JSON or multipart) — start
262
+ * from a raw PDF.
263
+ *
264
+ * `instructions` is optional. When omitted, Pulse clears every
265
+ * user-filled field deterministically (no LLM call) on AcroForm
266
+ * PDFs, eliminating any chance of hallucinated content. Provide
267
+ * a natural language prompt to clear only specific fields
268
+ * (e.g. `"clear only the address fields"`); targeted clears go
269
+ * through the LLM matcher with a delete-only filter.
270
+ *
271
+ * Optional `form_fields` and `page_range` (alias `pages`) behave
272
+ * the same as on [Form Fill](api:POST/form/fill).
273
+ *
274
+ * Synchronous by default — returns the cleared `FormResult`
275
+ * inline (including a `pdf_url` you can `GET` to download the
276
+ * PDF binary). Set `async: true` to receive `{job_id, status:
277
+ * "pending"}` and poll [GET /job/{jobId}](api:GET/job/{jobId}).
278
+ *
279
+ * Billed at **3 credits per page**. Requires the `form_filler`
280
+ * feature flag to be enabled for your organization.
281
+ *
282
+ * @param {Pulse.FormClearJsonInput} request
283
+ * @param {FormClient.RequestOptions} requestOptions - Request-specific configuration.
284
+ *
285
+ * @throws {@link Pulse.BadRequestError}
286
+ * @throws {@link Pulse.UnauthorizedError}
287
+ * @throws {@link Pulse.ForbiddenError}
288
+ * @throws {@link Pulse.NotFoundError}
289
+ * @throws {@link Pulse.TooManyRequestsError}
290
+ * @throws {@link Pulse.InternalServerError}
291
+ *
292
+ * @example
293
+ * await client.form.clear()
294
+ */
295
+ clear(request = {}, requestOptions) {
296
+ return core.HttpResponsePromise.fromPromise(this.__clear(request, requestOptions));
297
+ }
298
+ __clear() {
299
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
300
+ var _a, _b, _c, _d, _e, _f, _g, _h;
301
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
302
+ 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);
303
+ const _response = yield core.fetcher({
304
+ 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, "form/clear"),
305
+ method: "POST",
306
+ headers: _headers,
307
+ contentType: "application/json",
308
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
309
+ requestType: "json",
310
+ body: request,
311
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null
312
+ ? requestOptions.timeoutInSeconds * 1000
313
+ : ((_d = this._options) === null || _d === void 0 ? void 0 : _d.timeoutInSeconds) != null
314
+ ? ((_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) * 1000
315
+ : undefined,
316
+ 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,
317
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
318
+ fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
319
+ logging: this._options.logging,
320
+ });
321
+ if (_response.ok) {
322
+ return { data: _response.body, rawResponse: _response.rawResponse };
323
+ }
324
+ if (_response.error.reason === "status-code") {
325
+ switch (_response.error.statusCode) {
326
+ case 400:
327
+ throw new Pulse.BadRequestError(_response.error.body, _response.rawResponse);
328
+ case 401:
329
+ throw new Pulse.UnauthorizedError(_response.error.body, _response.rawResponse);
330
+ case 403:
331
+ throw new Pulse.ForbiddenError(_response.error.body, _response.rawResponse);
332
+ case 404:
333
+ throw new Pulse.NotFoundError(_response.error.body, _response.rawResponse);
334
+ case 429:
335
+ throw new Pulse.TooManyRequestsError(_response.error.body, _response.rawResponse);
336
+ case 500:
337
+ throw new Pulse.InternalServerError(_response.error.body, _response.rawResponse);
338
+ default:
339
+ throw new errors.PulseError({
340
+ statusCode: _response.error.statusCode,
341
+ body: _response.error.body,
342
+ rawResponse: _response.rawResponse,
343
+ });
344
+ }
345
+ }
346
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/form/clear");
347
+ });
348
+ }
349
+ }
350
+ exports.FormClient = FormClient;
@@ -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,19 @@
1
+ import type * as Pulse from "../../../../index.js";
2
+ /**
3
+ * @example
4
+ * {}
5
+ */
6
+ export interface FormClearJsonInput {
7
+ /** ID returned by a previous `/form/detect`, `/form/fill`, or `/form/clear` call (fast path; skips re-detection). */
8
+ form_id?: string;
9
+ /** Public or pre-signed URL of a PDF to download and clear. */
10
+ file_url?: string;
11
+ /** Optional natural-language description of what to clear. When omitted, Pulse clears every user-filled value deterministically (no LLM call) on AcroForm PDFs while preserving the blank form template. */
12
+ instructions?: string;
13
+ /** 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. */
14
+ form_fields?: Pulse.FormCell[];
15
+ /** Restrict the operation to a subset of pages. Accepts comma-separated page numbers and ranges, e.g. `"1-3,5"`. Alias: `pages`. */
16
+ page_range?: string;
17
+ /** 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. */
18
+ async?: boolean;
19
+ }
@@ -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,14 @@
1
+ /**
2
+ * @example
3
+ * {}
4
+ */
5
+ export interface FormDetectJsonInput {
6
+ /** Re-detect cells on a previously stored PDF (returned by an earlier `/form/detect`, `/form/fill`, or `/form/clear` call). Useful when chaining detect calls or refreshing layout after edits. */
7
+ form_id?: string;
8
+ /** Public or pre-signed URL of a PDF to detect cells on. */
9
+ file_url?: string;
10
+ /** Restrict the operation to a subset of pages. Accepts comma-separated page numbers and ranges, e.g. `"1-3,5"`. Alias: `pages`. */
11
+ page_range?: string;
12
+ /** 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. */
13
+ async?: boolean;
14
+ }
@@ -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
+ import type * as Pulse from "../../../../index.js";
2
+ /**
3
+ * @example
4
+ * {
5
+ * instructions: "instructions"
6
+ * }
7
+ */
8
+ export interface FormFillJsonInput {
9
+ /** ID returned by a previous `/form/detect`, `/form/fill`, or `/form/clear` call. Reuses the stored PDF and cached `form_fields` (fast path; skips re-detection). */
10
+ form_id?: string;
11
+ /** Public or pre-signed URL of a PDF to download and fill. */
12
+ file_url?: string;
13
+ /** Required natural-language description of what to fill into the form (e.g. `"Use John Doe, 123 Main St, born 1990-01-01"`). */
14
+ instructions: string;
15
+ /** 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. */
16
+ form_fields?: Pulse.FormCell[];
17
+ /** Restrict the operation to a subset of pages. Accepts comma-separated page numbers and ranges, e.g. `"1-3,5"`. Alias: `pages`. */
18
+ page_range?: string;
19
+ /** 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. */
20
+ async?: boolean;
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,3 @@
1
+ export type { FormClearJsonInput } from "./FormClearJsonInput.js";
2
+ export type { FormDetectJsonInput } from "./FormDetectJsonInput.js";
3
+ export type { FormFillJsonInput } from "./FormFillJsonInput.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);
@@ -1,6 +1,14 @@
1
1
  export * from "./batch/client/requests/index.js";
2
2
  export * as batch from "./batch/index.js";
3
+ export * from "./form/client/requests/index.js";
4
+ export * as form from "./form/index.js";
3
5
  export * from "./jobs/client/requests/index.js";
4
6
  export * as jobs from "./jobs/index.js";
7
+ export * from "./largeResults/client/requests/index.js";
8
+ export * as largeResults from "./largeResults/index.js";
9
+ export * from "./pipeline/client/requests/index.js";
10
+ export * as pipeline from "./pipeline/index.js";
11
+ export * from "./results/client/requests/index.js";
12
+ export * as results from "./results/index.js";
5
13
  export * as webhooks from "./webhooks/index.js";
6
14
  export * from "./webhooks/types/index.js";
@@ -36,10 +36,18 @@ 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.results = exports.pipeline = exports.largeResults = exports.jobs = exports.form = exports.batch = void 0;
40
40
  __exportStar(require("./batch/client/requests/index.js"), exports);
41
41
  exports.batch = __importStar(require("./batch/index.js"));
42
+ __exportStar(require("./form/client/requests/index.js"), exports);
43
+ exports.form = __importStar(require("./form/index.js"));
42
44
  __exportStar(require("./jobs/client/requests/index.js"), exports);
43
45
  exports.jobs = __importStar(require("./jobs/index.js"));
46
+ __exportStar(require("./largeResults/client/requests/index.js"), exports);
47
+ exports.largeResults = __importStar(require("./largeResults/index.js"));
48
+ __exportStar(require("./pipeline/client/requests/index.js"), exports);
49
+ exports.pipeline = __importStar(require("./pipeline/index.js"));
50
+ __exportStar(require("./results/client/requests/index.js"), exports);
51
+ exports.results = __importStar(require("./results/index.js"));
44
52
  exports.webhooks = __importStar(require("./webhooks/index.js"));
45
53
  __exportStar(require("./webhooks/types/index.js"), exports);
@@ -78,7 +78,7 @@ class JobsClient {
78
78
  }
79
79
  __getJob(request, requestOptions) {
80
80
  return __awaiter(this, void 0, void 0, function* () {
81
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
81
+ var _a, _b, _c, _d, _e, _f, _g, _h;
82
82
  const { jobId } = request;
83
83
  const _authRequest = yield this._options.authProvider.getAuthRequest();
84
84
  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,10 +87,14 @@ class JobsClient {
87
87
  method: "GET",
88
88
  headers: _headers,
89
89
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
90
- 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,
91
- 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,
90
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null
91
+ ? requestOptions.timeoutInSeconds * 1000
92
+ : ((_d = this._options) === null || _d === void 0 ? void 0 : _d.timeoutInSeconds) != null
93
+ ? ((_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) * 1000
94
+ : undefined,
95
+ 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,
92
96
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
93
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
97
+ fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
94
98
  logging: this._options.logging,
95
99
  });
96
100
  if (_response.ok) {
@@ -142,7 +146,7 @@ class JobsClient {
142
146
  }
143
147
  __cancelJob(request, requestOptions) {
144
148
  return __awaiter(this, void 0, void 0, function* () {
145
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
149
+ var _a, _b, _c, _d, _e, _f, _g, _h;
146
150
  const { jobId } = request;
147
151
  const _authRequest = yield this._options.authProvider.getAuthRequest();
148
152
  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);
@@ -151,10 +155,14 @@ class JobsClient {
151
155
  method: "DELETE",
152
156
  headers: _headers,
153
157
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
154
- 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,
155
- 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,
158
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null
159
+ ? requestOptions.timeoutInSeconds * 1000
160
+ : ((_d = this._options) === null || _d === void 0 ? void 0 : _d.timeoutInSeconds) != null
161
+ ? ((_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) * 1000
162
+ : undefined,
163
+ 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,
156
164
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
157
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
165
+ fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
158
166
  logging: this._options.logging,
159
167
  });
160
168
  if (_response.ok) {
@@ -0,0 +1,41 @@
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. When `/extract`
15
+ * or `GET /job/{jobId}` returns `is_url: true`, fetch the complete
16
+ * result from the URL provided. The URL is single-use: after a
17
+ * successful download the resource is deleted and subsequent
18
+ * requests return 410 Gone.
19
+ *
20
+ * For form jobs (`/form/detect`, `/form/fill`, `/form/clear`)
21
+ * you don't need this endpoint at all — `GET /job/{jobId}`
22
+ * already returns the full `FormResult` inline under `result`,
23
+ * and the `pdf_url` field points at
24
+ * [GET /results/{jobId}/pdf](api:GET/results/{jobId}/pdf) for the
25
+ * binary.
26
+ *
27
+ * @param {Pulse.GetLargeResultLargeResultsRequest} request
28
+ * @param {LargeResultsClient.RequestOptions} requestOptions - Request-specific configuration.
29
+ *
30
+ * @throws {@link Pulse.NotFoundError}
31
+ * @throws {@link Pulse.GoneError}
32
+ * @throws {@link Pulse.InternalServerError}
33
+ *
34
+ * @example
35
+ * await client.largeResults.getLargeResult({
36
+ * jobId: "jobId"
37
+ * })
38
+ */
39
+ getLargeResult(request: Pulse.GetLargeResultLargeResultsRequest, requestOptions?: LargeResultsClient.RequestOptions): core.HttpResponsePromise<Pulse.ExtractResultCore>;
40
+ private __getLargeResult;
41
+ }