@arken/node 1.5.2 → 1.5.4
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 -298
- 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 +67 -18
- package/build/index.js +213 -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 +4 -17
- 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.d.ts → web3.d.ts} +7 -10
- package/build/{util/web3.js → web3.js} +10 -12
- 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 +5 -50
- 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 +2 -15
- 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 +18 -16
- 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/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,35 +0,0 @@
|
|
|
1
|
-
import * as mongo from '../../util/mongo';
|
|
2
|
-
export const ChatGroup = mongo.createModel('ChatGroup', {
|
|
3
|
-
name: { type: String, required: true, maxlength: 100 },
|
|
4
|
-
type: { type: String, required: true, enum: ['group', 'private'] },
|
|
5
|
-
members: [{ type: mongo.Schema.Types.ObjectId, ref: 'Profile' }],
|
|
6
|
-
externalId: { type: String },
|
|
7
|
-
externalPlatform: { type: String, enum: ['Telegram', 'Discord'] },
|
|
8
|
-
});
|
|
9
|
-
export const ChatMessage = mongo.createModel('ChatMessage', {
|
|
10
|
-
groupId: { type: mongo.Schema.Types.ObjectId, ref: 'ChatGroup', required: true },
|
|
11
|
-
profileId: { type: mongo.Schema.Types.ObjectId, ref: 'Profile', required: true },
|
|
12
|
-
content: { type: String },
|
|
13
|
-
mediaUrl: { type: String },
|
|
14
|
-
replyToId: { type: mongo.Schema.Types.ObjectId, ref: 'ChatMessage' },
|
|
15
|
-
reactions: [
|
|
16
|
-
{
|
|
17
|
-
profileId: { type: mongo.Schema.Types.ObjectId, ref: 'Profile' },
|
|
18
|
-
reaction: { type: String },
|
|
19
|
-
},
|
|
20
|
-
],
|
|
21
|
-
externalId: { type: String },
|
|
22
|
-
externalPlatform: { type: String, enum: ['Telegram', 'Discord'] },
|
|
23
|
-
isSpam: { type: Boolean, default: false },
|
|
24
|
-
tags: { type: mongo.Schema.Types.Mixed },
|
|
25
|
-
summary: { type: String },
|
|
26
|
-
entities: { type: mongo.Schema.Types.Mixed },
|
|
27
|
-
type: {
|
|
28
|
-
type: String,
|
|
29
|
-
default: 'text',
|
|
30
|
-
enum: ['text', 'image', 'video', 'audio', 'file', 'system'],
|
|
31
|
-
},
|
|
32
|
-
}, {
|
|
33
|
-
indexes: [{ groupId: 1, createdDate: 1 }, { profileId: 1 }, { status: 1 }, { replyToId: 1 }, { type: 1 }],
|
|
34
|
-
});
|
|
35
|
-
//# sourceMappingURL=chat.models.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chat.models.js","sourceRoot":"","sources":["../../../modules/chat/chat.models.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC;AAI1C,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,CAAC,WAAW,CAA0B,WAAW,EAAE;IAC/E,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE;IACtD,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,OAAO,EAAE,SAAS,CAAC,EAAE;IAClE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC;IAChE,UAAU,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;IAC5B,gBAAgB,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC,EAAE;CAClE,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,WAAW,GAAG,KAAK,CAAC,WAAW,CAC1C,aAAa,EACb;IACE,OAAO,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE;IAChF,SAAS,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE;IAChF,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;IACzB,QAAQ,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;IAC1B,SAAS,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,aAAa,EAAE;IACpE,SAAS,EAAE;QACT;YACE,SAAS,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,SAAS,EAAE;YAChE,QAAQ,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;SAC3B;KACF;IACD,UAAU,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;IAC5B,gBAAgB,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC,EAAE;IACjE,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;IACzC,IAAI,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE;IACxC,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;IACzB,QAAQ,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE;IAC5C,IAAI,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,MAAM;QACf,IAAI,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC;KAC5D;CACF,EACD;IACE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;CAC1G,CACF,CAAC"}
|
|
@@ -1,223 +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
|
-
getChatGroup: import("@trpc/server").TRPCQueryProcedure<{
|
|
63
|
-
input: {
|
|
64
|
-
chatGroupId?: string;
|
|
65
|
-
};
|
|
66
|
-
output: any;
|
|
67
|
-
}>;
|
|
68
|
-
getChatGroups: import("@trpc/server").TRPCQueryProcedure<{
|
|
69
|
-
input: {
|
|
70
|
-
chatGroupId?: string;
|
|
71
|
-
};
|
|
72
|
-
output: any;
|
|
73
|
-
}>;
|
|
74
|
-
createChatGroup: import("@trpc/server").TRPCMutationProcedure<{
|
|
75
|
-
input: {
|
|
76
|
-
id?: string | import("mongoose").Types.ObjectId;
|
|
77
|
-
name?: string;
|
|
78
|
-
data?: any;
|
|
79
|
-
description?: string;
|
|
80
|
-
type?: "group" | "private";
|
|
81
|
-
key?: string;
|
|
82
|
-
status?: "Archived" | "Paused" | "Pending" | "Active";
|
|
83
|
-
meta?: any;
|
|
84
|
-
merkleLeaf?: string;
|
|
85
|
-
merkleIndex?: number;
|
|
86
|
-
createdById?: string | import("mongoose").Types.ObjectId;
|
|
87
|
-
editedById?: string | import("mongoose").Types.ObjectId;
|
|
88
|
-
deletedById?: string | import("mongoose").Types.ObjectId;
|
|
89
|
-
createdDate?: Date;
|
|
90
|
-
updatedDate?: Date;
|
|
91
|
-
deletedDate?: Date;
|
|
92
|
-
applicationId?: string | import("mongoose").Types.ObjectId;
|
|
93
|
-
ownerId?: string | import("mongoose").Types.ObjectId;
|
|
94
|
-
members?: (string | import("mongoose").Types.ObjectId)[];
|
|
95
|
-
externalId?: string;
|
|
96
|
-
externalPlatform?: "Telegram" | "Discord";
|
|
97
|
-
};
|
|
98
|
-
output: any;
|
|
99
|
-
}>;
|
|
100
|
-
updateChatGroup: import("@trpc/server").TRPCMutationProcedure<{
|
|
101
|
-
input: {
|
|
102
|
-
data?: {
|
|
103
|
-
id?: string | import("mongoose").Types.ObjectId;
|
|
104
|
-
name?: string;
|
|
105
|
-
data?: any;
|
|
106
|
-
description?: string;
|
|
107
|
-
type?: "group" | "private";
|
|
108
|
-
key?: string;
|
|
109
|
-
status?: "Archived" | "Paused" | "Pending" | "Active";
|
|
110
|
-
meta?: any;
|
|
111
|
-
merkleLeaf?: string;
|
|
112
|
-
merkleIndex?: number;
|
|
113
|
-
createdById?: string | import("mongoose").Types.ObjectId;
|
|
114
|
-
editedById?: string | import("mongoose").Types.ObjectId;
|
|
115
|
-
deletedById?: string | import("mongoose").Types.ObjectId;
|
|
116
|
-
createdDate?: Date;
|
|
117
|
-
updatedDate?: Date;
|
|
118
|
-
deletedDate?: Date;
|
|
119
|
-
applicationId?: string | import("mongoose").Types.ObjectId;
|
|
120
|
-
ownerId?: string | import("mongoose").Types.ObjectId;
|
|
121
|
-
members?: (string | import("mongoose").Types.ObjectId)[];
|
|
122
|
-
externalId?: string;
|
|
123
|
-
externalPlatform?: "Telegram" | "Discord";
|
|
124
|
-
};
|
|
125
|
-
chatGroupId?: string;
|
|
126
|
-
};
|
|
127
|
-
output: any;
|
|
128
|
-
}>;
|
|
129
|
-
getChatMessage: import("@trpc/server").TRPCQueryProcedure<{
|
|
130
|
-
input: {
|
|
131
|
-
chatMessageId?: string;
|
|
132
|
-
};
|
|
133
|
-
output: any;
|
|
134
|
-
}>;
|
|
135
|
-
getChatMessages: import("@trpc/server").TRPCQueryProcedure<{
|
|
136
|
-
input: {
|
|
137
|
-
chatMessageId?: string;
|
|
138
|
-
};
|
|
139
|
-
output: any;
|
|
140
|
-
}>;
|
|
141
|
-
createChatMessage: import("@trpc/server").TRPCMutationProcedure<{
|
|
142
|
-
input: {
|
|
143
|
-
id?: string | import("mongoose").Types.ObjectId;
|
|
144
|
-
name?: string;
|
|
145
|
-
data?: any;
|
|
146
|
-
description?: string;
|
|
147
|
-
type?: "image" | "text" | "video" | "audio" | "file" | "system";
|
|
148
|
-
key?: string;
|
|
149
|
-
status?: "Archived" | "Paused" | "Pending" | "Active";
|
|
150
|
-
meta?: any;
|
|
151
|
-
merkleLeaf?: string;
|
|
152
|
-
merkleIndex?: number;
|
|
153
|
-
createdById?: string | import("mongoose").Types.ObjectId;
|
|
154
|
-
editedById?: string | import("mongoose").Types.ObjectId;
|
|
155
|
-
deletedById?: string | import("mongoose").Types.ObjectId;
|
|
156
|
-
createdDate?: Date;
|
|
157
|
-
updatedDate?: Date;
|
|
158
|
-
deletedDate?: Date;
|
|
159
|
-
applicationId?: string | import("mongoose").Types.ObjectId;
|
|
160
|
-
ownerId?: string | import("mongoose").Types.ObjectId;
|
|
161
|
-
tags?: unknown[];
|
|
162
|
-
content?: string;
|
|
163
|
-
profileId?: string | import("mongoose").Types.ObjectId;
|
|
164
|
-
externalId?: string;
|
|
165
|
-
externalPlatform?: "Telegram" | "Discord";
|
|
166
|
-
groupId?: string | import("mongoose").Types.ObjectId;
|
|
167
|
-
mediaUrl?: string;
|
|
168
|
-
replyToId?: string | import("mongoose").Types.ObjectId;
|
|
169
|
-
reactions?: {
|
|
170
|
-
profileId?: string | import("mongoose").Types.ObjectId;
|
|
171
|
-
reaction?: string;
|
|
172
|
-
}[];
|
|
173
|
-
isSpam?: boolean;
|
|
174
|
-
summary?: string;
|
|
175
|
-
entities?: unknown[];
|
|
176
|
-
};
|
|
177
|
-
output: any;
|
|
178
|
-
}>;
|
|
179
|
-
updateChatMessage: import("@trpc/server").TRPCMutationProcedure<{
|
|
180
|
-
input: {
|
|
181
|
-
data?: {
|
|
182
|
-
id?: string | import("mongoose").Types.ObjectId;
|
|
183
|
-
name?: string;
|
|
184
|
-
data?: any;
|
|
185
|
-
description?: string;
|
|
186
|
-
type?: "image" | "text" | "video" | "audio" | "file" | "system";
|
|
187
|
-
key?: string;
|
|
188
|
-
status?: "Archived" | "Paused" | "Pending" | "Active";
|
|
189
|
-
meta?: any;
|
|
190
|
-
merkleLeaf?: string;
|
|
191
|
-
merkleIndex?: number;
|
|
192
|
-
createdById?: string | import("mongoose").Types.ObjectId;
|
|
193
|
-
editedById?: string | import("mongoose").Types.ObjectId;
|
|
194
|
-
deletedById?: string | import("mongoose").Types.ObjectId;
|
|
195
|
-
createdDate?: Date;
|
|
196
|
-
updatedDate?: Date;
|
|
197
|
-
deletedDate?: Date;
|
|
198
|
-
applicationId?: string | import("mongoose").Types.ObjectId;
|
|
199
|
-
ownerId?: string | import("mongoose").Types.ObjectId;
|
|
200
|
-
tags?: unknown[];
|
|
201
|
-
content?: string;
|
|
202
|
-
profileId?: string | import("mongoose").Types.ObjectId;
|
|
203
|
-
externalId?: string;
|
|
204
|
-
externalPlatform?: "Telegram" | "Discord";
|
|
205
|
-
groupId?: string | import("mongoose").Types.ObjectId;
|
|
206
|
-
mediaUrl?: string;
|
|
207
|
-
replyToId?: string | import("mongoose").Types.ObjectId;
|
|
208
|
-
reactions?: {
|
|
209
|
-
profileId?: string | import("mongoose").Types.ObjectId;
|
|
210
|
-
reaction?: string;
|
|
211
|
-
}[];
|
|
212
|
-
isSpam?: boolean;
|
|
213
|
-
summary?: string;
|
|
214
|
-
entities?: unknown[];
|
|
215
|
-
};
|
|
216
|
-
chatMessageId?: string;
|
|
217
|
-
};
|
|
218
|
-
output: any;
|
|
219
|
-
}>;
|
|
220
|
-
}>;
|
|
221
|
-
export type Router = ReturnType<typeof createRouter>;
|
|
222
|
-
export type RouterInput = inferRouterInputs<Router>;
|
|
223
|
-
export type RouterOutput = inferRouterOutputs<Router>;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { z as zod } from 'zod';
|
|
2
|
-
import { initTRPC } from '@trpc/server';
|
|
3
|
-
import { customErrorFormatter, hasRole } from '../../util/rpc';
|
|
4
|
-
import { ChatGroup, ChatMessage } from './chat.schema';
|
|
5
|
-
export const z = zod;
|
|
6
|
-
export const t = initTRPC.context().create();
|
|
7
|
-
export const router = t.router;
|
|
8
|
-
export const procedure = t.procedure;
|
|
9
|
-
export const createRouter = () => router({
|
|
10
|
-
getChatGroup: procedure
|
|
11
|
-
.use(hasRole('guest', t))
|
|
12
|
-
.use(customErrorFormatter(t))
|
|
13
|
-
.input(z.object({ chatGroupId: z.string() }))
|
|
14
|
-
.query(({ input, ctx }) => ctx.app.service.Chat.getChatGroup(input, ctx)),
|
|
15
|
-
getChatGroups: procedure
|
|
16
|
-
.use(hasRole('guest', t))
|
|
17
|
-
.use(customErrorFormatter(t))
|
|
18
|
-
.input(z.object({ chatGroupId: z.string() }))
|
|
19
|
-
.query(({ input, ctx }) => ctx.app.service.Chat.getChatGroup(input, ctx)),
|
|
20
|
-
createChatGroup: procedure
|
|
21
|
-
.use(hasRole('admin', t))
|
|
22
|
-
.use(customErrorFormatter(t))
|
|
23
|
-
.input(ChatGroup)
|
|
24
|
-
.mutation(({ input, ctx }) => ctx.app.service.Chat.createChatGroup(input, ctx)),
|
|
25
|
-
updateChatGroup: procedure
|
|
26
|
-
.use(hasRole('admin', t))
|
|
27
|
-
.use(customErrorFormatter(t))
|
|
28
|
-
.input(z.object({ chatGroupId: z.string(), data: ChatGroup.partial() }))
|
|
29
|
-
.mutation(({ input, ctx }) => ctx.app.service.Chat.updateChatGroup(input, ctx)),
|
|
30
|
-
getChatMessage: procedure
|
|
31
|
-
.use(hasRole('guest', t))
|
|
32
|
-
.use(customErrorFormatter(t))
|
|
33
|
-
.input(z.object({ chatMessageId: z.string() }))
|
|
34
|
-
.query(({ input, ctx }) => ctx.app.service.Chat.getChatMessage(input, ctx)),
|
|
35
|
-
getChatMessages: procedure
|
|
36
|
-
.use(hasRole('guest', t))
|
|
37
|
-
.use(customErrorFormatter(t))
|
|
38
|
-
.input(z.object({ chatMessageId: z.string() }))
|
|
39
|
-
.query(({ input, ctx }) => ctx.app.service.Chat.getChatMessage(input, ctx)),
|
|
40
|
-
createChatMessage: procedure
|
|
41
|
-
.use(hasRole('admin', t))
|
|
42
|
-
.use(customErrorFormatter(t))
|
|
43
|
-
.input(ChatMessage)
|
|
44
|
-
.mutation(({ input, ctx }) => ctx.app.service.Chat.createChatMessage(input, ctx)),
|
|
45
|
-
updateChatMessage: procedure
|
|
46
|
-
.use(hasRole('admin', t))
|
|
47
|
-
.use(customErrorFormatter(t))
|
|
48
|
-
.input(z.object({ chatMessageId: z.string(), data: ChatMessage.partial() }))
|
|
49
|
-
.mutation(({ input, ctx }) => ctx.app.service.Chat.updateChatMessage(input, ctx)),
|
|
50
|
-
});
|
|
51
|
-
//# sourceMappingURL=chat.router.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chat.router.js","sourceRoot":"","sources":["../../../modules/chat/chat.router.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
export declare const ChatGroup: import("zod").ZodObject<import("zod").objectUtil.extendShape<import("zod").objectUtil.extendShape<{
|
|
2
|
-
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3
|
-
key: import("zod").ZodOptional<import("zod").ZodString>;
|
|
4
|
-
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
5
|
-
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
6
|
-
applicationId: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodString, string, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
7
|
-
ownerId: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodString, string, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
8
|
-
}, {
|
|
9
|
-
id: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodString, string, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
10
|
-
meta: import("zod").ZodAny;
|
|
11
|
-
data: import("zod").ZodAny;
|
|
12
|
-
status: import("zod").ZodDefault<import("zod").ZodEnum<["Paused", "Pending", "Active", "Archived"]>>;
|
|
13
|
-
merkleLeaf: import("zod").ZodOptional<import("zod").ZodString>;
|
|
14
|
-
merkleIndex: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
15
|
-
createdById: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodString, string, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
16
|
-
editedById: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodString, string, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
17
|
-
deletedById: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodString, string, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
18
|
-
createdDate: import("zod").ZodDefault<import("zod").ZodDate>;
|
|
19
|
-
updatedDate: import("zod").ZodOptional<import("zod").ZodDate>;
|
|
20
|
-
deletedDate: import("zod").ZodOptional<import("zod").ZodDate>;
|
|
21
|
-
}>, {
|
|
22
|
-
name: import("zod").ZodString;
|
|
23
|
-
type: import("zod").ZodEnum<["group", "private"]>;
|
|
24
|
-
members: import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodString, string, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">;
|
|
25
|
-
externalId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
26
|
-
externalPlatform: import("zod").ZodOptional<import("zod").ZodEnum<["Telegram", "Discord"]>>;
|
|
27
|
-
}>, "strip", import("zod").ZodTypeAny, {
|
|
28
|
-
id?: string | import("mongoose").Types.ObjectId;
|
|
29
|
-
name?: string;
|
|
30
|
-
data?: any;
|
|
31
|
-
description?: string;
|
|
32
|
-
type?: "group" | "private";
|
|
33
|
-
key?: string;
|
|
34
|
-
status?: "Archived" | "Paused" | "Pending" | "Active";
|
|
35
|
-
meta?: any;
|
|
36
|
-
merkleLeaf?: string;
|
|
37
|
-
merkleIndex?: number;
|
|
38
|
-
createdById?: string | import("mongoose").Types.ObjectId;
|
|
39
|
-
editedById?: string | import("mongoose").Types.ObjectId;
|
|
40
|
-
deletedById?: string | import("mongoose").Types.ObjectId;
|
|
41
|
-
createdDate?: Date;
|
|
42
|
-
updatedDate?: Date;
|
|
43
|
-
deletedDate?: Date;
|
|
44
|
-
applicationId?: string | import("mongoose").Types.ObjectId;
|
|
45
|
-
ownerId?: string | import("mongoose").Types.ObjectId;
|
|
46
|
-
members?: (string | import("mongoose").Types.ObjectId)[];
|
|
47
|
-
externalId?: string;
|
|
48
|
-
externalPlatform?: "Telegram" | "Discord";
|
|
49
|
-
}, {
|
|
50
|
-
id?: string | import("mongoose").Types.ObjectId;
|
|
51
|
-
name?: string;
|
|
52
|
-
data?: any;
|
|
53
|
-
description?: string;
|
|
54
|
-
type?: "group" | "private";
|
|
55
|
-
key?: string;
|
|
56
|
-
status?: "Archived" | "Paused" | "Pending" | "Active";
|
|
57
|
-
meta?: any;
|
|
58
|
-
merkleLeaf?: string;
|
|
59
|
-
merkleIndex?: number;
|
|
60
|
-
createdById?: string | import("mongoose").Types.ObjectId;
|
|
61
|
-
editedById?: string | import("mongoose").Types.ObjectId;
|
|
62
|
-
deletedById?: string | import("mongoose").Types.ObjectId;
|
|
63
|
-
createdDate?: Date;
|
|
64
|
-
updatedDate?: Date;
|
|
65
|
-
deletedDate?: Date;
|
|
66
|
-
applicationId?: string | import("mongoose").Types.ObjectId;
|
|
67
|
-
ownerId?: string | import("mongoose").Types.ObjectId;
|
|
68
|
-
members?: (string | import("mongoose").Types.ObjectId)[];
|
|
69
|
-
externalId?: string;
|
|
70
|
-
externalPlatform?: "Telegram" | "Discord";
|
|
71
|
-
}>;
|
|
72
|
-
export declare const ChatMessage: import("zod").ZodObject<import("zod").objectUtil.extendShape<import("zod").objectUtil.extendShape<{
|
|
73
|
-
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
74
|
-
key: import("zod").ZodOptional<import("zod").ZodString>;
|
|
75
|
-
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
76
|
-
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
77
|
-
applicationId: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodString, string, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
78
|
-
ownerId: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodString, string, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
79
|
-
}, {
|
|
80
|
-
id: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodString, string, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
81
|
-
meta: import("zod").ZodAny;
|
|
82
|
-
data: import("zod").ZodAny;
|
|
83
|
-
status: import("zod").ZodDefault<import("zod").ZodEnum<["Paused", "Pending", "Active", "Archived"]>>;
|
|
84
|
-
merkleLeaf: import("zod").ZodOptional<import("zod").ZodString>;
|
|
85
|
-
merkleIndex: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
86
|
-
createdById: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodString, string, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
87
|
-
editedById: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodString, string, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
88
|
-
deletedById: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodString, string, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
89
|
-
createdDate: import("zod").ZodDefault<import("zod").ZodDate>;
|
|
90
|
-
updatedDate: import("zod").ZodOptional<import("zod").ZodDate>;
|
|
91
|
-
deletedDate: import("zod").ZodOptional<import("zod").ZodDate>;
|
|
92
|
-
}>, {
|
|
93
|
-
groupId: import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodString, string, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>;
|
|
94
|
-
profileId: import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodString, string, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>;
|
|
95
|
-
content: import("zod").ZodOptional<import("zod").ZodString>;
|
|
96
|
-
mediaUrl: import("zod").ZodOptional<import("zod").ZodString>;
|
|
97
|
-
replyToId: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodString, string, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
98
|
-
reactions: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
99
|
-
profileId: import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodString, string, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>;
|
|
100
|
-
reaction: import("zod").ZodString;
|
|
101
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
102
|
-
profileId?: string | import("mongoose").Types.ObjectId;
|
|
103
|
-
reaction?: string;
|
|
104
|
-
}, {
|
|
105
|
-
profileId?: string | import("mongoose").Types.ObjectId;
|
|
106
|
-
reaction?: string;
|
|
107
|
-
}>, "many">>;
|
|
108
|
-
externalId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
109
|
-
externalPlatform: import("zod").ZodOptional<import("zod").ZodEnum<["Telegram", "Discord"]>>;
|
|
110
|
-
isSpam: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
111
|
-
tags: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodUnknown, "many">>;
|
|
112
|
-
summary: import("zod").ZodOptional<import("zod").ZodString>;
|
|
113
|
-
entities: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodUnknown, "many">>;
|
|
114
|
-
type: import("zod").ZodDefault<import("zod").ZodEnum<["text", "image", "video", "audio", "file", "system"]>>;
|
|
115
|
-
}>, "strip", import("zod").ZodTypeAny, {
|
|
116
|
-
id?: string | import("mongoose").Types.ObjectId;
|
|
117
|
-
name?: string;
|
|
118
|
-
data?: any;
|
|
119
|
-
description?: string;
|
|
120
|
-
type?: "image" | "text" | "video" | "audio" | "file" | "system";
|
|
121
|
-
key?: string;
|
|
122
|
-
status?: "Archived" | "Paused" | "Pending" | "Active";
|
|
123
|
-
meta?: any;
|
|
124
|
-
merkleLeaf?: string;
|
|
125
|
-
merkleIndex?: number;
|
|
126
|
-
createdById?: string | import("mongoose").Types.ObjectId;
|
|
127
|
-
editedById?: string | import("mongoose").Types.ObjectId;
|
|
128
|
-
deletedById?: string | import("mongoose").Types.ObjectId;
|
|
129
|
-
createdDate?: Date;
|
|
130
|
-
updatedDate?: Date;
|
|
131
|
-
deletedDate?: Date;
|
|
132
|
-
applicationId?: string | import("mongoose").Types.ObjectId;
|
|
133
|
-
ownerId?: string | import("mongoose").Types.ObjectId;
|
|
134
|
-
tags?: unknown[];
|
|
135
|
-
content?: string;
|
|
136
|
-
profileId?: string | import("mongoose").Types.ObjectId;
|
|
137
|
-
externalId?: string;
|
|
138
|
-
externalPlatform?: "Telegram" | "Discord";
|
|
139
|
-
groupId?: string | import("mongoose").Types.ObjectId;
|
|
140
|
-
mediaUrl?: string;
|
|
141
|
-
replyToId?: string | import("mongoose").Types.ObjectId;
|
|
142
|
-
reactions?: {
|
|
143
|
-
profileId?: string | import("mongoose").Types.ObjectId;
|
|
144
|
-
reaction?: string;
|
|
145
|
-
}[];
|
|
146
|
-
isSpam?: boolean;
|
|
147
|
-
summary?: string;
|
|
148
|
-
entities?: unknown[];
|
|
149
|
-
}, {
|
|
150
|
-
id?: string | import("mongoose").Types.ObjectId;
|
|
151
|
-
name?: string;
|
|
152
|
-
data?: any;
|
|
153
|
-
description?: string;
|
|
154
|
-
type?: "image" | "text" | "video" | "audio" | "file" | "system";
|
|
155
|
-
key?: string;
|
|
156
|
-
status?: "Archived" | "Paused" | "Pending" | "Active";
|
|
157
|
-
meta?: any;
|
|
158
|
-
merkleLeaf?: string;
|
|
159
|
-
merkleIndex?: number;
|
|
160
|
-
createdById?: string | import("mongoose").Types.ObjectId;
|
|
161
|
-
editedById?: string | import("mongoose").Types.ObjectId;
|
|
162
|
-
deletedById?: string | import("mongoose").Types.ObjectId;
|
|
163
|
-
createdDate?: Date;
|
|
164
|
-
updatedDate?: Date;
|
|
165
|
-
deletedDate?: Date;
|
|
166
|
-
applicationId?: string | import("mongoose").Types.ObjectId;
|
|
167
|
-
ownerId?: string | import("mongoose").Types.ObjectId;
|
|
168
|
-
tags?: unknown[];
|
|
169
|
-
content?: string;
|
|
170
|
-
profileId?: string | import("mongoose").Types.ObjectId;
|
|
171
|
-
externalId?: string;
|
|
172
|
-
externalPlatform?: "Telegram" | "Discord";
|
|
173
|
-
groupId?: string | import("mongoose").Types.ObjectId;
|
|
174
|
-
mediaUrl?: string;
|
|
175
|
-
replyToId?: string | import("mongoose").Types.ObjectId;
|
|
176
|
-
reactions?: {
|
|
177
|
-
profileId?: string | import("mongoose").Types.ObjectId;
|
|
178
|
-
reaction?: string;
|
|
179
|
-
}[];
|
|
180
|
-
isSpam?: boolean;
|
|
181
|
-
summary?: string;
|
|
182
|
-
entities?: unknown[];
|
|
183
|
-
}>;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { z, ObjectId, Entity } from '../../schema';
|
|
2
|
-
export const ChatGroup = Entity.merge(z.object({
|
|
3
|
-
name: z.string().max(100).min(1),
|
|
4
|
-
type: z.enum(['group', 'private']),
|
|
5
|
-
members: z.array(ObjectId),
|
|
6
|
-
externalId: z.string().optional(),
|
|
7
|
-
externalPlatform: z.enum(['Telegram', 'Discord']).optional(),
|
|
8
|
-
}));
|
|
9
|
-
export const ChatMessage = Entity.merge(z.object({
|
|
10
|
-
groupId: ObjectId,
|
|
11
|
-
profileId: ObjectId,
|
|
12
|
-
content: z.string().optional(),
|
|
13
|
-
mediaUrl: z.string().optional(),
|
|
14
|
-
replyToId: ObjectId.optional(),
|
|
15
|
-
reactions: z
|
|
16
|
-
.array(z.object({
|
|
17
|
-
profileId: ObjectId,
|
|
18
|
-
reaction: z.string(),
|
|
19
|
-
}))
|
|
20
|
-
.optional(),
|
|
21
|
-
externalId: z.string().optional(),
|
|
22
|
-
externalPlatform: z.enum(['Telegram', 'Discord']).optional(),
|
|
23
|
-
isSpam: z.boolean().default(false),
|
|
24
|
-
tags: z.array(z.unknown()).default([]),
|
|
25
|
-
summary: z.string().optional(),
|
|
26
|
-
entities: z.array(z.unknown()).default([]),
|
|
27
|
-
type: z.enum(['text', 'image', 'video', 'audio', 'file', 'system']).default('text'),
|
|
28
|
-
}));
|
|
29
|
-
//# sourceMappingURL=chat.schema.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chat.schema.js","sourceRoot":"","sources":["../../../modules/chat/chat.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEnD,MAAM,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC,KAAK,CACnC,CAAC,CAAC,MAAM,CAAC;IACP,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAChC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IAClC,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC;IAC1B,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,gBAAgB,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC,QAAQ,EAAE;CAC7D,CAAC,CACH,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,CACrC,CAAC,CAAC,MAAM,CAAC;IACP,OAAO,EAAE,QAAQ;IACjB,SAAS,EAAE,QAAQ;IACnB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,SAAS,EAAE,QAAQ,CAAC,QAAQ,EAAE;IAC9B,SAAS,EAAE,CAAC;SACT,KAAK,CACJ,CAAC,CAAC,MAAM,CAAC;QACP,SAAS,EAAE,QAAQ;QACnB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;KACrB,CAAC,CACH;SACA,QAAQ,EAAE;IACb,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,gBAAgB,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC5D,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IAClC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IACtC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IAC1C,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;CACpF,CAAC,CACH,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { RouterContext, RouterInput, RouterOutput } from './chat.types';
|
|
2
|
-
export declare class Service {
|
|
3
|
-
constructor();
|
|
4
|
-
getChatGroup(input: RouterInput['getChatGroup'], ctx: RouterContext): Promise<RouterOutput['getChatGroup']>;
|
|
5
|
-
getChatGroups(input: RouterInput['getChatGroups'], ctx: RouterContext): Promise<RouterOutput['getChatGroups']>;
|
|
6
|
-
createChatGroup(input: RouterInput['createChatGroup'], ctx: RouterContext): Promise<RouterOutput['createChatGroup']>;
|
|
7
|
-
updateChatGroup(input: RouterInput['updateChatGroup'], ctx: RouterContext): Promise<RouterOutput['updateChatGroup']>;
|
|
8
|
-
getChatMessage(input: RouterInput['getChatMessage'], ctx: RouterContext): Promise<RouterOutput['getChatMessage']>;
|
|
9
|
-
getChatMessages(input: RouterInput['getChatMessages'], ctx: RouterContext): Promise<RouterOutput['getChatMessages']>;
|
|
10
|
-
createChatMessage(input: RouterInput['createChatMessage'], ctx: RouterContext): Promise<RouterOutput['createChatMessage']>;
|
|
11
|
-
updateChatMessage(input: RouterInput['updateChatMessage'], ctx: RouterContext): Promise<RouterOutput['updateChatMessage']>;
|
|
12
|
-
}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { getFilter } from '../../util/api';
|
|
2
|
-
export class Service {
|
|
3
|
-
constructor() { }
|
|
4
|
-
async getChatGroup(input, ctx) {
|
|
5
|
-
if (!input)
|
|
6
|
-
throw new Error('Input should not be void');
|
|
7
|
-
console.log('Chat.Service.getChatGroup', input);
|
|
8
|
-
const filter = getFilter(input);
|
|
9
|
-
const chatGroup = await ctx.app.model.ChatGroup.findOne(filter).lean().exec();
|
|
10
|
-
if (!chatGroup)
|
|
11
|
-
throw new Error('ChatGroup not found');
|
|
12
|
-
return chatGroup;
|
|
13
|
-
}
|
|
14
|
-
async getChatGroups(input, ctx) {
|
|
15
|
-
if (!input)
|
|
16
|
-
throw new Error('Input should not be void');
|
|
17
|
-
console.log('Chat.Service.getChatGroups', input);
|
|
18
|
-
const filter = getFilter(input);
|
|
19
|
-
const chatGroups = await ctx.app.model.ChatGroup.find(filter).lean().exec();
|
|
20
|
-
if (!chatGroups)
|
|
21
|
-
throw new Error('ChatGroups not found');
|
|
22
|
-
return chatGroups;
|
|
23
|
-
}
|
|
24
|
-
async createChatGroup(input, ctx) {
|
|
25
|
-
if (!input)
|
|
26
|
-
throw new Error('Input should not be void');
|
|
27
|
-
console.log('Chat.Service.createChatGroup', input);
|
|
28
|
-
const newChatGroup = await ctx.app.model.ChatGroup.create(input.data);
|
|
29
|
-
return newChatGroup;
|
|
30
|
-
}
|
|
31
|
-
async updateChatGroup(input, ctx) {
|
|
32
|
-
if (!input)
|
|
33
|
-
throw new Error('Input should not be void');
|
|
34
|
-
console.log('Chat.Service.updateChatGroup', input);
|
|
35
|
-
const filter = getFilter(input);
|
|
36
|
-
await ctx.app.model.ChatGroup.updateOne(filter, input.data, {
|
|
37
|
-
runValidators: true,
|
|
38
|
-
}).exec();
|
|
39
|
-
const updatedChatGroup = await ctx.app.model.ChatGroup.findOne(filter).lean().exec();
|
|
40
|
-
if (!updatedChatGroup)
|
|
41
|
-
throw new Error('ChatGroup update failed');
|
|
42
|
-
return updatedChatGroup;
|
|
43
|
-
}
|
|
44
|
-
async getChatMessage(input, ctx) {
|
|
45
|
-
if (!input)
|
|
46
|
-
throw new Error('Input should not be void');
|
|
47
|
-
console.log('Chat.Service.getChatMessage', input);
|
|
48
|
-
const filter = getFilter(input);
|
|
49
|
-
const chatMessage = await ctx.app.model.ChatMessage.findOne(filter).lean().exec();
|
|
50
|
-
if (!chatMessage)
|
|
51
|
-
throw new Error('ChatMessage not found');
|
|
52
|
-
return chatMessage;
|
|
53
|
-
}
|
|
54
|
-
async getChatMessages(input, ctx) {
|
|
55
|
-
if (!input)
|
|
56
|
-
throw new Error('Input should not be void');
|
|
57
|
-
console.log('Chat.Service.getChatMessages', input);
|
|
58
|
-
const filter = getFilter(input);
|
|
59
|
-
const chatMessages = await ctx.app.model.ChatMessage.find(filter).lean().exec();
|
|
60
|
-
if (!chatMessages)
|
|
61
|
-
throw new Error('ChatMessages not found');
|
|
62
|
-
return chatMessages;
|
|
63
|
-
}
|
|
64
|
-
async createChatMessage(input, ctx) {
|
|
65
|
-
if (!input)
|
|
66
|
-
throw new Error('Input should not be void');
|
|
67
|
-
console.log('Chat.Service.createChatMessage', input);
|
|
68
|
-
const newChatMessage = await ctx.app.model.ChatMessage.create(input.data);
|
|
69
|
-
return newChatMessage;
|
|
70
|
-
}
|
|
71
|
-
async updateChatMessage(input, ctx) {
|
|
72
|
-
if (!input)
|
|
73
|
-
throw new Error('Input should not be void');
|
|
74
|
-
console.log('Chat.Service.updateChatMessage', input);
|
|
75
|
-
const filter = getFilter(input);
|
|
76
|
-
await ctx.app.model.ChatMessage.updateOne(filter, input.data, {
|
|
77
|
-
runValidators: true,
|
|
78
|
-
}).exec();
|
|
79
|
-
const updatedChatMessage = await ctx.app.model.ChatMessage.findOne(filter).lean().exec();
|
|
80
|
-
if (!updatedChatMessage)
|
|
81
|
-
throw new Error('ChatMessage update failed');
|
|
82
|
-
return updatedChatMessage;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
//# sourceMappingURL=chat.service.js.map
|