Skip to content
Sarj Workspace Sync

workspace-directory/google-group-cleanup-sync

@sarj-ai/workspace-sync/workspace-directory/google-group-cleanup-sync ยท Source

import { z } from "zod";
import { type GoogleGroupSnapshot } from "../org-sync/channel-model.ts";
import type { GoogleDirectoryUser } from "../org-sync/model.ts";
export declare function isProtectedGoogleCleanupUser(user: GoogleDirectoryUser): boolean;
export declare const GoogleGroupCleanupActionSchema: z.ZodObject<{
authorityEmail: z.ZodOptional<z.ZodEmail>;
googleGroupEmail: z.ZodEmail;
googleGroupId: z.ZodString;
googleUserId: z.core.$ZodBranded<z.ZodString, "GoogleDirectoryUserId", "out">;
lifecycle: z.ZodEnum<{
archived: "archived";
deleted: "deleted";
suspended: "suspended";
}>;
memberEmail: z.ZodEmail;
memberId: z.core.$ZodBranded<z.ZodString, "GoogleDirectoryUserId", "out">;
role: z.ZodOptional<z.ZodEnum<{
MANAGER: "MANAGER";
OWNER: "OWNER";
}>>;
type: z.ZodLiteral<"remove-inactive-google-group-member">;
}, z.core.$strict>;
export type GoogleGroupCleanupAction = z.output<typeof GoogleGroupCleanupActionSchema>;
export declare const GoogleGroupCleanupWarningSchema: z.ZodObject<{
googleGroupEmail: z.ZodEmail;
googleGroupId: z.ZodString;
googleUserId: z.core.$ZodBranded<z.ZodString, "GoogleDirectoryUserId", "out">;
lifecycle: z.ZodEnum<{
archived: "archived";
deleted: "deleted";
suspended: "suspended";
}>;
memberEmail: z.ZodEmail;
memberId: z.core.$ZodBranded<z.ZodString, "GoogleDirectoryUserId", "out">;
role: z.ZodEnum<{
MANAGER: "MANAGER";
OWNER: "OWNER";
}>;
type: z.ZodLiteral<"inactive-privileged-member-manual-review">;
}, z.core.$strict>;
export type GoogleGroupCleanupWarning = z.output<typeof GoogleGroupCleanupWarningSchema>;
declare const ManagedGoogleGroupPinSchema: z.ZodObject<{
email: z.ZodEmail;
id: z.ZodString;
}, z.core.$strict>;
export declare const GoogleGroupCleanupPlanSchema: z.ZodObject<{
actions: z.ZodArray<z.ZodObject<{
authorityEmail: z.ZodOptional<z.ZodEmail>;
googleGroupEmail: z.ZodEmail;
googleGroupId: z.ZodString;
googleUserId: z.core.$ZodBranded<z.ZodString, "GoogleDirectoryUserId", "out">;
lifecycle: z.ZodEnum<{
archived: "archived";
deleted: "deleted";
suspended: "suspended";
}>;
memberEmail: z.ZodEmail;
memberId: z.core.$ZodBranded<z.ZodString, "GoogleDirectoryUserId", "out">;
role: z.ZodOptional<z.ZodEnum<{
MANAGER: "MANAGER";
OWNER: "OWNER";
}>>;
type: z.ZodLiteral<"remove-inactive-google-group-member">;
}, z.core.$strict>>;
excludedGoogleGroupIds: z.ZodArray<z.ZodString>;
excludedGoogleUserIds: z.ZodArray<z.core.$ZodBranded<z.ZodString, "GoogleDirectoryUserId", "out">>;
managedGoogleGroups: z.ZodArray<z.ZodObject<{
email: z.ZodEmail;
id: z.ZodString;
}, z.core.$strict>>;
planHash: z.ZodString;
warnings: z.ZodArray<z.ZodObject<{
googleGroupEmail: z.ZodEmail;
googleGroupId: z.ZodString;
googleUserId: z.core.$ZodBranded<z.ZodString, "GoogleDirectoryUserId", "out">;
lifecycle: z.ZodEnum<{
archived: "archived";
deleted: "deleted";
suspended: "suspended";
}>;
memberEmail: z.ZodEmail;
memberId: z.core.$ZodBranded<z.ZodString, "GoogleDirectoryUserId", "out">;
role: z.ZodEnum<{
MANAGER: "MANAGER";
OWNER: "OWNER";
}>;
type: z.ZodLiteral<"inactive-privileged-member-manual-review">;
}, z.core.$strict>>;
}, z.core.$strict>;
export type GoogleGroupCleanupPlan = z.output<typeof GoogleGroupCleanupPlanSchema>;
export declare function planGoogleGroupCleanup(input: {
readonly directoryUsers: readonly GoogleDirectoryUser[];
readonly excludedGoogleGroupIds?: readonly string[];
readonly excludedGoogleUserIds?: readonly string[];
readonly managedGoogleGroupPins: readonly z.input<typeof ManagedGoogleGroupPinSchema>[];
readonly managedGoogleGroups: readonly GoogleGroupSnapshot[];
}): Promise<GoogleGroupCleanupPlan>;
export {};