Skip to content

Commit dbe8428

Browse files
marketplace v2 update (#797)
1 parent da97b47 commit dbe8428

File tree

1 file changed

+89
-4
lines changed

1 file changed

+89
-4
lines changed

packages/marketplace/src/marketplace.gen.ts

Lines changed: 89 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-disable */
2-
// marketplace-api 3b866b34dc1d85930d40846e76af67657017beb6
2+
// marketplace-api 6b46374337129883386b9668e652237c3b31eda1
33
// --
44
// Code generated by [email protected] with typescript generator. DO NOT EDIT.
55
//
@@ -8,7 +8,7 @@
88
export const WebrpcHeader = 'Webrpc'
99

1010
export const WebrpcHeaderValue =
11-
'[email protected];[email protected];[email protected]3b866b34dc1d85930d40846e76af67657017beb6'
11+
'[email protected];[email protected];[email protected]6b46374337129883386b9668e652237c3b31eda1'
1212

1313
// WebRPC description and code-gen version
1414
export const WebRPCVersion = 'v1'
@@ -17,7 +17,7 @@ export const WebRPCVersion = 'v1'
1717
export const WebRPCSchemaVersion = ''
1818

1919
// Schema hash generated from your RIDL schema
20-
export const WebRPCSchemaHash = '3b866b34dc1d85930d40846e76af67657017beb6'
20+
export const WebRPCSchemaHash = '6b46374337129883386b9668e652237c3b31eda1'
2121

2222
type WebrpcGenVersions = {
2323
webrpcGenVersion: string
@@ -584,7 +584,7 @@ export interface PrimarySaleItem {
584584
priceDecimals: number
585585
priceAmount: string
586586
priceAmountFormatted: string
587-
supplyCap: string
587+
supply: string
588588
createdAt: string
589589
updatedAt: string
590590
deletedAt?: string
@@ -786,6 +786,8 @@ export interface Marketplace {
786786
headers?: object,
787787
signal?: AbortSignal
788788
): Promise<ListOffersForCollectibleReturn>
789+
listListings(args: ListListingsArgs, headers?: object, signal?: AbortSignal): Promise<ListListingsReturn>
790+
listOffers(args: ListOffersArgs, headers?: object, signal?: AbortSignal): Promise<ListOffersReturn>
789791
getCountOfListingsForCollectible(
790792
args: GetCountOfListingsForCollectibleArgs,
791793
headers?: object,
@@ -929,6 +931,7 @@ export interface Marketplace {
929931
headers?: object,
930932
signal?: AbortSignal
931933
): Promise<SupportedMarketplacesReturn>
934+
getPrimarySaleItem(args: GetPrimarySaleItemArgs, headers?: object, signal?: AbortSignal): Promise<GetPrimarySaleItemReturn>
932935
listPrimarySaleItems(
933936
args: ListPrimarySaleItemsArgs,
934937
headers?: object,
@@ -1029,6 +1032,28 @@ export interface ListOffersForCollectibleReturn {
10291032
offers: Array<Order>
10301033
page?: Page
10311034
}
1035+
export interface ListListingsArgs {
1036+
chainId: string
1037+
contractAddress: string
1038+
filter?: OrderFilter
1039+
page?: Page
1040+
}
1041+
1042+
export interface ListListingsReturn {
1043+
listings: Array<Order>
1044+
page?: Page
1045+
}
1046+
export interface ListOffersArgs {
1047+
chainId: string
1048+
contractAddress: string
1049+
filter?: OrderFilter
1050+
page?: Page
1051+
}
1052+
1053+
export interface ListOffersReturn {
1054+
offers: Array<Order>
1055+
page?: Page
1056+
}
10321057
export interface GetCountOfListingsForCollectibleArgs {
10331058
chainId: string
10341059
contractAddress: string
@@ -1320,6 +1345,15 @@ export interface SupportedMarketplacesArgs {
13201345
export interface SupportedMarketplacesReturn {
13211346
marketplaces: Array<MarketplaceKind>
13221347
}
1348+
export interface GetPrimarySaleItemArgs {
1349+
chainId: string
1350+
primarySaleContractAddress: string
1351+
tokenId: string
1352+
}
1353+
1354+
export interface GetPrimarySaleItemReturn {
1355+
item: CollectiblePrimarySaleItem
1356+
}
13231357
export interface ListPrimarySaleItemsArgs {
13241358
chainId: string
13251359
primarySaleContractAddress: string
@@ -1750,6 +1784,38 @@ export class Marketplace implements Marketplace {
17501784
)
17511785
}
17521786

1787+
listListings = (args: ListListingsArgs, headers?: object, signal?: AbortSignal): Promise<ListListingsReturn> => {
1788+
return this.fetch(this.url('ListListings'), createHTTPRequest(args, headers, signal)).then(
1789+
res => {
1790+
return buildResponse(res).then(_data => {
1791+
return {
1792+
listings: <Array<Order>>_data.listings,
1793+
page: <Page>_data.page
1794+
}
1795+
})
1796+
},
1797+
error => {
1798+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1799+
}
1800+
)
1801+
}
1802+
1803+
listOffers = (args: ListOffersArgs, headers?: object, signal?: AbortSignal): Promise<ListOffersReturn> => {
1804+
return this.fetch(this.url('ListOffers'), createHTTPRequest(args, headers, signal)).then(
1805+
res => {
1806+
return buildResponse(res).then(_data => {
1807+
return {
1808+
offers: <Array<Order>>_data.offers,
1809+
page: <Page>_data.page
1810+
}
1811+
})
1812+
},
1813+
error => {
1814+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1815+
}
1816+
)
1817+
}
1818+
17531819
getCountOfListingsForCollectible = (
17541820
args: GetCountOfListingsForCollectibleArgs,
17551821
headers?: object,
@@ -2262,6 +2328,25 @@ export class Marketplace implements Marketplace {
22622328
)
22632329
}
22642330

2331+
getPrimarySaleItem = (
2332+
args: GetPrimarySaleItemArgs,
2333+
headers?: object,
2334+
signal?: AbortSignal
2335+
): Promise<GetPrimarySaleItemReturn> => {
2336+
return this.fetch(this.url('GetPrimarySaleItem'), createHTTPRequest(args, headers, signal)).then(
2337+
res => {
2338+
return buildResponse(res).then(_data => {
2339+
return {
2340+
item: <CollectiblePrimarySaleItem>_data.item
2341+
}
2342+
})
2343+
},
2344+
error => {
2345+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2346+
}
2347+
)
2348+
}
2349+
22652350
listPrimarySaleItems = (
22662351
args: ListPrimarySaleItemsArgs,
22672352
headers?: object,

0 commit comments

Comments
 (0)