@digilogiclabs/platform-core 1.5.1 → 1.7.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/dist/index.d.mts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { p as ILogger, q as IMetrics, I as IPlatform, P as PlatformHealthStatus, u as MetricsSummary, v as ICrypto, w as EncryptOptions, x as EncryptedField, D as DeterministicEncryptedField, K as KeyRotationResult, y as CryptoKeyMetadata, e as IDatabase, k as IQueryBuilder, Q as QueryResult, l as ICache, m as IStorage, U as UploadOptions, S as StorageFile, n as IEmail, t as EmailMessage, z as EmailResult, o as IQueue, s as JobOptions, J as Job, R as RepeatOptions, A as JobState, B as JobEventType, F as JobEventHandler, G as IAI, H as AIConfig, L as AIChatRequest, O as AIChatResponse, T as AIStreamChunk, V as AIStreamCallback, W as AICompletionRequest, X as AICompletionResponse, Y as AIEmbeddingRequest, Z as AIEmbeddingResponse, _ as AIModelConfig, $ as AIModelType, a0 as AIProvider, a1 as IRAG, a2 as RAGConfig, a3 as CreateCollectionOptions, a4 as RAGCollection, a5 as RAGDocument, a6 as IngestionOptions, a7 as BulkIngestionResult, a8 as IngestionResult, a9 as DocumentStatus, aa as RAGChunk, ab as RAGSearchQuery, ac as RAGSearchResponse, ad as RAGSearchResult, ae as ContextAssemblyConfig, af as AssembledContext, ag as RAGPipeline } from './ConsoleEmail-ubSVWgTa.mjs';
2
2
  export { aI as AIChatChoice, br as AIConfigSchema, aO as AIError, aN as AIErrorCode, aC as AIErrorMessages, aJ as AIFinishReason, aF as AIMessage, bk as AIProviderSchema, aE as AIRole, aM as AIRouterConfig, aH as AITool, aG as AIToolCall, aK as AIUsageInfo, am as BackoffOptions, by as BulkheadConfigSchema, bI as CacheConfig, bn as CacheConfigSchema, be as CacheProviderSchema, aS as ChunkingConfig, aQ as ChunkingPresets, aR as ChunkingStrategy, bw as CircuitBreakerConfigSchema, C as ConsoleEmail, h as ConsoleLogger, aX as CryptoAlgorithm, bP as CryptoConfig, bt as CryptoConfigSchema, aW as CryptoKeyStatus, bH as DatabaseConfig, bm as DatabaseConfigSchema, bd as DatabaseProviderSchema, b7 as EmailAddress, b8 as EmailAttachment, bK as EmailConfig, bp as EmailConfigSchema, bg as EmailProviderSchema, E as EnvSecrets, aw as GetSecretOptions, as as HistogramStats, ah as ICacheOptions, r as ISecrets, b1 as ISpan, b0 as ITracing, aj as JobContext, ak as JobEvent, ai as JobResult, ap as LogEntry, an as LogLevel, bj as LogLevelSchema, ao as LogMeta, aq as LoggerConfig, bA as LoggingConfigSchema, aD as MemoryAI, a as MemoryCache, M as MemoryDatabase, c as MemoryEmail, i as MemoryMetrics, d as MemoryQueue, aP as MemoryRAG, f as MemorySecrets, b as MemoryStorage, a_ as MemoryTracing, ar as MetricTags, bB as MetricsConfigSchema, bO as MiddlewareConfig, bE as MiddlewareConfigSchema, N as NoopLogger, j as NoopMetrics, a$ as NoopTracing, bN as ObservabilityConfig, bD as ObservabilityConfigSchema, bG as PlatformConfig, bF as PlatformConfigSchema, bL as QueueConfig, bq as QueueConfigSchema, bh as QueueProviderSchema, al as QueueStats, bs as RAGConfigSchema, aU as RAGFilter, aV as RAGPipelineStep, bl as RAGProviderSchema, bM as ResilienceConfig, bz as ResilienceConfigSchema, bv as RetryConfigSchema, ay as RotateSecretOptions, az as RotationResult, aL as RoutingStrategy, aT as SearchMode, au as Secret, av as SecretMetadata, bQ as SecurityConfig, bu as SecurityConfigSchema, ax as SetSecretOptions, b2 as SpanContext, bc as SpanEvent, b5 as SpanKind, b3 as SpanOptions, b4 as SpanStatus, bb as SpanStatusCode, bJ as StorageConfig, bo as StorageConfigSchema, bf as StorageProviderSchema, bx as TimeoutConfigSchema, at as TimingStats, b6 as TracingConfig, bC as TracingConfigSchema, bi as TracingProviderSchema, b9 as calculateBackoff, aA as createAIError, g as createPlatform, aY as createPlatformAsync, aZ as createScopedMetrics, ba as generateJobId, bU as getDefaultConfig, aB as isAIError, bR as loadConfig, bT as safeValidateConfig, bS as validateConfig } from './ConsoleEmail-ubSVWgTa.mjs';
3
3
  export { t as IMigrationDatabase, I as IMigrator, n as Migration, o as MigrationRecord, p as MigrationResult, q as MigrationStatus, M as Migrator, r as MigratorConfig, S as SQL, f as createDomainVerificationsTable, c as createMigration, b as createSsoOidcConfigsTable, m as createSsoSessionsTable, k as createTenantInvitationsTable, j as createTenantMembersTable, l as createTenantUsageTable, i as createTenantsTable, h as createVerifiedDomainsTable, d as defineMigration, e as enterpriseMigrations, g as generateVersion, a as getEnterpriseMigrations, s as sqlMigration } from './index-CepDdu7h.mjs';
