@rarible/ethereum-api-client
Advanced tools
Comparing version 0.1.20 to 0.1.21
@@ -13,3 +13,3 @@ /** | ||
import * as runtime from '../runtime'; | ||
import { EthereumApiErrorBadRequest, EthereumApiErrorEntityNotFound, EthereumApiErrorServerError, NftCollection, NftCollections, NftTokenId } from '../models'; | ||
import { EthereumApiErrorBadRequest, EthereumApiErrorEntityNotFound, EthereumApiErrorServerError, NftCollection, NftCollectionStats, NftCollections, NftTokenId } from '../models'; | ||
export interface GenerateNftTokenIdRequest { | ||
@@ -22,2 +22,5 @@ collection: string; | ||
} | ||
export interface GetNftCollectionStatsRequest { | ||
collection: string; | ||
} | ||
export interface ResetNftCollectionMetaByIdRequest { | ||
@@ -56,2 +59,10 @@ collection: string; | ||
/** | ||
* Returns collection by address | ||
*/ | ||
getNftCollectionStatsRaw(requestParameters: GetNftCollectionStatsRequest): Promise<GetNftCollectionStatsResponse>; | ||
/** | ||
* Returns collection by address | ||
*/ | ||
getNftCollectionStats(requestParameters: GetNftCollectionStatsRequest): Promise<NftCollectionStats>; | ||
/** | ||
* Deletes the NFT collection meta by identifier | ||
@@ -111,2 +122,19 @@ */ | ||
export declare type GetNftCollectionByIdResponse = GetNftCollectionById200 | GetNftCollectionById404 | GetNftCollectionById400 | GetNftCollectionById500; | ||
export declare type GetNftCollectionStats200 = { | ||
status: 200; | ||
value: NftCollectionStats; | ||
}; | ||
export declare type GetNftCollectionStats404 = { | ||
status: 404; | ||
value: EthereumApiErrorEntityNotFound; | ||
}; | ||
export declare type GetNftCollectionStats400 = { | ||
status: 400; | ||
value: EthereumApiErrorBadRequest; | ||
}; | ||
export declare type GetNftCollectionStats500 = { | ||
status: 500; | ||
value: EthereumApiErrorServerError; | ||
}; | ||
export declare type GetNftCollectionStatsResponse = GetNftCollectionStats200 | GetNftCollectionStats404 | GetNftCollectionStats400 | GetNftCollectionStats500; | ||
export declare type ResetNftCollectionMetaById200 = { | ||
@@ -113,0 +141,0 @@ status: 200; |
@@ -251,2 +251,80 @@ "use strict"; | ||
/** | ||
* Returns collection by address | ||
*/ | ||
NftCollectionControllerApi.prototype.getNftCollectionStatsRaw = function (requestParameters) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
var queryParameters, headerParameters, response; | ||
var _a, _b, _c, _d; | ||
return __generator(this, function (_e) { | ||
switch (_e.label) { | ||
case 0: | ||
if (requestParameters.collection === null || requestParameters.collection === undefined) { | ||
throw new runtime.RequiredError('collection', 'Required parameter requestParameters.collection was null or undefined when calling getNftCollectionStats.'); | ||
} | ||
queryParameters = {}; | ||
headerParameters = {}; | ||
return [4 /*yield*/, this.request({ | ||
path: "/v0.1/nft/collections/{collection}/stats".replace("{" + "collection" + "}", encodeURIComponent(String(requestParameters.collection))), | ||
method: 'GET', | ||
headers: headerParameters, | ||
query: queryParameters, | ||
})]; | ||
case 1: | ||
response = _e.sent(); | ||
if (!(response.status === 200)) return [3 /*break*/, 3]; | ||
_a = { | ||
status: 200 | ||
}; | ||
return [4 /*yield*/, response.json()]; | ||
case 2: return [2 /*return*/, (_a.value = _e.sent(), | ||
_a)]; | ||
case 3: | ||
if (!(response.status === 404)) return [3 /*break*/, 5]; | ||
_b = { | ||
status: 404 | ||
}; | ||
return [4 /*yield*/, response.json()]; | ||
case 4: return [2 /*return*/, (_b.value = _e.sent(), | ||
_b)]; | ||
case 5: | ||
if (!(response.status === 400)) return [3 /*break*/, 7]; | ||
_c = { | ||
status: 400 | ||
}; | ||
return [4 /*yield*/, response.json()]; | ||
case 6: return [2 /*return*/, (_c.value = _e.sent(), | ||
_c)]; | ||
case 7: | ||
if (!(response.status === 500)) return [3 /*break*/, 9]; | ||
_d = { | ||
status: 500 | ||
}; | ||
return [4 /*yield*/, response.json()]; | ||
case 8: return [2 /*return*/, (_d.value = _e.sent(), | ||
_d)]; | ||
case 9: throw response; | ||
} | ||
}); | ||
}); | ||
}; | ||
/** | ||
* Returns collection by address | ||
*/ | ||
NftCollectionControllerApi.prototype.getNftCollectionStats = function (requestParameters) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
var response; | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: return [4 /*yield*/, this.getNftCollectionStatsRaw(requestParameters)]; | ||
case 1: | ||
response = _a.sent(); | ||
if (response.status === 200) { | ||
return [2 /*return*/, response.value]; | ||
} | ||
throw response; | ||
} | ||
}); | ||
}); | ||
}; | ||
/** | ||
* Deletes the NFT collection meta by identifier | ||
@@ -253,0 +331,0 @@ */ |
@@ -13,3 +13,7 @@ /** | ||
import * as runtime from '../runtime'; | ||
import { AggregationData, EthereumApiErrorBadRequest, EthereumApiErrorServerError, Platform } from '../models'; | ||
import { AggregationData, EthereumApiErrorBadRequest, EthereumApiErrorEntityNotFound, EthereumApiErrorServerError, OrderCollectionStats, Platform } from '../models'; | ||
export interface AggregateNftCollectionStatsRequest { | ||
collection: string; | ||
currency?: string; | ||
} | ||
export interface AggregateNftPurchaseByCollectionRequest { | ||
@@ -38,2 +42,8 @@ startDate: number; | ||
/** | ||
*/ | ||
aggregateNftCollectionStatsRaw(requestParameters: AggregateNftCollectionStatsRequest): Promise<AggregateNftCollectionStatsResponse>; | ||
/** | ||
*/ | ||
aggregateNftCollectionStats(requestParameters: AggregateNftCollectionStatsRequest): Promise<OrderCollectionStats>; | ||
/** | ||
* Aggregate NFT purchase by collection | ||
@@ -63,2 +73,19 @@ */ | ||
} | ||
export declare type AggregateNftCollectionStats200 = { | ||
status: 200; | ||
value: OrderCollectionStats; | ||
}; | ||
export declare type AggregateNftCollectionStats404 = { | ||
status: 404; | ||
value: EthereumApiErrorEntityNotFound; | ||
}; | ||
export declare type AggregateNftCollectionStats400 = { | ||
status: 400; | ||
value: EthereumApiErrorBadRequest; | ||
}; | ||
export declare type AggregateNftCollectionStats500 = { | ||
status: 500; | ||
value: EthereumApiErrorServerError; | ||
}; | ||
export declare type AggregateNftCollectionStatsResponse = AggregateNftCollectionStats200 | AggregateNftCollectionStats404 | AggregateNftCollectionStats400 | AggregateNftCollectionStats500; | ||
export declare type AggregateNftPurchaseByCollection200 = { | ||
@@ -65,0 +92,0 @@ status: 200; |
@@ -97,2 +97,81 @@ "use strict"; | ||
/** | ||
*/ | ||
OrderAggregationControllerApi.prototype.aggregateNftCollectionStatsRaw = function (requestParameters) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
var queryParameters, headerParameters, response; | ||
var _a, _b, _c, _d; | ||
return __generator(this, function (_e) { | ||
switch (_e.label) { | ||
case 0: | ||
if (requestParameters.collection === null || requestParameters.collection === undefined) { | ||
throw new runtime.RequiredError('collection', 'Required parameter requestParameters.collection was null or undefined when calling aggregateNftCollectionStats.'); | ||
} | ||
queryParameters = {}; | ||
if (requestParameters.currency !== undefined) { | ||
queryParameters['currency'] = requestParameters.currency; | ||
} | ||
headerParameters = {}; | ||
return [4 /*yield*/, this.request({ | ||
path: "/v0.1/order/aggregations/aggregateNftCollectionStats/{collection}".replace("{" + "collection" + "}", encodeURIComponent(String(requestParameters.collection))), | ||
method: 'GET', | ||
headers: headerParameters, | ||
query: queryParameters, | ||
})]; | ||
case 1: | ||
response = _e.sent(); | ||
if (!(response.status === 200)) return [3 /*break*/, 3]; | ||
_a = { | ||
status: 200 | ||
}; | ||
return [4 /*yield*/, response.json()]; | ||
case 2: return [2 /*return*/, (_a.value = _e.sent(), | ||
_a)]; | ||
case 3: | ||
if (!(response.status === 404)) return [3 /*break*/, 5]; | ||
_b = { | ||
status: 404 | ||
}; | ||
return [4 /*yield*/, response.json()]; | ||
case 4: return [2 /*return*/, (_b.value = _e.sent(), | ||
_b)]; | ||
case 5: | ||
if (!(response.status === 400)) return [3 /*break*/, 7]; | ||
_c = { | ||
status: 400 | ||
}; | ||
return [4 /*yield*/, response.json()]; | ||
case 6: return [2 /*return*/, (_c.value = _e.sent(), | ||
_c)]; | ||
case 7: | ||
if (!(response.status === 500)) return [3 /*break*/, 9]; | ||
_d = { | ||
status: 500 | ||
}; | ||
return [4 /*yield*/, response.json()]; | ||
case 8: return [2 /*return*/, (_d.value = _e.sent(), | ||
_d)]; | ||
case 9: throw response; | ||
} | ||
}); | ||
}); | ||
}; | ||
/** | ||
*/ | ||
OrderAggregationControllerApi.prototype.aggregateNftCollectionStats = function (requestParameters) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
var response; | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: return [4 /*yield*/, this.aggregateNftCollectionStatsRaw(requestParameters)]; | ||
case 1: | ||
response = _a.sent(); | ||
if (response.status === 200) { | ||
return [2 /*return*/, response.value]; | ||
} | ||
throw response; | ||
} | ||
}); | ||
}); | ||
}; | ||
/** | ||
* Aggregate NFT purchase by collection | ||
@@ -99,0 +178,0 @@ */ |
@@ -25,2 +25,3 @@ import { Address } from "@rarible/types"; | ||
source: OrderActivitySource; | ||
reverted?: boolean; | ||
left: OrderActivityMatchSide; | ||
@@ -41,2 +42,3 @@ right: OrderActivityMatchSide; | ||
source: OrderActivitySource; | ||
reverted?: boolean; | ||
hash: Word; | ||
@@ -54,2 +56,3 @@ maker: Address; | ||
source: OrderActivitySource; | ||
reverted?: boolean; | ||
hash: Word; | ||
@@ -67,2 +70,3 @@ maker: Address; | ||
source: OrderActivitySource; | ||
reverted?: boolean; | ||
hash: Word; | ||
@@ -82,2 +86,3 @@ maker: Address; | ||
source: OrderActivitySource; | ||
reverted?: boolean; | ||
hash: Word; | ||
@@ -105,2 +110,3 @@ maker: Address; | ||
date: string; | ||
reverted?: boolean; | ||
}; | ||
@@ -119,2 +125,3 @@ export declare type Burn = { | ||
date: string; | ||
reverted?: boolean; | ||
}; | ||
@@ -133,3 +140,5 @@ export declare type Transfer = { | ||
date: string; | ||
reverted?: boolean; | ||
from: Address; | ||
purchase?: boolean; | ||
}; | ||
@@ -146,2 +155,3 @@ export declare enum AuctionActivitySource { | ||
auction: Auction; | ||
reverted?: boolean; | ||
transactionHash: Word; | ||
@@ -158,2 +168,3 @@ blockHash: Word; | ||
auction: Auction; | ||
reverted?: boolean; | ||
bid: AuctionBid; | ||
@@ -171,2 +182,3 @@ transactionHash: Word; | ||
auction: Auction; | ||
reverted?: boolean; | ||
transactionHash: Word; | ||
@@ -183,2 +195,3 @@ blockHash: Word; | ||
auction: Auction; | ||
reverted?: boolean; | ||
transactionHash: Word; | ||
@@ -195,2 +208,3 @@ blockHash: Word; | ||
auction: Auction; | ||
reverted?: boolean; | ||
}; | ||
@@ -203,2 +217,3 @@ export declare type AuctionActivityEnd = { | ||
auction: Auction; | ||
reverted?: boolean; | ||
}; |
export * from "./NftSignature"; | ||
export * from "./NftCollectionStats"; | ||
export * from "./OrderCurrencies"; | ||
@@ -14,2 +15,3 @@ export * from "./ItemBuy"; | ||
export * from "./OrderFormAsset"; | ||
export * from "./OrderCollectionStats"; | ||
export * from "./AuctionSort"; | ||
@@ -16,0 +18,0 @@ export * from "./Part"; |
@@ -14,2 +14,3 @@ "use strict"; | ||
__exportStar(require("./NftSignature"), exports); | ||
__exportStar(require("./NftCollectionStats"), exports); | ||
__exportStar(require("./OrderCurrencies"), exports); | ||
@@ -27,2 +28,3 @@ __exportStar(require("./ItemBuy"), exports); | ||
__exportStar(require("./OrderFormAsset"), exports); | ||
__exportStar(require("./OrderCollectionStats"), exports); | ||
__exportStar(require("./AuctionSort"), exports); | ||
@@ -29,0 +31,0 @@ __exportStar(require("./Part"), exports); |
@@ -6,2 +6,3 @@ import { Address } from "@rarible/types"; | ||
type: NftCollectionType; | ||
status?: NftCollectionStatus; | ||
owner?: Address; | ||
@@ -20,2 +21,7 @@ name: string; | ||
} | ||
export declare enum NftCollectionStatus { | ||
PENDING = "PENDING", | ||
ERROR = "ERROR", | ||
CONFIRMED = "CONFIRMED" | ||
} | ||
export declare enum NftCollectionFeatures { | ||
@@ -22,0 +28,0 @@ APPROVE_FOR_ALL = "APPROVE_FOR_ALL", |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.NftCollectionFeatures = exports.NftCollectionType = void 0; | ||
exports.NftCollectionFeatures = exports.NftCollectionStatus = exports.NftCollectionType = void 0; | ||
var NftCollectionType; | ||
@@ -10,2 +10,8 @@ (function (NftCollectionType) { | ||
})(NftCollectionType = exports.NftCollectionType || (exports.NftCollectionType = {})); | ||
var NftCollectionStatus; | ||
(function (NftCollectionStatus) { | ||
NftCollectionStatus["PENDING"] = "PENDING"; | ||
NftCollectionStatus["ERROR"] = "ERROR"; | ||
NftCollectionStatus["CONFIRMED"] = "CONFIRMED"; | ||
})(NftCollectionStatus = exports.NftCollectionStatus || (exports.NftCollectionStatus = {})); | ||
var NftCollectionFeatures; | ||
@@ -12,0 +18,0 @@ (function (NftCollectionFeatures) { |
@@ -14,3 +14,3 @@ import { Address } from "@rarible/types"; | ||
owners?: Array<Address>; | ||
royalties: Array<Part>; | ||
royalties?: Array<Part>; | ||
lastUpdatedAt?: string; | ||
@@ -17,0 +17,0 @@ mintedAt?: string; |
@@ -16,3 +16,3 @@ import { Address } from "@rarible/types"; | ||
owners?: Array<Address>; | ||
royalties: Array<Part>; | ||
royalties?: Array<Part>; | ||
date: string; | ||
@@ -19,0 +19,0 @@ pending: Array<ItemTransfer>; |
@@ -53,5 +53,5 @@ import { Address } from "@rarible/types"; | ||
staticTarget: Address; | ||
target?: Address; | ||
staticExtraData: Binary; | ||
extra: BigNumber; | ||
target?: Address; | ||
}; | ||
@@ -58,0 +58,0 @@ export declare type OrderCryptoPunksData = { |
{ | ||
"name": "@rarible/ethereum-api-client", | ||
"version": "0.1.20", | ||
"version": "0.1.21", | ||
"keywords": [ | ||
@@ -31,4 +31,4 @@ "axios", | ||
"dependencies": { | ||
"@rarible/types": "~0.5.0" | ||
"@rarible/types": "~0.9.2" | ||
} | ||
} |
675515
276
15325
+ Added@rarible/types@0.9.27(transitive)
- Removed@rarible/types@0.5.4(transitive)
Updated@rarible/types@~0.9.2