@robosystems/client 2.10.0 → 2.11.0

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.
@@ -1346,6 +1346,55 @@ export type CeremonyOptionsResponse = {
1346
1346
  [key: string]: unknown;
1347
1347
  };
1348
1348
  };
1349
+ /**
1350
+ * ChangeCalendarStartRequest
1351
+ *
1352
+ * Move where an entity's calendar starts, before its first close.
1353
+ *
1354
+ * Earlier adds open months back to `first_open_period`, for history that
1355
+ * predates the start (a bank feed's backfill, a cutover moved earlier).
1356
+ * Later removes empty leading months. Refused once any month has closed,
1357
+ * and when moving later would drop months that hold entries or unposted
1358
+ * source lines.
1359
+ */
1360
+ export type ChangeCalendarStartRequest = {
1361
+ /**
1362
+ * Entity Id
1363
+ *
1364
+ * The entity whose books this acts on, by id. Omit for the group parent — the single-entity default.
1365
+ */
1366
+ entity_id?: string | null;
1367
+ /**
1368
+ * First Open Period
1369
+ *
1370
+ * YYYY-MM: the new first month of the calendar, open.
1371
+ */
1372
+ first_open_period: string;
1373
+ /**
1374
+ * Note
1375
+ *
1376
+ * Free-form note attached to the audit event
1377
+ */
1378
+ note?: string | null;
1379
+ };
1380
+ /**
1381
+ * ChangeCalendarStartResponse
1382
+ */
1383
+ export type ChangeCalendarStartResponse = {
1384
+ fiscal_calendar: FiscalCalendarResponse;
1385
+ /**
1386
+ * Periods Created
1387
+ *
1388
+ * Open FiscalPeriod rows added by moving the start earlier
1389
+ */
1390
+ periods_created?: number;
1391
+ /**
1392
+ * Periods Removed
1393
+ *
1394
+ * Empty FiscalPeriod rows removed by moving the start later
1395
+ */
1396
+ periods_removed?: number;
1397
+ };
1349
1398
  /**
1350
1399
  * ChangeReportingStyleRequest
1351
1400
  *
@@ -1787,6 +1836,37 @@ export type ClosePeriodResponse = {
1787
1836
  [key: string]: number;
1788
1837
  } | null;
1789
1838
  };
1839
+ /**
1840
+ * CompleteDocumentUploadOp
1841
+ *
1842
+ * Body for complete-document-upload: store the uploaded file as a document.
1843
+ */
1844
+ export type CompleteDocumentUploadOp = {
1845
+ /**
1846
+ * Upload Id
1847
+ *
1848
+ * The upload create-document-upload returned.
1849
+ */
1850
+ upload_id: string;
1851
+ /**
1852
+ * Title
1853
+ *
1854
+ * Document title
1855
+ */
1856
+ title: string;
1857
+ /**
1858
+ * Tags
1859
+ *
1860
+ * Optional labels
1861
+ */
1862
+ tags?: Array<string> | null;
1863
+ /**
1864
+ * Folder
1865
+ *
1866
+ * Optional folder
1867
+ */
1868
+ folder?: string | null;
1869
+ };
1790
1870
  /**
1791
1871
  * ComputeForecastRequest
1792
1872
  *
@@ -2493,6 +2573,31 @@ export type CreateConnectionRequest = {
2493
2573
  mercury_config?: MercuryConnectionConfig | null;
2494
2574
  plaid_config?: PlaidConnectionConfig | null;
2495
2575
  };
2576
+ /**
2577
+ * CreateDocumentUploadOp
2578
+ *
2579
+ * Body for create-document-upload: where to upload a document's file.
2580
+ */
2581
+ export type CreateDocumentUploadOp = {
2582
+ /**
2583
+ * File Name
2584
+ *
2585
+ * The file's name, ending in its type's extension (`.pdf`, `.png`, `.jpg` or `.jpeg`).
2586
+ */
2587
+ file_name: string;
2588
+ /**
2589
+ * Content Type
2590
+ *
2591
+ * The file's media type.
2592
+ */
2593
+ content_type?: 'application/pdf' | 'image/png' | 'image/jpeg';
2594
+ /**
2595
+ * File Size Bytes
2596
+ *
2597
+ * The file's exact size in bytes, at most 25 MB. When given it is signed into the upload URL, so an upload of any other size fails. Completing the upload checks the size either way.
2598
+ */
2599
+ file_size_bytes?: number | null;
2600
+ };
2496
2601
  /**
2497
2602
  * CreateEntityRequest
2498
2603
  *
@@ -2749,6 +2854,12 @@ export type CreateEventBlockRequest = {
2749
2854
  * Settlement link: the obligation this event discharges (e.g. cash_received pointing at the originating sale_invoiced).
2750
2855
  */
