@arken/node 1.5.1 → 1.5.2
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/db.ts +76 -1
- package/index.ts +351 -18
- package/package.json +3 -3
- package/tsconfig.json +33 -2
- package/util.ts +1 -0
- package/modules/area/area.models.ts +0 -15
- package/modules/area/area.router.ts +0 -74
- package/modules/area/area.schema.ts +0 -22
- package/modules/area/area.service.ts +0 -124
- package/modules/area/area.types.ts +0 -26
- package/modules/area/index.ts +0 -5
- package/modules/asset/asset.models.ts +0 -59
- package/modules/asset/asset.router.ts +0 -55
- package/modules/asset/asset.schema.ts +0 -27
- package/modules/asset/asset.service.ts +0 -85
- package/modules/asset/asset.types.ts +0 -22
- package/modules/asset/index.ts +0 -5
- package/modules/chain/chain.models.ts +0 -50
- package/modules/chain/chain.router.ts +0 -104
- package/modules/chain/chain.schema.ts +0 -52
- package/modules/chain/chain.service.ts +0 -167
- package/modules/chain/chain.types.ts +0 -24
- package/modules/chain/index.ts +0 -5
- package/modules/character/character.models.ts +0 -174
- package/modules/character/character.router.ts +0 -314
- package/modules/character/character.schema.ts +0 -147
- package/modules/character/character.service.ts +0 -876
- package/modules/character/character.types.ts +0 -64
- package/modules/character/index.ts +0 -5
- package/modules/chat/chat.models.ts +0 -43
- package/modules/chat/chat.router.ts +0 -67
- package/modules/chat/chat.schema.ts +0 -36
- package/modules/chat/chat.service.ts +0 -128
- package/modules/chat/chat.types.ts +0 -20
- package/modules/chat/index.ts +0 -5
- package/modules/collection/collection.models.ts +0 -76
- package/modules/collection/collection.router.ts +0 -91
- package/modules/collection/collection.schema.ts +0 -90
- package/modules/collection/collection.service.ts +0 -192
- package/modules/collection/collection.types.ts +0 -36
- package/modules/collection/index.ts +0 -5
- package/modules/core/core.models.ts +0 -1380
- package/modules/core/core.router.ts +0 -1781
- package/modules/core/core.schema.ts +0 -847
- package/modules/core/core.service.ts +0 -2824
- package/modules/core/core.types.ts +0 -340
- package/modules/core/index.ts +0 -5
- package/modules/core/mail/applyPatchesOrMail.ts +0 -568
- package/modules/core/mail/mailClaimablePatchesBatch.ts +0 -381
- package/modules/game/game.models.ts +0 -53
- package/modules/game/game.router.ts +0 -110
- package/modules/game/game.schema.ts +0 -23
- package/modules/game/game.service.ts +0 -143
- package/modules/game/game.types.ts +0 -28
- package/modules/game/index.ts +0 -5
- package/modules/interface/index.ts +0 -5
- package/modules/interface/interface.canonicalize.ts +0 -279
- package/modules/interface/interface.models.ts +0 -40
- package/modules/interface/interface.router.ts +0 -175
- package/modules/interface/interface.schema.ts +0 -59
- package/modules/interface/interface.service.ts +0 -356
- package/modules/interface/interface.types.ts +0 -25
- package/modules/item/index.ts +0 -5
- package/modules/item/item.models.ts +0 -124
- package/modules/item/item.router.ts +0 -103
- package/modules/item/item.schema.ts +0 -120
- package/modules/item/item.service.ts +0 -167
- package/modules/item/item.types.ts +0 -74
- package/modules/job/index.ts +0 -5
- package/modules/job/job.models.ts +0 -14
- package/modules/job/job.router.ts +0 -44
- package/modules/job/job.schema.ts +0 -9
- package/modules/job/job.service.ts +0 -243
- package/modules/job/job.types.ts +0 -23
- package/modules/market/index.ts +0 -5
- package/modules/market/market.models.ts +0 -113
- package/modules/market/market.router.ts +0 -73
- package/modules/market/market.schema.ts +0 -140
- package/modules/market/market.service.ts +0 -122
- package/modules/market/market.types.ts +0 -56
- package/modules/product/index.ts +0 -5
- package/modules/product/product.models.ts +0 -166
- package/modules/product/product.router.ts +0 -93
- package/modules/product/product.schema.ts +0 -149
- package/modules/product/product.service.ts +0 -160
- package/modules/product/product.types.ts +0 -33
- package/modules/profile/index.ts +0 -5
- package/modules/profile/profile.models.ts +0 -214
- package/modules/profile/profile.router.ts +0 -72
- package/modules/profile/profile.schema.ts +0 -156
- package/modules/profile/profile.service.ts +0 -149
- package/modules/profile/profile.types.ts +0 -22
- package/modules/raffle/index.ts +0 -5
- package/modules/raffle/raffle.models.ts +0 -44
- package/modules/raffle/raffle.router.ts +0 -90
- package/modules/raffle/raffle.schema.ts +0 -32
- package/modules/raffle/raffle.service.ts +0 -167
- package/modules/raffle/raffle.types.ts +0 -30
- package/modules/skill/index.ts +0 -5
- package/modules/skill/skill.models.ts +0 -16
- package/modules/skill/skill.router.ts +0 -201
- package/modules/skill/skill.schema.ts +0 -40
- package/modules/skill/skill.service.ts +0 -390
- package/modules/skill/skill.types.ts +0 -33
- package/modules/video/index.ts +0 -5
- package/modules/video/video.models.ts +0 -25
- package/modules/video/video.router.ts +0 -143
- package/modules/video/video.schema.ts +0 -46
- package/modules/video/video.service.ts +0 -274
- package/modules/video/video.types.ts +0 -33
- package/util/db/index.ts +0 -7
- package/util/db/isPostgresError.ts +0 -9
- package/util/db/isUniqueConstraintViolation.ts +0 -3
- package/util/db.ts +0 -62
- package/util/index.ts +0 -351
- /package/{util/api.ts → api.ts} +0 -0
- /package/{util/array.ts → array.ts} +0 -0
- /package/{util/browser.ts → browser.ts} +0 -0
- /package/{util/codebase.ts → codebase.ts} +0 -0
- /package/{util/config.ts → config.ts} +0 -0
- /package/{util/decoder.test.ts → decoder.test.ts} +0 -0
- /package/{util/decoder.ts → decoder.ts} +0 -0
- /package/{util/format.ts → format.ts} +0 -0
- /package/{util/guid.ts → guid.ts} +0 -0
- /package/{util/json.ts → json.ts} +0 -0
- /package/{util/log.ts → log.ts} +0 -0
- /package/{util/math.ts → math.ts} +0 -0
- /package/{util/merkle.ts → merkle.ts} +0 -0
- /package/{util/mongo.ts → mongo.ts} +0 -0
- /package/{util/number.ts → number.ts} +0 -0
- /package/{util/object.ts → object.ts} +0 -0
- /package/{util/otp.ts → otp.ts} +0 -0
- /package/{util/physics.ts → physics.ts} +0 -0
- /package/{util/process.ts → process.ts} +0 -0
- /package/{util/rpc.ts → rpc.ts} +0 -0
- /package/{util/seer.ts → seer.ts} +0 -0
- /package/{util/string.ts → string.ts} +0 -0
- /package/{util/text.ts → text.ts} +0 -0
- /package/{util/time → time}/date.ts +0 -0
- /package/{util/time → time}/fancyTimeFormat.ts +0 -0
- /package/{util/time → time}/index.ts +0 -0
- /package/{util/time → time}/now.ts +0 -0
- /package/{util/types → types}/mongo.d.ts +0 -0
- /package/{util/web3 → web3}/httpProvider.ts +0 -0
- /package/{util/web3.ts → web3.ts} +0 -0
- /package/{util/websocket.ts → websocket.ts} +0 -0
- /package/{util/zk.ts → zk.ts} +0 -0
- /package/{util/zod.ts → zod.ts} +0 -0
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
// module/character.schema.ts
|
|
2
|
-
|
|
3
|
-
import { z, ObjectId, Entity } from '../../schema';
|
|
4
|
-
import { Item } from '../item/item.schema';
|
|
5
|
-
|
|
6
|
-
export const CharacterEquipment = Entity.merge(
|
|
7
|
-
z.object({
|
|
8
|
-
characterId: ObjectId,
|
|
9
|
-
leftHand: Item.optional(),
|
|
10
|
-
rightHand: Item.optional(),
|
|
11
|
-
head: Item.optional(),
|
|
12
|
-
pet: Item.optional(),
|
|
13
|
-
neck: Item.optional(),
|
|
14
|
-
legs: Item.optional(),
|
|
15
|
-
chest: Item.optional(),
|
|
16
|
-
waist: Item.optional(),
|
|
17
|
-
hands: Item.optional(),
|
|
18
|
-
wrists: Item.optional(),
|
|
19
|
-
shoulders: Item.optional(),
|
|
20
|
-
feet: Item.optional(),
|
|
21
|
-
finger1: Item.optional(),
|
|
22
|
-
finger2: Item.optional(),
|
|
23
|
-
trinket1: Item.optional(),
|
|
24
|
-
trinket2: Item.optional(),
|
|
25
|
-
trinket3: Item.optional(),
|
|
26
|
-
body: Item.optional(),
|
|
27
|
-
companion: Item.optional(),
|
|
28
|
-
mount: Item.optional(),
|
|
29
|
-
})
|
|
30
|
-
);
|
|
31
|
-
|
|
32
|
-
export const CharacterInventory = Entity.merge(
|
|
33
|
-
z.object({
|
|
34
|
-
characterId: ObjectId,
|
|
35
|
-
items: z.array(Item).default([]),
|
|
36
|
-
})
|
|
37
|
-
);
|
|
38
|
-
|
|
39
|
-
// Character schema
|
|
40
|
-
export const Character = Entity.merge(
|
|
41
|
-
z.object({
|
|
42
|
-
profileId: ObjectId.optional(),
|
|
43
|
-
ratingId: ObjectId.optional(),
|
|
44
|
-
classId: ObjectId.optional(),
|
|
45
|
-
raceId: ObjectId.optional(),
|
|
46
|
-
factionId: ObjectId.optional(),
|
|
47
|
-
genderId: ObjectId.optional(),
|
|
48
|
-
guildId: ObjectId.optional(),
|
|
49
|
-
token: z.string().min(1).optional(),
|
|
50
|
-
points: z.number().default(0),
|
|
51
|
-
isPrimary: z.boolean().default(false),
|
|
52
|
-
isBoss: z.boolean().default(false),
|
|
53
|
-
isPlayer: z.boolean().default(false),
|
|
54
|
-
equipmentIndex: z.number().default(0),
|
|
55
|
-
equipment: z.array(CharacterEquipment).default([]),
|
|
56
|
-
inventoryIndex: z.number().default(0),
|
|
57
|
-
inventory: z.array(CharacterInventory).default([]),
|
|
58
|
-
energyIds: z.array(ObjectId).optional(),
|
|
59
|
-
areaIds: z.array(ObjectId).optional(),
|
|
60
|
-
typeIds: z.array(ObjectId).optional(),
|
|
61
|
-
itemMaterialIds: z.array(ObjectId).optional(),
|
|
62
|
-
})
|
|
63
|
-
);
|
|
64
|
-
|
|
65
|
-
// CharacterAbility schema
|
|
66
|
-
export const CharacterAbility = Entity.merge(
|
|
67
|
-
z.object({
|
|
68
|
-
// Define fields for CharacterAbility here if needed
|
|
69
|
-
})
|
|
70
|
-
);
|
|
71
|
-
|
|
72
|
-
// CharacterAttribute schema
|
|
73
|
-
export const CharacterAttribute = Entity.merge(
|
|
74
|
-
z.object({
|
|
75
|
-
// Define fields for CharacterAttribute here if needed
|
|
76
|
-
})
|
|
77
|
-
);
|
|
78
|
-
|
|
79
|
-
// CharacterType schema
|
|
80
|
-
export const CharacterType = Entity.merge(
|
|
81
|
-
z.object({
|
|
82
|
-
// Define fields for CharacterType here if needed
|
|
83
|
-
})
|
|
84
|
-
);
|
|
85
|
-
|
|
86
|
-
// CharacterClass schema
|
|
87
|
-
export const CharacterClass = Entity.merge(
|
|
88
|
-
z.object({
|
|
89
|
-
// Define fields for CharacterClass here if needed
|
|
90
|
-
})
|
|
91
|
-
);
|
|
92
|
-
|
|
93
|
-
// CharacterRace schema
|
|
94
|
-
export const CharacterRace = Entity.merge(
|
|
95
|
-
z.object({
|
|
96
|
-
npcs: z.array(ObjectId).optional(),
|
|
97
|
-
})
|
|
98
|
-
);
|
|
99
|
-
|
|
100
|
-
// CharacterGender schema
|
|
101
|
-
export const CharacterGender = Entity.merge(
|
|
102
|
-
z.object({
|
|
103
|
-
// Define fields for CharacterGender here if needed
|
|
104
|
-
})
|
|
105
|
-
);
|
|
106
|
-
|
|
107
|
-
// CharacterPersonality schema
|
|
108
|
-
export const CharacterPersonality = Entity.merge(
|
|
109
|
-
z.object({
|
|
110
|
-
// Define fields for CharacterPersonality here if needed
|
|
111
|
-
})
|
|
112
|
-
);
|
|
113
|
-
|
|
114
|
-
// CharacterTitle schema
|
|
115
|
-
export const CharacterTitle = Entity.merge(
|
|
116
|
-
z.object({
|
|
117
|
-
// Define fields for CharacterTitle here if needed
|
|
118
|
-
})
|
|
119
|
-
);
|
|
120
|
-
|
|
121
|
-
// CharacterFaction schema
|
|
122
|
-
export const CharacterFaction = Entity.merge(
|
|
123
|
-
z.object({
|
|
124
|
-
shortDescription: z.string(),
|
|
125
|
-
// "npcs": [],
|
|
126
|
-
// "areas": [24, 77],
|
|
127
|
-
// "activeFactionConflict": [9], // CharacterFaction list
|
|
128
|
-
// "passiveFactionConflict": [6], // CharacterFaction list
|
|
129
|
-
// "activeGuildConflict": [], // Team
|
|
130
|
-
// "areaConflict": [], // Area list
|
|
131
|
-
// "characters": [] // Character list
|
|
132
|
-
})
|
|
133
|
-
);
|
|
134
|
-
|
|
135
|
-
// CharacterNameChoice schema
|
|
136
|
-
export const CharacterNameChoice = Entity.merge(
|
|
137
|
-
z.object({
|
|
138
|
-
// Define fields for CharacterNameChoice here if needed
|
|
139
|
-
})
|
|
140
|
-
);
|
|
141
|
-
|
|
142
|
-
// CharacterGuild schema
|
|
143
|
-
export const CharacterGuild = Entity.merge(
|
|
144
|
-
z.object({
|
|
145
|
-
// Define fields for CharacterGuild here if needed
|
|
146
|
-
})
|
|
147
|
-
);
|