@plyaz/api 1.0.1 → 1.1.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 +632 -542
- package/dist/api/cache/index.d.ts +183 -0
- package/dist/api/cache/index.d.ts.map +1 -0
- package/dist/api/cache/patterns.d.ts +174 -0
- package/dist/api/cache/patterns.d.ts.map +1 -0
- package/dist/api/cache/strategies.d.ts +47 -0
- package/dist/api/cache/strategies.d.ts.map +1 -0
- package/dist/api/client/clientEventManager.d.ts +238 -0
- package/dist/api/client/clientEventManager.d.ts.map +1 -0
- package/dist/api/client/createApiClient.d.ts +5 -0
- package/dist/api/client/createApiClient.d.ts.map +1 -0
- package/dist/api/client/helpers/headers.d.ts +11 -0
- package/dist/api/client/helpers/headers.d.ts.map +1 -0
- package/dist/api/client/helpers/index.d.ts +9 -0
- package/dist/api/client/helpers/index.d.ts.map +1 -0
- package/dist/api/client/helpers/interceptors.d.ts +29 -0
- package/dist/api/client/helpers/interceptors.d.ts.map +1 -0
- package/dist/api/client/helpers/network.d.ts +21 -0
- package/dist/api/client/helpers/network.d.ts.map +1 -0
- package/dist/api/client/helpers/strategies.d.ts +30 -0
- package/dist/api/client/helpers/strategies.d.ts.map +1 -0
- package/dist/api/client/helpers/tracking.d.ts +15 -0
- package/dist/api/client/helpers/tracking.d.ts.map +1 -0
- package/dist/api/client/index.d.ts +7 -0
- package/dist/api/client/index.d.ts.map +1 -0
- package/dist/api/config/adapter.d.ts +25 -0
- package/dist/api/config/adapter.d.ts.map +1 -0
- package/dist/api/config/configBuilder.d.ts +62 -0
- package/dist/api/config/configBuilder.d.ts.map +1 -0
- package/dist/api/config/configManager.d.ts +67 -0
- package/dist/api/config/configManager.d.ts.map +1 -0
- package/dist/api/config/global.d.ts +106 -0
- package/dist/api/config/global.d.ts.map +1 -0
- package/dist/api/config/index.d.ts +11 -0
- package/dist/api/config/index.d.ts.map +1 -0
- package/dist/api/debugger/DebugReport.d.ts +71 -0
- package/dist/api/debugger/DebugReport.d.ts.map +1 -0
- package/dist/api/debugger/UnifiedDebugger.d.ts +444 -0
- package/dist/api/debugger/UnifiedDebugger.d.ts.map +1 -0
- package/dist/api/debugger/factories/conflict.d.ts +58 -0
- package/dist/api/debugger/factories/conflict.d.ts.map +1 -0
- package/dist/api/debugger/factories/eventTracking.d.ts +126 -0
- package/dist/api/debugger/factories/eventTracking.d.ts.map +1 -0
- package/dist/api/debugger/factories/history.d.ts +97 -0
- package/dist/api/debugger/factories/history.d.ts.map +1 -0
- package/dist/api/debugger/factories/index.d.ts +15 -0
- package/dist/api/debugger/factories/index.d.ts.map +1 -0
- package/dist/api/debugger/factories/issueAnalysis.d.ts +52 -0
- package/dist/api/debugger/factories/issueAnalysis.d.ts.map +1 -0
- package/dist/api/debugger/factories/performance.d.ts +53 -0
- package/dist/api/debugger/factories/performance.d.ts.map +1 -0
- package/dist/api/debugger/factories/report.d.ts +43 -0
- package/dist/api/debugger/factories/report.d.ts.map +1 -0
- package/dist/api/debugger/index.d.ts +99 -0
- package/dist/api/debugger/index.d.ts.map +1 -0
- package/dist/api/debugger/queue/DebuggerQueueManager.d.ts +61 -0
- package/dist/api/debugger/queue/DebuggerQueueManager.d.ts.map +1 -0
- package/dist/api/debugger/queue/OperationTracker.d.ts +86 -0
- package/dist/api/debugger/queue/OperationTracker.d.ts.map +1 -0
- package/dist/api/debugger/queue/index.d.ts +9 -0
- package/dist/api/debugger/queue/index.d.ts.map +1 -0
- package/dist/api/endpoints/builders.d.ts +109 -0
- package/dist/api/endpoints/builders.d.ts.map +1 -0
- package/dist/api/endpoints/campaigns.d.ts +43 -0
- package/dist/api/endpoints/campaigns.d.ts.map +1 -0
- package/dist/api/endpoints/index.d.ts +100 -0
- package/dist/api/endpoints/index.d.ts.map +1 -0
- package/dist/api/endpoints/polling.d.ts +83 -0
- package/dist/api/endpoints/polling.d.ts.map +1 -0
- package/dist/api/endpoints/utils.d.ts +128 -0
- package/dist/api/endpoints/utils.d.ts.map +1 -0
- package/dist/api/errors/ApiPackageError.d.ts +101 -0
- package/dist/api/errors/ApiPackageError.d.ts.map +1 -0
- package/dist/api/errors/definitions.d.ts +24 -0
- package/dist/api/errors/definitions.d.ts.map +1 -0
- package/dist/api/errors/error-codes.d.ts +116 -0
- package/dist/api/errors/error-codes.d.ts.map +1 -0
- package/dist/api/errors/error-events.d.ts +63 -0
- package/dist/api/errors/error-events.d.ts.map +1 -0
- package/dist/api/errors/index.d.ts +18 -0
- package/dist/api/errors/index.d.ts.map +1 -0
- package/dist/api/errors/types-constants.d.ts +64 -0
- package/dist/api/errors/types-constants.d.ts.map +1 -0
- package/dist/api/events/EventManager.d.ts +230 -0
- package/dist/api/events/EventManager.d.ts.map +1 -0
- package/dist/api/events/factories/base.d.ts +269 -0
- package/dist/api/events/factories/base.d.ts.map +1 -0
- package/dist/api/events/factories/cache.d.ts +31 -0
- package/dist/api/events/factories/cache.d.ts.map +1 -0
- package/dist/api/events/factories/client.d.ts +43 -0
- package/dist/api/events/factories/client.d.ts.map +1 -0
- package/dist/api/events/factories/config.d.ts +34 -0
- package/dist/api/events/factories/config.d.ts.map +1 -0
- package/dist/api/events/factories/debug.d.ts +74 -0
- package/dist/api/events/factories/debug.d.ts.map +1 -0
- package/dist/api/events/factories/errors.d.ts +91 -0
- package/dist/api/events/factories/errors.d.ts.map +1 -0
- package/dist/api/events/factories/headers.d.ts +54 -0
- package/dist/api/events/factories/headers.d.ts.map +1 -0
- package/dist/api/events/factories/index.d.ts +46 -0
- package/dist/api/events/factories/index.d.ts.map +1 -0
- package/dist/api/events/factories/network.d.ts +54 -0
- package/dist/api/events/factories/network.d.ts.map +1 -0
- package/dist/api/events/factories/performance.d.ts +43 -0
- package/dist/api/events/factories/performance.d.ts.map +1 -0
- package/dist/api/events/index.d.ts +34 -0
- package/dist/api/events/index.d.ts.map +1 -0
- package/dist/api/events/namespaces.d.ts +464 -0
- package/dist/api/events/namespaces.d.ts.map +1 -0
- package/dist/api/events/queue/ConfigUpdateQueueManager.d.ts +53 -0
- package/dist/api/events/queue/ConfigUpdateQueueManager.d.ts.map +1 -0
- package/dist/api/events/queue/EventQueueManager.d.ts +69 -0
- package/dist/api/events/queue/EventQueueManager.d.ts.map +1 -0
- package/dist/api/events/queue/index.d.ts +12 -0
- package/dist/api/events/queue/index.d.ts.map +1 -0
- package/dist/api/events/shared-emitter.d.ts +14 -0
- package/dist/api/events/shared-emitter.d.ts.map +1 -0
- package/dist/api/headers/cache.d.ts +17 -0
- package/dist/api/headers/cache.d.ts.map +1 -0
- package/dist/api/headers/enriched.d.ts +18 -0
- package/dist/api/headers/enriched.d.ts.map +1 -0
- package/dist/api/headers/events.d.ts +17 -0
- package/dist/api/headers/events.d.ts.map +1 -0
- package/dist/api/headers/extract.d.ts +73 -0
- package/dist/api/headers/extract.d.ts.map +1 -0
- package/dist/api/headers/headerBuilder.d.ts +308 -0
- package/dist/api/headers/headerBuilder.d.ts.map +1 -0
- package/dist/api/headers/index.d.ts +37 -0
- package/dist/api/headers/index.d.ts.map +1 -0
- package/dist/api/headers/merge.d.ts +32 -0
- package/dist/api/headers/merge.d.ts.map +1 -0
- package/dist/api/headers/presets.d.ts +24 -0
- package/dist/api/headers/presets.d.ts.map +1 -0
- package/dist/api/headers/utils.d.ts +38 -0
- package/dist/api/headers/utils.d.ts.map +1 -0
- package/dist/api/hooks/factories/createApiMutation.d.ts +57 -0
- package/dist/api/hooks/factories/createApiMutation.d.ts.map +1 -0
- package/dist/api/hooks/factories/createApiQuery.d.ts +55 -0
- package/dist/api/hooks/factories/createApiQuery.d.ts.map +1 -0
- package/dist/api/hooks/factories/defaults.d.ts +15 -0
- package/dist/api/hooks/factories/defaults.d.ts.map +1 -0
- package/dist/api/hooks/factories/index.d.ts +8 -0
- package/dist/api/hooks/factories/index.d.ts.map +1 -0
- package/dist/api/hooks/index.d.ts +11 -0
- package/dist/api/hooks/index.d.ts.map +1 -0
- package/dist/api/hooks/types.d.ts +82 -0
- package/dist/api/hooks/types.d.ts.map +1 -0
- package/dist/api/hooks/useApiConfigConflicts.d.ts +24 -0
- package/dist/api/hooks/useApiConfigConflicts.d.ts.map +1 -0
- package/dist/api/hooks/useApiDebugInfo.d.ts +24 -0
- package/dist/api/hooks/useApiDebugInfo.d.ts.map +1 -0
- package/dist/api/hooks/useApiMonitor.d.ts +25 -0
- package/dist/api/hooks/useApiMonitor.d.ts.map +1 -0
- package/dist/api/hooks/useApiNetworkQuality.d.ts +21 -0
- package/dist/api/hooks/useApiNetworkQuality.d.ts.map +1 -0
- package/dist/api/index.d.ts +26 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/network/adaptive.d.ts +56 -0
- package/dist/api/network/adaptive.d.ts.map +1 -0
- package/dist/api/network/client-hints.d.ts +25 -0
- package/dist/api/network/client-hints.d.ts.map +1 -0
- package/dist/api/network/connection.d.ts +60 -0
- package/dist/api/network/connection.d.ts.map +1 -0
- package/dist/api/network/core.d.ts +26 -0
- package/dist/api/network/core.d.ts.map +1 -0
- package/dist/api/network/events.d.ts +18 -0
- package/dist/api/network/events.d.ts.map +1 -0
- package/dist/api/network/frameworks/express.d.ts +110 -0
- package/dist/api/network/frameworks/express.d.ts.map +1 -0
- package/dist/api/network/frameworks/index.d.ts +13 -0
- package/dist/api/network/frameworks/index.d.ts.map +1 -0
- package/dist/api/network/frameworks/nestjs/clientHintsInterceptor.d.ts +29 -0
- package/dist/api/network/frameworks/nestjs/clientHintsInterceptor.d.ts.map +1 -0
- package/dist/api/network/frameworks/nestjs/decorators.d.ts +48 -0
- package/dist/api/network/frameworks/nestjs/decorators.d.ts.map +1 -0
- package/dist/api/network/frameworks/nestjs/enrichedHeadersGuard.d.ts +80 -0
- package/dist/api/network/frameworks/nestjs/enrichedHeadersGuard.d.ts.map +1 -0
- package/dist/api/network/frameworks/nestjs/enrichedHeadersInterceptor.d.ts +83 -0
- package/dist/api/network/frameworks/nestjs/enrichedHeadersInterceptor.d.ts.map +1 -0
- package/dist/api/network/frameworks/nestjs/index.d.ts +13 -0
- package/dist/api/network/frameworks/nestjs/index.d.ts.map +1 -0
- package/dist/api/network/frameworks/nestjs/minimumConnectionGuard.d.ts +27 -0
- package/dist/api/network/frameworks/nestjs/minimumConnectionGuard.d.ts.map +1 -0
- package/dist/api/network/frameworks/nestjs/networkDetectionMiddleware.d.ts +31 -0
- package/dist/api/network/frameworks/nestjs/networkDetectionMiddleware.d.ts.map +1 -0
- package/dist/api/network/frameworks/nestjs/networkGuard.d.ts +33 -0
- package/dist/api/network/frameworks/nestjs/networkGuard.d.ts.map +1 -0
- package/dist/api/network/frameworks/nestjs/noDataSaverGuard.d.ts +25 -0
- package/dist/api/network/frameworks/nestjs/noDataSaverGuard.d.ts.map +1 -0
- package/dist/api/network/frameworks/nextjs.d.ts +86 -0
- package/dist/api/network/frameworks/nextjs.d.ts.map +1 -0
- package/dist/api/network/frameworks/shared.d.ts +45 -0
- package/dist/api/network/frameworks/shared.d.ts.map +1 -0
- package/dist/api/network/headers.d.ts +112 -0
- package/dist/api/network/headers.d.ts.map +1 -0
- package/dist/api/network/index.d.ts +17 -0
- package/dist/api/network/index.d.ts.map +1 -0
- package/dist/api/network/networkConfigurationManager.d.ts +225 -0
- package/dist/api/network/networkConfigurationManager.d.ts.map +1 -0
- package/dist/api/network/platform.d.ts +171 -0
- package/dist/api/network/platform.d.ts.map +1 -0
- package/dist/api/network/presets.d.ts +55 -0
- package/dist/api/network/presets.d.ts.map +1 -0
- package/dist/api/network/quality.d.ts +28 -0
- package/dist/api/network/quality.d.ts.map +1 -0
- package/dist/api/network/status.d.ts +74 -0
- package/dist/api/network/status.d.ts.map +1 -0
- package/dist/api/performance/adaptive.d.ts +35 -0
- package/dist/api/performance/adaptive.d.ts.map +1 -0
- package/dist/api/performance/index.d.ts +133 -0
- package/dist/api/performance/index.d.ts.map +1 -0
- package/dist/api/performance/patterns.d.ts +20 -0
- package/dist/api/performance/patterns.d.ts.map +1 -0
- package/dist/api/performance/performanceMonitor.d.ts +85 -0
- package/dist/api/performance/performanceMonitor.d.ts.map +1 -0
- package/dist/api/performance/presets.d.ts +18 -0
- package/dist/api/performance/presets.d.ts.map +1 -0
- package/dist/api/performance/utils.d.ts +98 -0
- package/dist/api/performance/utils.d.ts.map +1 -0
- package/dist/api/polling/index.d.ts +10 -0
- package/dist/api/polling/index.d.ts.map +1 -0
- package/dist/api/polling/strategies.d.ts +128 -0
- package/dist/api/polling/strategies.d.ts.map +1 -0
- package/dist/api/polling/utils.d.ts +133 -0
- package/dist/api/polling/utils.d.ts.map +1 -0
- package/dist/api/pubsub/index.d.ts +147 -0
- package/dist/api/pubsub/index.d.ts.map +1 -0
- package/dist/api/pubsub/react.d.ts +214 -0
- package/dist/api/pubsub/react.d.ts.map +1 -0
- package/dist/api/queue/BaseOperationTracker.d.ts +86 -0
- package/dist/api/queue/BaseOperationTracker.d.ts.map +1 -0
- package/dist/api/queue/BaseQueueManager.d.ts +54 -0
- package/dist/api/queue/BaseQueueManager.d.ts.map +1 -0
- package/dist/api/queue/BatchProcessor.d.ts +42 -0
- package/dist/api/queue/BatchProcessor.d.ts.map +1 -0
- package/dist/api/queue/EventQueueManager.d.ts +128 -0
- package/dist/api/queue/EventQueueManager.d.ts.map +1 -0
- package/dist/api/queue/PriorityQueue.d.ts +58 -0
- package/dist/api/queue/PriorityQueue.d.ts.map +1 -0
- package/dist/api/queue/QueueFactory.d.ts +57 -0
- package/dist/api/queue/QueueFactory.d.ts.map +1 -0
- package/dist/api/queue/QueueOrchestrator.d.ts +90 -0
- package/dist/api/queue/QueueOrchestrator.d.ts.map +1 -0
- package/dist/api/queue/QueueSystem.d.ts +102 -0
- package/dist/api/queue/QueueSystem.d.ts.map +1 -0
- package/dist/api/queue/index.d.ts +22 -0
- package/dist/api/queue/index.d.ts.map +1 -0
- package/dist/api/regional/constants.d.ts +76 -0
- package/dist/api/regional/constants.d.ts.map +1 -0
- package/dist/api/regional/core.d.ts +56 -0
- package/dist/api/regional/core.d.ts.map +1 -0
- package/dist/api/regional/helpers.d.ts +49 -0
- package/dist/api/regional/helpers.d.ts.map +1 -0
- package/dist/api/regional/index.d.ts +10 -0
- package/dist/api/regional/index.d.ts.map +1 -0
- package/dist/api/regional/presets.d.ts +16 -0
- package/dist/api/regional/presets.d.ts.map +1 -0
- package/dist/api/request/index.d.ts +18 -0
- package/dist/api/request/index.d.ts.map +1 -0
- package/dist/api/request/management.d.ts +46 -0
- package/dist/api/request/management.d.ts.map +1 -0
- package/dist/api/request/prepare.d.ts +34 -0
- package/dist/api/request/prepare.d.ts.map +1 -0
- package/dist/api/request/react.d.ts +98 -0
- package/dist/api/request/react.d.ts.map +1 -0
- package/dist/api/request/routing.d.ts +74 -0
- package/dist/api/request/routing.d.ts.map +1 -0
- package/dist/api/request/tracker.d.ts +76 -0
- package/dist/api/request/tracker.d.ts.map +1 -0
- package/dist/api/request/utils.d.ts +129 -0
- package/dist/api/request/utils.d.ts.map +1 -0
- package/dist/api/retry/conditions.d.ts +140 -0
- package/dist/api/retry/conditions.d.ts.map +1 -0
- package/dist/api/retry/index.d.ts +10 -0
- package/dist/api/retry/index.d.ts.map +1 -0
- package/dist/api/retry/strategies.d.ts +56 -0
- package/dist/api/retry/strategies.d.ts.map +1 -0
- package/dist/api/revalidation/index.d.ts +29 -0
- package/dist/api/revalidation/index.d.ts.map +1 -0
- package/dist/api/revalidation/presets.d.ts +71 -0
- package/dist/api/revalidation/presets.d.ts.map +1 -0
- package/dist/api/revalidation/strategies.d.ts +116 -0
- package/dist/api/revalidation/strategies.d.ts.map +1 -0
- package/dist/api/revalidation/utils.d.ts +78 -0
- package/dist/api/revalidation/utils.d.ts.map +1 -0
- package/dist/api/services/campaigns/DELETE/deleteCampaign.d.ts +30 -0
- package/dist/api/services/campaigns/DELETE/deleteCampaign.d.ts.map +1 -0
- package/dist/api/services/campaigns/DELETE/index.d.ts +7 -0
- package/dist/api/services/campaigns/DELETE/index.d.ts.map +1 -0
- package/dist/api/services/campaigns/DELETE/useDeleteCampaign.d.ts +24 -0
- package/dist/api/services/campaigns/DELETE/useDeleteCampaign.d.ts.map +1 -0
- package/dist/api/services/campaigns/GET/fetchCampaign.d.ts +36 -0
- package/dist/api/services/campaigns/GET/fetchCampaign.d.ts.map +1 -0
- package/dist/api/services/campaigns/GET/fetchCampaignParticipants.d.ts +40 -0
- package/dist/api/services/campaigns/GET/fetchCampaignParticipants.d.ts.map +1 -0
- package/dist/api/services/campaigns/GET/fetchCampaignStats.d.ts +31 -0
- package/dist/api/services/campaigns/GET/fetchCampaignStats.d.ts.map +1 -0
- package/dist/api/services/campaigns/GET/fetchCampaigns.d.ts +39 -0
- package/dist/api/services/campaigns/GET/fetchCampaigns.d.ts.map +1 -0
- package/dist/api/services/campaigns/GET/index.d.ts +13 -0
- package/dist/api/services/campaigns/GET/index.d.ts.map +1 -0
- package/dist/api/services/campaigns/GET/useCampaign.d.ts +47 -0
- package/dist/api/services/campaigns/GET/useCampaign.d.ts.map +1 -0
- package/dist/api/services/campaigns/GET/useCampaignParticipants.d.ts +43 -0
- package/dist/api/services/campaigns/GET/useCampaignParticipants.d.ts.map +1 -0
- package/dist/api/services/campaigns/GET/useCampaignStats.d.ts +33 -0
- package/dist/api/services/campaigns/GET/useCampaignStats.d.ts.map +1 -0
- package/dist/api/services/campaigns/GET/useCampaigns.d.ts +43 -0
- package/dist/api/services/campaigns/GET/useCampaigns.d.ts.map +1 -0
- package/dist/api/services/campaigns/POST/createCampaign.d.ts +37 -0
- package/dist/api/services/campaigns/POST/createCampaign.d.ts.map +1 -0
- package/dist/api/services/campaigns/POST/index.d.ts +11 -0
- package/dist/api/services/campaigns/POST/index.d.ts.map +1 -0
- package/dist/api/services/campaigns/POST/joinCampaign.d.ts +31 -0
- package/dist/api/services/campaigns/POST/joinCampaign.d.ts.map +1 -0
- package/dist/api/services/campaigns/POST/leaveCampaign.d.ts +31 -0
- package/dist/api/services/campaigns/POST/leaveCampaign.d.ts.map +1 -0
- package/dist/api/services/campaigns/POST/useCreateCampaign.d.ts +36 -0
- package/dist/api/services/campaigns/POST/useCreateCampaign.d.ts.map +1 -0
- package/dist/api/services/campaigns/POST/useJoinCampaign.d.ts +23 -0
- package/dist/api/services/campaigns/POST/useJoinCampaign.d.ts.map +1 -0
- package/dist/api/services/campaigns/POST/useLeaveCampaign.d.ts +23 -0
- package/dist/api/services/campaigns/POST/useLeaveCampaign.d.ts.map +1 -0
- package/dist/api/services/campaigns/PUT/index.d.ts +7 -0
- package/dist/api/services/campaigns/PUT/index.d.ts.map +1 -0
- package/dist/api/services/campaigns/PUT/updateCampaign.d.ts +37 -0
- package/dist/api/services/campaigns/PUT/updateCampaign.d.ts.map +1 -0
- package/dist/api/services/campaigns/PUT/useUpdateCampaign.d.ts +38 -0
- package/dist/api/services/campaigns/PUT/useUpdateCampaign.d.ts.map +1 -0
- package/dist/api/services/campaigns/index.d.ts +9 -0
- package/dist/api/services/campaigns/index.d.ts.map +1 -0
- package/dist/api/services/clients.d.ts +58 -0
- package/dist/api/services/clients.d.ts.map +1 -0
- package/dist/api/services/index.d.ts +8 -0
- package/dist/api/services/index.d.ts.map +1 -0
- package/dist/api/services/types.d.ts +65 -0
- package/dist/api/services/types.d.ts.map +1 -0
- package/dist/api/strategies/index.d.ts +8 -0
- package/dist/api/strategies/index.d.ts.map +1 -0
- package/dist/api/strategies/tracked.d.ts +15 -0
- package/dist/api/strategies/tracked.d.ts.map +1 -0
- package/dist/api/strategies/unified.d.ts +87 -0
- package/dist/api/strategies/unified.d.ts.map +1 -0
- package/dist/api/utils/async-control.d.ts +96 -0
- package/dist/api/utils/async-control.d.ts.map +1 -0
- package/dist/api/utils/colors.d.ts +88 -0
- package/dist/api/utils/colors.d.ts.map +1 -0
- package/dist/api/utils/environment.d.ts +595 -0
- package/dist/api/utils/environment.d.ts.map +1 -0
- package/dist/api/utils/generation/correlation-id.d.ts +206 -0
- package/dist/api/utils/generation/correlation-id.d.ts.map +1 -0
- package/dist/api/utils/generation/id-generator.d.ts +133 -0
- package/dist/api/utils/generation/id-generator.d.ts.map +1 -0
- package/dist/api/utils/generation/request-id.d.ts +106 -0
- package/dist/api/utils/generation/request-id.d.ts.map +1 -0
- package/dist/api/utils/index.d.ts +19 -0
- package/dist/api/utils/index.d.ts.map +1 -0
- package/dist/api/utils/interval-manager.d.ts +94 -0
- package/dist/api/utils/interval-manager.d.ts.map +1 -0
- package/dist/api/utils/json.d.ts +98 -0
- package/dist/api/utils/json.d.ts.map +1 -0
- package/dist/api/utils/math.d.ts +168 -0
- package/dist/api/utils/math.d.ts.map +1 -0
- package/dist/api/utils/object-merge.d.ts +34 -0
- package/dist/api/utils/object-merge.d.ts.map +1 -0
- package/dist/api/utils/object.d.ts +101 -0
- package/dist/api/utils/object.d.ts.map +1 -0
- package/dist/api/utils/string.d.ts +41 -0
- package/dist/api/utils/string.d.ts.map +1 -0
- package/dist/api/utils/time.d.ts +233 -0
- package/dist/api/utils/time.d.ts.map +1 -0
- package/dist/api/utils/type-guards.d.ts +59 -0
- package/dist/api/utils/type-guards.d.ts.map +1 -0
- package/dist/api/utils/validation.d.ts +21 -0
- package/dist/api/utils/validation.d.ts.map +1 -0
- package/dist/index.cjs +25594 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +25068 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +18 -7
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Queue System Module
|
|
3
|
+
*
|
|
4
|
+
* A high-performance, reusable queue system for managing async operations
|
|
5
|
+
* with support for priority queuing, batch processing, and backpressure.
|
|
6
|
+
*
|
|
7
|
+
* Features:
|
|
8
|
+
* - Generic queue implementation for any operation type
|
|
9
|
+
* - Priority queue support
|
|
10
|
+
* - Batch processing for better performance
|
|
11
|
+
* - Backpressure handling to prevent memory issues
|
|
12
|
+
* - Configurable processing strategies
|
|
13
|
+
* - Built-in performance optimization
|
|
14
|
+
*/
|
|
15
|
+
export { QueueSystem } from './QueueSystem';
|
|
16
|
+
export { PriorityQueue } from './PriorityQueue';
|
|
17
|
+
export { BatchProcessor } from './BatchProcessor';
|
|
18
|
+
export { QueueFactory } from './QueueFactory';
|
|
19
|
+
export { QueueOrchestrator } from './QueueOrchestrator';
|
|
20
|
+
export { BaseOperationTracker, createDefaultPriorityDetector, createDefaultSourceDetector, } from './BaseOperationTracker';
|
|
21
|
+
export { EventQueueManager, ConfigPriorityMapper, getDefaultEventQueue, getConfigEventQueue, getNetworkEventQueue, getDefaultEventQueue as defaultEventQueue, getConfigEventQueue as configEventQueue, getNetworkEventQueue as networkEventQueue, } from './EventQueueManager';
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/queue/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EACL,oBAAoB,EACpB,6BAA6B,EAC7B,2BAA2B,GAC5B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EAEpB,oBAAoB,IAAI,iBAAiB,EACzC,mBAAmB,IAAI,gBAAgB,EACvC,oBAAoB,IAAI,iBAAiB,GAC1C,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Regional detection constants
|
|
3
|
+
*/
|
|
4
|
+
export declare const REGION_STORAGE_KEY = "@plyaz/api:userRegion";
|
|
5
|
+
/**
|
|
6
|
+
* Confidence levels for region detection
|
|
7
|
+
*/
|
|
8
|
+
export declare const REGIONAL_CONFIDENCE_LEVELS: {
|
|
9
|
+
readonly CDN_HEADER: 0.95;
|
|
10
|
+
readonly TIMEZONE_DIRECT: 0.9;
|
|
11
|
+
readonly TIMEZONE_PREFIX: 0.8;
|
|
12
|
+
readonly HIGH: 0.8;
|
|
13
|
+
readonly LOCALE_DIRECT: 0.7;
|
|
14
|
+
readonly MEDIUM: 0.7;
|
|
15
|
+
readonly GEOLOCATION: 0.6;
|
|
16
|
+
readonly LOCALE_LANGUAGE: 0.5;
|
|
17
|
+
readonly LOW: 0.5;
|
|
18
|
+
readonly GLOBAL_FALLBACK: 0.3;
|
|
19
|
+
readonly UNKNOWN_FALLBACK: 0.2;
|
|
20
|
+
readonly FINAL_FALLBACK: 0.1;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Geographic coordinates for region detection
|
|
24
|
+
*/
|
|
25
|
+
export declare const COORDINATES: {
|
|
26
|
+
readonly EU: {
|
|
27
|
+
readonly MIN_LAT: 35;
|
|
28
|
+
readonly MAX_LAT: 70;
|
|
29
|
+
readonly MIN_LON: -10;
|
|
30
|
+
readonly MAX_LON: 40;
|
|
31
|
+
};
|
|
32
|
+
readonly US: {
|
|
33
|
+
readonly MIN_LAT: 25;
|
|
34
|
+
readonly MAX_LAT: 50;
|
|
35
|
+
readonly MIN_LON: -125;
|
|
36
|
+
readonly MAX_LON: -65;
|
|
37
|
+
};
|
|
38
|
+
readonly US_WEST: {
|
|
39
|
+
readonly MIN_LAT: 32;
|
|
40
|
+
readonly MAX_LAT: 42;
|
|
41
|
+
readonly MIN_LON: -125;
|
|
42
|
+
readonly MAX_LON: -114;
|
|
43
|
+
};
|
|
44
|
+
readonly US_EAST: {
|
|
45
|
+
readonly MIN_LAT: 38;
|
|
46
|
+
readonly MAX_LAT: 45;
|
|
47
|
+
readonly MIN_LON: -80;
|
|
48
|
+
readonly MAX_LON: -70;
|
|
49
|
+
};
|
|
50
|
+
readonly ASIA: {
|
|
51
|
+
readonly MIN_LAT: 18;
|
|
52
|
+
readonly MAX_LAT: 54;
|
|
53
|
+
readonly MIN_LON: 73;
|
|
54
|
+
readonly MAX_LON: 135;
|
|
55
|
+
};
|
|
56
|
+
readonly JAPAN: {
|
|
57
|
+
readonly MIN_LAT: 30;
|
|
58
|
+
readonly MAX_LAT: 46;
|
|
59
|
+
readonly MIN_LON: 129;
|
|
60
|
+
readonly MAX_LON: 146;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
export declare const CACHE_DURATION_MS: number;
|
|
64
|
+
/**
|
|
65
|
+
* Map regions to presets
|
|
66
|
+
*/
|
|
67
|
+
export declare const REGION_TO_PRESET: {
|
|
68
|
+
readonly eu: "gdpr";
|
|
69
|
+
readonly us: "ccpa";
|
|
70
|
+
readonly 'us-ca': "ccpa";
|
|
71
|
+
readonly cn: "pipl";
|
|
72
|
+
readonly jp: "appi";
|
|
73
|
+
readonly ca: "global";
|
|
74
|
+
readonly global: "global";
|
|
75
|
+
};
|
|
76
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/api/regional/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,eAAO,MAAM,kBAAkB,0BAA0B,CAAC;AAE1D;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;CAa7B,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqCd,CAAC;AAWX,eAAO,MAAM,iBAAiB,QACyC,CAAC;AAExE;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;CAQnB,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Regional Detection and Compliance System
|
|
3
|
+
* Automatically detect user region for compliance with data protection laws
|
|
4
|
+
*/
|
|
5
|
+
import type { RegionInfo, RegionalCompliance, RegionDetectionOptions, RegionalCacheConfig } from '@plyaz/types/api';
|
|
6
|
+
import { type RegionalPresetName } from './presets';
|
|
7
|
+
/**
|
|
8
|
+
* Clear regional cache
|
|
9
|
+
* @param cacheConfig - Optional advanced cache configuration
|
|
10
|
+
*/
|
|
11
|
+
export declare function clearRegionalCache(cacheConfig?: RegionalCacheConfig): void;
|
|
12
|
+
/**
|
|
13
|
+
* Get fallback region info
|
|
14
|
+
*/
|
|
15
|
+
export declare function getFallbackRegion(): RegionInfo;
|
|
16
|
+
/**
|
|
17
|
+
* Detect user region with multiple fallback methods
|
|
18
|
+
*/
|
|
19
|
+
export declare function detectUserRegion(options?: RegionDetectionOptions): Promise<RegionInfo>;
|
|
20
|
+
/**
|
|
21
|
+
* Get regional preset by name
|
|
22
|
+
*/
|
|
23
|
+
export declare function getRegionalPreset(name: RegionalPresetName): RegionalCompliance;
|
|
24
|
+
/**
|
|
25
|
+
* Check if preset exists
|
|
26
|
+
*/
|
|
27
|
+
export declare function hasRegionalPreset(name: string): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Get all preset names
|
|
30
|
+
*/
|
|
31
|
+
export declare function getRegionalPresetNames(): RegionalPresetName[];
|
|
32
|
+
/**
|
|
33
|
+
* Get preset for detected region
|
|
34
|
+
*/
|
|
35
|
+
export declare function getPresetForRegion(region: string): RegionalCompliance;
|
|
36
|
+
/**
|
|
37
|
+
* Get compliance requirements for a specific region
|
|
38
|
+
*/
|
|
39
|
+
export declare function getComplianceForRegion(region: string, state?: string): RegionalCompliance;
|
|
40
|
+
/**
|
|
41
|
+
* Get the most restrictive compliance combining all regional requirements
|
|
42
|
+
*/
|
|
43
|
+
export declare function getMostRestrictiveCompliance(): RegionalCompliance;
|
|
44
|
+
/**
|
|
45
|
+
* Apply regional compliance rules to headers
|
|
46
|
+
*/
|
|
47
|
+
export declare function applyRegionalCompliance(headers: Record<string, string>, region: string, state?: string): Record<string, string>;
|
|
48
|
+
/**
|
|
49
|
+
* Check if a region is supported by the detection system
|
|
50
|
+
*/
|
|
51
|
+
export declare function isRegionSupported(region: string): boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Detect region synchronously (for backward compatibility)
|
|
54
|
+
*/
|
|
55
|
+
export declare function detectRegion(): string;
|
|
56
|
+
//# sourceMappingURL=core.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../../src/api/regional/core.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH,OAAO,KAAK,EACV,UAAU,EACV,kBAAkB,EAClB,sBAAsB,EACtB,mBAAmB,EACpB,MAAM,kBAAkB,CAAC;AAmB1B,OAAO,EAAmB,KAAK,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAGrE;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAe1E;AA8RD;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,UAAU,CAO9C;AAyFD;;GAEG;AAEH,wBAAsB,gBAAgB,CAAC,OAAO,GAAE,sBAA2B,GAAG,OAAO,CAAC,UAAU,CAAC,CAwFhG;AAGD;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,kBAAkB,GAAG,kBAAkB,CAmC9E;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEvD;AAED;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,kBAAkB,EAAE,CAE7D;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,kBAAkB,CAGrE;AAED;;GAEG;AAEH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,kBAAkB,CA0BzF;AAED;;GAEG;AACH,wBAAgB,4BAA4B,IAAI,kBAAkB,CAkDjE;AAgGD;;GAEG;AAEH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC/B,MAAM,EAAE,MAAM,EACd,KAAK,CAAC,EAAE,MAAM,GACb,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAuBxB;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAOzD;AAED;;GAEG;AAEH,wBAAgB,YAAY,IAAI,MAAM,CAoBrC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Helper functions for regional detection
|
|
3
|
+
*/
|
|
4
|
+
import type { RegionInfo } from '@plyaz/types/api';
|
|
5
|
+
/**
|
|
6
|
+
* Helper to check if a timezone is global/universal
|
|
7
|
+
*/
|
|
8
|
+
export declare function isGlobalTimezone(tz: string): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Create a RegionInfo object from timezone match
|
|
11
|
+
*/
|
|
12
|
+
export declare function createTimezoneRegionInfo(match: {
|
|
13
|
+
region: string;
|
|
14
|
+
country?: string;
|
|
15
|
+
state?: string;
|
|
16
|
+
}, confidence: number): RegionInfo;
|
|
17
|
+
/**
|
|
18
|
+
* Find timezone prefix match
|
|
19
|
+
*/
|
|
20
|
+
export declare function findTimezonePrefixMatch(tz: string): RegionInfo | null;
|
|
21
|
+
/**
|
|
22
|
+
* Detect region from timezone
|
|
23
|
+
*/
|
|
24
|
+
export declare function detectRegionFromTimezone(tz: string): RegionInfo | null;
|
|
25
|
+
/**
|
|
26
|
+
* Detect region from locale
|
|
27
|
+
*/
|
|
28
|
+
export declare function detectRegionFromLocale(locale: string): RegionInfo | null;
|
|
29
|
+
/**
|
|
30
|
+
* CDN header parsing result
|
|
31
|
+
*/
|
|
32
|
+
type CDNGeoData = {
|
|
33
|
+
country?: string;
|
|
34
|
+
region?: string;
|
|
35
|
+
state?: string;
|
|
36
|
+
city?: string;
|
|
37
|
+
timezone?: string;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Parse CDN headers for region detection
|
|
41
|
+
*/
|
|
42
|
+
export declare function parseCDNHeaders(headers: Record<string, string>): CDNGeoData;
|
|
43
|
+
/**
|
|
44
|
+
* Detect region from CDN headers
|
|
45
|
+
*/
|
|
46
|
+
export declare function detectRegionFromCDNHeaders(headers: Record<string, unknown>): RegionInfo | null;
|
|
47
|
+
export declare function getRegionFromCoordinates(latitude: number, longitude: number): string;
|
|
48
|
+
export {};
|
|
49
|
+
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/api/regional/helpers.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAInD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAEpD;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CACtC,KAAK,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,EAC3D,UAAU,EAAE,MAAM,GACjB,UAAU,CASZ;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,EAAE,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CAOrE;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,EAAE,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CA4BtE;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CA6DxE;AAED;;GAEG;AACH,KAAK,UAAU,GAAG;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAiHF;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,UAAU,CAiB3E;AAsDD;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,UAAU,GAAG,IAAI,CAmB9F;AAqBD,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CA6BpF"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Regional Detection and Compliance System
|
|
3
|
+
* Automatically detect user region for compliance with data protection laws
|
|
4
|
+
*/
|
|
5
|
+
export type { RegionInfo, RegionalCompliance, RegionDetectionOptions } from '@plyaz/types/api';
|
|
6
|
+
export type { RegionalPresetName } from './presets';
|
|
7
|
+
export { detectUserRegion, clearRegionalCache, getRegionalPreset, hasRegionalPreset, getRegionalPresetNames, getPresetForRegion, getComplianceForRegion, getMostRestrictiveCompliance, applyRegionalCompliance, isRegionSupported, detectRegion, } from './core';
|
|
8
|
+
export { detectRegionFromTimezone, detectRegionFromLocale, detectRegionFromCDNHeaders, getRegionFromCoordinates, } from './helpers';
|
|
9
|
+
export { regionalPresets } from './presets';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/regional/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC/F,YAAY,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAGpD,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,sBAAsB,EACtB,kBAAkB,EAClB,sBAAsB,EACtB,4BAA4B,EAC5B,uBAAuB,EACvB,iBAAiB,EACjB,YAAY,GACb,MAAM,QAAQ,CAAC;AAGhB,OAAO,EACL,wBAAwB,EACxB,sBAAsB,EACtB,0BAA0B,EAC1B,wBAAwB,GACzB,MAAM,WAAW,CAAC;AAGnB,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Regional compliance presets
|
|
3
|
+
*/
|
|
4
|
+
import type { RegionalCompliance } from '@plyaz/types/api';
|
|
5
|
+
/**
|
|
6
|
+
* Regional compliance presets
|
|
7
|
+
*/
|
|
8
|
+
export declare const regionalPresets: {
|
|
9
|
+
readonly gdpr: () => RegionalCompliance;
|
|
10
|
+
readonly ccpa: () => RegionalCompliance;
|
|
11
|
+
readonly pipl: () => RegionalCompliance;
|
|
12
|
+
readonly appi: () => RegionalCompliance;
|
|
13
|
+
readonly global: () => RegionalCompliance;
|
|
14
|
+
};
|
|
15
|
+
export type RegionalPresetName = keyof typeof regionalPresets;
|
|
16
|
+
//# sourceMappingURL=presets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presets.d.ts","sourceRoot":"","sources":["../../../src/api/regional/presets.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAE3D;;GAEG;AACH,eAAO,MAAM,eAAe;yBAEhB,kBAAkB;yBA+BlB,kBAAkB;yBAiBlB,kBAAkB;yBAkBlB,kBAAkB;2BAgBhB,kBAAkB;CAmCtB,CAAC;AAEX,MAAM,MAAM,kBAAkB,GAAG,MAAM,OAAO,eAAe,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Request management utilities
|
|
3
|
+
*
|
|
4
|
+
* Provides comprehensive request lifecycle management including:
|
|
5
|
+
* - Request cancellation and abortion
|
|
6
|
+
* - Automatic cleanup in React components
|
|
7
|
+
* - Route change handling
|
|
8
|
+
* - Request grouping and tracking
|
|
9
|
+
*
|
|
10
|
+
* @module @plyaz/api/request
|
|
11
|
+
*/
|
|
12
|
+
export { abortRequest, isAbortError, createAbortError } from './management';
|
|
13
|
+
export { requestTracker, RequestTracker } from './tracker';
|
|
14
|
+
export { useRequestCleanup, useAbortableRequest, useRequestGroup, useRouteAwareRequest, } from './react';
|
|
15
|
+
export { setupRouteChangeCleanup, createRouteGuard, createRouteScope } from './routing';
|
|
16
|
+
export { abortByPattern, abortSearchRequests, abortUploadRequests, abortAllRequests, createScopedAbort, createDebouncedAbort, createThrottledAbort, requestWithTimeout, raceRequests, sequentialRequests, } from './utils';
|
|
17
|
+
export { prepareRequestConfig, prepareRequestConfigWithEnrichedHeaders, headersContext, getContextHeaders, runWithHeaders, runWithHeadersAsync, } from './prepare';
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/request/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAG5E,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAG3D,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,eAAe,EACf,oBAAoB,GACrB,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAGxF,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,YAAY,EACZ,kBAAkB,GACnB,MAAM,SAAS,CAAC;AAGjB,OAAO,EACL,oBAAoB,EACpB,uCAAuC,EACvC,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,mBAAmB,GACpB,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Request management utilities - direct pass-through to fetchff
|
|
3
|
+
* Used for controlling in-flight requests and cleanup
|
|
4
|
+
*/
|
|
5
|
+
import { abortRequest as fetchffAbortRequest } from 'fetchff';
|
|
6
|
+
/**
|
|
7
|
+
* Abort a specific request by key or URL pattern
|
|
8
|
+
*
|
|
9
|
+
* @param key - Cache key or URL pattern to abort
|
|
10
|
+
* @param error - Optional error message or DOMException
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```typescript
|
|
14
|
+
* // Abort specific request
|
|
15
|
+
* abortRequest('/api/slow-operation');
|
|
16
|
+
*
|
|
17
|
+
* // Abort with custom error message
|
|
18
|
+
* abortRequest('/api/upload', 'Upload cancelled by user');
|
|
19
|
+
*
|
|
20
|
+
* // Abort by pattern
|
|
21
|
+
* abortRequest('/api/search/*');
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export declare const abortRequest: typeof fetchffAbortRequest;
|
|
25
|
+
/**
|
|
26
|
+
* Check if an error is an abort error
|
|
27
|
+
*
|
|
28
|
+
* @param error - Error to check
|
|
29
|
+
* @returns True if error is from aborted request
|
|
30
|
+
*/
|
|
31
|
+
export declare function isAbortError(error: Error | DOMException | null | undefined): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Create an abort error message
|
|
34
|
+
*
|
|
35
|
+
* @param message - Error message
|
|
36
|
+
* @returns Abort error message string
|
|
37
|
+
*/
|
|
38
|
+
export declare function createAbortError(message?: string): string;
|
|
39
|
+
/**
|
|
40
|
+
* Create a DOMException for abort (browser-compatible)
|
|
41
|
+
*
|
|
42
|
+
* @param message - Error message
|
|
43
|
+
* @returns DOMException instance if available, otherwise string
|
|
44
|
+
*/
|
|
45
|
+
export declare function createAbortDOMException(message?: string): DOMException | string;
|
|
46
|
+
//# sourceMappingURL=management.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"management.d.ts","sourceRoot":"","sources":["../../../src/api/request/management.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,YAAY,IAAI,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAE9D;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,YAAY,4BAAsB,CAAC;AAEhD;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,YAAY,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAoBpF;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,GAAE,MAA0B,GAAG,MAAM,CAM5E;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,GAAE,MAA0B,GAClC,YAAY,GAAG,MAAM,CAUvB"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Request Preparation and Context Management (Simplified)
|
|
3
|
+
*
|
|
4
|
+
* Utilities for preparing request configurations with enriched headers
|
|
5
|
+
* and tracking context. Simplified version without unified processor.
|
|
6
|
+
*/
|
|
7
|
+
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
8
|
+
import type { ApiHeaders, ApiConfig, EnrichedHeadersOptions } from '@plyaz/types/api';
|
|
9
|
+
/**
|
|
10
|
+
* Context for headers that flow through service calls
|
|
11
|
+
*/
|
|
12
|
+
export declare const headersContext: AsyncLocalStorage<ApiHeaders>;
|
|
13
|
+
/**
|
|
14
|
+
* Get current headers from context
|
|
15
|
+
*/
|
|
16
|
+
export declare function getContextHeaders(): ApiHeaders;
|
|
17
|
+
/**
|
|
18
|
+
* Run function with headers in context
|
|
19
|
+
*/
|
|
20
|
+
export declare function runWithHeaders<T>(headers: ApiHeaders, fn: () => T): T;
|
|
21
|
+
/**
|
|
22
|
+
* Run async function with headers in context
|
|
23
|
+
*/
|
|
24
|
+
export declare function runWithHeadersAsync<T>(headers: ApiHeaders, fn: () => Promise<T>): Promise<T>;
|
|
25
|
+
/**
|
|
26
|
+
* Prepare request configuration with simple three-level precedence
|
|
27
|
+
* Global -> Client -> Request (highest priority)
|
|
28
|
+
*/
|
|
29
|
+
export declare function prepareRequestConfig(requestConfig?: Partial<ApiConfig>, clientConfig?: Partial<ApiConfig>): Promise<ApiConfig>;
|
|
30
|
+
/**
|
|
31
|
+
* Prepare request configuration with enriched headers support
|
|
32
|
+
*/
|
|
33
|
+
export declare function prepareRequestConfigWithEnrichedHeaders(requestConfig?: Partial<ApiConfig>, clientConfig?: Partial<ApiConfig>, enrichedHeadersOptions?: EnrichedHeadersOptions): Promise<ApiConfig>;
|
|
34
|
+
//# sourceMappingURL=prepare.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prepare.d.ts","sourceRoot":"","sources":["../../../src/api/request/prepare.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,sBAAsB,EAEvB,MAAM,kBAAkB,CAAC;AAK1B;;GAEG;AACH,eAAO,MAAM,cAAc,+BAAsC,CAAC;AAElE;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,UAAU,CAE9C;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC,CAErE;AAED;;GAEG;AACH,wBAAsB,mBAAmB,CAAC,CAAC,EACzC,OAAO,EAAE,UAAU,EACnB,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GACnB,OAAO,CAAC,CAAC,CAAC,CAWZ;AAqCD;;;GAGG;AACH,wBAAsB,oBAAoB,CACxC,aAAa,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,EAClC,YAAY,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,GAChC,OAAO,CAAC,SAAS,CAAC,CAwCpB;AAED;;GAEG;AACH,wBAAsB,uCAAuC,CAC3D,aAAa,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,EAClC,YAAY,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,EACjC,sBAAsB,CAAC,EAAE,sBAAsB,GAC9C,OAAO,CAAC,SAAS,CAAC,CA0BpB"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook for automatic request cleanup on unmount
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```tsx
|
|
6
|
+
* function Component() {
|
|
7
|
+
* const { trackRequest, untrackRequest } = useRequestCleanup();
|
|
8
|
+
*
|
|
9
|
+
* useEffect(() => {
|
|
10
|
+
* const key = '/api/data';
|
|
11
|
+
* trackRequest(key);
|
|
12
|
+
* fetchData(key).finally(() => untrackRequest(key));
|
|
13
|
+
* }, []);
|
|
14
|
+
* }
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare function useRequestCleanup(): {
|
|
18
|
+
trackRequest: (key: string) => void;
|
|
19
|
+
untrackRequest: (key: string) => void;
|
|
20
|
+
abortTracked: (reason?: string) => void;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Hook for request with automatic abort
|
|
24
|
+
*
|
|
25
|
+
* @param key - Unique request identifier
|
|
26
|
+
* @returns Object with signal and abort function
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```tsx
|
|
30
|
+
* function SearchComponent() {
|
|
31
|
+
* const { signal, abort } = useAbortableRequest('search');
|
|
32
|
+
*
|
|
33
|
+
* const handleSearch = async (query: string) => {
|
|
34
|
+
* try {
|
|
35
|
+
* const results = await fetch(`/api/search?q=${query}`, { signal });
|
|
36
|
+
* // Handle results
|
|
37
|
+
* } catch (err) {
|
|
38
|
+
* if (!isAbortError(err)) {
|
|
39
|
+
* // Handle real error
|
|
40
|
+
* }
|
|
41
|
+
* }
|
|
42
|
+
* };
|
|
43
|
+
* }
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
export declare function useAbortableRequest(key: string): {
|
|
47
|
+
signal: AbortSignal | undefined;
|
|
48
|
+
abort: (reason?: string) => void;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Hook for managing a group of related requests
|
|
52
|
+
*
|
|
53
|
+
* @param groupName - Name for the request group
|
|
54
|
+
* @returns Object with request management functions
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```tsx
|
|
58
|
+
* function Dashboard() {
|
|
59
|
+
* const { makeRequest, abortGroup } = useRequestGroup('dashboard');
|
|
60
|
+
*
|
|
61
|
+
* useEffect(() => {
|
|
62
|
+
* makeRequest('stats', () => api.getStats());
|
|
63
|
+
* makeRequest('users', () => api.getUsers());
|
|
64
|
+
* }, []);
|
|
65
|
+
*
|
|
66
|
+
* const handleRefresh = () => {
|
|
67
|
+
* abortGroup('Refreshing');
|
|
68
|
+
* // Make new requests
|
|
69
|
+
* };
|
|
70
|
+
* }
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
73
|
+
export declare function useRequestGroup(groupName: string): {
|
|
74
|
+
makeRequest: <T>(key: string, fetcher: () => Promise<T>) => Promise<T>;
|
|
75
|
+
abortGroup: (reason?: string) => void;
|
|
76
|
+
getActiveCount: () => number;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* Hook for route-aware requests that abort on route change
|
|
80
|
+
*
|
|
81
|
+
* @returns Object with makeRequest function
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* ```tsx
|
|
85
|
+
* function PageComponent() {
|
|
86
|
+
* const { makeRequest } = useRouteAwareRequest();
|
|
87
|
+
*
|
|
88
|
+
* useEffect(() => {
|
|
89
|
+
* makeRequest('page-data', () => api.getPageData());
|
|
90
|
+
* }, []);
|
|
91
|
+
* // Automatically aborted on route change
|
|
92
|
+
* }
|
|
93
|
+
* ```
|
|
94
|
+
*/
|
|
95
|
+
export declare function useRouteAwareRequest(): {
|
|
96
|
+
makeRequest: <T>(key: string, fetcher: () => Promise<T>) => Promise<T>;
|
|
97
|
+
};
|
|
98
|
+
//# sourceMappingURL=react.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../../src/api/request/react.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,iBAAiB,IAAI;IACnC,YAAY,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,YAAY,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC,CA6BA;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG;IAChD,MAAM,EAAE,WAAW,GAAG,SAAS,CAAC;IAChC,KAAK,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CAClC,CAgCA;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG;IAClD,WAAW,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;IACvE,UAAU,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,cAAc,EAAE,MAAM,MAAM,CAAC;CAC9B,CA2BA;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,oBAAoB,IAAI;IACtC,WAAW,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;CACxE,CAoBA"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { RequestRouter, RouteChangeOptions } from '@plyaz/types/api';
|
|
2
|
+
/**
|
|
3
|
+
* Setup route change listeners for automatic cleanup
|
|
4
|
+
*
|
|
5
|
+
* @param router - Router instance from Next.js or React Router
|
|
6
|
+
* @param options - Configuration options
|
|
7
|
+
* @returns Cleanup function
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* // Next.js _app.tsx
|
|
12
|
+
* import { useRouter } from 'next/router';
|
|
13
|
+
*
|
|
14
|
+
* function MyApp({ Component, pageProps }) {
|
|
15
|
+
* const router = useRouter();
|
|
16
|
+
*
|
|
17
|
+
* useEffect(() => {
|
|
18
|
+
* return setupRouteChangeCleanup(router, {
|
|
19
|
+
* abortPattern: '/api/*',
|
|
20
|
+
* preservePatterns: ['/api/auth/*']
|
|
21
|
+
* });
|
|
22
|
+
* }, [router]);
|
|
23
|
+
* }
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export declare function setupRouteChangeCleanup(router: RequestRouter, options?: RouteChangeOptions): () => void;
|
|
27
|
+
/**
|
|
28
|
+
* Create a route guard that aborts requests when leaving
|
|
29
|
+
*
|
|
30
|
+
* @param pattern - Pattern to abort on route leave
|
|
31
|
+
* @returns Object with enter and leave functions
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```tsx
|
|
35
|
+
* const guard = createRouteGuard('/api/page/*');
|
|
36
|
+
*
|
|
37
|
+
* // On route enter
|
|
38
|
+
* guard.enter();
|
|
39
|
+
*
|
|
40
|
+
* // On route leave
|
|
41
|
+
* guard.leave();
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
export declare function createRouteGuard(pattern?: string): {
|
|
45
|
+
enter: () => void;
|
|
46
|
+
leave: (reason?: string) => void;
|
|
47
|
+
isActive: () => boolean;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Create a scoped abort manager for specific routes
|
|
51
|
+
*
|
|
52
|
+
* @param routeName - Name of the route
|
|
53
|
+
* @returns Abort manager functions
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```tsx
|
|
57
|
+
* const profileRoute = createRouteScope('profile');
|
|
58
|
+
*
|
|
59
|
+
* // Register requests for this route
|
|
60
|
+
* profileRoute.register('/api/profile');
|
|
61
|
+
* profileRoute.register('/api/posts');
|
|
62
|
+
*
|
|
63
|
+
* // Abort all when leaving
|
|
64
|
+
* profileRoute.abortAll();
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
export declare function createRouteScope(routeName: string): {
|
|
68
|
+
register: (key: string) => void;
|
|
69
|
+
unregister: (key: string) => void;
|
|
70
|
+
abortAll: (reason?: string) => void;
|
|
71
|
+
getActiveCount: () => number;
|
|
72
|
+
isActive: (key: string) => boolean;
|
|
73
|
+
};
|
|
74
|
+
//# sourceMappingURL=routing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routing.d.ts","sourceRoot":"","sources":["../../../src/api/request/routing.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAoB,aAAa,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAE5F;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,aAAa,EACrB,OAAO,GAAE,kBAAuB,GAC/B,MAAM,IAAI,CAsEZ;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,GAAE,MAAY,GAAG;IACvD,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,KAAK,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,QAAQ,EAAE,MAAM,OAAO,CAAC;CACzB,CAiBA;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG;IACnD,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,UAAU,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,QAAQ,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,cAAc,EAAE,MAAM,MAAM,CAAC;IAC7B,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;CACpC,CAwBA"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Request tracking and management
|
|
3
|
+
*/
|
|
4
|
+
declare class RequestTracker {
|
|
5
|
+
private activeRequests;
|
|
6
|
+
private requestGroups;
|
|
7
|
+
/**
|
|
8
|
+
* Register a request with tracking
|
|
9
|
+
*
|
|
10
|
+
* @param key - Unique request identifier
|
|
11
|
+
* @param controller - Optional AbortController for the request
|
|
12
|
+
* @param group - Optional group name for bulk management
|
|
13
|
+
*/
|
|
14
|
+
register(key: string, controller?: AbortController, group?: string): void;
|
|
15
|
+
/**
|
|
16
|
+
* Unregister a completed request
|
|
17
|
+
*
|
|
18
|
+
* @param key - Request identifier to remove
|
|
19
|
+
*/
|
|
20
|
+
unregister(key: string): void;
|
|
21
|
+
/**
|
|
22
|
+
* Abort a specific request
|
|
23
|
+
*
|
|
24
|
+
* @param key - Request identifier
|
|
25
|
+
* @param reason - Optional abort reason
|
|
26
|
+
*/
|
|
27
|
+
abort(key: string, reason?: string): void;
|
|
28
|
+
/**
|
|
29
|
+
* Abort all requests in a group
|
|
30
|
+
*
|
|
31
|
+
* @param group - Group name
|
|
32
|
+
* @param reason - Optional abort reason
|
|
33
|
+
*/
|
|
34
|
+
abortGroup(group: string, reason?: string): void;
|
|
35
|
+
/**
|
|
36
|
+
* Abort all tracked requests
|
|
37
|
+
*
|
|
38
|
+
* @param reason - Optional abort reason
|
|
39
|
+
*/
|
|
40
|
+
abortAll(reason?: string): void;
|
|
41
|
+
/**
|
|
42
|
+
* Get active request count
|
|
43
|
+
*
|
|
44
|
+
* @returns Number of active requests
|
|
45
|
+
*/
|
|
46
|
+
getActiveCount(): number;
|
|
47
|
+
/**
|
|
48
|
+
* Check if a request is active
|
|
49
|
+
*
|
|
50
|
+
* @param key - Request identifier
|
|
51
|
+
* @returns True if request is active
|
|
52
|
+
*/
|
|
53
|
+
isActive(key: string): boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Get all active request keys
|
|
56
|
+
*
|
|
57
|
+
* @returns Array of active request keys
|
|
58
|
+
*/
|
|
59
|
+
getActiveKeys(): string[];
|
|
60
|
+
/**
|
|
61
|
+
* Get all group names
|
|
62
|
+
*
|
|
63
|
+
* @returns Array of group names
|
|
64
|
+
*/
|
|
65
|
+
getGroups(): string[];
|
|
66
|
+
/**
|
|
67
|
+
* Get requests in a specific group
|
|
68
|
+
*
|
|
69
|
+
* @param group - Group name
|
|
70
|
+
* @returns Array of request keys in the group
|
|
71
|
+
*/
|
|
72
|
+
getGroupRequests(group: string): string[];
|
|
73
|
+
}
|
|
74
|
+
export declare const requestTracker: RequestTracker;
|
|
75
|
+
export { RequestTracker };
|
|
76
|
+
//# sourceMappingURL=tracker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tracker.d.ts","sourceRoot":"","sources":["../../../src/api/request/tracker.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,cAAM,cAAc;IAClB,OAAO,CAAC,cAAc,CAAsC;IAC5D,OAAO,CAAC,aAAa,CAAkC;IAEvD;;;;;;OAMG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,eAAe,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI;IAezE;;;;OAIG;IACH,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAS7B;;;;;OAKG;IACH,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI;IAWzC;;;;;OAKG;IACH,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI;IAQhD;;;;OAIG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI;IAW/B;;;;OAIG;IACH,cAAc,IAAI,MAAM;IAIxB;;;;;OAKG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAI9B;;;;OAIG;IACH,aAAa,IAAI,MAAM,EAAE;IAIzB;;;;OAIG;IACH,SAAS,IAAI,MAAM,EAAE;IAIrB;;;;;OAKG;IACH,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE;CAI1C;AAGD,eAAO,MAAM,cAAc,gBAAuB,CAAC;AAGnD,OAAO,EAAE,cAAc,EAAE,CAAC"}
|