@xoxno/types 1.0.73 → 1.0.74

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,6 +1,6 @@
1
1
  import { ActivityChain } from '../../../common/enums';
2
2
  import { NftActivityEventSource } from '../../../requests/nft-activity-data/event-source.enum';
3
- import { NftActivityData } from '../../../requests/nft-activity-data/nft-activity-data';
3
+ import { NftActivityData, NftActivityDataHydrated } from '../../../requests/nft-activity-data/nft-activity-data';
4
4
  import { NftActivityType } from '../../../requests/nft-activity-data/nft-activity-type.enum';
5
5
  import { OwnerDto } from '../../../common/owner.dto';
6
6
  declare class NftActivityDocBase {
@@ -11,7 +11,6 @@ declare class NftActivityDocBase {
11
11
  chain: ActivityChain;
12
12
  source: NftActivityEventSource;
13
13
  activityType: NftActivityType;
14
- activityData: NftActivityData;
15
14
  id: string;
16
15
  pk: string;
17
16
  _ts: number;
@@ -20,9 +19,13 @@ declare class NftActivityDocBase {
20
19
  export declare class NftActivityDoc extends NftActivityDocBase {
21
20
  from: string;
22
21
  to: string;
22
+ activityData: NftActivityData;
23
+ constructor(data: Partial<NftActivityDoc>);
23
24
  }
24
25
  export declare class NftActivityDocHydrated extends NftActivityDocBase {
25
26
  from: OwnerDto;
26
27
  to: OwnerDto;
28
+ activityData: NftActivityDataHydrated;
29
+ constructor(data: Partial<NftActivityDoc>);
27
30
  }
28
31
  export {};
@@ -21,7 +21,6 @@ class NftActivityDocBase {
21
21
  this.chain = enums_1.ActivityChain.MVX;
22
22
  Object.assign(this, data);
23
23
  this.id = (0, uuid_1.v4)();
24
- this.pk = this.activityData.collection;
25
24
  this.chain = this.chain || enums_1.ActivityChain.MVX;
26
25
  }
27
26
  }
@@ -78,12 +77,6 @@ __decorate([
78
77
  }),
79
78
  __metadata("design:type", String)
80
79
  ], NftActivityDocBase.prototype, "activityType", void 0);
