durable-actors-observer 0.17.1 → 0.18.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.
@@ -1,7 +1,7 @@
1
1
  import type { LogFilter } from "../types/Logs.js";
2
2
  export declare const actorsKey: (baseUrl: string) => readonly ["actors", string];
3
3
  export declare const requestsKey: (baseUrl: string) => readonly ["requests", string];
4
- export declare const residencyKey: (baseUrl: string, actorName: string) => readonly ["residency", string, string];
4
+ export declare const residencyKey: (baseUrl: string, actorName: string, actorId?: string) => readonly ["residency", string, string, string | undefined];
5
5
  export declare const webSocketsKey: (baseUrl: string) => readonly ["websockets", string];
6
6
  export declare const logsKey: (baseUrl: string, { actorName, actorId, requestId, level, search }: LogFilter) => readonly ["logs", string, string, string, string | null, import("../types/Logs.js").LogLevel | null, string];
7
7
  export declare const logHistogramKey: (baseUrl: string, { actorName, actorId, requestId, search }: LogFilter) => readonly ["logs/histogram", string, string, string, string | null, string];
@@ -8,7 +8,7 @@ export declare const defaultBaseUrl = "/api/observe";
8
8
  export interface ObserverClient {
9
9
  listActorTypes(): Promise<ActorInventory>;
10
10
  listRequests(query: RequestHistoryQuery): Promise<RequestTracePage>;
11
- listResidency(actorName: string, bounds: TimeBounds): Promise<ResidencyHistory>;
11
+ listResidency(actorName: string, bounds: TimeBounds, actorId?: string): Promise<ResidencyHistory>;
12
12
  listWebSockets(): Promise<SocketSession[]>;
13
13
  listLogs(filter: LogFilter, bounds: TimeBounds, cursor: string | null): Promise<ActorLogPage>;
14
14
  getLogHistogram(filter: LogFilter, bounds: TimeBounds, bucketMs: number): Promise<LogHistogram>;
@@ -18,7 +18,7 @@ export declare class HttpObserverClient implements ObserverClient {
18
18
  constructor(baseUrl?: string);
19
19
  listActorTypes(): Promise<ActorInventory>;
20
20
  listRequests({ fromMs, toMs, limit, cursor, actorName, actorId }: RequestHistoryQuery): Promise<RequestTracePage>;
21
- listResidency(actorName: string, { fromMs, toMs }: TimeBounds): Promise<ResidencyHistory>;
21
+ listResidency(actorName: string, { fromMs, toMs }: TimeBounds, actorId?: string): Promise<ResidencyHistory>;
22
22
  listWebSockets(): Promise<SocketSession[]>;
23
23
  listLogs(filter: LogFilter, { fromMs, toMs }: TimeBounds, cursor: string | null): Promise<ActorLogPage>;
24
24
  getLogHistogram(filter: LogFilter, { fromMs, toMs }: TimeBounds, bucketMs: number): Promise<LogHistogram>;
@@ -1,5 +1,6 @@
1
1
  import type { TimeWindow } from "../types/TimeRange.js";
2
- export declare function useResidency(actorName: string, timeWindow: TimeWindow): {
2
+ /** One instance's residency when `actorId` is set, otherwise the whole class's. */
3
+ export declare function useResidency(actorName: string, timeWindow: TimeWindow, actorId?: string): {
3
4
  residency: import("../types/Residency.js").ResidencyHistory | null;
4
5
  isLoading: boolean;
5
6
  isError: boolean;