Skip to content

Commit

Permalink
Add message types
Browse files Browse the repository at this point in the history
  • Loading branch information
penpenpng committed Jul 10, 2023
1 parent 79cda8d commit 1ec4701
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ interface CountResponse {

export namespace ToRelayMessage {
export type Any = AUTH | CLOSE | COUNT | EVENT | REQ;
export type Type = Any[0];
export type AUTH = [type: "AUTH", event: Event<Kind.ClientAuthentication>];
export type CLOSE = [type: "CLOSE", subId: string];
export type COUNT = [type: "COUNT", subId: string, ...filters: Filter[]];
Expand All @@ -99,6 +100,7 @@ export namespace ToRelayMessage {

export namespace ToClientMessage {
export type Any = AUTH | COUNT | EOSE | EVENT | NOTICE | OK;
export type Type = Any[0];
export type Sub = EVENT | EOSE;
export type AUTH = [type: "AUTH", challengeMessage: string];
export type COUNT = [type: "COUNT", subId: string, count: CountResponse];
Expand Down

0 comments on commit 1ec4701

Please sign in to comment.