Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependecies #1060

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .jest/setEnvVars.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
process.env.DEPLOYER_ADDRESS = 'erd1qqqqqqqqqqqqqpgqut6lamz9dn480ytj8cmcwvydcu3lj55epltq9t9kam';
process.env.PROXY_DEPLOYER_ADDRESS = 'erd1qqqqqqqqqqqqqpgqut6lamz9dn480ytj8cmcwvydcu3lj55epltq9t9kam';
process.env.TEMPLATE_BULK_ADDRESS = 'erd1qqqqqqqqqqqqqpgqzs3y0vr4t4sqyet32t6jp9m85l3hlr93u00sdj9rxa';
process.env.TEMPLATE_MINTER_ADDRESS = 'erd1qqqqqqqqqqqqqpgqzs3y0vr4t4sqyet32t6jp9m85l3hlr93u00sdj9rxa';
process.env.TEMPLATE_MARKETPLACE_ADDRESS = 'erd1qqqqqqqqqqqqqpgq9ac9zvc4ugzrgqaqjqgjdhvxxtx7wu2eu00sxezym3';
163 changes: 80 additions & 83 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@
"@golevelup/nestjs-rabbitmq": "4.0.0",
"@multiversx/sdk-core": "12.14.0",
"@multiversx/sdk-native-auth-server": "1.0.7",
"@multiversx/sdk-nestjs-cache": "2.0.0-beta.2",
"@multiversx/sdk-nestjs-common": "2.0.0-beta.2",
"@multiversx/sdk-nestjs-elastic": "2.0.0-beta.2",
"@multiversx/sdk-nestjs-http": "2.0.0-beta.2",
"@multiversx/sdk-nestjs-monitoring": "2.0.0-beta.2",
"@multiversx/sdk-nestjs-redis": "2.0.0-beta.2",
"@multiversx/sdk-nestjs-cache": "3.0.0",
"@multiversx/sdk-nestjs-common": "3.0.0",
"@multiversx/sdk-nestjs-elastic": "3.0.0",
"@multiversx/sdk-nestjs-http": "3.0.0",
"@multiversx/sdk-nestjs-monitoring": "3.0.0",
"@multiversx/sdk-nestjs-redis": "3.0.0",
"@multiversx/sdk-network-providers": "^1.2.1",
"@nestjs/apollo": "12.0.7",
"@nestjs/common": "10.2.4",
Expand Down Expand Up @@ -75,7 +75,7 @@
"dataloader": "2.0.0",
"errorhandler": "1.5.1",
"form-data": "4.0.0",
"graphql": "16.8.0",
"graphql": "16.8.1",
"graphql-fields-list": "2.2.4",
"graphql-query-complexity": "0.12.0",
"graphql-relay": "0.10.0",
Expand Down
6 changes: 3 additions & 3 deletions src/crons/elastic.updater/nsfw-queries.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import { NftTypeEnum } from 'src/modules/assets/models';
import { ElasticQuery, QueryType } from '@multiversx/sdk-nestjs-elastic';
import { ElasticQuery, MatchQuery, QueryType } from '@multiversx/sdk-nestjs-elastic';
import { constants } from 'src/config';
import { ELASTIC_NFT_NSFW } from 'src/utils/constants';

export const getNsfwNotMarkedQuery = ElasticQuery.create()
.withMustNotExistCondition(ELASTIC_NFT_NSFW)
.withMustExistCondition('identifier')
.withMustMultiShouldCondition([NftTypeEnum.NonFungibleESDT, NftTypeEnum.SemiFungibleESDT], (type) => QueryType.Match('type', type))
.withMustCondition(QueryType.Nested('data', { 'data.nonEmptyURIs': true }))
.withMustCondition(QueryType.Nested('data', [new MatchQuery('data.nonEmptyURIs', true)]))
.withPagination({ from: 0, size: constants.elasticMaxBatch });