2751
2856
  discharges_event_id?: string | null;
2857
+ /**
2858
+ * Document Id
2859
+ *
2860
+ * The stored document this event rests on, as evidence: the invoice PDF, the vendor bill, the receipt photo (upload it with create-document-upload and complete-document-upload). Must be a document on this graph. While the event is live, the document cannot be deleted.
2861
+ */
2862
+ document_id?: string | null;
2752
2863
  /**
2753
2864
  * Apply Handlers
2754
2865
  *
@@ -4667,6 +4778,16 @@ export type DocumentDetailResponse = {
4667
4778
  * Sections Indexed
4668
4779
  */
4669
4780
  sections_indexed: number;
4781
+ /**
4782
+ * The stored file, for a document that is one; its `content` is empty. Download it from `GET /documents/{document_id}/file`.
4783
+ */
4784
+ file?: DocumentFileInfo | null;
4785
+ /**
4786
+ * Evidence For
4787
+ *
4788
+ * The live events that name this document as their evidence (an invoice, a bill, a statement balance), newest first, at most 50. While any are listed, the document cannot be deleted.
4789
+ */
4790
+ evidence_for?: Array<DocumentEvidence>;
4670
4791
  /**
4671
4792
  * Created At
4672
4793
  */
@@ -4676,6 +4797,84 @@ export type DocumentDetailResponse = {
4676
4797
  */
4677
4798
  updated_at: string;
4678
4799
  };
4800
+ /**
4801
+ * DocumentEvidence
4802
+ *
4803
+ * A live event on the books that names the document as its evidence.
4804
+ */
4805
+ export type DocumentEvidence = {
4806
+ /**
4807
+ * Event Id
4808
+ */
4809
+ event_id: string;
4810
+ /**
4811
+ * Event Type
4812
+ */
4813
+ event_type: string;
4814
+ /**
4815
+ * Status
4816
+ */
4817
+ status: string;
4818
+ /**
4819
+ * Occurred At
4820
+ */
4821
+ occurred_at: string;
4822
+ };
4823
+ /**
4824
+ * DocumentFileDownloadResponse
4825
+ *
4826
+ * A short-lived link to a stored document file.
4827
+ */
4828
+ export type DocumentFileDownloadResponse = {
4829
+ /**
4830
+ * Document Id
4831
+ */
4832
+ document_id: string;
4833
+ /**
4834
+ * Download Url
4835
+ *
4836
+ * Presigned URL to GET the file.
4837
+ */
4838
+ download_url: string;
4839
+ /**
4840
+ * Expires In
4841
+ *
4842
+ * Seconds until the URL expires.
4843
+ */
4844
+ expires_in: number;
4845
+ file: DocumentFileInfo;
4846
+ };
4847
+ /**
4848
+ * DocumentFileInfo
4849
+ *
4850
+ * The stored file behind a document, when it is one.
4851
+ */
4852
+ export type DocumentFileInfo = {
4853
+ /**
4854
+ * File Name
4855
+ *
4856
+ * The file's name as uploaded.
4857
+ */
4858
+ file_name: string;
4859
+ /**
4860
+ * Content Type
4861
+ *
4862
+ * The file's media type.
4863
+ */
4864
+ content_type: string;
4865
+ /**
4866
+ * Size Bytes
4867
+ *
4868
+ * The stored file's size.
4869
+ */
4870
+ size_bytes: number;
4871
+ /**
4872
+ * Sha256
4873
+ *
4874
+ * Hex SHA-256 of the stored bytes, taken when the upload completed. A stored file never changes, so this identifies it.
4875
+ */
4876
+ sha256: string;
4877
+ };
4679
4878
  /**
4680
4879
  * DocumentLimits
4681
4880
  *
@@ -4731,6 +4930,10 @@ export type DocumentListItem = {
4731
4930
  * Tags
4732
4931
  */
