forked from farhoodlabs/paperclip
Add browser-based board CLI auth flow
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -52,6 +52,28 @@ export const claimJoinRequestApiKeySchema = z.object({
|
||||
|
||||
export type ClaimJoinRequestApiKey = z.infer<typeof claimJoinRequestApiKeySchema>;
|
||||
|
||||
export const boardCliAuthAccessLevelSchema = z.enum([
|
||||
"board",
|
||||
"instance_admin_required",
|
||||
]);
|
||||
|
||||
export type BoardCliAuthAccessLevel = z.infer<typeof boardCliAuthAccessLevelSchema>;
|
||||
|
||||
export const createCliAuthChallengeSchema = z.object({
|
||||
command: z.string().min(1).max(240),
|
||||
clientName: z.string().max(120).optional().nullable(),
|
||||
requestedAccess: boardCliAuthAccessLevelSchema.default("board"),
|
||||
requestedCompanyId: z.string().uuid().optional().nullable(),
|
||||
});
|
||||
|
||||
export type CreateCliAuthChallenge = z.infer<typeof createCliAuthChallengeSchema>;
|
||||
|
||||
export const resolveCliAuthChallengeSchema = z.object({
|
||||
token: z.string().min(16).max(256),
|
||||
});
|
||||
|
||||
export type ResolveCliAuthChallenge = z.infer<typeof resolveCliAuthChallengeSchema>;
|
||||
|
||||
export const updateMemberPermissionsSchema = z.object({
|
||||
grants: z.array(
|
||||
z.object({
|
||||
|
||||
Reference in New Issue
Block a user