import { startOfDay, isToday, isYesterday, format } from 'date-fns';
export interface ChatMessage {
id: string;
senderId: string;
senderName: string;
import { z } from "zod";
const booleanFromString = z
.string()
.transform((v) => v.trim().toLowerCase())
.pipe(z.enum(["true", "false", "1", "0"]))
import { useEffect, useRef } from "react";
const FOCUSABLE = [
"a[href]",
"button:not([disabled])",
"textarea:not([disabled])",
import { S3Client } from "@aws-sdk/client-s3";
import { createPresignedPost, PresignedPost } from "@aws-sdk/s3-presigned-post";
import { randomUUID } from "crypto";
const s3 = new S3Client({ region: process.env.AWS_REGION });
const BUCKET = process.env.UPLOAD_BUCKET!;
import React, { createContext, useContext, useEffect, useState, ReactNode } from 'react'
type Theme = 'light' | 'dark'
interface ThemeContextType {
theme: Theme
import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
async function bootstrap() {
// rawBody: true preserves the exact bytes Stripe signed
const app = await NestFactory.create(AppModule, { rawBody: true });
import { WebSocketServer } from 'ws';
import type WebSocket from 'ws';
type ClientState = { topics: Set<string> };
const state = new WeakMap<WebSocket, ClientState>();
import type { Redis } from "ioredis";
export interface StoredResponse {
status: "pending" | "completed";
fingerprint: string;
httpStatus?: number;
export interface Cursor {
createdAt: string;
id: string;
}
export function encodeCursor(c: Cursor): string {
import { useState } from 'react'
import {
DndContext,
closestCenter,
KeyboardSensor,
PointerSensor,
import { z } from 'zod';
export const signupSchema = z
.object({
email: z.string().min(1, 'Email is required').email('Enter a valid email'),
password: z
import { Injectable, NgZone } from '@angular/core';
import { Observable, Subject } from 'rxjs';
export interface ObserverOptions {
rootMargin?: string;
threshold?: number | number[];