generated from isoppp/remix-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
167 additions
and
185 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import type { appRouter } from '@/trpc' | ||
|
||
export type AppRouter = typeof appRouter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
import { defineConfig } from 'tsup' | ||
|
||
export default defineConfig({ | ||
entry: ['src/trpc/index.export.ts'], | ||
format: ['cjs', 'esm'], | ||
dts: true, | ||
entry: ['src/trpc/shared-export/trpc.ts'], | ||
dts: { | ||
only: true, | ||
}, | ||
splitting: false, | ||
sourcemap: true, | ||
clean: true, | ||
outDir: '../app/app/generated/trpc', | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,158 @@ | ||
import * as _trpc_server from '@trpc/server'; | ||
import * as _trpc_server_unstable_core_do_not_import from '@trpc/server/unstable-core-do-not-import'; | ||
|
||
declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{ | ||
ctx: { | ||
req: Request; | ||
resHeaders: Headers; | ||
user: { | ||
id: string; | ||
email: string; | ||
createdAt: Date; | ||
updatedAt: Date; | ||
}; | ||
} | { | ||
req: Request; | ||
resHeaders: Headers; | ||
user: null; | ||
}; | ||
meta: object; | ||
errorShape: { | ||
data: { | ||
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_KEY; | ||
httpStatus: number; | ||
path?: string; | ||
stack?: string; | ||
}; | ||
message: string; | ||
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_NUMBER; | ||
}; | ||
transformer: false; | ||
}, _trpc_server_unstable_core_do_not_import.DecorateCreateRouterOptions<{ | ||
example: _trpc_server_unstable_core_do_not_import.BuiltRouter<{ | ||
ctx: { | ||
req: Request; | ||
resHeaders: Headers; | ||
user: { | ||
id: string; | ||
email: string; | ||
createdAt: Date; | ||
updatedAt: Date; | ||
}; | ||
} | { | ||
req: Request; | ||
resHeaders: Headers; | ||
user: null; | ||
}; | ||
meta: object; | ||
errorShape: { | ||
data: { | ||
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_KEY; | ||
httpStatus: number; | ||
path?: string; | ||
stack?: string; | ||
}; | ||
message: string; | ||
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_NUMBER; | ||
}; | ||
transformer: false; | ||
}, { | ||
hello: _trpc_server.TRPCQueryProcedure<{ | ||
input: void; | ||
output: string; | ||
}>; | ||
list: _trpc_server.TRPCQueryProcedure<{ | ||
input: void; | ||
output: { | ||
id: string; | ||
name: string; | ||
}[]; | ||
}>; | ||
create: _trpc_server.TRPCMutationProcedure<{ | ||
input: { | ||
name: string; | ||
}; | ||
output: { | ||
id: string; | ||
name: string; | ||
}; | ||
}>; | ||
}>; | ||
auth: _trpc_server_unstable_core_do_not_import.BuiltRouter<{ | ||
ctx: { | ||
req: Request; | ||
resHeaders: Headers; | ||
user: { | ||
id: string; | ||
email: string; | ||
createdAt: Date; | ||
updatedAt: Date; | ||
}; | ||
} | { | ||
req: Request; | ||
resHeaders: Headers; | ||
user: null; | ||
}; | ||
meta: object; | ||
errorShape: { | ||
data: { | ||
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_KEY; | ||
httpStatus: number; | ||
path?: string; | ||
stack?: string; | ||
}; | ||
message: string; | ||
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_NUMBER; | ||
}; | ||
transformer: false; | ||
}, { | ||
isSignedIn: _trpc_server.TRPCQueryProcedure<{ | ||
input: void; | ||
output: { | ||
isSignedIn: boolean; | ||
}; | ||
}>; | ||
signupWithEmail: _trpc_server.TRPCMutationProcedure<{ | ||
input: { | ||
email: string; | ||
}; | ||
output: { | ||
ok: true; | ||
}; | ||
}>; | ||
signInWithEmail: _trpc_server.TRPCMutationProcedure<{ | ||
input: { | ||
email: string; | ||
}; | ||
output: { | ||
ok: boolean; | ||
}; | ||
}>; | ||
signInVerification: _trpc_server.TRPCMutationProcedure<{ | ||
input: { | ||
token: string; | ||
}; | ||
output: { | ||
ok: true; | ||
} | { | ||
ok: false; | ||
attemptExceeded: boolean; | ||
}; | ||
}>; | ||
signUpVerification: _trpc_server.TRPCMutationProcedure<{ | ||
input: { | ||
token: string; | ||
}; | ||
output: { | ||
ok: true; | ||
} | { | ||
ok: false; | ||
attemptExceeded: boolean; | ||
}; | ||
}>; | ||
}>; | ||
}>>; | ||
|
||
type AppRouter = typeof appRouter; | ||
|
||
export type { AppRouter }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import type { AppRouter } from '@/generated/trpc/trpc' | ||
import { createTRPCReact } from '@trpc/react-query' | ||
import type { AppRouter } from '../../types/trpc' | ||
export const trpc = createTRPCReact<AppRouter>() |
This file was deleted.
Oops, something went wrong.