playlist-data-engine 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/LICENSE +21 -0
- package/README.md +352 -0
- package/dist/__vite-browser-external-DYxpcVy9.js +4 -0
- package/dist/constants/DefaultClasses.d.ts +46 -0
- package/dist/constants/DefaultClasses.d.ts.map +1 -0
- package/dist/constants/DefaultEnchantments.d.ts +337 -0
- package/dist/constants/DefaultEnchantments.d.ts.map +1 -0
- package/dist/constants/DefaultEnemies.d.ts +83 -0
- package/dist/constants/DefaultEnemies.d.ts.map +1 -0
- package/dist/constants/DefaultEquipment.d.ts +23 -0
- package/dist/constants/DefaultEquipment.d.ts.map +1 -0
- package/dist/constants/DefaultFeatures.d.ts +22 -0
- package/dist/constants/DefaultFeatures.d.ts.map +1 -0
- package/dist/constants/DefaultRaces.d.ts +102 -0
- package/dist/constants/DefaultRaces.d.ts.map +1 -0
- package/dist/constants/DefaultSkills.d.ts +26 -0
- package/dist/constants/DefaultSkills.d.ts.map +1 -0
- package/dist/constants/DefaultSpells.d.ts +41 -0
- package/dist/constants/DefaultSpells.d.ts.map +1 -0
- package/dist/constants/EncounterBalance.d.ts +208 -0
- package/dist/constants/EncounterBalance.d.ts.map +1 -0
- package/dist/constants/EnemyEquipment.d.ts +71 -0
- package/dist/constants/EnemyEquipment.d.ts.map +1 -0
- package/dist/constants/EnemyRarity.d.ts +79 -0
- package/dist/constants/EnemyRarity.d.ts.map +1 -0
- package/dist/constants/EnemyTemplates/Construct.d.ts +63 -0
- package/dist/constants/EnemyTemplates/Construct.d.ts.map +1 -0
- package/dist/constants/EnemyTemplates/Dragon.d.ts +68 -0
- package/dist/constants/EnemyTemplates/Dragon.d.ts.map +1 -0
- package/dist/constants/EnemyTemplates/Elemental.d.ts +64 -0
- package/dist/constants/EnemyTemplates/Elemental.d.ts.map +1 -0
- package/dist/constants/EnemyTemplates/Fiend.d.ts +62 -0
- package/dist/constants/EnemyTemplates/Fiend.d.ts.map +1 -0
- package/dist/constants/EnemyTemplates/Monstrosity.d.ts +63 -0
- package/dist/constants/EnemyTemplates/Monstrosity.d.ts.map +1 -0
- package/dist/constants/EnemyTemplates/Undead.d.ts +61 -0
- package/dist/constants/EnemyTemplates/Undead.d.ts.map +1 -0
- package/dist/constants/ItemTemplates.d.ts +40 -0
- package/dist/constants/ItemTemplates.d.ts.map +1 -0
- package/dist/constants/MagicItems.d.ts +30 -0
- package/dist/constants/MagicItems.d.ts.map +1 -0
- package/dist/constants/SpellSlots.d.ts +30 -0
- package/dist/constants/SpellSlots.d.ts.map +1 -0
- package/dist/constants/StatScaling.d.ts +113 -0
- package/dist/constants/StatScaling.d.ts.map +1 -0
- package/dist/core/analysis/AudioAnalyzer.d.ts +599 -0
- package/dist/core/analysis/AudioAnalyzer.d.ts.map +1 -0
- package/dist/core/analysis/ColorExtractor.d.ts +64 -0
- package/dist/core/analysis/ColorExtractor.d.ts.map +1 -0
- package/dist/core/analysis/EssentiaPitchDetector.d.ts +282 -0
- package/dist/core/analysis/EssentiaPitchDetector.d.ts.map +1 -0
- package/dist/core/analysis/LevelSerializer.d.ts +265 -0
- package/dist/core/analysis/LevelSerializer.d.ts.map +1 -0
- package/dist/core/analysis/MelodyContourAnalyzer.d.ts +283 -0
- package/dist/core/analysis/MelodyContourAnalyzer.d.ts.map +1 -0
- package/dist/core/analysis/MultiBandAnalyzer.d.ts +214 -0
- package/dist/core/analysis/MultiBandAnalyzer.d.ts.map +1 -0
- package/dist/core/analysis/MusicClassifier.d.ts +524 -0
- package/dist/core/analysis/MusicClassifier.d.ts.map +1 -0
- package/dist/core/analysis/PitchAnalyzer.d.ts +266 -0
- package/dist/core/analysis/PitchAnalyzer.d.ts.map +1 -0
- package/dist/core/analysis/PitchDetector.d.ts +251 -0
- package/dist/core/analysis/PitchDetector.d.ts.map +1 -0
- package/dist/core/analysis/SpectrumScanner.d.ts +52 -0
- package/dist/core/analysis/SpectrumScanner.d.ts.map +1 -0
- package/dist/core/analysis/beat/BeatInterpolator.d.ts +477 -0
- package/dist/core/analysis/beat/BeatInterpolator.d.ts.map +1 -0
- package/dist/core/analysis/beat/BeatMapGenerator.d.ts +170 -0
- package/dist/core/analysis/beat/BeatMapGenerator.d.ts.map +1 -0
- package/dist/core/analysis/beat/BeatStream.d.ts +316 -0
- package/dist/core/analysis/beat/BeatStream.d.ts.map +1 -0
- package/dist/core/analysis/beat/BeatSubdivider.d.ts +205 -0
- package/dist/core/analysis/beat/BeatSubdivider.d.ts.map +1 -0
- package/dist/core/analysis/beat/BeatTracker.d.ts +137 -0
- package/dist/core/analysis/beat/BeatTracker.d.ts.map +1 -0
- package/dist/core/analysis/beat/CompositeStreamGenerator.d.ts +180 -0
- package/dist/core/analysis/beat/CompositeStreamGenerator.d.ts.map +1 -0
- package/dist/core/analysis/beat/DensityAnalyzer.d.ts +246 -0
- package/dist/core/analysis/beat/DensityAnalyzer.d.ts.map +1 -0
- package/dist/core/analysis/beat/DifficultyVariantGenerator.d.ts +1082 -0
- package/dist/core/analysis/beat/DifficultyVariantGenerator.d.ts.map +1 -0
- package/dist/core/analysis/beat/GrooveAnalyzer.d.ts +192 -0
- package/dist/core/analysis/beat/GrooveAnalyzer.d.ts.map +1 -0
- package/dist/core/analysis/beat/OnsetStrengthEnvelope.d.ts +133 -0
- package/dist/core/analysis/beat/OnsetStrengthEnvelope.d.ts.map +1 -0
- package/dist/core/analysis/beat/PhraseAnalyzer.d.ts +230 -0
- package/dist/core/analysis/beat/PhraseAnalyzer.d.ts.map +1 -0
- package/dist/core/analysis/beat/RhythmQuantizer.d.ts +399 -0
- package/dist/core/analysis/beat/RhythmQuantizer.d.ts.map +1 -0
- package/dist/core/analysis/beat/RhythmicBalancer.d.ts +262 -0
- package/dist/core/analysis/beat/RhythmicBalancer.d.ts.map +1 -0
- package/dist/core/analysis/beat/StreamScorer.d.ts +275 -0
- package/dist/core/analysis/beat/StreamScorer.d.ts.map +1 -0
- package/dist/core/analysis/beat/TempoAwareQuantizer.d.ts +256 -0
- package/dist/core/analysis/beat/TempoAwareQuantizer.d.ts.map +1 -0
- package/dist/core/analysis/beat/TempoDetector.d.ts +220 -0
- package/dist/core/analysis/beat/TempoDetector.d.ts.map +1 -0
- package/dist/core/analysis/beat/TransientDetector.d.ts +303 -0
- package/dist/core/analysis/beat/TransientDetector.d.ts.map +1 -0
- package/dist/core/analysis/beat/beatKeyHelpers.d.ts +180 -0
- package/dist/core/analysis/beat/beatKeyHelpers.d.ts.map +1 -0
- package/dist/core/analysis/beat/index.d.ts +41 -0
- package/dist/core/analysis/beat/index.d.ts.map +1 -0
- package/dist/core/analysis/beat/utils/audioUtils.d.ts +204 -0
- package/dist/core/analysis/beat/utils/audioUtils.d.ts.map +1 -0
- package/dist/core/analysis/beat/utils/beatInterpolationDebug.d.ts +404 -0
- package/dist/core/analysis/beat/utils/beatInterpolationDebug.d.ts.map +1 -0
- package/dist/core/analysis/beat/utils/subdivideBeatMap.d.ts +61 -0
- package/dist/core/analysis/beat/utils/subdivideBeatMap.d.ts.map +1 -0
- package/dist/core/analysis/beat/utils/unifyBeatMap.d.ts +33 -0
- package/dist/core/analysis/beat/utils/unifyBeatMap.d.ts.map +1 -0
- package/dist/core/analysis/index.d.ts +18 -0
- package/dist/core/analysis/index.d.ts.map +1 -0
- package/dist/core/combat/AI/AICombatRunner.d.ts +108 -0
- package/dist/core/combat/AI/AICombatRunner.d.ts.map +1 -0
- package/dist/core/combat/AI/CombatAI.d.ts +179 -0
- package/dist/core/combat/AI/CombatAI.d.ts.map +1 -0
- package/dist/core/combat/AI/CombatMetricsTracker.d.ts +30 -0
- package/dist/core/combat/AI/CombatMetricsTracker.d.ts.map +1 -0
- package/dist/core/combat/Analysis/BalanceValidator.d.ts +170 -0
- package/dist/core/combat/Analysis/BalanceValidator.d.ts.map +1 -0
- package/dist/core/combat/Analysis/ComparativeAnalyzer.d.ts +231 -0
- package/dist/core/combat/Analysis/ComparativeAnalyzer.d.ts.map +1 -0
- package/dist/core/combat/Analysis/DifficultyCalculator.d.ts +203 -0
- package/dist/core/combat/Analysis/DifficultyCalculator.d.ts.map +1 -0
- package/dist/core/combat/Analysis/ParameterSweep.d.ts +201 -0
- package/dist/core/combat/Analysis/ParameterSweep.d.ts.map +1 -0
- package/dist/core/combat/AttackResolver.d.ts +220 -0
- package/dist/core/combat/AttackResolver.d.ts.map +1 -0
- package/dist/core/combat/CombatEngine.d.ts +388 -0
- package/dist/core/combat/CombatEngine.d.ts.map +1 -0
- package/dist/core/combat/DiceRoller.d.ts +115 -0
- package/dist/core/combat/DiceRoller.d.ts.map +1 -0
- package/dist/core/combat/InitiativeRoller.d.ts +62 -0
- package/dist/core/combat/InitiativeRoller.d.ts.map +1 -0
- package/dist/core/combat/PartyAnalyzer.d.ts +215 -0
- package/dist/core/combat/PartyAnalyzer.d.ts.map +1 -0
- package/dist/core/combat/SeededDiceRoller.d.ts +120 -0
- package/dist/core/combat/SeededDiceRoller.d.ts.map +1 -0
- package/dist/core/combat/Simulation/CombatSimulator.d.ts +366 -0
- package/dist/core/combat/Simulation/CombatSimulator.d.ts.map +1 -0
- package/dist/core/combat/SpellCaster.d.ts +113 -0
- package/dist/core/combat/SpellCaster.d.ts.map +1 -0
- package/dist/core/config/index.d.ts +24 -0
- package/dist/core/config/index.d.ts.map +1 -0
- package/dist/core/config/progressionConfig.d.ts +73 -0
- package/dist/core/config/progressionConfig.d.ts.map +1 -0
- package/dist/core/config/sensorConfig.d.ts +134 -0
- package/dist/core/config/sensorConfig.d.ts.map +1 -0
- package/dist/core/equipment/BoxOpener.d.ts +175 -0
- package/dist/core/equipment/BoxOpener.d.ts.map +1 -0
- package/dist/core/equipment/EquipmentEffectApplier.d.ts +189 -0
- package/dist/core/equipment/EquipmentEffectApplier.d.ts.map +1 -0
- package/dist/core/equipment/EquipmentModifier.d.ts +327 -0
- package/dist/core/equipment/EquipmentModifier.d.ts.map +1 -0
- package/dist/core/equipment/EquipmentSpawnHelper.d.ts +246 -0
- package/dist/core/equipment/EquipmentSpawnHelper.d.ts.map +1 -0
- package/dist/core/equipment/EquipmentValidator.d.ts +173 -0
- package/dist/core/equipment/EquipmentValidator.d.ts.map +1 -0
- package/dist/core/extensions/ExtensionManager.d.ts +517 -0
- package/dist/core/extensions/ExtensionManager.d.ts.map +1 -0
- package/dist/core/extensions/WeightedSelector.d.ts +156 -0
- package/dist/core/extensions/WeightedSelector.d.ts.map +1 -0
- package/dist/core/extensions/index.d.ts +11 -0
- package/dist/core/extensions/index.d.ts.map +1 -0
- package/dist/core/extensions/initializeDefaults.d.ts +170 -0
- package/dist/core/extensions/initializeDefaults.d.ts.map +1 -0
- package/dist/core/features/FeatureEffectApplier.d.ts +102 -0
- package/dist/core/features/FeatureEffectApplier.d.ts.map +1 -0
- package/dist/core/features/FeatureQuery.d.ts +368 -0
- package/dist/core/features/FeatureQuery.d.ts.map +1 -0
- package/dist/core/features/FeatureTypes.d.ts +199 -0
- package/dist/core/features/FeatureTypes.d.ts.map +1 -0
- package/dist/core/features/FeatureValidator.d.ts +149 -0
- package/dist/core/features/FeatureValidator.d.ts.map +1 -0
- package/dist/core/features/index.d.ts +12 -0
- package/dist/core/features/index.d.ts.map +1 -0
- package/dist/core/generation/AbilityScoreCalculator.d.ts +83 -0
- package/dist/core/generation/AbilityScoreCalculator.d.ts.map +1 -0
- package/dist/core/generation/AppearanceGenerator.d.ts +32 -0
- package/dist/core/generation/AppearanceGenerator.d.ts.map +1 -0
- package/dist/core/generation/BeatConverter.d.ts +127 -0
- package/dist/core/generation/BeatConverter.d.ts.map +1 -0
- package/dist/core/generation/ButtonMapper.d.ts +346 -0
- package/dist/core/generation/ButtonMapper.d.ts.map +1 -0
- package/dist/core/generation/ButtonPatternLibrary.d.ts +92 -0
- package/dist/core/generation/ButtonPatternLibrary.d.ts.map +1 -0
- package/dist/core/generation/CRLevelConverter.d.ts +242 -0
- package/dist/core/generation/CRLevelConverter.d.ts.map +1 -0
- package/dist/core/generation/CharacterGenerator.d.ts +194 -0
- package/dist/core/generation/CharacterGenerator.d.ts.map +1 -0
- package/dist/core/generation/ClassSuggester.d.ts +184 -0
- package/dist/core/generation/ClassSuggester.d.ts.map +1 -0
- package/dist/core/generation/EnemyEquipmentGenerator.d.ts +151 -0
- package/dist/core/generation/EnemyEquipmentGenerator.d.ts.map +1 -0
- package/dist/core/generation/EnemyGenerator.d.ts +595 -0
- package/dist/core/generation/EnemyGenerator.d.ts.map +1 -0
- package/dist/core/generation/EquipmentGenerator.d.ts +204 -0
- package/dist/core/generation/EquipmentGenerator.d.ts.map +1 -0
- package/dist/core/generation/LegendaryGenerator.d.ts +213 -0
- package/dist/core/generation/LegendaryGenerator.d.ts.map +1 -0
- package/dist/core/generation/LevelGenerator.d.ts +390 -0
- package/dist/core/generation/LevelGenerator.d.ts.map +1 -0
- package/dist/core/generation/NamingEngine.d.ts +136 -0
- package/dist/core/generation/NamingEngine.d.ts.map +1 -0
- package/dist/core/generation/PitchBeatLinker.d.ts +150 -0
- package/dist/core/generation/PitchBeatLinker.d.ts.map +1 -0
- package/dist/core/generation/RaceSelector.d.ts +58 -0
- package/dist/core/generation/RaceSelector.d.ts.map +1 -0
- package/dist/core/generation/RhythmGenerator.d.ts +597 -0
- package/dist/core/generation/RhythmGenerator.d.ts.map +1 -0
- package/dist/core/generation/SkillAssigner.d.ts +78 -0
- package/dist/core/generation/SkillAssigner.d.ts.map +1 -0
- package/dist/core/generation/SpellManager.d.ts +132 -0
- package/dist/core/generation/SpellManager.d.ts.map +1 -0
- package/dist/core/generation/SpellcastingGenerator.d.ts +255 -0
- package/dist/core/generation/SpellcastingGenerator.d.ts.map +1 -0
- package/dist/core/generation/index.d.ts +41 -0
- package/dist/core/generation/index.d.ts.map +1 -0
- package/dist/core/parser/MetadataExtractor.d.ts +66 -0
- package/dist/core/parser/MetadataExtractor.d.ts.map +1 -0
- package/dist/core/parser/PlaylistParser.d.ts +45 -0
- package/dist/core/parser/PlaylistParser.d.ts.map +1 -0
- package/dist/core/playback/SubdivisionPlaybackController.d.ts +333 -0
- package/dist/core/playback/SubdivisionPlaybackController.d.ts.map +1 -0
- package/dist/core/playback/index.d.ts +5 -0
- package/dist/core/playback/index.d.ts.map +1 -0
- package/dist/core/progression/CharacterUpdater.d.ts +203 -0
- package/dist/core/progression/CharacterUpdater.d.ts.map +1 -0
- package/dist/core/progression/LevelUpProcessor.d.ts +234 -0
- package/dist/core/progression/LevelUpProcessor.d.ts.map +1 -0
- package/dist/core/progression/PrestigeSystem.d.ts +217 -0
- package/dist/core/progression/PrestigeSystem.d.ts.map +1 -0
- package/dist/core/progression/RhythmXPCalculator.d.ts +182 -0
- package/dist/core/progression/RhythmXPCalculator.d.ts.map +1 -0
- package/dist/core/progression/SessionTracker.d.ts +169 -0
- package/dist/core/progression/SessionTracker.d.ts.map +1 -0
- package/dist/core/progression/XPCalculator.d.ts +128 -0
- package/dist/core/progression/XPCalculator.d.ts.map +1 -0
- package/dist/core/progression/stat/StatIncreaseStrategy.d.ts +97 -0
- package/dist/core/progression/stat/StatIncreaseStrategy.d.ts.map +1 -0
- package/dist/core/progression/stat/StatManager.d.ts +179 -0
- package/dist/core/progression/stat/StatManager.d.ts.map +1 -0
- package/dist/core/sensors/EnvironmentalSensors.d.ts +301 -0
- package/dist/core/sensors/EnvironmentalSensors.d.ts.map +1 -0
- package/dist/core/sensors/GamingPlatformSensors.d.ts +162 -0
- package/dist/core/sensors/GamingPlatformSensors.d.ts.map +1 -0
- package/dist/core/sensors/GeolocationProvider.d.ts +156 -0
- package/dist/core/sensors/GeolocationProvider.d.ts.map +1 -0
- package/dist/core/sensors/MotionDetector.d.ts +58 -0
- package/dist/core/sensors/MotionDetector.d.ts.map +1 -0
- package/dist/core/sensors/SteamAPIClient.d.ts +108 -0
- package/dist/core/sensors/SteamAPIClient.d.ts.map +1 -0
- package/dist/core/sensors/WeatherAPIClient.d.ts +360 -0
- package/dist/core/sensors/WeatherAPIClient.d.ts.map +1 -0
- package/dist/core/sensors/schemas/weather.schema.d.ts +144 -0
- package/dist/core/sensors/schemas/weather.schema.d.ts.map +1 -0
- package/dist/core/skills/SkillQuery.d.ts +159 -0
- package/dist/core/skills/SkillQuery.d.ts.map +1 -0
- package/dist/core/skills/SkillTypes.d.ts +233 -0
- package/dist/core/skills/SkillTypes.d.ts.map +1 -0
- package/dist/core/skills/SkillValidator.d.ts +146 -0
- package/dist/core/skills/SkillValidator.d.ts.map +1 -0
- package/dist/core/skills/index.d.ts +11 -0
- package/dist/core/skills/index.d.ts.map +1 -0
- package/dist/core/spells/SpellQuery.d.ts +194 -0
- package/dist/core/spells/SpellQuery.d.ts.map +1 -0
- package/dist/core/spells/SpellTypes.d.ts +71 -0
- package/dist/core/spells/SpellTypes.d.ts.map +1 -0
- package/dist/core/spells/SpellValidator.d.ts +129 -0
- package/dist/core/spells/SpellValidator.d.ts.map +1 -0
- package/dist/core/spells/index.d.ts +11 -0
- package/dist/core/spells/index.d.ts.map +1 -0
- package/dist/core/types/AudioProfile.d.ts +143 -0
- package/dist/core/types/AudioProfile.d.ts.map +1 -0
- package/dist/core/types/BeatMap.d.ts +1825 -0
- package/dist/core/types/BeatMap.d.ts.map +1 -0
- package/dist/core/types/ButtonMapping.d.ts +345 -0
- package/dist/core/types/ButtonMapping.d.ts.map +1 -0
- package/dist/core/types/Character.d.ts +397 -0
- package/dist/core/types/Character.d.ts.map +1 -0
- package/dist/core/types/ChartedBeatMap.d.ts +169 -0
- package/dist/core/types/ChartedBeatMap.d.ts.map +1 -0
- package/dist/core/types/Combat.d.ts +268 -0
- package/dist/core/types/Combat.d.ts.map +1 -0
- package/dist/core/types/CombatAI.d.ts +143 -0
- package/dist/core/types/CombatAI.d.ts.map +1 -0
- package/dist/core/types/Enemy.d.ts +447 -0
- package/dist/core/types/Enemy.d.ts.map +1 -0
- package/dist/core/types/Environmental.d.ts +213 -0
- package/dist/core/types/Environmental.d.ts.map +1 -0
- package/dist/core/types/Equipment.d.ts +309 -0
- package/dist/core/types/Equipment.d.ts.map +1 -0
- package/dist/core/types/ISessionTracker.d.ts +48 -0
- package/dist/core/types/ISessionTracker.d.ts.map +1 -0
- package/dist/core/types/LevelExport.d.ts +366 -0
- package/dist/core/types/LevelExport.d.ts.map +1 -0
- package/dist/core/types/Playlist.d.ts +70 -0
- package/dist/core/types/Playlist.d.ts.map +1 -0
- package/dist/core/types/Prestige.d.ts +94 -0
- package/dist/core/types/Prestige.d.ts.map +1 -0
- package/dist/core/types/Progression.d.ts +214 -0
- package/dist/core/types/Progression.d.ts.map +1 -0
- package/dist/core/types/RhythmXP.d.ts +398 -0
- package/dist/core/types/RhythmXP.d.ts.map +1 -0
- package/dist/core/utils/AbilityConstants.d.ts +31 -0
- package/dist/core/utils/AbilityConstants.d.ts.map +1 -0
- package/dist/core/utils/EffectApplierUtils.d.ts +56 -0
- package/dist/core/utils/EffectApplierUtils.d.ts.map +1 -0
- package/dist/core/utils/ImageValidator.d.ts +66 -0
- package/dist/core/utils/ImageValidator.d.ts.map +1 -0
- package/dist/core/utils/PrerequisiteValidator.d.ts +88 -0
- package/dist/core/utils/PrerequisiteValidator.d.ts.map +1 -0
- package/dist/essentia-wasm.es-BUEnKUts.js +2990 -0
- package/dist/essentia.js-model.es-CGA0xotH.js +306 -0
- package/dist/index.d.ts +176 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/playlist-data-engine.js +124 -0
- package/dist/playlist-data-engine.mjs +49251 -0
- package/dist/utils/EnchantmentLibrary.d.ts +378 -0
- package/dist/utils/EnchantmentLibrary.d.ts.map +1 -0
- package/dist/utils/arweaveGatewayManager.d.ts +485 -0
- package/dist/utils/arweaveGatewayManager.d.ts.map +1 -0
- package/dist/utils/arweaveUtils.d.ts +118 -0
- package/dist/utils/arweaveUtils.d.ts.map +1 -0
- package/dist/utils/constants.d.ts +439 -0
- package/dist/utils/constants.d.ts.map +1 -0
- package/dist/utils/equipmentConstants.d.ts +60 -0
- package/dist/utils/equipmentConstants.d.ts.map +1 -0
- package/dist/utils/hash.d.ts +33 -0
- package/dist/utils/hash.d.ts.map +1 -0
- package/dist/utils/logger.d.ts +192 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/magicItemExamples.d.ts +46 -0
- package/dist/utils/magicItemExamples.d.ts.map +1 -0
- package/dist/utils/playlistUtils.d.ts +149 -0
- package/dist/utils/playlistUtils.d.ts.map +1 -0
- package/dist/utils/random.d.ts +34 -0
- package/dist/utils/random.d.ts.map +1 -0
- package/dist/utils/sensorDashboard.d.ts +60 -0
- package/dist/utils/sensorDashboard.d.ts.map +1 -0
- package/dist/utils/validators.d.ts +189 -0
- package/dist/utils/validators.d.ts.map +1 -0
- package/dist/vite.svg +1 -0
- package/package.json +82 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { MotionData } from '../types/Environmental';
|
|
2
|
+
export declare class MotionDetector {
|
|
3
|
+
private logger;
|
|
4
|
+
private isListening;
|
|
5
|
+
private lastMotion;
|
|
6
|
+
private motionCallback;
|
|
7
|
+
private lastProcessedTime;
|
|
8
|
+
private readonly minSampleIntervalMs;
|
|
9
|
+
private deltaBuffer;
|
|
10
|
+
private readonly bufferSize;
|
|
11
|
+
private confirmedActivity;
|
|
12
|
+
private candidateActivity;
|
|
13
|
+
private candidateStartTime;
|
|
14
|
+
private readonly confirmationMs;
|
|
15
|
+
/**
|
|
16
|
+
* Start listening for motion events
|
|
17
|
+
* @param callback Callback function to receive motion data
|
|
18
|
+
*/
|
|
19
|
+
startMonitoring(callback: (data: MotionData) => void): void;
|
|
20
|
+
/**
|
|
21
|
+
* Stop listening for motion events
|
|
22
|
+
*/
|
|
23
|
+
stopMonitoring(): void;
|
|
24
|
+
/**
|
|
25
|
+
* Get the last recorded motion data
|
|
26
|
+
*/
|
|
27
|
+
getLastMotion(): MotionData | null;
|
|
28
|
+
/**
|
|
29
|
+
* Detect activity type based on smoothed motion data
|
|
30
|
+
* @param data MotionData to analyze
|
|
31
|
+
* @returns 'stationary' | 'walking' | 'running' | 'driving' | 'unknown'
|
|
32
|
+
*
|
|
33
|
+
* @remarks
|
|
34
|
+
* When the smoothing buffer has enough samples (from live monitoring),
|
|
35
|
+
* returns the confirmed activity state which only changes after the new
|
|
36
|
+
* state has been sustained for `confirmationMs`. This prevents rapid
|
|
37
|
+
* flickering between stationary/walking when the accelerometer oscillates
|
|
38
|
+
* during each footfall.
|
|
39
|
+
*
|
|
40
|
+
* Falls back to instantaneous classification when the buffer is empty
|
|
41
|
+
* (e.g. before monitoring starts or on devices without real accelerometers).
|
|
42
|
+
*/
|
|
43
|
+
detectActivity(data: MotionData): 'stationary' | 'walking' | 'running' | 'driving' | 'unknown';
|
|
44
|
+
/**
|
|
45
|
+
* Feed a new acceleration delta into the smoothing buffer and update
|
|
46
|
+
* the confirmed activity state.
|
|
47
|
+
*
|
|
48
|
+
* The smoothing works bidirectionally:
|
|
49
|
+
* - stationary → walking requires sustained motion above the threshold
|
|
50
|
+
* - walking → stationary requires sustained stillness below the threshold
|
|
51
|
+
*
|
|
52
|
+
* Both directions require the new state to persist for `confirmationMs`
|
|
53
|
+
* before the confirmed state changes, preventing UI jitter.
|
|
54
|
+
*/
|
|
55
|
+
private updateSmoothing;
|
|
56
|
+
private handleMotion;
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=MotionDetector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MotionDetector.d.ts","sourceRoot":"","sources":["../../../src/core/sensors/MotionDetector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAGzD,qBAAa,cAAc;IACvB,OAAO,CAAC,MAAM,CAAgC;IAC9C,OAAO,CAAC,WAAW,CAAkB;IACrC,OAAO,CAAC,UAAU,CAA2B;IAC7C,OAAO,CAAC,cAAc,CAA6C;IAInE,OAAO,CAAC,iBAAiB,CAAa;IACtC,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAM;IAM1C,OAAO,CAAC,WAAW,CAAgB;IACnC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAM;IACjC,OAAO,CAAC,iBAAiB,CAA2E;IACpG,OAAO,CAAC,iBAAiB,CAA6E;IACtG,OAAO,CAAC,kBAAkB,CAAa;IACvC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAQ;IAEvC;;;OAGG;IACH,eAAe,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,GAAG,IAAI;IAiB3D;;OAEG;IACH,cAAc,IAAI,IAAI;IAatB;;OAEG;IACH,aAAa,IAAI,UAAU,GAAG,IAAI;IAIlC;;;;;;;;;;;;;;OAcG;IACH,cAAc,CAAC,IAAI,EAAE,UAAU,GAAG,YAAY,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS;IAyB9F;;;;;;;;;;OAUG;IACH,OAAO,CAAC,eAAe;IAmCvB,OAAO,CAAC,YAAY,CAkDlB;CACL"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Performance metrics for API calls
|
|
3
|
+
*/
|
|
4
|
+
interface PerformanceMetrics {
|
|
5
|
+
successCount: number;
|
|
6
|
+
errorCount: number;
|
|
7
|
+
totalTime: number;
|
|
8
|
+
minTime: number;
|
|
9
|
+
maxTime: number;
|
|
10
|
+
lastCallTimestamp: number | null;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* SteamAPIClient - Handles integration with Steam Web API
|
|
14
|
+
* Fetches currently played games and game metadata
|
|
15
|
+
*/
|
|
16
|
+
export declare class SteamAPIClient {
|
|
17
|
+
private apiKey;
|
|
18
|
+
private baseUrl;
|
|
19
|
+
private logger;
|
|
20
|
+
private currentGameApiMetrics;
|
|
21
|
+
private metadataApiMetrics;
|
|
22
|
+
private recentCurrentGameTimes;
|
|
23
|
+
private recentMetadataTimes;
|
|
24
|
+
private readonly maxRecentSamples;
|
|
25
|
+
constructor(apiKey?: string);
|
|
26
|
+
/**
|
|
27
|
+
* Calculate percentile from an array of numbers
|
|
28
|
+
*/
|
|
29
|
+
private calculatePercentile;
|
|
30
|
+
/**
|
|
31
|
+
* Record performance metrics for current game API call
|
|
32
|
+
*/
|
|
33
|
+
private recordCurrentGameApiCall;
|
|
34
|
+
/**
|
|
35
|
+
* Record performance metrics for metadata API call
|
|
36
|
+
*/
|
|
37
|
+
private recordMetadataApiCall;
|
|
38
|
+
/**
|
|
39
|
+
* Get performance metrics for current game API
|
|
40
|
+
*/
|
|
41
|
+
getCurrentGameApiMetrics(): PerformanceMetrics;
|
|
42
|
+
/**
|
|
43
|
+
* Get performance statistics for current game API
|
|
44
|
+
*/
|
|
45
|
+
getCurrentGameApiStatistics(): {
|
|
46
|
+
average: number;
|
|
47
|
+
min: number;
|
|
48
|
+
max: number;
|
|
49
|
+
totalCalls: number;
|
|
50
|
+
successRate: number;
|
|
51
|
+
p95: number;
|
|
52
|
+
p99: number;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Get performance metrics for metadata API
|
|
56
|
+
*/
|
|
57
|
+
getMetadataApiMetrics(): PerformanceMetrics;
|
|
58
|
+
/**
|
|
59
|
+
* Get performance statistics for metadata API
|
|
60
|
+
*/
|
|
61
|
+
getMetadataApiStatistics(): {
|
|
62
|
+
average: number;
|
|
63
|
+
min: number;
|
|
64
|
+
max: number;
|
|
65
|
+
totalCalls: number;
|
|
66
|
+
successRate: number;
|
|
67
|
+
p95: number;
|
|
68
|
+
p99: number;
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* Reset all performance metrics
|
|
72
|
+
*/
|
|
73
|
+
resetPerformanceMetrics(): void;
|
|
74
|
+
/**
|
|
75
|
+
* Get currently played game for a Steam user
|
|
76
|
+
* Uses ISteamUser/GetPlayerSummaries to detect real-time "in-game" status.
|
|
77
|
+
* GetPlayerSummaries returns `gameextrainfo` and `gameid` only when the user
|
|
78
|
+
* is actively in a game right now — unlike GetRecentlyPlayedGames which only
|
|
79
|
+
* shows games played in the last 2 weeks with no "currently playing" indicator.
|
|
80
|
+
*/
|
|
81
|
+
getCurrentGame(steamUserId: string): Promise<{
|
|
82
|
+
name: string;
|
|
83
|
+
appId: number;
|
|
84
|
+
source: 'steam';
|
|
85
|
+
sessionDuration?: number;
|
|
86
|
+
} | null>;
|
|
87
|
+
/**
|
|
88
|
+
* Get game metadata (genre, description, etc.)
|
|
89
|
+
* Uses ISteamApps/GetAppList and store API to fetch game details
|
|
90
|
+
*/
|
|
91
|
+
getGameMetadata(gameName: string): Promise<{
|
|
92
|
+
appId?: number;
|
|
93
|
+
name: string;
|
|
94
|
+
genre?: string[];
|
|
95
|
+
description?: string;
|
|
96
|
+
} | null>;
|
|
97
|
+
/**
|
|
98
|
+
* Find Steam app ID by game name
|
|
99
|
+
*/
|
|
100
|
+
private findAppId;
|
|
101
|
+
/**
|
|
102
|
+
* Get game schema/stats for a game
|
|
103
|
+
* Uses ISteamUserStats/GetSchemaForGame
|
|
104
|
+
*/
|
|
105
|
+
getGameSchema(appId: number): Promise<any>;
|
|
106
|
+
}
|
|
107
|
+
export {};
|
|
108
|
+
//# sourceMappingURL=SteamAPIClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SteamAPIClient.d.ts","sourceRoot":"","sources":["../../../src/core/sensors/SteamAPIClient.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,UAAU,kBAAkB;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;CACpC;AAED;;;GAGG;AACH,qBAAa,cAAc;IACvB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,OAAO,CAA0C;IACzD,OAAO,CAAC,MAAM,CAAgC;IAG9C,OAAO,CAAC,qBAAqB,CAO3B;IAGF,OAAO,CAAC,k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QACf,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;QACjB,WAAW,CAAC,EAAE,MAAM,CAAC;KACxB,GAAG,IAAI,CAAC;IA2CT;;OAEG;YACW,SAAS;IA2BvB;;;OAGG;IACG,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;CAoBnD"}
|
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
import type { WeatherData, ForecastData, PerformanceMetrics, PerformanceStatistics, SolarInfo } from '../types/Environmental';
|
|
2
|
+
import type { WeatherSensorConfig } from '../config/sensorConfig.js';
|
|
3
|
+
interface CacheStatistics {
|
|
4
|
+
hits: number;
|
|
5
|
+
misses: number;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Severe weather alert types with XP bonus multipliers
|
|
9
|
+
*/
|
|
10
|
+
export declare enum SevereWeatherType {
|
|
11
|
+
Blizzard = "Blizzard",
|
|
12
|
+
Hurricane = "Hurricane",
|
|
13
|
+
Typhoon = "Typhoon",
|
|
14
|
+
Tornado = "Tornado",
|
|
15
|
+
None = "None"
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Severe weather alert information
|
|
19
|
+
*/
|
|
20
|
+
export interface SevereWeatherAlert {
|
|
21
|
+
type: SevereWeatherType;
|
|
22
|
+
xpBonus: number;
|
|
23
|
+
severity: 'moderate' | 'high' | 'extreme';
|
|
24
|
+
message: string;
|
|
25
|
+
detectedAt: number;
|
|
26
|
+
}
|
|
27
|
+
export declare class WeatherAPIClient {
|
|
28
|
+
private apiKey;
|
|
29
|
+
private baseUrl;
|
|
30
|
+
private forecastUrl;
|
|
31
|
+
private cache;
|
|
32
|
+
private forecastCache;
|
|
33
|
+
private cacheTTL;
|
|
34
|
+
private forecastCacheTTL;
|
|
35
|
+
private cacheStats;
|
|
36
|
+
private useLocalStorage;
|
|
37
|
+
private logger;
|
|
38
|
+
private lastKnownLocation;
|
|
39
|
+
private weatherApiMetrics;
|
|
40
|
+
private forecastApiMetrics;
|
|
41
|
+
private recentWeatherApiTimes;
|
|
42
|
+
private recentForecastApiTimes;
|
|
43
|
+
private readonly maxRecentSamples;
|
|
44
|
+
constructor(apiKey?: string, cacheTTLMinutes?: number, useLocalStorage?: boolean);
|
|
45
|
+
constructor(config: WeatherSensorConfig);
|
|
46
|
+
/**
|
|
47
|
+
* Check if localStorage is available
|
|
48
|
+
*/
|
|
49
|
+
private isLocalStorageAvailable;
|
|
50
|
+
/**
|
|
51
|
+
* Load cache from localStorage
|
|
52
|
+
*/
|
|
53
|
+
private loadFromLocalStorage;
|
|
54
|
+
/**
|
|
55
|
+
* Save cache to localStorage
|
|
56
|
+
*/
|
|
57
|
+
private saveToLocalStorage;
|
|
58
|
+
/**
|
|
59
|
+
* Start timing an API call
|
|
60
|
+
* @returns A function that when called, records the elapsed time
|
|
61
|
+
*/
|
|
62
|
+
private startTiming;
|
|
63
|
+
/**
|
|
64
|
+
* Record performance metrics for weather API call
|
|
65
|
+
*/
|
|
66
|
+
private recordWeatherApiCall;
|
|
67
|
+
/**
|
|
68
|
+
* Record performance metrics for forecast API call
|
|
69
|
+
*/
|
|
70
|
+
private recordForecastApiCall;
|
|
71
|
+
/**
|
|
72
|
+
* Calculate percentile from an array of numbers
|
|
73
|
+
*/
|
|
74
|
+
private calculatePercentile;
|
|
75
|
+
/**
|
|
76
|
+
* Get performance statistics for weather API
|
|
77
|
+
*/
|
|
78
|
+
private getPerformanceStatistics;
|
|
79
|
+
/**
|
|
80
|
+
* Get performance metrics for weather API
|
|
81
|
+
* @returns Performance metrics for current weather API calls
|
|
82
|
+
*/
|
|
83
|
+
getWeatherApiMetrics(): PerformanceMetrics;
|
|
84
|
+
/**
|
|
85
|
+
* Get performance statistics for weather API
|
|
86
|
+
* @returns Calculated performance statistics including average, min, max, success rate
|
|
87
|
+
*/
|
|
88
|
+
getWeatherApiStatistics(): PerformanceStatistics & {
|
|
89
|
+
p95: number;
|
|
90
|
+
p99: number;
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* Get performance metrics for forecast API
|
|
94
|
+
* @returns Performance metrics for forecast API calls
|
|
95
|
+
*/
|
|
96
|
+
getForecastApiMetrics(): PerformanceMetrics;
|
|
97
|
+
/**
|
|
98
|
+
* Get performance statistics for forecast API
|
|
99
|
+
* @returns Calculated performance statistics including average, min, max, success rate
|
|
100
|
+
*/
|
|
101
|
+
getForecastApiStatistics(): PerformanceStatistics & {
|
|
102
|
+
p95: number;
|
|
103
|
+
p99: number;
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* Reset all performance metrics
|
|
107
|
+
*/
|
|
108
|
+
resetPerformanceMetrics(): void;
|
|
109
|
+
/**
|
|
110
|
+
* Generate cache key from coordinates
|
|
111
|
+
* @param latitude Latitude
|
|
112
|
+
* @param longitude Longitude
|
|
113
|
+
* @returns Cache key string
|
|
114
|
+
*/
|
|
115
|
+
private getCacheKey;
|
|
116
|
+
/**
|
|
117
|
+
* Check if a cache entry is still valid
|
|
118
|
+
* @param entry Cache entry to validate
|
|
119
|
+
* @returns True if entry is valid and within TTL
|
|
120
|
+
*/
|
|
121
|
+
private isCacheEntryValid;
|
|
122
|
+
/**
|
|
123
|
+
* Calculate the moon phase for a given date using astronomical algorithms.
|
|
124
|
+
*
|
|
125
|
+
* Returns a value between 0 and 1 representing the moon's illumination phase:
|
|
126
|
+
* - 0.0 = New Moon (completely dark)
|
|
127
|
+
* - 0.25 = First Quarter (half illuminated, waxing)
|
|
128
|
+
* - 0.5 = Full Moon (fully illuminated)
|
|
129
|
+
* - 0.75 = Last Quarter (half illuminated, waning)
|
|
130
|
+
* - 1.0 = New Moon (cycle completes)
|
|
131
|
+
*
|
|
132
|
+
* Algorithm: Uses a simplified version of the Conway method combined with
|
|
133
|
+
* astronomical calculations based on the known date of a new moon reference.
|
|
134
|
+
*
|
|
135
|
+
* Reference: Based on the mean synodic month of 29.530588853 days
|
|
136
|
+
* (the average time from new moon to new moon).
|
|
137
|
+
*
|
|
138
|
+
* @param date The date for which to calculate the moon phase
|
|
139
|
+
* @returns Moon phase value between 0 and 1
|
|
140
|
+
*/
|
|
141
|
+
private calculateMoonPhase;
|
|
142
|
+
/**
|
|
143
|
+
* Get solar information including sunrise, sunset, and day stage.
|
|
144
|
+
* Works WITHOUT API key using astronomical calculations (NOAA algorithm).
|
|
145
|
+
*
|
|
146
|
+
* @param latitude - Latitude in decimal degrees (-90 to 90)
|
|
147
|
+
* @param longitude - Longitude in decimal degrees (-180 to 180)
|
|
148
|
+
* @param date - Optional date for calculation (defaults to now)
|
|
149
|
+
* @returns SolarInfo object with sunrise, sunset, solar noon, and day stage
|
|
150
|
+
*/
|
|
151
|
+
getSolarInfo(latitude: number, longitude: number, date?: Date): SolarInfo;
|
|
152
|
+
/**
|
|
153
|
+
* Calculate solar information using astronomical formulas (NOAA algorithm)
|
|
154
|
+
* Based on "Astronomical Algorithms" by Jean Meeus
|
|
155
|
+
*/
|
|
156
|
+
private calculateSolarInfo;
|
|
157
|
+
/**
|
|
158
|
+
* Convert degrees to radians
|
|
159
|
+
*/
|
|
160
|
+
private toRadians;
|
|
161
|
+
/**
|
|
162
|
+
* Convert radians to degrees
|
|
163
|
+
*/
|
|
164
|
+
private toDegrees;
|
|
165
|
+
/**
|
|
166
|
+
* Calculate Julian Date from a Date object
|
|
167
|
+
* Julian Date is a continuous count of days since January 1, 4713 BC
|
|
168
|
+
*/
|
|
169
|
+
private calculateJulianDate;
|
|
170
|
+
/**
|
|
171
|
+
* Calculate Julian Century from Julian Date
|
|
172
|
+
* Julian Century is used in solar position calculations
|
|
173
|
+
*/
|
|
174
|
+
private calculateJulianCentury;
|
|
175
|
+
/**
|
|
176
|
+
* Calculate the sun's declination angle at a given Julian century
|
|
177
|
+
* Returns declination in degrees
|
|
178
|
+
*/
|
|
179
|
+
private calculateSolarDeclination;
|
|
180
|
+
/**
|
|
181
|
+
* Calculate the equation of time (minutes)
|
|
182
|
+
* This accounts for the difference between apparent solar time and mean solar time
|
|
183
|
+
*/
|
|
184
|
+
private calculateEquationOfTime;
|
|
185
|
+
/**
|
|
186
|
+
* Calculate hour angle for sunrise/sunset
|
|
187
|
+
* @param latitude - Latitude in degrees
|
|
188
|
+
* @param declination - Solar declination in degrees
|
|
189
|
+
* @param zenith - Zenith angle (90.833 for sunrise/sunset, 96 for civil twilight)
|
|
190
|
+
* @returns Hour angle in degrees, or NaN if sun doesn't rise/set (polar regions)
|
|
191
|
+
*/
|
|
192
|
+
private calculateHourAngle;
|
|
193
|
+
/**
|
|
194
|
+
* Calculate sunrise or sunset time
|
|
195
|
+
* @param latitude - Latitude in degrees
|
|
196
|
+
* @param longitude - Longitude in degrees
|
|
197
|
+
* @param date - Date to calculate for
|
|
198
|
+
* @param isSunrise - True for sunrise, false for sunset
|
|
199
|
+
* @returns Date object with sunrise/sunset time (UTC), or Invalid Date for polar regions
|
|
200
|
+
*/
|
|
201
|
+
private calculateSunriseSunset;
|
|
202
|
+
/**
|
|
203
|
+
* Calculate solar noon time
|
|
204
|
+
* @param latitude - Latitude in degrees (not used in calculation but kept for consistency)
|
|
205
|
+
* @param longitude - Longitude in degrees
|
|
206
|
+
* @param date - Date to calculate for
|
|
207
|
+
* @returns Date object with solar noon time (UTC)
|
|
208
|
+
*/
|
|
209
|
+
private calculateSolarNoon;
|
|
210
|
+
/**
|
|
211
|
+
* Calculate twilight time (dawn or dusk)
|
|
212
|
+
* @param latitude - Latitude in degrees
|
|
213
|
+
* @param longitude - Longitude in degrees
|
|
214
|
+
* @param date - Date to calculate for
|
|
215
|
+
* @param type - Twilight type: 'civil' (6°), 'nautical' (12°), or 'astronomical' (18°)
|
|
216
|
+
* @param isDawn - True for dawn, false for dusk
|
|
217
|
+
* @returns Date object with twilight time (UTC), or Invalid Date for polar regions
|
|
218
|
+
*/
|
|
219
|
+
private calculateTwilight;
|
|
220
|
+
/**
|
|
221
|
+
* Calculate current sun position (altitude and azimuth)
|
|
222
|
+
* @param latitude - Latitude in degrees
|
|
223
|
+
* @param longitude - Longitude in degrees
|
|
224
|
+
* @param date - Date/time to calculate for
|
|
225
|
+
* @returns Object with altitude and azimuth in degrees
|
|
226
|
+
*/
|
|
227
|
+
private calculateSunPosition;
|
|
228
|
+
/**
|
|
229
|
+
* Determine the current day stage based on time relative to sunrise/sunset/twilight
|
|
230
|
+
*/
|
|
231
|
+
private determineDayStage;
|
|
232
|
+
/**
|
|
233
|
+
* Fetch current weather for coordinates
|
|
234
|
+
* @param latitude Latitude
|
|
235
|
+
* @param longitude Longitude
|
|
236
|
+
* @returns Promise resolving to WeatherData or null if failed
|
|
237
|
+
*/
|
|
238
|
+
getWeather(latitude: number, longitude: number): Promise<WeatherData | null>;
|
|
239
|
+
/**
|
|
240
|
+
* Invalidate all cached weather data
|
|
241
|
+
*/
|
|
242
|
+
invalidateCache(): void;
|
|
243
|
+
/**
|
|
244
|
+
* Invalidate cache for a specific location
|
|
245
|
+
* @param latitude Latitude
|
|
246
|
+
* @param longitude Longitude
|
|
247
|
+
*/
|
|
248
|
+
invalidateLocation(latitude: number, longitude: number): void;
|
|
249
|
+
/**
|
|
250
|
+
* Get cache statistics
|
|
251
|
+
* @returns Cache statistics object
|
|
252
|
+
*/
|
|
253
|
+
getCacheStats(): CacheStatistics;
|
|
254
|
+
/**
|
|
255
|
+
* Reset cache statistics
|
|
256
|
+
*/
|
|
257
|
+
resetCacheStats(): void;
|
|
258
|
+
/**
|
|
259
|
+
* Clear expired cache entries
|
|
260
|
+
* @returns Number of entries cleared
|
|
261
|
+
*/
|
|
262
|
+
clearExpiredEntries(): number;
|
|
263
|
+
/**
|
|
264
|
+
* Get current cache size
|
|
265
|
+
* @returns Number of cached entries
|
|
266
|
+
*/
|
|
267
|
+
getCacheSize(): number;
|
|
268
|
+
/**
|
|
269
|
+
* Get the last known location used for weather queries
|
|
270
|
+
* Used for tropical region detection in severe weather alerts
|
|
271
|
+
* @returns Last known location or null if no weather has been fetched
|
|
272
|
+
*/
|
|
273
|
+
getLastKnownLocation(): {
|
|
274
|
+
latitude: number;
|
|
275
|
+
longitude: number;
|
|
276
|
+
} | null;
|
|
277
|
+
/**
|
|
278
|
+
* Check if a forecast cache entry is still valid
|
|
279
|
+
* @param entry Forecast cache entry to validate
|
|
280
|
+
* @returns True if entry is valid and within TTL
|
|
281
|
+
*/
|
|
282
|
+
private isForecastCacheEntryValid;
|
|
283
|
+
/**
|
|
284
|
+
* Generate forecast cache key with hours limit
|
|
285
|
+
* @param latitude Latitude
|
|
286
|
+
* @param longitude Longitude
|
|
287
|
+
* @param hours Number of hours to forecast
|
|
288
|
+
* @returns Forecast cache key string
|
|
289
|
+
*/
|
|
290
|
+
private getForecastCacheKey;
|
|
291
|
+
/**
|
|
292
|
+
* Fetch weather forecast for coordinates
|
|
293
|
+
* @param latitude Latitude
|
|
294
|
+
* @param longitude Longitude
|
|
295
|
+
* @param hours Number of hours to return (max 120 hours / 5 days)
|
|
296
|
+
* @returns Promise resolving to array of ForecastData or null if failed
|
|
297
|
+
*/
|
|
298
|
+
getForecast(latitude: number, longitude: number, hours?: number): Promise<ForecastData[] | null>;
|
|
299
|
+
/**
|
|
300
|
+
* Get upcoming weather changes for XP modifier calculation
|
|
301
|
+
* @param latitude Latitude
|
|
302
|
+
* @param longitude Longitude
|
|
303
|
+
* @param hours Hours ahead to check (default: 12 hours)
|
|
304
|
+
* @returns Promise resolving to upcoming weather info or null
|
|
305
|
+
*/
|
|
306
|
+
getUpcomingWeather(latitude: number, longitude: number, hours?: number): Promise<{
|
|
307
|
+
willRain: boolean;
|
|
308
|
+
willSnow: boolean;
|
|
309
|
+
rainProbability: number;
|
|
310
|
+
snowProbability: number;
|
|
311
|
+
worstWeatherType: string;
|
|
312
|
+
} | null>;
|
|
313
|
+
/**
|
|
314
|
+
* Detect severe weather conditions from current or forecast data
|
|
315
|
+
*
|
|
316
|
+
* Analyzes weather conditions to detect severe weather events including:
|
|
317
|
+
* - Blizzard: Heavy snow with high winds (>25 km/h)
|
|
318
|
+
* - Hurricane/Typhoon: Extreme wind speeds (>118 km/h) with rain/storm
|
|
319
|
+
* - Tornado: Tornado weather type detected (API-specific)
|
|
320
|
+
*
|
|
321
|
+
* @param weather Weather data to analyze
|
|
322
|
+
* @returns Severe weather alert or null if conditions are normal
|
|
323
|
+
*/
|
|
324
|
+
detectSevereWeather(weather: WeatherData | ForecastData): SevereWeatherAlert | null;
|
|
325
|
+
/**
|
|
326
|
+
* Helper method to determine if a location is in tropical region
|
|
327
|
+
*
|
|
328
|
+
* Tropical regions are roughly between the Tropic of Cancer (23.5°N) and
|
|
329
|
+
* the Tropic of Capricorn (23.5°S). This is where hurricanes and typhoons
|
|
330
|
+
* are most likely to form.
|
|
331
|
+
*
|
|
332
|
+
* @param latitude Latitude in decimal degrees
|
|
333
|
+
* @returns True if in tropical region (between 23.5°N and 23.5°S)
|
|
334
|
+
*/
|
|
335
|
+
private isTropicalRegion;
|
|
336
|
+
/**
|
|
337
|
+
* Get safety warning message for severe weather
|
|
338
|
+
*
|
|
339
|
+
* @param alert Severe weather alert
|
|
340
|
+
* @returns Safety warning message with recommendations
|
|
341
|
+
*/
|
|
342
|
+
getSafetyWarning(alert: SevereWeatherAlert): string;
|
|
343
|
+
/**
|
|
344
|
+
* Invalidate all forecast cache
|
|
345
|
+
*/
|
|
346
|
+
invalidateForecastCache(): void;
|
|
347
|
+
/**
|
|
348
|
+
* Invalidate forecast cache for a specific location
|
|
349
|
+
* @param latitude Latitude
|
|
350
|
+
* @param longitude Longitude
|
|
351
|
+
*/
|
|
352
|
+
invalidateForecastLocation(latitude: number, longitude: number): void;
|
|
353
|
+
/**
|
|
354
|
+
* Clear expired forecast cache entries
|
|
355
|
+
* @returns Number of entries cleared
|
|
356
|
+
*/
|
|
357
|
+
clearExpiredForecastEntries(): number;
|
|
358
|
+
}
|
|
359
|
+
export {};
|
|
360
|
+
//# sourceMappingURL=WeatherAPIClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,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AAS,EAAE,MAAM,EAAE,KAAK,GAAE,MAAW,GAAG,OAAO,CAAC;QACvF,QAAQ,EAAE,OAAO,CAAC;QAClB,QAAQ,EAAE,OAAO,CAAC;QAClB,eAAe,EAAE,MAAM,CAAC;QACxB,eAAe,EAAE,MAAM,CAAC;QACxB,gBAAgB,EAAE,MAAM,CAAC;KAC5B,GAAG,IAAI,CAAC;IAoET;;;;;;;;;;OAUG;IACH,mBAAmB,CAAC,OAAO,EAAE,WAAW,GAAG,YAAY,GAAG,kBAAkB,GAAG,IAAI;IAiEnF;;;;;;;;;OASG;IACH,OAAO,CAAC,gBAAgB;IAKxB;;;;;OAKG;IACH,gBAAgB,CAAC,KAAK,EAAE,kBAAkB,GAAG,MAAM;IAkBnD;;OAEG;IACH,uBAAuB,IAAI,IAAI;IAI/B;;;;OAIG;IACH,0BAA0B,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI;IAUrE;;;OAGG;IACH,2BAA2B,IAAI,MAAM;CAUxC"}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod validation schemas for OpenWeatherMap API responses
|
|
3
|
+
*
|
|
4
|
+
* These schemas validate the structure of responses from:
|
|
5
|
+
* - Current Weather API: https://api.openweathermap.org/data/2.5/weather
|
|
6
|
+
* - 5-Day/3-Hour Forecast API: https://api.openweathermap.org/data/2.5/forecast
|
|
7
|
+
*
|
|
8
|
+
* Reference: https://openweathermap.org/api
|
|
9
|
+
*/
|
|
10
|
+
import { z } from 'zod';
|
|
11
|
+
/**
|
|
12
|
+
* OpenWeatherMap Current Weather API Response Schema
|
|
13
|
+
*
|
|
14
|
+
* Validates responses from the /weather endpoint
|
|
15
|
+
*
|
|
16
|
+
* Example response structure:
|
|
17
|
+
* {
|
|
18
|
+
* "coord": { "lon": 10.99, "lat": 44.34 },
|
|
19
|
+
* "weather": [{ "id": 501, "main": "Rain", "description": "moderate rain", "icon": "10d" }],
|
|
20
|
+
* "main": { "temp": 298.48, "pressure": 1015, "humidity": 64 },
|
|
21
|
+
* "wind": { "speed": 0.62, "deg": 349 },
|
|
22
|
+
* "sys": { "sunrise": 1661834187, "sunset": 1661882248 }
|
|
23
|
+
* }
|
|
24
|
+
*/
|
|
25
|
+
export declare const OpenWeatherMapCurrentResponseSchema: z.ZodObject<{
|
|
26
|
+
coord: z.ZodOptional<z.ZodObject<{
|
|
27
|
+
lon: z.ZodNumber;
|
|
28
|
+
lat: z.ZodNumber;
|
|
29
|
+
}, z.core.$strip>>;
|
|
30
|
+
weather: z.ZodArray<z.ZodObject<{
|
|
31
|
+
id: z.ZodNumber;
|
|
32
|
+
main: z.ZodString;
|
|
33
|
+
description: z.ZodString;
|
|
34
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
35
|
+
}, z.core.$strip>>;
|
|
36
|
+
base: z.ZodOptional<z.ZodString>;
|
|
37
|
+
main: z.ZodObject<{
|
|
38
|
+
temp: z.ZodNumber;
|
|
39
|
+
feels_like: z.ZodOptional<z.ZodNumber>;
|
|
40
|
+
temp_min: z.ZodOptional<z.ZodNumber>;
|
|
41
|
+
temp_max: z.ZodOptional<z.ZodNumber>;
|
|
42
|
+
pressure: z.ZodNumber;
|
|
43
|
+
humidity: z.ZodNumber;
|
|
44
|
+
sea_level: z.ZodOptional<z.ZodNumber>;
|
|
45
|
+
grnd_level: z.ZodOptional<z.ZodNumber>;
|
|
46
|
+
temp_kf: z.ZodOptional<z.ZodNumber>;
|
|
47
|
+
}, z.core.$strip>;
|
|
48
|
+
visibility: z.ZodOptional<z.ZodNumber>;
|
|
49
|
+
wind: z.ZodOptional<z.ZodObject<{
|
|
50
|
+
speed: z.ZodNumber;
|
|
51
|
+
deg: z.ZodOptional<z.ZodNumber>;
|
|
52
|
+
gust: z.ZodOptional<z.ZodNumber>;
|
|
53
|
+
}, z.core.$strip>>;
|
|
54
|
+
rain: z.ZodOptional<z.ZodObject<{
|
|
55
|
+
'1h': z.ZodOptional<z.ZodNumber>;
|
|
56
|
+
'3h': z.ZodOptional<z.ZodNumber>;
|
|
57
|
+
}, z.core.$strip>>;
|
|
58
|
+
snow: z.ZodOptional<z.ZodObject<{
|
|
59
|
+
'1h': z.ZodOptional<z.ZodNumber>;
|
|
60
|
+
'3h': z.ZodOptional<z.ZodNumber>;
|
|
61
|
+
}, z.core.$strip>>;
|
|
62
|
+
clouds: z.ZodOptional<z.ZodObject<{
|
|
63
|
+
all: z.ZodNumber;
|
|
64
|
+
}, z.core.$strip>>;
|
|
65
|
+
dt: z.ZodNumber;
|
|
66
|
+
sys: z.ZodObject<{
|
|
67
|
+
type: z.ZodOptional<z.ZodNumber>;
|
|
68
|
+
id: z.ZodOptional<z.ZodNumber>;
|
|
69
|
+
country: z.ZodOptional<z.ZodString>;
|
|
70
|
+
sunrise: z.ZodNumber;
|
|
71
|
+
sunset: z.ZodNumber;
|
|
72
|
+
pod: z.ZodOptional<z.ZodString>;
|
|
73
|
+
}, z.core.$strip>;
|
|
74
|
+
timezone: z.ZodOptional<z.ZodNumber>;
|
|
75
|
+
id: z.ZodOptional<z.ZodNumber>;
|
|
76
|
+
name: z.ZodOptional<z.ZodString>;
|
|
77
|
+
cod: z.ZodOptional<z.ZodNumber>;
|
|
78
|
+
}, z.core.$strip>;
|
|
79
|
+
export declare const OpenWeatherMapForecastResponseSchema: z.ZodObject<{
|
|
80
|
+
cod: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
81
|
+
message: z.ZodOptional<z.ZodNumber>;
|
|
82
|
+
cnt: z.ZodOptional<z.ZodNumber>;
|
|
83
|
+
list: z.ZodArray<z.ZodObject<{
|
|
84
|
+
dt: z.ZodNumber;
|
|
85
|
+
main: z.ZodObject<{
|
|
86
|
+
temp: z.ZodNumber;
|
|
87
|
+
feels_like: z.ZodOptional<z.ZodNumber>;
|
|
88
|
+
temp_min: z.ZodOptional<z.ZodNumber>;
|
|
89
|
+
temp_max: z.ZodOptional<z.ZodNumber>;
|
|
90
|
+
pressure: z.ZodNumber;
|
|
91
|
+
humidity: z.ZodNumber;
|
|
92
|
+
sea_level: z.ZodOptional<z.ZodNumber>;
|
|
93
|
+
grnd_level: z.ZodOptional<z.ZodNumber>;
|
|
94
|
+
temp_kf: z.ZodOptional<z.ZodNumber>;
|
|
95
|
+
}, z.core.$strip>;
|
|
96
|
+
weather: z.ZodArray<z.ZodObject<{
|
|
97
|
+
id: z.ZodNumber;
|
|
98
|
+
main: z.ZodString;
|
|
99
|
+
description: z.ZodString;
|
|
100
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
101
|
+
}, z.core.$strip>>;
|
|
102
|
+
clouds: z.ZodOptional<z.ZodObject<{
|
|
103
|
+
all: z.ZodNumber;
|
|
104
|
+
}, z.core.$strip>>;
|
|
105
|
+
wind: z.ZodOptional<z.ZodObject<{
|
|
106
|
+
speed: z.ZodNumber;
|
|
107
|
+
deg: z.ZodOptional<z.ZodNumber>;
|
|
108
|
+
gust: z.ZodOptional<z.ZodNumber>;
|
|
109
|
+
}, z.core.$strip>>;
|
|
110
|
+
visibility: z.ZodOptional<z.ZodNumber>;
|
|
111
|
+
pop: z.ZodOptional<z.ZodNumber>;
|
|
112
|
+
rain: z.ZodOptional<z.ZodObject<{
|
|
113
|
+
'1h': z.ZodOptional<z.ZodNumber>;
|
|
114
|
+
'3h': z.ZodOptional<z.ZodNumber>;
|
|
115
|
+
}, z.core.$strip>>;
|
|
116
|
+
snow: z.ZodOptional<z.ZodObject<{
|
|
117
|
+
'1h': z.ZodOptional<z.ZodNumber>;
|
|
118
|
+
'3h': z.ZodOptional<z.ZodNumber>;
|
|
119
|
+
}, z.core.$strip>>;
|
|
120
|
+
sys: z.ZodOptional<z.ZodObject<{
|
|
121
|
+
pod: z.ZodOptional<z.ZodString>;
|
|
122
|
+
}, z.core.$strip>>;
|
|
123
|
+
dt_txt: z.ZodOptional<z.ZodString>;
|
|
124
|
+
}, z.core.$strip>>;
|
|
125
|
+
city: z.ZodOptional<z.ZodObject<{
|
|
126
|
+
id: z.ZodNumber;
|
|
127
|
+
name: z.ZodString;
|
|
128
|
+
coord: z.ZodObject<{
|
|
129
|
+
lon: z.ZodNumber;
|
|
130
|
+
lat: z.ZodNumber;
|
|
131
|
+
}, z.core.$strip>;
|
|
132
|
+
country: z.ZodOptional<z.ZodString>;
|
|
133
|
+
population: z.ZodOptional<z.ZodNumber>;
|
|
134
|
+
timezone: z.ZodOptional<z.ZodNumber>;
|
|
135
|
+
sunrise: z.ZodOptional<z.ZodNumber>;
|
|
136
|
+
sunset: z.ZodOptional<z.ZodNumber>;
|
|
137
|
+
}, z.core.$strip>>;
|
|
138
|
+
}, z.core.$strip>;
|
|
139
|
+
/**
|
|
140
|
+
* Type exports for validated data
|
|
141
|
+
*/
|
|
142
|
+
export type OpenWeatherMapCurrentResponse = z.infer<typeof OpenWeatherMapCurrentResponseSchema>;
|
|
143
|
+
export type OpenWeatherMapForecastResponse = z.infer<typeof OpenWeatherMapForecastResponseSchema>;
|
|
144
|
+
//# sourceMappingURL=weather.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"weather.schema.d.ts","sourceRoot":"","sources":["../../../../src/core/sensors/schemas/weather.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA+ExB;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAgB9C,CAAC;AAyCH,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAe/C,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAC;AAChG,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oCAAoC,CAAC,CAAC"}
|