@arken/node 1.5.2 → 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/decoder.ts +3 -3
- package/index.ts +1 -46
- package/legacy/data/items.ts +1 -1
- package/log.ts +47 -1
- package/merkle.ts +3 -1
- package/mongo.ts +1 -1
- package/package.json +1 -1
- package/process.ts +1 -1
- package/trpc/socketLink.ts +2 -2
- package/trpc/socketServer.ts +1 -1
- package/tsconfig.json +2 -4
- package/web3.ts +2 -1
- package/websocket.ts +1 -1
- package/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/router.ts +0 -49
- package/types.ts +0 -183
- /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
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
import { getFilter } from '../../util/api';
|
|
2
|
-
import dayjs from 'dayjs';
|
|
3
|
-
export class Service {
|
|
4
|
-
async getJob(input, ctx) {
|
|
5
|
-
if (!input)
|
|
6
|
-
throw new Error('Input should not be void');
|
|
7
|
-
console.log('Job.Service.getJob', input.query);
|
|
8
|
-
const filter = getFilter(input.query);
|
|
9
|
-
const job = await ctx.app.model.Job.findOne(filter).lean().exec();
|
|
10
|
-
if (!job)
|
|
11
|
-
throw new Error('Job not found');
|
|
12
|
-
return job;
|
|
13
|
-
}
|
|
14
|
-
async createJob(input, ctx) {
|
|
15
|
-
if (!input)
|
|
16
|
-
throw new Error('Input should not be void');
|
|
17
|
-
console.log('Job.Service.createJob', input.data);
|
|
18
|
-
const job = await ctx.app.model.Job.create(input.data);
|
|
19
|
-
return job;
|
|
20
|
-
}
|
|
21
|
-
async updateJob(input, ctx) {
|
|
22
|
-
if (!input)
|
|
23
|
-
throw new Error('Input should not be void');
|
|
24
|
-
console.log('Job.Service.updateJob', input.query, input.data);
|
|
25
|
-
const filter = getFilter(input.query);
|
|
26
|
-
const updatedJob = await ctx.app.model.Job.findOneAndUpdate(filter, input.data, { new: true }).lean().exec();
|
|
27
|
-
if (!updatedJob)
|
|
28
|
-
throw new Error('Job update failed');
|
|
29
|
-
return updatedJob;
|
|
30
|
-
}
|
|
31
|
-
async updateMetrics(input, ctx) {
|
|
32
|
-
if (!input)
|
|
33
|
-
throw new Error('Input should not be void');
|
|
34
|
-
console.log('Job.Service.updateMetrics');
|
|
35
|
-
let latestRecord;
|
|
36
|
-
let latestNumber = 1;
|
|
37
|
-
const { Stat, Payment } = ctx.app.model;
|
|
38
|
-
try {
|
|
39
|
-
latestRecord = await Stat.findOne().sort({ number: -1 }).exec();
|
|
40
|
-
if (latestRecord) {
|
|
41
|
-
latestNumber = latestRecord.number;
|
|
42
|
-
const dayAgo = dayjs().subtract(1, 'day');
|
|
43
|
-
if (!dayjs(latestRecord.createdDate).isAfter(dayAgo)) {
|
|
44
|
-
latestRecord = undefined;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
catch (e) {
|
|
49
|
-
console.log('Error getting latest stat record', e);
|
|
50
|
-
}
|
|
51
|
-
const totalPaymentsCount = await Payment.countDocuments().exec();
|
|
52
|
-
const pendingPayments = await Payment.where({ status: { $in: ['Processing', 'Processed', 'Finalized'] } });
|
|
53
|
-
const completedPayments = await Payment.where({ status: { $in: ['Completed'] } });
|
|
54
|
-
const pendingTokens = {};
|
|
55
|
-
const distributedTokens = {};
|
|
56
|
-
for (const payment of pendingPayments) {
|
|
57
|
-
for (const i in payment.meta.tokenKeys) {
|
|
58
|
-
const key = payment.meta.tokenKeys[i];
|
|
59
|
-
const amount = payment.meta.tokenAmounts[i];
|
|
60
|
-
if (!pendingTokens[key])
|
|
61
|
-
pendingTokens[key] = 0;
|
|
62
|
-
pendingTokens[key] += amount;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
for (const payment of completedPayments) {
|
|
66
|
-
for (const i in payment.meta.tokenKeys) {
|
|
67
|
-
const key = payment.meta.tokenKeys[i];
|
|
68
|
-
const amount = payment.meta.tokenAmounts[i];
|
|
69
|
-
if (!distributedTokens[key])
|
|
70
|
-
distributedTokens[key] = 0;
|
|
71
|
-
distributedTokens[key] += amount;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
const pendingPaymentsCount = pendingPayments.length;
|
|
75
|
-
const completedPaymentsCount = completedPayments.length;
|
|
76
|
-
const pendingRewardTokens = await ctx.app.model.Profile.aggregate([
|
|
77
|
-
{
|
|
78
|
-
$project: {
|
|
79
|
-
tokens: { $objectToArray: '$meta.rewards.tokens' },
|
|
80
|
-
},
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
$unwind: '$tokens',
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
$group: {
|
|
87
|
-
_id: '$tokens.k',
|
|
88
|
-
total: { $sum: '$tokens.v' },
|
|
89
|
-
},
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
$group: {
|
|
93
|
-
_id: null,
|
|
94
|
-
tokens: {
|
|
95
|
-
$push: {
|
|
96
|
-
k: '$_id',
|
|
97
|
-
v: '$total',
|
|
98
|
-
},
|
|
99
|
-
},
|
|
100
|
-
},
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
$project: {
|
|
104
|
-
_id: 0,
|
|
105
|
-
tokens: { $arrayToObject: '$tokens' },
|
|
106
|
-
},
|
|
107
|
-
},
|
|
108
|
-
]);
|
|
109
|
-
const meta = {
|
|
110
|
-
payments: {
|
|
111
|
-
totalCount: totalPaymentsCount,
|
|
112
|
-
pendingCount: pendingPaymentsCount,
|
|
113
|
-
completedCount: completedPaymentsCount,
|
|
114
|
-
status: {
|
|
115
|
-
Processing: await Payment.where({ status: 'Processing' }).countDocuments().exec(),
|
|
116
|
-
Processed: await Payment.where({ status: 'Processed' }).countDocuments().exec(),
|
|
117
|
-
Finalized: await Payment.where({ status: 'Finalized' }).countDocuments().exec(),
|
|
118
|
-
Completed: await Payment.where({ status: 'Completed' }).countDocuments().exec(),
|
|
119
|
-
Voided: await Payment.where({ status: 'Voided' }).countDocuments().exec(),
|
|
120
|
-
},
|
|
121
|
-
pendingTokens,
|
|
122
|
-
distributedTokens,
|
|
123
|
-
},
|
|
124
|
-
rewards: {
|
|
125
|
-
pendingRewardTokens: pendingRewardTokens?.[0]?.tokens || {},
|
|
126
|
-
},
|
|
127
|
-
};
|
|
128
|
-
if (latestRecord) {
|
|
129
|
-
await Stat.updateOne({ _id: latestRecord.id }, {
|
|
130
|
-
...latestRecord.toObject(),
|
|
131
|
-
meta,
|
|
132
|
-
}).exec();
|
|
133
|
-
}
|
|
134
|
-
else {
|
|
135
|
-
await Stat.create({
|
|
136
|
-
number: latestNumber + 1,
|
|
137
|
-
createdDate: new Date(),
|
|
138
|
-
meta,
|
|
139
|
-
});
|
|
140
|
-
}
|
|
141
|
-
return { status: 1 };
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
//# sourceMappingURL=job.service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"job.service.js","sourceRoot":"","sources":["../../../modules/job/job.service.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,OAAO,OAAO;IAClB,KAAK,CAAC,MAAM,CAAC,KAA4B,EAAE,GAAkB;QAC3D,IAAI,CAAC,KAAK;YAAE,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;QACxD,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;QAE/C,MAAM,MAAM,GAAG,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACtC,MAAM,GAAG,GAAG,MAAM,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC;QAClE,IAAI,CAAC,GAAG;YAAE,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;QAE3C,OAAO,GAAU,CAAC;IACpB,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,KAA+B,EAAE,GAAkB;QACjE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AC,QAAQ,EAAE;gBAC1B,IAAI;aACL,CACF,CAAC,IAAI,EAAE,CAAC;QACX,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,CAAC,MAAM,CAAC;gBAChB,MAAM,EAAE,YAAY,GAAG,CAAC;gBACxB,WAAW,EAAE,IAAI,IAAI,EAAE;gBACvB,IAAI;aACL,CAAC,CAAC;QACL,CAAC;QA+DD,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;IACvB,CAAC;CACF"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import * as schema from './job.schema';
|
|
3
|
-
import { Document, Model } from '../../util/mongo';
|
|
4
|
-
import type { RouterContext } from '../../types';
|
|
5
|
-
import type { inferRouterInputs, inferRouterOutputs } from '@trpc/server';
|
|
6
|
-
import type { Router } from './job.router';
|
|
7
|
-
export type * from './job.router';
|
|
8
|
-
export type * from './job.service';
|
|
9
|
-
export type { RouterContext };
|
|
10
|
-
export type Job = z.infer<typeof schema.Job>;
|
|
11
|
-
export type JobDocument = Job & Document;
|
|
12
|
-
export type Mappings = {
|
|
13
|
-
Job: Model<JobDocument>;
|
|
14
|
-
};
|
|
15
|
-
export type RouterInput = inferRouterInputs<Router>;
|
|
16
|
-
export type RouterOutput = inferRouterOutputs<Router>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"job.types.js","sourceRoot":"","sources":["../../../modules/job/job.types.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../modules/market/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,iBAAiB,CAAC;AAC1C,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAC;AAC3C,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as mongo from '../../util/mongo';
|
|
2
|
-
import type * as Types from './market.types';
|
|
3
|
-
export declare const Market: mongo.Model<any> | mongo.Model<Types.MarketDocument>;
|
|
4
|
-
export declare const MarketPair: mongo.Model<any> | mongo.Model<Types.MarketPairDocument>;
|
|
5
|
-
export declare const MarketExchange: mongo.Model<any> | mongo.Model<Types.MarketExchangeDocument>;
|
|
6
|
-
export declare const MarketAnalysis: mongo.Model<any> | mongo.Model<Types.MarketAnalysisDocument>;
|
|
7
|
-
export declare const MarketInvestor: mongo.Model<any> | mongo.Model<Types.MarketInvestorDocument>;
|
|
8
|
-
export declare const MarketInvestmentPortfolio: mongo.Model<any> | mongo.Model<Types.MarketInvestmentPortfolioDocument>;
|
|
9
|
-
export declare const MarketInvestment: mongo.Model<any> | mongo.Model<Types.MarketInvestmentDocument>;
|
|
10
|
-
export declare const MarketStock: mongo.Model<any> | mongo.Model<Types.MarketStockDocument>;
|
|
11
|
-
export declare const MarketToken: mongo.Model<any> | mongo.Model<Types.MarketTokenDocument>;
|
|
12
|
-
export declare const MarketCompany: mongo.Model<any> | mongo.Model<Types.MarketCompanyDocument>;
|
|
13
|
-
export declare const MarketETF: mongo.Model<any> | mongo.Model<Types.MarketETFDocument>;
|
|
14
|
-
export declare const MarketStockSentiment: mongo.Model<any> | mongo.Model<Types.MarketStockSentimentDocument>;
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import * as mongo from '../../util/mongo';
|
|
2
|
-
export const Market = mongo.createModel('Market', {
|
|
3
|
-
value: { type: String, required: true },
|
|
4
|
-
});
|
|
5
|
-
export const MarketPair = mongo.createModel('MarketPair', {
|
|
6
|
-
value: { type: String, required: true },
|
|
7
|
-
});
|
|
8
|
-
export const MarketExchange = mongo.createModel('MarketExchange', {
|
|
9
|
-
value: { type: String },
|
|
10
|
-
});
|
|
11
|
-
export const MarketAnalysis = mongo.createModel('MarketAnalysis', {
|
|
12
|
-
action: { type: String, required: true },
|
|
13
|
-
asset: { type: String, required: true },
|
|
14
|
-
signalType: { type: String, required: true },
|
|
15
|
-
confidence: { type: Number, required: true },
|
|
16
|
-
riskLevel: { type: String, required: true },
|
|
17
|
-
timeFrame: { type: String, required: true },
|
|
18
|
-
source: { type: String, required: true },
|
|
19
|
-
summary: { type: String, required: true },
|
|
20
|
-
labels: {
|
|
21
|
-
sector: { type: String },
|
|
22
|
-
topic: { type: String },
|
|
23
|
-
sentiment: { type: String },
|
|
24
|
-
},
|
|
25
|
-
});
|
|
26
|
-
export const MarketInvestor = mongo.createModel('MarketInvestor', {
|
|
27
|
-
portfolioIds: [{ type: mongo.Schema.Types.ObjectId, required: true }],
|
|
28
|
-
totalPnl: { type: Number },
|
|
29
|
-
});
|
|
30
|
-
export const MarketInvestmentPortfolio = mongo.createModel('MarketInvestmentPortfolio', {
|
|
31
|
-
categoryGoals: [
|
|
32
|
-
{
|
|
33
|
-
category: { type: String, required: true },
|
|
34
|
-
goalPercentage: { type: Number, required: true },
|
|
35
|
-
currentPnL: { type: Number },
|
|
36
|
-
historicalPnL: { type: Number },
|
|
37
|
-
},
|
|
38
|
-
],
|
|
39
|
-
investmentIds: [{ type: mongo.Schema.Types.ObjectId, required: true }],
|
|
40
|
-
totalPnl: { type: Number },
|
|
41
|
-
});
|
|
42
|
-
export const MarketInvestment = mongo.createModel('MarketInvestment', {
|
|
43
|
-
type: { type: String, required: true },
|
|
44
|
-
amount: { type: Number, required: true },
|
|
45
|
-
category: { type: String, required: true },
|
|
46
|
-
purchasePrice: { type: Number, required: true },
|
|
47
|
-
currentValue: { type: Number, required: true },
|
|
48
|
-
pnl: { type: Number, required: true },
|
|
49
|
-
transactions: [
|
|
50
|
-
{
|
|
51
|
-
date: { type: Date, required: true },
|
|
52
|
-
type: { type: String, required: true },
|
|
53
|
-
price: { type: Number, required: true },
|
|
54
|
-
quantity: { type: Number, required: true },
|
|
55
|
-
},
|
|
56
|
-
],
|
|
57
|
-
stockId: { type: mongo.Schema.Types.ObjectId },
|
|
58
|
-
chainTokenId: { type: mongo.Schema.Types.ObjectId },
|
|
59
|
-
});
|
|
60
|
-
export const MarketStock = mongo.createModel('MarketStock', {
|
|
61
|
-
ticker: { type: String, required: true },
|
|
62
|
-
companyId: { type: mongo.Schema.Types.ObjectId, required: true, ref: 'StockCompany' },
|
|
63
|
-
currentPrice: { type: Number, required: true },
|
|
64
|
-
marketCap: { type: Number },
|
|
65
|
-
volume: { type: Number },
|
|
66
|
-
currency: { type: String, required: true },
|
|
67
|
-
aum: { type: Number },
|
|
68
|
-
quoteType: { type: String },
|
|
69
|
-
dailyChange: { type: Number },
|
|
70
|
-
dailyChangePercent: { type: Number },
|
|
71
|
-
});
|
|
72
|
-
export const MarketToken = mongo.createModel('MarketToken', {
|
|
73
|
-
symbol: { type: String, required: true },
|
|
74
|
-
currentPrice: { type: Number, required: true },
|
|
75
|
-
});
|
|
76
|
-
export const MarketCompany = mongo.createModel('MarketCompany', {
|
|
77
|
-
ticker: { type: String, required: true },
|
|
78
|
-
country: { type: String, required: true },
|
|
79
|
-
industry: { type: String, required: true },
|
|
80
|
-
sector: { type: String, required: true },
|
|
81
|
-
type: { type: String, required: true },
|
|
82
|
-
issuedETFs: [{ type: mongo.Schema.Types.ObjectId, ref: 'MarketETF' }],
|
|
83
|
-
});
|
|
84
|
-
export const MarketETF = mongo.createModel('ETF', {
|
|
85
|
-
ticker: { type: String, required: true },
|
|
86
|
-
issuerId: { type: mongo.Schema.Types.ObjectId, required: true },
|
|
87
|
-
leverage: { type: Number, required: false },
|
|
88
|
-
});
|
|
89
|
-
export const MarketStockSentiment = mongo.createModel('MarketStockSentiment', {
|
|
90
|
-
ticker: { type: String, required: true },
|
|
91
|
-
companyId: { type: mongo.Schema.Types.ObjectId, required: true, ref: 'StockCompany' },
|
|
92
|
-
sentiment: {
|
|
93
|
-
label: { type: String, required: true },
|
|
94
|
-
score: { type: Number, required: true },
|
|
95
|
-
},
|
|
96
|
-
confidence: { type: Number, required: true },
|
|
97
|
-
});
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,CAAC;AAEH,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,CAAC,WAAW,CAA0B,KAAK,EAAE;IACzE,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;IACxC,QAAQ,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;IAC/D,QAAQ,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE;CAC5C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,CAAC,WAAW,CAAqC,sBAAsB,EAAE;IAChH,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;IACxC,SAAS,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,cAAc,EAAE;IACrF,SAAS,EAAE;QACT,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;QACvC,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;KACxC;IACD,UAAU,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;CAC7C,CAAC,CAAC"}
|
|
@@ -1,230 +0,0 @@
|
|
|
1
|
-
import { z as zod } from 'zod';
|
|
2
|
-
import { inferRouterInputs, inferRouterOutputs } from '@trpc/server';
|
|
3
|
-
import type { RouterContext } from '../../types';
|
|
4
|
-
export declare const z: typeof zod;
|
|
5
|
-
export declare const t: {
|
|
6
|
-
_config: import("@trpc/server/dist/unstable-core-do-not-import").RootConfig<{
|
|
7
|
-
ctx: RouterContext;
|
|
8
|
-
meta: object;
|
|
9
|
-
errorShape: import("@trpc/server/dist/unstable-core-do-not-import").DefaultErrorShape;
|
|
10
|
-
transformer: false;
|
|
11
|
-
}>;
|
|
12
|
-
procedure: import("@trpc/server/dist/unstable-core-do-not-import").ProcedureBuilder<RouterContext, object, object, typeof import("@trpc/server/dist/unstable-core-do-not-import").unsetMarker, typeof import("@trpc/server/dist/unstable-core-do-not-import").unsetMarker, typeof import("@trpc/server/dist/unstable-core-do-not-import").unsetMarker, typeof import("@trpc/server/dist/unstable-core-do-not-import").unsetMarker, false>;
|
|
13
|
-
middleware: <$ContextOverrides>(fn: import("@trpc/server/dist/unstable-core-do-not-import").MiddlewareFunction<RouterContext, object, object, $ContextOverrides, unknown>) => import("@trpc/server/dist/unstable-core-do-not-import").MiddlewareBuilder<RouterContext, object, $ContextOverrides, unknown>;
|
|
14
|
-
router: {
|
|
15
|
-
<TInput extends import("@trpc/server").RouterRecord>(input: TInput): import("@trpc/server/dist/unstable-core-do-not-import").BuiltRouter<{
|
|
16
|
-
ctx: RouterContext;
|
|
17
|
-
meta: object;
|
|
18
|
-
errorShape: import("@trpc/server/dist/unstable-core-do-not-import").DefaultErrorShape;
|
|
19
|
-
transformer: false;
|
|
20
|
-
}, TInput>;
|
|
21
|
-
<TInput extends import("@trpc/server/dist/unstable-core-do-not-import").CreateRouterOptions>(input: TInput): import("@trpc/server/dist/unstable-core-do-not-import").BuiltRouter<{
|
|
22
|
-
ctx: RouterContext;
|
|
23
|
-
meta: object;
|
|
24
|
-
errorShape: import("@trpc/server/dist/unstable-core-do-not-import").DefaultErrorShape;
|
|
25
|
-
transformer: false;
|
|
26
|
-
}, import("@trpc/server/dist/unstable-core-do-not-import").DecorateCreateRouterOptions<TInput>>;
|
|
27
|
-
};
|
|
28
|
-
mergeRouters: typeof import("@trpc/server/dist/unstable-core-do-not-import").mergeRouters;
|
|
29
|
-
createCallerFactory: <TRecord extends import("@trpc/server").RouterRecord>(router: Pick<import("@trpc/server/dist/unstable-core-do-not-import").Router<{
|
|
30
|
-
ctx: RouterContext;
|
|
31
|
-
meta: object;
|
|
32
|
-
errorShape: import("@trpc/server/dist/unstable-core-do-not-import").DefaultErrorShape;
|
|
33
|
-
transformer: false;
|
|
34
|
-
}, TRecord>, "_def">) => import("@trpc/server/dist/unstable-core-do-not-import").RouterCaller<{
|
|
35
|
-
ctx: RouterContext;
|
|
36
|
-
meta: object;
|
|
37
|
-
errorShape: import("@trpc/server/dist/unstable-core-do-not-import").DefaultErrorShape;
|
|
38
|
-
transformer: false;
|
|
39
|
-
}, TRecord>;
|
|
40
|
-
};
|
|
41
|
-
export declare const router: {
|
|
42
|
-
<TInput extends import("@trpc/server").RouterRecord>(input: TInput): import("@trpc/server/dist/unstable-core-do-not-import").BuiltRouter<{
|
|
43
|
-
ctx: RouterContext;
|
|
44
|
-
meta: object;
|
|
45
|
-
errorShape: import("@trpc/server/dist/unstable-core-do-not-import").DefaultErrorShape;
|
|
46
|
-
transformer: false;
|
|
47
|
-
}, TInput>;
|
|
48
|
-
<TInput extends import("@trpc/server/dist/unstable-core-do-not-import").CreateRouterOptions>(input: TInput): import("@trpc/server/dist/unstable-core-do-not-import").BuiltRouter<{
|
|
49
|
-
ctx: RouterContext;
|
|
50
|
-
meta: object;
|
|
51
|
-
errorShape: import("@trpc/server/dist/unstable-core-do-not-import").DefaultErrorShape;
|
|
52
|
-
transformer: false;
|
|
53
|
-
}, import("@trpc/server/dist/unstable-core-do-not-import").DecorateCreateRouterOptions<TInput>>;
|
|
54
|
-
};
|
|
55
|
-
export declare const procedure: import("@trpc/server/dist/unstable-core-do-not-import").ProcedureBuilder<RouterContext, object, object, typeof import("@trpc/server/dist/unstable-core-do-not-import").unsetMarker, typeof import("@trpc/server/dist/unstable-core-do-not-import").unsetMarker, typeof import("@trpc/server/dist/unstable-core-do-not-import").unsetMarker, typeof import("@trpc/server/dist/unstable-core-do-not-import").unsetMarker, false>;
|
|
56
|
-
export declare const createRouter: () => import("@trpc/server/dist/unstable-core-do-not-import").BuiltRouter<{
|
|
57
|
-
ctx: RouterContext;
|
|
58
|
-
meta: object;
|
|
59
|
-
errorShape: import("@trpc/server/dist/unstable-core-do-not-import").DefaultErrorShape;
|
|
60
|
-
transformer: false;
|
|
61
|
-
}, {
|
|
62
|
-
getMarket: import("@trpc/server").TRPCQueryProcedure<{
|
|
63
|
-
input: {
|
|
64
|
-
marketId?: string;
|
|
65
|
-
};
|
|
66
|
-
output: any;
|
|
67
|
-
}>;
|
|
68
|
-
createMarket: import("@trpc/server").TRPCMutationProcedure<{
|
|
69
|
-
input: {
|
|
70
|
-
id?: string | import("mongoose").Types.ObjectId;
|
|
71
|
-
name?: string;
|
|
72
|
-
value?: string;
|
|
73
|
-
data?: any;
|
|
74
|
-
description?: string;
|
|
75
|
-
key?: string;
|
|
76
|
-
status?: "Archived" | "Paused" | "Pending" | "Active";
|
|
77
|
-
meta?: any;
|
|
78
|
-
merkleLeaf?: string;
|
|
79
|
-
merkleIndex?: number;
|
|
80
|
-
createdById?: string | import("mongoose").Types.ObjectId;
|
|
81
|
-
editedById?: string | import("mongoose").Types.ObjectId;
|
|
82
|
-
deletedById?: string | import("mongoose").Types.ObjectId;
|
|
83
|
-
createdDate?: Date;
|
|
84
|
-
updatedDate?: Date;
|
|
85
|
-
deletedDate?: Date;
|
|
86
|
-
applicationId?: string | import("mongoose").Types.ObjectId;
|
|
87
|
-
ownerId?: string | import("mongoose").Types.ObjectId;
|
|
88
|
-
};
|
|
89
|
-
output: any;
|
|
90
|
-
}>;
|
|
91
|
-
updateMarket: import("@trpc/server").TRPCMutationProcedure<{
|
|
92
|
-
input: {
|
|
93
|
-
data?: {
|
|
94
|
-
id?: string | import("mongoose").Types.ObjectId;
|
|
95
|
-
name?: string;
|
|
96
|
-
value?: string;
|
|
97
|
-
data?: any;
|
|
98
|
-
description?: string;
|
|
99
|
-
key?: string;
|
|
100
|
-
status?: "Archived" | "Paused" | "Pending" | "Active";
|
|
101
|
-
meta?: any;
|
|
102
|
-
merkleLeaf?: string;
|
|
103
|
-
merkleIndex?: number;
|
|
104
|
-
createdById?: string | import("mongoose").Types.ObjectId;
|
|
105
|
-
editedById?: string | import("mongoose").Types.ObjectId;
|
|
106
|
-
deletedById?: string | import("mongoose").Types.ObjectId;
|
|
107
|
-
createdDate?: Date;
|
|
108
|
-
updatedDate?: Date;
|
|
109
|
-
deletedDate?: Date;
|
|
110
|
-
applicationId?: string | import("mongoose").Types.ObjectId;
|
|
111
|
-
ownerId?: string | import("mongoose").Types.ObjectId;
|
|
112
|
-
};
|
|
113
|
-
marketId?: string;
|
|
114
|
-
};
|
|
115
|
-
output: any;
|
|
116
|
-
}>;
|
|
117
|
-
getMarketPair: import("@trpc/server").TRPCQueryProcedure<{
|
|
118
|
-
input: {
|
|
119
|
-
marketPairId?: string;
|
|
120
|
-
};
|
|
121
|
-
output: any;
|
|
122
|
-
}>;
|
|
123
|
-
createMarketPair: import("@trpc/server").TRPCMutationProcedure<{
|
|
124
|
-
input: {
|
|
125
|
-
id?: string | import("mongoose").Types.ObjectId;
|
|
126
|
-
name?: string;
|
|
127
|
-
value?: string;
|
|
128
|
-
data?: any;
|
|
129
|
-
description?: string;
|
|
130
|
-
key?: string;
|
|
131
|
-
status?: "Archived" | "Paused" | "Pending" | "Active";
|
|
132
|
-
meta?: any;
|
|
133
|
-
merkleLeaf?: string;
|
|
134
|
-
merkleIndex?: number;
|
|
135
|
-
createdById?: string | import("mongoose").Types.ObjectId;
|
|
136
|
-
editedById?: string | import("mongoose").Types.ObjectId;
|
|
137
|
-
deletedById?: string | import("mongoose").Types.ObjectId;
|
|
138
|
-
createdDate?: Date;
|
|
139
|
-
updatedDate?: Date;
|
|
140
|
-
deletedDate?: Date;
|
|
141
|
-
applicationId?: string | import("mongoose").Types.ObjectId;
|
|
142
|
-
ownerId?: string | import("mongoose").Types.ObjectId;
|
|
143
|
-
};
|
|
144
|
-
output: any;
|
|
145
|
-
}>;
|
|
146
|
-
updateMarketPair: import("@trpc/server").TRPCMutationProcedure<{
|
|
147
|
-
input: {
|
|
148
|
-
data?: {
|
|
149
|
-
id?: string | import("mongoose").Types.ObjectId;
|
|
150
|
-
name?: string;
|
|
151
|
-
value?: string;
|
|
152
|
-
data?: any;
|
|
153
|
-
description?: string;
|
|
154
|
-
key?: string;
|
|
155
|
-
status?: "Archived" | "Paused" | "Pending" | "Active";
|
|
156
|
-
meta?: any;
|
|
157
|
-
merkleLeaf?: string;
|
|
158
|
-
merkleIndex?: number;
|
|
159
|
-
createdById?: string | import("mongoose").Types.ObjectId;
|
|
160
|
-
editedById?: string | import("mongoose").Types.ObjectId;
|
|
161
|
-
deletedById?: string | import("mongoose").Types.ObjectId;
|
|
162
|
-
createdDate?: Date;
|
|
163
|
-
updatedDate?: Date;
|
|
164
|
-
deletedDate?: Date;
|
|
165
|
-
applicationId?: string | import("mongoose").Types.ObjectId;
|
|
166
|
-
ownerId?: string | import("mongoose").Types.ObjectId;
|
|
167
|
-
};
|
|
168
|
-
marketPairId?: string;
|
|
169
|
-
};
|
|
170
|
-
output: any;
|
|
171
|
-
}>;
|
|
172
|
-
getMarketExchange: import("@trpc/server").TRPCQueryProcedure<{
|
|
173
|
-
input: {
|
|
174
|
-
exchangeId?: string;
|
|
175
|
-
};
|
|
176
|
-
output: any;
|
|
177
|
-
}>;
|
|
178
|
-
createMarketExchange: import("@trpc/server").TRPCMutationProcedure<{
|
|
179
|
-
input: {
|
|
180
|
-
id?: string | import("mongoose").Types.ObjectId;
|
|
181
|
-
name?: string;
|
|
182
|
-
value?: string;
|
|
183
|
-
data?: any;
|
|
184
|
-
description?: string;
|
|
185
|
-
key?: string;
|
|
186
|
-
status?: "Archived" | "Paused" | "Pending" | "Active";
|
|
187
|
-
meta?: any;
|
|
188
|
-
merkleLeaf?: string;
|
|
189
|
-
merkleIndex?: number;
|
|
190
|
-
createdById?: string | import("mongoose").Types.ObjectId;
|
|
191
|
-
editedById?: string | import("mongoose").Types.ObjectId;
|
|
192
|
-
deletedById?: string | import("mongoose").Types.ObjectId;
|
|
193
|
-
createdDate?: Date;
|
|
194
|
-
updatedDate?: Date;
|
|
195
|
-
deletedDate?: Date;
|
|
196
|
-
applicationId?: string | import("mongoose").Types.ObjectId;
|
|
197
|
-
ownerId?: string | import("mongoose").Types.ObjectId;
|
|
198
|
-
};
|
|
199
|
-
output: any;
|
|
200
|
-
}>;
|
|
201
|
-
updateMarketExchange: import("@trpc/server").TRPCMutationProcedure<{
|
|
202
|
-
input: {
|
|
203
|
-
data?: {
|
|
204
|
-
id?: string | import("mongoose").Types.ObjectId;
|
|
205
|
-
name?: string;
|
|
206
|
-
value?: string;
|
|
207
|
-
data?: any;
|
|
208
|
-
description?: string;
|
|
209
|
-
key?: string;
|
|
210
|
-
status?: "Archived" | "Paused" | "Pending" | "Active";
|
|
211
|
-
meta?: any;
|
|
212
|
-
merkleLeaf?: string;
|
|
213
|
-
merkleIndex?: number;
|
|
214
|
-
createdById?: string | import("mongoose").Types.ObjectId;
|
|
215
|
-
editedById?: string | import("mongoose").Types.ObjectId;
|
|
216
|
-
deletedById?: string | import("mongoose").Types.ObjectId;
|
|
217
|
-
createdDate?: Date;
|
|
218
|
-
updatedDate?: Date;
|
|
219
|
-
deletedDate?: Date;
|
|
220
|
-
applicationId?: string | import("mongoose").Types.ObjectId;
|
|
221
|
-
ownerId?: string | import("mongoose").Types.ObjectId;
|
|
222
|
-
};
|
|
223
|
-
exchangeId?: string;
|
|
224
|
-
};
|
|
225
|
-
output: any;
|
|
226
|
-
}>;
|
|
227
|
-
}>;
|
|
228
|
-
export type Router = ReturnType<typeof createRouter>;
|
|
229
|
-
export type RouterInput = inferRouterInputs<Router>;
|
|
230
|
-
export type RouterOutput = inferRouterOutputs<Router>;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { z as zod } from 'zod';
|
|
2
|
-
import { initTRPC } from '@trpc/server';
|
|
3
|
-
import { customErrorFormatter, hasRole } from '../../util/rpc';
|
|
4
|
-
import { Market, MarketPair, MarketExchange } from './market.schema';
|
|
5
|
-
export const z = zod;
|
|
6
|
-
export const t = initTRPC.context().create();
|
|
7
|
-
export const router = t.router;
|
|
8
|
-
export const procedure = t.procedure;
|
|
9
|
-
export const createRouter = () => router({
|
|
10
|
-
getMarket: procedure
|
|
11
|
-
.use(hasRole('guest', t))
|
|
12
|
-
.use(customErrorFormatter(t))
|
|
13
|
-
.input(z.object({ marketId: z.string() }))
|
|
14
|
-
.query(({ input, ctx }) => ctx.app.service.Market.getMarket(input, ctx)),
|
|
15
|
-
createMarket: procedure
|
|
16
|
-
.use(hasRole('admin', t))
|
|
17
|
-
.use(customErrorFormatter(t))
|
|
18
|
-
.input(Market)
|
|
19
|
-
.mutation(({ input, ctx }) => ctx.app.service.Market.createMarket(input, ctx)),
|
|
20
|
-
updateMarket: procedure
|
|
21
|
-
.use(hasRole('admin', t))
|
|
22
|
-
.use(customErrorFormatter(t))
|
|
23
|
-
.input(z.object({ marketId: z.string(), data: Market.partial() }))
|
|
24
|
-
.mutation(({ input, ctx }) => ctx.app.service.Market.updateMarket(input, ctx)),
|
|
25
|
-
getMarketPair: procedure
|
|
26
|
-
.use(hasRole('guest', t))
|
|
27
|
-
.use(customErrorFormatter(t))
|
|
28
|
-
.input(z.object({ marketPairId: z.string() }))
|
|
29
|
-
.query(({ input, ctx }) => ctx.app.service.Market.getMarketPair(input, ctx)),
|
|
30
|
-
createMarketPair: procedure
|
|
31
|
-
.use(hasRole('admin', t))
|
|
32
|
-
.use(customErrorFormatter(t))
|
|
33
|
-
.input(MarketPair)
|
|
34
|
-
.mutation(({ input, ctx }) => ctx.app.service.Market.createMarketPair(input, ctx)),
|
|
35
|
-
updateMarketPair: procedure
|
|
36
|
-
.use(hasRole('admin', t))
|
|
37
|
-
.use(customErrorFormatter(t))
|
|
38
|
-
.input(z.object({ marketPairId: z.string(), data: MarketPair.partial() }))
|
|
39
|
-
.mutation(({ input, ctx }) => ctx.app.service.Market.updateMarketPair(input, ctx)),
|
|
40
|
-
getMarketExchange: procedure
|
|
41
|
-
.use(hasRole('guest', t))
|
|
42
|
-
.use(customErrorFormatter(t))
|
|
43
|
-
.input(z.object({ exchangeId: z.string() }))
|
|
44
|
-
.query(({ input, ctx }) => ctx.app.service.Market.getMarketExchange(input, ctx)),
|
|
45
|
-
createMarketExchange: procedure
|
|
46
|
-
.use(hasRole('admin', t))
|
|
47
|
-
.use(customErrorFormatter(t))
|
|
48
|
-
.input(MarketExchange)
|
|
49
|
-
.mutation(({ input, ctx }) => ctx.app.service.Market.createMarketExchange(input, ctx)),
|
|
50
|
-
updateMarketExchange: procedure
|
|
51
|
-
.use(hasRole('admin', t))
|
|
52
|
-
.use(customErrorFormatter(t))
|
|
53
|
-
.input(z.object({ exchangeId: z.string(), data: MarketExchange.partial() }))
|
|
54
|
-
.mutation(({ input, ctx }) => ctx.app.service.Market.updateMarketExchange(input, ctx)),
|
|
55
|
-
});
|
|
56
|
-
//# sourceMappingURL=market.router.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"market.router.js","sourceRoot":"","sources":["../../../modules/market/market.router.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,IAAI,GAAG,EAAE,MAAM,KAAK,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAyC,MAAM,cAAc,CAAC;AAC/E,OAAO,EAAE,oBAAoB,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAE/D,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAErE,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,MAAM,SAAS,GAAG,CAAC,CAAC,SAAS,CAAC;AAErC,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,EAAE,CAC/B,MAAM,CAAC;IACL,SAAS,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