@dynamic-labs/sdk-api-core 0.0.603 → 0.0.604

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-core",
3
- "version": "0.0.603",
3
+ "version": "0.0.604",
4
4
  "author": "Dynamic Labs",
5
5
  "license": "Apache-2.0",
6
6
  "publishConfig": {
@@ -35,6 +35,7 @@ var CreateEmbeddedWalletsRequest = require('../models/CreateEmbeddedWalletsReque
35
35
  require('../models/UserIdentifierTypeEnum.cjs');
36
36
  var CreateWaasAccountRequest = require('../models/CreateWaasAccountRequest.cjs');
37
37
  var CreateWalletAccountRequest = require('../models/CreateWalletAccountRequest.cjs');
38
+ var Currency = require('../models/Currency.cjs');
38
39
  require('../models/CurrencyType.cjs');
39
40
  var DeleteEmbeddedWalletsRequest = require('../models/DeleteEmbeddedWalletsRequest.cjs');
40
41
  require('../models/TimeUnitEnum.cjs');
@@ -1762,6 +1763,61 @@ class SDKApi extends runtime.BaseAPI {
1762
1763
  return yield response.value();
1763
1764
  });
1764
1765
  }
1766
+ /**
1767
+ * Exchange rates for the given currency
1768
+ */
1769
+ getCurrencyExchangeRatesRaw(requestParameters, initOverrides) {
1770
+ return _tslib.__awaiter(this, void 0, void 0, function* () {
1771
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
1772
+ throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getCurrencyExchangeRates.');
1773
+ }
1774
+ const queryParameters = {};
1775
+ const headerParameters = {};
1776
+ const response = yield this.request({
1777
+ path: `/sdk/{environmentId}/exchangeRates`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
1778
+ method: 'GET',
1779
+ headers: headerParameters,
1780
+ query: queryParameters,
1781
+ }, initOverrides);
1782
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(Currency.CurrencyFromJSON));
1783
+ });
1784
+ }
1785
+ /**
1786
+ * Exchange rates for the given currency
1787
+ */
1788
+ getCurrencyExchangeRates(requestParameters, initOverrides) {
1789
+ return _tslib.__awaiter(this, void 0, void 0, function* () {
1790
+ const response = yield this.getCurrencyExchangeRatesRaw(requestParameters, initOverrides);
1791
+ return yield response.value();
1792
+ });
1793
+ }
1794
+ /**
1795
+ * Options call for this endpoint
1796
+ */
1797
+ getCurrencyExchangeRatesOptionsRaw(requestParameters, initOverrides) {
1798
+ return _tslib.__awaiter(this, void 0, void 0, function* () {
1799
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
1800
+ throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getCurrencyExchangeRatesOptions.');
1801
+ }
1802
+ const queryParameters = {};
1803
+ const headerParameters = {};
1804
+ const response = yield this.request({
1805
+ path: `/sdk/{environmentId}/exchangeRates`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
1806
+ method: 'OPTIONS',
1807
+ headers: headerParameters,
1808
+ query: queryParameters,
1809
+ }, initOverrides);
1810
+ return new runtime.VoidApiResponse(response);
1811
+ });
1812
+ }
1813
+ /**
1814
+ * Options call for this endpoint
1815
+ */
1816
+ getCurrencyExchangeRatesOptions(requestParameters, initOverrides) {
1817
+ return _tslib.__awaiter(this, void 0, void 0, function* () {
1818
+ yield this.getCurrencyExchangeRatesOptionsRaw(requestParameters, initOverrides);
1819
+ });
1820
+ }
1765
1821
  /**
1766
1822
  * Return the email provider to be used for signing in with a given email. If an external provider such as magicLink is disabled, this endpoint would return emailOnly. If an external provider such as magicLink is enabled, it will return emailOnly when the email already exists in Dynamic and it is associated with a wallet, otherwise it will return magicLink.
1767
1823
  * Get signin email provider
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import { BackupKeyshareRequest, BackupKeyshareResponse, CompletePasskeyRecoveryRequest, ConnectRequest, CreateEmbeddedWalletsRequest, CreateWaasAccountRequest, CreateWalletAccountRequest, DeleteEmbeddedWalletsRequest, EmailProviderResponse, EmailVerificationCreateRequest, EmailVerificationCreateResponse, EmailVerificationRetryRequest, EmailVerificationVerifyRequest, EmbeddedWalletAuthToken, EmbeddedWalletAuthType, EmbeddedWalletChainEnum, EmbeddedWalletPasscodeClaimRequest, EmbeddedWalletSecret, ExportEmbeddedWalletResponse, ExportWaasWalletPrivateKeyRequest, ExternalAuthSigninRequest, FarcasterSignInRequest, GetUserPasskeysResponse, GlobalWalletSettings, HealthcheckResponse, ImportWaasPrivateKeyRequest, InitEmailAuthRequest, InitEmailAuthResponse, InitPasskeyRecoveryRequest, InitPasskeyRecoveryResponse, JwksResponse, MFAAuthPasskeyDeviceGetResponse, MFAAuthPasskeyDevicePostRequest, MFAAuthRecoveryDevicePostRequest, MFAAuthTotpDevicePostRequest, MFADevice, MFAGetRecoveryCodesResponse, MFAListDevicesResponse, MFARegenRecoveryCodesResponse, MFARegisterPasskeyDeviceGetResponse, MFARegisterPasskeyDevicePostRequest, MFARegisterTotpDeviceGetResponse, MFARegisterTotpDevicePostRequest, MFAUpdateDeviceRequest, MergeUserConflictResolutions, NetworkConfigurationResponse, NonceResponse, OauthInitAuthRequest, OauthProviderLoginUrl, OauthRequest, OauthResultRequest, OauthResultResponse, OpenRoomResponse, OpenRoomResponseWithServerKeygenIds, PrefetchRequest, ProjectSettings, ProviderEnum, PublishEvents, RecoverKeyshareResponse, RefreshKeySharesRequest, RegisterEmbeddedWalletSessionKeyResponse, RegisterSessionKeyRequest, ReshareRequest, ScanWebsiteUrlRequest, ScanWebsiteUrlResponse, SdkSettingsRequest, SdkUser, SignMessageWithWaasRequest, SimulateEVMTransactionRequest, SimulateSVMTransactionRequest, SimulateTransactionResponse, SimulateUserOpRequest, SmsVerificationCreateRequest, SmsVerificationCreateResponse, SmsVerificationRetryRequest, SmsVerificationVerifyRequest, SolanaTransactionOptimizationRequest, SolanaTransactionOptimizationResponse, SupportedOnrampsResponse, TelegramPostRequest, TokenBalance, TurnkeyCreateWalletAccountsRequestBody, TurnkeyDeleteEmbeddedWalletsRequestBody, UpdateRecoveryEmailRequest, UpdateSelfResponse, UpdateUserPasskeyRequest, UpgradeEmbeddedWalletToV2Request, UserFields, UserFieldsCheckParams, UserFieldsCheckResponse, UserPasskey, UserWalletSelectionRequest, VerifyRequest, VerifyResponse, VerifyUnlinkRequest } from '../models';
13
+ import { BackupKeyshareRequest, BackupKeyshareResponse, CompletePasskeyRecoveryRequest, ConnectRequest, CreateEmbeddedWalletsRequest, CreateWaasAccountRequest, CreateWalletAccountRequest, Currency, DeleteEmbeddedWalletsRequest, EmailProviderResponse, EmailVerificationCreateRequest, EmailVerificationCreateResponse, EmailVerificationRetryRequest, EmailVerificationVerifyRequest, EmbeddedWalletAuthToken, EmbeddedWalletAuthType, EmbeddedWalletChainEnum, EmbeddedWalletPasscodeClaimRequest, EmbeddedWalletSecret, ExportEmbeddedWalletResponse, ExportWaasWalletPrivateKeyRequest, ExternalAuthSigninRequest, FarcasterSignInRequest, GetUserPasskeysResponse, GlobalWalletSettings, HealthcheckResponse, ImportWaasPrivateKeyRequest, InitEmailAuthRequest, InitEmailAuthResponse, InitPasskeyRecoveryRequest, InitPasskeyRecoveryResponse, JwksResponse, MFAAuthPasskeyDeviceGetResponse, MFAAuthPasskeyDevicePostRequest, MFAAuthRecoveryDevicePostRequest, MFAAuthTotpDevicePostRequest, MFADevice, MFAGetRecoveryCodesResponse, MFAListDevicesResponse, MFARegenRecoveryCodesResponse, MFARegisterPasskeyDeviceGetResponse, MFARegisterPasskeyDevicePostRequest, MFARegisterTotpDeviceGetResponse, MFARegisterTotpDevicePostRequest, MFAUpdateDeviceRequest, MergeUserConflictResolutions, NetworkConfigurationResponse, NonceResponse, OauthInitAuthRequest, OauthProviderLoginUrl, OauthRequest, OauthResultRequest, OauthResultResponse, OpenRoomResponse, OpenRoomResponseWithServerKeygenIds, PrefetchRequest, ProjectSettings, ProviderEnum, PublishEvents, RecoverKeyshareResponse, RefreshKeySharesRequest, RegisterEmbeddedWalletSessionKeyResponse, RegisterSessionKeyRequest, ReshareRequest, ScanWebsiteUrlRequest, ScanWebsiteUrlResponse, SdkSettingsRequest, SdkUser, SignMessageWithWaasRequest, SimulateEVMTransactionRequest, SimulateSVMTransactionRequest, SimulateTransactionResponse, SimulateUserOpRequest, SmsVerificationCreateRequest, SmsVerificationCreateResponse, SmsVerificationRetryRequest, SmsVerificationVerifyRequest, SolanaTransactionOptimizationRequest, SolanaTransactionOptimizationResponse, SupportedOnrampsResponse, TelegramPostRequest, TokenBalance, TurnkeyCreateWalletAccountsRequestBody, TurnkeyDeleteEmbeddedWalletsRequestBody, UpdateRecoveryEmailRequest, UpdateSelfResponse, UpdateUserPasskeyRequest, UpgradeEmbeddedWalletToV2Request, UserFields, UserFieldsCheckParams, UserFieldsCheckResponse, UserPasskey, UserWalletSelectionRequest, VerifyRequest, VerifyResponse, VerifyUnlinkRequest } from '../models';
14
14
  export interface AuthMfaPasskeyDeviceRequest {
15
15
  environmentId: string;
16
16
  mFAAuthPasskeyDevicePostRequest: MFAAuthPasskeyDevicePostRequest;
@@ -190,6 +190,12 @@ export interface GetCreateWalletAccountRequestRequest {
190
190
  environmentId: string;
191
191
  chain: EmbeddedWalletChainEnum;
192
192
  }
193
+ export interface GetCurrencyExchangeRatesRequest {
194
+ environmentId: string;
195
+ }
196
+ export interface GetCurrencyExchangeRatesOptionsRequest {
197
+ environmentId: string;
198
+ }
193
199
  export interface GetEmailProviderRequest {
194
200
  environmentId: string;
195
201
  email: string;
@@ -1090,6 +1096,22 @@ export declare class SDKApi extends runtime.BaseAPI {
1090
1096
  * Generates the turnkey request body for a user\'s create wallet account request
1091
1097
  */
