@plyaz/api 1.0.2 → 1.1.1
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 +7 -0
- package/dist/api/services/index.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 +15 -6
|
@@ -0,0 +1,595 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Environment Detection Utilities
|
|
3
|
+
* Centralized utilities for detecting runtime environment and accessing global objects safely
|
|
4
|
+
* These utilities are used across the codebase to avoid ReferenceError and provide consistent environment detection
|
|
5
|
+
*/
|
|
6
|
+
import type { NavigatorWithConnection, EnvironmentInfo, ExtendedEnvironmentInfo } from '@plyaz/types/api';
|
|
7
|
+
export declare function getProcess(): globalThis.NodeJS.Process | null;
|
|
8
|
+
/**
|
|
9
|
+
* Safely get the window object if available
|
|
10
|
+
*
|
|
11
|
+
* @returns The window object if available, null otherwise
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```typescript
|
|
15
|
+
* const win = getWindow();
|
|
16
|
+
* if (win) {
|
|
17
|
+
* console.log(`Window width: ${win.innerWidth}`);
|
|
18
|
+
* }
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export declare function getWindow(): Window | null;
|
|
22
|
+
/**
|
|
23
|
+
* Safely get the document object if available
|
|
24
|
+
*
|
|
25
|
+
* @returns The document object if available, null otherwise
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```typescript
|
|
29
|
+
* const doc = getDocument();
|
|
30
|
+
* if (doc) {
|
|
31
|
+
* const element = doc.getElementById('app');
|
|
32
|
+
* }
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
export declare function getDocument(): Document | null;
|
|
36
|
+
/**
|
|
37
|
+
* Safely get the navigator object if available
|
|
38
|
+
*
|
|
39
|
+
* @returns The navigator object if available, null otherwise
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```typescript
|
|
43
|
+
* const nav = getNavigator();
|
|
44
|
+
* if (nav) {
|
|
45
|
+
* console.log(`User agent: ${nav.userAgent}`);
|
|
46
|
+
* }
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
export declare function getNavigator(): NavigatorWithConnection | null;
|
|
50
|
+
/**
|
|
51
|
+
* Check if navigator is available
|
|
52
|
+
* Convenience function for boolean checks
|
|
53
|
+
*
|
|
54
|
+
* @returns True if navigator is available
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```typescript
|
|
58
|
+
* if (hasNavigator()) {
|
|
59
|
+
* // Navigator-specific code
|
|
60
|
+
* }
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
export declare function hasNavigator(): boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Check if running in a browser environment
|
|
66
|
+
*
|
|
67
|
+
* @returns True if running in a browser, false otherwise
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```typescript
|
|
71
|
+
* if (isBrowser()) {
|
|
72
|
+
* // Browser-specific code
|
|
73
|
+
* window.localStorage.setItem('key', 'value');
|
|
74
|
+
* }
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
export declare function isBrowser(): boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Check if running in a Node.js environment
|
|
80
|
+
*
|
|
81
|
+
* @returns True if running in Node.js, false otherwise
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* ```typescript
|
|
85
|
+
* if (isNode()) {
|
|
86
|
+
* // Node.js-specific code
|
|
87
|
+
* const fs = require('fs');
|
|
88
|
+
* }
|
|
89
|
+
* ```
|
|
90
|
+
*/
|
|
91
|
+
export declare function isNode(): boolean;
|
|
92
|
+
/**
|
|
93
|
+
* Check if running in an Electron environment
|
|
94
|
+
*
|
|
95
|
+
* @returns True if running in Electron, false otherwise
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* ```typescript
|
|
99
|
+
* if (isElectron()) {
|
|
100
|
+
* // Electron-specific code
|
|
101
|
+
* }
|
|
102
|
+
* ```
|
|
103
|
+
*/
|
|
104
|
+
export declare function isElectron(): boolean;
|
|
105
|
+
/**
|
|
106
|
+
* Check if running in a Web Worker environment
|
|
107
|
+
*
|
|
108
|
+
* @returns True if running in a Web Worker, false otherwise
|
|
109
|
+
*
|
|
110
|
+
* @example
|
|
111
|
+
* ```typescript
|
|
112
|
+
* if (isWebWorker()) {
|
|
113
|
+
* // Web Worker-specific code
|
|
114
|
+
* self.postMessage({ type: 'ready' });
|
|
115
|
+
* }
|
|
116
|
+
* ```
|
|
117
|
+
*/
|
|
118
|
+
export declare function isWebWorker(): boolean;
|
|
119
|
+
/**
|
|
120
|
+
* Check if running in a React Native environment
|
|
121
|
+
*
|
|
122
|
+
* @returns True if running in React Native, false otherwise
|
|
123
|
+
*
|
|
124
|
+
* @example
|
|
125
|
+
* ```typescript
|
|
126
|
+
* if (isReactNative()) {
|
|
127
|
+
* // React Native-specific code
|
|
128
|
+
* }
|
|
129
|
+
* ```
|
|
130
|
+
*/
|
|
131
|
+
export declare function isReactNative(): boolean;
|
|
132
|
+
/**
|
|
133
|
+
* Check if running in a Deno environment
|
|
134
|
+
*
|
|
135
|
+
* @returns True if running in Deno, false otherwise
|
|
136
|
+
*
|
|
137
|
+
* @example
|
|
138
|
+
* ```typescript
|
|
139
|
+
* if (isDeno()) {
|
|
140
|
+
* // Deno-specific code
|
|
141
|
+
* }
|
|
142
|
+
* ```
|
|
143
|
+
*/
|
|
144
|
+
export declare function isDeno(): boolean;
|
|
145
|
+
/**
|
|
146
|
+
* Check if running in a Bun environment
|
|
147
|
+
*
|
|
148
|
+
* @returns True if running in Bun, false otherwise
|
|
149
|
+
*
|
|
150
|
+
* @example
|
|
151
|
+
* ```typescript
|
|
152
|
+
* if (isBun()) {
|
|
153
|
+
* // Bun-specific code
|
|
154
|
+
* }
|
|
155
|
+
* ```
|
|
156
|
+
*/
|
|
157
|
+
export declare function isBun(): boolean;
|
|
158
|
+
/**
|
|
159
|
+
* Check if running in server-side rendering (SSR) context
|
|
160
|
+
*
|
|
161
|
+
* @returns True if running in SSR context, false otherwise
|
|
162
|
+
*
|
|
163
|
+
* @example
|
|
164
|
+
* ```typescript
|
|
165
|
+
* if (isSSR()) {
|
|
166
|
+
* // SSR-specific code
|
|
167
|
+
* // Avoid using browser APIs
|
|
168
|
+
* }
|
|
169
|
+
* ```
|
|
170
|
+
*/
|
|
171
|
+
export declare function isSSR(): boolean;
|
|
172
|
+
/**
|
|
173
|
+
* Get the current runtime environment name
|
|
174
|
+
*
|
|
175
|
+
* @returns The name of the current runtime environment
|
|
176
|
+
*
|
|
177
|
+
* @example
|
|
178
|
+
* ```typescript
|
|
179
|
+
* const runtime = getRuntimeEnvironment();
|
|
180
|
+
* console.log(`Running in: ${runtime}`);
|
|
181
|
+
* ```
|
|
182
|
+
*/
|
|
183
|
+
export declare function getRuntimeEnvironment(): 'browser' | 'node' | 'electron' | 'deno' | 'bun' | 'webworker' | 'react-native' | 'unknown';
|
|
184
|
+
/**
|
|
185
|
+
* Check if a global object exists
|
|
186
|
+
*
|
|
187
|
+
* @param name - The name of the global object to check
|
|
188
|
+
* @returns True if the global object exists, false otherwise
|
|
189
|
+
*
|
|
190
|
+
* @example
|
|
191
|
+
* ```typescript
|
|
192
|
+
* if (hasGlobal('localStorage')) {
|
|
193
|
+
* // localStorage is available
|
|
194
|
+
* }
|
|
195
|
+
* ```
|
|
196
|
+
*/
|
|
197
|
+
export declare function hasGlobal(name: string): boolean;
|
|
198
|
+
/**
|
|
199
|
+
* Get a global object safely
|
|
200
|
+
*
|
|
201
|
+
* @param name - The name of the global object to get
|
|
202
|
+
* @returns The global object if available, undefined otherwise
|
|
203
|
+
*
|
|
204
|
+
* @example
|
|
205
|
+
* ```typescript
|
|
206
|
+
* const storage = getGlobal('localStorage');
|
|
207
|
+
* if (storage) {
|
|
208
|
+
* storage.setItem('key', 'value');
|
|
209
|
+
* }
|
|
210
|
+
* ```
|
|
211
|
+
*/
|
|
212
|
+
export declare function getGlobal<T = unknown>(name: string): T | undefined;
|
|
213
|
+
/**
|
|
214
|
+
* Get comprehensive environment information
|
|
215
|
+
*
|
|
216
|
+
* @returns Detailed environment information
|
|
217
|
+
*
|
|
218
|
+
* @example
|
|
219
|
+
* ```typescript
|
|
220
|
+
* const env = getEnvironmentInfo();
|
|
221
|
+
* console.log(`Runtime: ${env.runtime}`);
|
|
222
|
+
* console.log(`Is Browser: ${env.isBrowser}`);
|
|
223
|
+
* ```
|
|
224
|
+
*/
|
|
225
|
+
export declare function getEnvironmentInfo(): EnvironmentInfo;
|
|
226
|
+
/**
|
|
227
|
+
* Get environment variable safely
|
|
228
|
+
*
|
|
229
|
+
* @param name - Environment variable name
|
|
230
|
+
* @param defaultValue - Default value if not found
|
|
231
|
+
* @returns Environment variable value or default
|
|
232
|
+
*
|
|
233
|
+
* @example
|
|
234
|
+
* ```typescript
|
|
235
|
+
* const apiUrl = getEnv('API_URL', 'http://localhost:3000');
|
|
236
|
+
* ```
|
|
237
|
+
*/
|
|
238
|
+
export declare function getEnv(name: string, defaultValue?: string): string | undefined;
|
|
239
|
+
export declare function isDevelopment(): boolean;
|
|
240
|
+
/**
|
|
241
|
+
* Check if running in production environment
|
|
242
|
+
*
|
|
243
|
+
* @returns True if in production mode
|
|
244
|
+
*
|
|
245
|
+
* @example
|
|
246
|
+
* ```typescript
|
|
247
|
+
* if (isProduction()) {
|
|
248
|
+
* enableAnalytics();
|
|
249
|
+
* }
|
|
250
|
+
* ```
|
|
251
|
+
*/
|
|
252
|
+
export declare function isProduction(): boolean;
|
|
253
|
+
/**
|
|
254
|
+
* Check if running in test environment
|
|
255
|
+
*
|
|
256
|
+
* @returns True if in test mode
|
|
257
|
+
*
|
|
258
|
+
* @example
|
|
259
|
+
* ```typescript
|
|
260
|
+
* if (isTest()) {
|
|
261
|
+
* mockApiCalls();
|
|
262
|
+
* }
|
|
263
|
+
* ```
|
|
264
|
+
*/
|
|
265
|
+
export declare function isTest(): boolean;
|
|
266
|
+
export declare function isStaging(): boolean;
|
|
267
|
+
/**
|
|
268
|
+
* Get the current environment name
|
|
269
|
+
*
|
|
270
|
+
* @returns Environment name
|
|
271
|
+
*
|
|
272
|
+
* @example
|
|
273
|
+
* ```typescript
|
|
274
|
+
* const env = getEnvironmentName();
|
|
275
|
+
* console.log(`Running in ${env} mode`);
|
|
276
|
+
* ```
|
|
277
|
+
*/
|
|
278
|
+
export declare function getEnvironmentName(): 'development' | 'production' | 'test' | 'staging' | 'unknown';
|
|
279
|
+
/**
|
|
280
|
+
* Check if debug mode is enabled
|
|
281
|
+
*
|
|
282
|
+
* @returns True if debug mode is enabled
|
|
283
|
+
*
|
|
284
|
+
* @example
|
|
285
|
+
* ```typescript
|
|
286
|
+
* if (isDebug()) {
|
|
287
|
+
* console.log('Debug info:', data);
|
|
288
|
+
* }
|
|
289
|
+
* ```
|
|
290
|
+
*/
|
|
291
|
+
export declare function isDebug(): boolean;
|
|
292
|
+
/**
|
|
293
|
+
* Check if running in CI/CD environment
|
|
294
|
+
*
|
|
295
|
+
* @returns True if in CI/CD
|
|
296
|
+
*
|
|
297
|
+
* @example
|
|
298
|
+
* ```typescript
|
|
299
|
+
* if (isCI()) {
|
|
300
|
+
* runIntegrationTests();
|
|
301
|
+
* }
|
|
302
|
+
* ```
|
|
303
|
+
*/
|
|
304
|
+
export declare function isCI(): boolean;
|
|
305
|
+
/**
|
|
306
|
+
* Check if document is visible (not hidden)
|
|
307
|
+
*
|
|
308
|
+
* @returns True if document is visible
|
|
309
|
+
*
|
|
310
|
+
* @example
|
|
311
|
+
* ```typescript
|
|
312
|
+
* if (!isDocumentVisible()) {
|
|
313
|
+
* pauseAnimations();
|
|
314
|
+
* }
|
|
315
|
+
* ```
|
|
316
|
+
*/
|
|
317
|
+
export declare function isDocumentVisible(): boolean;
|
|
318
|
+
/**
|
|
319
|
+
* Check if page has focus
|
|
320
|
+
*
|
|
321
|
+
* @returns True if page has focus
|
|
322
|
+
*
|
|
323
|
+
* @example
|
|
324
|
+
* ```typescript
|
|
325
|
+
* if (isPageFocused()) {
|
|
326
|
+
* startPolling();
|
|
327
|
+
* }
|
|
328
|
+
* ```
|
|
329
|
+
*/
|
|
330
|
+
export declare function isPageFocused(): boolean;
|
|
331
|
+
/**
|
|
332
|
+
* Check if running in iframe
|
|
333
|
+
*
|
|
334
|
+
* @returns True if in iframe
|
|
335
|
+
*
|
|
336
|
+
* @example
|
|
337
|
+
* ```typescript
|
|
338
|
+
* if (isInIframe()) {
|
|
339
|
+
* adjustLayout();
|
|
340
|
+
* }
|
|
341
|
+
* ```
|
|
342
|
+
*/
|
|
343
|
+
export declare function isInIframe(): boolean;
|
|
344
|
+
/**
|
|
345
|
+
* Check if localStorage is available
|
|
346
|
+
*
|
|
347
|
+
* @returns True if localStorage is available
|
|
348
|
+
*
|
|
349
|
+
* @example
|
|
350
|
+
* ```typescript
|
|
351
|
+
* if (hasLocalStorage()) {
|
|
352
|
+
* localStorage.setItem('key', 'value');
|
|
353
|
+
* }
|
|
354
|
+
* ```
|
|
355
|
+
*/
|
|
356
|
+
export declare function hasLocalStorage(): boolean;
|
|
357
|
+
/**
|
|
358
|
+
* Check if sessionStorage is available
|
|
359
|
+
*
|
|
360
|
+
* @returns True if sessionStorage is available
|
|
361
|
+
*
|
|
362
|
+
* @example
|
|
363
|
+
* ```typescript
|
|
364
|
+
* if (hasSessionStorage()) {
|
|
365
|
+
* sessionStorage.setItem('temp', 'data');
|
|
366
|
+
* }
|
|
367
|
+
* ```
|
|
368
|
+
*/
|
|
369
|
+
export declare function hasSessionStorage(): boolean;
|
|
370
|
+
/**
|
|
371
|
+
* Get localStorage safely
|
|
372
|
+
*
|
|
373
|
+
* @returns localStorage if available, null otherwise
|
|
374
|
+
*
|
|
375
|
+
* @example
|
|
376
|
+
* ```typescript
|
|
377
|
+
* const storage = getLocalStorage();
|
|
378
|
+
* if (storage) {
|
|
379
|
+
* storage.setItem('key', 'value');
|
|
380
|
+
* }
|
|
381
|
+
* ```
|
|
382
|
+
*/
|
|
383
|
+
export declare function getLocalStorage(): Storage | null;
|
|
384
|
+
/**
|
|
385
|
+
* Get sessionStorage safely
|
|
386
|
+
*
|
|
387
|
+
* @returns sessionStorage if available, null otherwise
|
|
388
|
+
*
|
|
389
|
+
* @example
|
|
390
|
+
* ```typescript
|
|
391
|
+
* const storage = getSessionStorage();
|
|
392
|
+
* if (storage) {
|
|
393
|
+
* storage.setItem('key', 'value');
|
|
394
|
+
* }
|
|
395
|
+
* ```
|
|
396
|
+
*/
|
|
397
|
+
export declare function getSessionStorage(): Storage | null;
|
|
398
|
+
/**
|
|
399
|
+
* Check if IndexedDB is available
|
|
400
|
+
*
|
|
401
|
+
* @returns True if IndexedDB is available
|
|
402
|
+
*
|
|
403
|
+
* @example
|
|
404
|
+
* ```typescript
|
|
405
|
+
* if (hasIndexedDB()) {
|
|
406
|
+
* openDatabase();
|
|
407
|
+
* }
|
|
408
|
+
* ```
|
|
409
|
+
*/
|
|
410
|
+
export declare function hasIndexedDB(): boolean;
|
|
411
|
+
export declare function getCrypto(): Crypto | null;
|
|
412
|
+
/**
|
|
413
|
+
* Generate a UUID v4
|
|
414
|
+
* Cross-platform UUID generation using available crypto APIs
|
|
415
|
+
*
|
|
416
|
+
* @returns UUID string or fallback pseudo-random ID
|
|
417
|
+
*
|
|
418
|
+
* @example
|
|
419
|
+
* ```typescript
|
|
420
|
+
* const id = generateUUID();
|
|
421
|
+
* // '550e8400-e29b-41d4-a716-446655440000'
|
|
422
|
+
* ```
|
|
423
|
+
*/
|
|
424
|
+
export declare function generateUUID(): string;
|
|
425
|
+
/**
|
|
426
|
+
* Check if WebGL is supported
|
|
427
|
+
*
|
|
428
|
+
* @returns True if WebGL is supported
|
|
429
|
+
*
|
|
430
|
+
* @example
|
|
431
|
+
* ```typescript
|
|
432
|
+
* if (hasWebGL()) {
|
|
433
|
+
* init3DGraphics();
|
|
434
|
+
* }
|
|
435
|
+
* ```
|
|
436
|
+
*/
|
|
437
|
+
export declare function hasWebGL(): boolean;
|
|
438
|
+
/**
|
|
439
|
+
* Check if WebP image format is supported
|
|
440
|
+
*
|
|
441
|
+
* @returns Promise resolving to true if WebP is supported
|
|
442
|
+
*
|
|
443
|
+
* @example
|
|
444
|
+
* ```typescript
|
|
445
|
+
* const supportsWebP = await hasWebPSupport();
|
|
446
|
+
* if (supportsWebP) {
|
|
447
|
+
* useWebPImages();
|
|
448
|
+
* }
|
|
449
|
+
* ```
|
|
450
|
+
*/
|
|
451
|
+
export declare function hasWebPSupport(): Promise<boolean>;
|
|
452
|
+
/**
|
|
453
|
+
* Check if running in server environment (Node.js)
|
|
454
|
+
* Alias for isNode() but with semantic meaning for server-side code
|
|
455
|
+
*/
|
|
456
|
+
export declare function isServer(): boolean;
|
|
457
|
+
/**
|
|
458
|
+
* Get user agent safely
|
|
459
|
+
*/
|
|
460
|
+
export declare function getUserAgent(): string;
|
|
461
|
+
/**
|
|
462
|
+
* Check if device supports touch
|
|
463
|
+
*/
|
|
464
|
+
export declare function isTouchDevice(): boolean;
|
|
465
|
+
/**
|
|
466
|
+
* Check if device is mobile (basic check)
|
|
467
|
+
*/
|
|
468
|
+
export declare function isMobile(): boolean;
|
|
469
|
+
/**
|
|
470
|
+
* Check if browser supports localStorage
|
|
471
|
+
* Alias for hasLocalStorage() with semantic name
|
|
472
|
+
*/
|
|
473
|
+
export declare function supportsLocalStorage(): boolean;
|
|
474
|
+
/**
|
|
475
|
+
* Check if browser supports sessionStorage
|
|
476
|
+
* Alias for hasSessionStorage() with semantic name
|
|
477
|
+
*/
|
|
478
|
+
export declare function supportsSessionStorage(): boolean;
|
|
479
|
+
/**
|
|
480
|
+
* Check if browser supports WebSocket
|
|
481
|
+
*/
|
|
482
|
+
export declare function supportsWebSocket(): boolean;
|
|
483
|
+
/**
|
|
484
|
+
* Check if browser supports Service Workers
|
|
485
|
+
*/
|
|
486
|
+
export declare function supportsServiceWorker(): boolean;
|
|
487
|
+
/**
|
|
488
|
+
* Check if browser supports Push API
|
|
489
|
+
*/
|
|
490
|
+
export declare function supportsPushNotifications(): boolean;
|
|
491
|
+
/**
|
|
492
|
+
* Check if browser supports Notification API
|
|
493
|
+
*/
|
|
494
|
+
export declare function supportsNotifications(): boolean;
|
|
495
|
+
/**
|
|
496
|
+
* Check if browser supports fetch API
|
|
497
|
+
*/
|
|
498
|
+
export declare function supportsFetch(): boolean;
|
|
499
|
+
/**
|
|
500
|
+
* Check if browser supports IntersectionObserver
|
|
501
|
+
*/
|
|
502
|
+
export declare function supportsIntersectionObserver(): boolean;
|
|
503
|
+
/**
|
|
504
|
+
* Check if browser supports requestIdleCallback
|
|
505
|
+
*/
|
|
506
|
+
export declare function supportsRequestIdleCallback(): boolean;
|
|
507
|
+
/**
|
|
508
|
+
* Check if browser supports BroadcastChannel
|
|
509
|
+
*/
|
|
510
|
+
export declare function supportsBroadcastChannel(): boolean;
|
|
511
|
+
/**
|
|
512
|
+
* Check if browser supports Geolocation API
|
|
513
|
+
*/
|
|
514
|
+
export declare function supportsGeolocation(): boolean;
|
|
515
|
+
/**
|
|
516
|
+
* Get location object safely
|
|
517
|
+
*/
|
|
518
|
+
export declare function getLocation(): Location | null;
|
|
519
|
+
/**
|
|
520
|
+
* Get console object safely (works in both browser and Node)
|
|
521
|
+
*/
|
|
522
|
+
export declare function getConsole(): Console;
|
|
523
|
+
/**
|
|
524
|
+
* Execute code only in browser environment
|
|
525
|
+
*/
|
|
526
|
+
export declare function inBrowser<T>(callback: () => T, fallback?: T): T | undefined;
|
|
527
|
+
/**
|
|
528
|
+
* Execute code only in server environment
|
|
529
|
+
*/
|
|
530
|
+
export declare function inServer<T>(callback: () => T, fallback?: T): T | undefined;
|
|
531
|
+
/**
|
|
532
|
+
* Get extended environment info object
|
|
533
|
+
*/
|
|
534
|
+
export declare function getExtendedEnvironmentInfo(): ExtendedEnvironmentInfo;
|
|
535
|
+
/**
|
|
536
|
+
* Export all utilities as a namespace for convenience
|
|
537
|
+
*/
|
|
538
|
+
export declare const Environment: {
|
|
539
|
+
readonly getProcess: typeof getProcess;
|
|
540
|
+
readonly getWindow: typeof getWindow;
|
|
541
|
+
readonly getDocument: typeof getDocument;
|
|
542
|
+
readonly getNavigator: typeof getNavigator;
|
|
543
|
+
readonly hasNavigator: typeof hasNavigator;
|
|
544
|
+
readonly isBrowser: typeof isBrowser;
|
|
545
|
+
readonly isNode: typeof isNode;
|
|
546
|
+
readonly isElectron: typeof isElectron;
|
|
547
|
+
readonly isWebWorker: typeof isWebWorker;
|
|
548
|
+
readonly isReactNative: typeof isReactNative;
|
|
549
|
+
readonly isDeno: typeof isDeno;
|
|
550
|
+
readonly isBun: typeof isBun;
|
|
551
|
+
readonly isSSR: typeof isSSR;
|
|
552
|
+
readonly getRuntimeEnvironment: typeof getRuntimeEnvironment;
|
|
553
|
+
readonly hasGlobal: typeof hasGlobal;
|
|
554
|
+
readonly getGlobal: typeof getGlobal;
|
|
555
|
+
readonly getEnvironmentInfo: typeof getEnvironmentInfo;
|
|
556
|
+
readonly getEnv: typeof getEnv;
|
|
557
|
+
readonly isDevelopment: typeof isDevelopment;
|
|
558
|
+
readonly isProduction: typeof isProduction;
|
|
559
|
+
readonly isTest: typeof isTest;
|
|
560
|
+
readonly isStaging: typeof isStaging;
|
|
561
|
+
readonly getEnvironmentName: typeof getEnvironmentName;
|
|
562
|
+
readonly isDebug: typeof isDebug;
|
|
563
|
+
readonly isCI: typeof isCI;
|
|
564
|
+
readonly isDocumentVisible: typeof isDocumentVisible;
|
|
565
|
+
readonly isPageFocused: typeof isPageFocused;
|
|
566
|
+
readonly isInIframe: typeof isInIframe;
|
|
567
|
+
readonly hasLocalStorage: typeof hasLocalStorage;
|
|
568
|
+
readonly hasSessionStorage: typeof hasSessionStorage;
|
|
569
|
+
readonly hasIndexedDB: typeof hasIndexedDB;
|
|
570
|
+
readonly hasWebGL: typeof hasWebGL;
|
|
571
|
+
readonly getCrypto: typeof getCrypto;
|
|
572
|
+
readonly generateUUID: typeof generateUUID;
|
|
573
|
+
readonly hasWebPSupport: typeof hasWebPSupport;
|
|
574
|
+
readonly isServer: typeof isServer;
|
|
575
|
+
readonly getUserAgent: typeof getUserAgent;
|
|
576
|
+
readonly isTouchDevice: typeof isTouchDevice;
|
|
577
|
+
readonly isMobile: typeof isMobile;
|
|
578
|
+
readonly supportsLocalStorage: typeof supportsLocalStorage;
|
|
579
|
+
readonly supportsSessionStorage: typeof supportsSessionStorage;
|
|
580
|
+
readonly supportsWebSocket: typeof supportsWebSocket;
|
|
581
|
+
readonly supportsServiceWorker: typeof supportsServiceWorker;
|
|
582
|
+
readonly supportsPushNotifications: typeof supportsPushNotifications;
|
|
583
|
+
readonly supportsNotifications: typeof supportsNotifications;
|
|
584
|
+
readonly supportsFetch: typeof supportsFetch;
|
|
585
|
+
readonly supportsIntersectionObserver: typeof supportsIntersectionObserver;
|
|
586
|
+
readonly supportsRequestIdleCallback: typeof supportsRequestIdleCallback;
|
|
587
|
+
readonly supportsBroadcastChannel: typeof supportsBroadcastChannel;
|
|
588
|
+
readonly supportsGeolocation: typeof supportsGeolocation;
|
|
589
|
+
readonly getLocation: typeof getLocation;
|
|
590
|
+
readonly getConsole: typeof getConsole;
|
|
591
|
+
readonly inBrowser: typeof inBrowser;
|
|
592
|
+
readonly inServer: typeof inServer;
|
|
593
|
+
readonly getExtendedEnvironmentInfo: typeof getExtendedEnvironmentInfo;
|
|
594
|
+
};
|
|
595
|
+
//# sourceMappingURL=environment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../../src/api/utils/environment.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AAEH,OAAO,KAAK,EACV,uBAAuB,EAIvB,eAAe,EACf,uBAAuB,EACxB,MAAM,kBAAkB,CAAC;AA2D1B,wBAAgB,UAAU,IAAI,UAAU,CAAC,MAAM,CAAC,OAAO,GAAG,IAAI,CAW7D;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,SAAS,IAAI,MAAM,GAAG,IAAI,CAezC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,IAAI,QAAQ,GAAG,IAAI,CAe7C;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,YAAY,IAAI,uBAAuB,GAAG,IAAI,CAQ7D;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAEtC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,SAAS,IAAI,OAAO,CAEnC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,MAAM,IAAI,OAAO,CAGhC;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,UAAU,IAAI,OAAO,CAGpC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,IAAI,OAAO,CAOrC;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,IAAI,OAAO,CAGvC;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,MAAM,IAAI,OAAO,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