@getivy/node-sdk 0.1.0-alpha.32 → 0.1.0-alpha.34

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 (128) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/index.d.mts +14 -14
  3. package/index.d.ts +14 -14
  4. package/index.d.ts.map +1 -1
  5. package/index.js.map +1 -1
  6. package/index.mjs +1 -1
  7. package/index.mjs.map +1 -1
  8. package/package.json +1 -1
  9. package/resource.d.ts +1 -1
  10. package/resource.d.ts.map +1 -1
  11. package/resource.js.map +1 -1
  12. package/resource.mjs.map +1 -1
  13. package/resources/balance.d.ts +6 -3
  14. package/resources/balance.d.ts.map +1 -1
  15. package/resources/banks.d.ts +38 -59
  16. package/resources/banks.d.ts.map +1 -1
  17. package/resources/capabilities.d.ts +1 -10
  18. package/resources/capabilities.d.ts.map +1 -1
  19. package/resources/charges.d.ts +30 -21
  20. package/resources/charges.d.ts.map +1 -1
  21. package/resources/checkoutsession.d.ts +311 -803
  22. package/resources/checkoutsession.d.ts.map +1 -1
  23. package/resources/customers.d.ts +9 -12
  24. package/resources/customers.d.ts.map +1 -1
  25. package/resources/data/accounts.d.ts +0 -100
  26. package/resources/data/accounts.d.ts.map +1 -1
  27. package/resources/data/accounts.js +0 -6
  28. package/resources/data/accounts.js.map +1 -1
  29. package/resources/data/accounts.mjs +0 -6
  30. package/resources/data/accounts.mjs.map +1 -1
  31. package/resources/data/balances.d.ts +0 -41
  32. package/resources/data/balances.d.ts.map +1 -1
  33. package/resources/data/balances.js +0 -6
  34. package/resources/data/balances.js.map +1 -1
  35. package/resources/data/balances.mjs +0 -6
  36. package/resources/data/balances.mjs.map +1 -1
  37. package/resources/data/consent.d.ts +0 -76
  38. package/resources/data/consent.d.ts.map +1 -1
  39. package/resources/data/consent.js +0 -12
  40. package/resources/data/consent.js.map +1 -1
  41. package/resources/data/consent.mjs +0 -12
  42. package/resources/data/consent.mjs.map +1 -1
  43. package/resources/data/data.d.ts +10 -10
  44. package/resources/data/data.d.ts.map +1 -1
  45. package/resources/data/data.js.map +1 -1
  46. package/resources/data/data.mjs +2 -2
  47. package/resources/data/data.mjs.map +1 -1
  48. package/resources/data/index.d.ts +5 -5
  49. package/resources/data/index.d.ts.map +1 -1
  50. package/resources/data/index.js.map +1 -1
  51. package/resources/data/index.mjs +2 -2
  52. package/resources/data/index.mjs.map +1 -1
  53. package/resources/data/session.d.ts +0 -230
  54. package/resources/data/session.d.ts.map +1 -1
  55. package/resources/data/session.js +0 -12
  56. package/resources/data/session.js.map +1 -1
  57. package/resources/data/session.mjs +0 -12
  58. package/resources/data/session.mjs.map +1 -1
  59. package/resources/data/transactions.d.ts +0 -50
  60. package/resources/data/transactions.d.ts.map +1 -1
  61. package/resources/data/transactions.js +0 -7
  62. package/resources/data/transactions.js.map +1 -1
  63. package/resources/data/transactions.mjs +0 -7
  64. package/resources/data/transactions.mjs.map +1 -1
  65. package/resources/index.d.ts +7 -7
  66. package/resources/index.d.ts.map +1 -1
  67. package/resources/index.js.map +1 -1
  68. package/resources/index.mjs +1 -1
  69. package/resources/index.mjs.map +1 -1
  70. package/resources/mandates.d.ts +55 -17
  71. package/resources/mandates.d.ts.map +1 -1
  72. package/resources/mandates.js.map +1 -1
  73. package/resources/mandates.mjs.map +1 -1
  74. package/resources/orders.d.ts +242 -524
  75. package/resources/orders.d.ts.map +1 -1
  76. package/resources/payouts.d.ts +146 -70
  77. package/resources/payouts.d.ts.map +1 -1
  78. package/resources/payouts.js.map +1 -1
  79. package/resources/payouts.mjs.map +1 -1
  80. package/resources/refunds.d.ts +16 -92
  81. package/resources/refunds.d.ts.map +1 -1
  82. package/resources/refunds.js +4 -4
  83. package/resources/refunds.js.map +1 -1
  84. package/resources/refunds.mjs +4 -4
  85. package/resources/refunds.mjs.map +1 -1
  86. package/resources/reports.d.ts +4 -78
  87. package/resources/reports.d.ts.map +1 -1
  88. package/resources/reports.js +5 -1
  89. package/resources/reports.js.map +1 -1
  90. package/resources/reports.mjs +5 -1
  91. package/resources/reports.mjs.map +1 -1
  92. package/resources/subaccounts.d.ts +19 -7
  93. package/resources/subaccounts.d.ts.map +1 -1
  94. package/resources/subaccounts.js.map +1 -1
  95. package/resources/subaccounts.mjs.map +1 -1
  96. package/resources/webhooksubscription.d.ts +0 -151
  97. package/resources/webhooksubscription.d.ts.map +1 -1
  98. package/resources/webhooksubscription.js +0 -33
  99. package/resources/webhooksubscription.js.map +1 -1
  100. package/resources/webhooksubscription.mjs +0 -33
  101. package/resources/webhooksubscription.mjs.map +1 -1
  102. package/src/index.ts +22 -38
  103. package/src/resource.ts +1 -1
  104. package/src/resources/balance.ts +6 -3
  105. package/src/resources/banks.ts +41 -59
  106. package/src/resources/capabilities.ts +1 -10
  107. package/src/resources/charges.ts +32 -23
  108. package/src/resources/checkoutsession.ts +1395 -999
  109. package/src/resources/customers.ts +9 -12
  110. package/src/resources/data/accounts.ts +1 -130
  111. package/src/resources/data/balances.ts +1 -53
  112. package/src/resources/data/consent.ts +1 -106
  113. package/src/resources/data/data.ts +10 -46
  114. package/src/resources/data/index.ts +5 -17
  115. package/src/resources/data/session.ts +1 -1295
  116. package/src/resources/data/transactions.ts +1 -67
  117. package/src/resources/index.ts +9 -19
  118. package/src/resources/mandates.ts +82 -17
  119. package/src/resources/orders.ts +1149 -805
  120. package/src/resources/payouts.ts +239 -70
  121. package/src/resources/refunds.ts +33 -94
  122. package/src/resources/reports.ts +8 -98
  123. package/src/resources/subaccounts.ts +36 -7
  124. package/src/resources/webhooksubscription.ts +1 -349
  125. package/src/version.ts +1 -1
  126. package/version.d.ts +1 -1
  127. package/version.js +1 -1
  128. package/version.mjs +1 -1
