modern-treasury 0.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.
- package/.eslintrc.js +10 -0
- package/.prettierrc +6 -0
- package/LICENSE +7 -0
- package/README.md +198 -0
- package/build +10 -0
- package/core.ts +746 -0
- package/dist/cjs/core.d.ts +215 -0
- package/dist/cjs/core.js +815 -0
- package/dist/cjs/core.js.map +1 -0
- package/dist/cjs/index.d.ts +118 -0
- package/dist/cjs/index.js +128 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/pagination.d.ts +14 -0
- package/dist/cjs/pagination.js +22 -0
- package/dist/cjs/pagination.js.map +1 -0
- package/dist/cjs/resource.d.ts +11 -0
- package/dist/cjs/resource.js +16 -0
- package/dist/cjs/resource.js.map +1 -0
- package/dist/cjs/resources/counterparties.d.ts +500 -0
- package/dist/cjs/resources/counterparties.js +57 -0
- package/dist/cjs/resources/counterparties.js.map +1 -0
- package/dist/cjs/resources/documents.d.ts +66 -0
- package/dist/cjs/resources/documents.js +23 -0
- package/dist/cjs/resources/documents.js.map +1 -0
- package/dist/cjs/resources/events.d.ts +53 -0
- package/dist/cjs/resources/events.js +22 -0
- package/dist/cjs/resources/events.js.map +1 -0
- package/dist/cjs/resources/expected-payments.d.ts +928 -0
- package/dist/cjs/resources/expected-payments.js +31 -0
- package/dist/cjs/resources/expected-payments.js.map +1 -0
- package/dist/cjs/resources/external-accounts.d.ts +597 -0
- package/dist/cjs/resources/external-accounts.js +51 -0
- package/dist/cjs/resources/external-accounts.js.map +1 -0
- package/dist/cjs/resources/incoming-payment-details.d.ts +487 -0
- package/dist/cjs/resources/incoming-payment-details.js +35 -0
- package/dist/cjs/resources/incoming-payment-details.js.map +1 -0
- package/dist/cjs/resources/index.d.ts +15 -0
- package/dist/cjs/resources/index.js +46 -0
- package/dist/cjs/resources/index.js.map +1 -0
- package/dist/cjs/resources/internal-accounts.d.ts +666 -0
- package/dist/cjs/resources/internal-accounts.js +31 -0
- package/dist/cjs/resources/internal-accounts.js.map +1 -0
- package/dist/cjs/resources/line-items.d.ts +90 -0
- package/dist/cjs/resources/line-items.js +38 -0
- package/dist/cjs/resources/line-items.js.map +1 -0
- package/dist/cjs/resources/paper-items.d.ts +279 -0
- package/dist/cjs/resources/paper-items.js +25 -0
- package/dist/cjs/resources/paper-items.js.map +1 -0
- package/dist/cjs/resources/payment-orders/index.d.ts +2 -0
- package/dist/cjs/resources/payment-orders/index.js +33 -0
- package/dist/cjs/resources/payment-orders/index.js.map +1 -0
- package/dist/cjs/resources/payment-orders/payment-orders.d.ts +2180 -0
- package/dist/cjs/resources/payment-orders/payment-orders.js +56 -0
- package/dist/cjs/resources/payment-orders/payment-orders.js.map +1 -0
- package/dist/cjs/resources/payment-orders/reversals.d.ts +46 -0
- package/dist/cjs/resources/payment-orders/reversals.js +23 -0
- package/dist/cjs/resources/payment-orders/reversals.js.map +1 -0
- package/dist/cjs/resources/returns.d.ts +487 -0
- package/dist/cjs/resources/returns.js +31 -0
- package/dist/cjs/resources/returns.js.map +1 -0
- package/dist/cjs/resources/top-level.d.ts +3 -0
- package/dist/cjs/resources/top-level.js +4 -0
- package/dist/cjs/resources/top-level.js.map +1 -0
- package/dist/cjs/resources/transactions.d.ts +377 -0
- package/dist/cjs/resources/transactions.js +31 -0
- package/dist/cjs/resources/transactions.js.map +1 -0
- package/dist/cjs/resources/validations.d.ts +97 -0
- package/dist/cjs/resources/validations.js +16 -0
- package/dist/cjs/resources/validations.js.map +1 -0
- package/dist/cjs/resources/webhooks.d.ts +31 -0
- package/dist/cjs/resources/webhooks.js +44 -0
- package/dist/cjs/resources/webhooks.js.map +1 -0
- package/dist/cjs/tests/api-resources/counterparties.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/counterparties.test.js +275 -0
- package/dist/cjs/tests/api-resources/counterparties.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/documents.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/documents.test.js +78 -0
- package/dist/cjs/tests/api-resources/documents.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/events.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/events.test.js +100 -0
- package/dist/cjs/tests/api-resources/events.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/expected-payments.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/expected-payments.test.js +176 -0
- package/dist/cjs/tests/api-resources/expected-payments.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/external-accounts.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/external-accounts.test.js +248 -0
- package/dist/cjs/tests/api-resources/external-accounts.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/incoming-payment-details.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/incoming-payment-details.test.js +130 -0
- package/dist/cjs/tests/api-resources/incoming-payment-details.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/internal-accounts.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/internal-accounts.test.js +144 -0
- package/dist/cjs/tests/api-resources/internal-accounts.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/line-items.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/line-items.test.js +123 -0
- package/dist/cjs/tests/api-resources/line-items.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/paper-items.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/paper-items.test.js +96 -0
- package/dist/cjs/tests/api-resources/paper-items.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/payment-orders/payment-orders.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/payment-orders/payment-orders.test.js +77 -0
- package/dist/cjs/tests/api-resources/payment-orders/payment-orders.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/returns.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/returns.test.js +116 -0
- package/dist/cjs/tests/api-resources/returns.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/top-level.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/top-level.test.js +59 -0
- package/dist/cjs/tests/api-resources/top-level.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/transactions.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/transactions.test.js +134 -0
- package/dist/cjs/tests/api-resources/transactions.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/validations.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/validations.test.js +62 -0
- package/dist/cjs/tests/api-resources/validations.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/webhooks.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/webhooks.test.js +100 -0
- package/dist/cjs/tests/api-resources/webhooks.test.js.map +1 -0
- package/dist/cjs/tests/form.test.d.ts +1 -0
- package/dist/cjs/tests/form.test.js +61 -0
- package/dist/cjs/tests/form.test.js.map +1 -0
- package/dist/cjs/tests/index.test.d.ts +1 -0
- package/dist/cjs/tests/index.test.js +57 -0
- package/dist/cjs/tests/index.test.js.map +1 -0
- package/dist/cjs/tests/responses.test.d.ts +1 -0
- package/dist/cjs/tests/responses.test.js +60 -0
- package/dist/cjs/tests/responses.test.js.map +1 -0
- package/index.ts +175 -0
- package/jest.config.js +8 -0
- package/package.json +47 -0
- package/pagination.ts +36 -0
- package/resource.ts +22 -0
- package/resources/counterparties.ts +666 -0
- package/resources/documents.ts +97 -0
- package/resources/events.ts +86 -0
- package/resources/expected-payments.ts +1016 -0
- package/resources/external-accounts.ts +762 -0
- package/resources/incoming-payment-details.ts +592 -0
- package/resources/index.ts +16 -0
- package/resources/internal-accounts.ts +774 -0
- package/resources/line-items.ts +138 -0
- package/resources/paper-items.ts +317 -0
- package/resources/payment-orders/index.ts +3 -0
- package/resources/payment-orders/payment-orders.ts +2486 -0
- package/resources/payment-orders/reversals.ts +72 -0
- package/resources/returns.ts +545 -0
- package/resources/top-level.ts +5 -0
- package/resources/transactions.ts +441 -0
- package/resources/validations.ts +115 -0
- package/resources/webhooks.ts +48 -0
- package/tests/api-resources/counterparties.test.ts +237 -0
- package/tests/api-resources/documents.test.ts +40 -0
- package/tests/api-resources/events.test.ts +62 -0
- package/tests/api-resources/expected-payments.test.ts +138 -0
- package/tests/api-resources/external-accounts.test.ts +210 -0
- package/tests/api-resources/incoming-payment-details.test.ts +92 -0
- package/tests/api-resources/internal-accounts.test.ts +103 -0
- package/tests/api-resources/line-items.test.ts +85 -0
- package/tests/api-resources/paper-items.test.ts +58 -0
- package/tests/api-resources/payment-orders/payment-orders.test.ts +39 -0
- package/tests/api-resources/returns.test.ts +78 -0
- package/tests/api-resources/top-level.test.ts +21 -0
- package/tests/api-resources/transactions.test.ts +96 -0
- package/tests/api-resources/validations.test.ts +24 -0
- package/tests/api-resources/webhooks.test.ts +102 -0
- package/tests/form.test.ts +27 -0
- package/tests/index.test.ts +62 -0
- package/tests/responses.test.ts +25 -0
- package/tsconfig.cjs.json +8 -0
- package/tsconfig.json +36 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import * as Core from '../core';
|
|
2
|
+
import { APIResource } from '../resource';
|
|
3
|
+
import { Page, PageParams } from '../pagination';
|
|
4
|
+
export declare class Events extends APIResource {
|
|
5
|
+
retrieve(id: string, options?: Core.RequestOptions): Promise<Core.APIResponse<Event>>;
|
|
6
|
+
list(query?: EventListParams, options?: Core.RequestOptions): Core.PagePromise<EventsPage>;
|
|
7
|
+
list(options?: Core.RequestOptions): Core.PagePromise<EventsPage>;
|
|
8
|
+
}
|
|
9
|
+
export declare class EventsPage extends Page<Event> {}
|
|
10
|
+
export interface Event {
|
|
11
|
+
created_at?: string;
|
|
12
|
+
/**
|
|
13
|
+
* The body of the event.
|
|
14
|
+
*/
|
|
15
|
+
data?: unknown;
|
|
16
|
+
/**
|
|
17
|
+
* The ID of the entity for the event.
|
|
18
|
+
*/
|
|
19
|
+
entity_id?: string;
|
|
20
|
+
/**
|
|
21
|
+
* The name of the event.
|
|
22
|
+
*/
|
|
23
|
+
event_name?: string;
|
|
24
|
+
/**
|
|
25
|
+
* The time of the event.
|
|
26
|
+
*/
|
|
27
|
+
event_time?: string;
|
|
28
|
+
id?: string;
|
|
29
|
+
/**
|
|
30
|
+
* This field will be true if this object exists in the live environment or false
|
|
31
|
+
* if it exists in the test environment.
|
|
32
|
+
*/
|
|
33
|
+
live_mode?: boolean;
|
|
34
|
+
object?: string;
|
|
35
|
+
/**
|
|
36
|
+
* The type of resource for the event.
|
|
37
|
+
*/
|
|
38
|
+
resource?: string;
|
|
39
|
+
updated_at?: string;
|
|
40
|
+
}
|
|
41
|
+
export interface EventListParams extends PageParams {
|
|
42
|
+
entity_id?: string;
|
|
43
|
+
event_name?: string;
|
|
44
|
+
/**
|
|
45
|
+
* An inclusive upper bound for when the event occurred
|
|
46
|
+
*/
|
|
47
|
+
event_time_end?: string;
|
|
48
|
+
/**
|
|
49
|
+
* An inclusive lower bound for when the event occurred
|
|
50
|
+
*/
|
|
51
|
+
event_time_start?: string;
|
|
52
|
+
resource?: string;
|
|
53
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless.
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
exports.EventsPage = exports.Events = void 0;
|
|
5
|
+
const resource_1 = require('../resource');
|
|
6
|
+
const core_1 = require('../core');
|
|
7
|
+
const pagination_1 = require('../pagination');
|
|
8
|
+
class Events extends resource_1.APIResource {
|
|
9
|
+
retrieve(id, options) {
|
|
10
|
+
return this.get(`/api/events/${id}`, options);
|
|
11
|
+
}
|
|
12
|
+
list(query = {}, options) {
|
|
13
|
+
if ((0, core_1.isRequestOptions)(query)) {
|
|
14
|
+
return this.list({}, query);
|
|
15
|
+
}
|
|
16
|
+
return this.getAPIList('/api/events', EventsPage, Object.assign({ query }, options));
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.Events = Events;
|
|
20
|
+
class EventsPage extends pagination_1.Page {}
|
|
21
|
+
exports.EventsPage = EventsPage;
|
|
22
|
+
//# sourceMappingURL=events.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../../resources/events.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;AAGrD,yCAAyC;AACzC,iCAA0C;AAC1C,6CAAgD;AAEhD,MAAa,MAAO,SAAQ,sBAAW;IACrC,QAAQ,CAAC,EAAU,EAAE,OAA6B;QAChD,OAAO,IAAI,CAAC,GAAG,CAAC,eAAe,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAChD,CAAC;IAID,IAAI,CACF,QAA+C,EAAE,EACjD,OAA6B;QAE7B,IAAI,IAAA,uBAAgB,EAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;SAC7B;QAED,OAAO,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,UAAU,kBAAI,KAAK,IAAK,OAAO,EAAG,CAAC;IAC3E,CAAC;CACF;AAjBD,wBAiBC;AAED,MAAa,UAAW,SAAQ,iBAAW;CAAG;AAA9C,gCAA8C"}
|