rocketchat-ts-sdk 1.0.5 → 1.0.7
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.
package/dist/types/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,MAAM,CAAC;AACrB,cAAc,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,MAAM,CAAC;AACrB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { IMongoDate } from "./dm";
|
|
2
|
+
export interface RocketChatMessage {
|
|
3
|
+
_id: string;
|
|
4
|
+
rid: string;
|
|
5
|
+
msg: string;
|
|
6
|
+
ts: IMongoDate;
|
|
7
|
+
u: {
|
|
8
|
+
_id: string;
|
|
9
|
+
username: string;
|
|
10
|
+
name?: string;
|
|
11
|
+
};
|
|
12
|
+
_updatedAt: IMongoDate;
|
|
13
|
+
urls?: any[];
|
|
14
|
+
mentions?: any[];
|
|
15
|
+
channels?: any[];
|
|
16
|
+
md?: any[];
|
|
17
|
+
}
|
|
18
|
+
export interface RocketChatRoomUpdate {
|
|
19
|
+
_id: string;
|
|
20
|
+
t: string;
|
|
21
|
+
usernames: string[];
|
|
22
|
+
usersCount: number;
|
|
23
|
+
msgs: number;
|
|
24
|
+
ts: IMongoDate;
|
|
25
|
+
uids: string[];
|
|
26
|
+
default: boolean;
|
|
27
|
+
ro: boolean;
|
|
28
|
+
sysMes: boolean;
|
|
29
|
+
_USERNAMES?: string[];
|
|
30
|
+
_updatedAt: IMongoDate;
|
|
31
|
+
lastMessage?: RocketChatMessage;
|
|
32
|
+
lm?: IMongoDate;
|
|
33
|
+
}
|
|
34
|
+
export interface RocketChatSubscriptionUpdate {
|
|
35
|
+
_id: string;
|
|
36
|
+
u: {
|
|
37
|
+
_id: string;
|
|
38
|
+
username: string;
|
|
39
|
+
};
|
|
40
|
+
rid: string;
|
|
41
|
+
_updatedAt: IMongoDate;
|
|
42
|
+
alert: boolean;
|
|
43
|
+
fname: string;
|
|
44
|
+
groupMentions: number;
|
|
45
|
+
name: string;
|
|
46
|
+
open: boolean;
|
|
47
|
+
t: string;
|
|
48
|
+
ts: IMongoDate;
|
|
49
|
+
unread: number;
|
|
50
|
+
userMentions: number;
|
|
51
|
+
ls: IMongoDate;
|
|
52
|
+
}
|
|
53
|
+
export interface RoomChangedEvent {
|
|
54
|
+
msg: "changed";
|
|
55
|
+
collection: "stream-notify-user";
|
|
56
|
+
id: string;
|
|
57
|
+
fields: {
|
|
58
|
+
eventName: string;
|
|
59
|
+
args: ["updated" | "inserted" | "removed", RocketChatRoomUpdate];
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
export interface SubscriptionChangedEvent {
|
|
63
|
+
msg: "changed";
|
|
64
|
+
collection: "stream-notify-user";
|
|
65
|
+
id: string;
|
|
66
|
+
fields: {
|
|
67
|
+
eventName: string;
|
|
68
|
+
args: ["updated" | "inserted" | "removed", RocketChatSubscriptionUpdate];
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
export interface RoomMessageEvent {
|
|
72
|
+
msg: "changed";
|
|
73
|
+
collection: "stream-room-messages";
|
|
74
|
+
id: string;
|
|
75
|
+
fields: {
|
|
76
|
+
eventName: string;
|
|
77
|
+
args: [RocketChatMessage];
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
export type PresenceUpdateArgs = [
|
|
81
|
+
string,
|
|
82
|
+
string,
|
|
83
|
+
number,
|
|
84
|
+
string,
|
|
85
|
+
null,
|
|
86
|
+
string[]
|
|
87
|
+
];
|
|
88
|
+
export interface PresenceUpdateEvent {
|
|
89
|
+
msg: "changed";
|
|
90
|
+
collection: "stream-notify-logged";
|
|
91
|
+
id: string;
|
|
92
|
+
fields: {
|
|
93
|
+
eventName: "user-status";
|
|
94
|
+
args: [PresenceUpdateArgs];
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
export interface PresenceData {
|
|
98
|
+
_id: string;
|
|
99
|
+
status: string;
|
|
100
|
+
}
|
|
101
|
+
export type WebSocketEvent = RoomChangedEvent | SubscriptionChangedEvent | RoomMessageEvent | PresenceUpdateEvent;
|
|
102
|
+
export interface WebSocketMessageData {
|
|
103
|
+
msg?: string;
|
|
104
|
+
collection?: string;
|
|
105
|
+
fields?: {
|
|
106
|
+
eventName?: string;
|
|
107
|
+
args?: RocketChatMessage[] | [string, RocketChatRoomUpdate] | [string, RocketChatSubscriptionUpdate] | [RocketChatMessage] | [PresenceUpdateArgs];
|
|
108
|
+
};
|
|
109
|
+
id?: string;
|
|
110
|
+
error?: any;
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=websocket.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"websocket.d.ts","sourceRoot":"","sources":["../../src/types/websocket.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAGlC,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,EAAE,EAAE,UAAU,CAAC;IACf,CAAC,EAAE;QACD,GAAG,EAAE,MAAM,CAAC;QACZ,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF,UAAU,EAAE,UAAU,CAAC;IAC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