pulse-ts-sdk 1.0.9 → 1.0.11

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 (153) hide show
  1. package/README.md +23 -23
  2. package/dist/cjs/BaseClient.js +1 -0
  3. package/dist/cjs/Client.d.ts +6 -0
  4. package/dist/cjs/Client.js +74 -34
  5. package/dist/cjs/api/client/requests/ExtractAsyncRequest.d.ts +6 -3
  6. package/dist/cjs/api/client/requests/ExtractAsyncRequest.js +3 -2
  7. package/dist/cjs/api/client/requests/ExtractRequest.d.ts +6 -3
  8. package/dist/cjs/api/client/requests/ExtractRequest.js +3 -2
  9. package/dist/cjs/api/resources/batch/client/Client.js +32 -16
  10. package/dist/cjs/api/resources/form/client/Client.d.ts +171 -0
  11. package/dist/cjs/api/resources/form/client/Client.js +434 -0
  12. package/dist/cjs/api/resources/form/client/index.d.ts +1 -0
  13. package/dist/cjs/api/resources/form/client/index.js +17 -0
  14. package/dist/cjs/api/resources/form/client/requests/FormClearMultipartInput.d.ts +21 -0
  15. package/dist/cjs/api/resources/form/client/requests/FormClearMultipartInput.js +3 -0
  16. package/dist/cjs/api/resources/form/client/requests/FormDetectMultipartInput.d.ts +17 -0
  17. package/dist/cjs/api/resources/form/client/requests/FormDetectMultipartInput.js +3 -0
  18. package/dist/cjs/api/resources/form/client/requests/FormFillMultipartInput.d.ts +23 -0
  19. package/dist/cjs/api/resources/form/client/requests/FormFillMultipartInput.js +3 -0
  20. package/dist/cjs/api/resources/form/client/requests/index.d.ts +3 -0
  21. package/dist/cjs/api/resources/form/client/requests/index.js +2 -0
  22. package/dist/cjs/api/resources/form/index.d.ts +1 -0
  23. package/dist/cjs/api/resources/form/index.js +17 -0
  24. package/dist/cjs/api/resources/index.d.ts +4 -0
  25. package/dist/cjs/api/resources/index.js +5 -1
  26. package/dist/cjs/api/resources/jobs/client/Client.js +16 -8
  27. package/dist/cjs/api/resources/largeResults/client/Client.d.ts +11 -5
  28. package/dist/cjs/api/resources/largeResults/client/Client.js +19 -9
  29. package/dist/cjs/api/resources/pipeline/client/Client.d.ts +4 -2
  30. package/dist/cjs/api/resources/pipeline/client/Client.js +12 -6
  31. package/dist/cjs/api/resources/results/client/Client.d.ts +27 -0
  32. package/dist/cjs/api/resources/results/client/Client.js +116 -0
  33. package/dist/cjs/api/resources/results/client/index.d.ts +1 -0
  34. package/dist/cjs/api/resources/results/client/index.js +17 -0
  35. package/dist/cjs/api/resources/results/client/requests/GetPdfResultsRequest.d.ts +10 -0
  36. package/dist/cjs/api/resources/results/client/requests/GetPdfResultsRequest.js +3 -0
  37. package/dist/cjs/api/resources/results/client/requests/index.d.ts +1 -0
  38. package/dist/cjs/api/resources/results/client/requests/index.js +2 -0
  39. package/dist/cjs/api/resources/results/index.d.ts +1 -0
  40. package/dist/cjs/api/resources/results/index.js +17 -0
  41. package/dist/cjs/api/resources/webhooks/client/Client.js +8 -4
  42. package/dist/cjs/api/types/ExtractInput.d.ts +6 -3
  43. package/dist/cjs/api/types/ExtractInput.js +3 -2
  44. package/dist/cjs/api/types/ExtractOptions.d.ts +6 -3
  45. package/dist/cjs/api/types/ExtractOptions.js +3 -2
  46. package/dist/cjs/api/types/FormCell.d.ts +40 -0
  47. package/dist/cjs/api/types/FormCell.js +13 -0
  48. package/dist/cjs/api/types/FormCheckboxDetail.d.ts +11 -0
  49. package/dist/cjs/api/types/FormCheckboxDetail.js +3 -0
  50. package/dist/cjs/api/types/FormClearJsonInput.d.ts +19 -0
  51. package/dist/cjs/api/types/FormClearJsonInput.js +3 -0
  52. package/dist/cjs/api/types/FormDetectJsonInput.d.ts +14 -0
  53. package/dist/cjs/api/types/FormDetectJsonInput.js +3 -0
  54. package/dist/cjs/api/types/FormFillJsonInput.d.ts +19 -0
  55. package/dist/cjs/api/types/FormFillJsonInput.js +3 -0
  56. package/dist/cjs/api/types/FormFillSharedOptions.d.ts +12 -0
  57. package/dist/cjs/api/types/FormFillSharedOptions.js +3 -0
  58. package/dist/cjs/api/types/FormPlanInfo.d.ts +11 -0
  59. package/dist/cjs/api/types/FormPlanInfo.js +3 -0
  60. package/dist/cjs/api/types/FormResult.d.ts +24 -0
  61. package/dist/cjs/api/types/FormResult.js +3 -0
  62. package/dist/cjs/api/types/FormSharedOptions.d.ts +9 -0
  63. package/dist/cjs/api/types/FormSharedOptions.js +3 -0
  64. package/dist/cjs/api/types/PipelineResults.d.ts +2 -0
  65. package/dist/cjs/api/types/PipelineStepBatchExtractConfig.d.ts +6 -3
  66. package/dist/cjs/api/types/PipelineStepBatchExtractConfig.js +3 -2
  67. package/dist/cjs/api/types/PipelineSteps.d.ts +2 -0
  68. package/dist/cjs/api/types/PipelineTablesResult.d.ts +33 -0
  69. package/dist/cjs/api/types/PipelineTablesResult.js +3 -0
  70. package/dist/cjs/api/types/TablesConfig.d.ts +3 -2
  71. package/dist/cjs/api/types/TablesConfig.js +2 -1
  72. package/dist/cjs/api/types/TablesResponse.d.ts +2 -2
  73. package/dist/cjs/api/types/index.d.ts +10 -0
  74. package/dist/cjs/api/types/index.js +10 -0
  75. package/dist/cjs/version.d.ts +1 -1
  76. package/dist/cjs/version.js +1 -1
  77. package/dist/esm/BaseClient.mjs +1 -0
  78. package/dist/esm/Client.d.mts +6 -0
  79. package/dist/esm/Client.mjs +66 -26
  80. package/dist/esm/api/client/requests/ExtractAsyncRequest.d.mts +6 -3
  81. package/dist/esm/api/client/requests/ExtractAsyncRequest.mjs +3 -2
  82. package/dist/esm/api/client/requests/ExtractRequest.d.mts +6 -3
  83. package/dist/esm/api/client/requests/ExtractRequest.mjs +3 -2
  84. package/dist/esm/api/resources/batch/client/Client.mjs +32 -16
  85. package/dist/esm/api/resources/form/client/Client.d.mts +171 -0
  86. package/dist/esm/api/resources/form/client/Client.mjs +397 -0
  87. package/dist/esm/api/resources/form/client/index.d.mts +1 -0
  88. package/dist/esm/api/resources/form/client/index.mjs +1 -0
  89. package/dist/esm/api/resources/form/client/requests/FormClearMultipartInput.d.mts +21 -0
  90. package/dist/esm/api/resources/form/client/requests/FormClearMultipartInput.mjs +2 -0
  91. package/dist/esm/api/resources/form/client/requests/FormDetectMultipartInput.d.mts +17 -0
  92. package/dist/esm/api/resources/form/client/requests/FormDetectMultipartInput.mjs +2 -0
  93. package/dist/esm/api/resources/form/client/requests/FormFillMultipartInput.d.mts +23 -0
  94. package/dist/esm/api/resources/form/client/requests/FormFillMultipartInput.mjs +2 -0
  95. package/dist/esm/api/resources/form/client/requests/index.d.mts +3 -0
  96. package/dist/esm/api/resources/form/client/requests/index.mjs +1 -0
  97. package/dist/esm/api/resources/form/index.d.mts +1 -0
  98. package/dist/esm/api/resources/form/index.mjs +1 -0
  99. package/dist/esm/api/resources/index.d.mts +4 -0
  100. package/dist/esm/api/resources/index.mjs +4 -0
  101. package/dist/esm/api/resources/jobs/client/Client.mjs +16 -8
  102. package/dist/esm/api/resources/largeResults/client/Client.d.mts +11 -5
  103. package/dist/esm/api/resources/largeResults/client/Client.mjs +19 -9
  104. package/dist/esm/api/resources/pipeline/client/Client.d.mts +4 -2
  105. package/dist/esm/api/resources/pipeline/client/Client.mjs +12 -6
  106. package/dist/esm/api/resources/results/client/Client.d.mts +27 -0
  107. package/dist/esm/api/resources/results/client/Client.mjs +79 -0
  108. package/dist/esm/api/resources/results/client/index.d.mts +1 -0
  109. package/dist/esm/api/resources/results/client/index.mjs +1 -0
  110. package/dist/esm/api/resources/results/client/requests/GetPdfResultsRequest.d.mts +10 -0
  111. package/dist/esm/api/resources/results/client/requests/GetPdfResultsRequest.mjs +2 -0
  112. package/dist/esm/api/resources/results/client/requests/index.d.mts +1 -0
  113. package/dist/esm/api/resources/results/client/requests/index.mjs +1 -0
  114. package/dist/esm/api/resources/results/index.d.mts +1 -0
  115. package/dist/esm/api/resources/results/index.mjs +1 -0
  116. package/dist/esm/api/resources/webhooks/client/Client.mjs +8 -4
  117. package/dist/esm/api/types/ExtractInput.d.mts +6 -3
  118. package/dist/esm/api/types/ExtractInput.mjs +3 -2
  119. package/dist/esm/api/types/ExtractOptions.d.mts +6 -3
  120. package/dist/esm/api/types/ExtractOptions.mjs +3 -2
  121. package/dist/esm/api/types/FormCell.d.mts +40 -0
  122. package/dist/esm/api/types/FormCell.mjs +10 -0
  123. package/dist/esm/api/types/FormCheckboxDetail.d.mts +11 -0
  124. package/dist/esm/api/types/FormCheckboxDetail.mjs +2 -0
  125. package/dist/esm/api/types/FormClearJsonInput.d.mts +19 -0
  126. package/dist/esm/api/types/FormClearJsonInput.mjs +2 -0
  127. package/dist/esm/api/types/FormDetectJsonInput.d.mts +14 -0
  128. package/dist/esm/api/types/FormDetectJsonInput.mjs +2 -0
  129. package/dist/esm/api/types/FormFillJsonInput.d.mts +19 -0
  130. package/dist/esm/api/types/FormFillJsonInput.mjs +2 -0
  131. package/dist/esm/api/types/FormFillSharedOptions.d.mts +12 -0
  132. package/dist/esm/api/types/FormFillSharedOptions.mjs +2 -0
  133. package/dist/esm/api/types/FormPlanInfo.d.mts +11 -0
  134. package/dist/esm/api/types/FormPlanInfo.mjs +2 -0
  135. package/dist/esm/api/types/FormResult.d.mts +24 -0
  136. package/dist/esm/api/types/FormResult.mjs +2 -0
  137. package/dist/esm/api/types/FormSharedOptions.d.mts +9 -0
  138. package/dist/esm/api/types/FormSharedOptions.mjs +2 -0
  139. package/dist/esm/api/types/PipelineResults.d.mts +2 -0
  140. package/dist/esm/api/types/PipelineStepBatchExtractConfig.d.mts +6 -3
  141. package/dist/esm/api/types/PipelineStepBatchExtractConfig.mjs +3 -2
  142. package/dist/esm/api/types/PipelineSteps.d.mts +2 -0
  143. package/dist/esm/api/types/PipelineTablesResult.d.mts +33 -0
  144. package/dist/esm/api/types/PipelineTablesResult.mjs +2 -0
  145. package/dist/esm/api/types/TablesConfig.d.mts +3 -2
  146. package/dist/esm/api/types/TablesConfig.mjs +2 -1
  147. package/dist/esm/api/types/TablesResponse.d.mts +2 -2
  148. package/dist/esm/api/types/index.d.mts +10 -0
  149. package/dist/esm/api/types/index.mjs +10 -0
  150. package/dist/esm/version.d.mts +1 -1
  151. package/dist/esm/version.mjs +1 -1
  152. package/package.json +1 -1
  153. package/reference.md +379 -7
