import { ct as CredentialInstanceId, dt as CredentialMaterialSourceKind, gt as CredentialSetupStatus, pt as CredentialRequirement, st as CredentialHealth, yt as CredentialTypeId } from "./ItemsInputNormalizer-CFkfNMLt.js";

//#region src/application/contracts/CredentialContractsRegistry.d.ts
type CredentialInstanceDto = Readonly<{
  instanceId: CredentialInstanceId;
  typeId: CredentialTypeId;
  displayName: string;
  sourceKind: CredentialMaterialSourceKind;
  publicConfig: Readonly<Record<string, unknown>>;
  tags: ReadonlyArray<string>;
  setupStatus: CredentialSetupStatus;
  createdAt: string;
  updatedAt: string;
  latestHealth?: CredentialHealth;
  oauth2Connection?: CredentialOAuth2ConnectionDto;
}>;
type CredentialOAuth2ConnectionDto = Readonly<{
  status: "connected" | "disconnected";
  providerId: string;
  connectedEmail?: string;
  connectedAt?: string;
  scopes: ReadonlyArray<string>;
  updatedAt?: string;
}>;
type CredentialInstanceWithSecretsDto = CredentialInstanceDto & Readonly<{
  secretConfig?: Readonly<Record<string, string>>;
  envSecretRefs?: Readonly<Record<string, string>>;
}>;
type WorkflowCredentialHealthSlotDto = Readonly<{
  workflowId: string;
  nodeId: string;
  nodeName?: string;
  requirement: CredentialRequirement;
  instance?: Pick<CredentialInstanceDto, "instanceId" | "typeId" | "displayName" | "setupStatus">;
  health: Readonly<{
    status: "unbound" | "optional-unbound" | "unknown" | "healthy" | "failing";
    message?: string;
    testedAt?: string;
  }>;
}>;
type WorkflowCredentialHealthDto = Readonly<{
  workflowId: string;
  slots: ReadonlyArray<WorkflowCredentialHealthSlotDto>;
}>;
type CreateCredentialInstanceRequest = Readonly<{
  typeId: CredentialTypeId;
  displayName: string;
  sourceKind: CredentialMaterialSourceKind;
  publicConfig?: Readonly<Record<string, unknown>>;
  secretConfig?: Readonly<Record<string, unknown>>;
  envSecretRefs?: Readonly<Record<string, string>>;
  tags?: ReadonlyArray<string>;
}>;
type UpdateCredentialInstanceRequest = Readonly<{
  displayName?: string;
  publicConfig?: Readonly<Record<string, unknown>>;
  secretConfig?: Readonly<Record<string, unknown>>;
  envSecretRefs?: Readonly<Record<string, string>>;
  tags?: ReadonlyArray<string>;
  setupStatus?: CredentialSetupStatus;
}>;
type UpsertCredentialBindingRequest = Readonly<{
  workflowId: string;
  nodeId: string;
  slotKey: string;
  instanceId: CredentialInstanceId;
}>;
type AppGalleryEntry = Readonly<{
  mcpId: string;
  displayName: string;
  description: string;
  iconUrl: string | null;
  acceptedCredentialTypes: ReadonlyArray<string>;
  primaryOAuthTypeId: string | null;
  instances: ReadonlyArray<CredentialInstanceDto>;
}>;
type AppsResponse = Readonly<{
  apps: ReadonlyArray<AppGalleryEntry>;
  customInstances: ReadonlyArray<CredentialInstanceDto>;
}>;
//#endregion
export { CredentialInstanceWithSecretsDto as a, UpsertCredentialBindingRequest as c, CredentialInstanceDto as i, WorkflowCredentialHealthDto as l, AppsResponse as n, CredentialOAuth2ConnectionDto as o, CreateCredentialInstanceRequest as r, UpdateCredentialInstanceRequest as s, AppGalleryEntry as t, WorkflowCredentialHealthSlotDto as u };
//# sourceMappingURL=CredentialContractsRegistry-Dgu-rEXi.d.ts.map