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,54 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.GoneError = void 0;
38
+ const errors = __importStar(require("../../errors/index.js"));
39
+ class GoneError extends errors.PulseError {
40
+ constructor(body, rawResponse) {
41
+ super({
42
+ message: "GoneError",
43
+ statusCode: 410,
44
+ body: body,
45
+ rawResponse: rawResponse,
46
+ });
47
+ Object.setPrototypeOf(this, new.target.prototype);
48
+ if (Error.captureStackTrace) {
49
+ Error.captureStackTrace(this, this.constructor);
50
+ }
51
+ this.name = this.constructor.name;
52
+ }
53
+ }
54
+ exports.GoneError = GoneError;
@@ -1,5 +1,6 @@
1
1
  export * from "./BadRequestError.js";
2
2
  export * from "./ForbiddenError.js";
3
+ export * from "./GoneError.js";
3
4
  export * from "./InternalServerError.js";
4
5
  export * from "./NotFoundError.js";
5
6
  export * from "./TooManyRequestsError.js";
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./BadRequestError.js"), exports);
18
18
  __exportStar(require("./ForbiddenError.js"), exports);
19
+ __exportStar(require("./GoneError.js"), exports);
19
20
  __exportStar(require("./InternalServerError.js"), exports);
20
21
  __exportStar(require("./NotFoundError.js"), exports);
21
22
  __exportStar(require("./TooManyRequestsError.js"), exports);
@@ -87,7 +87,7 @@ class BatchClient {
87
87
  }
