@splitin/verification-server 0.1.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/NOTICE +32 -0
- package/README.md +28 -0
- package/dist/express.cjs +721 -0
- package/dist/express.cjs.map +1 -0
- package/dist/express.d.cts +30 -0
- package/dist/express.d.ts +30 -0
- package/dist/express.d.ts.map +1 -0
- package/dist/express.js +717 -0
- package/dist/express.js.map +1 -0
- package/dist/hono.cjs +679 -0
- package/dist/hono.cjs.map +1 -0
- package/dist/hono.d.cts +21 -0
- package/dist/hono.d.ts +21 -0
- package/dist/hono.d.ts.map +1 -0
- package/dist/hono.js +676 -0
- package/dist/hono.js.map +1 -0
- package/dist/index.cjs +1009 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +42 -0
- package/dist/index.d.ts +42 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +996 -0
- package/dist/index.js.map +1 -0
- package/dist/supabase.cjs +678 -0
- package/dist/supabase.cjs.map +1 -0
- package/dist/supabase.d.cts +19 -0
- package/dist/supabase.d.ts +19 -0
- package/dist/supabase.d.ts.map +1 -0
- package/dist/supabase.js +676 -0
- package/dist/supabase.js.map +1 -0
- package/dist/types-MNGUwN4G.d.cts +231 -0
- package/dist/types-MNGUwN4G.d.ts +231 -0
- package/dist/types-MNGUwN4G.d.ts.map +1 -0
- package/openapi/openapi.v1.json +2876 -0
- package/package.json +69 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/errors.ts","../src/auth.ts","../src/catalog.ts","../src/types.ts","../src/json.ts","../src/handler.ts","../src/supabase.ts"],"names":[],"mappings":";;;AAyBO,IAAM,qBAAA,GAAN,cAAoC,KAAA,CAAM;AAAA,EAC/C,WAAA,CACW,MAAA,EACA,IAAA,EACT,OAAA,EACS,oBAAmC,IAAA,EAC5C;AACA,IAAA,KAAA,CAAM,OAAO,CAAA;AALJ,IAAA,I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AO,UAAU,QAAA,IAAY,KAAA,KAAU,QAAQ,CAAC,KAAA,CAAM,QAAQ,KAAK,CAAA;AAC5E;AAEA,SAAS,WAAA,CAAY,QAAqF,GAAA,EAA4B;AACpI,EAAA,MAAM,KAAA,GAAQ,SAAS,GAAG,CAAA;AAC1B,EAAA,OAAO,OAAO,KAAA,KAAU,QAAA,GAAW,KAAA,GAAQ,IAAA;AAC7C;;;ACrXO,SAAS,iCAAA,CACd,UACA,OAAA,EACyC;AACzC,EAAA,OAAO,+BAA+B,QAAA,EAAU;AAAA,IAC9C,gBAAgB,OAAA,CAAQ,cAAA;AAAA,IACxB,uBAAuB,OAAA,CAAQ,qBAAA;AAAA,IAC/B,UAAU,OAAA,CAAQ,QAAA;AAAA,IAClB,cAAc,OAAA,CAAQ,YAAA;AAAA,IACtB,aAAa,OAAA,CAAQ,WAAA;AAAA,IACrB,WAAW,OAAA,CAAQ,SAAA;AAAA,IACnB,YAAA,EAAc,OAAO,OAAA,KAAY;AAC/B,MAAA,MAAM,IAAA,GAAO,MAAM,OAAA,CAAQ,OAAA,CAAQ,OAAO,CAAA;AAC1C,MAAA,OAAO,OAAA,CAAQ,YAAA,CAAa,OAAA,EAAS,IAAI,CAAA;AAAA,IAC3C;AAAA,GACD,CAAA;AACH","file":"supabase.js","sourcesContent":["import { ProviderError, toSafeProviderFailure } from '@splitin/verification-adapter-sdk';\n\nexport const API_ERROR_CODES = [\n 'UNAUTHENTICATED',\n 'FORBIDDEN',\n 'CSRF_REJECTED',\n 'ORIGIN_NOT_ALLOWED',\n 'IDEMPOTENCY_KEY_REQUIRED',\n 'INVALID_IDEMPOTENCY_KEY',\n 'INVALID_REQUEST',\n 'UNSUPPORTED_REQUEST_FIELD',\n 'INVALID_JSON',\n 'PAYLOAD_TOO_LARGE',\n 'NOT_FOUND',\n 'METHOD_NOT_ALLOWED',\n 'CONFLICT',\n 'SEPARATION_OF_DUTIES',\n 'RATE_LIMITED',\n 'PROVIDER_UNAVAILABLE',\n 'VERIFICATION_REQUIRED',\n 'INTERNAL_ERROR',\n] as const;\n\nexport type ApiErrorCode = (typeof API_ERROR_CODES)[number];\n\nexport class VerificationHttpError extends Error {\n constructor(\n readonly status: number,\n readonly code: ApiErrorCode | string,\n message: string,\n readonly retryAfterSeconds: number | null = null,\n ) {\n super(message);\n this.name = 'VerificationHttpError';\n }\n}\n\nconst SECRET_PATTERN = /sk_|rk_|whsec_|client_secret|ephemeral|password|bearer\\s+[a-z0-9._-]+/i;\n\nexport function scrubUnsafeMessage(value: string): string {\n if (SECRET_PATTERN.test(value) || /provider\\s+body|raw\\s+webhook/i.test(value)) {\n return 'The verification request could not be completed.';\n }\n return value;\n}\n\nexport function toSafeErrorEnvelope(\n error: unknown,\n supportPath: string | null,\n): { status: number; body: Record<string, unknown>; retryAfterSeconds: number | null } {\n if (error instanceof VerificationHttpError) {\n return {\n status: error.status,\n retryAfterSeconds: error.retryAfterSeconds,\n body: envelope(error.code, scrubUnsafeMessage(error.message), error.retryAfterSeconds, supportPath),\n };\n }\n if (error instanceof ProviderError) {\n const status = error.retryable ? (error.code === 'RATE_LIMITED' ? 429 : 503) : 409;\n return {\n status,\n retryAfterSeconds: error.retryAfterSeconds ?? null,\n body: envelope(error.safeCode, scrubUnsafeMessage(error.message), error.retryAfterSeconds ?? null, supportPath),\n };\n }\n const safe = toSafeProviderFailure(error);\n return {\n status: 503,\n retryAfterSeconds: safe.retryAfterSeconds ?? null,\n body: envelope(safe.safeCode, 'The verification request could not be completed.', safe.retryAfterSeconds ?? null, supportPath),\n };\n}\n\nfunction envelope(\n code: string,\n message: string,\n retryAfterSeconds: number | null,\n supportPath: string | null,\n): Record<string, unknown> {\n return {\n contractVersion: '1.0.0',\n error: {\n code,\n message,\n retryable: retryAfterSeconds !== null || /retry|unavailable|rate/i.test(code),\n },\n safeErrorCode: code,\n retryAfter: retryAfterSeconds,\n supportPath,\n };\n}\n","import type { ActorContext } from '@splitin/verification-adapter-sdk';\n\nimport type { RouteAuth, RouteDefinition } from './catalog.ts';\nimport { VerificationHttpError } from './errors.ts';\n\nconst IDEMPOTENCY_KEY = /^[A-Za-z0-9._:~-]{8,128}$/;\nconst OPERATOR_ROLES = new Set(['operator', 'admin', 'reviewer', 'approver']);\nconst SYSTEM_ROLES = new Set(['system', 'worker']);\n\nexport function isCookieAuthenticated(request: Request, override?: (request: Request) => boolean): boolean {\n if (override) return override(request);\n const authorization = request.headers.get('authorization') ?? '';\n if (/^bearer\\s+/i.test(authorization)) return false;\n return Boolean(request.headers.get('cookie'));\n}\n\nexport function requireCsrf(request: Request, route: RouteDefinition, allowedOrigins: string[]): void {\n if (!route.csrf) return;\n const origin = request.headers.get('origin') ?? originFromReferer(request.headers.get('referer'));\n if (!origin) {\n throw new VerificationHttpError(403, 'CSRF_REJECTED', 'Cookie-authenticated mutations require a trusted Origin.');\n }\n if (!allowedOrigins.includes(origin)) {\n throw new VerificationHttpError(403, 'ORIGIN_NOT_ALLOWED', 'Request origin is not allowed.');\n }\n}\n\nexport function requireOriginWhenPresent(request: Request, allowedOrigins: string[]): void {\n const origin = request.headers.get('origin');\n if (!origin) return;\n if (!allowedOrigins.includes(origin)) {\n throw new VerificationHttpError(403, 'ORIGIN_NOT_ALLOWED', 'Request origin is not allowed.');\n }\n}\n\nexport function requireIdempotencyKey(request: Request, route: RouteDefinition): string | undefined {\n if (!route.idempotency) return undefined;\n const key = request.headers.get('idempotency-key')?.trim();\n if (!key) {\n throw new VerificationHttpError(400, 'IDEMPOTENCY_KEY_REQUIRED', 'Mutations require an Idempotency-Key header.');\n }\n if (!IDEMPOTENCY_KEY.test(key)) {\n throw new VerificationHttpError(400, 'INVALID_IDEMPOTENCY_KEY', 'Idempotency-Key is invalid.');\n }\n return key;\n}\n\nexport function authorizeActor(actor: ActorContext, auth: RouteAuth): void {\n if (auth === 'none') return;\n if (!actor.actorId || !actor.tenantKey) {\n throw new VerificationHttpError(401, 'UNAUTHENTICATED', 'Authentication is required.');\n }\n if (auth === 'actor') {\n if (actor.actorType === 'system' && !hasRole(actor, SYSTEM_ROLES) && !hasRole(actor, OPERATOR_ROLES)) {\n throw new VerificationHttpError(403, 'FORBIDDEN', 'This actor cannot access subject verification sessions.');\n }\n return;\n }\n if (auth === 'operator') {\n if (actor.actorType !== 'operator' && !hasRole(actor, OPERATOR_ROLES)) {\n throw new VerificationHttpError(403, 'FORBIDDEN', 'Operator authorization is required.');\n }\n return;\n }\n if (auth === 'system') {\n if (actor.actorType !== 'system' && !hasRole(actor, SYSTEM_ROLES)) {\n throw new VerificationHttpError(403, 'FORBIDDEN', 'Worker authorization is required.');\n }\n }\n}\n\nexport function authorizeSubjectScope(actor: ActorContext, subjectReference: string | undefined): void {\n if (!subjectReference) return;\n if (actor.actorType === 'operator' || actor.actorType === 'system') return;\n if (subjectReference === actor.actorId) return;\n if (actor.authorizedSubjectScope.includes('*')) return;\n if (actor.authorizedSubjectScope.includes(subjectReference)) return;\n throw new VerificationHttpError(403, 'FORBIDDEN', 'The actor is not authorized for this subject.');\n}\n\nexport function assertSeparationOfDuties(actor: ActorContext, otherActorId: string | null | undefined, action: string): void {\n if (!otherActorId) return;\n if (otherActorId === actor.actorId) {\n throw new VerificationHttpError(\n 403,\n 'SEPARATION_OF_DUTIES',\n `A different authorized operator must ${action}.`,\n );\n }\n}\n\nfunction hasRole(actor: ActorContext, allowed: Set<string>): boolean {\n return actor.roles.some((role) => allowed.has(role));\n}\n\nfunction originFromReferer(referer: string | null): string | null {\n if (!referer) return null;\n try {\n return new URL(referer).origin;\n } catch {\n return null;\n }\n}\n\nexport function corsHeaders(request: Request, allowedOrigins: string[]): Record<string, string> {\n const origin = request.headers.get('origin');\n const allowOrigin = origin && allowedOrigins.includes(origin) ? origin : allowedOrigins[0] ?? '';\n return {\n Vary: 'Origin',\n 'Access-Control-Allow-Origin': allowOrigin,\n 'Access-Control-Allow-Headers': 'Authorization, Content-Type, Idempotency-Key, X-CSRF-Token',\n 'Access-Control-Allow-Methods': 'GET, POST, OPTIONS',\n 'Access-Control-Allow-Credentials': 'true',\n };\n}\n","export const API_CONTRACT_VERSION = '1.0.0' as const;\n\nexport type RouteAuth = 'none' | 'actor' | 'operator' | 'system';\n\nexport interface RouteDefinition {\n id: string;\n method: 'GET' | 'POST' | 'OPTIONS';\n path: string;\n auth: RouteAuth;\n csrf: boolean;\n idempotency: boolean;\n mutation: boolean;\n}\n\nexport const V1_ROUTES: readonly RouteDefinition[] = Object.freeze([\n { id: 'sessions.create', method: 'POST', path: '/v1/sessions', auth: 'actor', csrf: true, idempotency: true, mutation: true },\n { id: 'sessions.resume', method: 'POST', path: '/v1/sessions/:id/resume', auth: 'actor', csrf: true, idempotency: true, mutation: true },\n { id: 'sessions.get', method: 'GET', path: '/v1/sessions/:id', auth: 'actor', csrf: false, idempotency: false, mutation: false },\n { id: 'sessions.retry', method: 'POST', path: '/v1/sessions/:id/retry', auth: 'actor', csrf: true, idempotency: true, mutation: true },\n { id: 'sessions.pause', method: 'POST', path: '/v1/sessions/:id/pause', auth: 'actor', csrf: true, idempotency: true, mutation: true },\n { id: 'sessions.cancel', method: 'POST', path: '/v1/sessions/:id/cancel', auth: 'actor', csrf: true, idempotency: true, mutation: true },\n { id: 'appeals.create', method: 'POST', path: '/v1/appeals', auth: 'actor', csrf: true, idempotency: true, mutation: true },\n { id: 'support.escalations', method: 'POST', path: '/v1/support/escalations', auth: 'actor', csrf: true, idempotency: true, mutation: true },\n { id: 'webhooks.ingest', method: 'POST', path: '/v1/webhooks/:provider', auth: 'none', csrf: false, idempotency: false, mutation: true },\n { id: 'protectedActions.evaluate', method: 'POST', path: '/v1/protected-actions/evaluate', auth: 'actor', csrf: true, idempotency: true, mutation: true },\n { id: 'admin.health', method: 'GET', path: '/v1/admin/health', auth: 'operator', csrf: false, idempotency: false, mutation: false },\n { id: 'admin.routes.get', method: 'GET', path: '/v1/admin/routes', auth: 'operator', csrf: false, idempotency: false, mutation: false },\n { id: 'admin.routes.mutate', method: 'POST', path: '/v1/admin/routes', auth: 'operator', csrf: true, idempotency: true, mutation: true },\n { id: 'admin.circuits.get', method: 'GET', path: '/v1/admin/circuits', auth: 'operator', csrf: false, idempotency: false, mutation: false },\n { id: 'admin.circuits.mutate', method: 'POST', path: '/v1/admin/circuits', auth: 'operator', csrf: true, idempotency: true, mutation: true },\n { id: 'admin.attempts', method: 'GET', path: '/v1/admin/attempts', auth: 'operator', csrf: false, idempotency: false, mutation: false },\n { id: 'admin.review.get', method: 'GET', path: '/v1/admin/review', auth: 'operator', csrf: false, idempotency: false, mutation: false },\n { id: 'admin.review.mutate', method: 'POST', path: '/v1/admin/review', auth: 'operator', csrf: true, idempotency: true, mutation: true },\n { id: 'admin.audit', method: 'GET', path: '/v1/admin/audit', auth: 'operator', csrf: false, idempotency: false, mutation: false },\n { id: 'admin.reconciliation.get', method: 'GET', path: '/v1/admin/reconciliation', auth: 'operator', csrf: false, idempotency: false, mutation: false },\n { id: 'admin.reconciliation.mutate', method: 'POST', path: '/v1/admin/reconciliation', auth: 'operator', csrf: true, idempotency: true, mutation: true },\n { id: 'admin.redaction.get', method: 'GET', path: '/v1/admin/redaction', auth: 'operator', csrf: false, idempotency: false, mutation: false },\n { id: 'admin.redaction.mutate', method: 'POST', path: '/v1/admin/redaction', auth: 'operator', csrf: true, idempotency: true, mutation: true },\n { id: 'workers.claim', method: 'POST', path: '/v1/workers/claim', auth: 'system', csrf: false, idempotency: true, mutation: true },\n { id: 'workers.process', method: 'POST', path: '/v1/workers/process', auth: 'system', csrf: false, idempotency: true, mutation: true },\n]);\n\nexport function listV1Paths(): string[] {\n return [...new Set(V1_ROUTES.map((route) => route.path))].sort();\n}\n\nexport interface MatchedRoute {\n route: RouteDefinition;\n params: Record<string, string>;\n}\n\nexport function matchV1Route(method: string, pathname: string, basePath = ''): MatchedRoute | null {\n const relative = stripBasePath(pathname, basePath);\n const normalizedMethod = method.toUpperCase();\n if (normalizedMethod === 'OPTIONS') {\n const found = V1_ROUTES.find((route) => matchPath(route.path, relative));\n return found ? { route: { ...found, method: 'OPTIONS', csrf: false, idempotency: false, mutation: false }, params: matchPath(found.path, relative) ?? {} } : null;\n }\n for (const route of V1_ROUTES) {\n if (route.method !== normalizedMethod) continue;\n const params = matchPath(route.path, relative);\n if (params) return { route, params };\n }\n return null;\n}\n\nfunction stripBasePath(pathname: string, basePath: string): string {\n const normalized = normalizePath(pathname);\n const base = normalizePath(basePath);\n if (!base || base === '/') return normalized;\n if (normalized === base) return '/';\n if (normalized.startsWith(`${base}/`)) return normalized.slice(base.length) || '/';\n return normalized;\n}\n\nfunction normalizePath(value: string): string {\n const path = value.split('?')[0] ?? '/';\n if (!path.startsWith('/')) return `/${path}`;\n return path.replace(/\\/+$/, '') || '/';\n}\n\nfunction matchPath(pattern: string, pathname: string): Record<string, string> | null {\n const patternParts = normalizePath(pattern).split('/').filter(Boolean);\n const pathParts = normalizePath(pathname).split('/').filter(Boolean);\n if (patternParts.length !== pathParts.length) return null;\n const params: Record<string, string> = {};\n for (let index = 0; index < patternParts.length; index += 1) {\n const expected = patternParts[index]!;\n const actual = pathParts[index]!;\n if (expected.startsWith(':')) {\n params[expected.slice(1)] = decodeURIComponent(actual);\n continue;\n }\n if (expected !== actual) return null;\n }\n return params;\n}\n","import type {\n ActorContext,\n ProtectedActionDenial,\n ProviderAssociatedPersonInput,\n ProviderLaunchEnvelope,\n ProviderOrganizationInput,\n ProviderRelationshipInput,\n VerificationCanonicalStatus,\n VerificationLaunchPresentation,\n VerificationPackageCode,\n} from '@splitin/verification-adapter-sdk';\n\nexport const SESSION_CONTRACT_VERSION = '1.0.0' as const;\n\nexport interface SessionContinuationV1 {\n key: string;\n token: string;\n expiresAt: string;\n}\n\nexport interface SessionEnvelopeV1 {\n contractVersion: typeof SESSION_CONTRACT_VERSION;\n attemptId: string;\n packageCode: VerificationPackageCode;\n status: VerificationCanonicalStatus;\n presentation: VerificationLaunchPresentation;\n launch: ProviderLaunchEnvelope | null;\n launcherKey: string | null;\n providerDisclosure: string | null;\n safeErrorCode: string | null;\n retryAfter: string | null;\n supportPath: string | null;\n expiresAt: string | null;\n canResume: boolean;\n canRetry: boolean;\n continuation: SessionContinuationV1 | null;\n}\n\nexport interface SessionMutationResult {\n attemptId: string;\n status: VerificationCanonicalStatus;\n paused?: boolean;\n canceled?: boolean;\n canResume?: boolean;\n canRetry?: boolean;\n}\n\nexport interface StartSessionInput {\n packageCode: VerificationPackageCode;\n countryCode?: string;\n action?: string;\n resourceType?: string;\n resourceReference?: string;\n subjectReference?: string;\n continuationToken?: string;\n continuationKey?: string;\n legalFirstName?: string | null;\n legalLastName?: string | null;\n email?: string | null;\n organization?: ProviderOrganizationInput | null;\n relationship?: ProviderRelationshipInput | null;\n associatedPerson?: ProviderAssociatedPersonInput | null;\n evidenceReferences?: string[];\n metadata?: Record<string, string | number | boolean | null>;\n}\n\nexport interface SessionIdInput {\n attemptId: string;\n idempotencyKey: string;\n}\n\nexport interface AppealInput {\n attemptId?: string;\n reasonCode: string;\n nonBiometricPathRequested?: boolean;\n details?: string;\n}\n\nexport interface AppealResult {\n appealId: string;\n status: 'open' | 'in_review' | 'resolved' | 'rejected';\n}\n\nexport interface SupportEscalationInput {\n attemptId?: string;\n appealId?: string;\n reasonCode: string;\n message?: string;\n}\n\nexport interface SupportEscalationResult {\n escalationId: string;\n status: 'open';\n}\n\nexport interface ProtectedActionInput {\n action: string;\n resourceType?: string;\n resourceReference?: string;\n}\n\nexport type ProtectedActionDecision =\n | { allowed: true; enforcementActive: boolean; policyVersionId?: string | null }\n | ({ allowed: false } & ProtectedActionDenial);\n\nexport interface WebhookIngestResult {\n accepted: boolean;\n duplicate: boolean;\n providerEventKey?: string;\n}\n\nexport interface SafeAdminRecord {\n id?: string;\n [key: string]: string | number | boolean | null | undefined;\n}\n\nexport interface AdminHealthSnapshot {\n generatedAt: string;\n runtime: SafeAdminRecord[];\n health: SafeAdminRecord[];\n alerts: SafeAdminRecord[];\n}\n\nexport interface AdminRoutesSnapshot {\n generatedAt: string;\n routes: SafeAdminRecord[];\n routeChanges: SafeAdminRecord[];\n}\n\nexport interface RouteChangeInput {\n operation: 'propose' | 'approve' | 'apply';\n targetRoutePolicyId?: string;\n requestId?: string;\n action?: 'activate' | 'drain' | 'rollback';\n reasonCode?: string;\n}\n\nexport interface AdminCircuitsSnapshot {\n generatedAt: string;\n circuits: SafeAdminRecord[];\n}\n\nexport interface CircuitInput {\n provider: string;\n providerEnvironment: 'sandbox' | 'production';\n status: 'healthy' | 'degraded' | 'unavailable' | 'circuit_open';\n errorCode?: string;\n circuitOpenUntil?: string;\n}\n\nexport interface AdminAttemptsSnapshot {\n generatedAt: string;\n attempts: SafeAdminRecord[];\n}\n\nexport interface AdminReviewSnapshot {\n generatedAt: string;\n appeals: SafeAdminRecord[];\n manualExceptions: SafeAdminRecord[];\n policyVersions: SafeAdminRecord[];\n}\n\nexport interface ReviewInput {\n operation: 'begin_appeal_review' | 'propose_manual_exception' | 'approve_manual_exception' | 'apply_manual_exception';\n appealId?: string;\n requestId?: string;\n packageCode?: VerificationPackageCode;\n decision?: 'approve' | 'deny' | 'revoke' | 'request_more_information';\n reasonCode?: string;\n policyVersionId?: string;\n evidenceReferenceHash?: string;\n expiresAt?: string;\n}\n\nexport interface AdminAuditSnapshot {\n generatedAt: string;\n audit: SafeAdminRecord[];\n}\n\nexport interface AdminReconciliationSnapshot {\n generatedAt: string;\n jobs: SafeAdminRecord[];\n queues: Record<string, number>;\n}\n\nexport interface ReconciliationInput {\n attemptId: string;\n}\n\nexport interface AdminRedactionSnapshot {\n generatedAt: string;\n privacyRequests: SafeAdminRecord[];\n jobs: SafeAdminRecord[];\n}\n\nexport interface RedactionInput {\n privacyRequestId: string;\n}\n\nexport interface WorkerClaimInput {\n queue: 'webhook' | 'reconciliation' | 'redaction' | 'dead_letter';\n limit?: number;\n}\n\nexport interface WorkerClaimResult {\n leases: Array<{ leaseId: string; jobId: string; queue: string }>;\n}\n\nexport interface WorkerProcessInput {\n leaseId: string;\n jobId: string;\n}\n\nexport interface WorkerProcessResult {\n processed: boolean;\n disposition: 'completed' | 'retryable' | 'dead_letter' | 'duplicate';\n}\n\nexport interface VerificationServerPlatform {\n startSession(actor: ActorContext, input: StartSessionInput, idempotencyKey: string, request: Request): Promise<SessionEnvelopeV1>;\n resumeSession(actor: ActorContext, input: SessionIdInput, request: Request): Promise<SessionEnvelopeV1>;\n getSession(actor: ActorContext, attemptId: string): Promise<SessionEnvelopeV1>;\n retrySession(actor: ActorContext, input: SessionIdInput, request: Request): Promise<SessionEnvelopeV1>;\n pauseSession(actor: ActorContext, input: SessionIdInput): Promise<SessionMutationResult>;\n cancelSession(actor: ActorContext, input: SessionIdInput): Promise<SessionMutationResult>;\n createAppeal(actor: ActorContext, input: AppealInput, idempotencyKey: string): Promise<AppealResult>;\n createSupportEscalation(actor: ActorContext, input: SupportEscalationInput, idempotencyKey: string): Promise<SupportEscalationResult>;\n ingestWebhook(provider: string, request: Request): Promise<WebhookIngestResult>;\n evaluateProtectedAction(actor: ActorContext, input: ProtectedActionInput, idempotencyKey: string): Promise<ProtectedActionDecision>;\n admin: {\n health(actor: ActorContext): Promise<AdminHealthSnapshot>;\n routes(actor: ActorContext): Promise<AdminRoutesSnapshot>;\n mutateRoute(actor: ActorContext, input: RouteChangeInput, idempotencyKey: string): Promise<SafeAdminRecord>;\n circuits(actor: ActorContext): Promise<AdminCircuitsSnapshot>;\n setCircuit(actor: ActorContext, input: CircuitInput, idempotencyKey: string): Promise<SafeAdminRecord>;\n attempts(actor: ActorContext): Promise<AdminAttemptsSnapshot>;\n review(actor: ActorContext): Promise<AdminReviewSnapshot>;\n mutateReview(actor: ActorContext, input: ReviewInput, idempotencyKey: string): Promise<SafeAdminRecord>;\n audit(actor: ActorContext): Promise<AdminAuditSnapshot>;\n reconciliation(actor: ActorContext): Promise<AdminReconciliationSnapshot>;\n enqueueReconciliation(actor: ActorContext, input: ReconciliationInput, idempotencyKey: string): Promise<SafeAdminRecord>;\n redaction(actor: ActorContext): Promise<AdminRedactionSnapshot>;\n approveRedaction(actor: ActorContext, input: RedactionInput, idempotencyKey: string): Promise<SafeAdminRecord>;\n };\n workers: {\n claim(actor: ActorContext, input: WorkerClaimInput, idempotencyKey: string): Promise<WorkerClaimResult>;\n process(actor: ActorContext, input: WorkerProcessInput, idempotencyKey: string): Promise<WorkerProcessResult>;\n };\n}\n\nexport interface VerificationFetchHandlerOptions {\n resolveActor(request: Request): Promise<ActorContext>;\n allowedOrigins?: string[];\n isCookieAuthenticated?(request: Request): boolean;\n basePath?: string;\n maxBodyBytes?: number;\n supportPath?: string;\n rateLimit?(actor: ActorContext, routeId: string): Promise<{ allowed: boolean; retryAfterSeconds?: number }>;\n}\n\nexport const FORBIDDEN_CLIENT_FIELDS = [\n 'provider',\n 'launcherKey',\n 'templateId',\n 'workflowId',\n 'apiOrigin',\n 'environment',\n 'configurationRevision',\n 'adapter',\n 'adapterVersion',\n 'routePolicyId',\n] as const;\n","import { VerificationHttpError } from './errors.ts';\nimport { FORBIDDEN_CLIENT_FIELDS } from './types.ts';\n\nexport type JsonRecord = Record<string, unknown>;\n\nexport function jsonResponse(\n body: unknown,\n status: number,\n extra: Record<string, string> = {},\n): Response {\n const headers = new Headers({\n 'Cache-Control': 'no-store',\n 'Content-Type': 'application/json; charset=utf-8',\n ...extra,\n });\n if (typeof extra['Retry-After'] === 'string') headers.set('Retry-After', extra['Retry-After']);\n return new Response(JSON.stringify(body), { status, headers });\n}\n\nexport async function readLimitedBody(request: Request, maxBodyBytes: number): Promise<Request> {\n if (request.method === 'GET' || request.method === 'HEAD' || request.method === 'OPTIONS') {\n return request;\n }\n const raw = new Uint8Array(await request.arrayBuffer());\n if (raw.byteLength > maxBodyBytes) {\n throw new VerificationHttpError(413, 'PAYLOAD_TOO_LARGE', 'Request body exceeds the allowed size.');\n }\n return new Request(request.url, {\n method: request.method,\n headers: request.headers,\n body: raw.byteLength > 0 ? raw : undefined,\n });\n}\n\nexport async function parseJsonObject(\n request: Request,\n allowedKeys: readonly string[],\n options: { rejectRoutingFields?: boolean } = {},\n): Promise<JsonRecord> {\n const contentType = request.headers.get('content-type') ?? '';\n if (contentType && !contentType.toLowerCase().includes('application/json')) {\n throw new VerificationHttpError(415, 'INVALID_REQUEST', 'Content-Type must be application/json.');\n }\n let body: unknown;\n try {\n const text = await request.text();\n body = text.trim() ? JSON.parse(text) : {};\n } catch {\n throw new VerificationHttpError(400, 'INVALID_JSON', 'Request body must be valid JSON.');\n }\n if (!isPlainRecord(body)) {\n throw new VerificationHttpError(400, 'INVALID_REQUEST', 'Request body must be an object.');\n }\n for (const key of Object.keys(body)) {\n if (options.rejectRoutingFields && (FORBIDDEN_CLIENT_FIELDS as readonly string[]).includes(key)) {\n throw new VerificationHttpError(400, 'UNSUPPORTED_REQUEST_FIELD', `Unsupported request field: ${key}.`);\n }\n if (!allowedKeys.includes(key)) {\n throw new VerificationHttpError(400, 'UNSUPPORTED_REQUEST_FIELD', `Unsupported request field: ${key}.`);\n }\n }\n return body;\n}\n\nexport function requiredString(body: JsonRecord, field: string, pattern: RegExp, maxLength: number): string {\n const value = body[field];\n if (typeof value !== 'string' || !pattern.test(value) || value.length > maxLength) {\n throw new VerificationHttpError(400, 'INVALID_REQUEST', `Invalid ${field}.`);\n }\n return value;\n}\n\nexport function optionalString(body: JsonRecord, field: string, pattern: RegExp, maxLength: number): string | undefined {\n const value = body[field];\n if (value === undefined || value === null) return undefined;\n if (typeof value !== 'string' || !pattern.test(value) || value.length > maxLength) {\n throw new VerificationHttpError(400, 'INVALID_REQUEST', `Invalid ${field}.`);\n }\n return value;\n}\n\nexport function optionalBoolean(body: JsonRecord, field: string): boolean | undefined {\n const value = body[field];\n if (value === undefined) return undefined;\n if (typeof value !== 'boolean') {\n throw new VerificationHttpError(400, 'INVALID_REQUEST', `Invalid ${field}.`);\n }\n return value;\n}\n\nexport function isPlainRecord(value: unknown): value is JsonRecord {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n","import { isPackageCode, isProviderCode } from '@splitin/verification-adapter-sdk';\n\nimport {\n assertSeparationOfDuties,\n authorizeActor,\n authorizeSubjectScope,\n corsHeaders,\n isCookieAuthenticated,\n requireCsrf,\n requireIdempotencyKey,\n requireOriginWhenPresent,\n} from './auth.ts';\nimport { matchV1Route } from './catalog.ts';\nimport { toSafeErrorEnvelope, VerificationHttpError } from './errors.ts';\nimport {\n jsonResponse,\n optionalBoolean,\n optionalString,\n parseJsonObject,\n readLimitedBody,\n requiredString,\n type JsonRecord,\n} from './json.ts';\nimport type {\n CircuitInput,\n ProtectedActionInput,\n ReviewInput,\n RouteChangeInput,\n StartSessionInput,\n VerificationFetchHandlerOptions,\n VerificationServerPlatform,\n} from './types.ts';\n\nconst PACKAGE = /^[a-z0-9][a-z0-9_.-]{1,80}$/;\nconst ACTION = /^[a-z][a-z0-9_]*(?:\\.[a-z][a-z0-9_]*)+$/;\nconst IDENTIFIER = /^[A-Za-z0-9._:~-]{4,128}$/;\nconst REASON = /^[a-z][a-z0-9_.-]{2,127}$/;\nconst COUNTRY = /^[A-Z]{2}$/;\nconst HASH = /^[a-f0-9]{64}$/;\nconst ATTEMPT_ID = /^[A-Za-z0-9._:~-]{8,128}$/;\n\nconst SESSION_KEYS = [\n 'packageCode', 'countryCode', 'action', 'resourceType', 'resourceReference', 'subjectReference',\n 'continuationToken', 'continuationKey', 'legalFirstName', 'legalLastName', 'email',\n 'organization', 'relationship', 'associatedPerson', 'evidenceReferences', 'metadata',\n] as const;\n\nconst APPEAL_KEYS = ['attemptId', 'reasonCode', 'nonBiometricPathRequested', 'details'] as const;\nconst SUPPORT_KEYS = ['attemptId', 'appealId', 'reasonCode', 'message'] as const;\nconst PROTECTED_KEYS = ['action', 'resourceType', 'resourceReference'] as const;\nconst ROUTE_KEYS = ['operation', 'targetRoutePolicyId', 'requestId', 'action', 'reasonCode'] as const;\nconst CIRCUIT_KEYS = ['provider', 'providerEnvironment', 'status', 'errorCode', 'circuitOpenUntil'] as const;\nconst REVIEW_KEYS = [\n 'operation', 'appealId', 'requestId', 'packageCode', 'decision', 'reasonCode',\n 'policyVersionId', 'evidenceReferenceHash', 'expiresAt',\n] as const;\nconst RECONCILE_KEYS = ['attemptId'] as const;\nconst REDACT_KEYS = ['privacyRequestId'] as const;\nconst WORKER_CLAIM_KEYS = ['queue', 'limit'] as const;\nconst WORKER_PROCESS_KEYS = ['leaseId', 'jobId'] as const;\n\nexport function createVerificationFetchHandler(\n platform: VerificationServerPlatform,\n options: VerificationFetchHandlerOptions,\n): (request: Request) => Promise<Response> {\n const allowedOrigins = options.allowedOrigins ?? [];\n const supportPath = options.supportPath ?? null;\n const maxBodyBytes = options.maxBodyBytes ?? 1024 * 1024;\n\n return async (incoming: Request): Promise<Response> => {\n const extra = corsHeaders(incoming, allowedOrigins);\n try {\n requireOriginWhenPresent(incoming, allowedOrigins.length > 0 ? allowedOrigins : [incoming.headers.get('origin') ?? '']);\n const request = await readLimitedBody(incoming, maxBodyBytes);\n const url = new URL(request.url);\n const matched = matchV1Route(request.method, url.pathname, options.basePath);\n if (!matched) {\n if (request.method === 'OPTIONS') {\n return new Response(null, { status: 204, headers: extra });\n }\n throw new VerificationHttpError(404, 'NOT_FOUND', 'The verification endpoint was not found.');\n }\n const { route, params } = matched;\n if (route.method === 'OPTIONS') {\n return new Response(null, { status: 204, headers: extra });\n }\n\n if (route.id === 'webhooks.ingest') {\n const provider = params.provider ?? '';\n if (!isProviderCode(provider)) {\n throw new VerificationHttpError(400, 'INVALID_REQUEST', 'Invalid provider.');\n }\n const result = await platform.ingestWebhook(provider, request);\n return jsonResponse(result, result.accepted ? 202 : 400, extra);\n }\n\n if (isCookieAuthenticated(request, options.isCookieAuthenticated) && route.csrf) {\n if (allowedOrigins.length === 0) {\n throw new VerificationHttpError(403, 'CSRF_REJECTED', 'Cookie-authenticated mutations require an origin allowlist.');\n }\n requireCsrf(request, route, allowedOrigins);\n }\n\n const actor = await options.resolveActor(request);\n authorizeActor(actor, route.auth);\n const idempotencyKey = requireIdempotencyKey(request, route) ?? '';\n\n if (options.rateLimit) {\n const budget = await options.rateLimit(actor, route.id);\n if (!budget.allowed) {\n throw new VerificationHttpError(429, 'RATE_LIMITED', 'Please wait before retrying.', budget.retryAfterSeconds ?? 30);\n }\n }\n\n const body = route.mutation && route.method === 'POST' && route.id !== 'sessions.get'\n ? await parseBodyForRoute(route.id, request)\n : {};\n\n const payload = await dispatch(platform, route.id, {\n actor,\n params,\n body,\n idempotencyKey,\n request,\n });\n return jsonResponse(payload, route.mutation && route.method === 'POST' ? 200 : 200, extra);\n } catch (error) {\n const mapped = toSafeErrorEnvelope(error, supportPath);\n const headers = { ...extra };\n if (mapped.retryAfterSeconds !== null) headers['Retry-After'] = String(Math.max(1, Math.ceil(mapped.retryAfterSeconds)));\n return jsonResponse(mapped.body, mapped.status, headers);\n }\n };\n}\n\nasync function parseBodyForRoute(routeId: string, request: Request): Promise<JsonRecord> {\n switch (routeId) {\n case 'sessions.create':\n return parseJsonObject(request, SESSION_KEYS, { rejectRoutingFields: true });\n case 'sessions.resume':\n case 'sessions.retry':\n case 'sessions.pause':\n case 'sessions.cancel':\n return parseJsonObject(request, []);\n case 'appeals.create':\n return parseJsonObject(request, APPEAL_KEYS);\n case 'support.escalations':\n return parseJsonObject(request, SUPPORT_KEYS);\n case 'protectedActions.evaluate':\n return parseJsonObject(request, PROTECTED_KEYS);\n case 'admin.routes.mutate':\n return parseJsonObject(request, ROUTE_KEYS, { rejectRoutingFields: false });\n case 'admin.circuits.mutate':\n return parseJsonObject(request, CIRCUIT_KEYS, { rejectRoutingFields: false });\n case 'admin.review.mutate':\n return parseJsonObject(request, REVIEW_KEYS, { rejectRoutingFields: false });\n case 'admin.reconciliation.mutate':\n return parseJsonObject(request, RECONCILE_KEYS, { rejectRoutingFields: false });\n case 'admin.redaction.mutate':\n return parseJsonObject(request, REDACT_KEYS, { rejectRoutingFields: false });\n case 'workers.claim':\n return parseJsonObject(request, WORKER_CLAIM_KEYS, { rejectRoutingFields: false });\n case 'workers.process':\n return parseJsonObject(request, WORKER_PROCESS_KEYS, { rejectRoutingFields: false });\n default:\n return {};\n }\n}\n\nasync function dispatch(\n platform: VerificationServerPlatform,\n routeId: string,\n ctx: {\n actor: import('@splitin/verification-adapter-sdk').ActorContext;\n params: Record<string, string>;\n body: JsonRecord;\n idempotencyKey: string;\n request: Request;\n },\n): Promise<unknown> {\n const attemptId = ctx.params.id;\n switch (routeId) {\n case 'sessions.create': {\n const input = parseStartInput(ctx.body);\n authorizeSubjectScope(ctx.actor, input.subjectReference);\n return platform.startSession(ctx.actor, input, ctx.idempotencyKey, ctx.request);\n }\n case 'sessions.resume':\n return platform.resumeSession(ctx.actor, { attemptId: requireAttemptId(attemptId), idempotencyKey: ctx.idempotencyKey }, ctx.request);\n case 'sessions.get':\n return platform.getSession(ctx.actor, requireAttemptId(attemptId));\n case 'sessions.retry':\n return platform.retrySession(ctx.actor, { attemptId: requireAttemptId(attemptId), idempotencyKey: ctx.idempotencyKey }, ctx.request);\n case 'sessions.pause':\n return platform.pauseSession(ctx.actor, { attemptId: requireAttemptId(attemptId), idempotencyKey: ctx.idempotencyKey });\n case 'sessions.cancel':\n return platform.cancelSession(ctx.actor, { attemptId: requireAttemptId(attemptId), idempotencyKey: ctx.idempotencyKey });\n case 'appeals.create':\n return platform.createAppeal(ctx.actor, {\n attemptId: optionalString(ctx.body, 'attemptId', ATTEMPT_ID, 128),\n reasonCode: requiredString(ctx.body, 'reasonCode', REASON, 128),\n nonBiometricPathRequested: optionalBoolean(ctx.body, 'nonBiometricPathRequested'),\n details: optionalString(ctx.body, 'details', /^[\\s\\S]{1,2000}$/, 2000),\n }, ctx.idempotencyKey);\n case 'support.escalations':\n return platform.createSupportEscalation(ctx.actor, {\n attemptId: optionalString(ctx.body, 'attemptId', ATTEMPT_ID, 128),\n appealId: optionalString(ctx.body, 'appealId', ATTEMPT_ID, 128),\n reasonCode: requiredString(ctx.body, 'reasonCode', REASON, 128),\n message: optionalString(ctx.body, 'message', /^[\\s\\S]{1,2000}$/, 2000),\n }, ctx.idempotencyKey);\n case 'protectedActions.evaluate':\n return platform.evaluateProtectedAction(ctx.actor, parseProtectedAction(ctx.body), ctx.idempotencyKey);\n case 'admin.health':\n return platform.admin.health(ctx.actor);\n case 'admin.routes.get':\n return platform.admin.routes(ctx.actor);\n case 'admin.routes.mutate':\n return mutateRoute(platform, ctx.actor, ctx.body, ctx.idempotencyKey);\n case 'admin.circuits.get':\n return platform.admin.circuits(ctx.actor);\n case 'admin.circuits.mutate':\n return platform.admin.setCircuit(ctx.actor, parseCircuit(ctx.body), ctx.idempotencyKey);\n case 'admin.attempts':\n return platform.admin.attempts(ctx.actor);\n case 'admin.review.get':\n return platform.admin.review(ctx.actor);\n case 'admin.review.mutate':\n return mutateReview(platform, ctx.actor, ctx.body, ctx.idempotencyKey);\n case 'admin.audit':\n return platform.admin.audit(ctx.actor);\n case 'admin.reconciliation.get':\n return platform.admin.reconciliation(ctx.actor);\n case 'admin.reconciliation.mutate':\n return platform.admin.enqueueReconciliation(ctx.actor, {\n attemptId: requiredString(ctx.body, 'attemptId', ATTEMPT_ID, 128),\n }, ctx.idempotencyKey);\n case 'admin.redaction.get':\n return platform.admin.redaction(ctx.actor);\n case 'admin.redaction.mutate':\n return platform.admin.approveRedaction(ctx.actor, {\n privacyRequestId: requiredString(ctx.body, 'privacyRequestId', IDENTIFIER, 128),\n }, ctx.idempotencyKey);\n case 'workers.claim':\n return platform.workers.claim(ctx.actor, {\n queue: parseWorkerQueue(ctx.body.queue),\n limit: typeof ctx.body.limit === 'number' ? ctx.body.limit : undefined,\n }, ctx.idempotencyKey);\n case 'workers.process':\n return platform.workers.process(ctx.actor, {\n leaseId: requiredString(ctx.body, 'leaseId', IDENTIFIER, 128),\n jobId: requiredString(ctx.body, 'jobId', IDENTIFIER, 128),\n }, ctx.idempotencyKey);\n default:\n throw new VerificationHttpError(404, 'NOT_FOUND', 'The verification endpoint was not found.');\n }\n}\n\nfunction parseStartInput(body: JsonRecord): StartSessionInput {\n const packageCode = requiredString(body, 'packageCode', PACKAGE, 80);\n if (!isPackageCode(packageCode)) {\n throw new VerificationHttpError(400, 'INVALID_REQUEST', 'Invalid packageCode.');\n }\n return {\n packageCode,\n countryCode: optionalString(body, 'countryCode', COUNTRY, 2),\n action: optionalString(body, 'action', ACTION, 160),\n resourceType: optionalString(body, 'resourceType', /^[a-z][a-z0-9_]{1,63}$/, 64),\n resourceReference: optionalString(body, 'resourceReference', IDENTIFIER, 128),\n subjectReference: optionalString(body, 'subjectReference', IDENTIFIER, 128),\n continuationToken: optionalString(body, 'continuationToken', HASH, 64),\n continuationKey: optionalString(body, 'continuationKey', /^[a-z][a-z0-9_.-]{2,127}$/, 128),\n legalFirstName: optionalString(body, 'legalFirstName', /^[\\p{L}\\p{M}\\s'.-]{1,80}$/u, 80) ?? null,\n legalLastName: optionalString(body, 'legalLastName', /^[\\p{L}\\p{M}\\s'.-]{1,80}$/u, 80) ?? null,\n email: optionalString(body, 'email', /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/, 254) ?? null,\n organization: isRecord(body.organization) ? body.organization as unknown as StartSessionInput['organization'] : undefined,\n relationship: isRecord(body.relationship) ? body.relationship as unknown as StartSessionInput['relationship'] : undefined,\n associatedPerson: isRecord(body.associatedPerson) ? body.associatedPerson as unknown as StartSessionInput['associatedPerson'] : undefined,\n evidenceReferences: Array.isArray(body.evidenceReferences)\n ? body.evidenceReferences.filter((value): value is string => typeof value === 'string')\n : undefined,\n metadata: isRecord(body.metadata) ? sanitizeMetadata(body.metadata) : undefined,\n };\n}\n\nfunction parseProtectedAction(body: JsonRecord): ProtectedActionInput {\n return {\n action: requiredString(body, 'action', ACTION, 160),\n resourceType: optionalString(body, 'resourceType', /^[a-z][a-z0-9_]{1,63}$/, 64),\n resourceReference: optionalString(body, 'resourceReference', IDENTIFIER, 128),\n };\n}\n\nfunction parseCircuit(body: JsonRecord): CircuitInput {\n const status = requiredString(body, 'status', /^(healthy|degraded|unavailable|circuit_open)$/, 32);\n const environment = requiredString(body, 'providerEnvironment', /^(sandbox|production)$/, 16);\n return {\n provider: requiredString(body, 'provider', /^[a-z][a-z0-9_]{1,63}$/, 64),\n providerEnvironment: environment as CircuitInput['providerEnvironment'],\n status: status as CircuitInput['status'],\n errorCode: optionalString(body, 'errorCode', /^[A-Z][A-Z0-9_]{2,127}$/, 128),\n circuitOpenUntil: optionalString(body, 'circuitOpenUntil', /^\\d{4}-\\d{2}-\\d{2}T/, 40),\n };\n}\n\nasync function mutateRoute(\n platform: VerificationServerPlatform,\n actor: import('@splitin/verification-adapter-sdk').ActorContext,\n body: JsonRecord,\n idempotencyKey: string,\n) {\n const operation = requiredString(body, 'operation', /^(propose|approve|apply)$/, 16) as RouteChangeInput['operation'];\n const input: RouteChangeInput = {\n operation,\n targetRoutePolicyId: optionalString(body, 'targetRoutePolicyId', IDENTIFIER, 128),\n requestId: optionalString(body, 'requestId', IDENTIFIER, 128),\n action: optionalString(body, 'action', /^(activate|drain|rollback)$/, 16) as RouteChangeInput['action'],\n reasonCode: optionalString(body, 'reasonCode', REASON, 128),\n };\n if (operation !== 'propose') {\n const snapshot = await platform.admin.routes(actor);\n const change = snapshot.routeChanges.find((row) => row.id === input.requestId);\n if (operation === 'approve') assertSeparationOfDuties(actor, stringField(change, 'proposedBy'), 'approve this route change');\n if (operation === 'apply') assertSeparationOfDuties(actor, stringField(change, 'approvedBy'), 'apply this route change');\n }\n return platform.admin.mutateRoute(actor, input, idempotencyKey);\n}\n\nasync function mutateReview(\n platform: VerificationServerPlatform,\n actor: import('@splitin/verification-adapter-sdk').ActorContext,\n body: JsonRecord,\n idempotencyKey: string,\n) {\n const operation = requiredString(\n body,\n 'operation',\n /^(begin_appeal_review|propose_manual_exception|approve_manual_exception|apply_manual_exception)$/,\n 40,\n ) as ReviewInput['operation'];\n const input: ReviewInput = {\n operation,\n appealId: optionalString(body, 'appealId', IDENTIFIER, 128),\n requestId: optionalString(body, 'requestId', IDENTIFIER, 128),\n packageCode: optionalString(body, 'packageCode', PACKAGE, 80),\n decision: optionalString(body, 'decision', /^(approve|deny|revoke|request_more_information)$/, 40) as ReviewInput['decision'],\n reasonCode: optionalString(body, 'reasonCode', REASON, 128),\n policyVersionId: optionalString(body, 'policyVersionId', IDENTIFIER, 128),\n evidenceReferenceHash: optionalString(body, 'evidenceReferenceHash', HASH, 64),\n expiresAt: optionalString(body, 'expiresAt', /^\\d{4}-\\d{2}-\\d{2}T/, 40),\n };\n if (operation === 'approve_manual_exception' || operation === 'apply_manual_exception') {\n const snapshot = await platform.admin.review(actor);\n const exception = snapshot.manualExceptions.find((row) => row.id === input.requestId);\n if (operation === 'approve_manual_exception') {\n assertSeparationOfDuties(actor, stringField(exception, 'proposedBy'), 'approve this manual exception');\n }\n if (operation === 'apply_manual_exception') {\n assertSeparationOfDuties(actor, stringField(exception, 'approvedBy'), 'apply this manual exception');\n }\n }\n return platform.admin.mutateReview(actor, input, idempotencyKey);\n}\n\nfunction parseWorkerQueue(value: unknown): 'webhook' | 'reconciliation' | 'redaction' | 'dead_letter' {\n if (value === 'webhook' || value === 'reconciliation' || value === 'redaction' || value === 'dead_letter') return value;\n throw new VerificationHttpError(400, 'INVALID_REQUEST', 'Invalid queue.');\n}\n\nfunction requireAttemptId(value: string | undefined): string {\n if (!value || !ATTEMPT_ID.test(value)) {\n throw new VerificationHttpError(400, 'INVALID_REQUEST', 'Invalid attempt id.');\n }\n return value;\n}\n\nfunction sanitizeMetadata(value: JsonRecord): Record<string, string | number | boolean | null> {\n const result: Record<string, string | number | boolean | null> = {};\n for (const [key, nested] of Object.entries(value)) {\n if (typeof nested === 'string' || typeof nested === 'number' || typeof nested === 'boolean' || nested === null) {\n result[key] = nested;\n }\n }\n return result;\n}\n\nfunction isRecord(value: unknown): value is JsonRecord {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nfunction stringField(record: { [key: string]: string | number | boolean | null | undefined } | undefined, key: string): string | null {\n const value = record?.[key];\n return typeof value === 'string' ? value : null;\n}\n","import type { ActorContext } from '@splitin/verification-adapter-sdk';\n\nimport { createVerificationFetchHandler } from './handler.ts';\nimport type { VerificationFetchHandlerOptions, VerificationServerPlatform } from './types.ts';\n\nexport interface SupabaseUserLike {\n id: string;\n role?: string | null;\n email?: string | null;\n}\n\nexport interface VerificationSupabaseOptions extends Omit<VerificationFetchHandlerOptions, 'resolveActor'> {\n getUser(request: Request): Promise<SupabaseUserLike | null>;\n resolveActor(request: Request, user: SupabaseUserLike | null): Promise<ActorContext>;\n}\n\n/**\n * Supabase/Edge binding. Request is already a Web API Request; this adapter\n * only maps getUser() into resolveActor.\n */\nexport function createVerificationSupabaseHandler(\n platform: VerificationServerPlatform,\n options: VerificationSupabaseOptions,\n): (request: Request) => Promise<Response> {\n return createVerificationFetchHandler(platform, {\n allowedOrigins: options.allowedOrigins,\n isCookieAuthenticated: options.isCookieAuthenticated,\n basePath: options.basePath,\n maxBodyBytes: options.maxBodyBytes,\n supportPath: options.supportPath,\n rateLimit: options.rateLimit,\n resolveActor: async (request) => {\n const user = await options.getUser(request);\n return options.resolveActor(request, user);\n },\n });\n}\n"]}
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import { ActorContext, VerificationPackageCode, ProviderOrganizationInput, ProviderRelationshipInput, ProviderAssociatedPersonInput, VerificationCanonicalStatus, VerificationLaunchPresentation, ProviderLaunchEnvelope, ProtectedActionDenial } from '@splitin/verification-adapter-sdk';
|
|
2
|
+
|
|
3
|
+
declare const SESSION_CONTRACT_VERSION: "1.0.0";
|
|
4
|
+
interface SessionContinuationV1 {
|
|
5
|
+
key: string;
|
|
6
|
+
token: string;
|
|
7
|
+
expiresAt: string;
|
|
8
|
+
}
|
|
9
|
+
interface SessionEnvelopeV1 {
|
|
10
|
+
contractVersion: typeof SESSION_CONTRACT_VERSION;
|
|
11
|
+
attemptId: string;
|
|
12
|
+
packageCode: VerificationPackageCode;
|
|
13
|
+
status: VerificationCanonicalStatus;
|
|
14
|
+
presentation: VerificationLaunchPresentation;
|
|
15
|
+
launch: ProviderLaunchEnvelope | null;
|
|
16
|
+
launcherKey: string | null;
|
|
17
|
+
providerDisclosure: string | null;
|
|
18
|
+
safeErrorCode: string | null;
|
|
19
|
+
retryAfter: string | null;
|
|
20
|
+
supportPath: string | null;
|
|
21
|
+
expiresAt: string | null;
|
|
22
|
+
canResume: boolean;
|
|
23
|
+
canRetry: boolean;
|
|
24
|
+
continuation: SessionContinuationV1 | null;
|
|
25
|
+
}
|
|
26
|
+
interface SessionMutationResult {
|
|
27
|
+
attemptId: string;
|
|
28
|
+
status: VerificationCanonicalStatus;
|
|
29
|
+
paused?: boolean;
|
|
30
|
+
canceled?: boolean;
|
|
31
|
+
canResume?: boolean;
|
|
32
|
+
canRetry?: boolean;
|
|
33
|
+
}
|
|
34
|
+
interface StartSessionInput {
|
|
35
|
+
packageCode: VerificationPackageCode;
|
|
36
|
+
countryCode?: string;
|
|
37
|
+
action?: string;
|
|
38
|
+
resourceType?: string;
|
|
39
|
+
resourceReference?: string;
|
|
40
|
+
subjectReference?: string;
|
|
41
|
+
continuationToken?: string;
|
|
42
|
+
continuationKey?: string;
|
|
43
|
+
legalFirstName?: string | null;
|
|
44
|
+
legalLastName?: string | null;
|
|
45
|
+
email?: string | null;
|
|
46
|
+
organization?: ProviderOrganizationInput | null;
|
|
47
|
+
relationship?: ProviderRelationshipInput | null;
|
|
48
|
+
associatedPerson?: ProviderAssociatedPersonInput | null;
|
|
49
|
+
evidenceReferences?: string[];
|
|
50
|
+
metadata?: Record<string, string | number | boolean | null>;
|
|
51
|
+
}
|
|
52
|
+
interface SessionIdInput {
|
|
53
|
+
attemptId: string;
|
|
54
|
+
idempotencyKey: string;
|
|
55
|
+
}
|
|
56
|
+
interface AppealInput {
|
|
57
|
+
attemptId?: string;
|
|
58
|
+
reasonCode: string;
|
|
59
|
+
nonBiometricPathRequested?: boolean;
|
|
60
|
+
details?: string;
|
|
61
|
+
}
|
|
62
|
+
interface AppealResult {
|
|
63
|
+
appealId: string;
|
|
64
|
+
status: 'open' | 'in_review' | 'resolved' | 'rejected';
|
|
65
|
+
}
|
|
66
|
+
interface SupportEscalationInput {
|
|
67
|
+
attemptId?: string;
|
|
68
|
+
appealId?: string;
|
|
69
|
+
reasonCode: string;
|
|
70
|
+
message?: string;
|
|
71
|
+
}
|
|
72
|
+
interface SupportEscalationResult {
|
|
73
|
+
escalationId: string;
|
|
74
|
+
status: 'open';
|
|
75
|
+
}
|
|
76
|
+
interface ProtectedActionInput {
|
|
77
|
+
action: string;
|
|
78
|
+
resourceType?: string;
|
|
79
|
+
resourceReference?: string;
|
|
80
|
+
}
|
|
81
|
+
type ProtectedActionDecision = {
|
|
82
|
+
allowed: true;
|
|
83
|
+
enforcementActive: boolean;
|
|
84
|
+
policyVersionId?: string | null;
|
|
85
|
+
} | ({
|
|
86
|
+
allowed: false;
|
|
87
|
+
} & ProtectedActionDenial);
|
|
88
|
+
interface WebhookIngestResult {
|
|
89
|
+
accepted: boolean;
|
|
90
|
+
duplicate: boolean;
|
|
91
|
+
providerEventKey?: string;
|
|
92
|
+
}
|
|
93
|
+
interface SafeAdminRecord {
|
|
94
|
+
id?: string;
|
|
95
|
+
[key: string]: string | number | boolean | null | undefined;
|
|
96
|
+
}
|
|
97
|
+
interface AdminHealthSnapshot {
|
|
98
|
+
generatedAt: string;
|
|
99
|
+
runtime: SafeAdminRecord[];
|
|
100
|
+
health: SafeAdminRecord[];
|
|
101
|
+
alerts: SafeAdminRecord[];
|
|
102
|
+
}
|
|
103
|
+
interface AdminRoutesSnapshot {
|
|
104
|
+
generatedAt: string;
|
|
105
|
+
routes: SafeAdminRecord[];
|
|
106
|
+
routeChanges: SafeAdminRecord[];
|
|
107
|
+
}
|
|
108
|
+
interface RouteChangeInput {
|
|
109
|
+
operation: 'propose' | 'approve' | 'apply';
|
|
110
|
+
targetRoutePolicyId?: string;
|
|
111
|
+
requestId?: string;
|
|
112
|
+
action?: 'activate' | 'drain' | 'rollback';
|
|
113
|
+
reasonCode?: string;
|
|
114
|
+
}
|
|
115
|
+
interface AdminCircuitsSnapshot {
|
|
116
|
+
generatedAt: string;
|
|
117
|
+
circuits: SafeAdminRecord[];
|
|
118
|
+
}
|
|
119
|
+
interface CircuitInput {
|
|
120
|
+
provider: string;
|
|
121
|
+
providerEnvironment: 'sandbox' | 'production';
|
|
122
|
+
status: 'healthy' | 'degraded' | 'unavailable' | 'circuit_open';
|
|
123
|
+
errorCode?: string;
|
|
124
|
+
circuitOpenUntil?: string;
|
|
125
|
+
}
|
|
126
|
+
interface AdminAttemptsSnapshot {
|
|
127
|
+
generatedAt: string;
|
|
128
|
+
attempts: SafeAdminRecord[];
|
|
129
|
+
}
|
|
130
|
+
interface AdminReviewSnapshot {
|
|
131
|
+
generatedAt: string;
|
|
132
|
+
appeals: SafeAdminRecord[];
|
|
133
|
+
manualExceptions: SafeAdminRecord[];
|
|
134
|
+
policyVersions: SafeAdminRecord[];
|
|
135
|
+
}
|
|
136
|
+
interface ReviewInput {
|
|
137
|
+
operation: 'begin_appeal_review' | 'propose_manual_exception' | 'approve_manual_exception' | 'apply_manual_exception';
|
|
138
|
+
appealId?: string;
|
|
139
|
+
requestId?: string;
|
|
140
|
+
packageCode?: VerificationPackageCode;
|
|
141
|
+
decision?: 'approve' | 'deny' | 'revoke' | 'request_more_information';
|
|
142
|
+
reasonCode?: string;
|
|
143
|
+
policyVersionId?: string;
|
|
144
|
+
evidenceReferenceHash?: string;
|
|
145
|
+
expiresAt?: string;
|
|
146
|
+
}
|
|
147
|
+
interface AdminAuditSnapshot {
|
|
148
|
+
generatedAt: string;
|
|
149
|
+
audit: SafeAdminRecord[];
|
|
150
|
+
}
|
|
151
|
+
interface AdminReconciliationSnapshot {
|
|
152
|
+
generatedAt: string;
|
|
153
|
+
jobs: SafeAdminRecord[];
|
|
154
|
+
queues: Record<string, number>;
|
|
155
|
+
}
|
|
156
|
+
interface ReconciliationInput {
|
|
157
|
+
attemptId: string;
|
|
158
|
+
}
|
|
159
|
+
interface AdminRedactionSnapshot {
|
|
160
|
+
generatedAt: string;
|
|
161
|
+
privacyRequests: SafeAdminRecord[];
|
|
162
|
+
jobs: SafeAdminRecord[];
|
|
163
|
+
}
|
|
164
|
+
interface RedactionInput {
|
|
165
|
+
privacyRequestId: string;
|
|
166
|
+
}
|
|
167
|
+
interface WorkerClaimInput {
|
|
168
|
+
queue: 'webhook' | 'reconciliation' | 'redaction' | 'dead_letter';
|
|
169
|
+
limit?: number;
|
|
170
|
+
}
|
|
171
|
+
interface WorkerClaimResult {
|
|
172
|
+
leases: Array<{
|
|
173
|
+
leaseId: string;
|
|
174
|
+
jobId: string;
|
|
175
|
+
queue: string;
|
|
176
|
+
}>;
|
|
177
|
+
}
|
|
178
|
+
interface WorkerProcessInput {
|
|
179
|
+
leaseId: string;
|
|
180
|
+
jobId: string;
|
|
181
|
+
}
|
|
182
|
+
interface WorkerProcessResult {
|
|
183
|
+
processed: boolean;
|
|
184
|
+
disposition: 'completed' | 'retryable' | 'dead_letter' | 'duplicate';
|
|
185
|
+
}
|
|
186
|
+
interface VerificationServerPlatform {
|
|
187
|
+
startSession(actor: ActorContext, input: StartSessionInput, idempotencyKey: string, request: Request): Promise<SessionEnvelopeV1>;
|
|
188
|
+
resumeSession(actor: ActorContext, input: SessionIdInput, request: Request): Promise<SessionEnvelopeV1>;
|
|
189
|
+
getSession(actor: ActorContext, attemptId: string): Promise<SessionEnvelopeV1>;
|
|
190
|
+
retrySession(actor: ActorContext, input: SessionIdInput, request: Request): Promise<SessionEnvelopeV1>;
|
|
191
|
+
pauseSession(actor: ActorContext, input: SessionIdInput): Promise<SessionMutationResult>;
|
|
192
|
+
cancelSession(actor: ActorContext, input: SessionIdInput): Promise<SessionMutationResult>;
|
|
193
|
+
createAppeal(actor: ActorContext, input: AppealInput, idempotencyKey: string): Promise<AppealResult>;
|
|
194
|
+
createSupportEscalation(actor: ActorContext, input: SupportEscalationInput, idempotencyKey: string): Promise<SupportEscalationResult>;
|
|
195
|
+
ingestWebhook(provider: string, request: Request): Promise<WebhookIngestResult>;
|
|
196
|
+
evaluateProtectedAction(actor: ActorContext, input: ProtectedActionInput, idempotencyKey: string): Promise<ProtectedActionDecision>;
|
|
197
|
+
admin: {
|
|
198
|
+
health(actor: ActorContext): Promise<AdminHealthSnapshot>;
|
|
199
|
+
routes(actor: ActorContext): Promise<AdminRoutesSnapshot>;
|
|
200
|
+
mutateRoute(actor: ActorContext, input: RouteChangeInput, idempotencyKey: string): Promise<SafeAdminRecord>;
|
|
201
|
+
circuits(actor: ActorContext): Promise<AdminCircuitsSnapshot>;
|
|
202
|
+
setCircuit(actor: ActorContext, input: CircuitInput, idempotencyKey: string): Promise<SafeAdminRecord>;
|
|
203
|
+
attempts(actor: ActorContext): Promise<AdminAttemptsSnapshot>;
|
|
204
|
+
review(actor: ActorContext): Promise<AdminReviewSnapshot>;
|
|
205
|
+
mutateReview(actor: ActorContext, input: ReviewInput, idempotencyKey: string): Promise<SafeAdminRecord>;
|
|
206
|
+
audit(actor: ActorContext): Promise<AdminAuditSnapshot>;
|
|
207
|
+
reconciliation(actor: ActorContext): Promise<AdminReconciliationSnapshot>;
|
|
208
|
+
enqueueReconciliation(actor: ActorContext, input: ReconciliationInput, idempotencyKey: string): Promise<SafeAdminRecord>;
|
|
209
|
+
redaction(actor: ActorContext): Promise<AdminRedactionSnapshot>;
|
|
210
|
+
approveRedaction(actor: ActorContext, input: RedactionInput, idempotencyKey: string): Promise<SafeAdminRecord>;
|
|
211
|
+
};
|
|
212
|
+
workers: {
|
|
213
|
+
claim(actor: ActorContext, input: WorkerClaimInput, idempotencyKey: string): Promise<WorkerClaimResult>;
|
|
214
|
+
process(actor: ActorContext, input: WorkerProcessInput, idempotencyKey: string): Promise<WorkerProcessResult>;
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
interface VerificationFetchHandlerOptions {
|
|
218
|
+
resolveActor(request: Request): Promise<ActorContext>;
|
|
219
|
+
allowedOrigins?: string[];
|
|
220
|
+
isCookieAuthenticated?(request: Request): boolean;
|
|
221
|
+
basePath?: string;
|
|
222
|
+
maxBodyBytes?: number;
|
|
223
|
+
supportPath?: string;
|
|
224
|
+
rateLimit?(actor: ActorContext, routeId: string): Promise<{
|
|
225
|
+
allowed: boolean;
|
|
226
|
+
retryAfterSeconds?: number;
|
|
227
|
+
}>;
|
|
228
|
+
}
|
|
229
|
+
declare const FORBIDDEN_CLIENT_FIELDS: readonly ["provider", "launcherKey", "templateId", "workflowId", "apiOrigin", "environment", "configurationRevision", "adapter", "adapterVersion", "routePolicyId"];
|
|
230
|
+
|
|
231
|
+
export { type AdminAttemptsSnapshot as A, type CircuitInput as C, FORBIDDEN_CLIENT_FIELDS as F, type ProtectedActionDecision as P, type ReconciliationInput as R, SESSION_CONTRACT_VERSION as S, type VerificationFetchHandlerOptions as V, type WebhookIngestResult as W, type VerificationServerPlatform as a, type AdminAuditSnapshot as b, type AdminCircuitsSnapshot as c, type AdminHealthSnapshot as d, type AdminReconciliationSnapshot as e, type AdminRedactionSnapshot as f, type AdminReviewSnapshot as g, type AdminRoutesSnapshot as h, type AppealInput as i, type AppealResult as j, type ProtectedActionInput as k, type RedactionInput as l, type ReviewInput as m, type RouteChangeInput as n, type SafeAdminRecord as o, type SessionContinuationV1 as p, type SessionEnvelopeV1 as q, type SessionIdInput as r, type SessionMutationResult as s, type StartSessionInput as t, type SupportEscalationInput as u, type SupportEscalationResult as v, type WorkerClaimInput as w, type WorkerClaimResult as x, type WorkerProcessInput as y, type WorkerProcessResult as z };
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import { ActorContext, VerificationPackageCode, ProviderOrganizationInput, ProviderRelationshipInput, ProviderAssociatedPersonInput, VerificationCanonicalStatus, VerificationLaunchPresentation, ProviderLaunchEnvelope, ProtectedActionDenial } from '@splitin/verification-adapter-sdk';
|
|
2
|
+
|
|
3
|
+
declare const SESSION_CONTRACT_VERSION: "1.0.0";
|
|
4
|
+
interface SessionContinuationV1 {
|
|
5
|
+
key: string;
|
|
6
|
+
token: string;
|
|
7
|
+
expiresAt: string;
|
|
8
|
+
}
|
|
9
|
+
interface SessionEnvelopeV1 {
|
|
10
|
+
contractVersion: typeof SESSION_CONTRACT_VERSION;
|
|
11
|
+
attemptId: string;
|
|
12
|
+
packageCode: VerificationPackageCode;
|
|
13
|
+
status: VerificationCanonicalStatus;
|
|
14
|
+
presentation: VerificationLaunchPresentation;
|
|
15
|
+
launch: ProviderLaunchEnvelope | null;
|
|
16
|
+
launcherKey: string | null;
|
|
17
|
+
providerDisclosure: string | null;
|
|
18
|
+
safeErrorCode: string | null;
|
|
19
|
+
retryAfter: string | null;
|
|
20
|
+
supportPath: string | null;
|
|
21
|
+
expiresAt: string | null;
|
|
22
|
+
canResume: boolean;
|
|
23
|
+
canRetry: boolean;
|
|
24
|
+
continuation: SessionContinuationV1 | null;
|
|
25
|
+
}
|
|
26
|
+
interface SessionMutationResult {
|
|
27
|
+
attemptId: string;
|
|
28
|
+
status: VerificationCanonicalStatus;
|
|
29
|
+
paused?: boolean;
|
|
30
|
+
canceled?: boolean;
|
|
31
|
+
canResume?: boolean;
|
|
32
|
+
canRetry?: boolean;
|
|
33
|
+
}
|
|
34
|
+
interface StartSessionInput {
|
|
35
|
+
packageCode: VerificationPackageCode;
|
|
36
|
+
countryCode?: string;
|
|
37
|
+
action?: string;
|
|
38
|
+
resourceType?: string;
|
|
39
|
+
resourceReference?: string;
|
|
40
|
+
subjectReference?: string;
|
|
41
|
+
continuationToken?: string;
|
|
42
|
+
continuationKey?: string;
|
|
43
|
+
legalFirstName?: string | null;
|
|
44
|
+
legalLastName?: string | null;
|
|
45
|
+
email?: string | null;
|
|
46
|
+
organization?: ProviderOrganizationInput | null;
|
|
47
|
+
relationship?: ProviderRelationshipInput | null;
|
|
48
|
+
associatedPerson?: ProviderAssociatedPersonInput | null;
|
|
49
|
+
evidenceReferences?: string[];
|
|
50
|
+
metadata?: Record<string, string | number | boolean | null>;
|
|
51
|
+
}
|
|
52
|
+
interface SessionIdInput {
|
|
53
|
+
attemptId: string;
|
|
54
|
+
idempotencyKey: string;
|
|
55
|
+
}
|
|
56
|
+
interface AppealInput {
|
|
57
|
+
attemptId?: string;
|
|
58
|
+
reasonCode: string;
|
|
59
|
+
nonBiometricPathRequested?: boolean;
|
|
60
|
+
details?: string;
|
|
61
|
+
}
|
|
62
|
+
interface AppealResult {
|
|
63
|
+
appealId: string;
|
|
64
|
+
status: 'open' | 'in_review' | 'resolved' | 'rejected';
|
|
65
|
+
}
|
|
66
|
+
interface SupportEscalationInput {
|
|
67
|
+
attemptId?: string;
|
|
68
|
+
appealId?: string;
|
|
69
|
+
reasonCode: string;
|
|
70
|
+
message?: string;
|
|
71
|
+
}
|
|
72
|
+
interface SupportEscalationResult {
|
|
73
|
+
escalationId: string;
|
|
74
|
+
status: 'open';
|
|
75
|
+
}
|
|
76
|
+
interface ProtectedActionInput {
|
|
77
|
+
action: string;
|
|
78
|
+
resourceType?: string;
|
|
79
|
+
resourceReference?: string;
|
|
80
|
+
}
|
|
81
|
+
type ProtectedActionDecision = {
|
|
82
|
+
allowed: true;
|
|
83
|
+
enforcementActive: boolean;
|
|
84
|
+
policyVersionId?: string | null;
|
|
85
|
+
} | ({
|
|
86
|
+
allowed: false;
|
|
87
|
+
} & ProtectedActionDenial);
|
|
88
|
+
interface WebhookIngestResult {
|
|
89
|
+
accepted: boolean;
|
|
90
|
+
duplicate: boolean;
|
|
91
|
+
providerEventKey?: string;
|
|
92
|
+
}
|
|
93
|
+
interface SafeAdminRecord {
|
|
94
|
+
id?: string;
|
|
95
|
+
[key: string]: string | number | boolean | null | undefined;
|
|
96
|
+
}
|
|
97
|
+
interface AdminHealthSnapshot {
|
|
98
|
+
generatedAt: string;
|
|
99
|
+
runtime: SafeAdminRecord[];
|
|
100
|
+
health: SafeAdminRecord[];
|
|
101
|
+
alerts: SafeAdminRecord[];
|
|
102
|
+
}
|
|
103
|
+
interface AdminRoutesSnapshot {
|
|
104
|
+
generatedAt: string;
|
|
105
|
+
routes: SafeAdminRecord[];
|
|
106
|
+
routeChanges: SafeAdminRecord[];
|
|
107
|
+
}
|
|
108
|
+
interface RouteChangeInput {
|
|
109
|
+
operation: 'propose' | 'approve' | 'apply';
|
|
110
|
+
targetRoutePolicyId?: string;
|
|
111
|
+
requestId?: string;
|
|
112
|
+
action?: 'activate' | 'drain' | 'rollback';
|
|
113
|
+
reasonCode?: string;
|
|
114
|
+
}
|
|
115
|
+
interface AdminCircuitsSnapshot {
|
|
116
|
+
generatedAt: string;
|
|
117
|
+
circuits: SafeAdminRecord[];
|
|
118
|
+
}
|
|
119
|
+
interface CircuitInput {
|
|
120
|
+
provider: string;
|
|
121
|
+
providerEnvironment: 'sandbox' | 'production';
|
|
122
|
+
status: 'healthy' | 'degraded' | 'unavailable' | 'circuit_open';
|
|
123
|
+
errorCode?: string;
|
|
124
|
+
circuitOpenUntil?: string;
|
|
125
|
+
}
|
|
126
|
+
interface AdminAttemptsSnapshot {
|
|
127
|
+
generatedAt: string;
|
|
128
|
+
attempts: SafeAdminRecord[];
|
|
129
|
+
}
|
|
130
|
+
interface AdminReviewSnapshot {
|
|
131
|
+
generatedAt: string;
|
|
132
|
+
appeals: SafeAdminRecord[];
|
|
133
|
+
manualExceptions: SafeAdminRecord[];
|
|
134
|
+
policyVersions: SafeAdminRecord[];
|
|
135
|
+
}
|
|
136
|
+
interface ReviewInput {
|
|
137
|
+
operation: 'begin_appeal_review' | 'propose_manual_exception' | 'approve_manual_exception' | 'apply_manual_exception';
|
|
138
|
+
appealId?: string;
|
|
139
|
+
requestId?: string;
|
|
140
|
+
packageCode?: VerificationPackageCode;
|
|
141
|
+
decision?: 'approve' | 'deny' | 'revoke' | 'request_more_information';
|
|
142
|
+
reasonCode?: string;
|
|
143
|
+
policyVersionId?: string;
|
|
144
|
+
evidenceReferenceHash?: string;
|
|
145
|
+
expiresAt?: string;
|
|
146
|
+
}
|
|
147
|
+
interface AdminAuditSnapshot {
|
|
148
|
+
generatedAt: string;
|
|
149
|
+
audit: SafeAdminRecord[];
|
|
150
|
+
}
|
|
151
|
+
interface AdminReconciliationSnapshot {
|
|
152
|
+
generatedAt: string;
|
|
153
|
+
jobs: SafeAdminRecord[];
|
|
154
|
+
queues: Record<string, number>;
|
|
155
|
+
}
|
|
156
|
+
interface ReconciliationInput {
|
|
157
|
+
attemptId: string;
|
|
158
|
+
}
|
|
159
|
+
interface AdminRedactionSnapshot {
|
|
160
|
+
generatedAt: string;
|
|
161
|
+
privacyRequests: SafeAdminRecord[];
|
|
162
|
+
jobs: SafeAdminRecord[];
|
|
163
|
+
}
|
|
164
|
+
interface RedactionInput {
|
|
165
|
+
privacyRequestId: string;
|
|
166
|
+
}
|
|
167
|
+
interface WorkerClaimInput {
|
|
168
|
+
queue: 'webhook' | 'reconciliation' | 'redaction' | 'dead_letter';
|
|
169
|
+
limit?: number;
|
|
170
|
+
}
|
|
171
|
+
interface WorkerClaimResult {
|
|
172
|
+
leases: Array<{
|
|
173
|
+
leaseId: string;
|
|
174
|
+
jobId: string;
|
|
175
|
+
queue: string;
|
|
176
|
+
}>;
|
|
177
|
+
}
|
|
178
|
+
interface WorkerProcessInput {
|
|
179
|
+
leaseId: string;
|
|
180
|
+
jobId: string;
|
|
181
|
+
}
|
|
182
|
+
interface WorkerProcessResult {
|
|
183
|
+
processed: boolean;
|
|
184
|
+
disposition: 'completed' | 'retryable' | 'dead_letter' | 'duplicate';
|
|
185
|
+
}
|
|
186
|
+
interface VerificationServerPlatform {
|
|
187
|
+
startSession(actor: ActorContext, input: StartSessionInput, idempotencyKey: string, request: Request): Promise<SessionEnvelopeV1>;
|
|
188
|
+
resumeSession(actor: ActorContext, input: SessionIdInput, request: Request): Promise<SessionEnvelopeV1>;
|
|
189
|
+
getSession(actor: ActorContext, attemptId: string): Promise<SessionEnvelopeV1>;
|
|
190
|
+
retrySession(actor: ActorContext, input: SessionIdInput, request: Request): Promise<SessionEnvelopeV1>;
|
|
191
|
+
pauseSession(actor: ActorContext, input: SessionIdInput): Promise<SessionMutationResult>;
|
|
192
|
+
cancelSession(actor: ActorContext, input: SessionIdInput): Promise<SessionMutationResult>;
|
|
193
|
+
createAppeal(actor: ActorContext, input: AppealInput, idempotencyKey: string): Promise<AppealResult>;
|
|
194
|
+
createSupportEscalation(actor: ActorContext, input: SupportEscalationInput, idempotencyKey: string): Promise<SupportEscalationResult>;
|
|
195
|
+
ingestWebhook(provider: string, request: Request): Promise<WebhookIngestResult>;
|
|
196
|
+
evaluateProtectedAction(actor: ActorContext, input: ProtectedActionInput, idempotencyKey: string): Promise<ProtectedActionDecision>;
|
|
197
|
+
admin: {
|
|
198
|
+
health(actor: ActorContext): Promise<AdminHealthSnapshot>;
|
|
199
|
+
routes(actor: ActorContext): Promise<AdminRoutesSnapshot>;
|
|
200
|
+
mutateRoute(actor: ActorContext, input: RouteChangeInput, idempotencyKey: string): Promise<SafeAdminRecord>;
|
|
201
|
+
circuits(actor: ActorContext): Promise<AdminCircuitsSnapshot>;
|
|
202
|
+
setCircuit(actor: ActorContext, input: CircuitInput, idempotencyKey: string): Promise<SafeAdminRecord>;
|
|
203
|
+
attempts(actor: ActorContext): Promise<AdminAttemptsSnapshot>;
|
|
204
|
+
review(actor: ActorContext): Promise<AdminReviewSnapshot>;
|
|
205
|
+
mutateReview(actor: ActorContext, input: ReviewInput, idempotencyKey: string): Promise<SafeAdminRecord>;
|
|
206
|
+
audit(actor: ActorContext): Promise<AdminAuditSnapshot>;
|
|
207
|
+
reconciliation(actor: ActorContext): Promise<AdminReconciliationSnapshot>;
|
|
208
|
+
enqueueReconciliation(actor: ActorContext, input: ReconciliationInput, idempotencyKey: string): Promise<SafeAdminRecord>;
|
|
209
|
+
redaction(actor: ActorContext): Promise<AdminRedactionSnapshot>;
|
|
210
|
+
approveRedaction(actor: ActorContext, input: RedactionInput, idempotencyKey: string): Promise<SafeAdminRecord>;
|
|
211
|
+
};
|
|
212
|
+
workers: {
|
|
213
|
+
claim(actor: ActorContext, input: WorkerClaimInput, idempotencyKey: string): Promise<WorkerClaimResult>;
|
|
214
|
+
process(actor: ActorContext, input: WorkerProcessInput, idempotencyKey: string): Promise<WorkerProcessResult>;
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
interface VerificationFetchHandlerOptions {
|
|
218
|
+
resolveActor(request: Request): Promise<ActorContext>;
|
|
219
|
+
allowedOrigins?: string[];
|
|
220
|
+
isCookieAuthenticated?(request: Request): boolean;
|
|
221
|
+
basePath?: string;
|
|
222
|
+
maxBodyBytes?: number;
|
|
223
|
+
supportPath?: string;
|
|
224
|
+
rateLimit?(actor: ActorContext, routeId: string): Promise<{
|
|
225
|
+
allowed: boolean;
|
|
226
|
+
retryAfterSeconds?: number;
|
|
227
|
+
}>;
|
|
228
|
+
}
|
|
229
|
+
declare const FORBIDDEN_CLIENT_FIELDS: readonly ["provider", "launcherKey", "templateId", "workflowId", "apiOrigin", "environment", "configurationRevision", "adapter", "adapterVersion", "routePolicyId"];
|
|
230
|
+
|
|
231
|
+
export { type AdminAttemptsSnapshot as A, type CircuitInput as C, FORBIDDEN_CLIENT_FIELDS as F, type ProtectedActionDecision as P, type ReconciliationInput as R, SESSION_CONTRACT_VERSION as S, type VerificationFetchHandlerOptions as V, type WebhookIngestResult as W, type VerificationServerPlatform as a, type AdminAuditSnapshot as b, type AdminCircuitsSnapshot as c, type AdminHealthSnapshot as d, type AdminReconciliationSnapshot as e, type AdminRedactionSnapshot as f, type AdminReviewSnapshot as g, type AdminRoutesSnapshot as h, type AppealInput as i, type AppealResult as j, type ProtectedActionInput as k, type RedactionInput as l, type ReviewInput as m, type RouteChangeInput as n, type SafeAdminRecord as o, type SessionContinuationV1 as p, type SessionEnvelopeV1 as q, type SessionIdInput as r, type SessionMutationResult as s, type StartSessionInput as t, type SupportEscalationInput as u, type SupportEscalationResult as v, type WorkerClaimInput as w, type WorkerClaimResult as x, type WorkerProcessInput as y, type WorkerProcessResult as z };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-MNGUwN4G.d.ts","sources":["types-MNGUwN4G.d.ts"],"names":[],"mappings":"AAAA"}
|