publishSheetVersion(client, versionId, validate) takes the core's sheet.check (the package never loads the module itself); anything but a publishable verdict refuses publication before the RPC: invalid_shape, not_publishable (same message as before: first error code), and validator_unavailable when the core cannot run. Tests run on the real Node core; the shape case now asserts the closed kind instead of any throw. The package no longer depends on @faunosteo/domain.
92 lines
2.4 KiB
TypeScript
92 lines
2.4 KiB
TypeScript
export {
|
|
createBrowserClient,
|
|
type FaunosteoClient,
|
|
type SupabaseConnection,
|
|
} from './client'
|
|
/** Auth types the app needs without depending on supabase-js directly. */
|
|
export type { AuthChangeEvent, Session, User } from '@supabase/supabase-js'
|
|
export type {
|
|
Database,
|
|
Enums,
|
|
Json,
|
|
Tables,
|
|
TablesInsert,
|
|
TablesUpdate,
|
|
} from './database.types'
|
|
export { Constants } from './database.types'
|
|
|
|
import type { Enums, Tables } from './database.types'
|
|
|
|
/** Row of public.profile_roles. */
|
|
export type ProfileRole = Tables<'profile_roles'>
|
|
export {
|
|
AuthFailure,
|
|
classifyAuthError,
|
|
sendPasswordReset,
|
|
signInWithOAuth,
|
|
signInWithPassword,
|
|
signOut,
|
|
signUpWithPassword,
|
|
updatePassword,
|
|
type AuthFailureKind,
|
|
type EmailPasswordCredentials,
|
|
type OAuthProvider,
|
|
type SignUpInput,
|
|
type SignUpResult,
|
|
} from './auth'
|
|
export {
|
|
fetchOwnProfile,
|
|
ProfileError,
|
|
updateOwnProfile,
|
|
type OwnProfilePatch,
|
|
type Profile,
|
|
} from './profiles'
|
|
/** owner | admin | moderator | support. Not a professional status. */
|
|
export { fetchOwnPlatformRoles, type PlatformRole } from './platform-roles'
|
|
export {
|
|
publishSheetVersion,
|
|
SheetPublishError,
|
|
type SheetCheckOutcome,
|
|
type SheetIssue,
|
|
type SheetPublishErrorKind,
|
|
type SheetValidator,
|
|
} from './anatomical-sheets'
|
|
export {
|
|
ASSET_FAILURE_KINDS,
|
|
ASSET_OWNER_COLUMNS,
|
|
AVATAR_REJECTION_CODES,
|
|
AssetFailure,
|
|
beginAvatarUpload,
|
|
classifyAssetError,
|
|
confirmAssetUpload,
|
|
downloadAvatar,
|
|
fetchOwnAvatarState,
|
|
isAvatarRejectionCode,
|
|
reduceAvatarRows,
|
|
removeAvatar,
|
|
uploadToQuarantine,
|
|
type AssetFailureKind,
|
|
type AssetRow,
|
|
type AssetStatus,
|
|
type AvatarRejectionCode,
|
|
type AvatarState,
|
|
type AvatarUploadTicket,
|
|
type BeginAvatarUploadInput,
|
|
type QuarantineUploadInput,
|
|
} from './assets'
|
|
|
|
/** Row of public.species. */
|
|
export type Species = Tables<'species'>
|
|
/** Row of public.anatomical_sheets. */
|
|
export type AnatomicalSheet = Tables<'anatomical_sheets'>
|
|
/** Row of public.anatomical_sheet_versions (content = canonical document). */
|
|
export type AnatomicalSheetVersion = Tables<'anatomical_sheet_versions'>
|
|
/** Row of public.anatomical_sheet_assets. */
|
|
export type AnatomicalSheetAsset = Tables<'anatomical_sheet_assets'>
|
|
/** private | public. */
|
|
export type SheetVisibility = Enums<'sheet_visibility'>
|
|
/** active | archived | deleted. */
|
|
export type SheetStatus = Enums<'sheet_status'>
|
|
/** draft | published | deprecated. */
|
|
export type SheetVersionStatus = Enums<'sheet_version_status'>
|