@@ -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,171 @@
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` — re-detect cells on a previously stored PDF.
27
+ * Useful when callers want to refresh layout after editing or
28
+ * when chaining detect calls.
29
+ * - `file_url` — public or pre-signed URL Pulse will download.
30
+ * - `file` — direct binary upload of the PDF.
31
+ *
32
+ * All three input modes ride on the same `multipart/form-data`
33
+ * request body. (Callers sending `Content-Type: application/json`
34
+ * with `form_id` / `file_url` are still accepted server-side for
35
+ * backward compatibility, but the SDKs only model the multipart
36
+ * form.)
37
+ *
38
+ * Optional `page_range` (alias `pages`, e.g. `"1-3,5"`) restricts
39
+ * the operation to a subset of pages.
40
+ *
41
+ * Synchronous by default — returns the detected layout inline.
42
+ * Set `async: true` to receive `{job_id, status: "pending"}`
43
+ * immediately and poll [GET /job/{jobId}](api:GET/job/{jobId}).
44
+ *
45
+ * Billed at **1 credit per page**. Requires the `form_filler`
46
+ * feature flag to be enabled for your organization.
47
+ *
48
+ * @param {Pulse.FormDetectMultipartInput} request
49
+ * @param {FormClient.RequestOptions} requestOptions - Request-specific configuration.
50
+ *
51
+ * @throws {@link Pulse.BadRequestError}
52
+ * @throws {@link Pulse.UnauthorizedError}
53
+ * @throws {@link Pulse.ForbiddenError}
54
+ * @throws {@link Pulse.NotFoundError}
55
+ * @throws {@link Pulse.TooManyRequestsError}
56
+ * @throws {@link Pulse.InternalServerError}
57
+ *
58
+ * @example
59
+ * import { createReadStream } from "fs";
60
+ * await client.form.detect({})
61
+ */
62
+ detect(request: Pulse.FormDetectMultipartInput, requestOptions?: FormClient.RequestOptions): core.HttpResponsePromise<Pulse.FormResult>;
63
+ private __detect;
64
+ /**
65
+ * Fill the fields of a PDF form with values inferred from a natural
66
+ * language `instructions` prompt. Works on both AcroForm PDFs
67
+ * (true form fields are written) and flat/scanned PDFs (values
68
+ * are rendered as an overlay using detected cells from OCR).
69
+ *
70
+ * **Input modes** — provide exactly one of:
71
+ * - `form_id` — reuse a previously processed form from a prior
72
+ * `/form/detect`, `/form/fill`, or `/form/clear` call. Skips
73
+ * re-detection (fast path); the cached `form_fields` are
74
+ * reused.
75
+ * - `file_url` — public or pre-signed URL of a PDF Pulse will
76
+ * download.
77
+ * - `file` — direct binary upload of the PDF. Pulse runs cell
78
+ * detection internally before filling.
79
+ *
80
+ * All three input modes ride on the same `multipart/form-data`
81
+ * request body. (Callers sending `Content-Type: application/json`
82
+ * with `form_id` / `file_url` are still accepted server-side for
83
+ * backward compatibility, but the SDKs only model the multipart
84
+ * form.)
85
+ *
86
+ * Optional `form_fields` lets callers supply or edit the detected
87
+ * cells before filling. Optional `page_range` (alias `pages`,
88
+ * e.g. `"1-3,5"`) restricts the operation to a subset of pages.
89
+ *
90
+ * Synchronous by default — returns the filled `FormResult` inline
91
+ * (including a `pdf_url` you can `GET` to download the PDF
92
+ * binary). Set `async: true` to receive `{job_id, status:
93
+ * "pending"}` and poll [GET /job/{jobId}](api:GET/job/{jobId}).
94
+ *
95
+ * Billed at **3 credits per page**. Requires the `form_filler`
96
+ * feature flag to be enabled for your organization.
97
+ *
98
+ * @param {Pulse.FormFillMultipartInput} request
99
+ * @param {FormClient.RequestOptions} requestOptions - Request-specific configuration.
100
+ *
101
+ * @throws {@link Pulse.BadRequestError}
102
+ * @throws {@link Pulse.UnauthorizedError}
103
+ * @throws {@link Pulse.ForbiddenError}
104
+ * @throws {@link Pulse.NotFoundError}
105
+ * @throws {@link Pulse.TooManyRequestsError}
106
+ * @throws {@link Pulse.InternalServerError}
107
+ *
108
+ * @example
109
+ * import { createReadStream } from "fs";
110
+ * await client.form.fill({
111
+ * instructions: "instructions"
112
+ * })
113
+ */
114
+ fill(request: Pulse.FormFillMultipartInput, requestOptions?: FormClient.RequestOptions): core.HttpResponsePromise<Pulse.FormResult>;
115
+ private __fill;
116
+ /**
117
+ * Remove user-entered data from a PDF form, leaving the blank
118
+ * form template intact. Erases handwritten entries, typed values,
119
+ * and unchecks selected checkboxes — printed labels, field
120
+ * titles, section headers, and other static template content are
121
+ * preserved.
122
+ *
123
+ * **Input modes** — provide exactly one of:
124
+ * - `form_id` — reuse a previously processed form from a prior
125
+ * `/form/detect`, `/form/fill`, or `/form/clear` call (fast
126
+ * path; cached layout reused).
127
+ * - `file_url` — public or pre-signed URL of a PDF Pulse will
128
+ * download.
129
+ * - `file` — direct binary upload of the PDF.
130
+ *
131
+ * All three input modes ride on the same `multipart/form-data`
132
+ * request body. (Callers sending `Content-Type: application/json`
133
+ * with `form_id` / `file_url` are still accepted server-side for
134
+ * backward compatibility, but the SDKs only model the multipart
135
+ * form.)
136
+ *
137
+ * `instructions` is optional. When omitted, Pulse clears every
138
+ * user-filled field deterministically (no LLM call) on AcroForm
139
+ * PDFs, eliminating any chance of hallucinated content. Provide
140
+ * a natural language prompt to clear only specific fields
141
+ * (e.g. `"clear only the address fields"`); targeted clears go
142
+ * through the LLM matcher with a delete-only filter.
143
+ *
144
+ * Optional `form_fields` and `page_range` (alias `pages`) behave
145
+ * the same as on [Form Fill](api:POST/form/fill).
146
+ *
147
+ * Synchronous by default — returns the cleared `FormResult`
148
+ * inline (including a `pdf_url` you can `GET` to download the
149
+ * PDF binary). Set `async: true` to receive `{job_id, status:
150
+ * "pending"}` and poll [GET /job/{jobId}](api:GET/job/{jobId}).
151
+ *
152
+ * Billed at **3 credits per page**. Requires the `form_filler`
153
+ * feature flag to be enabled for your organization.
154
+ *
155
+ * @param {Pulse.FormClearMultipartInput} request
156
+ * @param {FormClient.RequestOptions} requestOptions - Request-specific configuration.
157
+ *
158
+ * @throws {@link Pulse.BadRequestError}
159
+ * @throws {@link Pulse.UnauthorizedError}
160
+ * @throws {@link Pulse.ForbiddenError}
161
+ * @throws {@link Pulse.NotFoundError}
162
+ * @throws {@link Pulse.TooManyRequestsError}
163
+ * @throws {@link Pulse.InternalServerError}
164
+ *
165
+ * @example
166
+ * import { createReadStream } from "fs";
167
+ * await client.form.clear({})
168
+ */
169
+ clear(request: Pulse.FormClearMultipartInput, requestOptions?: FormClient.RequestOptions): core.HttpResponsePromise<Pulse.FormResult>;
170
+ private __clear;
171
+ }