import type { TConstValue } from '@venizia/ignis-helpers/common'; /** Default pagination limit for repository queries. */ export declare const DEFAULT_LIMIT = 10; /** * Largest `limit` a caller may ask for when a model declares no `maxLimit`. * * POLICY, not capacity - it sits far below what an engine can physically serve. It exists because * removing an accidental guardrail without replacing it would leave the framework less safe than * before: a search engine refused a page over 250 hits, so `limit: 5000` failed fast and cheap. * Once that page is served, something has to decide when a page is unreasonable. * * 1000 sits above any list screen and well below the physical ceiling, so reaching it means the * caller is doing something unusual - and a model raises it by saying so explicitly. */ export declare const DEFAULT_MAX_LIMIT = 1000; /** Defines the operation scope for repository instances (READ_ONLY, WRITE_ONLY, READ_WRITE). */ export declare class RepositoryOperationScopes { static readonly READ_ONLY = "READ_ONLY"; static readonly WRITE_ONLY = "WRITE_ONLY"; static readonly READ_WRITE = "READ_WRITE"; static readonly SCHEME_SET: Set; static isValid(orgType: string): boolean; } /** Valid repository operation scope values. */ export type TRepositoryOperationScope = TConstValue; /** What `@repository` binds: MODEL, a model this application declares (the default); REMOTE, data behind another service's API, with no model. */ export declare class RepositoryTypes { static readonly MODEL = "model"; static readonly REMOTE = "remote"; static readonly SCHEME_SET: Set; static isValid(value: string): boolean; } /** Valid repository type values. */ export type TRepositoryType = TConstValue; /** What a row-scope filter (`@model` settings.access) does when `resolve()` returns null/undefined. */ export declare class ScopeFilterMissingBehaviors { /** An unresolved scope matches ZERO rows - the safe reading of "caller's scope is unknown". */ static readonly DENY = "deny"; /** Explicit opt-out: no scope is applied. For migrations and background jobs, never inferred from a request. */ static readonly ALLOW = "allow"; static readonly SCHEME_SET: Set; static isValid(behavior: string): boolean; } /** Valid scope-filter missing-behavior values. */ export type TScopeFilterMissingBehavior = TConstValue; /** * What a scoped write does with a row whose scope column disagrees with the resolved scope * (`@model` settings.access.write.mode). A scope that returns `ScopeFilters.UNRESTRICTED` * passes either way. */ export declare class ScopeWriteGuards { /** Default. A row whose scope column disagrees, or is absent on create, is refused and nothing is written. */ static readonly REJECT = "reject"; /** An ABSENT scope column is filled from an equality scope; a value that disagrees is still refused. */ static readonly ASSIGN = "assign"; static readonly SCHEME_SET: Set; static isValid(guard: string): boolean; } /** Valid scope write-guard values. */ export type TScopeWriteGuard = TConstValue; /** * The third `resolve()` state, beside a `where` and `deny`-by-default null/undefined: unrestricted * for THIS call. `onMissing: 'allow'` cannot express it - `onMissing` lives on the model's static * settings, so using it for a per-user bypass (an internal operator) would also unscope every * ordinary user whose `resolve()` happens to return nothing. */ export declare class ScopeFilters { /** * Return from `resolve()` to apply NO scope for this request - a caller the application has * decided sees everything. Deliberately a symbol: forgetting to return must land in deny, and no * JSON body, query string, or header can ever produce this value. `Symbol.for` so two installed * copies of this package agree on identity, same as `DATA_SOURCE_BRAND`. */ static readonly UNRESTRICTED: unique symbol; } /** Machine-readable codes for repository-level failures, in the dotted namespace core already uses (`core.not_supported`, `core.search_engine.*`) - a client maps the code, never the message. */ export declare class RepositoryErrorCodes { /** A verb the repository's `operationScope` does not permit (e.g. `create()` on a READ_ONLY one). */ static readonly OPERATION_NOT_ALLOWED: string; /** A write whose scope column disagrees with the resolved scope, or whose scope cannot be verified (`access` write guard). */ static readonly SCOPE_WRITE_DENIED: string; } /** Valid repository error code values. */ export type TRepositoryErrorCode = TConstValue; /** Entity relation types (one-to-one/many-to-one, one-to-many). */ export declare class RelationTypes { static readonly ONE = "one"; static readonly MANY = "many"; static readonly SCHEME_SET: Set; static isValid(orgType: string): boolean; } /** Valid relation type values. */ export type TRelationType = TConstValue; /** PostgreSQL row-level lock strengths for SELECT ... FOR . */ export declare class LockStrengths { static readonly UPDATE = "update"; static readonly NO_KEY_UPDATE = "no key update"; static readonly SHARE = "share"; static readonly KEY_SHARE = "key share"; static readonly SCHEME_SET: Set; static isValid(strength: string): boolean; } /** Valid lock strength values. */ export type TLockStrength = TConstValue; //# sourceMappingURL=constants.d.ts.map