81
- __decorate([
82
- (0, swagger_1.ApiProperty)({
83
- description: 'Activity data containing details about the NFT transaction or built-in operation',
84
- }),
85
- __metadata("design:type", nft_activity_data_1.NftActivityData)
86
- ], NftActivityDocBase.prototype, "activityData", void 0);
87
80
  __decorate([
88
81
  (0, swagger_1.ApiProperty)({
89
82
  example: 'abc123-def456-ghi789',
@@ -106,6 +99,10 @@ __decorate([
106
99
  __metadata("design:type", Number)
107
100
  ], NftActivityDocBase.prototype, "_ts", void 0);
108
101
  class NftActivityDoc extends NftActivityDocBase {
102
+ constructor(data) {
103
+ super(data);
104
+ this.pk = this.activityData.collection;
105
+ }
109
106
  }
110
107
  exports.NftActivityDoc = NftActivityDoc;
111
108
  __decorate([
@@ -122,6 +119,16 @@ __decorate([
122
119
  }),
123
120
  __metadata("design:type", String)
124
121
  ], NftActivityDoc.prototype, "to", void 0);
122
+ __decorate([
123
+ (0, swagger_1.ApiProperty)({
124
+ description: 'Activity data containing details about the NFT transaction or built-in operation',
125
+ }),
126
+ __metadata("design:type", nft_activity_data_1.NftActivityData)
127
+ ], NftActivityDoc.prototype, "activityData", void 0);
125
128
  class NftActivityDocHydrated extends NftActivityDocBase {
129
+ constructor(data) {
130
+ super(data);
131
+ this.pk = this.activityData.collection;
132
+ }
126
133
  }
127
134
  exports.NftActivityDocHydrated = NftActivityDocHydrated;
@@ -18,7 +18,6 @@ declare class GlobalOfferDocBase {
18
18
  floorPriceMargin?: number;
19
19
  floorPrice?: number;
20
20
  isActive: boolean;
21
- collectionInfo?: Partial<CollectionProfileDoc>;
22
21
  chain: ActivityChain;
23
22
  usdValue?: number;
24
23
  id: string;
@@ -33,6 +32,6 @@ export declare class GlobalOfferDocHydrated extends GlobalOfferDocBase {
33
32
  owner: OwnerDto;
34
33
  floorPrice: number;
35
34
  floorPriceMargin: number;
36
- collectionInfo: Partial<CollectionProfileDoc>;
35
+ collectionInfo: CollectionProfileDoc;
37
36
  }
38
37
  export {};
@@ -14,7 +14,6 @@ const swagger_1 = require("@nestjs/swagger");
14
14
  const enums_1 = require("../../../common/enums");
15
15
  const nft_metadata_attributes_1 = require("../token/nft-metadata-attributes");
16
16
  const dataTypes_1 = require("./dataTypes");
17
- const profile_1 = require("./profile");
18
17
  class GlobalOfferDocBase {
19
18
  constructor(props) {
20
19
  this.dataType = dataTypes_1.CollectionDataType.GlobalOffer;
@@ -126,14 +125,6 @@ __decorate([
126
125
  }),
127
126
  __metadata("design:type", Boolean)
128
127
  ], GlobalOfferDocBase.prototype, "isActive", void 0);
129
- __decorate([
130
- (0, swagger_1.ApiProperty)({
131
- description: 'Collection information (used on user profile offers)',
132
- type: (0, swagger_1.PartialType)(profile_1.CollectionProfileDoc),
133
- required: false,
134
- }),
135
- __metadata("design:type", Object)
136
- ], GlobalOfferDocBase.prototype, "collectionInfo", void 0);
137
128
  __decorate([
138
129
  (0, swagger_1.ApiProperty)({
139
130
  description: 'Blockchain chain',
@@ -67,11 +67,11 @@ export declare class NftHydrated extends NftDocBase {
67
67
  currentOwner?: OwnerDto;
68
68
  owner?: OwnerDto;
69
69
  saleInfo?: NftSaleInfoHydrated;
70
+ collectionInfo: CollectionProfileDoc;
70
71
  balance?: number;
71
72
  balanceLong?: string;
72
73
  unboundDaysLeft?: number;
73
74
  unboundEpoch?: number;
74
- collectionInfo?: Partial<CollectionProfileDoc>;
75
75
  extraProperties?: ExtraProperties;
76
76
  }
77
77
  export {};
@@ -15,6 +15,7 @@ const nft_metadata_1 = require("./nft-metadata");
15
15
  const nft_sale_info_1 = require("./nft-sale-info");
16
16
  const enums_1 = require("../../../common/enums");
17
17
  const swagger_1 = require("@nestjs/swagger");
18
+ const profile_1 = require("../collection/profile");
18
19
  const owner_dto_1 = require("../../../common/owner.dto");
19
20
  // Sale: Check Last Owner nfts from GuestDoc [1,2,3] -> 0 -> Delete GuestDoc > 0: Edit GuestDoc nftIds [1,2]
20
21
  // New Owner: Get GuestDoc -> YES -> nfts insert new ID [0,3] -> NO -> Empty Guest Doc with nfts insert [3]
@@ -394,6 +395,13 @@ __decorate([
394
395
  }),
395
396
  __metadata("design:type", nft_sale_info_1.NftSaleInfoHydrated)
396
397
  ], NftHydrated.prototype, "saleInfo", void 0);
398
+ __decorate([
399
+ (0, swagger_1.ApiProperty)({
400
+ type: profile_1.CollectionProfileDoc,
401
+ description: 'The extra information about the collection of this specific NFT',
402
+ }),
403
+ __metadata("design:type", profile_1.CollectionProfileDoc)
404
+ ], NftHydrated.prototype, "collectionInfo", void 0);
397
405
  __decorate([
398
406
  (0, swagger_1.ApiProperty)({
399
407
  type: Number,
@@ -426,14 +434,6 @@ __decorate([
426
434
  }),
427
435
  __metadata("design:type", Number)
428
436
  ], NftHydrated.prototype, "unboundEpoch", void 0);
429
- __decorate([
430
- (0, swagger_1.ApiProperty)({
431
- type: (swagger_1.PartialType),
432
- required: false,
433
- description: 'The extra information about the collection of this specific NFT',
434
- }),
435
- __metadata("design:type", Object)
436
- ], NftHydrated.prototype, "collectionInfo", void 0);
437
437
  __decorate([
438
438
  (0, swagger_1.ApiProperty)({
439
439
  type: ExtraProperties,
@@ -16,8 +16,6 @@ export declare class NftActivityData {
16
16
  paymentToken: string;
17
17
  price: number;
18
18
  };
19
- nftInfo?: Partial<NftDoc>;
20
- collectionInfo?: Partial<CollectionProfileDoc>;
21
19
  originalTokenAmount?: string;
22
20
  originalTokenAmountShort?: number;
23
21
  originalTokenEgldValue?: number;
@@ -25,6 +23,10 @@ export declare class NftActivityData {
25
23
  originalTokenIdentifier?: string;
26
24
  constructor(props: Partial<NftActivityData>);
27
25
  }
26
+ export declare class NftActivityDataHydrated extends NftActivityData {
27
+ nftInfo: NftDoc;
28
+ collectionInfo: CollectionProfileDoc;
29
+ }
28
30
  export interface NftMvxBuiltIn {
29
31
  collection: string;
30
32
  identifier: string;
@@ -1,9 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NftActivityData = void 0;
3
+ exports.NftActivityDataHydrated = exports.NftActivityData = void 0;
4
4
  class NftActivityData {
5
5
  constructor(props) {
6
6
  Object.assign(this, props);
7
7
  }
8
8
  }
9
9
  exports.NftActivityData = NftActivityData;
10
+ class NftActivityDataHydrated extends NftActivityData {
11
+ }
12
+ exports.NftActivityDataHydrated = NftActivityDataHydrated;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xoxno/types",
3
- "version": "1.0.73",
3
+ "version": "1.0.74",
4
4
  "description": "Shared types and utilities for XOXNO API.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",