-
Notifications
You must be signed in to change notification settings - Fork 1
/
router.ts
49 lines (46 loc) · 1.95 KB
/
router.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import zod from 'zod';
import { initTRPC, TRPCError } from '@trpc/server';
import type { RouterContext } from './types';
import * as Area from './modules/area/area.router';
import * as Asset from './modules/asset/asset.router';
import * as Chain from './modules/chain/chain.router';
import * as Character from './modules/character/character.router';
import * as Chat from './modules/chat/chat.router';
import * as Collection from './modules/collection/collection.router';
import * as Core from './modules/core/core.router';
import * as Game from './modules/game/game.router';
import * as Interface from './modules/interface/interface.router';
import * as Item from './modules/item/item.router';
import * as Job from './modules/job/job.router';
import * as Market from './modules/market/market.router';
import * as Product from './modules/product/product.router';
import * as Profile from './modules/profile/profile.router';
import * as Raffle from './modules/raffle/raffle.router';
import * as Skill from './modules/skill/skill.router';
import * as Video from './modules/video/video.router';
export const z = zod;
export const t = initTRPC.context<RouterContext>().create();
export const router = t.router;
export const procedure = t.procedure;
export const createCallerFactory = t.createCallerFactory;
export const createRouter = () =>
router({
area: Area.createRouter(),
asset: Asset.createRouter(),
chain: Chain.createRouter(),
character: Character.createRouter(),
chat: Chat.createRouter(),
collection: Collection.createRouter(),
core: Core.createRouter(),
game: Game.createRouter(),
interface: Interface.createRouter(),
item: Item.createRouter(),
job: Job.createRouter(),
market: Market.createRouter(),
product: Product.createRouter(),
profile: Profile.createRouter(),
raffle: Raffle.createRouter(),
skill: Skill.createRouter(),
video: Video.createRouter(),
});
export type Router = ReturnType<typeof createRouter>;