mindee 4.36.1 → 4.36.2

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## v4.36.2 - 2026-01-05
4
+ ### Changes
5
+ * :wastebasket: deprecate docFromXxx methods
6
+
7
+
3
8
  ## v4.36.1 - 2025-12-30
4
9
  ### Fixes
5
10
  * :bug: extracted images should take rotation into account
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mindee",
3
- "version": "4.36.1",
3
+ "version": "4.36.2",
4
4
  "description": "Mindee Client Library for Node.js",
5
5
  "main": "src/index.js",
6
6
  "bin": "bin/mindee.js",
package/src/cli.js CHANGED
@@ -77,7 +77,7 @@ async function callParse(productClass, command, inputPath, options) {
77
77
  const mindeeClient = initClient(options);
78
78
  const predictParams = getPredictParams(options);
79
79
  const pageOptions = getPageOptions(options);
80
- const inputSource = mindeeClient.docFromPath(inputPath);
80
+ const inputSource = new input_1.PathInput({ inputPath: inputPath });
81
81
  let response;
82
82
  if (command === cliProducts_1.COMMAND_CUSTOM || command === cliProducts_1.COMMAND_GENERATED) {
83
83
  const customEndpoint = mindeeClient.createEndpoint(options.endpoint, options.account, options.version);
@@ -101,7 +101,7 @@ async function callEnqueueAndParse(productClass, command, inputPath, options) {
101
101
  const mindeeClient = initClient(options);
102
102
  const predictParams = getPredictParams(options);
103
103
  const pageOptions = getPageOptions(options);
104
- const inputSource = mindeeClient.docFromPath(inputPath);
104
+ const inputSource = new input_1.PathInput({ inputPath: inputPath });
105
105
  let response;
106
106
  if (command === cliProducts_1.COMMAND_CUSTOM || command === cliProducts_1.COMMAND_GENERATED) {
107
107
  const customEndpoint = mindeeClient.createEndpoint(options.endpoint, options.account, options.version);
package/src/client.d.ts CHANGED
@@ -215,35 +215,41 @@ export declare class Client {
215
215
  /**
216
216
  * Load an input document from a local path.
217
217
  * @param inputPath
218
+ * @deprecated Use `new mindee.PathInput()` instead.
218
219
  */
219
220
  docFromPath(inputPath: string): PathInput;
220
221
  /**
221
222
  * Load an input document from a base64 encoded string.
222
223
  * @param inputString input content, as a string.
223
224
  * @param filename file name.
225
+ * @deprecated Use `new mindee.Base64Input()` instead.
224
226
  */
225
227
  docFromBase64(inputString: string, filename: string): Base64Input;
226
228
  /**
227
229
  * Load an input document from a `stream.Readable` object.
228
230
  * @param inputStream input content, as a readable stream.
229
231
  * @param filename file name.
232
+ * @deprecated Use `new mindee.StreamInput()` instead.
230
233
  */
231
234
  docFromStream(inputStream: Readable, filename: string): StreamInput;
232
235
  /**
233
236
  * Load an input document from bytes.
234
237
  * @param inputBytes input content, as a Uint8Array or Buffer.
235
238
  * @param filename file name.
239
+ * @deprecated Use `new mindee.BytesInput()` instead.
236
240
  */
237
241
  docFromBytes(inputBytes: Uint8Array, filename: string): BytesInput;
238
242
  /**
239
243
  * Load an input document from a URL.
240
244
  * @param url input url. Must be HTTPS.
245
+ * @deprecated Use `new mindee.UrlInput()` instead.
241
246
  */
242
247
  docFromUrl(url: string): UrlInput;
243
248
  /**
244
249
  * Load an input document from a Buffer.
245
250
  * @param buffer input content, as a buffer.
246
251
  * @param filename file name.
252
+ * @deprecated Use `new mindee.BufferInput()` instead.
247
253
  */
248
254
  docFromBuffer(buffer: Buffer, filename: string): BufferInput;
249
255
  }
package/src/client.js CHANGED
@@ -274,6 +274,7 @@ Job status: ${pollResults.job.status}.`);
274
274
  /**
275
275
  * Load an input document from a local path.
276
276
  * @param inputPath
277
+ * @deprecated Use `new mindee.PathInput()` instead.
277
278
  */
278
279
  docFromPath(inputPath) {
279
280
  return new input_1.PathInput({
@@ -284,6 +285,7 @@ Job status: ${pollResults.job.status}.`);
284
285
  * Load an input document from a base64 encoded string.
285
286
  * @param inputString input content, as a string.
286
287
  * @param filename file name.
288
+ * @deprecated Use `new mindee.Base64Input()` instead.
287
289
  */
288
290
  docFromBase64(inputString, filename) {
289
291
  return new input_1.Base64Input({
@@ -295,6 +297,7 @@ Job status: ${pollResults.job.status}.`);
295
297
  * Load an input document from a `stream.Readable` object.
296
298
  * @param inputStream input content, as a readable stream.
297
299
  * @param filename file name.
300
+ * @deprecated Use `new mindee.StreamInput()` instead.
298
301
  */
299
302
  docFromStream(inputStream, filename) {
300
303
  return new input_1.StreamInput({
@@ -306,6 +309,7 @@ Job status: ${pollResults.job.status}.`);
306
309
  * Load an input document from bytes.
307
310
  * @param inputBytes input content, as a Uint8Array or Buffer.
308
311
  * @param filename file name.
312
+ * @deprecated Use `new mindee.BytesInput()` instead.
309
313
  */
310
314
  docFromBytes(inputBytes, filename) {
311
315
  return new input_1.BytesInput({
@@ -316,6 +320,7 @@ Job status: ${pollResults.job.status}.`);
316
320
  /**
317
321
  * Load an input document from a URL.
318
322
  * @param url input url. Must be HTTPS.
323
+ * @deprecated Use `new mindee.UrlInput()` instead.
319
324
  */
320
325
  docFromUrl(url) {
321
326
  return new input_1.UrlInput({
@@ -326,6 +331,7 @@ Job status: ${pollResults.job.status}.`);
326
331
  * Load an input document from a Buffer.
327
332
  * @param buffer input content, as a buffer.
328
333
  * @param filename file name.
334
+ * @deprecated Use `new mindee.BufferInput()` instead.
329
335
  */
330
336
  docFromBuffer(buffer, filename) {
331
337
  return new input_1.BufferInput({