@xoxno/types 1.0.30 → 1.0.32
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/cosmos-db/documents/collection/stats.d.ts +4 -1
- package/dist/cosmos-db/documents/collection/stats.js +8 -2
- 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/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;
|
|
@@ -38,7 +38,10 @@ export declare class CollectionStatsDoc {
|
|
|
38
38
|
chain: ActivityChain;
|
|
39
39
|
_ts: number;
|
|
40
40
|
id: string;
|
|
41
|
-
collectionInfo?: Partial<CollectionProfileDoc>;
|
|
42
41
|
constructor(props?: Partial<CollectionStatsDoc>);
|
|
43
42
|
}
|
|
43
|
+
export declare class CollectionStatsDocHydrated extends CollectionStatsDoc {
|
|
44
|
+
collectionInfo: Partial<CollectionProfileDoc>;
|
|
45
|
+
constructor(props: Partial<CollectionStatsDocHydrated>);
|
|
46
|
+
}
|
|
44
47
|
export {};
|
|
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.CollectionStatsDoc = exports.TradingStatistics = exports.AllTimeHigh = void 0;
|
|
12
|
+
exports.CollectionStatsDocHydrated = exports.CollectionStatsDoc = exports.TradingStatistics = exports.AllTimeHigh = void 0;
|
|
13
13
|
const swagger_1 = require("@nestjs/swagger");
|
|
14
14
|
const enums_1 = require("../../../common/enums");
|
|
15
15
|
const dataTypes_1 = require("./dataTypes");
|
|
@@ -276,6 +276,12 @@ __decorate([
|
|
|
276
276
|
}),
|
|
277
277
|
__metadata("design:type", String)
|
|
278
278
|
], CollectionStatsDoc.prototype, "id", void 0);
|
|
279
|
+
class CollectionStatsDocHydrated extends CollectionStatsDoc {
|
|
280
|
+
constructor(props) {
|
|
281
|
+
super(props);
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
exports.CollectionStatsDocHydrated = CollectionStatsDocHydrated;
|
|
279
285
|
__decorate([
|
|
280
286
|
(0, swagger_1.ApiProperty)({
|
|
281
287
|
description: 'Collection profile information',
|
|
@@ -283,4 +289,4 @@ __decorate([
|
|
|
283
289
|
type: (0, swagger_1.PartialType)(profile_1.CollectionProfileDoc),
|
|
284
290
|
}),
|
|
285
291
|
__metadata("design:type", Object)
|
|
286
|
-
],
|
|
292
|
+
], CollectionStatsDocHydrated.prototype, "collectionInfo", void 0);
|
|
@@ -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;
|
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
|
+
}
|