@xoxno/types 1.0.38 → 1.0.39

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.
@@ -1,7 +1,8 @@
1
1
  import { ActivityChain } from '../../../common/enums';
2
2
  import { NftProps } from './nft-details.doc';
3
3
  import { TokenDataType } from './token-data.enum';
4
- export declare class NftOfferDoc {
4
+ import { OwnerDto } from '../../../common/owner.dto';
5
+ declare class NftOfferDocBase {
5
6
  dataType: TokenDataType;
6
7
  identifier: string;
7
8
  collection: string;
@@ -14,7 +15,6 @@ export declare class NftOfferDoc {
14
15
  floorPriceMargin?: number;
15
16
  deadline: number;
16
17
  timestamp: number;
17
- owner: string;
18
18
  nftOwner?: string;
19
19
  quantity: number;
20
20
  marketplace: string;
@@ -25,9 +25,14 @@ export declare class NftOfferDoc {
25
25
  _ts: number;
26
26
  constructor(props?: Partial<NftOfferDoc>);
27
27
  }
28
- export declare class NftOfferDocHydrated extends NftOfferDoc {
28
+ export declare class NftOfferDoc extends NftOfferDocBase {
29
+ owner: string;
30
+ }
31
+ export declare class NftOfferDocHydrated extends NftOfferDocBase {
32
+ owner: OwnerDto;
29
33
  usdValue: number;
30
34
  floorPriceMargin: number;
31
35
  floorPrice: number;
32
36
  nftInfo: Partial<NftProps>;
33
37
  }
38
+ export {};
@@ -14,7 +14,8 @@ const swagger_1 = require("@nestjs/swagger");
14
14
  const enums_1 = require("../../../common/enums");
15
15
  const nft_details_doc_1 = require("./nft-details.doc");
16
16
  const token_data_enum_1 = require("./token-data.enum");
17
- class NftOfferDoc {
17
+ const owner_dto_1 = require("../../../common/owner.dto");
18
+ class NftOfferDocBase {
18
19
  constructor(props) {
19
20
  this.dataType = token_data_enum_1.TokenDataType.Offer;
20
21
  this.isActive = true;
@@ -26,7 +27,6 @@ class NftOfferDoc {
26
27
  }
27
28
  }
28
29
  }
29
- exports.NftOfferDoc = NftOfferDoc;
30
30
  __decorate([
31
31
  (0, swagger_1.ApiProperty)({
32
32
  example: token_data_enum_1.TokenDataType.Offer,
@@ -34,56 +34,56 @@ __decorate([
34
34
  description: 'Type of token data document',
35
35
  }),
36
36
  __metadata("design:type", String)
37
- ], NftOfferDoc.prototype, "dataType", void 0);
37
+ ], NftOfferDocBase.prototype, "dataType", void 0);
38
38
  __decorate([
39
39
  (0, swagger_1.ApiProperty)({
40
40
  example: 'COLLECTION-1234-5678',
41
41
  description: 'Unique identifier of the NFT',
42
42
  }),
43
43
  __metadata("design:type", String)
44
- ], NftOfferDoc.prototype, "identifier", void 0);
44
+ ], NftOfferDocBase.prototype, "identifier", void 0);
45
45
  __decorate([
46
46
  (0, swagger_1.ApiProperty)({
47
47
  example: 'COLLECTION-1234',
48
48
  description: 'Collection identifier',
49
49
  }),
50
50
  __metadata("design:type", String)
51
- ], NftOfferDoc.prototype, "collection", void 0);
51
+ ], NftOfferDocBase.prototype, "collection", void 0);
52
52
  __decorate([
53
53
  (0, swagger_1.ApiProperty)({
54
54
  example: 1,
55
55
  description: 'Unique offer identifier',
56
56
  }),
57
57
  __metadata("design:type", Number)
58
- ], NftOfferDoc.prototype, "offerId", void 0);
58
+ ], NftOfferDocBase.prototype, "offerId", void 0);
59
59
  __decorate([
60
60
  (0, swagger_1.ApiProperty)({
61
61
  example: 'EGLD',
62
62
  description: 'Token identifier used for payment',
63
63
  }),
64
64
  __metadata("design:type", String)
65
- ], NftOfferDoc.prototype, "paymentToken", void 0);
65
+ ], NftOfferDocBase.prototype, "paymentToken", void 0);
66
66
  __decorate([
67
67
  (0, swagger_1.ApiProperty)({
68
68
  example: 0,
69
69
  description: 'Nonce of the payment token (0 for EGLD)',
70
70
  }),
71
71
  __metadata("design:type", Number)
72
- ], NftOfferDoc.prototype, "paymentTokenNonce", void 0);
72
+ ], NftOfferDocBase.prototype, "paymentTokenNonce", void 0);
73
73
  __decorate([
74
74
  (0, swagger_1.ApiProperty)({
75
75
  example: '1000000000000000000',
76
76
  description: 'Offer price in smallest token units as string',
77
77
  }),
78
78
  __metadata("design:type", String)
79
- ], NftOfferDoc.prototype, "price", void 0);
79
+ ], NftOfferDocBase.prototype, "price", void 0);
80
80
  __decorate([
81
81
  (0, swagger_1.ApiProperty)({
82
82
  example: 1.5,
83
83
  description: 'Offer price as a decimal number',
84
84
  }),
85
85
  __metadata("design:type", Number)
86
- ], NftOfferDoc.prototype, "priceShort", void 0);
86
+ ], NftOfferDocBase.prototype, "priceShort", void 0);
87
87
  __decorate([
88
88
  (0, swagger_1.ApiProperty)({
89
89
  example: 150.75,
@@ -91,7 +91,7 @@ __decorate([
91
91
  required: false,
92
92
  }),
93
93
  __metadata("design:type", Number)
94
- ], NftOfferDoc.prototype, "priceUsd", void 0);
94
+ ], NftOfferDocBase.prototype, "priceUsd", void 0);
95
95
  __decorate([
96
96
  (0, swagger_1.ApiProperty)({
97
97
  example: 0.15,
@@ -99,28 +99,21 @@ __decorate([
99
99
  required: false,
100
100
  }),
101
101
  __metadata("design:type", Number)
102
- ], NftOfferDoc.prototype, "floorPriceMargin", void 0);
102
+ ], NftOfferDocBase.prototype, "floorPriceMargin", void 0);
103
103
  __decorate([
104
104
  (0, swagger_1.ApiProperty)({
105
105
  example: 1640995200,
106
106
  description: 'Unix timestamp when the offer expires',
107
107
  }),
108
108
  __metadata("design:type", Number)
109
- ], NftOfferDoc.prototype, "deadline", void 0);
109
+ ], NftOfferDocBase.prototype, "deadline", void 0);
110
110
  __decorate([
111
111
  (0, swagger_1.ApiProperty)({
112
112
  example: 1640995200,
113
113
  description: 'Unix timestamp when the offer was created',
114
114
  }),
115
115
  __metadata("design:type", Number)
116
- ], NftOfferDoc.prototype, "timestamp", void 0);
117
- __decorate([
118
- (0, swagger_1.ApiProperty)({
119
- example: 'erd1qqqqqqqqqqqqqpgqw0t0ef0jdpeva2v7qy7q7qjjfq6yq0wq0w0qjjfq6yq',
120
- description: 'Address of the offer creator',
121
- }),
122
- __metadata("design:type", String)
123
- ], NftOfferDoc.prototype, "owner", void 0);
116
+ ], NftOfferDocBase.prototype, "timestamp", void 0);
124
117
  __decorate([
125
118
  (0, swagger_1.ApiProperty)({
126
119
  example: 'erd1qqqqqqqqqqqqqpgqw0t0ef0jdpeva2v7qy7q7qjjfq6yq0wq0w0qjjfq6yq',
@@ -128,21 +121,21 @@ __decorate([
128
121
  required: false,
129
122
  }),
130
123
  __metadata("design:type", String)
131
- ], NftOfferDoc.prototype, "nftOwner", void 0);
124
+ ], NftOfferDocBase.prototype, "nftOwner", void 0);
132
125
  __decorate([
133
126
  (0, swagger_1.ApiProperty)({
134
127
  example: 1,
135
128
  description: 'Quantity of NFTs being offered for',
136
129
  }),
137
130
  __metadata("design:type", Number)
138
- ], NftOfferDoc.prototype, "quantity", void 0);
131
+ ], NftOfferDocBase.prototype, "quantity", void 0);
139
132
  __decorate([
140
133
  (0, swagger_1.ApiProperty)({
141
134
  example: 'xoxno',
142
135
  description: 'Marketplace where the offer was created',
143
136
  }),
144
137
  __metadata("design:type", String)
145
- ], NftOfferDoc.prototype, "marketplace", void 0);
138
+ ], NftOfferDocBase.prototype, "marketplace", void 0);
146
139
  __decorate([
147
140
  (0, swagger_1.ApiProperty)({
148
141
  example: 123,
@@ -150,14 +143,14 @@ __decorate([
150
143
  required: false,
151
144
  }),
152
145
  __metadata("design:type", Number)
153
- ], NftOfferDoc.prototype, "auctionId", void 0);
146
+ ], NftOfferDocBase.prototype, "auctionId", void 0);
154
147
  __decorate([
155
148
  (0, swagger_1.ApiProperty)({
156
149
  example: true,
157
150
  description: 'Whether the offer is currently active',
158
151
  }),
159
152
  __metadata("design:type", Boolean)
160
- ], NftOfferDoc.prototype, "isActive", void 0);
153
+ ], NftOfferDocBase.prototype, "isActive", void 0);
161
154
  __decorate([
162
155
  (0, swagger_1.ApiProperty)({
163
156
  example: enums_1.ActivityChain.MVX,
@@ -165,24 +158,41 @@ __decorate([
165
158
  description: 'Blockchain network of the offer',
166
159
  }),
167
160
  __metadata("design:type", String)
168
- ], NftOfferDoc.prototype, "chain", void 0);
161
+ ], NftOfferDocBase.prototype, "chain", void 0);
169
162
  __decorate([
170
163
  (0, swagger_1.ApiProperty)({
171
164
  example: 'COLLECTION-1234-5678-1-xoxno-offer',
172
165
  description: 'Unique document identifier',
173
166
  }),
174
167
  __metadata("design:type", String)
175
- ], NftOfferDoc.prototype, "id", void 0);
168
+ ], NftOfferDocBase.prototype, "id", void 0);
176
169
  __decorate([
177
170
  (0, swagger_1.ApiProperty)({
178
171
  example: 1640995200,
179
172
  description: 'Cosmos DB timestamp for document versioning',
180
173
  }),
181
174
  __metadata("design:type", Number)
182
- ], NftOfferDoc.prototype, "_ts", void 0);
183
- class NftOfferDocHydrated extends NftOfferDoc {
175
+ ], NftOfferDocBase.prototype, "_ts", void 0);
176
+ class NftOfferDoc extends NftOfferDocBase {
177
+ }
178
+ exports.NftOfferDoc = NftOfferDoc;
179
+ __decorate([
180
+ (0, swagger_1.ApiProperty)({
181
+ example: 'erd1qqqqqqqqqqqqqpgqw0t0ef0jdpeva2v7qy7q7qjjfq6yq0wq0w0qjjfq6yq',
182
+ description: 'Address of the offer creator',
183
+ }),
184
+ __metadata("design:type", String)
185
+ ], NftOfferDoc.prototype, "owner", void 0);
186
+ class NftOfferDocHydrated extends NftOfferDocBase {
184
187
  }
185
188
  exports.NftOfferDocHydrated = NftOfferDocHydrated;
189
+ __decorate([
190
+ (0, swagger_1.ApiProperty)({
191
+ example: 'erd1qqqqqqqqqqqqqpgqw0t0ef0jdpeva2v7qy7q7qjjfq6yq0wq0w0qjjfq6yq',
192
+ description: 'Address of the offer creator',
193
+ }),
194
+ __metadata("design:type", owner_dto_1.OwnerDto)
195
+ ], NftOfferDocHydrated.prototype, "owner", void 0);
186
196
  __decorate([
187
197
  (0, swagger_1.ApiProperty)({
188
198
  example: 150.75,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xoxno/types",
3
- "version": "1.0.38",
3
+ "version": "1.0.39",
4
4
  "description": "Shared types and utilities for XOXNO API.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",