@plyaz/types 1.15.20 → 1.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/aws/index.d.ts +5 -0
- package/dist/api/aws/signature.d.ts +42 -0
- package/dist/api/endpoints/cdn/endpoints.d.ts +57 -0
- package/dist/api/endpoints/cdn/index.d.ts +6 -0
- package/dist/api/endpoints/cdn/types.d.ts +151 -0
- package/dist/api/endpoints/index.d.ts +2 -0
- package/dist/api/endpoints/types.d.ts +3 -1
- package/dist/api/endpoints/virustotal/endpoints.d.ts +37 -0
- package/dist/api/endpoints/virustotal/index.d.ts +6 -0
- package/dist/api/endpoints/virustotal/types.d.ts +202 -0
- package/dist/api/index.cjs +1317 -1
- package/dist/api/index.cjs.map +1 -1
- package/dist/api/index.d.ts +3 -0
- package/dist/api/index.js +1317 -1
- package/dist/api/index.js.map +1 -1
- package/dist/core/idempotency.d.ts +48 -0
- package/dist/core/index.d.ts +1 -0
- package/dist/errors/codes.d.ts +296 -0
- package/dist/errors/enums.d.ts +10 -0
- package/dist/errors/index.cjs +1482 -1
- package/dist/errors/index.cjs.map +1 -1
- package/dist/errors/index.d.ts +1 -0
- package/dist/errors/index.js +1482 -2
- package/dist/errors/index.js.map +1 -1
- package/dist/errors/validation.d.ts +71 -0
- package/dist/index.cjs +2268 -132
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +11 -0
- package/dist/index.js +2227 -133
- package/dist/index.js.map +1 -1
- package/dist/logger/enums.d.ts +10 -0
- package/dist/notifications/types.d.ts +1 -2
- package/dist/storage/compliance.d.ts +247 -0
- package/dist/storage/enums.d.ts +527 -0
- package/dist/storage/event-handler-mapping.d.ts +69 -0
- package/dist/storage/index.d.ts +13 -0
- package/dist/storage/interfaces.d.ts +2242 -0
- package/dist/storage/plugins.d.ts +996 -0
- package/dist/storage/schemas.d.ts +224 -0
- package/dist/storage/webhooks.d.ts +340 -0
- package/package.json +6 -1
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Idempotency Store Types
|
|
3
|
+
*
|
|
4
|
+
* Types for idempotency checking across storage operations
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Available idempotency store types
|
|
8
|
+
*/
|
|
9
|
+
export type CoreIdempotencyStoreType = 'in-memory' | 'redis';
|
|
10
|
+
/**
|
|
11
|
+
* In-memory idempotency adapter configuration
|
|
12
|
+
*/
|
|
13
|
+
export interface CoreInMemoryIdempotencyAdapterConfig {
|
|
14
|
+
/** Default TTL in milliseconds */
|
|
15
|
+
defaultTTL?: number;
|
|
16
|
+
/** Cleanup interval in milliseconds */
|
|
17
|
+
cleanupInterval?: number;
|
|
18
|
+
/** Maximum keys to store in memory */
|
|
19
|
+
maxKeys?: number;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Redis idempotency adapter configuration
|
|
23
|
+
*/
|
|
24
|
+
export interface CoreRedisIdempotencyAdapterConfig {
|
|
25
|
+
/** Redis client instance (if already created) */
|
|
26
|
+
redis?: unknown;
|
|
27
|
+
/** Redis connection options (if creating new client) */
|
|
28
|
+
redisOptions?: unknown;
|
|
29
|
+
/** Key prefix for idempotency keys (default: 'webhook:idempotency:') */
|
|
30
|
+
keyPrefix?: string;
|
|
31
|
+
/** Default TTL in seconds (default: 3600) */
|
|
32
|
+
defaultTTL?: number;
|
|
33
|
+
/** Enable debug logging */
|
|
34
|
+
debug?: boolean;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Conditional options based on store type
|
|
38
|
+
*/
|
|
39
|
+
export type CoreIdempotencyStoreOptions<T extends CoreIdempotencyStoreType> = T extends 'redis' ? CoreRedisIdempotencyAdapterConfig : T extends 'in-memory' ? CoreInMemoryIdempotencyAdapterConfig : never;
|
|
40
|
+
/**
|
|
41
|
+
* Idempotency Store Configuration
|
|
42
|
+
*/
|
|
43
|
+
export interface CoreIdempotencyStoreConfig<T extends CoreIdempotencyStoreType = 'in-memory'> {
|
|
44
|
+
/** Store type */
|
|
45
|
+
type: T;
|
|
46
|
+
/** Store-specific options (conditional based on type) */
|
|
47
|
+
options?: CoreIdempotencyStoreOptions<T>;
|
|
48
|
+
}
|
package/dist/core/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* @module core
|
|
6
6
|
*/
|
|
7
7
|
export type { ApiEnvironmentConfig, ApiProviderProps } from './services';
|
|
8
|
+
export type { CoreIdempotencyStoreType, CoreInMemoryIdempotencyAdapterConfig, CoreRedisIdempotencyAdapterConfig, CoreIdempotencyStoreOptions, CoreIdempotencyStoreConfig, } from './idempotency';
|
|
8
9
|
export * from './tables/enum';
|
|
9
10
|
export type * from './auth/types';
|
|
10
11
|
export type * from './featureFlag/types';
|
package/dist/errors/codes.d.ts
CHANGED
|
@@ -116,6 +116,140 @@ export declare const ERROR_CODES: {
|
|
|
116
116
|
readonly NOTIFICATION_TEMPLATE_RENDER_FAILED: "notification.template.render.failed";
|
|
117
117
|
readonly NOTIFICATION_UNKNOWN_ERROR: "notification.unknown.error";
|
|
118
118
|
readonly NOTIFICATION_INITIALIZATION_FAILED: "notification.initialization.failed";
|
|
119
|
+
readonly STORAGE_UNKNOWN_ERROR: "storage.unknown.error";
|
|
120
|
+
readonly STORAGE_INITIALIZATION_FAILED: "storage.initialization.failed";
|
|
121
|
+
readonly STORAGE_ADAPTER_NOT_FOUND: "storage.adapter.not.found";
|
|
122
|
+
readonly STORAGE_ADAPTER_INITIALIZATION_FAILED: "storage.adapter.initialization.failed";
|
|
123
|
+
readonly STORAGE_ADAPTER_CONFIGURATION_INVALID: "storage.adapter.configuration.invalid";
|
|
124
|
+
readonly STORAGE_ADAPTER_ALREADY_REGISTERED: "storage.adapter.already.registered";
|
|
125
|
+
readonly STORAGE_ADAPTER_CONNECTION_FAILED: "storage.adapter.connection.failed";
|
|
126
|
+
readonly STORAGE_ADAPTER_AUTHENTICATION_FAILED: "storage.adapter.authentication.failed";
|
|
127
|
+
readonly STORAGE_ADAPTER_OPERATION_FAILED: "storage.adapter.operation.failed";
|
|
128
|
+
readonly STORAGE_ADAPTER_HEALTH_CHECK_FAILED: "storage.adapter.health.check.failed";
|
|
129
|
+
readonly STORAGE_ADAPTER_UNAVAILABLE: "storage.adapter.unavailable";
|
|
130
|
+
readonly STORAGE_ADAPTER_TIMEOUT: "storage.adapter.timeout";
|
|
131
|
+
readonly STORAGE_ADAPTER_RATE_LIMIT: "storage.adapter.rate.limit";
|
|
132
|
+
readonly STORAGE_ADAPTER_QUOTA_EXCEEDED: "storage.adapter.quota.exceeded";
|
|
133
|
+
readonly STORAGE_ADAPTER_UNSUPPORTED_OPERATION: "storage.adapter.unsupported.operation";
|
|
134
|
+
readonly STORAGE_ADAPTER_FEATURE_NOT_SUPPORTED: "storage.adapter.feature.not.supported";
|
|
135
|
+
readonly STORAGE_NO_HEALTHY_ADAPTERS: "storage.no.healthy.adapters";
|
|
136
|
+
readonly STORAGE_ALL_ADAPTERS_FAILED: "storage.all.adapters.failed";
|
|
137
|
+
readonly STORAGE_FILE_TOO_LARGE: "storage.file.too.large";
|
|
138
|
+
readonly STORAGE_FILE_TOO_SMALL: "storage.file.too.small";
|
|
139
|
+
readonly STORAGE_FILE_SIZE_INVALID: "storage.file.size.invalid";
|
|
140
|
+
readonly STORAGE_FILE_TYPE_NOT_ALLOWED: "storage.file.type.not.allowed";
|
|
141
|
+
readonly STORAGE_INVALID_MIME_TYPE: "storage.invalid.mime.type";
|
|
142
|
+
readonly STORAGE_INVALID_FILE_EXTENSION: "storage.invalid.file.extension";
|
|
143
|
+
readonly STORAGE_FILE_EXTENSION_INVALID: "storage.file.extension.invalid";
|
|
144
|
+
readonly STORAGE_FILE_EXTENSION_MISMATCH: "storage.file.extension.mismatch";
|
|
145
|
+
readonly STORAGE_EXECUTABLE_NOT_ALLOWED: "storage.executable.not.allowed";
|
|
146
|
+
readonly STORAGE_VALIDATION_FAILED: "storage.validation.failed";
|
|
147
|
+
readonly STORAGE_INVALID_FILE_CONTENT: "storage.invalid.file.content";
|
|
148
|
+
readonly STORAGE_SECURITY_VIRUS_DETECTED: "storage.security.virus.detected";
|
|
149
|
+
readonly STORAGE_SECURITY_SCAN_FAILED: "storage.security.scan.failed";
|
|
150
|
+
readonly STORAGE_SECURITY_ACCESS_DENIED: "storage.security.access.denied";
|
|
151
|
+
readonly STORAGE_SECURITY_ENCRYPTION_FAILED: "storage.security.encryption.failed";
|
|
152
|
+
readonly STORAGE_FILE_UPLOAD_FAILED: "storage.file.upload.failed";
|
|
153
|
+
readonly STORAGE_FILE_DOWNLOAD_FAILED: "storage.file.download.failed";
|
|
154
|
+
readonly STORAGE_FILE_DELETE_FAILED: "storage.file.delete.failed";
|
|
155
|
+
readonly STORAGE_FILE_UPDATE_FAILED: "storage.file.update.failed";
|
|
156
|
+
readonly STORAGE_FILE_NOT_FOUND: "storage.file.not.found";
|
|
157
|
+
readonly STORAGE_FILE_ALREADY_EXISTS: "storage.file.already.exists";
|
|
158
|
+
readonly STORAGE_FILE_MOVE_FAILED: "storage.file.move.failed";
|
|
159
|
+
readonly STORAGE_FILE_COPY_FAILED: "storage.file.copy.failed";
|
|
160
|
+
readonly STORAGE_FILE_READ_FAILED: "storage.file.read.failed";
|
|
161
|
+
readonly STORAGE_FILE_WRITE_FAILED: "storage.file.write.failed";
|
|
162
|
+
readonly STORAGE_FILE_CORRUPTED: "storage.file.corrupted";
|
|
163
|
+
readonly STORAGE_INVALID_OPERATION: "storage.invalid.operation";
|
|
164
|
+
readonly STORAGE_METADATA_EXTRACTION_FAILED: "storage.metadata.extraction.failed";
|
|
165
|
+
readonly STORAGE_METADATA_INVALID: "storage.metadata.invalid";
|
|
166
|
+
readonly STORAGE_METADATA_UPDATE_FAILED: "storage.metadata.update.failed";
|
|
167
|
+
readonly STORAGE_MEDIA_PROCESSING_FAILED: "storage.media.processing.failed";
|
|
168
|
+
readonly STORAGE_MEDIA_RESIZE_FAILED: "storage.media.resize.failed";
|
|
169
|
+
readonly STORAGE_MEDIA_FORMAT_UNSUPPORTED: "storage.media.format.unsupported";
|
|
170
|
+
readonly STORAGE_MEDIA_TRANSCODE_FAILED: "storage.media.transcode.failed";
|
|
171
|
+
readonly STORAGE_MEDIA_THUMBNAIL_FAILED: "storage.media.thumbnail.failed";
|
|
172
|
+
readonly STORAGE_MEDIA_INVALID_DIMENSIONS: "storage.media.invalid.dimensions";
|
|
173
|
+
readonly STORAGE_TEMPLATE_NOT_FOUND: "storage.template.not.found";
|
|
174
|
+
readonly STORAGE_TEMPLATE_RENDER_FAILED: "storage.template.render.failed";
|
|
175
|
+
readonly STORAGE_PDF_GENERATION_FAILED: "storage.pdf.generation.failed";
|
|
176
|
+
readonly STORAGE_PDF_RENDERING_TIMEOUT: "storage.pdf.rendering.timeout";
|
|
177
|
+
readonly STORAGE_QUEUE_FULL: "storage.queue.full";
|
|
178
|
+
readonly STORAGE_QUEUE_PROCESSING_FAILED: "storage.queue.processing.failed";
|
|
179
|
+
readonly STORAGE_QUEUE_ITEM_NOT_FOUND: "storage.queue.item.not.found";
|
|
180
|
+
readonly STORAGE_COMPLIANCE_VIOLATION: "storage.compliance.violation";
|
|
181
|
+
readonly STORAGE_COMPLIANCE_RETENTION_VIOLATION: "storage.compliance.retention.violation";
|
|
182
|
+
readonly STORAGE_COMPLIANCE_RETENTION_EXPIRED: "storage.compliance.retention.expired";
|
|
183
|
+
readonly STORAGE_COMPLIANCE_IMMUTABLE_FILE: "storage.compliance.immutable.file";
|
|
184
|
+
readonly STORAGE_COMPLIANCE_POLICY_NOT_FOUND: "storage.compliance.policy.not.found";
|
|
185
|
+
readonly STORAGE_COMPLIANCE_SOFT_DELETE_REQUIRED: "storage.compliance.soft.delete.required";
|
|
186
|
+
readonly STORAGE_COMPLIANCE_GRACE_PERIOD_ACTIVE: "storage.compliance.grace.period.active";
|
|
187
|
+
readonly STORAGE_COMPLIANCE_DEFERRED_DELETION: "storage.compliance.deferred.deletion";
|
|
188
|
+
readonly STORAGE_COMPLIANCE_PATTERN_PROTECTED: "storage.compliance.pattern.protected";
|
|
189
|
+
readonly STORAGE_SHARE_LINK_NOT_FOUND: "storage.share.link.not.found";
|
|
190
|
+
readonly STORAGE_SHARE_LINK_EXPIRED: "storage.share.link.expired";
|
|
191
|
+
readonly STORAGE_SHARE_LINK_MAX_DOWNLOADS: "storage.share.link.max.downloads";
|
|
192
|
+
readonly STORAGE_SHARE_LINK_INVALID_PASSWORD: "storage.share.link.invalid.password";
|
|
193
|
+
readonly STORAGE_PLUGIN_NOT_FOUND: "storage.plugin.not.found";
|
|
194
|
+
readonly STORAGE_PLUGIN_INITIALIZATION_FAILED: "storage.plugin.initialization.failed";
|
|
195
|
+
readonly STORAGE_PLUGIN_EXECUTION_FAILED: "storage.plugin.execution.failed";
|
|
196
|
+
readonly STORAGE_VIRUSTOTAL_BAD_REQUEST: "storage.virustotal.bad_request";
|
|
197
|
+
readonly STORAGE_VIRUSTOTAL_AUTHENTICATION_REQUIRED: "storage.virustotal.authentication_required";
|
|
198
|
+
readonly STORAGE_VIRUSTOTAL_WRONG_CREDENTIALS: "storage.virustotal.wrong_credentials";
|
|
199
|
+
readonly STORAGE_VIRUSTOTAL_FILE_TOO_LARGE: "storage.virustotal.file_too_large";
|
|
200
|
+
readonly STORAGE_VIRUSTOTAL_QUOTA_EXCEEDED: "storage.virustotal.quota_exceeded";
|
|
201
|
+
readonly STORAGE_VIRUSTOTAL_ANALYSIS_NOT_FOUND: "storage.virustotal.analysis_not_found";
|
|
202
|
+
readonly STORAGE_VIRUSTOTAL_SCAN_TIMEOUT: "storage.virustotal.scan_timeout";
|
|
203
|
+
readonly STORAGE_VIRUSTOTAL_SCAN_FAILED: "storage.virustotal.scan_failed";
|
|
204
|
+
readonly CLOUDFLARE_AUTHENTICATION_FAILED: "cloudflare.authentication.failed";
|
|
205
|
+
readonly CLOUDFLARE_ZONE_NOT_FOUND: "cloudflare.zone.not.found";
|
|
206
|
+
readonly CLOUDFLARE_PURGE_FAILED: "cloudflare.purge.failed";
|
|
207
|
+
readonly CLOUDFLARE_RATE_LIMIT_EXCEEDED: "cloudflare.rate.limit.exceeded";
|
|
208
|
+
readonly CLOUDFLARE_INVALID_URL: "cloudflare.invalid.url";
|
|
209
|
+
readonly CLOUDFLARE_API_ERROR: "cloudflare.api.error";
|
|
210
|
+
readonly CLOUDFRONT_AUTHENTICATION_FAILED: "cloudfront.authentication.failed";
|
|
211
|
+
readonly CLOUDFRONT_DISTRIBUTION_NOT_FOUND: "cloudfront.distribution.not.found";
|
|
212
|
+
readonly CLOUDFRONT_INVALIDATION_FAILED: "cloudfront.invalidation.failed";
|
|
213
|
+
readonly CLOUDFRONT_QUOTA_EXCEEDED: "cloudfront.quota.exceeded";
|
|
214
|
+
readonly CLOUDFRONT_INVALID_PATH: "cloudfront.invalid.path";
|
|
215
|
+
readonly CLOUDFRONT_API_ERROR: "cloudfront.api.error";
|
|
216
|
+
readonly FASTLY_AUTHENTICATION_FAILED: "fastly.authentication.failed";
|
|
217
|
+
readonly FASTLY_SERVICE_NOT_FOUND: "fastly.service.not.found";
|
|
218
|
+
readonly FASTLY_PURGE_FAILED: "fastly.purge.failed";
|
|
219
|
+
readonly FASTLY_RATE_LIMIT_EXCEEDED: "fastly.rate.limit.exceeded";
|
|
220
|
+
readonly FASTLY_INVALID_URL: "fastly.invalid.url";
|
|
221
|
+
readonly FASTLY_API_ERROR: "fastly.api.error";
|
|
222
|
+
readonly CDN_INVALIDATION_FAILED: "cdn.invalidation.failed";
|
|
223
|
+
readonly CDN_CONFIGURATION_INVALID: "cdn.configuration.invalid";
|
|
224
|
+
readonly CDN_PROVIDER_NOT_FOUND: "cdn.provider.not.found";
|
|
225
|
+
readonly STORAGE_WEBHOOK_SIGNATURE_INVALID: "storage.webhook.signature.invalid";
|
|
226
|
+
readonly STORAGE_WEBHOOK_PAYLOAD_INVALID: "storage.webhook.payload.invalid";
|
|
227
|
+
readonly STORAGE_WEBHOOK_PROCESSING_FAILED: "storage.webhook.processing.failed";
|
|
228
|
+
readonly STORAGE_WEBHOOK_TIMEOUT: "storage.webhook.timeout";
|
|
229
|
+
readonly STORAGE_WEBHOOK_ADAPTER_NOT_FOUND: "storage.webhook.adapter.not.found";
|
|
230
|
+
readonly STORAGE_WEBHOOK_DUPLICATE_DETECTED: "storage.webhook.duplicate.detected";
|
|
231
|
+
readonly STORAGE_WEBHOOK_IDEMPOTENCY_ERROR: "storage.webhook.idempotency.error";
|
|
232
|
+
readonly STORAGE_WEBHOOK_RATE_LIMIT_EXCEEDED: "storage.webhook.rate.limit.exceeded";
|
|
233
|
+
readonly STORAGE_PRESIGNED_URL_GENERATION_FAILED: "storage.presigned.url.generation.failed";
|
|
234
|
+
readonly STORAGE_PRESIGNED_URL_EXPIRED: "storage.presigned.url.expired";
|
|
235
|
+
readonly STORAGE_PRESIGNED_URL_INVALID: "storage.presigned.url.invalid";
|
|
236
|
+
readonly STORAGE_CHUNKED_UPLOAD_INIT_FAILED: "storage.chunked.upload.init.failed";
|
|
237
|
+
readonly STORAGE_CHUNKED_UPLOAD_PART_FAILED: "storage.chunked.upload.part.failed";
|
|
238
|
+
readonly STORAGE_CHUNKED_UPLOAD_COMPLETE_FAILED: "storage.chunked.upload.complete.failed";
|
|
239
|
+
readonly STORAGE_CHUNKED_UPLOAD_ABORT_FAILED: "storage.chunked.upload.abort.failed";
|
|
240
|
+
readonly STORAGE_CHUNKED_UPLOAD_NOT_FOUND: "storage.chunked.upload.not.found";
|
|
241
|
+
readonly STORAGE_CORS_CONFIGURATION_INVALID: "storage.cors.configuration.invalid";
|
|
242
|
+
readonly STORAGE_CORS_ORIGIN_NOT_ALLOWED: "storage.cors.origin.not.allowed";
|
|
243
|
+
readonly STORAGE_TTL_EXPIRED: "storage.ttl.expired";
|
|
244
|
+
readonly STORAGE_TTL_CLEANUP_FAILED: "storage.ttl.cleanup.failed";
|
|
245
|
+
readonly STORAGE_AUDIT_LOG_FAILED: "storage.audit.log.failed";
|
|
246
|
+
readonly STORAGE_TIMEOUT: "storage.timeout";
|
|
247
|
+
readonly STORAGE_NETWORK_ERROR: "storage.network.error";
|
|
248
|
+
readonly STORAGE_CONNECTION_LOST: "storage.connection.lost";
|
|
249
|
+
readonly STORAGE_PERMISSION_DENIED: "storage.permission.denied";
|
|
250
|
+
readonly STORAGE_QUOTA_EXCEEDED: "storage.quota.exceeded";
|
|
251
|
+
readonly STORAGE_INSUFFICIENT_SPACE: "storage.insufficient.space";
|
|
252
|
+
readonly STORAGE_FEATURE_NOT_IMPLEMENTED: "storage.feature.not.implemented";
|
|
119
253
|
readonly ERROR_SYSTEM_NOT_INITIALIZED: "error.system.not.initialized";
|
|
120
254
|
readonly EVENT_FACTORY_NOT_REGISTERED: "error.event.factory.not.registered";
|
|
121
255
|
readonly DATABASE_ERROR: "error.database";
|
|
@@ -378,6 +512,27 @@ export declare const API_ERROR_CODES: {
|
|
|
378
512
|
readonly CONTEXT_OPERATION_FAILED: "CONTEXT_OPERATION_FAILED";
|
|
379
513
|
readonly CLIENT_ERROR: "CLIENT_ERROR";
|
|
380
514
|
readonly UNKNOWN_ERROR: "UNKNOWN_ERROR";
|
|
515
|
+
readonly CLOUDFLARE_AUTHENTICATION_FAILED: "cloudflare.authentication.failed";
|
|
516
|
+
readonly CLOUDFLARE_ZONE_NOT_FOUND: "cloudflare.zone.not.found";
|
|
517
|
+
readonly CLOUDFLARE_PURGE_FAILED: "cloudflare.purge.failed";
|
|
518
|
+
readonly CLOUDFLARE_RATE_LIMIT_EXCEEDED: "cloudflare.rate.limit.exceeded";
|
|
519
|
+
readonly CLOUDFLARE_INVALID_URL: "cloudflare.invalid.url";
|
|
520
|
+
readonly CLOUDFLARE_API_ERROR: "cloudflare.api.error";
|
|
521
|
+
readonly CLOUDFRONT_AUTHENTICATION_FAILED: "cloudfront.authentication.failed";
|
|
522
|
+
readonly CLOUDFRONT_DISTRIBUTION_NOT_FOUND: "cloudfront.distribution.not.found";
|
|
523
|
+
readonly CLOUDFRONT_INVALIDATION_FAILED: "cloudfront.invalidation.failed";
|
|
524
|
+
readonly CLOUDFRONT_QUOTA_EXCEEDED: "cloudfront.quota.exceeded";
|
|
525
|
+
readonly CLOUDFRONT_INVALID_PATH: "cloudfront.invalid.path";
|
|
526
|
+
readonly CLOUDFRONT_API_ERROR: "cloudfront.api.error";
|
|
527
|
+
readonly FASTLY_AUTHENTICATION_FAILED: "fastly.authentication.failed";
|
|
528
|
+
readonly FASTLY_SERVICE_NOT_FOUND: "fastly.service.not.found";
|
|
529
|
+
readonly FASTLY_PURGE_FAILED: "fastly.purge.failed";
|
|
530
|
+
readonly FASTLY_RATE_LIMIT_EXCEEDED: "fastly.rate.limit.exceeded";
|
|
531
|
+
readonly FASTLY_INVALID_URL: "fastly.invalid.url";
|
|
532
|
+
readonly FASTLY_API_ERROR: "fastly.api.error";
|
|
533
|
+
readonly CDN_INVALIDATION_FAILED: "cdn.invalidation.failed";
|
|
534
|
+
readonly CDN_CONFIGURATION_INVALID: "cdn.configuration.invalid";
|
|
535
|
+
readonly CDN_PROVIDER_NOT_FOUND: "cdn.provider.not.found";
|
|
381
536
|
};
|
|
382
537
|
/**
|
|
383
538
|
* Notification-specific error codes
|
|
@@ -409,6 +564,146 @@ export declare const NOTIFICATION_ERROR_CODES: {
|
|
|
409
564
|
readonly UNKNOWN_ERROR: "notification.unknown.error";
|
|
410
565
|
readonly INITIALIZATION_FAILED: "notification.initialization.failed";
|
|
411
566
|
};
|
|
567
|
+
/**
|
|
568
|
+
* Storage-specific error codes
|
|
569
|
+
* Subset of ERROR_CODES for @plyaz/storage package
|
|
570
|
+
*/
|
|
571
|
+
export declare const STORAGE_ERROR_CODES: {
|
|
572
|
+
readonly UNKNOWN_ERROR: "storage.unknown.error";
|
|
573
|
+
readonly INITIALIZATION_FAILED: "storage.initialization.failed";
|
|
574
|
+
readonly ADAPTER_NOT_FOUND: "storage.adapter.not.found";
|
|
575
|
+
readonly ADAPTER_INITIALIZATION_FAILED: "storage.adapter.initialization.failed";
|
|
576
|
+
readonly ADAPTER_CONFIGURATION_INVALID: "storage.adapter.configuration.invalid";
|
|
577
|
+
readonly ADAPTER_ALREADY_REGISTERED: "storage.adapter.already.registered";
|
|
578
|
+
readonly ADAPTER_CONNECTION_FAILED: "storage.adapter.connection.failed";
|
|
579
|
+
readonly ADAPTER_AUTHENTICATION_FAILED: "storage.adapter.authentication.failed";
|
|
580
|
+
readonly ADAPTER_OPERATION_FAILED: "storage.adapter.operation.failed";
|
|
581
|
+
readonly ADAPTER_HEALTH_CHECK_FAILED: "storage.adapter.health.check.failed";
|
|
582
|
+
readonly ADAPTER_UNAVAILABLE: "storage.adapter.unavailable";
|
|
583
|
+
readonly ADAPTER_TIMEOUT: "storage.adapter.timeout";
|
|
584
|
+
readonly ADAPTER_RATE_LIMIT: "storage.adapter.rate.limit";
|
|
585
|
+
readonly ADAPTER_QUOTA_EXCEEDED: "storage.adapter.quota.exceeded";
|
|
586
|
+
readonly ADAPTER_UNSUPPORTED_OPERATION: "storage.adapter.unsupported.operation";
|
|
587
|
+
readonly ADAPTER_FEATURE_NOT_SUPPORTED: "storage.adapter.feature.not.supported";
|
|
588
|
+
readonly NO_HEALTHY_ADAPTERS: "storage.no.healthy.adapters";
|
|
589
|
+
readonly ALL_ADAPTERS_FAILED: "storage.all.adapters.failed";
|
|
590
|
+
readonly FILE_TOO_LARGE: "storage.file.too.large";
|
|
591
|
+
readonly FILE_TOO_SMALL: "storage.file.too.small";
|
|
592
|
+
readonly FILE_SIZE_INVALID: "storage.file.size.invalid";
|
|
593
|
+
readonly FILE_TYPE_NOT_ALLOWED: "storage.file.type.not.allowed";
|
|
594
|
+
readonly INVALID_MIME_TYPE: "storage.invalid.mime.type";
|
|
595
|
+
readonly INVALID_FILE_EXTENSION: "storage.invalid.file.extension";
|
|
596
|
+
readonly FILE_EXTENSION_INVALID: "storage.file.extension.invalid";
|
|
597
|
+
readonly FILE_EXTENSION_MISMATCH: "storage.file.extension.mismatch";
|
|
598
|
+
readonly EXECUTABLE_NOT_ALLOWED: "storage.executable.not.allowed";
|
|
599
|
+
readonly VALIDATION_FAILED: "storage.validation.failed";
|
|
600
|
+
readonly INVALID_FILE_CONTENT: "storage.invalid.file.content";
|
|
601
|
+
readonly SECURITY_VIRUS_DETECTED: "storage.security.virus.detected";
|
|
602
|
+
readonly SECURITY_SCAN_FAILED: "storage.security.scan.failed";
|
|
603
|
+
readonly SECURITY_ACCESS_DENIED: "storage.security.access.denied";
|
|
604
|
+
readonly SECURITY_ENCRYPTION_FAILED: "storage.security.encryption.failed";
|
|
605
|
+
readonly FILE_UPLOAD_FAILED: "storage.file.upload.failed";
|
|
606
|
+
readonly FILE_DOWNLOAD_FAILED: "storage.file.download.failed";
|
|
607
|
+
readonly FILE_DELETE_FAILED: "storage.file.delete.failed";
|
|
608
|
+
readonly STORAGE_FILE_UPDATE_FAILED: "storage.file.update.failed";
|
|
609
|
+
readonly FILE_NOT_FOUND: "storage.file.not.found";
|
|
610
|
+
readonly FILE_ALREADY_EXISTS: "storage.file.already.exists";
|
|
611
|
+
readonly FILE_MOVE_FAILED: "storage.file.move.failed";
|
|
612
|
+
readonly FILE_COPY_FAILED: "storage.file.copy.failed";
|
|
613
|
+
readonly FILE_READ_FAILED: "storage.file.read.failed";
|
|
614
|
+
readonly FILE_WRITE_FAILED: "storage.file.write.failed";
|
|
615
|
+
readonly FILE_CORRUPTED: "storage.file.corrupted";
|
|
616
|
+
readonly INVALID_OPERATION: "storage.invalid.operation";
|
|
617
|
+
readonly METADATA_EXTRACTION_FAILED: "storage.metadata.extraction.failed";
|
|
618
|
+
readonly METADATA_INVALID: "storage.metadata.invalid";
|
|
619
|
+
readonly METADATA_UPDATE_FAILED: "storage.metadata.update.failed";
|
|
620
|
+
readonly MEDIA_PROCESSING_FAILED: "storage.media.processing.failed";
|
|
621
|
+
readonly MEDIA_RESIZE_FAILED: "storage.media.resize.failed";
|
|
622
|
+
readonly MEDIA_FORMAT_UNSUPPORTED: "storage.media.format.unsupported";
|
|
623
|
+
readonly MEDIA_TRANSCODE_FAILED: "storage.media.transcode.failed";
|
|
624
|
+
readonly MEDIA_THUMBNAIL_FAILED: "storage.media.thumbnail.failed";
|
|
625
|
+
readonly MEDIA_INVALID_DIMENSIONS: "storage.media.invalid.dimensions";
|
|
626
|
+
readonly TEMPLATE_NOT_FOUND: "storage.template.not.found";
|
|
627
|
+
readonly TEMPLATE_RENDER_FAILED: "storage.template.render.failed";
|
|
628
|
+
readonly PDF_GENERATION_FAILED: "storage.pdf.generation.failed";
|
|
629
|
+
readonly PDF_RENDERING_TIMEOUT: "storage.pdf.rendering.timeout";
|
|
630
|
+
readonly QUEUE_FULL: "storage.queue.full";
|
|
631
|
+
readonly QUEUE_PROCESSING_FAILED: "storage.queue.processing.failed";
|
|
632
|
+
readonly QUEUE_ITEM_NOT_FOUND: "storage.queue.item.not.found";
|
|
633
|
+
readonly COMPLIANCE_VIOLATION: "storage.compliance.violation";
|
|
634
|
+
readonly COMPLIANCE_RETENTION_VIOLATION: "storage.compliance.retention.violation";
|
|
635
|
+
readonly COMPLIANCE_RETENTION_EXPIRED: "storage.compliance.retention.expired";
|
|
636
|
+
readonly COMPLIANCE_IMMUTABLE_FILE: "storage.compliance.immutable.file";
|
|
637
|
+
readonly COMPLIANCE_POLICY_NOT_FOUND: "storage.compliance.policy.not.found";
|
|
638
|
+
readonly COMPLIANCE_SOFT_DELETE_REQUIRED: "storage.compliance.soft.delete.required";
|
|
639
|
+
readonly COMPLIANCE_GRACE_PERIOD_ACTIVE: "storage.compliance.grace.period.active";
|
|
640
|
+
readonly COMPLIANCE_DEFERRED_DELETION: "storage.compliance.deferred.deletion";
|
|
641
|
+
readonly COMPLIANCE_PATTERN_PROTECTED: "storage.compliance.pattern.protected";
|
|
642
|
+
readonly SHARE_LINK_NOT_FOUND: "storage.share.link.not.found";
|
|
643
|
+
readonly SHARE_LINK_EXPIRED: "storage.share.link.expired";
|
|
644
|
+
readonly SHARE_LINK_MAX_DOWNLOADS: "storage.share.link.max.downloads";
|
|
645
|
+
readonly SHARE_LINK_INVALID_PASSWORD: "storage.share.link.invalid.password";
|
|
646
|
+
readonly PLUGIN_NOT_FOUND: "storage.plugin.not.found";
|
|
647
|
+
readonly PLUGIN_INITIALIZATION_FAILED: "storage.plugin.initialization.failed";
|
|
648
|
+
readonly PLUGIN_EXECUTION_FAILED: "storage.plugin.execution.failed";
|
|
649
|
+
readonly VIRUSTOTAL_BAD_REQUEST: "storage.virustotal.bad_request";
|
|
650
|
+
readonly VIRUSTOTAL_AUTHENTICATION_REQUIRED: "storage.virustotal.authentication_required";
|
|
651
|
+
readonly VIRUSTOTAL_WRONG_CREDENTIALS: "storage.virustotal.wrong_credentials";
|
|
652
|
+
readonly VIRUSTOTAL_FILE_TOO_LARGE: "storage.virustotal.file_too_large";
|
|
653
|
+
readonly VIRUSTOTAL_QUOTA_EXCEEDED: "storage.virustotal.quota_exceeded";
|
|
654
|
+
readonly VIRUSTOTAL_ANALYSIS_NOT_FOUND: "storage.virustotal.analysis_not_found";
|
|
655
|
+
readonly VIRUSTOTAL_SCAN_TIMEOUT: "storage.virustotal.scan_timeout";
|
|
656
|
+
readonly VIRUSTOTAL_SCAN_FAILED: "storage.virustotal.scan_failed";
|
|
657
|
+
readonly CLOUDFLARE_AUTHENTICATION_FAILED: "cloudflare.authentication.failed";
|
|
658
|
+
readonly CLOUDFLARE_ZONE_NOT_FOUND: "cloudflare.zone.not.found";
|
|
659
|
+
readonly CLOUDFLARE_PURGE_FAILED: "cloudflare.purge.failed";
|
|
660
|
+
readonly CLOUDFLARE_RATE_LIMIT_EXCEEDED: "cloudflare.rate.limit.exceeded";
|
|
661
|
+
readonly CLOUDFLARE_INVALID_URL: "cloudflare.invalid.url";
|
|
662
|
+
readonly CLOUDFLARE_API_ERROR: "cloudflare.api.error";
|
|
663
|
+
readonly CLOUDFRONT_AUTHENTICATION_FAILED: "cloudfront.authentication.failed";
|
|
664
|
+
readonly CLOUDFRONT_DISTRIBUTION_NOT_FOUND: "cloudfront.distribution.not.found";
|
|
665
|
+
readonly CLOUDFRONT_INVALIDATION_FAILED: "cloudfront.invalidation.failed";
|
|
666
|
+
readonly CLOUDFRONT_QUOTA_EXCEEDED: "cloudfront.quota.exceeded";
|
|
667
|
+
readonly CLOUDFRONT_INVALID_PATH: "cloudfront.invalid.path";
|
|
668
|
+
readonly CLOUDFRONT_API_ERROR: "cloudfront.api.error";
|
|
669
|
+
readonly FASTLY_AUTHENTICATION_FAILED: "fastly.authentication.failed";
|
|
670
|
+
readonly FASTLY_SERVICE_NOT_FOUND: "fastly.service.not.found";
|
|
671
|
+
readonly FASTLY_PURGE_FAILED: "fastly.purge.failed";
|
|
672
|
+
readonly FASTLY_RATE_LIMIT_EXCEEDED: "fastly.rate.limit.exceeded";
|
|
673
|
+
readonly FASTLY_INVALID_URL: "fastly.invalid.url";
|
|
674
|
+
readonly FASTLY_API_ERROR: "fastly.api.error";
|
|
675
|
+
readonly CDN_INVALIDATION_FAILED: "cdn.invalidation.failed";
|
|
676
|
+
readonly CDN_CONFIGURATION_INVALID: "cdn.configuration.invalid";
|
|
677
|
+
readonly CDN_PROVIDER_NOT_FOUND: "cdn.provider.not.found";
|
|
678
|
+
readonly PRESIGNED_URL_GENERATION_FAILED: "storage.presigned.url.generation.failed";
|
|
679
|
+
readonly PRESIGNED_URL_EXPIRED: "storage.presigned.url.expired";
|
|
680
|
+
readonly PRESIGNED_URL_INVALID: "storage.presigned.url.invalid";
|
|
681
|
+
readonly CHUNKED_UPLOAD_INIT_FAILED: "storage.chunked.upload.init.failed";
|
|
682
|
+
readonly CHUNKED_UPLOAD_PART_FAILED: "storage.chunked.upload.part.failed";
|
|
683
|
+
readonly CHUNKED_UPLOAD_COMPLETE_FAILED: "storage.chunked.upload.complete.failed";
|
|
684
|
+
readonly CHUNKED_UPLOAD_ABORT_FAILED: "storage.chunked.upload.abort.failed";
|
|
685
|
+
readonly CHUNKED_UPLOAD_NOT_FOUND: "storage.chunked.upload.not.found";
|
|
686
|
+
readonly CORS_CONFIGURATION_INVALID: "storage.cors.configuration.invalid";
|
|
687
|
+
readonly CORS_ORIGIN_NOT_ALLOWED: "storage.cors.origin.not.allowed";
|
|
688
|
+
readonly TTL_EXPIRED: "storage.ttl.expired";
|
|
689
|
+
readonly TTL_CLEANUP_FAILED: "storage.ttl.cleanup.failed";
|
|
690
|
+
readonly AUDIT_LOG_FAILED: "storage.audit.log.failed";
|
|
691
|
+
readonly WEBHOOK_SIGNATURE_INVALID: "storage.webhook.signature.invalid";
|
|
692
|
+
readonly WEBHOOK_PAYLOAD_INVALID: "storage.webhook.payload.invalid";
|
|
693
|
+
readonly WEBHOOK_PROCESSING_FAILED: "storage.webhook.processing.failed";
|
|
694
|
+
readonly WEBHOOK_TIMEOUT: "storage.webhook.timeout";
|
|
695
|
+
readonly WEBHOOK_ADAPTER_NOT_FOUND: "storage.webhook.adapter.not.found";
|
|
696
|
+
readonly WEBHOOK_DUPLICATE_DETECTED: "storage.webhook.duplicate.detected";
|
|
697
|
+
readonly WEBHOOK_IDEMPOTENCY_ERROR: "storage.webhook.idempotency.error";
|
|
698
|
+
readonly WEBHOOK_RATE_LIMIT_EXCEEDED: "storage.webhook.rate.limit.exceeded";
|
|
699
|
+
readonly TIMEOUT: "storage.timeout";
|
|
700
|
+
readonly NETWORK_ERROR: "storage.network.error";
|
|
701
|
+
readonly CONNECTION_LOST: "storage.connection.lost";
|
|
702
|
+
readonly PERMISSION_DENIED: "storage.permission.denied";
|
|
703
|
+
readonly QUOTA_EXCEEDED: "storage.quota.exceeded";
|
|
704
|
+
readonly INSUFFICIENT_SPACE: "storage.insufficient.space";
|
|
705
|
+
readonly FEATURE_NOT_IMPLEMENTED: "storage.feature.not.implemented";
|
|
706
|
+
};
|
|
412
707
|
/**
|
|
413
708
|
* PAYMENT-specific error codes
|
|
414
709
|
* Subset of ERROR_CODES for @plyaz/payments package
|
|
@@ -583,6 +878,7 @@ export declare const DATABASE_ERROR_CODES: {
|
|
|
583
878
|
};
|
|
584
879
|
export type ApiErrorCodeValue = (typeof API_ERROR_CODES)[keyof typeof API_ERROR_CODES] | `HTTP_${number}`;
|
|
585
880
|
export type NotificationErrorCodeValue = (typeof NOTIFICATION_ERROR_CODES)[keyof typeof NOTIFICATION_ERROR_CODES];
|
|
881
|
+
export type StorageErrorCode = (typeof STORAGE_ERROR_CODES)[keyof typeof STORAGE_ERROR_CODES];
|
|
586
882
|
export type DatabaseErrorCodeValue = (typeof DATABASE_ERROR_CODES)[keyof typeof DATABASE_ERROR_CODES];
|
|
587
883
|
export type PaymentErrorCodeValue = (typeof PAYMENT_ERROR_CODES)[keyof typeof PAYMENT_ERROR_CODES];
|
|
588
884
|
/**
|
package/dist/errors/enums.d.ts
CHANGED
|
@@ -121,6 +121,12 @@ export declare const ERROR_CATEGORY: {
|
|
|
121
121
|
readonly Refund: "refund";
|
|
122
122
|
/** Security-related error (e.g., encryption or signature failure). */
|
|
123
123
|
readonly Security: "security";
|
|
124
|
+
/** File operation error (e.g., upload, download, delete failure). */
|
|
125
|
+
readonly FileOperation: "file.operation";
|
|
126
|
+
/** Plugin-related error (e.g., plugin initialization or execution failure). */
|
|
127
|
+
readonly Plugin: "plugin";
|
|
128
|
+
/** Quota or storage limit error (e.g., exceeded storage quota). */
|
|
129
|
+
readonly Quota: "quota";
|
|
124
130
|
/** Unknown or unclassified error. */
|
|
125
131
|
readonly Unknown: "unknown";
|
|
126
132
|
};
|
|
@@ -210,6 +216,9 @@ export declare const ERROR_CATEGORY_TO_EMITTER_KEY: {
|
|
|
210
216
|
readonly system: "system";
|
|
211
217
|
readonly refund: "refund";
|
|
212
218
|
readonly security: "security";
|
|
219
|
+
readonly "file.operation": "fileOperation";
|
|
220
|
+
readonly plugin: "plugin";
|
|
221
|
+
readonly quota: "quota";
|
|
213
222
|
readonly unknown: "unknown";
|
|
214
223
|
};
|
|
215
224
|
/**
|
|
@@ -328,6 +337,7 @@ export declare const ERROR_EXCEPTIONS_NAMESPACES: {
|
|
|
328
337
|
API: string;
|
|
329
338
|
AUTH: string;
|
|
330
339
|
NOTIFICATIONS: string;
|
|
340
|
+
STORAGE: string;
|
|
331
341
|
DB: string;
|
|
332
342
|
VALIDATION: string;
|
|
333
343
|
GENERIC: string;
|