mirror of
https://github.com/lukevella/rallly.git
synced 2025-06-16 09:31:50 +02:00
♻️ Add abstractions for tracking server-side events (#1143)
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
parent
81d2f2c0bd
commit
d43bc631f1
9 changed files with 69 additions and 12 deletions
|
@ -1,6 +1,7 @@
|
|||
import { EmailClient } from "@rallly/emails";
|
||||
import { inferAsyncReturnType, TRPCError } from "@trpc/server";
|
||||
import { CreateNextContextOptions } from "@trpc/server/adapters/next";
|
||||
import type { PostHog } from "posthog-node";
|
||||
|
||||
export type GetUserFn = (opts: CreateNextContextOptions) => Promise<{
|
||||
id: string;
|
||||
|
@ -12,6 +13,7 @@ export interface TRPCContextParams {
|
|||
emailClient: EmailClient;
|
||||
isSelfHosted: boolean;
|
||||
isEmailBlocked?: (email: string) => boolean;
|
||||
posthogClient?: PostHog;
|
||||
/**
|
||||
* Takes a relative path and returns an absolute URL to the app
|
||||
* @param path
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue