@augustusbank/typescript-sdk 0.21.0 → 0.22.1
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 +39 -0
- package/client.d.mts +12 -6
- package/client.d.mts.map +1 -1
- package/client.d.ts +12 -6
- package/client.d.ts.map +1 -1
- package/client.js +6 -0
- package/client.js.map +1 -1
- package/client.mjs +6 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/account-holders.d.mts +1555 -1184
- package/resources/account-holders.d.mts.map +1 -1
- package/resources/account-holders.d.ts +1555 -1184
- package/resources/account-holders.d.ts.map +1 -1
- package/resources/account-holders.js +59 -0
- package/resources/account-holders.js.map +1 -1
- package/resources/account-holders.mjs +59 -0
- package/resources/account-holders.mjs.map +1 -1
- package/resources/account-programs.d.mts +22 -17
- package/resources/account-programs.d.mts.map +1 -1
- package/resources/account-programs.d.ts +22 -17
- package/resources/account-programs.d.ts.map +1 -1
- package/resources/account-programs.js +2 -2
- package/resources/account-programs.js.map +1 -1
- package/resources/account-programs.mjs +2 -2
- package/resources/account-programs.mjs.map +1 -1
- package/resources/accounts.d.mts +226 -48
- package/resources/accounts.d.mts.map +1 -1
- package/resources/accounts.d.ts +226 -48
- package/resources/accounts.d.ts.map +1 -1
- package/resources/accounts.js +55 -2
- package/resources/accounts.js.map +1 -1
- package/resources/accounts.mjs +55 -2
- package/resources/accounts.mjs.map +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/api-versions.d.mts +3 -0
- package/resources/api-versions.d.mts.map +1 -1
- package/resources/api-versions.d.ts +3 -0
- package/resources/api-versions.d.ts.map +1 -1
- package/resources/conversions.d.mts +36 -81
- package/resources/conversions.d.mts.map +1 -1
- package/resources/conversions.d.ts +36 -81
- package/resources/conversions.d.ts.map +1 -1
- package/resources/conversions.js +25 -1
- package/resources/conversions.js.map +1 -1
- package/resources/conversions.mjs +25 -1
- package/resources/conversions.mjs.map +1 -1
- package/resources/counterparties.d.mts +1042 -0
- package/resources/counterparties.d.mts.map +1 -0
- package/resources/counterparties.d.ts +1042 -0
- package/resources/counterparties.d.ts.map +1 -0
- package/resources/counterparties.js +45 -0
- package/resources/counterparties.js.map +1 -0
- package/resources/counterparties.mjs +41 -0
- package/resources/counterparties.mjs.map +1 -0
- package/resources/deposits.d.mts +48 -186
- package/resources/deposits.d.mts.map +1 -1
- package/resources/deposits.d.ts +48 -186
- package/resources/deposits.d.ts.map +1 -1
- package/resources/events.d.mts +3 -3
- package/resources/events.d.mts.map +1 -1
- package/resources/events.d.ts +3 -3
- package/resources/events.d.ts.map +1 -1
- package/resources/index.d.mts +5 -3
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +5 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -0
- package/resources/index.mjs.map +1 -1
- package/resources/payouts.d.mts +133 -335
- package/resources/payouts.d.mts.map +1 -1
- package/resources/payouts.d.ts +133 -335
- package/resources/payouts.d.ts.map +1 -1
- package/resources/payouts.js +25 -0
- package/resources/payouts.js.map +1 -1
- package/resources/payouts.mjs +25 -0
- package/resources/payouts.mjs.map +1 -1
- package/resources/quotes/indicative.d.mts +7 -11
- package/resources/quotes/indicative.d.mts.map +1 -1
- package/resources/quotes/indicative.d.ts +7 -11
- package/resources/quotes/indicative.d.ts.map +1 -1
- package/resources/quotes/quotes.d.mts +4 -8
- package/resources/quotes/quotes.d.mts.map +1 -1
- package/resources/quotes/quotes.d.ts +4 -8
- package/resources/quotes/quotes.d.ts.map +1 -1
- package/resources/quotes/quotes.js.map +1 -1
- package/resources/quotes/quotes.mjs.map +1 -1
- package/resources/returns.d.mts +84 -39
- package/resources/returns.d.mts.map +1 -1
- package/resources/returns.d.ts +84 -39
- package/resources/returns.d.ts.map +1 -1
- package/resources/returns.js +22 -0
- package/resources/returns.js.map +1 -1
- package/resources/returns.mjs +22 -0
- package/resources/returns.mjs.map +1 -1
- package/resources/scopes.d.mts +4 -1
- package/resources/scopes.d.mts.map +1 -1
- package/resources/scopes.d.ts +4 -1
- package/resources/scopes.d.ts.map +1 -1
- package/resources/simulations/account-programs.d.mts +215 -0
- package/resources/simulations/account-programs.d.mts.map +1 -0
- package/resources/simulations/account-programs.d.ts +215 -0
- package/resources/simulations/account-programs.d.ts.map +1 -0
- package/resources/simulations/account-programs.js +96 -0
- package/resources/simulations/account-programs.js.map +1 -0
- package/resources/simulations/account-programs.mjs +92 -0
- package/resources/simulations/account-programs.mjs.map +1 -0
- package/resources/simulations/accounts.d.mts +209 -0
- package/resources/simulations/accounts.d.mts.map +1 -0
- package/resources/simulations/accounts.d.ts +209 -0
- package/resources/simulations/accounts.d.ts.map +1 -0
- package/resources/simulations/accounts.js +90 -0
- package/resources/simulations/accounts.js.map +1 -0
- package/resources/simulations/accounts.mjs +86 -0
- package/resources/simulations/accounts.mjs.map +1 -0
- package/resources/simulations/conversions.d.mts +54 -0
- package/resources/simulations/conversions.d.mts.map +1 -0
- package/resources/simulations/conversions.d.ts +54 -0
- package/resources/simulations/conversions.d.ts.map +1 -0
- package/resources/simulations/conversions.js +39 -0
- package/resources/simulations/conversions.js.map +1 -0
- package/resources/simulations/conversions.mjs +35 -0
- package/resources/simulations/conversions.mjs.map +1 -0
- package/resources/simulations/deposits.d.mts +202 -0
- package/resources/simulations/deposits.d.mts.map +1 -0
- package/resources/simulations/deposits.d.ts +202 -0
- package/resources/simulations/deposits.d.ts.map +1 -0
- package/resources/simulations/deposits.js +25 -0
- package/resources/simulations/deposits.js.map +1 -0
- package/resources/simulations/deposits.mjs +21 -0
- package/resources/simulations/deposits.mjs.map +1 -0
- package/resources/simulations/index.d.mts +7 -0
- package/resources/simulations/index.d.mts.map +1 -0
- package/resources/simulations/index.d.ts +7 -0
- package/resources/simulations/index.d.ts.map +1 -0
- package/resources/simulations/index.js +17 -0
- package/resources/simulations/index.js.map +1 -0
- package/resources/simulations/index.mjs +8 -0
- package/resources/simulations/index.mjs.map +1 -0
- package/resources/simulations/payouts.d.mts +62 -0
- package/resources/simulations/payouts.d.mts.map +1 -0
- package/resources/simulations/payouts.d.ts +62 -0
- package/resources/simulations/payouts.d.ts.map +1 -0
- package/resources/simulations/payouts.js +39 -0
- package/resources/simulations/payouts.js.map +1 -0
- package/resources/simulations/payouts.mjs +35 -0
- package/resources/simulations/payouts.mjs.map +1 -0
- package/resources/simulations/simulations.d.mts +26 -0
- package/resources/simulations/simulations.d.mts.map +1 -0
- package/resources/simulations/simulations.d.ts +26 -0
- package/resources/simulations/simulations.d.ts.map +1 -0
- package/resources/simulations/simulations.js +33 -0
- package/resources/simulations/simulations.js.map +1 -0
- package/resources/simulations/simulations.mjs +28 -0
- package/resources/simulations/simulations.mjs.map +1 -0
- package/resources/simulations.d.mts +2 -0
- package/resources/simulations.d.mts.map +1 -0
- package/resources/simulations.d.ts +2 -0
- package/resources/simulations.d.ts.map +1 -0
- package/resources/simulations.js +6 -0
- package/resources/simulations.js.map +1 -0
- package/resources/simulations.mjs +3 -0
- package/resources/simulations.mjs.map +1 -0
- package/resources/transactions.d.mts +342 -162
- package/resources/transactions.d.mts.map +1 -1
- package/resources/transactions.d.ts +342 -162
- package/resources/transactions.d.ts.map +1 -1
- package/resources/webhook-subscriptions.d.mts +61 -11
- package/resources/webhook-subscriptions.d.mts.map +1 -1
- package/resources/webhook-subscriptions.d.ts +61 -11
- package/resources/webhook-subscriptions.d.ts.map +1 -1
- package/resources/webhook-subscriptions.js +49 -0
- package/resources/webhook-subscriptions.js.map +1 -1
- package/resources/webhook-subscriptions.mjs +49 -0
- package/resources/webhook-subscriptions.mjs.map +1 -1
- package/resources/webhooks.d.mts +976 -978
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +976 -978
- package/resources/webhooks.d.ts.map +1 -1
- package/src/client.ts +48 -8
- package/src/resources/account-holders.ts +1701 -1282
- package/src/resources/account-programs.ts +30 -19
- package/src/resources/accounts.ts +265 -50
- package/src/resources/api-keys.ts +3 -0
- package/src/resources/api-versions.ts +3 -0
- package/src/resources/conversions.ts +36 -93
- package/src/resources/counterparties.ts +3127 -0
- package/src/resources/deposits.ts +66 -269
- package/src/resources/events.ts +18 -12
- package/src/resources/index.ts +21 -4
- package/src/resources/payouts.ts +204 -439
- package/src/resources/quotes/indicative.ts +7 -12
- package/src/resources/quotes/quotes.ts +4 -9
- package/src/resources/returns.ts +144 -40
- package/src/resources/scopes.ts +7 -1
- package/src/resources/simulations/account-programs.ts +282 -0
- package/src/resources/simulations/accounts.ts +265 -0
- package/src/resources/simulations/conversions.ts +70 -0
- package/src/resources/simulations/deposits.ts +522 -0
- package/src/resources/simulations/index.ts +33 -0
- package/src/resources/simulations/payouts.ts +80 -0
- package/src/resources/simulations/simulations.ts +92 -0
- package/src/resources/simulations.ts +3 -0
- package/src/resources/transactions.ts +954 -206
- package/src/resources/webhook-subscriptions.ts +102 -36
- package/src/resources/webhooks.ts +1283 -1153
- 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
|
@@ -4,15 +4,39 @@ import { CursorPage, type CursorPageParams, PagePromise } from "../core/paginati
|
|
|
4
4
|
import { RequestOptions } from "../internal/request-options.js";
|
|
5
5
|
export declare class Conversions extends APIResource {
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Starts a conversion.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const conversion = await client.conversions.create({
|
|
12
|
+
* source_account_id: '550e8400-e29b-41d4-a716-44665544000b',
|
|
13
|
+
* source_amount: '100.50',
|
|
14
|
+
* target_account_id: '550e8400-e29b-41d4-a716-44665544000c',
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
8
17
|
*/
|
|
9
18
|
create(body: ConversionCreateParams, options?: RequestOptions): APIPromise<ConversionCreateResponse>;
|
|
10
19
|
/**
|
|
11
20
|
* Retrieves a conversion by ID.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const conversion = await client.conversions.retrieve(
|
|
25
|
+
* '550e8400-e29b-41d4-a716-446655440006',
|
|
26
|
+
* );
|
|
27
|
+
* ```
|
|
12
28
|
*/
|
|
13
29
|
retrieve(id: string, options?: RequestOptions): APIPromise<ConversionRetrieveResponse>;
|
|
14
30
|
/**
|
|
15
31
|
* Returns a paginated list of conversions.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* // Automatically fetches more pages as needed.
|
|
36
|
+
* for await (const conversionListResponse of client.conversions.list()) {
|
|
37
|
+
* // ...
|
|
38
|
+
* }
|
|
39
|
+
* ```
|
|
16
40
|
*/
|
|
17
41
|
list(query?: ConversionListParams | null | undefined, options?: RequestOptions): PagePromise<ConversionListResponsesCursorPage, ConversionListResponse>;
|
|
18
42
|
}
|
|
@@ -30,32 +54,20 @@ export interface ConversionCreateResponse {
|
|
|
30
54
|
* ISO 8601 UTC timestamp when the conversion was created.
|
|
31
55
|
*/
|
|
32
56
|
created_at: string;
|
|
33
|
-
/**
|
|
34
|
-
* Failure details when status is failed, otherwise null.
|
|
35
|
-
*/
|
|
36
|
-
failure: ConversionCreateResponse.Failure | null;
|
|
37
57
|
/**
|
|
38
58
|
* Key-value pairs stored with the conversion.
|
|
39
59
|
*/
|
|
40
60
|
metadata: {
|
|
41
61
|
[key: string]: string;
|
|
42
62
|
};
|
|
43
|
-
/**
|
|
44
|
-
* ID of the associated quote, or null.
|
|
45
|
-
*/
|
|
46
|
-
quote_id: string | null;
|
|
47
63
|
/**
|
|
48
64
|
* ID of the source account, or null.
|
|
49
65
|
*/
|
|
50
66
|
source_account_id: string | null;
|
|
51
67
|
/**
|
|
52
|
-
*
|
|
68
|
+
* Amount as a string decimal (e.g. "100.50").
|
|
53
69
|
*/
|
|
54
70
|
source_amount: string;
|
|
55
|
-
/**
|
|
56
|
-
* Source currency code.
|
|
57
|
-
*/
|
|
58
|
-
source_currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
|
|
59
71
|
/**
|
|
60
72
|
* Current status of the conversion.
|
|
61
73
|
*/
|
|
@@ -65,9 +77,9 @@ export interface ConversionCreateResponse {
|
|
|
65
77
|
*/
|
|
66
78
|
target_account_id: string | null;
|
|
67
79
|
/**
|
|
68
|
-
*
|
|
80
|
+
* Amount as a string decimal (e.g. "100.50").
|
|
69
81
|
*/
|
|
70
|
-
|
|
82
|
+
target_amount: string;
|
|
71
83
|
/**
|
|
72
84
|
* Resource type discriminator.
|
|
73
85
|
*/
|
|
@@ -77,17 +89,6 @@ export interface ConversionCreateResponse {
|
|
|
77
89
|
*/
|
|
78
90
|
updated_at: string;
|
|
79
91
|
}
|
|
80
|
-
export declare namespace ConversionCreateResponse {
|
|
81
|
-
/**
|
|
82
|
-
* Failure details when status is failed, otherwise null.
|
|
83
|
-
*/
|
|
84
|
-
interface Failure {
|
|
85
|
-
/**
|
|
86
|
-
* Human-readable description of the failure.
|
|
87
|
-
*/
|
|
88
|
-
message: string;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
92
|
export interface ConversionRetrieveResponse {
|
|
92
93
|
/**
|
|
93
94
|
* Unique identifier of the conversion.
|
|
@@ -101,32 +102,20 @@ export interface ConversionRetrieveResponse {
|
|
|
101
102
|
* ISO 8601 UTC timestamp when the conversion was created.
|
|
102
103
|
*/
|
|
103
104
|
created_at: string;
|
|
104
|
-
/**
|
|
105
|
-
* Failure details when status is failed, otherwise null.
|
|
106
|
-
*/
|
|
107
|
-
failure: ConversionRetrieveResponse.Failure | null;
|
|
108
105
|
/**
|
|
109
106
|
* Key-value pairs stored with the conversion.
|
|
110
107
|
*/
|
|
111
108
|
metadata: {
|
|
112
109
|
[key: string]: string;
|
|
113
110
|
};
|
|
114
|
-
/**
|
|
115
|
-
* ID of the associated quote, or null.
|
|
116
|
-
*/
|
|
117
|
-
quote_id: string | null;
|
|
118
111
|
/**
|
|
119
112
|
* ID of the source account, or null.
|
|
120
113
|
*/
|
|
121
114
|
source_account_id: string | null;
|
|
122
115
|
/**
|
|
123
|
-
*
|
|
116
|
+
* Amount as a string decimal (e.g. "100.50").
|
|
124
117
|
*/
|
|
125
118
|
source_amount: string;
|
|
126
|
-
/**
|
|
127
|
-
* Source currency code.
|
|
128
|
-
*/
|
|
129
|
-
source_currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
|
|
130
119
|
/**
|
|
131
120
|
* Current status of the conversion.
|
|
132
121
|
*/
|
|
@@ -136,9 +125,9 @@ export interface ConversionRetrieveResponse {
|
|
|
136
125
|
*/
|
|
137
126
|
target_account_id: string | null;
|
|
138
127
|
/**
|
|
139
|
-
*
|
|
128
|
+
* Amount as a string decimal (e.g. "100.50").
|
|
140
129
|
*/
|
|
141
|
-
|
|
130
|
+
target_amount: string;
|
|
142
131
|
/**
|
|
143
132
|
* Resource type discriminator.
|
|
144
133
|
*/
|
|
@@ -148,17 +137,6 @@ export interface ConversionRetrieveResponse {
|
|
|
148
137
|
*/
|
|
149
138
|
updated_at: string;
|
|
150
139
|
}
|
|
151
|
-
export declare namespace ConversionRetrieveResponse {
|
|
152
|
-
/**
|
|
153
|
-
* Failure details when status is failed, otherwise null.
|
|
154
|
-
*/
|
|
155
|
-
interface Failure {
|
|
156
|
-
/**
|
|
157
|
-
* Human-readable description of the failure.
|
|
158
|
-
*/
|
|
159
|
-
message: string;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
140
|
export interface ConversionListResponse {
|
|
163
141
|
/**
|
|
164
142
|
* Unique identifier of the conversion.
|
|
@@ -172,32 +150,20 @@ export interface ConversionListResponse {
|
|
|
172
150
|
* ISO 8601 UTC timestamp when the conversion was created.
|
|
173
151
|
*/
|
|
174
152
|
created_at: string;
|
|
175
|
-
/**
|
|
176
|
-
* Failure details when status is failed, otherwise null.
|
|
177
|
-
*/
|
|
178
|
-
failure: ConversionListResponse.Failure | null;
|
|
179
153
|
/**
|
|
180
154
|
* Key-value pairs stored with the conversion.
|
|
181
155
|
*/
|
|
182
156
|
metadata: {
|
|
183
157
|
[key: string]: string;
|
|
184
158
|
};
|
|
185
|
-
/**
|
|
186
|
-
* ID of the associated quote, or null.
|
|
187
|
-
*/
|
|
188
|
-
quote_id: string | null;
|
|
189
159
|
/**
|
|
190
160
|
* ID of the source account, or null.
|
|
191
161
|
*/
|
|
192
162
|
source_account_id: string | null;
|
|
193
163
|
/**
|
|
194
|
-
*
|
|
164
|
+
* Amount as a string decimal (e.g. "100.50").
|
|
195
165
|
*/
|
|
196
166
|
source_amount: string;
|
|
197
|
-
/**
|
|
198
|
-
* Source currency code.
|
|
199
|
-
*/
|
|
200
|
-
source_currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
|
|
201
167
|
/**
|
|
202
168
|
* Current status of the conversion.
|
|
203
169
|
*/
|
|
@@ -207,9 +173,9 @@ export interface ConversionListResponse {
|
|
|
207
173
|
*/
|
|
208
174
|
target_account_id: string | null;
|
|
209
175
|
/**
|
|
210
|
-
*
|
|
176
|
+
* Amount as a string decimal (e.g. "100.50").
|
|
211
177
|
*/
|
|
212
|
-
|
|
178
|
+
target_amount: string;
|
|
213
179
|
/**
|
|
214
180
|
* Resource type discriminator.
|
|
215
181
|
*/
|
|
@@ -219,24 +185,13 @@ export interface ConversionListResponse {
|
|
|
219
185
|
*/
|
|
220
186
|
updated_at: string;
|
|
221
187
|
}
|
|
222
|
-
export declare namespace ConversionListResponse {
|
|
223
|
-
/**
|
|
224
|
-
* Failure details when status is failed, otherwise null.
|
|
225
|
-
*/
|
|
226
|
-
interface Failure {
|
|
227
|
-
/**
|
|
228
|
-
* Human-readable description of the failure.
|
|
229
|
-
*/
|
|
230
|
-
message: string;
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
188
|
export interface ConversionCreateParams {
|
|
234
189
|
/**
|
|
235
190
|
* ID of the source account to debit.
|
|
236
191
|
*/
|
|
237
192
|
source_account_id: string;
|
|
238
193
|
/**
|
|
239
|
-
* Amount
|
|
194
|
+
* Amount as a string decimal (e.g. "100.50").
|
|
240
195
|
*/
|
|
241
196
|
source_amount: string;
|
|
242
197
|
/**
|
|
@@ -248,7 +203,7 @@ export interface ConversionCreateParams {
|
|
|
248
203
|
*/
|
|
249
204
|
metadata?: {
|
|
250
205
|
[key: string]: string;
|
|
251
|
-
};
|
|
206
|
+
} | null;
|
|
252
207
|
}
|
|
253
208
|
export interface ConversionListParams extends CursorPageParams {
|
|
254
209
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversions.d.ts","sourceRoot":"","sources":["../src/resources/conversions.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,WAAY,SAAQ,WAAW;IAC1C
|
|
1
|
+
{"version":3,"file":"conversions.d.ts","sourceRoot":"","sources":["../src/resources/conversions.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,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,IAAI,EAAE,sBAAsB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,wBAAwB,CAAC;IAIpG;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UA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AAC,EAAE,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;IAEjD;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAC;IAE5C;;OAEG;IACH,eAAe,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;CAClD;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;CACH"}
|
package/resources/conversions.js
CHANGED
|
@@ -7,19 +7,43 @@ const pagination_1 = require("../core/pagination.js");
|
|
|
7
7
|
const path_1 = require("../internal/utils/path.js");
|
|
8
8
|
class Conversions extends resource_1.APIResource {
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Starts a conversion.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const conversion = await client.conversions.create({
|
|
15
|
+
* source_account_id: '550e8400-e29b-41d4-a716-44665544000b',
|
|
16
|
+
* source_amount: '100.50',
|
|
17
|
+
* target_account_id: '550e8400-e29b-41d4-a716-44665544000c',
|
|
18
|
+
* });
|
|
19
|
+
* ```
|
|
11
20
|
*/
|
|
12
21
|
create(body, options) {
|
|
13
22
|
return this._client.post('/v1/conversions', { body, ...options });
|
|
14
23
|
}
|
|
15
24
|
/**
|
|
16
25
|
* Retrieves a conversion by ID.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* const conversion = await client.conversions.retrieve(
|
|
30
|
+
* '550e8400-e29b-41d4-a716-446655440006',
|
|
31
|
+
* );
|
|
32
|
+
* ```
|
|
17
33
|
*/
|
|
18
34
|
retrieve(id, options) {
|
|
19
35
|
return this._client.get((0, path_1.path) `/v1/conversions/${id}`, options);
|
|
20
36
|
}
|
|
21
37
|
/**
|
|
22
38
|
* Returns a paginated list of conversions.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* // Automatically fetches more pages as needed.
|
|
43
|
+
* for await (const conversionListResponse of client.conversions.list()) {
|
|
44
|
+
* // ...
|
|
45
|
+
* }
|
|
46
|
+
* ```
|
|
23
47
|
*/
|
|
24
48
|
list(query = {}, options) {
|
|
25
49
|
return this._client.getAPIList('/v1/conversions', (pagination_1.CursorPage), {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversions.js","sourceRoot":"","sources":["../src/resources/conversions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,sDAAoF;AAEpF,oDAA8C;AAE9C,MAAa,WAAY,SAAQ,sBAAW;IAC1C
|
|
1
|
+
{"version":3,"file":"conversions.js","sourceRoot":"","sources":["../src/resources/conversions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,sDAAoF;AAEpF,oDAA8C;AAE9C,MAAa,WAAY,SAAQ,sBAAW;IAC1C;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,IAA4B,EAAE,OAAwB;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpE,CAAC;IAED;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,mBAAmB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAChE,CAAC;IAED;;;;;;;;;;OAUG;IACH,IAAI,CACF,QAAiD,EAAE,EACnD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,iBAAiB,EAAE,CAAA,uBAAkC,CAAA,EAAE;YACpF,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AAnDD,kCAmDC"}
|
|
@@ -4,19 +4,43 @@ import { CursorPage } from "../core/pagination.mjs";
|
|
|
4
4
|
import { path } from "../internal/utils/path.mjs";
|
|
5
5
|
export class Conversions extends APIResource {
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Starts a conversion.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const conversion = await client.conversions.create({
|
|
12
|
+
* source_account_id: '550e8400-e29b-41d4-a716-44665544000b',
|
|
13
|
+
* source_amount: '100.50',
|
|
14
|
+
* target_account_id: '550e8400-e29b-41d4-a716-44665544000c',
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
8
17
|
*/
|
|
9
18
|
create(body, options) {
|
|
10
19
|
return this._client.post('/v1/conversions', { body, ...options });
|
|
11
20
|
}
|
|
12
21
|
/**
|
|
13
22
|
* Retrieves a conversion by ID.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* const conversion = await client.conversions.retrieve(
|
|
27
|
+
* '550e8400-e29b-41d4-a716-446655440006',
|
|
28
|
+
* );
|
|
29
|
+
* ```
|
|
14
30
|
*/
|
|
15
31
|
retrieve(id, options) {
|
|
16
32
|
return this._client.get(path `/v1/conversions/${id}`, options);
|
|
17
33
|
}
|
|
18
34
|
/**
|
|
19
35
|
* Returns a paginated list of conversions.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```ts
|
|
39
|
+
* // Automatically fetches more pages as needed.
|
|
40
|
+
* for await (const conversionListResponse of client.conversions.list()) {
|
|
41
|
+
* // ...
|
|
42
|
+
* }
|
|
43
|
+
* ```
|
|
20
44
|
*/
|
|
21
45
|
list(query = {}, options) {
|
|
22
46
|
return this._client.getAPIList('/v1/conversions', (CursorPage), {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversions.mjs","sourceRoot":"","sources":["../src/resources/conversions.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,WAAY,SAAQ,WAAW;IAC1C
|
|
1
|
+
{"version":3,"file":"conversions.mjs","sourceRoot":"","sources":["../src/resources/conversions.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,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,IAA4B,EAAE,OAAwB;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpE,CAAC;IAED;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,mBAAmB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAChE,CAAC;IAED;;;;;;;;;;OAUG;IACH,IAAI,CACF,QAAiD,EAAE,EACnD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,iBAAiB,EAAE,CAAA,UAAkC,CAAA,EAAE;YACpF,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF"}
|