tempest-express-sdk 0.26.0 → 0.27.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 +1 -1
- package/dist/{chunk-GLZYNX63.js → chunk-ADF7OHRH.js} +3 -3
- package/dist/{chunk-GLZYNX63.js.map → chunk-ADF7OHRH.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 +514 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +177 -4
- package/dist/index.d.ts +177 -4
- package/dist/index.js +511 -16
- package/dist/index.js.map +1 -1
- package/package.json +7 -1
package/dist/index.d.cts
CHANGED
|
@@ -3896,6 +3896,24 @@ interface AdminModelOptions<C extends ModelClass> {
|
|
|
3896
3896
|
* its filters and ordering through `?lens=<slug>`.
|
|
3897
3897
|
*/
|
|
3898
3898
|
lenses?: readonly AdminLens[];
|
|
3899
|
+
/**
|
|
3900
|
+
* String columns rendered as file inputs. The uploaded file is written
|
|
3901
|
+
* through `uploadStorage` and the returned storage key goes in the column.
|
|
3902
|
+
*/
|
|
3903
|
+
uploadFields?: readonly string[];
|
|
3904
|
+
/** Backend persisting uploaded files. Required when `uploadFields` is set. */
|
|
3905
|
+
uploadStorage?: UploadStorage;
|
|
3906
|
+
/**
|
|
3907
|
+
* Expose the CSV import page (`GET/POST {prefix}/m/{slug}/import`), which
|
|
3908
|
+
* bulk-creates rows from an uploaded file. Default `false`; also requires
|
|
3909
|
+
* `canCreate`.
|
|
3910
|
+
*/
|
|
3911
|
+
canImport?: boolean;
|
|
3912
|
+
/**
|
|
3913
|
+
* Foreign-key columns rendered as a typed search box instead of a `<select>`
|
|
3914
|
+
* of every related row — for target tables too large to pre-load.
|
|
3915
|
+
*/
|
|
3916
|
+
autocompleteFields?: readonly string[];
|
|
3899
3917
|
}
|
|
3900
3918
|
/**
|
|
3901
3919
|
* The admin configuration for one model.
|
|
@@ -3937,6 +3955,14 @@ declare class AdminModel<C extends ModelClass = ModelClass> {
|
|
|
3937
3955
|
readonly auditModel: ModelClass | null;
|
|
3938
3956
|
/** Saved list-view presets, in declaration order. */
|
|
3939
3957
|
readonly lenses: AdminLens[];
|
|
3958
|
+
/** Columns rendered as file inputs. */
|
|
3959
|
+
readonly uploadFields: string[];
|
|
3960
|
+
/** Backend persisting uploaded files, or `null`. */
|
|
3961
|
+
readonly uploadStorage: UploadStorage | null;
|
|
3962
|
+
/** Whether the CSV import page is exposed. */
|
|
3963
|
+
readonly canImport: boolean;
|
|
3964
|
+
/** Foreign-key columns rendered as a typed search box. */
|
|
3965
|
+
readonly autocompleteFields: string[];
|
|
3940
3966
|
private readonly actions;
|
|
3941
3967
|
private readonly slugOverride;
|
|
3942
3968
|
private readonly listDisplayOverride;
|
|
@@ -4086,6 +4112,81 @@ type AdminPermission = (typeof AdminPermission)[keyof typeof AdminPermission];
|
|
|
4086
4112
|
*/
|
|
4087
4113
|
type AdminAccessPolicy = (principal: unknown, admin: AdminModel, action: AdminPermission) => boolean | Promise<boolean>;
|
|
4088
4114
|
|
|
4115
|
+
/**
|
|
4116
|
+
* Multipart form parsing for the admin's upload and import screens.
|
|
4117
|
+
*
|
|
4118
|
+
* The panel's ordinary forms are `application/x-www-form-urlencoded`, which
|
|
4119
|
+
* Express parses on its own. A form carrying a file is `multipart/form-data`,
|
|
4120
|
+
* which it does not — so this module wraps `busboy`, the streaming parser
|
|
4121
|
+
* behind most of the Node ecosystem's upload middleware.
|
|
4122
|
+
*
|
|
4123
|
+
* `busboy` is an **optional peer**: only a project that configures
|
|
4124
|
+
* `uploadFields` or `canImport` needs it, and the error below says exactly what
|
|
4125
|
+
* to install. Multipart is a wire format with a long tail of correctness
|
|
4126
|
+
* (boundary handling, transfer encodings, filename escaping) — the kind of
|
|
4127
|
+
* parser this SDK depends on rather than reimplements.
|
|
4128
|
+
*/
|
|
4129
|
+
|
|
4130
|
+
/** One uploaded file, buffered in memory. */
|
|
4131
|
+
interface UploadedFile {
|
|
4132
|
+
/** The form field the file arrived on. */
|
|
4133
|
+
field: string;
|
|
4134
|
+
/** The client-supplied filename, already stripped of any path. */
|
|
4135
|
+
filename: string;
|
|
4136
|
+
/** The declared MIME type. */
|
|
4137
|
+
contentType: string;
|
|
4138
|
+
/** The file bytes. */
|
|
4139
|
+
data: Buffer;
|
|
4140
|
+
}
|
|
4141
|
+
/** The result of parsing a multipart body. */
|
|
4142
|
+
interface ParsedMultipart {
|
|
4143
|
+
/** Text fields, keyed by name. A repeated field keeps its last value. */
|
|
4144
|
+
fields: Record<string, string>;
|
|
4145
|
+
/** Uploaded files that carried a filename and at least one byte. */
|
|
4146
|
+
files: UploadedFile[];
|
|
4147
|
+
}
|
|
4148
|
+
/** Options for {@link parseMultipart}. */
|
|
4149
|
+
interface ParseMultipartOptions {
|
|
4150
|
+
/** Reject a file larger than this many bytes. Default `10 * 1024 * 1024`. */
|
|
4151
|
+
maxFileBytes?: number;
|
|
4152
|
+
/** Reject more than this many files in one submission. Default `10`. */
|
|
4153
|
+
maxFiles?: number;
|
|
4154
|
+
}
|
|
4155
|
+
/**
|
|
4156
|
+
* Raised when a submission exceeds a configured multipart limit.
|
|
4157
|
+
*
|
|
4158
|
+
* Distinct from a parse failure so the caller can turn it into a `400` with a
|
|
4159
|
+
* message the operator can act on ("the file is too large") instead of a
|
|
4160
|
+
* generic failure.
|
|
4161
|
+
*/
|
|
4162
|
+
declare class MultipartLimitError extends Error {
|
|
4163
|
+
/**
|
|
4164
|
+
* @param message - The operator-facing explanation.
|
|
4165
|
+
*/
|
|
4166
|
+
constructor(message: string);
|
|
4167
|
+
}
|
|
4168
|
+
/**
|
|
4169
|
+
* Parse a `multipart/form-data` request body.
|
|
4170
|
+
*
|
|
4171
|
+
* Files are buffered in memory, which is what the admin needs — an operator
|
|
4172
|
+
* attaching a document or a CSV, not a streaming ingest path — and bounded by
|
|
4173
|
+
* `maxFileBytes` so a large upload cannot exhaust the process.
|
|
4174
|
+
*
|
|
4175
|
+
* @param req - The inbound request.
|
|
4176
|
+
* @param options - Size and count limits.
|
|
4177
|
+
* @returns The text fields and the uploaded files.
|
|
4178
|
+
* @throws MultipartLimitError When a limit is exceeded.
|
|
4179
|
+
* @throws Error When `busboy` is missing or the body is not valid multipart.
|
|
4180
|
+
*/
|
|
4181
|
+
declare function parseMultipart(req: Request, options?: ParseMultipartOptions): Promise<ParsedMultipart>;
|
|
4182
|
+
/**
|
|
4183
|
+
* Whether a request carries a multipart body.
|
|
4184
|
+
*
|
|
4185
|
+
* @param req - The inbound request.
|
|
4186
|
+
* @returns `true` when the content type is `multipart/form-data`.
|
|
4187
|
+
*/
|
|
4188
|
+
declare function isMultipart(req: Request): boolean;
|
|
4189
|
+
|
|
4089
4190
|
/**
|
|
4090
4191
|
* Column introspection for the admin panel, mirroring `admin.forms`' widget
|
|
4091
4192
|
* derivation.
|
|
@@ -4099,7 +4200,7 @@ type AdminAccessPolicy = (principal: unknown, admin: AdminModel, action: AdminPe
|
|
|
4099
4200
|
*/
|
|
4100
4201
|
|
|
4101
4202
|
/** The set of form controls the admin knows how to render. */
|
|
4102
|
-
type AdminWidget = "text" | "textarea" | "number" | "checkbox" | "datetime" | "date" | "time" | "select" | "json";
|
|
4203
|
+
type AdminWidget = "text" | "textarea" | "number" | "checkbox" | "datetime" | "date" | "time" | "select" | "json" | "file" | "autocomplete";
|
|
4103
4204
|
/** A `(value, label)` pair for a `select` widget. */
|
|
4104
4205
|
interface AdminSelectOption {
|
|
4105
4206
|
value: string;
|
|
@@ -4207,6 +4308,10 @@ interface AdminFormField {
|
|
|
4207
4308
|
options: AdminSelectOption[];
|
|
4208
4309
|
/** Per-field validation error, or `null`. */
|
|
4209
4310
|
error: string | null;
|
|
4311
|
+
/** For an `autocomplete` widget, the JSON search endpoint backing the input. */
|
|
4312
|
+
autocompleteUrl: string | null;
|
|
4313
|
+
/** For an `autocomplete` widget, the label of the currently selected row. */
|
|
4314
|
+
displayLabel: string;
|
|
4210
4315
|
}
|
|
4211
4316
|
/** The outcome of parsing a submitted create/edit form. */
|
|
4212
4317
|
interface ParsedAdminForm {
|
|
@@ -4215,6 +4320,17 @@ interface ParsedAdminForm {
|
|
|
4215
4320
|
/** Per-field error messages, keyed by column. Empty when the form is valid. */
|
|
4216
4321
|
errors: Record<string, string>;
|
|
4217
4322
|
}
|
|
4323
|
+
/** Options for {@link parseFormBody}. */
|
|
4324
|
+
interface ParseFormBodyOptions {
|
|
4325
|
+
/**
|
|
4326
|
+
* Read upload columns as plain text instead of skipping them.
|
|
4327
|
+
*
|
|
4328
|
+
* The create/edit form skips them because the router writes the storage key
|
|
4329
|
+
* after saving the file. A CSV import has no file to save — it carries the
|
|
4330
|
+
* key already — so it reads them like any other string column.
|
|
4331
|
+
*/
|
|
4332
|
+
uploadsAsText?: boolean;
|
|
4333
|
+
}
|
|
4218
4334
|
/** Options for {@link buildFormFields}. */
|
|
4219
4335
|
interface BuildFormFieldsOptions {
|
|
4220
4336
|
/** Current values, keyed by column — a row on edit, a re-submission on error. */
|
|
@@ -4227,6 +4343,13 @@ interface BuildFormFieldsOptions {
|
|
|
4227
4343
|
* of a raw identity text input.
|
|
4228
4344
|
*/
|
|
4229
4345
|
foreignKeyOptions?: Record<string, AdminSelectOption[]>;
|
|
4346
|
+
/**
|
|
4347
|
+
* Search endpoints for foreign-key columns listed in `autocompleteFields`,
|
|
4348
|
+
* keyed by column. A field listed here renders as a typed search box.
|
|
4349
|
+
*/
|
|
4350
|
+
autocompleteUrls?: Record<string, string>;
|
|
4351
|
+
/** Current labels for autocomplete fields, keyed by column. */
|
|
4352
|
+
autocompleteLabels?: Record<string, string>;
|
|
4230
4353
|
}
|
|
4231
4354
|
/**
|
|
4232
4355
|
* Render a stored value into the string a control pre-fills with.
|
|
@@ -4262,7 +4385,7 @@ declare function buildFormFields(admin: AdminModel, options?: BuildFormFieldsOpt
|
|
|
4262
4385
|
* @param body - The parsed request body.
|
|
4263
4386
|
* @returns The coerced values plus any per-field errors.
|
|
4264
4387
|
*/
|
|
4265
|
-
declare function parseFormBody(admin: AdminModel, body: Record<string, unknown
|
|
4388
|
+
declare function parseFormBody(admin: AdminModel, body: Record<string, unknown>, options?: ParseFormBodyOptions): ParsedAdminForm;
|
|
4266
4389
|
/**
|
|
4267
4390
|
* Render a stored value for a read-only list or detail cell.
|
|
4268
4391
|
*
|
|
@@ -4895,6 +5018,8 @@ interface AdminListView {
|
|
|
4895
5018
|
sort: Record<string, AdminSortView>;
|
|
4896
5019
|
/** URL of the create form, or `null` when creation is disabled. */
|
|
4897
5020
|
newUrl: string | null;
|
|
5021
|
+
/** URL of the CSV import page, or `null` when import is disabled. */
|
|
5022
|
+
importUrl: string | null;
|
|
4898
5023
|
/** Bulk actions offered above the table. Empty hides the whole bulk UI. */
|
|
4899
5024
|
bulkActions: BulkActionOption[];
|
|
4900
5025
|
/** URL the bulk form posts to. */
|
|
@@ -4999,6 +5124,38 @@ interface AdminFormView {
|
|
|
4999
5124
|
* @throws Error When called without a session, since the form needs a CSRF token.
|
|
5000
5125
|
*/
|
|
5001
5126
|
declare function renderFormPage(context: AdminRenderContext, view: AdminFormView): string;
|
|
5127
|
+
/** The outcome of a CSV import, as the page renders it. */
|
|
5128
|
+
interface AdminImportView {
|
|
5129
|
+
/** Plural display name of the model being imported into. */
|
|
5130
|
+
title: string;
|
|
5131
|
+
/** URL the upload form posts to. */
|
|
5132
|
+
actionUrl: string;
|
|
5133
|
+
/** URL of the list view. */
|
|
5134
|
+
backUrl: string;
|
|
5135
|
+
/** The column headers the CSV is expected to carry. */
|
|
5136
|
+
columns: string[];
|
|
5137
|
+
/** A form-level error, or `null`. */
|
|
5138
|
+
error: string | null;
|
|
5139
|
+
/** How many rows were created, or `null` before the first submission. */
|
|
5140
|
+
created: number | null;
|
|
5141
|
+
/** Per-row failures, numbered as the spreadsheet numbers them. */
|
|
5142
|
+
rowErrors: {
|
|
5143
|
+
row: number;
|
|
5144
|
+
message: string;
|
|
5145
|
+
}[];
|
|
5146
|
+
}
|
|
5147
|
+
/**
|
|
5148
|
+
* Render the CSV import page.
|
|
5149
|
+
*
|
|
5150
|
+
* Row numbers start at 2 because row 1 is the header, so the numbers line up
|
|
5151
|
+
* with what the operator sees in their spreadsheet.
|
|
5152
|
+
*
|
|
5153
|
+
* @param context - The shared chrome data (with an active session).
|
|
5154
|
+
* @param view - The prepared import view model.
|
|
5155
|
+
* @returns The full page.
|
|
5156
|
+
* @throws Error When called without a session, since the form needs a CSRF token.
|
|
5157
|
+
*/
|
|
5158
|
+
declare function renderImportPage(context: AdminRenderContext, view: AdminImportView): string;
|
|
5002
5159
|
|
|
5003
5160
|
/**
|
|
5004
5161
|
* The server-rendered admin panel router, mirroring `admin.router`.
|
|
@@ -5059,6 +5216,8 @@ interface AdminRouterOptions {
|
|
|
5059
5216
|
* lets every signed-in operator do whatever those flags allow.
|
|
5060
5217
|
*/
|
|
5061
5218
|
accessPolicy?: AdminAccessPolicy;
|
|
5219
|
+
/** Largest upload the panel accepts, in bytes. Default `10485760` (10 MB). */
|
|
5220
|
+
maxUploadBytes?: number;
|
|
5062
5221
|
}
|
|
5063
5222
|
/**
|
|
5064
5223
|
* Build the admin panel router.
|
|
@@ -5069,6 +5228,20 @@ interface AdminRouterOptions {
|
|
|
5069
5228
|
* @throws Error When the signing key is shorter than 32 characters.
|
|
5070
5229
|
*/
|
|
5071
5230
|
declare function makeAdminRouter(site: AdminSite, options: AdminRouterOptions): Router;
|
|
5231
|
+
/**
|
|
5232
|
+
* Parse a CSV document into one record per row, keyed by the header.
|
|
5233
|
+
*
|
|
5234
|
+
* Implements RFC 4180 quoting rather than splitting on commas: a quoted field
|
|
5235
|
+
* may contain commas, newlines and doubled quotes, and an import that mangles
|
|
5236
|
+
* those silently corrupts exactly the rows a human took the trouble to quote.
|
|
5237
|
+
* The leading UTF-8 BOM Excel writes is stripped, because otherwise the first
|
|
5238
|
+
* header name never matches a column.
|
|
5239
|
+
*
|
|
5240
|
+
* @param text - The CSV document.
|
|
5241
|
+
* @returns One record per data row; `[]` when the file has only a header.
|
|
5242
|
+
* @throws Error When the document has no header row.
|
|
5243
|
+
*/
|
|
5244
|
+
declare function parseCsv(text: string): Record<string, string>[];
|
|
5072
5245
|
|
|
5073
5246
|
/**
|
|
5074
5247
|
* Headless admin: resource registry for the JSON admin API.
|
|
@@ -6840,6 +7013,6 @@ declare function createTestDatabase(models: readonly ModelClass[]): TestDatabase
|
|
|
6840
7013
|
declare function withTestDatabase<T>(models: readonly ModelClass[], fn: (db: TestDatabase) => Promise<T>): Promise<T>;
|
|
6841
7014
|
|
|
6842
7015
|
/** The installed SDK version. Single source of truth for the barrel + CLI. */
|
|
6843
|
-
declare const VERSION = "0.
|
|
7016
|
+
declare const VERSION = "0.27.0";
|
|
6844
7017
|
|
|
6845
|
-
export { ADMIN_CSS, type ActivationInput, ActivationService, type ActivationServiceOptions, type ActivationStore, type AdminAccessPolicy, type AdminAction, type AdminActionCategory, type AdminActionContext, type AdminActionHandler, type AdminActionOptions, type AdminActionResult, type AdminAuditEntryView, type AdminAuditView, type AdminAuthBackend, type AdminAutomapOptions, type AdminBusinessCardView, type AdminDashboardCard, type AdminDashboardMetrics, type AdminDetailView, type AdminFilterKind, type AdminFilterView, type AdminFormField, type AdminFormView, type AdminJsonField, type AdminJsonListQuery, type AdminJsonListResult, type AdminJsonResource, type AdminJsonRouterOptions, AdminJsonSite, type AdminLens, type AdminLensOptions, type AdminListView, type AdminMessage, type AdminMfaVerifier, AdminModel, type AdminModelOptions, type AdminNavEntry, AdminPermission, type AdminRenderContext, type AdminRouterOptions, type AdminRow, type AdminSelectOption, type AdminSession, AdminSessionStore, type AdminSessionStoreOptions, AdminSite, type AdminSiteOptions, type AdminSortView, type AdminTheme, type AdminWidget, AppException, type AppExceptionHandlerOptions, type AppExceptionOptions, type AttachWebSocketOptions, AttemptThrottle, type AttemptThrottleOptions, AuditAction, type AuthResponse, type AuthResultPageOptions, type AuthRouterOptions, type AuthUser, type BackupOptions, type BaseAppSettings, BaseAuditLogModel, BaseController, BaseModel, BaseOAuthClient, BaseOutboxModel, type BaseResponse, BaseService, BaseUserModel, BaseUserRefreshTokenModel, BaseUserTokenModel, type BodySizeLimitOptions, type BroadcastOptions, type BroadcastResult, type BrokerManager, type BuildFormFieldsOptions, type BulkActionOption, CEP_PATTERN, CNPJ_PATTERN, CPF_PATTERN, type CPUMetrics, CSRF_COOKIE_NAME, CSRF_HEADER_NAME, type CacheManager, type CachedOptions, type CachedResponse, type CardCompute, type CardData, type CatalogData, CircuitOpenError, type ClientIpOptions, CompositeFeatureFlagBackend, ConflictException, type CreateAppOpenApi, type CreateAppOptions, type CsrfOptions, type CursorPaginationFilter, DEFAULT_DOCS_FAVICON, DEFAULT_LOCALE, type DownloadOptions, 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 FieldChange, type FileLoggingHandle, type FileLoggingOptions, type FlagContext, ForbiddenException, type GPUMetrics, type GenerateOpenApiOptions, GitHubOAuthClient, GoogleOAuthClient, GracefulShutdown, type GracefulShutdownOptions, HTTPClient, type HTTPClientOptions, HTTP_500_LOG_FILE, HTTP_500_MARKER, type HandshakeInfo, type HealthCheck, type HealthRouterOptions, HttpMetrics, IDEMPOTENCY_HEADER, type IdempotencyOptions, type IdempotencyRedisLike, type IdempotencyStore, type InboundHandler, type InboundMessage, InvalidTokenException, type IssuedSession, JSONLogger, JWTUtils, type JWTUtilsOptions, type JwtAuthOptions, type JwtClaims, type JwtDecoderLike, LEVEL_LOG_FILES, LocalUploadStorage, type LocalUploadStorageOptions, type LogEntry, type LogExtra, type LogLevel, type LogSink, type LogSource, type LoginInput, type LoginResult, type LogsRouterOptions, type MediaKind, MemoryBroker, MemoryCacheManager, MemoryFeatureFlagBackend, MemoryIdempotencyStore, type MemoryMetrics, MemoryRateLimitStore, MemorySessionStore, MemoryThrottleBackend, MessageCatalog, type MessageHandler, MessagingHub, type MessagingProvider, type MetricCard, type MetricPartition, type MetricTrend, type MetricValue, type MetricsRouterOptions, MetricsUtils, type MfaChallenge, type MfaChallengeInput, type MfaCodeInput, type MfaEnrollment, MfaService, type MfaServiceOptions, type MfaStore, NotFoundException, type OAuthClientOptions, OAuthError, type OAuthTokens, type OAuthUser, OIDCProvider, type OIDCProviderOptions, type OpenApiDocument, type OpenApiInfo, type OutboundMedia, type OutboundResult, type OutboxPublisher, OutboxRelay, type OutboxRelayOptions, OutboxStatus, PHONE_BR_PATTERN, type PaginationFilter, type PaginationLinkOptions, type ParsedAdminForm, type PasswordResetConfirmInput, type PasswordResetFormOptions, type PasswordResetRequestInput, PasswordResetService, type PasswordResetServiceOptions, type PasswordResetStore, PasswordUtils, REDOC_CDN_URL, REQUEST_ID_HEADER, RabbitBroker, type RabbitBrokerOptions, type RateLimitKeyFunc, type RateLimitOptions, type RateLimitRedisLike, type RateLimitResult, type RateLimitStore, RedisCacheManager, RedisIdempotencyStore, type RedisLike, type RedisPublisherLike, RedisRateLimitStore, RedisSSEBroker, type RedisSSEBrokerOptions, RedisSessionStore, type RedisSubscriberLike, type RedocBundleSource, type RedocOptions, type RefreshInput, Region, type RegionValue, type RegisterExceptionHandlersOptions, type RequestContext, type RequestTracingOptions, type ResolvedAdminTheme, type ResponseMapper, RetryPolicy, type RunServerOptions, type S3ClientLike, S3UploadStorage, type S3UploadStorageOptions, SSEBroker, type SaveOptions, type SendOptions, ServerSentEvent, type ServerSentEventInit, type Session, type SessionMiddlewareOptions, type SessionRedisLike, SessionService, type SessionServiceOptions, type SessionStore, type SignupInput, type SlowQueryOptions, type SpecProvider, type StateBR, type SwaggerOptions, type SyncFilter, type SystemMetrics, TOTPHelper, type TOTPOptions, type TaskHandler, TaskManager, type TaskManagerOptions, TelegramProvider, type TelegramProviderOptions, TenantScopedRepository, type TestDatabase, type ThrottleBackend, type ThrottleStatus, type ToDictOptions, type TokenPair, TooManyRequestsException, type TooManyRequestsOptions, type ToolSpecOptions, TwilioSmsProvider, type TwilioSmsProviderOptions, type TwilioWebhookOptions, UF, type UFValue, UnauthorizedException, type UnhandledExceptionHandlerOptions, type UploadResult, type UploadStorage, UserAuthService, type UserAuthServiceOptions, UserModelAuthBackend, type UserModelAuthBackendOptions, type UserPublic, type UserStore, UserTokenPurpose, VERSION, ValidationException, type WSEnvelope, WebPushDispatcher, type WebPushDispatcherOptions, WebPushError, WebPushGoneError, type WebPushKeys, type WebPushPayload, type WebPushSubscription, type WebSocketConnection, WebSocketHub, type WebSocketHubOptions, type WebSocketLike, type WebhookSignatureOptions, WebhookSignatureVerifier, WhatsAppProvider, type WhatsAppProviderOptions, type WhatsAppWebhookOptions, type WidgetSpec, activationSchema, addLogSink, adminAction, adminColumns, adminLens, adminThemeCss, attachWebSocketHub, authResponseSchema, authSettingsShape, backupDatabase, baseAppSettingsSchema, baseAppSettingsShape, baseResponseSchema, bearerToken, bodySizeLimitMiddleware, broadcastText, buildContentDisposition, buildFormFields, buildPaginationLinkHeader, cached, centsField, cepField, citiesByUf, cnpjField, coerceFlag, configureFileLogging, configureLogging, corsSettingsShape, cpfField, cpfOrCnpjField, createApp, createOpenApiRegistry, createTestDatabase, createdByColumn, csrfMiddleware, csrfTokenMatches, cursorPaginationFilterSchema, cursorPaginationSchema, databaseSettingsShape, decodeCursor, defaultMessageCatalog, defineEnum, deletedAtColumn, diffSnapshots, emailSettingsShape, encodeCursor, looseBoolean as envBoolean, envList, escapeHtml, filterForColumn, foreignKeyFields, foreignKeyLabel, foreignKeyTable, formatCellValue, formatFieldValue, generateCsrfToken, generateOAuthState, generateOpaqueToken, generateOpenApiDocument, getAuth, getClientIp, getConditions, getPaginationConditions, getRequestId, getState, hashOpaqueToken, hexColorField, humanizeField, idempotencyMiddleware, inboundMessageSchema, isColumnOptional, isSearchableColumn, isValidCep, isValidCity, isValidCnpj, isValidCpf, isValidCpfCnpj, isValidPhoneBr, isValidUf, jwtSettingsShape, keyByHeader, keyByIp, keyByJwtClaim, keyByJwtSubject, latitudeField, listStates, loadSettings, logEntrySchema, logSettingsShape, loginSchema, longitudeField, looseBoolean, makeAdminJsonRouter, makeAdminRouter, makeAppExceptionHandler, makeAuthRouter, makeFlagGuard, makeHealthRouter, makeJwtAuthMiddleware, makeLogsRouter, makeMetricsRouter, makeSessionMiddleware, makeToolSpecRouter, makeTwilioWebhookRouter, makeUnhandledExceptionHandler, makeWhatsAppWebhookRouter, metricCard, mfaChallengeSchema, mfaCodeSchema, mfaEnrollResponseSchema, minioSettingsShape, modifyDict, mountOpenApiJson, mountRedoc, mountSwaggerUi, nonEmptyStrField, nonNegativeFloatField, nonNegativeIntField, normalizeCep, normalizeCnpj, normalizeCpf, normalizeCpfCnpj, normalizePhoneBr, normalizeUf, notFoundHandler, onlyDigits, paginationFilterSchema, paginationSchema, parseAcceptLanguage, parseCookies, parseFormBody, partitionTotal, passwordResetConfirmSchema, passwordResetRequestSchema, percentField, phoneBrField, portField, positiveFloatField, positiveIntField, priceField, prometheusMiddleware, rabbitmqSettingsShape, rateLimitMiddleware, ratingField, ratioField, redisSettingsShape, refreshSchema, registerExceptionHandlers, renderAuthResultPage, renderDashboardPage, renderDetailPage, renderFormPage, renderLayout, renderListPage, renderLoginPage, renderMfaPage, renderPasswordResetFormPage, requestIdMiddleware, requestTracingMiddleware, requireRoles, resolveAdminTheme, resolveDownloadPath, resolveRedocBundle, runServer, runWithRequestContext, sendBytesDownload, sendFileDownload, serverSettingsShape, sessionCookie, sessionSettingsShape, setRequestId, signupSchema, slugField, snapshot, sseResponse, statesByRegion, syncFilterSchema, syncPaginationSchema, tableNameFor, toDict, toUtc, tokenFromUrl, tokenPairSchema, tokenSettingsShape, trendDirection, trendPercent, ufField, updatedByColumn, uploadSettingsShape, userPublicSchema, utcnow, validateTwilioSignature, verifyOpaqueToken, webPushKeysSchema, webPushPayloadSchema, webPushSettingsShape, webPushSubscriptionSchema, webSocketSettingsShape, widgetForColumn, withTestDatabase, wrapWithSlowQueryLog, wsEnvelopeSchema };
|
|
7018
|
+
export { ADMIN_CSS, type ActivationInput, ActivationService, type ActivationServiceOptions, type ActivationStore, type AdminAccessPolicy, type AdminAction, type AdminActionCategory, type AdminActionContext, type AdminActionHandler, type AdminActionOptions, type AdminActionResult, type AdminAuditEntryView, type AdminAuditView, type AdminAuthBackend, type AdminAutomapOptions, type AdminBusinessCardView, type AdminDashboardCard, type AdminDashboardMetrics, type AdminDetailView, type AdminFilterKind, type AdminFilterView, type AdminFormField, type AdminFormView, type AdminImportView, type AdminJsonField, type AdminJsonListQuery, type AdminJsonListResult, type AdminJsonResource, type AdminJsonRouterOptions, AdminJsonSite, type AdminLens, type AdminLensOptions, type AdminListView, type AdminMessage, type AdminMfaVerifier, AdminModel, type AdminModelOptions, type AdminNavEntry, AdminPermission, type AdminRenderContext, type AdminRouterOptions, type AdminRow, type AdminSelectOption, type AdminSession, AdminSessionStore, type AdminSessionStoreOptions, AdminSite, type AdminSiteOptions, type AdminSortView, type AdminTheme, type AdminWidget, AppException, type AppExceptionHandlerOptions, type AppExceptionOptions, type AttachWebSocketOptions, AttemptThrottle, type AttemptThrottleOptions, AuditAction, type AuthResponse, type AuthResultPageOptions, type AuthRouterOptions, type AuthUser, type BackupOptions, type BaseAppSettings, BaseAuditLogModel, BaseController, BaseModel, BaseOAuthClient, BaseOutboxModel, type BaseResponse, BaseService, BaseUserModel, BaseUserRefreshTokenModel, BaseUserTokenModel, type BodySizeLimitOptions, type BroadcastOptions, type BroadcastResult, type BrokerManager, type BuildFormFieldsOptions, type BulkActionOption, CEP_PATTERN, CNPJ_PATTERN, CPF_PATTERN, type CPUMetrics, CSRF_COOKIE_NAME, CSRF_HEADER_NAME, type CacheManager, type CachedOptions, type CachedResponse, type CardCompute, type CardData, type CatalogData, CircuitOpenError, type ClientIpOptions, CompositeFeatureFlagBackend, ConflictException, type CreateAppOpenApi, type CreateAppOptions, type CsrfOptions, type CursorPaginationFilter, DEFAULT_DOCS_FAVICON, DEFAULT_LOCALE, type DownloadOptions, 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 FieldChange, type FileLoggingHandle, type FileLoggingOptions, type FlagContext, ForbiddenException, type GPUMetrics, type GenerateOpenApiOptions, GitHubOAuthClient, GoogleOAuthClient, GracefulShutdown, type GracefulShutdownOptions, HTTPClient, type HTTPClientOptions, HTTP_500_LOG_FILE, HTTP_500_MARKER, type HandshakeInfo, type HealthCheck, type HealthRouterOptions, HttpMetrics, IDEMPOTENCY_HEADER, type IdempotencyOptions, type IdempotencyRedisLike, type IdempotencyStore, type InboundHandler, type InboundMessage, InvalidTokenException, type IssuedSession, JSONLogger, JWTUtils, type JWTUtilsOptions, type JwtAuthOptions, type JwtClaims, type JwtDecoderLike, LEVEL_LOG_FILES, LocalUploadStorage, type LocalUploadStorageOptions, type LogEntry, type LogExtra, type LogLevel, type LogSink, type LogSource, type LoginInput, type LoginResult, type LogsRouterOptions, type MediaKind, MemoryBroker, MemoryCacheManager, MemoryFeatureFlagBackend, MemoryIdempotencyStore, type MemoryMetrics, MemoryRateLimitStore, MemorySessionStore, MemoryThrottleBackend, MessageCatalog, type MessageHandler, MessagingHub, type MessagingProvider, type MetricCard, type MetricPartition, type MetricTrend, type MetricValue, type MetricsRouterOptions, MetricsUtils, type MfaChallenge, type MfaChallengeInput, type MfaCodeInput, type MfaEnrollment, MfaService, type MfaServiceOptions, type MfaStore, MultipartLimitError, NotFoundException, type OAuthClientOptions, OAuthError, type OAuthTokens, type OAuthUser, OIDCProvider, type OIDCProviderOptions, type OpenApiDocument, type OpenApiInfo, type OutboundMedia, type OutboundResult, type OutboxPublisher, OutboxRelay, type OutboxRelayOptions, OutboxStatus, PHONE_BR_PATTERN, type PaginationFilter, type PaginationLinkOptions, type ParseFormBodyOptions, type ParseMultipartOptions, type ParsedAdminForm, type ParsedMultipart, type PasswordResetConfirmInput, type PasswordResetFormOptions, type PasswordResetRequestInput, PasswordResetService, type PasswordResetServiceOptions, type PasswordResetStore, PasswordUtils, REDOC_CDN_URL, REQUEST_ID_HEADER, RabbitBroker, type RabbitBrokerOptions, type RateLimitKeyFunc, type RateLimitOptions, type RateLimitRedisLike, type RateLimitResult, type RateLimitStore, RedisCacheManager, RedisIdempotencyStore, type RedisLike, type RedisPublisherLike, RedisRateLimitStore, RedisSSEBroker, type RedisSSEBrokerOptions, RedisSessionStore, type RedisSubscriberLike, type RedocBundleSource, type RedocOptions, type RefreshInput, Region, type RegionValue, type RegisterExceptionHandlersOptions, type RequestContext, type RequestTracingOptions, type ResolvedAdminTheme, type ResponseMapper, RetryPolicy, type RunServerOptions, type S3ClientLike, S3UploadStorage, type S3UploadStorageOptions, SSEBroker, type SaveOptions, type SendOptions, ServerSentEvent, type ServerSentEventInit, type Session, type SessionMiddlewareOptions, type SessionRedisLike, SessionService, type SessionServiceOptions, type SessionStore, type SignupInput, type SlowQueryOptions, type SpecProvider, type StateBR, type SwaggerOptions, type SyncFilter, type SystemMetrics, TOTPHelper, type TOTPOptions, type TaskHandler, TaskManager, type TaskManagerOptions, TelegramProvider, type TelegramProviderOptions, TenantScopedRepository, type TestDatabase, type ThrottleBackend, type ThrottleStatus, type ToDictOptions, type TokenPair, TooManyRequestsException, type TooManyRequestsOptions, type ToolSpecOptions, TwilioSmsProvider, type TwilioSmsProviderOptions, type TwilioWebhookOptions, UF, type UFValue, UnauthorizedException, type UnhandledExceptionHandlerOptions, type UploadResult, type UploadStorage, type UploadedFile, UserAuthService, type UserAuthServiceOptions, UserModelAuthBackend, type UserModelAuthBackendOptions, type UserPublic, type UserStore, UserTokenPurpose, VERSION, ValidationException, type WSEnvelope, WebPushDispatcher, type WebPushDispatcherOptions, WebPushError, WebPushGoneError, type WebPushKeys, type WebPushPayload, type WebPushSubscription, type WebSocketConnection, WebSocketHub, type WebSocketHubOptions, type WebSocketLike, type WebhookSignatureOptions, WebhookSignatureVerifier, WhatsAppProvider, type WhatsAppProviderOptions, type WhatsAppWebhookOptions, type WidgetSpec, activationSchema, addLogSink, adminAction, adminColumns, adminLens, adminThemeCss, attachWebSocketHub, authResponseSchema, authSettingsShape, backupDatabase, baseAppSettingsSchema, baseAppSettingsShape, baseResponseSchema, bearerToken, bodySizeLimitMiddleware, broadcastText, buildContentDisposition, buildFormFields, buildPaginationLinkHeader, cached, centsField, cepField, citiesByUf, cnpjField, coerceFlag, configureFileLogging, configureLogging, corsSettingsShape, cpfField, cpfOrCnpjField, createApp, createOpenApiRegistry, createTestDatabase, createdByColumn, csrfMiddleware, csrfTokenMatches, cursorPaginationFilterSchema, cursorPaginationSchema, databaseSettingsShape, decodeCursor, defaultMessageCatalog, defineEnum, deletedAtColumn, diffSnapshots, emailSettingsShape, encodeCursor, looseBoolean as envBoolean, envList, escapeHtml, filterForColumn, foreignKeyFields, foreignKeyLabel, foreignKeyTable, formatCellValue, formatFieldValue, generateCsrfToken, generateOAuthState, generateOpaqueToken, generateOpenApiDocument, getAuth, getClientIp, getConditions, getPaginationConditions, getRequestId, getState, hashOpaqueToken, hexColorField, humanizeField, idempotencyMiddleware, inboundMessageSchema, isColumnOptional, isMultipart, isSearchableColumn, isValidCep, isValidCity, isValidCnpj, isValidCpf, isValidCpfCnpj, isValidPhoneBr, isValidUf, jwtSettingsShape, keyByHeader, keyByIp, keyByJwtClaim, keyByJwtSubject, latitudeField, listStates, loadSettings, logEntrySchema, logSettingsShape, loginSchema, longitudeField, looseBoolean, makeAdminJsonRouter, makeAdminRouter, makeAppExceptionHandler, makeAuthRouter, makeFlagGuard, makeHealthRouter, makeJwtAuthMiddleware, makeLogsRouter, makeMetricsRouter, makeSessionMiddleware, makeToolSpecRouter, makeTwilioWebhookRouter, makeUnhandledExceptionHandler, makeWhatsAppWebhookRouter, metricCard, mfaChallengeSchema, mfaCodeSchema, mfaEnrollResponseSchema, minioSettingsShape, modifyDict, mountOpenApiJson, mountRedoc, mountSwaggerUi, nonEmptyStrField, nonNegativeFloatField, nonNegativeIntField, normalizeCep, normalizeCnpj, normalizeCpf, normalizeCpfCnpj, normalizePhoneBr, normalizeUf, notFoundHandler, onlyDigits, paginationFilterSchema, paginationSchema, parseAcceptLanguage, parseCookies, parseCsv, parseFormBody, parseMultipart, partitionTotal, passwordResetConfirmSchema, passwordResetRequestSchema, percentField, phoneBrField, portField, positiveFloatField, positiveIntField, priceField, prometheusMiddleware, rabbitmqSettingsShape, rateLimitMiddleware, ratingField, ratioField, redisSettingsShape, refreshSchema, registerExceptionHandlers, renderAuthResultPage, renderDashboardPage, renderDetailPage, renderFormPage, renderImportPage, renderLayout, renderListPage, renderLoginPage, renderMfaPage, renderPasswordResetFormPage, requestIdMiddleware, requestTracingMiddleware, requireRoles, resolveAdminTheme, resolveDownloadPath, resolveRedocBundle, runServer, runWithRequestContext, sendBytesDownload, sendFileDownload, serverSettingsShape, sessionCookie, sessionSettingsShape, setRequestId, signupSchema, slugField, snapshot, sseResponse, statesByRegion, syncFilterSchema, syncPaginationSchema, tableNameFor, toDict, toUtc, tokenFromUrl, tokenPairSchema, tokenSettingsShape, trendDirection, trendPercent, ufField, updatedByColumn, uploadSettingsShape, userPublicSchema, utcnow, validateTwilioSignature, verifyOpaqueToken, webPushKeysSchema, webPushPayloadSchema, webPushSettingsShape, webPushSubscriptionSchema, webSocketSettingsShape, widgetForColumn, withTestDatabase, wrapWithSlowQueryLog, wsEnvelopeSchema };
|
package/dist/index.d.ts
CHANGED
|
@@ -3896,6 +3896,24 @@ interface AdminModelOptions<C extends ModelClass> {
|
|
|
3896
3896
|
* its filters and ordering through `?lens=<slug>`.
|
|
3897
3897
|
*/
|
|
3898
3898
|
lenses?: readonly AdminLens[];
|
|
3899
|
+
/**
|
|
3900
|
+
* String columns rendered as file inputs. The uploaded file is written
|
|
3901
|
+
* through `uploadStorage` and the returned storage key goes in the column.
|
|
3902
|
+
*/
|
|
3903
|
+
uploadFields?: readonly string[];
|
|
3904
|
+
/** Backend persisting uploaded files. Required when `uploadFields` is set. */
|
|
3905
|
+
uploadStorage?: UploadStorage;
|
|
3906
|
+
/**
|
|
3907
|
+
* Expose the CSV import page (`GET/POST {prefix}/m/{slug}/import`), which
|
|
3908
|
+
* bulk-creates rows from an uploaded file. Default `false`; also requires
|
|
3909
|
+
* `canCreate`.
|
|
3910
|
+
*/
|
|
3911
|
+
canImport?: boolean;
|
|
3912
|
+
/**
|
|
3913
|
+
* Foreign-key columns rendered as a typed search box instead of a `<select>`
|
|
3914
|
+
* of every related row — for target tables too large to pre-load.
|
|
3915
|
+
*/
|
|
3916
|
+
autocompleteFields?: readonly string[];
|
|
3899
3917
|
}
|
|
3900
3918
|
/**
|
|
3901
3919
|
* The admin configuration for one model.
|
|
@@ -3937,6 +3955,14 @@ declare class AdminModel<C extends ModelClass = ModelClass> {
|
|
|
3937
3955
|
readonly auditModel: ModelClass | null;
|
|
3938
3956
|
/** Saved list-view presets, in declaration order. */
|
|
3939
3957
|
readonly lenses: AdminLens[];
|
|
3958
|
+
/** Columns rendered as file inputs. */
|
|
3959
|
+
readonly uploadFields: string[];
|
|
3960
|
+
/** Backend persisting uploaded files, or `null`. */
|
|
3961
|
+
readonly uploadStorage: UploadStorage | null;
|
|
3962
|
+
/** Whether the CSV import page is exposed. */
|
|
3963
|
+
readonly canImport: boolean;
|
|
3964
|
+
/** Foreign-key columns rendered as a typed search box. */
|
|
3965
|
+
readonly autocompleteFields: string[];
|
|
3940
3966
|
private readonly actions;
|
|
3941
3967
|
private readonly slugOverride;
|
|
3942
3968
|
private readonly listDisplayOverride;
|
|
@@ -4086,6 +4112,81 @@ type AdminPermission = (typeof AdminPermission)[keyof typeof AdminPermission];
|
|
|
4086
4112
|
*/
|
|
4087
4113
|
type AdminAccessPolicy = (principal: unknown, admin: AdminModel, action: AdminPermission) => boolean | Promise<boolean>;
|
|
4088
4114
|
|
|
4115
|
+
/**
|
|
4116
|
+
* Multipart form parsing for the admin's upload and import screens.
|
|
4117
|
+
*
|
|
4118
|
+
* The panel's ordinary forms are `application/x-www-form-urlencoded`, which
|
|
4119
|
+
* Express parses on its own. A form carrying a file is `multipart/form-data`,
|
|
4120
|
+
* which it does not — so this module wraps `busboy`, the streaming parser
|
|
4121
|
+
* behind most of the Node ecosystem's upload middleware.
|
|
4122
|
+
*
|
|
4123
|
+
* `busboy` is an **optional peer**: only a project that configures
|
|
4124
|
+
* `uploadFields` or `canImport` needs it, and the error below says exactly what
|
|
4125
|
+
* to install. Multipart is a wire format with a long tail of correctness
|
|
4126
|
+
* (boundary handling, transfer encodings, filename escaping) — the kind of
|
|
4127
|
+
* parser this SDK depends on rather than reimplements.
|
|
4128
|
+
*/
|
|
4129
|
+
|
|
4130
|
+
/** One uploaded file, buffered in memory. */
|
|
4131
|
+
interface UploadedFile {
|
|
4132
|
+
/** The form field the file arrived on. */
|
|
4133
|
+
field: string;
|
|
4134
|
+
/** The client-supplied filename, already stripped of any path. */
|
|
4135
|
+
filename: string;
|
|
4136
|
+
/** The declared MIME type. */
|
|
4137
|
+
contentType: string;
|
|
4138
|
+
/** The file bytes. */
|
|
4139
|
+
data: Buffer;
|
|
4140
|
+
}
|
|
4141
|
+
/** The result of parsing a multipart body. */
|
|
4142
|
+
interface ParsedMultipart {
|
|
4143
|
+
/** Text fields, keyed by name. A repeated field keeps its last value. */
|
|
4144
|
+
fields: Record<string, string>;
|
|
4145
|
+
/** Uploaded files that carried a filename and at least one byte. */
|
|
4146
|
+
files: UploadedFile[];
|
|
4147
|
+
}
|
|
4148
|
+
/** Options for {@link parseMultipart}. */
|
|
4149
|
+
interface ParseMultipartOptions {
|
|
4150
|
+
/** Reject a file larger than this many bytes. Default `10 * 1024 * 1024`. */
|
|
4151
|
+
maxFileBytes?: number;
|
|
4152
|
+
/** Reject more than this many files in one submission. Default `10`. */
|
|
4153
|
+
maxFiles?: number;
|
|
4154
|
+
}
|
|
4155
|
+
/**
|
|
4156
|
+
* Raised when a submission exceeds a configured multipart limit.
|
|
4157
|
+
*
|
|
4158
|
+
* Distinct from a parse failure so the caller can turn it into a `400` with a
|
|
4159
|
+
* message the operator can act on ("the file is too large") instead of a
|
|
4160
|
+
* generic failure.
|
|
4161
|
+
*/
|
|
4162
|
+
declare class MultipartLimitError extends Error {
|
|
4163
|
+
/**
|
|
4164
|
+
* @param message - The operator-facing explanation.
|
|
4165
|
+
*/
|
|
4166
|
+
constructor(message: string);
|
|
4167
|
+
}
|
|
4168
|
+
/**
|
|
4169
|
+
* Parse a `multipart/form-data` request body.
|
|
4170
|
+
*
|
|
4171
|
+
* Files are buffered in memory, which is what the admin needs — an operator
|
|
4172
|
+
* attaching a document or a CSV, not a streaming ingest path — and bounded by
|
|
4173
|
+
* `maxFileBytes` so a large upload cannot exhaust the process.
|
|
4174
|
+
*
|
|
4175
|
+
* @param req - The inbound request.
|
|
4176
|
+
* @param options - Size and count limits.
|
|
4177
|
+
* @returns The text fields and the uploaded files.
|
|
4178
|
+
* @throws MultipartLimitError When a limit is exceeded.
|
|
4179
|
+
* @throws Error When `busboy` is missing or the body is not valid multipart.
|
|
4180
|
+
*/
|
|
4181
|
+
declare function parseMultipart(req: Request, options?: ParseMultipartOptions): Promise<ParsedMultipart>;
|
|
4182
|
+
/**
|
|
4183
|
+
* Whether a request carries a multipart body.
|
|
4184
|
+
*
|
|
4185
|
+
* @param req - The inbound request.
|
|
4186
|
+
* @returns `true` when the content type is `multipart/form-data`.
|
|
4187
|
+
*/
|
|
4188
|
+
declare function isMultipart(req: Request): boolean;
|
|
4189
|
+
|
|
4089
4190
|
/**
|
|
4090
4191
|
* Column introspection for the admin panel, mirroring `admin.forms`' widget
|
|
4091
4192
|
* derivation.
|
|
@@ -4099,7 +4200,7 @@ type AdminAccessPolicy = (principal: unknown, admin: AdminModel, action: AdminPe
|
|
|
4099
4200
|
*/
|
|
4100
4201
|
|
|
4101
4202
|
/** The set of form controls the admin knows how to render. */
|
|
4102
|
-
type AdminWidget = "text" | "textarea" | "number" | "checkbox" | "datetime" | "date" | "time" | "select" | "json";
|
|
4203
|
+
type AdminWidget = "text" | "textarea" | "number" | "checkbox" | "datetime" | "date" | "time" | "select" | "json" | "file" | "autocomplete";
|
|
4103
4204
|
/** A `(value, label)` pair for a `select` widget. */
|
|
4104
4205
|
interface AdminSelectOption {
|
|
4105
4206
|
value: string;
|
|
@@ -4207,6 +4308,10 @@ interface AdminFormField {
|
|
|
4207
4308
|
options: AdminSelectOption[];
|
|
4208
4309
|
/** Per-field validation error, or `null`. */
|
|
4209
4310
|
error: string | null;
|
|
4311
|
+
/** For an `autocomplete` widget, the JSON search endpoint backing the input. */
|
|
4312
|
+
autocompleteUrl: string | null;
|
|
4313
|
+
/** For an `autocomplete` widget, the label of the currently selected row. */
|
|
4314
|
+
displayLabel: string;
|
|
4210
4315
|
}
|
|
4211
4316
|
/** The outcome of parsing a submitted create/edit form. */
|
|
4212
4317
|
interface ParsedAdminForm {
|
|
@@ -4215,6 +4320,17 @@ interface ParsedAdminForm {
|
|
|
4215
4320
|
/** Per-field error messages, keyed by column. Empty when the form is valid. */
|
|
4216
4321
|
errors: Record<string, string>;
|
|
4217
4322
|
}
|
|
4323
|
+
/** Options for {@link parseFormBody}. */
|
|
4324
|
+
interface ParseFormBodyOptions {
|
|
4325
|
+
/**
|
|
4326
|
+
* Read upload columns as plain text instead of skipping them.
|
|
4327
|
+
*
|
|
4328
|
+
* The create/edit form skips them because the router writes the storage key
|
|
4329
|
+
* after saving the file. A CSV import has no file to save — it carries the
|
|
4330
|
+
* key already — so it reads them like any other string column.
|
|
4331
|
+
*/
|
|
4332
|
+
uploadsAsText?: boolean;
|
|
4333
|
+
}
|
|
4218
4334
|
/** Options for {@link buildFormFields}. */
|
|
4219
4335
|
interface BuildFormFieldsOptions {
|
|
4220
4336
|
/** Current values, keyed by column — a row on edit, a re-submission on error. */
|
|
@@ -4227,6 +4343,13 @@ interface BuildFormFieldsOptions {
|
|
|
4227
4343
|
* of a raw identity text input.
|
|
4228
4344
|
*/
|
|
4229
4345
|
foreignKeyOptions?: Record<string, AdminSelectOption[]>;
|
|
4346
|
+
/**
|
|
4347
|
+
* Search endpoints for foreign-key columns listed in `autocompleteFields`,
|
|
4348
|
+
* keyed by column. A field listed here renders as a typed search box.
|
|
4349
|
+
*/
|
|
4350
|
+
autocompleteUrls?: Record<string, string>;
|
|
4351
|
+
/** Current labels for autocomplete fields, keyed by column. */
|
|
4352
|
+
autocompleteLabels?: Record<string, string>;
|
|
4230
4353
|
}
|
|
4231
4354
|
/**
|
|
4232
4355
|
* Render a stored value into the string a control pre-fills with.
|
|
@@ -4262,7 +4385,7 @@ declare function buildFormFields(admin: AdminModel, options?: BuildFormFieldsOpt
|
|
|
4262
4385
|
* @param body - The parsed request body.
|
|
4263
4386
|
* @returns The coerced values plus any per-field errors.
|
|
4264
4387
|
*/
|
|
4265
|
-
declare function parseFormBody(admin: AdminModel, body: Record<string, unknown
|
|
4388
|
+
declare function parseFormBody(admin: AdminModel, body: Record<string, unknown>, options?: ParseFormBodyOptions): ParsedAdminForm;
|
|
4266
4389
|
/**
|
|
4267
4390
|
* Render a stored value for a read-only list or detail cell.
|
|
4268
4391
|
*
|
|
@@ -4895,6 +5018,8 @@ interface AdminListView {
|
|
|
4895
5018
|
sort: Record<string, AdminSortView>;
|
|
4896
5019
|
/** URL of the create form, or `null` when creation is disabled. */
|
|
4897
5020
|
newUrl: string | null;
|
|
5021
|
+
/** URL of the CSV import page, or `null` when import is disabled. */
|
|
5022
|
+
importUrl: string | null;
|
|
4898
5023
|
/** Bulk actions offered above the table. Empty hides the whole bulk UI. */
|
|
4899
5024
|
bulkActions: BulkActionOption[];
|
|
4900
5025
|
/** URL the bulk form posts to. */
|
|
@@ -4999,6 +5124,38 @@ interface AdminFormView {
|
|
|
4999
5124
|
* @throws Error When called without a session, since the form needs a CSRF token.
|
|
5000
5125
|
*/
|
|
5001
5126
|
declare function renderFormPage(context: AdminRenderContext, view: AdminFormView): string;
|
|
5127
|
+
/** The outcome of a CSV import, as the page renders it. */
|
|
5128
|
+
interface AdminImportView {
|
|
5129
|
+
/** Plural display name of the model being imported into. */
|
|
5130
|
+
title: string;
|
|
5131
|
+
/** URL the upload form posts to. */
|
|
5132
|
+
actionUrl: string;
|
|
5133
|
+
/** URL of the list view. */
|
|
5134
|
+
backUrl: string;
|
|
5135
|
+
/** The column headers the CSV is expected to carry. */
|
|
5136
|
+
columns: string[];
|
|
5137
|
+
/** A form-level error, or `null`. */
|
|
5138
|
+
error: string | null;
|
|
5139
|
+
/** How many rows were created, or `null` before the first submission. */
|
|
5140
|
+
created: number | null;
|
|
5141
|
+
/** Per-row failures, numbered as the spreadsheet numbers them. */
|
|
5142
|
+
rowErrors: {
|
|
5143
|
+
row: number;
|
|
5144
|
+
message: string;
|
|
5145
|
+
}[];
|
|
5146
|
+
}
|
|
5147
|
+
/**
|
|
5148
|
+
* Render the CSV import page.
|
|
5149
|
+
*
|
|
5150
|
+
* Row numbers start at 2 because row 1 is the header, so the numbers line up
|
|
5151
|
+
* with what the operator sees in their spreadsheet.
|
|
5152
|
+
*
|
|
5153
|
+
* @param context - The shared chrome data (with an active session).
|
|
5154
|
+
* @param view - The prepared import view model.
|
|
5155
|
+
* @returns The full page.
|
|
5156
|
+
* @throws Error When called without a session, since the form needs a CSRF token.
|
|
5157
|
+
*/
|
|
5158
|
+
declare function renderImportPage(context: AdminRenderContext, view: AdminImportView): string;
|
|
5002
5159
|
|
|
5003
5160
|
/**
|
|
5004
5161
|
* The server-rendered admin panel router, mirroring `admin.router`.
|
|
@@ -5059,6 +5216,8 @@ interface AdminRouterOptions {
|
|
|
5059
5216
|
* lets every signed-in operator do whatever those flags allow.
|
|
5060
5217
|
*/
|
|
5061
5218
|
accessPolicy?: AdminAccessPolicy;
|
|
5219
|
+
/** Largest upload the panel accepts, in bytes. Default `10485760` (10 MB). */
|
|
5220
|
+
maxUploadBytes?: number;
|
|
5062
5221
|
}
|
|
5063
5222
|
/**
|
|
5064
5223
|
* Build the admin panel router.
|
|
@@ -5069,6 +5228,20 @@ interface AdminRouterOptions {
|
|
|
5069
5228
|
* @throws Error When the signing key is shorter than 32 characters.
|
|
5070
5229
|
*/
|
|
5071
5230
|
declare function makeAdminRouter(site: AdminSite, options: AdminRouterOptions): Router;
|
|
5231
|
+
/**
|
|
5232
|
+
* Parse a CSV document into one record per row, keyed by the header.
|
|
5233
|
+
*
|
|
5234
|
+
* Implements RFC 4180 quoting rather than splitting on commas: a quoted field
|
|
5235
|
+
* may contain commas, newlines and doubled quotes, and an import that mangles
|
|
5236
|
+
* those silently corrupts exactly the rows a human took the trouble to quote.
|
|
5237
|
+
* The leading UTF-8 BOM Excel writes is stripped, because otherwise the first
|
|
5238
|
+
* header name never matches a column.
|
|
5239
|
+
*
|
|
5240
|
+
* @param text - The CSV document.
|
|
5241
|
+
* @returns One record per data row; `[]` when the file has only a header.
|
|
5242
|
+
* @throws Error When the document has no header row.
|
|
5243
|
+
*/
|
|
5244
|
+
declare function parseCsv(text: string): Record<string, string>[];
|
|
5072
5245
|
|
|
5073
5246
|
/**
|
|
5074
5247
|
* Headless admin: resource registry for the JSON admin API.
|
|
@@ -6840,6 +7013,6 @@ declare function createTestDatabase(models: readonly ModelClass[]): TestDatabase
|
|
|
6840
7013
|
declare function withTestDatabase<T>(models: readonly ModelClass[], fn: (db: TestDatabase) => Promise<T>): Promise<T>;
|
|
6841
7014
|
|
|
6842
7015
|
/** The installed SDK version. Single source of truth for the barrel + CLI. */
|
|
6843
|
-
declare const VERSION = "0.
|
|
7016
|
+
declare const VERSION = "0.27.0";
|
|
6844
7017
|
|
|
6845
|
-
export { ADMIN_CSS, type ActivationInput, ActivationService, type ActivationServiceOptions, type ActivationStore, type AdminAccessPolicy, type AdminAction, type AdminActionCategory, type AdminActionContext, type AdminActionHandler, type AdminActionOptions, type AdminActionResult, type AdminAuditEntryView, type AdminAuditView, type AdminAuthBackend, type AdminAutomapOptions, type AdminBusinessCardView, type AdminDashboardCard, type AdminDashboardMetrics, type AdminDetailView, type AdminFilterKind, type AdminFilterView, type AdminFormField, type AdminFormView, type AdminJsonField, type AdminJsonListQuery, type AdminJsonListResult, type AdminJsonResource, type AdminJsonRouterOptions, AdminJsonSite, type AdminLens, type AdminLensOptions, type AdminListView, type AdminMessage, type AdminMfaVerifier, AdminModel, type AdminModelOptions, type AdminNavEntry, AdminPermission, type AdminRenderContext, type AdminRouterOptions, type AdminRow, type AdminSelectOption, type AdminSession, AdminSessionStore, type AdminSessionStoreOptions, AdminSite, type AdminSiteOptions, type AdminSortView, type AdminTheme, type AdminWidget, AppException, type AppExceptionHandlerOptions, type AppExceptionOptions, type AttachWebSocketOptions, AttemptThrottle, type AttemptThrottleOptions, AuditAction, type AuthResponse, type AuthResultPageOptions, type AuthRouterOptions, type AuthUser, type BackupOptions, type BaseAppSettings, BaseAuditLogModel, BaseController, BaseModel, BaseOAuthClient, BaseOutboxModel, type BaseResponse, BaseService, BaseUserModel, BaseUserRefreshTokenModel, BaseUserTokenModel, type BodySizeLimitOptions, type BroadcastOptions, type BroadcastResult, type BrokerManager, type BuildFormFieldsOptions, type BulkActionOption, CEP_PATTERN, CNPJ_PATTERN, CPF_PATTERN, type CPUMetrics, CSRF_COOKIE_NAME, CSRF_HEADER_NAME, type CacheManager, type CachedOptions, type CachedResponse, type CardCompute, type CardData, type CatalogData, CircuitOpenError, type ClientIpOptions, CompositeFeatureFlagBackend, ConflictException, type CreateAppOpenApi, type CreateAppOptions, type CsrfOptions, type CursorPaginationFilter, DEFAULT_DOCS_FAVICON, DEFAULT_LOCALE, type DownloadOptions, 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 FieldChange, type FileLoggingHandle, type FileLoggingOptions, type FlagContext, ForbiddenException, type GPUMetrics, type GenerateOpenApiOptions, GitHubOAuthClient, GoogleOAuthClient, GracefulShutdown, type GracefulShutdownOptions, HTTPClient, type HTTPClientOptions, HTTP_500_LOG_FILE, HTTP_500_MARKER, type HandshakeInfo, type HealthCheck, type HealthRouterOptions, HttpMetrics, IDEMPOTENCY_HEADER, type IdempotencyOptions, type IdempotencyRedisLike, type IdempotencyStore, type InboundHandler, type InboundMessage, InvalidTokenException, type IssuedSession, JSONLogger, JWTUtils, type JWTUtilsOptions, type JwtAuthOptions, type JwtClaims, type JwtDecoderLike, LEVEL_LOG_FILES, LocalUploadStorage, type LocalUploadStorageOptions, type LogEntry, type LogExtra, type LogLevel, type LogSink, type LogSource, type LoginInput, type LoginResult, type LogsRouterOptions, type MediaKind, MemoryBroker, MemoryCacheManager, MemoryFeatureFlagBackend, MemoryIdempotencyStore, type MemoryMetrics, MemoryRateLimitStore, MemorySessionStore, MemoryThrottleBackend, MessageCatalog, type MessageHandler, MessagingHub, type MessagingProvider, type MetricCard, type MetricPartition, type MetricTrend, type MetricValue, type MetricsRouterOptions, MetricsUtils, type MfaChallenge, type MfaChallengeInput, type MfaCodeInput, type MfaEnrollment, MfaService, type MfaServiceOptions, type MfaStore, NotFoundException, type OAuthClientOptions, OAuthError, type OAuthTokens, type OAuthUser, OIDCProvider, type OIDCProviderOptions, type OpenApiDocument, type OpenApiInfo, type OutboundMedia, type OutboundResult, type OutboxPublisher, OutboxRelay, type OutboxRelayOptions, OutboxStatus, PHONE_BR_PATTERN, type PaginationFilter, type PaginationLinkOptions, type ParsedAdminForm, type PasswordResetConfirmInput, type PasswordResetFormOptions, type PasswordResetRequestInput, PasswordResetService, type PasswordResetServiceOptions, type PasswordResetStore, PasswordUtils, REDOC_CDN_URL, REQUEST_ID_HEADER, RabbitBroker, type RabbitBrokerOptions, type RateLimitKeyFunc, type RateLimitOptions, type RateLimitRedisLike, type RateLimitResult, type RateLimitStore, RedisCacheManager, RedisIdempotencyStore, type RedisLike, type RedisPublisherLike, RedisRateLimitStore, RedisSSEBroker, type RedisSSEBrokerOptions, RedisSessionStore, type RedisSubscriberLike, type RedocBundleSource, type RedocOptions, type RefreshInput, Region, type RegionValue, type RegisterExceptionHandlersOptions, type RequestContext, type RequestTracingOptions, type ResolvedAdminTheme, type ResponseMapper, RetryPolicy, type RunServerOptions, type S3ClientLike, S3UploadStorage, type S3UploadStorageOptions, SSEBroker, type SaveOptions, type SendOptions, ServerSentEvent, type ServerSentEventInit, type Session, type SessionMiddlewareOptions, type SessionRedisLike, SessionService, type SessionServiceOptions, type SessionStore, type SignupInput, type SlowQueryOptions, type SpecProvider, type StateBR, type SwaggerOptions, type SyncFilter, type SystemMetrics, TOTPHelper, type TOTPOptions, type TaskHandler, TaskManager, type TaskManagerOptions, TelegramProvider, type TelegramProviderOptions, TenantScopedRepository, type TestDatabase, type ThrottleBackend, type ThrottleStatus, type ToDictOptions, type TokenPair, TooManyRequestsException, type TooManyRequestsOptions, type ToolSpecOptions, TwilioSmsProvider, type TwilioSmsProviderOptions, type TwilioWebhookOptions, UF, type UFValue, UnauthorizedException, type UnhandledExceptionHandlerOptions, type UploadResult, type UploadStorage, UserAuthService, type UserAuthServiceOptions, UserModelAuthBackend, type UserModelAuthBackendOptions, type UserPublic, type UserStore, UserTokenPurpose, VERSION, ValidationException, type WSEnvelope, WebPushDispatcher, type WebPushDispatcherOptions, WebPushError, WebPushGoneError, type WebPushKeys, type WebPushPayload, type WebPushSubscription, type WebSocketConnection, WebSocketHub, type WebSocketHubOptions, type WebSocketLike, type WebhookSignatureOptions, WebhookSignatureVerifier, WhatsAppProvider, type WhatsAppProviderOptions, type WhatsAppWebhookOptions, type WidgetSpec, activationSchema, addLogSink, adminAction, adminColumns, adminLens, adminThemeCss, attachWebSocketHub, authResponseSchema, authSettingsShape, backupDatabase, baseAppSettingsSchema, baseAppSettingsShape, baseResponseSchema, bearerToken, bodySizeLimitMiddleware, broadcastText, buildContentDisposition, buildFormFields, buildPaginationLinkHeader, cached, centsField, cepField, citiesByUf, cnpjField, coerceFlag, configureFileLogging, configureLogging, corsSettingsShape, cpfField, cpfOrCnpjField, createApp, createOpenApiRegistry, createTestDatabase, createdByColumn, csrfMiddleware, csrfTokenMatches, cursorPaginationFilterSchema, cursorPaginationSchema, databaseSettingsShape, decodeCursor, defaultMessageCatalog, defineEnum, deletedAtColumn, diffSnapshots, emailSettingsShape, encodeCursor, looseBoolean as envBoolean, envList, escapeHtml, filterForColumn, foreignKeyFields, foreignKeyLabel, foreignKeyTable, formatCellValue, formatFieldValue, generateCsrfToken, generateOAuthState, generateOpaqueToken, generateOpenApiDocument, getAuth, getClientIp, getConditions, getPaginationConditions, getRequestId, getState, hashOpaqueToken, hexColorField, humanizeField, idempotencyMiddleware, inboundMessageSchema, isColumnOptional, isSearchableColumn, isValidCep, isValidCity, isValidCnpj, isValidCpf, isValidCpfCnpj, isValidPhoneBr, isValidUf, jwtSettingsShape, keyByHeader, keyByIp, keyByJwtClaim, keyByJwtSubject, latitudeField, listStates, loadSettings, logEntrySchema, logSettingsShape, loginSchema, longitudeField, looseBoolean, makeAdminJsonRouter, makeAdminRouter, makeAppExceptionHandler, makeAuthRouter, makeFlagGuard, makeHealthRouter, makeJwtAuthMiddleware, makeLogsRouter, makeMetricsRouter, makeSessionMiddleware, makeToolSpecRouter, makeTwilioWebhookRouter, makeUnhandledExceptionHandler, makeWhatsAppWebhookRouter, metricCard, mfaChallengeSchema, mfaCodeSchema, mfaEnrollResponseSchema, minioSettingsShape, modifyDict, mountOpenApiJson, mountRedoc, mountSwaggerUi, nonEmptyStrField, nonNegativeFloatField, nonNegativeIntField, normalizeCep, normalizeCnpj, normalizeCpf, normalizeCpfCnpj, normalizePhoneBr, normalizeUf, notFoundHandler, onlyDigits, paginationFilterSchema, paginationSchema, parseAcceptLanguage, parseCookies, parseFormBody, partitionTotal, passwordResetConfirmSchema, passwordResetRequestSchema, percentField, phoneBrField, portField, positiveFloatField, positiveIntField, priceField, prometheusMiddleware, rabbitmqSettingsShape, rateLimitMiddleware, ratingField, ratioField, redisSettingsShape, refreshSchema, registerExceptionHandlers, renderAuthResultPage, renderDashboardPage, renderDetailPage, renderFormPage, renderLayout, renderListPage, renderLoginPage, renderMfaPage, renderPasswordResetFormPage, requestIdMiddleware, requestTracingMiddleware, requireRoles, resolveAdminTheme, resolveDownloadPath, resolveRedocBundle, runServer, runWithRequestContext, sendBytesDownload, sendFileDownload, serverSettingsShape, sessionCookie, sessionSettingsShape, setRequestId, signupSchema, slugField, snapshot, sseResponse, statesByRegion, syncFilterSchema, syncPaginationSchema, tableNameFor, toDict, toUtc, tokenFromUrl, tokenPairSchema, tokenSettingsShape, trendDirection, trendPercent, ufField, updatedByColumn, uploadSettingsShape, userPublicSchema, utcnow, validateTwilioSignature, verifyOpaqueToken, webPushKeysSchema, webPushPayloadSchema, webPushSettingsShape, webPushSubscriptionSchema, webSocketSettingsShape, widgetForColumn, withTestDatabase, wrapWithSlowQueryLog, wsEnvelopeSchema };
|
|
7018
|
+
export { ADMIN_CSS, type ActivationInput, ActivationService, type ActivationServiceOptions, type ActivationStore, type AdminAccessPolicy, type AdminAction, type AdminActionCategory, type AdminActionContext, type AdminActionHandler, type AdminActionOptions, type AdminActionResult, type AdminAuditEntryView, type AdminAuditView, type AdminAuthBackend, type AdminAutomapOptions, type AdminBusinessCardView, type AdminDashboardCard, type AdminDashboardMetrics, type AdminDetailView, type AdminFilterKind, type AdminFilterView, type AdminFormField, type AdminFormView, type AdminImportView, type AdminJsonField, type AdminJsonListQuery, type AdminJsonListResult, type AdminJsonResource, type AdminJsonRouterOptions, AdminJsonSite, type AdminLens, type AdminLensOptions, type AdminListView, type AdminMessage, type AdminMfaVerifier, AdminModel, type AdminModelOptions, type AdminNavEntry, AdminPermission, type AdminRenderContext, type AdminRouterOptions, type AdminRow, type AdminSelectOption, type AdminSession, AdminSessionStore, type AdminSessionStoreOptions, AdminSite, type AdminSiteOptions, type AdminSortView, type AdminTheme, type AdminWidget, AppException, type AppExceptionHandlerOptions, type AppExceptionOptions, type AttachWebSocketOptions, AttemptThrottle, type AttemptThrottleOptions, AuditAction, type AuthResponse, type AuthResultPageOptions, type AuthRouterOptions, type AuthUser, type BackupOptions, type BaseAppSettings, BaseAuditLogModel, BaseController, BaseModel, BaseOAuthClient, BaseOutboxModel, type BaseResponse, BaseService, BaseUserModel, BaseUserRefreshTokenModel, BaseUserTokenModel, type BodySizeLimitOptions, type BroadcastOptions, type BroadcastResult, type BrokerManager, type BuildFormFieldsOptions, type BulkActionOption, CEP_PATTERN, CNPJ_PATTERN, CPF_PATTERN, type CPUMetrics, CSRF_COOKIE_NAME, CSRF_HEADER_NAME, type CacheManager, type CachedOptions, type CachedResponse, type CardCompute, type CardData, type CatalogData, CircuitOpenError, type ClientIpOptions, CompositeFeatureFlagBackend, ConflictException, type CreateAppOpenApi, type CreateAppOptions, type CsrfOptions, type CursorPaginationFilter, DEFAULT_DOCS_FAVICON, DEFAULT_LOCALE, type DownloadOptions, 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 FieldChange, type FileLoggingHandle, type FileLoggingOptions, type FlagContext, ForbiddenException, type GPUMetrics, type GenerateOpenApiOptions, GitHubOAuthClient, GoogleOAuthClient, GracefulShutdown, type GracefulShutdownOptions, HTTPClient, type HTTPClientOptions, HTTP_500_LOG_FILE, HTTP_500_MARKER, type HandshakeInfo, type HealthCheck, type HealthRouterOptions, HttpMetrics, IDEMPOTENCY_HEADER, type IdempotencyOptions, type IdempotencyRedisLike, type IdempotencyStore, type InboundHandler, type InboundMessage, InvalidTokenException, type IssuedSession, JSONLogger, JWTUtils, type JWTUtilsOptions, type JwtAuthOptions, type JwtClaims, type JwtDecoderLike, LEVEL_LOG_FILES, LocalUploadStorage, type LocalUploadStorageOptions, type LogEntry, type LogExtra, type LogLevel, type LogSink, type LogSource, type LoginInput, type LoginResult, type LogsRouterOptions, type MediaKind, MemoryBroker, MemoryCacheManager, MemoryFeatureFlagBackend, MemoryIdempotencyStore, type MemoryMetrics, MemoryRateLimitStore, MemorySessionStore, MemoryThrottleBackend, MessageCatalog, type MessageHandler, MessagingHub, type MessagingProvider, type MetricCard, type MetricPartition, type MetricTrend, type MetricValue, type MetricsRouterOptions, MetricsUtils, type MfaChallenge, type MfaChallengeInput, type MfaCodeInput, type MfaEnrollment, MfaService, type MfaServiceOptions, type MfaStore, MultipartLimitError, NotFoundException, type OAuthClientOptions, OAuthError, type OAuthTokens, type OAuthUser, OIDCProvider, type OIDCProviderOptions, type OpenApiDocument, type OpenApiInfo, type OutboundMedia, type OutboundResult, type OutboxPublisher, OutboxRelay, type OutboxRelayOptions, OutboxStatus, PHONE_BR_PATTERN, type PaginationFilter, type PaginationLinkOptions, type ParseFormBodyOptions, type ParseMultipartOptions, type ParsedAdminForm, type ParsedMultipart, type PasswordResetConfirmInput, type PasswordResetFormOptions, type PasswordResetRequestInput, PasswordResetService, type PasswordResetServiceOptions, type PasswordResetStore, PasswordUtils, REDOC_CDN_URL, REQUEST_ID_HEADER, RabbitBroker, type RabbitBrokerOptions, type RateLimitKeyFunc, type RateLimitOptions, type RateLimitRedisLike, type RateLimitResult, type RateLimitStore, RedisCacheManager, RedisIdempotencyStore, type RedisLike, type RedisPublisherLike, RedisRateLimitStore, RedisSSEBroker, type RedisSSEBrokerOptions, RedisSessionStore, type RedisSubscriberLike, type RedocBundleSource, type RedocOptions, type RefreshInput, Region, type RegionValue, type RegisterExceptionHandlersOptions, type RequestContext, type RequestTracingOptions, type ResolvedAdminTheme, type ResponseMapper, RetryPolicy, type RunServerOptions, type S3ClientLike, S3UploadStorage, type S3UploadStorageOptions, SSEBroker, type SaveOptions, type SendOptions, ServerSentEvent, type ServerSentEventInit, type Session, type SessionMiddlewareOptions, type SessionRedisLike, SessionService, type SessionServiceOptions, type SessionStore, type SignupInput, type SlowQueryOptions, type SpecProvider, type StateBR, type SwaggerOptions, type SyncFilter, type SystemMetrics, TOTPHelper, type TOTPOptions, type TaskHandler, TaskManager, type TaskManagerOptions, TelegramProvider, type TelegramProviderOptions, TenantScopedRepository, type TestDatabase, type ThrottleBackend, type ThrottleStatus, type ToDictOptions, type TokenPair, TooManyRequestsException, type TooManyRequestsOptions, type ToolSpecOptions, TwilioSmsProvider, type TwilioSmsProviderOptions, type TwilioWebhookOptions, UF, type UFValue, UnauthorizedException, type UnhandledExceptionHandlerOptions, type UploadResult, type UploadStorage, type UploadedFile, UserAuthService, type UserAuthServiceOptions, UserModelAuthBackend, type UserModelAuthBackendOptions, type UserPublic, type UserStore, UserTokenPurpose, VERSION, ValidationException, type WSEnvelope, WebPushDispatcher, type WebPushDispatcherOptions, WebPushError, WebPushGoneError, type WebPushKeys, type WebPushPayload, type WebPushSubscription, type WebSocketConnection, WebSocketHub, type WebSocketHubOptions, type WebSocketLike, type WebhookSignatureOptions, WebhookSignatureVerifier, WhatsAppProvider, type WhatsAppProviderOptions, type WhatsAppWebhookOptions, type WidgetSpec, activationSchema, addLogSink, adminAction, adminColumns, adminLens, adminThemeCss, attachWebSocketHub, authResponseSchema, authSettingsShape, backupDatabase, baseAppSettingsSchema, baseAppSettingsShape, baseResponseSchema, bearerToken, bodySizeLimitMiddleware, broadcastText, buildContentDisposition, buildFormFields, buildPaginationLinkHeader, cached, centsField, cepField, citiesByUf, cnpjField, coerceFlag, configureFileLogging, configureLogging, corsSettingsShape, cpfField, cpfOrCnpjField, createApp, createOpenApiRegistry, createTestDatabase, createdByColumn, csrfMiddleware, csrfTokenMatches, cursorPaginationFilterSchema, cursorPaginationSchema, databaseSettingsShape, decodeCursor, defaultMessageCatalog, defineEnum, deletedAtColumn, diffSnapshots, emailSettingsShape, encodeCursor, looseBoolean as envBoolean, envList, escapeHtml, filterForColumn, foreignKeyFields, foreignKeyLabel, foreignKeyTable, formatCellValue, formatFieldValue, generateCsrfToken, generateOAuthState, generateOpaqueToken, generateOpenApiDocument, getAuth, getClientIp, getConditions, getPaginationConditions, getRequestId, getState, hashOpaqueToken, hexColorField, humanizeField, idempotencyMiddleware, inboundMessageSchema, isColumnOptional, isMultipart, isSearchableColumn, isValidCep, isValidCity, isValidCnpj, isValidCpf, isValidCpfCnpj, isValidPhoneBr, isValidUf, jwtSettingsShape, keyByHeader, keyByIp, keyByJwtClaim, keyByJwtSubject, latitudeField, listStates, loadSettings, logEntrySchema, logSettingsShape, loginSchema, longitudeField, looseBoolean, makeAdminJsonRouter, makeAdminRouter, makeAppExceptionHandler, makeAuthRouter, makeFlagGuard, makeHealthRouter, makeJwtAuthMiddleware, makeLogsRouter, makeMetricsRouter, makeSessionMiddleware, makeToolSpecRouter, makeTwilioWebhookRouter, makeUnhandledExceptionHandler, makeWhatsAppWebhookRouter, metricCard, mfaChallengeSchema, mfaCodeSchema, mfaEnrollResponseSchema, minioSettingsShape, modifyDict, mountOpenApiJson, mountRedoc, mountSwaggerUi, nonEmptyStrField, nonNegativeFloatField, nonNegativeIntField, normalizeCep, normalizeCnpj, normalizeCpf, normalizeCpfCnpj, normalizePhoneBr, normalizeUf, notFoundHandler, onlyDigits, paginationFilterSchema, paginationSchema, parseAcceptLanguage, parseCookies, parseCsv, parseFormBody, parseMultipart, partitionTotal, passwordResetConfirmSchema, passwordResetRequestSchema, percentField, phoneBrField, portField, positiveFloatField, positiveIntField, priceField, prometheusMiddleware, rabbitmqSettingsShape, rateLimitMiddleware, ratingField, ratioField, redisSettingsShape, refreshSchema, registerExceptionHandlers, renderAuthResultPage, renderDashboardPage, renderDetailPage, renderFormPage, renderImportPage, renderLayout, renderListPage, renderLoginPage, renderMfaPage, renderPasswordResetFormPage, requestIdMiddleware, requestTracingMiddleware, requireRoles, resolveAdminTheme, resolveDownloadPath, resolveRedocBundle, runServer, runWithRequestContext, sendBytesDownload, sendFileDownload, serverSettingsShape, sessionCookie, sessionSettingsShape, setRequestId, signupSchema, slugField, snapshot, sseResponse, statesByRegion, syncFilterSchema, syncPaginationSchema, tableNameFor, toDict, toUtc, tokenFromUrl, tokenPairSchema, tokenSettingsShape, trendDirection, trendPercent, ufField, updatedByColumn, uploadSettingsShape, userPublicSchema, utcnow, validateTwilioSignature, verifyOpaqueToken, webPushKeysSchema, webPushPayloadSchema, webPushSettingsShape, webPushSubscriptionSchema, webSocketSettingsShape, widgetForColumn, withTestDatabase, wrapWithSlowQueryLog, wsEnvelopeSchema };
|