@hubbleprotocol/carpool-typescript-client
Version:
OpenAPI TypeScript client for Carpool
662 lines (636 loc) • 39.2 kB
text/typescript
/* tslint:disable */
/* eslint-disable */
/**
* Carpool Query
* The Carpool Query API
*
* OpenAPI spec version: 1.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios';
import { Configuration } from '../configuration';
// Some imports not used depending on template conditions
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
/**
* AccountsArchiveApi - axios parameter creator
* @export
*/
export const AccountsArchiveApiAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
*
* @summary Get the version of an account present at a specific slot.
* @param {string} xApiKey
* @param {string} programId
* @param {string} accountName
* @param {string} accountId
* @param {number} slot
* @param {string} [exact] Indicate that the provided slot is exactly when the account was updated. Skips an expensive search for *significantly* improved performance (10-20X), but will 404 if not an exact match.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
archiveControllerGetAccountAtSlot: async (xApiKey: string, programId: string, accountName: string, accountId: string, slot: number, exact?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'xApiKey' is not null or undefined
if (xApiKey === null || xApiKey === undefined) {
throw new RequiredError('xApiKey','Required parameter xApiKey was null or undefined when calling archiveControllerGetAccountAtSlot.');
}
// verify required parameter 'programId' is not null or undefined
if (programId === null || programId === undefined) {
throw new RequiredError('programId','Required parameter programId was null or undefined when calling archiveControllerGetAccountAtSlot.');
}
// verify required parameter 'accountName' is not null or undefined
if (accountName === null || accountName === undefined) {
throw new RequiredError('accountName','Required parameter accountName was null or undefined when calling archiveControllerGetAccountAtSlot.');
}
// verify required parameter 'accountId' is not null or undefined
if (accountId === null || accountId === undefined) {
throw new RequiredError('accountId','Required parameter accountId was null or undefined when calling archiveControllerGetAccountAtSlot.');
}
// verify required parameter 'slot' is not null or undefined
if (slot === null || slot === undefined) {
throw new RequiredError('slot','Required parameter slot was null or undefined when calling archiveControllerGetAccountAtSlot.');
}
const localVarPath = `/mainnet/archive/{programId}/{accountName}/{accountId}/slot/{slot}`
.replace(`{${"programId"}}`, encodeURIComponent(String(programId)))
.replace(`{${"accountName"}}`, encodeURIComponent(String(accountName)))
.replace(`{${"accountId"}}`, encodeURIComponent(String(accountId)))
.replace(`{${"slot"}}`, encodeURIComponent(String(slot)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
if (exact !== undefined) {
localVarQueryParameter['exact'] = exact;
}
if (xApiKey !== undefined && xApiKey !== null) {
localVarHeaderParameter['x-api-key'] = String(xApiKey);
}
const query = new URLSearchParams(localVarUrlObj.search);
for (const key in localVarQueryParameter) {
query.set(key, localVarQueryParameter[key]);
}
for (const key in options.params) {
query.set(key, options.params[key]);
}
localVarUrlObj.search = (new URLSearchParams(query)).toString();
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
options: localVarRequestOptions,
};
},
/**
*
* @summary Get the exact state of an account at a specific slot and write version.
* @param {string} xApiKey
* @param {string} programId
* @param {string} accountName
* @param {string} accountId
* @param {number} slot
* @param {number} writeVersion
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
archiveControllerGetAccountAtSlotAndVersion: async (xApiKey: string, programId: string, accountName: string, accountId: string, slot: number, writeVersion: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'xApiKey' is not null or undefined
if (xApiKey === null || xApiKey === undefined) {
throw new RequiredError('xApiKey','Required parameter xApiKey was null or undefined when calling archiveControllerGetAccountAtSlotAndVersion.');
}
// verify required parameter 'programId' is not null or undefined
if (programId === null || programId === undefined) {
throw new RequiredError('programId','Required parameter programId was null or undefined when calling archiveControllerGetAccountAtSlotAndVersion.');
}
// verify required parameter 'accountName' is not null or undefined
if (accountName === null || accountName === undefined) {
throw new RequiredError('accountName','Required parameter accountName was null or undefined when calling archiveControllerGetAccountAtSlotAndVersion.');
}
// verify required parameter 'accountId' is not null or undefined
if (accountId === null || accountId === undefined) {
throw new RequiredError('accountId','Required parameter accountId was null or undefined when calling archiveControllerGetAccountAtSlotAndVersion.');
}
// verify required parameter 'slot' is not null or undefined
if (slot === null || slot === undefined) {
throw new RequiredError('slot','Required parameter slot was null or undefined when calling archiveControllerGetAccountAtSlotAndVersion.');
}
// verify required parameter 'writeVersion' is not null or undefined
if (writeVersion === null || writeVersion === undefined) {
throw new RequiredError('writeVersion','Required parameter writeVersion was null or undefined when calling archiveControllerGetAccountAtSlotAndVersion.');
}
const localVarPath = `/mainnet/archive/{programId}/{accountName}/{accountId}/slot/{slot}/version/{writeVersion}`
.replace(`{${"programId"}}`, encodeURIComponent(String(programId)))
.replace(`{${"accountName"}}`, encodeURIComponent(String(accountName)))
.replace(`{${"accountId"}}`, encodeURIComponent(String(accountId)))
.replace(`{${"slot"}}`, encodeURIComponent(String(slot)))
.replace(`{${"writeVersion"}}`, encodeURIComponent(String(writeVersion)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
if (xApiKey !== undefined && xApiKey !== null) {
localVarHeaderParameter['x-api-key'] = String(xApiKey);
}
const query = new URLSearchParams(localVarUrlObj.search);
for (const key in localVarQueryParameter) {
query.set(key, localVarQueryParameter[key]);
}
for (const key in options.params) {
query.set(key, options.params[key]);
}
localVarUrlObj.search = (new URLSearchParams(query)).toString();
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
options: localVarRequestOptions,
};
},
/**
* Note: This can potentially return a LOT of data. Use the /slots query to narrow down your search first.
* @summary Get all versions of an account.
* @param {string} xApiKey
* @param {string} programId
* @param {string} accountName
* @param {string} accountId
* @param {number} [start] A starting slot for the search (inclusive)
* @param {number} [end] An ending slot for the search (exclusive)
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
archiveControllerGetAccountHistory: async (xApiKey: string, programId: string, accountName: string, accountId: string, start?: number, end?: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'xApiKey' is not null or undefined
if (xApiKey === null || xApiKey === undefined) {
throw new RequiredError('xApiKey','Required parameter xApiKey was null or undefined when calling archiveControllerGetAccountHistory.');
}
// verify required parameter 'programId' is not null or undefined
if (programId === null || programId === undefined) {
throw new RequiredError('programId','Required parameter programId was null or undefined when calling archiveControllerGetAccountHistory.');
}
// verify required parameter 'accountName' is not null or undefined
if (accountName === null || accountName === undefined) {
throw new RequiredError('accountName','Required parameter accountName was null or undefined when calling archiveControllerGetAccountHistory.');
}
// verify required parameter 'accountId' is not null or undefined
if (accountId === null || accountId === undefined) {
throw new RequiredError('accountId','Required parameter accountId was null or undefined when calling archiveControllerGetAccountHistory.');
}
const localVarPath = `/mainnet/archive/{programId}/{accountName}/{accountId}/history`
.replace(`{${"programId"}}`, encodeURIComponent(String(programId)))
.replace(`{${"accountName"}}`, encodeURIComponent(String(accountName)))
.replace(`{${"accountId"}}`, encodeURIComponent(String(accountId)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
if (start !== undefined) {
localVarQueryParameter['start'] = start;
}
if (end !== undefined) {
localVarQueryParameter['end'] = end;
}
if (xApiKey !== undefined && xApiKey !== null) {
localVarHeaderParameter['x-api-key'] = String(xApiKey);
}
const query = new URLSearchParams(localVarUrlObj.search);
for (const key in localVarQueryParameter) {
query.set(key, localVarQueryParameter[key]);
}
for (const key in options.params) {
query.set(key, options.params[key]);
}
localVarUrlObj.search = (new URLSearchParams(query)).toString();
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
options: localVarRequestOptions,
};
},
/**
*
* @summary Get a list of all slots where an account was updated.
* @param {string} xApiKey
* @param {string} programId
* @param {string} accountName
* @param {string} accountId
* @param {number} [start] A starting slot for the search (inclusive)
* @param {number} [end] An ending slot for the search (exclusive)
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
archiveControllerGetAccountSlotUpdates: async (xApiKey: string, programId: string, accountName: string, accountId: string, start?: number, end?: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'xApiKey' is not null or undefined
if (xApiKey === null || xApiKey === undefined) {
throw new RequiredError('xApiKey','Required parameter xApiKey was null or undefined when calling archiveControllerGetAccountSlotUpdates.');
}
// verify required parameter 'programId' is not null or undefined
if (programId === null || programId === undefined) {
throw new RequiredError('programId','Required parameter programId was null or undefined when calling archiveControllerGetAccountSlotUpdates.');
}
// verify required parameter 'accountName' is not null or undefined
if (accountName === null || accountName === undefined) {
throw new RequiredError('accountName','Required parameter accountName was null or undefined when calling archiveControllerGetAccountSlotUpdates.');
}
// verify required parameter 'accountId' is not null or undefined
if (accountId === null || accountId === undefined) {
throw new RequiredError('accountId','Required parameter accountId was null or undefined when calling archiveControllerGetAccountSlotUpdates.');
}
const localVarPath = `/mainnet/archive/{programId}/{accountName}/{accountId}/slots`
.replace(`{${"programId"}}`, encodeURIComponent(String(programId)))
.replace(`{${"accountName"}}`, encodeURIComponent(String(accountName)))
.replace(`{${"accountId"}}`, encodeURIComponent(String(accountId)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
if (start !== undefined) {
localVarQueryParameter['start'] = start;
}
if (end !== undefined) {
localVarQueryParameter['end'] = end;
}
if (xApiKey !== undefined && xApiKey !== null) {
localVarHeaderParameter['x-api-key'] = String(xApiKey);
}
const query = new URLSearchParams(localVarUrlObj.search);
for (const key in localVarQueryParameter) {
query.set(key, localVarQueryParameter[key]);
}
for (const key in options.params) {
query.set(key, options.params[key]);
}
localVarUrlObj.search = (new URLSearchParams(query)).toString();
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
options: localVarRequestOptions,
};
},
/**
*
* @summary Get a list of all slots where an account was updated, along with unique write versions
* @param {string} xApiKey
* @param {string} programId
* @param {string} accountName
* @param {string} accountId
* @param {number} [start] A starting slot for the search (inclusive)
* @param {number} [end] An ending slot for the search (exclusive)
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
archiveControllerGetAccountSlotUpdatesWithVersion: async (xApiKey: string, programId: string, accountName: string, accountId: string, start?: number, end?: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'xApiKey' is not null or undefined
if (xApiKey === null || xApiKey === undefined) {
throw new RequiredError('xApiKey','Required parameter xApiKey was null or undefined when calling archiveControllerGetAccountSlotUpdatesWithVersion.');
}
// verify required parameter 'programId' is not null or undefined
if (programId === null || programId === undefined) {
throw new RequiredError('programId','Required parameter programId was null or undefined when calling archiveControllerGetAccountSlotUpdatesWithVersion.');
}
// verify required parameter 'accountName' is not null or undefined
if (accountName === null || accountName === undefined) {
throw new RequiredError('accountName','Required parameter accountName was null or undefined when calling archiveControllerGetAccountSlotUpdatesWithVersion.');
}
// verify required parameter 'accountId' is not null or undefined
if (accountId === null || accountId === undefined) {
throw new RequiredError('accountId','Required parameter accountId was null or undefined when calling archiveControllerGetAccountSlotUpdatesWithVersion.');
}
const localVarPath = `/mainnet/archive/{programId}/{accountName}/{accountId}/slotsAndVersions`
.replace(`{${"programId"}}`, encodeURIComponent(String(programId)))
.replace(`{${"accountName"}}`, encodeURIComponent(String(accountName)))
.replace(`{${"accountId"}}`, encodeURIComponent(String(accountId)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
if (start !== undefined) {
localVarQueryParameter['start'] = start;
}
if (end !== undefined) {
localVarQueryParameter['end'] = end;
}
if (xApiKey !== undefined && xApiKey !== null) {
localVarHeaderParameter['x-api-key'] = String(xApiKey);
}
const query = new URLSearchParams(localVarUrlObj.search);
for (const key in localVarQueryParameter) {
query.set(key, localVarQueryParameter[key]);
}
for (const key in options.params) {
query.set(key, options.params[key]);
}
localVarUrlObj.search = (new URLSearchParams(query)).toString();
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
options: localVarRequestOptions,
};
},
}
};
/**
* AccountsArchiveApi - functional programming interface
* @export
*/
export const AccountsArchiveApiFp = function(configuration?: Configuration) {
return {
/**
*
* @summary Get the version of an account present at a specific slot.
* @param {string} xApiKey
* @param {string} programId
* @param {string} accountName
* @param {string} accountId
* @param {number} slot
* @param {string} [exact] Indicate that the provided slot is exactly when the account was updated. Skips an expensive search for *significantly* improved performance (10-20X), but will 404 if not an exact match.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async archiveControllerGetAccountAtSlot(xApiKey: string, programId: string, accountName: string, accountId: string, slot: number, exact?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
const localVarAxiosArgs = await AccountsArchiveApiAxiosParamCreator(configuration).archiveControllerGetAccountAtSlot(xApiKey, programId, accountName, accountId, slot, exact, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
*
* @summary Get the exact state of an account at a specific slot and write version.
* @param {string} xApiKey
* @param {string} programId
* @param {string} accountName
* @param {string} accountId
* @param {number} slot
* @param {number} writeVersion
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async archiveControllerGetAccountAtSlotAndVersion(xApiKey: string, programId: string, accountName: string, accountId: string, slot: number, writeVersion: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
const localVarAxiosArgs = await AccountsArchiveApiAxiosParamCreator(configuration).archiveControllerGetAccountAtSlotAndVersion(xApiKey, programId, accountName, accountId, slot, writeVersion, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
* Note: This can potentially return a LOT of data. Use the /slots query to narrow down your search first.
* @summary Get all versions of an account.
* @param {string} xApiKey
* @param {string} programId
* @param {string} accountName
* @param {string} accountId
* @param {number} [start] A starting slot for the search (inclusive)
* @param {number} [end] An ending slot for the search (exclusive)
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async archiveControllerGetAccountHistory(xApiKey: string, programId: string, accountName: string, accountId: string, start?: number, end?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
const localVarAxiosArgs = await AccountsArchiveApiAxiosParamCreator(configuration).archiveControllerGetAccountHistory(xApiKey, programId, accountName, accountId, start, end, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
*
* @summary Get a list of all slots where an account was updated.
* @param {string} xApiKey
* @param {string} programId
* @param {string} accountName
* @param {string} accountId
* @param {number} [start] A starting slot for the search (inclusive)
* @param {number} [end] An ending slot for the search (exclusive)
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async archiveControllerGetAccountSlotUpdates(xApiKey: string, programId: string, accountName: string, accountId: string, start?: number, end?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
const localVarAxiosArgs = await AccountsArchiveApiAxiosParamCreator(configuration).archiveControllerGetAccountSlotUpdates(xApiKey, programId, accountName, accountId, start, end, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
*
* @summary Get a list of all slots where an account was updated, along with unique write versions
* @param {string} xApiKey
* @param {string} programId
* @param {string} accountName
* @param {string} accountId
* @param {number} [start] A starting slot for the search (inclusive)
* @param {number} [end] An ending slot for the search (exclusive)
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async archiveControllerGetAccountSlotUpdatesWithVersion(xApiKey: string, programId: string, accountName: string, accountId: string, start?: number, end?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
const localVarAxiosArgs = await AccountsArchiveApiAxiosParamCreator(configuration).archiveControllerGetAccountSlotUpdatesWithVersion(xApiKey, programId, accountName, accountId, start, end, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
}
};
/**
* AccountsArchiveApi - factory interface
* @export
*/
export const AccountsArchiveApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
return {
/**
*
* @summary Get the version of an account present at a specific slot.
* @param {string} xApiKey
* @param {string} programId
* @param {string} accountName
* @param {string} accountId
* @param {number} slot
* @param {string} [exact] Indicate that the provided slot is exactly when the account was updated. Skips an expensive search for *significantly* improved performance (10-20X), but will 404 if not an exact match.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async archiveControllerGetAccountAtSlot(xApiKey: string, programId: string, accountName: string, accountId: string, slot: number, exact?: string, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
return AccountsArchiveApiFp(configuration).archiveControllerGetAccountAtSlot(xApiKey, programId, accountName, accountId, slot, exact, options).then((request) => request(axios, basePath));
},
/**
*
* @summary Get the exact state of an account at a specific slot and write version.
* @param {string} xApiKey
* @param {string} programId
* @param {string} accountName
* @param {string} accountId
* @param {number} slot
* @param {number} writeVersion
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async archiveControllerGetAccountAtSlotAndVersion(xApiKey: string, programId: string, accountName: string, accountId: string, slot: number, writeVersion: number, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
return AccountsArchiveApiFp(configuration).archiveControllerGetAccountAtSlotAndVersion(xApiKey, programId, accountName, accountId, slot, writeVersion, options).then((request) => request(axios, basePath));
},
/**
* Note: This can potentially return a LOT of data. Use the /slots query to narrow down your search first.
* @summary Get all versions of an account.
* @param {string} xApiKey
* @param {string} programId
* @param {string} accountName
* @param {string} accountId
* @param {number} [start] A starting slot for the search (inclusive)
* @param {number} [end] An ending slot for the search (exclusive)
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async archiveControllerGetAccountHistory(xApiKey: string, programId: string, accountName: string, accountId: string, start?: number, end?: number, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
return AccountsArchiveApiFp(configuration).archiveControllerGetAccountHistory(xApiKey, programId, accountName, accountId, start, end, options).then((request) => request(axios, basePath));
},
/**
*
* @summary Get a list of all slots where an account was updated.
* @param {string} xApiKey
* @param {string} programId
* @param {string} accountName
* @param {string} accountId
* @param {number} [start] A starting slot for the search (inclusive)
* @param {number} [end] An ending slot for the search (exclusive)
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async archiveControllerGetAccountSlotUpdates(xApiKey: string, programId: string, accountName: string, accountId: string, start?: number, end?: number, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
return AccountsArchiveApiFp(configuration).archiveControllerGetAccountSlotUpdates(xApiKey, programId, accountName, accountId, start, end, options).then((request) => request(axios, basePath));
},
/**
*
* @summary Get a list of all slots where an account was updated, along with unique write versions
* @param {string} xApiKey
* @param {string} programId
* @param {string} accountName
* @param {string} accountId
* @param {number} [start] A starting slot for the search (inclusive)
* @param {number} [end] An ending slot for the search (exclusive)
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async archiveControllerGetAccountSlotUpdatesWithVersion(xApiKey: string, programId: string, accountName: string, accountId: string, start?: number, end?: number, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
return AccountsArchiveApiFp(configuration).archiveControllerGetAccountSlotUpdatesWithVersion(xApiKey, programId, accountName, accountId, start, end, options).then((request) => request(axios, basePath));
},
};
};
/**
* AccountsArchiveApi - object-oriented interface
* @export
* @class AccountsArchiveApi
* @extends {BaseAPI}
*/
export class AccountsArchiveApi extends BaseAPI {
/**
*
* @summary Get the version of an account present at a specific slot.
* @param {string} xApiKey
* @param {string} programId
* @param {string} accountName
* @param {string} accountId
* @param {number} slot
* @param {string} [exact] Indicate that the provided slot is exactly when the account was updated. Skips an expensive search for *significantly* improved performance (10-20X), but will 404 if not an exact match.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AccountsArchiveApi
*/
public async archiveControllerGetAccountAtSlot(xApiKey: string, programId: string, accountName: string, accountId: string, slot: number, exact?: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
return AccountsArchiveApiFp(this.configuration).archiveControllerGetAccountAtSlot(xApiKey, programId, accountName, accountId, slot, exact, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Get the exact state of an account at a specific slot and write version.
* @param {string} xApiKey
* @param {string} programId
* @param {string} accountName
* @param {string} accountId
* @param {number} slot
* @param {number} writeVersion
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AccountsArchiveApi
*/
public async archiveControllerGetAccountAtSlotAndVersion(xApiKey: string, programId: string, accountName: string, accountId: string, slot: number, writeVersion: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
return AccountsArchiveApiFp(this.configuration).archiveControllerGetAccountAtSlotAndVersion(xApiKey, programId, accountName, accountId, slot, writeVersion, options).then((request) => request(this.axios, this.basePath));
}
/**
* Note: This can potentially return a LOT of data. Use the /slots query to narrow down your search first.
* @summary Get all versions of an account.
* @param {string} xApiKey
* @param {string} programId
* @param {string} accountName
* @param {string} accountId
* @param {number} [start] A starting slot for the search (inclusive)
* @param {number} [end] An ending slot for the search (exclusive)
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AccountsArchiveApi
*/
public async archiveControllerGetAccountHistory(xApiKey: string, programId: string, accountName: string, accountId: string, start?: number, end?: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
return AccountsArchiveApiFp(this.configuration).archiveControllerGetAccountHistory(xApiKey, programId, accountName, accountId, start, end, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Get a list of all slots where an account was updated.
* @param {string} xApiKey
* @param {string} programId
* @param {string} accountName
* @param {string} accountId
* @param {number} [start] A starting slot for the search (inclusive)
* @param {number} [end] An ending slot for the search (exclusive)
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AccountsArchiveApi
*/
public async archiveControllerGetAccountSlotUpdates(xApiKey: string, programId: string, accountName: string, accountId: string, start?: number, end?: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
return AccountsArchiveApiFp(this.configuration).archiveControllerGetAccountSlotUpdates(xApiKey, programId, accountName, accountId, start, end, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Get a list of all slots where an account was updated, along with unique write versions
* @param {string} xApiKey
* @param {string} programId
* @param {string} accountName
* @param {string} accountId
* @param {number} [start] A starting slot for the search (inclusive)
* @param {number} [end] An ending slot for the search (exclusive)
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AccountsArchiveApi
*/
public async archiveControllerGetAccountSlotUpdatesWithVersion(xApiKey: string, programId: string, accountName: string, accountId: string, start?: number, end?: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
return AccountsArchiveApiFp(this.configuration).archiveControllerGetAccountSlotUpdatesWithVersion(xApiKey, programId, accountName, accountId, start, end, options).then((request) => request(this.axios, this.basePath));
}
}