@@ -23,9 +23,6 @@ export class Customers extends APIResource {
23
23
  }
24
24
  }
25
25
 
26
- /**
27
- * Returns the id and email of the created customer
28
- */
29
26
  export interface CustomerCreateResponse {
30
27
  /**
31
28
  * The id of the created customer
@@ -40,17 +37,17 @@ export interface CustomerCreateResponse {
40
37
 
41
38
  export interface CustomerRetrieveResponse {
42
39
  /**
43
- * Customer id
40
+ * The id of the customer
44
41
  */
45
42
  id: string;
46
43
 
47
44
  /**
48
- * List of remembered bank accounts for this Customer
45
+ * Array of bank accounts remembered by user
49
46
  */
50
47
  bankAccounts: Array<CustomerRetrieveResponse.BankAccount>;
51
48
 
52
49
  /**
53
- * Customer email address
50
+ * The email address of the customer
54
51
  */
55
52
  emailAddress: string;
56
53
  }
@@ -58,33 +55,33 @@ export interface CustomerRetrieveResponse {
58
55
  export namespace CustomerRetrieveResponse {
59
56
  export interface BankAccount {
60
57
  /**
61
- * Bank details
58
+ * Remembered bank details
62
59
  */
63
60
  bank: BankAccount.Bank;
64
61
 
65
62
  /**
66
63
  * Last 4 digits of remembered account number
67
64
  */
68
- last4digits?: string;
65
+ last4digits: string;
69
66
  }
70
67
 
71
68
  export namespace BankAccount {
72
69
  /**
73
- * Bank details
70
+ * Remembered bank details
74
71
  */
75
72
  export interface Bank {
76
73
  /**
77
- * Ivy bank id used to initiate checkout session with preselected bank
74
+ * The id of the bank
78
75
  */
79
76
  id: string;
80
77
 
81
78
  /**
82
- * The customer-facing name of the Bank.
79
+ * The name of the bank
83
80
  */
84
81
  name: string;
85
82
 
86
83
  /**
87
- * The Bank Logo as a URL
84
+ * URL address of bank logo image
88
85
  */
89
86
  logo?: string;
90
87
  }
@@ -1,134 +1,5 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../../resource';
4
- import * as Core from '../../core';
5
4
 
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
- }
5
+ export class Accounts extends APIResource {}
@@ -1,57 +1,5 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../../resource';
4
- import * as Core from '../../core';
5
4
 
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
- }
5
+ export class Balances extends APIResource {}
@@ -1,110 +1,5 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../../resource';
4
- import * as Core from '../../core';
5
4
 
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' | 'failed';
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
- }
5
+ export class Consent extends APIResource {}
@@ -2,27 +2,15 @@
2
2
 
