@getivy/node-sdk 0.1.0-alpha.25 → 0.1.0-alpha.27

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.
Files changed (77) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/index.d.mts +3 -0
  3. package/index.d.ts +3 -0
  4. package/index.d.ts.map +1 -1
  5. package/index.js +3 -0
  6. package/index.js.map +1 -1
  7. package/index.mjs +3 -0
  8. package/index.mjs.map +1 -1
  9. package/package.json +1 -1
  10. package/resources/data/accounts.d.ts +104 -0
  11. package/resources/data/accounts.d.ts.map +1 -0
  12. package/resources/data/accounts.js +15 -0
  13. package/resources/data/accounts.js.map +1 -0
  14. package/resources/data/accounts.mjs +11 -0
  15. package/resources/data/accounts.mjs.map +1 -0
  16. package/resources/data/balances.d.ts +45 -0
  17. package/resources/data/balances.d.ts.map +1 -0
  18. package/resources/data/balances.js +15 -0
  19. package/resources/data/balances.js.map +1 -0
  20. package/resources/data/balances.mjs +11 -0
  21. package/resources/data/balances.mjs.map +1 -0
  22. package/resources/data/consent.d.ts +80 -0
  23. package/resources/data/consent.d.ts.map +1 -0
  24. package/resources/data/consent.js +21 -0
  25. package/resources/data/consent.js.map +1 -0
  26. package/resources/data/consent.mjs +17 -0
  27. package/resources/data/consent.mjs.map +1 -0
  28. package/resources/data/data.d.ts +26 -0
  29. package/resources/data/data.d.ts.map +1 -0
  30. package/resources/data/data.js +55 -0
  31. package/resources/data/data.js.map +1 -0
  32. package/resources/data/data.mjs +28 -0
  33. package/resources/data/data.mjs.map +1 -0
  34. package/resources/data/index.d.ts +7 -0
  35. package/resources/data/index.d.ts.map +1 -0
  36. package/resources/data/index.js +17 -0
  37. package/resources/data/index.js.map +1 -0
  38. package/resources/data/index.mjs +8 -0
  39. package/resources/data/index.mjs.map +1 -0
  40. package/resources/data/session.d.ts +233 -0
  41. package/resources/data/session.d.ts.map +1 -0
  42. package/resources/data/session.js +21 -0
  43. package/resources/data/session.js.map +1 -0
  44. package/resources/data/session.mjs +17 -0
  45. package/resources/data/session.mjs.map +1 -0
  46. package/resources/data/transactions.d.ts +54 -0
  47. package/resources/data/transactions.d.ts.map +1 -0
  48. package/resources/data/transactions.js +16 -0
  49. package/resources/data/transactions.js.map +1 -0
  50. package/resources/data/transactions.mjs +12 -0
  51. package/resources/data/transactions.mjs.map +1 -0
  52. package/resources/data.d.ts +2 -0
  53. package/resources/data.d.ts.map +1 -0
  54. package/resources/data.js +19 -0
  55. package/resources/data.js.map +1 -0
  56. package/resources/data.mjs +3 -0
  57. package/resources/data.mjs.map +1 -0
  58. package/resources/index.d.ts +1 -0
  59. package/resources/index.d.ts.map +1 -1
  60. package/resources/index.js +3 -1
  61. package/resources/index.js.map +1 -1
  62. package/resources/index.mjs +1 -0
  63. package/resources/index.mjs.map +1 -1
  64. package/src/index.ts +5 -0
  65. package/src/resources/data/accounts.ts +134 -0
  66. package/src/resources/data/balances.ts +57 -0
  67. package/src/resources/data/consent.ts +110 -0
  68. package/src/resources/data/data.ts +75 -0
  69. package/src/resources/data/index.ts +20 -0
  70. package/src/resources/data/session.ts +1298 -0
  71. package/src/resources/data/transactions.ts +71 -0
  72. package/src/resources/data.ts +3 -0
  73. package/src/resources/index.ts +1 -0
  74. package/src/version.ts +1 -1
  75. package/version.d.ts +1 -1
  76. package/version.js +1 -1
  77. package/version.mjs +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,KAAK,uBAAuB,EAAE,KAAK,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAC9F,OAAO,EACL,KAAK,EACL,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,gBAAgB,GACtB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,YAAY,EAAE,KAAK,0BAA0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,EAC1B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,GACzB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,MAAM,EACN,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,GACzB,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,OAAO,EACP,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,GACtB,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,OAAO,EACP,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,GACvB,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,OAAO,EACP,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,GAC1B,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,WAAW,EACX,KAAK,UAAU,EACf,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,GAC9B,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,mBAAmB,EACnB,KAAK,iCAAiC,EACtC,KAAK,iCAAiC,EACtC,KAAK,+BAA+B,EACpC,KAAK,iCAAiC,EACtC,KAAK,+BAA+B,EACpC,KAAK,+BAA+B,EACpC,KAAK,+BAA+B,EACpC,KAAK,6BAA6B,EAClC,KAAK,+BAA+B,EACpC,KAAK,6BAA6B,GACnC,MAAM,uBAAuB,CAAC"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.Webhooksubscription = exports.Subaccounts = exports.Reports = exports.Refunds = exports.Payouts = exports.Orders = exports.Mandates = exports.Customers = exports.Checkoutsession = exports.Charges = exports.Capabilities = exports.Banks = exports.Balance = void 0;
