@spaceinvoices/js-sdk 9.0.0 → 9.0.1

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.
@@ -335,11 +335,13 @@ export type backfillExpenseRecognitionResponse = (backfillExpenseRecognitionResp
335
335
  export declare const getBackfillExpenseRecognitionUrl: () => string;
336
336
  export declare const backfillExpenseRecognition: (expenseRecognitionBackfill: ExpenseRecognitionBackfill, options?: RequestInit) => Promise<backfillExpenseRecognitionResponse>;
337
337
  /**
338
- * Accepts one supplier invoice (PDF, JPEG, PNG, or WebP), creates an invoice-only draft expense with `creation_source=ocr`, and enqueues an async recognition job. For sandbox entities, no provider is called and no usage is charged: the submitted file is not stored and is replaced by a clearly marked deterministic demo invoice; the response exposes `simulation_mode=sandbox_demo`.
338
+ * Automatic expense recognition supports PDFs up to 8 pages. Split a larger PDF into smaller documents before trying again.
339
+
340
+ Accepts one supplier invoice (PDF, JPEG, PNG, or WebP), creates an invoice-only draft expense with `creation_source=ocr`, and enqueues an async recognition job. For sandbox entities, no provider is called and no usage is charged: the submitted file is not stored and is replaced by a clearly marked deterministic demo invoice; the response exposes `simulation_mode=sandbox_demo`.
339
341
 
340
342
  Returns **202 Accepted** with the job, expense, and file identifiers. Recognition is asynchronous in live mode; poll `GET /expenses/recognitions/{id}` for status. Terminal success is `ready_for_review` or `needs_attention`; terminal failure is `failed`, with safe `error_code` and `error_message` fields.
341
343
 
342
- Parsed document and line amounts are checked against the standard expense calculation before applying extraction. A disagreement keeps the draft unchanged and stores the extraction with `needs_attention` for review.
344
+ Parsed document and line amounts are checked against the standard expense calculation before applying extraction. A disagreement keeps the draft unchanged and stores the extraction with `needs_attention` for review. Critical identity, required-field, confidence, document-type, and questionable financial warnings also require review and prevent unsafe automatic application.
343
345
 
344
346
  Payment suggestions from OCR are advisory only and never mark the expense paid or create payments. Failed provider attempts record zero customer usage. Automatic provider attempts and a permitted customer retry share the same job; billable customer usage is recorded once only after a successful terminal result.
345
347
 
@@ -335,11 +335,13 @@ export type backfillExpenseRecognitionResponse = (backfillExpenseRecognitionResp
335
335
  export declare const getBackfillExpenseRecognitionUrl: () => string;
336
336
  export declare const backfillExpenseRecognition: (expenseRecognitionBackfill: ExpenseRecognitionBackfill, options?: RequestInit) => Promise<backfillExpenseRecognitionResponse>;
337
337
  /**
338
- * Accepts one supplier invoice (PDF, JPEG, PNG, or WebP), creates an invoice-only draft expense with `creation_source=ocr`, and enqueues an async recognition job. For sandbox entities, no provider is called and no usage is charged: the submitted file is not stored and is replaced by a clearly marked deterministic demo invoice; the response exposes `simulation_mode=sandbox_demo`.
338
+ * Automatic expense recognition supports PDFs up to 8 pages. Split a larger PDF into smaller documents before trying again.
339
+
340
+ Accepts one supplier invoice (PDF, JPEG, PNG, or WebP), creates an invoice-only draft expense with `creation_source=ocr`, and enqueues an async recognition job. For sandbox entities, no provider is called and no usage is charged: the submitted file is not stored and is replaced by a clearly marked deterministic demo invoice; the response exposes `simulation_mode=sandbox_demo`.
339
341
 
340
342
  Returns **202 Accepted** with the job, expense, and file identifiers. Recognition is asynchronous in live mode; poll `GET /expenses/recognitions/{id}` for status. Terminal success is `ready_for_review` or `needs_attention`; terminal failure is `failed`, with safe `error_code` and `error_message` fields.
341
343
 
342
- Parsed document and line amounts are checked against the standard expense calculation before applying extraction. A disagreement keeps the draft unchanged and stores the extraction with `needs_attention` for review.
344
+ Parsed document and line amounts are checked against the standard expense calculation before applying extraction. A disagreement keeps the draft unchanged and stores the extraction with `needs_attention` for review. Critical identity, required-field, confidence, document-type, and questionable financial warnings also require review and prevent unsafe automatic application.
343
345
 
344
346
  Payment suggestions from OCR are advisory only and never mark the expense paid or create payments. Failed provider attempts record zero customer usage. Automatic provider attempts and a permitted customer retry share the same job; billable customer usage is recorded once only after a successful terminal result.
345
347
 
@@ -951,11 +951,13 @@ export declare const BackfillExpenseRecognitionResponse: zod.ZodObject<{
951
951
  next_cursor: zod.ZodNullable<zod.ZodString>;
952
952
  }, zod.z.core.$strip>;
953
953
  /**
954
- * Accepts one supplier invoice (PDF, JPEG, PNG, or WebP), creates an invoice-only draft expense with `creation_source=ocr`, and enqueues an async recognition job. For sandbox entities, no provider is called and no usage is charged: the submitted file is not stored and is replaced by a clearly marked deterministic demo invoice; the response exposes `simulation_mode=sandbox_demo`.
954
+ * Automatic expense recognition supports PDFs up to 8 pages. Split a larger PDF into smaller documents before trying again.
955
+
956
+ Accepts one supplier invoice (PDF, JPEG, PNG, or WebP), creates an invoice-only draft expense with `creation_source=ocr`, and enqueues an async recognition job. For sandbox entities, no provider is called and no usage is charged: the submitted file is not stored and is replaced by a clearly marked deterministic demo invoice; the response exposes `simulation_mode=sandbox_demo`.
955
957
 
956
958
  Returns **202 Accepted** with the job, expense, and file identifiers. Recognition is asynchronous in live mode; poll `GET /expenses/recognitions/{id}` for status. Terminal success is `ready_for_review` or `needs_attention`; terminal failure is `failed`, with safe `error_code` and `error_message` fields.
957
959
 
958
- Parsed document and line amounts are checked against the standard expense calculation before applying extraction. A disagreement keeps the draft unchanged and stores the extraction with `needs_attention` for review.
960
+ Parsed document and line amounts are checked against the standard expense calculation before applying extraction. A disagreement keeps the draft unchanged and stores the extraction with `needs_attention` for review. Critical identity, required-field, confidence, document-type, and questionable financial warnings also require review and prevent unsafe automatic application.
959
961
 
960
962
  Payment suggestions from OCR are advisory only and never mark the expense paid or create payments. Failed provider attempts record zero customer usage. Automatic provider attempts and a permitted customer retry share the same job; billable customer usage is recorded once only after a successful terminal result.
961
963
 
@@ -951,11 +951,13 @@ export declare const BackfillExpenseRecognitionResponse: zod.ZodObject<{
951
951
  next_cursor: zod.ZodNullable<zod.ZodString>;
952
952
  }, zod.z.core.$strip>;
953
953
  /**
954
- * Accepts one supplier invoice (PDF, JPEG, PNG, or WebP), creates an invoice-only draft expense with `creation_source=ocr`, and enqueues an async recognition job. For sandbox entities, no provider is called and no usage is charged: the submitted file is not stored and is replaced by a clearly marked deterministic demo invoice; the response exposes `simulation_mode=sandbox_demo`.
954
+ * Automatic expense recognition supports PDFs up to 8 pages. Split a larger PDF into smaller documents before trying again.
955
+
956
+ Accepts one supplier invoice (PDF, JPEG, PNG, or WebP), creates an invoice-only draft expense with `creation_source=ocr`, and enqueues an async recognition job. For sandbox entities, no provider is called and no usage is charged: the submitted file is not stored and is replaced by a clearly marked deterministic demo invoice; the response exposes `simulation_mode=sandbox_demo`.
955
957
 
956
958
  Returns **202 Accepted** with the job, expense, and file identifiers. Recognition is asynchronous in live mode; poll `GET /expenses/recognitions/{id}` for status. Terminal success is `ready_for_review` or `needs_attention`; terminal failure is `failed`, with safe `error_code` and `error_message` fields.
957
959
 
958
- Parsed document and line amounts are checked against the standard expense calculation before applying extraction. A disagreement keeps the draft unchanged and stores the extraction with `needs_attention` for review.
960
+ Parsed document and line amounts are checked against the standard expense calculation before applying extraction. A disagreement keeps the draft unchanged and stores the extraction with `needs_attention` for review. Critical identity, required-field, confidence, document-type, and questionable financial warnings also require review and prevent unsafe automatic application.
959
961
 
960
962
  Payment suggestions from OCR are advisory only and never mark the expense paid or create payments. Failed provider attempts record zero customer usage. Automatic provider attempts and a permitted customer retry share the same job; billable customer usage is recorded once only after a successful terminal result.
961
963
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spaceinvoices/js-sdk",
3
- "version": "9.0.0",
3
+ "version": "9.0.1",
4
4
  "description": "Official JavaScript/TypeScript SDK for the Space Invoices API",
5
5
  "author": "Space Invoices <support@spaceinvoices.com>",
6
6
  "license": "MIT",