@holochain/client 0.20.0-rc.0 → 0.20.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.
@@ -878,6 +878,34 @@ export interface IssueAppAuthenticationTokenResponse {
878
878
  * @public
879
879
  */
880
880
  export type DumpNetworkStatsRequest = void;
881
+ export interface ApiTransportStats {
882
+ /**
883
+ * Stats from the configured transport implementation.
884
+ */
885
+ transport_stats: TransportStats;
886
+ /**
887
+ * Blocked message counts.
888
+ */
889
+ blocked_message_counts: Record<Url, Record<SpaceId, MessageBlockCount>>;
890
+ }
891
+ /**
892
+ * Peer Url
893
+ */
894
+ type Url = string;
895
+ /**
896
+ * kitsune2 space id
897
+ */
898
+ type SpaceId = string;
899
+ export interface MessageBlockCount {
900
+ /**
901
+ * Count of incoming messages that have been blocked and dropped.
902
+ */
903
+ incoming: number;
904
+ /**
905
+ * Count of outgoing messages that have been blocked and dropped.
906
+ */
907
+ outgoing: number;
908
+ }
881
909
  /**
882
910
  * Stats for a transport connection.
883
911
  *
@@ -939,7 +967,11 @@ export interface TransportConnectionStats {
939
967
  /**
940
968
  * @public
941
969
  */
942
- export type DumpNetworkStatsResponse = TransportStats;
970
+ export type DumpNetworkStatsResponse = ApiTransportStats;
971
+ /**
972
+ * @public
973
+ */
974
+ export type AppDumpNetworkStatsResponse = TransportStats;
943
975
  /**
944
976
  * Arguments for dumping network metrics.
945
977
  *
@@ -1167,3 +1199,4 @@ export interface AdminApi {
1167
1199
  issueAppAuthenticationToken: Requester<IssueAppAuthenticationTokenRequest, IssueAppAuthenticationTokenResponse>;
1168
1200
  dumpNetworkStats: Requester<DumpNetworkStatsRequest, DumpNetworkStatsResponse>;
1169
1201
  }
1202
+ export {};
@@ -1,5 +1,5 @@
1
1
  import { UnsubscribeFunction } from "emittery";
2
- import { AgentPubKey, AppAuthenticationToken, AppInfo, CapSecret, CellId, ClonedCell, DnaHash, DnaProperties, EntryHash, FunctionName, InstalledAppId, MembraneProof, MemproofMap, NetworkSeed, Nonce256Bit, RoleName, Timestamp, Transformer, WebsocketConnectionOptions, ZomeName, PreflightRequest, SignedAction, SignedActionHashed, DumpNetworkStatsResponse, DumpNetworkMetricsResponse, DumpNetworkMetricsRequest } from "../../index.js";
2
+ import { AgentPubKey, AppAuthenticationToken, AppInfo, CapSecret, CellId, ClonedCell, DnaHash, DnaProperties, EntryHash, FunctionName, InstalledAppId, MembraneProof, MemproofMap, NetworkSeed, Nonce256Bit, RoleName, Timestamp, Transformer, WebsocketConnectionOptions, ZomeName, PreflightRequest, SignedAction, SignedActionHashed, AppDumpNetworkStatsResponse, DumpNetworkMetricsResponse, DumpNetworkMetricsRequest } from "../../index.js";
3
3
  /**
4
4
  * @public
5
5
  */
@@ -407,7 +407,7 @@ export interface AppClient {
407
407
  appInfo(): Promise<AppInfoResponse>;
408
408
  myPubKey: AgentPubKey;
409
409
  installedAppId: InstalledAppId;
410
- dumpNetworkStats(): Promise<DumpNetworkStatsResponse>;
410
+ dumpNetworkStats(): Promise<AppDumpNetworkStatsResponse>;
411
411
  dumpNetworkMetrics(args: DumpNetworkMetricsRequest): Promise<DumpNetworkMetricsResponse>;
412
412
  createCloneCell(args: CreateCloneCellRequest): Promise<CreateCloneCellResponse>;
413
413
  enableCloneCell(args: EnableCloneCellRequest): Promise<EnableCloneCellResponse>;
@@ -1,6 +1,6 @@
1
1
  import { UnsubscribeFunction } from "emittery";
2
2
  import { AgentPubKey, InstalledAppId, RoleName } from "../../types.js";
3
- import { AgentInfoRequest, AgentInfoResponse, PeerMetaInfoRequest, PeerMetaInfoResponse, AppInfo, DumpNetworkMetricsRequest, DumpNetworkMetricsResponse, DumpNetworkStatsResponse, MemproofMap } from "../admin/index.js";
3
+ import { AgentInfoRequest, AgentInfoResponse, PeerMetaInfoRequest, PeerMetaInfoResponse, AppInfo, DumpNetworkMetricsRequest, DumpNetworkMetricsResponse, AppDumpNetworkStatsResponse, MemproofMap } from "../admin/index.js";
4
4
  import { WsClient } from "../client.js";
5
5
  import { AbandonCountersigningSessionStateRequest, AppClient, AppEvents, AppWebsocketConnectionOptions, CallZomeRequest, CallZomeRequestSigned, CreateCloneCellRequest, DisableCloneCellRequest, EnableCloneCellRequest, GetCountersigningSessionStateRequest, GetCountersigningSessionStateResponse, PublishCountersigningSessionStateRequest, RoleNameCallZomeRequest, SignalCb } from "./types.js";
6
6
  /**
@@ -67,7 +67,7 @@ export declare class AppWebsocket implements AppClient {
67
67
  *
68
68
  * @returns The conductor's {@link TransportStats}.
69
69
  */
70
- dumpNetworkStats(timeout?: number): Promise<DumpNetworkStatsResponse>;
70
+ dumpNetworkStats(timeout?: number): Promise<AppDumpNetworkStatsResponse>;
71
71
  /**
72
72
  * Request network metrics.
73
73
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@holochain/client",
3
- "version": "0.20.0-rc.0",
3
+ "version": "0.20.0",
4
4
  "description": "A JavaScript client for the Holochain Conductor API",
5
5
  "author": "Holochain Foundation <info@holochain.org> (https://holochain.org)",
6
6
  "license": "CAL-1.0",