@xoxno/types 1.0.6 → 1.0.8

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.
Files changed (114) hide show
  1. package/dist/common/enums.d.ts +0 -21
  2. package/dist/common/enums.js +1 -23
  3. package/dist/common/kusto/wallet-stats.js +1 -0
  4. package/dist/cosmos-db/cosmos-db-generic-filter.d.ts +8 -3
  5. package/dist/cosmos-db/documents/activity/nft-activity.doc.d.ts +3 -3
  6. package/dist/cosmos-db/documents/activity/nft-activity.doc.js +2 -2
  7. package/dist/cosmos-db/documents/notification/notification.doc.d.ts +1 -1
  8. package/dist/cosmos-db/documents/staking/staking-delegator-doc.d.ts +1 -1
  9. package/dist/cosmos-db/documents/staking/staking-delegator-doc.js +1 -1
  10. package/dist/cosmos-db/documents/staking/staking-pool-doc.d.ts +3 -3
  11. package/dist/cosmos-db/documents/staking/staking-pool-doc.js +1 -1
  12. package/dist/cosmos-db/documents/ticketing/event-guest-doc.filter.d.ts +3 -2
  13. package/dist/cosmos-db/documents/ticketing/event-guest-doc.filter.js +1 -1
  14. package/dist/cosmos-db/documents/ticketing/event-guest-registration.dto.d.ts +1 -6
  15. package/dist/cosmos-db/documents/ticketing/event-guest-registration.dto.js +4 -26
  16. package/dist/cosmos-db/documents/ticketing/event-invitation-doc.filter.d.ts +3 -2
  17. package/dist/cosmos-db/documents/ticketing/event-invitation-doc.filter.js +6 -2
  18. package/dist/cosmos-db/documents/ticketing/event-profile-doc.filter.d.ts +3 -2
  19. package/dist/cosmos-db/documents/ticketing/event-profile-doc.filter.js +1 -1
  20. package/dist/cosmos-db/documents/ticketing/event-referral-config-filter.doc.d.ts +3 -2
  21. package/dist/cosmos-db/documents/ticketing/event-referral-config-filter.doc.js +1 -1
  22. package/dist/cosmos-db/documents/ticketing/event-referral-filter.doc.d.ts +3 -2
  23. package/dist/cosmos-db/documents/ticketing/event-referral-filter.doc.js +1 -1
  24. package/dist/cosmos-db/documents/ticketing/event-voucher-filter.doc.d.ts +3 -3
  25. package/dist/cosmos-db/documents/token/nft-extra-metadata.doc.d.ts +1 -1
  26. package/dist/cosmos-db/documents/token/nft-sale-info.d.ts +2 -2
  27. package/dist/cosmos-db/documents/token/nft-sale-info.js +1 -0
  28. package/dist/entities/bober-battle/battle-sc-endpoints.enum.d.ts +14 -0
  29. package/dist/entities/bober-battle/battle-sc-endpoints.enum.js +19 -0
  30. package/dist/entities/bober-battle/battle-sc-event-name.enum.d.ts +9 -0
  31. package/dist/entities/bober-battle/battle-sc-event-name.enum.js +14 -0
  32. package/dist/entities/bober-battle/game-type.d.ts +68 -0
  33. package/dist/entities/delegation-data/delegation-data-output.d.ts +10 -0
  34. package/dist/entities/delegation-data/delegation-data-output.js +2 -0
  35. package/dist/entities/delegation-data/provider-data.d.ts +37 -0
  36. package/dist/entities/delegation-data/provider-data.js +2 -0
  37. package/dist/entities/search-data/collection-data-search.type.d.ts +27 -0
  38. package/dist/entities/search-data/collection-data-search.type.js +2 -0
  39. package/dist/entities/search-data/event-guest-data-search.type.d.ts +12 -0
  40. package/dist/entities/search-data/event-guest-data-search.type.js +2 -0
  41. package/dist/entities/search-data/event-guest-invitation-search.type.d.ts +12 -0
  42. package/dist/entities/search-data/event-guest-invitation-search.type.js +2 -0
  43. package/dist/entities/search-data/filter-query.dto.d.ts +3 -0
  44. package/dist/entities/search-data/filter-query.dto.js +25 -0
  45. package/dist/entities/search-data/nft-data-search.type.d.ts +9 -0
  46. package/dist/entities/search-data/nft-data-search.type.js +2 -0
  47. package/dist/entities/search-data/search-index-name.enum.d.ts +8 -0
  48. package/dist/entities/search-data/search-index-name.enum.js +12 -0
  49. package/dist/entities/search-data/search.dto.d.ts +54 -0
  50. package/dist/entities/search-data/search.dto.js +193 -0
  51. package/dist/entities/search-data/user-data-search.type.d.ts +21 -0
  52. package/dist/entities/search-data/user-data-search.type.js +2 -0
  53. package/dist/entities/staking-data/owned-collections.dto.d.ts +4 -0
  54. package/dist/entities/staking-data/owned-collections.dto.js +35 -0
  55. package/dist/entities/staking-data/owned-services.dto.d.ts +11 -0
  56. package/dist/entities/staking-data/owned-services.dto.js +40 -0
  57. package/dist/entities/staking-data/staking-creator.doc.js +54 -0
  58. package/dist/entities/staking-data/staking-explore.d.ts +9 -0
  59. package/dist/entities/staking-data/staking-explore.js +41 -0
  60. package/dist/entities/staking-data/staking-summary.dto.d.ts +5 -0
  61. package/dist/entities/staking-data/staking-summary.dto.js +133 -0
  62. package/dist/entities/staking-data/user-staking-summary.dto.d.ts +16 -0
  63. package/dist/entities/staking-data/user-staking-summary.dto.js +83 -0
  64. package/dist/entities/token-data/token.dto.d.ts +15 -0
  65. package/dist/entities/token-data/token.dto.js +96 -0
  66. package/dist/entities/token-data/xoxno-liquid-stats.dto.d.ts +14 -0
  67. package/dist/entities/token-data/xoxno-liquid-stats.dto.js +95 -0
  68. package/dist/entities/xoxno-marketplace-sc/xoxno-auction-type.enum.d.ts +14 -0
  69. package/dist/entities/xoxno-marketplace-sc/xoxno-auction-type.enum.js +19 -0
  70. package/dist/index.d.ts +88 -114
  71. package/dist/index.js +88 -126
  72. package/dist/requests/collection/collection-mint-profile.filter.d.ts +2 -1
  73. package/dist/requests/collection/collection-mint-profile.filter.js +1 -1
  74. package/dist/requests/collection/collection-offers.filter.d.ts +3 -2
  75. package/dist/requests/collection/collection-offers.filter.js +1 -1
  76. package/dist/requests/collection/collection-profile.filter.js +1 -1
  77. package/dist/requests/collection/collection-stats.filter.d.ts +3 -2
  78. package/dist/requests/collection/collection-stats.filter.js +1 -1
  79. package/dist/requests/collection/query-activity.d.ts +3 -3
  80. package/dist/requests/collection/query-activity.js +1 -1
  81. package/dist/requests/lending/lending-market-profile.filter.d.ts +3 -2
  82. package/dist/requests/lending/lending-market-profile.filter.js +1 -1
  83. package/dist/requests/nft-activity-data/nft-activity-data.d.ts +4 -3
  84. package/dist/requests/nft-activity-data/nft-activity.filter.d.ts +3 -2
  85. package/dist/requests/nft-activity-data/nft-activity.filter.js +3 -3
  86. package/dist/requests/nft-activity-data/user-stats.d.ts +2 -10
  87. package/dist/requests/nft-activity-data/user-stats.js +3 -40
  88. package/dist/requests/nft-data/nft-doc.filter.d.ts +7 -5
  89. package/dist/requests/nft-data/nft-doc.filter.js +3 -3
  90. package/dist/requests/nft-data/nft-offer-doc.filter.d.ts +3 -2
  91. package/dist/requests/nft-data/nft-offer-doc.filter.js +3 -3
  92. package/dist/requests/nft-data/user-offers.d.ts +2 -16
  93. package/dist/requests/nft-data/user-offers.js +2 -81
  94. package/package.json +2 -2
  95. package/dist/common/kusto/trading-stats.d.ts +0 -28
  96. package/dist/common/kusto/trading-stats.js +0 -35
  97. package/dist/cosmos-db/documents/activity/event-source.enum.d.ts +0 -15
  98. package/dist/cosmos-db/documents/activity/event-source.enum.js +0 -19
  99. package/dist/cosmos-db/documents/activity/nft-activity-data.d.ts +0 -23
  100. package/dist/cosmos-db/documents/activity/nft-activity-type.enum.d.ts +0 -28
  101. package/dist/cosmos-db/documents/activity/nft-activity-type.enum.js +0 -36
  102. package/dist/cosmos-db/documents/staking/staking-creator.js +0 -13
  103. package/dist/cosmos-db/documents/token/nft-extra-attributes.type.d.ts +0 -3
  104. package/dist/cosmos-db/documents/token/nft-extra-attributes.type.js +0 -7
  105. package/dist/entities/token-data/known-mvx-tokens.enum.d.ts +0 -34
  106. package/dist/entities/token-data/known-mvx-tokens.enum.js +0 -32
  107. /package/dist/{cosmos-db/documents/activity/nft-activity-data.js → entities/bober-battle/game-type.js} +0 -0
  108. /package/dist/{cosmos-db/documents/staking/staking-creator.d.ts → entities/staking-data/staking-creator.doc.d.ts} +0 -0
  109. /package/dist/{cosmos-db/documents/staking → entities/staking-data}/staking-data-type.enum.d.ts +0 -0
  110. /package/dist/{cosmos-db/documents/staking → entities/staking-data}/staking-data-type.enum.js +0 -0
  111. /package/dist/{cosmos-db/documents/staking → entities/staking-data}/staking-issuing-type-string.enum.d.ts +0 -0
  112. /package/dist/{cosmos-db/documents/staking → entities/staking-data}/staking-issuing-type-string.enum.js +0 -0
  113. /package/dist/{cosmos-db/documents/staking → entities/staking-data}/staking-pool-type-string.enum.d.ts +0 -0
  114. /package/dist/{cosmos-db/documents/staking → entities/staking-data}/staking-pool-type-string.enum.js +0 -0
