@alembic/nft-api-sdk
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -25,3 +25,5 @@ export { NftApi } from './NftApi'; | ||
export type { Collection } from './models/Collection'; | ||
export type { CollectionAnalytics } from './models/CollectionAnalytics'; | ||
export { CollectionAnalyticsFilters } from './models/CollectionAnalyticsFilters'; | ||
export type { CollectionAttributes } from './models/CollectionAttributes'; | ||
export type { CollectionFee } from './models/CollectionFee'; | ||
@@ -38,2 +40,4 @@ export type { CollectionFees } from './models/CollectionFees'; | ||
export type { GetBidResponse } from './models/GetBidResponse'; | ||
export type { GetCollectionProgressResponse } from './models/GetCollectionProgressResponse'; | ||
export type { GetCollectionResponse } from './models/GetCollectionResponse'; | ||
export type { GetWinningBidResponse } from './models/GetWinningBidResponse'; | ||
@@ -45,3 +49,2 @@ export type { IndexerEvent } from './models/IndexerEvent'; | ||
export type { NewAuction } from './models/NewAuction'; | ||
export type { NewAuctionResponse } from './models/NewAuctionResponse'; | ||
export type { NewBid } from './models/NewBid'; | ||
@@ -59,3 +62,5 @@ export { NewCollection } from './models/NewCollection'; | ||
export type { PaginatedBids } from './models/PaginatedBids'; | ||
export type { PaginatedCollections } from './models/PaginatedCollections'; | ||
export type { PaginatedOrders } from './models/PaginatedOrders'; | ||
export type { RefreshCollectionMetadataResponse } from './models/RefreshCollectionMetadataResponse'; | ||
export type { SearchAssetResponse } from './models/SearchAssetResponse'; | ||
@@ -65,2 +70,3 @@ export type { SearchAssetWithTradeData } from './models/SearchAssetWithTradeData'; | ||
export type { SearchBidsRequest } from './models/SearchBidsRequest'; | ||
export type { SearchCollectionsRequest } from './models/SearchCollectionsRequest'; | ||
export type { SearchOrdersRequest } from './models/SearchOrdersRequest'; | ||
@@ -67,0 +73,0 @@ export type { Signature } from './models/Signature'; |
@@ -1,6 +0,3 @@ | ||
import type { Bignumber } from './Bignumber'; | ||
import type { CollectionFees } from './CollectionFees'; | ||
import type { CollectionStandard } from './CollectionStandard'; | ||
import type { ContractAddress } from './ContractAddress'; | ||
import type { NullableBignumber } from './NullableBignumber'; | ||
import type { WebhookSubscriptions } from './WebhookSubscriptions'; | ||
@@ -37,38 +34,2 @@ export type Collection = { | ||
webhookSubscriptions: Array<WebhookSubscriptions>; | ||
/** | ||
* List of fees for the collection | ||
*/ | ||
collectionFees?: CollectionFees; | ||
/** | ||
* The total supply of assets in the collection. | ||
*/ | ||
supply?: number; | ||
/** | ||
* The total number of owners of the assets in the collection. | ||
*/ | ||
owners?: number; | ||
/** | ||
* The lowest price at which an asset in the collection is listed for sale. | ||
*/ | ||
floorPrice?: NullableBignumber; | ||
/** | ||
* The highest price of an offer for an asset. | ||
*/ | ||
bestOffer?: NullableBignumber; | ||
/** | ||
* The total number of assets listed for sale in the collection. | ||
*/ | ||
listingsCount?: number; | ||
/** | ||
* The total number of offers made on assets in the collection. | ||
*/ | ||
offersCount?: number; | ||
/** | ||
* The total trading volume of the collection. | ||
*/ | ||
totalVolume?: Bignumber; | ||
/** | ||
* Distribution of attribute values by type. | ||
*/ | ||
attributes?: Record<string, Record<string, number>>; | ||
}; |
@@ -5,3 +5,4 @@ /** | ||
export declare enum CollectionStandard { | ||
ERC721 = "ERC721" | ||
ERC721 = "ERC721", | ||
ERC1155 = "ERC1155" | ||
} |
@@ -14,2 +14,3 @@ "use strict"; | ||
CollectionStandard["ERC721"] = "ERC721"; | ||
CollectionStandard["ERC1155"] = "ERC1155"; | ||
})(CollectionStandard || (exports.CollectionStandard = CollectionStandard = {})); |
@@ -34,2 +34,6 @@ export type Metadata = { | ||
youtube_url?: string | null; | ||
/** | ||
* Date when the asset metadata was last refreshed at. | ||
*/ | ||
refreshed_at?: string | null; | ||
}; |
@@ -14,3 +14,3 @@ import type { CollectionFees } from './CollectionFees'; | ||
/** | ||
* Informations about the contract | ||
* Information about the contract | ||
*/ | ||
@@ -23,3 +23,2 @@ contract: { | ||
address: ContractAddress; | ||
startBlock: number; | ||
}; | ||
@@ -26,0 +25,0 @@ webhookSubscriptions: Array<WebhookSubscriptions>; |
@@ -7,5 +7,5 @@ export type WebhookSubscriptions = { | ||
/** | ||
* List containing for every event the first topic representing the event signature | ||
* List of every on-chain event you are subscribing to | ||
*/ | ||
eventSignaturesTopic: Array<string>; | ||
}; |
@@ -0,1 +1,2 @@ | ||
import type { Auction } from '../models/Auction'; | ||
import type { Bid } from '../models/Bid'; | ||
@@ -8,3 +9,2 @@ import type { CancelBidRequest } from '../models/CancelBidRequest'; | ||
import type { NewAuction } from '../models/NewAuction'; | ||
import type { NewAuctionResponse } from '../models/NewAuctionResponse'; | ||
import type { NewBid } from '../models/NewBid'; | ||
@@ -33,6 +33,6 @@ import type { PaginatedAuctions } from '../models/PaginatedAuctions'; | ||
* @param requestBody Auction to create | ||
* @returns NewAuctionResponse successful operation | ||
* @returns Auction successful operation | ||
* @throws ApiError | ||
*/ | ||
createAuction(requestBody?: NewAuction): CancelablePromise<NewAuctionResponse>; | ||
createAuction(requestBody?: NewAuction): CancelablePromise<Auction>; | ||
/** | ||
@@ -39,0 +39,0 @@ * Get auction details |
@@ -33,3 +33,3 @@ "use strict"; | ||
* @param requestBody Auction to create | ||
* @returns NewAuctionResponse successful operation | ||
* @returns Auction successful operation | ||
* @throws ApiError | ||
@@ -36,0 +36,0 @@ */ |
import type { Collection } from '../models/Collection'; | ||
import type { CollectionAttributes } from '../models/CollectionAttributes'; | ||
import type { ContractAddress } from '../models/ContractAddress'; | ||
import type { GetCollectionProgressResponse } from '../models/GetCollectionProgressResponse'; | ||
import type { GetCollectionResponse } from '../models/GetCollectionResponse'; | ||
import type { NewCollection } from '../models/NewCollection'; | ||
import type { PaginatedCollections } from '../models/PaginatedCollections'; | ||
import type { RefreshCollectionMetadataResponse } from '../models/RefreshCollectionMetadataResponse'; | ||
import type { SearchCollectionsRequest } from '../models/SearchCollectionsRequest'; | ||
import type { CancelablePromise } from '../core/CancelablePromise'; | ||
@@ -10,25 +16,17 @@ import type { BaseHttpRequest } from '../core/BaseHttpRequest'; | ||
/** | ||
* Retrieve all collections | ||
* Retrieve all collections that were indexed in the NFT API. | ||
* @returns any Successful operation | ||
* Register a new collection | ||
* Register a new collection in the NFT API. This will start the process of indexing this ERC721 contract. For now, this will not do anything about the 0x indexing settings (planned for later). | ||
* @param requestBody | ||
* @returns Collection Successful operation | ||
* @throws ApiError | ||
*/ | ||
getCollections(): CancelablePromise<Array<{ | ||
/** | ||
* Contract address of the collection | ||
*/ | ||
contractAddress?: string; | ||
/** | ||
* Name of the collection | ||
*/ | ||
name?: string; | ||
}>>; | ||
registerCollection(requestBody: NewCollection): CancelablePromise<Collection>; | ||
/** | ||
* Register a new collection | ||
* Register a new collection in the NFT API. This will start the process of indexing this ERC721 contract. For now, this will not do anything about the 0x indexing settings (planned for later). | ||
* Retrieve all collections | ||
* Retrieve all collections that were indexed in the NFT API. | ||
* @param requestBody | ||
* @returns any Successful operation | ||
* @returns PaginatedCollections Successful operation | ||
* @throws ApiError | ||
*/ | ||
registerCollection(requestBody: NewCollection): CancelablePromise<any>; | ||
searchCollections(requestBody: SearchCollectionsRequest): CancelablePromise<PaginatedCollections>; | ||
/** | ||
@@ -38,6 +36,6 @@ * Get Collection infos | ||
* @param contractAddress | ||
* @returns Collection Collection information | ||
* @returns GetCollectionResponse Collection information | ||
* @throws ApiError | ||
*/ | ||
getCollection(contractAddress: ContractAddress): CancelablePromise<Collection>; | ||
getCollection(contractAddress: ContractAddress): CancelablePromise<GetCollectionResponse>; | ||
/** | ||
@@ -48,8 +46,6 @@ * Refreshes the metadata of the specified collection | ||
* @param requestBody | ||
* @returns any Metadata refresh initiated successfully | ||
* @returns RefreshCollectionMetadataResponse Metadata refresh initiated successfully | ||
* @throws ApiError | ||
*/ | ||
refreshCollectionMetadata(contractAddress: ContractAddress, requestBody: Record<string, any> | null): CancelablePromise<{ | ||
success: boolean; | ||
}>; | ||
refreshCollectionMetadata(contractAddress: ContractAddress, requestBody: Record<string, any> | null): CancelablePromise<RefreshCollectionMetadataResponse>; | ||
/** | ||
@@ -59,15 +55,6 @@ * Retrieve the collection attributes by contract address | ||
* @param contractAddress | ||
* @returns any Successful operation | ||
* @returns CollectionAttributes Successful operation | ||
* @throws ApiError | ||
*/ | ||
getCollectionAttributes(contractAddress: ContractAddress): CancelablePromise<Array<{ | ||
/** | ||
* The type of the trait | ||
*/ | ||
type?: string; | ||
/** | ||
* The value of the trait | ||
*/ | ||
value?: string; | ||
}>>; | ||
getCollectionAttributes(contractAddress: ContractAddress): CancelablePromise<CollectionAttributes>; | ||
/** | ||
@@ -77,8 +64,6 @@ * Retrieve the collection progress by contract address | ||
* @param contractAddress | ||
* @returns any Successful operation | ||
* @returns GetCollectionProgressResponse Successful operation | ||
* @throws ApiError | ||
*/ | ||
getCollectionProgress(contractAddress: ContractAddress): CancelablePromise<{ | ||
progress: number; | ||
}>; | ||
getCollectionProgress(contractAddress: ContractAddress): CancelablePromise<GetCollectionProgressResponse>; | ||
} |
@@ -9,11 +9,14 @@ "use strict"; | ||
/** | ||
* Retrieve all collections | ||
* Retrieve all collections that were indexed in the NFT API. | ||
* @returns any Successful operation | ||
* Register a new collection | ||
* Register a new collection in the NFT API. This will start the process of indexing this ERC721 contract. For now, this will not do anything about the 0x indexing settings (planned for later). | ||
* @param requestBody | ||
* @returns Collection Successful operation | ||
* @throws ApiError | ||
*/ | ||
getCollections() { | ||
registerCollection(requestBody) { | ||
return this.httpRequest.request({ | ||
method: 'GET', | ||
method: 'POST', | ||
url: '/collections', | ||
body: requestBody, | ||
mediaType: 'application/json', | ||
errors: { | ||
@@ -27,12 +30,12 @@ 400: `Invalid input, object invalid.`, | ||
/** | ||
* Register a new collection | ||
* Register a new collection in the NFT API. This will start the process of indexing this ERC721 contract. For now, this will not do anything about the 0x indexing settings (planned for later). | ||
* Retrieve all collections | ||
* Retrieve all collections that were indexed in the NFT API. | ||
* @param requestBody | ||
* @returns any Successful operation | ||
* @returns PaginatedCollections Successful operation | ||
* @throws ApiError | ||
*/ | ||
registerCollection(requestBody) { | ||
searchCollections(requestBody) { | ||
return this.httpRequest.request({ | ||
method: 'POST', | ||
url: '/collections', | ||
url: '/collections/search', | ||
body: requestBody, | ||
@@ -51,3 +54,3 @@ mediaType: 'application/json', | ||
* @param contractAddress | ||
* @returns Collection Collection information | ||
* @returns GetCollectionResponse Collection information | ||
* @throws ApiError | ||
@@ -74,3 +77,3 @@ */ | ||
* @param requestBody | ||
* @returns any Metadata refresh initiated successfully | ||
* @returns RefreshCollectionMetadataResponse Metadata refresh initiated successfully | ||
* @throws ApiError | ||
@@ -98,3 +101,3 @@ */ | ||
* @param contractAddress | ||
* @returns any Successful operation | ||
* @returns CollectionAttributes Successful operation | ||
* @throws ApiError | ||
@@ -120,3 +123,3 @@ */ | ||
* @param contractAddress | ||
* @returns any Successful operation | ||
* @returns GetCollectionProgressResponse Successful operation | ||
* @throws ApiError | ||
@@ -123,0 +126,0 @@ */ |
{ | ||
"name": "@alembic/nft-api-sdk", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "SDK to use alembic NFT API", | ||
@@ -5,0 +5,0 @@ "main": "dist/src/index.js", |
158940
249
4519