nmkr-studio-api
Version:
Typesafe API Client to work with the NMKR Studio V2 API
132 lines (131 loc) • 6.11 kB
TypeScript
import type { ApiErrorResultClass } from '../models/ApiErrorResultClass';
import type { DeleteAllNftsResultClass } from '../models/DeleteAllNftsResultClass';
import type { DuplicateNftClass } from '../models/DuplicateNftClass';
import type { NFT } from '../models/NFT';
import type { NftDetailsClass } from '../models/NftDetailsClass';
import type { NftProjectsDetails } from '../models/NftProjectsDetails';
import type { UploadMetadataClass } from '../models/UploadMetadataClass';
import type { UploadNftClassV2 } from '../models/UploadNftClassV2';
import type { UploadNftResultClass } from '../models/UploadNftResultClass';
import type { CancelablePromise } from '../core/CancelablePromise';
import type { BaseHttpRequest } from '../core/BaseHttpRequest';
export declare class NftService {
readonly httpRequest: BaseHttpRequest;
constructor(httpRequest: BaseHttpRequest);
/**
* Blocks/Unblocks an nft (nft uid)
* You can block an nft, if it is not already sold or reserved and you can unblock blocked nfts
* @returns any Returns the Nft Class
* @throws ApiError
*/
getV2BlockUnblockNft({ nftuid, blockNft }: {
nftuid: string;
blockNft: boolean;
}): CancelablePromise<any>;
/**
* Checks if the metadata is valid
* @returns ApiErrorResultClass Returns OK if the metadata are valid
* @throws ApiError
*/
getV2CheckMetadata({ nftuid }: {
nftuid: string;
}): CancelablePromise<ApiErrorResultClass>;
/**
* Checks if the metadata is valid
* @returns ApiErrorResultClass Returns OK if the metadata are valid
* @throws ApiError
*/
postV2CheckMetadata({ nftuid, requestBody, }: {
nftuid: string;
requestBody?: UploadMetadataClass;
}): CancelablePromise<ApiErrorResultClass>;
/**
* Deletes all nfts from the database
* This function deletes all NFTs from a project. You can delete a nft, if it is not in sold or reserved state. All other nfts will be deleted.
* @returns DeleteAllNftsResultClass Returns the Nft Class
* @throws ApiError
*/
getV2DeleteAllNftsFromProject({ projectuid, }: {
projectuid: string;
}): CancelablePromise<DeleteAllNftsResultClass>;
/**
* Deletes a nft from the database (nft uid)
* You can delete a nft, if it is not in sold or reserved state
* @returns any Returns the Nft Class
* @throws ApiError
*/
getV2DeleteNft({ nftuid }: {
nftuid: string;
}): CancelablePromise<any>;
/**
* Duplicates a nft/token inside a project. If a token already exists, it will be skipped
* @returns NftProjectsDetails Duplicate was successful. Returns the NtProjectDetails Class
* @throws ApiError
*/
postV2DuplicateNft({ nftuid, requestBody, }: {
nftuid: string;
requestBody?: DuplicateNftClass;
}): CancelablePromise<NftProjectsDetails>;
/**
* Returns detail information about one nft specified by Id (nft uid)
* You will receive all information (fingerprint, ipfshash, etc.) about one nfts with the submitted id
* @returns NftDetailsClass Returns the Nft Class
* @throws ApiError
*/
getV2GetNftDetailsById({ nftuid }: {
nftuid: string;
}): CancelablePromise<NftDetailsClass>;
/**
* Returns detail information about one nft specified by its name
* You will receive all information (fingerprint, ipfshash, etc.) about one nft with the submitted name
* @returns NftDetailsClass Returns the Nft Class
* @throws ApiError
*/
getV2GetNftDetailsByTokenname({ projectuid, nftname, }: {
projectuid: string;
nftname: string;
}): CancelablePromise<NftDetailsClass>;
/**
* Returns detail information about nfts with a specific state with Pagination support. (project uid)
* You will receive all information (fingerprint, ipfshash, etc.) about the nfts within a specific state.
* State "all" lists all available nft in this project. The other states are: "free", "reserved", "sold" and "error"
* @returns NFT Returns a List of the NFT Class
* @throws ApiError
*/
getV2GetNfts({ projectuid, state, count, page, orderby, }: {
projectuid: string;
state: string;
count: number;
page: number;
/**
* (Optional) The sort order of the result. Possible values are: id (default),id_desc (descending order), selldate (on sold nfts) and selldate_desc (descending order)
*/
orderby?: string;
}): CancelablePromise<Array<NFT>>;
/**
* Updates the Metadata for one specific NFT
* With this API you can update the Metadata Override for one specific NFT
* If you leave the field blank, the Metadata override will be deleted and the Metadata from the project will be used.
* @returns NftDetailsClass Returns the Nftdetails Class
* @throws ApiError
*/
postV2UpdateMetadata({ projectuid, nftuid, requestBody, }: {
projectuid: string;
nftuid: string;
requestBody?: any;
}): CancelablePromise<NftDetailsClass>;
/**
* Upload a File to a project and pin it to IPFS
* With this API you can upload a file to IPFS and add it to a project. You can upload the file as BASE64 Content or as URL Link or as IPFS Hash.
* If you submit Metadata, this Metadata will be used instead of the Metadatatemplate from the project. You can either submit Metadata or MetadataPlaceholder, but not both (because it makes no sense).
* The Metadata field is optional and if you dont use it, it will use the Template from your project. It is poosible to mix both versions in one project. You can have one nft with own metadata and other nfts
* with the template.
* @returns UploadNftResultClass Returns the UploadNftResult Class
* @throws ApiError
*/
postV2UploadNft({ projectuid, uploadsource, requestBody, }: {
projectuid: string;
uploadsource?: string;
requestBody?: UploadNftClassV2;
}): CancelablePromise<UploadNftResultClass>;
}