This file contains hidden or 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
// Infer the output type directly from the Better Auth API function | |
type ListUsersOutputType = Awaited<ReturnType<typeof auth.api.listUsers>>; | |
// Implementation | |
// Use z.custom for non-Zod types or refine further if needed | |
.output(z.custom<ListUsersOutputType>()) |
This file contains hidden or 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
import { auth } from "@/server/auth"; | |
import { createQueryClient } from "@/trpc/query-client"; | |
import { HydrationBoundary, dehydrate } from "@tanstack/react-query"; // Import dehydrate and HydrationBoundary | |
import { headers } from "next/headers"; | |
import Link from "next/link"; | |
import { cache } from "react"; | |
import StateView from "./state"; | |
// Cache the QueryClient per request in RSC | |
const getQueryClient = cache(() => createQueryClient()); |
This file contains hidden or 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
import { auth } from "@/server/auth"; | |
import { createQueryClient } from "@/trpc/query-client"; | |
import { HydrationBoundary, dehydrate } from "@tanstack/react-query"; // Import HydrationBoundary | |
import { headers } from "next/headers"; | |
import Link from "next/link"; | |
import { cache } from "react"; | |
// Cache the QueryClient per request in RSC | |
const getQueryClient = cache(() => createQueryClient()); |
This file contains hidden or 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
export const mailConfigurationSchema = z.object({ | |
apiKey: z.string().default(""), | |
fromEmail: z | |
.string() | |
.email() | |
.optional() | |
.or(z.literal("")) | |
.default(""), | |
toName: z.string().default(""), | |
toEmail: z |
This file contains hidden or 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
import { type User } from "@/server/auth/types"; | |
import { type SelectProduct } from "@/server/db/schema/products-schema"; | |
import { | |
ApiError, | |
CheckoutPaymentIntent, | |
Client, | |
ClientCredentialsAuthManager, | |
Environment, | |
LogLevel, | |
OrderApplicationContextShippingPreference, |
This file contains hidden or 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
"use client"; | |
import { Button } from "@/components/ui/button"; | |
import { | |
Dialog, | |
DialogContent, | |
DialogDescription, | |
DialogTitle, | |
DialogTrigger, | |
} from "@/components/ui/dialog"; |
This file contains hidden or 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
export const WEBHOOK_CONFIG_MODES = [ | |
{ value: "auto", label: "Auto" }, | |
{ value: "manual", label: "Manual" }, | |
] as const; | |
export type WebhookConfigMode = (typeof WEBHOOK_CONFIG_MODES)[number]; | |
export const WEBHOOK_CONFIG_MODE_VALUES = WEBHOOK_CONFIG_MODES.map( | |
(mode) => mode.value, | |
) as [string, ...string[]]; |
This file contains hidden or 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
{ | |
"api_version": "2025-01-27.acacia", | |
"created": 1739648336, | |
"data": { | |
"object": { | |
"adaptive_pricing": null, | |
"after_expiration": null, | |
"allow_promotion_codes": null, | |
"amount_subtotal": 1000, | |
"amount_total": 1000, |
This file contains hidden or 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
"use client"; | |
import { useState } from "react"; | |
import { generateReactHelpers } from "@uploadthing/react"; | |
import type { OurFileRouter } from "@/app/api/uploadthing/core"; | |
export const { uploadFiles } = generateReactHelpers<OurFileRouter>(); | |
interface FormData { | |
name: string; |
NewerOlder