@privy-io/api-types 0.9.0 → 0.11.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 +46 -0
- package/client.d.mts +40 -43
- package/client.d.mts.map +1 -1
- package/client.d.ts +40 -43
- package/client.d.ts.map +1 -1
- package/client.js +28 -20
- package/client.js.map +1 -1
- package/client.mjs +29 -21
- package/client.mjs.map +1 -1
- package/internal/types.d.mts +6 -6
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +6 -6
- package/internal/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/resources/accounts.d.mts +128 -86
- package/resources/accounts.d.mts.map +1 -1
- package/resources/accounts.d.ts +128 -86
- package/resources/accounts.d.ts.map +1 -1
- package/resources/aggregations.d.mts +43 -43
- package/resources/aggregations.d.mts.map +1 -1
- package/resources/aggregations.d.ts +43 -43
- package/resources/aggregations.d.ts.map +1 -1
- package/resources/apps.d.mts +169 -135
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +169 -135
- package/resources/apps.d.ts.map +1 -1
- package/resources/client-auth.d.mts +931 -947
- package/resources/client-auth.d.mts.map +1 -1
- package/resources/client-auth.d.ts +931 -947
- package/resources/client-auth.d.ts.map +1 -1
- package/resources/client-auth.js.map +1 -1
- package/resources/client-auth.mjs.map +1 -1
- package/resources/embedded-wallets.d.mts +122 -122
- package/resources/embedded-wallets.d.mts.map +1 -1
- package/resources/embedded-wallets.d.ts +122 -122
- package/resources/embedded-wallets.d.ts.map +1 -1
- package/resources/fiat.d.mts +110 -0
- package/resources/fiat.d.mts.map +1 -0
- package/resources/fiat.d.ts +110 -0
- package/resources/fiat.d.ts.map +1 -0
- package/resources/fiat.js +9 -0
- package/resources/fiat.js.map +1 -0
- package/resources/fiat.mjs +5 -0
- package/resources/fiat.mjs.map +1 -0
- package/resources/funding.d.mts +86 -86
- package/resources/funding.d.mts.map +1 -1
- package/resources/funding.d.ts +86 -86
- package/resources/funding.d.ts.map +1 -1
- package/resources/index.d.mts +20 -18
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +20 -18
- 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 +3 -1
- package/resources/index.mjs.map +1 -1
- package/resources/intents.d.mts +269 -265
- package/resources/intents.d.mts.map +1 -1
- package/resources/intents.d.ts +269 -265
- package/resources/intents.d.ts.map +1 -1
- package/resources/key-quorums.d.mts +15 -146
- package/resources/key-quorums.d.mts.map +1 -1
- package/resources/key-quorums.d.ts +15 -146
- package/resources/key-quorums.d.ts.map +1 -1
- package/resources/key-quorums.js +0 -92
- package/resources/key-quorums.js.map +1 -1
- package/resources/key-quorums.mjs +0 -92
- package/resources/key-quorums.mjs.map +1 -1
- package/resources/kraken-embed.d.mts +12 -20
- package/resources/kraken-embed.d.mts.map +1 -1
- package/resources/kraken-embed.d.ts +12 -20
- package/resources/kraken-embed.d.ts.map +1 -1
- package/resources/organizations.d.mts +65 -0
- package/resources/organizations.d.mts.map +1 -0
- package/resources/organizations.d.ts +65 -0
- package/resources/organizations.d.ts.map +1 -0
- package/resources/organizations.js +9 -0
- package/resources/organizations.js.map +1 -0
- package/resources/organizations.mjs +5 -0
- package/resources/organizations.mjs.map +1 -0
- package/resources/policies.d.mts +261 -553
- package/resources/policies.d.mts.map +1 -1
- package/resources/policies.d.ts +261 -553
- package/resources/policies.d.ts.map +1 -1
- package/resources/policies.js +0 -229
- package/resources/policies.js.map +1 -1
- package/resources/policies.mjs +0 -229
- package/resources/policies.mjs.map +1 -1
- package/resources/shared.d.mts +28 -28
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +28 -28
- package/resources/shared.d.ts.map +1 -1
- package/resources/swaps.d.mts +6 -9
- package/resources/swaps.d.mts.map +1 -1
- package/resources/swaps.d.ts +6 -9
- package/resources/swaps.d.ts.map +1 -1
- package/resources/swaps.js.map +1 -1
- package/resources/swaps.mjs.map +1 -1
- package/resources/transactions.d.mts +80 -96
- package/resources/transactions.d.mts.map +1 -1
- package/resources/transactions.d.ts +80 -96
- package/resources/transactions.d.ts.map +1 -1
- package/resources/transactions.js +0 -17
- package/resources/transactions.js.map +1 -1
- package/resources/transactions.mjs +0 -17
- package/resources/transactions.mjs.map +1 -1
- package/resources/users.d.mts +480 -815
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +480 -815
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js +0 -272
- package/resources/users.js.map +1 -1
- package/resources/users.mjs +0 -272
- package/resources/users.mjs.map +1 -1
- package/resources/wallet-actions.d.mts +302 -145
- package/resources/wallet-actions.d.mts.map +1 -1
- package/resources/wallet-actions.d.ts +302 -145
- package/resources/wallet-actions.d.ts.map +1 -1
- package/resources/wallets/index.d.mts +1 -1
- package/resources/wallets/index.d.mts.map +1 -1
- package/resources/wallets/index.d.ts +1 -1
- package/resources/wallets/index.d.ts.map +1 -1
- package/resources/wallets/index.js.map +1 -1
- package/resources/wallets/index.mjs.map +1 -1
- package/resources/wallets/transactions.d.mts +7 -2
- package/resources/wallets/transactions.d.mts.map +1 -1
- package/resources/wallets/transactions.d.ts +7 -2
- package/resources/wallets/transactions.d.ts.map +1 -1
- package/resources/wallets/transactions.js +1 -1
- package/resources/wallets/transactions.mjs +1 -1
- package/resources/wallets/wallets.d.mts +1592 -1580
- package/resources/wallets/wallets.d.mts.map +1 -1
- package/resources/wallets/wallets.d.ts +1592 -1580
- package/resources/wallets/wallets.d.ts.map +1 -1
- package/resources/wallets/wallets.js +45 -103
- package/resources/wallets/wallets.js.map +1 -1
- package/resources/wallets/wallets.mjs +45 -103
- package/resources/wallets/wallets.mjs.map +1 -1
- package/resources/webhooks.d.mts +935 -877
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +935 -877
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/yield.d.mts +157 -157
- package/resources/yield.d.mts.map +1 -1
- package/resources/yield.d.ts +157 -157
- package/resources/yield.d.ts.map +1 -1
- package/src/client.ts +650 -618
- package/src/internal/types.ts +6 -8
- package/src/resources/accounts.ts +157 -103
- package/src/resources/aggregations.ts +55 -55
- package/src/resources/apps.ts +221 -178
- package/src/resources/client-auth.ts +1271 -1315
- package/src/resources/embedded-wallets.ts +160 -160
- package/src/resources/fiat.ts +177 -0
- package/src/resources/funding.ts +130 -130
- package/src/resources/index.ts +551 -542
- package/src/resources/intents.ts +326 -322
- package/src/resources/key-quorums.ts +16 -218
- package/src/resources/kraken-embed.ts +14 -22
- package/src/resources/organizations.ts +82 -0
- package/src/resources/policies.ts +383 -848
- package/src/resources/shared.ts +34 -34
- package/src/resources/swaps.ts +5 -10
- package/src/resources/transactions.ts +116 -136
- package/src/resources/users.ts +693 -1160
- package/src/resources/wallet-actions.ts +392 -185
- package/src/resources/wallets/index.ts +160 -156
- package/src/resources/wallets/transactions.ts +18 -3
- package/src/resources/wallets/wallets.ts +2123 -2113
- package/src/resources/webhooks.ts +1172 -1100
- package/src/resources/yield.ts +188 -188
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
|
@@ -1,122 +1,8 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../core/resource';
|
|
4
|
-
import * as SharedAPI from './shared';
|
|
5
|
-
import { APIPromise } from '../core/api-promise';
|
|
6
|
-
import { buildHeaders } from '../internal/headers';
|
|
7
|
-
import { RequestOptions } from '../internal/request-options';
|
|
8
|
-
import { path } from '../internal/utils/path';
|
|
9
4
|
|
|
10
|
-
|
|
11
|
-
* Operations related to key quorums
|
|
12
|
-
*/
|
|
13
|
-
export class KeyQuorums extends APIResource {
|
|
14
|
-
/**
|
|
15
|
-
* Create a new key quorum.
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* ```ts
|
|
19
|
-
* const keyQuorum = await client.keyQuorums.create({
|
|
20
|
-
* authorization_threshold: 1,
|
|
21
|
-
* display_name: 'Prod key quorum',
|
|
22
|
-
* public_keys: [
|
|
23
|
-
* 'MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEx4aoeD72yykviK+f/ckqE2CItVIG\n1rCnvC3/XZ1HgpOcMEMialRmTrqIK4oZlYd1RfxU3za/C9yjhboIuoPD3g==',
|
|
24
|
-
* 'MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAErzZtQr/bMIh3Y8f9ZqseB9i/AfjQ\nhu+agbNqXcJy/TfoNqvc/Y3Mh7gIZ8ZLXQEykycx4mYSpqrxp1lBKqsZDQ==',
|
|
25
|
-
* ],
|
|
26
|
-
* });
|
|
27
|
-
* ```
|
|
28
|
-
*/
|
|
29
|
-
create(body: KeyQuorumCreateParams, options?: RequestOptions): APIPromise<KeyQuorum> {
|
|
30
|
-
return this._client.post('/v1/key_quorums', { body, ...options });
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Delete a key quorum by key quorum ID.
|
|
35
|
-
*
|
|
36
|
-
* @example
|
|
37
|
-
* ```ts
|
|
38
|
-
* const successResponse = await client.keyQuorums._delete(
|
|
39
|
-
* 'string',
|
|
40
|
-
* );
|
|
41
|
-
* ```
|
|
42
|
-
*/
|
|
43
|
-
_delete(
|
|
44
|
-
keyQuorumID: SharedAPI.KeyQuorumID,
|
|
45
|
-
params: KeyQuorumDeleteParams | null | undefined = {},
|
|
46
|
-
options?: RequestOptions,
|
|
47
|
-
): APIPromise<SharedAPI.SuccessResponse> {
|
|
48
|
-
const {
|
|
49
|
-
'privy-authorization-signature': privyAuthorizationSignature,
|
|
50
|
-
'privy-request-expiry': privyRequestExpiry,
|
|
51
|
-
} = params ?? {};
|
|
52
|
-
return this._client.delete(path`/v1/key_quorums/${keyQuorumID}`, {
|
|
53
|
-
...options,
|
|
54
|
-
headers: buildHeaders([
|
|
55
|
-
{
|
|
56
|
-
...(privyAuthorizationSignature != null ?
|
|
57
|
-
{ 'privy-authorization-signature': privyAuthorizationSignature }
|
|
58
|
-
: undefined),
|
|
59
|
-
...(privyRequestExpiry != null ? { 'privy-request-expiry': privyRequestExpiry } : undefined),
|
|
60
|
-
},
|
|
61
|
-
options?.headers,
|
|
62
|
-
]),
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Update a key quorum by key quorum ID.
|
|
68
|
-
*
|
|
69
|
-
* @example
|
|
70
|
-
* ```ts
|
|
71
|
-
* const keyQuorum = await client.keyQuorums._update(
|
|
72
|
-
* 'string',
|
|
73
|
-
* {
|
|
74
|
-
* authorization_threshold: 1,
|
|
75
|
-
* display_name: 'Prod key quorum',
|
|
76
|
-
* public_keys: [
|
|
77
|
-
* 'MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEx4aoeD72yykviK+f/ckqE2CItVIG\n1rCnvC3/XZ1HgpOcMEMialRmTrqIK4oZlYd1RfxU3za/C9yjhboIuoPD3g==',
|
|
78
|
-
* ],
|
|
79
|
-
* },
|
|
80
|
-
* );
|
|
81
|
-
* ```
|
|
82
|
-
*/
|
|
83
|
-
_update(
|
|
84
|
-
keyQuorumID: SharedAPI.KeyQuorumID,
|
|
85
|
-
params: KeyQuorumUpdateParams,
|
|
86
|
-
options?: RequestOptions,
|
|
87
|
-
): APIPromise<KeyQuorum> {
|
|
88
|
-
const {
|
|
89
|
-
'privy-authorization-signature': privyAuthorizationSignature,
|
|
90
|
-
'privy-request-expiry': privyRequestExpiry,
|
|
91
|
-
...body
|
|
92
|
-
} = params;
|
|
93
|
-
return this._client.patch(path`/v1/key_quorums/${keyQuorumID}`, {
|
|
94
|
-
body,
|
|
95
|
-
...options,
|
|
96
|
-
headers: buildHeaders([
|
|
97
|
-
{
|
|
98
|
-
...(privyAuthorizationSignature != null ?
|
|
99
|
-
{ 'privy-authorization-signature': privyAuthorizationSignature }
|
|
100
|
-
: undefined),
|
|
101
|
-
...(privyRequestExpiry != null ? { 'privy-request-expiry': privyRequestExpiry } : undefined),
|
|
102
|
-
},
|
|
103
|
-
options?.headers,
|
|
104
|
-
]),
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* Get a key quorum by ID.
|
|
110
|
-
*
|
|
111
|
-
* @example
|
|
112
|
-
* ```ts
|
|
113
|
-
* const keyQuorum = await client.keyQuorums.get('string');
|
|
114
|
-
* ```
|
|
115
|
-
*/
|
|
116
|
-
get(keyQuorumID: SharedAPI.KeyQuorumID, options?: RequestOptions): APIPromise<KeyQuorum> {
|
|
117
|
-
return this._client.get(path`/v1/key_quorums/${keyQuorumID}`, options);
|
|
118
|
-
}
|
|
119
|
-
}
|
|
5
|
+
export class KeyQuorums extends APIResource {}
|
|
120
6
|
|
|
121
7
|
/**
|
|
122
8
|
* A key quorum for authorizing wallet operations.
|
|
@@ -147,40 +33,31 @@ export namespace KeyQuorum {
|
|
|
147
33
|
}
|
|
148
34
|
|
|
149
35
|
/**
|
|
150
|
-
*
|
|
36
|
+
* Headers required to authorize modifications to key quorums.
|
|
151
37
|
*/
|
|
152
|
-
export interface
|
|
153
|
-
/**
|
|
154
|
-
* The number of keys that must sign for an action to be valid. Must be less than
|
|
155
|
-
* or equal to total number of key quorum members.
|
|
156
|
-
*/
|
|
157
|
-
authorization_threshold?: number;
|
|
158
|
-
|
|
159
|
-
display_name?: string;
|
|
160
|
-
|
|
38
|
+
export interface KeyQuorumAuthorizationHeaders {
|
|
161
39
|
/**
|
|
162
|
-
*
|
|
163
|
-
* can only be nested 1 level deep.
|
|
40
|
+
* ID of your Privy app.
|
|
164
41
|
*/
|
|
165
|
-
|
|
42
|
+
'privy-app-id': string;
|
|
166
43
|
|
|
167
44
|
/**
|
|
168
|
-
*
|
|
169
|
-
*
|
|
45
|
+
* Request authorization signature. If multiple signatures are required, they
|
|
46
|
+
* should be comma separated.
|
|
170
47
|
*/
|
|
171
|
-
|
|
48
|
+
'privy-authorization-signature'?: string;
|
|
172
49
|
|
|
173
50
|
/**
|
|
174
|
-
*
|
|
175
|
-
*
|
|
51
|
+
* Request expiry. Value is a Unix timestamp in milliseconds representing the
|
|
52
|
+
* deadline by which the request must be processed.
|
|
176
53
|
*/
|
|
177
|
-
|
|
54
|
+
'privy-request-expiry'?: string;
|
|
178
55
|
}
|
|
179
56
|
|
|
180
57
|
/**
|
|
181
|
-
* Request input for
|
|
58
|
+
* Request input for creating a key quorum.
|
|
182
59
|
*/
|
|
183
|
-
export interface
|
|
60
|
+
export interface KeyQuorumCreateRequestBody {
|
|
184
61
|
/**
|
|
185
62
|
* The number of keys that must sign for an action to be valid. Must be less than
|
|
186
63
|
* or equal to total number of key quorum members.
|
|
@@ -209,28 +86,9 @@ export interface KeyQuorumUpdateRequestBody {
|
|
|
209
86
|
}
|
|
210
87
|
|
|
211
88
|
/**
|
|
212
|
-
*
|
|
89
|
+
* Request input for updating an existing key quorum.
|
|
213
90
|
*/
|
|
214
|
-
export interface
|
|
215
|
-
/**
|
|
216
|
-
* ID of your Privy app.
|
|
217
|
-
*/
|
|
218
|
-
'privy-app-id': string;
|
|
219
|
-
|
|
220
|
-
/**
|
|
221
|
-
* Request authorization signature. If multiple signatures are required, they
|
|
222
|
-
* should be comma separated.
|
|
223
|
-
*/
|
|
224
|
-
'privy-authorization-signature'?: string;
|
|
225
|
-
|
|
226
|
-
/**
|
|
227
|
-
* Request expiry. Value is a Unix timestamp in milliseconds representing the
|
|
228
|
-
* deadline by which the request must be processed.
|
|
229
|
-
*/
|
|
230
|
-
'privy-request-expiry'?: string;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
export interface KeyQuorumCreateParams {
|
|
91
|
+
export interface KeyQuorumUpdateRequestBody {
|
|
234
92
|
/**
|
|
235
93
|
* The number of keys that must sign for an action to be valid. Must be less than
|
|
236
94
|
* or equal to total number of key quorum members.
|
|
@@ -258,71 +116,11 @@ export interface KeyQuorumCreateParams {
|
|
|
258
116
|
user_ids?: Array<string>;
|
|
259
117
|
}
|
|
260
118
|
|
|
261
|
-
export interface KeyQuorumDeleteParams {
|
|
262
|
-
/**
|
|
263
|
-
* Request authorization signature. If multiple signatures are required, they
|
|
264
|
-
* should be comma separated.
|
|
265
|
-
*/
|
|
266
|
-
'privy-authorization-signature'?: string;
|
|
267
|
-
|
|
268
|
-
/**
|
|
269
|
-
* Request expiry. Value is a Unix timestamp in milliseconds representing the
|
|
270
|
-
* deadline by which the request must be processed.
|
|
271
|
-
*/
|
|
272
|
-
'privy-request-expiry'?: string;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
export interface KeyQuorumUpdateParams {
|
|
276
|
-
/**
|
|
277
|
-
* Body param: The number of keys that must sign for an action to be valid. Must be
|
|
278
|
-
* less than or equal to total number of key quorum members.
|
|
279
|
-
*/
|
|
280
|
-
authorization_threshold?: number;
|
|
281
|
-
|
|
282
|
-
/**
|
|
283
|
-
* Body param
|
|
284
|
-
*/
|
|
285
|
-
display_name?: string;
|
|
286
|
-
|
|
287
|
-
/**
|
|
288
|
-
* Body param: List of key quorum IDs that should be members of this key quorum.
|
|
289
|
-
* Key quorums can only be nested 1 level deep.
|
|
290
|
-
*/
|
|
291
|
-
key_quorum_ids?: Array<string>;
|
|
292
|
-
|
|
293
|
-
/**
|
|
294
|
-
* Body param: List of P-256 public keys of the keys that should be authorized to
|
|
295
|
-
* sign on the key quorum, in base64-encoded DER format.
|
|
296
|
-
*/
|
|
297
|
-
public_keys?: Array<string>;
|
|
298
|
-
|
|
299
|
-
/**
|
|
300
|
-
* Body param: List of user IDs of the users that should be authorized to sign on
|
|
301
|
-
* the key quorum.
|
|
302
|
-
*/
|
|
303
|
-
user_ids?: Array<string>;
|
|
304
|
-
|
|
305
|
-
/**
|
|
306
|
-
* Header param: Request authorization signature. If multiple signatures are
|
|
307
|
-
* required, they should be comma separated.
|
|
308
|
-
*/
|
|
309
|
-
'privy-authorization-signature'?: string;
|
|
310
|
-
|
|
311
|
-
/**
|
|
312
|
-
* Header param: Request expiry. Value is a Unix timestamp in milliseconds
|
|
313
|
-
* representing the deadline by which the request must be processed.
|
|
314
|
-
*/
|
|
315
|
-
'privy-request-expiry'?: string;
|
|
316
|
-
}
|
|
317
|
-
|
|
318
119
|
export declare namespace KeyQuorums {
|
|
319
120
|
export {
|
|
320
121
|
type KeyQuorum as KeyQuorum,
|
|
122
|
+
type KeyQuorumAuthorizationHeaders as KeyQuorumAuthorizationHeaders,
|
|
321
123
|
type KeyQuorumCreateRequestBody as KeyQuorumCreateRequestBody,
|
|
322
124
|
type KeyQuorumUpdateRequestBody as KeyQuorumUpdateRequestBody,
|
|
323
|
-
type KeyQuorumAuthorizationHeaders as KeyQuorumAuthorizationHeaders,
|
|
324
|
-
type KeyQuorumCreateParams as KeyQuorumCreateParams,
|
|
325
|
-
type KeyQuorumDeleteParams as KeyQuorumDeleteParams,
|
|
326
|
-
type KeyQuorumUpdateParams as KeyQuorumUpdateParams,
|
|
327
125
|
};
|
|
328
126
|
}
|
|
@@ -5,6 +5,16 @@ import * as KrakenEmbedAPI from './kraken-embed';
|
|
|
5
5
|
|
|
6
6
|
export class KrakenEmbed extends APIResource {}
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* Current day profit and loss for a portfolio, calculated from the most recent
|
|
10
|
+
* available balance.
|
|
11
|
+
*/
|
|
12
|
+
export interface KrakenEmbedCurrentDayPnl {
|
|
13
|
+
pnl: string;
|
|
14
|
+
|
|
15
|
+
since: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
8
18
|
/**
|
|
9
19
|
* Query parameters for listing and filtering available assets.
|
|
10
20
|
*/
|
|
@@ -70,16 +80,6 @@ export interface KrakenEmbedGetPortfolioSummaryQueryParams {
|
|
|
70
80
|
quote?: string;
|
|
71
81
|
}
|
|
72
82
|
|
|
73
|
-
/**
|
|
74
|
-
* Current day profit and loss for a portfolio, calculated from the most recent
|
|
75
|
-
* available balance.
|
|
76
|
-
*/
|
|
77
|
-
export interface KrakenEmbedCurrentDayPnl {
|
|
78
|
-
pnl: string;
|
|
79
|
-
|
|
80
|
-
since: string;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
83
|
/**
|
|
84
84
|
* High-level summary of a user's portfolio including total value, available
|
|
85
85
|
* balance, and unrealized P&L.
|
|
@@ -92,9 +92,9 @@ export namespace KrakenEmbedGetPortfolioSummaryResponse {
|
|
|
92
92
|
export interface Data {
|
|
93
93
|
result: Data.Result | null;
|
|
94
94
|
|
|
95
|
-
error?: Array<
|
|
95
|
+
error?: Array<string>;
|
|
96
96
|
|
|
97
|
-
errors?: Array<
|
|
97
|
+
errors?: Array<string>;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
export namespace Data {
|
|
@@ -117,18 +117,10 @@ export namespace KrakenEmbedGetPortfolioSummaryResponse {
|
|
|
117
117
|
* Current day profit and loss for a portfolio, calculated from the most recent
|
|
118
118
|
* available balance.
|
|
119
119
|
*/
|
|
120
|
-
current_day_pnl?:
|
|
120
|
+
current_day_pnl?: KrakenEmbedAPI.KrakenEmbedCurrentDayPnl | null;
|
|
121
121
|
|
|
122
122
|
lots_upnl?: string | null;
|
|
123
123
|
}
|
|
124
|
-
|
|
125
|
-
export namespace Result {
|
|
126
|
-
/**
|
|
127
|
-
* Current day profit and loss for a portfolio, calculated from the most recent
|
|
128
|
-
* available balance.
|
|
129
|
-
*/
|
|
130
|
-
export interface CurrentDayPnl extends KrakenEmbedAPI.KrakenEmbedCurrentDayPnl {}
|
|
131
|
-
}
|
|
132
124
|
}
|
|
133
125
|
}
|
|
134
126
|
|
|
@@ -179,10 +171,10 @@ export interface KrakenEmbedGetQuoteQueryParams {
|
|
|
179
171
|
|
|
180
172
|
export declare namespace KrakenEmbed {
|
|
181
173
|
export {
|
|
174
|
+
type KrakenEmbedCurrentDayPnl as KrakenEmbedCurrentDayPnl,
|
|
182
175
|
type KrakenEmbedGetAssetListQueryParamsSchema as KrakenEmbedGetAssetListQueryParamsSchema,
|
|
183
176
|
type KrakenEmbedGetPortfolioDetailsQueryParamsSchema as KrakenEmbedGetPortfolioDetailsQueryParamsSchema,
|
|
184
177
|
type KrakenEmbedGetPortfolioSummaryQueryParams as KrakenEmbedGetPortfolioSummaryQueryParams,
|
|
185
|
-
type KrakenEmbedCurrentDayPnl as KrakenEmbedCurrentDayPnl,
|
|
186
178
|
type KrakenEmbedGetPortfolioSummaryResponse as KrakenEmbedGetPortfolioSummaryResponse,
|
|
187
179
|
type KrakenEmbedGetPortfolioTransactionsQueryParamsSchema as KrakenEmbedGetPortfolioTransactionsQueryParamsSchema,
|
|
188
180
|
type KrakenEmbedGetQuoteQueryParams as KrakenEmbedGetQuoteQueryParams,
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
|
|
5
|
+
export class Organizations extends APIResource {}
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Response returned when creating a new organization secret.
|
|
9
|
+
*/
|
|
10
|
+
export interface CreateOrganizationSecretResponse extends OrganizationSecretView {
|
|
11
|
+
/**
|
|
12
|
+
* The plaintext organization secret. Returned only at creation time.
|
|
13
|
+
*/
|
|
14
|
+
organization_secret: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Request body for targeting a specific organization secret.
|
|
19
|
+
*/
|
|
20
|
+
export interface OrganizationSecretIDInput {
|
|
21
|
+
/**
|
|
22
|
+
* The organization secret ID.
|
|
23
|
+
*/
|
|
24
|
+
secret_id: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* View of an organization secret for list and management endpoints.
|
|
29
|
+
*/
|
|
30
|
+
export interface OrganizationSecretView {
|
|
31
|
+
/**
|
|
32
|
+
* Unique secret identifier
|
|
33
|
+
*/
|
|
34
|
+
id: string;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* ISO 8601 creation timestamp
|
|
38
|
+
*/
|
|
39
|
+
created_at: string;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Last four characters of the secret
|
|
43
|
+
*/
|
|
44
|
+
last_four: string;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* ISO 8601 revocation timestamp, or null if active
|
|
48
|
+
*/
|
|
49
|
+
revoked_at: string | null;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* P-256 public key in PEM format for request signing, or null if not configured
|
|
53
|
+
*/
|
|
54
|
+
signing_public_key: string | null;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Response returned when listing organization secrets for an account.
|
|
59
|
+
*/
|
|
60
|
+
export interface OrganizationSecretsListResponse {
|
|
61
|
+
data: Array<OrganizationSecretView>;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Request body for updating the signing public key on an organization secret.
|
|
66
|
+
*/
|
|
67
|
+
export interface UpdateOrganizationSecretSigningKeyInput extends OrganizationSecretIDInput {
|
|
68
|
+
/**
|
|
69
|
+
* P-256 public key in PEM format, or null to clear the configured signing key.
|
|
70
|
+
*/
|
|
71
|
+
signing_public_key: string | null;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export declare namespace Organizations {
|
|
75
|
+
export {
|
|
76
|
+
type CreateOrganizationSecretResponse as CreateOrganizationSecretResponse,
|
|
77
|
+
type OrganizationSecretIDInput as OrganizationSecretIDInput,
|
|
78
|
+
type OrganizationSecretView as OrganizationSecretView,
|
|
79
|
+
type OrganizationSecretsListResponse as OrganizationSecretsListResponse,
|
|
80
|
+
type UpdateOrganizationSecretSigningKeyInput as UpdateOrganizationSecretSigningKeyInput,
|
|
81
|
+
};
|
|
82
|
+
}
|