/** * One metadata row as dehydrated onto the wire. * * `Value` is a string regardless of `Type`: the column stores text and `Type` * says how to read it. A client that wants the decoded value decodes it itself. */ export declare const UserMetadataEntrySchema: { $schema: string; title: string; type: string; properties: { Id: { type: string; }; Key: { type: string; }; Type: { type: string; enum: string[]; }; Value: { type: string; nullable: boolean; }; }; }; /** `IUserWithGrants` — the payload a completed login or 2FA verification returns. */ export declare const UserWithGrantsSchema: { $schema: string; title: string; type: string; properties: { Uuid: { readonly type: 'string'; }; Email: { readonly type: 'string'; readonly format: 'email'; }; Login: { readonly type: 'string'; }; Role: { readonly type: 'array'; readonly items: { readonly type: 'string'; }; readonly description: 'Every role assigned to the user — the set /auth/active-role may switch between'; }; IsActive: { readonly type: 'integer'; readonly description: '1 when the account is active'; }; CreatedAt: { readonly type: 'string'; readonly format: 'date-time'; }; RegisteredAt: { readonly type: 'string'; readonly format: 'date-time'; readonly nullable: true; }; DeletedAt: { readonly type: 'string'; readonly format: 'date-time'; readonly nullable: true; }; LastLoginAt: { readonly type: 'string'; readonly format: 'date-time'; readonly nullable: true; }; Metadata: { readonly type: 'array'; readonly items: { readonly description: 'IUserMetadataEntry'; }; }; ActiveRole: { type: string; description: string; }; Grants: { readonly type: 'object'; readonly description: string; readonly properties: { readonly $extend: { readonly type: 'array'; readonly items: { readonly type: 'string'; }; readonly description: 'Roles this one inherits from. Sits alongside the resources, and is not one.'; }; }; readonly additionalProperties: { readonly type: 'object'; readonly description: "One resource's permissions, keyed 'action:possession' (e.g. 'read:any')"; readonly additionalProperties: { readonly type: 'array'; readonly items: { readonly type: 'string'; }; }; }; }; }; required: string[]; }; /** * `ITwoFactorAuthRequired` — password accepted, TOTP still owed. * * The flag is a plain boolean, not `const: true`. A single-value const becomes a * one-member enum in the emitted spec, and an enum inside a `oneOf` arm is what * makes generators reach for `Union["TheKey"]` — a key only one arm has. The * discriminator is which key is PRESENT, which `required` already states. */ export declare const TwoFactorAuthRequiredSchema: { $schema: string; title: string; type: string; properties: { TwoFactorAuthRequired: { type: string; description: string; }; }; required: string[]; }; /** `ITwoFactorInitRequired` — password accepted, enrolment owed before TOTP. */ export declare const TwoFactorInitRequiredSchema: { $schema: string; title: string; type: string; properties: { TwoFactorInitRequired: { type: string; description: string; }; }; required: string[]; }; /** * `ILoginResponse` — the three shapes `/auth/login` can answer with. * * A discriminated union rather than one object with everything optional: the * caller branches on which key is present, and a schema that makes all of them * optional would validate a response carrying none. */ export declare const LoginResponseSchema: { $schema: string; title: string; oneOf: ({ $schema: string; title: string; type: string; properties: { Uuid: { readonly type: 'string'; }; Email: { readonly type: 'string'; readonly format: 'email'; }; Login: { readonly type: 'string'; }; Role: { readonly type: 'array'; readonly items: { readonly type: 'string'; }; readonly description: 'Every role assigned to the user — the set /auth/active-role may switch between'; }; IsActive: { readonly type: 'integer'; readonly description: '1 when the account is active'; }; CreatedAt: { readonly type: 'string'; readonly format: 'date-time'; }; RegisteredAt: { readonly type: 'string'; readonly format: 'date-time'; readonly nullable: true; }; DeletedAt: { readonly type: 'string'; readonly format: 'date-time'; readonly nullable: true; }; LastLoginAt: { readonly type: 'string'; readonly format: 'date-time'; readonly nullable: true; }; Metadata: { readonly type: 'array'; readonly items: { readonly description: 'IUserMetadataEntry'; }; }; ActiveRole: { type: string; description: string; }; Grants: { readonly type: 'object'; readonly description: string; readonly properties: { readonly $extend: { readonly type: 'array'; readonly items: { readonly type: 'string'; }; readonly description: 'Roles this one inherits from. Sits alongside the resources, and is not one.'; }; }; readonly additionalProperties: { readonly type: 'object'; readonly description: "One resource's permissions, keyed 'action:possession' (e.g. 'read:any')"; readonly additionalProperties: { readonly type: 'array'; readonly items: { readonly type: 'string'; }; }; }; }; }; required: string[]; } | { $schema: string; title: string; type: string; properties: { TwoFactorAuthRequired: { type: string; description: string; }; }; required: string[]; } | { $schema: string; title: string; type: string; properties: { TwoFactorInitRequired: { type: string; description: string; }; }; required: string[]; })[]; }; /** `IActiveRoleResponse` — what both `/auth/active-role` operations answer with. */ export declare const ActiveRoleResponseSchema: { $schema: string; title: string; type: string; properties: { ActiveRole: { type: string; description: string; }; Grants: { readonly type: 'object'; readonly description: string; readonly properties: { readonly $extend: { readonly type: 'array'; readonly items: { readonly type: 'string'; }; readonly description: 'Roles this one inherits from. Sits alongside the resources, and is not one.'; }; }; readonly additionalProperties: { readonly type: 'object'; readonly description: "One resource's permissions, keyed 'action:possession' (e.g. 'read:any')"; readonly additionalProperties: { readonly type: 'array'; readonly items: { readonly type: 'string'; }; }; }; }; }; }; /** * `IWhoamiResponse` — `/auth/whoami`. * * The user's own columns plus the two fields the session contributes. It is NOT * the `User` ORM model, which is what this endpoint used to be documented as: * that model knows nothing of `ActiveRole` or `Authorized` — the two fields a * client needs most here — and does carry `Password`. */ export declare const WhoamiResponseSchema: { $schema: string; title: string; type: string; properties: { Uuid: { readonly type: 'string'; }; Email: { readonly type: 'string'; readonly format: 'email'; }; Login: { readonly type: 'string'; }; Role: { readonly type: 'array'; readonly items: { readonly type: 'string'; }; readonly description: 'Every role assigned to the user — the set /auth/active-role may switch between'; }; IsActive: { readonly type: 'integer'; readonly description: '1 when the account is active'; }; CreatedAt: { readonly type: 'string'; readonly format: 'date-time'; }; RegisteredAt: { readonly type: 'string'; readonly format: 'date-time'; readonly nullable: true; }; DeletedAt: { readonly type: 'string'; readonly format: 'date-time'; readonly nullable: true; }; LastLoginAt: { readonly type: 'string'; readonly format: 'date-time'; readonly nullable: true; }; Metadata: { readonly type: 'array'; readonly items: { readonly description: 'IUserMetadataEntry'; }; }; ActiveRole: { type: string; description: string; }; Authorized: { type: string; description: string; }; }; required: string[]; }; /** `IEnable2faResponse` — the OTP provisioning URI from `/auth/2fa/setup`. */ export declare const Enable2faResponseSchema: { $schema: string; title: string; type: string; properties: { otp: { type: string; description: string; }; }; }; //# sourceMappingURL=auth-responses.d.ts.map