@atmosx/event-product-parser 3.0.41 → 3.0.44

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.
Files changed (61) hide show
  1. package/README.md +22 -0
  2. package/dist/cjs/index.cjs +1791 -1646
  3. package/dist/esm/index.mjs +1026 -882
  4. package/dist/index.d.mts +34 -3
  5. package/dist/index.d.ts +34 -3
  6. package/package.json +1 -1
  7. package/src/@building/building.create.ts +2 -2
  8. package/src/@building/building.enhance.ts +1 -1
  9. package/src/@building/building.geometry.ts +1 -1
  10. package/src/@building/building.headers.ts +1 -1
  11. package/src/@building/building.office.ts +3 -3
  12. package/src/@building/building.outlooks.ts +36 -0
  13. package/src/@building/building.properties.ts +11 -5
  14. package/src/@building/building.tracking.ts +7 -7
  15. package/src/@building/building.validate.ts +4 -2
  16. package/src/@core/core.query.ts +39 -0
  17. package/src/@core/core.setNode.ts +2 -2
  18. package/src/@core/core.start.ts +1 -1
  19. package/src/@events/events.api.ts +4 -1
  20. package/src/@events/events.text.ts +3 -2
  21. package/src/@events/events.ugc.ts +3 -2
  22. package/src/@events/events.vtec.ts +5 -4
  23. package/src/@manager/manager.createWebhook.ts +93 -81
  24. package/src/@manager/manager.mkEvent.ts +3 -2
  25. package/src/@manager/manager.setHash.ts +1 -1
  26. package/src/@manager/manager.updateWebhooks.ts +1 -2
  27. package/src/@modules/@database/database.cache.ts +1 -1
  28. package/src/@modules/@database/database.init.ts +1 -1
  29. package/src/@modules/@database/database.shapefiles.ts +1 -1
  30. package/src/@modules/@database/database.stanza.ts +2 -2
  31. package/src/@modules/@eas/eas.getCleanDescription.ts +89 -0
  32. package/src/@modules/@eas/eas.getTTS.ts +43 -0
  33. package/src/@modules/@eas/eas.setEasTone.ts +29 -24
  34. package/src/@modules/@stanza/stanza.getAwipsType.ts +1 -1
  35. package/src/@modules/@stanza/stanza.validate.ts +2 -2
  36. package/src/@modules/@utilities/utilities.getLatestIssuance.ts +32 -0
  37. package/src/@modules/@utilities/utilities.getSettings.ts +1 -1
  38. package/src/@modules/@utilities/utilities.isImageReady.ts +27 -0
  39. package/src/@modules/@utilities/utilities.setCronSchedule.ts +28 -2
  40. package/src/@modules/@utilities/utilities.setSettings.ts +1 -1
  41. package/src/@modules/@utilities/utilities.setWarning.ts +1 -1
  42. package/src/@modules/@xmpp/xmpp.xDeploy.ts +1 -1
  43. package/src/@modules/@xmpp/xmpp.xReconnect.ts +1 -1
  44. package/src/@modules/@xmpp/xmpp.xStanza.ts +1 -1
  45. package/src/@parsers/@hvtec/hvtec.extract.ts +1 -1
  46. package/src/@parsers/@pvtec/pvtec.extract.ts +1 -1
  47. package/src/@parsers/@ugc/ugc.extract.ts +1 -1
  48. package/src/@types/{types.compiled.ts → type.compiled.ts} +1 -1
  49. package/src/@types/type.event.ts +4 -2
  50. package/src/@types/type.properties.ts +3 -1
  51. package/src/@types/{types.settings.ts → type.settings.ts} +3 -2
  52. package/src/@types/{types.webhook.ts → type.webhook.ts} +1 -0
  53. package/src/bootstrap.ts +2 -1
  54. package/src/index.ts +3 -2
  55. package/src/@dictionaries/dictionaries.transcribedMessageReplacements.ts +0 -68
  56. /package/src/@types/{types.attributes.ts → type.attributes.ts} +0 -0
  57. /package/src/@types/{types.hash.ts → type.hash.ts} +0 -0
  58. /package/src/@types/{types.hvtec.ts → type.hvtec.ts} +0 -0
  59. /package/src/@types/{types.pvtec.ts → type.pvtec.ts} +0 -0
  60. /package/src/@types/{types.stanza.ts → type.stanza.ts} +0 -0
  61. /package/src/@types/{types.ugc.ts → type.ugc.ts} +0 -0
package/README.md CHANGED
@@ -125,6 +125,7 @@ const Client = new Manager({
125
125
  - **webhook**: The URL of the webhook you want to send messages to.
126
126
  - **title**: The title of the message you want to send.
127
127
  - **message**: The message content you want to send. You can use placeholders like `<@&role_id>` to mention roles in Discord.
128
+ - **eas**: Whether to generate and upload an EAS audio file for the event.
128
129
  - **upload**: Whether to upload a JSON file as well with the message containing the event data.
129
130
  - **events**: An array of event types that will trigger the webhook when they are received by the parser. If this array is empty, the webhook will be triggered for all events.
130
131
  - **rate**: The rate limit in seconds for how often the webhook can be triggered. This is to prevent spamming the webhook with too many messages in a short period of time.
@@ -146,6 +147,7 @@ const Client = new Manager({
146
147
  - **ListeningStates**: States you'd like to listen to `(Ex. ["IL"])`
147
148
  - **NodeLocationFiltering**: If you want tracking nodes to filter out events based on radius. (Miles)\
148
149
  - **IgnoreTextProducts**: If you want to ignore test products and events.
150
+ - **ArchiveTTL**: The time to live for archived events. After this time, the events will be automatically deleted from the eas archive.
149
151
  - **ArchiveDirectory**: The directory you'd like to store generated EAS audio files.
150
152
  - **IntroWavFile**: The PCM16 bit WAV audio file to append to the EAS message.
151
153
 
@@ -320,6 +322,15 @@ const nodes = getNodes()
320
322
  console.log(nodes)
321
323
  ```
322
324
 
325
+ ### Function `query`
326
+ Queries the event cache (datbase) for specific events based on text.
327
+ ```ts
328
+ import { query } from "@atmosx/event-product-parser"
329
+ query({search: "Tornado Warning", limit: 3}).then(results => {
330
+ console.log(results)
331
+ })
332
+ ````
333
+
323
334
  ### Function `setEasTone`
324
335
  Fetches an EAS audio message for an event (Simulated)
325
336
  ```ts
@@ -328,6 +339,17 @@ const event = {...}
328
339
  await setEasTone(event.properties.description, event.properties.metadata.header)
329
340
  ```
330
341
 
342
+
343
+ ## Types
344
+ [Event](./src/@types/type.event.ts)
345
+ [Properties](./src/@types/type.properties.ts)
346
+ [HVTec](./src/@types/type.hvtec.ts)
347
+ [PVTec](./src/@types/type.pvtec.ts)
348
+ [UGC](./src/@types/type.ugc.ts)
349
+ [Stanzas](./src/@types/type.stanza.ts)
350
+ [Attributes](./src/@types/type.attributes.ts)
351
+
352
+
331
353
  ## Performance Recommendations
332
354
  - Enable cache retention
333
355
  - Disable geometry parsing if GeoJSON is unnecessary.