4
+ exports.Webhooksubscription = exports.Subaccounts = exports.Reports = exports.Refunds = exports.Payouts = exports.Orders = exports.Mandates = exports.Data = exports.Customers = exports.Checkoutsession = exports.Charges = exports.Capabilities = exports.Banks = exports.Balance = void 0;
5
5
  var balance_1 = require("./balance.js");
6
6
  Object.defineProperty(exports, "Balance", { enumerable: true, get: function () { return balance_1.Balance; } });
7
7
  var banks_1 = require("./banks.js");
@@ -14,6 +14,8 @@ var checkoutsession_1 = require("./checkoutsession.js");
14
14
  Object.defineProperty(exports, "Checkoutsession", { enumerable: true, get: function () { return checkoutsession_1.Checkoutsession; } });
15
15
  var customers_1 = require("./customers.js");
16
16
  Object.defineProperty(exports, "Customers", { enumerable: true, get: function () { return customers_1.Customers; } });
17
+ var data_1 = require("./data/data.js");
18
+ Object.defineProperty(exports, "Data", { enumerable: true, get: function () { return data_1.Data; } });
17
19
  var mandates_1 = require("./mandates.js");
18
20
  Object.defineProperty(exports, "Mandates", { enumerable: true, get: function () { return mandates_1.Mandates; } });
19
21
  var orders_1 = require("./orders.js");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wCAA8F;AAArF,kGAAA,OAAO,OAAA;AAChB,oCAQiB;AAPf,8FAAA,KAAK,OAAA;AAQP,kDAA8G;AAArG,4GAAA,YAAY,OAAA;AACrB,wCAA0E;AAAjE,kGAAA,OAAO,OAAA;AAChB,wDAQ2B;AAPzB,kHAAA,eAAe,OAAA;AAQjB,4CAMqB;AALnB,sGAAA,SAAS,OAAA;AAMX,0CAOoB;AANlB,oGAAA,QAAQ,OAAA;AAOV,sCAMkB;AALhB,gGAAA,MAAM,OAAA;AAMR,wCAOmB;AANjB,kGAAA,OAAO,OAAA;AAOT,wCAMmB;AALjB,kGAAA,OAAO,OAAA;AAMT,wCAQmB;AAPjB,kGAAA,OAAO,OAAA;AAQT,gDAKuB;AAJrB,0GAAA,WAAW,OAAA;AAKb,gEAY+B;AAX7B,0HAAA,mBAAmB,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wCAA8F;AAArF,kGAAA,OAAO,OAAA;AAChB,oCAQiB;AAPf,8FAAA,KAAK,OAAA;AAQP,kDAA8G;AAArG,4GAAA,YAAY,OAAA;AACrB,wCAA0E;AAAjE,kGAAA,OAAO,OAAA;AAChB,wDAQ2B;AAPzB,kHAAA,eAAe,OAAA;AAQjB,4CAMqB;AALnB,sGAAA,SAAS,OAAA;AAMX,uCAAmC;AAA1B,4FAAA,IAAI,OAAA;AACb,0CAOoB;AANlB,oGAAA,QAAQ,OAAA;AAOV,sCAMkB;AALhB,gGAAA,MAAM,OAAA;AAMR,wCAOmB;AANjB,kGAAA,OAAO,OAAA;AAOT,wCAMmB;AALjB,kGAAA,OAAO,OAAA;AAMT,wCAQmB;AAPjB,kGAAA,OAAO,OAAA;AAQT,gDAKuB;AAJrB,0GAAA,WAAW,OAAA;AAKb,gEAY+B;AAX7B,0HAAA,mBAAmB,OAAA"}
