common-tg-service 1.3.115 → 1.3.116
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.
Potentially problematic release.
This version of common-tg-service might be problematic. Click here for more details.
- package/dist/components/Telegram/Telegram.controller.d.ts +230 -11
- package/dist/components/Telegram/Telegram.controller.js +578 -57
- package/dist/components/Telegram/Telegram.controller.js.map +1 -1
- package/dist/components/Telegram/Telegram.service.d.ts +219 -10
- package/dist/components/Telegram/Telegram.service.js +70 -17
- package/dist/components/Telegram/Telegram.service.js.map +1 -1
- package/dist/components/Telegram/TelegramManager.d.ts +230 -11
- package/dist/components/Telegram/TelegramManager.js +1011 -325
- package/dist/components/Telegram/TelegramManager.js.map +1 -1
- package/dist/components/Telegram/types/telegram-types.d.ts +1 -0
- package/dist/components/users/users.controller.d.ts +9 -0
- package/dist/components/users/users.controller.js +181 -0
- package/dist/components/users/users.controller.js.map +1 -1
- package/dist/components/users/users.service.d.ts +19 -0
- package/dist/components/users/users.service.js +215 -0
- package/dist/components/users/users.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -90,23 +90,229 @@ export declare class TelegramController {
|
|
|
90
90
|
totalOperations: number;
|
|
91
91
|
};
|
|
92
92
|
}>;
|
|
93
|
-
getCallLogStats(mobile: string): Promise<{
|
|
94
|
-
chatCallCounts: any[];
|
|
93
|
+
getCallLogStats(mobile: string, limit?: number): Promise<{
|
|
95
94
|
outgoing: number;
|
|
96
95
|
incoming: number;
|
|
97
96
|
video: number;
|
|
97
|
+
audio: number;
|
|
98
|
+
chatCallCounts: Array<{
|
|
99
|
+
chatId: string;
|
|
100
|
+
phone?: string;
|
|
101
|
+
username?: string;
|
|
102
|
+
name: string;
|
|
103
|
+
count: number;
|
|
104
|
+
msgs?: number;
|
|
105
|
+
video?: number;
|
|
106
|
+
photo?: number;
|
|
107
|
+
peerType: "user" | "group" | "channel";
|
|
108
|
+
}>;
|
|
98
109
|
totalCalls: number;
|
|
110
|
+
analyzedCalls: number;
|
|
99
111
|
}>;
|
|
100
112
|
addContactsBulk(mobile: string, contactsDto: AddContactsDto): Promise<void>;
|
|
101
113
|
getContacts(mobile: string): Promise<import("telegram").Api.contacts.TypeContacts>;
|
|
102
114
|
sendMedia(mobile: string, sendMediaDto: SendMediaDto): Promise<void>;
|
|
103
115
|
downloadMedia(mobile: string, chatId: string, messageId: number, res: Response): Promise<any>;
|
|
104
|
-
sendMediaAlbum(mobile: string, albumDto: MediaAlbumOptions): Promise<
|
|
105
|
-
|
|
116
|
+
sendMediaAlbum(mobile: string, albumDto: MediaAlbumOptions): Promise<{
|
|
117
|
+
success: number;
|
|
118
|
+
failed: number;
|
|
119
|
+
errors: {
|
|
120
|
+
index: number;
|
|
121
|
+
error: string;
|
|
122
|
+
}[];
|
|
123
|
+
CONSTRUCTOR_ID: 3809980286;
|
|
124
|
+
SUBCLASS_OF_ID: 2331323052;
|
|
125
|
+
classType: "constructor";
|
|
126
|
+
className: "UpdatesTooLong";
|
|
127
|
+
originalArgs: void;
|
|
128
|
+
} | {
|
|
129
|
+
success: number;
|
|
130
|
+
failed: number;
|
|
131
|
+
errors: {
|
|
132
|
+
index: number;
|
|
133
|
+
error: string;
|
|
134
|
+
}[];
|
|
135
|
+
CONSTRUCTOR_ID: 826001400;
|
|
136
|
+
SUBCLASS_OF_ID: 2331323052;
|
|
137
|
+
classType: "constructor";
|
|
138
|
+
className: "UpdateShortMessage";
|
|
139
|
+
out?: boolean;
|
|
140
|
+
mentioned?: boolean;
|
|
141
|
+
mediaUnread?: boolean;
|
|
142
|
+
silent?: boolean;
|
|
143
|
+
id: import("telegram").Api.int;
|
|
144
|
+
userId: import("telegram").Api.long;
|
|
145
|
+
message: string;
|
|
146
|
+
pts: import("telegram").Api.int;
|
|
147
|
+
ptsCount: import("telegram").Api.int;
|
|
148
|
+
date: import("telegram").Api.int;
|
|
149
|
+
fwdFrom?: import("telegram").Api.TypeMessageFwdHeader;
|
|
150
|
+
viaBotId?: import("telegram").Api.long;
|
|
151
|
+
replyTo?: import("telegram").Api.TypeMessageReplyHeader;
|
|
152
|
+
entities?: import("telegram").Api.TypeMessageEntity[];
|
|
153
|
+
ttlPeriod?: import("telegram").Api.int;
|
|
154
|
+
originalArgs: {
|
|
155
|
+
out?: boolean;
|
|
156
|
+
mentioned?: boolean;
|
|
157
|
+
mediaUnread?: boolean;
|
|
158
|
+
silent?: boolean;
|
|
159
|
+
id: import("telegram").Api.int;
|
|
160
|
+
userId: import("telegram").Api.long;
|
|
161
|
+
message: string;
|
|
162
|
+
pts: import("telegram").Api.int;
|
|
163
|
+
ptsCount: import("telegram").Api.int;
|
|
164
|
+
date: import("telegram").Api.int;
|
|
165
|
+
fwdFrom?: import("telegram").Api.TypeMessageFwdHeader;
|
|
166
|
+
viaBotId?: import("telegram").Api.long;
|
|
167
|
+
replyTo?: import("telegram").Api.TypeMessageReplyHeader;
|
|
168
|
+
entities?: import("telegram").Api.TypeMessageEntity[];
|
|
169
|
+
ttlPeriod?: import("telegram").Api.int;
|
|
170
|
+
};
|
|
171
|
+
} | {
|
|
172
|
+
success: number;
|
|
173
|
+
failed: number;
|
|
174
|
+
errors: {
|
|
175
|
+
index: number;
|
|
176
|
+
error: string;
|
|
177
|
+
}[];
|
|
178
|
+
CONSTRUCTOR_ID: 1299050149;
|
|
179
|
+
SUBCLASS_OF_ID: 2331323052;
|
|
180
|
+
classType: "constructor";
|
|
181
|
+
className: "UpdateShortChatMessage";
|
|
182
|
+
out?: boolean;
|
|
183
|
+
mentioned?: boolean;
|
|
184
|
+
mediaUnread?: boolean;
|
|
185
|
+
silent?: boolean;
|
|
186
|
+
id: import("telegram").Api.int;
|
|
187
|
+
fromId: import("telegram").Api.long;
|
|
188
|
+
chatId: import("telegram").Api.long;
|
|
189
|
+
message: string;
|
|
190
|
+
pts: import("telegram").Api.int;
|
|
191
|
+
ptsCount: import("telegram").Api.int;
|
|
192
|
+
date: import("telegram").Api.int;
|
|
193
|
+
fwdFrom?: import("telegram").Api.TypeMessageFwdHeader;
|
|
194
|
+
viaBotId?: import("telegram").Api.long;
|
|
195
|
+
replyTo?: import("telegram").Api.TypeMessageReplyHeader;
|
|
196
|
+
entities?: import("telegram").Api.TypeMessageEntity[];
|
|
197
|
+
ttlPeriod?: import("telegram").Api.int;
|
|
198
|
+
originalArgs: {
|
|
199
|
+
out?: boolean;
|
|
200
|
+
mentioned?: boolean;
|
|
201
|
+
mediaUnread?: boolean;
|
|
202
|
+
silent?: boolean;
|
|
203
|
+
id: import("telegram").Api.int;
|
|
204
|
+
fromId: import("telegram").Api.long;
|
|
205
|
+
chatId: import("telegram").Api.long;
|
|
206
|
+
message: string;
|
|
207
|
+
pts: import("telegram").Api.int;
|
|
208
|
+
ptsCount: import("telegram").Api.int;
|
|
209
|
+
date: import("telegram").Api.int;
|
|
210
|
+
fwdFrom?: import("telegram").Api.TypeMessageFwdHeader;
|
|
211
|
+
viaBotId?: import("telegram").Api.long;
|
|
212
|
+
replyTo?: import("telegram").Api.TypeMessageReplyHeader;
|
|
213
|
+
entities?: import("telegram").Api.TypeMessageEntity[];
|
|
214
|
+
ttlPeriod?: import("telegram").Api.int;
|
|
215
|
+
};
|
|
216
|
+
} | {
|
|
217
|
+
success: number;
|
|
218
|
+
failed: number;
|
|
219
|
+
errors: {
|
|
220
|
+
index: number;
|
|
221
|
+
error: string;
|
|
222
|
+
}[];
|
|
223
|
+
CONSTRUCTOR_ID: 2027216577;
|
|
224
|
+
SUBCLASS_OF_ID: 2331323052;
|
|
225
|
+
classType: "constructor";
|
|
226
|
+
className: "UpdateShort";
|
|
227
|
+
update: import("telegram").Api.TypeUpdate;
|
|
228
|
+
date: import("telegram").Api.int;
|
|
229
|
+
originalArgs: {
|
|
230
|
+
update: import("telegram").Api.TypeUpdate;
|
|
231
|
+
date: import("telegram").Api.int;
|
|
232
|
+
};
|
|
233
|
+
} | {
|
|
234
|
+
success: number;
|
|
235
|
+
failed: number;
|
|
236
|
+
errors: {
|
|
237
|
+
index: number;
|
|
238
|
+
error: string;
|
|
239
|
+
}[];
|
|
240
|
+
CONSTRUCTOR_ID: 1918567619;
|
|
241
|
+
SUBCLASS_OF_ID: 2331323052;
|
|
242
|
+
classType: "constructor";
|
|
243
|
+
className: "UpdatesCombined";
|
|
244
|
+
updates: import("telegram").Api.TypeUpdate[];
|
|
245
|
+
users: import("telegram").Api.TypeUser[];
|
|
246
|
+
chats: import("telegram").Api.TypeChat[];
|
|
247
|
+
date: import("telegram").Api.int;
|
|
248
|
+
seqStart: import("telegram").Api.int;
|
|
249
|
+
seq: import("telegram").Api.int;
|
|
250
|
+
originalArgs: {
|
|
251
|
+
updates: import("telegram").Api.TypeUpdate[];
|
|
252
|
+
users: import("telegram").Api.TypeUser[];
|
|
253
|
+
chats: import("telegram").Api.TypeChat[];
|
|
254
|
+
date: import("telegram").Api.int;
|
|
255
|
+
seqStart: import("telegram").Api.int;
|
|
256
|
+
seq: import("telegram").Api.int;
|
|
257
|
+
};
|
|
258
|
+
} | {
|
|
259
|
+
success: number;
|
|
260
|
+
failed: number;
|
|
261
|
+
errors: {
|
|
262
|
+
index: number;
|
|
263
|
+
error: string;
|
|
264
|
+
}[];
|
|
265
|
+
CONSTRUCTOR_ID: 1957577280;
|
|
266
|
+
SUBCLASS_OF_ID: 2331323052;
|
|
267
|
+
classType: "constructor";
|
|
268
|
+
className: "Updates";
|
|
269
|
+
updates: import("telegram").Api.TypeUpdate[];
|
|
270
|
+
users: import("telegram").Api.TypeUser[];
|
|
271
|
+
chats: import("telegram").Api.TypeChat[];
|
|
272
|
+
date: import("telegram").Api.int;
|
|
273
|
+
seq: import("telegram").Api.int;
|
|
274
|
+
originalArgs: {
|
|
275
|
+
updates: import("telegram").Api.TypeUpdate[];
|
|
276
|
+
users: import("telegram").Api.TypeUser[];
|
|
277
|
+
chats: import("telegram").Api.TypeChat[];
|
|
278
|
+
date: import("telegram").Api.int;
|
|
279
|
+
seq: import("telegram").Api.int;
|
|
280
|
+
};
|
|
281
|
+
} | {
|
|
282
|
+
success: number;
|
|
283
|
+
failed: number;
|
|
284
|
+
errors: {
|
|
285
|
+
index: number;
|
|
286
|
+
error: string;
|
|
287
|
+
}[];
|
|
288
|
+
CONSTRUCTOR_ID: 2417352961;
|
|
289
|
+
SUBCLASS_OF_ID: 2331323052;
|
|
290
|
+
classType: "constructor";
|
|
291
|
+
className: "UpdateShortSentMessage";
|
|
292
|
+
out?: boolean;
|
|
293
|
+
id: import("telegram").Api.int;
|
|
294
|
+
pts: import("telegram").Api.int;
|
|
295
|
+
ptsCount: import("telegram").Api.int;
|
|
296
|
+
date: import("telegram").Api.int;
|
|
297
|
+
media?: import("telegram").Api.TypeMessageMedia;
|
|
298
|
+
entities?: import("telegram").Api.TypeMessageEntity[];
|
|
299
|
+
ttlPeriod?: import("telegram").Api.int;
|
|
300
|
+
originalArgs: {
|
|
301
|
+
out?: boolean;
|
|
302
|
+
id: import("telegram").Api.int;
|
|
303
|
+
pts: import("telegram").Api.int;
|
|
304
|
+
ptsCount: import("telegram").Api.int;
|
|
305
|
+
date: import("telegram").Api.int;
|
|
306
|
+
media?: import("telegram").Api.TypeMessageMedia;
|
|
307
|
+
entities?: import("telegram").Api.TypeMessageEntity[];
|
|
308
|
+
ttlPeriod?: import("telegram").Api.int;
|
|
309
|
+
};
|
|
310
|
+
}>;
|
|
311
|
+
getMediaMetadata(mobile: string, chatId: string, types?: string | string[], startDate?: string, endDate?: string, limit?: number, minId?: number, maxId?: number, all?: boolean): Promise<{
|
|
106
312
|
messages: any[];
|
|
107
313
|
total: number;
|
|
108
314
|
}>;
|
|
109
|
-
getFilteredMedia(mobile: string, chatId: string, types?:
|
|
315
|
+
getFilteredMedia(mobile: string, chatId: string, types?: string | string[], startDate?: string, endDate?: string, limit?: number, minId?: number, maxId?: number): Promise<{
|
|
110
316
|
messages: {
|
|
111
317
|
messageId: number;
|
|
112
318
|
type: "document" | "photo" | "video";
|
|
@@ -268,14 +474,14 @@ export declare class TelegramController {
|
|
|
268
474
|
}): Promise<import("telegram").Api.TypeUpdates>;
|
|
269
475
|
hasPassword(mobile: string): Promise<boolean>;
|
|
270
476
|
getChats(mobile: string, limit?: number, offsetDate?: number, offsetId?: number, offsetPeer?: string, folderId?: number): Promise<{
|
|
271
|
-
id:
|
|
272
|
-
title:
|
|
273
|
-
username:
|
|
477
|
+
id: any;
|
|
478
|
+
title: any;
|
|
479
|
+
username: any;
|
|
274
480
|
type: string;
|
|
275
|
-
unreadCount:
|
|
481
|
+
unreadCount: any;
|
|
276
482
|
lastMessage: {
|
|
277
|
-
id:
|
|
278
|
-
text:
|
|
483
|
+
id: any;
|
|
484
|
+
text: any;
|
|
279
485
|
date: Date;
|
|
280
486
|
};
|
|
281
487
|
}[]>;
|
|
@@ -305,6 +511,8 @@ export declare class TelegramController {
|
|
|
305
511
|
lastName?: string;
|
|
306
512
|
totalMessages: number;
|
|
307
513
|
interactionScore: number;
|
|
514
|
+
engagementLevel: "recent" | "active" | "dormant";
|
|
515
|
+
lastActivityDays: number;
|
|
308
516
|
calls: {
|
|
309
517
|
total: number;
|
|
310
518
|
incoming: {
|
|
@@ -329,6 +537,17 @@ export declare class TelegramController {
|
|
|
329
537
|
textMessages: number;
|
|
330
538
|
};
|
|
331
539
|
}[]>;
|
|
540
|
+
getSelfMsgsInfo(mobile: string, limit?: number): Promise<{
|
|
541
|
+
photoCount: number;
|
|
542
|
+
videoCount: number;
|
|
543
|
+
movieCount: number;
|
|
544
|
+
total: number;
|
|
545
|
+
ownPhotoCount: number;
|
|
546
|
+
otherPhotoCount: number;
|
|
547
|
+
ownVideoCount: number;
|
|
548
|
+
otherVideoCount: number;
|
|
549
|
+
analyzedMessages: number;
|
|
550
|
+
}>;
|
|
332
551
|
addBotsToChannel(mobile: string, body: {
|
|
333
552
|
channelIds?: string[];
|
|
334
553
|
}): Promise<void>;
|