@skravets/eapi 0.0.19 → 0.0.21

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.
@@ -15,6 +15,10 @@ interface paths {
15
15
  /** Search messages by phrases and time interval */
16
16
  post: operations["messages.searchMessages"];
17
17
  };
18
+ "/messages/context": {
19
+ /** Get messages context around specified message IDs */
20
+ post: operations["messages.getMessagesContext"];
21
+ };
18
22
  "/chats": {
19
23
  /** Get Hello World! */
20
24
  get: operations["channels.getHello"];
@@ -85,13 +89,47 @@ interface components {
85
89
  */
86
90
  toDate?: string;
87
91
  };
92
+ GetMessagesContextDto: {
93
+ /**
94
+ * @description Start date for search (YYYY-MM-DD or YYYY-MM-DD HH:mm:ss format)
95
+ * @example 2025-08-15 00:00:00
96
+ */
97
+ fromDate: string;
98
+ /**
99
+ * @description End date for search (YYYY-MM-DD or YYYY-MM-DD HH:mm:ss format)
100
+ * @example 2025-10-15 23:59:59
101
+ */
102
+ toDate: string;
103
+ /**
104
+ * @description Array of message-channel pairs
105
+ * @example [
106
+ * {
107
+ * "0": 4842617,
108
+ * "1": 1263233484
109
+ * },
110
+ * {
111
+ * "0": 4842700,
112
+ * "1": 2348597164
113
+ * },
114
+ * {
115
+ * "0": 2416624,
116
+ * "1": 1318197938
117
+ * },
118
+ * {
119
+ * "0": 1774097,
120
+ * "1": 1056407492
121
+ * }
122
+ * ]
123
+ */
124
+ messageChannelPairs: string[];
125
+ };
88
126
  /** @description Message schema */
89
127
  Message: {
90
128
  /** @example 123 */
91
129
  channel_id: number;
92
130
  /**
93
131
  * Format: date-time
94
- * @example 2025-10-09T12:30:21.951Z
132
+ * @example 2025-10-16T13:25:18.525Z
95
133
  */
96
134
  message_created_at: string;
97
135
  /** @example 123 */
@@ -372,6 +410,29 @@ interface operations {
372
410
  };
373
411
  };
374
412
  };
