@arken/node 1.5.1 → 1.5.3
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 +39 -82
- package/build/api.js.map +1 -0
- package/build/array.js.map +1 -0
- package/build/browser.js.map +1 -0
- package/build/codebase.js.map +1 -0
- package/build/config.js.map +1 -0
- package/build/db.d.ts +41 -0
- package/build/db.js +234 -0
- package/build/db.js.map +1 -0
- package/build/{util/decoder.js → decoder.js} +3 -3
- package/build/decoder.js.map +1 -0
- package/build/format.js.map +1 -0
- package/build/guid.js.map +1 -0
- package/build/index.d.ts +70 -18
- package/build/index.js +216 -18
- package/build/index.js.map +1 -1
- package/build/json.js.map +1 -0
- package/build/legacy/data/items.js +1 -1
- package/build/legacy/data/items.js.map +1 -1
- package/build/log.d.ts +5 -0
- package/build/log.js +28 -0
- package/build/log.js.map +1 -0
- package/build/math.js.map +1 -0
- package/build/{util/merkle.js → merkle.js} +1 -1
- package/build/merkle.js.map +1 -0
- package/build/{util/mongo.js → mongo.js} +1 -1
- package/build/mongo.js.map +1 -0
- package/build/number.js.map +1 -0
- package/build/object.js.map +1 -0
- package/build/otp.js.map +1 -0
- package/build/package.json +3 -3
- package/build/physics.js.map +1 -0
- package/build/{util/process.js → process.js} +1 -1
- package/build/process.js.map +1 -0
- package/build/rpc.js.map +1 -0
- package/build/schema.d.ts +42 -51
- package/build/seer.js.map +1 -0
- package/build/string.js.map +1 -0
- package/build/text.js.map +1 -0
- package/build/time/date.js.map +1 -0
- package/build/time/fancyTimeFormat.js.map +1 -0
- package/build/time/index.js.map +1 -0
- package/build/time/now.js.map +1 -0
- package/build/trpc/socketLink.d.ts +62 -0
- package/build/trpc/socketLink.js +261 -0
- package/build/trpc/socketLink.js.map +1 -0
- package/build/trpc/socketServer.d.ts +15 -0
- package/build/trpc/socketServer.js +47 -0
- package/build/trpc/socketServer.js.map +1 -0
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/util.d.ts +1 -0
- package/build/util.js +2 -0
- package/build/util.js.map +1 -0
- package/build/web3/httpProvider.js.map +1 -0
- package/build/{util/web3.js → web3.js} +1 -1
- package/build/web3.js.map +1 -0
- package/build/{util/websocket.js → websocket.js} +1 -1
- package/build/websocket.js.map +1 -0
- package/build/zk.js.map +1 -0
- package/build/{util/zod.d.ts → zod.d.ts} +2 -0
- package/build/{util/zod.js → zod.js} +1 -0
- package/build/zod.js.map +1 -0
- package/db.ts +76 -1
- package/{util/decoder.ts → decoder.ts} +3 -3
- package/index.ts +306 -18
- package/legacy/data/items.ts +1 -1
- package/log.ts +51 -0
- package/{util/merkle.ts → merkle.ts} +3 -1
- package/{util/mongo.ts → mongo.ts} +1 -1
- package/package.json +3 -3
- package/{util/process.ts → process.ts} +1 -1
- package/trpc/socketLink.ts +2 -2
- package/trpc/socketServer.ts +1 -1
- package/tsconfig.json +35 -6
- package/util.ts +1 -0
- package/{util/web3.ts → web3.ts} +2 -1
- package/{util/websocket.ts → websocket.ts} +1 -1
- package/{util/zod.ts → zod.ts} +2 -0
- package/build/modules/area/area.models.d.ts +0 -6
- package/build/modules/area/area.models.js +0 -11
- package/build/modules/area/area.models.js.map +0 -1
- package/build/modules/area/area.router.d.ts +0 -274
- package/build/modules/area/area.router.js +0 -59
- package/build/modules/area/area.router.js.map +0 -1
- package/build/modules/area/area.schema.d.ts +0 -245
- package/build/modules/area/area.schema.js +0 -13
- package/build/modules/area/area.schema.js.map +0 -1
- package/build/modules/area/area.service.d.ts +0 -12
- package/build/modules/area/area.service.js +0 -95
- package/build/modules/area/area.service.js.map +0 -1
- package/build/modules/area/area.types.d.ts +0 -20
- package/build/modules/area/area.types.js +0 -2
- package/build/modules/area/area.types.js.map +0 -1
- package/build/modules/area/index.d.ts +0 -5
- package/build/modules/area/index.js +0 -6
- package/build/modules/area/index.js.map +0 -1
- package/build/modules/asset/asset.models.d.ts +0 -5
- package/build/modules/asset/asset.models.js +0 -44
- package/build/modules/asset/asset.models.js.map +0 -1
- package/build/modules/asset/asset.router.d.ts +0 -189
- package/build/modules/asset/asset.router.js +0 -41
- package/build/modules/asset/asset.router.js.map +0 -1
- package/build/modules/asset/asset.schema.d.ts +0 -207
- package/build/modules/asset/asset.schema.js +0 -19
- package/build/modules/asset/asset.schema.js.map +0 -1
- package/build/modules/asset/asset.service.d.ts +0 -9
- package/build/modules/asset/asset.service.js +0 -68
- package/build/modules/asset/asset.service.js.map +0 -1
- package/build/modules/asset/asset.types.d.ts +0 -17
- package/build/modules/asset/asset.types.js +0 -2
- package/build/modules/asset/asset.types.js.map +0 -1
- package/build/modules/asset/index.d.ts +0 -5
- package/build/modules/asset/index.js +0 -6
- package/build/modules/asset/index.js.map +0 -1
- package/build/modules/chain/chain.models.d.ts +0 -6
- package/build/modules/chain/chain.models.js +0 -42
- package/build/modules/chain/chain.models.js.map +0 -1
- package/build/modules/chain/chain.router.d.ts +0 -364
- package/build/modules/chain/chain.router.js +0 -84
- package/build/modules/chain/chain.router.js.map +0 -1
- package/build/modules/chain/chain.schema.d.ts +0 -323
- package/build/modules/chain/chain.schema.js +0 -41
- package/build/modules/chain/chain.schema.js.map +0 -1
- package/build/modules/chain/chain.service.d.ts +0 -15
- package/build/modules/chain/chain.service.js +0 -115
- package/build/modules/chain/chain.service.js.map +0 -1
- package/build/modules/chain/chain.types.d.ts +0 -20
- package/build/modules/chain/chain.types.js +0 -2
- package/build/modules/chain/chain.types.js.map +0 -1
- package/build/modules/chain/index.d.ts +0 -5
- package/build/modules/chain/index.js +0 -6
- package/build/modules/chain/index.js.map +0 -1
- package/build/modules/character/character.models.d.ts +0 -14
- package/build/modules/character/character.models.js +0 -123
- package/build/modules/character/character.models.js.map +0 -1
- package/build/modules/character/character.router.d.ts +0 -945
- package/build/modules/character/character.router.js +0 -246
- package/build/modules/character/character.router.js.map +0 -1
- package/build/modules/character/character.schema.d.ts +0 -1239
- package/build/modules/character/character.schema.js +0 -67
- package/build/modules/character/character.schema.js.map +0 -1
- package/build/modules/character/character.service.d.ts +0 -73
- package/build/modules/character/character.service.js +0 -533
- package/build/modules/character/character.service.js.map +0 -1
- package/build/modules/character/character.types.d.ts +0 -48
- package/build/modules/character/character.types.js +0 -2
- package/build/modules/character/character.types.js.map +0 -1
- package/build/modules/character/index.d.ts +0 -5
- package/build/modules/character/index.js +0 -6
- package/build/modules/character/index.js.map +0 -1
- package/build/modules/chat/chat.models.d.ts +0 -4
- package/build/modules/chat/chat.models.js +0 -35
- package/build/modules/chat/chat.models.js.map +0 -1
- package/build/modules/chat/chat.router.d.ts +0 -223
- package/build/modules/chat/chat.router.js +0 -51
- package/build/modules/chat/chat.router.js.map +0 -1
- package/build/modules/chat/chat.schema.d.ts +0 -183
- package/build/modules/chat/chat.schema.js +0 -29
- package/build/modules/chat/chat.schema.js.map +0 -1
- package/build/modules/chat/chat.service.d.ts +0 -12
- package/build/modules/chat/chat.service.js +0 -85
- package/build/modules/chat/chat.service.js.map +0 -1
- package/build/modules/chat/chat.types.d.ts +0 -14
- package/build/modules/chat/chat.types.js +0 -2
- package/build/modules/chat/chat.types.js.map +0 -1
- package/build/modules/chat/index.d.ts +0 -5
- package/build/modules/chat/index.js +0 -6
- package/build/modules/chat/index.js.map +0 -1
- package/build/modules/collection/collection.models.d.ts +0 -9
- package/build/modules/collection/collection.models.js +0 -69
- package/build/modules/collection/collection.models.js.map +0 -1
- package/build/modules/collection/collection.router.d.ts +0 -361
- package/build/modules/collection/collection.router.js +0 -71
- package/build/modules/collection/collection.router.js.map +0 -1
- package/build/modules/collection/collection.schema.d.ts +0 -676
- package/build/modules/collection/collection.schema.js +0 -70
- package/build/modules/collection/collection.schema.js.map +0 -1
- package/build/modules/collection/collection.service.d.ts +0 -15
- package/build/modules/collection/collection.service.js +0 -117
- package/build/modules/collection/collection.service.js.map +0 -1
- package/build/modules/collection/collection.types.d.ts +0 -29
- package/build/modules/collection/collection.types.js +0 -2
- package/build/modules/collection/collection.types.js.map +0 -1
- package/build/modules/collection/index.d.ts +0 -5
- package/build/modules/collection/index.js +0 -6
- package/build/modules/collection/index.js.map +0 -1
- package/build/modules/core/core.models.d.ts +0 -123
- package/build/modules/core/core.models.js +0 -811
- package/build/modules/core/core.models.js.map +0 -1
- package/build/modules/core/core.router.d.ts +0 -5297
- package/build/modules/core/core.router.js +0 -1372
- package/build/modules/core/core.router.js.map +0 -1
- package/build/modules/core/core.schema.d.ts +0 -5918
- package/build/modules/core/core.schema.js +0 -519
- package/build/modules/core/core.schema.js.map +0 -1
- package/build/modules/core/core.service.d.ts +0 -270
- package/build/modules/core/core.service.js +0 -2515
- package/build/modules/core/core.service.js.map +0 -1
- package/build/modules/core/core.types.d.ts +0 -251
- package/build/modules/core/core.types.js +0 -2
- package/build/modules/core/core.types.js.map +0 -1
- package/build/modules/core/index.d.ts +0 -5
- package/build/modules/core/index.js +0 -6
- package/build/modules/core/index.js.map +0 -1
- package/build/modules/core/mail/applyPatchesOrMail.d.ts +0 -72
- package/build/modules/core/mail/applyPatchesOrMail.js +0 -416
- package/build/modules/core/mail/applyPatchesOrMail.js.map +0 -1
- package/build/modules/core/mail/mailClaimablePatchesBatch.d.ts +0 -51
- package/build/modules/core/mail/mailClaimablePatchesBatch.js +0 -239
- package/build/modules/core/mail/mailClaimablePatchesBatch.js.map +0 -1
- package/build/modules/game/game.models.d.ts +0 -6
- package/build/modules/game/game.models.js +0 -29
- package/build/modules/game/game.models.js.map +0 -1
- package/build/modules/game/game.router.d.ts +0 -428
- package/build/modules/game/game.router.js +0 -90
- package/build/modules/game/game.router.js.map +0 -1
- package/build/modules/game/game.schema.d.ts +0 -344
- package/build/modules/game/game.schema.js +0 -14
- package/build/modules/game/game.schema.js.map +0 -1
- package/build/modules/game/game.service.d.ts +0 -16
- package/build/modules/game/game.service.js +0 -111
- package/build/modules/game/game.service.js.map +0 -1
- package/build/modules/game/game.types.d.ts +0 -20
- package/build/modules/game/game.types.js +0 -2
- package/build/modules/game/game.types.js.map +0 -1
- package/build/modules/game/index.d.ts +0 -5
- package/build/modules/game/index.js +0 -5
- package/build/modules/game/index.js.map +0 -1
- package/build/modules/interface/index.d.ts +0 -5
- package/build/modules/interface/index.js +0 -6
- package/build/modules/interface/index.js.map +0 -1
- package/build/modules/interface/interface.canonicalize.d.ts +0 -2
- package/build/modules/interface/interface.canonicalize.js +0 -241
- package/build/modules/interface/interface.canonicalize.js.map +0 -1
- package/build/modules/interface/interface.models.d.ts +0 -6
- package/build/modules/interface/interface.models.js +0 -30
- package/build/modules/interface/interface.models.js.map +0 -1
- package/build/modules/interface/interface.router.d.ts +0 -472
- package/build/modules/interface/interface.router.js +0 -113
- package/build/modules/interface/interface.router.js.map +0 -1
- package/build/modules/interface/interface.schema.d.ts +0 -313
- package/build/modules/interface/interface.schema.js +0 -36
- package/build/modules/interface/interface.schema.js.map +0 -1
- package/build/modules/interface/interface.service.d.ts +0 -19
- package/build/modules/interface/interface.service.js +0 -168
- package/build/modules/interface/interface.service.js.map +0 -1
- package/build/modules/interface/interface.types.d.ts +0 -19
- package/build/modules/interface/interface.types.js +0 -2
- package/build/modules/interface/interface.types.js.map +0 -1
- package/build/modules/item/index.d.ts +0 -5
- package/build/modules/item/index.js +0 -6
- package/build/modules/item/index.js.map +0 -1
- package/build/modules/item/item.models.d.ts +0 -16
- package/build/modules/item/item.models.js +0 -101
- package/build/modules/item/item.models.js.map +0 -1
- package/build/modules/item/item.router.d.ts +0 -263
- package/build/modules/item/item.router.js +0 -70
- package/build/modules/item/item.router.js.map +0 -1
- package/build/modules/item/item.schema.d.ts +0 -778
- package/build/modules/item/item.schema.js +0 -56
- package/build/modules/item/item.schema.js.map +0 -1
- package/build/modules/item/item.service.d.ts +0 -13
- package/build/modules/item/item.service.js +0 -116
- package/build/modules/item/item.service.js.map +0 -1
- package/build/modules/item/item.types.d.ts +0 -55
- package/build/modules/item/item.types.js +0 -2
- package/build/modules/item/item.types.js.map +0 -1
- package/build/modules/job/index.d.ts +0 -5
- package/build/modules/job/index.js +0 -6
- package/build/modules/job/index.js.map +0 -1
- package/build/modules/job/job.models.d.ts +0 -3
- package/build/modules/job/job.models.js +0 -9
- package/build/modules/job/job.models.js.map +0 -1
- package/build/modules/job/job.router.d.ts +0 -146
- package/build/modules/job/job.router.js +0 -32
- package/build/modules/job/job.router.js.map +0 -1
- package/build/modules/job/job.schema.d.ts +0 -67
- package/build/modules/job/job.schema.js +0 -7
- package/build/modules/job/job.schema.js.map +0 -1
- package/build/modules/job/job.service.d.ts +0 -7
- package/build/modules/job/job.service.js +0 -144
- package/build/modules/job/job.service.js.map +0 -1
- package/build/modules/job/job.types.d.ts +0 -16
- package/build/modules/job/job.types.js +0 -2
- package/build/modules/job/job.types.js.map +0 -1
- package/build/modules/market/index.d.ts +0 -5
- package/build/modules/market/index.js +0 -6
- package/build/modules/market/index.js.map +0 -1
- package/build/modules/market/market.models.d.ts +0 -14
- package/build/modules/market/market.models.js +0 -98
- package/build/modules/market/market.models.js.map +0 -1
- package/build/modules/market/market.router.d.ts +0 -230
- package/build/modules/market/market.router.js +0 -56
- package/build/modules/market/market.router.js.map +0 -1
- package/build/modules/market/market.schema.d.ts +0 -949
- package/build/modules/market/market.schema.js +0 -101
- package/build/modules/market/market.schema.js.map +0 -1
- package/build/modules/market/market.service.d.ts +0 -12
- package/build/modules/market/market.service.js +0 -88
- package/build/modules/market/market.service.js.map +0 -1
- package/build/modules/market/market.types.d.ts +0 -49
- package/build/modules/market/market.types.js +0 -2
- package/build/modules/market/market.types.js.map +0 -1
- package/build/modules/product/index.d.ts +0 -5
- package/build/modules/product/index.js +0 -6
- package/build/modules/product/index.js.map +0 -1
- package/build/modules/product/product.models.d.ts +0 -4
- package/build/modules/product/product.models.js +0 -113
- package/build/modules/product/product.models.js.map +0 -1
- package/build/modules/product/product.router.d.ts +0 -447
- package/build/modules/product/product.router.js +0 -71
- package/build/modules/product/product.router.js.map +0 -1
- package/build/modules/product/product.schema.d.ts +0 -654
- package/build/modules/product/product.schema.js +0 -117
- package/build/modules/product/product.schema.js.map +0 -1
- package/build/modules/product/product.service.d.ts +0 -15
- package/build/modules/product/product.service.js +0 -115
- package/build/modules/product/product.service.js.map +0 -1
- package/build/modules/product/product.types.d.ts +0 -28
- package/build/modules/product/product.types.js +0 -2
- package/build/modules/product/product.types.js.map +0 -1
- package/build/modules/profile/index.d.ts +0 -5
- package/build/modules/profile/index.js +0 -6
- package/build/modules/profile/index.js.map +0 -1
- package/build/modules/profile/profile.models.d.ts +0 -2
- package/build/modules/profile/profile.models.js +0 -165
- package/build/modules/profile/profile.models.js.map +0 -1
- package/build/modules/profile/profile.router.d.ts +0 -163
- package/build/modules/profile/profile.router.js +0 -54
- package/build/modules/profile/profile.router.js.map +0 -1
- package/build/modules/profile/profile.schema.d.ts +0 -1
- package/build/modules/profile/profile.schema.js +0 -138
- package/build/modules/profile/profile.schema.js.map +0 -1
- package/build/modules/profile/profile.service.d.ts +0 -11
- package/build/modules/profile/profile.service.js +0 -120
- package/build/modules/profile/profile.service.js.map +0 -1
- package/build/modules/profile/profile.types.d.ts +0 -16
- package/build/modules/profile/profile.types.js +0 -2
- package/build/modules/profile/profile.types.js.map +0 -1
- package/build/modules/raffle/index.d.ts +0 -5
- package/build/modules/raffle/index.js +0 -6
- package/build/modules/raffle/index.js.map +0 -1
- package/build/modules/raffle/raffle.models.d.ts +0 -6
- package/build/modules/raffle/raffle.models.js +0 -36
- package/build/modules/raffle/raffle.models.js.map +0 -1
- package/build/modules/raffle/raffle.router.d.ts +0 -299
- package/build/modules/raffle/raffle.router.js +0 -71
- package/build/modules/raffle/raffle.router.js.map +0 -1
- package/build/modules/raffle/raffle.schema.d.ts +0 -265
- package/build/modules/raffle/raffle.schema.js +0 -21
- package/build/modules/raffle/raffle.schema.js.map +0 -1
- package/build/modules/raffle/raffle.service.d.ts +0 -15
- package/build/modules/raffle/raffle.service.js +0 -115
- package/build/modules/raffle/raffle.service.js.map +0 -1
- package/build/modules/raffle/raffle.types.d.ts +0 -25
- package/build/modules/raffle/raffle.types.js +0 -2
- package/build/modules/raffle/raffle.types.js.map +0 -1
- package/build/modules/skill/index.d.ts +0 -5
- package/build/modules/skill/index.js +0 -6
- package/build/modules/skill/index.js.map +0 -1
- package/build/modules/skill/skill.models.d.ts +0 -9
- package/build/modules/skill/skill.models.js +0 -9
- package/build/modules/skill/skill.models.js.map +0 -1
- package/build/modules/skill/skill.router.d.ts +0 -659
- package/build/modules/skill/skill.router.js +0 -152
- package/build/modules/skill/skill.router.js.map +0 -1
- package/build/modules/skill/skill.schema.d.ts +0 -548
- package/build/modules/skill/skill.schema.js +0 -26
- package/build/modules/skill/skill.schema.js.map +0 -1
- package/build/modules/skill/skill.service.d.ts +0 -32
- package/build/modules/skill/skill.service.js +0 -279
- package/build/modules/skill/skill.service.js.map +0 -1
- package/build/modules/skill/skill.types.d.ts +0 -29
- package/build/modules/skill/skill.types.js +0 -2
- package/build/modules/skill/skill.types.js.map +0 -1
- package/build/modules/video/index.d.ts +0 -5
- package/build/modules/video/index.js +0 -6
- package/build/modules/video/index.js.map +0 -1
- package/build/modules/video/video.models.d.ts +0 -7
- package/build/modules/video/video.models.js +0 -19
- package/build/modules/video/video.models.js.map +0 -1
- package/build/modules/video/video.router.d.ts +0 -563
- package/build/modules/video/video.router.js +0 -112
- package/build/modules/video/video.router.js.map +0 -1
- package/build/modules/video/video.schema.d.ts +0 -456
- package/build/modules/video/video.schema.js +0 -31
- package/build/modules/video/video.schema.js.map +0 -1
- package/build/modules/video/video.service.d.ts +0 -23
- package/build/modules/video/video.service.js +0 -197
- package/build/modules/video/video.service.js.map +0 -1
- package/build/modules/video/video.types.d.ts +0 -28
- package/build/modules/video/video.types.js +0 -2
- package/build/modules/video/video.types.js.map +0 -1
- package/build/router.d.ts +0 -10406
- package/build/router.js +0 -44
- package/build/router.js.map +0 -1
- package/build/types.d.ts +0 -164
- package/build/types.js +0 -19
- package/build/types.js.map +0 -1
- package/build/util/api.js.map +0 -1
- package/build/util/array.js.map +0 -1
- package/build/util/browser.js.map +0 -1
- package/build/util/codebase.js.map +0 -1
- package/build/util/config.js.map +0 -1
- package/build/util/db/index.d.ts +0 -5
- package/build/util/db/index.js +0 -7
- package/build/util/db/index.js.map +0 -1
- package/build/util/db/isPostgresError.d.ts +0 -2
- package/build/util/db/isPostgresError.js +0 -8
- package/build/util/db/isPostgresError.js.map +0 -1
- package/build/util/db/isUniqueConstraintViolation.d.ts +0 -2
- package/build/util/db/isUniqueConstraintViolation.js +0 -3
- package/build/util/db/isUniqueConstraintViolation.js.map +0 -1
- package/build/util/db.d.ts +0 -6
- package/build/util/db.js +0 -51
- package/build/util/db.js.map +0 -1
- package/build/util/decoder.js.map +0 -1
- package/build/util/decoder.test.d.ts +0 -1
- package/build/util/decoder.test.js +0 -7
- package/build/util/decoder.test.js.map +0 -1
- package/build/util/format.js.map +0 -1
- package/build/util/guid.js.map +0 -1
- package/build/util/index.d.ts +0 -74
- package/build/util/index.js +0 -239
- package/build/util/index.js.map +0 -1
- package/build/util/json.js.map +0 -1
- package/build/util/log.d.ts +0 -1
- package/build/util/log.js +0 -6
- package/build/util/log.js.map +0 -1
- package/build/util/math.js.map +0 -1
- package/build/util/merkle.js.map +0 -1
- package/build/util/mongo.js.map +0 -1
- package/build/util/number.js.map +0 -1
- package/build/util/object.js.map +0 -1
- package/build/util/otp.js.map +0 -1
- package/build/util/physics.js.map +0 -1
- package/build/util/process.js.map +0 -1
- package/build/util/rpc.js.map +0 -1
- package/build/util/seer.js.map +0 -1
- package/build/util/string.js.map +0 -1
- package/build/util/text.js.map +0 -1
- package/build/util/time/date.js.map +0 -1
- package/build/util/time/fancyTimeFormat.js.map +0 -1
- package/build/util/time/index.js.map +0 -1
- package/build/util/time/now.js.map +0 -1
- package/build/util/web3/httpProvider.js.map +0 -1
- package/build/util/web3.js.map +0 -1
- package/build/util/websocket.js.map +0 -1
- package/build/util/zk.js.map +0 -1
- package/build/util/zod.js.map +0 -1
- 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/router.ts +0 -49
- package/types.ts +0 -183
- 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/log.ts +0 -5
- /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/build/{util/api.d.ts → api.d.ts} +0 -0
- /package/build/{util/api.js → api.js} +0 -0
- /package/build/{util/array.d.ts → array.d.ts} +0 -0
- /package/build/{util/array.js → array.js} +0 -0
- /package/build/{util/browser.d.ts → browser.d.ts} +0 -0
- /package/build/{util/browser.js → browser.js} +0 -0
- /package/build/{util/codebase.d.ts → codebase.d.ts} +0 -0
- /package/build/{util/codebase.js → codebase.js} +0 -0
- /package/build/{util/config.d.ts → config.d.ts} +0 -0
- /package/build/{util/config.js → config.js} +0 -0
- /package/build/{util/decoder.d.ts → decoder.d.ts} +0 -0
- /package/build/{util/format.d.ts → format.d.ts} +0 -0
- /package/build/{util/format.js → format.js} +0 -0
- /package/build/{util/guid.d.ts → guid.d.ts} +0 -0
- /package/build/{util/guid.js → guid.js} +0 -0
- /package/build/{util/json.d.ts → json.d.ts} +0 -0
- /package/build/{util/json.js → json.js} +0 -0
- /package/build/{util/math.d.ts → math.d.ts} +0 -0
- /package/build/{util/math.js → math.js} +0 -0
- /package/build/{util/merkle.d.ts → merkle.d.ts} +0 -0
- /package/build/{util/mongo.d.ts → mongo.d.ts} +0 -0
- /package/build/{util/number.d.ts → number.d.ts} +0 -0
- /package/build/{util/number.js → number.js} +0 -0
- /package/build/{util/object.d.ts → object.d.ts} +0 -0
- /package/build/{util/object.js → object.js} +0 -0
- /package/build/{util/otp.d.ts → otp.d.ts} +0 -0
- /package/build/{util/otp.js → otp.js} +0 -0
- /package/build/{util/physics.d.ts → physics.d.ts} +0 -0
- /package/build/{util/physics.js → physics.js} +0 -0
- /package/build/{util/process.d.ts → process.d.ts} +0 -0
- /package/build/{util/rpc.d.ts → rpc.d.ts} +0 -0
- /package/build/{util/rpc.js → rpc.js} +0 -0
- /package/build/{util/seer.d.ts → seer.d.ts} +0 -0
- /package/build/{util/seer.js → seer.js} +0 -0
- /package/build/{util/string.d.ts → string.d.ts} +0 -0
- /package/build/{util/string.js → string.js} +0 -0
- /package/build/{util/text.d.ts → text.d.ts} +0 -0
- /package/build/{util/text.js → text.js} +0 -0
- /package/build/{util/time → time}/date.d.ts +0 -0
- /package/build/{util/time → time}/date.js +0 -0
- /package/build/{util/time → time}/fancyTimeFormat.d.ts +0 -0
- /package/build/{util/time → time}/fancyTimeFormat.js +0 -0
- /package/build/{util/time → time}/index.d.ts +0 -0
- /package/build/{util/time → time}/index.js +0 -0
- /package/build/{util/time → time}/now.d.ts +0 -0
- /package/build/{util/time → time}/now.js +0 -0
- /package/build/{util/web3 → web3}/httpProvider.d.ts +0 -0
- /package/build/{util/web3 → web3}/httpProvider.js +0 -0
- /package/build/{util/web3.d.ts → web3.d.ts} +0 -0
- /package/build/{util/websocket.d.ts → websocket.d.ts} +0 -0
- /package/build/{util/zk.d.ts → zk.d.ts} +0 -0
- /package/build/{util/zk.js → zk.js} +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/format.ts → format.ts} +0 -0
- /package/{util/guid.ts → guid.ts} +0 -0
- /package/{util/json.ts → json.ts} +0 -0
- /package/{util/math.ts → math.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/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/zk.ts → zk.ts} +0 -0
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { z as zod } from 'zod';
|
|
2
|
-
import { initTRPC } from '@trpc/server';
|
|
3
|
-
import { customErrorFormatter, hasRole } from '../../util/rpc';
|
|
4
|
-
import type { RouterContext } from '../../types';
|
|
5
|
-
import { Area, AreaLandmark, AreaType } from './area.schema';
|
|
6
|
-
import { Query, getQueryInput, inferRouterOutputs, inferRouterInputs } from '../../schema';
|
|
7
|
-
|
|
8
|
-
export const z = zod;
|
|
9
|
-
export const t = initTRPC.context<RouterContext>().create();
|
|
10
|
-
export const router = t.router;
|
|
11
|
-
export const procedure = t.procedure;
|
|
12
|
-
|
|
13
|
-
export const createRouter = () =>
|
|
14
|
-
router({
|
|
15
|
-
getArea: procedure
|
|
16
|
-
.use(hasRole('guest', t))
|
|
17
|
-
.use(customErrorFormatter(t))
|
|
18
|
-
.input(getQueryInput(Area))
|
|
19
|
-
.query(({ input, ctx }) => (ctx.app.service.Area.getArea as any)(input, ctx)),
|
|
20
|
-
|
|
21
|
-
getAreas: procedure
|
|
22
|
-
.use(hasRole('guest', t))
|
|
23
|
-
.use(customErrorFormatter(t))
|
|
24
|
-
.input(getQueryInput(Area))
|
|
25
|
-
.query(({ input, ctx }) => (ctx.app.service.Area.getAreas as any)(input, ctx)),
|
|
26
|
-
|
|
27
|
-
saveArea: procedure
|
|
28
|
-
.use(hasRole('admin', t))
|
|
29
|
-
.use(customErrorFormatter(t))
|
|
30
|
-
.input(getQueryInput(Area))
|
|
31
|
-
.output(Area.pick({ id: true }))
|
|
32
|
-
.mutation(({ input, ctx }) => (ctx.app.service.Area.saveArea as any)(input, ctx)),
|
|
33
|
-
|
|
34
|
-
getAreaLandmark: procedure
|
|
35
|
-
.use(hasRole('guest', t))
|
|
36
|
-
.use(customErrorFormatter(t))
|
|
37
|
-
.input(z.object({ query: Query }))
|
|
38
|
-
.query(({ input, ctx }) => (ctx.app.service.Area.getAreaLandmark as any)(input, ctx)),
|
|
39
|
-
|
|
40
|
-
createAreaLandmark: procedure
|
|
41
|
-
.use(hasRole('admin', t))
|
|
42
|
-
.use(customErrorFormatter(t))
|
|
43
|
-
.input(z.object({ data: AreaLandmark.omit({ id: true }) }))
|
|
44
|
-
.mutation(({ input, ctx }) => (ctx.app.service.Area.createAreaLandmark as any)(input, ctx)),
|
|
45
|
-
|
|
46
|
-
updateAreaLandmark: procedure
|
|
47
|
-
.use(hasRole('admin', t))
|
|
48
|
-
.use(customErrorFormatter(t))
|
|
49
|
-
.input(z.object({ query: Query, data: AreaLandmark.partial() }))
|
|
50
|
-
.mutation(({ input, ctx }) => (ctx.app.service.Area.updateAreaLandmark as any)(input, ctx)),
|
|
51
|
-
|
|
52
|
-
getAreaType: procedure
|
|
53
|
-
.use(hasRole('guest', t))
|
|
54
|
-
.use(customErrorFormatter(t))
|
|
55
|
-
.input(z.object({ query: Query }))
|
|
56
|
-
.query(({ input, ctx }) => (ctx.app.service.Area.getAreaType as any)(input, ctx)),
|
|
57
|
-
|
|
58
|
-
createAreaType: procedure
|
|
59
|
-
.use(hasRole('admin', t))
|
|
60
|
-
.use(customErrorFormatter(t))
|
|
61
|
-
.input(z.object({ data: AreaType.omit({ id: true }) }))
|
|
62
|
-
.mutation(({ input, ctx }) => (ctx.app.service.Area.createAreaType as any)(input, ctx)),
|
|
63
|
-
|
|
64
|
-
updateAreaType: procedure
|
|
65
|
-
.use(hasRole('admin', t))
|
|
66
|
-
.use(customErrorFormatter(t))
|
|
67
|
-
.input(z.object({ query: Query, data: AreaType.partial() }))
|
|
68
|
-
.output(AreaType.partial())
|
|
69
|
-
.mutation(({ input, ctx }) => (ctx.app.service.Area.updateAreaType as any)(input, ctx)),
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
export type Router = ReturnType<typeof createRouter>;
|
|
73
|
-
export type RouterInput = inferRouterInputs<Router>;
|
|
74
|
-
export type RouterOutput = inferRouterOutputs<Router>;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
// arken/packages/node/modules/area/area.schema.ts
|
|
2
|
-
//
|
|
3
|
-
import { z, ObjectId, Entity } from '../../schema';
|
|
4
|
-
|
|
5
|
-
export const Area = Entity.merge(
|
|
6
|
-
z.object({
|
|
7
|
-
type: z.string().default('Zone'),
|
|
8
|
-
landmarks: z.array(ObjectId).optional(),
|
|
9
|
-
shortDescription: z.string(),
|
|
10
|
-
})
|
|
11
|
-
);
|
|
12
|
-
|
|
13
|
-
export const AreaLandmark = Entity.merge(
|
|
14
|
-
z.object({
|
|
15
|
-
areaId: ObjectId.optional(),
|
|
16
|
-
area: ObjectId.optional(),
|
|
17
|
-
})
|
|
18
|
-
);
|
|
19
|
-
|
|
20
|
-
export const AreaType = Entity.merge(z.object({}));
|
|
21
|
-
|
|
22
|
-
export const AreaNameChoice = Entity.merge(z.object({}));
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
import type { Area, AreaLandmark, AreaType, RouterInput, RouterOutput, RouterContext } from './area.types';
|
|
2
|
-
import { getFilter } from '../../util/api';
|
|
3
|
-
import { ARXError } from '../../util/rpc';
|
|
4
|
-
|
|
5
|
-
export class Service {
|
|
6
|
-
async getArea(input: RouterInput['getArea'], ctx: RouterContext): Promise<RouterOutput['getArea']> {
|
|
7
|
-
if (!input) throw new Error('Input should not be void');
|
|
8
|
-
console.log('Area.Service.getArea', input);
|
|
9
|
-
|
|
10
|
-
const filter = getFilter(input);
|
|
11
|
-
// @ts-ignore
|
|
12
|
-
const area = await ctx.app.model.Area.findOne(filter).asJSON();
|
|
13
|
-
if (!area) throw new Error('Area not found');
|
|
14
|
-
|
|
15
|
-
return area as Area;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
async getAreas(input: RouterInput['getAreas'], ctx: RouterContext): Promise<RouterOutput['getAreas']> {
|
|
19
|
-
if (!input) throw new ARXError('NO_INPUT');
|
|
20
|
-
|
|
21
|
-
const filter = getFilter(input);
|
|
22
|
-
|
|
23
|
-
const limit = input.limit ?? 50;
|
|
24
|
-
const skip = input.skip ?? 0;
|
|
25
|
-
|
|
26
|
-
const [items, total] = await Promise.all([
|
|
27
|
-
// @ts-ignore
|
|
28
|
-
ctx.app.model.Area.find(filter).skip(skip).limit(limit).asJSON(),
|
|
29
|
-
ctx.app.model.Area.find(filter).countDocuments().exec(),
|
|
30
|
-
]);
|
|
31
|
-
|
|
32
|
-
return { items, total };
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
async getAreaLandmark(
|
|
36
|
-
input: RouterInput['getAreaLandmark'],
|
|
37
|
-
ctx: RouterContext
|
|
38
|
-
): Promise<RouterOutput['getAreaLandmark']> {
|
|
39
|
-
if (!input) throw new Error('Input should not be void');
|
|
40
|
-
console.log('Area.Service.getAreaLandmark', input.query);
|
|
41
|
-
|
|
42
|
-
const filter = getFilter(input.query);
|
|
43
|
-
const areaLandmark = await ctx.app.model.AreaLandmark.findOne(filter).lean().exec();
|
|
44
|
-
if (!areaLandmark) throw new Error('AreaLandmark not found');
|
|
45
|
-
|
|
46
|
-
return areaLandmark as AreaLandmark;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
async getAreaType(input: RouterInput['getAreaType'], ctx: RouterContext): Promise<RouterOutput['getAreaType']> {
|
|
50
|
-
if (!input) throw new Error('Input should not be void');
|
|
51
|
-
console.log('Area.Service.getAreaType', input.query);
|
|
52
|
-
|
|
53
|
-
const filter = getFilter(input.query);
|
|
54
|
-
const areaType = await ctx.app.model.AreaType.findOne(filter).lean().exec();
|
|
55
|
-
if (!areaType) throw new Error('AreaType not found');
|
|
56
|
-
|
|
57
|
-
return areaType as AreaType;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
async saveArea(input: RouterInput['saveArea'], ctx: RouterContext): Promise<RouterOutput['saveArea']> {
|
|
61
|
-
if (!input) throw new Error('Input should not be void');
|
|
62
|
-
console.log('Area.Service.saveArea', input);
|
|
63
|
-
|
|
64
|
-
const filter = getFilter(input);
|
|
65
|
-
const area = await ctx.app.model.Area.findOneAndUpdate(filter, input.data, { new: true }).lean().exec();
|
|
66
|
-
if (!area) throw new Error('Area update failed');
|
|
67
|
-
|
|
68
|
-
return area as Area;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
async createAreaLandmark(
|
|
72
|
-
input: RouterInput['createAreaLandmark'],
|
|
73
|
-
ctx: RouterContext
|
|
74
|
-
): Promise<RouterOutput['createAreaLandmark']> {
|
|
75
|
-
if (!input) throw new Error('Input should not be void');
|
|
76
|
-
console.log('Area.Service.createAreaLandmark', input.data);
|
|
77
|
-
|
|
78
|
-
const areaLandmark = await ctx.app.model.AreaLandmark.create(input.data);
|
|
79
|
-
return areaLandmark as AreaLandmark;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
async createAreaType(
|
|
83
|
-
input: RouterInput['createAreaType'],
|
|
84
|
-
ctx: RouterContext
|
|
85
|
-
): Promise<RouterOutput['createAreaType']> {
|
|
86
|
-
if (!input) throw new Error('Input should not be void');
|
|
87
|
-
console.log('Area.Service.createAreaType', input.data);
|
|
88
|
-
|
|
89
|
-
const areaType = await ctx.app.model.AreaType.create(input.data);
|
|
90
|
-
return areaType as AreaType;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
async updateAreaLandmark(
|
|
94
|
-
input: RouterInput['updateAreaLandmark'],
|
|
95
|
-
ctx: RouterContext
|
|
96
|
-
): Promise<RouterOutput['updateAreaLandmark']> {
|
|
97
|
-
if (!input) throw new Error('Input should not be void');
|
|
98
|
-
console.log('Area.Service.updateAreaLandmark', input.query, input.data);
|
|
99
|
-
|
|
100
|
-
const filter = getFilter(input.query);
|
|
101
|
-
const updatedAreaLandmark = await ctx.app.model.AreaLandmark.findOneAndUpdate(filter, input.data, { new: true })
|
|
102
|
-
.lean()
|
|
103
|
-
.exec();
|
|
104
|
-
if (!updatedAreaLandmark) throw new Error('AreaLandmark update failed');
|
|
105
|
-
|
|
106
|
-
return updatedAreaLandmark as AreaLandmark;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
async updateAreaType(
|
|
110
|
-
input: RouterInput['updateAreaType'],
|
|
111
|
-
ctx: RouterContext
|
|
112
|
-
): Promise<RouterOutput['updateAreaType']> {
|
|
113
|
-
if (!input) throw new Error('Input should not be void');
|
|
114
|
-
console.log('Area.Service.updateAreaType', input.query, input.data);
|
|
115
|
-
|
|
116
|
-
const filter = getFilter(input.query);
|
|
117
|
-
const updatedAreaType = await ctx.app.model.AreaType.findOneAndUpdate(filter, input.data, { new: true })
|
|
118
|
-
.lean()
|
|
119
|
-
.exec();
|
|
120
|
-
if (!updatedAreaType) throw new Error('AreaType update failed');
|
|
121
|
-
|
|
122
|
-
return updatedAreaType as AreaType;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import * as schema from './area.schema';
|
|
3
|
-
import { Document, Model } from '../../util/mongo';
|
|
4
|
-
|
|
5
|
-
export type * from './area.router';
|
|
6
|
-
export type * from './area.service';
|
|
7
|
-
export type { RouterContext } from '../../types';
|
|
8
|
-
|
|
9
|
-
export type Area = z.infer<typeof schema.Area>;
|
|
10
|
-
export type AreaDocument = Area & Document;
|
|
11
|
-
|
|
12
|
-
export type AreaLandmark = z.infer<typeof schema.AreaLandmark>;
|
|
13
|
-
export type AreaLandmarkDocument = AreaLandmark & Document;
|
|
14
|
-
|
|
15
|
-
export type AreaType = z.infer<typeof schema.AreaType>;
|
|
16
|
-
export type AreaTypeDocument = AreaType & Document;
|
|
17
|
-
|
|
18
|
-
export type AreaNameChoice = z.infer<typeof schema.AreaNameChoice>;
|
|
19
|
-
export type AreaNameChoiceDocument = AreaNameChoice & Document;
|
|
20
|
-
|
|
21
|
-
export type Mappings = {
|
|
22
|
-
Area: Model<AreaDocument>;
|
|
23
|
-
AreaLandmark: Model<AreaLandmarkDocument>;
|
|
24
|
-
AreaType: Model<AreaTypeDocument>;
|
|
25
|
-
AreaNameChoice: Model<AreaNameChoiceDocument>;
|
|
26
|
-
};
|
package/modules/area/index.ts
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import * as mongo from '../../util/mongo';
|
|
2
|
-
import type * as Types from './asset.types';
|
|
3
|
-
|
|
4
|
-
export const AssetStandard = mongo.createModel<Types.AssetStandardDocument>(
|
|
5
|
-
'AssetStandard',
|
|
6
|
-
{
|
|
7
|
-
version: { type: String, required: false },
|
|
8
|
-
parentId: { type: mongo.Schema.Types.ObjectId, ref: 'AssetStandard', required: false },
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
virtuals: [
|
|
12
|
-
{
|
|
13
|
-
name: 'children',
|
|
14
|
-
ref: 'AssetStandard',
|
|
15
|
-
localField: '_id',
|
|
16
|
-
foreignField: 'parent',
|
|
17
|
-
justOne: false,
|
|
18
|
-
},
|
|
19
|
-
],
|
|
20
|
-
}
|
|
21
|
-
);
|
|
22
|
-
|
|
23
|
-
export const Asset = mongo.createModel<Types.AssetDocument>(
|
|
24
|
-
'Asset',
|
|
25
|
-
{
|
|
26
|
-
uri: { type: String, required: true },
|
|
27
|
-
type: { type: String, maxlength: 100, required: true },
|
|
28
|
-
standards: [{ type: mongo.Schema.Types.ObjectId, ref: 'AssetStandard', required: true }],
|
|
29
|
-
licenseId: { type: mongo.Schema.Types.ObjectId, ref: 'AssetLicense' },
|
|
30
|
-
chainId: { type: mongo.Schema.Types.ObjectId, ref: 'Chain' },
|
|
31
|
-
ownerId: { type: mongo.Schema.Types.ObjectId, ref: 'Profile' }, // Added ownerId
|
|
32
|
-
// skin: { type: String },
|
|
33
|
-
// transmuteCount: { type: Number },
|
|
34
|
-
// score: { type: Number },
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
virtuals: [
|
|
38
|
-
{
|
|
39
|
-
name: 'items',
|
|
40
|
-
ref: 'Item',
|
|
41
|
-
localField: '_id',
|
|
42
|
-
foreignField: 'assetId',
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
name: 'offers',
|
|
46
|
-
ref: 'Node',
|
|
47
|
-
localField: '_id',
|
|
48
|
-
foreignField: 'fromOfferId',
|
|
49
|
-
justOne: false,
|
|
50
|
-
match: { relationKey: 'offers' },
|
|
51
|
-
},
|
|
52
|
-
],
|
|
53
|
-
}
|
|
54
|
-
);
|
|
55
|
-
|
|
56
|
-
export const AssetLicense = mongo.createModel<Types.AssetLicenseDocument>('AssetLicense', {
|
|
57
|
-
value: { type: String, required: true },
|
|
58
|
-
// assets: [{ type: mongo.Schema.Types.ObjectId, ref: 'Asset' }],
|
|
59
|
-
});
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
// module/asset.router.ts
|
|
2
|
-
|
|
3
|
-
import { z as zod } from 'zod';
|
|
4
|
-
import { initTRPC, inferRouterInputs, inferRouterOutputs } from '@trpc/server';
|
|
5
|
-
import { customErrorFormatter, hasRole } from '../../util/rpc';
|
|
6
|
-
import type { RouterContext } from '../../types';
|
|
7
|
-
import { Asset, AssetLicense } from './asset.schema';
|
|
8
|
-
|
|
9
|
-
export const z = zod;
|
|
10
|
-
export const t = initTRPC.context<RouterContext>().create();
|
|
11
|
-
export const router = t.router;
|
|
12
|
-
export const procedure = t.procedure;
|
|
13
|
-
|
|
14
|
-
export const createRouter = () =>
|
|
15
|
-
router({
|
|
16
|
-
getAsset: procedure
|
|
17
|
-
.use(hasRole('guest', t))
|
|
18
|
-
.use(customErrorFormatter(t))
|
|
19
|
-
.input(z.object({ assetId: z.string() }))
|
|
20
|
-
.query(({ input, ctx }) => (ctx.app.service.Asset.getAsset as any)(input, ctx)),
|
|
21
|
-
|
|
22
|
-
createAsset: procedure
|
|
23
|
-
.use(hasRole('admin', t))
|
|
24
|
-
.use(customErrorFormatter(t))
|
|
25
|
-
.input(Asset)
|
|
26
|
-
.mutation(({ input, ctx }) => (ctx.app.service.Asset.createAsset as any)(input, ctx)),
|
|
27
|
-
|
|
28
|
-
updateAsset: procedure
|
|
29
|
-
.use(hasRole('admin', t))
|
|
30
|
-
.use(customErrorFormatter(t))
|
|
31
|
-
.input(z.object({ assetId: z.string(), data: Asset.partial() }))
|
|
32
|
-
.mutation(({ input, ctx }) => (ctx.app.service.Asset.updateAsset as any)(input, ctx)),
|
|
33
|
-
|
|
34
|
-
getAssetLicense: procedure
|
|
35
|
-
.use(hasRole('guest', t))
|
|
36
|
-
.use(customErrorFormatter(t))
|
|
37
|
-
.input(z.object({ assetLicenseId: z.string() }))
|
|
38
|
-
.query(({ input, ctx }) => (ctx.app.service.Asset.getAssetLicense as any)(input, ctx)),
|
|
39
|
-
|
|
40
|
-
createAssetLicense: procedure
|
|
41
|
-
.use(hasRole('admin', t))
|
|
42
|
-
.use(customErrorFormatter(t))
|
|
43
|
-
.input(AssetLicense)
|
|
44
|
-
.mutation(({ input, ctx }) => (ctx.app.service.Asset.createAssetLicense as any)(input, ctx)),
|
|
45
|
-
|
|
46
|
-
updateAssetLicense: procedure
|
|
47
|
-
.use(hasRole('admin', t))
|
|
48
|
-
.use(customErrorFormatter(t))
|
|
49
|
-
.input(z.object({ assetLicenseId: z.string(), data: AssetLicense.partial() }))
|
|
50
|
-
.mutation(({ input, ctx }) => (ctx.app.service.Asset.updateAssetLicense as any)(input, ctx)),
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
export type Router = ReturnType<typeof createRouter>;
|
|
54
|
-
export type RouterInput = inferRouterInputs<Router>;
|
|
55
|
-
export type RouterOutput = inferRouterOutputs<Router>;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { z, ObjectId, Entity } from '../../schema';
|
|
2
|
-
|
|
3
|
-
export const AssetStandard = Entity.merge(
|
|
4
|
-
z.object({
|
|
5
|
-
version: z.string().optional(),
|
|
6
|
-
parentId: ObjectId.optional(),
|
|
7
|
-
})
|
|
8
|
-
);
|
|
9
|
-
|
|
10
|
-
export const Asset = Entity.merge(
|
|
11
|
-
z.object({
|
|
12
|
-
uri: z.string().min(1),
|
|
13
|
-
type: z.string().max(100).min(1),
|
|
14
|
-
standards: z.array(ObjectId),
|
|
15
|
-
licenseId: ObjectId.optional(),
|
|
16
|
-
license: ObjectId.optional(),
|
|
17
|
-
chainId: ObjectId.optional(),
|
|
18
|
-
items: z.array(ObjectId).optional(),
|
|
19
|
-
})
|
|
20
|
-
);
|
|
21
|
-
|
|
22
|
-
export const AssetLicense = Entity.merge(
|
|
23
|
-
z.object({
|
|
24
|
-
value: z.string().min(1),
|
|
25
|
-
assets: z.array(ObjectId).optional(),
|
|
26
|
-
})
|
|
27
|
-
);
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import type { Asset, AssetLicense, Router, RouterInput, RouterOutput, RouterContext } from './asset.types';
|
|
2
|
-
|
|
3
|
-
export class Service {
|
|
4
|
-
async getAsset(input: RouterInput['getAsset'], ctx: RouterContext): Promise<RouterOutput['getAsset']> {
|
|
5
|
-
if (!input) throw new Error('Input should not be void');
|
|
6
|
-
console.log('Asset.Service.getAsset', input.assetId);
|
|
7
|
-
|
|
8
|
-
const asset = await ctx.app.model.Asset.findById(input.assetId).lean().exec();
|
|
9
|
-
if (!asset) throw new Error('Asset not found');
|
|
10
|
-
|
|
11
|
-
return asset as Asset;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
async getAssetLicense(
|
|
15
|
-
input: RouterInput['getAssetLicense'],
|
|
16
|
-
ctx: RouterContext
|
|
17
|
-
): Promise<RouterOutput['getAssetLicense']> {
|
|
18
|
-
if (!input) throw new Error('Input should not be void');
|
|
19
|
-
console.log('Asset.Service.getAssetLicense', input.assetLicenseId);
|
|
20
|
-
|
|
21
|
-
const assetLicense = await ctx.app.model.AssetLicense.findById(input.assetLicenseId).lean().exec();
|
|
22
|
-
if (!assetLicense) throw new Error('AssetLicense not found');
|
|
23
|
-
|
|
24
|
-
return assetLicense as AssetLicense;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
async createAsset(input: RouterInput['createAsset'], ctx: RouterContext): Promise<RouterOutput['createAsset']> {
|
|
28
|
-
if (!input) throw new Error('Input should not be void');
|
|
29
|
-
console.log('Asset.Service.createAsset', input.uri, input.type);
|
|
30
|
-
|
|
31
|
-
const asset = await ctx.app.model.Asset.create({
|
|
32
|
-
uri: input.uri,
|
|
33
|
-
type: input.type,
|
|
34
|
-
standards: input.standards,
|
|
35
|
-
licenseId: input.licenseId,
|
|
36
|
-
chainId: input.chainId,
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
return asset as Asset;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
async createAssetLicense(
|
|
43
|
-
input: RouterInput['createAssetLicense'],
|
|
44
|
-
ctx: RouterContext
|
|
45
|
-
): Promise<RouterOutput['createAssetLicense']> {
|
|
46
|
-
if (!input) throw new Error('Input should not be void');
|
|
47
|
-
console.log('Asset.Service.createAssetLicense', input.value);
|
|
48
|
-
|
|
49
|
-
const assetLicense = await ctx.app.model.AssetLicense.create({
|
|
50
|
-
value: input.value,
|
|
51
|
-
assets: input.assets,
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
return assetLicense as AssetLicense;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
async updateAsset(input: RouterInput['updateAsset'], ctx: RouterContext): Promise<RouterOutput['updateAsset']> {
|
|
58
|
-
if (!input) throw new Error('Input should not be void');
|
|
59
|
-
console.log('Asset.Service.updateAsset', input.assetId, input.data);
|
|
60
|
-
|
|
61
|
-
const updatedAsset = await ctx.app.model.Asset.findByIdAndUpdate(input.assetId, input.data, { new: true })
|
|
62
|
-
.lean()
|
|
63
|
-
.exec();
|
|
64
|
-
if (!updatedAsset) throw new Error('Asset update failed');
|
|
65
|
-
|
|
66
|
-
return updatedAsset as Asset;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
async updateAssetLicense(
|
|
70
|
-
input: RouterInput['updateAssetLicense'],
|
|
71
|
-
ctx: RouterContext
|
|
72
|
-
): Promise<RouterOutput['updateAssetLicense']> {
|
|
73
|
-
if (!input) throw new Error('Input should not be void');
|
|
74
|
-
console.log('Asset.Service.updateAssetLicense', input.assetLicenseId, input.data);
|
|
75
|
-
|
|
76
|
-
const updatedAssetLicense = await ctx.app.model.AssetLicense.findByIdAndUpdate(input.assetLicenseId, input.data, {
|
|
77
|
-
new: true,
|
|
78
|
-
})
|
|
79
|
-
.lean()
|
|
80
|
-
.exec();
|
|
81
|
-
if (!updatedAssetLicense) throw new Error('AssetLicense update failed');
|
|
82
|
-
|
|
83
|
-
return updatedAssetLicense as AssetLicense;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import * as schema from './asset.schema';
|
|
3
|
-
import { Document, Model } from '../../util/mongo';
|
|
4
|
-
|
|
5
|
-
export type * from './asset.router';
|
|
6
|
-
export type * from './asset.service';
|
|
7
|
-
export type { RouterContext } from '../../types';
|
|
8
|
-
|
|
9
|
-
export type Asset = z.infer<typeof schema.Asset>;
|
|
10
|
-
export type AssetDocument = Asset & Document;
|
|
11
|
-
|
|
12
|
-
export type AssetStandard = z.infer<typeof schema.AssetStandard>;
|
|
13
|
-
export type AssetStandardDocument = AssetStandard & Document;
|
|
14
|
-
|
|
15
|
-
export type AssetLicense = z.infer<typeof schema.AssetLicense>;
|
|
16
|
-
export type AssetLicenseDocument = AssetLicense & Document;
|
|
17
|
-
|
|
18
|
-
export type Mappings = {
|
|
19
|
-
Asset: Model<AssetDocument>;
|
|
20
|
-
AssetStandard: Model<AssetStandardDocument>;
|
|
21
|
-
AssetLicense: Model<AssetLicenseDocument>;
|
|
22
|
-
};
|
package/modules/asset/index.ts
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import * as mongo from '../../util/mongo';
|
|
2
|
-
import type * as Types from './chain.types';
|
|
3
|
-
|
|
4
|
-
export const Chain = mongo.createModel<Types.ChainDocument>('Chain', {
|
|
5
|
-
content: { type: String, required: true },
|
|
6
|
-
type: { type: String, maxlength: 100, required: true },
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
export const ChainContract = mongo.createModel<Types.ChainContractDocument>('ChainContract', {
|
|
10
|
-
chainId: { type: mongo.Schema.Types.ObjectId, ref: 'Chain', required: true },
|
|
11
|
-
content: { type: String },
|
|
12
|
-
address: { type: String },
|
|
13
|
-
type: { type: String, maxlength: 100, required: true },
|
|
14
|
-
standards: [{ type: mongo.Schema.Types.ObjectId, ref: 'AssetStandard', required: true }],
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
export const ChainToken = mongo.createModel<Types.ChainTokenDocument>(
|
|
18
|
-
'ChainToken',
|
|
19
|
-
{
|
|
20
|
-
chainId: { type: mongo.Schema.Types.ObjectId, ref: 'Chain', required: true },
|
|
21
|
-
chainContractId: { type: mongo.Schema.Types.ObjectId, ref: 'ChainContract', required: true },
|
|
22
|
-
rank: { type: Number, min: 0, default: 0 },
|
|
23
|
-
description: { type: String, trim: true },
|
|
24
|
-
address: { type: String },
|
|
25
|
-
content: { type: String },
|
|
26
|
-
decimals: { type: Number, default: 0 },
|
|
27
|
-
price: { type: Number, min: 0, default: 0 },
|
|
28
|
-
hourChange: { type: Number, default: 0 },
|
|
29
|
-
dayChange: { type: Number, default: 0 },
|
|
30
|
-
weekChange: { type: Number, default: 0 },
|
|
31
|
-
marketCap: { type: Number, min: 0, default: 0 },
|
|
32
|
-
volume: { type: Number, min: 0, default: 0 },
|
|
33
|
-
symbol: { type: String, required: true, trim: true },
|
|
34
|
-
circulatingSupply: { type: Number, min: 0, default: 0 },
|
|
35
|
-
cmcLink: { type: String, trim: true },
|
|
36
|
-
movementDown: { type: Number, min: 0, default: 0 },
|
|
37
|
-
movementUp: { type: Number, min: 0, default: 0 },
|
|
38
|
-
enteredTop100: { type: Number, min: 0, default: 0 },
|
|
39
|
-
exitedTop100: { type: Number, min: 0, default: 0 },
|
|
40
|
-
largeMoveDown: { type: Number, min: 0, default: 0 },
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
indexes: [{ applicationId: 1, symbol: 1, unique: true }],
|
|
44
|
-
}
|
|
45
|
-
);
|
|
46
|
-
|
|
47
|
-
export const ChainTransaction = mongo.createModel<Types.ChainTransactionDocument>('ChainTransaction', {
|
|
48
|
-
value: { type: String, required: true },
|
|
49
|
-
chainId: { type: mongo.Schema.Types.ObjectId, ref: 'Chain', required: true },
|
|
50
|
-
});
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
// module/chain.router.ts
|
|
2
|
-
|
|
3
|
-
import { z as zod } from 'zod';
|
|
4
|
-
import { initTRPC, inferRouterInputs } from '@trpc/server';
|
|
5
|
-
import { customErrorFormatter, hasRole } from '../../util/rpc';
|
|
6
|
-
import type { RouterContext } from '../../types';
|
|
7
|
-
import { Chain, ChainContract, ChainToken, ChainTransaction } from './chain.schema';
|
|
8
|
-
import { Query, getQueryInput, getQueryOutput, inferRouterOutputs } from '../../schema';
|
|
9
|
-
|
|
10
|
-
export const z = zod;
|
|
11
|
-
export const t = initTRPC.context<RouterContext>().create();
|
|
12
|
-
export const router = t.router;
|
|
13
|
-
export const procedure = t.procedure;
|
|
14
|
-
|
|
15
|
-
export const createRouter = () =>
|
|
16
|
-
router({
|
|
17
|
-
getChain: procedure
|
|
18
|
-
.use(hasRole('guest', t))
|
|
19
|
-
.use(customErrorFormatter(t))
|
|
20
|
-
.input(getQueryInput(Chain))
|
|
21
|
-
.output(Chain)
|
|
22
|
-
.query(({ input, ctx }) => (ctx.app.service.Chain.getChain as any)(input, ctx)),
|
|
23
|
-
|
|
24
|
-
createChain: procedure
|
|
25
|
-
.use(hasRole('admin', t))
|
|
26
|
-
.use(customErrorFormatter(t))
|
|
27
|
-
.input(getQueryInput(Chain))
|
|
28
|
-
.output(Chain.pick({ id: true }))
|
|
29
|
-
.mutation(({ input, ctx }) => (ctx.app.service.Chain.createChain as any)(input, ctx)),
|
|
30
|
-
|
|
31
|
-
updateChain: procedure
|
|
32
|
-
.use(hasRole('admin', t))
|
|
33
|
-
.use(customErrorFormatter(t))
|
|
34
|
-
.input(getQueryInput(Chain))
|
|
35
|
-
.output(Chain.pick({ id: true }))
|
|
36
|
-
.mutation(({ input, ctx }) => (ctx.app.service.Chain.updateChain as any)(input, ctx)),
|
|
37
|
-
|
|
38
|
-
getChainContract: procedure
|
|
39
|
-
.use(hasRole('guest', t))
|
|
40
|
-
.use(customErrorFormatter(t))
|
|
41
|
-
.input(getQueryInput(ChainContract))
|
|
42
|
-
.output(ChainContract)
|
|
43
|
-
.query(({ input, ctx }) => (ctx.app.service.Chain.getChainContract as any)(input, ctx)),
|
|
44
|
-
|
|
45
|
-
createChainContract: procedure
|
|
46
|
-
.use(hasRole('admin', t))
|
|
47
|
-
.use(customErrorFormatter(t))
|
|
48
|
-
.input(getQueryInput(ChainContract))
|
|
49
|
-
.output(ChainContract.pick({ id: true }))
|
|
50
|
-
.mutation(({ input, ctx }) => (ctx.app.service.Chain.createChainContract as any)(input, ctx)),
|
|
51
|
-
|
|
52
|
-
updateChainContract: procedure
|
|
53
|
-
.use(hasRole('admin', t))
|
|
54
|
-
.use(customErrorFormatter(t))
|
|
55
|
-
.input(getQueryInput(ChainContract))
|
|
56
|
-
.output(ChainContract.pick({ id: true }))
|
|
57
|
-
.mutation(({ input, ctx }) => (ctx.app.service.Chain.updateChainContract as any)(input, ctx)),
|
|
58
|
-
|
|
59
|
-
getChainToken: procedure
|
|
60
|
-
.use(hasRole('guest', t))
|
|
61
|
-
.use(customErrorFormatter(t))
|
|
62
|
-
.input(getQueryInput(ChainToken))
|
|
63
|
-
.output(ChainToken)
|
|
64
|
-
.query(({ input, ctx }) => (ctx.app.service.Chain.getChainToken as any)(input, ctx)),
|
|
65
|
-
|
|
66
|
-
createChainToken: procedure
|
|
67
|
-
.use(hasRole('admin', t))
|
|
68
|
-
.use(customErrorFormatter(t))
|
|
69
|
-
.input(getQueryInput(ChainToken))
|
|
70
|
-
.output(ChainToken.pick({ id: true }))
|
|
71
|
-
.mutation(({ input, ctx }) => (ctx.app.service.Chain.createChainToken as any)(input, ctx)),
|
|
72
|
-
|
|
73
|
-
updateChainToken: procedure
|
|
74
|
-
.use(hasRole('admin', t))
|
|
75
|
-
.use(customErrorFormatter(t))
|
|
76
|
-
.input(getQueryInput(ChainToken))
|
|
77
|
-
.output(ChainToken.pick({ id: true }))
|
|
78
|
-
.mutation(({ input, ctx }) => (ctx.app.service.Chain.updateChainToken as any)(input, ctx)),
|
|
79
|
-
|
|
80
|
-
getChainTransaction: procedure
|
|
81
|
-
.use(hasRole('guest', t))
|
|
82
|
-
.use(customErrorFormatter(t))
|
|
83
|
-
.input(getQueryInput(ChainTransaction))
|
|
84
|
-
.output(ChainTransaction)
|
|
85
|
-
.query(({ input, ctx }) => (ctx.app.service.Chain.getChainTransaction as any)(input, ctx)),
|
|
86
|
-
|
|
87
|
-
createChainTransaction: procedure
|
|
88
|
-
.use(hasRole('admin', t))
|
|
89
|
-
.use(customErrorFormatter(t))
|
|
90
|
-
.input(getQueryInput(ChainTransaction))
|
|
91
|
-
.output(ChainTransaction.pick({ id: true }))
|
|
92
|
-
.mutation(({ input, ctx }) => (ctx.app.service.Chain.createChainTransaction as any)(input, ctx)),
|
|
93
|
-
|
|
94
|
-
updateChainTransaction: procedure
|
|
95
|
-
.use(hasRole('admin', t))
|
|
96
|
-
.use(customErrorFormatter(t))
|
|
97
|
-
.input(getQueryInput(ChainTransaction))
|
|
98
|
-
.output(ChainTransaction.pick({ id: true }))
|
|
99
|
-
.mutation(({ input, ctx }) => (ctx.app.service.Chain.updateChainTransaction as any)(input, ctx)),
|
|
100
|
-
});
|
|
101
|
-
|
|
102
|
-
export type Router = ReturnType<typeof createRouter>;
|
|
103
|
-
export type RouterInput = inferRouterInputs<Router>;
|
|
104
|
-
export type RouterOutput = inferRouterOutputs<Router>;
|