/** * AxTable `SubscriberAccessLevel` — "Subscriber access level" in the Visual * Studio property sheet. * * Not a scalar like the rest of the property block: the metamodel type is * `AccessGrant`, six permissions each `Unset | Allow | Deny`, and the * serializer writes only the ones that are set, as child elements in * alphabetical order: * * * Allow * * * All-Unset (the metamodel default) is written as no element at all. * * Visual Studio sets Read=Allow on every new regular table, and that is by far * the commonest value in shipped and partner metadata. Data entity staging * tables carry none (156 of 4,619 shipped ones have the element). * * TempDB/InMemory tables get none here, but that is a choice, not a measured * rule: of 18,467 shipped tables, 617 of 2,705 TempDB/InMemory tables carry * Read=Allow — about the same share as regular tables, most of which predate * the VS default and carry nothing. On a temporary table the grant has no * effect either way, so leaving it out keeps the file minimal. This server wrote none either, * and had no way to set one: the scalar property writer cannot express child * elements, and the name was not in the AxTable element order, so it was * dropped (issue #1073). */ /** The AccessGrant permissions, in the order the serializer writes them. */ export declare const SUBSCRIBER_PERMISSIONS: readonly ['Correct', 'Create', 'Delete', 'Invoke', 'Read', 'Update']; export type SubscriberPermission = (typeof SUBSCRIBER_PERMISSIONS)[number]; export type SubscriberGrant = 'Allow' | 'Deny'; export type SubscriberAccessLevel = Partial>; /** What Visual Studio writes on a new regular table. */ export declare const DEFAULT_SUBSCRIBER_ACCESS_LEVEL: SubscriberAccessLevel; export type ParsedSubscriberAccessLevel = { ok: true; level: SubscriberAccessLevel; } | { ok: false; error: string; }; /** * A caller's `subscriberAccessLevel` value, in any of the accepted spellings. * An empty result means "no access level": the element is left out. */ export declare function parseSubscriberAccessLevel(raw: unknown): ParsedSubscriberAccessLevel; /** * A modify-property / bridge value: the parse of a "Read=Allow,…" string, a * JSON object string, or an object, and the "Read=Allow,Create=Deny" / "None" * text the bridge's property setter reads. */ export declare function subscriberAccessLevelValue(raw: unknown): { ok: true; level: SubscriberAccessLevel; bridgeText: string; } | { ok: false; error: string; }; /** * The `` element at `indent`, children one level deeper. * '' for an empty level — the serializer writes nothing for all-Unset. */ export declare function renderSubscriberAccessLevel(level: SubscriberAccessLevel, indent?: string, childIndent?: string): string; /** The access level an AxTable document declares ({} when it has none). */ export declare function readSubscriberAccessLevel(xml: string): SubscriberAccessLevel; export declare function sameSubscriberAccessLevel(a: SubscriberAccessLevel, b: SubscriberAccessLevel): boolean; /** "Read=Allow, Create=Deny", or "none". */ export declare function describeSubscriberAccessLevel(level: SubscriberAccessLevel): string; /** Whether an AxTable document is a TempDB / InMemory table, which carries no access level. */ export declare function isTempAxTable(xml: string): boolean; /** * The access level a NEW table gets: the caller's, when one was passed and is * valid; otherwise Visual Studio's Read=Allow, or none for a TempDB/InMemory * table. Undefined for an invalid value, which the create reconcile reports. */ export declare function tableSubscriberAccessLevel(requested: unknown, tableType: unknown): SubscriberAccessLevel | undefined; /** * Write `level` as the AxTable's access level, replacing any existing one, or * remove it when `level` is empty. A new element goes directly after the last * table-level predecessor (always at least ), at table-level indentation — * never inside a field or the X++ source. Null when the document is not an * AxTable. */ export declare function setSubscriberAccessLevel(xml: string, level: SubscriberAccessLevel): string | null; //# sourceMappingURL=subscriberAccessLevel.d.ts.map