88
88
  __extract(request, requestOptions) {
89
89
  return __awaiter(this, void 0, void 0, function* () {
90
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
90
+ var _a, _b, _c, _d, _e, _f, _g, _h;
91
91
  const _authRequest = yield this._options.authProvider.getAuthRequest();
92
92
  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);
93
93
  const _response = yield core.fetcher({
@@ -98,10 +98,14 @@ class BatchClient {
98
98
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
99
99
  requestType: "json",
100
100
  body: request,
101
- 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,
102
- 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,
101
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null
102
+ ? requestOptions.timeoutInSeconds * 1000
103
+ : ((_d = this._options) === null || _d === void 0 ? void 0 : _d.timeoutInSeconds) != null
104
+ ? ((_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) * 1000
105
+ : undefined,
106
+ 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,
103
107
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
104
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
108
+ fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
105
109
  logging: this._options.logging,
106
110
  });
107
111
  if (_response.ok) {
@@ -163,7 +167,7 @@ class BatchClient {
163
167
  }
164
168
  __schema(request, requestOptions) {
165
169
  return __awaiter(this, void 0, void 0, function* () {
166
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
170
+ var _a, _b, _c, _d, _e, _f, _g, _h;
167
171
  const _authRequest = yield this._options.authProvider.getAuthRequest();
168
172
  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);
169
173
  const _response = yield core.fetcher({
@@ -174,10 +178,14 @@ class BatchClient {
174
178
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
175
179
  requestType: "json",
176
180
  body: request,
177
- 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,
178
- 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,
181
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null
182
+ ? requestOptions.timeoutInSeconds * 1000
183
+ : ((_d = this._options) === null || _d === void 0 ? void 0 : _d.timeoutInSeconds) != null
184
+ ? ((_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) * 1000
185
+ : undefined,
186
+ 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,
179
187
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
180
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
188
+ fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
181
189
  logging: this._options.logging,
182
190
  });
183
191
  if (_response.ok) {
@@ -237,7 +245,7 @@ class BatchClient {
237
245
  }
238
246
  __tables(request, requestOptions) {
239
247
  return __awaiter(this, void 0, void 0, function* () {
240
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
248
+ var _a, _b, _c, _d, _e, _f, _g, _h;
241
249
  const _authRequest = yield this._options.authProvider.getAuthRequest();
242
250
  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);
243
251
  const _response = yield core.fetcher({
@@ -248,10 +256,14 @@ class BatchClient {
248
256
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
249
257
  requestType: "json",
250
258
  body: request,
251
- 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,
252
- 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,
259
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null
260
+ ? requestOptions.timeoutInSeconds * 1000
261
+ : ((_d = this._options) === null || _d === void 0 ? void 0 : _d.timeoutInSeconds) != null
262
+ ? ((_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) * 1000
263
+ : undefined,
264
+ 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,
253
265
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
254
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
266
+ fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
255
267
  logging: this._options.logging,
256
268
  });
257
269
  if (_response.ok) {
@@ -316,7 +328,7 @@ class BatchClient {
316
328
  }
317
329
  __split(request, requestOptions) {
318
330
  return __awaiter(this, void 0, void 0, function* () {
319
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
331
+ var _a, _b, _c, _d, _e, _f, _g, _h;
320
332
  const _authRequest = yield this._options.authProvider.getAuthRequest();
321
333
  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);
322
334
  const _response = yield core.fetcher({
@@ -327,10 +339,14 @@ class BatchClient {
327
339
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
328
340
  requestType: "json",
329
341
  body: request,
330
- 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,
331
- 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,
342
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null
343
+ ? requestOptions.timeoutInSeconds * 1000
344
+ : ((_d = this._options) === null || _d === void 0 ? void 0 : _d.timeoutInSeconds) != null
345
+ ? ((_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) * 1000
346
+ : undefined,
347
+ 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,
332
348
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
333
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
349
+ fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
334
350
  logging: this._options.logging,
335
351
  });
336
352
  if (_response.ok) {
@@ -0,0 +1,148 @@
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 FormClient {
6
+ type Options = BaseClientOptions;
7
+ interface RequestOptions extends BaseRequestOptions {
8
+ }
9
+ }
10
+ export declare class FormClient {
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<FormClient.Options>;
12
+ constructor(options?: FormClient.Options);
13
+ /**
14
+ * Run cell detection on a PDF and return the detected `form_fields`
15
+ * along with a reusable `form_id`. No LLM matching, no fill, no
16
+ * clear — this is the OCR / layout step that `/form/fill` and
17
+ * `/form/clear` would otherwise run internally.
18
+ *
19
+ * The returned `form_id` references the uploaded PDF and its
20
+ * detected layout, and can be passed back to a subsequent
21
+ * `/form/fill`, `/form/clear`, or `/form/detect` call as the
22
+ * single input source — Pulse will skip detection on the fast
23
+ * path and reuse the cached cells.
24
+ *
25
+ * **Input modes** — provide exactly one of:
26
+ * - `form_id` (JSON) — re-detect cells on a previously stored
27
+ * PDF. Useful when callers want to refresh layout after editing
28
+ * or when chaining detect calls.
29
+ * - `file` (multipart) or `file_url` (JSON or multipart) — start
30
+ * from a raw PDF.
31
+ *
32
+ * Optional `page_range` (alias `pages`, e.g. `"1-3,5"`) restricts
33
+ * the operation to a subset of pages.
34
+ *
35
+ * Synchronous by default — returns the detected layout inline.
36
+ * Set `async: true` to receive `{job_id, status: "pending"}`
37
+ * immediately and poll [GET /job/{jobId}](api:GET/job/{jobId}).
38
+ *
39
+ * Billed at **1 credit per page**. Requires the `form_filler`
40
+ * feature flag to be enabled for your organization.
41
+ *
42
+ * @param {Pulse.FormDetectJsonInput} request
43
+ * @param {FormClient.RequestOptions} requestOptions - Request-specific configuration.
44
+ *
45
+ * @throws {@link Pulse.BadRequestError}
46
+ * @throws {@link Pulse.UnauthorizedError}
47
+ * @throws {@link Pulse.ForbiddenError}
48
+ * @throws {@link Pulse.NotFoundError}
49
+ * @throws {@link Pulse.TooManyRequestsError}
50
+ * @throws {@link Pulse.InternalServerError}
51
+ *
52
+ * @example
53
+ * await client.form.detect()
54
+ */
55
+ detect(request?: Pulse.FormDetectJsonInput, requestOptions?: FormClient.RequestOptions): core.HttpResponsePromise<Pulse.FormResult>;
56
+ private __detect;
57
+ /**
58
+ * Fill the fields of a PDF form with values inferred from a natural
59
+ * language `instructions` prompt. Works on both AcroForm PDFs
60
+ * (true form fields are written) and flat/scanned PDFs (values
61
+ * are rendered as an overlay using detected cells from OCR).
62
+ *
63
+ * **Input modes** — provide exactly one of:
64
+ * - `form_id` (JSON) — reuse a previously processed form from a
65
+ * prior `/form/detect`, `/form/fill`, or `/form/clear` call.
66
+ * Skips re-detection (fast path); the cached `form_fields` are
67
+ * reused.
68
+ * - `file` (multipart) or `file_url` (JSON or multipart) — start
69
+ * from a raw PDF. Pulse runs cell detection internally before
70
+ * filling.
71
+ *
72
+ * Optional `form_fields` lets callers supply or edit the detected
73
+ * cells before filling. Optional `page_range` (alias `pages`,
74
+ * e.g. `"1-3,5"`) restricts the operation to a subset of pages.
75
+ *
76
+ * Synchronous by default — returns the filled `FormResult` inline
77
+ * (including a `pdf_url` you can `GET` to download the PDF
78
+ * binary). Set `async: true` to receive `{job_id, status:
79
+ * "pending"}` and poll [GET /job/{jobId}](api:GET/job/{jobId}).
80
+ *
81
+ * Billed at **3 credits per page**. Requires the `form_filler`
82
+ * feature flag to be enabled for your organization.
83
+ *
84
+ * @param {Pulse.FormFillJsonInput} request
85
+ * @param {FormClient.RequestOptions} requestOptions - Request-specific configuration.
86
+ *
87
+ * @throws {@link Pulse.BadRequestError}
88
+ * @throws {@link Pulse.UnauthorizedError}
89
+ * @throws {@link Pulse.ForbiddenError}
90
+ * @throws {@link Pulse.NotFoundError}
91
+ * @throws {@link Pulse.TooManyRequestsError}
92
+ * @throws {@link Pulse.InternalServerError}
93
+ *
94
+ * @example
95
+ * await client.form.fill({
96
+ * instructions: "instructions"
97
+ * })
98
+ */
99
+ fill(request: Pulse.FormFillJsonInput, requestOptions?: FormClient.RequestOptions): core.HttpResponsePromise<Pulse.FormResult>;
100
+ private __fill;
101
+ /**
102
+ * Remove user-entered data from a PDF form, leaving the blank
103
+ * form template intact. Erases handwritten entries, typed values,
104
+ * and unchecks selected checkboxes — printed labels, field
105
+ * titles, section headers, and other static template content are
106
+ * preserved.
107
+ *
108
+ * **Input modes** — provide exactly one of:
109
+ * - `form_id` (JSON) — reuse a previously processed form from a
110
+ * prior `/form/detect`, `/form/fill`, or `/form/clear` call
111
+ * (fast path; cached layout reused).
112
+ * - `file` (multipart) or `file_url` (JSON or multipart) — start
113
+ * from a raw PDF.
114
+ *
115
+ * `instructions` is optional. When omitted, Pulse clears every
116
+ * user-filled field deterministically (no LLM call) on AcroForm
117
+ * PDFs, eliminating any chance of hallucinated content. Provide
118
+ * a natural language prompt to clear only specific fields
119
+ * (e.g. `"clear only the address fields"`); targeted clears go
120
+ * through the LLM matcher with a delete-only filter.
121
+ *
122
+ * Optional `form_fields` and `page_range` (alias `pages`) behave
123
+ * the same as on [Form Fill](api:POST/form/fill).
124
+ *
125
+ * Synchronous by default — returns the cleared `FormResult`
126
+ * inline (including a `pdf_url` you can `GET` to download the
127
+ * PDF binary). Set `async: true` to receive `{job_id, status:
128
+ * "pending"}` and poll [GET /job/{jobId}](api:GET/job/{jobId}).
129
+ *
130
+ * Billed at **3 credits per page**. Requires the `form_filler`
131
+ * feature flag to be enabled for your organization.
132
+ *
133
+ * @param {Pulse.FormClearJsonInput} request
134
+ * @param {FormClient.RequestOptions} requestOptions - Request-specific configuration.
135
+ *
136
+ * @throws {@link Pulse.BadRequestError}
137
+ * @throws {@link Pulse.UnauthorizedError}
138
+ * @throws {@link Pulse.ForbiddenError}
139
+ * @throws {@link Pulse.NotFoundError}
140
+ * @throws {@link Pulse.TooManyRequestsError}
141
+ * @throws {@link Pulse.InternalServerError}
142
+ *
143
+ * @example
144
+ * await client.form.clear()
145
+ */
146
+ clear(request?: Pulse.FormClearJsonInput, requestOptions?: FormClient.RequestOptions): core.HttpResponsePromise<Pulse.FormResult>;
147
+ private __clear;
148
+ }