import { z } from 'zod'; /** * The possible types of subjects that can be affected by permissions. * * - "user" - The permission is for a user. * - "inst" - The permission is for an inst. * - "role" - The permission is for a role. * * @dochash types/permissions * @doctitle Permissions Types * @docsidebar Permissions * @docdescription Types that represent permissions that control access to resources. * @docname SubjectType */ export type SubjectType = 'user' | 'inst' | 'role'; export declare const DATA_RESOURCE_KIND = "data"; export declare const FILE_RESOURCE_KIND = "file"; export declare const EVENT_RESOURCE_KIND = "event"; export declare const MARKER_RESOURCE_KIND = "marker"; export declare const ROLE_RESOURCE_KIND = "role"; export declare const INST_RESOURCE_KIND = "inst"; export declare const LOOM_RESOURCE_KIND = "loom"; export declare const SLOYD_RESOURCE_KIND = "ai.sloyd"; export declare const HUME_RESOURCE_KIND = "ai.hume"; export declare const OPENAI_REALTIME_RESOURCE_KIND = "ai.openai.realtime"; export declare const AI_CHAT_RESOURCE_KIND = "ai.chat"; export declare const AI_IMAGE_RESOURCE_KIND = "ai.image"; export declare const AI_SKYBOX_RESOURCE_KIND = "ai.skybox"; export declare const WEBHOOK_RESOURCE_KIND = "webhook"; export declare const NOTIFICATION_RESOURCE_KIND = "notification"; export declare const PACKAGE_RESOURCE_KIND = "package"; export declare const PACKAGE_VERSION_RESOURCE_KIND = "package.version"; export declare const SEARCH_RESOURCE_KIND = "search"; export declare const DATABASE_RESOURCE_KIND = "database"; export declare const PURCHASABLE_ITEM_RESOURCE_KIND = "purchasableItem"; export declare const CONTRACT_RESOURCE_KIND = "contract"; export declare const INVOICE_RESOURCE_KIND = "invoice"; /** * The possible types of resources that can be affected by permissions. * * @dochash types/permissions * @docname ResourceKinds */ export type ResourceKinds = 'data' | 'file' | 'event' | 'marker' | 'role' | 'inst' | 'webhook' | 'notification' | 'package' | 'package.version' | 'search' | 'loom' | 'ai.sloyd' | 'ai.hume' | 'ai.openai.realtime' | 'ai.chat' | 'ai.image' | 'ai.skybox' | 'database' | 'purchasableItem' | 'contract' | 'invoice'; export declare const READ_ACTION = "read"; export declare const CREATE_ACTION = "create"; export declare const UPDATE_ACTION = "update"; export declare const DELETE_ACTION = "delete"; export declare const ASSIGN_ACTION = "assign"; export declare const UNASSIGN_ACTION = "unassign"; export declare const INCREMENT_ACTION = "increment"; export declare const COUNT_ACTION = "count"; export declare const LIST_ACTION = "list"; export declare const GRANT_PERMISSION_ACTION = "grantPermission"; export declare const REVOKE_PERMISSION_ACTION = "revokePermission"; export declare const GRANT_ACTION = "grant"; export declare const REVOKE_ACTION = "revoke"; export declare const SEND_ACTION_ACTION = "sendAction"; export declare const UPDATE_DATA_ACTION = "updateData"; export declare const RUN_ACTION = "run"; export declare const SEND_ACTION = "send"; export declare const SUBSCRIBE_ACTION = "subscribe"; export declare const UNSUBSCRIBE_ACTION = "unsubscribe"; export declare const LIST_SUBSCRIPTIONS_ACTION = "listSubscriptions"; export declare const PURCHASE_ACTION = "purchase"; export declare const APPROVE_ACTION = "approve"; export declare const CANCEL_ACTION = "cancel"; /** * The possible types of actions that can be performed on resources. * * @dochash types/permissions * @docname ActionKinds */ export type ActionKinds = 'read' | 'create' | 'update' | 'delete' | 'assign' | 'unassign' | 'increment' | 'count' | 'list' | 'grantPermission' | 'revokePermission' | 'grant' | 'revoke' | 'sendAction' | 'updateData' | 'run' | 'send' | 'subscribe' | 'unsubscribe' | 'listSubscriptions' | 'purchase' | 'approve' | 'cancel'; /** * The possible types of actions that can be performed on data resources. * * @dochash types/permissions * @docname DataActionKinds */ export type DataActionKinds = 'read' | 'create' | 'update' | 'delete' | 'list'; /** * The possible types of actions that can be performed on file resources. * * @dochash types/permissions * @docname FileActionKinds */ export type FileActionKinds = 'read' | 'create' | 'update' | 'delete' | 'list'; /** * The possible types of actions that can be performed on event resources. * * @dochash types/permissions * @docname EventActionKinds */ export type EventActionKinds = 'increment' | 'count' | 'update' | 'list'; /** * The possible types of actions that can be performed on marker resources. * * @dochash types/permissions * @docname MarkerActionKinds */ export type MarkerActionKinds = 'assign' | 'unassign' | 'grantPermission' | 'revokePermission' | 'read'; /** * The possible types of actions that can be performed on roles resources. * * @dochash types/permissions * @docname RoleActionKinds */ export type RoleActionKinds = 'grant' | 'revoke' | 'read' | 'update' | 'list'; /** * The possible types of actions that can be performed on inst resources. * * @dochash types/permissions * @docname InstActionKinds */ export type InstActionKinds = 'create' | 'read' | 'update' | 'updateData' | 'delete' | 'list' | 'sendAction'; /** * The possible types of actions that can be performed on loom resources. * * @dochash types/permissions * @docname LoomActionKinds */ export type LoomActionKinds = 'create'; /** * The possible types of actions that can be performed on ai.sloyd resources. * * @dochash types/permissions * @docname SloydActionKinds */ export type SloydActionKinds = 'create'; /** * The possible types of actions that can be performed on ai.hume resources. * * @dochash types/permissions * @docname HumeActionKinds */ export type HumeActionKinds = 'create'; /** * The possible types of actions that can be performed on ai.openai.realtime resources. * * @dochash types/permissions * @docname OpenAIRealtimeActionKinds */ export type OpenAIRealtimeActionKinds = 'create'; /** * The possible types of actions that can be performed on ai.chat resources. * * @dochash types/permissions * @docname AIChatActionKinds */ export type AIChatActionKinds = 'create'; /** * The possible types of actions that can be performed on ai.image resources. * * @dochash types/permissions * @docname AIImageActionKinds */ export type AIImageActionKinds = 'create'; /** * The possible types of actions that can be performed on ai.skybox resources. * * @dochash types/permissions * @docname AISkyboxActionKinds */ export type AISkyboxActionKinds = 'create'; /** * The possible types of actions that can be performed on webhook resources. * * @dochash types/permissions * @docname WebhookActionKinds */ export type WebhookActionKinds = 'create' | 'read' | 'update' | 'delete' | 'list' | 'run'; /** * The possible types of actions that can be performed on notification resources. * * @dochash types/permissions * @docname NotificationActionKinds */ export type NotificationActionKinds = 'create' | 'read' | 'update' | 'delete' | 'list' | 'send' | 'subscribe' | 'unsubscribe' | 'listSubscriptions'; /** * The possible types of actions that can be performed on package resources. * * @dochash types/permissions * @docname PackageActionKinds */ export type PackageActionKinds = 'create' | 'read' | 'update' | 'delete' | 'list' | 'run'; /** * The possible types of actions that can be performed on package.version resources. * * @dochash types/permissions * @docname PackageVersionActionKinds */ export type PackageVersionActionKinds = 'create' | 'read' | 'update' | 'delete' | 'list' | 'run'; /** * The possible types of actions that can be performed on search resources. * * @dochash types/permissions * @docname SearchActionKinds */ export type SearchActionKinds = 'create' | 'read' | 'update' | 'delete' | 'list'; /** * The possible types of actions that can be performed on database resources. * * @dochash types/permissions * @docname DatabaseActionKinds */ export type DatabaseActionKinds = 'create' | 'read' | 'update' | 'delete' | 'list'; /** * The possible types of actions that can be performed on purchasableItem resources. * * @dochash types/permissions * @docname PurchasableItemActionKinds */ export type PurchasableItemActionKinds = 'read' | 'create' | 'update' | 'delete' | 'list' | 'purchase'; /** * The possible types of actions that can be performed on contract resources. * * @dochash types/permissions * @docname ContractActionKinds */ export type ContractActionKinds = 'read' | 'create' | 'update' | 'delete' | 'list' | 'purchase' | 'cancel'; /** * The possible types of actions that can be performed on invoice resources. * * @dochash types/permissions * @docname InvoiceActionKinds */ export type InvoiceActionKinds = 'read' | 'create' | 'update' | 'delete' | 'list' | 'approve' | 'cancel'; /** * The possible types of permissions that can be added to policies. * * @dochash types/permissions * @doctitle Permissions Types * @docsidebar Permissions * @docdescription Types that represent permissions that control access to resources. * @docname AvailablePermissions */ export type AvailablePermissions = DataPermission | FilePermission | EventPermission | MarkerPermission | RolePermission | InstPermission | PurchasableItemPermission | LoomPermission | SloydPermission | HumePermission | OpenAIRealtimePermission | AIChatPermission | AIImagePermission | AISkyboxPermission | WebhookPermission | NotificationPermission | PackagePermission | PackageVersionPermission | SearchPermission | DatabasePermission | ContractPermission | InvoicePermission; export declare const SUBJECT_TYPE_VALIDATION: (() => z.ZodEnum<{ inst: "inst"; user: "user"; role: "role"; }>) & { cache: import("es-toolkit").MemoizeCache>; }; export declare const DATA_ACTION_KINDS_VALIDATION: (() => z.ZodEnum<{ read: "read"; create: "create"; update: "update"; delete: "delete"; list: "list"; }>) & { cache: import("es-toolkit").MemoizeCache>; }; export declare const FILE_ACTION_KINDS_VALIDATION: (() => z.ZodEnum<{ read: "read"; create: "create"; update: "update"; delete: "delete"; list: "list"; }>) & { cache: import("es-toolkit").MemoizeCache>; }; export declare const EVENT_ACTION_KINDS_VALIDATION: (() => z.ZodEnum<{ update: "update"; increment: "increment"; count: "count"; list: "list"; }>) & { cache: import("es-toolkit").MemoizeCache>; }; export declare const MARKER_ACTION_KINDS_VALIDATION: (() => z.ZodEnum<{ read: "read"; assign: "assign"; unassign: "unassign"; grantPermission: "grantPermission"; revokePermission: "revokePermission"; }>) & { cache: import("es-toolkit").MemoizeCache>; }; export declare const ROLE_ACTION_KINDS_VALIDATION: (() => z.ZodEnum<{ read: "read"; update: "update"; list: "list"; grant: "grant"; revoke: "revoke"; }>) & { cache: import("es-toolkit").MemoizeCache>; }; export declare const INST_ACTION_KINDS_VALIDATION: (() => z.ZodEnum<{ read: "read"; create: "create"; update: "update"; delete: "delete"; list: "list"; sendAction: "sendAction"; updateData: "updateData"; }>) & { cache: import("es-toolkit").MemoizeCache>; }; export declare const LOOM_ACTION_KINDS_VALIDATION: (() => z.ZodEnum<{ create: "create"; }>) & { cache: import("es-toolkit").MemoizeCache>; }; export declare const SLOYD_ACTION_KINDS_VALIDATION: (() => z.ZodEnum<{ create: "create"; }>) & { cache: import("es-toolkit").MemoizeCache>; }; export declare const HUME_ACTION_KINDS_VALIDATION: (() => z.ZodEnum<{ create: "create"; }>) & { cache: import("es-toolkit").MemoizeCache>; }; export declare const OPENAI_REALTIME_ACTION_KINDS_VALIDATION: (() => z.ZodEnum<{ create: "create"; }>) & { cache: import("es-toolkit").MemoizeCache>; }; export declare const AI_CHAT_ACTION_KINDS_VALIDATION: (() => z.ZodEnum<{ create: "create"; }>) & { cache: import("es-toolkit").MemoizeCache>; }; export declare const AI_IMAGE_ACTION_KINDS_VALIDATION: (() => z.ZodEnum<{ create: "create"; }>) & { cache: import("es-toolkit").MemoizeCache>; }; export declare const AI_SKYBOX_ACTION_KINDS_VALIDATION: (() => z.ZodEnum<{ create: "create"; }>) & { cache: import("es-toolkit").MemoizeCache>; }; export declare const WEBHOOK_ACTION_KINDS_VALIDATION: (() => z.ZodEnum<{ run: "run"; read: "read"; create: "create"; update: "update"; delete: "delete"; list: "list"; }>) & { cache: import("es-toolkit").MemoizeCache>; }; export declare const NOTIFICATION_ACTION_KINDS_VALIDATION: (() => z.ZodEnum<{ read: "read"; create: "create"; update: "update"; delete: "delete"; list: "list"; send: "send"; subscribe: "subscribe"; unsubscribe: "unsubscribe"; listSubscriptions: "listSubscriptions"; }>) & { cache: import("es-toolkit").MemoizeCache>; }; export declare const PACKAGE_ACTION_KINDS_VALIDATION: (() => z.ZodEnum<{ run: "run"; read: "read"; create: "create"; update: "update"; delete: "delete"; list: "list"; }>) & { cache: import("es-toolkit").MemoizeCache>; }; export declare const PACKAGE_VERSION_ACTION_KINDS_VALIDATION: (() => z.ZodEnum<{ run: "run"; read: "read"; create: "create"; update: "update"; delete: "delete"; list: "list"; }>) & { cache: import("es-toolkit").MemoizeCache>; }; export declare const SEARCH_ACTION_KINDS_VALIDATION: (() => z.ZodEnum<{ read: "read"; create: "create"; update: "update"; delete: "delete"; list: "list"; }>) & { cache: import("es-toolkit").MemoizeCache>; }; export declare const DATABASE_ACTION_KINDS_VALIDATION: (() => z.ZodEnum<{ read: "read"; create: "create"; update: "update"; delete: "delete"; list: "list"; }>) & { cache: import("es-toolkit").MemoizeCache>; }; export declare const PURCHASABLE_ITEM_ACTION_KINDS_VALIDATION: (() => z.ZodEnum<{ read: "read"; create: "create"; update: "update"; delete: "delete"; list: "list"; purchase: "purchase"; }>) & { cache: import("es-toolkit").MemoizeCache>; }; export declare const CONTRACT_ACTION_KINDS_VALIDATION: (() => z.ZodEnum<{ read: "read"; create: "create"; update: "update"; delete: "delete"; list: "list"; purchase: "purchase"; cancel: "cancel"; }>) & { cache: import("es-toolkit").MemoizeCache>; }; export declare const INVOICE_ACTION_KINDS_VALIDATION: (() => z.ZodEnum<{ read: "read"; create: "create"; update: "update"; delete: "delete"; list: "list"; approve: "approve"; cancel: "cancel"; }>) & { cache: import("es-toolkit").MemoizeCache>; }; export declare const RESOURCE_KIND_VALIDATION: (() => z.ZodEnum<{ search: "search"; inst: "inst"; file: "file"; event: "event"; role: "role"; data: "data"; marker: "marker"; loom: "loom"; "ai.sloyd": "ai.sloyd"; "ai.hume": "ai.hume"; "ai.openai.realtime": "ai.openai.realtime"; "ai.chat": "ai.chat"; "ai.image": "ai.image"; "ai.skybox": "ai.skybox"; webhook: "webhook"; notification: "notification"; package: "package"; "package.version": "package.version"; database: "database"; purchasableItem: "purchasableItem"; contract: "contract"; invoice: "invoice"; }>) & { cache: import("es-toolkit").MemoizeCache>; }; export declare const ACTION_KINDS_VALIDATION: (() => z.ZodEnum<{ run: "run"; read: "read"; create: "create"; update: "update"; delete: "delete"; assign: "assign"; unassign: "unassign"; increment: "increment"; count: "count"; list: "list"; grantPermission: "grantPermission"; revokePermission: "revokePermission"; grant: "grant"; revoke: "revoke"; sendAction: "sendAction"; updateData: "updateData"; send: "send"; subscribe: "subscribe"; unsubscribe: "unsubscribe"; listSubscriptions: "listSubscriptions"; purchase: "purchase"; approve: "approve"; cancel: "cancel"; }>) & { cache: import("es-toolkit").MemoizeCache>; }; /** * The scopes that can be used for requested entitlements. * This can be used to limit the entitlement to requesting a category of resources. * For example, the "personal" scope would limit the entitlement to requesting access to the user's personal resources. * * - "personal" - The entitlement is for personal (user-specific) records. This would allow the package to request access to resources in the user's player record. Once granted, the package would have access to the user's personal record. * - "owned" - The entitlement is for user (user-owned) records. This would allow the package to request access to resources in a record that the user owns. Once granted, the package would have access to the user's owned records. * - "studio" - The entitlement is for studio records. This would allow the package to request access to resources in studios in which the user is an admin or member of. * - "shared" - The entitlement is for shared records. This would allow the package to request access to records that are either owned or granted to the user. * - "designated" - The entitlement is for specific records. This would allow the package to only request access to specific records. */ export type EntitlementScope = 'personal' | 'owned' | 'studio' | 'shared' | 'designated'; /** * The scopes that can be granted for entitlements. * Compared to the requested entitlement scopes, the granted entitlement scopes are more restrictive. * * This ultimately means that while a package can have the ability to request access to a bunch of different records, * they can only be granted access to a single record at once (for now). * * - "designated" - The entitlement is for specific records. This would allow the package to access specific records. */ export type GrantedEntitlementScope = 'designated'; /** * The feature categories that entitlements support. * Generally, features align with resource kinds, but don't have to. */ export type EntitlementFeature = 'data' | 'file' | 'event' | 'inst' | 'notification' | 'package' | 'permissions' | 'webhook' | 'ai' | 'search' | 'database'; /** * Defines an interface that represents an entitlement. * That is, a feature that can be granted to a package but still requires user approval. * * In essence, this allows a package to ask the user for permission for a category of permissions. */ export interface Entitlement { /** * The feature category that the entitlement is for. * Generally, features align with resource kinds, but don't have to. */ feature: EntitlementFeature; /** * The scope of the entitlement. * This can be used to limit the entitlement to a category of resources. * For example, the "personal" scope would limit the entitlement to requesting access to the user's personal resources. * * * - "personal" - The entitlement is for personal (user-specific) records. This would allow the package to request access to resources in the user's player record. * - "owned" - The entitlement is for user (user-owned) records. This would allow the package to request access to resources in a record that the user owns. * - "studio" - The entitlement is for studio records. This would allow the package to request access to resources in studios in which the user is an admin or member of. * - "shared" - The entitlement is for shared records. This would allow the package to request access to records that are either owned or granted to the user. * - "designated" - The entitlement is for specific records. This would allow the package to only request access to specific records. */ scope: EntitlementScope; /** * The list of records that the entitlement is for. */ designatedRecords?: string[]; } export declare const ENTITLEMENT_FEATURE_VALIDATION: (() => z.ZodEnum<{ search: "search"; inst: "inst"; file: "file"; event: "event"; data: "data"; webhook: "webhook"; notification: "notification"; package: "package"; database: "database"; permissions: "permissions"; ai: "ai"; }>) & { cache: import("es-toolkit").MemoizeCache>; }; export declare const ENTITLEMENT_VALIDATION: (() => z.ZodObject<{ feature: z.ZodEnum<{ search: "search"; inst: "inst"; file: "file"; event: "event"; data: "data"; webhook: "webhook"; notification: "notification"; package: "package"; database: "database"; permissions: "permissions"; ai: "ai"; }>; scope: z.ZodEnum<{ shared: "shared"; personal: "personal"; owned: "owned"; studio: "studio"; designated: "designated"; }>; designatedRecords: z.ZodOptional>; }, z.core.$strip>) & { cache: import("es-toolkit").MemoizeCache; scope: z.ZodEnum<{ shared: "shared"; personal: "personal"; owned: "owned"; studio: "studio"; designated: "designated"; }>; designatedRecords: z.ZodOptional>; }, z.core.$strip>>; }; /** * Defines an interface that describes common options for all permissions. */ export interface Permission { /** * The marker that the permission is for. * If null or undefined, then the permission is for a specific resource instead of a marker. */ marker?: string; /** * The type of the subject that the permission is for. * * "user" - The permission is for a user. * "inst" - The permission is for an inst. * "role" - The permission is for a role. */ subjectType: SubjectType; /** * The ID of the subject. */ subjectId: string; /** * The ID of the resource that is allowed. * If null, then all resources are allowed. */ resourceId?: string | null; /** * The options for the permission. */ options: {}; /** * The unix time in miliseconds that the permission will expire at. * If null, then the permission does not expire. */ expireTimeMs: number | null; } export declare const PERMISSION_VALIDATION: (() => z.ZodObject<{ subjectType: z.ZodEnum<{ inst: "inst"; user: "user"; role: "role"; }>; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; }, z.core.$strip>) & { cache: import("es-toolkit").MemoizeCache; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; }, z.core.$strip>>; }; /** * Defines an interface that describes the common options for all permissions that affect data records. * * @dochash types/permissions * @docname DataPermission */ export interface DataPermission extends Permission { /** * The kind of the permission. */ resourceKind: 'data'; /** * The action th at is allowed. * If null, then all actions are allowed. */ action: DataActionKinds | null; } export declare const DATA_PERMISSION_VALIDATION: (() => z.ZodObject<{ subjectType: z.ZodEnum<{ inst: "inst"; user: "user"; role: "role"; }>; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"data">; action: z.ZodNullable>; }, z.core.$strip>) & { cache: import("es-toolkit").MemoizeCache; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"data">; action: z.ZodNullable>; }, z.core.$strip>>; }; /** * Options for file permissions. * * @dochash types/permissions * @docname FilePermissionOptions */ export interface FilePermissionOptions { /** * The maximum allowed file size in bytes. * Defaults to Infinity. */ maxFileSizeInBytes?: number; /** * The list of allowed file MIME types. * If true, then all file types are allowed. * If an array of strings, then only MIME types that are specified are allowed. */ allowedMimeTypes?: true | string[]; } export declare const FILE_PERMISSION_OPTIONS_VALIDATION: (() => z.ZodObject<{ maxFileSizeInBytes: z.ZodOptional; allowedMimeTypes: z.ZodOptional, z.ZodArray]>>; }, z.core.$strip>) & { cache: import("es-toolkit").MemoizeCache; allowedMimeTypes: z.ZodOptional, z.ZodArray]>>; }, z.core.$strip>>; }; /** * Defines an interface that describes the common options for all permissions that affect file records. * * @dochash types/permissions * @docname FilePermission */ export interface FilePermission extends Permission { /** * The kind of the permission. */ resourceKind: 'file'; /** * The action th at is allowed. * If null, then all actions are allowed. */ action: FileActionKinds | null; /** * The options for the permission. */ options: FilePermissionOptions; } export declare const FILE_PERMISSION_VALIDATION: (() => z.ZodObject<{ subjectType: z.ZodEnum<{ inst: "inst"; user: "user"; role: "role"; }>; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"file">; action: z.ZodNullable>; options: z.ZodObject<{ maxFileSizeInBytes: z.ZodOptional; allowedMimeTypes: z.ZodOptional, z.ZodArray]>>; }, z.core.$strip>; }, z.core.$strip>) & { cache: import("es-toolkit").MemoizeCache; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"file">; action: z.ZodNullable>; options: z.ZodObject<{ maxFileSizeInBytes: z.ZodOptional; allowedMimeTypes: z.ZodOptional, z.ZodArray]>>; }, z.core.$strip>; }, z.core.$strip>>; }; /** * Defines an interface that describes the common options for all permissions that affect event records. * * @dochash types/permissions * @docname EventPermission */ export interface EventPermission extends Permission { /** * The kind of the permission. */ resourceKind: 'event'; /** * The action th at is allowed. * If null, then all actions are allowed. */ action: EventActionKinds | null; } export declare const EVENT_PERMISSION_VALIDATION: (() => z.ZodObject<{ subjectType: z.ZodEnum<{ inst: "inst"; user: "user"; role: "role"; }>; subjectId: z.ZodString; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"event">; resourceId: z.ZodNullable; action: z.ZodNullable>; }, z.core.$strip>) & { cache: import("es-toolkit").MemoizeCache; subjectId: z.ZodString; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"event">; resourceId: z.ZodNullable; action: z.ZodNullable>; }, z.core.$strip>>; }; /** * Defines an interface that describes the common options for all permissions that affect markers. * * @dochash types/permissions * @docname MarkerPermission */ export interface MarkerPermission extends Permission { /** * The kind of the permission. */ resourceKind: 'marker'; /** * The action th at is allowed. * If null, then all actions are allowed. */ action: MarkerActionKinds | null; } export declare const MARKER_PERMISSION_VALIDATION: (() => z.ZodObject<{ subjectType: z.ZodEnum<{ inst: "inst"; user: "user"; role: "role"; }>; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"marker">; action: z.ZodNullable>; }, z.core.$strip>) & { cache: import("es-toolkit").MemoizeCache; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"marker">; action: z.ZodNullable>; }, z.core.$strip>>; }; /** * Options for role permissions. * * @dochash types/permissions * @docname RolePermissionOptions */ export interface RolePermissionOptions { /** * The maximum lifetime that the role can be granted for in miliseconds. * If not specified, then the role can be granted for an infinite amount of time. */ maxDurationMs?: number; } export declare const ROLE_PERMISSION_OPTIONS_VALIDATION: (() => z.ZodObject<{ maxDurationMs: z.ZodOptional; }, z.core.$strip>) & { cache: import("es-toolkit").MemoizeCache; }, z.core.$strip>>; }; /** * Defines an interface that describes the common options for all permissions that affect roles. * * @dochash types/permissions * @docname RolePermission */ export interface RolePermission extends Permission { /** * The kind of the permission. */ resourceKind: 'role'; /** * The ID of the resource that is allowed. * If null, then all resources are allowed. */ resourceId: string | null; /** * The action th at is allowed. * If null, then all actions are allowed. */ action: RoleActionKinds | null; /** * The options for the permission. */ options: RolePermissionOptions; } export declare const ROLE_PERMISSION_VALIDATION: (() => z.ZodObject<{ subjectType: z.ZodEnum<{ inst: "inst"; user: "user"; role: "role"; }>; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"role">; action: z.ZodNullable>; options: z.ZodObject<{ maxDurationMs: z.ZodOptional; }, z.core.$strip>; }, z.core.$strip>) & { cache: import("es-toolkit").MemoizeCache; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"role">; action: z.ZodNullable>; options: z.ZodObject<{ maxDurationMs: z.ZodOptional; }, z.core.$strip>; }, z.core.$strip>>; }; /** * Defines an interface that describes common options for all permissions that affect insts. * * @dochash types/permissions * @docname InstPermission */ export interface InstPermission extends Permission { /** * The kind of the permission. */ resourceKind: 'inst'; /** * The ID of the resource that is allowed. * If null, then all resources are allowed. */ resourceId: string | null; /** * The action th at is allowed. * If null, then all actions are allowed. */ action: InstActionKinds | null; } export declare const INST_PERMISSION_VALIDATION: (() => z.ZodObject<{ subjectType: z.ZodEnum<{ inst: "inst"; user: "user"; role: "role"; }>; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"inst">; action: z.ZodNullable>; }, z.core.$strip>) & { cache: import("es-toolkit").MemoizeCache; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"inst">; action: z.ZodNullable>; }, z.core.$strip>>; }; /** * Defines an interface that describes common options for all permissions that affect loom resources. * * @dochash types/permissions * @docname LoomPermission */ export interface LoomPermission extends Permission { /** * The kind of the permission. */ resourceKind: 'loom'; /** * The action that is allowed. * If null, then all actions are allowed. */ action: LoomActionKinds | null; } export declare const LOOM_PERMISSION_VALIDATION: (() => z.ZodObject<{ subjectType: z.ZodEnum<{ inst: "inst"; user: "user"; role: "role"; }>; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"loom">; action: z.ZodNullable>; }, z.core.$strip>) & { cache: import("es-toolkit").MemoizeCache; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"loom">; action: z.ZodNullable>; }, z.core.$strip>>; }; /** * Defines an interface that describes common options for all permissions that affect ai.sloyd resources. * * @dochash types/permissions * @docname SloydPermission */ export interface SloydPermission extends Permission { /** * The kind of the permission. */ resourceKind: 'ai.sloyd'; /** * The action that is allowed. * If null, then all actions are allowed. */ action: SloydActionKinds | null; } export declare const SLOYD_PERMISSION_VALIDATION: (() => z.ZodObject<{ subjectType: z.ZodEnum<{ inst: "inst"; user: "user"; role: "role"; }>; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"ai.sloyd">; action: z.ZodNullable>; }, z.core.$strip>) & { cache: import("es-toolkit").MemoizeCache; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"ai.sloyd">; action: z.ZodNullable>; }, z.core.$strip>>; }; /** * Defines an interface that describes common options for all permissions that affect ai.hume resources. * * @dochash types/permissions * @docname HumePermission */ export interface HumePermission extends Permission { /** * The kind of the permission. */ resourceKind: 'ai.hume'; /** * The action that is allowed. * If null, then all actions are allowed. */ action: HumeActionKinds | null; } export declare const HUME_PERMISSION_VALIDATION: (() => z.ZodObject<{ subjectType: z.ZodEnum<{ inst: "inst"; user: "user"; role: "role"; }>; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"ai.hume">; action: z.ZodNullable>; }, z.core.$strip>) & { cache: import("es-toolkit").MemoizeCache; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"ai.hume">; action: z.ZodNullable>; }, z.core.$strip>>; }; /** * Defines an interface that describes common options for all permissions that affect ai.openai.realtime resources. * * @dochash types/permissions * @docname OpenAIRealtimePermission */ export interface OpenAIRealtimePermission extends Permission { /** * The kind of the permission. */ resourceKind: 'ai.openai.realtime'; /** * The action that is allowed. * If null, then all actions are allowed. */ action: OpenAIRealtimeActionKinds | null; } export declare const OPENAI_REALTIME_PERMISSION_VALIDATION: (() => z.ZodObject<{ subjectType: z.ZodEnum<{ inst: "inst"; user: "user"; role: "role"; }>; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"ai.openai.realtime">; action: z.ZodNullable>; }, z.core.$strip>) & { cache: import("es-toolkit").MemoizeCache; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"ai.openai.realtime">; action: z.ZodNullable>; }, z.core.$strip>>; }; /** * Defines an interface that describes common options for all permissions that affect ai.chat resources. * * @dochash types/permissions * @docname AIChatPermission */ export interface AIChatPermission extends Permission { /** * The kind of the permission. */ resourceKind: 'ai.chat'; /** * The action that is allowed. * If null, then all actions are allowed. */ action: AIChatActionKinds | null; } export declare const AI_CHAT_PERMISSION_VALIDATION: (() => z.ZodObject<{ subjectType: z.ZodEnum<{ inst: "inst"; user: "user"; role: "role"; }>; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"ai.chat">; action: z.ZodNullable>; }, z.core.$strip>) & { cache: import("es-toolkit").MemoizeCache; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"ai.chat">; action: z.ZodNullable>; }, z.core.$strip>>; }; /** * Defines an interface that describes common options for all permissions that affect ai.image resources. * * @dochash types/permissions * @docname AIImagePermission */ export interface AIImagePermission extends Permission { /** * The kind of the permission. */ resourceKind: 'ai.image'; /** * The action that is allowed. * If null, then all actions are allowed. */ action: AIImageActionKinds | null; } export declare const AI_IMAGE_PERMISSION_VALIDATION: (() => z.ZodObject<{ subjectType: z.ZodEnum<{ inst: "inst"; user: "user"; role: "role"; }>; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"ai.image">; action: z.ZodNullable>; }, z.core.$strip>) & { cache: import("es-toolkit").MemoizeCache; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"ai.image">; action: z.ZodNullable>; }, z.core.$strip>>; }; /** * Defines an interface that describes common options for all permissions that affect ai.skybox resources. * * @dochash types/permissions * @docname AISkyboxPermission */ export interface AISkyboxPermission extends Permission { /** * The kind of the permission. */ resourceKind: 'ai.skybox'; /** * The action that is allowed. * If null, then all actions are allowed. */ action: AISkyboxActionKinds | null; } export declare const AI_SKYBOX_PERMISSION_VALIDATION: (() => z.ZodObject<{ subjectType: z.ZodEnum<{ inst: "inst"; user: "user"; role: "role"; }>; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"ai.skybox">; action: z.ZodNullable>; }, z.core.$strip>) & { cache: import("es-toolkit").MemoizeCache; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"ai.skybox">; action: z.ZodNullable>; }, z.core.$strip>>; }; /** * Defines an interface that describes common options for all permissions that affect webhook resources. * * @dochash types/permissions * @docname WebhookPermission */ export interface WebhookPermission extends Permission { /** * The kind of the permission. */ resourceKind: 'webhook'; /** * The action that is allowed. * If null, then all actions are allowed. */ action: WebhookActionKinds | null; } export declare const WEBHOOK_PERMISSION_VALIDATION: (() => z.ZodObject<{ subjectType: z.ZodEnum<{ inst: "inst"; user: "user"; role: "role"; }>; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"webhook">; action: z.ZodNullable>; }, z.core.$strip>) & { cache: import("es-toolkit").MemoizeCache; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"webhook">; action: z.ZodNullable>; }, z.core.$strip>>; }; /** * Defines an interface that describes common options for all permissions that affect notification resources. * * @dochash types/permissions * @docname NotificationPermission */ export interface NotificationPermission extends Permission { /** * The kind of the permission. */ resourceKind: 'notification'; /** * The action that is allowed. * If null, then all actions are allowed. */ action: NotificationActionKinds | null; } export declare const NOTIFICATION_PERMISSION_VALIDATION: (() => z.ZodObject<{ subjectType: z.ZodEnum<{ inst: "inst"; user: "user"; role: "role"; }>; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"notification">; action: z.ZodNullable>; }, z.core.$strip>) & { cache: import("es-toolkit").MemoizeCache; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"notification">; action: z.ZodNullable>; }, z.core.$strip>>; }; /** * Defines an interface that describes common options for all permissions that affect package resources. * * @dochash types/permissions * @docname PackagePermission */ export interface PackagePermission extends Permission { /** * The kind of the permission. */ resourceKind: 'package'; /** * The action that is allowed. * If null, then all actions are allowed. */ action: PackageActionKinds | null; } export declare const PACKAGE_PERMISSION_VALIDATION: (() => z.ZodObject<{ subjectType: z.ZodEnum<{ inst: "inst"; user: "user"; role: "role"; }>; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"package">; action: z.ZodNullable>; }, z.core.$strip>) & { cache: import("es-toolkit").MemoizeCache; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"package">; action: z.ZodNullable>; }, z.core.$strip>>; }; /** * Defines an interface that describes common options for all permissions that affect package.version resources. * * @dochash types/permissions * @docname PackageVersionPermission */ export interface PackageVersionPermission extends Permission { /** * The kind of the permission. */ resourceKind: 'package.version'; /** * The action that is allowed. * If null, then all actions are allowed. */ action: PackageVersionActionKinds | null; } export declare const PACKAGE_VERSION_PERMISSION_VALIDATION: (() => z.ZodObject<{ subjectType: z.ZodEnum<{ inst: "inst"; user: "user"; role: "role"; }>; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"package.version">; action: z.ZodNullable>; }, z.core.$strip>) & { cache: import("es-toolkit").MemoizeCache; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"package.version">; action: z.ZodNullable>; }, z.core.$strip>>; }; /** * Defines an interface that describes common options for all permissions that affect search resources. * * @dochash types/permissions * @docname SearchPermission */ export interface SearchPermission extends Permission { /** * The kind of the permission. */ resourceKind: 'search'; /** * The action that is allowed. * If null, then all actions are allowed. */ action: SearchActionKinds | null; } export declare const SEARCH_PERMISSION_VALIDATION: (() => z.ZodObject<{ subjectType: z.ZodEnum<{ inst: "inst"; user: "user"; role: "role"; }>; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"search">; action: z.ZodNullable>; }, z.core.$strip>) & { cache: import("es-toolkit").MemoizeCache; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"search">; action: z.ZodNullable>; }, z.core.$strip>>; }; /** * Defines an interface that describes common options for all permissions that affect search resources. * * @dochash types/permissions * @docname DatabasePermission */ export interface DatabasePermission extends Permission { /** * The kind of the permission. */ resourceKind: 'database'; /** * The action that is allowed. * If null, then all actions are allowed. */ action: DatabaseActionKinds | null; } export declare const DATABASE_PERMISSION_VALIDATION: (() => z.ZodObject<{ subjectType: z.ZodEnum<{ inst: "inst"; user: "user"; role: "role"; }>; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"database">; action: z.ZodNullable>; }, z.core.$strip>) & { cache: import("es-toolkit").MemoizeCache; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"database">; action: z.ZodNullable>; }, z.core.$strip>>; }; /** * Defines an interface that describes common options for all purchasableItem permissions. * * @dochash types/permissions * @docname PurchasableItemPermission */ export interface PurchasableItemPermission extends Permission { /** * The kind of the permission. */ resourceKind: 'purchasableItem'; /** * The ID of the resource that is allowed. * If null, then all resources are allowed. */ resourceId: string | null; action: PurchasableItemActionKinds | null; } export declare const PURCHASABLE_ITEM_PERMISSION_VALIDATION: (() => z.ZodObject<{ subjectType: z.ZodEnum<{ inst: "inst"; user: "user"; role: "role"; }>; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"purchasableItem">; action: z.ZodNullable>; }, z.core.$strip>) & { cache: import("es-toolkit").MemoizeCache; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"purchasableItem">; action: z.ZodNullable>; }, z.core.$strip>>; }; /** * Defines an interface that describes common options for all contract permissions. * * @dochash types/permissions * @docname ContractPermission */ export interface ContractPermission extends Permission { /** * The kind of the permission. */ resourceKind: 'contract'; /** * The ID of the resource that is allowed. * If null, then all resources are allowed. */ resourceId: string | null; action: ContractActionKinds | null; } export declare const CONTRACT_PERMISSION_VALIDATION: (() => z.ZodObject<{ subjectType: z.ZodEnum<{ inst: "inst"; user: "user"; role: "role"; }>; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"contract">; action: z.ZodNullable>; }, z.core.$strip>) & { cache: import("es-toolkit").MemoizeCache; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"contract">; action: z.ZodNullable>; }, z.core.$strip>>; }; /** * Defines an interface that describes common options for all invoice permissions. * * @dochash types/permissions * @docname InvoicePermission */ export interface InvoicePermission extends Permission { /** * The kind of the permission. */ resourceKind: 'invoice'; /** * The ID of the resource that is allowed. * If null, then all resources are allowed. */ resourceId: string | null; action: InvoiceActionKinds | null; } export declare const INVOICE_PERMISSION_VALIDATION: (() => z.ZodObject<{ subjectType: z.ZodEnum<{ inst: "inst"; user: "user"; role: "role"; }>; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"invoice">; action: z.ZodNullable>; }, z.core.$strip>) & { cache: import("es-toolkit").MemoizeCache; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"invoice">; action: z.ZodNullable>; }, z.core.$strip>>; }; export declare const AVAILABLE_PERMISSIONS_VALIDATION: z.ZodDiscriminatedUnion<[z.ZodObject<{ subjectType: z.ZodEnum<{ inst: "inst"; user: "user"; role: "role"; }>; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"data">; action: z.ZodNullable>; }, z.core.$strip>, z.ZodObject<{ subjectType: z.ZodEnum<{ inst: "inst"; user: "user"; role: "role"; }>; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"file">; action: z.ZodNullable>; options: z.ZodObject<{ maxFileSizeInBytes: z.ZodOptional; allowedMimeTypes: z.ZodOptional, z.ZodArray]>>; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ subjectType: z.ZodEnum<{ inst: "inst"; user: "user"; role: "role"; }>; subjectId: z.ZodString; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"event">; resourceId: z.ZodNullable; action: z.ZodNullable>; }, z.core.$strip>, z.ZodObject<{ subjectType: z.ZodEnum<{ inst: "inst"; user: "user"; role: "role"; }>; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"marker">; action: z.ZodNullable>; }, z.core.$strip>, z.ZodObject<{ subjectType: z.ZodEnum<{ inst: "inst"; user: "user"; role: "role"; }>; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"role">; action: z.ZodNullable>; options: z.ZodObject<{ maxDurationMs: z.ZodOptional; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ subjectType: z.ZodEnum<{ inst: "inst"; user: "user"; role: "role"; }>; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"inst">; action: z.ZodNullable>; }, z.core.$strip>, z.ZodObject<{ subjectType: z.ZodEnum<{ inst: "inst"; user: "user"; role: "role"; }>; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"loom">; action: z.ZodNullable>; }, z.core.$strip>, z.ZodObject<{ subjectType: z.ZodEnum<{ inst: "inst"; user: "user"; role: "role"; }>; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"ai.sloyd">; action: z.ZodNullable>; }, z.core.$strip>, z.ZodObject<{ subjectType: z.ZodEnum<{ inst: "inst"; user: "user"; role: "role"; }>; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"ai.hume">; action: z.ZodNullable>; }, z.core.$strip>, z.ZodObject<{ subjectType: z.ZodEnum<{ inst: "inst"; user: "user"; role: "role"; }>; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"ai.openai.realtime">; action: z.ZodNullable>; }, z.core.$strip>, z.ZodObject<{ subjectType: z.ZodEnum<{ inst: "inst"; user: "user"; role: "role"; }>; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"ai.chat">; action: z.ZodNullable>; }, z.core.$strip>, z.ZodObject<{ subjectType: z.ZodEnum<{ inst: "inst"; user: "user"; role: "role"; }>; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"ai.image">; action: z.ZodNullable>; }, z.core.$strip>, z.ZodObject<{ subjectType: z.ZodEnum<{ inst: "inst"; user: "user"; role: "role"; }>; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"ai.skybox">; action: z.ZodNullable>; }, z.core.$strip>, z.ZodObject<{ subjectType: z.ZodEnum<{ inst: "inst"; user: "user"; role: "role"; }>; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"webhook">; action: z.ZodNullable>; }, z.core.$strip>, z.ZodObject<{ subjectType: z.ZodEnum<{ inst: "inst"; user: "user"; role: "role"; }>; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"notification">; action: z.ZodNullable>; }, z.core.$strip>, z.ZodObject<{ subjectType: z.ZodEnum<{ inst: "inst"; user: "user"; role: "role"; }>; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"package">; action: z.ZodNullable>; }, z.core.$strip>, z.ZodObject<{ subjectType: z.ZodEnum<{ inst: "inst"; user: "user"; role: "role"; }>; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"package.version">; action: z.ZodNullable>; }, z.core.$strip>, z.ZodObject<{ subjectType: z.ZodEnum<{ inst: "inst"; user: "user"; role: "role"; }>; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"search">; action: z.ZodNullable>; }, z.core.$strip>, z.ZodObject<{ subjectType: z.ZodEnum<{ inst: "inst"; user: "user"; role: "role"; }>; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"database">; action: z.ZodNullable>; }, z.core.$strip>, z.ZodObject<{ subjectType: z.ZodEnum<{ inst: "inst"; user: "user"; role: "role"; }>; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"purchasableItem">; action: z.ZodNullable>; }, z.core.$strip>, z.ZodObject<{ subjectType: z.ZodEnum<{ inst: "inst"; user: "user"; role: "role"; }>; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"contract">; action: z.ZodNullable>; }, z.core.$strip>, z.ZodObject<{ subjectType: z.ZodEnum<{ inst: "inst"; user: "user"; role: "role"; }>; subjectId: z.ZodString; resourceId: z.ZodOptional>; expireTimeMs: z.ZodNullable; marker: z.ZodOptional; resourceKind: z.ZodLiteral<"invoice">; action: z.ZodNullable>; }, z.core.$strip>], "resourceKind">; export type PermissionOptions = FilePermissionOptions | RolePermissionOptions; /** * The name of the admin role. */ export declare const ADMIN_ROLE_NAME = "admin"; /** * The name of the recordOwner role. */ export declare const RECORD_OWNER_ROLE_NAME = "recordOwner"; /** * The name of the "publicRead" resource marker. * Used by default for data, file, and event records. */ export declare const PUBLIC_READ_MARKER = "publicRead"; /** * The name of the "publicWrite" resource marker. * Used by default for public insts. */ export declare const PUBLIC_WRITE_MARKER = "publicWrite"; /** * The name of the "private" resource marker. * Used by default for private insts. */ export declare const PRIVATE_MARKER = "private"; /** * The name of the "account" resource marker. * Used by default for policy and role records. */ export declare const ACCOUNT_MARKER = "account"; //# sourceMappingURL=PolicyPermissions.d.ts.map