@augustusbank/typescript-sdk 0.16.0 → 0.17.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 +14 -0
- package/client.d.mts +3 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +3 -0
- package/client.d.ts.map +1 -1
- package/client.js +3 -0
- package/client.js.map +1 -1
- package/client.mjs +3 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/api-keys.d.mts +1 -1
- package/resources/api-keys.d.mts.map +1 -1
- package/resources/api-keys.d.ts +1 -1
- package/resources/api-keys.d.ts.map +1 -1
- package/resources/index.d.mts +1 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/scopes.d.mts +1 -1
- package/resources/scopes.d.mts.map +1 -1
- package/resources/scopes.d.ts +1 -1
- package/resources/scopes.d.ts.map +1 -1
- package/resources/transactions.d.mts +298 -0
- package/resources/transactions.d.mts.map +1 -0
- package/resources/transactions.d.ts +298 -0
- package/resources/transactions.d.ts.map +1 -0
- package/resources/transactions.js +26 -0
- package/resources/transactions.js.map +1 -0
- package/resources/transactions.mjs +22 -0
- package/resources/transactions.mjs.map +1 -0
- package/src/client.ts +17 -0
- package/src/resources/api-keys.ts +1 -0
- package/src/resources/index.ts +7 -0
- package/src/resources/scopes.ts +2 -1
- package/src/resources/transactions.ts +405 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/resources/scopes.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export declare namespace ScopeListResponse {
|
|
|
19
19
|
/**
|
|
20
20
|
* Scope identifier in `resource:action` format.
|
|
21
21
|
*/
|
|
22
|
-
id: 'payouts:read' | 'payouts:write' | 'deposits:read' | 'returns:read' | 'returns:write' | 'conversions:read' | 'conversions:write' | 'quotes:read' | 'accounts:read' | 'accounts:write' | 'account_programs:read' | 'webhook_subscriptions:read' | 'webhook_subscriptions:write' | 'events:read' | 'webhook_deliveries:read' | 'webhook_deliveries:write';
|
|
22
|
+
id: 'payouts:read' | 'payouts:write' | 'deposits:read' | 'returns:read' | 'returns:write' | 'conversions:read' | 'conversions:write' | 'quotes:read' | 'accounts:read' | 'accounts:write' | 'account_programs:read' | 'webhook_subscriptions:read' | 'webhook_subscriptions:write' | 'events:read' | 'webhook_deliveries:read' | 'webhook_deliveries:write' | 'transactions:read';
|
|
23
23
|
/**
|
|
24
24
|
* Action category.
|
|
25
25
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scopes.d.ts","sourceRoot":"","sources":["../src/resources/scopes.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAE7D,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;OAIG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,iBAAiB,CAAC;CAG9D;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,KAAK,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAEpC,QAAQ,EAAE,OAAO,CAAC;IAElB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,yBAAiB,iBAAiB,CAAC;IACjC,UAAiB,IAAI;QACnB;;WAEG;QACH,EAAE,EACE,cAAc,GACd,eAAe,GACf,eAAe,GACf,cAAc,GACd,eAAe,GACf,kBAAkB,GAClB,mBAAmB,GACnB,aAAa,GACb,eAAe,GACf,gBAAgB,GAChB,uBAAuB,GACvB,4BAA4B,GAC5B,6BAA6B,GAC7B,aAAa,GACb,yBAAyB,GAC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|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
|
+
import { CursorPage, type CursorPageParams, PagePromise } from "../core/pagination.mjs";
|
|
4
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
5
|
+
export declare class Transactions extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Retrieves a transaction by ID.
|
|
8
|
+
*/
|
|
9
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<TransactionRetrieveResponse>;
|
|
10
|
+
/**
|
|
11
|
+
* Lists transactions for an account with cursor-based pagination.
|
|
12
|
+
*/
|
|
13
|
+
list(query: TransactionListParams, options?: RequestOptions): PagePromise<TransactionListResponsesCursorPage, TransactionListResponse>;
|
|
14
|
+
}
|
|
15
|
+
export type TransactionListResponsesCursorPage = CursorPage<TransactionListResponse>;
|
|
16
|
+
export interface TransactionRetrieveResponse {
|
|
17
|
+
/**
|
|
18
|
+
* Unique identifier of the transaction.
|
|
19
|
+
*/
|
|
20
|
+
id: string;
|
|
21
|
+
/**
|
|
22
|
+
* ID of the merchant account this transaction settled on.
|
|
23
|
+
*/
|
|
24
|
+
account_id: string;
|
|
25
|
+
/**
|
|
26
|
+
* Absolute amount as a string decimal (e.g. "100.50").
|
|
27
|
+
*/
|
|
28
|
+
amount: string;
|
|
29
|
+
/**
|
|
30
|
+
* Reference visible on the bank statement, or null when not applicable.
|
|
31
|
+
*/
|
|
32
|
+
bank_statement_reference: string | null;
|
|
33
|
+
/**
|
|
34
|
+
* Bank account or wallet of the other party, or null when not known.
|
|
35
|
+
*/
|
|
36
|
+
counterparty: TransactionRetrieveResponse.UnionMember0 | TransactionRetrieveResponse.UnionMember1 | TransactionRetrieveResponse.UnionMember2 | TransactionRetrieveResponse.UnionMember3 | null;
|
|
37
|
+
/**
|
|
38
|
+
* ISO 8601 UTC timestamp when the transaction was recorded.
|
|
39
|
+
*/
|
|
40
|
+
created_at: string;
|
|
41
|
+
/**
|
|
42
|
+
* ISO 4217 fiat or crypto currency code of the amount.
|
|
43
|
+
*/
|
|
44
|
+
currency: 'EUR' | 'GBP' | 'USD' | 'USDC' | 'BTC' | 'ETH' | 'SOL' | 'POL';
|
|
45
|
+
/**
|
|
46
|
+
* The product that caused this transaction, or null when no product is linked.
|
|
47
|
+
*/
|
|
48
|
+
product: TransactionRetrieveResponse.Product | null;
|
|
49
|
+
/**
|
|
50
|
+
* Direction of the movement relative to the merchant account.
|
|
51
|
+
*/
|
|
52
|
+
side: 'credit' | 'debit';
|
|
53
|
+
/**
|
|
54
|
+
* Lifecycle state of the transaction.
|
|
55
|
+
*/
|
|
56
|
+
status: 'pending' | 'completed' | 'failed';
|
|
57
|
+
/**
|
|
58
|
+
* Resource type discriminator.
|
|
59
|
+
*/
|
|
60
|
+
type: 'transaction';
|
|
61
|
+
}
|
|
62
|
+
export declare namespace TransactionRetrieveResponse {
|
|
63
|
+
interface UnionMember0 {
|
|
64
|
+
/**
|
|
65
|
+
* Name of the account holder.
|
|
66
|
+
*/
|
|
67
|
+
account_holder_name: string;
|
|
68
|
+
/**
|
|
69
|
+
* Bank Identifier Code, or null if not provided.
|
|
70
|
+
*/
|
|
71
|
+
bic: string | null;
|
|
72
|
+
/**
|
|
73
|
+
* International Bank Account Number.
|
|
74
|
+
*/
|
|
75
|
+
iban: string;
|
|
76
|
+
/**
|
|
77
|
+
* Discriminator for IBAN financial address.
|
|
78
|
+
*/
|
|
79
|
+
type: 'iban';
|
|
80
|
+
}
|
|
81
|
+
interface UnionMember1 {
|
|
82
|
+
/**
|
|
83
|
+
* Name of the account holder.
|
|
84
|
+
*/
|
|
85
|
+
account_holder_name: string;
|
|
86
|
+
/**
|
|
87
|
+
* UK account number (8 digits).
|
|
88
|
+
*/
|
|
89
|
+
account_number: string;
|
|
90
|
+
/**
|
|
91
|
+
* UK sort code (6 digits).
|
|
92
|
+
*/
|
|
93
|
+
sort_code: string;
|
|
94
|
+
/**
|
|
95
|
+
* Discriminator for UK sort code financial address.
|
|
96
|
+
*/
|
|
97
|
+
type: 'sort_code';
|
|
98
|
+
}
|
|
99
|
+
interface UnionMember2 {
|
|
100
|
+
/**
|
|
101
|
+
* Name of the account holder.
|
|
102
|
+
*/
|
|
103
|
+
account_holder_name: string;
|
|
104
|
+
/**
|
|
105
|
+
* Bank account number.
|
|
106
|
+
*/
|
|
107
|
+
account_number: string;
|
|
108
|
+
/**
|
|
109
|
+
* ABA routing number (9 digits).
|
|
110
|
+
*/
|
|
111
|
+
routing_number: string;
|
|
112
|
+
/**
|
|
113
|
+
* Discriminator for ABA wire financial address.
|
|
114
|
+
*/
|
|
115
|
+
type: 'aba';
|
|
116
|
+
}
|
|
117
|
+
interface UnionMember3 {
|
|
118
|
+
/**
|
|
119
|
+
* Wallet address on the specified blockchain.
|
|
120
|
+
*/
|
|
121
|
+
address: string;
|
|
122
|
+
/**
|
|
123
|
+
* Blockchain network for the crypto wallet.
|
|
124
|
+
*/
|
|
125
|
+
blockchain: 'bitcoin' | 'ethereum' | 'solana' | 'polygon' | 'bitcoin_testnet4' | 'ethereum_sepolia' | 'solana_devnet' | 'polygon_amoy';
|
|
126
|
+
/**
|
|
127
|
+
* Discriminator for crypto wallet financial address.
|
|
128
|
+
*/
|
|
129
|
+
type: 'crypto_wallet';
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* The product that caused this transaction, or null when no product is linked.
|
|
133
|
+
*/
|
|
134
|
+
interface Product {
|
|
135
|
+
/**
|
|
136
|
+
* Identifier of the product resource that caused this transaction.
|
|
137
|
+
*/
|
|
138
|
+
id: string;
|
|
139
|
+
/**
|
|
140
|
+
* Type of the product that caused this transaction.
|
|
141
|
+
*/
|
|
142
|
+
type: 'deposit' | 'deposit_return' | 'refund' | 'payout';
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
export interface TransactionListResponse {
|
|
146
|
+
/**
|
|
147
|
+
* Unique identifier of the transaction.
|
|
148
|
+
*/
|
|
149
|
+
id: string;
|
|
150
|
+
/**
|
|
151
|
+
* ID of the merchant account this transaction settled on.
|
|
152
|
+
*/
|
|
153
|
+
account_id: string;
|
|
154
|
+
/**
|
|
155
|
+
* Absolute amount as a string decimal (e.g. "100.50").
|
|
156
|
+
*/
|
|
157
|
+
amount: string;
|
|
158
|
+
/**
|
|
159
|
+
* Reference visible on the bank statement, or null when not applicable.
|
|
160
|
+
*/
|
|
161
|
+
bank_statement_reference: string | null;
|
|
162
|
+
/**
|
|
163
|
+
* Bank account or wallet of the other party, or null when not known.
|
|
164
|
+
*/
|
|
165
|
+
counterparty: TransactionListResponse.UnionMember0 | TransactionListResponse.UnionMember1 | TransactionListResponse.UnionMember2 | TransactionListResponse.UnionMember3 | null;
|
|
166
|
+
/**
|
|
167
|
+
* ISO 8601 UTC timestamp when the transaction was recorded.
|
|
168
|
+
*/
|
|
169
|
+
created_at: string;
|
|
170
|
+
/**
|
|
171
|
+
* ISO 4217 fiat or crypto currency code of the amount.
|
|
172
|
+
*/
|
|
173
|
+
currency: 'EUR' | 'GBP' | 'USD' | 'USDC' | 'BTC' | 'ETH' | 'SOL' | 'POL';
|
|
174
|
+
/**
|
|
175
|
+
* The product that caused this transaction, or null when no product is linked.
|
|
176
|
+
*/
|
|
177
|
+
product: TransactionListResponse.Product | null;
|
|
178
|
+
/**
|
|
179
|
+
* Direction of the movement relative to the merchant account.
|
|
180
|
+
*/
|
|
181
|
+
side: 'credit' | 'debit';
|
|
182
|
+
/**
|
|
183
|
+
* Lifecycle state of the transaction.
|
|
184
|
+
*/
|
|
185
|
+
status: 'pending' | 'completed' | 'failed';
|
|
186
|
+
/**
|
|
187
|
+
* Resource type discriminator.
|
|
188
|
+
*/
|
|
189
|
+
type: 'transaction';
|
|
190
|
+
}
|
|
191
|
+
export declare namespace TransactionListResponse {
|
|
192
|
+
interface UnionMember0 {
|
|
193
|
+
/**
|
|
194
|
+
* Name of the account holder.
|
|
195
|
+
*/
|
|
196
|
+
account_holder_name: string;
|
|
197
|
+
/**
|
|
198
|
+
* Bank Identifier Code, or null if not provided.
|
|
199
|
+
*/
|
|
200
|
+
bic: string | null;
|
|
201
|
+
/**
|
|
202
|
+
* International Bank Account Number.
|
|
203
|
+
*/
|
|
204
|
+
iban: string;
|
|
205
|
+
/**
|
|
206
|
+
* Discriminator for IBAN financial address.
|
|
207
|
+
*/
|
|
208
|
+
type: 'iban';
|
|
209
|
+
}
|
|
210
|
+
interface UnionMember1 {
|
|
211
|
+
/**
|
|
212
|
+
* Name of the account holder.
|
|
213
|
+
*/
|
|
214
|
+
account_holder_name: string;
|
|
215
|
+
/**
|
|
216
|
+
* UK account number (8 digits).
|
|
217
|
+
*/
|
|
218
|
+
account_number: string;
|
|
219
|
+
/**
|
|
220
|
+
* UK sort code (6 digits).
|
|
221
|
+
*/
|
|
222
|
+
sort_code: string;
|
|
223
|
+
/**
|
|
224
|
+
* Discriminator for UK sort code financial address.
|
|
225
|
+
*/
|
|
226
|
+
type: 'sort_code';
|
|
227
|
+
}
|
|
228
|
+
interface UnionMember2 {
|
|
229
|
+
/**
|
|
230
|
+
* Name of the account holder.
|
|
231
|
+
*/
|
|
232
|
+
account_holder_name: string;
|
|
233
|
+
/**
|
|
234
|
+
* Bank account number.
|
|
235
|
+
*/
|
|
236
|
+
account_number: string;
|
|
237
|
+
/**
|
|
238
|
+
* ABA routing number (9 digits).
|
|
239
|
+
*/
|
|
240
|
+
routing_number: string;
|
|
241
|
+
/**
|
|
242
|
+
* Discriminator for ABA wire financial address.
|
|
243
|
+
*/
|
|
244
|
+
type: 'aba';
|
|
245
|
+
}
|
|
246
|
+
interface UnionMember3 {
|
|
247
|
+
/**
|
|
248
|
+
* Wallet address on the specified blockchain.
|
|
249
|
+
*/
|
|
250
|
+
address: string;
|
|
251
|
+
/**
|
|
252
|
+
* Blockchain network for the crypto wallet.
|
|
253
|
+
*/
|
|
254
|
+
blockchain: 'bitcoin' | 'ethereum' | 'solana' | 'polygon' | 'bitcoin_testnet4' | 'ethereum_sepolia' | 'solana_devnet' | 'polygon_amoy';
|
|
255
|
+
/**
|
|
256
|
+
* Discriminator for crypto wallet financial address.
|
|
257
|
+
*/
|
|
258
|
+
type: 'crypto_wallet';
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* The product that caused this transaction, or null when no product is linked.
|
|
262
|
+
*/
|
|
263
|
+
interface Product {
|
|
264
|
+
/**
|
|
265
|
+
* Identifier of the product resource that caused this transaction.
|
|
266
|
+
*/
|
|
267
|
+
id: string;
|
|
268
|
+
/**
|
|
269
|
+
* Type of the product that caused this transaction.
|
|
270
|
+
*/
|
|
271
|
+
type: 'deposit' | 'deposit_return' | 'refund' | 'payout';
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
export interface TransactionListParams extends CursorPageParams {
|
|
275
|
+
/**
|
|
276
|
+
* Account to list transactions for.
|
|
277
|
+
*/
|
|
278
|
+
account_id: string;
|
|
279
|
+
created_at?: TransactionListParams.CreatedAt;
|
|
280
|
+
}
|
|
281
|
+
export declare namespace TransactionListParams {
|
|
282
|
+
interface CreatedAt {
|
|
283
|
+
/**
|
|
284
|
+
* Include transactions whose created_at is greater than or equal to this ISO 8601
|
|
285
|
+
* timestamp.
|
|
286
|
+
*/
|
|
287
|
+
gte?: string;
|
|
288
|
+
/**
|
|
289
|
+
* Include transactions whose created_at is less than or equal to this ISO 8601
|
|
290
|
+
* timestamp.
|
|
291
|
+
*/
|
|
292
|
+
lte?: string;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
export declare namespace Transactions {
|
|
296
|
+
export { type TransactionRetrieveResponse as TransactionRetrieveResponse, type TransactionListResponse as TransactionListResponse, type TransactionListResponsesCursorPage as TransactionListResponsesCursorPage, type TransactionListParams as TransactionListParams, };
|
|
297
|
+
}
|
|
298
|
+
//# sourceMappingURL=transactions.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transactions.d.mts","sourceRoot":"","sources":["../src/resources/transactions.ts"],"names":[],"mappings":"AAEA,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C;QAEvB;;WAEG;QACH,IAAI,EAAE,KAAK,CAAC;KACb;IAED,UAAiB,YAAY;QAC3B;;WAEG;QACH,OAAO,EAAE,MAAM,CAAC;QAEhB;;WAEG;QACH,UAAU,EACN,SAAS,GACT,UAAU,GACV,QAAQ,GACR,SAAS,GACT,kBAAkB,GAClB,kBAAkB,GAClB,eAAe,GACf,cAAc,CAAC;QAEnB;;WAEG;QACH,IAAI,EAAE,eAAe,CAAC;KACvB;IAED;;OAEG;IACH,UAAiB,OAAO;QACtB;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;QAEX;;WAEG;QACH,IAAI,EAAE,SAAS,GAAG,gBAAgB,GAAG,QAAQ,GAAG,QAAQ,CAAC;KAC1D;CACF;AAED,MAAM,WAAW,qBAAsB,SAAQ,gBAAgB;IAC7D;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB,UAAU,CAAC,EAAE,qBAAqB,CAAC,SAAS,CAAC;CAC9C;AAED,yBAAiB,qBAAqB,CAAC;IACrC,UAAiB,SAAS;QACxB;;;WAGG;QACH,GAAG,CAAC,EAAE,MAAM,CAAC;QAEb;;;WAGG;QACH,GAAG,CAAC,EAAE,MAAM,CAAC;KACd;CACF;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,kCAAkC,IAAI,kCAAkC,EAC7E,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;CACH"}
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.js";
|
|
3
|
+
import { CursorPage, type CursorPageParams, PagePromise } from "../core/pagination.js";
|
|
4
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
5
|
+
export declare class Transactions extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Retrieves a transaction by ID.
|
|
8
|
+
*/
|
|
9
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<TransactionRetrieveResponse>;
|
|
10
|
+
/**
|
|
11
|
+
* Lists transactions for an account with cursor-based pagination.
|
|
12
|
+
*/
|
|
13
|
+
list(query: TransactionListParams, options?: RequestOptions): PagePromise<TransactionListResponsesCursorPage, TransactionListResponse>;
|
|
14
|
+
}
|
|
15
|
+
export type TransactionListResponsesCursorPage = CursorPage<TransactionListResponse>;
|
|
16
|
+
export interface TransactionRetrieveResponse {
|
|
17
|
+
/**
|
|
18
|
+
* Unique identifier of the transaction.
|
|
19
|
+
*/
|
|
20
|
+
id: string;
|
|
21
|
+
/**
|
|
22
|
+
* ID of the merchant account this transaction settled on.
|
|
23
|
+
*/
|
|
24
|
+
account_id: string;
|
|
25
|
+
/**
|
|
26
|
+
* Absolute amount as a string decimal (e.g. "100.50").
|
|
27
|
+
*/
|
|
28
|
+
amount: string;
|
|
29
|
+
/**
|
|
30
|
+
* Reference visible on the bank statement, or null when not applicable.
|
|
31
|
+
*/
|
|
32
|
+
bank_statement_reference: string | null;
|
|
33
|
+
/**
|
|
34
|
+
* Bank account or wallet of the other party, or null when not known.
|
|
35
|
+
*/
|
|
36
|
+
counterparty: TransactionRetrieveResponse.UnionMember0 | TransactionRetrieveResponse.UnionMember1 | TransactionRetrieveResponse.UnionMember2 | TransactionRetrieveResponse.UnionMember3 | null;
|
|
37
|
+
/**
|
|
38
|
+
* ISO 8601 UTC timestamp when the transaction was recorded.
|
|
39
|
+
*/
|
|
40
|
+
created_at: string;
|
|
41
|
+
/**
|
|
42
|
+
* ISO 4217 fiat or crypto currency code of the amount.
|
|
43
|
+
*/
|
|
44
|
+
currency: 'EUR' | 'GBP' | 'USD' | 'USDC' | 'BTC' | 'ETH' | 'SOL' | 'POL';
|
|
45
|
+
/**
|
|
46
|
+
* The product that caused this transaction, or null when no product is linked.
|
|
47
|
+
*/
|
|
48
|
+
product: TransactionRetrieveResponse.Product | null;
|
|
49
|
+
/**
|
|
50
|
+
* Direction of the movement relative to the merchant account.
|
|
51
|
+
*/
|
|
52
|
+
side: 'credit' | 'debit';
|
|
53
|
+
/**
|
|
54
|
+
* Lifecycle state of the transaction.
|
|
55
|
+
*/
|
|
56
|
+
status: 'pending' | 'completed' | 'failed';
|
|
57
|
+
/**
|
|
58
|
+
* Resource type discriminator.
|
|
59
|
+
*/
|
|
60
|
+
type: 'transaction';
|
|
61
|
+
}
|
|
62
|
+
export declare namespace TransactionRetrieveResponse {
|
|
63
|
+
interface UnionMember0 {
|
|
64
|
+
/**
|
|
65
|
+
* Name of the account holder.
|
|
66
|
+
*/
|
|
67
|
+
account_holder_name: string;
|
|
68
|
+
/**
|
|
69
|
+
* Bank Identifier Code, or null if not provided.
|
|
70
|
+
*/
|
|
71
|
+
bic: string | null;
|
|
72
|
+
/**
|
|
73
|
+
* International Bank Account Number.
|
|
74
|
+
*/
|
|
75
|
+
iban: string;
|
|
76
|
+
/**
|
|
77
|
+
* Discriminator for IBAN financial address.
|
|
78
|
+
*/
|
|
79
|
+
type: 'iban';
|
|
80
|
+
}
|
|
81
|
+
interface UnionMember1 {
|
|
82
|
+
/**
|
|
83
|
+
* Name of the account holder.
|
|
84
|
+
*/
|
|
85
|
+
account_holder_name: string;
|
|
86
|
+
/**
|
|
87
|
+
* UK account number (8 digits).
|
|
88
|
+
*/
|
|
89
|
+
account_number: string;
|
|
90
|
+
/**
|
|
91
|
+
* UK sort code (6 digits).
|
|
92
|
+
*/
|
|
93
|
+
sort_code: string;
|
|
94
|
+
/**
|
|
95
|
+
* Discriminator for UK sort code financial address.
|
|
96
|
+
*/
|
|
97
|
+
type: 'sort_code';
|
|
98
|
+
}
|
|
99
|
+
interface UnionMember2 {
|
|
100
|
+
/**
|
|
101
|
+
* Name of the account holder.
|
|
102
|
+
*/
|
|
103
|
+
account_holder_name: string;
|
|
104
|
+
/**
|
|
105
|
+
* Bank account number.
|
|
106
|
+
*/
|
|
107
|
+
account_number: string;
|
|
108
|
+
/**
|
|
109
|
+
* ABA routing number (9 digits).
|
|
110
|
+
*/
|
|
111
|
+
routing_number: string;
|
|
112
|
+
/**
|
|
113
|
+
* Discriminator for ABA wire financial address.
|
|
114
|
+
*/
|
|
115
|
+
type: 'aba';
|
|
116
|
+
}
|
|
117
|
+
interface UnionMember3 {
|
|
118
|
+
/**
|
|
119
|
+
* Wallet address on the specified blockchain.
|
|
120
|
+
*/
|
|
121
|
+
address: string;
|
|
122
|
+
/**
|
|
123
|
+
* Blockchain network for the crypto wallet.
|
|
124
|
+
*/
|
|
125
|
+
blockchain: 'bitcoin' | 'ethereum' | 'solana' | 'polygon' | 'bitcoin_testnet4' | 'ethereum_sepolia' | 'solana_devnet' | 'polygon_amoy';
|
|
126
|
+
/**
|
|
127
|
+
* Discriminator for crypto wallet financial address.
|
|
128
|
+
*/
|
|
129
|
+
type: 'crypto_wallet';
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* The product that caused this transaction, or null when no product is linked.
|
|
133
|
+
*/
|
|
134
|
+
interface Product {
|
|
135
|
+
/**
|
|
136
|
+
* Identifier of the product resource that caused this transaction.
|
|
137
|
+
*/
|
|
138
|
+
id: string;
|
|
139
|
+
/**
|
|
140
|
+
* Type of the product that caused this transaction.
|
|
141
|
+
*/
|
|
142
|
+
type: 'deposit' | 'deposit_return' | 'refund' | 'payout';
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
export interface TransactionListResponse {
|
|
146
|
+
/**
|
|
147
|
+
* Unique identifier of the transaction.
|
|
148
|
+
*/
|
|
149
|
+
id: string;
|
|
150
|
+
/**
|
|
151
|
+
* ID of the merchant account this transaction settled on.
|
|
152
|
+
*/
|
|
153
|
+
account_id: string;
|
|
154
|
+
/**
|
|
155
|
+
* Absolute amount as a string decimal (e.g. "100.50").
|
|
156
|
+
*/
|
|
157
|
+
amount: string;
|
|
158
|
+
/**
|
|
159
|
+
* Reference visible on the bank statement, or null when not applicable.
|
|
160
|
+
*/
|
|
161
|
+
bank_statement_reference: string | null;
|
|
162
|
+
/**
|
|
163
|
+
* Bank account or wallet of the other party, or null when not known.
|
|
164
|
+
*/
|
|
165
|
+
counterparty: TransactionListResponse.UnionMember0 | TransactionListResponse.UnionMember1 | TransactionListResponse.UnionMember2 | TransactionListResponse.UnionMember3 | null;
|
|
166
|
+
/**
|
|
167
|
+
* ISO 8601 UTC timestamp when the transaction was recorded.
|
|
168
|
+
*/
|
|
169
|
+
created_at: string;
|
|
170
|
+
/**
|
|
171
|
+
* ISO 4217 fiat or crypto currency code of the amount.
|
|
172
|
+
*/
|
|
173
|
+
currency: 'EUR' | 'GBP' | 'USD' | 'USDC' | 'BTC' | 'ETH' | 'SOL' | 'POL';
|
|
174
|
+
/**
|
|
175
|
+
* The product that caused this transaction, or null when no product is linked.
|
|
176
|
+
*/
|
|
177
|
+
product: TransactionListResponse.Product | null;
|
|
178
|
+
/**
|
|
179
|
+
* Direction of the movement relative to the merchant account.
|
|
180
|
+
*/
|
|
181
|
+
side: 'credit' | 'debit';
|
|
182
|
+
/**
|
|
183
|
+
* Lifecycle state of the transaction.
|
|
184
|
+
*/
|
|
185
|
+
status: 'pending' | 'completed' | 'failed';
|
|
186
|
+
/**
|
|
187
|
+
* Resource type discriminator.
|
|
188
|
+
*/
|
|
189
|
+
type: 'transaction';
|
|
190
|
+
}
|
|
191
|
+
export declare namespace TransactionListResponse {
|
|
192
|
+
interface UnionMember0 {
|
|
193
|
+
/**
|
|
194
|
+
* Name of the account holder.
|
|
195
|
+
*/
|
|
196
|
+
account_holder_name: string;
|
|
197
|
+
/**
|
|
198
|
+
* Bank Identifier Code, or null if not provided.
|
|
199
|
+
*/
|
|
200
|
+
bic: string | null;
|
|
201
|
+
/**
|
|
202
|
+
* International Bank Account Number.
|
|
203
|
+
*/
|
|
204
|
+
iban: string;
|
|
205
|
+
/**
|
|
206
|
+
* Discriminator for IBAN financial address.
|
|
207
|
+
*/
|
|
208
|
+
type: 'iban';
|
|
209
|
+
}
|
|
210
|
+
interface UnionMember1 {
|
|
211
|
+
/**
|
|
212
|
+
* Name of the account holder.
|
|
213
|
+
*/
|
|
214
|
+
account_holder_name: string;
|
|
215
|
+
/**
|
|
216
|
+
* UK account number (8 digits).
|
|
217
|
+
*/
|
|
218
|
+
account_number: string;
|
|
219
|
+
/**
|
|
220
|
+
* UK sort code (6 digits).
|
|
221
|
+
*/
|
|
222
|
+
sort_code: string;
|
|
223
|
+
/**
|
|
224
|
+
* Discriminator for UK sort code financial address.
|
|
225
|
+
*/
|
|
226
|
+
type: 'sort_code';
|
|
227
|
+
}
|
|
228
|
+
interface UnionMember2 {
|
|
229
|
+
/**
|
|
230
|
+
* Name of the account holder.
|
|
231
|
+
*/
|
|
232
|
+
account_holder_name: string;
|
|
233
|
+
/**
|
|
234
|
+
* Bank account number.
|
|
235
|
+
*/
|
|
236
|
+
account_number: string;
|
|
237
|
+
/**
|
|
238
|
+
* ABA routing number (9 digits).
|
|
239
|
+
*/
|
|
240
|
+
routing_number: string;
|
|
241
|
+
/**
|
|
242
|
+
* Discriminator for ABA wire financial address.
|
|
243
|
+
*/
|
|
244
|
+
type: 'aba';
|
|
245
|
+
}
|
|
246
|
+
interface UnionMember3 {
|
|
247
|
+
/**
|
|
248
|
+
* Wallet address on the specified blockchain.
|
|
249
|
+
*/
|
|
250
|
+
address: string;
|
|
251
|
+
/**
|
|
252
|
+
* Blockchain network for the crypto wallet.
|
|
253
|
+
*/
|
|
254
|
+
blockchain: 'bitcoin' | 'ethereum' | 'solana' | 'polygon' | 'bitcoin_testnet4' | 'ethereum_sepolia' | 'solana_devnet' | 'polygon_amoy';
|
|
255
|
+
/**
|
|
256
|
+
* Discriminator for crypto wallet financial address.
|
|
257
|
+
*/
|
|
258
|
+
type: 'crypto_wallet';
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* The product that caused this transaction, or null when no product is linked.
|
|
262
|
+
*/
|
|
263
|
+
interface Product {
|
|
264
|
+
/**
|
|
265
|
+
* Identifier of the product resource that caused this transaction.
|
|
266
|
+
*/
|
|
267
|
+
id: string;
|
|
268
|
+
/**
|
|
269
|
+
* Type of the product that caused this transaction.
|
|
270
|
+
*/
|
|
271
|
+
type: 'deposit' | 'deposit_return' | 'refund' | 'payout';
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
export interface TransactionListParams extends CursorPageParams {
|
|
275
|
+
/**
|
|
276
|
+
* Account to list transactions for.
|
|
277
|
+
*/
|
|
278
|
+
account_id: string;
|
|
279
|
+
created_at?: TransactionListParams.CreatedAt;
|
|
280
|
+
}
|
|
281
|
+
export declare namespace TransactionListParams {
|
|
282
|
+
interface CreatedAt {
|
|
283
|
+
/**
|
|
284
|
+
* Include transactions whose created_at is greater than or equal to this ISO 8601
|
|
285
|
+
* timestamp.
|
|
286
|
+
*/
|
|
287
|
+
gte?: string;
|
|
288
|
+
/**
|
|
289
|
+
* Include transactions whose created_at is less than or equal to this ISO 8601
|
|
290
|
+
* timestamp.
|
|
291
|
+
*/
|
|
292
|
+
lte?: string;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
export declare namespace Transactions {
|
|
296
|
+
export { type TransactionRetrieveResponse as TransactionRetrieveResponse, type TransactionListResponse as TransactionListResponse, type TransactionListResponsesCursorPage as TransactionListResponsesCursorPage, type TransactionListParams as TransactionListParams, };
|
|
297
|
+
}
|
|
298
|
+
//# sourceMappingURL=transactions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transactions.d.ts","sourceRoot":"","sources":["../src/resources/transactions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE,8BAA2B;AACpF,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;OAEG;IACH,QAAQ,CAAC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WAEG;QACH,IAAI,EAAE,eAAe,CAAC;KACvB;IAED;;OAEG;IACH,UAAiB,OAAO;QACtB;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;QAEX;;WAEG;QACH,IAAI,EAAE,SAAS,GAAG,gBAAgB,GAAG,QAAQ,GAAG,QAAQ,CAAC;KAC1D;CACF;AAED,MAAM,WAAW,qBAAsB,SAAQ,gBAAgB;IAC7D;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB,UAAU,CAAC,EAAE,qBAAqB,CAAC,SAAS,CAAC;CAC9C;AAED,yBAAiB,qBAAqB,CAAC;IACrC,UAAiB,SAAS;QACxB;;;WAGG;QACH,GAAG,CAAC,EAAE,MAAM,CAAC;QAEb;;;WAGG;QACH,GAAG,CAAC,EAAE,MAAM,CAAC;KACd;CACF;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,kCAAkC,IAAI,kCAAkC,EAC7E,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;CACH"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Transactions = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
const pagination_1 = require("../core/pagination.js");
|
|
7
|
+
const path_1 = require("../internal/utils/path.js");
|
|
8
|
+
class Transactions extends resource_1.APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Retrieves a transaction by ID.
|
|
11
|
+
*/
|
|
12
|
+
retrieve(id, options) {
|
|
13
|
+
return this._client.get((0, path_1.path) `/v1/transactions/${id}`, options);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Lists transactions for an account with cursor-based pagination.
|
|
17
|
+
*/
|
|
18
|
+
list(query, options) {
|
|
19
|
+
return this._client.getAPIList('/v1/transactions', (pagination_1.CursorPage), {
|
|
20
|
+
query,
|
|
21
|
+
...options,
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.Transactions = Transactions;
|
|
26
|
+
//# sourceMappingURL=transactions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transactions.js","sourceRoot":"","sources":["../src/resources/transactions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,sDAAoF;AAEpF,oDAA8C;AAE9C,MAAa,YAAa,SAAQ,sBAAW;IAC3C;;OAEG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,oBAAoB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;IAED;;OAEG;IACH,IAAI,CACF,KAA4B,EAC5B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,kBAAkB,EAAE,CAAA,uBAAmC,CAAA,EAAE;YACtF,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AApBD,oCAoBC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
import { CursorPage } from "../core/pagination.mjs";
|
|
4
|
+
import { path } from "../internal/utils/path.mjs";
|
|
5
|
+
export class Transactions extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Retrieves a transaction by ID.
|
|
8
|
+
*/
|
|
9
|
+
retrieve(id, options) {
|
|
10
|
+
return this._client.get(path `/v1/transactions/${id}`, options);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Lists transactions for an account with cursor-based pagination.
|
|
14
|
+
*/
|
|
15
|
+
list(query, options) {
|
|
16
|
+
return this._client.getAPIList('/v1/transactions', (CursorPage), {
|
|
17
|
+
query,
|
|
18
|
+
...options,
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=transactions.mjs.map
|