@@ -5,6 +5,7 @@ export { Capabilities } from "./capabilities.mjs";
5
5
  export { Charges } from "./charges.mjs";
6
6
  export { Checkoutsession, } from "./checkoutsession.mjs";
7
7
  export { Customers, } from "./customers.mjs";
8
+ export { Data } from "./data/data.mjs";
8
9
  export { Mandates, } from "./mandates.mjs";
9
10
  export { Orders, } from "./orders.mjs";
10
11
  export { Payouts, } from "./payouts.mjs";
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,OAAO,EAA4D;OACrE,EACL,KAAK,GAON;OACM,EAAE,YAAY,EAAkE;OAChF,EAAE,OAAO,EAAwC;OACjD,EACL,eAAe,GAOhB;OACM,EACL,SAAS,GAKV;OACM,EACL,QAAQ,GAMT;OACM,EACL,MAAM,GAKP;OACM,EACL,OAAO,GAMR;OACM,EACL,OAAO,GAKR;OACM,EACL,OAAO,GAOR;OACM,EACL,WAAW,GAIZ;OACM,EACL,mBAAmB,GAWpB"}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,OAAO,EAA4D;OACrE,EACL,KAAK,GAON;OACM,EAAE,YAAY,EAAkE;OAChF,EAAE,OAAO,EAAwC;OACjD,EACL,eAAe,GAOhB;OACM,EACL,SAAS,GAKV;OACM,EAAE,IAAI,EAAE;OACR,EACL,QAAQ,GAMT;OACM,EACL,MAAM,GAKP;OACM,EACL,OAAO,GAMR;OACM,EACL,OAAO,GAKR;OACM,EACL,OAAO,GAOR;OACM,EACL,WAAW,GAIZ;OACM,EACL,mBAAmB,GAWpB"}
package/src/index.ts CHANGED
@@ -91,6 +91,7 @@ import {
91
91
  WebhooksubscriptionUpdateParams,
92
92
  WebhooksubscriptionUpdateResponse,
93
93
  } from './resources/webhooksubscription';
94
+ import { Data } from './resources/data/data';
94
95
 
