@xoxno/types 1.0.29 → 1.0.31
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/cosmos-db/documents/chat/chat-message.doc.d.ts +28 -2
- package/dist/cosmos-db/documents/chat/chat-message.doc.js +13 -1
- package/dist/cosmos-db/documents/chat/user-block.doc.d.ts +22 -2
- package/dist/cosmos-db/documents/chat/user-block.doc.js +11 -1
- package/dist/cosmos-db/documents/chat/user-conversation.doc.d.ts +34 -4
- package/dist/cosmos-db/documents/chat/user-conversation.doc.js +8 -1
- package/dist/entities/airdrop/airdrop.dto.d.ts +15 -13
- package/dist/entities/airdrop/airdrop.dto.js +6 -5
- package/dist/requests/bober-battle/analytics.d.ts +2 -2
- package/dist/requests/bober-battle/analytics.js +3 -3
- package/dist/requests/collection/query-activity.d.ts +2 -0
- package/dist/requests/collection/query-activity.js +12 -0
- package/dist/utils/types.d.ts +9 -0
- package/package.json +1 -1
|
@@ -1,9 +1,34 @@
|
|
|
1
|
+
import { ChatDataType } from './chat-data-type.enum';
|
|
1
2
|
import { ChatMessageContentType } from './chat-message-content-type.enum';
|
|
2
|
-
|
|
3
|
-
|
|
3
|
+
import { OwnerDto } from '../../../common/owner.dto';
|
|
4
|
+
interface IType {
|
|
5
|
+
dataType: ChatDataType;
|
|
4
6
|
chatId: string;
|
|
7
|
+
isGroupChat: boolean;
|
|
8
|
+
message: ChatMessage;
|
|
9
|
+
pk: string;
|
|
10
|
+
id: string;
|
|
11
|
+
ttl?: number;
|
|
12
|
+
_ts?: number;
|
|
13
|
+
}
|
|
14
|
+
export declare class ChatMessageDoc implements IType {
|
|
5
15
|
sender: string;
|
|
6
16
|
receiver: string;
|
|
17
|
+
dataType: ChatDataType;
|
|
18
|
+
chatId: string;
|
|
19
|
+
isGroupChat: boolean;
|
|
20
|
+
message: ChatMessage;
|
|
21
|
+
pk: string;
|
|
22
|
+
id: string;
|
|
23
|
+
ttl?: number;
|
|
24
|
+
_ts?: number;
|
|
25
|
+
constructor(props: Partial<ChatMessageDoc>);
|
|
26
|
+
}
|
|
27
|
+
export declare class ChatMessageDocHyrated implements IType {
|
|
28
|
+
sender: OwnerDto;
|
|
29
|
+
receiver: OwnerDto;
|
|
30
|
+
dataType: ChatDataType;
|
|
31
|
+
chatId: string;
|
|
7
32
|
isGroupChat: boolean;
|
|
8
33
|
message: ChatMessage;
|
|
9
34
|
pk: string;
|
|
@@ -42,3 +67,4 @@ export interface ChatMessageDetails {
|
|
|
42
67
|
chatName: string;
|
|
43
68
|
id: string;
|
|
44
69
|
}
|
|
70
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ChatMessageDoc = void 0;
|
|
3
|
+
exports.ChatMessageDocHyrated = exports.ChatMessageDoc = void 0;
|
|
4
4
|
const uuid_1 = require("uuid");
|
|
5
5
|
const chat_data_type_enum_1 = require("./chat-data-type.enum");
|
|
6
6
|
class ChatMessageDoc {
|
|
@@ -15,3 +15,15 @@ class ChatMessageDoc {
|
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
exports.ChatMessageDoc = ChatMessageDoc;
|
|
18
|
+
class ChatMessageDocHyrated {
|
|
19
|
+
constructor(props) {
|
|
20
|
+
this.dataType = chat_data_type_enum_1.ChatDataType.MESSAGE;
|
|
21
|
+
Object.assign(this, props);
|
|
22
|
+
this.id = (0, uuid_1.v4)();
|
|
23
|
+
this.pk = props.chatId;
|
|
24
|
+
if (this.isGroupChat) {
|
|
25
|
+
this.ttl = Math.floor(Date.now() / 1000) + 60 * 60 * 24 * 7; // 7 days
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.ChatMessageDocHyrated = ChatMessageDocHyrated;
|
|
@@ -1,10 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { OwnerDto } from '../../../common/owner.dto';
|
|
2
|
+
import { ChatDataType } from './chat-data-type.enum';
|
|
3
|
+
interface IType {
|
|
4
|
+
dataType: ChatDataType;
|
|
5
|
+
timestamp: number;
|
|
6
|
+
id: string;
|
|
7
|
+
pk: string;
|
|
8
|
+
_ts: number;
|
|
9
|
+
}
|
|
10
|
+
export declare class UserBlockDoc implements IType {
|
|
3
11
|
sender: string;
|
|
4
12
|
receiver: string;
|
|
13
|
+
dataType: ChatDataType;
|
|
14
|
+
timestamp: number;
|
|
15
|
+
id: string;
|
|
16
|
+
pk: string;
|
|
17
|
+
_ts: number;
|
|
18
|
+
constructor(props: Partial<UserBlockDoc>);
|
|
19
|
+
}
|
|
20
|
+
export declare class UserBlockDocHydrated implements IType {
|
|
21
|
+
sender: OwnerDto;
|
|
22
|
+
receiver: OwnerDto;
|
|
23
|
+
dataType: ChatDataType;
|
|
5
24
|
timestamp: number;
|
|
6
25
|
id: string;
|
|
7
26
|
pk: string;
|
|
8
27
|
_ts: number;
|
|
9
28
|
constructor(props: Partial<UserBlockDoc>);
|
|
10
29
|
}
|
|
30
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UserBlockDoc = void 0;
|
|
3
|
+
exports.UserBlockDocHydrated = exports.UserBlockDoc = void 0;
|
|
4
4
|
const chat_data_type_enum_1 = require("./chat-data-type.enum");
|
|
5
5
|
class UserBlockDoc {
|
|
6
6
|
constructor(props) {
|
|
@@ -12,3 +12,13 @@ class UserBlockDoc {
|
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
exports.UserBlockDoc = UserBlockDoc;
|
|
15
|
+
class UserBlockDocHydrated {
|
|
16
|
+
constructor(props) {
|
|
17
|
+
this.dataType = chat_data_type_enum_1.ChatDataType.BLOCKED_USER;
|
|
18
|
+
this.timestamp = Math.floor(Date.now() / 1000);
|
|
19
|
+
Object.assign(this, props);
|
|
20
|
+
this.id = props.sender;
|
|
21
|
+
this.pk = props.receiver;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.UserBlockDocHydrated = UserBlockDocHydrated;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { OwnerDto } from '../../../common/owner.dto';
|
|
2
|
+
import { ChatDataType } from './chat-data-type.enum';
|
|
1
3
|
import { ChatMessage } from './chat-message.doc';
|
|
2
|
-
|
|
3
|
-
dataType:
|
|
4
|
+
interface IType {
|
|
5
|
+
dataType: ChatDataType;
|
|
4
6
|
chatName?: string;
|
|
5
7
|
isGroupChat: boolean;
|
|
6
|
-
sender: string;
|
|
7
|
-
receiver: string;
|
|
8
8
|
chatId: string;
|
|
9
9
|
message: ChatMessage;
|
|
10
10
|
deleteTimestamp?: number;
|
|
@@ -12,5 +12,35 @@ export declare class UserConversationDoc {
|
|
|
12
12
|
id: string;
|
|
13
13
|
pk: string;
|
|
14
14
|
_ts: number;
|
|
15
|
+
}
|
|
16
|
+
export declare class UserConversationDoc implements IType {
|
|
17
|
+
sender: string;
|
|
18
|
+
receiver: string;
|
|
19
|
+
dataType: ChatDataType;
|
|
20
|
+
chatName?: string | undefined;
|
|
21
|
+
isGroupChat: boolean;
|
|
22
|
+
chatId: string;
|
|
23
|
+
message: ChatMessage;
|
|
24
|
+
deleteTimestamp?: number | undefined;
|
|
25
|
+
unreadCount?: number | undefined;
|
|
26
|
+
id: string;
|
|
27
|
+
pk: string;
|
|
28
|
+
_ts: number;
|
|
15
29
|
constructor(props: Partial<UserConversationDoc>);
|
|
16
30
|
}
|
|
31
|
+
export declare class UserConversationDocHydrated implements IType {
|
|
32
|
+
sender: OwnerDto;
|
|
33
|
+
receiver: OwnerDto;
|
|
34
|
+
dataType: ChatDataType;
|
|
35
|
+
chatName?: string | undefined;
|
|
36
|
+
isGroupChat: boolean;
|
|
37
|
+
chatId: string;
|
|
38
|
+
message: ChatMessage;
|
|
39
|
+
deleteTimestamp?: number | undefined;
|
|
40
|
+
unreadCount?: number | undefined;
|
|
41
|
+
id: string;
|
|
42
|
+
pk: string;
|
|
43
|
+
_ts: number;
|
|
44
|
+
constructor(props: Partial<UserConversationDocHydrated>);
|
|
45
|
+
}
|
|
46
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UserConversationDoc = void 0;
|
|
3
|
+
exports.UserConversationDocHydrated = exports.UserConversationDoc = void 0;
|
|
4
4
|
const chat_data_type_enum_1 = require("./chat-data-type.enum");
|
|
5
5
|
class UserConversationDoc {
|
|
6
6
|
constructor(props) {
|
|
@@ -11,3 +11,10 @@ class UserConversationDoc {
|
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
exports.UserConversationDoc = UserConversationDoc;
|
|
14
|
+
class UserConversationDocHydrated {
|
|
15
|
+
constructor(props) {
|
|
16
|
+
this.dataType = chat_data_type_enum_1.ChatDataType.CONVERSATION;
|
|
17
|
+
Object.assign(this, props);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.UserConversationDocHydrated = UserConversationDocHydrated;
|
|
@@ -1,27 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { Wallet } from '../../utils/types';
|
|
2
|
+
interface IType {
|
|
3
3
|
tokenAllocation: number;
|
|
4
4
|
totalScore: number;
|
|
5
5
|
rank: number;
|
|
6
6
|
isClaimed?: boolean;
|
|
7
|
-
signature
|
|
7
|
+
signature: {
|
|
8
8
|
signature: string;
|
|
9
9
|
data: string;
|
|
10
10
|
};
|
|
11
11
|
amount?: string;
|
|
12
12
|
}
|
|
13
|
-
export type
|
|
13
|
+
export type AirdropDto = IType & {
|
|
14
14
|
wallet: string;
|
|
15
15
|
};
|
|
16
|
-
export
|
|
17
|
-
address: string;
|
|
18
|
-
addressTrimmed: string;
|
|
19
|
-
profile: string;
|
|
20
|
-
username: string;
|
|
21
|
-
isVerified: boolean;
|
|
22
|
-
chain?: ActivityChain;
|
|
23
|
-
}
|
|
24
|
-
export declare class AirdropDto extends AirdropRawClass {
|
|
16
|
+
export declare class AirdropDtoHydrated implements IType {
|
|
25
17
|
wallet: Wallet;
|
|
18
|
+
tokenAllocation: number;
|
|
19
|
+
totalScore: number;
|
|
20
|
+
rank: number;
|
|
21
|
+
isClaimed?: boolean | undefined;
|
|
22
|
+
signature: {
|
|
23
|
+
signature: string;
|
|
24
|
+
data: string;
|
|
25
|
+
};
|
|
26
|
+
amount?: string | undefined;
|
|
27
|
+
constructor(args: Partial<AirdropDtoHydrated>);
|
|
26
28
|
}
|
|
27
29
|
export {};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
class
|
|
3
|
+
exports.AirdropDtoHydrated = void 0;
|
|
4
|
+
class AirdropDtoHydrated {
|
|
5
|
+
constructor(args) {
|
|
6
|
+
Object.assign(this, args);
|
|
7
|
+
}
|
|
5
8
|
}
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
exports.AirdropDto = AirdropDto;
|
|
9
|
+
exports.AirdropDtoHydrated = AirdropDtoHydrated;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Wallet } from '../../
|
|
1
|
+
import { Wallet } from '../../utils/types';
|
|
2
2
|
export declare class BoberBattleLeaderboardDto {
|
|
3
3
|
GamesCreated: number;
|
|
4
4
|
GamesCreatedHead: number;
|
|
@@ -26,6 +26,6 @@ export declare class BoberBattleUserDto extends BoberBattleLeaderboardDto {
|
|
|
26
26
|
WinRate: number;
|
|
27
27
|
constructor(data: Partial<BoberBattleUserDto>);
|
|
28
28
|
}
|
|
29
|
-
export declare class
|
|
29
|
+
export declare class BoberBattleUserDtoHydrated extends BoberBattleLeaderboardDto {
|
|
30
30
|
wallet: Wallet;
|
|
31
31
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.BoberBattleUserDtoHydrated = exports.BoberBattleUserDto = exports.BoberBattleLeaderboardDto = void 0;
|
|
4
4
|
class BoberBattleLeaderboardDto {
|
|
5
5
|
constructor(data) {
|
|
6
6
|
Object.assign(this, data);
|
|
@@ -14,6 +14,6 @@ class BoberBattleUserDto extends BoberBattleLeaderboardDto {
|
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
exports.BoberBattleUserDto = BoberBattleUserDto;
|
|
17
|
-
class
|
|
17
|
+
class BoberBattleUserDtoHydrated extends BoberBattleLeaderboardDto {
|
|
18
18
|
}
|
|
19
|
-
exports.
|
|
19
|
+
exports.BoberBattleUserDtoHydrated = BoberBattleUserDtoHydrated;
|
|
@@ -2,6 +2,7 @@ import { CollectionInfoDto } from './collection-info.dto';
|
|
|
2
2
|
import { NftDoc } from '../../cosmos-db/documents/token/nft-details.doc';
|
|
3
3
|
import { XoxnoAuctionTypeString } from '../../entities/xoxno-marketplace-sc/xoxno-auction-type.enum';
|
|
4
4
|
import { NftActivityData } from '../nft-activity-data/nft-activity-data';
|
|
5
|
+
import { ActivityChain } from '../../common/enums';
|
|
5
6
|
declare class FromToDto {
|
|
6
7
|
address: string;
|
|
7
8
|
profile: string;
|
|
@@ -39,6 +40,7 @@ export declare class ActivityBodyDto {
|
|
|
39
40
|
from: FromToDto;
|
|
40
41
|
to: FromToDto;
|
|
41
42
|
activityData: ActivityDataDto;
|
|
43
|
+
chain: ActivityChain;
|
|
42
44
|
}
|
|
43
45
|
export declare class ActivityHistoryDto {
|
|
44
46
|
resources: ActivityBodyDto[];
|
|
@@ -15,6 +15,7 @@ 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
17
|
const xoxno_auction_type_enum_1 = require("../../entities/xoxno-marketplace-sc/xoxno-auction-type.enum");
|
|
18
|
+
const enums_1 = require("../../common/enums");
|
|
18
19
|
class FromToDto {
|
|
19
20
|
}
|
|
20
21
|
__decorate([
|
|
@@ -93,6 +94,9 @@ __decorate([
|
|
|
93
94
|
__metadata("design:type", collection_info_dto_1.CollectionInfoDto)
|
|
94
95
|
], ActivityDataDto.prototype, "collectionInfo", void 0);
|
|
95
96
|
class ActivityBodyDto {
|
|
97
|
+
constructor() {
|
|
98
|
+
this.chain = enums_1.ActivityChain.MVX;
|
|
99
|
+
}
|
|
96
100
|
}
|
|
97
101
|
exports.ActivityBodyDto = ActivityBodyDto;
|
|
98
102
|
__decorate([
|
|
@@ -129,6 +133,14 @@ __decorate([
|
|
|
129
133
|
(0, swagger_1.ApiProperty)({ type: ActivityDataDto }),
|
|
130
134
|
__metadata("design:type", ActivityDataDto)
|
|
131
135
|
], ActivityBodyDto.prototype, "activityData", void 0);
|
|
136
|
+
__decorate([
|
|
137
|
+
(0, swagger_1.ApiProperty)({
|
|
138
|
+
example: enums_1.ActivityChain.MVX,
|
|
139
|
+
enum: enums_1.ActivityChain,
|
|
140
|
+
description: 'Blockchain network where the activity occurred',
|
|
141
|
+
}),
|
|
142
|
+
__metadata("design:type", String)
|
|
143
|
+
], ActivityBodyDto.prototype, "chain", void 0);
|
|
132
144
|
class ActivityHistoryDto {
|
|
133
145
|
}
|
|
134
146
|
exports.ActivityHistoryDto = ActivityHistoryDto;
|
package/dist/utils/types.d.ts
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
import { ActivityChain } from '../common/enums';
|
|
1
2
|
export type PublicOnly<T> = {
|
|
2
3
|
[K in keyof T as T[K] extends Function ? never : K]: T[K];
|
|
3
4
|
};
|
|
5
|
+
export interface Wallet {
|
|
6
|
+
address: string;
|
|
7
|
+
addressTrimmed: string;
|
|
8
|
+
profile: string;
|
|
9
|
+
username: string;
|
|
10
|
+
isVerified: boolean;
|
|
11
|
+
chain?: ActivityChain;
|
|
12
|
+
}
|