1092
1098
  getCreateWalletAccountRequest(requestParameters: GetCreateWalletAccountRequestRequest, initOverrides?: RequestInit): Promise<TurnkeyCreateWalletAccountsRequestBody>;
1099
+ /**
1100
+ * Exchange rates for the given currency
1101
+ */
1102
+ getCurrencyExchangeRatesRaw(requestParameters: GetCurrencyExchangeRatesRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Array<Currency>>>;
1103
+ /**
1104
+ * Exchange rates for the given currency
1105
+ */
1106
+ getCurrencyExchangeRates(requestParameters: GetCurrencyExchangeRatesRequest, initOverrides?: RequestInit): Promise<Array<Currency>>;
1107
+ /**
1108
+ * Options call for this endpoint
1109
+ */
1110
+ getCurrencyExchangeRatesOptionsRaw(requestParameters: GetCurrencyExchangeRatesOptionsRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<void>>;
1111
+ /**
1112
+ * Options call for this endpoint
1113
+ */
1114
+ getCurrencyExchangeRatesOptions(requestParameters: GetCurrencyExchangeRatesOptionsRequest, initOverrides?: RequestInit): Promise<void>;
1093
1115
  /**
1094
1116
  * Return the email provider to be used for signing in with a given email. If an external provider such as magicLink is disabled, this endpoint would return emailOnly. If an external provider such as magicLink is enabled, it will return emailOnly when the email already exists in Dynamic and it is associated with a wallet, otherwise it will return magicLink.
1095
1117
  * Get signin email provider
@@ -31,6 +31,7 @@ import { CreateEmbeddedWalletsRequestToJSON } from '../models/CreateEmbeddedWall
31
31
  import '../models/UserIdentifierTypeEnum.js';
32
32
  import { CreateWaasAccountRequestToJSON } from '../models/CreateWaasAccountRequest.js';
33
33
  import { CreateWalletAccountRequestToJSON } from '../models/CreateWalletAccountRequest.js';
34
+ import { CurrencyFromJSON } from '../models/Currency.js';
34
35
  import '../models/CurrencyType.js';
35
36
  import { DeleteEmbeddedWalletsRequestToJSON } from '../models/DeleteEmbeddedWalletsRequest.js';
36
37
  import '../models/TimeUnitEnum.js';
@@ -1758,6 +1759,61 @@ class SDKApi extends BaseAPI {
1758
1759
  return yield response.value();
1759
1760
  });
1760
1761
  }
1762
+ /**
1763
+ * Exchange rates for the given currency
1764
+ */
1765
+ getCurrencyExchangeRatesRaw(requestParameters, initOverrides) {
1766
+ return __awaiter(this, void 0, void 0, function* () {
1767
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
1768
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getCurrencyExchangeRates.');
1769
+ }
1770
+ const queryParameters = {};
1771
+ const headerParameters = {};
1772
+ const response = yield this.request({
1773
+ path: `/sdk/{environmentId}/exchangeRates`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
1774
+ method: 'GET',
1775
+ headers: headerParameters,
1776
+ query: queryParameters,
1777
+ }, initOverrides);
1778
+ return new JSONApiResponse(response, (jsonValue) => jsonValue.map(CurrencyFromJSON));
1779
+ });
1780
+ }
1781
+ /**
1782
+ * Exchange rates for the given currency
1783
+ */
1784
+ getCurrencyExchangeRates(requestParameters, initOverrides) {
1785
+ return __awaiter(this, void 0, void 0, function* () {
1786
+ const response = yield this.getCurrencyExchangeRatesRaw(requestParameters, initOverrides);
1787
+ return yield response.value();
1788
+ });
1789
+ }
1790
+ /**
1791
+ * Options call for this endpoint
1792
+ */
1793
+ getCurrencyExchangeRatesOptionsRaw(requestParameters, initOverrides) {
1794
+ return __awaiter(this, void 0, void 0, function* () {
1795
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
1796
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getCurrencyExchangeRatesOptions.');
1797
+ }
1798
+ const queryParameters = {};
1799
+ const headerParameters = {};
1800
+ const response = yield this.request({
1801
+ path: `/sdk/{environmentId}/exchangeRates`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
1802
+ method: 'OPTIONS',
1803
+ headers: headerParameters,
1804
+ query: queryParameters,
1805
+ }, initOverrides);
1806
+ return new VoidApiResponse(response);
1807
+ });
1808
+ }
1809
+ /**
1810
+ * Options call for this endpoint
1811
+ */
1812
+ getCurrencyExchangeRatesOptions(requestParameters, initOverrides) {
1813
+ return __awaiter(this, void 0, void 0, function* () {
1814
+ yield this.getCurrencyExchangeRatesOptionsRaw(requestParameters, initOverrides);
1815
+ });
1816
+ }
1761
1817
  /**
1762
1818
  * Return the email provider to be used for signing in with a given email. If an external provider such as magicLink is disabled, this endpoint would return emailOnly. If an external provider such as magicLink is enabled, it will return emailOnly when the email already exists in Dynamic and it is associated with a wallet, otherwise it will return magicLink.
1763
1819
  * Get signin email provider