4
+ export { as as AllowlistConfig, A as ApiError, k as ApiErrorCode, m as ApiErrorCodeType, o as ApiPaginatedResponse, _ as ApiSecurityConfig, a0 as ApiSecurityContext, n as ApiSuccessResponse, aK as AuditRequest, P as AuthCookiesConfig, W as AuthMethod, C as CommonApiErrors, ay as CommonRateLimits, aj as DateRangeInput, ad as DateRangeSchema, an as DeploymentStage, ah as EmailInput, a6 as EmailSchema, E as EnvValidationConfig, x as EnvValidationResult, ap as FlagDefinition, aq as FlagDefinitions, ao as FlagValue, aW as HTML_TAG_PATTERN, z as KEYCLOAK_DEFAULT_ROLES, N as KeycloakCallbacksConfig, K as KeycloakConfig, O as KeycloakJwtFields, y as KeycloakTokenSet, al as LoginInput, af as LoginSchema, aF as OpsAuditActor, aH as OpsAuditEvent, aJ as OpsAuditLoggerOptions, aI as OpsAuditRecord, aG as OpsAuditResource, aX as PG_ERROR_MAP, ai as PaginationInput, ac as PaginationSchema, a7 as PasswordSchema, aa as PersonNameSchema, a9 as PhoneSchema, ax as RateLimitCheckResult, b as RateLimitOptions, Y as RateLimitPreset, a as RateLimitRule, R as RateLimitStore, S as RedirectCallbackConfig, ar as ResolvedFlags, X as RouteAuditConfig, ak as SearchQueryInput, ae as SearchQuerySchema, $ as SecuritySession, am as SignupInput, ag as SignupSchema, a8 as SlugSchema, aM as StandardAuditActionType, aL as StandardAuditActions, Z as StandardRateLimitPresets, T as TokenRefreshResult, aV as URL_DOMAIN_PATTERN, aU as URL_PROTOCOL_PATTERN, a5 as WrapperPresets, av as buildAllowlist, Q as buildAuthCookies, a4 as buildErrorBody, V as buildKeycloakCallbacks, l as buildPagination, a3 as buildRateLimitHeaders, aD as buildRateLimitResponseHeaders, U as buildRedirectCallback, I as buildTokenRefreshParams, u as checkEnvVars, aA as checkRateLimit, i as classifyError, c as constantTimeEqual, f as containsHtml, d as containsUrls, aQ as createAuditActor, aR as createAuditLogger, au as createFeatureFlags, az as createMemoryRateLimitStore, ab as createSafeTextSchema, aS as defangUrl, at as detectStage, e as escapeHtml, aN as extractAuditIp, aP as extractAuditRequestId, aO as extractAuditUserAgent, a2 as extractClientIp, r as getBoolEnv, h as getCorrelationId, L as getEndSessionEndpoint, w as getEnvSummary, t as getIntEnv, q as getOptionalEnv, aB as getRateLimitStatus, p as getRequiredEnv, J as getTokenEndpoint, G as hasAllRoles, F as hasAnyRole, D as hasRole, aw as isAllowlisted, j as isApiError, H as isTokenExpired, B as parseKeycloakRoles, M as refreshKeycloakToken, aC as resetRateLimitForKey, aE as resolveIdentifier, a1 as resolveRateLimitIdentifier, g as sanitizeApiError, aT as sanitizeForEmail, s as stripHtml, v as validateEnvVars } from './env-DerQ7Da-.mjs';
4
5
  export { NextHeaderEntry, SecurityHeaderPresets, SecurityHeadersConfig, generateSecurityHeaders } from './security-headers.mjs';
5
- export { AllowlistConfig, ApiSecurityConfig, ApiSecurityContext, AuditRequest, AuthCookiesConfig, AuthMethod, CommonRateLimits, DateRangeInput, DateRangeSchema, DeploymentStage, EmailInput, EmailSchema, FlagDefinition, FlagDefinitions, FlagValue, KEYCLOAK_DEFAULT_ROLES, KeycloakCallbacksConfig, KeycloakConfig, KeycloakJwtFields, KeycloakTokenSet, LoginInput, LoginSchema, OpsAuditActor, OpsAuditEvent, OpsAuditLoggerOptions, OpsAuditRecord, OpsAuditResource, PaginationInput, PaginationSchema, PasswordSchema, PersonNameSchema, PhoneSchema, RateLimitCheckResult, RateLimitOptions, RateLimitPreset, RateLimitRule, RateLimitStore, RedirectCallbackConfig, ResolvedFlags, RouteAuditConfig, SearchQueryInput, SearchQuerySchema, SecuritySession, SignupInput, SignupSchema, SlugSchema, StandardAuditActionType, StandardAuditActions, StandardRateLimitPresets, TokenRefreshResult, WrapperPresets, buildAllowlist, buildAuthCookies, buildErrorBody, buildKeycloakCallbacks, buildRateLimitHeaders, buildRateLimitResponseHeaders, buildRedirectCallback, buildTokenRefreshParams, checkRateLimit, createAuditActor, createAuditLogger, createFeatureFlags, createMemoryRateLimitStore, createSafeTextSchema, detectStage, extractAuditIp, extractAuditRequestId, extractAuditUserAgent, extractClientIp, getEndSessionEndpoint, getRateLimitStatus, getTokenEndpoint, hasAllRoles, hasAnyRole, hasRole, isAllowlisted, isTokenExpired, parseKeycloakRoles, refreshKeycloakToken, resetRateLimitForKey, resolveIdentifier, resolveRateLimitIdentifier } from './auth.mjs';
6
6
  import { SupabaseClient } from '@supabase/supabase-js';
7
7
  import { Pool } from 'pg';
8
8
  import { Redis } from '@upstash/redis';
@@ -10185,176 +10185,6 @@ declare const FallbackStrategies: {
10185
10185
  degrade: <T>(getDegraded: (error: Error) => T) => FallbackOptions<T>;
10186
10186
  };
10187
10187
 
