@dcl/schemas 5.6.0 → 5.7.1-20220805190142.commit-1cece30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dapps/nft.d.ts +7 -2
- package/dist/dapps/nft.d.ts.map +1 -1
- package/dist/dapps/nft.js +4 -0
- package/dist/dapps/nft.js.map +1 -1
- package/dist/dapps/rentals-listings.d.ts +178 -0
- package/dist/dapps/rentals-listings.d.ts.map +1 -0
- package/dist/dapps/rentals-listings.js +110 -0
- package/dist/dapps/rentals-listings.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -1
- package/dist/index.js.map +1 -1
- package/dist/platform/item/emote/emote-category.d.ts +8 -1
- package/dist/platform/item/emote/emote-category.d.ts.map +1 -1
- package/dist/platform/item/emote/emote-category.js +8 -1
- package/dist/platform/item/emote/emote-category.js.map +1 -1
- package/dist/schemas.d.ts +198 -3
- package/package.json +2 -2
package/dist/dapps/nft.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { NFTCategory } from './nft-category';
|
|
|
6
6
|
import { Rarity } from './rarity';
|
|
7
7
|
import { WearableCategory } from './wearable-category';
|
|
8
8
|
import { WearableGender } from './wearable-gender';
|
|
9
|
+
import { RentalsListingsFilterBy } from './rentals-listings';
|
|
9
10
|
export declare type NFT = {
|
|
10
11
|
id: string;
|
|
11
12
|
contractAddress: string;
|
|
@@ -80,13 +81,17 @@ export declare type NFTFilters = {
|
|
|
80
81
|
tokenId?: string;
|
|
81
82
|
itemId?: string;
|
|
82
83
|
network?: Network;
|
|
83
|
-
}
|
|
84
|
+
} & Pick<RentalsListingsFilterBy, 'tenant' | 'status'>;
|
|
84
85
|
export declare enum NFTSortBy {
|
|
85
86
|
NAME = "name",
|
|
86
87
|
NEWEST = "newest",
|
|
87
88
|
RECENTLY_LISTED = "recently_listed",
|
|
88
89
|
RECENTLY_SOLD = "recently_sold",
|
|
89
|
-
CHEAPEST = "cheapest"
|
|
90
|
+
CHEAPEST = "cheapest",
|
|
91
|
+
RENTAL_LISTING_DATE = "rental_listing_date",
|
|
92
|
+
RENTAL_DATE = "rented_date",
|
|
93
|
+
MAX_RENTAL_PRICE = "max_rental_price",
|
|
94
|
+
MIN_RENTAL_PRICE = "min_rental_price"
|
|
90
95
|
}
|
|
91
96
|
export declare namespace NFT {
|
|
92
97
|
const schema: JSONSchema<NFT>;
|
package/dist/dapps/nft.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nft.d.ts","sourceRoot":"","sources":["../../src/dapps/nft.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EACV,gBAAgB,EACjB,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AACpC,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"nft.d.ts","sourceRoot":"","sources":["../../src/dapps/nft.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EACV,gBAAgB,EACjB,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AACpC,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAC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AS;IACnB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,eAAe,oBAAoB;IACnC,aAAa,kBAAkB;IAC/B,QAAQ,aAAa;IACrB,mBAAmB,wBAAwB;IAC3C,WAAW,gBAAgB;IAC3B,gBAAgB,qBAAqB;IACrC,gBAAgB,qBAAqB;CACtC;AAED,yBAAiB,GAAG,CAAC;IACZ,MAAM,MAAM,EAAE,UAAU,CAAC,GAAG,CAyLlC,CAAA;IAEM,MAAM,QAAQ,EAAE,gBAAgB,CAAC,GAAG,CAAiC,CAAA;CAC7E"}
|
package/dist/dapps/nft.js
CHANGED
|
@@ -15,6 +15,10 @@ var NFTSortBy;
|
|
|
15
15
|
NFTSortBy["RECENTLY_LISTED"] = "recently_listed";
|
|
16
16
|
NFTSortBy["RECENTLY_SOLD"] = "recently_sold";
|
|
17
17
|
NFTSortBy["CHEAPEST"] = "cheapest";
|
|
18
|
+
NFTSortBy["RENTAL_LISTING_DATE"] = "rental_listing_date";
|
|
19
|
+
NFTSortBy["RENTAL_DATE"] = "rented_date";
|
|
20
|
+
NFTSortBy["MAX_RENTAL_PRICE"] = "max_rental_price";
|
|
21
|
+
NFTSortBy["MIN_RENTAL_PRICE"] = "min_rental_price";
|
|
18
22
|
})(NFTSortBy = exports.NFTSortBy || (exports.NFTSortBy = {}));
|
|
19
23
|
var NFT;
|
|
20
24
|
(function (NFT) {
|
package/dist/dapps/nft.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nft.js","sourceRoot":"","sources":["../../src/dapps/nft.ts"],"names":[],"mappings":";;;AAAA,8CAIsB;AACtB,yCAAoC;AACpC,0CAAsD;AACtD,uCAAmC;AACnC,iDAA4C;AAC5C,qCAAiC;AACjC,2DAAsD;
|
|
1
|
+
{"version":3,"file":"nft.js","sourceRoot":"","sources":["../../src/dapps/nft.ts"],"names":[],"mappings":";;;AAAA,8CAIsB;AACtB,yCAAoC;AACpC,0CAAsD;AACtD,uCAAmC;AACnC,iDAA4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YACN,UAAU;YACV,QAAQ;YACR,UAAU;YACV,SAAS;YACT,SAAS;YACT,WAAW;YACX,WAAW;YACX,QAAQ;SACT;KACF,CAAA;IAEY,YAAQ,GAA0B,IAAA,kCAAqB,EAAC,IAAA,MAAM,CAAC,CAAA;AAC9E,CAAC,EA7LgB,GAAG,GAAH,WAAG,KAAH,WAAG,QA6LnB"}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { JSONSchemaType } from 'ajv';
|
|
2
|
+
import { JSONSchema, ValidateFunction } from '../validation';
|
|
3
|
+
import { ChainId } from './chain-id';
|
|
4
|
+
import { Network } from './network';
|
|
5
|
+
import { NFTCategory } from './nft-category';
|
|
6
|
+
/**
|
|
7
|
+
* All the possible rental statuses.
|
|
8
|
+
* (This will be merged into ListingStatus eventually)
|
|
9
|
+
*/
|
|
10
|
+
export declare enum RentalStatus {
|
|
11
|
+
OPEN = "open",
|
|
12
|
+
CANCELLED = "cancelled",
|
|
13
|
+
EXECUTED = "executed"
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* All the possible sort directions.
|
|
17
|
+
*/
|
|
18
|
+
export declare enum RentalsListingSortDirection {
|
|
19
|
+
ASC = "asc",
|
|
20
|
+
DESC = "desc"
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* All the possible NFT categories of a rental listing.
|
|
24
|
+
*/
|
|
25
|
+
export declare enum RentalsListingsFilterByCategory {
|
|
26
|
+
LAND = "land",
|
|
27
|
+
ESTATE = "estate"
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* All the possible parameters that a rental listing can be sorted by.
|
|
31
|
+
*/
|
|
32
|
+
export declare enum RentalsListingsSortBy {
|
|
33
|
+
/** Order by created at of the listing's metadata */
|
|
34
|
+
LAND_CREATION_DATE = "land_creation_date",
|
|
35
|
+
/** Order by created at of the listing */
|
|
36
|
+
RENTAL_LISTING_DATE = "rental_listing_date",
|
|
37
|
+
/** Order by rented at of the listing */
|
|
38
|
+
RENTAL_DATE = "rented_date",
|
|
39
|
+
/** Order by search text of the listing's metadata */
|
|
40
|
+
NAME = "name",
|
|
41
|
+
/** Order by maximum rental price per day of the listing */
|
|
42
|
+
MAX_RENTAL_PRICE = "max_rental_price",
|
|
43
|
+
/** Order by minimum rental price per day of the listing */
|
|
44
|
+
MIN_RENTAL_PRICE = "min_rental_price"
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* All the possible parameters that a rental can be filtered for based on their periods.
|
|
48
|
+
*/
|
|
49
|
+
export declare type RentalsListingsFilterByPeriod = {
|
|
50
|
+
/** The minimum amount of days of the period */
|
|
51
|
+
minDays: number;
|
|
52
|
+
/** The maximum amount of days of the period */
|
|
53
|
+
maxDays: number;
|
|
54
|
+
/** The price per day */
|
|
55
|
+
pricePerDay?: number;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* All the possible parameters that a rental can be filtered for.
|
|
59
|
+
*/
|
|
60
|
+
export declare type RentalsListingsFilterBy = {
|
|
61
|
+
/** The category of the NFT being rented */
|
|
62
|
+
category?: RentalsListingsFilterByCategory;
|
|
63
|
+
/** The blockchain search text of the NFT asset */
|
|
64
|
+
text?: string;
|
|
65
|
+
/** The listing status of the NFT asset rental */
|
|
66
|
+
status?: RentalStatus;
|
|
67
|
+
/** The periods of the rental listings the NFT assets where put for rent */
|
|
68
|
+
periods?: RentalsListingsFilterByPeriod;
|
|
69
|
+
/** The address of the lessor who put the NFT asset for rent */
|
|
70
|
+
lessor?: string;
|
|
71
|
+
/** The address of the tenant who rented the NFT asset */
|
|
72
|
+
tenant?: string;
|
|
73
|
+
/** The token id of the NFT asset that was put for rent */
|
|
74
|
+
tokenId?: string;
|
|
75
|
+
/** The contract address of the NFT asset that was put for rent */
|
|
76
|
+
contractAddresses?: string[];
|
|
77
|
+
/** The network of the NFT that was put for rent */
|
|
78
|
+
network?: Network;
|
|
79
|
+
/** The NFT ids of the NFT assets that were put for rent */
|
|
80
|
+
nftIds?: string[];
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* A rental listing.
|
|
84
|
+
*/
|
|
85
|
+
export declare type RentalListing = {
|
|
86
|
+
/** The ID of the rental listing in the signature server */
|
|
87
|
+
id: string;
|
|
88
|
+
/** The NFT token ID */
|
|
89
|
+
nftId: string;
|
|
90
|
+
/** The category of the NFT being rented */
|
|
91
|
+
category: NFTCategory;
|
|
92
|
+
/** The blockchain search text of the NFT asset */
|
|
93
|
+
searchText: string;
|
|
94
|
+
/** The network where the asset being rented is on */
|
|
95
|
+
network: Network;
|
|
96
|
+
/** The chain id where the asset being rented is on */
|
|
97
|
+
chainId: ChainId;
|
|
98
|
+
/** UTC timestamp in milliseconds since epoch of the signature's expiration */
|
|
99
|
+
expiration: number;
|
|
100
|
+
/** A hex string representation of the rental signature */
|
|
101
|
+
signature: string;
|
|
102
|
+
/** A string representation of the nonces, the first nonce is the contract's nonce, the second one is the signer's nonce and the third is the asset's nonce */
|
|
103
|
+
nonces: string[];
|
|
104
|
+
/** The NFT token id */
|
|
105
|
+
tokenId: string;
|
|
106
|
+
/** The contract address of the NFT */
|
|
107
|
+
contractAddress: string;
|
|
108
|
+
/** The contract address of the rentals contract */
|
|
109
|
+
rentalContractAddress: string;
|
|
110
|
+
/** The address of the lessor */
|
|
111
|
+
lessor: string | null;
|
|
112
|
+
/** The address of the tenant */
|
|
113
|
+
tenant: string | null;
|
|
114
|
+
/** The status of the rental */
|
|
115
|
+
status: RentalStatus;
|
|
116
|
+
/** UTC timestamp in milliseconds since epoch of the time the signature was created */
|
|
117
|
+
createdAt: number;
|
|
118
|
+
/** UTC timestamp in milliseconds since epoch of the time the signature was updated */
|
|
119
|
+
updatedAt: number;
|
|
120
|
+
/** UTC timestamp in milliseconds since epoch of the time the rental started */
|
|
121
|
+
startedAt: number | null;
|
|
122
|
+
/** The periods of the rental */
|
|
123
|
+
periods: RentalListingPeriod[];
|
|
124
|
+
};
|
|
125
|
+
/**
|
|
126
|
+
* A period of a rental listing.
|
|
127
|
+
*/
|
|
128
|
+
export declare type RentalListingPeriod = {
|
|
129
|
+
/** The minimum amount of days of the period */
|
|
130
|
+
minDays: number;
|
|
131
|
+
/** The maximum amount of days of the period */
|
|
132
|
+
maxDays: number;
|
|
133
|
+
/** The price per day */
|
|
134
|
+
pricePerDay: string;
|
|
135
|
+
};
|
|
136
|
+
/**
|
|
137
|
+
* The input that is required to create a rental listing.
|
|
138
|
+
*/
|
|
139
|
+
export declare type RentalListingCreation = {
|
|
140
|
+
/** The network where the asset being rented is on */
|
|
141
|
+
network: Network;
|
|
142
|
+
/** The chain id where the asset being rented is on */
|
|
143
|
+
chainId: ChainId;
|
|
144
|
+
/** UTC timestamp in milliseconds since epoch of the signature's expiration */
|
|
145
|
+
expiration: number;
|
|
146
|
+
/** A hex string representation of the rental signature */
|
|
147
|
+
signature: string;
|
|
148
|
+
/** The NFT token id */
|
|
149
|
+
tokenId: string;
|
|
150
|
+
/** The contract address of the NFT */
|
|
151
|
+
contractAddress: string;
|
|
152
|
+
/** The contract address of the rentals contract */
|
|
153
|
+
rentalContractAddress: string;
|
|
154
|
+
/** A string representation of the nonces, the first nonce is the contract's nonce, the second one is the signer's nonce and the third is the asset's nonce */
|
|
155
|
+
nonces: string[];
|
|
156
|
+
/** The periods of the rental */
|
|
157
|
+
periods: PeriodCreation[];
|
|
158
|
+
};
|
|
159
|
+
/**
|
|
160
|
+
* The input that is required to create a rental listing period.
|
|
161
|
+
*/
|
|
162
|
+
export declare type PeriodCreation = {
|
|
163
|
+
/** The minimum amount of days of the period */
|
|
164
|
+
minDays: number;
|
|
165
|
+
/** The maximum amount of days of the period */
|
|
166
|
+
maxDays: number;
|
|
167
|
+
/** The price per day */
|
|
168
|
+
pricePerDay: string;
|
|
169
|
+
};
|
|
170
|
+
export declare namespace PeriodCreation {
|
|
171
|
+
const schema: JSONSchemaType<PeriodCreation>;
|
|
172
|
+
const validate: ValidateFunction<PeriodCreation>;
|
|
173
|
+
}
|
|
174
|
+
export declare namespace RentalListingCreation {
|
|
175
|
+
const schema: JSONSchema<RentalListingCreation>;
|
|
176
|
+
const validate: ValidateFunction<RentalListingCreation>;
|
|
177
|
+
}
|
|
178
|
+
//# sourceMappingURL=rentals-listings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rentals-listings.d.ts","sourceRoot":"","sources":["../../src/dapps/rentals-listings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,KAAK,CAAA;AACpC,OAAO,EAEL,UAAU,EACV,gBAAgB,EACjB,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAE5C;;;GAGG;AACH,oBAAY,YAAY;IACtB,IAAI,SAAS;IACb,SAAS,cAAc;IACvB,QAAQ,aAAa;CACtB;AAED;;GAEG;AACH,oBAAY,2BAA2B;IACrC,GAAG,QAAQ;IACX,IAAI,SAAS;CACd;AAED;;GAEG;AACH,oBAAY,+BAA+B;IACzC,IAAI,SAAS;IACb,MAAM,WAAW;CAClB;AAED;;GAEG;AACH,oBAAY,qBAAqB;IAC/B,oDAAoD;IACpD,kBAAkB,uBAAuB;IACzC,yCAAyC;IACzC,mBAAmB,wBAAwB;IAC3C,wCAAwC;IACxC,WAAW,gBAAgB;IAC3B,qDAAqD;IACrD,IAAI,SAAS;IACb,2DAA2D;IAC3D,gBAAgB,qBAAqB;IACrC,2DAA2D;IAC3D,gBAAgB,qBAAqB;CACtC;AAED;;GAEG;AACH,oBAAY,6BAA6B,GAAG;IAC1C,+CAA+C;IAC/C,OAAO,EAAE,MAAM,CAAA;IACf,+CAA+C;IAC/C,OAAO,EAAE,MAAM,CAAA;IACf,wBAAwB;IACxB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAED;;GAEG;AACH,oBAA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B,CAAC,cAAc,CACvB,CAAA;CAChC;AAED,yBAAiB,qBAAqB,CAAC;IAC9B,MAAM,MAAM,EAAE,UAAU,CAAC,qBAAqB,CAwCpD,CAAA;IACM,MAAM,QAAQ,EAAE,gBAAgB,CAAC,qBAAqB,CAC9B,CAAA;CAChC"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RentalListingCreation = exports.PeriodCreation = exports.RentalsListingsSortBy = exports.RentalsListingsFilterByCategory = exports.RentalsListingSortDirection = exports.RentalStatus = void 0;
|
|
4
|
+
const validation_1 = require("../validation");
|
|
5
|
+
const chain_id_1 = require("./chain-id");
|
|
6
|
+
const network_1 = require("./network");
|
|
7
|
+
/**
|
|
8
|
+
* All the possible rental statuses.
|
|
9
|
+
* (This will be merged into ListingStatus eventually)
|
|
10
|
+
*/
|
|
11
|
+
var RentalStatus;
|
|
12
|
+
(function (RentalStatus) {
|
|
13
|
+
RentalStatus["OPEN"] = "open";
|
|
14
|
+
RentalStatus["CANCELLED"] = "cancelled";
|
|
15
|
+
RentalStatus["EXECUTED"] = "executed";
|
|
16
|
+
})(RentalStatus = exports.RentalStatus || (exports.RentalStatus = {}));
|
|
17
|
+
/**
|
|
18
|
+
* All the possible sort directions.
|
|
19
|
+
*/
|
|
20
|
+
var RentalsListingSortDirection;
|
|
21
|
+
(function (RentalsListingSortDirection) {
|
|
22
|
+
RentalsListingSortDirection["ASC"] = "asc";
|
|
23
|
+
RentalsListingSortDirection["DESC"] = "desc";
|
|
24
|
+
})(RentalsListingSortDirection = exports.RentalsListingSortDirection || (exports.RentalsListingSortDirection = {}));
|
|
25
|
+
/**
|
|
26
|
+
* All the possible NFT categories of a rental listing.
|
|
27
|
+
*/
|
|
28
|
+
var RentalsListingsFilterByCategory;
|
|
29
|
+
(function (RentalsListingsFilterByCategory) {
|
|
30
|
+
RentalsListingsFilterByCategory["LAND"] = "land";
|
|
31
|
+
RentalsListingsFilterByCategory["ESTATE"] = "estate";
|
|
32
|
+
})(RentalsListingsFilterByCategory = exports.RentalsListingsFilterByCategory || (exports.RentalsListingsFilterByCategory = {}));
|
|
33
|
+
/**
|
|
34
|
+
* All the possible parameters that a rental listing can be sorted by.
|
|
35
|
+
*/
|
|
36
|
+
var RentalsListingsSortBy;
|
|
37
|
+
(function (RentalsListingsSortBy) {
|
|
38
|
+
/** Order by created at of the listing's metadata */
|
|
39
|
+
RentalsListingsSortBy["LAND_CREATION_DATE"] = "land_creation_date";
|
|
40
|
+
/** Order by created at of the listing */
|
|
41
|
+
RentalsListingsSortBy["RENTAL_LISTING_DATE"] = "rental_listing_date";
|
|
42
|
+
/** Order by rented at of the listing */
|
|
43
|
+
RentalsListingsSortBy["RENTAL_DATE"] = "rented_date";
|
|
44
|
+
/** Order by search text of the listing's metadata */
|
|
45
|
+
RentalsListingsSortBy["NAME"] = "name";
|
|
46
|
+
/** Order by maximum rental price per day of the listing */
|
|
47
|
+
RentalsListingsSortBy["MAX_RENTAL_PRICE"] = "max_rental_price";
|
|
48
|
+
/** Order by minimum rental price per day of the listing */
|
|
49
|
+
RentalsListingsSortBy["MIN_RENTAL_PRICE"] = "min_rental_price";
|
|
50
|
+
})(RentalsListingsSortBy = exports.RentalsListingsSortBy || (exports.RentalsListingsSortBy = {}));
|
|
51
|
+
var PeriodCreation;
|
|
52
|
+
(function (PeriodCreation) {
|
|
53
|
+
PeriodCreation.schema = {
|
|
54
|
+
type: 'object',
|
|
55
|
+
properties: {
|
|
56
|
+
minDays: { type: 'integer', minimum: 0, maximum: 2147483647 },
|
|
57
|
+
maxDays: { type: 'integer', minimum: 0, maximum: 2147483647 },
|
|
58
|
+
pricePerDay: { type: 'string', pattern: '^[0-9]+$' }
|
|
59
|
+
},
|
|
60
|
+
additionalProperties: false,
|
|
61
|
+
required: ['minDays', 'maxDays', 'pricePerDay']
|
|
62
|
+
};
|
|
63
|
+
PeriodCreation.validate = (0, validation_1.generateLazyValidator)(PeriodCreation.schema);
|
|
64
|
+
})(PeriodCreation = exports.PeriodCreation || (exports.PeriodCreation = {}));
|
|
65
|
+
var RentalListingCreation;
|
|
66
|
+
(function (RentalListingCreation) {
|
|
67
|
+
RentalListingCreation.schema = {
|
|
68
|
+
type: 'object',
|
|
69
|
+
properties: {
|
|
70
|
+
network: network_1.Network.schema,
|
|
71
|
+
chainId: chain_id_1.ChainId.schema,
|
|
72
|
+
expiration: { type: 'number', minimum: 0 },
|
|
73
|
+
signature: { type: 'string', minLength: 1 },
|
|
74
|
+
tokenId: { type: 'string', minLength: 1 },
|
|
75
|
+
nonces: {
|
|
76
|
+
type: 'array',
|
|
77
|
+
minItems: 3,
|
|
78
|
+
maxItems: 3,
|
|
79
|
+
items: {
|
|
80
|
+
minLength: 1,
|
|
81
|
+
type: 'string',
|
|
82
|
+
pattern: '^[0-9]+$'
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
contractAddress: { type: 'string', pattern: '^0x[a-fA-F0-9]{40}$' },
|
|
86
|
+
rentalContractAddress: { type: 'string', pattern: '^0x[a-fA-F0-9]{40}$' },
|
|
87
|
+
periods: {
|
|
88
|
+
type: 'array',
|
|
89
|
+
minItems: 1,
|
|
90
|
+
maxItems: 100,
|
|
91
|
+
uniqueItems: true,
|
|
92
|
+
items: PeriodCreation.schema
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
additionalProperties: false,
|
|
96
|
+
required: [
|
|
97
|
+
'network',
|
|
98
|
+
'chainId',
|
|
99
|
+
'expiration',
|
|
100
|
+
'signature',
|
|
101
|
+
'nonces',
|
|
102
|
+
'tokenId',
|
|
103
|
+
'contractAddress',
|
|
104
|
+
'rentalContractAddress',
|
|
105
|
+
'periods'
|
|
106
|
+
]
|
|
107
|
+
};
|
|
108
|
+
RentalListingCreation.validate = (0, validation_1.generateLazyValidator)(RentalListingCreation.schema);
|
|
109
|
+
})(RentalListingCreation = exports.RentalListingCreation || (exports.RentalListingCreation = {}));
|
|
110
|
+
//# sourceMappingURL=rentals-listings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rentals-listings.js","sourceRoot":"","sources":["../../src/dapps/rentals-listings.ts"],"names":[],"mappings":";;;AACA,8CAIsB;AACtB,yCAAoC;AACpC,uCAAmC;AAGnC;;;GAGG;AACH,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,6BAAa,CAAA;IACb,uCAAuB,CAAA;IACvB,qCAAqB,CAAA;AACvB,CAAC,EAJW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAIvB;AAED;;GAEG;AACH,IAAY,2BAGX;AAHD,WAAY,2BAA2B;IACrC,0CAAW,CAAA;IACX,4CAAa,CAAA;AACf,CAAC,EAHW,2BAA2B,GAA3B,mCAA2B,KAA3B,mCAA2B,QAGtC;AAED;;GAEG;AACH,IAAY,+BAGX;AAHD,WAAY,+BAA+B;IACzC,gDAAa,CAAA;IACb,oDAAiB,CAAA;AACnB,CAAC,EAHW,+BAA+B,GAA/B,uCAA+B,KAA/B,uCAA+B,QAG1C;AAED;;GAEG;AACH,IAAY,qBAaX;AAbD,WAAY,qBAAqB;IAC/B,oDAAoD;IACpD,kEAAyC,CAAA;IACzC,yCAAyC;IACzC,oEAA2C,CAAA;IAC3C,wCAAwC;IACxC,oDAA2B,CAAA;IAC3B,qDAAqD;IACrD,sCAAa,CAAA;IACb,2DAA2D;IAC3D,8DAAqC,CAAA;IACrC,2DAA2D;IAC3D,8DAAqC,CAAA;AACvC,CAAC,EAbW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAahC;AAoID,IAAiB,cAAc,CAc9B;AAdD,WAAiB,cAAc;IAChB,qBAAM,GAAmC;QACpD,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE;YAC7D,OAAO,EAAE,EAAE,IAAI,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WAAW,EAAE,IAAI;gBACjB,KAAK,EAAE,cAAc,CAAC,MAAM;aAC7B;SACF;QACD,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE;YACR,SAAS;YACT,SAAS;YACT,YAAY;YACZ,WAAW;YACX,QAAQ;YACR,SAAS;YACT,iBAAiB;YACjB,uBAAuB;YACvB,SAAS;SACV;KACF,CAAA;IACY,8BAAQ,GACnB,IAAA,kCAAqB,EAAC,sBAAA,MAAM,CAAC,CAAA;AACjC,CAAC,EA5CgB,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QA4CrC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export { ProviderType } from './dapps/provider-type';
|
|
|
18
18
|
export { Rarity } from './dapps/rarity';
|
|
19
19
|
export { SaleType } from './dapps/sale-type';
|
|
20
20
|
export { Sale, SaleFilters, SaleSortBy } from './dapps/sale';
|
|
21
|
+
export { RentalStatus, RentalsListingSortDirection, RentalsListingsFilterByCategory, RentalsListingsSortBy, RentalsListingsFilterByPeriod, RentalsListingsFilterBy, RentalListing, RentalListingPeriod, RentalListingCreation, PeriodCreation } from './dapps/rentals-listings';
|
|
21
22
|
export { AnalyticsDayData, AnalyticsDayDataFilters, AnalyticsDayDataSortBy } from './dapps/analyticsDayData';
|
|
22
23
|
export { Store } from './dapps/store';
|
|
23
24
|
export { WearableCategory } from './dapps/wearable-category';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,OAAO,CAAA;AAG5B,cAAc,cAAc,CAAA;AAG5B,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACxD,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AACxE,OAAO,EAAE,OAAO,EAAE,Y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Aa,CAAA;AACxD,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC5D,OAAO,EACL,YAAY,EACZ,2BAA2B,EAC3B,+BAA+B,EAC/B,qBAAqB,EACrB,6BAA6B,EAC7B,uBAAuB,EACvB,aAAa,EACb,mBAAmB,EACnB,qBAAqB,EACrB,cAAc,EACf,MAAM,0BAA0B,CAAA;AACjC,OAAO,EACL,gBAAgB,EAChB,uBAAuB,EACvB,sBAAsB,EACvB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,EACL,KAAK,EACL,eAAe,EACf,QAAQ,EACR,mBAAmB,EACpB,MAAM,eAAe,CAAA;AACtB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,YAAY,CAAA;AAC1B,cAAc,QAAQ,CAAA;AACtB,cAAc,mBAAmB,CAAA;AACjC,cAAc,wBAAwB,CAAA;AACtC,OAAO,EAAE,GAAG,EAAE,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -26,7 +26,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
26
26
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.sdk = exports.isInsideWorldLimits = exports.getWorld = exports.World = exports.WearableGender = exports.WearableCategory = exports.Store = exports.AnalyticsDayDataSortBy = exports.SaleSortBy = exports.Sale = exports.SaleType = exports.Rarity = exports.ProviderType = exports.OrderSortBy = exports.Order = exports.NFTSortBy = exports.NFT = exports.NFTCategory = exports.Network = exports.MintSortBy = exports.Mint = exports.MetaTransaction = exports.ListingStatus = exports.ItemSortBy = exports.Item = exports.ContractSortBy = exports.Contract = exports.CollectionSortBy = exports.Collection = exports.getChainId = exports.ChainName = exports.getURNProtocol = exports.getChainName = exports.ChainId = exports.AccountSortBy = exports.Account = exports.BidSortBy = exports.Bid = void 0;
|
|
29
|
+
exports.sdk = exports.isInsideWorldLimits = exports.getWorld = exports.World = exports.WearableGender = exports.WearableCategory = exports.Store = exports.AnalyticsDayDataSortBy = exports.PeriodCreation = exports.RentalListingCreation = exports.RentalsListingsSortBy = exports.RentalsListingsFilterByCategory = exports.RentalsListingSortDirection = exports.RentalStatus = exports.SaleSortBy = exports.Sale = exports.SaleType = exports.Rarity = exports.ProviderType = exports.OrderSortBy = exports.Order = exports.NFTSortBy = exports.NFT = exports.NFTCategory = exports.Network = exports.MintSortBy = exports.Mint = exports.MetaTransaction = exports.ListingStatus = exports.ItemSortBy = exports.Item = exports.ContractSortBy = exports.Contract = exports.CollectionSortBy = exports.Collection = exports.getChainId = exports.ChainName = exports.getURNProtocol = exports.getChainName = exports.ChainId = exports.AccountSortBy = exports.Account = exports.BidSortBy = exports.Bid = void 0;
|
|
30
30
|
const sdk = __importStar(require("./sdk"));
|
|
31
31
|
exports.sdk = sdk;
|
|
32
32
|
// export the utils
|
|
@@ -80,6 +80,13 @@ Object.defineProperty(exports, "SaleType", { enumerable: true, get: function ()
|
|
|
80
80
|
var sale_1 = require("./dapps/sale");
|
|
81
81
|
Object.defineProperty(exports, "Sale", { enumerable: true, get: function () { return sale_1.Sale; } });
|
|
82
82
|
Object.defineProperty(exports, "SaleSortBy", { enumerable: true, get: function () { return sale_1.SaleSortBy; } });
|
|
83
|
+
var rentals_listings_1 = require("./dapps/rentals-listings");
|
|
84
|
+
Object.defineProperty(exports, "RentalStatus", { enumerable: true, get: function () { return rentals_listings_1.RentalStatus; } });
|
|
85
|
+
Object.defineProperty(exports, "RentalsListingSortDirection", { enumerable: true, get: function () { return rentals_listings_1.RentalsListingSortDirection; } });
|
|
86
|
+
Object.defineProperty(exports, "RentalsListingsFilterByCategory", { enumerable: true, get: function () { return rentals_listings_1.RentalsListingsFilterByCategory; } });
|
|
87
|
+
Object.defineProperty(exports, "RentalsListingsSortBy", { enumerable: true, get: function () { return rentals_listings_1.RentalsListingsSortBy; } });
|
|
88
|
+
Object.defineProperty(exports, "RentalListingCreation", { enumerable: true, get: function () { return rentals_listings_1.RentalListingCreation; } });
|
|
89
|
+
Object.defineProperty(exports, "PeriodCreation", { enumerable: true, get: function () { return rentals_listings_1.PeriodCreation; } });
|
|
83
90
|
var analyticsDayData_1 = require("./dapps/analyticsDayData");
|
|
84
91
|
Object.defineProperty(exports, "AnalyticsDayDataSortBy", { enumerable: true, get: function () { return analyticsDayData_1.AnalyticsDayDataSortBy; } });
|
|
85
92
|
var store_1 = require("./dapps/store");
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA4B;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA4B;AA2DnB,kBAAG;AAzDZ,mBAAmB;AACnB,+CAA4B;AAE5B,uBAAuB;AACvB,mCAAwD;AAA/C,0FAAA,GAAG,OAAA;AAAc,gGAAA,SAAS,OAAA;AACnC,2CAAwE;AAA/D,kGAAA,OAAO,OAAA;AAAkB,wGAAA,aAAa,OAAA;AAC/C,6CAAwE;AAA/D,mGAAA,OAAO,OAAA;AAAE,wG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JpB,8FAAA,KAAK,OAAA;AAEL,iGAAA,QAAQ,OAAA;AACR,4GAAA,mBAAmB,OAAA;AAErB,kDAA+B;AAC/B,6CAA0B;AAC1B,yCAAsB;AACtB,oDAAiC;AACjC,yDAAsC"}
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { JSONSchema, ValidateFunction } from '../../../validation';
|
|
2
2
|
export declare enum EmoteCategory {
|
|
3
|
-
|
|
3
|
+
DANCE = "dance",
|
|
4
|
+
STUNT = "stunt",
|
|
5
|
+
GREETINGS = "greetings",
|
|
6
|
+
FUN = "fun",
|
|
7
|
+
POSES = "poses",
|
|
8
|
+
REACTIONS = "reactions",
|
|
9
|
+
HORROR = "horror",
|
|
10
|
+
MISCELLANEOUS = "miscellaneous"
|
|
4
11
|
}
|
|
5
12
|
export declare namespace EmoteCategory {
|
|
6
13
|
const schema: JSONSchema<EmoteCategory>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emote-category.d.ts","sourceRoot":"","sources":["../../../../src/platform/item/emote/emote-category.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EACV,gBAAgB,EACjB,MAAM,qBAAqB,CAAA;AAE5B,oBAAY,aAAa;IACvB,MAAM,WAAW;
|
|
1
|
+
{"version":3,"file":"emote-category.d.ts","sourceRoot":"","sources":["../../../../src/platform/item/emote/emote-category.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EACV,gBAAgB,EACjB,MAAM,qBAAqB,CAAA;AAE5B,oBAAY,aAAa;IACvB,KAAK,UAAU;IACf,KAAK,UAAU;IACf,SAAS,cAAc;IACvB,GAAG,QAAQ;IACX,KAAK,UAAU;IACf,SAAS,cAAc;IACvB,MAAM,WAAW;IACjB,aAAa,kBAAkB;CAChC;AAED,yBAAiB,aAAa,CAAC;IACtB,MAAM,MAAM,EAAE,UAAU,CAAC,aAAa,CAG5C,CAAA;IAEM,MAAM,QAAQ,EAAE,gBAAgB,CAAC,aAAa,CACtB,CAAA;CAChC"}
|
|
@@ -4,7 +4,14 @@ exports.EmoteCategory = void 0;
|
|
|
4
4
|
const validation_1 = require("../../../validation");
|
|
5
5
|
var EmoteCategory;
|
|
6
6
|
(function (EmoteCategory) {
|
|
7
|
-
EmoteCategory["
|
|
7
|
+
EmoteCategory["DANCE"] = "dance";
|
|
8
|
+
EmoteCategory["STUNT"] = "stunt";
|
|
9
|
+
EmoteCategory["GREETINGS"] = "greetings";
|
|
10
|
+
EmoteCategory["FUN"] = "fun";
|
|
11
|
+
EmoteCategory["POSES"] = "poses";
|
|
12
|
+
EmoteCategory["REACTIONS"] = "reactions";
|
|
13
|
+
EmoteCategory["HORROR"] = "horror";
|
|
14
|
+
EmoteCategory["MISCELLANEOUS"] = "miscellaneous";
|
|
8
15
|
})(EmoteCategory = exports.EmoteCategory || (exports.EmoteCategory = {}));
|
|
9
16
|
(function (EmoteCategory) {
|
|
10
17
|
EmoteCategory.schema = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emote-category.js","sourceRoot":"","sources":["../../../../src/platform/item/emote/emote-category.ts"],"names":[],"mappings":";;;AAAA,oDAI4B;AAE5B,IAAY,
|
|
1
|
+
{"version":3,"file":"emote-category.js","sourceRoot":"","sources":["../../../../src/platform/item/emote/emote-category.ts"],"names":[],"mappings":";;;AAAA,oDAI4B;AAE5B,IAAY,aASX;AATD,WAAY,aAAa;IACvB,gCAAe,CAAA;IACf,gCAAe,CAAA;IACf,wCAAuB,CAAA;IACvB,4BAAW,CAAA;IACX,gCAAe,CAAA;IACf,wCAAuB,CAAA;IACvB,kCAAiB,CAAA;IACjB,gDAA+B,CAAA;AACjC,CAAC,EATW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QASxB;AAED,WAAiB,aAAa;IACf,oBAAM,GAA8B;QAC/C,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC;KACnC,CAAA;IAEY,sBAAQ,GACnB,IAAA,kCAAqB,EAAC,cAAA,MAAM,CAAC,CAAA;AACjC,CAAC,EARgB,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAQ7B"}
|
package/dist/schemas.d.ts
CHANGED
|
@@ -476,7 +476,14 @@ declare type EmoteADR74 = BaseItem & (StandardProps | ThirdPartyProps) & {
|
|
|
476
476
|
};
|
|
477
477
|
|
|
478
478
|
export declare enum EmoteCategory {
|
|
479
|
-
|
|
479
|
+
DANCE = "dance",
|
|
480
|
+
STUNT = "stunt",
|
|
481
|
+
GREETINGS = "greetings",
|
|
482
|
+
FUN = "fun",
|
|
483
|
+
POSES = "poses",
|
|
484
|
+
REACTIONS = "reactions",
|
|
485
|
+
HORROR = "horror",
|
|
486
|
+
MISCELLANEOUS = "miscellaneous"
|
|
480
487
|
}
|
|
481
488
|
|
|
482
489
|
export declare namespace EmoteCategory {
|
|
@@ -983,14 +990,18 @@ export declare type NFTFilters = {
|
|
|
983
990
|
tokenId?: string;
|
|
984
991
|
itemId?: string;
|
|
985
992
|
network?: Network;
|
|
986
|
-
}
|
|
993
|
+
} & Pick<RentalsListingsFilterBy, 'tenant' | 'status'>;
|
|
987
994
|
|
|
988
995
|
export declare enum NFTSortBy {
|
|
989
996
|
NAME = "name",
|
|
990
997
|
NEWEST = "newest",
|
|
991
998
|
RECENTLY_LISTED = "recently_listed",
|
|
992
999
|
RECENTLY_SOLD = "recently_sold",
|
|
993
|
-
CHEAPEST = "cheapest"
|
|
1000
|
+
CHEAPEST = "cheapest",
|
|
1001
|
+
RENTAL_LISTING_DATE = "rental_listing_date",
|
|
1002
|
+
RENTAL_DATE = "rented_date",
|
|
1003
|
+
MAX_RENTAL_PRICE = "max_rental_price",
|
|
1004
|
+
MIN_RENTAL_PRICE = "min_rental_price"
|
|
994
1005
|
}
|
|
995
1006
|
|
|
996
1007
|
export declare type Order = {
|
|
@@ -1033,6 +1044,23 @@ export declare enum OrderSortBy {
|
|
|
1033
1044
|
CHEAPEST = "cheapest"
|
|
1034
1045
|
}
|
|
1035
1046
|
|
|
1047
|
+
/**
|
|
1048
|
+
* The input that is required to create a rental listing period.
|
|
1049
|
+
*/
|
|
1050
|
+
export declare type PeriodCreation = {
|
|
1051
|
+
/** The minimum amount of days of the period */
|
|
1052
|
+
minDays: number;
|
|
1053
|
+
/** The maximum amount of days of the period */
|
|
1054
|
+
maxDays: number;
|
|
1055
|
+
/** The price per day */
|
|
1056
|
+
pricePerDay: string;
|
|
1057
|
+
};
|
|
1058
|
+
|
|
1059
|
+
export declare namespace PeriodCreation {
|
|
1060
|
+
const schema: JSONSchemaType<PeriodCreation>;
|
|
1061
|
+
const validate: ValidateFunction<PeriodCreation>;
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1036
1064
|
export declare enum PreviewCamera {
|
|
1037
1065
|
STATIC = "static",
|
|
1038
1066
|
INTERACTIVE = "interactive"
|
|
@@ -1288,6 +1316,173 @@ export declare namespace Rarity {
|
|
|
1288
1316
|
export function getGradient(rarity: Rarity): [string, string];
|
|
1289
1317
|
}
|
|
1290
1318
|
|
|
1319
|
+
/**
|
|
1320
|
+
* A rental listing.
|
|
1321
|
+
*/
|
|
1322
|
+
export declare type RentalListing = {
|
|
1323
|
+
/** The ID of the rental listing in the signature server */
|
|
1324
|
+
id: string;
|
|
1325
|
+
/** The NFT token ID */
|
|
1326
|
+
nftId: string;
|
|
1327
|
+
/** The category of the NFT being rented */
|
|
1328
|
+
category: NFTCategory;
|
|
1329
|
+
/** The blockchain search text of the NFT asset */
|
|
1330
|
+
searchText: string;
|
|
1331
|
+
/** The network where the asset being rented is on */
|
|
1332
|
+
network: Network;
|
|
1333
|
+
/** The chain id where the asset being rented is on */
|
|
1334
|
+
chainId: ChainId;
|
|
1335
|
+
/** UTC timestamp in milliseconds since epoch of the signature's expiration */
|
|
1336
|
+
expiration: number;
|
|
1337
|
+
/** A hex string representation of the rental signature */
|
|
1338
|
+
signature: string;
|
|
1339
|
+
/** A string representation of the nonces, the first nonce is the contract's nonce, the second one is the signer's nonce and the third is the asset's nonce */
|
|
1340
|
+
nonces: string[];
|
|
1341
|
+
/** The NFT token id */
|
|
1342
|
+
tokenId: string;
|
|
1343
|
+
/** The contract address of the NFT */
|
|
1344
|
+
contractAddress: string;
|
|
1345
|
+
/** The contract address of the rentals contract */
|
|
1346
|
+
rentalContractAddress: string;
|
|
1347
|
+
/** The address of the lessor */
|
|
1348
|
+
lessor: string | null;
|
|
1349
|
+
/** The address of the tenant */
|
|
1350
|
+
tenant: string | null;
|
|
1351
|
+
/** The status of the rental */
|
|
1352
|
+
status: RentalStatus;
|
|
1353
|
+
/** UTC timestamp in milliseconds since epoch of the time the signature was created */
|
|
1354
|
+
createdAt: number;
|
|
1355
|
+
/** UTC timestamp in milliseconds since epoch of the time the signature was updated */
|
|
1356
|
+
updatedAt: number;
|
|
1357
|
+
/** UTC timestamp in milliseconds since epoch of the time the rental started */
|
|
1358
|
+
startedAt: number | null;
|
|
1359
|
+
/** The periods of the rental */
|
|
1360
|
+
periods: RentalListingPeriod[];
|
|
1361
|
+
};
|
|
1362
|
+
|
|
1363
|
+
/**
|
|
1364
|
+
* The input that is required to create a rental listing.
|
|
1365
|
+
*/
|
|
1366
|
+
export declare type RentalListingCreation = {
|
|
1367
|
+
/** The network where the asset being rented is on */
|
|
1368
|
+
network: Network;
|
|
1369
|
+
/** The chain id where the asset being rented is on */
|
|
1370
|
+
chainId: ChainId;
|
|
1371
|
+
/** UTC timestamp in milliseconds since epoch of the signature's expiration */
|
|
1372
|
+
expiration: number;
|
|
1373
|
+
/** A hex string representation of the rental signature */
|
|
1374
|
+
signature: string;
|
|
1375
|
+
/** The NFT token id */
|
|
1376
|
+
tokenId: string;
|
|
1377
|
+
/** The contract address of the NFT */
|
|
1378
|
+
contractAddress: string;
|
|
1379
|
+
/** The contract address of the rentals contract */
|
|
1380
|
+
rentalContractAddress: string;
|
|
1381
|
+
/** A string representation of the nonces, the first nonce is the contract's nonce, the second one is the signer's nonce and the third is the asset's nonce */
|
|
1382
|
+
nonces: string[];
|
|
1383
|
+
/** The periods of the rental */
|
|
1384
|
+
periods: PeriodCreation[];
|
|
1385
|
+
};
|
|
1386
|
+
|
|
1387
|
+
export declare namespace RentalListingCreation {
|
|
1388
|
+
const schema: JSONSchema<RentalListingCreation>;
|
|
1389
|
+
const validate: ValidateFunction<RentalListingCreation>;
|
|
1390
|
+
}
|
|
1391
|
+
|
|
1392
|
+
/**
|
|
1393
|
+
* A period of a rental listing.
|
|
1394
|
+
*/
|
|
1395
|
+
export declare type RentalListingPeriod = {
|
|
1396
|
+
/** The minimum amount of days of the period */
|
|
1397
|
+
minDays: number;
|
|
1398
|
+
/** The maximum amount of days of the period */
|
|
1399
|
+
maxDays: number;
|
|
1400
|
+
/** The price per day */
|
|
1401
|
+
pricePerDay: string;
|
|
1402
|
+
};
|
|
1403
|
+
|
|
1404
|
+
/**
|
|
1405
|
+
* All the possible parameters that a rental can be filtered for.
|
|
1406
|
+
*/
|
|
1407
|
+
export declare type RentalsListingsFilterBy = {
|
|
1408
|
+
/** The category of the NFT being rented */
|
|
1409
|
+
category?: RentalsListingsFilterByCategory;
|
|
1410
|
+
/** The blockchain search text of the NFT asset */
|
|
1411
|
+
text?: string;
|
|
1412
|
+
/** The listing status of the NFT asset rental */
|
|
1413
|
+
status?: RentalStatus;
|
|
1414
|
+
/** The periods of the rental listings the NFT assets where put for rent */
|
|
1415
|
+
periods?: RentalsListingsFilterByPeriod;
|
|
1416
|
+
/** The address of the lessor who put the NFT asset for rent */
|
|
1417
|
+
lessor?: string;
|
|
1418
|
+
/** The address of the tenant who rented the NFT asset */
|
|
1419
|
+
tenant?: string;
|
|
1420
|
+
/** The token id of the NFT asset that was put for rent */
|
|
1421
|
+
tokenId?: string;
|
|
1422
|
+
/** The contract address of the NFT asset that was put for rent */
|
|
1423
|
+
contractAddresses?: string[];
|
|
1424
|
+
/** The network of the NFT that was put for rent */
|
|
1425
|
+
network?: Network;
|
|
1426
|
+
/** The NFT ids of the NFT assets that were put for rent */
|
|
1427
|
+
nftIds?: string[];
|
|
1428
|
+
};
|
|
1429
|
+
|
|
1430
|
+
/**
|
|
1431
|
+
* All the possible NFT categories of a rental listing.
|
|
1432
|
+
*/
|
|
1433
|
+
export declare enum RentalsListingsFilterByCategory {
|
|
1434
|
+
LAND = "land",
|
|
1435
|
+
ESTATE = "estate"
|
|
1436
|
+
}
|
|
1437
|
+
|
|
1438
|
+
/**
|
|
1439
|
+
* All the possible parameters that a rental can be filtered for based on their periods.
|
|
1440
|
+
*/
|
|
1441
|
+
export declare type RentalsListingsFilterByPeriod = {
|
|
1442
|
+
/** The minimum amount of days of the period */
|
|
1443
|
+
minDays: number;
|
|
1444
|
+
/** The maximum amount of days of the period */
|
|
1445
|
+
maxDays: number;
|
|
1446
|
+
/** The price per day */
|
|
1447
|
+
pricePerDay?: number;
|
|
1448
|
+
};
|
|
1449
|
+
|
|
1450
|
+
/**
|
|
1451
|
+
* All the possible sort directions.
|
|
1452
|
+
*/
|
|
1453
|
+
export declare enum RentalsListingSortDirection {
|
|
1454
|
+
ASC = "asc",
|
|
1455
|
+
DESC = "desc"
|
|
1456
|
+
}
|
|
1457
|
+
|
|
1458
|
+
/**
|
|
1459
|
+
* All the possible parameters that a rental listing can be sorted by.
|
|
1460
|
+
*/
|
|
1461
|
+
export declare enum RentalsListingsSortBy {
|
|
1462
|
+
/** Order by created at of the listing's metadata */
|
|
1463
|
+
LAND_CREATION_DATE = "land_creation_date",
|
|
1464
|
+
/** Order by created at of the listing */
|
|
1465
|
+
RENTAL_LISTING_DATE = "rental_listing_date",
|
|
1466
|
+
/** Order by rented at of the listing */
|
|
1467
|
+
RENTAL_DATE = "rented_date",
|
|
1468
|
+
/** Order by search text of the listing's metadata */
|
|
1469
|
+
NAME = "name",
|
|
1470
|
+
/** Order by maximum rental price per day of the listing */
|
|
1471
|
+
MAX_RENTAL_PRICE = "max_rental_price",
|
|
1472
|
+
/** Order by minimum rental price per day of the listing */
|
|
1473
|
+
MIN_RENTAL_PRICE = "min_rental_price"
|
|
1474
|
+
}
|
|
1475
|
+
|
|
1476
|
+
/**
|
|
1477
|
+
* All the possible rental statuses.
|
|
1478
|
+
* (This will be merged into ListingStatus eventually)
|
|
1479
|
+
*/
|
|
1480
|
+
export declare enum RentalStatus {
|
|
1481
|
+
OPEN = "open",
|
|
1482
|
+
CANCELLED = "cancelled",
|
|
1483
|
+
EXECUTED = "executed"
|
|
1484
|
+
}
|
|
1485
|
+
|
|
1291
1486
|
/** @alpha */
|
|
1292
1487
|
export declare type RepresentationDefinition = Omit<WearableRepresentation, 'contents'> & {
|
|
1293
1488
|
contents: {
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "5.
|
|
2
|
+
"version": "5.7.1-20220805190142.commit-1cece30",
|
|
3
3
|
"name": "@dcl/schemas",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"typings": "./dist/index.d.ts",
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
"files": [
|
|
33
33
|
"dist"
|
|
34
34
|
],
|
|
35
|
-
"commit": "
|
|
35
|
+
"commit": "1cece30131e258f3b2a0b517a5133fd026d20196"
|
|
36
36
|
}
|