/**
 * Cardano Wallet Backend API
 * <p align=\"right\"><img style=\"position: relative; top: -10em; margin-bottom: -12em;\" width=\"20%\" src=\"https://cardanodocs.com/img/cardano.png\"></img></p>
 *
 * OpenAPI spec version: 2021.3.4
 *
 *
 * 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 , { AxiosPromise , AxiosInstance } from 'axios' ; import { Configuration } from '../configuration' ; import { BASE_PATH , RequestArgs , BaseAPI , RequiredError } from '../base' ; import { InlineResponse2001 } from '../models' ; import { InlineResponse2002 } from '../models' ; export export const AssetsApiAxiosParamCreator = function ( configuration ? ) { return { summary param { string } walletId param { string } policyId param { string } assetName param { * } options throws getAsset : async ( walletId , policyId , assetName , options = { } ) : Promise < RequestArgs > => { if ( walletId === null || walletId === undefined ) { throw new RequiredError ( 'walletId' , 'Required parameter walletId was null or undefined when calling getAsset.' ) ; } if ( policyId === null || policyId === undefined ) { throw new RequiredError ( 'policyId' , 'Required parameter policyId was null or undefined when calling getAsset.' ) ; } if ( assetName === null || assetName === undefined ) { throw new RequiredError ( 'assetName' , 'Required parameter assetName was null or undefined when calling getAsset.' ) ; } const localVarPath = `/wallets/{walletId}/assets/{policyId}/{assetName}` . replace ( `{${ "walletId" }}` , encodeURIComponent ( String ( walletId ) ) ) . replace ( `{${ "policyId" }}` , encodeURIComponent ( String ( policyId ) ) ) . replace ( `{${ "assetName" }}` , encodeURIComponent ( String ( assetName ) ) ) ; const localVarUrlObj = new URL ( localVarPath , 'https://example.com' ) ; let baseOptions ; if ( configuration ) { baseOptions = configuration . baseOptions ; } const localVarRequestOptions = { method : 'GET' , ... baseOptions , ... options } ; const localVarHeaderParameter = { } as any ; const localVarQueryParameter = { } as any ; const query = new URLSearchParams ( localVarUrlObj . search ) ; for ( const key in localVarQueryParameter ) { query . set ( key , localVarQueryParameter [ key ] ) ; } for ( const key in options . query ) { query . set ( key , options . query [ 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 param { string } walletId param { string } policyId param { * } options throws getAssetDefault : async ( walletId , policyId , options = { } ) : Promise < RequestArgs > => { if ( walletId === null || walletId === undefined ) { throw new RequiredError ( 'walletId' , 'Required parameter walletId was null or undefined when calling getAssetDefault.' ) ; } if ( policyId === null || policyId === undefined ) { throw new RequiredError ( 'policyId' , 'Required parameter policyId was null or undefined when calling getAssetDefault.' ) ; } const localVarPath = `/wallets/{walletId}/assets/{policyId}` . replace ( `{${ "walletId" }}` , encodeURIComponent ( String ( walletId ) ) ) . replace ( `{${ "policyId" }}` , encodeURIComponent ( String ( policyId ) ) ) ; const localVarUrlObj = new URL ( localVarPath , 'https://example.com' ) ; let baseOptions ; if ( configuration ) { baseOptions = configuration . baseOptions ; } const localVarRequestOptions = { method : 'GET' , ... baseOptions , ... options } ; const localVarHeaderParameter = { } as any ; const localVarQueryParameter = { } as any ; const query = new URLSearchParams ( localVarUrlObj . search ) ; for ( const key in localVarQueryParameter ) { query . set ( key , localVarQueryParameter [ key ] ) ; } for ( const key in options . query ) { query . set ( key , options . query [ 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 param { string } walletId param { * } options throws listAssets : async ( walletId , options = { } ) : Promise < RequestArgs > => { if ( walletId === null || walletId === undefined ) { throw new RequiredError ( 'walletId' , 'Required parameter walletId was null or undefined when calling listAssets.' ) ; } const localVarPath = `/wallets/{walletId}/assets` . replace ( `{${ "walletId" }}` , encodeURIComponent ( String ( walletId ) ) ) ; const localVarUrlObj = new URL ( localVarPath , 'https://example.com' ) ; let baseOptions ; if ( configuration ) { baseOptions = configuration . baseOptions ; } const localVarRequestOptions = { method : 'GET' , ... baseOptions , ... options } ; const localVarHeaderParameter = { } as any ; const localVarQueryParameter = { } as any ; const query = new URLSearchParams ( localVarUrlObj . search ) ; for ( const key in localVarQueryParameter ) { query . set ( key , localVarQueryParameter [ key ] ) ; } for ( const key in options . query ) { query . set ( key , options . query [ 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 , } ; } , } ; } ; export export const AssetsApiFp = function ( configuration ? ) { return { summary param { string } walletId param { string } policyId param { string } assetName param { * } options throws async getAsset ( walletId , policyId , assetName , options ? ) { const localVarAxiosArgs = await AssetsApiAxiosParamCreator ( configuration ) . getAsset ( walletId , policyId , assetName , options ) ; return ( axios = globalAxios , basePath = BASE_PATH ) => { const axiosRequestArgs = { ... localVarAxiosArgs . options , url : basePath + localVarAxiosArgs . url } ; return axios . request ( axiosRequestArgs ) ; } ; } , summary param { string } walletId param { string } policyId param { * } options throws async getAssetDefault ( walletId , policyId , options ? ) { const localVarAxiosArgs = await AssetsApiAxiosParamCreator ( configuration ) . getAssetDefault ( walletId , policyId , options ) ; return ( axios = globalAxios , basePath = BASE_PATH ) => { const axiosRequestArgs = { ... localVarAxiosArgs . options , url : basePath + localVarAxiosArgs . url } ; return axios . request ( axiosRequestArgs ) ; } ; } , summary param { string } walletId param { * } options throws async listAssets ( walletId , options ? ) { const localVarAxiosArgs = await AssetsApiAxiosParamCreator ( configuration ) . listAssets ( walletId , options ) ; return ( axios = globalAxios , basePath = BASE_PATH ) => { const axiosRequestArgs = { ... localVarAxiosArgs . options , url : basePath + localVarAxiosArgs . url } ; return axios . request ( axiosRequestArgs ) ; } ; } , } ; } ; export export const AssetsApiFactory = function ( configuration ? , basePath ? , axios ? ) { return { summary param { string } walletId param { string } policyId param { string } assetName param { * } options throws getAsset ( walletId , policyId , assetName , options ? ) { return AssetsApiFp ( configuration ) . getAsset ( walletId , policyId , assetName , options ) . then ( ( request ) => request ( axios , basePath ) ) ; } , summary param { string } walletId param { string } policyId param { * } options throws getAssetDefault ( walletId , policyId , options ? ) { return AssetsApiFp ( configuration ) . getAssetDefault ( walletId , policyId , options ) . then ( ( request ) => request ( axios , basePath ) ) ; } , summary param { string } walletId param { * } options throws listAssets ( walletId , options ? ) { return AssetsApiFp ( configuration ) . listAssets ( walletId , options ) . then ( ( request ) => request ( axios , basePath ) ) ; } , } ; } ; export class extends BaseAPI export class AssetsApi extends BaseAPI { summary param { string } walletId param { string } policyId param { string } assetName param { * } options throws memberof public getAsset ( walletId , policyId , assetName , options ? ) { return AssetsApiFp ( this . configuration ) . getAsset ( walletId , policyId , assetName , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } summary param { string } walletId param { string } policyId param { * } options throws memberof public getAssetDefault ( walletId , policyId , options ? ) { return AssetsApiFp ( this . configuration ) . getAssetDefault ( walletId , policyId , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } summary param { string } walletId param { * } options throws memberof public listAssets ( walletId , options ? ) { return AssetsApiFp ( this . configuration ) . listAssets ( walletId , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } }