Skip to content

Commit

Permalink
Merge branch 'release/3.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
bogoslavskiy committed Jul 15, 2023
2 parents a31c4c9 + 446b88d commit 93c2865
Show file tree
Hide file tree
Showing 273 changed files with 6,448 additions and 1,076 deletions.
14 changes: 13 additions & 1 deletion packages/@core-js/src/tonApiV2/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apis/AccountsApi.ts
apis/BlockchainApi.ts
apis/ConnectApi.ts
apis/DNSApi.ts
apis/EmulationApi.ts
apis/EventsApi.ts
apis/JettonsApi.ts
apis/NFTApi.ts
Expand All @@ -18,6 +19,7 @@ models/Account.ts
models/AccountAddress.ts
models/AccountEvent.ts
models/AccountEvents.ts
models/AccountInfoByStateInit.ts
models/AccountStaking.ts
models/AccountStakingInfo.ts
models/AccountStatus.ts
Expand All @@ -36,16 +38,22 @@ models/ComputeSkipReason.ts
models/Config.ts
models/ContractDeployAction.ts
models/CreditPhase.ts
models/DepositStakeAction.ts
models/DnsExpiring.ts
models/DnsExpiringItemsInner.ts
models/DnsRecord.ts
models/DomainBid.ts
models/DomainBids.ts
models/DomainInfo.ts
models/DomainNames.ts
models/Event.ts
models/Fee.ts
models/FoundAccounts.ts
models/FoundAccountsAddressesInner.ts
models/GetAccountInfoByStateInitRequest.ts
models/GetAccountsRequest.ts
models/GetBlock401Response.ts
models/GetPublicKeyByAccountID200Response.ts
models/GetRates200Response.ts
models/GetStorageProviders200Response.ts
models/GetTonConnectPayload200Response.ts
Expand All @@ -55,10 +63,12 @@ models/JettonBalance.ts
models/JettonInfo.ts
models/JettonMetadata.ts
models/JettonPreview.ts
models/JettonQuantity.ts
models/JettonTransferAction.ts
models/JettonVerificationType.ts
models/JettonsBalances.ts
models/Message.ts
models/MessageConsequences.ts
models/MethodExecutionResult.ts
models/ModelError.ts
models/NftCollection.ts
Expand All @@ -72,7 +82,9 @@ models/PoolImplementation.ts
models/PoolInfo.ts
models/Price.ts
models/RawAccount.ts
models/RecoverStakeAction.ts
models/Refund.ts
models/Risk.ts
models/Sale.ts
models/SendMessageRequest.ts
models/SmartContractAction.ts
Expand Down Expand Up @@ -100,7 +112,7 @@ models/UnSubscriptionAction.ts
models/Validator.ts
models/Validators.ts
models/ValueFlow.ts
models/ValueFlowNftsInner.ts
models/ValueFlowJettonsInner.ts
models/WalletDNS.ts
models/index.ts
runtime.ts
169 changes: 165 additions & 4 deletions packages/@core-js/src/tonApiV2/apis/AccountsApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* REST api to TON blockchain explorer
* Provide access to indexed TON blockchain
*
* The version of the OpenAPI document: 0.0.1
* Contact: [email protected]
* The version of the OpenAPI document: 2.0.0
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
Expand All @@ -18,22 +18,26 @@ import type {
Account,
AccountEvents,
Accounts,
DnsExpiring,
DomainNames,
FoundAccounts,
GetAccountsRequest,
GetBlock401Response,
GetPublicKeyByAccountID200Response,
JettonsBalances,
NftItems,
Subscriptions,
TraceIds,
} from '../models';
} from '../models/index';
import {
AccountFromJSON,
AccountToJSON,
AccountEventsFromJSON,
AccountEventsToJSON,
AccountsFromJSON,
AccountsToJSON,
DnsExpiringFromJSON,
DnsExpiringToJSON,
DomainNamesFromJSON,
DomainNamesToJSON,
FoundAccountsFromJSON,
Expand All @@ -42,6 +46,8 @@ import {
GetAccountsRequestToJSON,
GetBlock401ResponseFromJSON,
GetBlock401ResponseToJSON,
GetPublicKeyByAccountID200ResponseFromJSON,
GetPublicKeyByAccountID200ResponseToJSON,
JettonsBalancesFromJSON,
JettonsBalancesToJSON,
NftItemsFromJSON,
Expand All @@ -50,7 +56,7 @@ import {
SubscriptionsToJSON,
TraceIdsFromJSON,
TraceIdsToJSON,
} from '../models';
} from '../models/index';

export interface DnsBackResolveRequest {
accountId: string;
Expand All @@ -64,6 +70,11 @@ export interface GetAccountsOperationRequest {
getAccountsRequest?: GetAccountsRequest;
}

export interface GetDnsExpiringRequest {
accountId: string;
period?: number;
}

export interface GetEventsByAccountRequest {
accountId: string;
limit: number;
Expand Down Expand Up @@ -98,11 +109,16 @@ export interface GetJettonsHistoryByIDRequest {

export interface GetNftItemsByOwnerRequest {
accountId: string;
collection?: string;
limit?: number;
offset?: number;
indirectOwnership?: boolean;
}

export interface GetPublicKeyByAccountIDRequest {
accountId: string;
}

export interface GetSearchAccountsRequest {
name: string;
}
Expand All @@ -116,6 +132,10 @@ export interface GetTracesByAccountRequest {
limit?: number;
}

export interface ReindexAccountRequest {
accountId: string;
}

/**
* AccountsApi - interface
*
Expand Down Expand Up @@ -165,6 +185,21 @@ export interface AccountsApiInterface {
*/
getAccounts(requestParameters: GetAccountsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Accounts>;

/**
* Get expiring .ton dns
* @param {string} accountId account ID
* @param {number} [period] number of days before expiration
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AccountsApiInterface
*/
getDnsExpiringRaw(requestParameters: GetDnsExpiringRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DnsExpiring>>;

/**
* Get expiring .ton dns
*/
getDnsExpiring(requestParameters: GetDnsExpiringRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DnsExpiring>;

/**
* Get events for an account. Each event is built on top of a trace which is a series of transactions caused by one inbound message. TonAPI looks for known patterns inside the trace and splits the trace into actions, where a single action represents a meaningful high-level operation like a Jetton Transfer or an NFT Purchase. Actions are expected to be shown to users. It is advised not to build any logic on top of actions because actions can be changed at any time.
* @param {string} accountId account ID
Expand Down Expand Up @@ -240,6 +275,7 @@ export interface AccountsApiInterface {
/**
* Get all NFT items by owner address
* @param {string} accountId account ID
* @param {string} [collection] nft collection
* @param {number} [limit]
* @param {number} [offset]
* @param {boolean} [indirectOwnership] Selling nft items in ton implemented usually via transfer items to special selling account. This option enables including items which owned not directly.
Expand All @@ -254,6 +290,20 @@ export interface AccountsApiInterface {
*/
getNftItemsByOwner(requestParameters: GetNftItemsByOwnerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<NftItems>;

/**
* Get public key by account id
* @param {string} accountId account ID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AccountsApiInterface
*/
getPublicKeyByAccountIDRaw(requestParameters: GetPublicKeyByAccountIDRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetPublicKeyByAccountID200Response>>;

/**
* Get public key by account id
*/
getPublicKeyByAccountID(requestParameters: GetPublicKeyByAccountIDRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetPublicKeyByAccountID200Response>;

/**
* Search for accounts by name. You can find the account by the first characters of the domain.
* @param {string} name
Expand Down Expand Up @@ -297,6 +347,20 @@ export interface AccountsApiInterface {
*/
getTracesByAccount(requestParameters: GetTracesByAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TraceIds>;

/**
* Update internal cache for a particular account
* @param {string} accountId account ID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AccountsApiInterface
*/
reindexAccountRaw(requestParameters: ReindexAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;

/**
* Update internal cache for a particular account
*/
reindexAccount(requestParameters: ReindexAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;

}

/**
Expand Down Expand Up @@ -393,6 +457,40 @@ export class AccountsApi extends runtime.BaseAPI implements AccountsApiInterface
return await response.value();
}

/**
* Get expiring .ton dns
*/
async getDnsExpiringRaw(requestParameters: GetDnsExpiringRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DnsExpiring>> {
if (requestParameters.accountId === null || requestParameters.accountId === undefined) {
throw new runtime.RequiredError('accountId','Required parameter requestParameters.accountId was null or undefined when calling getDnsExpiring.');
}

const queryParameters: any = {};

if (requestParameters.period !== undefined) {
queryParameters['period'] = requestParameters.period;
}

const headerParameters: runtime.HTTPHeaders = {};

const response = await this.request({
path: `/v2/accounts/{account_id}/dns/expiring`.replace(`{${"account_id"}}`, encodeURIComponent(String(requestParameters.accountId))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);

return new runtime.JSONApiResponse(response, (jsonValue) => DnsExpiringFromJSON(jsonValue));
}

/**
* Get expiring .ton dns
*/
async getDnsExpiring(requestParameters: GetDnsExpiringRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DnsExpiring> {
const response = await this.getDnsExpiringRaw(requestParameters, initOverrides);
return await response.value();
}

/**
* Get events for an account. Each event is built on top of a trace which is a series of transactions caused by one inbound message. TonAPI looks for known patterns inside the trace and splits the trace into actions, where a single action represents a meaningful high-level operation like a Jetton Transfer or an NFT Purchase. Actions are expected to be shown to users. It is advised not to build any logic on top of actions because actions can be changed at any time.
*/
Expand Down Expand Up @@ -599,6 +697,10 @@ export class AccountsApi extends runtime.BaseAPI implements AccountsApiInterface

const queryParameters: any = {};

if (requestParameters.collection !== undefined) {
queryParameters['collection'] = requestParameters.collection;
}

if (requestParameters.limit !== undefined) {
queryParameters['limit'] = requestParameters.limit;
}
Expand Down Expand Up @@ -631,6 +733,36 @@ export class AccountsApi extends runtime.BaseAPI implements AccountsApiInterface
return await response.value();
}

/**
* Get public key by account id
*/
async getPublicKeyByAccountIDRaw(requestParameters: GetPublicKeyByAccountIDRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetPublicKeyByAccountID200Response>> {
if (requestParameters.accountId === null || requestParameters.accountId === undefined) {
throw new runtime.RequiredError('accountId','Required parameter requestParameters.accountId was null or undefined when calling getPublicKeyByAccountID.');
}

const queryParameters: any = {};

const headerParameters: runtime.HTTPHeaders = {};

const response = await this.request({
path: `/v2/accounts/{account_id}/publickey`.replace(`{${"account_id"}}`, encodeURIComponent(String(requestParameters.accountId))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);

return new runtime.JSONApiResponse(response, (jsonValue) => GetPublicKeyByAccountID200ResponseFromJSON(jsonValue));
}

/**
* Get public key by account id
*/
async getPublicKeyByAccountID(requestParameters: GetPublicKeyByAccountIDRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetPublicKeyByAccountID200Response> {
const response = await this.getPublicKeyByAccountIDRaw(requestParameters, initOverrides);
return await response.value();
}

/**
* Search for accounts by name. You can find the account by the first characters of the domain.
*/
Expand Down Expand Up @@ -729,4 +861,33 @@ export class AccountsApi extends runtime.BaseAPI implements AccountsApiInterface
return await response.value();
}

/**
* Update internal cache for a particular account
*/
async reindexAccountRaw(requestParameters: ReindexAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
if (requestParameters.accountId === null || requestParameters.accountId === undefined) {
throw new runtime.RequiredError('accountId','Required parameter requestParameters.accountId was null or undefined when calling reindexAccount.');
}

const queryParameters: any = {};

const headerParameters: runtime.HTTPHeaders = {};

const response = await this.request({
path: `/v2/accounts/{account_id}/reindex`.replace(`{${"account_id"}}`, encodeURIComponent(String(requestParameters.accountId))),
method: 'POST',
headers: headerParameters,
query: queryParameters,
}, initOverrides);

return new runtime.VoidApiResponse(response);
}

/**
* Update internal cache for a particular account
*/
async reindexAccount(requestParameters: ReindexAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
await this.reindexAccountRaw(requestParameters, initOverrides);
}

}
Loading

0 comments on commit 93c2865

Please sign in to comment.