@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.
Files changed (44) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/client.d.mts +3 -0
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +3 -0
  5. package/client.d.ts.map +1 -1
  6. package/client.js +3 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +3 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/api-keys.d.mts +1 -1
  12. package/resources/api-keys.d.mts.map +1 -1
  13. package/resources/api-keys.d.ts +1 -1
  14. package/resources/api-keys.d.ts.map +1 -1
  15. package/resources/index.d.mts +1 -0
  16. package/resources/index.d.mts.map +1 -1
  17. package/resources/index.d.ts +1 -0
  18. package/resources/index.d.ts.map +1 -1
  19. package/resources/index.js +3 -1
  20. package/resources/index.js.map +1 -1
  21. package/resources/index.mjs +1 -0
  22. package/resources/index.mjs.map +1 -1
  23. package/resources/scopes.d.mts +1 -1
  24. package/resources/scopes.d.mts.map +1 -1
  25. package/resources/scopes.d.ts +1 -1
  26. package/resources/scopes.d.ts.map +1 -1
  27. package/resources/transactions.d.mts +298 -0
  28. package/resources/transactions.d.mts.map +1 -0
  29. package/resources/transactions.d.ts +298 -0
  30. package/resources/transactions.d.ts.map +1 -0
  31. package/resources/transactions.js +26 -0
  32. package/resources/transactions.js.map +1 -0
  33. package/resources/transactions.mjs +22 -0
  34. package/resources/transactions.mjs.map +1 -0
  35. package/src/client.ts +17 -0
  36. package/src/resources/api-keys.ts +1 -0
  37. package/src/resources/index.ts +7 -0
  38. package/src/resources/scopes.ts +2 -1
  39. package/src/resources/transactions.ts +405 -0
  40. package/src/version.ts +1 -1
  41. package/version.d.mts +1 -1
  42. package/version.d.ts +1 -1
  43. package/version.js +1 -1
  44. package/version.mjs +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transactions.mjs","sourceRoot":"","sources":["../src/resources/transactions.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAE/C,OAAO,EAAE,UAAU,EAAsC,+BAA2B;AAEpF,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C;;OAEG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,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,UAAmC,CAAA,EAAE;YACtF,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF"}
package/src/client.ts CHANGED
@@ -85,6 +85,13 @@ import {
85
85
  Returns,
86
86
  } from './resources/returns';
87
87
  import { ScopeListResponse, Scopes } from './resources/scopes';
