@dynamic-labs/sdk-api 0.0.747 → 0.0.749
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/package.json +1 -1
- package/src/apis/SDKApi.cjs +36 -0
- package/src/apis/SDKApi.d.ts +13 -0
- package/src/apis/SDKApi.js +36 -0
- package/src/models/WaasPolicyCreateRequest.cjs +0 -3
- package/src/models/WaasPolicyCreateRequest.d.ts +0 -7
- package/src/models/WaasPolicyCreateRequest.js +0 -3
- package/src/models/WaasPolicyRule.cjs +5 -0
- package/src/models/WaasPolicyRule.d.ts +13 -0
- package/src/models/WaasPolicyRule.js +5 -0
package/package.json
CHANGED
package/src/apis/SDKApi.cjs
CHANGED
|
@@ -3453,6 +3453,42 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
3453
3453
|
return yield response.value();
|
|
3454
3454
|
});
|
|
3455
3455
|
}
|
|
3456
|
+
/**
|
|
3457
|
+
* Get account balances for multiple addresses
|
|
3458
|
+
*/
|
|
3459
|
+
getUserAccountBalancesRaw(requestParameters, initOverrides) {
|
|
3460
|
+
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
3461
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
3462
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getUserAccountBalances.');
|
|
3463
|
+
}
|
|
3464
|
+
if (requestParameters.userId === null || requestParameters.userId === undefined) {
|
|
3465
|
+
throw new runtime.RequiredError('userId', 'Required parameter requestParameters.userId was null or undefined when calling getUserAccountBalances.');
|
|
3466
|
+
}
|
|
3467
|
+
if (requestParameters.multichainAccountBalancesRequest === null || requestParameters.multichainAccountBalancesRequest === undefined) {
|
|
3468
|
+
throw new runtime.RequiredError('multichainAccountBalancesRequest', 'Required parameter requestParameters.multichainAccountBalancesRequest was null or undefined when calling getUserAccountBalances.');
|
|
3469
|
+
}
|
|
3470
|
+
const queryParameters = {};
|
|
3471
|
+
const headerParameters = {};
|
|
3472
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
3473
|
+
const response = yield this.request({
|
|
3474
|
+
path: `/environments/{environmentId}/users/{userId}/balances`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"userId"}}`, encodeURIComponent(String(requestParameters.userId))),
|
|
3475
|
+
method: 'POST',
|
|
3476
|
+
headers: headerParameters,
|
|
3477
|
+
query: queryParameters,
|
|
3478
|
+
body: MultichainAccountBalancesRequest.MultichainAccountBalancesRequestToJSON(requestParameters.multichainAccountBalancesRequest),
|
|
3479
|
+
}, initOverrides);
|
|
3480
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => MultichainAccountBalanceResponse.MultichainAccountBalanceResponseFromJSON(jsonValue));
|
|
3481
|
+
});
|
|
3482
|
+
}
|
|
3483
|
+
/**
|
|
3484
|
+
* Get account balances for multiple addresses
|
|
3485
|
+
*/
|
|
3486
|
+
getUserAccountBalances(requestParameters, initOverrides) {
|
|
3487
|
+
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
3488
|
+
const response = yield this.getUserAccountBalancesRaw(requestParameters, initOverrides);
|
|
3489
|
+
return yield response.value();
|
|
3490
|
+
});
|
|
3491
|
+
}
|
|
3456
3492
|
/**
|
|
3457
3493
|
* Get the exchange accounts for a given dynamic user
|
|
3458
3494
|
*/
|
package/src/apis/SDKApi.d.ts
CHANGED
|
@@ -380,6 +380,11 @@ export interface GetTelegramAuthRequest {
|
|
|
380
380
|
environmentId: string;
|
|
381
381
|
state: string;
|
|
382
382
|
}
|
|
383
|
+
export interface GetUserAccountBalancesRequest {
|
|
384
|
+
environmentId: string;
|
|
385
|
+
userId: string;
|
|
386
|
+
multichainAccountBalancesRequest: MultichainAccountBalancesRequest;
|
|
387
|
+
}
|
|
383
388
|
export interface GetUserAccountsRequest {
|
|
384
389
|
environmentId: string;
|
|
385
390
|
exchangeKey: ExchangeKeyEnum;
|
|
@@ -1701,6 +1706,14 @@ export declare class SDKApi extends runtime.BaseAPI {
|
|
|
1701
1706
|
* Get HTML with rendered Telegram login widget
|
|
1702
1707
|
*/
|
|
1703
1708
|
getTelegramAuth(requestParameters: GetTelegramAuthRequest, initOverrides?: RequestInit): Promise<string>;
|
|
1709
|
+
/**
|
|
1710
|
+
* Get account balances for multiple addresses
|
|
1711
|
+
*/
|
|
1712
|
+
getUserAccountBalancesRaw(requestParameters: GetUserAccountBalancesRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<MultichainAccountBalanceResponse>>;
|
|
1713
|
+
/**
|
|
1714
|
+
* Get account balances for multiple addresses
|
|
1715
|
+
*/
|
|
1716
|
+
getUserAccountBalances(requestParameters: GetUserAccountBalancesRequest, initOverrides?: RequestInit): Promise<MultichainAccountBalanceResponse>;
|
|
1704
1717
|
/**
|
|
1705
1718
|
* Get the exchange accounts for a given dynamic user
|
|
1706
1719
|
*/
|
package/src/apis/SDKApi.js
CHANGED
|
@@ -3449,6 +3449,42 @@ class SDKApi extends BaseAPI {
|
|
|
3449
3449
|
return yield response.value();
|
|
3450
3450
|
});
|
|
3451
3451
|
}
|
|
3452
|
+
/**
|
|
3453
|
+
* Get account balances for multiple addresses
|
|
3454
|
+
*/
|
|
3455
|
+
getUserAccountBalancesRaw(requestParameters, initOverrides) {
|
|
3456
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3457
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
3458
|
+
throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getUserAccountBalances.');
|
|
3459
|
+
}
|
|
3460
|
+
if (requestParameters.userId === null || requestParameters.userId === undefined) {
|
|
3461
|
+
throw new RequiredError('userId', 'Required parameter requestParameters.userId was null or undefined when calling getUserAccountBalances.');
|
|
3462
|
+
}
|
|
3463
|
+
if (requestParameters.multichainAccountBalancesRequest === null || requestParameters.multichainAccountBalancesRequest === undefined) {
|
|
3464
|
+
throw new RequiredError('multichainAccountBalancesRequest', 'Required parameter requestParameters.multichainAccountBalancesRequest was null or undefined when calling getUserAccountBalances.');
|
|
3465
|
+
}
|
|
3466
|
+
const queryParameters = {};
|
|
3467
|
+
const headerParameters = {};
|
|
3468
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
3469
|
+
const response = yield this.request({
|
|
3470
|
+
path: `/environments/{environmentId}/users/{userId}/balances`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"userId"}}`, encodeURIComponent(String(requestParameters.userId))),
|
|
3471
|
+
method: 'POST',
|
|
3472
|
+
headers: headerParameters,
|
|
3473
|
+
query: queryParameters,
|
|
3474
|
+
body: MultichainAccountBalancesRequestToJSON(requestParameters.multichainAccountBalancesRequest),
|
|
3475
|
+
}, initOverrides);
|
|
3476
|
+
return new JSONApiResponse(response, (jsonValue) => MultichainAccountBalanceResponseFromJSON(jsonValue));
|
|
3477
|
+
});
|
|
3478
|
+
}
|
|
3479
|
+
/**
|
|
3480
|
+
* Get account balances for multiple addresses
|
|
3481
|
+
*/
|
|
3482
|
+
getUserAccountBalances(requestParameters, initOverrides) {
|
|
3483
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3484
|
+
const response = yield this.getUserAccountBalancesRaw(requestParameters, initOverrides);
|
|
3485
|
+
return yield response.value();
|
|
3486
|
+
});
|
|
3487
|
+
}
|
|
3452
3488
|
/**
|
|
3453
3489
|
* Get the exchange accounts for a given dynamic user
|
|
3454
3490
|
*/
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var ChainEnum = require('./ChainEnum.cjs');
|
|
6
5
|
var WaasPolicyRule = require('./WaasPolicyRule.cjs');
|
|
7
6
|
|
|
8
7
|
/* tslint:disable */
|
|
@@ -15,7 +14,6 @@ function WaasPolicyCreateRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
15
14
|
}
|
|
16
15
|
return {
|
|
17
16
|
'policyName': json['policyName'],
|
|
18
|
-
'chain': ChainEnum.ChainEnumFromJSON(json['chain']),
|
|
19
17
|
'policyContent': (json['policyContent'].map(WaasPolicyRule.WaasPolicyRuleFromJSON)),
|
|
20
18
|
};
|
|
21
19
|
}
|
|
@@ -28,7 +26,6 @@ function WaasPolicyCreateRequestToJSON(value) {
|
|
|
28
26
|
}
|
|
29
27
|
return {
|
|
30
28
|
'policyName': value.policyName,
|
|
31
|
-
'chain': ChainEnum.ChainEnumToJSON(value.chain),
|
|
32
29
|
'policyContent': (value.policyContent.map(WaasPolicyRule.WaasPolicyRuleToJSON)),
|
|
33
30
|
};
|
|
34
31
|
}
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import { ChainEnum } from './ChainEnum';
|
|
13
12
|
import { WaasPolicyRule } from './WaasPolicyRule';
|
|
14
13
|
/**
|
|
15
14
|
*
|
|
@@ -23,12 +22,6 @@ export interface WaasPolicyCreateRequest {
|
|
|
23
22
|
* @memberof WaasPolicyCreateRequest
|
|
24
23
|
*/
|
|
25
24
|
policyName: string;
|
|
26
|
-
/**
|
|
27
|
-
*
|
|
28
|
-
* @type {ChainEnum}
|
|
29
|
-
* @memberof WaasPolicyCreateRequest
|
|
30
|
-
*/
|
|
31
|
-
chain: ChainEnum;
|
|
32
25
|
/**
|
|
33
26
|
* Array of rules defining the policy permissions
|
|
34
27
|
* @type {Array<WaasPolicyRule>}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ChainEnumFromJSON, ChainEnumToJSON } from './ChainEnum.js';
|
|
2
1
|
import { WaasPolicyRuleFromJSON, WaasPolicyRuleToJSON } from './WaasPolicyRule.js';
|
|
3
2
|
|
|
4
3
|
/* tslint:disable */
|
|
@@ -11,7 +10,6 @@ function WaasPolicyCreateRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
11
10
|
}
|
|
12
11
|
return {
|
|
13
12
|
'policyName': json['policyName'],
|
|
14
|
-
'chain': ChainEnumFromJSON(json['chain']),
|
|
15
13
|
'policyContent': (json['policyContent'].map(WaasPolicyRuleFromJSON)),
|
|
16
14
|
};
|
|
17
15
|
}
|
|
@@ -24,7 +22,6 @@ function WaasPolicyCreateRequestToJSON(value) {
|
|
|
24
22
|
}
|
|
25
23
|
return {
|
|
26
24
|
'policyName': value.policyName,
|
|
27
|
-
'chain': ChainEnumToJSON(value.chain),
|
|
28
25
|
'policyContent': (value.policyContent.map(WaasPolicyRuleToJSON)),
|
|
29
26
|
};
|
|
30
27
|
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var runtime = require('../runtime.cjs');
|
|
6
|
+
var WaasChainEnum = require('./WaasChainEnum.cjs');
|
|
6
7
|
var WaasPolicyArgumentConstraint = require('./WaasPolicyArgumentConstraint.cjs');
|
|
7
8
|
var WaasPolicyRuleType = require('./WaasPolicyRuleType.cjs');
|
|
8
9
|
var WaasPolicyRuleValueLimit = require('./WaasPolicyRuleValueLimit.cjs');
|
|
@@ -18,6 +19,8 @@ function WaasPolicyRuleFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
18
19
|
return {
|
|
19
20
|
'ruleType': WaasPolicyRuleType.WaasPolicyRuleTypeFromJSON(json['ruleType']),
|
|
20
21
|
'address': json['address'],
|
|
22
|
+
'chain': WaasChainEnum.WaasChainEnumFromJSON(json['chain']),
|
|
23
|
+
'chainId': json['chainId'],
|
|
21
24
|
'contractAbi': !runtime.exists(json, 'contractAbi') ? undefined : json['contractAbi'],
|
|
22
25
|
'functionName': !runtime.exists(json, 'functionName') ? undefined : json['functionName'],
|
|
23
26
|
'argumentConstraints': !runtime.exists(json, 'argumentConstraints') ? undefined : (json['argumentConstraints'].map(WaasPolicyArgumentConstraint.WaasPolicyArgumentConstraintFromJSON)),
|
|
@@ -34,6 +37,8 @@ function WaasPolicyRuleToJSON(value) {
|
|
|
34
37
|
return {
|
|
35
38
|
'ruleType': WaasPolicyRuleType.WaasPolicyRuleTypeToJSON(value.ruleType),
|
|
36
39
|
'address': value.address,
|
|
40
|
+
'chain': WaasChainEnum.WaasChainEnumToJSON(value.chain),
|
|
41
|
+
'chainId': value.chainId,
|
|
37
42
|
'contractAbi': value.contractAbi,
|
|
38
43
|
'functionName': value.functionName,
|
|
39
44
|
'argumentConstraints': value.argumentConstraints === undefined ? undefined : (value.argumentConstraints.map(WaasPolicyArgumentConstraint.WaasPolicyArgumentConstraintToJSON)),
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import { WaasChainEnum } from './WaasChainEnum';
|
|
12
13
|
import { WaasPolicyArgumentConstraint } from './WaasPolicyArgumentConstraint';
|
|
13
14
|
import { WaasPolicyRuleType } from './WaasPolicyRuleType';
|
|
14
15
|
import { WaasPolicyRuleValueLimit } from './WaasPolicyRuleValueLimit';
|
|
@@ -30,6 +31,18 @@ export interface WaasPolicyRule {
|
|
|
30
31
|
* @memberof WaasPolicyRule
|
|
31
32
|
*/
|
|
32
33
|
address: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {WaasChainEnum}
|
|
37
|
+
* @memberof WaasPolicyRule
|
|
38
|
+
*/
|
|
39
|
+
chain: WaasChainEnum;
|
|
40
|
+
/**
|
|
41
|
+
* Chain ID for the policy rule
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof WaasPolicyRule
|
|
44
|
+
*/
|
|
45
|
+
chainId: number;
|
|
33
46
|
/**
|
|
34
47
|
* Contract ABI interface
|
|
35
48
|
* @type {Array<object>}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { exists } from '../runtime.js';
|
|
2
|
+
import { WaasChainEnumFromJSON, WaasChainEnumToJSON } from './WaasChainEnum.js';
|
|
2
3
|
import { WaasPolicyArgumentConstraintFromJSON, WaasPolicyArgumentConstraintToJSON } from './WaasPolicyArgumentConstraint.js';
|
|
3
4
|
import { WaasPolicyRuleTypeFromJSON, WaasPolicyRuleTypeToJSON } from './WaasPolicyRuleType.js';
|
|
4
5
|
import { WaasPolicyRuleValueLimitFromJSON, WaasPolicyRuleValueLimitToJSON } from './WaasPolicyRuleValueLimit.js';
|
|
@@ -14,6 +15,8 @@ function WaasPolicyRuleFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
14
15
|
return {
|
|
15
16
|
'ruleType': WaasPolicyRuleTypeFromJSON(json['ruleType']),
|
|
16
17
|
'address': json['address'],
|
|
18
|
+
'chain': WaasChainEnumFromJSON(json['chain']),
|
|
19
|
+
'chainId': json['chainId'],
|
|
17
20
|
'contractAbi': !exists(json, 'contractAbi') ? undefined : json['contractAbi'],
|
|
18
21
|
'functionName': !exists(json, 'functionName') ? undefined : json['functionName'],
|
|
19
22
|
'argumentConstraints': !exists(json, 'argumentConstraints') ? undefined : (json['argumentConstraints'].map(WaasPolicyArgumentConstraintFromJSON)),
|
|
@@ -30,6 +33,8 @@ function WaasPolicyRuleToJSON(value) {
|
|
|
30
33
|
return {
|
|
31
34
|
'ruleType': WaasPolicyRuleTypeToJSON(value.ruleType),
|
|
32
35
|
'address': value.address,
|
|
36
|
+
'chain': WaasChainEnumToJSON(value.chain),
|
|
37
|
+
'chainId': value.chainId,
|
|
33
38
|
'contractAbi': value.contractAbi,
|
|
34
39
|
'functionName': value.functionName,
|
|
35
40
|
'argumentConstraints': value.argumentConstraints === undefined ? undefined : (value.argumentConstraints.map(WaasPolicyArgumentConstraintToJSON)),
|