maestro/src/bridge/a2a/oidc-provider-shim.d.ts
oss-sync b1292e34b2
Some checks failed
CI / build-and-test (push) Has been cancelled
sync: update from private repo (edc775f2)
2026-07-06 01:04:12 +00:00

34 lines
1.3 KiB
TypeScript

declare module 'oidc-provider' {
import type { IncomingMessage, ServerResponse } from 'http';
export interface InteractionDetails {
uid: string;
prompt: { name: string; [k: string]: unknown };
params: Record<string, unknown>;
session?: { accountId?: string };
grantId?: string;
}
export class Grant {
constructor(props: { accountId: string; clientId: string });
addOIDCScope(scope: string): void;
addResourceScope(resource: string, scope: string): void;
save(): Promise<string>;
}
export default class Provider {
constructor(issuer: string, configuration?: unknown);
proxy: boolean;
Grant: typeof Grant;
AccessToken: {
find(value: string, opts?: { ignoreExpiration?: boolean }): Promise<{
accountId?: string;
grantId?: string;
scope?: string;
aud?: string | string[];
} | undefined>;
};
callback(): (req: IncomingMessage, res: ServerResponse) => void;
interactionDetails(req: unknown, res: unknown): Promise<InteractionDetails>;
interactionResult(req: unknown, res: unknown, result: unknown, opts?: { mergeWithLastSubmission?: boolean }): Promise<string>;
interactionFinished(req: unknown, res: unknown, result: unknown, opts?: { mergeWithLastSubmission?: boolean }): Promise<void>;
}
}