413
+ "messages.getMessagesContext": {
414
+ parameters: {
415
+ header: {
416
+ /** @description `Basic token`, where token is `id:secret` base64 encoded */
417
+ Authorization: string;
418
+ };
419
+ };
420
+ requestBody: {
421
+ content: {
422
+ "application/json": components["schemas"]["GetMessagesContextDto"];
423
+ };
424
+ };
425
+ responses: {
426
+ 201: {
427
+ headers: {
428
+ [name: string]: unknown;
429
+ };
430
+ content: {
431
+ "application/json": Record<string, never>[];
432
+ };
433
+ };
434
+ };
435
+ };
375
436
  "channels.getHello": {
376
437
  parameters: {
377
438
  header: {
@@ -15,6 +15,10 @@ interface paths {
15
15
  /** Search messages by phrases and time interval */
16
16
  post: operations["messages.searchMessages"];
17
17
  };
18
+ "/messages/context": {
19
+ /** Get messages context around specified message IDs */
20
+ post: operations["messages.getMessagesContext"];
21
+ };
18
22
  "/chats": {
19
23
  /** Get Hello World! */
20
24
  get: operations["channels.getHello"];
@@ -85,13 +89,47 @@ interface components {
85
89
  */
86
90
  toDate?: string;
87
91
  };
92
+ GetMessagesContextDto: {
93
+ /**
94
+ * @description Start date for search (YYYY-MM-DD or YYYY-MM-DD HH:mm:ss format)
95
+ * @example 2025-08-15 00:00:00
96
+ */
97
+ fromDate: string;
98
+ /**
99
+ * @description End date for search (YYYY-MM-DD or YYYY-MM-DD HH:mm:ss format)
100
+ * @example 2025-10-15 23:59:59
101
+ */
102
+ toDate: string;
103
+ /**
104
+ * @description Array of message-channel pairs
105
+ * @example [
106
+ * {
107
+ * "0": 4842617,
108
+ * "1": 1263233484
109
+ * },
110
+ * {
111
+ * "0": 4842700,
112
+ * "1": 2348597164
113
+ * },
114
+ * {
115
+ * "0": 2416624,
116
+ * "1": 1318197938
117
+ * },
118
+ * {
119
+ * "0": 1774097,
120
+ * "1": 1056407492
121
+ * }
122
+ * ]
123
+ */
124
+ messageChannelPairs: string[];
125
+ };
88
126
  /** @description Message schema */
89
127
  Message: {
90
128
  /** @example 123 */
91
129
  channel_id: number;
92
130
  /**
93
131
  * Format: date-time
94
- * @example 2025-10-09T12:30:21.951Z
132
+ * @example 2025-10-16T13:25:18.525Z
95
133
  */
96
134
  message_created_at: string;
97
135
  /** @example 123 */
@@ -372,6 +410,29 @@ interface operations {
372
410
  };
373
411
  };
374
412
  };
413
+ "messages.getMessagesContext": {
414
+ parameters: {
415
+ header: {
416
+ /** @description `Basic token`, where token is `id:secret` base64 encoded */
417
+ Authorization: string;
418
+ };
419
+ };
420
+ requestBody: {
421
+ content: {
422
+ "application/json": components["schemas"]["GetMessagesContextDto"];
423
+ };
424
+ };
425
+ responses: {
426
+ 201: {
427
+ headers: {
428
+ [name: string]: unknown;
429
+ };
430
+ content: {
431
+ "application/json": Record<string, never>[];
432
+ };
433
+ };
434
+ };
435
+ };
375
436
  "channels.getHello": {
376
437
  parameters: {
377
438
  header: {
package/dist/index.cjs CHANGED
@@ -125,6 +125,20 @@ class EApi {
125
125
  method: "POST",
126
126
  ...options
127
127
  });
128
+ },
129
+ /**
130
+ *
131
+ *
132
+ * @tags messages
133
+ * @summary Get messages context around specified message IDs
134
+ *
135
+ * [Documentation](.../messages/operation/messages.getMessagesContext)
136
+ */
137
+ getMessagesContext: (body, options) => {
138
+ return this.request("/messages/context", body, {
139
+ method: "POST",
140
+ ...options
141
+ });
128
142
  }
129
143
  };
130
144
  /**
package/dist/index.d.cts CHANGED
@@ -163,7 +163,7 @@ interface PublishersStatusQueueParsingErrorResult extends PublishersStatusQueueP
163
163
  type: "parsing_error";
164
164
  }
165
165
  interface PublishersStatusQueueAccountUpdated {
166
- phone: string;
166
+ id: number;
167
167
  changes: AccountUpdateChanges;
168
168
  }
169
169
  interface PublishersStatusQueueAccountUpdatedResult extends PublishersStatusQueueAccountUpdated {
@@ -298,6 +298,15 @@ declare class EApi {
298
298
  * [Documentation](.../messages/operation/messages.searchMessages)
299
299
  */
300
300
  searchMessages: (body: GetRequestBody<"/messages/search", "post">, options?: RequestOptions) => Promise<GetResponse<"/messages/search", "post">>;
301
+ /**
302
+ *
303
+ *
304
+ * @tags messages
305
+ * @summary Get messages context around specified message IDs
306
+ *
307
+ * [Documentation](.../messages/operation/messages.getMessagesContext)
308
+ */
309
+ getMessagesContext: (body: GetRequestBody<"/messages/context", "post">, options?: RequestOptions) => Promise<GetResponse<"/messages/context", "post">>;
301
310
  };
302
311
  /**
303
312
  * @tags chats
package/dist/index.d.ts CHANGED
@@ -163,7 +163,7 @@ interface PublishersStatusQueueParsingErrorResult extends PublishersStatusQueueP
163
163
  type: "parsing_error";
164
164
  }
165
165
  interface PublishersStatusQueueAccountUpdated {
166
- phone: string;
166
+ id: number;
167
167
  changes: AccountUpdateChanges;
168
168
  }
169
169
  interface PublishersStatusQueueAccountUpdatedResult extends PublishersStatusQueueAccountUpdated {
@@ -298,6 +298,15 @@ declare class EApi {
298
298
  * [Documentation](.../messages/operation/messages.searchMessages)
299
299
  */
300
300
  searchMessages: (body: GetRequestBody<"/messages/search", "post">, options?: RequestOptions) => Promise<GetResponse<"/messages/search", "post">>;
301
+ /**
302
+ *
303
+ *
304
+ * @tags messages
305
+ * @summary Get messages context around specified message IDs
306
+ *
307
+ * [Documentation](.../messages/operation/messages.getMessagesContext)
308
+ */
309
+ getMessagesContext: (body: GetRequestBody<"/messages/context", "post">, options?: RequestOptions) => Promise<GetResponse<"/messages/context", "post">>;
301
310
  };
302
311
  /**
303
312
  * @tags chats
package/dist/index.js CHANGED
@@ -123,6 +123,20 @@ class EApi {
123
123
  method: "POST",
124
124
  ...options
125
125
  });
126
+ },
127
+ /**
128
+ *
129
+ *
130
+ * @tags messages
131
+ * @summary Get messages context around specified message IDs
132
+ *
133
+ * [Documentation](.../messages/operation/messages.getMessagesContext)
134
+ */
135
+ getMessagesContext: (body, options) => {
136
+ return this.request("/messages/context", body, {
137
+ method: "POST",
138
+ ...options
139
+ });
126
140
  }
127
141
  };
128
142
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skravets/eapi",
3
- "version": "0.0.19",
3
+ "version": "0.0.21",
4
4
  "module": "./dist/index.js",
5
5
  "main": "./dist/index.cjs",
6
6
  "types": "./dist/index.d.ts",