import * as z from 'zod'; import { type RawPrincipal } from '../../schemas/principal'; import { type RawUserId, type Timestamp, type UserId } from '../../schemas/satellite'; /** * @see AccessKeyScope */ export declare const AccessKeyScopeSchema: z.ZodEnum<{ write: "write"; admin: "admin"; submit: "submit"; }>; /** * Represents the permission scope of an access key. */ export type AccessKeyScope = z.infer; /** * @see AccessKeyKind */ export declare const AccessKeyKindSchema: z.ZodEnum<{ automation: "automation"; emulator: "emulator"; }>; /** * Represents a specific kind of access key. Meant for informational purposes. */ export type AccessKeyKind = z.infer; /** * @see MetadataSchema */ export declare const MetadataSchema: z.ZodTuple<[z.ZodString, z.ZodString], null>; /** * Represents a single metadata entry as a key-value tuple. */ export type Metadata = z.infer; /** * @see AccessKeySchema */ export declare const AccessKeySchema: z.ZodObject<{ metadata: z.ZodArray>; created_at: z.ZodBigInt; updated_at: z.ZodBigInt; expires_at: z.ZodOptional; scope: z.ZodEnum<{ write: "write"; admin: "admin"; submit: "submit"; }>; kind: z.ZodOptional>; }, z.core.$strict>; /** * Represents an access key with access scope and associated metadata. */ export interface AccessKey { /** * A list of key-value metadata pairs associated with the access key. */ metadata: Metadata[]; /** * The timestamp when the access key was created. */ created_at: Timestamp; /** * The timestamp when the access key was last updated. */ updated_at: Timestamp; /** * Optional expiration timestamp for the access key. */ expires_at?: Timestamp; /** * The scope assigned to the access key. */ scope: AccessKeyScope; /** * An optional kind identifier of the access key. */ kind?: AccessKeyKind; } /** * @see AccessKeyRecordSchema */ export declare const AccessKeyRecordSchema: z.ZodTuple<[z.ZodCustom, Uint8Array>, z.ZodObject<{ metadata: z.ZodArray>; created_at: z.ZodBigInt; updated_at: z.ZodBigInt; expires_at: z.ZodOptional; scope: z.ZodEnum<{ write: "write"; admin: "admin"; submit: "submit"; }>; kind: z.ZodOptional>; }, z.core.$strict>], null>; /** * Represents a tuple containing the principal ID and associated access key data. */ export type AccessKeyRecord = z.infer; /** * @see AccessKeysSchema */ export declare const AccessKeysSchema: z.ZodArray, Uint8Array>, z.ZodObject<{ metadata: z.ZodArray>; created_at: z.ZodBigInt; updated_at: z.ZodBigInt; expires_at: z.ZodOptional; scope: z.ZodEnum<{ write: "write"; admin: "admin"; submit: "submit"; }>; kind: z.ZodOptional>; }, z.core.$strict>], null>>; /** * Represents a list of access keys. */ export type AccessKeys = [RawPrincipal, AccessKey][]; /** * @see AccessKeyCheckParamsSchema */ export declare const AccessKeyCheckParamsSchema: z.ZodObject<{ id: z.ZodUnion<[z.ZodCustom, Uint8Array>, z.ZodPipe, z.ZodTransform>]>; accessKeys: z.ZodArray, Uint8Array>, z.ZodObject<{ metadata: z.ZodArray>; created_at: z.ZodBigInt; updated_at: z.ZodBigInt; expires_at: z.ZodOptional; scope: z.ZodEnum<{ write: "write"; admin: "admin"; submit: "submit"; }>; kind: z.ZodOptional>; }, z.core.$strict>], null>>; }, z.core.$strip>; /** * Represents the parameters required to perform an access key checks. */ export interface AccessKeyCheckParams { /** * The identity to verify against the access keys. */ id: RawUserId | UserId; /** * The list of access keys to check against. */ accessKeys: AccessKeys; }