@@ -1,13 +1,14 @@
1
1
  import { RangeFilter, CosmosDbGenericFilter } from '../../cosmos-db/cosmos-db-generic-filter';
2
2
  import { CollectionDataType } from '../../cosmos-db/documents/collection/dataTypes';
3
3
  import { NftMetadataAttributes } from '../../cosmos-db/documents/token/nft-metadata-attributes';
4
+ import { GlobalOfferDoc } from '../../cosmos-db/documents/collection/globalOffer';
4
5
  export declare class CollectionOffersFilterCriteriaDto {
5
6
  dataType?: CollectionDataType;
6
7
  collection?: string[];
7
8
  offerId?: number[];
8
9
  owner?: string[];
9
10
  marketplace?: string[];
10
- range?: RangeFilter[];
11
+ range?: RangeFilter<GlobalOfferDoc>[];
11
12
  attributes?: NftMetadataAttributes[];
12
13
  isActive?: boolean;
13
14
  withAttributes?: boolean;
@@ -19,7 +20,7 @@ export declare class CollectionOffersFilter extends CosmosDbGenericFilter {
19
20
  offerId?: number[];
20
21
  owner?: string[];
21
22
  marketplace?: string[];
22
- range?: RangeFilter[];
23
+ range?: RangeFilter<GlobalOfferDoc>[];
23
24
  attributes?: NftMetadataAttributes[];
24
25
  isActive?: boolean;
25
26
  withAttributes?: boolean;
@@ -85,7 +85,7 @@ class CollectionOffersFilter extends cosmos_db_generic_filter_1.CosmosDbGenericF
85
85
  ...props?.filters,
86
86
  };
87
87
  // Assign other properties
88
- const { filters, ...otherProps } = props;
88
+ const { filters: _, ...otherProps } = props;
89
89
  Object.assign(this, otherProps);
90
90
  }
