@paroicms/server
Version:
The ParoiCMS server
40 lines (39 loc) • 1.4 kB
TypeScript
import { type LoginMethod } from "@paroicms/public-anywhere-lib";
import type { AccountRow, DocumentRow } from "../connector/row-types.js";
import type { SiteContext } from "../site-context/site-context.types.js";
export interface Account {
id: string;
name?: string;
email: string;
hasPasswordResetToken?: boolean;
loginMethod?: LoginMethod;
active: boolean;
}
export interface AccountPreferences {
language?: string;
currentAuthorNodeId?: string;
}
export interface AuthenticatedAccount extends Account {
preferences?: AccountPreferences;
}
export declare const AccountPreferencesAT: import("arktype/internal/variants/object.ts").ObjectType<{
language?: string | undefined;
currentAuthorNodeId?: string | undefined;
}, {}>;
export declare function formatAuthenticatedAccount(data: AccountRow): AuthenticatedAccount;
export declare function formatAccount(data: AccountRow): Account;
export interface DocumentSeed {
documentId: string;
nodeId: string;
language: string;
ready: boolean;
updatedAt: Date;
title?: string;
slug?: string;
metaDescription?: string;
metaKeywords?: string;
overrideLanguage?: string;
featuredImageHandle: string;
}
export declare function toDocumentSeed(document: DocumentRow): DocumentSeed;
export declare function getAssetsBaseUrl(siteContext: Pick<SiteContext, "version">): string;