@dynamic-labs/sdk-api 0.0.748 → 0.0.750

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/sdk-api",
3
- "version": "0.0.748",
3
+ "version": "0.0.750",
4
4
  "author": "Dynamic Labs",
5
5
  "license": "Apache-2.0",
6
6
  "publishConfig": {
@@ -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
  */
@@ -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
  */
@@ -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
  */
@@ -61,6 +61,7 @@ function DynamicJwtFromJSONTyped(json, ignoreDiscriminator) {
61
61
  'metadata': !runtime.exists(json, 'metadata') ? undefined : json['metadata'],
62
62
  'verifiedCredentialsHashes': !runtime.exists(json, 'verifiedCredentialsHashes') ? undefined : JwtVerifiedCredentialHashes.JwtVerifiedCredentialHashesFromJSON(json['verifiedCredentialsHashes']),
63
63
  'info': !runtime.exists(json, 'info') ? undefined : JwtPayloadDeprecatedInfo.JwtPayloadDeprecatedInfoFromJSON(json['info']),
64
+ 'serverAuth': !runtime.exists(json, 'server_auth') ? undefined : json['server_auth'],
64
65
  };
65
66
  }
66
67
  function DynamicJwtToJSON(value) {
@@ -114,6 +115,7 @@ function DynamicJwtToJSON(value) {
114
115
  'metadata': value.metadata,
115
116
  'verifiedCredentialsHashes': JwtVerifiedCredentialHashes.JwtVerifiedCredentialHashesToJSON(value.verifiedCredentialsHashes),
116
117
  'info': JwtPayloadDeprecatedInfo.JwtPayloadDeprecatedInfoToJSON(value.info),
118
+ 'server_auth': value.serverAuth,
117
119
  };
118
120
  }
119
121
 
@@ -278,6 +278,12 @@ export interface DynamicJwt {
278
278
  * @memberof DynamicJwt
279
279
  */
280
280
  info?: JwtPayloadDeprecatedInfo;
281
+ /**
282
+ *
283
+ * @type {boolean}
284
+ * @memberof DynamicJwt
285
+ */
286
+ serverAuth?: boolean;
281
287
  }
282
288
  export declare function DynamicJwtFromJSON(json: any): DynamicJwt;
283
289
  export declare function DynamicJwtFromJSONTyped(json: any, ignoreDiscriminator: boolean): DynamicJwt;
@@ -57,6 +57,7 @@ function DynamicJwtFromJSONTyped(json, ignoreDiscriminator) {
57
57
  'metadata': !exists(json, 'metadata') ? undefined : json['metadata'],
58
58
  'verifiedCredentialsHashes': !exists(json, 'verifiedCredentialsHashes') ? undefined : JwtVerifiedCredentialHashesFromJSON(json['verifiedCredentialsHashes']),
59
59
  'info': !exists(json, 'info') ? undefined : JwtPayloadDeprecatedInfoFromJSON(json['info']),
60
+ 'serverAuth': !exists(json, 'server_auth') ? undefined : json['server_auth'],
60
61
  };
61
62
  }
62
63
  function DynamicJwtToJSON(value) {
@@ -110,6 +111,7 @@ function DynamicJwtToJSON(value) {
110
111
  'metadata': value.metadata,
111
112
  'verifiedCredentialsHashes': JwtVerifiedCredentialHashesToJSON(value.verifiedCredentialsHashes),
112
113
  'info': JwtPayloadDeprecatedInfoToJSON(value.info),
114
+ 'server_auth': value.serverAuth,
113
115
  };
114
116
  }
115
117
 
@@ -28,6 +28,7 @@ function MinifiedDynamicJwtFromJSONTyped(json, ignoreDiscriminator) {
28
28
  'verifiedCredentialsHashes': !runtime.exists(json, 'verifiedCredentialsHashes') ? undefined : JwtVerifiedCredentialHashes.JwtVerifiedCredentialHashesFromJSON(json['verifiedCredentialsHashes']),
29
29
  'email': !runtime.exists(json, 'email') ? undefined : json['email'],
30
30
  'username': !runtime.exists(json, 'username') ? undefined : json['username'],
31
+ 'serverAuth': !runtime.exists(json, 'server_auth') ? undefined : json['server_auth'],
31
32
  };
32
33
  }
33
34
  function MinifiedDynamicJwtToJSON(value) {
@@ -52,6 +53,7 @@ function MinifiedDynamicJwtToJSON(value) {
52
53
  'verifiedCredentialsHashes': JwtVerifiedCredentialHashes.JwtVerifiedCredentialHashesToJSON(value.verifiedCredentialsHashes),
53
54
  'email': value.email,
54
55
  'username': value.username,
56
+ 'server_auth': value.serverAuth,
55
57
  };
56
58
  }
57
59
 
@@ -100,6 +100,12 @@ export interface MinifiedDynamicJwt {
100
100
  * @memberof MinifiedDynamicJwt
101
101
  */
102
102
  username?: string;
103
+ /**
104
+ *
105
+ * @type {boolean}
106
+ * @memberof MinifiedDynamicJwt
107
+ */
108
+ serverAuth?: boolean;
103
109
  }
104
110
  export declare function MinifiedDynamicJwtFromJSON(json: any): MinifiedDynamicJwt;
105
111
  export declare function MinifiedDynamicJwtFromJSONTyped(json: any, ignoreDiscriminator: boolean): MinifiedDynamicJwt;
@@ -24,6 +24,7 @@ function MinifiedDynamicJwtFromJSONTyped(json, ignoreDiscriminator) {
24
24
  'verifiedCredentialsHashes': !exists(json, 'verifiedCredentialsHashes') ? undefined : JwtVerifiedCredentialHashesFromJSON(json['verifiedCredentialsHashes']),
25
25
  'email': !exists(json, 'email') ? undefined : json['email'],
26
26
  'username': !exists(json, 'username') ? undefined : json['username'],
27
+ 'serverAuth': !exists(json, 'server_auth') ? undefined : json['server_auth'],
27
28
  };
28
29
  }
29
30
  function MinifiedDynamicJwtToJSON(value) {
@@ -48,6 +49,7 @@ function MinifiedDynamicJwtToJSON(value) {
48
49
  'verifiedCredentialsHashes': JwtVerifiedCredentialHashesToJSON(value.verifiedCredentialsHashes),
49
50
  'email': value.email,
50
51
  'username': value.username,
52
+ 'server_auth': value.serverAuth,
51
53
  };
52
54
  }
53
55