4733
4932
  tags?: Array<string> | null;
4933
+ /**
4934
+ * The stored file, for a document that is one.
4935
+ */
4936
+ file?: DocumentFileInfo | null;
4734
4937
  /**
4735
4938
  * Created At
4736
4939
  */
@@ -5485,6 +5688,12 @@ export type EventBlockEnvelope = {
5485
5688
  * Settlement link — the obligation this event discharges (e.g. `cash_received` pointing at the originating `sale_invoiced`).
5486
5689
  */
5487
5690
  discharges_event_id?: string | null;
5691
+ /**
5692
+ * Document Id
5693
+ *
5694
+ * The stored document the event rests on (an invoice, a bill, a receipt, a statement); read it with get-document.
5695
+ */
5696
+ document_id?: string | null;
5488
5697
  /**
5489
5698
  * Created At
5490
5699
  *
@@ -9523,7 +9732,7 @@ export type MercuryConnectionConfig = {
9523
9732
  /**
9524
9733
  * Since Date
9525
9734
  *
9526
- * First day of the backfill (ISO 8601). Defaults to 1 January of last year. Incremental syncs never look back before it.
9735
+ * First day of the backfill (ISO 8601). Defaults to two years back. Incremental syncs never look back before it, and lines dated in a closed period are never captured.
9527
9736
  */
9528
9737
  since_date?: string | null;
9529
9738
  /**
@@ -10446,6 +10655,51 @@ export type OperationEnvelopeBlockedSourceGraphResponse = {
10446
10655
  */
10447
10656
  idempotentReplay?: boolean;
10448
10657
  };
10658
+ /**
10659
+ * OperationEnvelope[ChangeCalendarStartResponse]
10660
+ */
10661
+ export type OperationEnvelopeChangeCalendarStartResponse = {
10662
+ /**
10663
+ * Operation
10664
+ *
10665
+ * Kebab-case operation name
10666
+ */
10667
+ operation: string;
10668
+ /**
10669
+ * Operationid
10670
+ *
10671
+ * op_-prefixed ULID for audit and SSE correlation
10672
+ */
10673
+ operationId: string;
10674
+ /**
10675
+ * Status
10676
+ *
10677
+ * Operation lifecycle state
10678
+ */
10679
+ status: 'completed' | 'pending' | 'failed';
10680
+ /**
10681
+ * Command-specific result payload
10682
+ */
10683
+ result?: ChangeCalendarStartResponse | null;
10684
+ /**
10685
+ * At
10686
+ *
10687
+ * ISO-8601 UTC timestamp
10688
+ */
10689
+ at: string;
10690
+ /**
10691
+ * Createdby
10692
+ *
10693
+ * User ID that initiated the operation
10694
+ */
10695
+ createdBy?: string | null;
10696
+ /**
10697
+ * Idempotentreplay
10698
+ *
10699
+ * True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.
10700
+ */
10701
+ idempotentReplay?: boolean;
10702
+ };
10449
10703
  /**
10450
10704
  * OperationEnvelope[ChangeReportingStyleResponse]
10451
10705
  */