91
91
  }
@@ -21,7 +21,7 @@ class CollectionProfileFilter extends cosmos_db_generic_filter_1.CosmosDbGeneric
21
21
  : props.filters?.chain,
22
22
  };
23
23
  // Assign other properties
24
- const { filters, ...otherProps } = props;
24
+ const { filters: _, ...otherProps } = props;
25
25
  Object.assign(this, otherProps);
26
26
  }
27
27
  }
@@ -1,18 +1,19 @@
1
1
  import { ActivityChain } from '../../common/enums';
2
2
  import { RangeFilter, CosmosDbGenericFilter } from '../../cosmos-db/cosmos-db-generic-filter';
3
3
  import { CollectionDataType } from '../../cosmos-db/documents/collection/dataTypes';
4
+ import { CollectionStatsDoc } from '../../cosmos-db/documents/collection/stats';
4
5
  export declare class CollectionStatsFilterCriteriaDto {
5
6
  dataType?: CollectionDataType;
6
7
  collection?: string[];
7
8
  verifiedOnly?: boolean;
8
- range?: RangeFilter[];
9
+ range?: RangeFilter<CollectionStatsDoc>[];
9
10
  }
10
11
  export declare class CollectionStatsFilter extends CosmosDbGenericFilter {
11
12
  filters: {
12
13
  dataType?: CollectionDataType;
13
14
  collection?: string[];
14
15
  verifiedOnly?: boolean;
15
- range?: RangeFilter[];
16
+ range?: RangeFilter<CollectionStatsDoc>[];
16
17
  chain?: ActivityChain[];
17
18
  };
18
19
  strictSelect?: boolean;
@@ -55,7 +55,7 @@ class CollectionStatsFilter extends cosmos_db_generic_filter_1.CosmosDbGenericFi
55
55
  : props?.filters?.chain,
56
56
  };
57
57
  // Assign other properties
58
- const { filters, ...otherProps } = props ?? {};
58
+ const { filters: _, ...otherProps } = props ?? {};
59
59
  Object.assign(this, otherProps);
60
60
  this.applySelectPropertyLogic(props);
61
61
  }
@@ -1,7 +1,7 @@
1
1
  import { CollectionInfoDto } from './collection-info.dto';
2
2
  import { NftDoc } from '../../cosmos-db/documents/token/nft-details.doc';
