tempest-express-sdk 0.8.0 → 0.9.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/README.md +4 -3
- package/dist/chunk-4QZZGHGV.js +6 -0
- package/dist/{chunk-JWJJAIXV.js.map → chunk-4QZZGHGV.js.map} +1 -1
- package/dist/cli.cjs +1 -1
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.cjs +60 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +55 -7
- package/dist/index.d.ts +55 -7
- package/dist/index.js +60 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-JWJJAIXV.js +0 -6
package/dist/index.d.cts
CHANGED
|
@@ -1291,8 +1291,9 @@ declare class HTTPClient {
|
|
|
1291
1291
|
* System metrics, mirroring `utils.metrics.MetricsUtils`.
|
|
1292
1292
|
*
|
|
1293
1293
|
* Reads CPU, memory and process stats from Node's built-in `node:os` /
|
|
1294
|
-
* `process` — no native dependency
|
|
1295
|
-
*
|
|
1294
|
+
* `process` — no native dependency. Optional GPU metrics shell out to
|
|
1295
|
+
* `nvidia-smi` (returns `[]` when unavailable). Includes a Prometheus
|
|
1296
|
+
* text-format exporter.
|
|
1296
1297
|
*/
|
|
1297
1298
|
/** CPU load metrics. */
|
|
1298
1299
|
interface CPUMetrics {
|
|
@@ -1316,6 +1317,19 @@ interface MemoryMetrics {
|
|
|
1316
1317
|
/** Resident set size of the current process. */
|
|
1317
1318
|
processRss: number;
|
|
1318
1319
|
}
|
|
1320
|
+
/** A single GPU's metrics (from `nvidia-smi`). */
|
|
1321
|
+
interface GPUMetrics {
|
|
1322
|
+
/** GPU index. */
|
|
1323
|
+
index: number;
|
|
1324
|
+
/** GPU utilization percent. */
|
|
1325
|
+
utilizationPercent: number;
|
|
1326
|
+
/** Used memory in MiB. */
|
|
1327
|
+
memoryUsedMb: number;
|
|
1328
|
+
/** Total memory in MiB. */
|
|
1329
|
+
memoryTotalMb: number;
|
|
1330
|
+
/** Core temperature in °C. */
|
|
1331
|
+
temperatureC: number;
|
|
1332
|
+
}
|
|
1319
1333
|
/** A snapshot of system + process metrics. */
|
|
1320
1334
|
interface SystemMetrics {
|
|
1321
1335
|
cpu: CPUMetrics;
|
|
@@ -1330,17 +1344,26 @@ declare function readMemory(): MemoryMetrics;
|
|
|
1330
1344
|
/** Read a full system snapshot. */
|
|
1331
1345
|
declare function readSystem(): SystemMetrics;
|
|
1332
1346
|
/**
|
|
1333
|
-
*
|
|
1347
|
+
* Read GPU metrics via `nvidia-smi`. Returns `[]` when the tool is absent or
|
|
1348
|
+
* fails (no GPU, not installed) — never throws.
|
|
1349
|
+
*
|
|
1350
|
+
* @returns One {@link GPUMetrics} per detected GPU.
|
|
1351
|
+
*/
|
|
1352
|
+
declare function readGpus(): Promise<GPUMetrics[]>;
|
|
1353
|
+
/**
|
|
1354
|
+
* Render metrics as Prometheus text-format.
|
|
1334
1355
|
*
|
|
1335
|
-
* @param snapshot - A snapshot (defaults to a fresh {@link readSystem}).
|
|
1356
|
+
* @param snapshot - A system snapshot (defaults to a fresh {@link readSystem}).
|
|
1357
|
+
* @param gpus - Optional GPU metrics to append (from {@link readGpus}).
|
|
1336
1358
|
* @returns The Prometheus exposition text.
|
|
1337
1359
|
*/
|
|
1338
|
-
declare function toPrometheus(snapshot?: SystemMetrics): string;
|
|
1360
|
+
declare function toPrometheus(snapshot?: SystemMetrics, gpus?: GPUMetrics[]): string;
|
|
1339
1361
|
/** Stateless system-metrics reader + Prometheus exporter. */
|
|
1340
1362
|
declare const MetricsUtils: {
|
|
1341
1363
|
readonly cpu: typeof readCpu;
|
|
1342
1364
|
readonly memory: typeof readMemory;
|
|
1343
1365
|
readonly system: typeof readSystem;
|
|
1366
|
+
readonly gpus: typeof readGpus;
|
|
1344
1367
|
readonly toPrometheus: typeof toPrometheus;
|
|
1345
1368
|
};
|
|
1346
1369
|
|
|
@@ -3509,6 +3532,31 @@ interface HealthRouterOptions {
|
|
|
3509
3532
|
*/
|
|
3510
3533
|
declare function makeHealthRouter(options?: HealthRouterOptions): Router;
|
|
3511
3534
|
|
|
3535
|
+
/**
|
|
3536
|
+
* Prometheus `/metrics` router, mirroring `api.routers.metrics`.
|
|
3537
|
+
*
|
|
3538
|
+
* Serves {@link MetricsUtils.toPrometheus} as `text/plain`. Optionally includes
|
|
3539
|
+
* GPU metrics (via `nvidia-smi`) and can be guarded so the endpoint stays on the
|
|
3540
|
+
* internal network / behind auth.
|
|
3541
|
+
*/
|
|
3542
|
+
|
|
3543
|
+
/** Options for {@link makeMetricsRouter}. */
|
|
3544
|
+
interface MetricsRouterOptions {
|
|
3545
|
+
/** Route path. Default `/metrics`. */
|
|
3546
|
+
path?: string;
|
|
3547
|
+
/** Include GPU metrics via `nvidia-smi` (adds a subprocess call). Default `false`. */
|
|
3548
|
+
includeGpu?: boolean;
|
|
3549
|
+
/** Optional guard middleware (e.g. internal-network or token check). */
|
|
3550
|
+
guard?: RequestHandler;
|
|
3551
|
+
}
|
|
3552
|
+
/**
|
|
3553
|
+
* Build the Prometheus metrics router.
|
|
3554
|
+
*
|
|
3555
|
+
* @param options - Path, GPU toggle and optional guard.
|
|
3556
|
+
* @returns An Express router exposing the metrics endpoint.
|
|
3557
|
+
*/
|
|
3558
|
+
declare function makeMetricsRouter(options?: MetricsRouterOptions): Router;
|
|
3559
|
+
|
|
3512
3560
|
/**
|
|
3513
3561
|
* Application factory and server runner, mirroring `api.app` + `api.server`.
|
|
3514
3562
|
*
|
|
@@ -3575,6 +3623,6 @@ interface RunServerOptions {
|
|
|
3575
3623
|
declare function runServer(app: Express, options?: RunServerOptions): Promise<Server>;
|
|
3576
3624
|
|
|
3577
3625
|
/** The installed SDK version. Single source of truth for the barrel + CLI. */
|
|
3578
|
-
declare const VERSION = "0.
|
|
3626
|
+
declare const VERSION = "0.9.0";
|
|
3579
3627
|
|
|
3580
|
-
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 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, 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, 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 };
|
|
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -1291,8 +1291,9 @@ declare class HTTPClient {
|
|
|
1291
1291
|
* System metrics, mirroring `utils.metrics.MetricsUtils`.
|
|
1292
1292
|
*
|
|
1293
1293
|
* Reads CPU, memory and process stats from Node's built-in `node:os` /
|
|
1294
|
-
* `process` — no native dependency
|
|
1295
|
-
*
|
|
1294
|
+
* `process` — no native dependency. Optional GPU metrics shell out to
|
|
1295
|
+
* `nvidia-smi` (returns `[]` when unavailable). Includes a Prometheus
|
|
1296
|
+
* text-format exporter.
|
|
1296
1297
|
*/
|
|
1297
1298
|
/** CPU load metrics. */
|
|
1298
1299
|
interface CPUMetrics {
|
|
@@ -1316,6 +1317,19 @@ interface MemoryMetrics {
|
|
|
1316
1317
|
/** Resident set size of the current process. */
|
|
1317
1318
|
processRss: number;
|
|
1318
1319
|
}
|
|
1320
|
+
/** A single GPU's metrics (from `nvidia-smi`). */
|
|
1321
|
+
interface GPUMetrics {
|
|
1322
|
+
/** GPU index. */
|
|
1323
|
+
index: number;
|
|
1324
|
+
/** GPU utilization percent. */
|
|
1325
|
+
utilizationPercent: number;
|
|
1326
|
+
/** Used memory in MiB. */
|
|
1327
|
+
memoryUsedMb: number;
|
|
1328
|
+
/** Total memory in MiB. */
|
|
1329
|
+
memoryTotalMb: number;
|
|
1330
|
+
/** Core temperature in °C. */
|
|
1331
|
+
temperatureC: number;
|
|
1332
|
+
}
|
|
1319
1333
|
/** A snapshot of system + process metrics. */
|
|
1320
1334
|
interface SystemMetrics {
|
|
1321
1335
|
cpu: CPUMetrics;
|
|
@@ -1330,17 +1344,26 @@ declare function readMemory(): MemoryMetrics;
|
|
|
1330
1344
|
/** Read a full system snapshot. */
|
|
1331
1345
|
declare function readSystem(): SystemMetrics;
|
|
1332
1346
|
/**
|
|
1333
|
-
*
|
|
1347
|
+
* Read GPU metrics via `nvidia-smi`. Returns `[]` when the tool is absent or
|
|
1348
|
+
* fails (no GPU, not installed) — never throws.
|
|
1349
|
+
*
|
|
1350
|
+
* @returns One {@link GPUMetrics} per detected GPU.
|
|
1351
|
+
*/
|
|
1352
|
+
declare function readGpus(): Promise<GPUMetrics[]>;
|
|
1353
|
+
/**
|
|
1354
|
+
* Render metrics as Prometheus text-format.
|
|
1334
1355
|
*
|
|
1335
|
-
* @param snapshot - A snapshot (defaults to a fresh {@link readSystem}).
|
|
1356
|
+
* @param snapshot - A system snapshot (defaults to a fresh {@link readSystem}).
|
|
1357
|
+
* @param gpus - Optional GPU metrics to append (from {@link readGpus}).
|
|
1336
1358
|
* @returns The Prometheus exposition text.
|
|
1337
1359
|
*/
|
|
1338
|
-
declare function toPrometheus(snapshot?: SystemMetrics): string;
|
|
1360
|
+
declare function toPrometheus(snapshot?: SystemMetrics, gpus?: GPUMetrics[]): string;
|
|
1339
1361
|
/** Stateless system-metrics reader + Prometheus exporter. */
|
|
1340
1362
|
declare const MetricsUtils: {
|
|
1341
1363
|
readonly cpu: typeof readCpu;
|
|
1342
1364
|
readonly memory: typeof readMemory;
|
|
1343
1365
|
readonly system: typeof readSystem;
|
|
1366
|
+
readonly gpus: typeof readGpus;
|
|
1344
1367
|
readonly toPrometheus: typeof toPrometheus;
|
|
1345
1368
|
};
|
|
1346
1369
|
|
|
@@ -3509,6 +3532,31 @@ interface HealthRouterOptions {
|
|
|
3509
3532
|
*/
|
|
3510
3533
|
declare function makeHealthRouter(options?: HealthRouterOptions): Router;
|
|
3511
3534
|
|
|
3535
|
+
/**
|
|
3536
|
+
* Prometheus `/metrics` router, mirroring `api.routers.metrics`.
|
|
3537
|
+
*
|
|
3538
|
+
* Serves {@link MetricsUtils.toPrometheus} as `text/plain`. Optionally includes
|
|
3539
|
+
* GPU metrics (via `nvidia-smi`) and can be guarded so the endpoint stays on the
|
|
3540
|
+
* internal network / behind auth.
|
|
3541
|
+
*/
|
|
3542
|
+
|
|
3543
|
+
/** Options for {@link makeMetricsRouter}. */
|
|
3544
|
+
interface MetricsRouterOptions {
|
|
3545
|
+
/** Route path. Default `/metrics`. */
|
|
3546
|
+
path?: string;
|
|
3547
|
+
/** Include GPU metrics via `nvidia-smi` (adds a subprocess call). Default `false`. */
|
|
3548
|
+
includeGpu?: boolean;
|
|
3549
|
+
/** Optional guard middleware (e.g. internal-network or token check). */
|
|
3550
|
+
guard?: RequestHandler;
|
|
3551
|
+
}
|
|
3552
|
+
/**
|
|
3553
|
+
* Build the Prometheus metrics router.
|
|
3554
|
+
*
|
|
3555
|
+
* @param options - Path, GPU toggle and optional guard.
|
|
3556
|
+
* @returns An Express router exposing the metrics endpoint.
|
|
3557
|
+
*/
|
|
3558
|
+
declare function makeMetricsRouter(options?: MetricsRouterOptions): Router;
|
|
3559
|
+
|
|
3512
3560
|
/**
|
|
3513
3561
|
* Application factory and server runner, mirroring `api.app` + `api.server`.
|
|
3514
3562
|
*
|
|
@@ -3575,6 +3623,6 @@ interface RunServerOptions {
|
|
|
3575
3623
|
declare function runServer(app: Express, options?: RunServerOptions): Promise<Server>;
|
|
3576
3624
|
|
|
3577
3625
|
/** The installed SDK version. Single source of truth for the barrel + CLI. */
|
|
3578
|
-
declare const VERSION = "0.
|
|
3626
|
+
declare const VERSION = "0.9.0";
|
|
3579
3627
|
|
|
3580
|
-
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 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, 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, 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 };
|
|
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 };
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { VERSION } from './chunk-
|
|
1
|
+
export { VERSION } from './chunk-4QZZGHGV.js';
|
|
2
2
|
import { AsyncLocalStorage } from 'async_hooks';
|
|
3
3
|
import { extendZodWithOpenApi, OpenAPIRegistry, OpenApiGeneratorV31, OpenApiGeneratorV3 } from '@asteasolutions/zod-to-openapi';
|
|
4
4
|
export { OpenAPIRegistry } from '@asteasolutions/zod-to-openapi';
|
|
@@ -7,7 +7,9 @@ export { z } from 'zod';
|
|
|
7
7
|
import { Model, column, sql } from 'tempest-db-js';
|
|
8
8
|
export { AsyncEngine, AsyncResult, AsyncSession, BaseRepository, Column, DeleteBuilder, InsertBuilder, Model, NoResultError, NodeSqliteDriver, PostgresDialect, RecordNotFound, SelectBuilder, SqliteDialect, SyncEngine, SyncSession, UpdateBuilder, and, belongsTo, column, columnsOf, createEngine, createSyncEngine, del, detectDialect, getDialect, hasMany, insert, join, loadRelations, not, or, parseDatabaseUrl, select, sql, update } from 'tempest-db-js';
|
|
9
9
|
import { createHash, randomBytes, timingSafeEqual, randomUUID, createHmac } from 'crypto';
|
|
10
|
+
import { execFile } from 'child_process';
|
|
10
11
|
import { cpus, loadavg, totalmem, freemem } from 'os';
|
|
12
|
+
import { promisify } from 'util';
|
|
11
13
|
import { mkdir, writeFile, readFile, rm } from 'fs/promises';
|
|
12
14
|
import { join, dirname } from 'path';
|
|
13
15
|
import express2, { Router } from 'express';
|
|
@@ -7008,6 +7010,7 @@ var HTTPClient = class {
|
|
|
7008
7010
|
return this.request("DELETE", url, init);
|
|
7009
7011
|
}
|
|
7010
7012
|
};
|
|
7013
|
+
var execFileAsync = promisify(execFile);
|
|
7011
7014
|
function readCpu() {
|
|
7012
7015
|
const cores = cpus().length;
|
|
7013
7016
|
const load1 = loadavg()[0] ?? 0;
|
|
@@ -7036,7 +7039,27 @@ function readSystem() {
|
|
|
7036
7039
|
uptimeSeconds: process.uptime()
|
|
7037
7040
|
};
|
|
7038
7041
|
}
|
|
7039
|
-
function
|
|
7042
|
+
async function readGpus() {
|
|
7043
|
+
try {
|
|
7044
|
+
const { stdout } = await execFileAsync("nvidia-smi", [
|
|
7045
|
+
"--query-gpu=index,utilization.gpu,memory.used,memory.total,temperature.gpu",
|
|
7046
|
+
"--format=csv,noheader,nounits"
|
|
7047
|
+
]);
|
|
7048
|
+
return stdout.trim().split("\n").filter((line) => line.trim().length > 0).map((line) => {
|
|
7049
|
+
const [index, util, used, total, temp] = line.split(",").map((v) => Number(v.trim()));
|
|
7050
|
+
return {
|
|
7051
|
+
index: index ?? 0,
|
|
7052
|
+
utilizationPercent: util ?? 0,
|
|
7053
|
+
memoryUsedMb: used ?? 0,
|
|
7054
|
+
memoryTotalMb: total ?? 0,
|
|
7055
|
+
temperatureC: temp ?? 0
|
|
7056
|
+
};
|
|
7057
|
+
});
|
|
7058
|
+
} catch {
|
|
7059
|
+
return [];
|
|
7060
|
+
}
|
|
7061
|
+
}
|
|
7062
|
+
function toPrometheus(snapshot = readSystem(), gpus = []) {
|
|
7040
7063
|
const lines = [
|
|
7041
7064
|
"# HELP process_cpu_load_percent 1-minute load average as percent of cores",
|
|
7042
7065
|
"# TYPE process_cpu_load_percent gauge",
|
|
@@ -7051,6 +7074,29 @@ function toPrometheus(snapshot = readSystem()) {
|
|
|
7051
7074
|
"# TYPE process_uptime_seconds counter",
|
|
7052
7075
|
`process_uptime_seconds ${snapshot.uptimeSeconds}`
|
|
7053
7076
|
];
|
|
7077
|
+
if (gpus.length > 0) {
|
|
7078
|
+
lines.push(
|
|
7079
|
+
"# HELP gpu_utilization_percent GPU utilization percent",
|
|
7080
|
+
"# TYPE gpu_utilization_percent gauge"
|
|
7081
|
+
);
|
|
7082
|
+
for (const gpu of gpus) {
|
|
7083
|
+
lines.push(`gpu_utilization_percent{gpu="${gpu.index}"} ${gpu.utilizationPercent}`);
|
|
7084
|
+
}
|
|
7085
|
+
lines.push(
|
|
7086
|
+
"# HELP gpu_memory_used_mb GPU memory used in MiB",
|
|
7087
|
+
"# TYPE gpu_memory_used_mb gauge"
|
|
7088
|
+
);
|
|
7089
|
+
for (const gpu of gpus) {
|
|
7090
|
+
lines.push(`gpu_memory_used_mb{gpu="${gpu.index}"} ${gpu.memoryUsedMb}`);
|
|
7091
|
+
}
|
|
7092
|
+
lines.push(
|
|
7093
|
+
"# HELP gpu_temperature_celsius GPU core temperature",
|
|
7094
|
+
"# TYPE gpu_temperature_celsius gauge"
|
|
7095
|
+
);
|
|
7096
|
+
for (const gpu of gpus) {
|
|
7097
|
+
lines.push(`gpu_temperature_celsius{gpu="${gpu.index}"} ${gpu.temperatureC}`);
|
|
7098
|
+
}
|
|
7099
|
+
}
|
|
7054
7100
|
return `${lines.join("\n")}
|
|
7055
7101
|
`;
|
|
7056
7102
|
}
|
|
@@ -7058,6 +7104,7 @@ var MetricsUtils = {
|
|
|
7058
7104
|
cpu: readCpu,
|
|
7059
7105
|
memory: readMemory,
|
|
7060
7106
|
system: readSystem,
|
|
7107
|
+
gpus: readGpus,
|
|
7061
7108
|
toPrometheus
|
|
7062
7109
|
};
|
|
7063
7110
|
|
|
@@ -9314,6 +9361,16 @@ function makeHealthRouter(options = {}) {
|
|
|
9314
9361
|
});
|
|
9315
9362
|
return router;
|
|
9316
9363
|
}
|
|
9364
|
+
function makeMetricsRouter(options = {}) {
|
|
9365
|
+
const path = options.path ?? "/metrics";
|
|
9366
|
+
const router = Router();
|
|
9367
|
+
if (options.guard) router.use(path, options.guard);
|
|
9368
|
+
router.get(path, async (_req, res) => {
|
|
9369
|
+
const gpus = options.includeGpu ? await MetricsUtils.gpus() : [];
|
|
9370
|
+
res.type("text/plain").send(MetricsUtils.toPrometheus(MetricsUtils.system(), gpus));
|
|
9371
|
+
});
|
|
9372
|
+
return router;
|
|
9373
|
+
}
|
|
9317
9374
|
var logger3 = new JSONLogger("tempest_express_sdk.api.server");
|
|
9318
9375
|
function corsMiddleware(origins) {
|
|
9319
9376
|
const allowAll = origins === "*";
|
|
@@ -9379,6 +9436,6 @@ function runServer(app, options = {}) {
|
|
|
9379
9436
|
});
|
|
9380
9437
|
}
|
|
9381
9438
|
|
|
9382
|
-
export { ActivationService, AdminSite, AppException, AttemptThrottle, BaseController, BaseModel, BaseService, CEP_PATTERN, CNPJ_PATTERN, CPF_PATTERN, CircuitOpenError, CompositeFeatureFlagBackend, ConflictException, DEFAULT_LOCALE, EmailUtils, EnvFeatureFlagBackend, EventStream, ExpiredTokenException, FeatureFlags, ForbiddenException, HTTPClient, HTTP_500_MARKER, InvalidTokenException, JSONLogger, JWTUtils, LocalUploadStorage, MemoryBroker, MemoryCacheManager, MemoryFeatureFlagBackend, MemorySessionStore, MemoryThrottleBackend, MessageCatalog, MetricsUtils, MfaService, NotFoundException, PHONE_BR_PATTERN, PasswordResetService, PasswordUtils, REQUEST_ID_HEADER, RabbitBroker, RedisCacheManager, RedisSSEBroker, RedisSessionStore, Region, RetryPolicy, SSEBroker, ServerSentEvent, SessionService, TOTPHelper, TaskManager, TelegramProvider, TooManyRequestsException, TwilioSmsProvider, UF, UnauthorizedException, UserAuthService, ValidationException, WebPushDispatcher, WebPushError, WebPushGoneError, WebSocketHub, WhatsAppProvider, activationSchema, attachWebSocketHub, authResponseSchema, baseAppSettingsSchema, baseAppSettingsShape, baseResponseSchema, bearerToken, buildContentDisposition, cached3 as 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, 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 };
|
|
9439
|
+
export { ActivationService, AdminSite, AppException, AttemptThrottle, BaseController, BaseModel, BaseService, CEP_PATTERN, CNPJ_PATTERN, CPF_PATTERN, CircuitOpenError, CompositeFeatureFlagBackend, ConflictException, DEFAULT_LOCALE, EmailUtils, EnvFeatureFlagBackend, EventStream, ExpiredTokenException, FeatureFlags, ForbiddenException, HTTPClient, HTTP_500_MARKER, InvalidTokenException, JSONLogger, JWTUtils, LocalUploadStorage, MemoryBroker, MemoryCacheManager, MemoryFeatureFlagBackend, MemorySessionStore, MemoryThrottleBackend, MessageCatalog, MetricsUtils, MfaService, NotFoundException, PHONE_BR_PATTERN, PasswordResetService, PasswordUtils, REQUEST_ID_HEADER, RabbitBroker, RedisCacheManager, RedisSSEBroker, RedisSessionStore, Region, RetryPolicy, SSEBroker, ServerSentEvent, SessionService, TOTPHelper, TaskManager, TelegramProvider, TooManyRequestsException, TwilioSmsProvider, UF, UnauthorizedException, UserAuthService, ValidationException, WebPushDispatcher, WebPushError, WebPushGoneError, WebSocketHub, WhatsAppProvider, activationSchema, attachWebSocketHub, authResponseSchema, baseAppSettingsSchema, baseAppSettingsShape, baseResponseSchema, bearerToken, buildContentDisposition, cached3 as 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 };
|
|
9383
9440
|
//# sourceMappingURL=index.js.map
|
|
9384
9441
|
//# sourceMappingURL=index.js.map
|