@arken/seer-protocol 0.1.3 → 0.1.5
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 +5 -229
- 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 +29 -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,101 @@
|
|
|
1
|
+
import * as mongo from '@arken/node/mongo';
|
|
2
|
+
const { addTagVirtuals, addApplicationVirtual } = mongo;
|
|
3
|
+
export const Item = mongo.createModel('Item', {
|
|
4
|
+
token: { type: String, maxlength: 500, minlength: 1, required: true },
|
|
5
|
+
characterId: { type: mongo.Schema.Types.ObjectId, ref: 'Character', required: true },
|
|
6
|
+
assetId: { type: mongo.Schema.Types.ObjectId, ref: 'Asset', required: true },
|
|
7
|
+
chainId: { type: mongo.Schema.Types.ObjectId, ref: 'Chain', required: false },
|
|
8
|
+
materialId: { type: mongo.Schema.Types.ObjectId, ref: 'ItemMaterial', required: false },
|
|
9
|
+
skinId: { type: mongo.Schema.Types.ObjectId, ref: 'ItemSkin', required: false },
|
|
10
|
+
recipeId: { type: mongo.Schema.Types.ObjectId, ref: 'ItemRecipe', required: false },
|
|
11
|
+
typeId: { type: mongo.Schema.Types.ObjectId, ref: 'ItemType', required: false },
|
|
12
|
+
subTypeId: { type: mongo.Schema.Types.ObjectId, ref: 'ItemSubType', required: false },
|
|
13
|
+
specificTypeId: { type: mongo.Schema.Types.ObjectId, ref: 'ItemSpecificType', required: false },
|
|
14
|
+
rarityId: { type: mongo.Schema.Types.ObjectId, ref: 'ItemRarity', required: false },
|
|
15
|
+
rankId: { type: mongo.Schema.Types.ObjectId, ref: 'ItemRank', required: false },
|
|
16
|
+
rankValue: { type: Number, integer: true, min: 0, max: 100, required: false },
|
|
17
|
+
slotIds: [{ type: mongo.Schema.Types.ObjectId, ref: 'ItemSlot', required: false }],
|
|
18
|
+
setId: { type: mongo.Schema.Types.ObjectId, ref: 'ItemSet', required: false },
|
|
19
|
+
attributes: [{ type: mongo.Schema.Types.ObjectId, ref: 'ItemAttribute', required: false }],
|
|
20
|
+
quantity: { type: Number, integer: true, min: 0, default: 1 },
|
|
21
|
+
distribution: { type: String, default: 'Unknown' },
|
|
22
|
+
x: { type: Number, integer: true, min: 0, required: false },
|
|
23
|
+
y: { type: Number, integer: true, min: 0, required: false },
|
|
24
|
+
items: [{ type: mongo.Schema.Types.ObjectId, ref: 'Item', default: [] }],
|
|
25
|
+
capacity: { type: Number, integer: true, min: 0, default: 60 },
|
|
26
|
+
points: { type: Number, integer: true, min: 0, default: 0 },
|
|
27
|
+
}, {
|
|
28
|
+
extend: 'EntityFields',
|
|
29
|
+
indexes: [{ quantity: 1 }, { points: 1 }, { capacity: 1 }],
|
|
30
|
+
virtuals: [
|
|
31
|
+
...addTagVirtuals('Item'),
|
|
32
|
+
...addApplicationVirtual(),
|
|
33
|
+
{
|
|
34
|
+
name: 'character',
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: 'asset',
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: 'chain',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: 'material',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: 'skin',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: 'recipe',
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: 'type',
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: 'subType',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name: 'specificType',
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: 'rarity',
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
});
|
|
65
|
+
export const ItemAttribute = mongo.createModel('ItemAttribute', {});
|
|
66
|
+
export const ItemMaterial = mongo.createModel('ItemMaterial', {});
|
|
67
|
+
export const ItemSet = mongo.createModel('ItemSet', {});
|
|
68
|
+
export const ItemSlot = mongo.createModel('ItemSlot', {});
|
|
69
|
+
export const ItemRarity = mongo.createModel('ItemRarity', {});
|
|
70
|
+
export const ItemRank = mongo.createModel('ItemRank', {
|
|
71
|
+
value: { type: Number },
|
|
72
|
+
});
|
|
73
|
+
export const ItemType = mongo.createModel('ItemType', {});
|
|
74
|
+
export const ItemSubType = mongo.createModel('ItemSubType', {});
|
|
75
|
+
export const ItemSpecificType = mongo.createModel('ItemSpecificType', {});
|
|
76
|
+
export const ItemAffix = mongo.createModel('ItemAffix', {
|
|
77
|
+
isPrefix: { type: Boolean, default: false },
|
|
78
|
+
isSuffix: { type: Boolean, default: false },
|
|
79
|
+
isTitle: { type: Boolean, default: false },
|
|
80
|
+
weight: { type: Number, min: 0, default: 1 },
|
|
81
|
+
typeIds: [{ type: mongo.Schema.Types.ObjectId, ref: 'ItemType', required: false }],
|
|
82
|
+
rarityIds: [{ type: mongo.Schema.Types.ObjectId, ref: 'ItemRarity', required: false }],
|
|
83
|
+
});
|
|
84
|
+
export const ItemRecipe = mongo.createModel('ItemRecipe', {});
|
|
85
|
+
export const ItemSkin = mongo.createModel('ItemSkin', {});
|
|
86
|
+
export const ItemTransmute = mongo.createModel('ItemTransmute', {
|
|
87
|
+
token: { type: String, maxlength: 500, required: true },
|
|
88
|
+
assetId: { type: mongo.Schema.Types.ObjectId, ref: 'Asset', required: true },
|
|
89
|
+
itemId: { type: mongo.Schema.Types.ObjectId, ref: 'Item', required: true },
|
|
90
|
+
chainId: { type: mongo.Schema.Types.ObjectId, ref: 'Chain' },
|
|
91
|
+
}, {
|
|
92
|
+
virtuals: [
|
|
93
|
+
{
|
|
94
|
+
name: 'item',
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
name: 'asset',
|
|
98
|
+
},
|
|
99
|
+
],
|
|
100
|
+
});
|
|
101
|
+
//# sourceMappingURL=item.models.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"item.models.js","sourceRoot":"","sources":["../../item/item.models.ts"],"names":[],"mappings":"AAAA,OAAO,KA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AAI,EAAE,MAAM;SACb;QACD;YACE,IAAI,EAAE,OAAO;SACd;KACF;CACF,CACF,CAAC"}
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
import { z as zod } from 'zod';
|
|
2
|
+
import type { RouterContext } from '../types';
|
|
3
|
+
import { inferRouterOutputs, inferRouterInputs } from '../schema';
|
|
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
|
+
getItem: import("@trpc/server").TRPCQueryProcedure<{
|
|
63
|
+
input: {
|
|
64
|
+
cursor?: Record<string, any>;
|
|
65
|
+
limit?: number;
|
|
66
|
+
select?: Record<string, boolean>;
|
|
67
|
+
skip?: number;
|
|
68
|
+
where?: {
|
|
69
|
+
[x: string]: any;
|
|
70
|
+
};
|
|
71
|
+
data?: any;
|
|
72
|
+
orderBy?: Record<string, "asc" | "desc">;
|
|
73
|
+
include?: Record<string, boolean>;
|
|
74
|
+
};
|
|
75
|
+
output: unknown;
|
|
76
|
+
}>;
|
|
77
|
+
getItems: import("@trpc/server").TRPCQueryProcedure<{
|
|
78
|
+
input: {
|
|
79
|
+
cursor?: Record<string, any>;
|
|
80
|
+
limit?: number;
|
|
81
|
+
select?: Record<string, boolean>;
|
|
82
|
+
skip?: number;
|
|
83
|
+
where?: {
|
|
84
|
+
[x: string]: any;
|
|
85
|
+
};
|
|
86
|
+
data?: any;
|
|
87
|
+
orderBy?: Record<string, "asc" | "desc">;
|
|
88
|
+
include?: Record<string, boolean>;
|
|
89
|
+
};
|
|
90
|
+
output: any;
|
|
91
|
+
}>;
|
|
92
|
+
createItem: import("@trpc/server").TRPCMutationProcedure<{
|
|
93
|
+
input: {
|
|
94
|
+
cursor?: Record<string, any>;
|
|
95
|
+
limit?: number;
|
|
96
|
+
select?: Record<string, boolean>;
|
|
97
|
+
skip?: number;
|
|
98
|
+
where?: {
|
|
99
|
+
[x: string]: any;
|
|
100
|
+
};
|
|
101
|
+
data?: any;
|
|
102
|
+
orderBy?: Record<string, "asc" | "desc">;
|
|
103
|
+
include?: Record<string, boolean>;
|
|
104
|
+
};
|
|
105
|
+
output: unknown;
|
|
106
|
+
}>;
|
|
107
|
+
updateItem: import("@trpc/server").TRPCMutationProcedure<{
|
|
108
|
+
input: {
|
|
109
|
+
cursor?: Record<string, any>;
|
|
110
|
+
limit?: number;
|
|
111
|
+
select?: Record<string, boolean>;
|
|
112
|
+
skip?: number;
|
|
113
|
+
where?: {
|
|
114
|
+
[x: string]: any;
|
|
115
|
+
};
|
|
116
|
+
data?: any;
|
|
117
|
+
orderBy?: Record<string, "asc" | "desc">;
|
|
118
|
+
include?: Record<string, boolean>;
|
|
119
|
+
};
|
|
120
|
+
output: unknown;
|
|
121
|
+
}>;
|
|
122
|
+
getItemAttribute: import("@trpc/server").TRPCQueryProcedure<{
|
|
123
|
+
input: {
|
|
124
|
+
cursor?: Record<string, any>;
|
|
125
|
+
limit?: number;
|
|
126
|
+
select?: Record<string, boolean>;
|
|
127
|
+
skip?: number;
|
|
128
|
+
where?: {
|
|
129
|
+
[x: string]: any;
|
|
130
|
+
};
|
|
131
|
+
data?: any;
|
|
132
|
+
orderBy?: Record<string, "asc" | "desc">;
|
|
133
|
+
include?: Record<string, boolean>;
|
|
134
|
+
};
|
|
135
|
+
output: {
|
|
136
|
+
name?: string;
|
|
137
|
+
key?: string;
|
|
138
|
+
id?: string | import("mongoose").Types.ObjectId;
|
|
139
|
+
data?: any;
|
|
140
|
+
description?: string;
|
|
141
|
+
applicationId?: string | import("mongoose").Types.ObjectId;
|
|
142
|
+
createdDate?: Date;
|
|
143
|
+
updatedDate?: Date;
|
|
144
|
+
status?: "Active" | "Paused" | "Pending" | "Archived";
|
|
145
|
+
ownerId?: string | import("mongoose").Types.ObjectId;
|
|
146
|
+
meta?: any;
|
|
147
|
+
merkleLeaf?: string;
|
|
148
|
+
merkleIndex?: number;
|
|
149
|
+
createdById?: string | import("mongoose").Types.ObjectId;
|
|
150
|
+
editedById?: string | import("mongoose").Types.ObjectId;
|
|
151
|
+
deletedById?: string | import("mongoose").Types.ObjectId;
|
|
152
|
+
deletedDate?: Date;
|
|
153
|
+
};
|
|
154
|
+
}>;
|
|
155
|
+
createItemAttribute: import("@trpc/server").TRPCMutationProcedure<{
|
|
156
|
+
input: {
|
|
157
|
+
cursor?: Record<string, any>;
|
|
158
|
+
limit?: number;
|
|
159
|
+
select?: Record<string, boolean>;
|
|
160
|
+
skip?: number;
|
|
161
|
+
where?: {
|
|
162
|
+
[x: string]: any;
|
|
163
|
+
};
|
|
164
|
+
data?: any;
|
|
165
|
+
orderBy?: Record<string, "asc" | "desc">;
|
|
166
|
+
include?: Record<string, boolean>;
|
|
167
|
+
};
|
|
168
|
+
output: {
|
|
169
|
+
id?: string | import("mongoose").Types.ObjectId;
|
|
170
|
+
};
|
|
171
|
+
}>;
|
|
172
|
+
updateItemAttribute: import("@trpc/server").TRPCMutationProcedure<{
|
|
173
|
+
input: {
|
|
174
|
+
cursor?: Record<string, any>;
|
|
175
|
+
limit?: number;
|
|
176
|
+
select?: Record<string, boolean>;
|
|
177
|
+
skip?: number;
|
|
178
|
+
where?: {
|
|
179
|
+
[x: string]: any;
|
|
180
|
+
};
|
|
181
|
+
data?: any;
|
|
182
|
+
orderBy?: Record<string, "asc" | "desc">;
|
|
183
|
+
include?: Record<string, boolean>;
|
|
184
|
+
};
|
|
185
|
+
output: {
|
|
186
|
+
id?: string | import("mongoose").Types.ObjectId;
|
|
187
|
+
};
|
|
188
|
+
}>;
|
|
189
|
+
getItemTransmute: import("@trpc/server").TRPCQueryProcedure<{
|
|
190
|
+
input: {
|
|
191
|
+
cursor?: Record<string, any>;
|
|
192
|
+
limit?: number;
|
|
193
|
+
select?: Record<string, boolean>;
|
|
194
|
+
skip?: number;
|
|
195
|
+
where?: {
|
|
196
|
+
[x: string]: any;
|
|
197
|
+
};
|
|
198
|
+
data?: any;
|
|
199
|
+
orderBy?: Record<string, "asc" | "desc">;
|
|
200
|
+
include?: Record<string, boolean>;
|
|
201
|
+
};
|
|
202
|
+
output: {
|
|
203
|
+
name?: string;
|
|
204
|
+
key?: string;
|
|
205
|
+
id?: string | import("mongoose").Types.ObjectId;
|
|
206
|
+
data?: any;
|
|
207
|
+
description?: string;
|
|
208
|
+
applicationId?: string | import("mongoose").Types.ObjectId;
|
|
209
|
+
createdDate?: Date;
|
|
210
|
+
updatedDate?: Date;
|
|
211
|
+
token?: string;
|
|
212
|
+
status?: "Active" | "Paused" | "Pending" | "Archived";
|
|
213
|
+
ownerId?: string | import("mongoose").Types.ObjectId;
|
|
214
|
+
meta?: any;
|
|
215
|
+
merkleLeaf?: string;
|
|
216
|
+
merkleIndex?: number;
|
|
217
|
+
createdById?: string | import("mongoose").Types.ObjectId;
|
|
218
|
+
editedById?: string | import("mongoose").Types.ObjectId;
|
|
219
|
+
deletedById?: string | import("mongoose").Types.ObjectId;
|
|
220
|
+
deletedDate?: Date;
|
|
221
|
+
chainId?: string | import("mongoose").Types.ObjectId;
|
|
222
|
+
assetId?: string | import("mongoose").Types.ObjectId;
|
|
223
|
+
itemId?: string | import("mongoose").Types.ObjectId;
|
|
224
|
+
};
|
|
225
|
+
}>;
|
|
226
|
+
createItemTransmute: import("@trpc/server").TRPCMutationProcedure<{
|
|
227
|
+
input: {
|
|
228
|
+
cursor?: Record<string, any>;
|
|
229
|
+
limit?: number;
|
|
230
|
+
select?: Record<string, boolean>;
|
|
231
|
+
skip?: number;
|
|
232
|
+
where?: {
|
|
233
|
+
[x: string]: any;
|
|
234
|
+
};
|
|
235
|
+
data?: any;
|
|
236
|
+
orderBy?: Record<string, "asc" | "desc">;
|
|
237
|
+
include?: Record<string, boolean>;
|
|
238
|
+
};
|
|
239
|
+
output: {
|
|
240
|
+
id?: string | import("mongoose").Types.ObjectId;
|
|
241
|
+
};
|
|
242
|
+
}>;
|
|
243
|
+
updateItemTransmute: import("@trpc/server").TRPCMutationProcedure<{
|
|
244
|
+
input: {
|
|
245
|
+
cursor?: Record<string, any>;
|
|
246
|
+
limit?: number;
|
|
247
|
+
select?: Record<string, boolean>;
|
|
248
|
+
skip?: number;
|
|
249
|
+
where?: {
|
|
250
|
+
[x: string]: any;
|
|
251
|
+
};
|
|
252
|
+
data?: any;
|
|
253
|
+
orderBy?: Record<string, "asc" | "desc">;
|
|
254
|
+
include?: Record<string, boolean>;
|
|
255
|
+
};
|
|
256
|
+
output: {
|
|
257
|
+
id?: string | import("mongoose").Types.ObjectId;
|
|
258
|
+
};
|
|
259
|
+
}>;
|
|
260
|
+
}>;
|
|
261
|
+
export type Router = ReturnType<typeof createRouter>;
|
|
262
|
+
export type RouterInput = inferRouterInputs<Router>;
|
|
263
|
+
export type RouterOutput = inferRouterOutputs<Router>;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { z as zod } from 'zod';
|
|
2
|
+
import { initTRPC } from '@trpc/server';
|
|
3
|
+
import { customErrorFormatter, hasRole } from '@arken/node/rpc';
|
|
4
|
+
import { getQueryInput } from '../schema';
|
|
5
|
+
import { Item, ItemAttribute, ItemTransmute, } from './item.schema';
|
|
6
|
+
export const z = zod;
|
|
7
|
+
export const t = initTRPC.context().create();
|
|
8
|
+
export const router = t.router;
|
|
9
|
+
export const procedure = t.procedure;
|
|
10
|
+
export const createRouter = () => router({
|
|
11
|
+
getItem: procedure
|
|
12
|
+
.use(hasRole('guest', t))
|
|
13
|
+
.input(getQueryInput(Item))
|
|
14
|
+
.output(Item)
|
|
15
|
+
.query(({ input, ctx }) => ctx.app.service.Item.getItem(input, ctx)),
|
|
16
|
+
getItems: procedure
|
|
17
|
+
.use(hasRole('guest', t))
|
|
18
|
+
.use(customErrorFormatter(t))
|
|
19
|
+
.input(getQueryInput(Item))
|
|
20
|
+
.query(({ input, ctx }) => ctx.app.service.Item.getItems(input, ctx)),
|
|
21
|
+
createItem: procedure
|
|
22
|
+
.use(hasRole('admin', t))
|
|
23
|
+
.use(customErrorFormatter(t))
|
|
24
|
+
.input(getQueryInput(Item))
|
|
25
|
+
.output(Item.pick({ id: true }))
|
|
26
|
+
.mutation(({ input, ctx }) => ctx.app.service.Item.createItem(input, ctx)),
|
|
27
|
+
updateItem: procedure
|
|
28
|
+
.use(hasRole('admin', t))
|
|
29
|
+
.use(customErrorFormatter(t))
|
|
30
|
+
.input(getQueryInput(Item))
|
|
31
|
+
.output(Item.pick({ id: true }))
|
|
32
|
+
.mutation(({ input, ctx }) => ctx.app.service.Item.updateItem(input, ctx)),
|
|
33
|
+
getItemAttribute: procedure
|
|
34
|
+
.use(hasRole('guest', t))
|
|
35
|
+
.use(customErrorFormatter(t))
|
|
36
|
+
.input(getQueryInput(ItemAttribute))
|
|
37
|
+
.output(ItemAttribute)
|
|
38
|
+
.query(({ input, ctx }) => ctx.app.service.Item.getItemAttribute(input, ctx)),
|
|
39
|
+
createItemAttribute: procedure
|
|
40
|
+
.use(hasRole('admin', t))
|
|
41
|
+
.use(customErrorFormatter(t))
|
|
42
|
+
.input(getQueryInput(ItemAttribute))
|
|
43
|
+
.output(ItemAttribute.pick({ id: true }))
|
|
44
|
+
.mutation(({ input, ctx }) => ctx.app.service.Item.createItemAttribute(input, ctx)),
|
|
45
|
+
updateItemAttribute: procedure
|
|
46
|
+
.use(hasRole('admin', t))
|
|
47
|
+
.use(customErrorFormatter(t))
|
|
48
|
+
.input(getQueryInput(ItemAttribute))
|
|
49
|
+
.output(ItemAttribute.pick({ id: true }))
|
|
50
|
+
.mutation(({ input, ctx }) => ctx.app.service.Item.updateItemAttribute(input, ctx)),
|
|
51
|
+
getItemTransmute: procedure
|
|
52
|
+
.use(hasRole('guest', t))
|
|
53
|
+
.use(customErrorFormatter(t))
|
|
54
|
+
.input(getQueryInput(ItemTransmute))
|
|
55
|
+
.output(ItemTransmute)
|
|
56
|
+
.query(({ input, ctx }) => ctx.app.service.Item.getItemTransmute(input, ctx)),
|
|
57
|
+
createItemTransmute: procedure
|
|
58
|
+
.use(hasRole('admin', t))
|
|
59
|
+
.use(customErrorFormatter(t))
|
|
60
|
+
.input(getQueryInput(ItemTransmute))
|
|
61
|
+
.output(ItemTransmute.pick({ id: true }))
|
|
62
|
+
.mutation(({ input, ctx }) => ctx.app.service.Item.createItemTransmute(input, ctx)),
|
|
63
|
+
updateItemTransmute: procedure
|
|
64
|
+
.use(hasRole('admin', t))
|
|
65
|
+
.use(customErrorFormatter(t))
|
|
66
|
+
.input(getQueryInput(ItemTransmute))
|
|
67
|
+
.output(ItemTransmute.pick({ id: true }))
|
|
68
|
+
.mutation(({ input, ctx }) => ctx.app.service.Item.updateItemTransmute(input, ctx)),
|
|
69
|
+
});
|
|
70
|
+
//# sourceMappingURL=item.router.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"item.router.js","sourceRoot":"","sources":["../../item/item.router.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,IAAI,GAAG,EAAE,MAAM,KAAK,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,oBAAoB,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAEhE,OAAO,EAAS,aAAa,EAAyC,MAAM,WAAW,CAAC;AACxF,OAAO,EACL,IAAI,EACJ,aAAa,EAWb,aAAa,GACd,MAAM,eAAe,CAAC;AAEvB,MAAM,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC;AACrB,MAAM,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAC,OAAO,EAAiB,CAAC,MAAM,EAAE,CAAC;AAC5D,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;AAC/B,MAAM,CAAC,MAA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