@@ -13608,7 +13862,7 @@ export type PlaidConnectionConfig = {
13608
13862
  /**
13609
13863
  * Since Date
13610
13864
  *
13611
- * First day of the backfill (ISO 8601), and how much history Plaid is asked to pull for the new Item (at most two years). Defaults to 1 January of last year.
13865
+ * First day of the backfill (ISO 8601), and how much history Plaid is asked to pull for the new Item (at most two years). Defaults to as far back as Plaid goes. Lines dated in a closed period are never captured, whatever the window.
13612
13866
  */
13613
13867
  since_date?: string | null;
13614
13868
  /**
@@ -14121,6 +14375,12 @@ export type PreviewReconciliationsRequest = {
14121
14375
  * Also return the accounts that tie. Off by default: the differences are the work, and the counts cover the rest.
14122
14376
  */
14123
14377
  include_tied?: boolean;
14378
+ /**
14379
+ * Entity Id
14380
+ *
14381
+ * The entity whose books to compare, by id. Omit for the group parent. `source_ledger` applies to the group parent only: QuickBooks keeps its books, not a subsidiary's.
14382
+ */
14383
+ entity_id?: string | null;
14124
14384
  };
14125
14385
  /**
14126
14386
  * PreviewReconcilingItemRequest
@@ -15229,6 +15489,12 @@ export type RecordStatementBalanceRequest = {
15229
15489
  * The balance-sheet account the statement is for (a chart-of-accounts element id).
15230
15490
  */
15231
15491
  element_id: string;
15492
+ /**
15493
+ * Entity Id
15494
+ *
15495
+ * The entity whose books the account is in, by id. Omit for the group parent. The account must be in that entity's chart.
15496
+ */
15497
+ entity_id?: string | null;
15232
15498
  /**
15233
15499
  * As Of
15234
15500
  *
@@ -15300,6 +15566,12 @@ export type RefreshReconciliationsRequest = {
15300
15566
  * Period to reconcile at its last day, as YYYY-MM.
15301
15567
  */
15302
15568
  period: string;
15569
+ /**
15570
+ * Entity Id
15571
+ *
15572
+ * The entity whose books to reconcile, by id. Omit for the group parent. Each entity's reconciliations, and the close they hold, are its own.
15573
+ */
15574
+ entity_id?: string | null;
15303
15575
  };
15304
15576
  /**
15305
15577
  * RegenerateReportOperation
@@ -19063,6 +19335,12 @@ export type UpdateEventBlockRequest = {
19063
19335
  * Set/update the settlement link.
19064
19336
  */
19065
19337
  discharges_event_id?: string | null;
19338
+ /**
19339
+ * Document Id
19340
+ *
19341
+ * Set or replace the stored document the event rests on; an empty string detaches it. Must be a document on this graph. Unset = unchanged.
19342
+ */
19343
+ document_id?: string | null;
19066
19344
  };
