tempest-express-sdk 0.9.0 → 0.11.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.cts CHANGED
@@ -2641,6 +2641,132 @@ interface TwilioWebhookOptions {
2641
2641
  */
2642
2642
  declare function makeTwilioWebhookRouter(options: TwilioWebhookOptions): Router;
2643
2643
 
2644
+ /**
2645
+ * Email channel — a {@link MessagingProvider} over {@link EmailUtils}.
2646
+ *
2647
+ * Lets transactional email participate in the same swappable messaging contract
2648
+ * as WhatsApp/Telegram/SMS: `sendText` sends a plain email, `sendMedia` sends
2649
+ * the media as a link in the body. Inbound (`onMessage`) is absent — email
2650
+ * ingestion is out of scope. Requires the optional `nodemailer` peer via
2651
+ * {@link EmailUtils}.
2652
+ */
2653
+
2654
+ /** Options for {@link EmailProvider}. */
2655
+ interface EmailProviderOptions {
2656
+ /** The configured SMTP sender. */
2657
+ email: EmailUtils;
2658
+ /** Default subject line for `sendText`/`sendMedia`. Default `"Notification"`. */
2659
+ subject?: string;
2660
+ }
2661
+ /** An email-backed {@link MessagingProvider}. */
2662
+ declare class EmailProvider implements MessagingProvider {
2663
+ private readonly email;
2664
+ private readonly subject;
2665
+ /**
2666
+ * @param options - The email sender and default subject.
2667
+ */
2668
+ constructor(options: EmailProviderOptions);
2669
+ /**
2670
+ * Send a plain-text email.
2671
+ *
2672
+ * @param to - Recipient address.
2673
+ * @param text - Body text (also used as HTML).
2674
+ * @returns A sent result.
2675
+ */
2676
+ sendText(to: string, text: string): Promise<OutboundResult>;
2677
+ /**
2678
+ * Send an email linking to the media (caption becomes the lead text).
2679
+ *
2680
+ * @param to - Recipient address.
2681
+ * @param media - The media reference (URL) + optional caption.
2682
+ * @returns A sent result.
2683
+ */
2684
+ sendMedia(to: string, media: OutboundMedia): Promise<OutboundResult>;
2685
+ /** Always `"connected"` — SMTP reachability is verified on first send. */
2686
+ status(): Promise<string>;
2687
+ }
2688
+
2689
+ /**
2690
+ * Broadcast + multi-channel helpers over {@link MessagingProvider}.
2691
+ *
2692
+ * {@link broadcastText} fans one message out to many recipients through a single
2693
+ * provider, with bounded concurrency and a per-recipient result (one failure
2694
+ * never aborts the rest). {@link MessagingHub} keeps named providers so app code
2695
+ * sends by channel name and can broadcast across all of them.
2696
+ */
2697
+
2698
+ /** The outcome of a single recipient's send within a broadcast. */
2699
+ interface BroadcastResult {
2700
+ /** The recipient address/handle. */
2701
+ to: string;
2702
+ /** Whether the send succeeded. */
2703
+ ok: boolean;
2704
+ /** The provider result, when successful. */
2705
+ result?: OutboundResult;
2706
+ /** The error message, when failed. */
2707
+ error?: string;
2708
+ }
2709
+ /** Options for {@link broadcastText}. */
2710
+ interface BroadcastOptions extends SendOptions {
2711
+ /** Maximum concurrent sends. Default 10. */
2712
+ concurrency?: number;
2713
+ }
2714
+ /**
2715
+ * Send `text` to every recipient through `provider`, bounded by concurrency.
2716
+ *
2717
+ * A failed recipient is captured in its {@link BroadcastResult} (`ok: false`)
2718
+ * rather than aborting the batch.
2719
+ *
2720
+ * @param provider - The channel to send through.
2721
+ * @param recipients - Recipient addresses/handles.
2722
+ * @param text - The message body.
2723
+ * @param options - Concurrency + send options.
2724
+ * @returns One result per recipient, in input order.
2725
+ */
2726
+ declare function broadcastText(provider: MessagingProvider, recipients: string[], text: string, options?: BroadcastOptions): Promise<BroadcastResult[]>;
2727
+ /** A registry of named messaging channels. */
2728
+ declare class MessagingHub {
2729
+ private readonly channels;
2730
+ /**
2731
+ * Register a provider under a channel name.
2732
+ *
2733
+ * @param name - The channel name (e.g. `"whatsapp"`, `"sms"`).
2734
+ * @param provider - The provider implementation.
2735
+ * @returns The hub (chainable).
2736
+ */
2737
+ register(name: string, provider: MessagingProvider): this;
2738
+ /**
2739
+ * Get a registered provider, throwing when the channel is unknown.
2740
+ *
2741
+ * @param name - The channel name.
2742
+ * @returns The provider.
2743
+ * @throws {Error} When no provider is registered under `name`.
2744
+ */
2745
+ get(name: string): MessagingProvider;
2746
+ /** The registered channel names. */
2747
+ channelNames(): string[];
2748
+ /**
2749
+ * Send text through a named channel.
2750
+ *
2751
+ * @param channel - The channel name.
2752
+ * @param to - The recipient.
2753
+ * @param text - The message body.
2754
+ * @param options - Send options.
2755
+ * @returns The provider result.
2756
+ */
2757
+ send(channel: string, to: string, text: string, options?: SendOptions): Promise<OutboundResult>;
2758
+ /**
2759
+ * Broadcast text to many recipients on a named channel.
2760
+ *
2761
+ * @param channel - The channel name.
2762
+ * @param recipients - Recipient addresses/handles.
2763
+ * @param text - The message body.
2764
+ * @param options - Broadcast + send options.
2765
+ * @returns One result per recipient.
2766
+ */
2767
+ broadcast(channel: string, recipients: string[], text: string, options?: BroadcastOptions): Promise<BroadcastResult[]>;
2768
+ }
2769
+
2644
2770
  /**
2645
2771
  * Admin site + resource registry, mirroring `admin.site` / `admin.config`.
2646
2772
  *
@@ -2919,6 +3045,17 @@ declare const mfaCodeSchema: z.ZodObject<{
2919
3045
  }, {
2920
3046
  code: string;
2921
3047
  }>;
3048
+ /** MFA login-challenge body (`POST /auth/mfa/challenge`). */
3049
+ declare const mfaChallengeSchema: z.ZodObject<{
3050
+ mfaToken: z.ZodString;
3051
+ code: z.ZodString;
3052
+ }, "strip", z.ZodTypeAny, {
3053
+ code: string;
3054
+ mfaToken: string;
3055
+ }, {
3056
+ code: string;
3057
+ mfaToken: string;
3058
+ }>;
2922
3059
  /** Activation body (`POST /auth/activate`). */
2923
3060
  declare const activationSchema: z.ZodObject<{
2924
3061
  token: z.ZodString;
@@ -2953,17 +3090,100 @@ type TokenPair = z.infer<typeof tokenPairSchema>;
2953
3090
  type UserPublic = z.infer<typeof userPublicSchema>;
2954
3091
  type AuthResponse = z.infer<typeof authResponseSchema>;
2955
3092
  type MfaCodeInput = z.infer<typeof mfaCodeSchema>;
3093
+ type MfaChallengeInput = z.infer<typeof mfaChallengeSchema>;
2956
3094
  type ActivationInput = z.infer<typeof activationSchema>;
2957
3095
  type PasswordResetRequestInput = z.infer<typeof passwordResetRequestSchema>;
2958
3096
  type PasswordResetConfirmInput = z.infer<typeof passwordResetConfirmSchema>;
2959
3097
 
3098
+ /**
3099
+ * TOTP MFA enrollment/verification, mirroring the FastAPI SDK MFA flow.
3100
+ *
3101
+ * Orchestrates {@link TOTPHelper} over a pluggable {@link MfaStore}: enroll
3102
+ * (generate + persist a secret, return the provisioning URI), confirm (verify a
3103
+ * code and flip MFA on), verify (login step) and disable.
3104
+ */
3105
+
3106
+ /** Persistence port for MFA secrets/state. */
3107
+ interface MfaStore {
3108
+ /** Persist a user's TOTP secret (pending until confirmed). */
3109
+ setSecret(userId: string, secret: string): Promise<void>;
3110
+ /** Read a user's TOTP secret, or `null`. */
3111
+ getSecret(userId: string): Promise<string | null>;
3112
+ /** Flip the MFA-enabled flag. */
3113
+ setEnabled(userId: string, enabled: boolean): Promise<void>;
3114
+ /** Whether MFA is enabled for the user. */
3115
+ isEnabled(userId: string): Promise<boolean>;
3116
+ }
3117
+ /** The result of starting enrollment. */
3118
+ interface MfaEnrollment {
3119
+ /** The base32 secret (persist server-side; also shown once for manual entry). */
3120
+ secret: string;
3121
+ /** The `otpauth://` URI to render as a QR code. */
3122
+ otpauthUri: string;
3123
+ }
3124
+ /** Options for {@link MfaService}. */
3125
+ interface MfaServiceOptions {
3126
+ /** The MFA persistence port. */
3127
+ store: MfaStore;
3128
+ /** The TOTP helper (issuer preconfigured). */
3129
+ totp: TOTPHelper;
3130
+ }
3131
+ declare class MfaService {
3132
+ private readonly store;
3133
+ private readonly totp;
3134
+ /**
3135
+ * @param options - Store and TOTP helper.
3136
+ */
3137
+ constructor(options: MfaServiceOptions);
3138
+ /**
3139
+ * Begin enrollment: generate and persist a secret, return the QR URI.
3140
+ *
3141
+ * @param userId - The enrolling user.
3142
+ * @param accountName - Label shown in the authenticator (usually the email).
3143
+ * @returns The secret and provisioning URI.
3144
+ */
3145
+ enroll(userId: string, accountName: string): Promise<MfaEnrollment>;
3146
+ /**
3147
+ * Confirm enrollment by verifying a code, enabling MFA on success.
3148
+ *
3149
+ * @param userId - The user.
3150
+ * @param code - The 6-digit code from the authenticator.
3151
+ * @throws {ValidationException} When no secret is pending or the code is wrong.
3152
+ */
3153
+ confirm(userId: string, code: string): Promise<void>;
3154
+ /**
3155
+ * Verify a code (login step). Returns `false` without throwing.
3156
+ *
3157
+ * @param userId - The user.
3158
+ * @param code - The submitted code.
3159
+ * @returns `true` when the code is valid.
3160
+ */
3161
+ verify(userId: string, code: string): Promise<boolean>;
3162
+ /**
3163
+ * Whether MFA is enabled for a user (used to gate the login challenge).
3164
+ *
3165
+ * @param userId - The user.
3166
+ * @returns `true` when MFA is enabled.
3167
+ */
3168
+ isEnabled(userId: string): Promise<boolean>;
3169
+ /**
3170
+ * Disable MFA after verifying a code.
3171
+ *
3172
+ * @param userId - The user.
3173
+ * @param code - The submitted code.
3174
+ * @throws {ValidationException} When the code is invalid.
3175
+ */
3176
+ disable(userId: string, code: string): Promise<void>;
3177
+ }
3178
+
2960
3179
  /**
2961
3180
  * User authentication service, mirroring `auth.service.UserAuthService`.
2962
3181
  *
2963
3182
  * Orchestrates signup / login / refresh over a pluggable {@link UserStore},
2964
3183
  * {@link PasswordUtils} and {@link JWTUtils}. It is ORM-agnostic — back the
2965
- * store with a `tempest-db-js` repository (or anything else). MFA, email
2966
- * activation and password-reset flows from the FastAPI SDK are not yet ported.
3184
+ * store with a `tempest-db-js` repository (or anything else). With an
3185
+ * {@link MfaService} wired in, `login` returns an MFA challenge for enrolled
3186
+ * users (complete it via {@link UserAuthService.verifyMfaChallenge}).
2967
3187
  */
2968
3188
 
2969
3189
  /** A persisted user as the auth layer needs to see it. */
@@ -3008,7 +3228,23 @@ interface UserAuthServiceOptions {
3008
3228
  accessTtlSeconds?: number;
3009
3229
  /** Refresh-token lifetime in seconds. Default 1209600 (14 days). */
3010
3230
  refreshTtlSeconds?: number;
3011
- }
3231
+ /**
3232
+ * When provided, `login` returns an MFA challenge instead of tokens for users
3233
+ * with MFA enabled; complete it with {@link UserAuthService.verifyMfaChallenge}.
3234
+ */
3235
+ mfa?: MfaService;
3236
+ /** MFA challenge-token lifetime in seconds. Default 300 (5 min). */
3237
+ mfaChallengeTtlSeconds?: number;
3238
+ }
3239
+ /** Returned by `login` when the user must complete an MFA challenge. */
3240
+ interface MfaChallenge {
3241
+ /** Discriminator: an MFA step is required before tokens are issued. */
3242
+ mfaRequired: true;
3243
+ /** Short-lived token to submit alongside the code to `verifyMfaChallenge`. */
3244
+ mfaToken: string;
3245
+ }
3246
+ /** `login` result: either full auth, or an MFA challenge to complete. */
3247
+ type LoginResult = AuthResponse | MfaChallenge;
3012
3248
  declare class UserAuthService {
3013
3249
  private readonly store;
3014
3250
  private readonly password;
@@ -3016,6 +3252,8 @@ declare class UserAuthService {
3016
3252
  private readonly passwordMinLength;
3017
3253
  private readonly accessTtlSeconds;
3018
3254
  private readonly refreshTtlSeconds;
3255
+ private readonly mfa;
3256
+ private readonly mfaChallengeTtlSeconds;
3019
3257
  /**
3020
3258
  * @param options - Store, password/JWT helpers and token policy.
3021
3259
  */
@@ -3035,10 +3273,20 @@ declare class UserAuthService {
3035
3273
  * Authenticate a user by email + password.
3036
3274
  *
3037
3275
  * @param data - Validated login payload.
3038
- * @returns The public user and a fresh token pair.
3276
+ * @returns Full auth, or an {@link MfaChallenge} when MFA is enabled.
3039
3277
  * @throws {UnauthorizedException} On bad credentials or inactive account.
3040
3278
  */
3041
- login(data: LoginInput): Promise<AuthResponse>;
3279
+ login(data: LoginInput): Promise<LoginResult>;
3280
+ /**
3281
+ * Complete an MFA login challenge: verify the code and issue tokens.
3282
+ *
3283
+ * @param mfaToken - The challenge token from {@link login}.
3284
+ * @param code - The authenticator code.
3285
+ * @returns The public user and a fresh token pair.
3286
+ * @throws {UnauthorizedException} When the challenge/code is invalid, MFA is
3287
+ * not configured, or the account no longer exists / is inactive.
3288
+ */
3289
+ verifyMfaChallenge(mfaToken: string, code: string): Promise<AuthResponse>;
3042
3290
  /**
3043
3291
  * Exchange a valid refresh token for a new token pair.
3044
3292
  *
@@ -3050,80 +3298,6 @@ declare class UserAuthService {
3050
3298
  refresh(refreshToken: string): Promise<AuthResponse>;
3051
3299
  }
3052
3300
 
3053
- /**
3054
- * TOTP MFA enrollment/verification, mirroring the FastAPI SDK MFA flow.
3055
- *
3056
- * Orchestrates {@link TOTPHelper} over a pluggable {@link MfaStore}: enroll
3057
- * (generate + persist a secret, return the provisioning URI), confirm (verify a
3058
- * code and flip MFA on), verify (login step) and disable.
3059
- */
3060
-
3061
- /** Persistence port for MFA secrets/state. */
3062
- interface MfaStore {
3063
- /** Persist a user's TOTP secret (pending until confirmed). */
3064
- setSecret(userId: string, secret: string): Promise<void>;
3065
- /** Read a user's TOTP secret, or `null`. */
3066
- getSecret(userId: string): Promise<string | null>;
3067
- /** Flip the MFA-enabled flag. */
3068
- setEnabled(userId: string, enabled: boolean): Promise<void>;
3069
- /** Whether MFA is enabled for the user. */
3070
- isEnabled(userId: string): Promise<boolean>;
3071
- }
3072
- /** The result of starting enrollment. */
3073
- interface MfaEnrollment {
3074
- /** The base32 secret (persist server-side; also shown once for manual entry). */
3075
- secret: string;
3076
- /** The `otpauth://` URI to render as a QR code. */
3077
- otpauthUri: string;
3078
- }
3079
- /** Options for {@link MfaService}. */
3080
- interface MfaServiceOptions {
3081
- /** The MFA persistence port. */
3082
- store: MfaStore;
3083
- /** The TOTP helper (issuer preconfigured). */
3084
- totp: TOTPHelper;
3085
- }
3086
- declare class MfaService {
3087
- private readonly store;
3088
- private readonly totp;
3089
- /**
3090
- * @param options - Store and TOTP helper.
3091
- */
3092
- constructor(options: MfaServiceOptions);
3093
- /**
3094
- * Begin enrollment: generate and persist a secret, return the QR URI.
3095
- *
3096
- * @param userId - The enrolling user.
3097
- * @param accountName - Label shown in the authenticator (usually the email).
3098
- * @returns The secret and provisioning URI.
3099
- */
3100
- enroll(userId: string, accountName: string): Promise<MfaEnrollment>;
3101
- /**
3102
- * Confirm enrollment by verifying a code, enabling MFA on success.
3103
- *
3104
- * @param userId - The user.
3105
- * @param code - The 6-digit code from the authenticator.
3106
- * @throws {ValidationException} When no secret is pending or the code is wrong.
3107
- */
3108
- confirm(userId: string, code: string): Promise<void>;
3109
- /**
3110
- * Verify a code (login step). Returns `false` without throwing.
3111
- *
3112
- * @param userId - The user.
3113
- * @param code - The submitted code.
3114
- * @returns `true` when the code is valid.
3115
- */
3116
- verify(userId: string, code: string): Promise<boolean>;
3117
- /**
3118
- * Disable MFA after verifying a code.
3119
- *
3120
- * @param userId - The user.
3121
- * @param code - The submitted code.
3122
- * @throws {ValidationException} When the code is invalid.
3123
- */
3124
- disable(userId: string, code: string): Promise<void>;
3125
- }
3126
-
3127
3301
  /**
3128
3302
  * Email-activation flow, mirroring the FastAPI SDK activation flow.
3129
3303
  *
@@ -3623,6 +3797,6 @@ interface RunServerOptions {
3623
3797
  declare function runServer(app: Express, options?: RunServerOptions): Promise<Server>;
3624
3798
 
3625
3799
  /** The installed SDK version. Single source of truth for the barrel + CLI. */
3626
- declare const VERSION = "0.9.0";
3800
+ declare const VERSION = "0.11.0";
3627
3801
 
3628
- export { type ActivationInput, ActivationService, type ActivationServiceOptions, type ActivationStore, type AdminField, type AdminListQuery, type AdminListResult, type AdminResource, type AdminRouterOptions, AdminSite, AppException, type AppExceptionHandlerOptions, type AppExceptionOptions, type AttachWebSocketOptions, AttemptThrottle, type AttemptThrottleOptions, type AuthResponse, type AuthRouterOptions, type AuthUser, type BaseAppSettings, BaseController, BaseModel, type BaseResponse, BaseService, type BrokerManager, CEP_PATTERN, CNPJ_PATTERN, CPF_PATTERN, type CPUMetrics, type CacheManager, type CachedOptions, type CatalogData, CircuitOpenError, type ClientIpOptions, CompositeFeatureFlagBackend, ConflictException, type CreateAppOpenApi, type CreateAppOptions, type CursorPaginationFilter, DEFAULT_LOCALE, type EmailMessage, type EmailOptions, EmailUtils, type Enum, type EnumHelpers, type EnumSpec, EnvFeatureFlagBackend, EventStream, type EventStreamOptions, type ExceptionDetails, ExpiredTokenException, type FeatureFlagBackend, FeatureFlags, type FlagContext, ForbiddenException, type GPUMetrics, type GenerateOpenApiOptions, HTTPClient, type HTTPClientOptions, HTTP_500_MARKER, type HandshakeInfo, type HealthCheck, type HealthRouterOptions, type InboundHandler, type InboundMessage, InvalidTokenException, type IssuedSession, JSONLogger, JWTUtils, type JWTUtilsOptions, type JwtAuthOptions, type JwtClaims, LocalUploadStorage, type LocalUploadStorageOptions, type LogExtra, type LogLevel, type LoginInput, type MediaKind, MemoryBroker, MemoryCacheManager, MemoryFeatureFlagBackend, type MemoryMetrics, MemorySessionStore, MemoryThrottleBackend, MessageCatalog, type MessageHandler, type MessagingProvider, type MetricsRouterOptions, MetricsUtils, type MfaCodeInput, type MfaEnrollment, MfaService, type MfaServiceOptions, type MfaStore, NotFoundException, type OpenApiDocument, type OpenApiInfo, type OutboundMedia, type OutboundResult, PHONE_BR_PATTERN, type PaginationFilter, type PasswordResetConfirmInput, type PasswordResetRequestInput, PasswordResetService, type PasswordResetServiceOptions, type PasswordResetStore, PasswordUtils, REQUEST_ID_HEADER, RabbitBroker, type RabbitBrokerOptions, RedisCacheManager, type RedisLike, type RedisPublisherLike, RedisSSEBroker, type RedisSSEBrokerOptions, RedisSessionStore, type RedisSubscriberLike, type RedocOptions, type RefreshInput, Region, type RegionValue, type RegisterExceptionHandlersOptions, type RequestContext, type ResponseMapper, RetryPolicy, type RunServerOptions, SSEBroker, type SaveOptions, type SendOptions, ServerSentEvent, type ServerSentEventInit, type Session, type SessionMiddlewareOptions, type SessionRedisLike, SessionService, type SessionServiceOptions, type SessionStore, type SignupInput, type StateBR, type SwaggerOptions, type SystemMetrics, TOTPHelper, type TOTPOptions, type TaskHandler, TaskManager, type TaskManagerOptions, TelegramProvider, type TelegramProviderOptions, type ThrottleBackend, type ThrottleStatus, type ToDictOptions, type TokenPair, TooManyRequestsException, type TooManyRequestsOptions, TwilioSmsProvider, type TwilioSmsProviderOptions, type TwilioWebhookOptions, UF, type UFValue, UnauthorizedException, type UnhandledExceptionHandlerOptions, type UploadResult, type UploadStorage, UserAuthService, type UserAuthServiceOptions, type UserPublic, type UserStore, VERSION, ValidationException, type WSEnvelope, WebPushDispatcher, type WebPushDispatcherOptions, WebPushError, WebPushGoneError, type WebPushKeys, type WebPushPayload, type WebPushSubscription, type WebSocketConnection, WebSocketHub, type WebSocketHubOptions, type WebSocketLike, WhatsAppProvider, type WhatsAppProviderOptions, type WhatsAppWebhookOptions, activationSchema, attachWebSocketHub, authResponseSchema, baseAppSettingsSchema, baseAppSettingsShape, baseResponseSchema, bearerToken, buildContentDisposition, cached, cepField, citiesByUf, cnpjField, coerceFlag, configureLogging, corsSettingsShape, cpfField, cpfOrCnpjField, createApp, createOpenApiRegistry, createdByColumn, cursorPaginationFilterSchema, cursorPaginationSchema, databaseSettingsShape, decodeCursor, defaultMessageCatalog, defineEnum, deletedAtColumn, encodeCursor, generateOpaqueToken, generateOpenApiDocument, getAuth, getClientIp, getConditions, getPaginationConditions, getRequestId, getState, hashOpaqueToken, inboundMessageSchema, isValidCep, isValidCity, isValidCnpj, isValidCpf, isValidCpfCnpj, isValidPhoneBr, isValidUf, listStates, loadSettings, loginSchema, makeAdminRouter, makeAppExceptionHandler, makeAuthRouter, makeFlagGuard, makeHealthRouter, makeJwtAuthMiddleware, makeMetricsRouter, makeSessionMiddleware, makeTwilioWebhookRouter, makeUnhandledExceptionHandler, makeWhatsAppWebhookRouter, mfaCodeSchema, mfaEnrollResponseSchema, modifyDict, mountOpenApiJson, mountRedoc, mountSwaggerUi, normalizeCep, normalizeCnpj, normalizeCpf, normalizeCpfCnpj, normalizePhoneBr, normalizeUf, notFoundHandler, onlyDigits, paginationFilterSchema, paginationSchema, parseAcceptLanguage, parseCookies, passwordResetConfirmSchema, passwordResetRequestSchema, phoneBrField, refreshSchema, registerExceptionHandlers, requestIdMiddleware, requireRoles, runServer, runWithRequestContext, serverSettingsShape, sessionCookie, setRequestId, signupSchema, sseResponse, statesByRegion, tableNameFor, toDict, toUtc, tokenFromUrl, tokenPairSchema, ufField, updatedByColumn, userPublicSchema, utcnow, validateTwilioSignature, verifyOpaqueToken, webPushKeysSchema, webPushPayloadSchema, webPushSubscriptionSchema, wsEnvelopeSchema };
3802
+ export { type ActivationInput, ActivationService, type ActivationServiceOptions, type ActivationStore, type AdminField, type AdminListQuery, type AdminListResult, type AdminResource, type AdminRouterOptions, AdminSite, AppException, type AppExceptionHandlerOptions, type AppExceptionOptions, type AttachWebSocketOptions, AttemptThrottle, type AttemptThrottleOptions, type AuthResponse, type AuthRouterOptions, type AuthUser, type BaseAppSettings, BaseController, BaseModel, type BaseResponse, BaseService, type BroadcastOptions, type BroadcastResult, type BrokerManager, CEP_PATTERN, CNPJ_PATTERN, CPF_PATTERN, type CPUMetrics, type CacheManager, type CachedOptions, type CatalogData, CircuitOpenError, type ClientIpOptions, CompositeFeatureFlagBackend, ConflictException, type CreateAppOpenApi, type CreateAppOptions, type CursorPaginationFilter, DEFAULT_LOCALE, type EmailMessage, type EmailOptions, EmailProvider, type EmailProviderOptions, EmailUtils, type Enum, type EnumHelpers, type EnumSpec, EnvFeatureFlagBackend, EventStream, type EventStreamOptions, type ExceptionDetails, ExpiredTokenException, type FeatureFlagBackend, FeatureFlags, type FlagContext, ForbiddenException, type GPUMetrics, type GenerateOpenApiOptions, HTTPClient, type HTTPClientOptions, HTTP_500_MARKER, type HandshakeInfo, type HealthCheck, type HealthRouterOptions, type InboundHandler, type InboundMessage, InvalidTokenException, type IssuedSession, JSONLogger, JWTUtils, type JWTUtilsOptions, type JwtAuthOptions, type JwtClaims, LocalUploadStorage, type LocalUploadStorageOptions, type LogExtra, type LogLevel, type LoginInput, type LoginResult, type MediaKind, MemoryBroker, MemoryCacheManager, MemoryFeatureFlagBackend, type MemoryMetrics, MemorySessionStore, MemoryThrottleBackend, MessageCatalog, type MessageHandler, MessagingHub, type MessagingProvider, type MetricsRouterOptions, MetricsUtils, type MfaChallenge, type MfaChallengeInput, type MfaCodeInput, type MfaEnrollment, MfaService, type MfaServiceOptions, type MfaStore, NotFoundException, type OpenApiDocument, type OpenApiInfo, type OutboundMedia, type OutboundResult, PHONE_BR_PATTERN, type PaginationFilter, type PasswordResetConfirmInput, type PasswordResetRequestInput, PasswordResetService, type PasswordResetServiceOptions, type PasswordResetStore, PasswordUtils, REQUEST_ID_HEADER, RabbitBroker, type RabbitBrokerOptions, RedisCacheManager, type RedisLike, type RedisPublisherLike, RedisSSEBroker, type RedisSSEBrokerOptions, RedisSessionStore, type RedisSubscriberLike, type RedocOptions, type RefreshInput, Region, type RegionValue, type RegisterExceptionHandlersOptions, type RequestContext, type ResponseMapper, RetryPolicy, type RunServerOptions, SSEBroker, type SaveOptions, type SendOptions, ServerSentEvent, type ServerSentEventInit, type Session, type SessionMiddlewareOptions, type SessionRedisLike, SessionService, type SessionServiceOptions, type SessionStore, type SignupInput, type StateBR, type SwaggerOptions, type SystemMetrics, TOTPHelper, type TOTPOptions, type TaskHandler, TaskManager, type TaskManagerOptions, TelegramProvider, type TelegramProviderOptions, type ThrottleBackend, type ThrottleStatus, type ToDictOptions, type TokenPair, TooManyRequestsException, type TooManyRequestsOptions, TwilioSmsProvider, type TwilioSmsProviderOptions, type TwilioWebhookOptions, UF, type UFValue, UnauthorizedException, type UnhandledExceptionHandlerOptions, type UploadResult, type UploadStorage, UserAuthService, type UserAuthServiceOptions, type UserPublic, type UserStore, VERSION, ValidationException, type WSEnvelope, WebPushDispatcher, type WebPushDispatcherOptions, WebPushError, WebPushGoneError, type WebPushKeys, type WebPushPayload, type WebPushSubscription, type WebSocketConnection, WebSocketHub, type WebSocketHubOptions, type WebSocketLike, WhatsAppProvider, type WhatsAppProviderOptions, type WhatsAppWebhookOptions, activationSchema, attachWebSocketHub, authResponseSchema, baseAppSettingsSchema, baseAppSettingsShape, baseResponseSchema, bearerToken, broadcastText, buildContentDisposition, cached, cepField, citiesByUf, cnpjField, coerceFlag, configureLogging, corsSettingsShape, cpfField, cpfOrCnpjField, createApp, createOpenApiRegistry, createdByColumn, cursorPaginationFilterSchema, cursorPaginationSchema, databaseSettingsShape, decodeCursor, defaultMessageCatalog, defineEnum, deletedAtColumn, encodeCursor, generateOpaqueToken, generateOpenApiDocument, getAuth, getClientIp, getConditions, getPaginationConditions, getRequestId, getState, hashOpaqueToken, inboundMessageSchema, isValidCep, isValidCity, isValidCnpj, isValidCpf, isValidCpfCnpj, isValidPhoneBr, isValidUf, listStates, loadSettings, loginSchema, makeAdminRouter, makeAppExceptionHandler, makeAuthRouter, makeFlagGuard, makeHealthRouter, makeJwtAuthMiddleware, makeMetricsRouter, makeSessionMiddleware, makeTwilioWebhookRouter, makeUnhandledExceptionHandler, makeWhatsAppWebhookRouter, mfaChallengeSchema, mfaCodeSchema, mfaEnrollResponseSchema, modifyDict, mountOpenApiJson, mountRedoc, mountSwaggerUi, normalizeCep, normalizeCnpj, normalizeCpf, normalizeCpfCnpj, normalizePhoneBr, normalizeUf, notFoundHandler, onlyDigits, paginationFilterSchema, paginationSchema, parseAcceptLanguage, parseCookies, passwordResetConfirmSchema, passwordResetRequestSchema, phoneBrField, refreshSchema, registerExceptionHandlers, requestIdMiddleware, requireRoles, runServer, runWithRequestContext, serverSettingsShape, sessionCookie, setRequestId, signupSchema, sseResponse, statesByRegion, tableNameFor, toDict, toUtc, tokenFromUrl, tokenPairSchema, ufField, updatedByColumn, userPublicSchema, utcnow, validateTwilioSignature, verifyOpaqueToken, webPushKeysSchema, webPushPayloadSchema, webPushSubscriptionSchema, wsEnvelopeSchema };