workspace-directory/sentry-workspace-sync
@sarj-ai/workspace-sync/workspace-directory/sentry-workspace-sync ยท Source
import { z } from "zod";import { type ISentryWorkspaceClient, type SentryWorkspaceSnapshot } from "./sentry-workspace-client.ts";export declare const SentryWorkspaceActionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ email: z.ZodEmail; memberId: z.ZodString; type: z.ZodLiteral<"remove-organization-member">;}, z.core.$strict>, z.ZodObject<{ email: z.ZodEmail; memberId: z.ZodString; type: z.ZodLiteral<"add-team-member">;}, z.core.$strict>, z.ZodObject<{ email: z.ZodEmail; type: z.ZodLiteral<"invite">;}, z.core.$strict>, z.ZodObject<{ email: z.ZodEmail; memberId: z.ZodString; type: z.ZodLiteral<"repair-pending-invite">;}, z.core.$strict>, z.ZodObject<{ email: z.ZodEmail; memberId: z.ZodString; type: z.ZodLiteral<"reinvite-expired">;}, z.core.$strict>], "type">;export type SentryWorkspaceAction = z.output<typeof SentryWorkspaceActionSchema>;export interface SentryWorkspacePlan { readonly actions: readonly SentryWorkspaceAction[]; readonly activeGoogleMembers: readonly string[];}export declare const AuditedSentryWorkspacePlanSchema: z.ZodObject<{ actions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{ email: z.ZodEmail; memberId: z.ZodString; type: z.ZodLiteral<"remove-organization-member">; }, z.core.$strict>, z.ZodObject<{ email: z.ZodEmail; memberId: z.ZodString; type: z.ZodLiteral<"add-team-member">; }, z.core.$strict>, z.ZodObject<{ email: z.ZodEmail; type: z.ZodLiteral<"invite">; }, z.core.$strict>, z.ZodObject<{ email: z.ZodEmail; memberId: z.ZodString; type: z.ZodLiteral<"repair-pending-invite">; }, z.core.$strict>, z.ZodObject<{ email: z.ZodEmail; memberId: z.ZodString; type: z.ZodLiteral<"reinvite-expired">; }, z.core.$strict>], "type">>; activeGoogleMembers: z.ZodArray<z.ZodEmail>; planHash: z.ZodString;}, z.core.$strict>;export type AuditedSentryWorkspacePlan = z.output<typeof AuditedSentryWorkspacePlanSchema>;export declare function planSentryWorkspaceSync(rawActiveGoogleMembers: readonly string[], snapshot: SentryWorkspaceSnapshot): SentryWorkspacePlan;export declare function auditSentryWorkspaceSync(activeGoogleMembers: readonly string[], client: ISentryWorkspaceClient): Promise<AuditedSentryWorkspacePlan>;export declare function isSentryWorkspaceActionConverged(client: ISentryWorkspaceClient, rawAction: SentryWorkspaceAction): Promise<boolean>;export declare function applySentryWorkspacePlanAction(activeGoogleMembers: readonly string[], client: ISentryWorkspaceClient, rawAction: SentryWorkspaceAction, expectedPlanHash: string, assertWriteAuthority: () => Promise<void>, assertTransportAuthority?: () => Promise<void>): Promise<void>;export declare function applySentryWorkspaceAction(client: ISentryWorkspaceClient, rawAction: SentryWorkspaceAction, assertWriteAuthority: () => Promise<void>, assertTransportAuthority?: () => Promise<void>): Promise<void>;export declare class SentryWorkspacePlanBoundError extends Error { constructor(bound: "action" | "authority", options?: ErrorOptions);}export declare class SentryWorkspaceDriftError extends Error { constructor();}export declare class SentryWorkspaceReadbackError extends Error { constructor(action: SentryWorkspaceAction["type"], options?: ErrorOptions);}export declare class SentryWorkspaceProjectTeamError extends Error { constructor();}