@rarible/api-client
Advanced tools
Comparing version 0.16.5-alpha.11 to 0.16.5-alpha.12
@@ -13,3 +13,9 @@ /** | ||
import * as runtime from '../runtime'; | ||
import { Ownership, OwnershipIds, Ownerships, UnionApiErrorBadRequest, UnionApiErrorEntityNotFound, UnionApiErrorServerError } from '../models'; | ||
import { Blockchain, CollectionsWithOwnedItems, Ownership, OwnershipIds, Ownerships, UnionApiErrorBadRequest, UnionApiErrorEntityNotFound, UnionApiErrorServerError } from '../models'; | ||
export interface GetCollectionsWithOwnedItemsRequest { | ||
owners: Array<string>; | ||
blockchains?: Array<Blockchain>; | ||
continuation?: string; | ||
size?: number; | ||
} | ||
export interface GetOwnershipByIdRequest { | ||
@@ -36,2 +42,12 @@ ownershipId: string; | ||
/** | ||
* Returns list of collection with owned items by specified owner | ||
* Get collections owned items by owner | ||
*/ | ||
getCollectionsWithOwnedItemsRaw(requestParameters: GetCollectionsWithOwnedItemsRequest): Promise<GetCollectionsWithOwnedItemsResponse>; | ||
/** | ||
* Returns list of collection with owned items by specified owner | ||
* Get collections owned items by owner | ||
*/ | ||
getCollectionsWithOwnedItems(requestParameters: GetCollectionsWithOwnedItemsRequest): Promise<CollectionsWithOwnedItems>; | ||
/** | ||
* Returns Ownership by Id | ||
@@ -77,2 +93,15 @@ * Get NFT Ownership by Id | ||
} | ||
export type GetCollectionsWithOwnedItems200 = { | ||
status: 200; | ||
value: CollectionsWithOwnedItems; | ||
}; | ||
export type GetCollectionsWithOwnedItems400 = { | ||
status: 400; | ||
value: UnionApiErrorBadRequest; | ||
}; | ||
export type GetCollectionsWithOwnedItems500 = { | ||
status: 500; | ||
value: UnionApiErrorServerError; | ||
}; | ||
export type GetCollectionsWithOwnedItemsResponse = GetCollectionsWithOwnedItems200 | GetCollectionsWithOwnedItems400 | GetCollectionsWithOwnedItems500; | ||
export type GetOwnershipById200 = { | ||
@@ -79,0 +108,0 @@ status: 200; |
@@ -101,2 +101,89 @@ "use strict"; | ||
/** | ||
* Returns list of collection with owned items by specified owner | ||
* Get collections owned items by owner | ||
*/ | ||
OwnershipControllerApi.prototype.getCollectionsWithOwnedItemsRaw = function (requestParameters) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
var queryParameters, headerParameters, response; | ||
var _a, _b, _c; | ||
return __generator(this, function (_d) { | ||
switch (_d.label) { | ||
case 0: | ||
if (requestParameters.owners === null || requestParameters.owners === undefined) { | ||
throw new runtime.RequiredError('owners', 'Required parameter requestParameters.owners was null or undefined when calling getCollectionsWithOwnedItems.'); | ||
} | ||
queryParameters = {}; | ||
if (requestParameters.owners) { | ||
queryParameters['owners'] = requestParameters.owners; | ||
} | ||
if (requestParameters.blockchains) { | ||
queryParameters['blockchains'] = requestParameters.blockchains; | ||
} | ||
if (requestParameters.continuation !== undefined) { | ||
queryParameters['continuation'] = requestParameters.continuation; | ||
} | ||
if (requestParameters.size !== undefined) { | ||
queryParameters['size'] = requestParameters.size; | ||
} | ||
headerParameters = {}; | ||
if (this.configuration && this.configuration.apiKey) { | ||
headerParameters["X-API-KEY"] = this.configuration.apiKey("X-API-KEY"); // ApiKeyAuth authentication | ||
} | ||
return [4 /*yield*/, this.request({ | ||
path: "/v0.1/ownerships/collections", | ||
method: 'GET', | ||
headers: headerParameters, | ||
query: queryParameters, | ||
})]; | ||
case 1: | ||
response = _d.sent(); | ||
if (!(response.status === 200)) return [3 /*break*/, 3]; | ||
_a = { | ||
status: 200 | ||
}; | ||
return [4 /*yield*/, response.json()]; | ||
case 2: return [2 /*return*/, (_a.value = _d.sent(), | ||
_a)]; | ||
case 3: | ||
if (!(response.status === 400)) return [3 /*break*/, 5]; | ||
_b = { | ||
status: 400 | ||
}; | ||
return [4 /*yield*/, response.json()]; | ||
case 4: return [2 /*return*/, (_b.value = _d.sent(), | ||
_b)]; | ||
case 5: | ||
if (!(response.status === 500)) return [3 /*break*/, 7]; | ||
_c = { | ||
status: 500 | ||
}; | ||
return [4 /*yield*/, response.json()]; | ||
case 6: return [2 /*return*/, (_c.value = _d.sent(), | ||
_c)]; | ||
case 7: throw response; | ||
} | ||
}); | ||
}); | ||
}; | ||
/** | ||
* Returns list of collection with owned items by specified owner | ||
* Get collections owned items by owner | ||
*/ | ||
OwnershipControllerApi.prototype.getCollectionsWithOwnedItems = 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.getCollectionsWithOwnedItemsRaw(requestParameters)]; | ||
case 1: | ||
response = _a.sent(); | ||
if (response.status === 200) { | ||
return [2 /*return*/, response.value]; | ||
} | ||
throw response; | ||
} | ||
}); | ||
}); | ||
}; | ||
/** | ||
* Returns Ownership by Id | ||
@@ -103,0 +190,0 @@ * Get NFT Ownership by Id |
@@ -23,3 +23,9 @@ export declare enum Blockchain { | ||
OASYS = "OASYS", | ||
QUAI = "QUAI" | ||
QUAI = "QUAI", | ||
ECLIPSE = "ECLIPSE", | ||
SAAKURU = "SAAKURU", | ||
OASIS = "OASIS", | ||
PALM = "PALM", | ||
MATCH = "MATCH", | ||
FIVIRE = "FIVIRE" | ||
} |
@@ -28,2 +28,8 @@ "use strict"; | ||
Blockchain["QUAI"] = "QUAI"; | ||
Blockchain["ECLIPSE"] = "ECLIPSE"; | ||
Blockchain["SAAKURU"] = "SAAKURU"; | ||
Blockchain["OASIS"] = "OASIS"; | ||
Blockchain["PALM"] = "PALM"; | ||
Blockchain["MATCH"] = "MATCH"; | ||
Blockchain["FIVIRE"] = "FIVIRE"; | ||
})(Blockchain = exports.Blockchain || (exports.Blockchain = {})); |
@@ -23,5 +23,7 @@ export * from "./ItemCollection"; | ||
export * from "./EthSeaportOrderType"; | ||
export * from "./ItemTraitProperty"; | ||
export * from "./CollectionTokenId"; | ||
export * from "./Currency"; | ||
export * from "./Royalty"; | ||
export * from "./CollectionsWithOwnedItems"; | ||
export * from "./ActivitySearchRequest"; | ||
@@ -60,2 +62,3 @@ export * from "./SubscriptionEvent"; | ||
export * from "./SignatureInput"; | ||
export * from "./CollectionWithOwnedItems"; | ||
export * from "./UnionApiErrorEntityNotFound"; | ||
@@ -62,0 +65,0 @@ export * from "./OwnershipSearchFilter"; |
@@ -39,5 +39,7 @@ "use strict"; | ||
__exportStar(require("./EthSeaportOrderType"), exports); | ||
__exportStar(require("./ItemTraitProperty"), exports); | ||
__exportStar(require("./CollectionTokenId"), exports); | ||
__exportStar(require("./Currency"), exports); | ||
__exportStar(require("./Royalty"), exports); | ||
__exportStar(require("./CollectionsWithOwnedItems"), exports); | ||
__exportStar(require("./ActivitySearchRequest"), exports); | ||
@@ -76,2 +78,3 @@ __exportStar(require("./SubscriptionEvent"), exports); | ||
__exportStar(require("./SignatureInput"), exports); | ||
__exportStar(require("./CollectionWithOwnedItems"), exports); | ||
__exportStar(require("./UnionApiErrorEntityNotFound"), exports); | ||
@@ -78,0 +81,0 @@ __exportStar(require("./OwnershipSearchFilter"), exports); |
import { Blockchain } from "./Blockchain"; | ||
import { CollectionId } from "@rarible/types"; | ||
import { ItemSearchFullText } from "./ItemSearchFullText"; | ||
import { ItemTraitProperty } from "./ItemTraitProperty"; | ||
import { Platform } from "./Platform"; | ||
import { TraitProperty } from "./TraitProperty"; | ||
import { TraitRange } from "./TraitRange"; | ||
@@ -14,3 +14,3 @@ import { UnionAddress } from "@rarible/types"; | ||
fullText?: ItemSearchFullText; | ||
traits?: Array<TraitProperty>; | ||
traits?: Array<ItemTraitProperty>; | ||
traitRanges?: Array<TraitRange>; | ||
@@ -17,0 +17,0 @@ creators?: Array<UnionAddress>; |
{ | ||
"name": "@rarible/api-client", | ||
"version": "0.16.5-alpha.11", | ||
"version": "0.16.5-alpha.12", | ||
"keywords": [ | ||
@@ -5,0 +5,0 @@ "axios", |
544611
278
11778