// shared
export { defineCommand, type Command } from "./shared/defineCommand";
export { ok, err, type Result, type ValueOf, type ErrorOf } from "./shared/result";
export { defineQuery, type Query } from "./shared/defineQuery";
export { definePermissions, requirePermission } from "./shared/permissions";
export { defaultPermission, defaultGqlPermission } from "./shared/modelPermissions";
export { createDomainError, InsufficientPermissionError } from "./shared/errors";
export type {
  CommandContext,
  QueryContext,
  ReadonlyDB,
  PaginationInput,
  PaginatedResult,
} from "./shared/types";
export { buildPaginatedResult, DEFAULT_PAGE_SIZE } from "./shared/pagination";
export {
  defineLifecycle,
  type Lifecycle,
  executeTransition,
  type TransitionErrors,
} from "./shared/defineLifecycle";
export type {
  InferSchema,
  Selectable,
  Insertable,
  Updateable,
  FieldsToInsertable,
  EmptyFields,
  NoReservedFields,
  CommonReservedFields,
} from "./shared/entityTypes";
