@getivy/node-sdk 0.1.0-alpha.8 → 1.0.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.
Files changed (150) hide show
  1. package/CHANGELOG.md +359 -0
  2. package/README.md +16 -26
  3. package/_shims/index.d.ts +2 -0
  4. package/_shims/index.js +5 -1
  5. package/_shims/index.mjs +5 -1
  6. package/core.d.ts +19 -5
  7. package/core.d.ts.map +1 -1
  8. package/core.js +25 -15
  9. package/core.js.map +1 -1
  10. package/core.mjs +26 -16
  11. package/core.mjs.map +1 -1
  12. package/index.d.mts +30 -18
  13. package/index.d.ts +30 -18
  14. package/index.d.ts.map +1 -1
  15. package/index.js +21 -8
  16. package/index.js.map +1 -1
  17. package/index.mjs +21 -8
  18. package/index.mjs.map +1 -1
  19. package/package.json +11 -33
  20. package/resource.d.ts +1 -1
  21. package/resource.d.ts.map +1 -1
  22. package/resource.js.map +1 -1
  23. package/resource.mjs.map +1 -1
  24. package/resources/balance.d.ts +8 -5
  25. package/resources/balance.d.ts.map +1 -1
  26. package/resources/banks.d.ts +82 -67
  27. package/resources/banks.d.ts.map +1 -1
  28. package/resources/beneficiary-payouts.d.ts +61 -0
  29. package/resources/beneficiary-payouts.d.ts.map +1 -0
  30. package/resources/beneficiary-payouts.js +16 -0
  31. package/resources/beneficiary-payouts.js.map +1 -0
  32. package/resources/beneficiary-payouts.mjs +12 -0
  33. package/resources/beneficiary-payouts.mjs.map +1 -0
  34. package/resources/capabilities.d.ts +1 -10
  35. package/resources/capabilities.d.ts.map +1 -1
  36. package/resources/charges.d.ts +28 -19
  37. package/resources/charges.d.ts.map +1 -1
  38. package/resources/checkoutsession.d.ts +275 -1360
  39. package/resources/checkoutsession.d.ts.map +1 -1
  40. package/resources/customers.d.ts +140 -10
  41. package/resources/customers.d.ts.map +1 -1
  42. package/resources/customers.js +9 -2
  43. package/resources/customers.js.map +1 -1
  44. package/resources/customers.mjs +9 -2
  45. package/resources/customers.mjs.map +1 -1
  46. package/resources/deposits.d.ts +165 -0
  47. package/resources/deposits.d.ts.map +1 -0
  48. package/resources/deposits.js +15 -0
  49. package/resources/deposits.js.map +1 -0
  50. package/resources/deposits.mjs +11 -0
  51. package/resources/deposits.mjs.map +1 -0
  52. package/resources/fx.d.ts +90 -0
  53. package/resources/fx.d.ts.map +1 -0
  54. package/resources/fx.js +22 -0
  55. package/resources/fx.js.map +1 -0
  56. package/resources/fx.mjs +18 -0
  57. package/resources/fx.mjs.map +1 -0
  58. package/resources/index.d.ts +11 -8
  59. package/resources/index.d.ts.map +1 -1
  60. package/resources/index.js +11 -5
  61. package/resources/index.js.map +1 -1
  62. package/resources/index.mjs +5 -2
  63. package/resources/index.mjs.map +1 -1
  64. package/resources/mandates.d.ts +55 -17
  65. package/resources/mandates.d.ts.map +1 -1
  66. package/resources/orders.d.ts +718 -739
  67. package/resources/orders.d.ts.map +1 -1
  68. package/resources/orders.js +13 -3
  69. package/resources/orders.js.map +1 -1
  70. package/resources/orders.mjs +13 -3
  71. package/resources/orders.mjs.map +1 -1
  72. package/resources/payouts.d.ts +219 -103
  73. package/resources/payouts.d.ts.map +1 -1
  74. package/resources/payouts.js +3 -4
  75. package/resources/payouts.js.map +1 -1
  76. package/resources/payouts.mjs +3 -4
  77. package/resources/payouts.mjs.map +1 -1
  78. package/resources/refunds.d.ts +53 -97
  79. package/resources/refunds.d.ts.map +1 -1
  80. package/resources/refunds.js +8 -12
  81. package/resources/refunds.js.map +1 -1
  82. package/resources/refunds.mjs +8 -12
  83. package/resources/refunds.mjs.map +1 -1
  84. package/resources/returns.d.ts +104 -0
  85. package/resources/returns.d.ts.map +1 -0
  86. package/resources/returns.js +21 -0
  87. package/resources/returns.js.map +1 -0
  88. package/resources/returns.mjs +17 -0
  89. package/resources/returns.mjs.map +1 -0
  90. package/resources/subaccounts.d.ts +15 -5
  91. package/resources/subaccounts.d.ts.map +1 -1
  92. package/resources/subaccounts.js.map +1 -1
  93. package/resources/subaccounts.mjs.map +1 -1
  94. package/resources/transactions.d.ts +174 -0
  95. package/resources/transactions.d.ts.map +1 -0
  96. package/resources/transactions.js +15 -0
  97. package/resources/transactions.js.map +1 -0
  98. package/resources/transactions.mjs +11 -0
  99. package/resources/transactions.mjs.map +1 -0
  100. package/resources.d.ts +2 -0
  101. package/resources.d.ts.map +1 -0
  102. package/resources.js +18 -0
  103. package/resources.js.map +1 -0
  104. package/resources.mjs +2 -0
  105. package/resources.mjs.map +1 -0
  106. package/src/_shims/index.d.ts +2 -0
  107. package/src/_shims/index.js +5 -1
  108. package/src/_shims/index.mjs +5 -1
  109. package/src/core.ts +44 -16
  110. package/src/index.ts +100 -63
  111. package/src/resource.ts +1 -1
  112. package/src/resources/balance.ts +8 -5
  113. package/src/resources/banks.ts +130 -67
  114. package/src/resources/beneficiary-payouts.ts +78 -0
  115. package/src/resources/capabilities.ts +1 -10
  116. package/src/resources/charges.ts +30 -21
  117. package/src/resources/checkoutsession.ts +1224 -3096
  118. package/src/resources/customers.ts +164 -9
  119. package/src/resources/deposits.ts +231 -0
  120. package/src/resources/fx.ts +119 -0
  121. package/src/resources/index.ts +31 -28
  122. package/src/resources/mandates.ts +79 -17
  123. package/src/resources/orders.ts +1448 -1072
  124. package/src/resources/payouts.ts +273 -103
  125. package/src/resources/refunds.ts +70 -111
  126. package/src/resources/returns.ts +140 -0
  127. package/src/resources/subaccounts.ts +26 -4
  128. package/src/resources/transactions.ts +234 -0
  129. package/src/resources.ts +1 -0
  130. package/src/version.ts +1 -1
  131. package/version.d.ts +1 -1
  132. package/version.d.ts.map +1 -1
  133. package/version.js +1 -1
  134. package/version.js.map +1 -1
  135. package/version.mjs +1 -1
  136. package/version.mjs.map +1 -1
  137. package/resources/reports.d.ts +0 -120
  138. package/resources/reports.d.ts.map +0 -1
  139. package/resources/reports.js +0 -31
  140. package/resources/reports.js.map +0 -1
  141. package/resources/reports.mjs +0 -27
  142. package/resources/reports.mjs.map +0 -1
  143. package/resources/webhooksubscription.d.ts +0 -155
  144. package/resources/webhooksubscription.d.ts.map +0 -1
  145. package/resources/webhooksubscription.js +0 -42
  146. package/resources/webhooksubscription.js.map +0 -1
  147. package/resources/webhooksubscription.mjs +0 -38
  148. package/resources/webhooksubscription.mjs.map +0 -1
  149. package/src/resources/reports.ts +0 -172
  150. package/src/resources/webhooksubscription.ts +0 -353
