@jealous-robot-dev/shared-types-responses 1.21.3 → 1.21.4

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,3 +1,4 @@
1
- export * from './conversations';
2
1
  export * from './messages';
3
2
  export * from './user-inbox';
3
+ export * from './live-channel';
4
+ export * from './conversations';
@@ -10,6 +10,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
10
  for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
- __exportStar(require("./conversations"), exports);
14
13
  __exportStar(require("./messages"), exports);
15
14
  __exportStar(require("./user-inbox"), exports);
15
+ __exportStar(require("./live-channel"), exports);
16
+ __exportStar(require("./conversations"), exports);
@@ -0,0 +1,52 @@
1
+ export declare enum LiveChannelClientMsgs {
2
+ DELETE_MSG = "msg:delete",
3
+ EDIT_MSG = "msg:edit",
4
+ SEND_MSG = "msg:send",
5
+ VIEW_MSG = "msg:view"
6
+ }
7
+ export declare enum LiveChannelServerMsgs {
8
+ MSG_SENT = "msg:sent",
9
+ MSG_EDITED = "msg:edited",
10
+ MSG_VIEWED = "msg:viewed",
11
+ MSG_DELETED = "msg:deleted"
12
+ }
13
+ export interface SendMsgPayload {
14
+ tmp_id: string;
15
+ written_at: string;
16
+ conv_id: string;
17
+ author: string;
18
+ text?: string;
19
+ attachment?: string;
20
+ }
21
+ export interface MsgSentPayload {
22
+ new_id: number;
23
+ tmp_id: string;
24
+ conv_id: string;
25
+ author: string;
26
+ text?: string;
27
+ written_at: string;
28
+ attachment?: string;
29
+ }
30
+ export interface MsgEditionPayload {
31
+ id: number;
32
+ conv_id: string;
33
+ text: string;
34
+ }
35
+ export interface MsgDeletionPayload {
36
+ id: number;
37
+ conv_id: string;
38
+ }
39
+ export interface MsgViewingPayload {
40
+ ids: number[];
41
+ conv_id: string;
42
+ }
43
+ export declare type ServerMsgs = MsgSentPayload | MsgEditionPayload | MsgDeletionPayload | MsgViewingPayload;
44
+ export declare type ClientMsgs = SendMsgPayload | MsgEditionPayload | MsgDeletionPayload | MsgViewingPayload;
45
+ export interface ClientMsg {
46
+ type: LiveChannelClientMsgs;
47
+ data: ClientMsgs;
48
+ }
49
+ export interface ServerMsg {
50
+ type: LiveChannelServerMsgs;
51
+ data: ServerMsgs;
52
+ }
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LiveChannelServerMsgs = exports.LiveChannelClientMsgs = void 0;
4
+ var LiveChannelClientMsgs;
5
+ (function (LiveChannelClientMsgs) {
6
+ LiveChannelClientMsgs["DELETE_MSG"] = "msg:delete";
7
+ LiveChannelClientMsgs["EDIT_MSG"] = "msg:edit";
8
+ LiveChannelClientMsgs["SEND_MSG"] = "msg:send";
9
+ LiveChannelClientMsgs["VIEW_MSG"] = "msg:view";
10
+ })(LiveChannelClientMsgs = exports.LiveChannelClientMsgs || (exports.LiveChannelClientMsgs = {}));
11
+ var LiveChannelServerMsgs;
12
+ (function (LiveChannelServerMsgs) {
13
+ LiveChannelServerMsgs["MSG_SENT"] = "msg:sent";
14
+ LiveChannelServerMsgs["MSG_EDITED"] = "msg:edited";
15
+ LiveChannelServerMsgs["MSG_VIEWED"] = "msg:viewed";
16
+ LiveChannelServerMsgs["MSG_DELETED"] = "msg:deleted";
17
+ })(LiveChannelServerMsgs = exports.LiveChannelServerMsgs || (exports.LiveChannelServerMsgs = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jealous-robot-dev/shared-types-responses",
3
- "version": "1.21.3",
3
+ "version": "1.21.4",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",