@arken/seer-protocol 0.1.4 → 0.1.6
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/.rush/temp/shrinkwrap-deps.json +10 -3
- package/build/area/area.models.d.ts +6 -0
- package/build/area/area.models.js +11 -0
- package/build/area/area.models.js.map +1 -0
- package/build/area/area.router.d.ts +274 -0
- package/build/area/area.router.js +59 -0
- package/build/area/area.router.js.map +1 -0
- package/build/area/area.schema.d.ts +241 -0
- package/build/area/area.schema.js +13 -0
- package/build/area/area.schema.js.map +1 -0
- package/build/area/area.types.d.ts +19 -0
- package/build/area/area.types.js +2 -0
- package/build/area/area.types.js.map +1 -0
- package/build/area/index.d.ts +4 -0
- package/build/area/index.js +5 -0
- package/build/area/index.js.map +1 -0
- package/build/asset/asset.models.d.ts +5 -0
- package/build/asset/asset.models.js +44 -0
- package/build/asset/asset.models.js.map +1 -0
- package/build/asset/asset.router.d.ts +189 -0
- package/build/asset/asset.router.js +41 -0
- package/build/asset/asset.router.js.map +1 -0
- package/build/asset/asset.schema.d.ts +204 -0
- package/build/asset/asset.schema.js +22 -0
- package/build/asset/asset.schema.js.map +1 -0
- package/build/asset/asset.types.d.ts +16 -0
- package/build/asset/asset.types.js +2 -0
- package/build/asset/asset.types.js.map +1 -0
- package/build/asset/index.d.ts +4 -0
- package/build/asset/index.js +5 -0
- package/build/asset/index.js.map +1 -0
- package/build/chain/chain.models.d.ts +6 -0
- package/build/chain/chain.models.js +42 -0
- package/build/chain/chain.models.js.map +1 -0
- package/build/chain/chain.router.d.ts +364 -0
- package/build/chain/chain.router.js +84 -0
- package/build/chain/chain.router.js.map +1 -0
- package/build/chain/chain.schema.d.ts +317 -0
- package/build/chain/chain.schema.js +56 -0
- package/build/chain/chain.schema.js.map +1 -0
- package/build/chain/chain.types.d.ts +19 -0
- package/build/chain/chain.types.js +2 -0
- package/build/chain/chain.types.js.map +1 -0
- package/build/chain/index.d.ts +4 -0
- package/build/chain/index.js +5 -0
- package/build/chain/index.js.map +1 -0
- package/build/character/character.models.d.ts +14 -0
- package/build/character/character.models.js +123 -0
- package/build/character/character.models.js.map +1 -0
- package/build/character/character.router.d.ts +945 -0
- package/build/character/character.router.js +246 -0
- package/build/character/character.router.js.map +1 -0
- package/build/character/character.schema.d.ts +1223 -0
- package/build/character/character.schema.js +70 -0
- package/build/character/character.schema.js.map +1 -0
- package/build/character/character.types.d.ts +47 -0
- package/build/character/character.types.js +2 -0
- package/build/character/character.types.js.map +1 -0
- package/build/character/index.d.ts +4 -0
- package/build/character/index.js +5 -0
- package/build/character/index.js.map +1 -0
- package/build/chat/chat.models.d.ts +4 -0
- package/build/chat/chat.models.js +35 -0
- package/build/chat/chat.models.js.map +1 -0
- package/build/chat/chat.router.d.ts +223 -0
- package/build/chat/chat.router.js +51 -0
- package/build/chat/chat.router.js.map +1 -0
- package/build/chat/chat.schema.d.ts +179 -0
- package/build/chat/chat.schema.js +32 -0
- package/build/chat/chat.schema.js.map +1 -0
- package/build/chat/chat.types.d.ts +13 -0
- package/build/chat/chat.types.js +2 -0
- package/build/chat/chat.types.js.map +1 -0
- package/build/chat/index.d.ts +4 -0
- package/build/chat/index.js +5 -0
- package/build/chat/index.js.map +1 -0
- package/build/collection/collection.models.d.ts +9 -0
- package/build/collection/collection.models.js +69 -0
- package/build/collection/collection.models.js.map +1 -0
- package/build/collection/collection.router.d.ts +361 -0
- package/build/collection/collection.router.js +71 -0
- package/build/collection/collection.router.js.map +1 -0
- package/build/collection/collection.schema.d.ts +660 -0
- package/build/collection/collection.schema.js +70 -0
- package/build/collection/collection.schema.js.map +1 -0
- package/build/collection/collection.types.d.ts +28 -0
- package/build/collection/collection.types.js +2 -0
- package/build/collection/collection.types.js.map +1 -0
- package/build/collection/index.d.ts +4 -0
- package/build/collection/index.js +5 -0
- package/build/collection/index.js.map +1 -0
- package/build/core/core.models.d.ts +123 -0
- package/build/core/core.models.js +811 -0
- package/build/core/core.models.js.map +1 -0
- package/build/core/core.router.d.ts +5297 -0
- package/build/core/core.router.js +1372 -0
- package/build/core/core.router.js.map +1 -0
- package/build/core/core.schema.d.ts +5808 -0
- package/build/core/core.schema.js +612 -0
- package/build/core/core.schema.js.map +1 -0
- package/build/core/core.types.d.ts +250 -0
- package/build/core/core.types.js +2 -0
- package/build/core/core.types.js.map +1 -0
- package/build/core/index.d.ts +4 -0
- package/build/core/index.js +5 -0
- package/build/core/index.js.map +1 -0
- package/build/evolution/evolution.models.d.ts +1 -0
- package/build/evolution/evolution.models.js +3 -0
- package/build/evolution/evolution.models.js.map +1 -0
- package/build/evolution/evolution.router.d.ts +244 -0
- package/build/evolution/evolution.router.js +112 -0
- package/build/evolution/evolution.router.js.map +1 -0
- package/build/evolution/evolution.schema.d.ts +1 -0
- package/build/evolution/evolution.schema.js +2 -0
- package/build/evolution/evolution.schema.js.map +1 -0
- package/build/evolution/evolution.types.d.ts +3 -0
- package/build/evolution/evolution.types.js +2 -0
- package/build/evolution/evolution.types.js.map +1 -0
- package/build/evolution/index.d.ts +4 -0
- package/build/evolution/index.js +4 -0
- package/build/evolution/index.js.map +1 -0
- package/build/game/game.models.d.ts +6 -0
- package/build/game/game.models.js +29 -0
- package/build/game/game.models.js.map +1 -0
- package/build/game/game.router.d.ts +428 -0
- package/build/game/game.router.js +90 -0
- package/build/game/game.router.js.map +1 -0
- package/build/game/game.schema.d.ts +339 -0
- package/build/game/game.schema.js +14 -0
- package/build/game/game.schema.js.map +1 -0
- package/build/game/game.types.d.ts +19 -0
- package/build/game/game.types.js +2 -0
- package/build/game/game.types.js.map +1 -0
- package/build/game/index.d.ts +4 -0
- package/build/game/index.js +4 -0
- package/build/game/index.js.map +1 -0
- package/build/index.d.ts +30 -0
- package/build/index.js +26 -0
- package/build/index.js.map +1 -0
- package/build/infinite/index.d.ts +4 -0
- package/build/infinite/index.js +4 -0
- package/build/infinite/index.js.map +1 -0
- package/build/infinite/infinite.models.d.ts +1 -0
- package/build/infinite/infinite.models.js +3 -0
- package/build/infinite/infinite.models.js.map +1 -0
- package/build/infinite/infinite.router.d.ts +95 -0
- package/build/infinite/infinite.router.js +40 -0
- package/build/infinite/infinite.router.js.map +1 -0
- package/build/infinite/infinite.schema.d.ts +1 -0
- package/build/infinite/infinite.schema.js +2 -0
- package/build/infinite/infinite.schema.js.map +1 -0
- package/build/infinite/infinite.types.d.ts +3 -0
- package/build/infinite/infinite.types.js +2 -0
- package/build/infinite/infinite.types.js.map +1 -0
- package/build/interface/index.d.ts +4 -0
- package/build/interface/index.js +5 -0
- package/build/interface/index.js.map +1 -0
- package/build/interface/interface.canonicalize.d.ts +2 -0
- package/build/interface/interface.canonicalize.js +241 -0
- package/build/interface/interface.canonicalize.js.map +1 -0
- package/build/interface/interface.models.d.ts +6 -0
- package/build/interface/interface.models.js +30 -0
- package/build/interface/interface.models.js.map +1 -0
- package/build/interface/interface.router.d.ts +472 -0
- package/build/interface/interface.router.js +113 -0
- package/build/interface/interface.router.js.map +1 -0
- package/build/interface/interface.schema.d.ts +305 -0
- package/build/interface/interface.schema.js +36 -0
- package/build/interface/interface.schema.js.map +1 -0
- package/build/interface/interface.types.d.ts +18 -0
- package/build/interface/interface.types.js +2 -0
- package/build/interface/interface.types.js.map +1 -0
- package/build/isles/index.d.ts +4 -0
- package/build/isles/index.js +4 -0
- package/build/isles/index.js.map +1 -0
- package/build/isles/isles.models.d.ts +1 -0
- package/build/isles/isles.models.js +3 -0
- package/build/isles/isles.models.js.map +1 -0
- package/build/isles/isles.router.d.ts +95 -0
- package/build/isles/isles.router.js +40 -0
- package/build/isles/isles.router.js.map +1 -0
- package/build/isles/isles.schema.d.ts +1 -0
- package/build/isles/isles.schema.js +2 -0
- package/build/isles/isles.schema.js.map +1 -0
- package/build/isles/isles.types.d.ts +3 -0
- package/build/isles/isles.types.js +2 -0
- package/build/isles/isles.types.js.map +1 -0
- package/build/item/index.d.ts +4 -0
- package/build/item/index.js +5 -0
- package/build/item/index.js.map +1 -0
- package/build/item/item.models.d.ts +16 -0
- package/build/item/item.models.js +101 -0
- package/build/item/item.models.js.map +1 -0
- package/build/item/item.router.d.ts +263 -0
- package/build/item/item.router.js +70 -0
- package/build/item/item.router.js.map +1 -0
- package/build/item/item.schema.d.ts +765 -0
- package/build/item/item.schema.js +86 -0
- package/build/item/item.schema.js.map +1 -0
- package/build/item/item.types.d.ts +54 -0
- package/build/item/item.types.js +2 -0
- package/build/item/item.types.js.map +1 -0
- package/build/job/index.d.ts +4 -0
- package/build/job/index.js +5 -0
- package/build/job/index.js.map +1 -0
- package/build/job/job.models.d.ts +3 -0
- package/build/job/job.models.js +9 -0
- package/build/job/job.models.js.map +1 -0
- package/build/job/job.router.d.ts +146 -0
- package/build/job/job.router.js +32 -0
- package/build/job/job.router.js.map +1 -0
- package/build/job/job.schema.d.ts +66 -0
- package/build/job/job.schema.js +7 -0
- package/build/job/job.schema.js.map +1 -0
- package/build/job/job.types.d.ts +15 -0
- package/build/job/job.types.js +2 -0
- package/build/job/job.types.js.map +1 -0
- package/build/market/index.d.ts +4 -0
- package/build/market/index.js +5 -0
- package/build/market/index.js.map +1 -0
- package/build/market/market.models.d.ts +14 -0
- package/build/market/market.models.js +98 -0
- package/build/market/market.models.js.map +1 -0
- package/build/market/market.router.d.ts +230 -0
- package/build/market/market.router.js +56 -0
- package/build/market/market.router.js.map +1 -0
- package/build/market/market.schema.d.ts +937 -0
- package/build/market/market.schema.js +110 -0
- package/build/market/market.schema.js.map +1 -0
- package/build/market/market.types.d.ts +48 -0
- package/build/market/market.types.js +2 -0
- package/build/market/market.types.js.map +1 -0
- package/build/oasis/index.d.ts +4 -0
- package/build/oasis/index.js +4 -0
- package/build/oasis/index.js.map +1 -0
- package/build/oasis/oasis.models.d.ts +1 -0
- package/build/oasis/oasis.models.js +3 -0
- package/build/oasis/oasis.models.js.map +1 -0
- package/build/oasis/oasis.router.d.ts +91 -0
- package/build/oasis/oasis.router.js +52 -0
- package/build/oasis/oasis.router.js.map +1 -0
- package/build/oasis/oasis.schema.d.ts +1 -0
- package/build/oasis/oasis.schema.js +2 -0
- package/build/oasis/oasis.schema.js.map +1 -0
- package/build/oasis/oasis.types.d.ts +3 -0
- package/build/oasis/oasis.types.js +2 -0
- package/build/oasis/oasis.types.js.map +1 -0
- package/build/package.json +36 -0
- package/build/product/index.d.ts +4 -0
- package/build/product/index.js +5 -0
- package/build/product/index.js.map +1 -0
- package/build/product/product.models.d.ts +4 -0
- package/build/product/product.models.js +113 -0
- package/build/product/product.models.js.map +1 -0
- package/build/product/product.router.d.ts +447 -0
- package/build/product/product.router.js +71 -0
- package/build/product/product.router.js.map +1 -0
- package/build/product/product.schema.d.ts +640 -0
- package/build/product/product.schema.js +154 -0
- package/build/product/product.schema.js.map +1 -0
- package/build/product/product.types.d.ts +27 -0
- package/build/product/product.types.js +2 -0
- package/build/product/product.types.js.map +1 -0
- package/build/profile/index.d.ts +4 -0
- package/build/profile/index.js +5 -0
- package/build/profile/index.js.map +1 -0
- package/build/profile/profile.models.d.ts +2 -0
- package/build/profile/profile.models.js +165 -0
- package/build/profile/profile.models.js.map +1 -0
- package/build/profile/profile.router.d.ts +163 -0
- package/build/profile/profile.router.js +54 -0
- package/build/profile/profile.router.js.map +1 -0
- package/build/profile/profile.schema.d.ts +1 -0
- package/build/profile/profile.schema.js +201 -0
- package/build/profile/profile.schema.js.map +1 -0
- package/build/profile/profile.types.d.ts +15 -0
- package/build/profile/profile.types.js +2 -0
- package/build/profile/profile.types.js.map +1 -0
- package/build/raffle/index.d.ts +4 -0
- package/build/raffle/index.js +5 -0
- package/build/raffle/index.js.map +1 -0
- package/build/raffle/raffle.models.d.ts +6 -0
- package/build/raffle/raffle.models.js +36 -0
- package/build/raffle/raffle.models.js.map +1 -0
- package/build/raffle/raffle.router.d.ts +299 -0
- package/build/raffle/raffle.router.js +71 -0
- package/build/raffle/raffle.router.js.map +1 -0
- package/build/raffle/raffle.schema.d.ts +261 -0
- package/build/raffle/raffle.schema.js +21 -0
- package/build/raffle/raffle.schema.js.map +1 -0
- package/build/raffle/raffle.types.d.ts +24 -0
- package/build/raffle/raffle.types.js +2 -0
- package/build/raffle/raffle.types.js.map +1 -0
- package/build/router.d.ts +10755 -0
- package/build/router.js +87 -0
- package/build/router.js.map +1 -0
- package/build/schema.d.ts +279 -0
- package/build/schema.js +157 -0
- package/build/schema.js.map +1 -0
- package/build/skill/index.d.ts +4 -0
- package/build/skill/index.js +5 -0
- package/build/skill/index.js.map +1 -0
- package/build/skill/skill.models.d.ts +9 -0
- package/build/skill/skill.models.js +9 -0
- package/build/skill/skill.models.js.map +1 -0
- package/build/skill/skill.router.d.ts +659 -0
- package/build/skill/skill.router.js +152 -0
- package/build/skill/skill.router.js.map +1 -0
- package/build/skill/skill.schema.d.ts +536 -0
- package/build/skill/skill.schema.js +38 -0
- package/build/skill/skill.schema.js.map +1 -0
- package/build/skill/skill.types.d.ts +28 -0
- package/build/skill/skill.types.js +2 -0
- package/build/skill/skill.types.js.map +1 -0
- package/build/trek/index.d.ts +4 -0
- package/build/trek/index.js +4 -0
- package/build/trek/index.js.map +1 -0
- package/build/trek/trek.models.d.ts +1 -0
- package/build/trek/trek.models.js +2 -0
- package/build/trek/trek.models.js.map +1 -0
- package/build/trek/trek.router.d.ts +86 -0
- package/build/trek/trek.router.js +43 -0
- package/build/trek/trek.router.js.map +1 -0
- package/build/trek/trek.schema.d.ts +1 -0
- package/build/trek/trek.schema.js +2 -0
- package/build/trek/trek.schema.js.map +1 -0
- package/build/trek/trek.types.d.ts +1 -0
- package/build/trek/trek.types.js +2 -0
- package/build/trek/trek.types.js.map +1 -0
- package/build/types.d.ts +187 -0
- package/build/types.js +29 -0
- package/build/types.js.map +1 -0
- package/build/video/index.d.ts +4 -0
- package/build/video/index.js +5 -0
- package/build/video/index.js.map +1 -0
- package/build/video/video.models.d.ts +7 -0
- package/build/video/video.models.js +19 -0
- package/build/video/video.models.js.map +1 -0
- package/build/video/video.router.d.ts +563 -0
- package/build/video/video.router.js +112 -0
- package/build/video/video.router.js.map +1 -0
- package/build/video/video.schema.d.ts +446 -0
- package/build/video/video.schema.js +31 -0
- package/build/video/video.schema.js.map +1 -0
- package/build/video/video.types.d.ts +27 -0
- package/build/video/video.types.js +2 -0
- package/build/video/video.types.js.map +1 -0
- package/package.json +11 -4
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { z, ObjectId, Entity } from '../schema';
|
|
2
|
+
import { Item } from '../item/item.schema';
|
|
3
|
+
export const CharacterEquipment = Entity.merge(z.object({
|
|
4
|
+
characterId: ObjectId,
|
|
5
|
+
leftHand: Item.optional(),
|
|
6
|
+
rightHand: Item.optional(),
|
|
7
|
+
head: Item.optional(),
|
|
8
|
+
pet: Item.optional(),
|
|
9
|
+
neck: Item.optional(),
|
|
10
|
+
legs: Item.optional(),
|
|
11
|
+
chest: Item.optional(),
|
|
12
|
+
waist: Item.optional(),
|
|
13
|
+
hands: Item.optional(),
|
|
14
|
+
wrists: Item.optional(),
|
|
15
|
+
shoulders: Item.optional(),
|
|
16
|
+
feet: Item.optional(),
|
|
17
|
+
finger1: Item.optional(),
|
|
18
|
+
finger2: Item.optional(),
|
|
19
|
+
trinket1: Item.optional(),
|
|
20
|
+
trinket2: Item.optional(),
|
|
21
|
+
trinket3: Item.optional(),
|
|
22
|
+
body: Item.optional(),
|
|
23
|
+
companion: Item.optional(),
|
|
24
|
+
mount: Item.optional(),
|
|
25
|
+
}));
|
|
26
|
+
export const CharacterInventory = Entity.merge(z.object({
|
|
27
|
+
characterId: ObjectId,
|
|
28
|
+
items: z.array(Item).default([]),
|
|
29
|
+
}));
|
|
30
|
+
export const Character = Entity.merge(z.object({
|
|
31
|
+
profileId: ObjectId.optional(),
|
|
32
|
+
ratingId: ObjectId.optional(),
|
|
33
|
+
classId: ObjectId.optional(),
|
|
34
|
+
raceId: ObjectId.optional(),
|
|
35
|
+
factionId: ObjectId.optional(),
|
|
36
|
+
genderId: ObjectId.optional(),
|
|
37
|
+
guildId: ObjectId.optional(),
|
|
38
|
+
token: z
|
|
39
|
+
.string()
|
|
40
|
+
.min(1)
|
|
41
|
+
.optional(),
|
|
42
|
+
points: z.number().default(0),
|
|
43
|
+
isPrimary: z.boolean().default(false),
|
|
44
|
+
isBoss: z.boolean().default(false),
|
|
45
|
+
isPlayer: z.boolean().default(false),
|
|
46
|
+
equipmentIndex: z.number().default(0),
|
|
47
|
+
equipment: z.array(CharacterEquipment).default([]),
|
|
48
|
+
inventoryIndex: z.number().default(0),
|
|
49
|
+
inventory: z.array(CharacterInventory).default([]),
|
|
50
|
+
energyIds: z.array(ObjectId).optional(),
|
|
51
|
+
areaIds: z.array(ObjectId).optional(),
|
|
52
|
+
typeIds: z.array(ObjectId).optional(),
|
|
53
|
+
itemMaterialIds: z.array(ObjectId).optional(),
|
|
54
|
+
}));
|
|
55
|
+
export const CharacterAbility = Entity.merge(z.object({}));
|
|
56
|
+
export const CharacterAttribute = Entity.merge(z.object({}));
|
|
57
|
+
export const CharacterType = Entity.merge(z.object({}));
|
|
58
|
+
export const CharacterClass = Entity.merge(z.object({}));
|
|
59
|
+
export const CharacterRace = Entity.merge(z.object({
|
|
60
|
+
npcs: z.array(ObjectId).optional(),
|
|
61
|
+
}));
|
|
62
|
+
export const CharacterGender = Entity.merge(z.object({}));
|
|
63
|
+
export const CharacterPersonality = Entity.merge(z.object({}));
|
|
64
|
+
export const CharacterTitle = Entity.merge(z.object({}));
|
|
65
|
+
export const CharacterFaction = Entity.merge(z.object({
|
|
66
|
+
shortDescription: z.string(),
|
|
67
|
+
}));
|
|
68
|
+
export const CharacterNameChoice = Entity.merge(z.object({}));
|
|
69
|
+
export const CharacterGuild = Entity.merge(z.object({}));
|
|
70
|
+
//# sourceMappingURL=character.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"character.schema.js","sourceRoot":"","sources":["../../character/character.schema.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAChD,OA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,CAAC,MAAM,CAAC;IACP,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE;CAQ7B,CAAC,CACH,CAAC;AAGF,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC,KAAK,CAC7C,CAAC,CAAC,MAAM,CAAC,EAER,CAAC,CACH,CAAC;AAGF,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,KAAK,CACxC,CAAC,CAAC,MAAM,CAAC,EAER,CAAC,CACH,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import * as schema from './character.schema';
|
|
3
|
+
import { Document, Model } from '@arken/node/mongo';
|
|
4
|
+
export type * from './character.router';
|
|
5
|
+
export type { RouterContext } from '../types';
|
|
6
|
+
export type Character = z.infer<typeof schema.Character>;
|
|
7
|
+
export type CharacterDocument = Character & Document;
|
|
8
|
+
export type CharacterEquipment = z.infer<typeof schema.CharacterEquipment>;
|
|
9
|
+
export type CharacterEquipmentDocument = CharacterEquipment & Document;
|
|
10
|
+
export type CharacterInventory = z.infer<typeof schema.CharacterInventory>;
|
|
11
|
+
export type CharacterInventoryDocument = CharacterInventory & Document;
|
|
12
|
+
export type CharacterAbility = z.infer<typeof schema.CharacterAbility>;
|
|
13
|
+
export type CharacterAbilityDocument = CharacterAbility & Document;
|
|
14
|
+
export type CharacterAttribute = z.infer<typeof schema.CharacterAttribute>;
|
|
15
|
+
export type CharacterAttributeDocument = CharacterAttribute & Document;
|
|
16
|
+
export type CharacterClass = z.infer<typeof schema.CharacterClass>;
|
|
17
|
+
export type CharacterClassDocument = CharacterClass & Document;
|
|
18
|
+
export type CharacterFaction = z.infer<typeof schema.CharacterFaction>;
|
|
19
|
+
export type CharacterFactionDocument = CharacterFaction & Document;
|
|
20
|
+
export type CharacterGender = z.infer<typeof schema.CharacterGender>;
|
|
21
|
+
export type CharacterGenderDocument = CharacterGender & Document;
|
|
22
|
+
export type CharacterNameChoice = z.infer<typeof schema.CharacterNameChoice>;
|
|
23
|
+
export type CharacterNameChoiceDocument = CharacterNameChoice & Document;
|
|
24
|
+
export type CharacterPersonality = z.infer<typeof schema.CharacterPersonality>;
|
|
25
|
+
export type CharacterPersonalityDocument = CharacterPersonality & Document;
|
|
26
|
+
export type CharacterRace = z.infer<typeof schema.CharacterRace>;
|
|
27
|
+
export type CharacterRaceDocument = CharacterRace & Document;
|
|
28
|
+
export type CharacterTitle = z.infer<typeof schema.CharacterTitle>;
|
|
29
|
+
export type CharacterTitleDocument = CharacterTitle & Document;
|
|
30
|
+
export type CharacterType = z.infer<typeof schema.CharacterType>;
|
|
31
|
+
export type CharacterTypeDocument = CharacterType & Document;
|
|
32
|
+
export type CharacterGuild = z.infer<typeof schema.CharacterGuild>;
|
|
33
|
+
export type CharacterGuildDocument = CharacterGuild & Document;
|
|
34
|
+
export type Mappings = {
|
|
35
|
+
Character: Model<CharacterDocument>;
|
|
36
|
+
CharacterAbility: Model<CharacterAbilityDocument>;
|
|
37
|
+
CharacterAttribute: Model<CharacterAttributeDocument>;
|
|
38
|
+
CharacterClass: Model<CharacterClassDocument>;
|
|
39
|
+
CharacterFaction: Model<CharacterFactionDocument>;
|
|
40
|
+
CharacterGender: Model<CharacterGenderDocument>;
|
|
41
|
+
CharacterNameChoice: Model<CharacterNameChoiceDocument>;
|
|
42
|
+
CharacterPersonality: Model<CharacterPersonalityDocument>;
|
|
43
|
+
CharacterRace: Model<CharacterRaceDocument>;
|
|
44
|
+
CharacterTitle: Model<CharacterTitleDocument>;
|
|
45
|
+
CharacterType: Model<CharacterTypeDocument>;
|
|
46
|
+
CharacterGuild: Model<CharacterGuildDocument>;
|
|
47
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"character.types.js","sourceRoot":"","sources":["../../character/character.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../character/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC;AAC3C,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAC;AAC7C,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAC9C,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as mongo from '@arken/node/mongo';
|
|
2
|
+
import type * as Types from './chat.types';
|
|
3
|
+
export declare const ChatGroup: mongo.Model<any> | mongo.Model<Types.ChatGroupDocument>;
|
|
4
|
+
export declare const ChatMessage: mongo.Model<any> | mongo.Model<Types.ChatMessageDocument>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as mongo from '@arken/node/mongo';
|
|
2
|
+
export const ChatGroup = mongo.createModel('ChatGroup', {
|
|
3
|
+
name: { type: String, required: true, maxlength: 100 },
|
|
4
|
+
type: { type: String, required: true, enum: ['group', 'private'] },
|
|
5
|
+
members: [{ type: mongo.Schema.Types.ObjectId, ref: 'Profile' }],
|
|
6
|
+
externalId: { type: String },
|
|
7
|
+
externalPlatform: { type: String, enum: ['Telegram', 'Discord'] },
|
|
8
|
+
});
|
|
9
|
+
export const ChatMessage = mongo.createModel('ChatMessage', {
|
|
10
|
+
groupId: { type: mongo.Schema.Types.ObjectId, ref: 'ChatGroup', required: true },
|
|
11
|
+
profileId: { type: mongo.Schema.Types.ObjectId, ref: 'Profile', required: true },
|
|
12
|
+
content: { type: String },
|
|
13
|
+
mediaUrl: { type: String },
|
|
14
|
+
replyToId: { type: mongo.Schema.Types.ObjectId, ref: 'ChatMessage' },
|
|
15
|
+
reactions: [
|
|
16
|
+
{
|
|
17
|
+
profileId: { type: mongo.Schema.Types.ObjectId, ref: 'Profile' },
|
|
18
|
+
reaction: { type: String },
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
externalId: { type: String },
|
|
22
|
+
externalPlatform: { type: String, enum: ['Telegram', 'Discord'] },
|
|
23
|
+
isSpam: { type: Boolean, default: false },
|
|
24
|
+
tags: { type: mongo.Schema.Types.Mixed },
|
|
25
|
+
summary: { type: String },
|
|
26
|
+
entities: { type: mongo.Schema.Types.Mixed },
|
|
27
|
+
type: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: 'text',
|
|
30
|
+
enum: ['text', 'image', 'video', 'audio', 'file', 'system'],
|
|
31
|
+
},
|
|
32
|
+
}, {
|
|
33
|
+
indexes: [{ groupId: 1, createdDate: 1 }, { profileId: 1 }, { status: 1 }, { replyToId: 1 }, { type: 1 }],
|
|
34
|
+
});
|
|
35
|
+
//# sourceMappingURL=chat.models.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat.models.js","sourceRoot":"","sources":["../../chat/chat.models.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC;AAI3C,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,CAAC,WAAW,CAA0B,WAAW,EAAE;IAC/E,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE;IACtD,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,OAAO,EAAE,SAAS,CAAC,EAAE;IAClE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC;IAChE,UAAU,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;IAC5B,gBAAgB,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC,EAAE;CAClE,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,WAAW,GAAG,KAAK,CAAC,WAAW,CAC1C,aAAa,EACb;IACE,OAAO,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC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,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;CAC1G,CACF,CAAC"}
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
import { z as zod } from 'zod';
|
|
2
|
+
import { inferRouterInputs, inferRouterOutputs } from '@trpc/server';
|
|
3
|
+
import type { RouterContext } from '../types';
|
|
4
|
+
export declare const z: typeof zod;
|
|
5
|
+
export declare const t: {
|
|
6
|
+
_config: import("@trpc/server/dist/unstable-core-do-not-import").RootConfig<{
|
|
7
|
+
ctx: RouterContext;
|
|
8
|
+
meta: object;
|
|
9
|
+
errorShape: import("@trpc/server/dist/unstable-core-do-not-import").DefaultErrorShape;
|
|
10
|
+
transformer: false;
|
|
11
|
+
}>;
|
|
12
|
+
procedure: import("@trpc/server/dist/unstable-core-do-not-import").ProcedureBuilder<RouterContext, object, object, typeof import("@trpc/server/dist/unstable-core-do-not-import").unsetMarker, typeof import("@trpc/server/dist/unstable-core-do-not-import").unsetMarker, typeof import("@trpc/server/dist/unstable-core-do-not-import").unsetMarker, typeof import("@trpc/server/dist/unstable-core-do-not-import").unsetMarker, false>;
|
|
13
|
+
middleware: <$ContextOverrides>(fn: import("@trpc/server/dist/unstable-core-do-not-import").MiddlewareFunction<RouterContext, object, object, $ContextOverrides, unknown>) => import("@trpc/server/dist/unstable-core-do-not-import").MiddlewareBuilder<RouterContext, object, $ContextOverrides, unknown>;
|
|
14
|
+
router: {
|
|
15
|
+
<TInput extends import("@trpc/server").RouterRecord>(input: TInput): import("@trpc/server/dist/unstable-core-do-not-import").BuiltRouter<{
|
|
16
|
+
ctx: RouterContext;
|
|
17
|
+
meta: object;
|
|
18
|
+
errorShape: import("@trpc/server/dist/unstable-core-do-not-import").DefaultErrorShape;
|
|
19
|
+
transformer: false;
|
|
20
|
+
}, TInput>;
|
|
21
|
+
<TInput extends import("@trpc/server/dist/unstable-core-do-not-import").CreateRouterOptions>(input: TInput): import("@trpc/server/dist/unstable-core-do-not-import").BuiltRouter<{
|
|
22
|
+
ctx: RouterContext;
|
|
23
|
+
meta: object;
|
|
24
|
+
errorShape: import("@trpc/server/dist/unstable-core-do-not-import").DefaultErrorShape;
|
|
25
|
+
transformer: false;
|
|
26
|
+
}, import("@trpc/server/dist/unstable-core-do-not-import").DecorateCreateRouterOptions<TInput>>;
|
|
27
|
+
};
|
|
28
|
+
mergeRouters: typeof import("@trpc/server/dist/unstable-core-do-not-import").mergeRouters;
|
|
29
|
+
createCallerFactory: <TRecord extends import("@trpc/server").RouterRecord>(router: Pick<import("@trpc/server/dist/unstable-core-do-not-import").Router<{
|
|
30
|
+
ctx: RouterContext;
|
|
31
|
+
meta: object;
|
|
32
|
+
errorShape: import("@trpc/server/dist/unstable-core-do-not-import").DefaultErrorShape;
|
|
33
|
+
transformer: false;
|
|
34
|
+
}, TRecord>, "_def">) => import("@trpc/server/dist/unstable-core-do-not-import").RouterCaller<{
|
|
35
|
+
ctx: RouterContext;
|
|
36
|
+
meta: object;
|
|
37
|
+
errorShape: import("@trpc/server/dist/unstable-core-do-not-import").DefaultErrorShape;
|
|
38
|
+
transformer: false;
|
|
39
|
+
}, TRecord>;
|
|
40
|
+
};
|
|
41
|
+
export declare const router: {
|
|
42
|
+
<TInput extends import("@trpc/server").RouterRecord>(input: TInput): import("@trpc/server/dist/unstable-core-do-not-import").BuiltRouter<{
|
|
43
|
+
ctx: RouterContext;
|
|
44
|
+
meta: object;
|
|
45
|
+
errorShape: import("@trpc/server/dist/unstable-core-do-not-import").DefaultErrorShape;
|
|
46
|
+
transformer: false;
|
|
47
|
+
}, TInput>;
|
|
48
|
+
<TInput extends import("@trpc/server/dist/unstable-core-do-not-import").CreateRouterOptions>(input: TInput): import("@trpc/server/dist/unstable-core-do-not-import").BuiltRouter<{
|
|
49
|
+
ctx: RouterContext;
|
|
50
|
+
meta: object;
|
|
51
|
+
errorShape: import("@trpc/server/dist/unstable-core-do-not-import").DefaultErrorShape;
|
|
52
|
+
transformer: false;
|
|
53
|
+
}, import("@trpc/server/dist/unstable-core-do-not-import").DecorateCreateRouterOptions<TInput>>;
|
|
54
|
+
};
|
|
55
|
+
export declare const procedure: import("@trpc/server/dist/unstable-core-do-not-import").ProcedureBuilder<RouterContext, object, object, typeof import("@trpc/server/dist/unstable-core-do-not-import").unsetMarker, typeof import("@trpc/server/dist/unstable-core-do-not-import").unsetMarker, typeof import("@trpc/server/dist/unstable-core-do-not-import").unsetMarker, typeof import("@trpc/server/dist/unstable-core-do-not-import").unsetMarker, false>;
|
|
56
|
+
export declare const createRouter: () => import("@trpc/server/dist/unstable-core-do-not-import").BuiltRouter<{
|
|
57
|
+
ctx: RouterContext;
|
|
58
|
+
meta: object;
|
|
59
|
+
errorShape: import("@trpc/server/dist/unstable-core-do-not-import").DefaultErrorShape;
|
|
60
|
+
transformer: false;
|
|
61
|
+
}, {
|
|
62
|
+
getChatGroup: import("@trpc/server").TRPCQueryProcedure<{
|
|
63
|
+
input: {
|
|
64
|
+
chatGroupId?: string;
|
|
65
|
+
};
|
|
66
|
+
output: any;
|
|
67
|
+
}>;
|
|
68
|
+
getChatGroups: import("@trpc/server").TRPCQueryProcedure<{
|
|
69
|
+
input: {
|
|
70
|
+
chatGroupId?: string;
|
|
71
|
+
};
|
|
72
|
+
output: any;
|
|
73
|
+
}>;
|
|
74
|
+
createChatGroup: import("@trpc/server").TRPCMutationProcedure<{
|
|
75
|
+
input: {
|
|
76
|
+
name?: string;
|
|
77
|
+
key?: string;
|
|
78
|
+
id?: string | import("mongoose").Types.ObjectId;
|
|
79
|
+
data?: any;
|
|
80
|
+
type?: "group" | "private";
|
|
81
|
+
description?: string;
|
|
82
|
+
applicationId?: string | import("mongoose").Types.ObjectId;
|
|
83
|
+
createdDate?: Date;
|
|
84
|
+
updatedDate?: Date;
|
|
85
|
+
status?: "Active" | "Paused" | "Pending" | "Archived";
|
|
86
|
+
ownerId?: string | import("mongoose").Types.ObjectId;
|
|
87
|
+
meta?: any;
|
|
88
|
+
merkleLeaf?: string;
|
|
89
|
+
merkleIndex?: number;
|
|
90
|
+
createdById?: string | import("mongoose").Types.ObjectId;
|
|
91
|
+
editedById?: string | import("mongoose").Types.ObjectId;
|
|
92
|
+
deletedById?: string | import("mongoose").Types.ObjectId;
|
|
93
|
+
deletedDate?: Date;
|
|
94
|
+
members?: (string | import("mongoose").Types.ObjectId)[];
|
|
95
|
+
externalId?: string;
|
|
96
|
+
externalPlatform?: "Telegram" | "Discord";
|
|
97
|
+
};
|
|
98
|
+
output: any;
|
|
99
|
+
}>;
|
|
100
|
+
updateChatGroup: import("@trpc/server").TRPCMutationProcedure<{
|
|
101
|
+
input: {
|
|
102
|
+
data?: {
|
|
103
|
+
name?: string;
|
|
104
|
+
key?: string;
|
|
105
|
+
id?: string | import("mongoose").Types.ObjectId;
|
|
106
|
+
data?: any;
|
|
107
|
+
type?: "group" | "private";
|
|
108
|
+
description?: string;
|
|
109
|
+
applicationId?: string | import("mongoose").Types.ObjectId;
|
|
110
|
+
createdDate?: Date;
|
|
111
|
+
updatedDate?: Date;
|
|
112
|
+
status?: "Active" | "Paused" | "Pending" | "Archived";
|
|
113
|
+
ownerId?: string | import("mongoose").Types.ObjectId;
|
|
114
|
+
meta?: any;
|
|
115
|
+
merkleLeaf?: string;
|
|
116
|
+
merkleIndex?: number;
|
|
117
|
+
createdById?: string | import("mongoose").Types.ObjectId;
|
|
118
|
+
editedById?: string | import("mongoose").Types.ObjectId;
|
|
119
|
+
deletedById?: string | import("mongoose").Types.ObjectId;
|
|
120
|
+
deletedDate?: Date;
|
|
121
|
+
members?: (string | import("mongoose").Types.ObjectId)[];
|
|
122
|
+
externalId?: string;
|
|
123
|
+
externalPlatform?: "Telegram" | "Discord";
|
|
124
|
+
};
|
|
125
|
+
chatGroupId?: string;
|
|
126
|
+
};
|
|
127
|
+
output: any;
|
|
128
|
+
}>;
|
|
129
|
+
getChatMessage: import("@trpc/server").TRPCQueryProcedure<{
|
|
130
|
+
input: {
|
|
131
|
+
chatMessageId?: string;
|
|
132
|
+
};
|
|
133
|
+
output: any;
|
|
134
|
+
}>;
|
|
135
|
+
getChatMessages: import("@trpc/server").TRPCQueryProcedure<{
|
|
136
|
+
input: {
|
|
137
|
+
chatMessageId?: string;
|
|
138
|
+
};
|
|
139
|
+
output: any;
|
|
140
|
+
}>;
|
|
141
|
+
createChatMessage: import("@trpc/server").TRPCMutationProcedure<{
|
|
142
|
+
input: {
|
|
143
|
+
name?: string;
|
|
144
|
+
key?: string;
|
|
145
|
+
id?: string | import("mongoose").Types.ObjectId;
|
|
146
|
+
data?: any;
|
|
147
|
+
type?: "text" | "image" | "video" | "audio" | "file" | "system";
|
|
148
|
+
description?: string;
|
|
149
|
+
applicationId?: string | import("mongoose").Types.ObjectId;
|
|
150
|
+
tags?: unknown[];
|
|
151
|
+
createdDate?: Date;
|
|
152
|
+
updatedDate?: Date;
|
|
153
|
+
status?: "Active" | "Paused" | "Pending" | "Archived";
|
|
154
|
+
ownerId?: string | import("mongoose").Types.ObjectId;
|
|
155
|
+
meta?: any;
|
|
156
|
+
merkleLeaf?: string;
|
|
157
|
+
merkleIndex?: number;
|
|
158
|
+
createdById?: string | import("mongoose").Types.ObjectId;
|
|
159
|
+
editedById?: string | import("mongoose").Types.ObjectId;
|
|
160
|
+
deletedById?: string | import("mongoose").Types.ObjectId;
|
|
161
|
+
deletedDate?: Date;
|
|
162
|
+
content?: string;
|
|
163
|
+
profileId?: string | import("mongoose").Types.ObjectId;
|
|
164
|
+
externalId?: string;
|
|
165
|
+
externalPlatform?: "Telegram" | "Discord";
|
|
166
|
+
groupId?: string | import("mongoose").Types.ObjectId;
|
|
167
|
+
mediaUrl?: string;
|
|
168
|
+
replyToId?: string | import("mongoose").Types.ObjectId;
|
|
169
|
+
reactions?: {
|
|
170
|
+
profileId?: string | import("mongoose").Types.ObjectId;
|
|
171
|
+
reaction?: string;
|
|
172
|
+
}[];
|
|
173
|
+
isSpam?: boolean;
|
|
174
|
+
summary?: string;
|
|
175
|
+
entities?: unknown[];
|
|
176
|
+
};
|
|
177
|
+
output: any;
|
|
178
|
+
}>;
|
|
179
|
+
updateChatMessage: import("@trpc/server").TRPCMutationProcedure<{
|
|
180
|
+
input: {
|
|
181
|
+
data?: {
|
|
182
|
+
name?: string;
|
|
183
|
+
key?: string;
|
|
184
|
+
id?: string | import("mongoose").Types.ObjectId;
|
|
185
|
+
data?: any;
|
|
186
|
+
type?: "text" | "image" | "video" | "audio" | "file" | "system";
|
|
187
|
+
description?: string;
|
|
188
|
+
applicationId?: string | import("mongoose").Types.ObjectId;
|
|
189
|
+
tags?: unknown[];
|
|
190
|
+
createdDate?: Date;
|
|
191
|
+
updatedDate?: Date;
|
|
192
|
+
status?: "Active" | "Paused" | "Pending" | "Archived";
|
|
193
|
+
ownerId?: string | import("mongoose").Types.ObjectId;
|
|
194
|
+
meta?: any;
|
|
195
|
+
merkleLeaf?: string;
|
|
196
|
+
merkleIndex?: number;
|
|
197
|
+
createdById?: string | import("mongoose").Types.ObjectId;
|
|
198
|
+
editedById?: string | import("mongoose").Types.ObjectId;
|
|
199
|
+
deletedById?: string | import("mongoose").Types.ObjectId;
|
|
200
|
+
deletedDate?: Date;
|
|
201
|
+
content?: string;
|
|
202
|
+
profileId?: string | import("mongoose").Types.ObjectId;
|
|
203
|
+
externalId?: string;
|
|
204
|
+
externalPlatform?: "Telegram" | "Discord";
|
|
205
|
+
groupId?: string | import("mongoose").Types.ObjectId;
|
|
206
|
+
mediaUrl?: string;
|
|
207
|
+
replyToId?: string | import("mongoose").Types.ObjectId;
|
|
208
|
+
reactions?: {
|
|
209
|
+
profileId?: string | import("mongoose").Types.ObjectId;
|
|
210
|
+
reaction?: string;
|
|
211
|
+
}[];
|
|
212
|
+
isSpam?: boolean;
|
|
213
|
+
summary?: string;
|
|
214
|
+
entities?: unknown[];
|
|
215
|
+
};
|
|
216
|
+
chatMessageId?: string;
|
|
217
|
+
};
|
|
218
|
+
output: any;
|
|
219
|
+
}>;
|
|
220
|
+
}>;
|
|
221
|
+
export type Router = ReturnType<typeof createRouter>;
|
|
222
|
+
export type RouterInput = inferRouterInputs<Router>;
|
|
223
|
+
export type RouterOutput = inferRouterOutputs<Router>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { z as zod } from 'zod';
|
|
2
|
+
import { initTRPC } from '@trpc/server';
|
|
3
|
+
import { customErrorFormatter, hasRole } from '@arken/node/rpc';
|
|
4
|
+
import { ChatGroup, ChatMessage } from './chat.schema';
|
|
5
|
+
export const z = zod;
|
|
6
|
+
export const t = initTRPC.context().create();
|
|
7
|
+
export const router = t.router;
|
|
8
|
+
export const procedure = t.procedure;
|
|
9
|
+
export const createRouter = () => router({
|
|
10
|
+
getChatGroup: procedure
|
|
11
|
+
.use(hasRole('guest', t))
|
|
12
|
+
.use(customErrorFormatter(t))
|
|
13
|
+
.input(z.object({ chatGroupId: z.string() }))
|
|
14
|
+
.query(({ input, ctx }) => ctx.app.service.Chat.getChatGroup(input, ctx)),
|
|
15
|
+
getChatGroups: procedure
|
|
16
|
+
.use(hasRole('guest', t))
|
|
17
|
+
.use(customErrorFormatter(t))
|
|
18
|
+
.input(z.object({ chatGroupId: z.string() }))
|
|
19
|
+
.query(({ input, ctx }) => ctx.app.service.Chat.getChatGroup(input, ctx)),
|
|
20
|
+
createChatGroup: procedure
|
|
21
|
+
.use(hasRole('admin', t))
|
|
22
|
+
.use(customErrorFormatter(t))
|
|
23
|
+
.input(ChatGroup)
|
|
24
|
+
.mutation(({ input, ctx }) => ctx.app.service.Chat.createChatGroup(input, ctx)),
|
|
25
|
+
updateChatGroup: procedure
|
|
26
|
+
.use(hasRole('admin', t))
|
|
27
|
+
.use(customErrorFormatter(t))
|
|
28
|
+
.input(z.object({ chatGroupId: z.string(), data: ChatGroup.partial() }))
|
|
29
|
+
.mutation(({ input, ctx }) => ctx.app.service.Chat.updateChatGroup(input, ctx)),
|
|
30
|
+
getChatMessage: procedure
|
|
31
|
+
.use(hasRole('guest', t))
|
|
32
|
+
.use(customErrorFormatter(t))
|
|
33
|
+
.input(z.object({ chatMessageId: z.string() }))
|
|
34
|
+
.query(({ input, ctx }) => ctx.app.service.Chat.getChatMessage(input, ctx)),
|
|
35
|
+
getChatMessages: procedure
|
|
36
|
+
.use(hasRole('guest', t))
|
|
37
|
+
.use(customErrorFormatter(t))
|
|
38
|
+
.input(z.object({ chatMessageId: z.string() }))
|
|
39
|
+
.query(({ input, ctx }) => ctx.app.service.Chat.getChatMessage(input, ctx)),
|
|
40
|
+
createChatMessage: procedure
|
|
41
|
+
.use(hasRole('admin', t))
|
|
42
|
+
.use(customErrorFormatter(t))
|
|
43
|
+
.input(ChatMessage)
|
|
44
|
+
.mutation(({ input, ctx }) => ctx.app.service.Chat.createChatMessage(input, ctx)),
|
|
45
|
+
updateChatMessage: procedure
|
|
46
|
+
.use(hasRole('admin', t))
|
|
47
|
+
.use(customErrorFormatter(t))
|
|
48
|
+
.input(z.object({ chatMessageId: z.string(), data: ChatMessage.partial() }))
|
|
49
|
+
.mutation(({ input, ctx }) => ctx.app.service.Chat.updateChatMessage(input, ctx)),
|
|
50
|
+
});
|
|
51
|
+
//# sourceMappingURL=chat.router.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat.router.js","sourceRoot":"","sources":["../../chat/chat.router.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,IAAI,GAAG,EAAE,MAAM,KAAK,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAyC,MAAM,cAAc,CAAC;AAC/E,OAAO,EAAE,oBAAoB,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAEhE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEvD,MAAM,CAAC,MAAM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