3
- import { NftActivityData } from '../../cosmos-db/documents/activity/nft-activity-data';
4
- import { AuctionTypes } from '../../common/enums';
3
+ import { XoxnoAuctionTypeString } from '../../entities/xoxno-marketplace-sc/xoxno-auction-type.enum';
4
+ import { NftActivityData } from '../nft-activity-data/nft-activity-data';
5
5
  declare class FromToDto {
6
6
  address: string;
7
7
  profile: string;
@@ -16,7 +16,7 @@ declare class ActivityDataDto implements NftActivityData {
16
16
  scId: number;
17
17
  usdValue: number;
18
18
  egldValue: number;
19
- auctionType?: AuctionTypes;
19
+ auctionType?: XoxnoAuctionTypeString;
20
20
  deadline?: number;
21
21
  originalPayment?: {
22
22
  paymentToken: string;
@@ -14,7 +14,7 @@ exports.ActivityHistoryDto = void 0;
14
14
  const swagger_1 = require("@nestjs/swagger");
15
15
  const collection_info_dto_1 = require("./collection-info.dto");
16
16
  const nft_details_doc_1 = require("../../cosmos-db/documents/token/nft-details.doc");
17
- const enums_1 = require("../../common/enums");
17
+ const xoxno_auction_type_enum_1 = require("../../entities/xoxno-marketplace-sc/xoxno-auction-type.enum");
18
18
  class FromToDto {
19
19
  }
20
20
  __decorate([
@@ -1,7 +1,8 @@
1
1
  import { RangeFilter, CosmosDbGenericFilter } from '../../cosmos-db/cosmos-db-generic-filter';
2
+ import { LendingMarketProfileDoc } from '../../cosmos-db/documents/lending/lending-market-profile.doc';
2
3
  export declare class LendingMarketProfileFilterCriteriaDto {
3
4
  token?: string[];
4
- range?: RangeFilter[];
5
+ range?: RangeFilter<LendingMarketProfileDoc>[];
5
6
  eMode?: boolean;
6
7
  flashLoan?: boolean;
7
8
  isolated?: boolean;
@@ -18,7 +19,7 @@ export declare class LendingMarketProfileExtraProperties {
18
19
  }
19
20
  export declare class LendingMarketProfileFilter extends CosmosDbGenericFilter {
20
21
  filters: {
21
- range?: RangeFilter[];
22
+ range?: RangeFilter<LendingMarketProfileDoc>[];
22
23
  token?: string[];
23
24
  canBeCollateral?: boolean;
24
25
  canBeBorrowed?: boolean;
@@ -89,7 +89,7 @@ class LendingMarketProfileFilter extends cosmos_db_generic_filter_1.CosmosDbGene
89
89
  ...props?.filters,
90
90
  };
91
91
  // Assign other properties
92
- const { filters, ...otherProps } = props;
92
+ const { filters: _, ...otherProps } = props;
93
93
  Object.assign(this, otherProps);
94
94
  this.applySelectPropertyLogic(props);
95
95
  }
@@ -1,4 +1,5 @@
1
- import { AuctionTypes } from '../../common/enums';
1
+ import { NftDoc } from '../../cosmos-db/documents/token/nft-details.doc';
2
+ import { XoxnoAuctionTypeString } from '../../entities/xoxno-marketplace-sc/xoxno-auction-type.enum';
2
3
  export interface NftActivityData {
3
4
  collection: string;
4
5
  identifier?: string;
@@ -8,13 +9,13 @@ export interface NftActivityData {
8
9
  scId: number;
9
10
  usdValue: number;
10
11
  egldValue: number;
11
- auctionType?: AuctionTypes;
12
+ auctionType?: XoxnoAuctionTypeString;
12
13
  deadline?: number;
13
14
  originalPayment?: {
14
15
  paymentToken: string;
15
16
  price: number;
16
17
  };
17
- nftInfo?: any;
18
+ nftInfo?: Partial<NftDoc>;
18
19
  }
19
20
  export interface NftMvxBuiltIn {
20
21
  collection: string;
@@ -2,6 +2,7 @@ import { NftActivityEventSource } from './event-source.enum';
2
2
  import { NftActivityType } from './nft-activity-type.enum';
3
3
  import { ActivityChain } from '../../common/enums';
4
4
  import { RangeFilter, CosmosDbGenericFilter } from '../../cosmos-db/cosmos-db-generic-filter';
5
+ import { NftActivityDoc } from '../../cosmos-db/documents/activity/nft-activity.doc';
5
6
  export declare class ActivityDataDto {
6
7
  collection?: string[];
7
8
  identifier?: string[];
@@ -13,7 +14,7 @@ export declare class NftActivityFilterCriteriaDto {
13
14
  to?: string[];
14
15
  activityType?: NftActivityType[];
15
16
  source?: NftActivityEventSource[];
16
- range?: RangeFilter[];
17
+ range?: RangeFilter<NftActivityDoc>[];
17
18
  activityData?: ActivityDataDto;
18
19
  pk?: string[];
19
20
  }
@@ -25,7 +26,7 @@ export declare class NftActivityFilter extends CosmosDbGenericFilter {
25
26
  to?: string[];
26
27
  activityType?: NftActivityType[];
27
28
  source?: NftActivityEventSource[];
28
- range?: RangeFilter[];
29
+ range?: RangeFilter<NftActivityDoc>[];
29
30
  chain?: ActivityChain[];
30
31
  activityData?: {
31
32
  collection?: string[];
@@ -104,7 +104,7 @@ class NftActivityFilter extends cosmos_db_generic_filter_1.CosmosDbGenericFilter
104
104
  };
105
105
  // Assign other properties
106
106
  if (props) {
107
- const { filters, ...otherProps } = props;
107
+ const { filters: _, ...otherProps } = props;
108
108
  Object.assign(this, otherProps);
109
109
  }
110
110
  this.setPk();
@@ -114,12 +114,12 @@ class NftActivityFilter extends cosmos_db_generic_filter_1.CosmosDbGenericFilter
114
114
  return;
115
115
  const uniqueCollections = new Set();
116
116
  const activityData = this.filters.activityData;
117
- if (activityData?.collection?.length > 0) {
117
+ if ((activityData?.collection?.length ?? 0) > 0) {
118
118
  activityData.collection.forEach((collection) => {
119
119
  uniqueCollections.add(collection);
120
120
  });
121
121
  }
122
- if (activityData?.identifier?.length > 0) {
122
+ if ((activityData?.identifier?.length ?? 0) > 0) {
123
123
  activityData.identifier.forEach((identifier) => {
124
124
  // Extract collection ticker from identifier (format: COLLECTION-NONCE)
125
125
  const collectionTicker = identifier.split('-').slice(0, -1).join('-');
@@ -1,3 +1,4 @@
1
+ import { NftDoc } from '../../cosmos-db/documents/token/nft-details.doc';
1
2
  declare class WalletDto {
2
3
  address: string;
3
4
  profile: string;
@@ -8,22 +9,13 @@ declare class WalletDto {
8
9
  listed: number;
9
10
  followCount: number;
10
11
  }
11
- declare class NftInfoDto {
12
- identifier: string;
13
- collection: string;
14
- name: string;
15
- metadata: Record<string, any>;
16
- url: string;
17
- wasProcessed: boolean;
18
- media: Record<string, any>;
19
- }
20
12
  declare class PriceDataDto {
21
13
  price: number;
22
14
  timestamp: number;
23
15
  identifier: string;
24
16
  txHash: string;
25
17
  usdValue: number;
26
- nftInfo: NftInfoDto;
18
+ nftInfo: Partial<NftDoc>;
27
19
  }
28
20
  declare class UserStatsDto {
29
21
  wallet: WalletDto;
@@ -55,43 +55,6 @@ __decorate([
55
55
  (0, class_validator_1.IsNumber)(),
56
56
  __metadata("design:type", Number)
57
57
  ], WalletDto.prototype, "followCount", void 0);
58
- class NftInfoDto {
59
- }
60
- __decorate([
61
- (0, swagger_1.ApiProperty)({ description: 'NFT identifier' }),
62
- (0, class_validator_1.IsString)(),
63
- __metadata("design:type", String)
64
- ], NftInfoDto.prototype, "identifier", void 0);
65
- __decorate([
66
- (0, swagger_1.ApiProperty)({ description: 'NFT collection' }),
67
- (0, class_validator_1.IsString)(),
68
- __metadata("design:type", String)
69
- ], NftInfoDto.prototype, "collection", void 0);
70
- __decorate([
71
- (0, swagger_1.ApiProperty)({ description: 'NFT name' }),
72
- (0, class_validator_1.IsString)(),
73
- __metadata("design:type", String)
74
- ], NftInfoDto.prototype, "name", void 0);
75
- __decorate([
76
- (0, swagger_1.ApiProperty)({ description: 'NFT metadata' }),
77
- (0, class_validator_1.IsObject)(),
78
- __metadata("design:type", Object)
79
- ], NftInfoDto.prototype, "metadata", void 0);
80
- __decorate([
81
- (0, swagger_1.ApiProperty)({ description: 'NFT URL' }),
82
- (0, class_validator_1.IsString)(),
83
- __metadata("design:type", String)
84
- ], NftInfoDto.prototype, "url", void 0);
85
- __decorate([
86
- (0, swagger_1.ApiProperty)({ description: 'Whether the NFT was processed' }),
87
- (0, class_validator_1.IsBoolean)(),
88
- __metadata("design:type", Boolean)
89
- ], NftInfoDto.prototype, "wasProcessed", void 0);
90
- __decorate([
91
- (0, swagger_1.ApiProperty)({ description: 'NFT media information' }),
92
- (0, class_validator_1.IsObject)(),
93
- __metadata("design:type", Object)
94
- ], NftInfoDto.prototype, "media", void 0);
95
58
  class PriceDataDto {
96
59
  }
97
60
  __decorate([
@@ -120,10 +83,10 @@ __decorate([
120
83
  __metadata("design:type", Number)
121
84
  ], PriceDataDto.prototype, "usdValue", void 0);
122
85
  __decorate([
123
- (0, swagger_1.ApiProperty)({ type: NftInfoDto, description: 'NFT information' }),
86
+ (0, swagger_1.ApiProperty)({ type: (swagger_1.PartialType), description: 'NFT information' }),
124
87
  (0, class_validator_1.ValidateNested)(),
125
- (0, class_transformer_1.Type)(() => NftInfoDto),
126
- __metadata("design:type", NftInfoDto)
88
+ (0, class_transformer_1.Type)(() => swagger_1.PartialType),
89
+ __metadata("design:type", Object)
127
90
  ], PriceDataDto.prototype, "nftInfo", void 0);
128
91
  class UserStatsDto {
129
92
  }
@@ -1,11 +1,13 @@
1
- import { ActivityChain, AuctionTypes } from '../../common/enums';
1
+ import { ActivityChain } from '../../common/enums';
2
2
  import { NftMetadataAttributes } from '../../cosmos-db/documents/token/nft-metadata-attributes';
3
3
  import { CosmosDbGenericFilter, RangeFilter } from '../../cosmos-db/cosmos-db-generic-filter';
4
+ import { XoxnoAuctionTypeString } from '../../entities/xoxno-marketplace-sc/xoxno-auction-type.enum';
5
+ import { NftDoc } from '../../cosmos-db/documents/token/nft-details.doc';
4
6
  export declare class SaleInfoFilterDto {
5
7
  seller?: string[];
6
8
  paymentToken?: string[];
7
9
  marketplace?: string[];
8
- auctionType?: AuctionTypes[];
10
+ auctionType?: XoxnoAuctionTypeString[];
9
11
  }
10
12
  export declare class MetadataAttributesDto {
11
13
  attributes?: NftMetadataAttributes[];
@@ -20,7 +22,7 @@ export declare class NftDocFilterCriteriaDto {
20
22
  owner?: string[];
21
23
  currentOwner?: string[];
22
24
  saleInfo?: SaleInfoFilterDto;
23
- range?: RangeFilter[];
25
+ range?: RangeFilter<NftDoc>[];
24
26
  metadata?: MetadataAttributesDto;
25
27
  wasProcessed?: boolean;
26
28
  cp_staked?: boolean;
@@ -43,9 +45,9 @@ export declare class NftDocFilter extends CosmosDbGenericFilter {
43
45
  seller?: string[];
44
46
  paymentToken?: string[];
45
47
  marketplace?: string[];
46
- auctionType?: AuctionTypes[];
48
+ auctionType?: XoxnoAuctionTypeString[];
47
49
  };
48
- range?: RangeFilter[];
50
+ range?: RangeFilter<NftDoc>[];
49
51
  metadata?: {
50
52
  attributes?: NftMetadataAttributes[];
51
53
  };
@@ -132,7 +132,7 @@ class NftDocFilter extends cosmos_db_generic_filter_1.CosmosDbGenericFilter {
132
132
  : props.filters?.chain,
133
133
  };
134
134
  // Assign other properties
135
- const { filters, ...otherProps } = props;
135
+ const { filters: _, ...otherProps } = props;
136
136
  Object.assign(this, otherProps);
137
137
  this.applySelectPropertyLogic(props);
138
138
  this.setPk();
@@ -142,12 +142,12 @@ class NftDocFilter extends cosmos_db_generic_filter_1.CosmosDbGenericFilter {
142
142
  return;
143
143
  const uniqueCollections = new Set();
144
144
  const { collection, identifier } = this.filters;
145
- if (collection?.length > 0) {
145
+ if ((collection?.length ?? 0) > 0) {
146
146
  collection.forEach((coll) => {
147
147
  uniqueCollections.add(coll);
148
148
  });
149
149
  }
150
- if (identifier?.length > 0) {
150
+ if ((identifier?.length ?? 0) > 0) {
151
151
  identifier.forEach((id) => {
152
152
  // Extract collection ticker from identifier (format: COLLECTION-NONCE)
153
153
  const collectionTicker = id.split('-').slice(0, -1).join('-');
@@ -1,4 +1,5 @@
1
1
  import { RangeFilter, CosmosDbGenericFilter } from '../../cosmos-db/cosmos-db-generic-filter';
2
+ import { NftOfferDoc } from '../../cosmos-db/documents/token/nft-offer.doc';
2
3
  export declare class NftOfferDocFilterCriteria {
3
4
  isActive?: boolean;
4
5
  identifier?: string[];
@@ -6,7 +7,7 @@ export declare class NftOfferDocFilterCriteria {
6
7
  owner?: string[];
7
8
  nftOwner?: string[];
8
9
  marketplace?: string[];
9
- range?: RangeFilter[];
10
+ range?: RangeFilter<NftOfferDoc>[];
10
11
  }
11
12
  export declare class NftOfferDocFilter extends CosmosDbGenericFilter {
12
13
  filters: {
@@ -16,7 +17,7 @@ export declare class NftOfferDocFilter extends CosmosDbGenericFilter {
16
17
  collection?: string[];
17
18
  owner?: string[];
18
19
  marketplace?: string[];
19
- range?: RangeFilter[];
20
+ range?: RangeFilter<NftOfferDoc>[];
20
21
  };
21
22
  orderBy?: string[];
22
23
  constructor(props: Partial<NftOfferDocFilter>);
@@ -56,7 +56,7 @@ class NftOfferDocFilter extends cosmos_db_generic_filter_1.CosmosDbGenericFilter
56
56
  ...props?.filters,
57
57
  };
58
58
  // Assign other properties
59
- const { filters, ...otherProps } = props;
59
+ const { filters: _, ...otherProps } = props;
60
60
  Object.assign(this, otherProps);
61
61
  this.setPk();
62
62
  }
@@ -65,12 +65,12 @@ class NftOfferDocFilter extends cosmos_db_generic_filter_1.CosmosDbGenericFilter
65
65
  return;
66
66
  const uniqueCollections = new Set();
67
67
  const { collection, identifier } = this.filters;
68
- if (collection?.length > 0) {
68
+ if ((collection?.length ?? 0) > 0) {
69
69
  collection.forEach((coll) => {
70
70
  uniqueCollections.add(coll);
71
71
  });
72
72
  }
73
- if (identifier?.length > 0) {
73
+ if ((identifier?.length ?? 0) > 0) {
74
74
  identifier.forEach((id) => {
75
75
  // Extract collection ticker from identifier (format: COLLECTION-NONCE)
76
76
  const collectionTicker = id.split('-').slice(0, -1).join('-');
@@ -1,18 +1,5 @@
1
1
  import { OwnerDto } from '../../common/owner.dto';
2
- declare class NftInfoDto {
3
- identifier: string;
4
- nonce: number;
5
- name: string;
6
- url: string;
7
- wasProcessed: boolean;
8
- media: Record<string, any>;
9
- onSale: boolean;
10
- saleInfo: Record<string, any>;
11
- metadata: Record<string, any>;
12
- owner: OwnerDto;
13
- currentOwner: OwnerDto;
14
- receiverIsNotOwner: boolean;
15
- }
2
+ import { NftDoc } from '../../cosmos-db/documents/token/nft-details.doc';
16
3
  export declare class OfferDto {
17
4
  isActive: boolean;
18
5
  identifier: string;
@@ -30,11 +17,10 @@ export declare class OfferDto {
30
17
  usdValue: number;
31
18
  floorPriceMargin: number;
32
19
  floorPrice: number;
33
- nftInfo: NftInfoDto;
20
+ nftInfo: Partial<NftDoc>;
34
21
  }
35
22
  export declare class GetUserOffersResponseDto {
36
23
  count: number;
37
24
  hasMoreResults: boolean;
38
25
  resources: OfferDto[];
39
26
  }
40
- export {};
@@ -12,85 +12,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.GetUserOffersResponseDto = exports.OfferDto = void 0;
13
13
  const swagger_1 = require("@nestjs/swagger");
14
14
  const owner_dto_1 = require("../../common/owner.dto");
15
- class NftInfoDto {
16
- }
17
- __decorate([
18
- (0, swagger_1.ApiProperty)({ example: 'HLSR-374950-1934' }),
19
- __metadata("design:type", String)
20
- ], NftInfoDto.prototype, "identifier", void 0);
21
- __decorate([
22
- (0, swagger_1.ApiProperty)({ example: 6452 }),
23
- __metadata("design:type", Number)
24
- ], NftInfoDto.prototype, "nonce", void 0);
25
- __decorate([
26
- (0, swagger_1.ApiProperty)({ example: '37.43 EGLD' }),
27
- __metadata("design:type", String)
28
- ], NftInfoDto.prototype, "name", void 0);
29
- __decorate([
30
- (0, swagger_1.ApiProperty)({
31
- example: 'https://arweave.net/mfjIHO6ckE8m1ck_b46BdV4ZFVGEEHJSno2MnFKuzgk/undelegate-nft.png',
32
- }),
33
- __metadata("design:type", String)
34
- ], NftInfoDto.prototype, "url", void 0);
35
- __decorate([
36
- (0, swagger_1.ApiProperty)({ example: true }),
37
- __metadata("design:type", Boolean)
38
- ], NftInfoDto.prototype, "wasProcessed", void 0);
39
- __decorate([
40
- (0, swagger_1.ApiProperty)({
41
- example: {
42
- avifUrl: 'https://media.xoxno.com/nftmedia/HLSR-374950/receipt.avif',
43
- webpUrl: 'https://media.xoxno.com/nftmedia/HLSR-374950/receipt.webp',
44
- originalMedia: {
45
- contentLength: 2639394,
46
- contentType: 'image/png',
47
- },
48
- },
49
- }),
50
- __metadata("design:type", Object)
51
- ], NftInfoDto.prototype, "media", void 0);
52
- __decorate([
53
- (0, swagger_1.ApiProperty)({ example: false }),
54
- __metadata("design:type", Boolean)
55
- ], NftInfoDto.prototype, "onSale", void 0);
56
- __decorate([
57
- (0, swagger_1.ApiProperty)({ example: {} }),
58
- __metadata("design:type", Object)
59
- ], NftInfoDto.prototype, "saleInfo", void 0);
60
- __decorate([
61
- (0, swagger_1.ApiProperty)({
62
- example: {
63
- rarity: {
64
- rank: 202,
65
- },
66
- },
67
- }),
68
- __metadata("design:type", Object)
69
- ], NftInfoDto.prototype, "metadata", void 0);
70
- __decorate([
71
- (0, swagger_1.ApiProperty)({
72
- example: {
73
- address: 'erd1vdr8jnyhp0wlk3cwe2j5ejwkzwepexqgtnqxanravgv0d6vg59dqnfkjmm',
74
- profile: 'https://media.xoxno.com/userprofile/erd1vdr8jnyhp0wlk3cwe2j5ejwkzwepexqgtnqxanravgv0d6vg59dqnfkjmm/profilePicture.webp',
75
- username: '@xtrading',
76
- },
77
- }),
78
- __metadata("design:type", owner_dto_1.OwnerDto)
79
- ], NftInfoDto.prototype, "owner", void 0);
80
- __decorate([
81
- (0, swagger_1.ApiProperty)({
82
- example: {
83
- address: 'erd1vdr8jnyhp0wlk3cwe2j5ejwkzwepexqgtnqxanravgv0d6vg59dqnfkjmm',
84
- profile: 'https://media.xoxno.com/userprofile/erd1vdr8jnyhp0wlk3cwe2j5ejwkzwepexqgtnqxanravgv0d6vg59dqnfkjmm/profilePicture.webp',
85
- username: '@xtrading',
86
- },
87
- }),
88
- __metadata("design:type", owner_dto_1.OwnerDto)
89
- ], NftInfoDto.prototype, "currentOwner", void 0);
90
- __decorate([
91
- (0, swagger_1.ApiProperty)({ example: true }),
92
- __metadata("design:type", Boolean)
93
- ], NftInfoDto.prototype, "receiverIsNotOwner", void 0);
94
15
  class OfferDto {
95
16
  }
96
17
  exports.OfferDto = OfferDto;
@@ -162,9 +83,9 @@ __decorate([
162
83
  ], OfferDto.prototype, "floorPrice", void 0);
163
84
  __decorate([
164
85
  (0, swagger_1.ApiProperty)({
165
- type: NftInfoDto,
86
+ type: (swagger_1.PartialType),
166
87
  }),
167
- __metadata("design:type", NftInfoDto)
88
+ __metadata("design:type", Object)
168
89
  ], OfferDto.prototype, "nftInfo", void 0);
169
90
  class GetUserOffersResponseDto {
170
91
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xoxno/types",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "Shared types and utilities for XOXNO API.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -10,7 +10,7 @@
10
10
  "scripts": {
11
11
  "build": "tsc",
12
12
  "build:watch": "tsc --watch",
13
- "prepublishOnly": "npm run build",
13
+ "prepublishOnly": "node generate-barrel.mjs && eslint 'src/index.ts' --fix && npm run build",
14
14
  "lint": "eslint 'src/**/*.ts'",
15
15
  "lint:fix": "eslint 'src/**/*.ts' --fix",
16
16
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -1,28 +0,0 @@
1
- export declare class TradingStatistics {
2
- totalVolume: number;
3
- totalTrades: number;
4
- averagePrice?: number;
5
- allTimeHigh: {
6
- price: number;
7
- timestamp: number;
8
- txHash: string;
9
- identifier: string;
10
- };
11
- day: TradingDataSummary;
12
- week: TradingDataSummary;
13
- month: TradingDataSummary;
14
- quarter: TradingDataSummary;
15
- halfYear: TradingDataSummary;
16
- year: TradingDataSummary;
17
- constructor(props?: Partial<TradingStatistics>);
18
- }
19
- declare class TradingDataSummary {
20
- volume: number;
21
- volumeMargin: number;
22
- trades: number;
23
- tradesMargin: number;
24
- minPrice?: number;
25
- maxPrice?: number;
26
- averagePrice?: number;
27
- }
28
- export {};
@@ -1,35 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TradingStatistics = void 0;
4
- class TradingStatistics {
5
- constructor(props) {
6
- this.totalVolume = 0;
7
- this.totalTrades = 0;
8
- this.averagePrice = 0;
9
- this.allTimeHigh = {
10
- price: 0,
11
- timestamp: 0,
12
- txHash: '',
13
- identifier: '',
14
- };
15
- this.day = new TradingDataSummary();
16
- this.week = new TradingDataSummary();
17
- this.month = new TradingDataSummary();
18
- this.quarter = new TradingDataSummary();
19
- this.halfYear = new TradingDataSummary();
20
- this.year = new TradingDataSummary();
21
- Object.assign(this, props);
22
- }
23
- }
24
- exports.TradingStatistics = TradingStatistics;
25
- class TradingDataSummary {
26
- constructor() {
27
- this.volume = 0;
28
- this.volumeMargin = 0;
29
- this.trades = 0;
30
- this.tradesMargin = 0;
31
- this.minPrice = 0;
32
- this.maxPrice = 0;
33
- this.averagePrice = 0;
34
- }
35
- }
@@ -1,15 +0,0 @@
1
- export declare enum NftActivityEventSource {
2
- MVX_BUILT_IN = "mvxBuiltIn",
3
- XOXNO_MARKETPLACE = "xoxno",
4
- FRAMEIT_MARKETPLACE = "frameit",
5
- DEADRARE_MARKETPLACE = "deadrare",
6
- KROGAN_MARKETPLACE = "krogan",
7
- XOXNO_LAUNCHPAD = "xoxnoLaunchpad",
8
- XOXNO_STAKING = "xoxnoStaking",
9
- XOXNO_P2P = "xoxnoP2P",
10
- XOXNO_LS = "xoxnoLs",
11
- XOXNO_EGLD_LS = "xoxnoEgldLs",
12
- XOXNO_LENDING = "xoxnoLending",
13
- BOBER_BATTLE = "boberBattle",
14
- BOBER_WHEEL = "boberWheel"
15
- }
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NftActivityEventSource = void 0;
4
- var NftActivityEventSource;
5
- (function (NftActivityEventSource) {
6
- NftActivityEventSource["MVX_BUILT_IN"] = "mvxBuiltIn";
7
- NftActivityEventSource["XOXNO_MARKETPLACE"] = "xoxno";
8
- NftActivityEventSource["FRAMEIT_MARKETPLACE"] = "frameit";
9
- NftActivityEventSource["DEADRARE_MARKETPLACE"] = "deadrare";
10
- NftActivityEventSource["KROGAN_MARKETPLACE"] = "krogan";
11
- NftActivityEventSource["XOXNO_LAUNCHPAD"] = "xoxnoLaunchpad";
12
- NftActivityEventSource["XOXNO_STAKING"] = "xoxnoStaking";
13
- NftActivityEventSource["XOXNO_P2P"] = "xoxnoP2P";
14
- NftActivityEventSource["XOXNO_LS"] = "xoxnoLs";
15
- NftActivityEventSource["XOXNO_EGLD_LS"] = "xoxnoEgldLs";
16
- NftActivityEventSource["XOXNO_LENDING"] = "xoxnoLending";
17
- NftActivityEventSource["BOBER_BATTLE"] = "boberBattle";
18
- NftActivityEventSource["BOBER_WHEEL"] = "boberWheel";
19
- })(NftActivityEventSource || (exports.NftActivityEventSource = NftActivityEventSource = {}));