@praxisui/files-upload 10.0.0-rc.71 → 10.0.0-rc.72
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/ai/component-registry.json +2 -2
- package/fesm2022/praxisui-files-upload.mjs +1073 -142
- package/package.json +5 -5
- package/types/praxisui-files-upload.d.ts +291 -12
package/README.md
CHANGED
|
@@ -115,11 +115,12 @@ Built-in validators include `acceptValidator`, `maxFileSizeValidator`, `maxFiles
|
|
|
115
115
|
|
|
116
116
|
## Services And Host Integration
|
|
117
117
|
|
|
118
|
-
- `FilesApiClient`: direct upload, bulk upload and
|
|
118
|
+
- `FilesApiClient`: direct upload, bulk upload, presign, lifecycle (`getMetadata`, `confirm`, `delete`), effective config (`getConfig`), and authenticated content download (`getContent`, `fetchContentBlob`, fail-closed `getContentUrl`) with `withCredentials: true`, explicit `Content-Type` stripping on `FormData`, `apiUrlKey` lookup, contextual header isolation via `isPraxisContextualHeaderName` (preserving `EnterpriseRuntimeContextService.applyHeaders()` without mid-switch header leakage), and `Retry-After` backoff timers (excluding non-retriable `429 COTA_EXCEDIDA` / `QUOTA_EXCEEDED`). Lifecycle normalization preserves `'PENDING_APPROVAL'` and fails closed unknown non-empty statuses to `'UNKNOWN'` without assuming active or clean scan state before backend confirmation.
|
|
119
|
+
- `FilesApiUploadPortAdapter` / `providePraxisFilesApiUploadPort()`: implements `@praxisui/core`'s `PRAXIS_FILE_UPLOAD_PORT` (configured at the provider level via `PraxisFilesApiUploadPortOptions` with `withCredentials`, `apiUrlKey`, `baseUrl`, `headers`, and accepting per-call `PraxisFileOperationOptions` such as `baseUrl`, `headers`, `preserveExplicitContextHeaders` while excluding provider-level contextual headers when `preserveExplicitContextHeaders: true`; preserving `'PENDING_APPROVAL'` / `'UNKNOWN'` lifecycle status; validating safe file identifiers; and delegating `fetchContentBlob` to `FilesApiClient.fetchContentBlob` for authenticated Blob preview retrieval through `PraxisSafeBlobPreviewService`) so external modules such as `@praxisui/ai` consume governed uploads without coupling to `@praxisui/files-upload`.
|
|
120
|
+
- `ErrorMapperService`: maps HTTP and domain error codes (`409 FILE_EXISTS`, `409 CONFLITO_ESTADO`, `409 ARQUIVO_SOB_RETENCAO`, `403 EXCLUSAO_ATIVO_BLOQUEADA`, `400 NO_FILES_PROVIDED`, `400 INVALID_OPTIONS_FORMAT`, `413 FILE_TOO_LARGE`, `503 SCANNER_VIRUS_INDISPONIVEL`, and structured PT-BR/EN catalogs) with `retriable` hints, `Retry-After` relative-second parsing, and `X-RateLimit-Reset` Unix epoch-second timestamps.
|
|
119
121
|
- `PresignedUploaderService`: posts to presigned targets.
|
|
120
|
-
- `ConfigService`: loads effective backend upload configuration with ETag-aware caching by base URL and contextual headers.
|
|
122
|
+
- `ConfigService`: loads effective backend upload configuration (`withCredentials: true` and `EnterpriseRuntimeContextService.applyHeaders()`) with ETag-aware caching by normalized base URL and contextual headers.
|
|
121
123
|
- `useEffectiveUploadConfig`: signal-based helper for loading, data, error, context and refetch state.
|
|
122
|
-
- `ErrorMapperService`: maps backend error codes into user-facing messages and rate-limit details.
|
|
123
124
|
- `providePraxisFilesUploadI18n(...)`: registers upload texts through the official `@praxisui/core` i18n infrastructure.
|
|
124
125
|
|
|
125
126
|
Provide `FILES_UPLOAD_ERROR_MESSAGES` only when a host needs global error-message overrides.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": "1.0.0",
|
|
3
|
-
"generatedAt": "2026-11-
|
|
3
|
+
"generatedAt": "2026-11-30T08:57:00.866Z",
|
|
4
4
|
"packageName": "@praxisui/files-upload",
|
|
5
|
-
"packageVersion": "10.0.0-rc.
|
|
5
|
+
"packageVersion": "10.0.0-rc.72",
|
|
6
6
|
"sourceRegistry": "praxis-component-registry-ingestion",
|
|
7
7
|
"sourceRegistryVersion": "1.0.0",
|
|
8
8
|
"componentCount": 1,
|