3
3
  import { APIResource } from '../../resource';
4
4
  import * as AccountsAPI from './accounts';
5
- import { AccountListParams, AccountListResponse, Accounts } from './accounts';
5
+ import { Accounts } from './accounts';
6
6
  import * as BalancesAPI from './balances';
7
- import { BalanceListParams, BalanceListResponse, Balances } from './balances';
7
+ import { Balances } from './balances';
8
8
  import * as ConsentAPI from './consent';
9
- import {
10
- Consent,
11
- ConsentRetrieveParams,
12
- ConsentRetrieveResponse,
13
- ConsentRevokeParams,
14
- ConsentRevokeResponse,
15
- } from './consent';
9
+ import { Consent } from './consent';
16
10
  import * as SessionAPI from './session';
17
- import {
18
- Session,
19
- SessionCreateParams,
20
- SessionCreateResponse,
21
- SessionRetrieveParams,
22
- SessionRetrieveResponse,
23
- } from './session';
11
+ import { Session } from './session';
24
12
  import * as TransactionsAPI from './transactions';
25
- import { TransactionListParams, TransactionListResponse, Transactions } from './transactions';
13
+ import { Transactions } from './transactions';
26
14
 
27
15
  export class Data extends APIResource {
28
16
  session: SessionAPI.Session = new SessionAPI.Session(this._client);
@@ -39,37 +27,13 @@ Data.Transactions = Transactions;
39
27
  Data.Balances = Balances;
40
28
 
41
29
  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
- };
30
+ export { Session as Session };
49
31
 
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
- };
32
+ export { Consent as Consent };
57
33
 
58
- export {
59
- Accounts as Accounts,
60
- type AccountListResponse as AccountListResponse,
61
- type AccountListParams as AccountListParams,
62
- };
34
+ export { Accounts as Accounts };
63
35
 
64
- export {
65
- Transactions as Transactions,
66
- type TransactionListResponse as TransactionListResponse,
67
- type TransactionListParams as TransactionListParams,
68
- };
36
+ export { Transactions as Transactions };
69
37
 
70
- export {
71
- Balances as Balances,
72
- type BalanceListResponse as BalanceListResponse,
73
- type BalanceListParams as BalanceListParams,
74
- };
38
+ export { Balances as Balances };
75
39
  }
@@ -1,20 +1,8 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
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';
3
+ export { Accounts } from './accounts';
4
+ export { Balances } from './balances';
5
+ export { Consent } from './consent';
12
6
  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';
7
+ export { Session } from './session';
8
+ export { Transactions } from './transactions';