88
+ import {
89
+ TransactionListParams,
90
+ TransactionListResponse,
91
+ TransactionListResponsesCursorPage,
92
+ TransactionRetrieveResponse,
93
+ Transactions,
94
+ } from './resources/transactions';
88
95
  import {
89
96
  WebhookDeliveries,
90
97
  WebhookDeliveryListParams,
@@ -916,6 +923,7 @@ export class Augustus {
916
923
  webhooks: API.Webhooks = new API.Webhooks(this);
917
924
  payouts: API.Payouts = new API.Payouts(this);
918
925
  deposits: API.Deposits = new API.Deposits(this);
926
+ transactions: API.Transactions = new API.Transactions(this);
919
927
  conversions: API.Conversions = new API.Conversions(this);
920
928
  quotes: API.Quotes = new API.Quotes(this);
921
929
  accounts: API.Accounts = new API.Accounts(this);
@@ -932,6 +940,7 @@ export class Augustus {
932
940
  Augustus.Webhooks = Webhooks;
933
941
  Augustus.Payouts = Payouts;
934
942
  Augustus.Deposits = Deposits;
943
+ Augustus.Transactions = Transactions;
935
944
  Augustus.Conversions = Conversions;
936
945
  Augustus.Quotes = Quotes;
937
946
  Augustus.Accounts = Accounts;
@@ -986,6 +995,14 @@ export declare namespace Augustus {
986
995
  type DepositListParams as DepositListParams,
987
996
  };
988
997
 
998
+ export {
999
+ Transactions as Transactions,
1000
+ type TransactionRetrieveResponse as TransactionRetrieveResponse,
1001
+ type TransactionListResponse as TransactionListResponse,
1002
+ type TransactionListResponsesCursorPage as TransactionListResponsesCursorPage,
1003
+ type TransactionListParams as TransactionListParams,
1004
+ };
1005
+
989
1006
  export {
990
1007
  Conversions as Conversions,
991
1008
  type ConversionCreateResponse as ConversionCreateResponse,
@@ -70,6 +70,7 @@ export interface APIKeyIntrospectResponse {
70
70
  | 'events:read'
71
71
  | 'webhook_deliveries:read'
72
72
  | 'webhook_deliveries:write'
73
+ | 'transactions:read'
73
74
  >;
74
75
 
75
76
  /**
@@ -67,6 +67,13 @@ export {
67
67
  type ReturnListResponsesCursorPage,
68
68
  } from './returns';
69
69
  export { Scopes, type ScopeListResponse } from './scopes';
70
+ export {
71
+ Transactions,
72
+ type TransactionRetrieveResponse,
73
+ type TransactionListResponse,
74
+ type TransactionListParams,
75
+ type TransactionListResponsesCursorPage,
76
+ } from './transactions';
70
77
  export {
71
78
  WebhookDeliveries,
72
79
  type WebhookDeliveryRetrieveResponse,
@@ -44,7 +44,8 @@ export namespace ScopeListResponse {
44
44
  | 'webhook_subscriptions:write'
45
45
  | 'events:read'
46
46
  | 'webhook_deliveries:read'
47
- | 'webhook_deliveries:write';
47
+ | 'webhook_deliveries:write'
48
+ | 'transactions:read';
48
49
 
49
50
  /**
50
51
  * Action category.
@@ -0,0 +1,405 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import { APIPromise } from '../core/api-promise';
5
+ import { CursorPage, type CursorPageParams, PagePromise } from '../core/pagination';
6
+ import { RequestOptions } from '../internal/request-options';
7
+ import { path } from '../internal/utils/path';
8
+
9
+ export class Transactions extends APIResource {
10
+ /**
11
+ * Retrieves a transaction by ID.
12
+ */
13
+ retrieve(id: string, options?: RequestOptions): APIPromise<TransactionRetrieveResponse> {
14
+ return this._client.get(path`/v1/transactions/${id}`, options);
15
+ }
16
+
17
+ /**
18
+ * Lists transactions for an account with cursor-based pagination.
19
+ */
20
+ list(
21
+ query: TransactionListParams,
22
+ options?: RequestOptions,
23
+ ): PagePromise<TransactionListResponsesCursorPage, TransactionListResponse> {
24
+ return this._client.getAPIList('/v1/transactions', CursorPage<TransactionListResponse>, {
25
+ query,
26
+ ...options,
27
+ });
28
+ }
29
+ }
30
+
31
+ export type TransactionListResponsesCursorPage = CursorPage<TransactionListResponse>;
32
+
33
+ export interface TransactionRetrieveResponse {
34
+ /**
35
+ * Unique identifier of the transaction.
36
+ */
37
+ id: string;
38
+
39
+ /**
40
+ * ID of the merchant account this transaction settled on.
41
+ */
42
+ account_id: string;
43
+
44
+ /**
45
+ * Absolute amount as a string decimal (e.g. "100.50").
46
+ */
47
+ amount: string;
48
+
49
+ /**
50
+ * Reference visible on the bank statement, or null when not applicable.
51
+ */
52
+ bank_statement_reference: string | null;
53
+
54
+ /**
55
+ * Bank account or wallet of the other party, or null when not known.
56
+ */
57
+ counterparty:
58
+ | TransactionRetrieveResponse.UnionMember0
59
+ | TransactionRetrieveResponse.UnionMember1
60
+ | TransactionRetrieveResponse.UnionMember2
61
+ | TransactionRetrieveResponse.UnionMember3
62
+ | null;
63
+
64
+ /**
65
+ * ISO 8601 UTC timestamp when the transaction was recorded.
66
+ */
67
+ created_at: string;
68
+
69
+ /**
70
+ * ISO 4217 fiat or crypto currency code of the amount.
71
+ */
72
+ currency: 'EUR' | 'GBP' | 'USD' | 'USDC' | 'BTC' | 'ETH' | 'SOL' | 'POL';
73
+
74
+ /**
75
+ * The product that caused this transaction, or null when no product is linked.
76
+ */
77
+ product: TransactionRetrieveResponse.Product | null;
78
+
79
+ /**
80
+ * Direction of the movement relative to the merchant account.
81
+ */
82
+ side: 'credit' | 'debit';
83
+
84
+ /**
85
+ * Lifecycle state of the transaction.
86
+ */
87
+ status: 'pending' | 'completed' | 'failed';
88
+
89
+ /**
90
+ * Resource type discriminator.
91
+ */
92
+ type: 'transaction';
93
+ }
94
+
95
+ export namespace TransactionRetrieveResponse {
96
+ export interface UnionMember0 {
97
+ /**
98
+ * Name of the account holder.
99
+ */
100
+ account_holder_name: string;
101
+
102
+ /**
103
+ * Bank Identifier Code, or null if not provided.
104
+ */
105
+ bic: string | null;
106
+
107
+ /**
108
+ * International Bank Account Number.
109
+ */
110
+ iban: string;
111
+
112
+ /**
113
+ * Discriminator for IBAN financial address.
114
+ */
115
+ type: 'iban';
116
+ }
117
+
118
+ export interface UnionMember1 {
119
+ /**
120
+ * Name of the account holder.
121
+ */
122
+ account_holder_name: string;
123
+
124
+ /**
125
+ * UK account number (8 digits).
126
+ */
127
+ account_number: string;
128
+
129
+ /**
130
+ * UK sort code (6 digits).
131
+ */
132
+ sort_code: string;
133
+
134
+ /**
135
+ * Discriminator for UK sort code financial address.
136
+ */
137
+ type: 'sort_code';
138
+ }
139
+
140
+ export interface UnionMember2 {
141
+ /**
142
+ * Name of the account holder.
143
+ */
144
+ account_holder_name: string;
145
+
146
+ /**
147
+ * Bank account number.
148
+ */
149
+ account_number: string;
150
+
151
+ /**
152
+ * ABA routing number (9 digits).
153
+ */
154
+ routing_number: string;
155
+
156
+ /**
157
+ * Discriminator for ABA wire financial address.
158
+ */
159
+ type: 'aba';
160
+ }
161
+
162
+ export interface UnionMember3 {
163
+ /**
164
+ * Wallet address on the specified blockchain.
165
+ */
166
+ address: string;
167
+
168
+ /**
169
+ * Blockchain network for the crypto wallet.
170
+ */
171
+ blockchain:
172
+ | 'bitcoin'
173
+ | 'ethereum'
174
+ | 'solana'
175
+ | 'polygon'
176
+ | 'bitcoin_testnet4'
177
+ | 'ethereum_sepolia'
178
+ | 'solana_devnet'
179
+ | 'polygon_amoy';
180
+
181
+ /**
182
+ * Discriminator for crypto wallet financial address.
183
+ */
184
+ type: 'crypto_wallet';
185
+ }
186
+
187
+ /**
188
+ * The product that caused this transaction, or null when no product is linked.
189
+ */
190
+ export interface Product {
191
+ /**
192
+ * Identifier of the product resource that caused this transaction.
193
+ */
194
+ id: string;
195
+
196
+ /**
197
+ * Type of the product that caused this transaction.
198
+ */
199
+ type: 'deposit' | 'deposit_return' | 'refund' | 'payout';
200
+ }
201
+ }
202
+
203
+ export interface TransactionListResponse {
204
+ /**
205
+ * Unique identifier of the transaction.
206
+ */
207
+ id: string;
208
+
209
+ /**
210
+ * ID of the merchant account this transaction settled on.
211
+ */
212
+ account_id: string;
213
+
214
+ /**
215
+ * Absolute amount as a string decimal (e.g. "100.50").
216
+ */
217
+ amount: string;
218
+
219
+ /**
220
+ * Reference visible on the bank statement, or null when not applicable.
221
+ */
222
+ bank_statement_reference: string | null;
223
+
224
+ /**
225
+ * Bank account or wallet of the other party, or null when not known.
226
+ */
227
+ counterparty:
228
+ | TransactionListResponse.UnionMember0
229
+ | TransactionListResponse.UnionMember1
230
+ | TransactionListResponse.UnionMember2
231
+ | TransactionListResponse.UnionMember3
232
+ | null;
233
+
234
+ /**
235
+ * ISO 8601 UTC timestamp when the transaction was recorded.
236
+ */
237
+ created_at: string;
238
+
239
+ /**
240
+ * ISO 4217 fiat or crypto currency code of the amount.
241
+ */
242
+ currency: 'EUR' | 'GBP' | 'USD' | 'USDC' | 'BTC' | 'ETH' | 'SOL' | 'POL';
243
+
244
+ /**
245
+ * The product that caused this transaction, or null when no product is linked.
246
+ */
247
+ product: TransactionListResponse.Product | null;
248
+
249
+ /**
250
+ * Direction of the movement relative to the merchant account.
251
+ */
252
+ side: 'credit' | 'debit';
253
+
254
+ /**
255
+ * Lifecycle state of the transaction.
256
+ */
257
+ status: 'pending' | 'completed' | 'failed';
258
+
259
+ /**
260
+ * Resource type discriminator.
261
+ */
262
+ type: 'transaction';
263
+ }
264
+
265
+ export namespace TransactionListResponse {
266
+ export interface UnionMember0 {
267
+ /**
268
+ * Name of the account holder.
269
+ */
270
+ account_holder_name: string;
271
+
272
+ /**
273
+ * Bank Identifier Code, or null if not provided.
274
+ */
275
+ bic: string | null;
276
+
277
+ /**
278
+ * International Bank Account Number.
279
+ */
280
+ iban: string;
281
+
282
+ /**
283
+ * Discriminator for IBAN financial address.
284
+ */
285
+ type: 'iban';
286
+ }
287
+
288
+ export interface UnionMember1 {
289
+ /**
290
+ * Name of the account holder.
291
+ */
292
+ account_holder_name: string;
293
+
294
+ /**
295
+ * UK account number (8 digits).
296
+ */
297
+ account_number: string;
298
+
299
+ /**
300
+ * UK sort code (6 digits).
301
+ */
302
+ sort_code: string;
303
+
304
+ /**
305
+ * Discriminator for UK sort code financial address.
306
+ */
307
+ type: 'sort_code';
308
+ }
309
+
310
+ export interface UnionMember2 {
311
+ /**
312
+ * Name of the account holder.
313
+ */
314
+ account_holder_name: string;
315
+
316
+ /**
317
+ * Bank account number.
318
+ */
319
+ account_number: string;
320
+
321
+ /**
322
+ * ABA routing number (9 digits).
323
+ */
324
+ routing_number: string;
325
+
326
+ /**
327
+ * Discriminator for ABA wire financial address.
328
+ */
329
+ type: 'aba';
330
+ }
331
+
332
+ export interface UnionMember3 {
333
+ /**
334
+ * Wallet address on the specified blockchain.
335
+ */
336
+ address: string;
337
+
338
+ /**
339
+ * Blockchain network for the crypto wallet.
340
+ */
341
+ blockchain:
342
+ | 'bitcoin'
343
+ | 'ethereum'
344
+ | 'solana'
345
+ | 'polygon'
346
+ | 'bitcoin_testnet4'
347
+ | 'ethereum_sepolia'
348
+ | 'solana_devnet'
349
+ | 'polygon_amoy';
350
+
351
+ /**
352
+ * Discriminator for crypto wallet financial address.
353
+ */
354
+ type: 'crypto_wallet';
355
+ }
356
+
357
+ /**
358
+ * The product that caused this transaction, or null when no product is linked.
359
+ */
360
+ export interface Product {
361
+ /**
362
+ * Identifier of the product resource that caused this transaction.
363
+ */
364
+ id: string;
365
+
366
+ /**
367
+ * Type of the product that caused this transaction.
368
+ */
369
+ type: 'deposit' | 'deposit_return' | 'refund' | 'payout';
370
+ }
371
+ }
372
+
373
+ export interface TransactionListParams extends CursorPageParams {
374
+ /**
375
+ * Account to list transactions for.
376
+ */
377
+ account_id: string;
378
+
379
+ created_at?: TransactionListParams.CreatedAt;
380
+ }
381
+
382
+ export namespace TransactionListParams {
383
+ export interface CreatedAt {
384
+ /**
385
+ * Include transactions whose created_at is greater than or equal to this ISO 8601
386
+ * timestamp.
387
+ */
388
+ gte?: string;
389
+
390
+ /**
391
+ * Include transactions whose created_at is less than or equal to this ISO 8601
392
+ * timestamp.
393
+ */
394
+ lte?: string;
395
+ }
396
+ }
397
+
398
+ export declare namespace Transactions {
399
+ export {
400
+ type TransactionRetrieveResponse as TransactionRetrieveResponse,
401
+ type TransactionListResponse as TransactionListResponse,
402
+ type TransactionListResponsesCursorPage as TransactionListResponsesCursorPage,
403
+ type TransactionListParams as TransactionListParams,
404
+ };
405
+ }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.16.0'; // x-release-please-version
1
+ export const VERSION = '0.17.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.16.0";
1
+ export declare const VERSION = "0.17.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.16.0";
1
+ export declare const VERSION = "0.17.0";
2
2
  //# sourceMappingURL=version.d.ts.map
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.16.0'; // x-release-please-version
4
+ exports.VERSION = '0.17.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.16.0'; // x-release-please-version
1
+ export const VERSION = '0.17.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map