19067
19345
  /**
19068
19346
  * UpdateEventHandlerRequest
@@ -24975,6 +25253,59 @@ export type GetDocumentResponses = {
24975
25253
  200: DocumentDetailResponse;
24976
25254
  };
24977
25255
  export type GetDocumentResponse = GetDocumentResponses[keyof GetDocumentResponses];
25256
+ export type GetDocumentFileData = {
25257
+ body?: never;
25258
+ path: {
25259
+ /**
25260
+ * Graph Id
25261
+ */
25262
+ graph_id: string;
25263
+ /**
25264
+ * Document Id
25265
+ */
25266
+ document_id: string;
25267
+ };
25268
+ query?: never;
25269
+ url: '/v1/graphs/{graph_id}/documents/{document_id}/file';
25270
+ };
25271
+ export type GetDocumentFileErrors = {
25272
+ /**
25273
+ * Invalid request
25274
+ */
25275
+ 400: ErrorResponse;
25276
+ /**
25277
+ * Authentication required
25278
+ */
25279
+ 401: ErrorResponse;
25280
+ /**
25281
+ * Access denied
25282
+ */
25283
+ 403: ErrorResponse;
25284
+ /**
25285
+ * Resource not found
25286
+ */
25287
+ 404: ErrorResponse;
25288
+ /**
25289
+ * Validation Error
25290
+ */
25291
+ 422: HttpValidationError;
25292
+ /**
25293
+ * Rate limit exceeded
25294
+ */
25295
+ 429: ErrorResponse;
25296
+ /**
25297
+ * Internal server error
25298
+ */
25299
+ 500: ErrorResponse;
25300
+ };
25301
+ export type GetDocumentFileError = GetDocumentFileErrors[keyof GetDocumentFileErrors];
25302
+ export type GetDocumentFileResponses = {
25303
+ /**
25304
+ * Successful Response
25305
+ */
25306
+ 200: DocumentFileDownloadResponse;
25307
+ };
25308
+ export type GetDocumentFileResponse = GetDocumentFileResponses[keyof GetDocumentFileResponses];
24978
25309
  export type ListMemoriesData = {
24979
25310
  body?: never;
24980
25311
  path: {
@@ -25859,6 +26190,124 @@ export type DeleteDocumentResponses = {
25859
26190
  200: OperationEnvelope;
25860
26191
  };
25861
26192
  export type DeleteDocumentResponse = DeleteDocumentResponses[keyof DeleteDocumentResponses];
26193
+ export type CreateDocumentUploadData = {
26194
+ body: CreateDocumentUploadOp;
26195
+ headers?: {
26196
+ /**
26197
+ * Idempotency-Key
26198
+ */
26199
+ 'Idempotency-Key'?: string | null;
26200
+ };
26201
+ path: {
26202
+ /**
26203
+ * Graph Id
26204
+ */
26205
+ graph_id: string;
26206
+ };
26207
+ query?: never;
26208
+ url: '/v1/graphs/{graph_id}/operations/create-document-upload';
26209
+ };
26210
+ export type CreateDocumentUploadErrors = {
26211
+ /**
26212
+ * Invalid request
26213
+ */
26214
+ 400: ErrorResponse;
26215
+ /**
26216
+ * Authentication required
26217
+ */
26218
+ 401: ErrorResponse;
26219
+ /**
26220
+ * Access denied
26221
+ */
26222
+ 403: ErrorResponse;
26223
+ /**
26224
+ * Resource not found
26225
+ */
26226
+ 404: ErrorResponse;
26227
+ /**
26228
+ * Idempotency-Key conflict — key reused with different body
26229
+ */
26230
+ 409: ErrorResponse;
26231
+ /**
26232
+ * Validation error
26233
+ */
26234
+ 422: ErrorResponse;
26235
+ /**
26236
+ * Rate limit exceeded
26237
+ */
26238
+ 429: ErrorResponse;
26239
+ /**
26240
+ * Internal server error
26241
+ */
26242
+ 500: ErrorResponse;
26243
+ };
26244
+ export type CreateDocumentUploadError = CreateDocumentUploadErrors[keyof CreateDocumentUploadErrors];
26245
+ export type CreateDocumentUploadResponses = {
26246
+ /**
26247
+ * Successful Response
26248
+ */
26249
+ 200: OperationEnvelope;
26250
+ };
26251
+ export type CreateDocumentUploadResponse = CreateDocumentUploadResponses[keyof CreateDocumentUploadResponses];
26252
+ export type CompleteDocumentUploadData = {
26253
+ body: CompleteDocumentUploadOp;
26254
+ headers?: {
26255
+ /**
26256
+ * Idempotency-Key
26257
+ */
26258
+ 'Idempotency-Key'?: string | null;
26259
+ };
26260
+ path: {
26261
+ /**
26262
+ * Graph Id
26263
+ */
26264
+ graph_id: string;
26265
+ };
26266
+ query?: never;
26267
+ url: '/v1/graphs/{graph_id}/operations/complete-document-upload';
26268
+ };
26269
+ export type CompleteDocumentUploadErrors = {
26270
+ /**
26271
+ * Invalid request
26272
+ */
26273
+ 400: ErrorResponse;
26274
+ /**
26275
+ * Authentication required
26276
+ */
26277
+ 401: ErrorResponse;
26278
+ /**
26279
+ * Access denied
26280
+ */
26281
+ 403: ErrorResponse;
26282
+ /**
26283
+ * Resource not found
26284
+ */
26285
+ 404: ErrorResponse;
26286
+ /**
26287
+ * Idempotency-Key conflict — key reused with different body
26288
+ */
26289
+ 409: ErrorResponse;
26290
+ /**
26291
+ * Validation error
26292
+ */
26293
+ 422: ErrorResponse;
26294
+ /**
26295
+ * Rate limit exceeded
26296
+ */
26297
+ 429: ErrorResponse;
26298
+ /**
26299
+ * Internal server error
26300
+ */
26301
+ 500: ErrorResponse;
26302
+ };
26303
+ export type CompleteDocumentUploadError = CompleteDocumentUploadErrors[keyof CompleteDocumentUploadErrors];
26304
+ export type CompleteDocumentUploadResponses = {
26305
+ /**
26306
+ * Successful Response
26307
+ */
26308
+ 200: OperationEnvelope;
26309
+ };
26310
+ export type CompleteDocumentUploadResponse = CompleteDocumentUploadResponses[keyof CompleteDocumentUploadResponses];
25862
26311
  export type CreateFileUploadData = {
25863
26312
  body: FileUploadRequest;
25864
26313
  headers?: {
@@ -27290,6 +27739,65 @@ export type InitializeLedgerResponses = {
27290
27739
  200: OperationEnvelopeInitializeLedgerResponse;
27291
27740
  };
27292
27741
  export type InitializeLedgerResponse2 = InitializeLedgerResponses[keyof InitializeLedgerResponses];
27742
+ export type ChangeCalendarStartData = {
27743
+ body: ChangeCalendarStartRequest;
27744
+ headers?: {
27745
+ /**
27746
+ * Idempotency-Key
27747
+ */
27748
+ 'Idempotency-Key'?: string | null;
27749
+ };
27750
+ path: {
27751
+ /**
27752
+ * Graph Id
27753
+ */
27754
+ graph_id: string;
27755
+ };
27756
+ query?: never;
27757
+ url: '/extensions/roboledger/{graph_id}/operations/change-calendar-start';
27758
+ };
27759
+ export type ChangeCalendarStartErrors = {
27760
+ /**
27761
+ * Invalid request
27762
+ */
27763
+ 400: ErrorResponse;
27764
+ /**
27765
+ * Authentication required
27766
+ */
27767
+ 401: ErrorResponse;
27768
+ /**
27769
+ * Access denied
27770
+ */
27771
+ 403: ErrorResponse;
27772
+ /**
27773
+ * Resource not found
27774
+ */
27775
+ 404: ErrorResponse;
27776
+ /**
27777
+ * Idempotency-Key conflict — key reused with different body
27778
+ */
27779
+ 409: ErrorResponse;
27780
+ /**
27781
+ * Validation error
27782
+ */
27783
+ 422: ErrorResponse;
27784
+ /**
27785
+ * Rate limit exceeded
27786
+ */
27787
+ 429: ErrorResponse;
27788
+ /**
27789
+ * Internal server error
27790
+ */
27791
+ 500: ErrorResponse;
27792
+ };
27793
+ export type ChangeCalendarStartError = ChangeCalendarStartErrors[keyof ChangeCalendarStartErrors];
27794
+ export type ChangeCalendarStartResponses = {
27795
+ /**
27796
+ * Successful Response
27797
+ */
27798
+ 200: OperationEnvelopeChangeCalendarStartResponse;
27799
+ };
27800
+ export type ChangeCalendarStartResponse2 = ChangeCalendarStartResponses[keyof ChangeCalendarStartResponses];
27293
27801
  export type InitializeChartOfAccountsData = {
27294
27802
  body: InitializeChartOfAccountsRequest;
27295
27803
  headers?: {