95
96
  const environments = {
96
97
  production: 'https://api.getivy.de',
@@ -230,6 +231,7 @@ export class Ivy extends Core.APIClient {
230
231
 
231
232
  banks: API.Banks = new API.Banks(this);
232
233
  checkoutsession: API.Checkoutsession = new API.Checkoutsession(this);
234
+ data: API.Data = new API.Data(this);
233
235
  customers: API.Customers = new API.Customers(this);
234
236
  orders: API.Orders = new API.Orders(this);
235
237
  charges: API.Charges = new API.Charges(this);
@@ -280,6 +282,7 @@ export class Ivy extends Core.APIClient {
280
282
 
281
283
  Ivy.Banks = Banks;
282
284
  Ivy.Checkoutsession = Checkoutsession;
285
+ Ivy.Data = Data;
283
286
  Ivy.Customers = Customers;
284
287
  Ivy.Orders = Orders;
285
288
  Ivy.Charges = Charges;
@@ -314,6 +317,8 @@ export declare namespace Ivy {
314
317
  type CheckoutsessionExpireParams as CheckoutsessionExpireParams,
315
318
  };
316
319
 
320
+ export { Data as Data };
321
+
317
322
  export {
318
323
  Customers as Customers,
319
324
  type CustomerCreateResponse as CustomerCreateResponse,
@@ -0,0 +1,134 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../resource';
4
+ import * as Core from '../../core';
5
+
6
+ export class Accounts extends APIResource {
7
+ /**
8
+ * Retrieves the list of accounts for a given data session.
9
+ */
10
+ list(body: AccountListParams, options?: Core.RequestOptions): Core.APIPromise<AccountListResponse> {
11
+ return this._client.post('/api/service/data/accounts/list', { body, ...options });
12
+ }
13
+ }
14
+
15
+ export interface AccountListResponse {
16
+ accounts: Array<AccountListResponse.Account>;
17
+ }
18
+
19
+ export namespace AccountListResponse {
20
+ export interface Account {
21
+ /**
22
+ * The ID of the account.
23
+ */
24
+ id: string;
25
+
26
+ /**
27
+ * The ID of the bank.
28
+ */
29
+ bankId: string;
30
+
31
+ /**
32
+ * The name of the bank.
33
+ */
34
+ bankName: string;
35
+
36
+ /**
37
+ * The currency of the account.
38
+ */
39
+ currency: string;
40
+
41
+ financialAddress: Array<Account.FinancialAddress>;
42
+
43
+ /**
44
+ * The name of the account.
45
+ */
46
+ accountName?: string;
47
+ }
48
+
49
+ export namespace Account {
50
+ /**
51
+ * The validation logic is based on the "type" field. For example, if "type" is set
52
+ * to "iban", the "iban" object must be filled out.
53
+ */
54
+ export interface FinancialAddress {
55
+ /**
56
+ * The type of the financial address. The actual destination is determined by this
57
+ * field which can be either "iban", "sortCode", "bankCode", or "bban". The
58
+ * validation will fail if you set e.g. type="iban", but then not fill any values
59
+ * in the "iban" object.
60
+ *
61
+ * - iban: The IBAN of the account
62
+ * - sort_code: The sort code of the account
63
+ * - bank_code: The bank code of the account
64
+ * - bban: The BBAN of the account
65
+ */
66
+ type: string;
67
+
68
+ bankCode?: FinancialAddress.BankCode;
69
+
70
+ bban?: FinancialAddress.Bban;
71
+
72
+ iban?: FinancialAddress.Iban;
73
+
74
+ sortCode?: FinancialAddress.SortCode;
75
+ }
76
+
77
+ export namespace FinancialAddress {
78
+ export interface BankCode {
79
+ accountNumber: string;
80
+
81
+ code: string;
82
+
83
+ /**
84
+ * The name of the account holder.
85
+ */
86
+ accountHolderName?: string;
87
+ }
88
+
89
+ export interface Bban {
90
+ bban: string;
91
+
92
+ /**
93
+ * The name of the account holder.
94
+ */
95
+ accountHolderName?: string;
96
+
97
+ bic?: string;
98
+ }
99
+
100
+ export interface Iban {
101
+ iban: string;
102
+
103
+ /**
104
+ * The name of the account holder.
105
+ */
106
+ accountHolderName?: string;
107
+
108
+ bic?: string;
109
+ }
110
+
111
+ export interface SortCode {
112
+ accountNumber: string;
113
+
114
+ sortCode: string;
115
+
116
+ /**
117
+ * The name of the account holder.
118
+ */
119
+ accountHolderName?: string;
120
+ }
121
+ }
122
+ }
123
+ }
124
+
125
+ export interface AccountListParams {
126
+ /**
127
+ * The ID of the data session to retrieve accounts for.
128
+ */
129
+ sessionId: string;
130
+ }
131
+
132
+ export declare namespace Accounts {
133
+ export { type AccountListResponse as AccountListResponse, type AccountListParams as AccountListParams };
134
+ }
@@ -0,0 +1,57 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../resource';
4
+ import * as Core from '../../core';
5
+
6
+ export class Balances extends APIResource {
7
+ /**
8
+ * Retrieves the list of account balances for a given data session.
9
+ */
10
+ list(body: BalanceListParams, options?: Core.RequestOptions): Core.APIPromise<BalanceListResponse> {
11
+ return this._client.post('/api/service/data/account-balances/list', { body, ...options });
12
+ }
13
+ }
14
+
15
+ export interface BalanceListResponse {
16
+ balances: Array<BalanceListResponse.Balance>;
17
+ }
18
+
19
+ export namespace BalanceListResponse {
20
+ export interface Balance {
21
+ /**
22
+ * The ID of the account.
23
+ */
24
+ accountId: string;
25
+
26
+ /**
27
+ * The available balance.
28
+ */
29
+ available: string;
30
+
31
+ /**
32
+ * The currency of the balance.
33
+ */
34
+ currency: string;
35
+
36
+ /**
37
+ * The current balance.
38
+ */
39
+ current: string;
40
+
41
+ /**
42
+ * The date and time when the balance was last updated.
43
+ */
44
+ timestamp: string;
45
+ }
46
+ }
47
+
48
+ export interface BalanceListParams {
49
+ /**
50
+ * The ID of the data session to retrieve account balances for.
51
+ */
52
+ sessionId: string;
53
+ }
54
+
55
+ export declare namespace Balances {
56
+ export { type BalanceListResponse as BalanceListResponse, type BalanceListParams as BalanceListParams };
57
+ }
@@ -0,0 +1,110 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../resource';
4
+ import * as Core from '../../core';
5
+
6
+ export class Consent extends APIResource {
7
+ /**
8
+ * Retrieves the details of a consent by session ID.
9
+ */
10
+ retrieve(
11
+ body: ConsentRetrieveParams,
12
+ options?: Core.RequestOptions,
13
+ ): Core.APIPromise<ConsentRetrieveResponse> {
14
+ return this._client.post('/api/service/data/consent/details', { body, ...options });
15
+ }
16
+
17
+ /**
18
+ * Revokes a consent by session ID.
19
+ */
20
+ revoke(body: ConsentRevokeParams, options?: Core.RequestOptions): Core.APIPromise<ConsentRevokeResponse> {
21
+ return this._client.post('/api/service/data/consent/revoke', { body, ...options });
22
+ }
23
+ }
24
+
25
+ export interface ConsentRetrieveResponse {
26
+ /**
27
+ * The Epoch time in seconds when the consent was created.
28
+ */
29
+ createdAt: number;
30
+
31
+ /**
32
+ * The permissions granted in this consent.
33
+ */
34
+ permissions: Array<'accounts' | 'balances' | 'transactions'>;
35
+
36
+ /**
37
+ * The current status of the consent.
38
+ */
39
+ status: 'created' | 'authorised' | 'revoked' | 'expired';
40
+
41
+ /**
42
+ * The Epoch time in seconds when the consent was last updated.
43
+ */
44
+ updatedAt: number;
45
+
46
+ /**
47
+ * The Epoch time in seconds at which the consent expires.
48
+ */
49
+ expiresAt?: number;
50
+
51
+ /**
52
+ * The Epoch time in seconds at which the consent was revoked.
53
+ */
54
+ revokedAt?: number;
55
+ }
56
+
57
+ export interface ConsentRevokeResponse {
58
+ /**
59
+ * The Epoch time in seconds when the consent was created.
60
+ */
61
+ createdAt: number;
62
+
63
+ /**
64
+ * The permissions granted in this consent.
65
+ */
66
+ permissions: Array<'accounts' | 'balances' | 'transactions'>;
67
+
68
+ /**
69
+ * The Epoch time in seconds at which the consent was revoked.
70
+ */
71
+ revokedAt: number;
72
+
73
+ /**
74
+ * The current status of the consent.
75
+ */
76
+ status: 'revoked';
77
+
78
+ /**
79
+ * The Epoch time in seconds when the consent was last updated.
80
+ */
81
+ updatedAt: number;
82
+
83
+ /**
84
+ * The Epoch time in seconds at which the consent expires.
85
+ */
86
+ expiresAt?: number;
87
+ }
88
+
89
+ export interface ConsentRetrieveParams {
90
+ /**
91
+ * The ID of the data session to which the consent belongs.
92
+ */
93
+ sessionId: string;
94
+ }
95
+
96
+ export interface ConsentRevokeParams {
97
+ /**
98
+ * The ID of the data session to which the consent belongs.
99
+ */
100
+ sessionId: string;
101
+ }
102
+
103
+ export declare namespace Consent {
104
+ export {
105
+ type ConsentRetrieveResponse as ConsentRetrieveResponse,
106
+ type ConsentRevokeResponse as ConsentRevokeResponse,
107
+ type ConsentRetrieveParams as ConsentRetrieveParams,
108
+ type ConsentRevokeParams as ConsentRevokeParams,
109
+ };
110
+ }
@@ -0,0 +1,75 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../resource';
4
+ import * as AccountsAPI from './accounts';
5
+ import { AccountListParams, AccountListResponse, Accounts } from './accounts';
6
+ import * as BalancesAPI from './balances';
7
+ import { BalanceListParams, BalanceListResponse, Balances } from './balances';
8
+ import * as ConsentAPI from './consent';
9
+ import {
10
+ Consent,
11
+ ConsentRetrieveParams,
12
+ ConsentRetrieveResponse,
13
+ ConsentRevokeParams,
14
+ ConsentRevokeResponse,
15
+ } from './consent';
16
+ import * as SessionAPI from './session';
17
+ import {
18
+ Session,
19
+ SessionCreateParams,
20
+ SessionCreateResponse,
21
+ SessionRetrieveParams,
22
+ SessionRetrieveResponse,
23
+ } from './session';
24
+ import * as TransactionsAPI from './transactions';
25
+ import { TransactionListParams, TransactionListResponse, Transactions } from './transactions';
26
+
27
+ export class Data extends APIResource {
28
+ session: SessionAPI.Session = new SessionAPI.Session(this._client);
29
+ consent: ConsentAPI.Consent = new ConsentAPI.Consent(this._client);
30
+ accounts: AccountsAPI.Accounts = new AccountsAPI.Accounts(this._client);
31
+ transactions: TransactionsAPI.Transactions = new TransactionsAPI.Transactions(this._client);
32
+ balances: BalancesAPI.Balances = new BalancesAPI.Balances(this._client);
33
+ }
34
+
35
+ Data.Session = Session;
36
+ Data.Consent = Consent;
37
+ Data.Accounts = Accounts;
38
+ Data.Transactions = Transactions;
39
+ Data.Balances = Balances;
40
+
41
+ export declare namespace Data {
42
+ export {
43
+ Session as Session,
44
+ type SessionCreateResponse as SessionCreateResponse,
45
+ type SessionRetrieveResponse as SessionRetrieveResponse,
46
+ type SessionCreateParams as SessionCreateParams,
47
+ type SessionRetrieveParams as SessionRetrieveParams,
48
+ };
49
+
50
+ export {
51
+ Consent as Consent,
52
+ type ConsentRetrieveResponse as ConsentRetrieveResponse,
53
+ type ConsentRevokeResponse as ConsentRevokeResponse,
54
+ type ConsentRetrieveParams as ConsentRetrieveParams,
55
+ type ConsentRevokeParams as ConsentRevokeParams,
56
+ };
57
+
58
+ export {
59
+ Accounts as Accounts,
60
+ type AccountListResponse as AccountListResponse,
61
+ type AccountListParams as AccountListParams,
62
+ };
63
+
64
+ export {
65
+ Transactions as Transactions,
66
+ type TransactionListResponse as TransactionListResponse,
67
+ type TransactionListParams as TransactionListParams,
68
+ };
69
+
70
+ export {
71
+ Balances as Balances,
72
+ type BalanceListResponse as BalanceListResponse,
73
+ type BalanceListParams as BalanceListParams,
74
+ };
75
+ }
@@ -0,0 +1,20 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export { Accounts, type AccountListResponse, type AccountListParams } from './accounts';
4
+ export { Balances, type BalanceListResponse, type BalanceListParams } from './balances';
5
+ export {
6
+ Consent,
7
+ type ConsentRetrieveResponse,
8
+ type ConsentRevokeResponse,
9
+ type ConsentRetrieveParams,
10
+ type ConsentRevokeParams,
11
+ } from './consent';
12
+ export { Data } from './data';
13
+ export {
14
+ Session,
15
+ type SessionCreateResponse,
16
+ type SessionRetrieveResponse,
17
+ type SessionCreateParams,
18
+ type SessionRetrieveParams,
19
+ } from './session';
20
+ export { Transactions, type TransactionListResponse, type TransactionListParams } from './transactions';