import { Timestamp, Transaction, DocumentSnapshot, DocumentReference } from "firebase-admin/firestore"; import * as fw from "../fw"; export * from "./errors"; export interface User { name?: string; admin?: boolean; } export class IdTokenExpiredError extends fw.types.BaseError { constructor(message?: string) { super(fw.types.StatusCode.Unautorized, 40101, message ?? "IDトークンの期限が切れています"); } } export interface AkashicProperty { idToken: string; accessToken: string; createdAt: Timestamp; expireAt: Timestamp; instanceCount?: number; } export interface TransactionContext { transaction: Transaction; docRef: DocumentReference; docSnapshot: DocumentSnapshot; } export interface PlayIdDocument { createdAt: Timestamp; playId: string; roomId: string; uid: string; } export interface StoreUserToken { userId: string; createdPlayIds: string[]; createdAt: Timestamp; } export interface akashicPlayWithId { akashicPlayId: string; id: string; }