@@ -2,42 +2,32 @@
2
2
 
3
3
  import { APIResource } from '../resource';
4
4
  import * as Core from '../core';
5
- import * as RefundsAPI from './refunds';
6
5
 
7
6
  export class Refunds extends APIResource {
8
7
  /**
9
- * Initiates a refund for the specified order. The order can be specified either by
10
- * Ivy\'s internal `orderId` or by the `referenceId` provided by the merchant
11
- * during checkout creation. If the refund should only be partial, you can specifiy
12
- * this with the `amount` parameter.
8
+ * Creates a refund for the specified order. The order can be specified either by
9
+ * Ivy's internal `orderId` or by the `referenceId` provided by the merchant during
10
+ * checkout creation. If the refund should only be partial, you can specifiy this
11
+ * with the `amount` parameter.
13
12
  */
14
- create(body: RefundCreateParams, options?: Core.RequestOptions): Core.APIPromise<RefundResponse> {
15
- return this._client.post('/api/service/merchant/payment/refund', { body, ...options });
13
+ create(body: RefundCreateParams, options?: Core.RequestOptions): Core.APIPromise<RefundCreateResponse> {
14
+ return this._client.post('/api/service/refund/create', { body, ...options });
16
15
  }
17
16
 
18
17
  /**
19
- * Initiates a batch refund for all provided orders. The orders can be specified
20
- * either by Ivy\'s internal id ("orderId") or by id provided by the merchant
21
- * ("referenceId"). If only a partial amount should be refunded the desired amount
22
- * can be set with the "amount" parameter. Additional information regarding the
23
- * refund can be provided through the "description" parameter.
18
+ * Returns refund details and Id of refunded order.
24
19
  */
25
- batch(body: RefundBatchParams, options?: Core.RequestOptions): Core.APIPromise<RefundBatchResponse> {
26
- return this._client.post('/api/service/merchant/payment/refund/batch', { body, ...options });
20
+ retrieve(
21
+ body: RefundRetrieveParams,
22
+ options?: Core.RequestOptions,
23
+ ): Core.APIPromise<RefundRetrieveResponse> {
24
+ return this._client.post('/api/service/refund/retrieve', { body, ...options });
27
25
  }
28
26
  }
29
27
 
30
- export interface RefundResponse {
31
- /**
32
- * The internal Ivy id of the order.
33
- */
28
+ export interface Refund {
34
29
  orderId: string;
35
30
 
36
- /**
37
- * The order status. This status symbolises the state of the user's payment
38
- * attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
39
- * information.
40
- */
41
31
  orderStatus:
42
32
  | 'failed'
43
33
  | 'canceled'
@@ -52,132 +42,101 @@ export interface RefundResponse {
52
42
  | 'disputed'
53
43
  | 'refused';
54
44
 
45
+ referenceId: string;
46
+
47
+ refundStatus: 'pending' | 'succeeded' | 'failed' | 'requires_action' | 'partially_refunded';
48
+ }
49
+
50
+ export interface RefundCreateResponse {
55
51
  /**
56
- * A unique identifier for the newly created refund. You can use this id to
57
- * retrieve the refund from the order object.
52
+ * The unique Refund id
58
53
  */
59
- referenceId: string;
54
+ id: string;
60
55
 
61
56
  /**
62
- * The status of the refund. Always use the status of the order as your source of
63
- * truth to trigger actions in your dashboard.
57
+ * The amount of the refund in decimals.
64
58
  */
65
- refundStatus: 'pending' | 'succeeded' | 'failed' | 'requires_action' | 'partially_refunded';
66
- }
59
+ amount: number;
67
60
 
68
- export interface RefundBatchResponse {
69
61
  /**
70
- * An array of refund responses.
62
+ * Refund's currency.
71
63
  */
72
- requestedRefunds: Array<RefundBatchResponse.RequestedRefund>;
73
- }
64
+ currency: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
74
65
 
75
- export namespace RefundBatchResponse {
76
- export interface RequestedRefund extends RefundsAPI.RefundResponse {
77
- /**
78
- * The Ivy id of the corresponding order.
79
- */
80
- orderId: string;
81
-
82
- /**
83
- * The error message why the refund failed.
84
- */
85
- error?: string;
86
- }
66
+ /**
67
+ * The id of the refunded order
68
+ */
69
+ orderId: string;
70
+
71
+ /**
72
+ * The current status of this refund.
73
+ */
74
+ status: 'initiated' | 'pending' | 'succeeded' | 'failed';
87
75
  }
88
76
 
89
- export interface RefundCreateParams {
77
+ export interface RefundRetrieveResponse {
90
78
  /**
91
- * The amount to refund in decimals, e.g. 10.23 for EUR 10.23. If not specified,
92
- * the full order amount will be refunded.
79
+ * The unique Refund id
93
80
  */
94
- amount?: number;
81
+ id: string;
95
82
 
96
83
  /**
97
- * A description for the refund. This will be retrievable in the API and in the Ivy
98
- * dashboard.
84
+ * The amount of the refund in decimals.
99
85
  */
100
- description?: string;
86
+ amount: number;
101
87
 
102
88
  /**
103
- * An optional custom text that will be shown on the customer's payment reference.
104
- * Input has to be maximum 16 alpha-numeric characters. If not provided, a default
105
- * Ivy refund referenceId will be shown.
89
+ * Refund's currency.
90
+ */
91
+ currency: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
92
+
93
+ /**
94
+ * The id of the refunded order
95
+ */
96
+ orderId: string;
97
+
98
+ /**
99
+ * The current status of this refund.
106
100
  */
107
- displayedPaymentReference?: string;
101
+ status: 'initiated' | 'pending' | 'succeeded' | 'failed';
102
+ }
103
+
104
+ export interface RefundCreateParams {
105
+ amount: number;
108
106
 
109
107
  /**
110
- * The email of the customer. If provided, Ivy may use this email to contact the
111
- * customer directly in case of issues or need for clarification regarding the
112
- * refund. If not provided, Ivy will contact the merchant in such cases. However,
113
- * this is a rare occurrence.
108
+ * An optional custom text that will be shown on the customer's payment reference.
109
+ * Input has to be maximum 16 alpha-numeric characters. If not provided, a default
110
+ * Ivy refund referenceId will be shown.
114
111
  */
115
- email?: string;
112
+ bankStatementReference?: string;
116
113
 
117
114
  /**
118
- * The internal Ivy id of the order.
115
+ * The internal Ivy id of the order. Must be present in request body if referenceId
116
+ * is not provided
119
117
  */
120
118
  orderId?: string;
121
119
 
122
120
  /**
123
- * The external id set by the merchant during checkout creation.
121
+ * The external id set by the merchant during checkout creation. Required if
122
+ * orderId is not passed.
124
123
  */
125
124
  referenceId?: string;
126
125
  }
127
126
 
128
- export interface RefundBatchParams {
127
+ export interface RefundRetrieveParams {
129
128
  /**
130
- * An array of refunds to be triggered.
129
+ * Id of refund to retrieve details
131
130
  */
132
- requestedRefunds: Array<RefundBatchParams.RequestedRefund>;
133
- }
134
-
135
- export namespace RefundBatchParams {
136
- export interface RequestedRefund {
137
- /**
138
- * The amount to refund in decimals, e.g. 10.23 for EUR 10.23. If not specified,
139
- * the full order amount will be refunded.
140
- */
141
- amount?: number;
142
-
143
- /**
144
- * A description for the refund. This will be retrievable in the API and in the Ivy
145
- * dashboard.
146
- */
147
- description?: string;
148
-
149
- /**
150
- * An optional custom text that will be shown on the customer's payment reference.
151
- * Input has to be maximum 16 alpha-numeric characters. If not provided, a default
152
- * Ivy refund referenceId will be shown.
153
- */
154
- displayedPaymentReference?: string;
155
-
156
- /**
157
- * The email of the customer. If provided, Ivy may use this email to contact the
158
- * customer directly in case of issues or need for clarification regarding the
159
- * refund. If not provided, Ivy will contact the merchant in such cases. However,
160
- * this is a rare occurrence.
161
- */
162
- email?: string;
163
-
164
- /**
165
- * The internal Ivy id of the order.
166
- */
167
- orderId?: string;
168
-
169
- /**
170
- * The external id set by the merchant during checkout creation.
171
- */
172
- referenceId?: string;
173
- }
131
+ id: string;
174
132
  }
175
133
 
176
134
  export declare namespace Refunds {
177
135
  export {
178
- type RefundResponse as RefundResponse,
179
- type RefundBatchResponse as RefundBatchResponse,
136
+ type Refund as Refund,
137
+ type RefundCreateResponse as RefundCreateResponse,
138
+ type RefundRetrieveResponse as RefundRetrieveResponse,
180
139
  type RefundCreateParams as RefundCreateParams,
181
- type RefundBatchParams as RefundBatchParams,
140
+ type RefundRetrieveParams as RefundRetrieveParams,
182
141
  };
183
142
  }
@@ -0,0 +1,140 @@
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 Returns extends APIResource {
7
+ /**
8
+ * Creates a return for a deposit.
9
+ */
10
+ create(body: ReturnCreateParams, options?: Core.RequestOptions): Core.APIPromise<ReturnCreateResponse> {
11
+ return this._client.post('/api/service/return/create', { body, ...options });
12
+ }
13
+
14
+ /**
15
+ * Retrieves a return by its ID.
16
+ */
17
+ retrieve(
18
+ body: ReturnRetrieveParams,
19
+ options?: Core.RequestOptions,
20
+ ): Core.APIPromise<ReturnRetrieveResponse> {
21
+ return this._client.post('/api/service/return/retrieve', { body, ...options });
22
+ }
23
+ }
24
+
25
+ export interface ReturnCreateResponse {
26
+ /**
27
+ * The ID of the return
28
+ */
29
+ id: string;
30
+
31
+ /**
32
+ * The amount of the return
33
+ */
34
+ amount: number;
35
+
36
+ /**
37
+ * The date and time the return was created
38
+ */
39
+ createdAt: string;
40
+
41
+ /**
42
+ * The currency of the return
43
+ */
44
+ currency: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
45
+
46
+ /**
47
+ * The ID of the associated deposit
48
+ */
49
+ depositId: string;
50
+
51
+ /**
52
+ * The status of the return
53
+ */
54
+ status: 'initiated' | 'succeeded' | 'failed' | 'returned';
55
+
56
+ /**
57
+ * The date and time the return failed if applicable
58
+ */
59
+ failedAt?: string;
60
+
61
+ /**
62
+ * The date and time the return succeeded if applicable
63
+ */
64
+ succeededAt?: string;
65
+
66
+ /**
67
+ * The ID of the resulting return transaction
68
+ */
69
+ transactionId?: string;
70
+ }
71
+
72
+ export interface ReturnRetrieveResponse {
73
+ /**
74
+ * The ID of the return
75
+ */
76
+ id: string;
77
+
78
+ /**
79
+ * The amount of the return
80
+ */
81
+ amount: number;
82
+
83
+ /**
84
+ * The date and time the return was created
85
+ */
86
+ createdAt: string;
87
+
88
+ /**
89
+ * The currency of the return
90
+ */
91
+ currency: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
92
+
93
+ /**
94
+ * The ID of the associated deposit
95
+ */
96
+ depositId: string;
97
+
98
+ /**
99
+ * The status of the return
100
+ */
101
+ status: 'initiated' | 'succeeded' | 'failed' | 'returned';
102
+
103
+ /**
104
+ * The date and time the return failed if applicable
105
+ */
106
+ failedAt?: string;
107
+
108
+ /**
109
+ * The date and time the return succeeded if applicable
110
+ */
111
+ succeededAt?: string;
112
+
113
+ /**
114
+ * The ID of the resulting return transaction
115
+ */
116
+ transactionId?: string;
117
+ }
118
+
119
+ export interface ReturnCreateParams {
120
+ /**
121
+ * The ID of the associated deposit
122
+ */
123
+ depositId: string;
124
+ }
125
+
126
+ export interface ReturnRetrieveParams {
127
+ /**
128
+ * The ID of the return
129
+ */
130
+ id: string;
131
+ }
132
+
133
+ export declare namespace Returns {
134
+ export {
135
+ type ReturnCreateResponse as ReturnCreateResponse,
136
+ type ReturnRetrieveResponse as ReturnRetrieveResponse,
137
+ type ReturnCreateParams as ReturnCreateParams,
138
+ type ReturnRetrieveParams as ReturnRetrieveParams,
139
+ };
140
+ }
@@ -8,7 +8,10 @@ export class Subaccounts extends APIResource {
8
8
  * Create a Subaccount which can be used to reconcile orders, refunds and payouts
9
9
  * more easily.
10
10
  */
11
- create(body: SubaccountCreateParams, options?: Core.RequestOptions): Core.APIPromise<Subaccount> {
11
+ create(
12
+ body: SubaccountCreateParams,
13
+ options?: Core.RequestOptions,
14
+ ): Core.APIPromise<SubaccountCreateResponse> {
12
15
  return this._client.post('/api/service/subaccount/create', { body, ...options });
13
16
  }
14
17
 
@@ -23,17 +26,35 @@ export class Subaccounts extends APIResource {
23
26
  export interface Subaccount {
24
27
  id: string;
25
28
 
29
+ createdAt: unknown;
30
+
26
31
  legalName: string;
27
32
 
28
33
  mcc: string;
29
34
 
30
- ownerId: string;
35
+ ownerId: unknown;
31
36
 
32
37
  status: 'active' | 'inactive';
33
38
 
34
- createdAt?: string;
39
+ updatedAt: unknown;
40
+
41
+ websiteUrl?: string;
42
+ }
43
+
44
+ export interface SubaccountCreateResponse {
45
+ id: string;
46
+
47
+ createdAt: unknown;
48
+
49
+ legalName: string;
50
+
51
+ mcc: string;
52
+
53
+ ownerId: unknown;
54
+
55
+ status: 'active' | 'inactive';
35
56
 
36
- updatedAt?: string;
57
+ updatedAt: unknown;
37
58
 
38
59
  websiteUrl?: string;
39
60
  }
@@ -67,6 +88,7 @@ export interface SubaccountRetrieveParams {
67
88
  export declare namespace Subaccounts {
68
89
  export {
69
90
  type Subaccount as Subaccount,
91
+ type SubaccountCreateResponse as SubaccountCreateResponse,
70
92
  type SubaccountCreateParams as SubaccountCreateParams,
71
93
  type SubaccountRetrieveParams as SubaccountRetrieveParams,
72
94
  };
@@ -0,0 +1,234 @@
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 Transactions extends APIResource {
7
+ /**
8
+ * Retrieve a paginated list of transactions for the specified time period
9
+ */
10
+ list(body: TransactionListParams, options?: Core.RequestOptions): Core.APIPromise<TransactionListResponse> {
11
+ return this._client.post('/api/service/transaction/list', { body, ...options });
12
+ }
13
+ }
14
+
15
+ export interface TransactionListResponse {
16
+ /**
17
+ * Array of transactions
18
+ */
19
+ data: Array<TransactionListResponse.Data>;
20
+
21
+ /**
22
+ * Pagination information
23
+ */
24
+ paging: TransactionListResponse.Paging;
25
+ }
26
+
27
+ export namespace TransactionListResponse {
28
+ export interface Data {
29
+ /**
30
+ * Transaction identifier
31
+ */
32
+ id: string;
33
+
34
+ /**
35
+ * Amount of the transaction
36
+ */
37
+ amount: string;
38
+
39
+ /**
40
+ * Balance information
41
+ */
42
+ balance: Data.Balance;
43
+
44
+ /**
45
+ * Bank statement reference
46
+ */
47
+ bankStatementReference: string;
48
+
49
+ /**
50
+ * Creditor account details
51
+ */
52
+ creditor: Data.Creditor;
53
+
54
+ /**
55
+ * ISO 4217 currency code
56
+ */
57
+ currency: string;
58
+
59
+ /**
60
+ * Debtor account details
61
+ */
62
+ debtor: Data.Debtor;
63
+
64
+ /**
65
+ * Side of the transaction
66
+ */
67
+ side: 'credit' | 'debit';
68
+
69
+ /**
70
+ * Transaction date as unix timestamp
71
+ */
72
+ transactionDate: number;
73
+ }
74
+
75
+ export namespace Data {
76
+ /**
77
+ * Balance information
78
+ */
79
+ export interface Balance {
80
+ /**
81
+ * Balance after the transaction
82
+ */
83
+ after: string;
84
+
85
+ /**
86
+ * Balance before the transaction
87
+ */
88
+ before: string;
89
+ }
90
+
91
+ /**
92
+ * Creditor account details
93
+ */
94
+ export interface Creditor {
95
+ /**
96
+ * Type of financial address
97
+ */
98
+ type: 'iban' | 'sort_code' | 'bank_code' | 'bban';
99
+
100
+ bankCode?: Creditor.BankCode;
101
+
102
+ bban?: Creditor.Bban;
103
+
104
+ iban?: Creditor.Iban;
105
+
106
+ sortCode?: Creditor.SortCode;
107
+ }
108
+
109
+ export namespace Creditor {
110
+ export interface BankCode {
111
+ accountHolderName: string;
112
+
113
+ accountNumber: string;
114
+
115
+ code: string;
116
+ }
117
+
118
+ export interface Bban {
119
+ accountHolderName: string;
120
+
121
+ bban: string;
122
+
123
+ bic?: string;
124
+ }
125
+
126
+ export interface Iban {
127
+ accountHolderName: string;
128
+
129
+ iban: string;
130
+
131
+ bic?: string;
132
+ }
133
+
134
+ export interface SortCode {
135
+ accountHolderName: string;
136
+
137
+ accountNumber: string;
138
+
139
+ sortCode: string;
140
+ }
141
+ }
142
+
143
+ /**
144
+ * Debtor account details
145
+ */
146
+ export interface Debtor {
147
+ /**
148
+ * Type of financial address
149
+ */
150
+ type: 'iban' | 'sort_code' | 'bank_code' | 'bban';
151
+
152
+ bankCode?: Debtor.BankCode;
153
+
154
+ bban?: Debtor.Bban;
155
+
156
+ iban?: Debtor.Iban;
157
+
158
+ sortCode?: Debtor.SortCode;
159
+ }
160
+
161
+ export namespace Debtor {
162
+ export interface BankCode {
163
+ accountHolderName: string;
164
+
165
+ accountNumber: string;
166
+
167
+ code: string;
168
+ }
169
+
170
+ export interface Bban {
171
+ accountHolderName: string;
172
+
173
+ bban: string;
174
+
175
+ bic?: string;
176
+ }
177
+
178
+ export interface Iban {
179
+ accountHolderName: string;
180
+
181
+ iban: string;
182
+
183
+ bic?: string;
184
+ }
185
+
186
+ export interface SortCode {
187
+ accountHolderName: string;
188
+
189
+ accountNumber: string;
190
+
191
+ sortCode: string;
192
+ }
193
+ }
194
+ }
195
+
196
+ /**
197
+ * Pagination information
198
+ */
199
+ export interface Paging {
200
+ /**
201
+ * Whether there are more transactions available
202
+ */
203
+ hasNext: boolean;
204
+
205
+ /**
206
+ * Cursor for the next page of results
207
+ */
208
+ nextCursor?: string;
209
+ }
210
+ }
211
+
212
+ export interface TransactionListParams {
213
+ /**
214
+ * Start timestamp (inclusive) - unix timestamp
215
+ */
216
+ from: number;
217
+
218
+ /**
219
+ * End timestamp (exclusive) - unix timestamp
220
+ */
221
+ to: number;
222
+
223
+ /**
224
+ * Cursor for pagination
225
+ */
226
+ afterCursor?: string;
227
+ }
228
+
229
+ export declare namespace Transactions {
230
+ export {
231
+ type TransactionListResponse as TransactionListResponse,
232
+ type TransactionListParams as TransactionListParams,
233
+ };
234
+ }
@@ -0,0 +1 @@
1
+ export * from './resources/index';
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.1.0-alpha.8'; // x-release-please-version
1
+ export const VERSION = '1.0.0'; // x-release-please-version
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.1.0-alpha.8";
1
+ export declare const VERSION = "1.0.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,kBAAkB,CAAC"}
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,UAAU,CAAC"}
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.1.0-alpha.8'; // x-release-please-version
4
+ exports.VERSION = '1.0.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map