@tmlmobilidade/go-interfaces-cachedb 20260805.229.7 → 20260805.1509.39

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.
@@ -1,5 +1,5 @@
1
1
  import { type RedisClientType } from '@tmlmobilidade/go-clients-redis';
2
- import { type cacheDbKey } from './keys.js';
2
+ import { type CacheDbKey } from './keys.js';
3
3
  declare class CacheDbClass {
4
4
  private static _instance;
5
5
  private client;
@@ -21,7 +21,7 @@ declare class CacheDbClass {
21
21
  * @returns A promise that resolves when the deletion process is complete.
22
22
  * @throws Will throw an error if the deletion process fails.
23
23
  */
24
- delete(key: cacheDbKey): Promise<void>;
24
+ delete(key: CacheDbKey): Promise<void>;
25
25
  /**
26
26
  * Deletes multiple cache entries.
27
27
  * @param keys The list of keys to delete.
@@ -34,7 +34,7 @@ declare class CacheDbClass {
34
34
  * or `null` if not found.
35
35
  * @throws Will throw an error if the retrieval process fails.
36
36
  */
37
- get(key: cacheDbKey): Promise<null | string>;
37
+ get(key: CacheDbKey): Promise<null | string>;
38
38
  /**
39
39
  * Scans cache keys by pattern.
40
40
  * @param pattern The redis pattern to match.
@@ -47,7 +47,7 @@ declare class CacheDbClass {
47
47
  * @param value The value of the cache entry to save. Must be a string.
48
48
  * @param ttl Optional time-to-live (TTL) in seconds. Omit when not needed.
49
49
  */
50
- set(key: cacheDbKey, value: string, ttl?: number): Promise<void>;
50
+ set(key: CacheDbKey, value: string, ttl?: number): Promise<void>;
51
51
  protected connectToClient(): Promise<RedisClientType>;
52
52
  /**
53
53
  * Initializes the Redis client.
package/dist/keys.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const cacheDbKeyValues: readonly ["hub:v1:navegante:app-enabled", "hub:v1:alerts:published:json", "hub:v1:alerts:published:json:cm", "hub:v1:alerts:published:gtfs", "hub:v1:alerts:published:gtfs:cm", "hub:v1:alerts:published:rss", "hub:v1:alerts:published:rss:cm", "hub:v1:plans:approved:json", "hub:v1:realtime:vehicles:metadata:json", "hub:v1:realtime:vehicles:positions:json", "hub:v1:realtime:vehicles:positions:gtfs", "hub:v1:realtime:eta:json", "hub:v1:realtime:eta:gtfs", "hub:v1:network:dates", "hub:v1:network:periods", "hub:v1:network:stops", "hub:v1:network:legacy-stops-map", "hub:v1:network:lines", "hub:v1:network:routes", "hub:v1:network:plans", "hub:v1:metrics:demand:by-agency:by-operational-date:json", "hub:v1:network:vehicles:protobuf", `hub:v1:network:patterns:${string}`, `hub:v1:network:shapes:${string}`];
2
- export type cacheDbKey = typeof cacheDbKeyValues[number];
1
+ export declare const cacheDbKeyValues: readonly ["hub:v1:navegante:app-enabled", "hub:v1:alerts:published:json", "hub:v1:alerts:published:json:cm", "hub:v1:alerts:published:gtfs", "hub:v1:alerts:published:gtfs:cm", "hub:v1:alerts:published:rss", "hub:v1:alerts:published:rss:cm", "hub:v1:plans:approved:json", "hub:v1:realtime:vehicles:metadata:json", "hub:v1:realtime:vehicles:positions:json", "hub:v1:realtime:vehicles:positions:gtfs", "hub:v1:realtime:eta:json", "hub:v1:realtime:eta:gtfs", "hub:v1:realtime:eta:all", `hub:v1:realtime:eta:by-trip:${string}`, `hub:v1:realtime:eta:by-stop:${string}`, "hub:v1:network:dates", "hub:v1:network:periods", "hub:v1:network:stops", "hub:v1:network:legacy-stops-map", "hub:v1:network:lines", "hub:v1:network:routes", "hub:v1:network:plans", "hub:v1:metrics:demand:by-agency:by-operational-date:json", "hub:v1:network:vehicles:protobuf", `hub:v1:network:patterns:${string}`, `hub:v1:network:shapes:${string}`];
2
+ export type CacheDbKey = typeof cacheDbKeyValues[number];
package/dist/keys.js CHANGED
@@ -14,6 +14,9 @@ export const cacheDbKeyValues = [
14
14
  'hub:v1:realtime:vehicles:positions:gtfs',
15
15
  'hub:v1:realtime:eta:json',
16
16
  'hub:v1:realtime:eta:gtfs',
17
+ 'hub:v1:realtime:eta:all',
18
+ `hub:v1:realtime:eta:by-trip:${dynamicKey()}`,
19
+ `hub:v1:realtime:eta:by-stop:${dynamicKey()}`,
17
20
  'hub:v1:network:dates',
18
21
  'hub:v1:network:periods',
19
22
  'hub:v1:network:stops',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tmlmobilidade/go-interfaces-cachedb",
3
- "version": "20260805.229.7",
3
+ "version": "20260805.1509.39",
4
4
  "author": {
5
5
  "email": "iso@tmlmobilidade.pt",
6
6
  "name": "TML-ISO"