import type { AuditContext } from '@cclabsnz/sf-core'; /** * How records are shared with unauthenticated guest users, read from share tables. * * Since Winter '21 the only new way to share a record with a guest is a guest user sharing rule: * its rows carry RowCause 'GuestRule' and name the site's guest user group (Group Type * 'GuestUserGroup'), not the guest user (seen on a live org, test/fixtures/org/guest-share); the * parent or person-account access it implies carries 'GuestParentImplicit' / 'GuestPersonImplicit' * (AccountShare picklist values). Those rows are counted whoever they name. Access granted before Winter '21 was not * removed: manual and Apex-managed shares to a guest user, and a guest's membership of a public * group or queue, still give access until someone cleans them up. So rows naming a guest user * (other than its ownership, which is reported on its own) or a group a guest belongs to count too. */ export declare const GUEST_ROW_CAUSES: readonly ['GuestRule', 'GuestParentImplicit', 'GuestPersonImplicit']; export interface GuestPrincipals { users: string[]; /** * Groups whose members are guests: each site's guest user group (Group Type 'GuestUserGroup', * whose membership GroupMember does not list), and public groups and queues a guest user belongs * to. Empty when neither can be read. */ groups: string[]; } export declare function guestPrincipals(ctx: AuditContext, guestIds: string[]): Promise; /** * Ground-truth read confirmation via UserRecordAccess on up to 200 sample records (the most one * UserRecordAccess query takes), from both ends of the object's history. UserRecordAccess takes one * user per query, and each site has its own guest user with its own guest sharing rules, so every * guest user is asked. True when any guest reads any sampled record; null when the object has no * record to sample; 'failed' when a query fails. */ export declare function guestReadsSample(ctx: AuditContext, obj: string, guestIds: string[]): Promise; /** The WHERE condition matching every share row that gives a guest user access to a record. */ export declare function guestShareWhere(p: GuestPrincipals): string; /** The share table of an object: AccountShare for standard objects, Foo__Share for Foo__c. */ export declare function shareTableOf(obj: string): string; /** Share rows giving guests access to the object's records; null when it has no readable share table. */ export declare function guestShareCount(ctx: AuditContext, obj: string, p: GuestPrincipals): Promise; //# sourceMappingURL=guestShares.d.ts.map