modern-treasury 2.7.2 → 2.9.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.
- package/CHANGELOG.md +57 -0
- package/README.md +5 -8
- package/_shims/auto/types.d.ts +3 -1
- package/_shims/index.d.ts +2 -0
- package/_shims/node-runtime.d.ts.map +1 -1
- package/_shims/node-runtime.js +3 -0
- package/_shims/node-runtime.js.map +1 -1
- package/_shims/node-runtime.mjs +2 -0
- package/_shims/node-runtime.mjs.map +1 -1
- package/_shims/node-types.d.ts +1 -1
- package/_shims/registry.d.ts +2 -0
- package/_shims/registry.d.ts.map +1 -1
- package/_shims/registry.js +3 -1
- package/_shims/registry.js.map +1 -1
- package/_shims/registry.mjs +2 -0
- package/_shims/registry.mjs.map +1 -1
- package/_shims/web-runtime.d.ts.map +1 -1
- package/_shims/web-runtime.js +8 -0
- package/_shims/web-runtime.js.map +1 -1
- package/_shims/web-runtime.mjs +8 -0
- package/_shims/web-runtime.mjs.map +1 -1
- package/_shims/web-types.d.ts +2 -1
- package/core.d.ts +1 -1
- package/core.d.ts.map +1 -1
- package/core.js +38 -23
- package/core.js.map +1 -1
- package/core.mjs +36 -21
- package/core.mjs.map +1 -1
- package/error.d.ts.map +1 -1
- package/error.js +14 -4
- package/error.js.map +1 -1
- package/error.mjs +14 -4
- package/error.mjs.map +1 -1
- package/index.d.mts +20 -14
- package/index.d.ts +20 -14
- package/index.d.ts.map +1 -1
- package/index.js +6 -6
- package/index.js.map +1 -1
- package/index.mjs +6 -6
- package/index.mjs.map +1 -1
- package/package.json +3 -2
- package/resources/account-collection-flows.d.ts +9 -11
- package/resources/account-collection-flows.d.ts.map +1 -1
- package/resources/account-collection-flows.js +25 -0
- package/resources/account-collection-flows.js.map +1 -1
- package/resources/account-collection-flows.mjs +2 -0
- package/resources/account-collection-flows.mjs.map +1 -1
- package/resources/account-details.d.ts +6 -8
- package/resources/account-details.d.ts.map +1 -1
- package/resources/account-details.js +25 -0
- package/resources/account-details.js.map +1 -1
- package/resources/account-details.mjs +2 -0
- package/resources/account-details.mjs.map +1 -1
- package/resources/connections.d.ts +5 -7
- package/resources/connections.d.ts.map +1 -1
- package/resources/connections.js +25 -0
- package/resources/connections.js.map +1 -1
- package/resources/connections.mjs +2 -0
- package/resources/connections.mjs.map +1 -1
- package/resources/counterparties.d.ts +22 -23
- package/resources/counterparties.d.ts.map +1 -1
- package/resources/counterparties.js +25 -0
- package/resources/counterparties.js.map +1 -1
- package/resources/counterparties.mjs +2 -0
- package/resources/counterparties.mjs.map +1 -1
- package/resources/documents.d.ts +9 -11
- package/resources/documents.d.ts.map +1 -1
- package/resources/documents.js +25 -0
- package/resources/documents.js.map +1 -1
- package/resources/documents.mjs +2 -0
- package/resources/documents.mjs.map +1 -1
- package/resources/events.d.ts +5 -7
- package/resources/events.d.ts.map +1 -1
- package/resources/events.js +25 -0
- package/resources/events.js.map +1 -1
- package/resources/events.mjs +2 -0
- package/resources/events.mjs.map +1 -1
- package/resources/expected-payments.d.ts +26 -16
- package/resources/expected-payments.d.ts.map +1 -1
- package/resources/expected-payments.js +25 -0
- package/resources/expected-payments.js.map +1 -1
- package/resources/expected-payments.mjs +2 -0
- package/resources/expected-payments.mjs.map +1 -1
- package/resources/external-accounts.d.ts +18 -20
- package/resources/external-accounts.d.ts.map +1 -1
- package/resources/external-accounts.js +25 -0
- package/resources/external-accounts.js.map +1 -1
- package/resources/external-accounts.mjs +2 -0
- package/resources/external-accounts.mjs.map +1 -1
- package/resources/incoming-payment-details.d.ts +12 -14
- package/resources/incoming-payment-details.d.ts.map +1 -1
- package/resources/incoming-payment-details.js +25 -0
- package/resources/incoming-payment-details.js.map +1 -1
- package/resources/incoming-payment-details.mjs +2 -0
- package/resources/incoming-payment-details.mjs.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +2 -2
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/internal-accounts/balance-reports.d.ts +5 -7
- package/resources/internal-accounts/balance-reports.d.ts.map +1 -1
- package/resources/internal-accounts/balance-reports.js +25 -0
- package/resources/internal-accounts/balance-reports.js.map +1 -1
- package/resources/internal-accounts/balance-reports.mjs +2 -0
- package/resources/internal-accounts/balance-reports.mjs.map +1 -1
- package/resources/internal-accounts/internal-accounts.d.ts +25 -23
- package/resources/internal-accounts/internal-accounts.d.ts.map +1 -1
- package/resources/internal-accounts/internal-accounts.js +6 -5
- package/resources/internal-accounts/internal-accounts.js.map +1 -1
- package/resources/internal-accounts/internal-accounts.mjs +6 -5
- package/resources/internal-accounts/internal-accounts.mjs.map +1 -1
- package/resources/invoices/invoices.d.ts +39 -26
- package/resources/invoices/invoices.d.ts.map +1 -1
- package/resources/invoices/invoices.js +6 -5
- package/resources/invoices/invoices.js.map +1 -1
- package/resources/invoices/invoices.mjs +6 -5
- package/resources/invoices/invoices.mjs.map +1 -1
- package/resources/invoices/line-items.d.ts +7 -9
- package/resources/invoices/line-items.d.ts.map +1 -1
- package/resources/invoices/line-items.js +25 -0
- package/resources/invoices/line-items.js.map +1 -1
- package/resources/invoices/line-items.mjs +2 -0
- package/resources/invoices/line-items.mjs.map +1 -1
- package/resources/ledger-account-balance-monitors.d.ts +7 -9
- package/resources/ledger-account-balance-monitors.d.ts.map +1 -1
- package/resources/ledger-account-balance-monitors.js +25 -0
- package/resources/ledger-account-balance-monitors.js.map +1 -1
- package/resources/ledger-account-balance-monitors.mjs +2 -0
- package/resources/ledger-account-balance-monitors.mjs.map +1 -1
- package/resources/ledger-account-categories.d.ts +11 -12
- package/resources/ledger-account-categories.d.ts.map +1 -1
- package/resources/ledger-account-categories.js +25 -0
- package/resources/ledger-account-categories.js.map +1 -1
- package/resources/ledger-account-categories.mjs +2 -0
- package/resources/ledger-account-categories.mjs.map +1 -1
- package/resources/ledger-account-payouts.d.ts +17 -9
- package/resources/ledger-account-payouts.d.ts.map +1 -1
- package/resources/ledger-account-payouts.js +25 -0
- package/resources/ledger-account-payouts.js.map +1 -1
- package/resources/ledger-account-payouts.mjs +2 -0
- package/resources/ledger-account-payouts.mjs.map +1 -1
- package/resources/ledger-account-statements.d.ts +7 -6
- package/resources/ledger-account-statements.d.ts.map +1 -1
- package/resources/ledger-account-statements.js.map +1 -1
- package/resources/ledger-account-statements.mjs.map +1 -1
- package/resources/ledger-accounts.d.ts +11 -12
- package/resources/ledger-accounts.d.ts.map +1 -1
- package/resources/ledger-accounts.js +25 -0
- package/resources/ledger-accounts.js.map +1 -1
- package/resources/ledger-accounts.mjs +2 -0
- package/resources/ledger-accounts.mjs.map +1 -1
- package/resources/ledger-entries.d.ts +9 -10
- package/resources/ledger-entries.d.ts.map +1 -1
- package/resources/ledger-entries.js +25 -0
- package/resources/ledger-entries.js.map +1 -1
- package/resources/ledger-entries.mjs +2 -0
- package/resources/ledger-entries.mjs.map +1 -1
- package/resources/ledger-event-handlers.d.ts +47 -270
- package/resources/ledger-event-handlers.d.ts.map +1 -1
- package/resources/ledger-event-handlers.js +29 -7
- package/resources/ledger-event-handlers.js.map +1 -1
- package/resources/ledger-event-handlers.mjs +4 -5
- package/resources/ledger-event-handlers.mjs.map +1 -1
- package/resources/ledger-transactions/ledger-transactions.d.ts +19 -20
- package/resources/ledger-transactions/ledger-transactions.d.ts.map +1 -1
- package/resources/ledger-transactions/ledger-transactions.js +6 -5
- package/resources/ledger-transactions/ledger-transactions.js.map +1 -1
- package/resources/ledger-transactions/ledger-transactions.mjs +6 -5
- package/resources/ledger-transactions/ledger-transactions.mjs.map +1 -1
- package/resources/ledger-transactions/versions.d.ts +7 -8
- package/resources/ledger-transactions/versions.d.ts.map +1 -1
- package/resources/ledger-transactions/versions.js +25 -0
- package/resources/ledger-transactions/versions.js.map +1 -1
- package/resources/ledger-transactions/versions.mjs +2 -0
- package/resources/ledger-transactions/versions.mjs.map +1 -1
- package/resources/ledgerable-events.d.ts +4 -41
- package/resources/ledgerable-events.d.ts.map +1 -1
- package/resources/ledgerable-events.js +1 -2
- package/resources/ledgerable-events.js.map +1 -1
- package/resources/ledgerable-events.mjs +1 -2
- package/resources/ledgerable-events.mjs.map +1 -1
- package/resources/ledgers.d.ts +7 -9
- package/resources/ledgers.d.ts.map +1 -1
- package/resources/ledgers.js +25 -0
- package/resources/ledgers.js.map +1 -1
- package/resources/ledgers.mjs +2 -0
- package/resources/ledgers.mjs.map +1 -1
- package/resources/line-items.d.ts +6 -8
- package/resources/line-items.d.ts.map +1 -1
- package/resources/line-items.js +25 -0
- package/resources/line-items.js.map +1 -1
- package/resources/line-items.mjs +2 -0
- package/resources/line-items.mjs.map +1 -1
- package/resources/paper-items.d.ts +5 -7
- package/resources/paper-items.d.ts.map +1 -1
- package/resources/paper-items.js +25 -0
- package/resources/paper-items.js.map +1 -1
- package/resources/paper-items.mjs +2 -0
- package/resources/paper-items.mjs.map +1 -1
- package/resources/payment-flows.d.ts +7 -9
- package/resources/payment-flows.d.ts.map +1 -1
- package/resources/payment-flows.js +25 -0
- package/resources/payment-flows.js.map +1 -1
- package/resources/payment-flows.mjs +2 -0
- package/resources/payment-flows.mjs.map +1 -1
- package/resources/payment-orders/payment-orders.d.ts +75 -50
- package/resources/payment-orders/payment-orders.d.ts.map +1 -1
- package/resources/payment-orders/payment-orders.js +6 -5
- package/resources/payment-orders/payment-orders.js.map +1 -1
- package/resources/payment-orders/payment-orders.mjs +6 -5
- package/resources/payment-orders/payment-orders.mjs.map +1 -1
- package/resources/payment-orders/reversals.d.ts +8 -9
- package/resources/payment-orders/reversals.d.ts.map +1 -1
- package/resources/payment-orders/reversals.js +25 -0
- package/resources/payment-orders/reversals.js.map +1 -1
- package/resources/payment-orders/reversals.mjs +2 -0
- package/resources/payment-orders/reversals.mjs.map +1 -1
- package/resources/payment-references.d.ts +5 -7
- package/resources/payment-references.d.ts.map +1 -1
- package/resources/payment-references.js +25 -0
- package/resources/payment-references.js.map +1 -1
- package/resources/payment-references.mjs +2 -0
- package/resources/payment-references.mjs.map +1 -1
- package/resources/returns.d.ts +11 -13
- package/resources/returns.d.ts.map +1 -1
- package/resources/returns.js +25 -0
- package/resources/returns.js.map +1 -1
- package/resources/returns.mjs +2 -0
- package/resources/returns.mjs.map +1 -1
- package/resources/routing-details.d.ts +16 -14
- package/resources/routing-details.d.ts.map +1 -1
- package/resources/routing-details.js +25 -0
- package/resources/routing-details.js.map +1 -1
- package/resources/routing-details.mjs +2 -0
- package/resources/routing-details.mjs.map +1 -1
- package/resources/shared.d.ts +1 -0
- package/resources/shared.d.ts.map +1 -1
- package/resources/top-level.d.ts +2 -2
- package/resources/top-level.d.ts.map +1 -1
- package/resources/transactions/line-items.d.ts +10 -7
- package/resources/transactions/line-items.d.ts.map +1 -1
- package/resources/transactions/line-items.js +25 -0
- package/resources/transactions/line-items.js.map +1 -1
- package/resources/transactions/line-items.mjs +2 -0
- package/resources/transactions/line-items.mjs.map +1 -1
- package/resources/transactions/transactions.d.ts +28 -30
- package/resources/transactions/transactions.d.ts.map +1 -1
- package/resources/transactions/transactions.js +6 -5
- package/resources/transactions/transactions.js.map +1 -1
- package/resources/transactions/transactions.mjs +6 -5
- package/resources/transactions/transactions.mjs.map +1 -1
- package/resources/validations.d.ts +14 -14
- package/resources/validations.d.ts.map +1 -1
- package/resources/validations.js.map +1 -1
- package/resources/validations.mjs.map +1 -1
- package/resources/virtual-accounts.d.ts +16 -16
- package/resources/virtual-accounts.d.ts.map +1 -1
- package/resources/virtual-accounts.js +25 -0
- package/resources/virtual-accounts.js.map +1 -1
- package/resources/virtual-accounts.mjs +2 -0
- package/resources/virtual-accounts.mjs.map +1 -1
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js +2 -2
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +3 -3
- package/resources/webhooks.mjs.map +1 -1
- package/shims/node.d.ts +1 -1
- package/shims/node.d.ts.map +1 -1
- package/shims/web.d.ts +1 -1
- package/shims/web.d.ts.map +1 -1
- package/src/_shims/auto/types.d.ts +3 -1
- package/src/_shims/index.d.ts +3 -1
- package/src/_shims/index.mjs +1 -1
- package/src/_shims/node-runtime.ts +4 -0
- package/src/_shims/node-types.d.ts +1 -1
- package/src/_shims/registry.ts +3 -0
- package/src/_shims/web-runtime.ts +12 -0
- package/src/_shims/web-types.d.ts +2 -1
- package/src/core.ts +39 -21
- package/src/error.ts +15 -5
- package/src/index.ts +23 -17
- package/src/resources/account-collection-flows.ts +12 -12
- package/src/resources/account-details.ts +10 -12
- package/src/resources/connections.ts +8 -10
- package/src/resources/counterparties.ts +32 -26
- package/src/resources/documents.ts +13 -12
- package/src/resources/events.ts +8 -10
- package/src/resources/expected-payments.ts +37 -18
- package/src/resources/external-accounts.ts +30 -24
- package/src/resources/incoming-payment-details.ts +17 -17
- package/src/resources/index.ts +3 -5
- package/src/resources/internal-accounts/balance-reports.ts +9 -11
- package/src/resources/internal-accounts/internal-accounts.ts +32 -27
- package/src/resources/invoices/invoices.ts +56 -35
- package/src/resources/invoices/line-items.ts +10 -12
- package/src/resources/ledger-account-balance-monitors.ts +10 -12
- package/src/resources/ledger-account-categories.ts +14 -15
- package/src/resources/ledger-account-payouts.ts +23 -12
- package/src/resources/ledger-account-statements.ts +9 -8
- package/src/resources/ledger-accounts.ts +14 -15
- package/src/resources/ledger-entries.ts +12 -13
- package/src/resources/ledger-event-handlers.ts +53 -336
- package/src/resources/ledger-transactions/ledger-transactions.ts +22 -24
- package/src/resources/ledger-transactions/versions.ts +10 -11
- package/src/resources/ledgerable-events.ts +6 -51
- package/src/resources/ledgers.ts +10 -12
- package/src/resources/line-items.ts +9 -11
- package/src/resources/paper-items.ts +9 -11
- package/src/resources/payment-flows.ts +10 -12
- package/src/resources/payment-orders/payment-orders.ts +110 -56
- package/src/resources/payment-orders/reversals.ts +11 -12
- package/src/resources/payment-references.ts +8 -10
- package/src/resources/returns.ts +16 -18
- package/src/resources/routing-details.ts +26 -14
- package/src/resources/shared.ts +2 -0
- package/src/resources/top-level.ts +2 -2
- package/src/resources/transactions/line-items.ts +14 -10
- package/src/resources/transactions/transactions.ts +35 -35
- package/src/resources/validations.ts +19 -13
- package/src/resources/virtual-accounts.ts +22 -17
- package/src/resources/webhooks.ts +6 -5
- package/src/shims/node.ts +1 -1
- package/src/shims/web.ts +1 -1
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1,201 +1,42 @@
|
|
|
1
1
|
import * as Core from 'modern-treasury/core';
|
|
2
2
|
import { APIResource } from 'modern-treasury/resource';
|
|
3
|
-
import * as
|
|
4
|
-
import { Page, PageParams } from 'modern-treasury/pagination';
|
|
3
|
+
import * as LedgerEventHandlersAPI from 'modern-treasury/resources/ledger-event-handlers';
|
|
4
|
+
import { Page, type PageParams } from 'modern-treasury/pagination';
|
|
5
5
|
export declare class LedgerEventHandlers extends APIResource {
|
|
6
6
|
/**
|
|
7
7
|
* create ledger_event_handler
|
|
8
8
|
*/
|
|
9
|
-
create(params: LedgerEventHandlerCreateParams, options?: Core.RequestOptions): Core.APIPromise<
|
|
9
|
+
create(params: LedgerEventHandlerCreateParams, options?: Core.RequestOptions): Core.APIPromise<LedgerEventHandler>;
|
|
10
10
|
/**
|
|
11
11
|
* Get details on a single ledger event handler.
|
|
12
12
|
*/
|
|
13
|
-
retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise<
|
|
13
|
+
retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise<LedgerEventHandler>;
|
|
14
14
|
/**
|
|
15
15
|
* Get a list of ledger event handlers.
|
|
16
16
|
*/
|
|
17
|
-
list(query?: LedgerEventHandlerListParams, options?: Core.RequestOptions): Core.PagePromise<
|
|
18
|
-
list(options?: Core.RequestOptions): Core.PagePromise<
|
|
17
|
+
list(query?: LedgerEventHandlerListParams, options?: Core.RequestOptions): Core.PagePromise<LedgerEventHandlersPage, LedgerEventHandler>;
|
|
18
|
+
list(options?: Core.RequestOptions): Core.PagePromise<LedgerEventHandlersPage, LedgerEventHandler>;
|
|
19
19
|
/**
|
|
20
20
|
* Archive a ledger event handler.
|
|
21
21
|
*/
|
|
22
|
-
del(id: string, options?: Core.RequestOptions): Core.APIPromise<
|
|
22
|
+
del(id: string, options?: Core.RequestOptions): Core.APIPromise<LedgerEventHandler>;
|
|
23
23
|
}
|
|
24
|
-
export declare class
|
|
24
|
+
export declare class LedgerEventHandlersPage extends Page<LedgerEventHandler> {
|
|
25
25
|
}
|
|
26
|
-
|
|
27
|
-
export interface LedgerEventHandlerCreateResponse {
|
|
26
|
+
export interface LedgerEventHandler {
|
|
28
27
|
id: string;
|
|
29
|
-
conditions:
|
|
28
|
+
conditions: LedgerEventHandler.Conditions | null;
|
|
30
29
|
created_at: string;
|
|
31
30
|
/**
|
|
32
31
|
* An optional description.
|
|
33
32
|
*/
|
|
34
33
|
description: string | null;
|
|
35
34
|
discarded_at: string | null;
|
|
36
|
-
ledger_transaction_template: LedgerEventHandlerCreateResponse.LedgerTransactionTemplate;
|
|
37
35
|
/**
|
|
38
|
-
*
|
|
39
|
-
* if it exists in the test environment.
|
|
40
|
-
*/
|
|
41
|
-
live_mode: boolean;
|
|
42
|
-
/**
|
|
43
|
-
* Additional data represented as key-value pairs. Both the key and value must be
|
|
44
|
-
* strings.
|
|
45
|
-
*/
|
|
46
|
-
metadata: Record<string, string> | null;
|
|
47
|
-
/**
|
|
48
|
-
* Name of the ledger event handler.
|
|
49
|
-
*/
|
|
50
|
-
name: string;
|
|
51
|
-
object: string;
|
|
52
|
-
updated_at: string;
|
|
53
|
-
}
|
|
54
|
-
export declare namespace LedgerEventHandlerCreateResponse {
|
|
55
|
-
interface Conditions {
|
|
56
|
-
/**
|
|
57
|
-
* The field you're fetching from the `ledgerable_event`.
|
|
58
|
-
*/
|
|
59
|
-
field: string;
|
|
60
|
-
/**
|
|
61
|
-
* What the operator between the `field` and `value` is. Currently only supports
|
|
62
|
-
* `equals`.
|
|
63
|
-
*/
|
|
64
|
-
operator: string;
|
|
65
|
-
/**
|
|
66
|
-
* What raw string you are comparing the `field` against.
|
|
67
|
-
*/
|
|
68
|
-
value: string;
|
|
69
|
-
}
|
|
70
|
-
interface LedgerTransactionTemplate {
|
|
71
|
-
/**
|
|
72
|
-
* An optional description for internal use.
|
|
73
|
-
*/
|
|
74
|
-
description: string | null;
|
|
75
|
-
/**
|
|
76
|
-
* The timestamp (ISO8601 format) at which the ledger transaction happened for
|
|
77
|
-
* reporting purposes.
|
|
78
|
-
*/
|
|
79
|
-
effective_at: string | null;
|
|
80
|
-
/**
|
|
81
|
-
* An array of ledger entry objects.
|
|
82
|
-
*/
|
|
83
|
-
ledger_entries: Array<LedgerTransactionTemplate.LedgerEntry>;
|
|
84
|
-
/**
|
|
85
|
-
* Additional data represented as key-value pairs. Both the key and value must be
|
|
86
|
-
* strings.
|
|
87
|
-
*/
|
|
88
|
-
metadata: Record<string, string> | null;
|
|
89
|
-
}
|
|
90
|
-
namespace LedgerTransactionTemplate {
|
|
91
|
-
interface LedgerEntry {
|
|
92
|
-
/**
|
|
93
|
-
* The field you're fetching from the `ledgerable_event`.
|
|
94
|
-
*/
|
|
95
|
-
amount: string;
|
|
96
|
-
/**
|
|
97
|
-
* What the operator between the `field` and `value` is. Currently only supports
|
|
98
|
-
* `equals`.
|
|
99
|
-
*/
|
|
100
|
-
direction: string;
|
|
101
|
-
/**
|
|
102
|
-
* What raw string you are comparing the `field` against.
|
|
103
|
-
*/
|
|
104
|
-
ledger_account_id: string;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
export interface LedgerEventHandlerRetrieveResponse {
|
|
109
|
-
id: string;
|
|
110
|
-
conditions: LedgerEventHandlerRetrieveResponse.Conditions | null;
|
|
111
|
-
created_at: string;
|
|
112
|
-
/**
|
|
113
|
-
* An optional description.
|
|
114
|
-
*/
|
|
115
|
-
description: string | null;
|
|
116
|
-
discarded_at: string | null;
|
|
117
|
-
ledger_transaction_template: LedgerEventHandlerRetrieveResponse.LedgerTransactionTemplate;
|
|
118
|
-
/**
|
|
119
|
-
* This field will be true if this object exists in the live environment or false
|
|
120
|
-
* if it exists in the test environment.
|
|
121
|
-
*/
|
|
122
|
-
live_mode: boolean;
|
|
123
|
-
/**
|
|
124
|
-
* Additional data represented as key-value pairs. Both the key and value must be
|
|
125
|
-
* strings.
|
|
126
|
-
*/
|
|
127
|
-
metadata: Record<string, string> | null;
|
|
128
|
-
/**
|
|
129
|
-
* Name of the ledger event handler.
|
|
130
|
-
*/
|
|
131
|
-
name: string;
|
|
132
|
-
object: string;
|
|
133
|
-
updated_at: string;
|
|
134
|
-
}
|
|
135
|
-
export declare namespace LedgerEventHandlerRetrieveResponse {
|
|
136
|
-
interface Conditions {
|
|
137
|
-
/**
|
|
138
|
-
* The field you're fetching from the `ledgerable_event`.
|
|
139
|
-
*/
|
|
140
|
-
field: string;
|
|
141
|
-
/**
|
|
142
|
-
* What the operator between the `field` and `value` is. Currently only supports
|
|
143
|
-
* `equals`.
|
|
144
|
-
*/
|
|
145
|
-
operator: string;
|
|
146
|
-
/**
|
|
147
|
-
* What raw string you are comparing the `field` against.
|
|
148
|
-
*/
|
|
149
|
-
value: string;
|
|
150
|
-
}
|
|
151
|
-
interface LedgerTransactionTemplate {
|
|
152
|
-
/**
|
|
153
|
-
* An optional description for internal use.
|
|
154
|
-
*/
|
|
155
|
-
description: string | null;
|
|
156
|
-
/**
|
|
157
|
-
* The timestamp (ISO8601 format) at which the ledger transaction happened for
|
|
158
|
-
* reporting purposes.
|
|
159
|
-
*/
|
|
160
|
-
effective_at: string | null;
|
|
161
|
-
/**
|
|
162
|
-
* An array of ledger entry objects.
|
|
163
|
-
*/
|
|
164
|
-
ledger_entries: Array<LedgerTransactionTemplate.LedgerEntry>;
|
|
165
|
-
/**
|
|
166
|
-
* Additional data represented as key-value pairs. Both the key and value must be
|
|
167
|
-
* strings.
|
|
168
|
-
*/
|
|
169
|
-
metadata: Record<string, string> | null;
|
|
170
|
-
}
|
|
171
|
-
namespace LedgerTransactionTemplate {
|
|
172
|
-
interface LedgerEntry {
|
|
173
|
-
/**
|
|
174
|
-
* The field you're fetching from the `ledgerable_event`.
|
|
175
|
-
*/
|
|
176
|
-
amount: string;
|
|
177
|
-
/**
|
|
178
|
-
* What the operator between the `field` and `value` is. Currently only supports
|
|
179
|
-
* `equals`.
|
|
180
|
-
*/
|
|
181
|
-
direction: string;
|
|
182
|
-
/**
|
|
183
|
-
* What raw string you are comparing the `field` against.
|
|
184
|
-
*/
|
|
185
|
-
ledger_account_id: string;
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
export interface LedgerEventHandlerListResponse {
|
|
190
|
-
id: string;
|
|
191
|
-
conditions: LedgerEventHandlerListResponse.Conditions | null;
|
|
192
|
-
created_at: string;
|
|
193
|
-
/**
|
|
194
|
-
* An optional description.
|
|
36
|
+
* The id of the ledger that this event handler belongs to.
|
|
195
37
|
*/
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
ledger_transaction_template: LedgerEventHandlerListResponse.LedgerTransactionTemplate;
|
|
38
|
+
ledger_id: string | null;
|
|
39
|
+
ledger_transaction_template: LedgerEventHandler.LedgerTransactionTemplate;
|
|
199
40
|
/**
|
|
200
41
|
* This field will be true if this object exists in the live environment or false
|
|
201
42
|
* if it exists in the test environment.
|
|
@@ -212,20 +53,20 @@ export interface LedgerEventHandlerListResponse {
|
|
|
212
53
|
name: string;
|
|
213
54
|
object: string;
|
|
214
55
|
updated_at: string;
|
|
56
|
+
variables: Record<string, LedgerEventHandlerVariable> | null;
|
|
215
57
|
}
|
|
216
|
-
export declare namespace
|
|
58
|
+
export declare namespace LedgerEventHandler {
|
|
217
59
|
interface Conditions {
|
|
218
60
|
/**
|
|
219
|
-
* The
|
|
61
|
+
* The LHS of the conditional.
|
|
220
62
|
*/
|
|
221
63
|
field: string;
|
|
222
64
|
/**
|
|
223
|
-
* What the operator between the `field` and `value` is.
|
|
224
|
-
* `equals`.
|
|
65
|
+
* What the operator between the `field` and `value` is.
|
|
225
66
|
*/
|
|
226
67
|
operator: string;
|
|
227
68
|
/**
|
|
228
|
-
*
|
|
69
|
+
* The RHS of the conditional.
|
|
229
70
|
*/
|
|
230
71
|
value: string;
|
|
231
72
|
}
|
|
@@ -244,109 +85,50 @@ export declare namespace LedgerEventHandlerListResponse {
|
|
|
244
85
|
*/
|
|
245
86
|
ledger_entries: Array<LedgerTransactionTemplate.LedgerEntry>;
|
|
246
87
|
/**
|
|
247
|
-
*
|
|
248
|
-
* strings.
|
|
88
|
+
* To post a ledger transaction at creation, use `posted`.
|
|
249
89
|
*/
|
|
250
|
-
|
|
90
|
+
status: string | null;
|
|
251
91
|
}
|
|
252
92
|
namespace LedgerTransactionTemplate {
|
|
253
93
|
interface LedgerEntry {
|
|
254
94
|
/**
|
|
255
|
-
* The
|
|
95
|
+
* The LHS of the conditional.
|
|
256
96
|
*/
|
|
257
97
|
amount: string;
|
|
258
98
|
/**
|
|
259
|
-
* What the operator between the `field` and `value` is.
|
|
260
|
-
* `equals`.
|
|
99
|
+
* What the operator between the `field` and `value` is.
|
|
261
100
|
*/
|
|
262
101
|
direction: string;
|
|
263
102
|
/**
|
|
264
|
-
*
|
|
103
|
+
* The RHS of the conditional.
|
|
265
104
|
*/
|
|
266
105
|
ledger_account_id: string;
|
|
267
106
|
}
|
|
268
107
|
}
|
|
269
108
|
}
|
|
270
|
-
export interface
|
|
271
|
-
|
|
272
|
-
conditions: LedgerEventHandlerDeleteResponse.Conditions | null;
|
|
273
|
-
created_at: string;
|
|
109
|
+
export interface LedgerEventHandlerVariable {
|
|
110
|
+
query: LedgerEventHandlerVariable.Query;
|
|
274
111
|
/**
|
|
275
|
-
*
|
|
112
|
+
* The type of object this variable is. Currently, only "ledger_account" is
|
|
113
|
+
* supported.
|
|
276
114
|
*/
|
|
277
|
-
|
|
278
|
-
discarded_at: string | null;
|
|
279
|
-
ledger_transaction_template: LedgerEventHandlerDeleteResponse.LedgerTransactionTemplate;
|
|
280
|
-
/**
|
|
281
|
-
* This field will be true if this object exists in the live environment or false
|
|
282
|
-
* if it exists in the test environment.
|
|
283
|
-
*/
|
|
284
|
-
live_mode: boolean;
|
|
285
|
-
/**
|
|
286
|
-
* Additional data represented as key-value pairs. Both the key and value must be
|
|
287
|
-
* strings.
|
|
288
|
-
*/
|
|
289
|
-
metadata: Record<string, string> | null;
|
|
290
|
-
/**
|
|
291
|
-
* Name of the ledger event handler.
|
|
292
|
-
*/
|
|
293
|
-
name: string;
|
|
294
|
-
object: string;
|
|
295
|
-
updated_at: string;
|
|
115
|
+
type: string;
|
|
296
116
|
}
|
|
297
|
-
export declare namespace
|
|
298
|
-
interface
|
|
117
|
+
export declare namespace LedgerEventHandlerVariable {
|
|
118
|
+
interface Query {
|
|
299
119
|
/**
|
|
300
|
-
* The
|
|
120
|
+
* The LHS of the conditional.
|
|
301
121
|
*/
|
|
302
122
|
field: string;
|
|
303
123
|
/**
|
|
304
|
-
* What the operator between the `field` and `value` is.
|
|
305
|
-
* `equals`.
|
|
124
|
+
* What the operator between the `field` and `value` is.
|
|
306
125
|
*/
|
|
307
126
|
operator: string;
|
|
308
127
|
/**
|
|
309
|
-
*
|
|
128
|
+
* The RHS of the conditional.
|
|
310
129
|
*/
|
|
311
130
|
value: string;
|
|
312
131
|
}
|
|
313
|
-
interface LedgerTransactionTemplate {
|
|
314
|
-
/**
|
|
315
|
-
* An optional description for internal use.
|
|
316
|
-
*/
|
|
317
|
-
description: string | null;
|
|
318
|
-
/**
|
|
319
|
-
* The timestamp (ISO8601 format) at which the ledger transaction happened for
|
|
320
|
-
* reporting purposes.
|
|
321
|
-
*/
|
|
322
|
-
effective_at: string | null;
|
|
323
|
-
/**
|
|
324
|
-
* An array of ledger entry objects.
|
|
325
|
-
*/
|
|
326
|
-
ledger_entries: Array<LedgerTransactionTemplate.LedgerEntry>;
|
|
327
|
-
/**
|
|
328
|
-
* Additional data represented as key-value pairs. Both the key and value must be
|
|
329
|
-
* strings.
|
|
330
|
-
*/
|
|
331
|
-
metadata: Record<string, string> | null;
|
|
332
|
-
}
|
|
333
|
-
namespace LedgerTransactionTemplate {
|
|
334
|
-
interface LedgerEntry {
|
|
335
|
-
/**
|
|
336
|
-
* The field you're fetching from the `ledgerable_event`.
|
|
337
|
-
*/
|
|
338
|
-
amount: string;
|
|
339
|
-
/**
|
|
340
|
-
* What the operator between the `field` and `value` is. Currently only supports
|
|
341
|
-
* `equals`.
|
|
342
|
-
*/
|
|
343
|
-
direction: string;
|
|
344
|
-
/**
|
|
345
|
-
* What raw string you are comparing the `field` against.
|
|
346
|
-
*/
|
|
347
|
-
ledger_account_id: string;
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
132
|
}
|
|
351
133
|
export interface LedgerEventHandlerCreateParams {
|
|
352
134
|
ledger_transaction_template: LedgerEventHandlerCreateParams.LedgerTransactionTemplate;
|
|
@@ -368,6 +150,7 @@ export interface LedgerEventHandlerCreateParams {
|
|
|
368
150
|
* strings.
|
|
369
151
|
*/
|
|
370
152
|
metadata?: Record<string, string> | null;
|
|
153
|
+
variables?: Record<string, LedgerEventHandlerVariable> | null;
|
|
371
154
|
}
|
|
372
155
|
export declare namespace LedgerEventHandlerCreateParams {
|
|
373
156
|
interface LedgerTransactionTemplate {
|
|
@@ -385,40 +168,37 @@ export declare namespace LedgerEventHandlerCreateParams {
|
|
|
385
168
|
*/
|
|
386
169
|
ledger_entries: Array<LedgerTransactionTemplate.LedgerEntry>;
|
|
387
170
|
/**
|
|
388
|
-
*
|
|
389
|
-
* strings.
|
|
171
|
+
* To post a ledger transaction at creation, use `posted`.
|
|
390
172
|
*/
|
|
391
|
-
|
|
173
|
+
status: string | null;
|
|
392
174
|
}
|
|
393
175
|
namespace LedgerTransactionTemplate {
|
|
394
176
|
interface LedgerEntry {
|
|
395
177
|
/**
|
|
396
|
-
* The
|
|
178
|
+
* The LHS of the conditional.
|
|
397
179
|
*/
|
|
398
180
|
amount: string;
|
|
399
181
|
/**
|
|
400
|
-
* What the operator between the `field` and `value` is.
|
|
401
|
-
* `equals`.
|
|
182
|
+
* What the operator between the `field` and `value` is.
|
|
402
183
|
*/
|
|
403
184
|
direction: string;
|
|
404
185
|
/**
|
|
405
|
-
*
|
|
186
|
+
* The RHS of the conditional.
|
|
406
187
|
*/
|
|
407
188
|
ledger_account_id: string;
|
|
408
189
|
}
|
|
409
190
|
}
|
|
410
191
|
interface Conditions {
|
|
411
192
|
/**
|
|
412
|
-
* The
|
|
193
|
+
* The LHS of the conditional.
|
|
413
194
|
*/
|
|
414
195
|
field: string;
|
|
415
196
|
/**
|
|
416
|
-
* What the operator between the `field` and `value` is.
|
|
417
|
-
* `equals`.
|
|
197
|
+
* What the operator between the `field` and `value` is.
|
|
418
198
|
*/
|
|
419
199
|
operator: string;
|
|
420
200
|
/**
|
|
421
|
-
*
|
|
201
|
+
* The RHS of the conditional.
|
|
422
202
|
*/
|
|
423
203
|
value: string;
|
|
424
204
|
}
|
|
@@ -439,13 +219,10 @@ export interface LedgerEventHandlerListParams extends PageParams {
|
|
|
439
219
|
name?: string;
|
|
440
220
|
}
|
|
441
221
|
export declare namespace LedgerEventHandlers {
|
|
442
|
-
export import
|
|
443
|
-
export import
|
|
444
|
-
export import
|
|
445
|
-
export import
|
|
446
|
-
|
|
447
|
-
export import LedgerEventHandlerCreateParams = API.LedgerEventHandlerCreateParams;
|
|
448
|
-
export import LedgerEventHandlerListParams = API.LedgerEventHandlerListParams;
|
|
222
|
+
export import LedgerEventHandler = LedgerEventHandlersAPI.LedgerEventHandler;
|
|
223
|
+
export import LedgerEventHandlerVariable = LedgerEventHandlersAPI.LedgerEventHandlerVariable;
|
|
224
|
+
export import LedgerEventHandlersPage = LedgerEventHandlersAPI.LedgerEventHandlersPage;
|
|
225
|
+
export import LedgerEventHandlerCreateParams = LedgerEventHandlersAPI.LedgerEventHandlerCreateParams;
|
|
226
|
+
export import LedgerEventHandlerListParams = LedgerEventHandlersAPI.LedgerEventHandlerListParams;
|
|
449
227
|
}
|
|
450
|
-
export {};
|
|
451
228
|
//# sourceMappingURL=ledger-event-handlers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ledger-event-handlers.d.ts","sourceRoot":"","sources":["../src/resources/ledger-event-handlers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"ledger-event-handlers.d.ts","sourceRoot":"","sources":["../src/resources/ledger-event-handlers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,OAAO,KAAK,sBAAsB,MAAM,iDAAiD,CAAC;AAC1F,OAAO,EAAE,IAAI,EAAE,KAAK,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAEnE,qBAAa,mBAAoB,SAAQ,WAAW;IAClD;;OAEG;IACH,MAAM,CACJ,MAAM,EAAE,8BAA8B,EACtC,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAAC;IAetC;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAAC;IAIxF;;OAEG;IACH,IAAI,CACF,KAAK,CAAC,EAAE,4BAA4B,EACpC,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,WAAW,CAAC,uBAAuB,EAAE,kBAAkB,CAAC;IAChE,IAAI,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,WAAW,CAAC,uBAAuB,EAAE,kBAAkB,CAAC;IAWlG;;OAEG;IACH,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,E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D;;WAEG;QACH,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;KACvB;IAED,UAAiB,yBAAyB,CAAC;QACzC,UAAiB,WAAW;YAC1B;;eAEG;YACH,MAAM,EAAE,MAAM,CAAC;YAEf;;eAEG;YACH,SAAS,EAAE,MAAM,CAAC;YAElB;;eAEG;YACH,iBAAiB,EAAE,MAAM,CAAC;SAC3B;KACF;IAED,UAAiB,UAAU;QACzB;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;QAEd;;WAEG;QACH,QAAQ,EAAE,MAAM,CAAC;QAEjB;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;KACf;CACF;AAED,MAAM,WAAW,4BAA6B,SAAQ,UAAU;IAC9D;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEpC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAElC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,yBAAiB,mBAAmB,CAAC;IACnC,MAAM,QAAQ,kBAAkB,GAAG,sBAAsB,CAAC,kBAAkB,CAAC;IAC7E,MAAM,QAAQ,0BAA0B,GAAG,sBAAsB,CAAC,0BAA0B,CAAC;IAC7F,MAAM,QAAQ,uBAAuB,GAAG,sBAAsB,CAAC,uBAAuB,CAAC;IACvF,MAAM,QAAQ,8BAA8B,GAAG,sBAAsB,CAAC,8BAA8B,CAAC;IACrG,MAAM,QAAQ,4BAA4B,GAAG,sBAAsB,CAAC,4BAA4B,CAAC;CAClG"}
|
|
@@ -1,9 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
20
|
+
if (mod && mod.__esModule) return mod;
|
|
21
|
+
var result = {};
|
|
22
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
23
|
+
__setModuleDefault(result, mod);
|
|
24
|
+
return result;
|
|
25
|
+
};
|
|
3
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
27
|
+
exports.LedgerEventHandlersPage = exports.LedgerEventHandlers = void 0;
|
|
5
28
|
const resource_1 = require("modern-treasury/resource");
|
|
6
29
|
const core_1 = require("modern-treasury/core");
|
|
30
|
+
const LedgerEventHandlersAPI = __importStar(require("modern-treasury/resources/ledger-event-handlers"));
|
|
7
31
|
const pagination_1 = require("modern-treasury/pagination");
|
|
8
32
|
class LedgerEventHandlers extends resource_1.APIResource {
|
|
9
33
|
/**
|
|
@@ -31,10 +55,7 @@ class LedgerEventHandlers extends resource_1.APIResource {
|
|
|
31
55
|
if ((0, core_1.isRequestOptions)(query)) {
|
|
32
56
|
return this.list({}, query);
|
|
33
57
|
}
|
|
34
|
-
return this.getAPIList('/api/ledger_event_handlers',
|
|
35
|
-
query,
|
|
36
|
-
...options,
|
|
37
|
-
});
|
|
58
|
+
return this.getAPIList('/api/ledger_event_handlers', LedgerEventHandlersPage, { query, ...options });
|
|
38
59
|
}
|
|
39
60
|
/**
|
|
40
61
|
* Archive a ledger event handler.
|
|
@@ -44,9 +65,10 @@ class LedgerEventHandlers extends resource_1.APIResource {
|
|
|
44
65
|
}
|
|
45
66
|
}
|
|
46
67
|
exports.LedgerEventHandlers = LedgerEventHandlers;
|
|
47
|
-
class
|
|
68
|
+
class LedgerEventHandlersPage extends pagination_1.Page {
|
|
48
69
|
}
|
|
49
|
-
exports.
|
|
70
|
+
exports.LedgerEventHandlersPage = LedgerEventHandlersPage;
|
|
50
71
|
(function (LedgerEventHandlers) {
|
|
72
|
+
LedgerEventHandlers.LedgerEventHandlersPage = LedgerEventHandlersAPI.LedgerEventHandlersPage;
|
|
51
73
|
})(LedgerEventHandlers = exports.LedgerEventHandlers || (exports.LedgerEventHandlers = {}));
|
|
52
74
|
//# sourceMappingURL=ledger-event-handlers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ledger-event-handlers.js","sourceRoot":"","sources":["../src/resources/ledger-event-handlers.ts"],"names":[],"mappings":";AAAA,qDAAqD
|
|
1
|
+
{"version":3,"file":"ledger-event-handlers.js","sourceRoot":"","sources":["../src/resources/ledger-event-handlers.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;;;;;;;;;;;;;;;;;;;;;;;;AAGrD,uDAAuD;AACvD,+CAAwD;AACxD,wGAA0F;AAC1F,2DAAmE;AAEnE,MAAa,mBAAoB,SAAQ,sBAAW;IAClD;;OAEG;IACH,MAAM,CACJ,MAAsC,EACtC,OAA6B;QAE7B,qGAAqG;QACrG,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC9D,IAAI,cAAc,EAAE;YAClB,OAAO,CAAC,IAAI,CACV,sGAAsG,CACvG,CAAC;SACH;QACD,OAAO,IAAI,CAAC,IAAI,CAAC,4BAA4B,EAAE;YAC7C,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SACpE,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,EAAU,EAAE,OAA6B;QAChD,OAAO,IAAI,CAAC,GAAG,CAAC,8BAA8B,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC;IAUD,IAAI,CACF,QAA4D,EAAE,EAC9D,OAA6B;QAE7B,IAAI,IAAA,uBAAgB,EAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;SAC7B;QACD,OAAO,IAAI,CAAC,UAAU,CAAC,4BAA4B,EAAE,uBAAuB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvG,CAAC;IAED;;OAEG;IACH,GAAG,CAAC,EAAU,EAAE,OAA6B;QAC3C,OAAO,IAAI,CAAC,MAAM,CAAC,8BAA8B,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAClE,CAAC;CACF;AArDD,kDAqDC;AAED,MAAa,uBAAwB,SAAQ,iBAAwB;CAAG;AAAxE,0DAAwE;AAqPxE,WAAiB,mBAAmB;IAGpB,2CAAuB,GAAG,sBAAsB,CAAC,uBAAuB,CAAC;AAGzF,CAAC,EANgB,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAMnC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
import { APIResource } from 'modern-treasury/resource';
|
|
3
3
|
import { isRequestOptions } from 'modern-treasury/core';
|
|
4
|
+
import * as LedgerEventHandlersAPI from 'modern-treasury/resources/ledger-event-handlers';
|
|
4
5
|
import { Page } from 'modern-treasury/pagination';
|
|
5
6
|
export class LedgerEventHandlers extends APIResource {
|
|
6
7
|
/**
|
|
@@ -28,10 +29,7 @@ export class LedgerEventHandlers extends APIResource {
|
|
|
28
29
|
if (isRequestOptions(query)) {
|
|
29
30
|
return this.list({}, query);
|
|
30
31
|
}
|
|
31
|
-
return this.getAPIList('/api/ledger_event_handlers',
|
|
32
|
-
query,
|
|
33
|
-
...options,
|
|
34
|
-
});
|
|
32
|
+
return this.getAPIList('/api/ledger_event_handlers', LedgerEventHandlersPage, { query, ...options });
|
|
35
33
|
}
|
|
36
34
|
/**
|
|
37
35
|
* Archive a ledger event handler.
|
|
@@ -40,8 +38,9 @@ export class LedgerEventHandlers extends APIResource {
|
|
|
40
38
|
return this.delete(`/api/ledger_event_handlers/${id}`, options);
|
|
41
39
|
}
|
|
42
40
|
}
|
|
43
|
-
export class
|
|
41
|
+
export class LedgerEventHandlersPage extends Page {
|
|
44
42
|
}
|
|
45
43
|
(function (LedgerEventHandlers) {
|
|
44
|
+
LedgerEventHandlers.LedgerEventHandlersPage = LedgerEventHandlersAPI.LedgerEventHandlersPage;
|
|
46
45
|
})(LedgerEventHandlers || (LedgerEventHandlers = {}));
|
|
47
46
|
//# sourceMappingURL=ledger-event-handlers.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ledger-event-handlers.mjs","sourceRoot":"","sources":["../src/resources/ledger-event-handlers.ts"],"names":[],"mappings":"AAAA,qDAAqD;OAG9C,EAAE,WAAW,EAAE,MAAM,0BAA0B;OAC/C,EAAE,gBAAgB,EAAE,MAAM,sBAAsB;
|
|
1
|
+
{"version":3,"file":"ledger-event-handlers.mjs","sourceRoot":"","sources":["../src/resources/ledger-event-handlers.ts"],"names":[],"mappings":"AAAA,qDAAqD;OAG9C,EAAE,WAAW,EAAE,MAAM,0BAA0B;OAC/C,EAAE,gBAAgB,EAAE,MAAM,sBAAsB;OAChD,KAAK,sBAAsB,MAAM,iDAAiD;OAClF,EAAE,IAAI,EAAmB,MAAM,4BAA4B;AAElE,MAAM,OAAO,mBAAoB,SAAQ,WAAW;IAClD;;OAEG;IACH,MAA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-treasury/resource';
|
|
3
|
-
import * as
|
|
4
|
-
import
|
|
5
|
-
import * as
|
|
6
|
-
import
|
|
3
|
+
import * as LedgerTransactionsAPI from 'modern-treasury/resources/ledger-transactions/ledger-transactions';
|
|
4
|
+
import * as LedgerEntriesAPI from 'modern-treasury/resources/ledger-entries';
|
|
5
|
+
import * as Shared from 'modern-treasury/resources/shared';
|
|
6
|
+
import * as VersionsAPI from 'modern-treasury/resources/ledger-transactions/versions';
|
|
7
|
+
import { Page, type PageParams } from 'modern-treasury/pagination';
|
|
7
8
|
export declare class LedgerTransactions extends APIResource {
|
|
8
|
-
versions: Versions;
|
|
9
|
+
versions: VersionsAPI.Versions;
|
|
9
10
|
/**
|
|
10
11
|
* Create a ledger transaction.
|
|
11
12
|
*/
|
|
@@ -32,7 +33,6 @@ export declare class LedgerTransactions extends APIResource {
|
|
|
32
33
|
}
|
|
33
34
|
export declare class LedgerTransactionsPage extends Page<LedgerTransaction> {
|
|
34
35
|
}
|
|
35
|
-
type _LedgerTransactionsPage = LedgerTransactionsPage;
|
|
36
36
|
export interface LedgerTransaction {
|
|
37
37
|
id: string;
|
|
38
38
|
created_at: string;
|
|
@@ -58,7 +58,7 @@ export interface LedgerTransaction {
|
|
|
58
58
|
/**
|
|
59
59
|
* An array of ledger entry objects.
|
|
60
60
|
*/
|
|
61
|
-
ledger_entries: Array<
|
|
61
|
+
ledger_entries: Array<LedgerEntriesAPI.LedgerEntry>;
|
|
62
62
|
/**
|
|
63
63
|
* The ID of the ledger this ledger transaction belongs to.
|
|
64
64
|
*/
|
|
@@ -158,7 +158,7 @@ export declare namespace LedgerTransactionCreateParams {
|
|
|
158
158
|
* `debit` pulls money from someone else's account to your own. Note that wire,
|
|
159
159
|
* rtp, and check payments will always be `credit`.
|
|
160
160
|
*/
|
|
161
|
-
direction:
|
|
161
|
+
direction: Shared.TransactionDirection;
|
|
162
162
|
/**
|
|
163
163
|
* The ledger account that this ledger entry is associated with.
|
|
164
164
|
*/
|
|
@@ -237,7 +237,7 @@ export declare namespace LedgerTransactionUpdateParams {
|
|
|
237
237
|
* `debit` pulls money from someone else's account to your own. Note that wire,
|
|
238
238
|
* rtp, and check payments will always be `credit`.
|
|
239
239
|
*/
|
|
240
|
-
direction:
|
|
240
|
+
direction: Shared.TransactionDirection;
|
|
241
241
|
/**
|
|
242
242
|
* The ledger account that this ledger entry is associated with.
|
|
243
243
|
*/
|
|
@@ -380,16 +380,15 @@ export interface LedgerTransactionCreateReversalParams {
|
|
|
380
380
|
status?: 'archived' | 'pending' | 'posted';
|
|
381
381
|
}
|
|
382
382
|
export declare namespace LedgerTransactions {
|
|
383
|
-
export import LedgerTransaction =
|
|
384
|
-
|
|
385
|
-
export import LedgerTransactionCreateParams =
|
|
386
|
-
export import LedgerTransactionUpdateParams =
|
|
387
|
-
export import LedgerTransactionListParams =
|
|
388
|
-
export import LedgerTransactionCreateReversalParams =
|
|
389
|
-
export import Versions =
|
|
390
|
-
export import LedgerTransactionVersion =
|
|
391
|
-
export import LedgerTransactionVersionsPage =
|
|
392
|
-
export import VersionListParams =
|
|
383
|
+
export import LedgerTransaction = LedgerTransactionsAPI.LedgerTransaction;
|
|
384
|
+
export import LedgerTransactionsPage = LedgerTransactionsAPI.LedgerTransactionsPage;
|
|
385
|
+
export import LedgerTransactionCreateParams = LedgerTransactionsAPI.LedgerTransactionCreateParams;
|
|
386
|
+
export import LedgerTransactionUpdateParams = LedgerTransactionsAPI.LedgerTransactionUpdateParams;
|
|
387
|
+
export import LedgerTransactionListParams = LedgerTransactionsAPI.LedgerTransactionListParams;
|
|
388
|
+
export import LedgerTransactionCreateReversalParams = LedgerTransactionsAPI.LedgerTransactionCreateReversalParams;
|
|
389
|
+
export import Versions = VersionsAPI.Versions;
|
|
390
|
+
export import LedgerTransactionVersion = VersionsAPI.LedgerTransactionVersion;
|
|
391
|
+
export import LedgerTransactionVersionsPage = VersionsAPI.LedgerTransactionVersionsPage;
|
|
392
|
+
export import VersionListParams = VersionsAPI.VersionListParams;
|
|
393
393
|
}
|
|
394
|
-
export {};
|
|
395
394
|
//# sourceMappingURL=ledger-transactions.d.ts.map
|