@skravets/eapi 0.0.42 → 0.0.44
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/api-types.d.cts +441 -185
- package/dist/api-types.d.ts +441 -185
- package/dist/index.cjs +95 -48
- package/dist/index.d.cts +65 -33
- package/dist/index.d.ts +65 -33
- package/dist/index.js +95 -48
- package/package.json +1 -1
package/dist/api-types.d.cts
CHANGED
|
@@ -15,18 +15,6 @@ interface paths {
|
|
|
15
15
|
/** Health check */
|
|
16
16
|
get: operations["app.health"];
|
|
17
17
|
};
|
|
18
|
-
"/messages/search": {
|
|
19
|
-
/** Search messages by phrases and time interval */
|
|
20
|
-
post: operations["messages.searchMessages"];
|
|
21
|
-
};
|
|
22
|
-
"/messages/context": {
|
|
23
|
-
/** Get messages context around specified message IDs */
|
|
24
|
-
post: operations["messages.getMessagesContext"];
|
|
25
|
-
};
|
|
26
|
-
"/messages/search/webhook/{externalId}": {
|
|
27
|
-
/** Search messages by phrases and time interval (async with webhook) */
|
|
28
|
-
post: operations["messages.searchMessagesWebhook"];
|
|
29
|
-
};
|
|
30
18
|
"/chats": {
|
|
31
19
|
/** Get Hello World! */
|
|
32
20
|
get: operations["channels.getHello"];
|
|
@@ -63,6 +51,10 @@ interface paths {
|
|
|
63
51
|
/** Resolve telegram usernames */
|
|
64
52
|
post: operations["chats.resolveUsername"];
|
|
65
53
|
};
|
|
54
|
+
"/chats/user-presence": {
|
|
55
|
+
/** Search for user presence in specified chats (sync) */
|
|
56
|
+
post: operations["chats.userPresence"];
|
|
57
|
+
};
|
|
66
58
|
"/subscriptions": {
|
|
67
59
|
/** Upsert subscription */
|
|
68
60
|
put: operations["subscriptions.upsert"];
|
|
@@ -77,122 +69,39 @@ interface paths {
|
|
|
77
69
|
/** Delete subscription by subscription id */
|
|
78
70
|
delete: operations["subscriptions.delete"];
|
|
79
71
|
};
|
|
72
|
+
"/messages/search": {
|
|
73
|
+
/** Search messages by phrases and time interval */
|
|
74
|
+
post: operations["messages.searchMessages"];
|
|
75
|
+
};
|
|
76
|
+
"/messages/context": {
|
|
77
|
+
/** Get messages context around specified message IDs */
|
|
78
|
+
post: operations["messages.getMessagesContext"];
|
|
79
|
+
};
|
|
80
|
+
"/messages/search/webhook/{externalId}": {
|
|
81
|
+
/** Search messages by phrases and time interval (async with webhook) */
|
|
82
|
+
post: operations["messages.searchMessagesWebhook"];
|
|
83
|
+
};
|
|
84
|
+
"/accounts/list": {
|
|
85
|
+
/** List of Telegram accounts */
|
|
86
|
+
get: operations["accounts.list"];
|
|
87
|
+
};
|
|
88
|
+
"/accounts/common-chats/{externalId}": {
|
|
89
|
+
/** Get common chats between account and user (async with webhook) */
|
|
90
|
+
post: operations["accounts.getCommonChats"];
|
|
91
|
+
};
|
|
80
92
|
}
|
|
81
93
|
/**
|
|
82
94
|
* Сгенерированные из OpenAPI типы для `components`
|
|
83
95
|
*/
|
|
84
96
|
interface components {
|
|
85
97
|
schemas: {
|
|
86
|
-
SearchMessagesDto: {
|
|
87
|
-
/**
|
|
88
|
-
* @description Search phrases (comma-separated)
|
|
89
|
-
* @example phrase1,phrase2
|
|
90
|
-
*/
|
|
91
|
-
phrases: string;
|
|
92
|
-
/**
|
|
93
|
-
* @description Number of days to search back (default: 30)
|
|
94
|
-
* @example 60
|
|
95
|
-
*/
|
|
96
|
-
days?: number;
|
|
97
|
-
/**
|
|
98
|
-
* @description Start date for search (YYYY-MM-DD format)
|
|
99
|
-
* @example 2024-01-01
|
|
100
|
-
*/
|
|
101
|
-
fromDate?: string;
|
|
102
|
-
/**
|
|
103
|
-
* @description End date for search (YYYY-MM-DD format)
|
|
104
|
-
* @example 2024-12-31
|
|
105
|
-
*/
|
|
106
|
-
toDate?: string;
|
|
107
|
-
/**
|
|
108
|
-
* @description Maximum number of messages to return
|
|
109
|
-
* @example 1000
|
|
110
|
-
*/
|
|
111
|
-
limit?: number;
|
|
112
|
-
};
|
|
113
|
-
GetMessagesContextDto: {
|
|
114
|
-
/**
|
|
115
|
-
* @description Start date for search (YYYY-MM-DD or YYYY-MM-DD HH:mm:ss format)
|
|
116
|
-
* @example 2025-08-15 00:00:00
|
|
117
|
-
*/
|
|
118
|
-
fromDate: string;
|
|
119
|
-
/**
|
|
120
|
-
* @description End date for search (YYYY-MM-DD or YYYY-MM-DD HH:mm:ss format)
|
|
121
|
-
* @example 2025-10-15 23:59:59
|
|
122
|
-
*/
|
|
123
|
-
toDate: string;
|
|
124
|
-
/**
|
|
125
|
-
* @description Array of message-channel pairs
|
|
126
|
-
* @example [
|
|
127
|
-
* {
|
|
128
|
-
* "0": 4842617,
|
|
129
|
-
* "1": 1263233484
|
|
130
|
-
* },
|
|
131
|
-
* {
|
|
132
|
-
* "0": 4842700,
|
|
133
|
-
* "1": 2348597164
|
|
134
|
-
* },
|
|
135
|
-
* {
|
|
136
|
-
* "0": 2416624,
|
|
137
|
-
* "1": 1318197938
|
|
138
|
-
* },
|
|
139
|
-
* {
|
|
140
|
-
* "0": 1774097,
|
|
141
|
-
* "1": 1056407492
|
|
142
|
-
* }
|
|
143
|
-
* ]
|
|
144
|
-
*/
|
|
145
|
-
messageChannelPairs: string[];
|
|
146
|
-
};
|
|
147
|
-
SearchMessagesWebhookPaginationDto: {
|
|
148
|
-
/**
|
|
149
|
-
* @description Chunk size for streamed webhook batches
|
|
150
|
-
* @default 100
|
|
151
|
-
* @example 100
|
|
152
|
-
*/
|
|
153
|
-
chunkSize: number;
|
|
154
|
-
};
|
|
155
|
-
SearchMessagesWebhookDto: {
|
|
156
|
-
/**
|
|
157
|
-
* @description Search phrases (comma-separated)
|
|
158
|
-
* @example phrase1,phrase2
|
|
159
|
-
*/
|
|
160
|
-
phrases: string;
|
|
161
|
-
/**
|
|
162
|
-
* @description Number of days to search back (default: 30)
|
|
163
|
-
* @example 60
|
|
164
|
-
*/
|
|
165
|
-
days?: number;
|
|
166
|
-
/**
|
|
167
|
-
* @description Start date for search (YYYY-MM-DD format)
|
|
168
|
-
* @example 2024-01-01
|
|
169
|
-
*/
|
|
170
|
-
fromDate?: string;
|
|
171
|
-
/**
|
|
172
|
-
* @description End date for search (YYYY-MM-DD format)
|
|
173
|
-
* @example 2024-12-31
|
|
174
|
-
*/
|
|
175
|
-
toDate?: string;
|
|
176
|
-
/**
|
|
177
|
-
* @description Maximum number of messages to return
|
|
178
|
-
* @example 1000
|
|
179
|
-
*/
|
|
180
|
-
limit?: number;
|
|
181
|
-
/**
|
|
182
|
-
* @description Webhook URL to send results to
|
|
183
|
-
* @example https://your-app.com/webhooks/messages-search
|
|
184
|
-
*/
|
|
185
|
-
webhookUrl: string;
|
|
186
|
-
/** @description Optional pagination configuration for streamed results */
|
|
187
|
-
pagination?: components["schemas"]["SearchMessagesWebhookPaginationDto"];
|
|
188
|
-
};
|
|
189
98
|
/** @description Message schema */
|
|
190
99
|
Message: {
|
|
191
100
|
/** @example 123 */
|
|
192
101
|
channel_id: number;
|
|
193
102
|
/**
|
|
194
103
|
* Format: date-time
|
|
195
|
-
* @example
|
|
104
|
+
* @example 2026-01-16T14:54:47.728Z
|
|
196
105
|
*/
|
|
197
106
|
message_created_at: string;
|
|
198
107
|
/** @example 123 */
|
|
@@ -450,6 +359,51 @@ interface components {
|
|
|
450
359
|
ResolveUsernamesReqDto: {
|
|
451
360
|
usernames: string[];
|
|
452
361
|
};
|
|
362
|
+
ChatIdentifierDto: {
|
|
363
|
+
/**
|
|
364
|
+
* @description Chat ID (numeric)
|
|
365
|
+
* @example 1234567890
|
|
366
|
+
*/
|
|
367
|
+
id?: number;
|
|
368
|
+
/**
|
|
369
|
+
* @description Chat username (without @)
|
|
370
|
+
* @example telegram
|
|
371
|
+
*/
|
|
372
|
+
username?: string;
|
|
373
|
+
};
|
|
374
|
+
UserPresenceSearchDto: {
|
|
375
|
+
/**
|
|
376
|
+
* @description User IDs to search for
|
|
377
|
+
* @example [
|
|
378
|
+
* 123456789,
|
|
379
|
+
* 987654321
|
|
380
|
+
* ]
|
|
381
|
+
*/
|
|
382
|
+
accountIds: number[];
|
|
383
|
+
/**
|
|
384
|
+
* @description Chats to search in (by id or username)
|
|
385
|
+
* @example [
|
|
386
|
+
* {
|
|
387
|
+
* "id": 1234567890
|
|
388
|
+
* },
|
|
389
|
+
* {
|
|
390
|
+
* "username": "telegram"
|
|
391
|
+
* }
|
|
392
|
+
* ]
|
|
393
|
+
*/
|
|
394
|
+
chats: components["schemas"]["ChatIdentifierDto"][];
|
|
395
|
+
/**
|
|
396
|
+
* @description Number of days to search back (default: 10, max: 31 to stay within 2 partitions)
|
|
397
|
+
* @default 10
|
|
398
|
+
* @example 10
|
|
399
|
+
*/
|
|
400
|
+
days: number;
|
|
401
|
+
/**
|
|
402
|
+
* @description Webhook URL to send results to
|
|
403
|
+
* @example https://your-app.com/webhooks/user-presence
|
|
404
|
+
*/
|
|
405
|
+
webhookUrl: string;
|
|
406
|
+
};
|
|
453
407
|
/** @description Which fields of chat to return */
|
|
454
408
|
ChatData: {
|
|
455
409
|
/** @default false */
|
|
@@ -602,6 +556,204 @@ interface components {
|
|
|
602
556
|
key?: string;
|
|
603
557
|
query: components["schemas"]["SubscriptionQuery"];
|
|
604
558
|
};
|
|
559
|
+
SearchMessagesDto: {
|
|
560
|
+
/**
|
|
561
|
+
* @description Search phrases (comma-separated)
|
|
562
|
+
* @example phrase1,phrase2
|
|
563
|
+
*/
|
|
564
|
+
phrases: string;
|
|
565
|
+
/**
|
|
566
|
+
* @description Number of days to search back (default: 30)
|
|
567
|
+
* @example 60
|
|
568
|
+
*/
|
|
569
|
+
days?: number;
|
|
570
|
+
/**
|
|
571
|
+
* @description Start date for search (YYYY-MM-DD format)
|
|
572
|
+
* @example 2024-01-01
|
|
573
|
+
*/
|
|
574
|
+
fromDate?: string;
|
|
575
|
+
/**
|
|
576
|
+
* @description End date for search (YYYY-MM-DD format)
|
|
577
|
+
* @example 2024-12-31
|
|
578
|
+
*/
|
|
579
|
+
toDate?: string;
|
|
580
|
+
/**
|
|
581
|
+
* @description Maximum number of messages to return
|
|
582
|
+
* @example 1000
|
|
583
|
+
*/
|
|
584
|
+
limit?: number;
|
|
585
|
+
};
|
|
586
|
+
GetMessagesContextDto: {
|
|
587
|
+
/**
|
|
588
|
+
* @description Start date for search (YYYY-MM-DD or YYYY-MM-DD HH:mm:ss format)
|
|
589
|
+
* @example 2025-08-15 00:00:00
|
|
590
|
+
*/
|
|
591
|
+
fromDate: string;
|
|
592
|
+
/**
|
|
593
|
+
* @description End date for search (YYYY-MM-DD or YYYY-MM-DD HH:mm:ss format)
|
|
594
|
+
* @example 2025-10-15 23:59:59
|
|
595
|
+
*/
|
|
596
|
+
toDate: string;
|
|
597
|
+
/**
|
|
598
|
+
* @description Array of message-channel pairs
|
|
599
|
+
* @example [
|
|
600
|
+
* {
|
|
601
|
+
* "0": 4842617,
|
|
602
|
+
* "1": 1263233484
|
|
603
|
+
* },
|
|
604
|
+
* {
|
|
605
|
+
* "0": 4842700,
|
|
606
|
+
* "1": 2348597164
|
|
607
|
+
* },
|
|
608
|
+
* {
|
|
609
|
+
* "0": 2416624,
|
|
610
|
+
* "1": 1318197938
|
|
611
|
+
* },
|
|
612
|
+
* {
|
|
613
|
+
* "0": 1774097,
|
|
614
|
+
* "1": 1056407492
|
|
615
|
+
* }
|
|
616
|
+
* ]
|
|
617
|
+
*/
|
|
618
|
+
messageChannelPairs: string[];
|
|
619
|
+
};
|
|
620
|
+
SearchMessagesWebhookPaginationDto: {
|
|
621
|
+
/**
|
|
622
|
+
* @description Chunk size for streamed webhook batches
|
|
623
|
+
* @default 100
|
|
624
|
+
* @example 100
|
|
625
|
+
*/
|
|
626
|
+
chunkSize: number;
|
|
627
|
+
};
|
|
628
|
+
SearchMessagesWebhookDto: {
|
|
629
|
+
/**
|
|
630
|
+
* @description Search phrases (comma-separated)
|
|
631
|
+
* @example phrase1,phrase2
|
|
632
|
+
*/
|
|
633
|
+
phrases: string;
|
|
634
|
+
/**
|
|
635
|
+
* @description Number of days to search back (default: 30)
|
|
636
|
+
* @example 60
|
|
637
|
+
*/
|
|
638
|
+
days?: number;
|
|
639
|
+
/**
|
|
640
|
+
* @description Start date for search (YYYY-MM-DD format)
|
|
641
|
+
* @example 2024-01-01
|
|
642
|
+
*/
|
|
643
|
+
fromDate?: string;
|
|
644
|
+
/**
|
|
645
|
+
* @description End date for search (YYYY-MM-DD format)
|
|
646
|
+
* @example 2024-12-31
|
|
647
|
+
*/
|
|
648
|
+
toDate?: string;
|
|
649
|
+
/**
|
|
650
|
+
* @description Maximum number of messages to return
|
|
651
|
+
* @example 1000
|
|
652
|
+
*/
|
|
653
|
+
limit?: number;
|
|
654
|
+
/**
|
|
655
|
+
* @description Webhook URL to send results to
|
|
656
|
+
* @example https://your-app.com/webhooks/messages-search
|
|
657
|
+
*/
|
|
658
|
+
webhookUrl: string;
|
|
659
|
+
/** @description Optional pagination configuration for streamed results */
|
|
660
|
+
pagination?: components["schemas"]["SearchMessagesWebhookPaginationDto"];
|
|
661
|
+
};
|
|
662
|
+
TelegramStatusDto: {
|
|
663
|
+
floodWaitEndsAt?: string;
|
|
664
|
+
floodWait?: number;
|
|
665
|
+
floodWaitBy?: string;
|
|
666
|
+
isBanned?: boolean;
|
|
667
|
+
isAccountFrozen?: boolean;
|
|
668
|
+
isAuthKeyDuplicated?: boolean;
|
|
669
|
+
isSessionRevoked?: boolean;
|
|
670
|
+
isAuthKeyUnregistered?: boolean;
|
|
671
|
+
busyFor?: string;
|
|
672
|
+
lastError?: string;
|
|
673
|
+
selectReason?: string;
|
|
674
|
+
resolveMisses?: number;
|
|
675
|
+
};
|
|
676
|
+
DcInfoDto: {
|
|
677
|
+
id: number;
|
|
678
|
+
ipAddress: string;
|
|
679
|
+
port: number;
|
|
680
|
+
ipv6?: boolean;
|
|
681
|
+
mediaOnly?: boolean;
|
|
682
|
+
testMode?: boolean;
|
|
683
|
+
};
|
|
684
|
+
PrimaryDcsDto: {
|
|
685
|
+
main: components["schemas"]["DcInfoDto"];
|
|
686
|
+
media: components["schemas"]["DcInfoDto"];
|
|
687
|
+
};
|
|
688
|
+
SelfInfoDto: {
|
|
689
|
+
id: number;
|
|
690
|
+
usernames: string[];
|
|
691
|
+
firstName?: string;
|
|
692
|
+
lastName?: string;
|
|
693
|
+
isPremium: boolean;
|
|
694
|
+
isBot: boolean;
|
|
695
|
+
};
|
|
696
|
+
AccountSessionDto: {
|
|
697
|
+
id: number;
|
|
698
|
+
primaryDcs: components["schemas"]["PrimaryDcsDto"];
|
|
699
|
+
self: (null | components["schemas"]["SelfInfoDto"]) & components["schemas"]["SelfInfoDto"];
|
|
700
|
+
/**
|
|
701
|
+
* @description Auth keys by DC ID
|
|
702
|
+
* @example {
|
|
703
|
+
* "1": "base64string",
|
|
704
|
+
* "2": "base64string"
|
|
705
|
+
* }
|
|
706
|
+
*/
|
|
707
|
+
authKeys: Record<string, never>;
|
|
708
|
+
/** @description Base64 encoded avatar URI */
|
|
709
|
+
avatarUri: null | string;
|
|
710
|
+
apiId: number;
|
|
711
|
+
apiHash: string;
|
|
712
|
+
};
|
|
713
|
+
AccountInfoDto: {
|
|
714
|
+
raw: null | Record<string, never>;
|
|
715
|
+
tgId: number;
|
|
716
|
+
username: null | string;
|
|
717
|
+
firstName: null | string;
|
|
718
|
+
lastName: null | string;
|
|
719
|
+
};
|
|
720
|
+
ProxyDto: {
|
|
721
|
+
/** @enum {string} */
|
|
722
|
+
type: "socks5";
|
|
723
|
+
host: string;
|
|
724
|
+
port: number;
|
|
725
|
+
username: null | string;
|
|
726
|
+
password: null | string;
|
|
727
|
+
full: null | string;
|
|
728
|
+
};
|
|
729
|
+
AccountDto: {
|
|
730
|
+
phone: string;
|
|
731
|
+
status: components["schemas"]["TelegramStatusDto"];
|
|
732
|
+
sessions: components["schemas"]["AccountSessionDto"][];
|
|
733
|
+
info: (null | components["schemas"]["AccountInfoDto"]) & components["schemas"]["AccountInfoDto"];
|
|
734
|
+
proxy: (null | components["schemas"]["ProxyDto"]) & components["schemas"]["ProxyDto"];
|
|
735
|
+
};
|
|
736
|
+
ListAccountsResponseDto: {
|
|
737
|
+
count: number;
|
|
738
|
+
accounts: components["schemas"]["AccountDto"][];
|
|
739
|
+
};
|
|
740
|
+
GetCommonChatsDto: {
|
|
741
|
+
/**
|
|
742
|
+
* @description Account ID to use for fetching common chats
|
|
743
|
+
* @example 123456789
|
|
744
|
+
*/
|
|
745
|
+
accountId: number;
|
|
746
|
+
/**
|
|
747
|
+
* @description Username to find common chats with (without @)
|
|
748
|
+
* @example durov
|
|
749
|
+
*/
|
|
750
|
+
username: string;
|
|
751
|
+
/**
|
|
752
|
+
* @description Webhook URL to send results to
|
|
753
|
+
* @example https://your-app.com/webhooks/common-chats
|
|
754
|
+
*/
|
|
755
|
+
webhookUrl: string;
|
|
756
|
+
};
|
|
605
757
|
};
|
|
606
758
|
}
|
|
607
759
|
type $defs = Record<string, never>;
|
|
@@ -644,75 +796,6 @@ interface operations {
|
|
|
644
796
|
};
|
|
645
797
|
};
|
|
646
798
|
};
|
|
647
|
-
"messages.searchMessages": {
|
|
648
|
-
parameters: {
|
|
649
|
-
header: {
|
|
650
|
-
/** @description `Basic token`, where token is `id:secret` base64 encoded */
|
|
651
|
-
Authorization: string;
|
|
652
|
-
};
|
|
653
|
-
};
|
|
654
|
-
requestBody: {
|
|
655
|
-
content: {
|
|
656
|
-
"application/json": components["schemas"]["SearchMessagesDto"];
|
|
657
|
-
};
|
|
658
|
-
};
|
|
659
|
-
responses: {
|
|
660
|
-
201: {
|
|
661
|
-
headers: {
|
|
662
|
-
[name: string]: unknown;
|
|
663
|
-
};
|
|
664
|
-
content: {
|
|
665
|
-
"application/json": Record<string, never>[];
|
|
666
|
-
};
|
|
667
|
-
};
|
|
668
|
-
};
|
|
669
|
-
};
|
|
670
|
-
"messages.getMessagesContext": {
|
|
671
|
-
parameters: {
|
|
672
|
-
header: {
|
|
673
|
-
/** @description `Basic token`, where token is `id:secret` base64 encoded */
|
|
674
|
-
Authorization: string;
|
|
675
|
-
};
|
|
676
|
-
};
|
|
677
|
-
requestBody: {
|
|
678
|
-
content: {
|
|
679
|
-
"application/json": components["schemas"]["GetMessagesContextDto"];
|
|
680
|
-
};
|
|
681
|
-
};
|
|
682
|
-
responses: {
|
|
683
|
-
201: {
|
|
684
|
-
headers: {
|
|
685
|
-
[name: string]: unknown;
|
|
686
|
-
};
|
|
687
|
-
content: {
|
|
688
|
-
"application/json": Record<string, never>[];
|
|
689
|
-
};
|
|
690
|
-
};
|
|
691
|
-
};
|
|
692
|
-
};
|
|
693
|
-
"messages.searchMessagesWebhook": {
|
|
694
|
-
parameters: {
|
|
695
|
-
header: {
|
|
696
|
-
/** @description `Basic token`, where token is `id:secret` base64 encoded */
|
|
697
|
-
Authorization: string;
|
|
698
|
-
};
|
|
699
|
-
path: {
|
|
700
|
-
externalId: string;
|
|
701
|
-
};
|
|
702
|
-
};
|
|
703
|
-
requestBody: {
|
|
704
|
-
content: {
|
|
705
|
-
"application/json": components["schemas"]["SearchMessagesWebhookDto"];
|
|
706
|
-
};
|
|
707
|
-
};
|
|
708
|
-
responses: {
|
|
709
|
-
201: {
|
|
710
|
-
headers: {
|
|
711
|
-
[name: string]: unknown;
|
|
712
|
-
};
|
|
713
|
-
};
|
|
714
|
-
};
|
|
715
|
-
};
|
|
716
799
|
"channels.getHello": {
|
|
717
800
|
parameters: {
|
|
718
801
|
header: {
|
|
@@ -983,6 +1066,48 @@ interface operations {
|
|
|
983
1066
|
};
|
|
984
1067
|
};
|
|
985
1068
|
};
|
|
1069
|
+
"chats.userPresence": {
|
|
1070
|
+
parameters: {
|
|
1071
|
+
header: {
|
|
1072
|
+
/** @description `Basic token`, where token is `id:secret` base64 encoded */
|
|
1073
|
+
Authorization: string;
|
|
1074
|
+
};
|
|
1075
|
+
};
|
|
1076
|
+
requestBody: {
|
|
1077
|
+
content: {
|
|
1078
|
+
"application/json": components["schemas"]["UserPresenceSearchDto"];
|
|
1079
|
+
};
|
|
1080
|
+
};
|
|
1081
|
+
responses: {
|
|
1082
|
+
/** @description Synchronous user presence result */
|
|
1083
|
+
200: {
|
|
1084
|
+
headers: {
|
|
1085
|
+
[name: string]: unknown;
|
|
1086
|
+
};
|
|
1087
|
+
content: {
|
|
1088
|
+
"application/json": {
|
|
1089
|
+
data: {
|
|
1090
|
+
user_id: number;
|
|
1091
|
+
channel_id: number;
|
|
1092
|
+
}[];
|
|
1093
|
+
totalResults: number;
|
|
1094
|
+
processingTimeMs: number;
|
|
1095
|
+
};
|
|
1096
|
+
};
|
|
1097
|
+
};
|
|
1098
|
+
201: {
|
|
1099
|
+
headers: {
|
|
1100
|
+
[name: string]: unknown;
|
|
1101
|
+
};
|
|
1102
|
+
};
|
|
1103
|
+
/** @description Unauthorized */
|
|
1104
|
+
401: {
|
|
1105
|
+
headers: {
|
|
1106
|
+
[name: string]: unknown;
|
|
1107
|
+
};
|
|
1108
|
+
};
|
|
1109
|
+
};
|
|
1110
|
+
};
|
|
986
1111
|
"subscriptions.upsert": {
|
|
987
1112
|
parameters: {
|
|
988
1113
|
header: {
|
|
@@ -1179,6 +1304,137 @@ interface operations {
|
|
|
1179
1304
|
};
|
|
1180
1305
|
};
|
|
1181
1306
|
};
|
|
1307
|
+
"messages.searchMessages": {
|
|
1308
|
+
parameters: {
|
|
1309
|
+
header: {
|
|
1310
|
+
/** @description `Basic token`, where token is `id:secret` base64 encoded */
|
|
1311
|
+
Authorization: string;
|
|
1312
|
+
};
|
|
1313
|
+
};
|
|
1314
|
+
requestBody: {
|
|
1315
|
+
content: {
|
|
1316
|
+
"application/json": components["schemas"]["SearchMessagesDto"];
|
|
1317
|
+
};
|
|
1318
|
+
};
|
|
1319
|
+
responses: {
|
|
1320
|
+
201: {
|
|
1321
|
+
headers: {
|
|
1322
|
+
[name: string]: unknown;
|
|
1323
|
+
};
|
|
1324
|
+
content: {
|
|
1325
|
+
"application/json": Record<string, never>[];
|
|
1326
|
+
};
|
|
1327
|
+
};
|
|
1328
|
+
};
|
|
1329
|
+
};
|
|
1330
|
+
"messages.getMessagesContext": {
|
|
1331
|
+
parameters: {
|
|
1332
|
+
header: {
|
|
1333
|
+
/** @description `Basic token`, where token is `id:secret` base64 encoded */
|
|
1334
|
+
Authorization: string;
|
|
1335
|
+
};
|
|
1336
|
+
};
|
|
1337
|
+
requestBody: {
|
|
1338
|
+
content: {
|
|
1339
|
+
"application/json": components["schemas"]["GetMessagesContextDto"];
|
|
1340
|
+
};
|
|
1341
|
+
};
|
|
1342
|
+
responses: {
|
|
1343
|
+
201: {
|
|
1344
|
+
headers: {
|
|
1345
|
+
[name: string]: unknown;
|
|
1346
|
+
};
|
|
1347
|
+
content: {
|
|
1348
|
+
"application/json": Record<string, never>[];
|
|
1349
|
+
};
|
|
1350
|
+
};
|
|
1351
|
+
};
|
|
1352
|
+
};
|
|
1353
|
+
"messages.searchMessagesWebhook": {
|
|
1354
|
+
parameters: {
|
|
1355
|
+
header: {
|
|
1356
|
+
/** @description `Basic token`, where token is `id:secret` base64 encoded */
|
|
1357
|
+
Authorization: string;
|
|
1358
|
+
};
|
|
1359
|
+
path: {
|
|
1360
|
+
externalId: string;
|
|
1361
|
+
};
|
|
1362
|
+
};
|
|
1363
|
+
requestBody: {
|
|
1364
|
+
content: {
|
|
1365
|
+
"application/json": components["schemas"]["SearchMessagesWebhookDto"];
|
|
1366
|
+
};
|
|
1367
|
+
};
|
|
1368
|
+
responses: {
|
|
1369
|
+
201: {
|
|
1370
|
+
headers: {
|
|
1371
|
+
[name: string]: unknown;
|
|
1372
|
+
};
|
|
1373
|
+
};
|
|
1374
|
+
};
|
|
1375
|
+
};
|
|
1376
|
+
"accounts.list": {
|
|
1377
|
+
parameters: {
|
|
1378
|
+
header: {
|
|
1379
|
+
/** @description `Basic token`, where token is `id:secret` base64 encoded */
|
|
1380
|
+
Authorization: string;
|
|
1381
|
+
};
|
|
1382
|
+
};
|
|
1383
|
+
responses: {
|
|
1384
|
+
/** @description List of Telegram accounts from tg-scraper-farm */
|
|
1385
|
+
200: {
|
|
1386
|
+
headers: {
|
|
1387
|
+
[name: string]: unknown;
|
|
1388
|
+
};
|
|
1389
|
+
content: {
|
|
1390
|
+
"application/json": components["schemas"]["ListAccountsResponseDto"];
|
|
1391
|
+
};
|
|
1392
|
+
};
|
|
1393
|
+
/** @description Unauthorized */
|
|
1394
|
+
401: {
|
|
1395
|
+
headers: {
|
|
1396
|
+
[name: string]: unknown;
|
|
1397
|
+
};
|
|
1398
|
+
};
|
|
1399
|
+
};
|
|
1400
|
+
};
|
|
1401
|
+
"accounts.getCommonChats": {
|
|
1402
|
+
parameters: {
|
|
1403
|
+
header: {
|
|
1404
|
+
/** @description `Basic token`, where token is `id:secret` base64 encoded */
|
|
1405
|
+
Authorization: string;
|
|
1406
|
+
};
|
|
1407
|
+
path: {
|
|
1408
|
+
externalId: string;
|
|
1409
|
+
};
|
|
1410
|
+
};
|
|
1411
|
+
requestBody: {
|
|
1412
|
+
content: {
|
|
1413
|
+
"application/json": components["schemas"]["GetCommonChatsDto"];
|
|
1414
|
+
};
|
|
1415
|
+
};
|
|
1416
|
+
responses: {
|
|
1417
|
+
/** @description Request queued; results will be sent via webhook */
|
|
1418
|
+
200: {
|
|
1419
|
+
headers: {
|
|
1420
|
+
[name: string]: unknown;
|
|
1421
|
+
};
|
|
1422
|
+
content: {
|
|
1423
|
+
"application/json": {
|
|
1424
|
+
externalId: string;
|
|
1425
|
+
/** @enum {string} */
|
|
1426
|
+
status: "processing";
|
|
1427
|
+
};
|
|
1428
|
+
};
|
|
1429
|
+
};
|
|
1430
|
+
/** @description Unauthorized */
|
|
1431
|
+
401: {
|
|
1432
|
+
headers: {
|
|
1433
|
+
[name: string]: unknown;
|
|
1434
|
+
};
|
|
1435
|
+
};
|
|
1436
|
+
};
|
|
1437
|
+
};
|
|
1182
1438
|
}
|
|
1183
1439
|
|
|
1184
1440
|
export type { $defs, components, operations, paths };
|