@axivoy/api 1.7.0 → 1.8.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.
@@ -1565,6 +1565,72 @@ export interface paths {
1565
1565
  patch?: never;
1566
1566
  trace?: never;
1567
1567
  };
1568
+ "/ops/customer_payments.bank_connections.disconnect": {
1569
+ parameters: {
1570
+ query?: never;
1571
+ header?: never;
1572
+ path?: never;
1573
+ cookie?: never;
1574
+ };
1575
+ get?: never;
1576
+ put?: never;
1577
+ /**
1578
+ * Disconnect a bank account
1579
+ * @description Revokes a bank link at the provider and stops its syncs. Transactions already in the bank inbox stay.
1580
+ *
1581
+ * Kind: `mutate`. Errors use the envelope `{error: {code, reason, message, fields}}`.
1582
+ */
1583
+ post: operations["ops.customer_payments.bank_connections.disconnect"];
1584
+ delete?: never;
1585
+ options?: never;
1586
+ head?: never;
1587
+ patch?: never;
1588
+ trace?: never;
1589
+ };
1590
+ "/ops/customer_payments.bank_connections.list": {
1591
+ parameters: {
1592
+ query?: never;
1593
+ header?: never;
1594
+ path?: never;
1595
+ cookie?: never;
1596
+ };
1597
+ get?: never;
1598
+ put?: never;
1599
+ /**
1600
+ * List bank connections
1601
+ * @description Linked bank accounts with their status, last sync and whether syncing is failing.
1602
+ *
1603
+ * Kind: `read`. Errors use the envelope `{error: {code, reason, message, fields}}`.
1604
+ */
1605
+ post: operations["ops.customer_payments.bank_connections.list"];
1606
+ delete?: never;
1607
+ options?: never;
1608
+ head?: never;
1609
+ patch?: never;
1610
+ trace?: never;
1611
+ };
1612
+ "/ops/customer_payments.bank_connections.request_link": {
1613
+ parameters: {
1614
+ query?: never;
1615
+ header?: never;
1616
+ path?: never;
1617
+ cookie?: never;
1618
+ };
1619
+ get?: never;
1620
+ put?: never;
1621
+ /**
1622
+ * Ask someone to link a bank account
1623
+ * @description Asks the people who may link bank accounts (or one of them) to link one, with an in-app notification and an email that opens the bank connections page. Each person is asked at most once per 24 hours.
1624
+ *
1625
+ * Kind: `talk`. Errors use the envelope `{error: {code, reason, message, fields}}`.
1626
+ */
1627
+ post: operations["ops.customer_payments.bank_connections.request_link"];
1628
+ delete?: never;
1629
+ options?: never;
1630
+ head?: never;
1631
+ patch?: never;
1632
+ trace?: never;
1633
+ };
1568
1634
  "/ops/customer_payments.bank_connections.sync": {
1569
1635
  parameters: {
1570
1636
  query?: never;
@@ -6693,6 +6759,32 @@ export interface paths {
6693
6759
  };
6694
6760
  }
6695
6761
  export interface webhooks {
6762
+ "bank_connection.link_requested": {
6763
+ parameters: {
6764
+ query?: never;
6765
+ header?: never;
6766
+ path?: never;
6767
+ cookie?: never;
6768
+ };
6769
+ get?: never;
6770
+ put?: never;
6771
+ /**
6772
+ * Bank link requested
6773
+ * @description Someone (a person, assistant, app or API key) asked the people who may link bank accounts to link one.
6774
+ *
6775
+ * Version 1. Delivered at least once; dedupe by `id`.
6776
+ *
6777
+ * Subscriptions can filter on: `requested_by_kind` (Requested by), `recipient_count` (Recipients).
6778
+ *
6779
+ * Verify `Axivoy-Signature` before trusting the body; answer 2xx within 10 seconds. Failed tries retry at 1 minute, 10 minutes, 1 hour, 6 hours and 16 hours; replay any delivery from the last 30 days with `webhooks.deliveries.replay`.
6780
+ */
6781
+ post: operations["events.bank_connection.link_requested"];
6782
+ delete?: never;
6783
+ options?: never;
6784
+ head?: never;
6785
+ patch?: never;
6786
+ trace?: never;
6787
+ };
6696
6788
  "compliance.item.expiring": {
6697
6789
  parameters: {
6698
6790
  query?: never;
@@ -18535,6 +18627,410 @@ export interface operations {
18535
18627
  };
18536
18628
  };
18537
18629
  };
18630
+ "ops.customer_payments.bank_connections.disconnect": {
18631
+ parameters: {
18632
+ query?: never;
18633
+ header?: {
18634
+ /** @description Replays the first result when the same call is retried. Send one per user intent on writes. */
18635
+ "Idempotency-Key"?: string;
18636
+ /** @description Send `true` to run every check without changing anything. The answer is `{"dry_run": {"outcome": "would_run" | "would_propose", "input": {...}}}`. */
18637
+ "Axivoy-Dry-Run"?: "true" | "false";
18638
+ };
18639
+ path?: never;
18640
+ cookie?: never;
18641
+ };
18642
+ requestBody?: {
18643
+ content: {
18644
+ /**
18645
+ * @example {
18646
+ * "bank_connection_id": 1
18647
+ * }
18648
+ */
18649
+ "application/json": {
18650
+ /** @description Bank connection id */
18651
+ bank_connection_id: number;
18652
+ };
18653
+ };
18654
+ };
18655
+ responses: {
18656
+ /** @description The operation ran. */
18657
+ 200: {
18658
+ headers: {
18659
+ [name: string]: unknown;
18660
+ };
18661
+ content: {
18662
+ /**
18663
+ * @example {
18664
+ * "result": {
18665
+ * "bank_name": "Operating Checking",
18666
+ * "disconnected": 1
18667
+ * }
18668
+ * }
18669
+ */
18670
+ "application/json": {
18671
+ result: {
18672
+ /** @description Account disconnected */
18673
+ bank_name?: string | null;
18674
+ /** @description Bank accounts disconnected (accounts sharing one bank login go together) */
18675
+ disconnected: number;
18676
+ };
18677
+ };
18678
+ };
18679
+ };
18680
+ 202: components["responses"]["Proposal"];
18681
+ /** @description Refused: credits_exhausted. */
18682
+ 402: {
18683
+ headers: {
18684
+ [name: string]: unknown;
18685
+ };
18686
+ content: {
18687
+ "application/json": components["schemas"]["OperationError"];
18688
+ };
18689
+ };
18690
+ /** @description Refused: not_permitted, not_available, authority_off, data_class_blocked. */
18691
+ 403: {
18692
+ headers: {
18693
+ [name: string]: unknown;
18694
+ };
18695
+ content: {
18696
+ "application/json": components["schemas"]["OperationError"];
18697
+ };
18698
+ };
18699
+ /** @description Refused: not_found. */
18700
+ 404: {
18701
+ headers: {
18702
+ [name: string]: unknown;
18703
+ };
18704
+ content: {
18705
+ "application/json": components["schemas"]["OperationError"];
18706
+ };
18707
+ };
18708
+ /** @description Refused: idempotency_conflict, stale_state. */
18709
+ 409: {
18710
+ headers: {
18711
+ [name: string]: unknown;
18712
+ };
18713
+ content: {
18714
+ "application/json": components["schemas"]["OperationError"];
18715
+ };
18716
+ };
18717
+ /** @description Refused: operation_retired. */
18718
+ 410: {
18719
+ headers: {
18720
+ [name: string]: unknown;
18721
+ };
18722
+ content: {
18723
+ "application/json": components["schemas"]["OperationError"];
18724
+ };
18725
+ };
18726
+ /** @description Refused: invalid_input, domain_rule. */
18727
+ 422: {
18728
+ headers: {
18729
+ [name: string]: unknown;
18730
+ };
18731
+ content: {
18732
+ "application/json": components["schemas"]["OperationError"];
18733
+ };
18734
+ };
18735
+ /** @description Refused: rate_limited. */
18736
+ 429: {
18737
+ headers: {
18738
+ [name: string]: unknown;
18739
+ };
18740
+ content: {
18741
+ "application/json": components["schemas"]["OperationError"];
18742
+ };
18743
+ };
18744
+ };
18745
+ };
18746
+ "ops.customer_payments.bank_connections.list": {
18747
+ parameters: {
18748
+ query?: never;
18749
+ header?: {
18750
+ /** @description Replays the first result when the same call is retried. Send one per user intent on writes. */
18751
+ "Idempotency-Key"?: string;
18752
+ /** @description Send `true` to run every check without changing anything. The answer is `{"dry_run": {"outcome": "would_run" | "would_propose", "input": {...}}}`. */
18753
+ "Axivoy-Dry-Run"?: "true" | "false";
18754
+ };
18755
+ path?: never;
18756
+ cookie?: never;
18757
+ };
18758
+ requestBody?: {
18759
+ content: {
18760
+ /** @example {} */
18761
+ "application/json": {
18762
+ /** @description Cursor from the previous page's next_cursor. */
18763
+ cursor?: string | null;
18764
+ /** @description Rows per page (default 25). */
18765
+ limit?: number | null;
18766
+ /**
18767
+ * Format: date-time
18768
+ * @description Only rows changed at or after this instant, oldest change first, with deleted rows as tombstones.
18769
+ */
18770
+ updated_since?: string | null;
18771
+ };
18772
+ };
18773
+ };
18774
+ responses: {
18775
+ /** @description The operation ran. */
18776
+ 200: {
18777
+ headers: {
18778
+ [name: string]: unknown;
18779
+ };
18780
+ content: {
18781
+ /**
18782
+ * @example {
18783
+ * "result": {
18784
+ * "items": [
18785
+ * {
18786
+ * "id": 1,
18787
+ * "provider": "plaid",
18788
+ * "institution_name": "Dickens PLC Bank",
18789
+ * "bank_name": "Operating Checking",
18790
+ * "bank_account_last4": "0761",
18791
+ * "status": "active",
18792
+ * "sync_failing": false,
18793
+ * "last_sync_error": null,
18794
+ * "last_synced_at": null,
18795
+ * "updated_at": "2026-10-19T16:17:18Z"
18796
+ * }
18797
+ * ],
18798
+ * "next_cursor": null
18799
+ * }
18800
+ * }
18801
+ */
18802
+ "application/json": {
18803
+ result: {
18804
+ /** @description One page of rows. */
18805
+ items: {
18806
+ /** @description The row's id. */
18807
+ id: number;
18808
+ /** @description Bank feed provider (plaid or stripe) */
18809
+ provider?: string | null;
18810
+ /** @description Bank */
18811
+ institution_name?: string | null;
18812
+ /** @description Account name */
18813
+ bank_name?: string | null;
18814
+ /** @description Account last four digits */
18815
+ bank_account_last4?: string | null;
18816
+ /** @description active, error (needs reconnect) or disconnected */
18817
+ status: string;
18818
+ /** @description True when recent syncs failed and are being retried */
18819
+ sync_failing: boolean;
18820
+ /** @description Why the last sync failed */
18821
+ last_sync_error?: string | null;
18822
+ /**
18823
+ * Format: date-time
18824
+ * @description Last successful sync
18825
+ */
18826
+ last_synced_at?: string | null;
18827
+ /**
18828
+ * Format: date-time
18829
+ * @description Last change to the record
18830
+ */
18831
+ updated_at?: string | null;
18832
+ /** @description True on a tombstone (the row was deleted or recycled); other fields are absent. */
18833
+ deleted?: boolean | null;
18834
+ }[];
18835
+ /** @description Pass as cursor for the next page; null on the last page. */
18836
+ next_cursor?: string | null;
18837
+ };
18838
+ };
18839
+ };
18840
+ };
18841
+ 202: components["responses"]["Proposal"];
18842
+ /** @description Refused: credits_exhausted. */
18843
+ 402: {
18844
+ headers: {
18845
+ [name: string]: unknown;
18846
+ };
18847
+ content: {
18848
+ "application/json": components["schemas"]["OperationError"];
18849
+ };
18850
+ };
18851
+ /** @description Refused: not_permitted, not_available, authority_off, data_class_blocked. */
18852
+ 403: {
18853
+ headers: {
18854
+ [name: string]: unknown;
18855
+ };
18856
+ content: {
18857
+ "application/json": components["schemas"]["OperationError"];
18858
+ };
18859
+ };
18860
+ /** @description Refused: not_found. */
18861
+ 404: {
18862
+ headers: {
18863
+ [name: string]: unknown;
18864
+ };
18865
+ content: {
18866
+ "application/json": components["schemas"]["OperationError"];
18867
+ };
18868
+ };
18869
+ /** @description Refused: idempotency_conflict, stale_state. */
18870
+ 409: {
18871
+ headers: {
18872
+ [name: string]: unknown;
18873
+ };
18874
+ content: {
18875
+ "application/json": components["schemas"]["OperationError"];
18876
+ };
18877
+ };
18878
+ /** @description Refused: operation_retired. */
18879
+ 410: {
18880
+ headers: {
18881
+ [name: string]: unknown;
18882
+ };
18883
+ content: {
18884
+ "application/json": components["schemas"]["OperationError"];
18885
+ };
18886
+ };
18887
+ /** @description Refused: invalid_input, domain_rule. */
18888
+ 422: {
18889
+ headers: {
18890
+ [name: string]: unknown;
18891
+ };
18892
+ content: {
18893
+ "application/json": components["schemas"]["OperationError"];
18894
+ };
18895
+ };
18896
+ /** @description Refused: rate_limited. */
18897
+ 429: {
18898
+ headers: {
18899
+ [name: string]: unknown;
18900
+ };
18901
+ content: {
18902
+ "application/json": components["schemas"]["OperationError"];
18903
+ };
18904
+ };
18905
+ };
18906
+ };
18907
+ "ops.customer_payments.bank_connections.request_link": {
18908
+ parameters: {
18909
+ query?: never;
18910
+ header?: {
18911
+ /** @description Replays the first result when the same call is retried. Send one per user intent on writes. */
18912
+ "Idempotency-Key"?: string;
18913
+ /** @description Send `true` to run every check without changing anything. The answer is `{"dry_run": {"outcome": "would_run" | "would_propose", "input": {...}}}`. */
18914
+ "Axivoy-Dry-Run"?: "true" | "false";
18915
+ };
18916
+ path?: never;
18917
+ cookie?: never;
18918
+ };
18919
+ requestBody?: {
18920
+ content: {
18921
+ /**
18922
+ * @example {
18923
+ * "note": "The First Bank account is not linked yet."
18924
+ * }
18925
+ */
18926
+ "application/json": {
18927
+ /** @description Member to ask (one who may link bank accounts); default every such member */
18928
+ user_id?: number | null;
18929
+ /** @description Short note for the request (500 characters) */
18930
+ note?: string | null;
18931
+ };
18932
+ };
18933
+ };
18934
+ responses: {
18935
+ /** @description The operation ran. */
18936
+ 200: {
18937
+ headers: {
18938
+ [name: string]: unknown;
18939
+ };
18940
+ content: {
18941
+ /**
18942
+ * @example {
18943
+ * "result": {
18944
+ * "request_id": 1,
18945
+ * "requested_at": "2026-10-19T16:17:20Z",
18946
+ * "notified_count": 2,
18947
+ * "already_requested_count": 0
18948
+ * }
18949
+ * }
18950
+ */
18951
+ "application/json": {
18952
+ result: {
18953
+ /** @description Bank link request id (the earlier one when everyone asked was already asked in the last 24 hours) */
18954
+ request_id: number;
18955
+ /**
18956
+ * Format: date-time
18957
+ * @description When the request was made
18958
+ */
18959
+ requested_at: string;
18960
+ /** @description People notified by this call */
18961
+ notified_count: number;
18962
+ /** @description People skipped because they were asked in the last 24 hours */
18963
+ already_requested_count: number;
18964
+ };
18965
+ };
18966
+ };
18967
+ };
18968
+ 202: components["responses"]["Proposal"];
18969
+ /** @description Refused: credits_exhausted. */
18970
+ 402: {
18971
+ headers: {
18972
+ [name: string]: unknown;
18973
+ };
18974
+ content: {
18975
+ "application/json": components["schemas"]["OperationError"];
18976
+ };
18977
+ };
18978
+ /** @description Refused: not_permitted, not_available, authority_off, data_class_blocked. */
18979
+ 403: {
18980
+ headers: {
18981
+ [name: string]: unknown;
18982
+ };
18983
+ content: {
18984
+ "application/json": components["schemas"]["OperationError"];
18985
+ };
18986
+ };
18987
+ /** @description Refused: not_found. */
18988
+ 404: {
18989
+ headers: {
18990
+ [name: string]: unknown;
18991
+ };
18992
+ content: {
18993
+ "application/json": components["schemas"]["OperationError"];
18994
+ };
18995
+ };
18996
+ /** @description Refused: idempotency_conflict, stale_state. */
18997
+ 409: {
18998
+ headers: {
18999
+ [name: string]: unknown;
19000
+ };
19001
+ content: {
19002
+ "application/json": components["schemas"]["OperationError"];
19003
+ };
19004
+ };
19005
+ /** @description Refused: operation_retired. */
19006
+ 410: {
19007
+ headers: {
19008
+ [name: string]: unknown;
19009
+ };
19010
+ content: {
19011
+ "application/json": components["schemas"]["OperationError"];
19012
+ };
19013
+ };
19014
+ /** @description Refused: invalid_input, domain_rule. */
19015
+ 422: {
19016
+ headers: {
19017
+ [name: string]: unknown;
19018
+ };
19019
+ content: {
19020
+ "application/json": components["schemas"]["OperationError"];
19021
+ };
19022
+ };
19023
+ /** @description Refused: rate_limited. */
19024
+ 429: {
19025
+ headers: {
19026
+ [name: string]: unknown;
19027
+ };
19028
+ content: {
19029
+ "application/json": components["schemas"]["OperationError"];
19030
+ };
19031
+ };
19032
+ };
19033
+ };
18538
19034
  "ops.customer_payments.bank_connections.sync": {
18539
19035
  parameters: {
18540
19036
  query?: never;
@@ -62948,6 +63444,105 @@ export interface operations {
62948
63444
  };
62949
63445
  };
62950
63446
  };
63447
+ "events.bank_connection.link_requested": {
63448
+ parameters: {
63449
+ query?: never;
63450
+ header: {
63451
+ /** @description `t=<unix seconds>,v1=<hex>`: HMAC-SHA256 of `{t}.{raw body}` with the endpoint secret. For 24 hours after a secret rotation a second `v1=` signed with the old secret follows. Compare in constant time and reject a `t` older than 300 seconds. */
63452
+ "Axivoy-Signature": string;
63453
+ /** @description Delivery id, the same on every retry of this delivery. */
63454
+ "Axivoy-Webhook-Id": string;
63455
+ /** @description The event `id`; dedupe on it. */
63456
+ "Axivoy-Event-Id": string;
63457
+ /** @description The event key, for example `load.created`. */
63458
+ "Axivoy-Event-Type": string;
63459
+ /** @description `true` on test sends from Settings, which also carry `"test": true` in the body. */
63460
+ "Axivoy-Test"?: string;
63461
+ };
63462
+ path?: never;
63463
+ cookie?: never;
63464
+ };
63465
+ requestBody: {
63466
+ content: {
63467
+ /**
63468
+ * @example {
63469
+ * "id": "0192f3a4-5b6c-7d8e-9f01-23456789abcd",
63470
+ * "type": "bank_connection.link_requested",
63471
+ * "version": 1,
63472
+ * "occurred_at": "2026-10-01T15:04:05Z",
63473
+ * "effective_at": "2026-10-01T15:04:05Z",
63474
+ * "tenant": 1,
63475
+ * "subject": {
63476
+ * "type": "bank_link_request",
63477
+ * "id": 1
63478
+ * },
63479
+ * "sequence": 1,
63480
+ * "facts": {
63481
+ * "requested_by_kind": "agent",
63482
+ * "recipient_count": 1,
63483
+ * "has_note": true
63484
+ * },
63485
+ * "causation": {
63486
+ * "invocation_id": null,
63487
+ * "event_id": null,
63488
+ * "subscription_id": null
63489
+ * },
63490
+ * "chain_depth": 0,
63491
+ * "fetch": null
63492
+ * }
63493
+ */
63494
+ "application/json": {
63495
+ /** @description Event id; the same on every delivery of this event. */
63496
+ id: string;
63497
+ /** @constant */
63498
+ type: "bank_connection.link_requested";
63499
+ /** @constant */
63500
+ version: 1;
63501
+ /** Format: date-time */
63502
+ occurred_at: string;
63503
+ /**
63504
+ * Format: date-time
63505
+ * @description When it counts operationally; differs from `occurred_at` for back-dated facts.
63506
+ */
63507
+ effective_at: string;
63508
+ /** @description Workspace id. */
63509
+ tenant: number;
63510
+ subject: {
63511
+ type: string;
63512
+ id: number | string;
63513
+ };
63514
+ /** @description Increases per subject; apply events for one subject in this order. */
63515
+ sequence: number;
63516
+ facts: {
63517
+ requested_by_kind: string;
63518
+ recipient_count: number;
63519
+ has_note: boolean;
63520
+ };
63521
+ causation: {
63522
+ invocation_id?: string | null;
63523
+ event_id?: string | null;
63524
+ subscription_id?: number | null;
63525
+ };
63526
+ chain_depth: number;
63527
+ fetch: {
63528
+ operation?: string;
63529
+ input?: Record<string, never>;
63530
+ } | null;
63531
+ /** @description Present and `true` only on test sends. */
63532
+ test?: boolean;
63533
+ };
63534
+ };
63535
+ };
63536
+ responses: {
63537
+ /** @description Received. Any other answer, a redirect or no answer within 10 seconds fails the try. */
63538
+ "2XX": {
63539
+ headers: {
63540
+ [name: string]: unknown;
63541
+ };
63542
+ content?: never;
63543
+ };
63544
+ };
63545
+ };
62951
63546
  "events.compliance.item.expiring": {
62952
63547
  parameters: {
62953
63548
  query?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axivoy/api",
3
- "version": "1.7.0",
3
+ "version": "1.8.0",
4
4
  "description": "Typed client for the Axivoy API: operations, webhooks and errors.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://app.axivoy.ai/developers",