UNPKG

@hubbleprotocol/carpool-typescript-client

Version:

OpenAPI TypeScript client for Carpool

853 lines (812 loc) 69.9 kB
/* 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'; /** * MetadataApi - axios parameter creator * @export */ export const MetadataApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * * @summary Get indexed account representation. * @param {string} xApiKey * @param {string} programId * @param {string} accountName * @param {*} [options] Override http request option. * @throws {RequiredError} */ metadataControllerGetAccountStructure: async (xApiKey: string, programId: string, accountName: 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 metadataControllerGetAccountStructure.'); } // 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 metadataControllerGetAccountStructure.'); } // 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 metadataControllerGetAccountStructure.'); } const localVarPath = `/devnet/metadata/{programId}/account/{accountName}/structure` .replace(`{${"programId"}}`, encodeURIComponent(String(programId))) .replace(`{${"accountName"}}`, encodeURIComponent(String(accountName))); // 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, }; }, /** * * @summary Get indexed account representation. * @param {string} xApiKey * @param {string} programId * @param {string} accountName * @param {*} [options] Override http request option. * @throws {RequiredError} */ metadataControllerGetAccountStructure_1: async (xApiKey: string, programId: string, accountName: 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 metadataControllerGetAccountStructure_1.'); } // 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 metadataControllerGetAccountStructure_1.'); } // 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 metadataControllerGetAccountStructure_1.'); } const localVarPath = `/mainnet/metadata/{programId}/account/{accountName}/structure` .replace(`{${"programId"}}`, encodeURIComponent(String(programId))) .replace(`{${"accountName"}}`, encodeURIComponent(String(accountName))); // 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, }; }, /** * Fetch the number of documents indexed for each instruction and account of this program. * @summary Get indexed document counts for program. * @param {string} xApiKey * @param {string} programId * @param {*} [options] Override http request option. * @throws {RequiredError} */ metadataControllerGetDocumentCounts: async (xApiKey: string, programId: 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 metadataControllerGetDocumentCounts.'); } // 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 metadataControllerGetDocumentCounts.'); } const localVarPath = `/devnet/metadata/{programId}/count` .replace(`{${"programId"}}`, encodeURIComponent(String(programId))); // 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, }; }, /** * Fetch the number of documents indexed for each instruction and account of this program. * @summary Get indexed document counts for program. * @param {string} xApiKey * @param {string} programId * @param {*} [options] Override http request option. * @throws {RequiredError} */ metadataControllerGetDocumentCounts_2: async (xApiKey: string, programId: 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 metadataControllerGetDocumentCounts_2.'); } // 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 metadataControllerGetDocumentCounts_2.'); } const localVarPath = `/mainnet/metadata/{programId}/count` .replace(`{${"programId"}}`, encodeURIComponent(String(programId))); // 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, }; }, /** * The start and end params default to (and are capped by) the min and max slot available, respectively. Resolution is determined by Start and End * @summary Get a histogram of instruction invocations. * @param {string} xApiKey * @param {string} programId * @param {string} instructionName * @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} */ metadataControllerGetInstructionInvocationHistogram: async (xApiKey: string, programId: string, instructionName: 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 metadataControllerGetInstructionInvocationHistogram.'); } // 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 metadataControllerGetInstructionInvocationHistogram.'); } // verify required parameter 'instructionName' is not null or undefined if (instructionName === null || instructionName === undefined) { throw new RequiredError('instructionName','Required parameter instructionName was null or undefined when calling metadataControllerGetInstructionInvocationHistogram.'); } const localVarPath = `/devnet/metadata/{programId}/instruction/{instructionName}/histogram` .replace(`{${"programId"}}`, encodeURIComponent(String(programId))) .replace(`{${"instructionName"}}`, encodeURIComponent(String(instructionName))); // 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, }; }, /** * The start and end params default to (and are capped by) the min and max slot available, respectively. Resolution is determined by Start and End * @summary Get a histogram of instruction invocations. * @param {string} xApiKey * @param {string} programId * @param {string} instructionName * @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} */ metadataControllerGetInstructionInvocationHistogram_3: async (xApiKey: string, programId: string, instructionName: 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 metadataControllerGetInstructionInvocationHistogram_3.'); } // 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 metadataControllerGetInstructionInvocationHistogram_3.'); } // verify required parameter 'instructionName' is not null or undefined if (instructionName === null || instructionName === undefined) { throw new RequiredError('instructionName','Required parameter instructionName was null or undefined when calling metadataControllerGetInstructionInvocationHistogram_3.'); } const localVarPath = `/mainnet/metadata/{programId}/instruction/{instructionName}/histogram` .replace(`{${"programId"}}`, encodeURIComponent(String(programId))) .replace(`{${"instructionName"}}`, encodeURIComponent(String(instructionName))); // 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 the range of slots in which we have data for an instruction. * @param {string} xApiKey * @param {string} programId * @param {string} instructionName * @param {*} [options] Override http request option. * @throws {RequiredError} */ metadataControllerGetInstructionSlotRange: async (xApiKey: string, programId: string, instructionName: 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 metadataControllerGetInstructionSlotRange.'); } // 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 metadataControllerGetInstructionSlotRange.'); } // verify required parameter 'instructionName' is not null or undefined if (instructionName === null || instructionName === undefined) { throw new RequiredError('instructionName','Required parameter instructionName was null or undefined when calling metadataControllerGetInstructionSlotRange.'); } const localVarPath = `/devnet/metadata/{programId}/instruction/{instructionName}/slotRange` .replace(`{${"programId"}}`, encodeURIComponent(String(programId))) .replace(`{${"instructionName"}}`, encodeURIComponent(String(instructionName))); // 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, }; }, /** * * @summary Get the range of slots in which we have data for an instruction. * @param {string} xApiKey * @param {string} programId * @param {string} instructionName * @param {*} [options] Override http request option. * @throws {RequiredError} */ metadataControllerGetInstructionSlotRange_4: async (xApiKey: string, programId: string, instructionName: 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 metadataControllerGetInstructionSlotRange_4.'); } // 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 metadataControllerGetInstructionSlotRange_4.'); } // verify required parameter 'instructionName' is not null or undefined if (instructionName === null || instructionName === undefined) { throw new RequiredError('instructionName','Required parameter instructionName was null or undefined when calling metadataControllerGetInstructionSlotRange_4.'); } const localVarPath = `/mainnet/metadata/{programId}/instruction/{instructionName}/slotRange` .replace(`{${"programId"}}`, encodeURIComponent(String(programId))) .replace(`{${"instructionName"}}`, encodeURIComponent(String(instructionName))); // 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, }; }, /** * * @summary Get indexed instruction representation. * @param {string} xApiKey * @param {string} programId * @param {string} instructionName * @param {*} [options] Override http request option. * @throws {RequiredError} */ metadataControllerGetInstructionStructure: async (xApiKey: string, programId: string, instructionName: 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 metadataControllerGetInstructionStructure.'); } // 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 metadataControllerGetInstructionStructure.'); } // verify required parameter 'instructionName' is not null or undefined if (instructionName === null || instructionName === undefined) { throw new RequiredError('instructionName','Required parameter instructionName was null or undefined when calling metadataControllerGetInstructionStructure.'); } const localVarPath = `/devnet/metadata/{programId}/instruction/{instructionName}/structure` .replace(`{${"programId"}}`, encodeURIComponent(String(programId))) .replace(`{${"instructionName"}}`, encodeURIComponent(String(instructionName))); // 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, }; }, /** * * @summary Get indexed instruction representation. * @param {string} xApiKey * @param {string} programId * @param {string} instructionName * @param {*} [options] Override http request option. * @throws {RequiredError} */ metadataControllerGetInstructionStructure_5: async (xApiKey: string, programId: string, instructionName: 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 metadataControllerGetInstructionStructure_5.'); } // 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 metadataControllerGetInstructionStructure_5.'); } // verify required parameter 'instructionName' is not null or undefined if (instructionName === null || instructionName === undefined) { throw new RequiredError('instructionName','Required parameter instructionName was null or undefined when calling metadataControllerGetInstructionStructure_5.'); } const localVarPath = `/mainnet/metadata/{programId}/instruction/{instructionName}/structure` .replace(`{${"programId"}}`, encodeURIComponent(String(programId))) .replace(`{${"instructionName"}}`, encodeURIComponent(String(instructionName))); // 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, }; }, /** * Fetch the list of instruction and account types associated with this program. * @summary Get program layout. * @param {string} xApiKey * @param {string} programId * @param {*} [options] Override http request option. * @throws {RequiredError} */ metadataControllerGetProgramLayout: async (xApiKey: string, programId: 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 metadataControllerGetProgramLayout.'); } // 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 metadataControllerGetProgramLayout.'); } const localVarPath = `/devnet/metadata/{programId}/layout` .replace(`{${"programId"}}`, encodeURIComponent(String(programId))); // 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, }; }, /** * Fetch the list of instruction and account types associated with this program. * @summary Get program layout. * @param {string} xApiKey * @param {string} programId * @param {*} [options] Override http request option. * @throws {RequiredError} */ metadataControllerGetProgramLayout_6: async (xApiKey: string, programId: 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 metadataControllerGetProgramLayout_6.'); } // 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 metadataControllerGetProgramLayout_6.'); } const localVarPath = `/mainnet/metadata/{programId}/layout` .replace(`{${"programId"}}`, encodeURIComponent(String(programId))); // 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, }; }, } }; /** * MetadataApi - functional programming interface * @export */ export const MetadataApiFp = function(configuration?: Configuration) { return { /** * * @summary Get indexed account representation. * @param {string} xApiKey * @param {string} programId * @param {string} accountName * @param {*} [options] Override http request option. * @throws {RequiredError} */ async metadataControllerGetAccountStructure(xApiKey: string, programId: string, accountName: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> { const localVarAxiosArgs = await MetadataApiAxiosParamCreator(configuration).metadataControllerGetAccountStructure(xApiKey, programId, accountName, options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); }; }, /** * * @summary Get indexed account representation. * @param {string} xApiKey * @param {string} programId * @param {string} accountName * @param {*} [options] Override http request option. * @throws {RequiredError} */ async metadataControllerGetAccountStructure_1(xApiKey: string, programId: string, accountName: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> { const localVarAxiosArgs = await MetadataApiAxiosParamCreator(configuration).metadataControllerGetAccountStructure_1(xApiKey, programId, accountName, options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); }; }, /** * Fetch the number of documents indexed for each instruction and account of this program. * @summary Get indexed document counts for program. * @param {string} xApiKey * @param {string} programId * @param {*} [options] Override http request option. * @throws {RequiredError} */ async metadataControllerGetDocumentCounts(xApiKey: string, programId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> { const localVarAxiosArgs = await MetadataApiAxiosParamCreator(configuration).metadataControllerGetDocumentCounts(xApiKey, programId, options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); }; }, /** * Fetch the number of documents indexed for each instruction and account of this program. * @summary Get indexed document counts for program. * @param {string} xApiKey * @param {string} programId * @param {*} [options] Override http request option. * @throws {RequiredError} */ async metadataControllerGetDocumentCounts_2(xApiKey: string, programId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> { const localVarAxiosArgs = await MetadataApiAxiosParamCreator(configuration).metadataControllerGetDocumentCounts_2(xApiKey, programId, options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); }; }, /** * The start and end params default to (and are capped by) the min and max slot available, respectively. Resolution is determined by Start and End * @summary Get a histogram of instruction invocations. * @param {string} xApiKey * @param {string} programId * @param {string} instructionName * @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 metadataControllerGetInstructionInvocationHistogram(xApiKey: string, programId: string, instructionName: string, start?: number, end?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> { const localVarAxiosArgs = await MetadataApiAxiosParamCreator(configuration).metadataControllerGetInstructionInvocationHistogram(xApiKey, programId, instructionName, start, end, options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); }; }, /** * The start and end params default to (and are capped by) the min and max slot available, respectively. Resolution is determined by Start and End * @summary Get a histogram of instruction invocations. * @param {string} xApiKey * @param {string} programId * @param {string} instructionName * @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 metadataControllerGetInstructionInvocationHistogram_3(xApiKey: string, programId: string, instructionName: string, start?: number, end?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> { const localVarAxiosArgs = await MetadataApiAxiosParamCreator(configuration).metadataControllerGetInstructionInvocationHistogram_3(xApiKey, programId, instructionName, 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 the range of slots in which we have data for an instruction. * @param {string} xApiKey * @param {string} programId * @param {string} instructionName * @param {*} [options] Override http request option. * @throws {RequiredError} */ async metadataControllerGetInstructionSlotRange(xApiKey: string, programId: string, instructionName: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> { const localVarAxiosArgs = await MetadataApiAxiosParamCreator(configuration).metadataControllerGetInstructionSlotRange(xApiKey, programId, instructionName, 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 range of slots in which we have data for an instruction. * @param {string} xApiKey * @param {string} programId * @param {string} instructionName * @param {*} [options] Override http request option. * @throws {RequiredError} */ async metadataControllerGetInstructionSlotRange_4(xApiKey: string, programId: string, instructionName: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> { const localVarAxiosArgs = await MetadataApiAxiosParamCreator(configuration).metadataControllerGetInstructionSlotRange_4(xApiKey, programId, instructionName, options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); }; }, /** * * @summary Get indexed instruction representation. * @param {string} xApiKey * @param {string} programId * @param {string} instructionName * @param {*} [options] Override http request option. * @throws {RequiredError} */ async metadataControllerGetInstructionStructure(xApiKey: string, programId: string, instructionName: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> { const localVarAxiosArgs = await MetadataApiAxiosParamCreator(configuration).metadataControllerGetInstructionStructure(xApiKey, programId, instructionName, options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); }; }, /** * * @summary Get indexed instruction representation. * @param {string} xApiKey * @param {string} programId * @param {string} instructionName * @param {*} [options] Override http request option. * @throws {RequiredError} */ async metadataControllerGetInstructionStructure_5(xApiKey: string, programId: string, instructionName: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> { const localVarAxiosArgs = await MetadataApiAxiosParamCreator(configuration).metadataControllerGetInstructionStructure_5(xApiKey, programId, instructionName, options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); }; }, /** * Fetch the list of instruction and account types associated with t