10188
- /**
10189
- * Security Utilities
10190
- *
10191
- * HTML escaping, input detection, sanitization helpers,
10192
- * timing-safe comparison, error sanitization, and request
10193
- * correlation for safe, consistent security across all apps.
10194
- */
10195
- /** Regex for protocol-prefixed URLs */
10196
- declare const URL_PROTOCOL_PATTERN: RegExp;
10197
- /** Regex for bare domain names with common TLDs */
10198
- declare const URL_DOMAIN_PATTERN: RegExp;
10199
- /** Regex for HTML tags */
10200
- declare const HTML_TAG_PATTERN: RegExp;
10201
- /**
10202
- * Escape HTML special characters to prevent injection.
10203
- * Use when inserting user content into HTML email templates or rendered HTML.
10204
- */
10205
- declare function escapeHtml(str: string): string;
10206
- /** Check if a string contains protocol-prefixed URLs or bare domains */
10207
- declare function containsUrls(str: string): boolean;
10208
- /** Check if a string contains HTML tags */
10209
- declare function containsHtml(str: string): boolean;
10210
- /** Strip all HTML tags from a string */
10211
- declare function stripHtml(str: string): string;
10212
- /**
10213
- * Defang URLs to prevent auto-linking in email clients.
10214
- * Converts https://evil.com → hxxps://evil[.]com
10215
- */
10216
- declare function defangUrl(str: string): string;
10217
- /**
10218
- * Sanitize user content for safe insertion into HTML email templates.
10219
- * Escapes HTML entities AND defangs any URLs that slipped through validation.
10220
- */
10221
- declare function sanitizeForEmail(str: string): string;
10222
- /**
10223
- * Constant-time string comparison to prevent timing side-channel attacks.
10224
- * Use for comparing secrets, tokens, API keys, HMAC signatures, etc.
10225
- *
10226
- * Returns false (not throws) for length mismatches — still constant-time
10227
- * relative to the shorter string to avoid leaking length info.
10228
- *
10229
- * @example
10230
- * ```typescript
10231
- * if (!constantTimeEqual(providedToken, expectedSecret)) {
10232
- * return { status: 401, error: 'Invalid token' }
10233
- * }
10234
- * ```
10235
- */
10236
- declare function constantTimeEqual(a: string, b: string): boolean;
10237
- /**
10238
- * Sanitize an error for client-facing API responses.
10239
- *
10240
- * - 4xx errors: returns the actual message (client needs to know what went wrong)
10241
- * - 5xx errors: returns a generic message (never leak internals to clients)
10242
- * - Development mode: optionally includes stack trace for debugging
10243
- *
10244
- * @example
10245
- * ```typescript
10246
- * catch (error) {
10247
- * const { message, code } = sanitizeApiError(error, 500)
10248
- * return Response.json({ error: message, code }, { status: 500 })
10249
- * }
10250
- * ```
10251
- */
10252
- declare function sanitizeApiError(error: unknown, statusCode: number, isDevelopment?: boolean): {
10253
- message: string;
10254
- code?: string;
10255
- stack?: string;
10256
- };
10257
- /**
10258
- * Extract a correlation/request ID from standard headers, or generate one.
10259
- *
10260
- * Checks (in order): X-Request-ID, X-Correlation-ID, then falls back to
10261
- * crypto.randomUUID(). Works with any headers-like object (plain object,
10262
- * Headers API, or a getter function).
10263
- *
10264
- * @example
10265
- * ```typescript
10266
- * // With Next.js request
10267
- * const id = getCorrelationId((name) => request.headers.get(name))
10268
- *
10269
- * // With plain object
10270
- * const id = getCorrelationId({ 'x-request-id': 'abc-123' })
10271
- * ```
10272
- */
10273
- declare function getCorrelationId(headers: Record<string, string | string[] | undefined> | ((name: string) => string | null | undefined)): string;
10274
-
10275
- /**
10276
- * API Utilities
10277
- *
10278
- * Framework-agnostic error codes, error class, response types,
10279
- * and database error mapping for consistent API behavior across apps.
10280
- */
10281
- /** Standard API error codes */
10282
- declare const ApiErrorCode: {
10283
- readonly VALIDATION_ERROR: "VALIDATION_ERROR";
10284
- readonly UNAUTHORIZED: "UNAUTHORIZED";
10285
- readonly FORBIDDEN: "FORBIDDEN";
10286
- readonly NOT_FOUND: "NOT_FOUND";
10287
- readonly CONFLICT: "CONFLICT";
10288
- readonly RATE_LIMIT_EXCEEDED: "RATE_LIMIT_EXCEEDED";
10289
- readonly INTERNAL_ERROR: "INTERNAL_ERROR";
10290
- readonly DATABASE_ERROR: "DATABASE_ERROR";
10291
- readonly EXTERNAL_SERVICE_ERROR: "EXTERNAL_SERVICE_ERROR";
10292
- readonly CONFIGURATION_ERROR: "CONFIGURATION_ERROR";
10293
- };
10294
- type ApiErrorCodeType = (typeof ApiErrorCode)[keyof typeof ApiErrorCode];
10295
- /** Custom API Error class with status code and error code */
10296
- declare class ApiError extends Error {
10297
- readonly statusCode: number;
10298
- readonly code: ApiErrorCodeType;
10299
- readonly details?: unknown;
10300
- constructor(statusCode: number, message: string, code?: ApiErrorCodeType, details?: unknown);
10301
- }
10302
- /** Type guard for ApiError */
10303
- declare function isApiError(error: unknown): error is ApiError;
10304
- /** Pre-built error factories */
10305
- declare const CommonApiErrors: {
10306
- unauthorized: (msg?: string) => ApiError;
10307
- forbidden: (msg?: string) => ApiError;
10308
- notFound: (resource?: string) => ApiError;
10309
- conflict: (msg?: string) => ApiError;
10310
- rateLimitExceeded: (msg?: string) => ApiError;
10311
- validationError: (details?: unknown) => ApiError;
10312
- internalError: (msg?: string) => ApiError;
10313
- };
10314
- /** PostgreSQL error code → HTTP status mapping */
10315
- declare const PG_ERROR_MAP: Record<string, {
10316
- status: number;
10317
- code: ApiErrorCodeType;
10318
- message: string;
10319
- }>;
10320
- /**
10321
- * Classify any error into a standardized shape.
10322
- * Framework-agnostic — returns a plain object, not an HTTP response.
10323
- */
10324
- declare function classifyError(error: unknown, isDev?: boolean): {
10325
- status: number;
10326
- body: {
10327
- error: string;
10328
- code: string;
10329
- details?: unknown;
10330
- };
10331
- };
10332
- /** Standard success response shape */
10333
- interface ApiSuccessResponse<T = unknown> {
10334
- success: true;
10335
- data: T;
10336
- message?: string;
10337
- timestamp?: string;
10338
- }
10339
- /** Standard paginated response shape */
10340
- interface ApiPaginatedResponse<T = unknown> extends ApiSuccessResponse<T[]> {
10341
- pagination: {
10342
- page: number;
10343
- limit: number;
10344
- total: number;
10345
- totalPages: number;
10346
- hasMore: boolean;
10347
- };
10348
- }
10349
- /** Build a pagination metadata object */
10350
- declare function buildPagination(page: number, limit: number, total: number): {
10351
- page: number;
10352
- limit: number;
10353
- total: number;
10354
- totalPages: number;
10355
- hasMore: boolean;
10356
- };
10357
-
10358
10188
  /**
10359
10189
  * Health Check HTTP Endpoints
10360
10190
  *
@@ -13211,91 +13041,6 @@ declare class PostgresTenant implements ITenant {
13211
13041
  private mapRowToInvitation;
13212
13042
  }
13213
13043
 
13214
- /**
13215
- * Environment Variable Helpers
13216
- *
13217
- * Type-safe, fail-fast utilities for reading environment variables.
13218
- * Every app needs these — extracted from DLL, WIAN, and OSS patterns.
13219
- *
13220
- * @example
13221
- * ```typescript
13222
- * import { getRequiredEnv, getOptionalEnv, getBoolEnv, validateEnvVars } from '@digilogiclabs/platform-core'
13223
- *
13224
- * const config = {
13225
- * stripe: { secretKey: getRequiredEnv('STRIPE_SECRET_KEY') },
13226
- * redis: { url: getOptionalEnv('REDIS_URL', '') },
13227
- * features: { debug: getBoolEnv('DEBUG', false) },
13228
- * }
13229
- *
13230
- * // Validate at startup
13231
- * validateEnvVars({
13232
- * required: ['STRIPE_SECRET_KEY', 'DATABASE_URL'],
13233
- * requireOneOf: [['DATABASE_URL', 'SUPABASE_URL']], // at least one
13234
- * validators: {
13235
- * DATABASE_URL: (v) => v.startsWith('postgres') || 'must start with postgres://',
13236
- * ADMIN_SECRET: (v) => v.length >= 32 || 'must be at least 32 characters',
13237
- * },
13238
- * })
13239
- * ```
13240
- */
13241
- /**
13242
- * Get a required environment variable.
13243
- * Throws immediately if not set — fail-fast at startup.
13244
- */
13245
- declare function getRequiredEnv(key: string): string;
13246
- /**
13247
- * Get an optional environment variable with a default value.
13248
- */
13249
- declare function getOptionalEnv(key: string, defaultValue: string): string;
13250
- /**
13251
- * Get a boolean environment variable.
13252
- * Treats "true" and "1" as true, everything else as false.
13253
- */
13254
- declare function getBoolEnv(key: string, defaultValue?: boolean): boolean;
13255
- /**
13256
- * Get a numeric environment variable with a default.
13257
- */
13258
- declare function getIntEnv(key: string, defaultValue: number): number;
13259
- /**
13260
- * Configuration for environment validation.
13261
- */
13262
- interface EnvValidationConfig {
13263
- /** Variables that must be set (non-empty) */
13264
- required?: string[];
13265
- /** Groups where at least one must be set (e.g., DATABASE_URL or SUPABASE_URL) */
13266
- requireOneOf?: string[][];
13267
- /** Custom validators — return true or an error message */
13268
- validators?: Record<string, (value: string) => true | string>;
13269
- }
13270
- /**
13271
- * Validation result with categorized errors.
13272
- */
13273
- interface EnvValidationResult {
13274
- valid: boolean;
13275
- missing: string[];
13276
- invalid: {
13277
- key: string;
13278
- reason: string;
13279
- }[];
13280
- missingOneOf: string[][];
13281
- }
13282
- /**
13283
- * Validate environment variables against a configuration.
13284
- *
13285
- * @throws Error with details about all missing/invalid variables
13286
- */
13287
- declare function validateEnvVars(config: EnvValidationConfig): void;
13288
- /**
13289
- * Check environment variables without throwing.
13290
- * Returns a result object for custom error handling.
13291
- */
13292
- declare function checkEnvVars(config: EnvValidationConfig): EnvValidationResult;
13293
- /**
13294
- * Get a redacted config summary for debugging.
13295
- * Shows which variables are configured without exposing values.
13296
- */
13297
- declare function getEnvSummary(keys: string[]): Record<string, boolean>;
13298
-
13299
13044
  /**
13300
13045
  * Application Logger
13301
13046
  *
@@ -13431,4 +13176,4 @@ declare function getSharedRedis(): Redis$2 | null;
13431
13176
  */