export const getNsfwMarkedQuery = ElasticQuery.create()
.withFields([ELASTIC_NFT_NSFW])
.withMustExistCondition('identifier')
.withMustMultiShouldCondition([NftTypeEnum.NonFungibleESDT, NftTypeEnum.SemiFungibleESDT], (type) => QueryType.Match('type', type))
.withMustCondition(QueryType.Nested('data', { 'data.nonEmptyURIs': true }))
.withMustCondition(QueryType.Nested('data', [new MatchQuery('data.nonEmptyURIs', true)]))
.withPagination({ from: 0, size: constants.elasticMaxBatch });
4 changes: 2 additions & 2 deletions src/modules/admins/flag-nft.service.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ElasticQuery, QueryOperator, QueryType } from '@multiversx/sdk-nestjs-elastic';
import { ElasticQuery, MatchQuery, QueryOperator, QueryType } from '@multiversx/sdk-nestjs-elastic';
import { Locker } from '@multiversx/sdk-nestjs-common';
import { forwardRef, Inject, Injectable, Logger } from '@nestjs/common';
import { MxElasticService, NftMedia } from 'src/common';
Expand Down Expand Up @@ -67,7 +67,7 @@ export class FlagNftService {
.withMustExistCondition('identifier')
.withMustCondition(QueryType.Match('token', collection, QueryOperator.AND))
.withMustMultiShouldCondition([NftTypeEnum.NonFungibleESDT, NftTypeEnum.SemiFungibleESDT], (type) => QueryType.Match('type', type))
.withMustCondition(QueryType.Nested('data', { 'data.nonEmptyURIs': true }))
.withMustCondition(QueryType.Nested('data', [new MatchQuery('data.nonEmptyURIs', true)]))
.withPagination({ from: 0, size: 10000 });
await this.elasticUpdater.getScrollableList(ELASTIC_TOKENS_INDEX, 'identifier', query, async (items) => {
const nsfwItems = items.map((item) => ({
Expand Down
26 changes: 4 additions & 22 deletions src/modules/analytics/elastic.indexer.service.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ElasticQuery, ElasticSortOrder, QueryType } from '@multiversx/sdk-nestjs-elastic';
import { ElasticQuery, ElasticSortOrder, MatchQuery, QueryType } from '@multiversx/sdk-nestjs-elastic';
import { Injectable } from '@nestjs/common';
import { MxElasticService } from 'src/common';

Expand All @@ -19,22 +19,10 @@ export class ElasticAnalyticsService {
const elasticQuery = ElasticQuery.create()
.withPagination({ from: 0, size: 500 })
.withMustCondition(
QueryType.Should(
eventNames.map((eventName) =>
QueryType.Nested('events', {
'events.identifier': eventName,
}),
),
),
QueryType.Should(eventNames.map((eventName) => QueryType.Nested('events', [new MatchQuery('events.identifier', eventName)]))),
)
.withMustCondition(
QueryType.Should(
addresses.map((address) =>
QueryType.Nested('events', {
'events.address': address,
}),
),
),
QueryType.Should(addresses.map((address) => QueryType.Nested('events', [new MatchQuery('events.address', address)]))),
)
.withDateRangeFilter('timestamp', lte, gte)
.withSort([{ name: 'timestamp', order: ElasticSortOrder.ascending }]);
Expand All @@ -56,13 +44,7 @@ export class ElasticAnalyticsService {
private async getTransactionsLogs(eventName: string, gte: number, lte: number): Promise<any[]> {
const elasticQuery = ElasticQuery.create()
.withMustCondition(
QueryType.Should(
[eventName].map((eventName) =>
QueryType.Nested('events', {
'events.identifier': eventName,
}),
),
),
QueryType.Should([eventName].map((eventName) => QueryType.Nested('events', [new MatchQuery('events.identifier', eventName)]))),
)
.withDateRangeFilter('timestamp', lte, gte)
.withSort([{ name: 'timestamp', order: ElasticSortOrder.ascending }]);
Expand Down
Loading