Skip to content
Sarj Workspace Sync

execution/sentry-deprovision

@sarj-ai/workspace-sync/execution/sentry-deprovision ยท Source

import { z } from "zod";
import type { IGoogleDirectoryClient } from "../org-sync/google-directory-client.ts";
import { type ISentryWorkspaceClient } from "../workspace-directory/sentry-workspace-client.ts";
import type { ReviewedActionState } from "./reviewed-action-context.ts";
import type { ReviewedSentryWorkspace } from "./reviewed-sentry-workspace.ts";
export interface SentryDeprovisionPorts {
directory: Required<Pick<IGoogleDirectoryClient, "getUserById" | "listAllUsers" | "listDeletedUsers">>;
sentry: ISentryWorkspaceClient;
}
export declare function captureSentryDeprovisionPlan(ports: SentryDeprovisionPorts): Promise<{
authorityFingerprint: string;
googleIdentities: {
email: string;
googleUserId: string & z.$brand<"GoogleUserId">;
}[];
providerAuthority: {
actor: {
id: string;
orgRole: "admin" | "billing" | "manager" | "member" | "owner";
role: "admin" | "billing" | "manager" | "member" | "owner";
scopes: string[];
teamRole: "admin" | "contributor" | null;
};
organization: {
id: string;
slug: string;
};
project: {
id: string;
slug: string;
};
mode: "audit";
team: {
id: string;
slug: string;
};
writes: 0;
};
plan: {
actions: ({
email: string;
memberId: string;
type: "remove-organization-member";
} | {
email: string;
memberId: string;
type: "add-team-member";
} | {
email: string;
type: "invite";
} | {
email: string;
memberId: string;
type: "repair-pending-invite";
} | {
email: string;
memberId: string;
type: "reinvite-expired";
})[];
activeGoogleMembers: string[];
planHash: string;
};
} | null>;
export declare function readSentryDeprovision(ports: SentryDeprovisionPorts, reviewed: ReviewedSentryWorkspace): Promise<ReviewedActionState>;
export declare function applySentryDeprovision(ports: SentryDeprovisionPorts, reviewed: ReviewedSentryWorkspace, assertWriteAuthority: () => Promise<void>, assertFreshPlan: () => void): Promise<void>;