13432
13177
  declare function closeSharedRedis(): Promise<void>;
13433
13178
 
13434
- export { AIChatRequest, AIChatResponse, AICompletionRequest, AICompletionResponse, AIConfig, AIEmbeddingRequest, AIEmbeddingResponse, AIModelConfig, AIModelType, AIProvider, AIStreamCallback, AIStreamChunk, type AIUsageConfig, type AccountCapabilities, type AccountLink, type AccountType, type Address, type AlertType, AnthropicAdapter, type AnthropicAdapterConfig, type ApiAuthentication, type ApiChangelog, type ApiDocumentation, type ApiEndpoint, ApiError, ApiErrorCode, type ApiErrorCodeType, type ApiExample, type ApiKey, type ApiKeyStatus, type ApiKeyType, type ApiKeyValidationResult, type ApiPaginatedResponse, type ApiParameter, type ApiResponse, type ApiSchema, type ApiSchemaProperty, type ApiSuccessResponse, type ApiUsageStats, type ApiUsageTimeSeries, type AppLogContext, type AppLogger, type AppLoggerOptions, AssembledContext, type AuditActor, type AuditCategory, type AuditEvent, AuditEvents, type AuditEvidence, type AuditLogConfig, type AuditOutcome, type AuditQuery, type AuditQueryResult, type AuditRetentionPolicy, type AuditStats, type AuditTarget, type AuthConfig, type AuthError, type AuthErrorCode, AuthErrorMessages, type AuthEventType, type AuthResult, type AuthSession, type AuthStateChangeCallback, type AuthStorage, type AuthUser, type Balance, type BalanceAmount, type BankAccountDetails, type BatchNotificationOptions, type BillingConfig, type BillingDetails, type BillingPeriod, type Breadcrumb, type Budget, type BudgetStatus, BulkIngestionResult, Bulkhead, type BulkheadOptions, BulkheadRegistry, BulkheadRejectedError, type BulkheadStats, type BullMQConfig, BullMQQueue, type BusinessProfile, type CancelationReason, type CaptureOptions, type CapturePaymentIntentOptions, type CardBrand, type CardDetails, type ChainExecutionResult, CircuitBreaker, type CircuitBreakerOptions, CircuitBreakerRegistry, type CircuitBreakerStats, CircuitOpenError, type CircuitState, type CommandStatus, CommonApiErrors, type ComplianceConfig, type ComplianceReport, type ConfirmPaymentIntentOptions, type ConnectedAccount, type ConnectedAccountStatus, type ConsentPreferences, type ConsentPurpose, type ConsentRecord, type ConsentStatus, ContextAssemblyConfig, type ControlFramework, type ControlStatus, type CorrelationData, type CostBreakdown, type Coupon, type CreateAccountLinkOptions, type CreateApiKeyOptions, CreateCollectionOptions, type CreateConnectedAccountOptions, type CreateCustomerOptions, type CreateDsarOptions, type CreatePaymentIntentOptions, type CreatePayoutOptions, type CreateRefundOptions, type CreateSandboxOptions, type CreateScheduleOptions, type CreateTenantOptions, type CreateTransferOptions, type CreateWebhookOptions, type CreditBalance, type CreditTransaction, type CreditType, type CronExpression, CronPresets, CryptoKeyMetadata, type Currency, type Customer, DEFAULT_BULKHEAD_OPTIONS, DEFAULT_CIRCUIT_BREAKER_OPTIONS, DEFAULT_RETRY_OPTIONS, type DataBreachRecord, type DataCategory, type DataInventoryItem, type DataMap, type DataSensitivity, type DataSubjectRequest, type DataType, DatabaseAIUsage, type DatabaseAIUsageConfig, DatabaseAuditLog, type DatabaseAuditLogConfig, DatabaseBilling, type DatabaseBillingConfig, DatabaseCompliance, DatabaseErrorReporter, type DatabaseErrorReporterConfig, DatabaseNotification, type DatabaseNotificationConfig, DatabasePromptStore, type DatabasePromptStoreConfig, DefaultTimeouts, type DeleteAccountOptions, type DeleteHookContext, type DeliveryAttempt, type DeliveryQuery, type DeliveryStatus, type DetailedHealthResponse, DeterministicEncryptedField, type DevPortalConfig, type DeveloperMetrics, type Device, type DeviceAuthMethod, type DeviceCommand, type DeviceConfig, type DeviceConnectionState, type DeviceCredentials, type DeviceGroup, type DeviceGroupQuery, type DeviceLocation, type DeviceQuery, type DeviceQueryResult, type DeviceShadow, type DeviceStatus, type DirectoryAttributeMapping, type DirectoryConfig, DocumentStatus, type DsarAttachment, type DsarNote, type DsarStatus, type DsarType, type DunningActionType, type DunningAttempt, type DunningConfig, type EmailHookContext, EmailMessage, EmailResult, EncryptOptions, EncryptedField, type EnrollMfaOptions, type EnrollMfaResult, type EnvValidationConfig, type EnvValidationResult, type ErrorContext, type ErrorHookContext, type ErrorLevel, type ErrorReport, type ErrorReporterConfig, type EvidenceType, type ExperimentMetrics, type FallbackOptions, type FallbackResult, FallbackStrategies, type FirmwareStatus, type FirmwareUpdate, type FirmwareVersion, type GeneratedSdk, GenericOIDCAuthSSO, type GenericOIDCConfig, GoogleAIAdapter, type GoogleAIAdapterConfig, HTML_TAG_PATTERN, type HealthCheckResult, type HealthEndpoints, type HealthEndpointsOptions, type HealthStatus, type HookRegistry, type HttpMethod, HttpWebhook, type HttpWebhookConfig, IAI, type IAIUsage, type IAuditLog, type IAuth, type IAuthSSO, type IBilling, ICache, type ICompliance, ICrypto, IDatabase, type IDevPortal, type IDevice, IEmail, type IErrorReporter, type IHealth, type IHealthCheckable, ILogger, IMetrics, type INotification, type IPayment, IPlatform, type IPromptStore, IQueryBuilder, IQueue, IRAG, type IScheduler, IStorage, type ITenant, type IWebhook, type InboundWebhookConfig, type InboundWebhookContext, IngestionOptions, IngestionResult, type InsertHookContext, type InviteMemberOptions, type Invoice, type InvoiceLineItem, type InvoiceQuery, type InvoiceStatus, Job, JobEventHandler, JobEventType, type JobHookContext, JobOptions, JobState, KeyRotationResult, type ListTenantsOptions, type LivenessResponse, MemoryAIUsage, MemoryAuditLog, type MemoryAuditLogConfig, MemoryAuth, MemoryAuthSSO, MemoryBilling, MemoryCompliance, MemoryCrypto, MemoryDevPortal, MemoryDevice, MemoryErrorReporter, type MemoryErrorReporterConfig, MemoryNotification, type MemoryNotificationConfig, MemoryPayment, MemoryPromptStore, MemoryRateLimiterStorage, MemoryScheduler, type MemorySchedulerConfig, MemoryTenant, MemoryWebhook, type MemoryWebhookConfig, type Meter, type MetricsEndpoint, type MetricsEndpointOptions, MetricsSummary, type MfaChallenge, type MfaFactor, type MfaFactorType, type Middleware, type MiddlewareChain, type MiddlewareChainOptions, type MiddlewareContext, NodeCrypto, type NodeCryptoConfig, type NotificationAction, type NotificationCategory, type NotificationChannel, type NotificationConfig, type NotificationData, type NotificationPreferences, type NotificationPriority, type NotificationQuery, type NotificationResult, type NotificationStats, type NotificationStatus, type NotificationTarget, NotificationTemplates, type OAuthOptions, type OAuthProvider, type OAuthResult, type OidcAuthRequest, type OidcAuthResponse, type OidcClaimMapping, type OidcIdpConfig, OpenAIAdapter, type OpenAIAdapterConfig, PG_ERROR_MAP, type ParameterLocation, type PaymentConfig, type PaymentError, type PaymentErrorCode, PaymentErrorMessages, type PaymentEventType, type PaymentIntent, type PaymentMethod, type PaymentMethodType, type PaymentStatus, type PaymentWebhookEvent, type Payout, type PayoutStatus, type PiaMitigation, type PiaRisk, type PiaStatus, PineconeRAG, type PineconeRAGConfig, type PlatformHealthResult, PlatformHealthStatus, type PlatformHooks, type PostgresConfig, PostgresDatabase, PostgresTenant, type PostgresTenantConfig, type Price, type PricingModel, type PricingTier, type PrivacyImpactAssessment, type Product, type Prompt, type PromptChain, type PromptChainStep, type PromptExperiment, type PromptQuery, type PromptQueryResult, type PromptStatus, type PromptStoreConfig, type PromptType, type PromptUsageRecord, type PromptUsageStats, type PromptVariable, type PromptVariant, type PromptVersion, type ProvisioningConfig, type ProvisioningRequest, type ProvisioningResult, type ProvisioningStatus, type PushSubscription, type QueryHookContext, QueryResult, QueueScheduler, type QueueSchedulerConfig, type Quota, type QuotaStatus, type QuotaType, RAGChunk, RAGCollection, RAGConfig, RAGDocument, RAGPipeline, RAGSearchQuery, RAGSearchResponse, RAGSearchResult, type RateLimitAlgorithm, RateLimitError, type RateLimitInfo, RateLimitPresets, type RateLimiterStorage, type ReadinessResponse, type RecordConsentOptions, RedisCache, type RedisClientOptions, type RedisConfig, type Refund, type RefundReason, type RefundStatus, type RenderOptions, type RenderedPrompt, RepeatOptions, ResendEmail, type ResetPasswordOptions, type RetentionAction, type RetentionExecution, type RetentionPolicy, RetryConfigs, type RetryOptions, RetryPredicates, type RetryResult, type RevenueMetrics, type RiskLevel, S3Storage, type SamlAssertion, type SamlAttributeMapping, type SamlAuthRequest, type SamlAuthResponse, type SamlIdpConfig, type SamlNameIdFormat, type SamlSpConfig, type Sandbox, type SandboxConfig, type SandboxLimits, type SandboxStatus, type SandboxUsage, type ScheduleContext, type ScheduleExecution, type ScheduleHandler, type ScheduleQuery, type ScheduleState, type ScheduleUpdateOptions, type ScheduledJob, type SchedulerConfig, type SchedulerStats, type ScimConfig, type ScimUser, type SdkConfig, type SdkFile, type SdkLanguage, type SendCommandOptions, type SendNotificationOptions, type ServiceHealth, type ShadowDelta, type ShadowMetadata, type ShadowUpdate, type SignInWithEmailOptions, type SignInWithMagicLinkOptions, type SignInWithPhoneOptions, type SignUpWithEmailOptions, type SignatureAlgorithm, type SlidingWindowRateLimitOptions, type SmtpConfig, SmtpEmail, type SsoSession, type StartupResponse, StorageFile, type StoredAuditEvent, type StoredNotification, StripePayment, type StripePaymentConfig, type Subscription, type SubscriptionDiscount, type SubscriptionItem, type SubscriptionMetrics, type SubscriptionQuery, type SubscriptionStatus, SupabaseAuth, type SupabaseAuthConfig, SupabaseDatabase, SupabaseStorage, type SupabaseStorageConfig, type TaxBreakdown, type TelemetryMessage, type TelemetryQuery, type TelemetryResult, type Tenant, type TenantBranding, type TenantContext, type TenantDatabaseConfig, type TenantInvitation, type TenantIsolationModel, type TenantMember, type TenantMemberStatus, type TenantQuotas, type TenantResolutionOptions, type TenantResolutionStrategy, type TenantRole, type TenantSecuritySettings, type TenantSettings, type TenantStatus, type TenantUsage, TimeoutError, type TimeoutOptions, type TokenBucketOptions, type TosAcceptance, type Transfer, type TransferStatus, URL_DOMAIN_PATTERN, URL_PROTOCOL_PATTERN, type Unsubscribe, type UpdateCustomerOptions, type UpdateHookContext, type UpdatePasswordOptions, type UpdatePaymentIntentOptions, type UpdateScheduleOptions, type UpdateStatus, type UpdateTenantOptions, type UpdateUserOptions, type UpdateWebhookOptions, type UploadHookContext, UploadOptions, UpstashCache, type UsageAlert, type UsageCategory, type UsageEvent, type UsageInterval, type UsageInvoice, type UsageInvoiceItem, type UsageQuery, type UsageQueryResult, type UsageRecord, type UsageSummary, type UsageSummaryRecord, type UsageTrend, type VerificationResult, type VerifyMfaOptions, type VerifyPhoneOtpOptions, type VerifyWebhookOptions, WeaviateRAG, type WeaviateRAGConfig, type WebhookConfig, type WebhookDelivery, type WebhookEndpoint, type WebhookEvent, WebhookEventTypes, type WebhookQuery, type WebhookState, type WebhookStats, type WebhookTestEndpoint, type WebhookTestEvent, buildPagination, calculateRetryDelay, checkEnvVars, classifyError, closeSharedRedis, composeHookRegistries, constantTimeEqual, containsHtml, containsUrls, correlationContext, createAnthropicAdapter, createAppLogger, createAuthError, createBulkhead, createCacheMiddleware, createCachedFallback, createCircuitBreaker, createDefaultPreferences, createErrorReport, createExpressHealthHandlers, createExpressMetricsHandler, createGoogleAIAdapter, createHealthEndpoints, createHealthServer, createHookRegistry, createIpKeyGenerator, createJobContext, createLoggingMiddleware, createMetricsEndpoint, createMetricsMiddleware, createMetricsServer, createMiddlewareChain, createMiddlewareContext, createObservabilityServer, createOpenAIAdapter, createPaymentError, createPineconeRAG, createRateLimitMiddleware, createRedisClient, createRequestContext, createRequestIdMiddleware, createSlowQueryMiddleware, createTenantMiddleware, createTimeoutMiddleware, createUserKeyGenerator, createWeaviateRAG, defangUrl, describeCron, escapeHtml, filterChannelsByPreferences, formatAmount, generateAuditId, generateChecksum, generateDeliveryId, generateErrorId, generateEventId, generateFingerprint, generateNotificationId, generatePaymentId, generateScheduleId, generateSecureToken, generateWebhookId, generateWebhookSecret, getBoolEnv, getContext, getCorrelationId, getEnvSummary, getIntEnv, getLogMeta, getNextCronRun, getOptionalEnv, getRequestId, getRequiredEnv, getSharedRedis, getTenantId, getTraceId, getUserId, isApiError, isAuthError, isInContext, isInQuietHours, isPaymentError, isValidCron, matchAction, matchEventType, raceTimeout, retryable, runWithContext, runWithContextAsync, sanitizeApiError, sanitizeForEmail, stripHtml, timedHealthCheck, toHealthCheckResult, validateEnvVars, withCorrelation, withCorrelationAsync, withFallback, withFallbackChain, withFallbackResult, withRetry, withRetryResult, withTimeout, withTimeoutWrapper };
13179
+ export { AIChatRequest, AIChatResponse, AICompletionRequest, AICompletionResponse, AIConfig, AIEmbeddingRequest, AIEmbeddingResponse, AIModelConfig, AIModelType, AIProvider, AIStreamCallback, AIStreamChunk, type AIUsageConfig, type AccountCapabilities, type AccountLink, type AccountType, type Address, type AlertType, AnthropicAdapter, type AnthropicAdapterConfig, type ApiAuthentication, type ApiChangelog, type ApiDocumentation, type ApiEndpoint, type ApiExample, type ApiKey, type ApiKeyStatus, type ApiKeyType, type ApiKeyValidationResult, type ApiParameter, type ApiResponse, type ApiSchema, type ApiSchemaProperty, type ApiUsageStats, type ApiUsageTimeSeries, type AppLogContext, type AppLogger, type AppLoggerOptions, AssembledContext, type AuditActor, type AuditCategory, type AuditEvent, AuditEvents, type AuditEvidence, type AuditLogConfig, type AuditOutcome, type AuditQuery, type AuditQueryResult, type AuditRetentionPolicy, type AuditStats, type AuditTarget, type AuthConfig, type AuthError, type AuthErrorCode, AuthErrorMessages, type AuthEventType, type AuthResult, type AuthSession, type AuthStateChangeCallback, type AuthStorage, type AuthUser, type Balance, type BalanceAmount, type BankAccountDetails, type BatchNotificationOptions, type BillingConfig, type BillingDetails, type BillingPeriod, type Breadcrumb, type Budget, type BudgetStatus, BulkIngestionResult, Bulkhead, type BulkheadOptions, BulkheadRegistry, BulkheadRejectedError, type BulkheadStats, type BullMQConfig, BullMQQueue, type BusinessProfile, type CancelationReason, type CaptureOptions, type CapturePaymentIntentOptions, type CardBrand, type CardDetails, type ChainExecutionResult, CircuitBreaker, type CircuitBreakerOptions, CircuitBreakerRegistry, type CircuitBreakerStats, CircuitOpenError, type CircuitState, type CommandStatus, type ComplianceConfig, type ComplianceReport, type ConfirmPaymentIntentOptions, type ConnectedAccount, type ConnectedAccountStatus, type ConsentPreferences, type ConsentPurpose, type ConsentRecord, type ConsentStatus, ContextAssemblyConfig, type ControlFramework, type ControlStatus, type CorrelationData, type CostBreakdown, type Coupon, type CreateAccountLinkOptions, type CreateApiKeyOptions, CreateCollectionOptions, type CreateConnectedAccountOptions, type CreateCustomerOptions, type CreateDsarOptions, type CreatePaymentIntentOptions, type CreatePayoutOptions, type CreateRefundOptions, type CreateSandboxOptions, type CreateScheduleOptions, type CreateTenantOptions, type CreateTransferOptions, type CreateWebhookOptions, type CreditBalance, type CreditTransaction, type CreditType, type CronExpression, CronPresets, CryptoKeyMetadata, type Currency, type Customer, DEFAULT_BULKHEAD_OPTIONS, DEFAULT_CIRCUIT_BREAKER_OPTIONS, DEFAULT_RETRY_OPTIONS, type DataBreachRecord, type DataCategory, type DataInventoryItem, type DataMap, type DataSensitivity, type DataSubjectRequest, type DataType, DatabaseAIUsage, type DatabaseAIUsageConfig, DatabaseAuditLog, type DatabaseAuditLogConfig, DatabaseBilling, type DatabaseBillingConfig, DatabaseCompliance, DatabaseErrorReporter, type DatabaseErrorReporterConfig, DatabaseNotification, type DatabaseNotificationConfig, DatabasePromptStore, type DatabasePromptStoreConfig, DefaultTimeouts, type DeleteAccountOptions, type DeleteHookContext, type DeliveryAttempt, type DeliveryQuery, type DeliveryStatus, type DetailedHealthResponse, DeterministicEncryptedField, type DevPortalConfig, type DeveloperMetrics, type Device, type DeviceAuthMethod, type DeviceCommand, type DeviceConfig, type DeviceConnectionState, type DeviceCredentials, type DeviceGroup, type DeviceGroupQuery, type DeviceLocation, type DeviceQuery, type DeviceQueryResult, type DeviceShadow, type DeviceStatus, type DirectoryAttributeMapping, type DirectoryConfig, DocumentStatus, type DsarAttachment, type DsarNote, type DsarStatus, type DsarType, type DunningActionType, type DunningAttempt, type DunningConfig, type EmailHookContext, EmailMessage, EmailResult, EncryptOptions, EncryptedField, type EnrollMfaOptions, type EnrollMfaResult, type ErrorContext, type ErrorHookContext, type ErrorLevel, type ErrorReport, type ErrorReporterConfig, type EvidenceType, type ExperimentMetrics, type FallbackOptions, type FallbackResult, FallbackStrategies, type FirmwareStatus, type FirmwareUpdate, type FirmwareVersion, type GeneratedSdk, GenericOIDCAuthSSO, type GenericOIDCConfig, GoogleAIAdapter, type GoogleAIAdapterConfig, type HealthCheckResult, type HealthEndpoints, type HealthEndpointsOptions, type HealthStatus, type HookRegistry, type HttpMethod, HttpWebhook, type HttpWebhookConfig, IAI, type IAIUsage, type IAuditLog, type IAuth, type IAuthSSO, type IBilling, ICache, type ICompliance, ICrypto, IDatabase, type IDevPortal, type IDevice, IEmail, type IErrorReporter, type IHealth, type IHealthCheckable, ILogger, IMetrics, type INotification, type IPayment, IPlatform, type IPromptStore, IQueryBuilder, IQueue, IRAG, type IScheduler, IStorage, type ITenant, type IWebhook, type InboundWebhookConfig, type InboundWebhookContext, IngestionOptions, IngestionResult, type InsertHookContext, type InviteMemberOptions, type Invoice, type InvoiceLineItem, type InvoiceQuery, type InvoiceStatus, Job, JobEventHandler, JobEventType, type JobHookContext, JobOptions, JobState, KeyRotationResult, type ListTenantsOptions, type LivenessResponse, MemoryAIUsage, MemoryAuditLog, type MemoryAuditLogConfig, MemoryAuth, MemoryAuthSSO, MemoryBilling, MemoryCompliance, MemoryCrypto, MemoryDevPortal, MemoryDevice, MemoryErrorReporter, type MemoryErrorReporterConfig, MemoryNotification, type MemoryNotificationConfig, MemoryPayment, MemoryPromptStore, MemoryRateLimiterStorage, MemoryScheduler, type MemorySchedulerConfig, MemoryTenant, MemoryWebhook, type MemoryWebhookConfig, type Meter, type MetricsEndpoint, type MetricsEndpointOptions, MetricsSummary, type MfaChallenge, type MfaFactor, type MfaFactorType, type Middleware, type MiddlewareChain, type MiddlewareChainOptions, type MiddlewareContext, NodeCrypto, type NodeCryptoConfig, type NotificationAction, type NotificationCategory, type NotificationChannel, type NotificationConfig, type NotificationData, type NotificationPreferences, type NotificationPriority, type NotificationQuery, type NotificationResult, type NotificationStats, type NotificationStatus, type NotificationTarget, NotificationTemplates, type OAuthOptions, type OAuthProvider, type OAuthResult, type OidcAuthRequest, type OidcAuthResponse, type OidcClaimMapping, type OidcIdpConfig, OpenAIAdapter, type OpenAIAdapterConfig, type ParameterLocation, type PaymentConfig, type PaymentError, type PaymentErrorCode, PaymentErrorMessages, type PaymentEventType, type PaymentIntent, type PaymentMethod, type PaymentMethodType, type PaymentStatus, type PaymentWebhookEvent, type Payout, type PayoutStatus, type PiaMitigation, type PiaRisk, type PiaStatus, PineconeRAG, type PineconeRAGConfig, type PlatformHealthResult, PlatformHealthStatus, type PlatformHooks, type PostgresConfig, PostgresDatabase, PostgresTenant, type PostgresTenantConfig, type Price, type PricingModel, type PricingTier, type PrivacyImpactAssessment, type Product, type Prompt, type PromptChain, type PromptChainStep, type PromptExperiment, type PromptQuery, type PromptQueryResult, type PromptStatus, type PromptStoreConfig, type PromptType, type PromptUsageRecord, type PromptUsageStats, type PromptVariable, type PromptVariant, type PromptVersion, type ProvisioningConfig, type ProvisioningRequest, type ProvisioningResult, type ProvisioningStatus, type PushSubscription, type QueryHookContext, QueryResult, QueueScheduler, type QueueSchedulerConfig, type Quota, type QuotaStatus, type QuotaType, RAGChunk, RAGCollection, RAGConfig, RAGDocument, RAGPipeline, RAGSearchQuery, RAGSearchResponse, RAGSearchResult, type RateLimitAlgorithm, RateLimitError, type RateLimitInfo, RateLimitPresets, type RateLimiterStorage, type ReadinessResponse, type RecordConsentOptions, RedisCache, type RedisClientOptions, type RedisConfig, type Refund, type RefundReason, type RefundStatus, type RenderOptions, type RenderedPrompt, RepeatOptions, ResendEmail, type ResetPasswordOptions, type RetentionAction, type RetentionExecution, type RetentionPolicy, RetryConfigs, type RetryOptions, RetryPredicates, type RetryResult, type RevenueMetrics, type RiskLevel, S3Storage, type SamlAssertion, type SamlAttributeMapping, type SamlAuthRequest, type SamlAuthResponse, type SamlIdpConfig, type SamlNameIdFormat, type SamlSpConfig, type Sandbox, type SandboxConfig, type SandboxLimits, type SandboxStatus, type SandboxUsage, type ScheduleContext, type ScheduleExecution, type ScheduleHandler, type ScheduleQuery, type ScheduleState, type ScheduleUpdateOptions, type ScheduledJob, type SchedulerConfig, type SchedulerStats, type ScimConfig, type ScimUser, type SdkConfig, type SdkFile, type SdkLanguage, type SendCommandOptions, type SendNotificationOptions, type ServiceHealth, type ShadowDelta, type ShadowMetadata, type ShadowUpdate, type SignInWithEmailOptions, type SignInWithMagicLinkOptions, type SignInWithPhoneOptions, type SignUpWithEmailOptions, type SignatureAlgorithm, type SlidingWindowRateLimitOptions, type SmtpConfig, SmtpEmail, type SsoSession, type StartupResponse, StorageFile, type StoredAuditEvent, type StoredNotification, StripePayment, type StripePaymentConfig, type Subscription, type SubscriptionDiscount, type SubscriptionItem, type SubscriptionMetrics, type SubscriptionQuery, type SubscriptionStatus, SupabaseAuth, type SupabaseAuthConfig, SupabaseDatabase, SupabaseStorage, type SupabaseStorageConfig, type TaxBreakdown, type TelemetryMessage, type TelemetryQuery, type TelemetryResult, type Tenant, type TenantBranding, type TenantContext, type TenantDatabaseConfig, type TenantInvitation, type TenantIsolationModel, type TenantMember, type TenantMemberStatus, type TenantQuotas, type TenantResolutionOptions, type TenantResolutionStrategy, type TenantRole, type TenantSecuritySettings, type TenantSettings, type TenantStatus, type TenantUsage, TimeoutError, type TimeoutOptions, type TokenBucketOptions, type TosAcceptance, type Transfer, type TransferStatus, type Unsubscribe, type UpdateCustomerOptions, type UpdateHookContext, type UpdatePasswordOptions, type UpdatePaymentIntentOptions, type UpdateScheduleOptions, type UpdateStatus, type UpdateTenantOptions, type UpdateUserOptions, type UpdateWebhookOptions, type UploadHookContext, UploadOptions, UpstashCache, type UsageAlert, type UsageCategory, type UsageEvent, type UsageInterval, type UsageInvoice, type UsageInvoiceItem, type UsageQuery, type UsageQueryResult, type UsageRecord, type UsageSummary, type UsageSummaryRecord, type UsageTrend, type VerificationResult, type VerifyMfaOptions, type VerifyPhoneOtpOptions, type VerifyWebhookOptions, WeaviateRAG, type WeaviateRAGConfig, type WebhookConfig, type WebhookDelivery, type WebhookEndpoint, type WebhookEvent, WebhookEventTypes, type WebhookQuery, type WebhookState, type WebhookStats, type WebhookTestEndpoint, type WebhookTestEvent, calculateRetryDelay, closeSharedRedis, composeHookRegistries, correlationContext, createAnthropicAdapter, createAppLogger, createAuthError, createBulkhead, createCacheMiddleware, createCachedFallback, createCircuitBreaker, createDefaultPreferences, createErrorReport, createExpressHealthHandlers, createExpressMetricsHandler, createGoogleAIAdapter, createHealthEndpoints, createHealthServer, createHookRegistry, createIpKeyGenerator, createJobContext, createLoggingMiddleware, createMetricsEndpoint, createMetricsMiddleware, createMetricsServer, createMiddlewareChain, createMiddlewareContext, createObservabilityServer, createOpenAIAdapter, createPaymentError, createPineconeRAG, createRateLimitMiddleware, createRedisClient, createRequestContext, createRequestIdMiddleware, createSlowQueryMiddleware, createTenantMiddleware, createTimeoutMiddleware, createUserKeyGenerator, createWeaviateRAG, describeCron, filterChannelsByPreferences, formatAmount, generateAuditId, generateChecksum, generateDeliveryId, generateErrorId, generateEventId, generateFingerprint, generateNotificationId, generatePaymentId, generateScheduleId, generateSecureToken, generateWebhookId, generateWebhookSecret, getContext, getLogMeta, getNextCronRun, getRequestId, getSharedRedis, getTenantId, getTraceId, getUserId, isAuthError, isInContext, isInQuietHours, isPaymentError, isValidCron, matchAction, matchEventType, raceTimeout, retryable, runWithContext, runWithContextAsync, timedHealthCheck, toHealthCheckResult, withCorrelation, withCorrelationAsync, withFallback, withFallbackChain, withFallbackResult, withRetry, withRetryResult, withTimeout, withTimeoutWrapper };