identity-provisioning/git-hub-deprovision-authority-port
@sarj-ai/workspace-sync/identity-provisioning/git-hub-deprovision-authority-port ยท Source
import { z } from "zod";import { GitHubLoginSchema, GitHubUserIdSchema } from "../catalog/identity-authority.ts";import type { GitHubDeprovisionAuthority } from "../github-access-audit/github-deprovision-authority-contract.ts";import { type ReadOnlyGitHubOrganizationPort } from "./github-organization-connector.ts";/** Adapts the minimal, complete deprovision inventory to one fail-closed account observation. */export declare class GitHubDeprovisionAuthorityPort implements ReadOnlyGitHubOrganizationPort { #private; readonly capability = "read-only"; constructor(snapshot: GitHubDeprovisionAuthority, rawConfig: { readonly organizationId: string; readonly organizationLogin: string; }); observeAccount(rawIdentity: { readonly githubLogin: z.output<typeof GitHubLoginSchema>; readonly githubUserId: z.output<typeof GitHubUserIdSchema>; readonly primaryEmail: string; }): Promise<Readonly<{ complete: true; directRepositoryGrants: readonly Readonly<{ githubLogin: string & z.$brand<"GitHubLogin">; githubUserId: string & z.$brand<"GitHubUserId">; customRoleName?: string | undefined; unresolvedDirectRole?: true | undefined; permission: "admin" | "maintain" | "pull" | "push" | "triage"; repositoryId: number & z.$brand<"GitHubRepositoryId">; repositoryName: string & z.$brand<"GitHubRepositoryName">; }>[]; identity: Readonly<{ githubLogin: string & z.$brand<"GitHubLogin">; githubUserId: string & z.$brand<"GitHubUserId">; }>; membership: Readonly<{ githubLogin: string & z.$brand<"GitHubLogin">; githubUserId: string & z.$brand<"GitHubUserId">; role: "member" | "owner"; }> | null; observedAt: string; outsideCollaborator: boolean; pendingInvitations: readonly Readonly<{ githubLogin: string & z.$brand<"GitHubLogin">; githubUserId: string & z.$brand<"GitHubUserId">; invitationId: number & z.$brand<"GitHubInvitationId">; role: "admin" | "billing_manager" | "direct_member"; }>[]; unresolvedInvitations?: "identity-or-privilege" | "opaque-direct" | undefined; repositoryInventoryComplete: boolean; samlLinked: boolean; teamMemberships: readonly Readonly<{ githubLogin: string & z.$brand<"GitHubLogin">; githubUserId: string & z.$brand<"GitHubUserId">; inherited: boolean; role: "maintainer" | "member"; state: "active" | "pending"; teamId: number & z.$brand<"GitHubTeamId">; teamSlug: string & z.$brand<"GitHubTeamSlug">; }>[]; }>>;}