@skravets/eapi 0.0.12 → 0.0.14

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.
@@ -65,7 +65,7 @@ interface components {
65
65
  channel_id: number;
66
66
  /**
67
67
  * Format: date-time
68
- * @example 2025-08-25T12:12:30.286Z
68
+ * @example 2025-09-02T10:14:42.472Z
69
69
  */
70
70
  message_created_at: string;
71
71
  /** @example 123 */
@@ -124,13 +124,19 @@ interface components {
124
124
  * @example 123
125
125
  */
126
126
  replyToId?: number;
127
+ /**
128
+ * @description Thread id to reply to
129
+ * @example 123
130
+ */
131
+ replyToThreadId?: number;
127
132
  };
128
133
  ISendMessage: {
129
134
  /**
130
135
  * @description Message to send
131
136
  * @example {
132
137
  * "text": "Hello, world!",
133
- * "replyToId": 123
138
+ * "replyToId": 124,
139
+ * "replyToThreadId": 123
134
140
  * }
135
141
  */
136
142
  message: components["schemas"]["ISendMessageMessage"];
@@ -65,7 +65,7 @@ interface components {
65
65
  channel_id: number;
66
66
  /**
67
67
  * Format: date-time
68
- * @example 2025-08-25T12:12:30.286Z
68
+ * @example 2025-09-02T10:14:42.472Z
69
69
  */
70
70
  message_created_at: string;
71
71
  /** @example 123 */
@@ -124,13 +124,19 @@ interface components {
124
124
  * @example 123
125
125
  */
126
126
  replyToId?: number;
127
+ /**
128
+ * @description Thread id to reply to
129
+ * @example 123
130
+ */
131
+ replyToThreadId?: number;
127
132
  };
128
133
  ISendMessage: {
129
134
  /**
130
135
  * @description Message to send
131
136
  * @example {
132
137
  * "text": "Hello, world!",
133
- * "replyToId": 123
138
+ * "replyToId": 124,
139
+ * "replyToThreadId": 123
134
140
  * }
135
141
  */
136
142
  message: components["schemas"]["ISendMessageMessage"];
package/dist/index.d.cts CHANGED
@@ -44,9 +44,13 @@ interface MessageStored {
44
44
  username: string;
45
45
  first_name: string;
46
46
  last_name: string;
47
- reply_message_id: number;
47
+ reply_message_id: number | null;
48
48
  has_reactions: number;
49
49
  has_comments: number;
50
+ is_pinned: boolean;
51
+ is_post: boolean;
52
+ is_forward: boolean;
53
+ thread_id: number | null;
50
54
  }
51
55
  interface PublishersStatusQueueInputChatParsed {
52
56
  chat: ChatStored;
@@ -111,13 +115,38 @@ interface PublishersStatusQueueInputSend {
111
115
  interface PublishersStatusQueueInputSendResult extends PublishersStatusQueueInputSend {
112
116
  type: "chat_send_result";
113
117
  }
118
+ interface AgentMessage {
119
+ id: number;
120
+ text: string;
121
+ reply_message_id?: number;
122
+ created_at: string;
123
+ }
124
+ interface PublishersStatusQueueInputAgentPrivateMessage {
125
+ agent: {
126
+ id: number;
127
+ username?: string;
128
+ first_name?: string;
129
+ last_name?: string;
130
+ };
131
+ from: {
132
+ id: number;
133
+ username?: string;
134
+ first_name?: string;
135
+ last_name?: string;
136
+ };
137
+ message: AgentMessage;
138
+ }
139
+ interface PublishersStatusQueueInputAgentPrivateMessageResult extends PublishersStatusQueueInputAgentPrivateMessage {
140
+ type: "agent_private_message";
141
+ }
114
142
  interface EventByType {
115
143
  chat_parsed: ChatParsedTyped;
116
144
  messages_parsed: MessagesParsedTyped;
117
145
  chat_join_result: PublishersStatusQueueInputJoinResult;
118
146
  chat_send_result: PublishersStatusQueueInputSendResult;
147
+ agent_private_message: PublishersStatusQueueInputAgentPrivateMessageResult;
119
148
  }
120
- type WebhookBody = ChatParsedTyped | MessagesParsedTyped | PublishersStatusQueueInputJoinResult | PublishersStatusQueueInputSendResult;
149
+ type WebhookBody = ChatParsedTyped | MessagesParsedTyped | PublishersStatusQueueInputJoinResult | PublishersStatusQueueInputSendResult | PublishersStatusQueueInputAgentPrivateMessageResult;
121
150
  type WebhookBodyTypes = keyof EventByType;
122
151
 
123
152
  declare const frameworks: {
package/dist/index.d.ts CHANGED
@@ -44,9 +44,13 @@ interface MessageStored {
44
44
  username: string;
45
45
  first_name: string;
46
46
  last_name: string;
47
- reply_message_id: number;
47
+ reply_message_id: number | null;
48
48
  has_reactions: number;
49
49
  has_comments: number;
50
+ is_pinned: boolean;
51
+ is_post: boolean;
52
+ is_forward: boolean;
53
+ thread_id: number | null;
50
54
  }
51
55
  interface PublishersStatusQueueInputChatParsed {
52
56
  chat: ChatStored;
@@ -111,13 +115,38 @@ interface PublishersStatusQueueInputSend {
111
115
  interface PublishersStatusQueueInputSendResult extends PublishersStatusQueueInputSend {
112
116
  type: "chat_send_result";
113
117
  }
118
+ interface AgentMessage {
119
+ id: number;
120
+ text: string;
121
+ reply_message_id?: number;
122
+ created_at: string;
123
+ }
124
+ interface PublishersStatusQueueInputAgentPrivateMessage {
125
+ agent: {
126
+ id: number;
127
+ username?: string;
128
+ first_name?: string;
129
+ last_name?: string;
130
+ };
131
+ from: {
132
+ id: number;
133
+ username?: string;
134
+ first_name?: string;
135
+ last_name?: string;
136
+ };
137
+ message: AgentMessage;
138
+ }
139
+ interface PublishersStatusQueueInputAgentPrivateMessageResult extends PublishersStatusQueueInputAgentPrivateMessage {
140
+ type: "agent_private_message";
141
+ }
114
142
  interface EventByType {
115
143
  chat_parsed: ChatParsedTyped;
116
144
  messages_parsed: MessagesParsedTyped;
117
145
  chat_join_result: PublishersStatusQueueInputJoinResult;
118
146
  chat_send_result: PublishersStatusQueueInputSendResult;
147
+ agent_private_message: PublishersStatusQueueInputAgentPrivateMessageResult;
119
148
  }
120
- type WebhookBody = ChatParsedTyped | MessagesParsedTyped | PublishersStatusQueueInputJoinResult | PublishersStatusQueueInputSendResult;
149
+ type WebhookBody = ChatParsedTyped | MessagesParsedTyped | PublishersStatusQueueInputJoinResult | PublishersStatusQueueInputSendResult | PublishersStatusQueueInputAgentPrivateMessageResult;
121
150
  type WebhookBodyTypes = keyof EventByType;
122
151
 
123
152
  declare const frameworks: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skravets/eapi",
3
- "version": "0.0.12",
3
+ "version": "0.0.14",
4
4
  "module": "./dist/index.js",
5
5
  "main": "./dist/index.cjs",
6
6
  "types": "./dist/index.d.ts",