@skravets/eapi 0.0.32 → 0.0.34

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.
@@ -11,6 +11,10 @@ interface paths {
11
11
  /** Get Hello World! */
12
12
  get: operations["app.getHello"];
13
13
  };
14
+ "/health": {
15
+ /** Health check */
16
+ get: operations["app.health"];
17
+ };
14
18
  "/messages/search": {
15
19
  /** Search messages by phrases and time interval */
16
20
  post: operations["messages.searchMessages"];
@@ -188,7 +192,7 @@ interface components {
188
192
  channel_id: number;
189
193
  /**
190
194
  * Format: date-time
191
- * @example 2025-11-20T12:03:00.734Z
195
+ * @example 2025-12-03T12:43:05.826Z
192
196
  */
193
197
  message_created_at: string;
194
198
  /** @example 123 */
@@ -201,6 +205,10 @@ interface components {
201
205
  username: string;
202
206
  /** @example 123 */
203
207
  reply_message_id: number;
208
+ /** @example ru */
209
+ language: null | string;
210
+ /** @example false */
211
+ is_probably_spam: boolean;
204
212
  };
205
213
  ICursor: {
206
214
  /**
@@ -461,6 +469,16 @@ interface components {
461
469
  endsWith?: string;
462
470
  equals?: string;
463
471
  includes?: string;
472
+ /**
473
+ * @description Keyword groups - message must contain all keywords from at least one group
474
+ * @example [
475
+ * {
476
+ * "0": "keyword1",
477
+ * "1": "keyword2"
478
+ * }
479
+ * ]
480
+ */
481
+ includesKeywords?: string[][];
464
482
  in?: string[];
465
483
  not?: components["schemas"]["StringFilter"];
466
484
  options?: string;
@@ -536,6 +554,15 @@ interface components {
536
554
  lt?: string | Record<string, never>;
537
555
  lte?: string | Record<string, never>;
538
556
  not?: string | Record<string, never>;
557
+ /** @description Interval in ms string or raw seconds (fallback). */
558
+ interval?: string | number;
559
+ };
560
+ /** @description Boolean filter */
561
+ BooleanFilter: {
562
+ /** @description Equals boolean value */
563
+ equals?: boolean;
564
+ /** @description Negated boolean filter or value */
565
+ not?: components["schemas"]["BooleanFilter"];
539
566
  };
540
567
  /** @description Restrictions query for message */
541
568
  MessageWhere: {
@@ -545,6 +572,9 @@ interface components {
545
572
  text?: components["schemas"]["StringFilter"];
546
573
  user_id?: components["schemas"]["NumberFilter"];
547
574
  username?: components["schemas"]["StringFilter"];
575
+ language?: components["schemas"]["StringFilter"];
576
+ is_probably_spam?: components["schemas"]["BooleanFilter"];
577
+ chat?: components["schemas"]["ChatWhere"];
548
578
  };
549
579
  /** @description Message filters dto */
550
580
  QueryMessage: {
@@ -591,6 +621,22 @@ interface operations {
591
621
  };
592
622
  };
593
623
  };
624
+ "app.health": {
625
+ parameters: {
626
+ header: {
627
+ /** @description `Basic token`, where token is `id:secret` base64 encoded */
628
+ Authorization: string;
629
+ };
630
+ };
631
+ responses: {
632
+ /** @description OK */
633
+ 200: {
634
+ headers: {
635
+ [name: string]: unknown;
636
+ };
637
+ };
638
+ };
639
+ };
594
640
  "messages.searchMessages": {
595
641
  parameters: {
596
642
  header: {
@@ -11,6 +11,10 @@ interface paths {
11
11
  /** Get Hello World! */
12
12
  get: operations["app.getHello"];
13
13
  };
14
+ "/health": {
15
+ /** Health check */
16
+ get: operations["app.health"];
17
+ };
14
18
  "/messages/search": {
15
19
  /** Search messages by phrases and time interval */
16
20
  post: operations["messages.searchMessages"];
@@ -188,7 +192,7 @@ interface components {
188
192
  channel_id: number;
189
193
  /**
190
194
  * Format: date-time
191
- * @example 2025-11-20T12:03:00.734Z
195
+ * @example 2025-12-03T12:43:05.826Z
192
196
  */
193
197
  message_created_at: string;
194
198
  /** @example 123 */
@@ -201,6 +205,10 @@ interface components {
201
205
  username: string;
202
206
  /** @example 123 */
203
207
  reply_message_id: number;
208
+ /** @example ru */
209
+ language: null | string;
210
+ /** @example false */
211
+ is_probably_spam: boolean;
204
212
  };
205
213
  ICursor: {
206
214
  /**
@@ -461,6 +469,16 @@ interface components {
461
469
  endsWith?: string;
462
470
  equals?: string;
463
471
  includes?: string;
472
+ /**
473
+ * @description Keyword groups - message must contain all keywords from at least one group
474
+ * @example [
475
+ * {
476
+ * "0": "keyword1",
477
+ * "1": "keyword2"
478
+ * }
479
+ * ]
480
+ */
481
+ includesKeywords?: string[][];
464
482
  in?: string[];
465
483
  not?: components["schemas"]["StringFilter"];
466
484
  options?: string;
@@ -536,6 +554,15 @@ interface components {
536
554
  lt?: string | Record<string, never>;
537
555
  lte?: string | Record<string, never>;
538
556
  not?: string | Record<string, never>;
557
+ /** @description Interval in ms string or raw seconds (fallback). */
558
+ interval?: string | number;
559
+ };
560
+ /** @description Boolean filter */
561
+ BooleanFilter: {
562
+ /** @description Equals boolean value */
563
+ equals?: boolean;
564
+ /** @description Negated boolean filter or value */
565
+ not?: components["schemas"]["BooleanFilter"];
539
566
  };
540
567
  /** @description Restrictions query for message */
541
568
  MessageWhere: {
@@ -545,6 +572,9 @@ interface components {
545
572
  text?: components["schemas"]["StringFilter"];
546
573
  user_id?: components["schemas"]["NumberFilter"];
547
574
  username?: components["schemas"]["StringFilter"];
575
+ language?: components["schemas"]["StringFilter"];
576
+ is_probably_spam?: components["schemas"]["BooleanFilter"];
577
+ chat?: components["schemas"]["ChatWhere"];
548
578
  };
549
579
  /** @description Message filters dto */
550
580
  QueryMessage: {
@@ -591,6 +621,22 @@ interface operations {
591
621
  };
592
622
  };
593
623
  };
624
+ "app.health": {
625
+ parameters: {
626
+ header: {
627
+ /** @description `Basic token`, where token is `id:secret` base64 encoded */
628
+ Authorization: string;
629
+ };
630
+ };
631
+ responses: {
632
+ /** @description OK */
633
+ 200: {
634
+ headers: {
635
+ [name: string]: unknown;
636
+ };
637
+ };
638
+ };
639
+ };
594
640
  "messages.searchMessages": {
595
641
  parameters: {
596
642
  header: {
package/dist/index.cjs CHANGED
@@ -106,6 +106,17 @@ class EApi {
106
106
  */
107
107
  getHello: (options) => {
108
108
  return this.request("/", void 0, { method: "GET", ...options });
109
+ },
110
+ /**
111
+ *
112
+ *
113
+ * @tags App
114
+ * @summary Health check
115
+ *
116
+ * [Documentation](.../App/operation/app.health)
117
+ */
118
+ health: (options) => {
119
+ return this.request("/health", void 0, { method: "GET", ...options });
109
120
  }
110
121
  };
111
122
  /**
package/dist/index.d.cts CHANGED
@@ -22,6 +22,15 @@ type RequestOptions = Omit<NonNullable<Parameters<typeof fetch>[1]>, "headers">
22
22
  mimeType?: "json" | "x-www-form-urlencoded";
23
23
  headers?: Record<string, string>;
24
24
  };
25
+ interface SubscriptionMatchedByKeywords {
26
+ type: "messages.text.includesKeywords";
27
+ value: string[];
28
+ }
29
+ type SubscriptionMatchedBy = SubscriptionMatchedByKeywords;
30
+ interface SubscriptionContext {
31
+ id: number;
32
+ matchedBy: SubscriptionMatchedBy[];
33
+ }
25
34
  type Metadata<T = Record<string, unknown>> = {
26
35
  externalId?: string;
27
36
  } & T;
@@ -38,6 +47,9 @@ interface ChatStored {
38
47
  is_locked: boolean;
39
48
  linked_chat_id: number | null;
40
49
  }
50
+ interface MessageMatchReason {
51
+ keywords?: string[];
52
+ }
41
53
  interface MessageStored {
42
54
  channel_id: number;
43
55
  message_id: number;
@@ -57,6 +69,7 @@ interface MessageStored {
57
69
  thread_id: number | null;
58
70
  quote_text: string | null;
59
71
  has_attachments: boolean;
72
+ matchReason?: MessageMatchReason;
60
73
  }
61
74
  interface PublishersStatusQueueInputChatParsed {
62
75
  chat: ChatStored;
@@ -78,6 +91,7 @@ interface PublishersStatusQueueInputMessagesParsed {
78
91
  plannedEnd: number;
79
92
  };
80
93
  messages: MessageStored[];
94
+ subscription: SubscriptionContext;
81
95
  metadata: {
82
96
  externalId: string;
83
97
  };
@@ -336,6 +350,15 @@ declare class EApi {
336
350
  * [Documentation](.../App/operation/app.getHello)
337
351
  */
338
352
  getHello: (options?: RequestOptions) => Promise<GetResponse<"/", "get">>;
353
+ /**
354
+ *
355
+ *
356
+ * @tags App
357
+ * @summary Health check
358
+ *
359
+ * [Documentation](.../App/operation/app.health)
360
+ */
361
+ health: (options?: RequestOptions) => Promise<GetResponse<"/health", "get">>;
339
362
  };
340
363
  /**
341
364
  * @tags messages
package/dist/index.d.ts CHANGED
@@ -22,6 +22,15 @@ type RequestOptions = Omit<NonNullable<Parameters<typeof fetch>[1]>, "headers">
22
22
  mimeType?: "json" | "x-www-form-urlencoded";
23
23
  headers?: Record<string, string>;
24
24
  };
25
+ interface SubscriptionMatchedByKeywords {
26
+ type: "messages.text.includesKeywords";
27
+ value: string[];
28
+ }
29
+ type SubscriptionMatchedBy = SubscriptionMatchedByKeywords;
30
+ interface SubscriptionContext {
31
+ id: number;
32
+ matchedBy: SubscriptionMatchedBy[];
33
+ }
25
34
  type Metadata<T = Record<string, unknown>> = {
26
35
  externalId?: string;
27
36
  } & T;
@@ -38,6 +47,9 @@ interface ChatStored {
38
47
  is_locked: boolean;
39
48
  linked_chat_id: number | null;
40
49
  }
50
+ interface MessageMatchReason {
51
+ keywords?: string[];
52
+ }
41
53
  interface MessageStored {
42
54
  channel_id: number;
43
55
  message_id: number;
@@ -57,6 +69,7 @@ interface MessageStored {
57
69
  thread_id: number | null;
58
70
  quote_text: string | null;
59
71
  has_attachments: boolean;
72
+ matchReason?: MessageMatchReason;
60
73
  }
61
74
  interface PublishersStatusQueueInputChatParsed {
62
75
  chat: ChatStored;
@@ -78,6 +91,7 @@ interface PublishersStatusQueueInputMessagesParsed {
78
91
  plannedEnd: number;
79
92
  };
80
93
  messages: MessageStored[];
94
+ subscription: SubscriptionContext;
81
95
  metadata: {
82
96
  externalId: string;
83
97
  };
@@ -336,6 +350,15 @@ declare class EApi {
336
350
  * [Documentation](.../App/operation/app.getHello)
337
351
  */
338
352
  getHello: (options?: RequestOptions) => Promise<GetResponse<"/", "get">>;
353
+ /**
354
+ *
355
+ *
356
+ * @tags App
357
+ * @summary Health check
358
+ *
359
+ * [Documentation](.../App/operation/app.health)
360
+ */
361
+ health: (options?: RequestOptions) => Promise<GetResponse<"/health", "get">>;
339
362
  };
340
363
  /**
341
364
  * @tags messages
package/dist/index.js CHANGED
@@ -104,6 +104,17 @@ class EApi {
104
104
  */
105
105
  getHello: (options) => {
106
106
  return this.request("/", void 0, { method: "GET", ...options });
107
+ },
108
+ /**
109
+ *
110
+ *
111
+ * @tags App
112
+ * @summary Health check
113
+ *
114
+ * [Documentation](.../App/operation/app.health)
115
+ */
116
+ health: (options) => {
117
+ return this.request("/health", void 0, { method: "GET", ...options });
107
118
  }
108
119
  };
109
120
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skravets/eapi",
3
- "version": "0.0.32",
3
+ "version": "0.0.34",
4
4
  "module": "./dist/index.js",
5
5
  "main": "./dist/index.cjs",
6
6
  "types": "./dist/index.d.ts",