import { type CodexV6DeviceReleaseInput } from "./protocol.js"; import type { CodexAuthController } from "./oidc.js"; import { type CodexAdminAccountListResponse, type CodexAdminAccountRenewalInput, type CodexAdminAccountRenewalResponse, type CodexAdminAssignmentDeleteResponse, type CodexAdminAssignmentListResponse, type CodexAdminAssignmentMutationResponse, type CodexAccountListResponse, type CodexCredentialVersionListResponse, type CodexImportResult, type CodexLoginCredentialsResponse, type CodexManualRefreshResponse, type CodexUploadBatch, type CodexV3CredentialAssignmentListResponse, type CodexV3EnrollmentConfiguration, type CodexV3EnrollmentInput, type CodexV3EnrollmentResponse, type CodexV3FullCredentialDeliveryAckInput, type CodexV3FullCredentialDeliveryAckResponse, type CodexV3FullCredentialDeliveryRequest, type CodexV3FullCredentialDeliveryResponse, type CodexV3GenerationReportInput, type CodexV3GenerationReportResponse, type CodexV4AccessObservationInput, type CodexV4AccessObservationResponse, type CodexV5AcknowledgeDeviceSessionInput, type CodexV5AcknowledgeDeviceSessionResponse, type CodexV5CreateDeviceSessionInput, type CodexV5CreateDeviceSessionResponse, type CodexV5GenerationReportInput, type CodexV5GenerationReportResponse, type CodexV5HeartbeatDeviceSessionInput, type CodexV5HeartbeatDeviceSessionResponse, type CodexV5ReleaseDeviceSessionInput, type CodexV5ReleaseDeviceSessionResponse, type CodexV6AccountRequestListResponse, type CodexV6AdminAccountRequestListQuery, type CodexV6AccountRequestResponse, type CodexV6AdminReviewAccountRequestInput, type CodexV6AdminReplacementCandidateListResponse, type CodexV6AdminReplacementCandidateQuery, type CodexV6AcknowledgeFullCredentialDeliveryInput, type CodexV6AcknowledgeFullCredentialDeliveryResponse, type CodexV6AdminCreateDeviceBindingInput, type CodexV6AdminCreateDeviceBindingResponse, type CodexV6AdminReplaceDeviceTokenInput, type CodexV6AdminReplaceDeviceTokenResponse, type CodexV6DeviceBindingListResponse, type CodexV6FullCredentialDeliveryInput, type CodexV6FullCredentialDeliveryResponse, type CodexV6GenerationReportInput, type CodexV6GenerationReportResponse, type CodexV6CredentialHealthReportInput, type CodexV6CredentialHealthReportResponse, type CodexV6ReconcileDeviceAccessInput, type CodexV6ReconcileDeviceAccessResponse, type CodexTokenPoolV4AssignmentTarget, type CodexTokenPoolV4DirectoryResolveResponse, type CodexTokenPoolV4EnrollmentConfiguration, type CodexTokenPoolV4UploadInput, type CodexTokenPoolV4UploadResponse } from "./protocol.js"; import type { ResolvedCodexConfig } from "./types.js"; export declare function normalizeCodexServiceUrl(rawUrl: string, allowInsecureHttp?: boolean): string; export declare class CodexServiceClient { private readonly config; private readonly auth; private readonly fetchImpl; private readonly baseUrl; get serviceUrl(): string; constructor(config: ResolvedCodexConfig, auth: CodexAuthController, fetchImpl?: typeof fetch); getCurrentActorSubject(): Promise; private request; listAccounts(): Promise; getV3EnrollmentConfiguration(): Promise; getTokenPoolV4EnrollmentConfiguration(): Promise; resolveTokenPoolV4DirectoryUser(principal: string): Promise; createTokenPoolV4Upload(input: CodexTokenPoolV4UploadInput, idempotencyKey: string, expectedUserSubject?: string): Promise; resolveTokenPoolV4Upload(clientRequestId: string, target: CodexTokenPoolV4AssignmentTarget, expectedUserSubject?: string): Promise; private requireTokenPoolV4Upload; createV3Enrollment(input: CodexV3EnrollmentInput, idempotencyKey: string): Promise; resolveV3Enrollment(clientRequestId: string): Promise; private requireV3Enrollment; listV3CredentialAssignments(): Promise; createV3FullCredentialDelivery(assignmentId: string, input: CodexV3FullCredentialDeliveryRequest, idempotencyKey: string): Promise; resolveV3FullCredentialDelivery(assignmentId: string, clientRequestId: string): Promise; private requireV3Delivery; acknowledgeV3FullCredentialDelivery(deliveryId: string, input: CodexV3FullCredentialDeliveryAckInput, idempotencyKey: string): Promise; reportV3Generation(lineageId: string, input: CodexV3GenerationReportInput, idempotencyKey: string): Promise; resolveV3GenerationReport(lineageId: string, expected: Pick): Promise; createV5DeviceSession(assignmentId: string, input: CodexV5CreateDeviceSessionInput, idempotencyKey: string): Promise; resolveV5DeviceSession(assignmentId: string, clientRequestId: string, installationId: string): Promise; private requireV5Session; acknowledgeV5DeviceSession(sessionId: string, input: CodexV5AcknowledgeDeviceSessionInput, idempotencyKey: string): Promise; heartbeatV5DeviceSession(sessionId: string, input: CodexV5HeartbeatDeviceSessionInput): Promise; releaseV5DeviceSession(sessionId: string, input: CodexV5ReleaseDeviceSessionInput, idempotencyKey: string): Promise; reportV5Generation(lineageId: string, input: CodexV5GenerationReportInput, idempotencyKey: string): Promise; listV6AccountRequests(): Promise; getV6AccountRequest(requestId: string): Promise; listV6AdminAccountRequests(query?: CodexV6AdminAccountRequestListQuery): Promise; getV6AdminAccountRequest(requestId: string): Promise; listV6AdminReplacementCandidates(query: CodexV6AdminReplacementCandidateQuery): Promise; reviewV6AdminAccountRequest(requestId: string, input: CodexV6AdminReviewAccountRequestInput, idempotencyKey: string): Promise; listV6DeviceBindings(requestId: string): Promise; reconcileV6DeviceAccess(input: CodexV6ReconcileDeviceAccessInput, idempotencyKey: string): Promise; createV6AdminDeviceBinding(requestId: string, input: CodexV6AdminCreateDeviceBindingInput, idempotencyKey: string): Promise; replaceV6AdminDeviceToken(requestId: string, bindingId: string, input: CodexV6AdminReplaceDeviceTokenInput, idempotencyKey: string): Promise; listV6AdminDeviceBindings(requestId: string): Promise; createV6FullCredentialDelivery(bindingId: string, input: CodexV6FullCredentialDeliveryInput, idempotencyKey: string): Promise; resolveV6FullCredentialDelivery(bindingId: string, clientRequestId: string, installationId: string): Promise; private requireV6FullDelivery; prepareV6DeviceRelease(bindingId: string, input: CodexV6DeviceReleaseInput, key: string): Promise<{ schemaVersion: 6; replayed: boolean; release: { id: string; clientRequestId: string; bindingId: string; installationId: string; credentialLineageId: string; generationVersion: number; status: "PREPARED" | "RELEASED"; preparedAt: string; releasedAt: string | null; }; }>; acknowledgeV6DeviceRelease(bindingId: string, releaseId: string, input: CodexV6DeviceReleaseInput & { localCleanupCompleted: true; }, key: string): Promise<{ schemaVersion: 6; replayed: boolean; release: { id: string; clientRequestId: string; bindingId: string; installationId: string; credentialLineageId: string; generationVersion: number; status: "PREPARED" | "RELEASED"; preparedAt: string; releasedAt: string | null; }; }>; private v6DeviceReleaseRequest; returnV6DeviceTokenToPool(bindingId: string, input: { schemaVersion: 6; clientRequestId: string; }, key: string): Promise<{ schemaVersion: 6; bindingId: string; poolEntryId: string; status: "UNASSIGNED"; replayed: boolean; }>; acknowledgeV6FullCredentialDelivery(deliveryId: string, input: CodexV6AcknowledgeFullCredentialDeliveryInput, idempotencyKey: string): Promise; reportV6Generation(bindingId: string, input: CodexV6GenerationReportInput, idempotencyKey: string): Promise; resolveV6GenerationReport(bindingId: string, expected: Pick): Promise; private requireV6Report; reportV6CredentialHealth(bindingId: string, input: CodexV6CredentialHealthReportInput, idempotencyKey: string): Promise; observeV4AccessToken(lineageId: string, input: CodexV4AccessObservationInput): Promise; private requireV3Report; getLoginCredentials(accountId: string): Promise; uploadAccounts(payload: CodexUploadBatch): Promise; listAdminAccounts(): Promise; listCredentialVersions(accountId: string): Promise; refreshAdminAccount(accountId: string): Promise; renewAdminAccount(accountId: string, input: CodexAdminAccountRenewalInput, idempotencyKey: string): Promise; listAdminAssignments(): Promise; bindAdminAssignment(input: { accountId: string; userSubject: string; isDefault: boolean; }): Promise; unbindAdminAssignment(assignmentId: string): Promise; } export declare function codexImportRequestTimeoutMs(baseTimeoutMs: number, accountCount: number): number;