@alembic/nft-api-sdk
Advanced tools
Comparing version 1.0.9 to 1.0.10
@@ -7,3 +7,2 @@ export { NftApi } from './NftApi'; | ||
export type { OpenAPIConfig } from './core/OpenAPI'; | ||
export type { Asset } from './models/Asset'; | ||
export type { AssetAttribute } from './models/AssetAttribute'; | ||
@@ -14,2 +13,3 @@ export type { AssetAttributeSearch } from './models/AssetAttributeSearch'; | ||
export type { AssetTransfers } from './models/AssetTransfers'; | ||
export type { AssetWithTradeData } from './models/AssetWithTradeData'; | ||
export type { BatchTransferActivity } from './models/BatchTransferActivity'; | ||
@@ -20,3 +20,2 @@ export type { BatchTransfersActivities } from './models/BatchTransfersActivities'; | ||
export { CollectionAnalyticsFilters } from './models/CollectionAnalyticsFilters'; | ||
export type { CollectionAttribute } from './models/CollectionAttribute'; | ||
export type { CollectionFloorPrice } from './models/CollectionFloorPrice'; | ||
@@ -27,7 +26,10 @@ export type { ContractAddress } from './models/ContractAddress'; | ||
export type { Metadata } from './models/Metadata'; | ||
export type { NewCollection } from './models/NewCollection'; | ||
export type { NullableBignumber } from './models/NullableBignumber'; | ||
export type { OffersByAddressLimit } from './models/OffersByAddressLimit'; | ||
export type { OffersByAddressSkip } from './models/OffersByAddressSkip'; | ||
export type { Order } from './models/Order'; | ||
export { OrderDirection } from './models/OrderDirection'; | ||
export type { orderSchemas_ContractAddress } from './models/orderSchemas_ContractAddress'; | ||
export { OrderStatus } from './models/OrderStatus'; | ||
export { OrderType } from './models/OrderType'; | ||
@@ -41,6 +43,8 @@ export type { OwnersSpreadRange } from './models/OwnersSpreadRange'; | ||
export type { VolumeDataPoint } from './models/VolumeDataPoint'; | ||
export type { WebhookSubscriptions } from './models/WebhookSubscriptions'; | ||
export { AnalyticsService } from './services/AnalyticsService'; | ||
export { AssetService } from './services/AssetService'; | ||
export { CollectionService } from './services/CollectionService'; | ||
export { DefaultService } from './services/DefaultService'; | ||
export { OrderService } from './services/OrderService'; | ||
export { TransferService } from './services/TransferService'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TransferService = exports.OrderService = exports.CollectionService = exports.AssetService = exports.AnalyticsService = exports.TradeStatus = exports.OrderType = exports.OrderDirection = exports.CollectionAnalyticsFilters = exports.OpenAPI = exports.CancelError = exports.CancelablePromise = exports.BaseHttpRequest = exports.ApiError = exports.NftApi = void 0; | ||
exports.TransferService = exports.OrderService = exports.DefaultService = exports.CollectionService = exports.AssetService = exports.AnalyticsService = exports.TradeStatus = exports.OrderType = exports.OrderStatus = exports.OrderDirection = exports.CollectionAnalyticsFilters = exports.OpenAPI = exports.CancelError = exports.CancelablePromise = exports.BaseHttpRequest = exports.ApiError = exports.NftApi = void 0; | ||
/* istanbul ignore file */ | ||
@@ -22,2 +22,4 @@ /* tslint:disable */ | ||
Object.defineProperty(exports, "OrderDirection", { enumerable: true, get: function () { return OrderDirection_1.OrderDirection; } }); | ||
var OrderStatus_1 = require("./models/OrderStatus"); | ||
Object.defineProperty(exports, "OrderStatus", { enumerable: true, get: function () { return OrderStatus_1.OrderStatus; } }); | ||
var OrderType_1 = require("./models/OrderType"); | ||
@@ -33,2 +35,4 @@ Object.defineProperty(exports, "OrderType", { enumerable: true, get: function () { return OrderType_1.OrderType; } }); | ||
Object.defineProperty(exports, "CollectionService", { enumerable: true, get: function () { return CollectionService_1.CollectionService; } }); | ||
var DefaultService_1 = require("./services/DefaultService"); | ||
Object.defineProperty(exports, "DefaultService", { enumerable: true, get: function () { return DefaultService_1.DefaultService; } }); | ||
var OrderService_1 = require("./services/OrderService"); | ||
@@ -35,0 +39,0 @@ Object.defineProperty(exports, "OrderService", { enumerable: true, get: function () { return OrderService_1.OrderService; } }); |
@@ -1,45 +0,1 @@ | ||
import type { Bignumber } from './Bignumber'; | ||
import type { CollectionAttribute } from './CollectionAttribute'; | ||
import type { NullableBignumber } from './NullableBignumber'; | ||
export type Collection = { | ||
/** | ||
* The contract address of the collection. | ||
*/ | ||
contractAddress: string; | ||
/** | ||
* The name of the collection. | ||
*/ | ||
name: string; | ||
/** | ||
* 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, CollectionAttribute>; | ||
}; | ||
export type Collection = Record<string, any>; |
@@ -1,2 +0,2 @@ | ||
import type { Trade } from './Trade'; | ||
import type { Order } from './Order'; | ||
export type GetOffersResponse = { | ||
@@ -6,3 +6,3 @@ /** | ||
*/ | ||
offers: Array<Trade>; | ||
offers: Array<Order>; | ||
/** | ||
@@ -9,0 +9,0 @@ * The total number of offers sent by the address. |
@@ -1,34 +0,4 @@ | ||
import type { Fee } from './Fee'; | ||
import type { NullableBignumber } from './NullableBignumber'; | ||
import type { orderSchemas_ContractAddress } from './orderSchemas_ContractAddress'; | ||
import type { OrderStatus } from './OrderStatus'; | ||
import type { UserAddress } from './UserAddress'; | ||
export type Order = { | ||
/** | ||
* Unique identifier of the offer, a UUID. | ||
*/ | ||
id: string; | ||
contractAddress: orderSchemas_ContractAddress; | ||
/** | ||
* The identifier of the token. | ||
*/ | ||
tokenId: string; | ||
orderStatus: OrderStatus; | ||
/** | ||
* The price of the order for the item, in ERC20 tokens. | ||
*/ | ||
price: NullableBignumber; | ||
/** | ||
* The ethereum address of the maker. | ||
*/ | ||
maker: UserAddress; | ||
/** | ||
* The timestamp when the order was signed. | ||
*/ | ||
signedAt: number; | ||
/** | ||
* The expiry timestamp of the order. | ||
*/ | ||
expiry: number; | ||
fees: Array<Fee>; | ||
}; | ||
/** | ||
* An order | ||
*/ | ||
export type Order = Record<string, any>; |
@@ -1,2 +0,2 @@ | ||
import type { Asset } from './Asset'; | ||
import type { AssetWithTradeData } from './AssetWithTradeData'; | ||
export type SearchAssetResponse = { | ||
@@ -10,3 +10,3 @@ /** | ||
*/ | ||
assets: Array<Asset>; | ||
assets: Array<AssetWithTradeData>; | ||
}; |
/** | ||
* The status of the order. | ||
* The status of the trade. | ||
*/ | ||
@@ -4,0 +4,0 @@ export declare enum TradeStatus { |
@@ -8,3 +8,3 @@ "use strict"; | ||
/** | ||
* The status of the order. | ||
* The status of the trade. | ||
*/ | ||
@@ -11,0 +11,0 @@ var TradeStatus; |
@@ -6,2 +6,3 @@ import type { BaseHttpRequest } from './core/BaseHttpRequest'; | ||
import { CollectionService } from './services/CollectionService'; | ||
import { DefaultService } from './services/DefaultService'; | ||
import { OrderService } from './services/OrderService'; | ||
@@ -14,2 +15,3 @@ import { TransferService } from './services/TransferService'; | ||
readonly collection: CollectionService; | ||
readonly default: DefaultService; | ||
readonly order: OrderService; | ||
@@ -16,0 +18,0 @@ readonly transfer: TransferService; |
@@ -8,2 +8,3 @@ "use strict"; | ||
const CollectionService_1 = require("./services/CollectionService"); | ||
const DefaultService_1 = require("./services/DefaultService"); | ||
const OrderService_1 = require("./services/OrderService"); | ||
@@ -27,2 +28,3 @@ const TransferService_1 = require("./services/TransferService"); | ||
this.collection = new CollectionService_1.CollectionService(this.request); | ||
this.default = new DefaultService_1.DefaultService(this.request); | ||
this.order = new OrderService_1.OrderService(this.request); | ||
@@ -29,0 +31,0 @@ this.transfer = new TransferService_1.TransferService(this.request); |
@@ -1,3 +0,3 @@ | ||
import type { Asset } from '../models/Asset'; | ||
import type { AssetSearchFilters } from '../models/AssetSearchFilters'; | ||
import type { AssetWithTradeData } from '../models/AssetWithTradeData'; | ||
import type { ContractAddress } from '../models/ContractAddress'; | ||
@@ -23,6 +23,6 @@ import type { SearchAssetResponse } from '../models/SearchAssetResponse'; | ||
* @param tokenId The token ID of the asset. | ||
* @returns Asset Asset details | ||
* @returns AssetWithTradeData Asset details | ||
* @throws ApiError | ||
*/ | ||
getAsset(contractAddress: ContractAddress, tokenId: string): CancelablePromise<Asset>; | ||
getAsset(contractAddress: ContractAddress, tokenId: string): CancelablePromise<AssetWithTradeData>; | ||
/** | ||
@@ -29,0 +29,0 @@ * Refresh asset metadata |
@@ -33,3 +33,3 @@ "use strict"; | ||
* @param tokenId The token ID of the asset. | ||
* @returns Asset Asset details | ||
* @returns AssetWithTradeData Asset details | ||
* @throws ApiError | ||
@@ -36,0 +36,0 @@ */ |
import type { Collection } from '../models/Collection'; | ||
import type { ContractAddress } from '../models/ContractAddress'; | ||
import type { NewCollection } from '../models/NewCollection'; | ||
import type { CancelablePromise } from '../core/CancelablePromise'; | ||
@@ -25,2 +26,10 @@ import type { BaseHttpRequest } from '../core/BaseHttpRequest'; | ||
/** | ||
* Post a new collection | ||
* Post a new collection in DB, and inform the indexer. | ||
* @param requestBody | ||
* @returns any Successful operation | ||
* @throws ApiError | ||
*/ | ||
postCollections(requestBody: NewCollection): CancelablePromise<any>; | ||
/** | ||
* Get Collection infos | ||
@@ -27,0 +36,0 @@ * Retrieve information about a specific collection using the contract address. All filters are combined as AND operations. |
@@ -26,2 +26,22 @@ "use strict"; | ||
/** | ||
* Post a new collection | ||
* Post a new collection in DB, and inform the indexer. | ||
* @param requestBody | ||
* @returns any Successful operation | ||
* @throws ApiError | ||
*/ | ||
postCollections(requestBody) { | ||
return this.httpRequest.request({ | ||
method: 'POST', | ||
url: '/collections', | ||
body: requestBody, | ||
mediaType: 'application/json', | ||
errors: { | ||
400: `Invalid input, object invalid.`, | ||
404: `Ressource not found.`, | ||
500: `Internal server error`, | ||
}, | ||
}); | ||
} | ||
/** | ||
* Get Collection infos | ||
@@ -28,0 +48,0 @@ * Retrieve information about a specific collection using the contract address. All filters are combined as AND operations. |
{ | ||
"name": "@alembic/nft-api-sdk", | ||
"version": "1.0.9", | ||
"version": "1.0.10", | ||
"description": "SDK to use alembic NFT API", | ||
@@ -5,0 +5,0 @@ "main": "dist/src/index.js", |
79046
107
2152