@skravets/eapi 0.0.43 → 0.0.45
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 +335 -186
- package/dist/api-types.d.ts +335 -186
- package/dist/index.cjs +76 -48
- package/dist/index.d.cts +66 -33
- package/dist/index.d.ts +66 -33
- package/dist/index.js +76 -48
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -121,54 +121,6 @@ class EApi {
|
|
|
121
121
|
return this.request("/health", void 0, { method: "GET", ...options });
|
|
122
122
|
}
|
|
123
123
|
};
|
|
124
|
-
/**
|
|
125
|
-
* @tags messages
|
|
126
|
-
*/
|
|
127
|
-
messages = {
|
|
128
|
-
/**
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
* @tags messages
|
|
132
|
-
* @summary Search messages by phrases and time interval
|
|
133
|
-
*
|
|
134
|
-
* [Documentation](.../messages/operation/messages.searchMessages)
|
|
135
|
-
*/
|
|
136
|
-
searchMessages: (body, options) => {
|
|
137
|
-
return this.request("/messages/search", body, {
|
|
138
|
-
method: "POST",
|
|
139
|
-
...options
|
|
140
|
-
});
|
|
141
|
-
},
|
|
142
|
-
/**
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
* @tags messages
|
|
146
|
-
* @summary Get messages context around specified message IDs
|
|
147
|
-
*
|
|
148
|
-
* [Documentation](.../messages/operation/messages.getMessagesContext)
|
|
149
|
-
*/
|
|
150
|
-
getMessagesContext: (body, options) => {
|
|
151
|
-
return this.request("/messages/context", body, {
|
|
152
|
-
method: "POST",
|
|
153
|
-
...options
|
|
154
|
-
});
|
|
155
|
-
},
|
|
156
|
-
/**
|
|
157
|
-
*
|
|
158
|
-
*
|
|
159
|
-
* @tags messages
|
|
160
|
-
* @summary Search messages by phrases and time interval (async with webhook)
|
|
161
|
-
*
|
|
162
|
-
* [Documentation](.../messages/operation/messages.searchMessagesWebhook)
|
|
163
|
-
*/
|
|
164
|
-
searchMessagesWebhook: (externalId, body, options) => {
|
|
165
|
-
return this.request(
|
|
166
|
-
`/messages/search/webhook/${externalId}`,
|
|
167
|
-
body,
|
|
168
|
-
{ method: "POST", ...options }
|
|
169
|
-
);
|
|
170
|
-
}
|
|
171
|
-
};
|
|
172
124
|
/**
|
|
173
125
|
* @tags chats
|
|
174
126
|
*/
|
|
@@ -295,6 +247,20 @@ class EApi {
|
|
|
295
247
|
method: "POST",
|
|
296
248
|
...options
|
|
297
249
|
});
|
|
250
|
+
},
|
|
251
|
+
/**
|
|
252
|
+
*
|
|
253
|
+
*
|
|
254
|
+
* @tags chats
|
|
255
|
+
* @summary Search for user presence in specified chats (sync)
|
|
256
|
+
*
|
|
257
|
+
* [Documentation](.../chats/operation/chats.userPresence)
|
|
258
|
+
*/
|
|
259
|
+
userPresence: (body, options) => {
|
|
260
|
+
return this.request("/chats/user-presence", body, {
|
|
261
|
+
method: "POST",
|
|
262
|
+
...options
|
|
263
|
+
});
|
|
298
264
|
}
|
|
299
265
|
};
|
|
300
266
|
/**
|
|
@@ -372,6 +338,54 @@ class EApi {
|
|
|
372
338
|
});
|
|
373
339
|
}
|
|
374
340
|
};
|
|
341
|
+
/**
|
|
342
|
+
* @tags messages
|
|
343
|
+
*/
|
|
344
|
+
messages = {
|
|
345
|
+
/**
|
|
346
|
+
*
|
|
347
|
+
*
|
|
348
|
+
* @tags messages
|
|
349
|
+
* @summary Search messages by phrases and time interval
|
|
350
|
+
*
|
|
351
|
+
* [Documentation](.../messages/operation/messages.searchMessages)
|
|
352
|
+
*/
|
|
353
|
+
searchMessages: (body, options) => {
|
|
354
|
+
return this.request("/messages/search", body, {
|
|
355
|
+
method: "POST",
|
|
356
|
+
...options
|
|
357
|
+
});
|
|
358
|
+
},
|
|
359
|
+
/**
|
|
360
|
+
*
|
|
361
|
+
*
|
|
362
|
+
* @tags messages
|
|
363
|
+
* @summary Get messages context around specified message IDs
|
|
364
|
+
*
|
|
365
|
+
* [Documentation](.../messages/operation/messages.getMessagesContext)
|
|
366
|
+
*/
|
|
367
|
+
getMessagesContext: (body, options) => {
|
|
368
|
+
return this.request("/messages/context", body, {
|
|
369
|
+
method: "POST",
|
|
370
|
+
...options
|
|
371
|
+
});
|
|
372
|
+
},
|
|
373
|
+
/**
|
|
374
|
+
*
|
|
375
|
+
*
|
|
376
|
+
* @tags messages
|
|
377
|
+
* @summary Search messages by phrases and time interval (async with webhook)
|
|
378
|
+
*
|
|
379
|
+
* [Documentation](.../messages/operation/messages.searchMessagesWebhook)
|
|
380
|
+
*/
|
|
381
|
+
searchMessagesWebhook: (externalId, body, options) => {
|
|
382
|
+
return this.request(
|
|
383
|
+
`/messages/search/webhook/${externalId}`,
|
|
384
|
+
body,
|
|
385
|
+
{ method: "POST", ...options }
|
|
386
|
+
);
|
|
387
|
+
}
|
|
388
|
+
};
|
|
375
389
|
/**
|
|
376
390
|
* @tags accounts
|
|
377
391
|
*/
|
|
@@ -389,6 +403,20 @@ class EApi {
|
|
|
389
403
|
method: "GET",
|
|
390
404
|
...options
|
|
391
405
|
});
|
|
406
|
+
},
|
|
407
|
+
/**
|
|
408
|
+
*
|
|
409
|
+
*
|
|
410
|
+
* @tags accounts
|
|
411
|
+
* @summary Get common chats between account and user (async with webhook)
|
|
412
|
+
*
|
|
413
|
+
* [Documentation](.../accounts/operation/accounts.getCommonChats)
|
|
414
|
+
*/
|
|
415
|
+
getCommonChats: (externalId, body, options) => {
|
|
416
|
+
return this.request(`/accounts/common-chats/${externalId}`, body, {
|
|
417
|
+
method: "POST",
|
|
418
|
+
...options
|
|
419
|
+
});
|
|
392
420
|
}
|
|
393
421
|
};
|
|
394
422
|
/** @generated stop-generate-methods */
|
package/dist/index.d.cts
CHANGED
|
@@ -320,6 +320,20 @@ interface PublishersStatusQueueInputClickHouseMessagesResult {
|
|
|
320
320
|
error: string;
|
|
321
321
|
};
|
|
322
322
|
}
|
|
323
|
+
interface PublishersStatusQueueInputGetCommonChatsResult {
|
|
324
|
+
type: "get_common_chats_result";
|
|
325
|
+
metadata: Metadata;
|
|
326
|
+
user: {
|
|
327
|
+
id: number;
|
|
328
|
+
username: string;
|
|
329
|
+
};
|
|
330
|
+
chats: {
|
|
331
|
+
id: number;
|
|
332
|
+
username?: string;
|
|
333
|
+
title?: string;
|
|
334
|
+
type: "chat" | "channel";
|
|
335
|
+
}[];
|
|
336
|
+
}
|
|
323
337
|
interface EventByType {
|
|
324
338
|
chat_parsed: ChatParsedTyped;
|
|
325
339
|
messages_parsed: MessagesParsedTyped;
|
|
@@ -329,8 +343,9 @@ interface EventByType {
|
|
|
329
343
|
parsing_error: PublishersStatusQueueParsingErrorResult;
|
|
330
344
|
account_updated: PublishersStatusQueueAccountUpdatedResult;
|
|
331
345
|
search_results: PublishersStatusQueueInputClickHouseMessagesResult;
|
|
346
|
+
get_common_chats_result: PublishersStatusQueueInputGetCommonChatsResult;
|
|
332
347
|
}
|
|
333
|
-
type WebhookBody = ChatParsedTyped | MessagesParsedTyped | PublishersStatusQueueInputJoinResult | PublishersStatusQueueInputSendResult | PublishersStatusQueueInputAgentPrivateMessageResult | PublishersStatusQueueParsingErrorResult | PublishersStatusQueueAccountUpdatedResult | PublishersStatusQueueInputClickHouseMessagesResult;
|
|
348
|
+
type WebhookBody = ChatParsedTyped | MessagesParsedTyped | PublishersStatusQueueInputJoinResult | PublishersStatusQueueInputSendResult | PublishersStatusQueueInputAgentPrivateMessageResult | PublishersStatusQueueParsingErrorResult | PublishersStatusQueueAccountUpdatedResult | PublishersStatusQueueInputClickHouseMessagesResult | PublishersStatusQueueInputGetCommonChatsResult;
|
|
334
349
|
type WebhookBodyTypes = keyof EventByType;
|
|
335
350
|
|
|
336
351
|
declare const frameworks: {
|
|
@@ -417,38 +432,6 @@ declare class EApi {
|
|
|
417
432
|
*/
|
|
418
433
|
health: (options?: RequestOptions) => Promise<GetResponse<"/health", "get">>;
|
|
419
434
|
};
|
|
420
|
-
/**
|
|
421
|
-
* @tags messages
|
|
422
|
-
*/
|
|
423
|
-
messages: {
|
|
424
|
-
/**
|
|
425
|
-
*
|
|
426
|
-
*
|
|
427
|
-
* @tags messages
|
|
428
|
-
* @summary Search messages by phrases and time interval
|
|
429
|
-
*
|
|
430
|
-
* [Documentation](.../messages/operation/messages.searchMessages)
|
|
431
|
-
*/
|
|
432
|
-
searchMessages: (body: GetRequestBody<"/messages/search", "post">, options?: RequestOptions) => Promise<GetResponse<"/messages/search", "post">>;
|
|
433
|
-
/**
|
|
434
|
-
*
|
|
435
|
-
*
|
|
436
|
-
* @tags messages
|
|
437
|
-
* @summary Get messages context around specified message IDs
|
|
438
|
-
*
|
|
439
|
-
* [Documentation](.../messages/operation/messages.getMessagesContext)
|
|
440
|
-
*/
|
|
441
|
-
getMessagesContext: (body: GetRequestBody<"/messages/context", "post">, options?: RequestOptions) => Promise<GetResponse<"/messages/context", "post">>;
|
|
442
|
-
/**
|
|
443
|
-
*
|
|
444
|
-
*
|
|
445
|
-
* @tags messages
|
|
446
|
-
* @summary Search messages by phrases and time interval (async with webhook)
|
|
447
|
-
*
|
|
448
|
-
* [Documentation](.../messages/operation/messages.searchMessagesWebhook)
|
|
449
|
-
*/
|
|
450
|
-
searchMessagesWebhook: (externalId: paths["/messages/search/webhook/{externalId}"]["post"]["parameters"]["path"]["externalId"], body: GetRequestBody<"/messages/search/webhook/{externalId}", "post">, options?: RequestOptions) => Promise<GetResponse<"/messages/search/webhook/{externalId}", "post">>;
|
|
451
|
-
};
|
|
452
435
|
/**
|
|
453
436
|
* @tags chats
|
|
454
437
|
*/
|
|
@@ -534,6 +517,15 @@ declare class EApi {
|
|
|
534
517
|
* [Documentation](.../chats/operation/chats.resolveUsername)
|
|
535
518
|
*/
|
|
536
519
|
resolveUsername: (body: GetRequestBody<"/chats/resolve", "post">, options?: RequestOptions) => Promise<GetResponse<"/chats/resolve", "post">>;
|
|
520
|
+
/**
|
|
521
|
+
*
|
|
522
|
+
*
|
|
523
|
+
* @tags chats
|
|
524
|
+
* @summary Search for user presence in specified chats (sync)
|
|
525
|
+
*
|
|
526
|
+
* [Documentation](.../chats/operation/chats.userPresence)
|
|
527
|
+
*/
|
|
528
|
+
userPresence: (body: GetRequestBody<"/chats/user-presence", "post">, options?: RequestOptions) => Promise<GetResponse<"/chats/user-presence", "post">>;
|
|
537
529
|
};
|
|
538
530
|
/**
|
|
539
531
|
* @tags subscriptions
|
|
@@ -585,6 +577,38 @@ declare class EApi {
|
|
|
585
577
|
*/
|
|
586
578
|
delete: (subId: paths["/subscriptions/{subId}"]["delete"]["parameters"]["path"]["subId"], options?: RequestOptions) => Promise<GetResponse<"/subscriptions/{subId}", "delete">>;
|
|
587
579
|
};
|
|
580
|
+
/**
|
|
581
|
+
* @tags messages
|
|
582
|
+
*/
|
|
583
|
+
messages: {
|
|
584
|
+
/**
|
|
585
|
+
*
|
|
586
|
+
*
|
|
587
|
+
* @tags messages
|
|
588
|
+
* @summary Search messages by phrases and time interval
|
|
589
|
+
*
|
|
590
|
+
* [Documentation](.../messages/operation/messages.searchMessages)
|
|
591
|
+
*/
|
|
592
|
+
searchMessages: (body: GetRequestBody<"/messages/search", "post">, options?: RequestOptions) => Promise<GetResponse<"/messages/search", "post">>;
|
|
593
|
+
/**
|
|
594
|
+
*
|
|
595
|
+
*
|
|
596
|
+
* @tags messages
|
|
597
|
+
* @summary Get messages context around specified message IDs
|
|
598
|
+
*
|
|
599
|
+
* [Documentation](.../messages/operation/messages.getMessagesContext)
|
|
600
|
+
*/
|
|
601
|
+
getMessagesContext: (body: GetRequestBody<"/messages/context", "post">, options?: RequestOptions) => Promise<GetResponse<"/messages/context", "post">>;
|
|
602
|
+
/**
|
|
603
|
+
*
|
|
604
|
+
*
|
|
605
|
+
* @tags messages
|
|
606
|
+
* @summary Search messages by phrases and time interval (async with webhook)
|
|
607
|
+
*
|
|
608
|
+
* [Documentation](.../messages/operation/messages.searchMessagesWebhook)
|
|
609
|
+
*/
|
|
610
|
+
searchMessagesWebhook: (externalId: paths["/messages/search/webhook/{externalId}"]["post"]["parameters"]["path"]["externalId"], body: GetRequestBody<"/messages/search/webhook/{externalId}", "post">, options?: RequestOptions) => Promise<GetResponse<"/messages/search/webhook/{externalId}", "post">>;
|
|
611
|
+
};
|
|
588
612
|
/**
|
|
589
613
|
* @tags accounts
|
|
590
614
|
*/
|
|
@@ -598,6 +622,15 @@ declare class EApi {
|
|
|
598
622
|
* [Documentation](.../accounts/operation/accounts.list)
|
|
599
623
|
*/
|
|
600
624
|
list: (options?: RequestOptions) => Promise<GetResponse<"/accounts/list", "get">>;
|
|
625
|
+
/**
|
|
626
|
+
*
|
|
627
|
+
*
|
|
628
|
+
* @tags accounts
|
|
629
|
+
* @summary Get common chats between account and user (async with webhook)
|
|
630
|
+
*
|
|
631
|
+
* [Documentation](.../accounts/operation/accounts.getCommonChats)
|
|
632
|
+
*/
|
|
633
|
+
getCommonChats: (externalId: paths["/accounts/common-chats/{externalId}"]["post"]["parameters"]["path"]["externalId"], body: GetRequestBody<"/accounts/common-chats/{externalId}", "post">, options?: RequestOptions) => Promise<GetResponse<"/accounts/common-chats/{externalId}", "post">>;
|
|
601
634
|
};
|
|
602
635
|
}
|
|
603
636
|
|
package/dist/index.d.ts
CHANGED
|
@@ -320,6 +320,20 @@ interface PublishersStatusQueueInputClickHouseMessagesResult {
|
|
|
320
320
|
error: string;
|
|
321
321
|
};
|
|
322
322
|
}
|
|
323
|
+
interface PublishersStatusQueueInputGetCommonChatsResult {
|
|
324
|
+
type: "get_common_chats_result";
|
|
325
|
+
metadata: Metadata;
|
|
326
|
+
user: {
|
|
327
|
+
id: number;
|
|
328
|
+
username: string;
|
|
329
|
+
};
|
|
330
|
+
chats: {
|
|
331
|
+
id: number;
|
|
332
|
+
username?: string;
|
|
333
|
+
title?: string;
|
|
334
|
+
type: "chat" | "channel";
|
|
335
|
+
}[];
|
|
336
|
+
}
|
|
323
337
|
interface EventByType {
|
|
324
338
|
chat_parsed: ChatParsedTyped;
|
|
325
339
|
messages_parsed: MessagesParsedTyped;
|
|
@@ -329,8 +343,9 @@ interface EventByType {
|
|
|
329
343
|
parsing_error: PublishersStatusQueueParsingErrorResult;
|
|
330
344
|
account_updated: PublishersStatusQueueAccountUpdatedResult;
|
|
331
345
|
search_results: PublishersStatusQueueInputClickHouseMessagesResult;
|
|
346
|
+
get_common_chats_result: PublishersStatusQueueInputGetCommonChatsResult;
|
|
332
347
|
}
|
|
333
|
-
type WebhookBody = ChatParsedTyped | MessagesParsedTyped | PublishersStatusQueueInputJoinResult | PublishersStatusQueueInputSendResult | PublishersStatusQueueInputAgentPrivateMessageResult | PublishersStatusQueueParsingErrorResult | PublishersStatusQueueAccountUpdatedResult | PublishersStatusQueueInputClickHouseMessagesResult;
|
|
348
|
+
type WebhookBody = ChatParsedTyped | MessagesParsedTyped | PublishersStatusQueueInputJoinResult | PublishersStatusQueueInputSendResult | PublishersStatusQueueInputAgentPrivateMessageResult | PublishersStatusQueueParsingErrorResult | PublishersStatusQueueAccountUpdatedResult | PublishersStatusQueueInputClickHouseMessagesResult | PublishersStatusQueueInputGetCommonChatsResult;
|
|
334
349
|
type WebhookBodyTypes = keyof EventByType;
|
|
335
350
|
|
|
336
351
|
declare const frameworks: {
|
|
@@ -417,38 +432,6 @@ declare class EApi {
|
|
|
417
432
|
*/
|
|
418
433
|
health: (options?: RequestOptions) => Promise<GetResponse<"/health", "get">>;
|
|
419
434
|
};
|
|
420
|
-
/**
|
|
421
|
-
* @tags messages
|
|
422
|
-
*/
|
|
423
|
-
messages: {
|
|
424
|
-
/**
|
|
425
|
-
*
|
|
426
|
-
*
|
|
427
|
-
* @tags messages
|
|
428
|
-
* @summary Search messages by phrases and time interval
|
|
429
|
-
*
|
|
430
|
-
* [Documentation](.../messages/operation/messages.searchMessages)
|
|
431
|
-
*/
|
|
432
|
-
searchMessages: (body: GetRequestBody<"/messages/search", "post">, options?: RequestOptions) => Promise<GetResponse<"/messages/search", "post">>;
|
|
433
|
-
/**
|
|
434
|
-
*
|
|
435
|
-
*
|
|
436
|
-
* @tags messages
|
|
437
|
-
* @summary Get messages context around specified message IDs
|
|
438
|
-
*
|
|
439
|
-
* [Documentation](.../messages/operation/messages.getMessagesContext)
|
|
440
|
-
*/
|
|
441
|
-
getMessagesContext: (body: GetRequestBody<"/messages/context", "post">, options?: RequestOptions) => Promise<GetResponse<"/messages/context", "post">>;
|
|
442
|
-
/**
|
|
443
|
-
*
|
|
444
|
-
*
|
|
445
|
-
* @tags messages
|
|
446
|
-
* @summary Search messages by phrases and time interval (async with webhook)
|
|
447
|
-
*
|
|
448
|
-
* [Documentation](.../messages/operation/messages.searchMessagesWebhook)
|
|
449
|
-
*/
|
|
450
|
-
searchMessagesWebhook: (externalId: paths["/messages/search/webhook/{externalId}"]["post"]["parameters"]["path"]["externalId"], body: GetRequestBody<"/messages/search/webhook/{externalId}", "post">, options?: RequestOptions) => Promise<GetResponse<"/messages/search/webhook/{externalId}", "post">>;
|
|
451
|
-
};
|
|
452
435
|
/**
|
|
453
436
|
* @tags chats
|
|
454
437
|
*/
|
|
@@ -534,6 +517,15 @@ declare class EApi {
|
|
|
534
517
|
* [Documentation](.../chats/operation/chats.resolveUsername)
|
|
535
518
|
*/
|
|
536
519
|
resolveUsername: (body: GetRequestBody<"/chats/resolve", "post">, options?: RequestOptions) => Promise<GetResponse<"/chats/resolve", "post">>;
|
|
520
|
+
/**
|
|
521
|
+
*
|
|
522
|
+
*
|
|
523
|
+
* @tags chats
|
|
524
|
+
* @summary Search for user presence in specified chats (sync)
|
|
525
|
+
*
|
|
526
|
+
* [Documentation](.../chats/operation/chats.userPresence)
|
|
527
|
+
*/
|
|
528
|
+
userPresence: (body: GetRequestBody<"/chats/user-presence", "post">, options?: RequestOptions) => Promise<GetResponse<"/chats/user-presence", "post">>;
|
|
537
529
|
};
|
|
538
530
|
/**
|
|
539
531
|
* @tags subscriptions
|
|
@@ -585,6 +577,38 @@ declare class EApi {
|
|
|
585
577
|
*/
|
|
586
578
|
delete: (subId: paths["/subscriptions/{subId}"]["delete"]["parameters"]["path"]["subId"], options?: RequestOptions) => Promise<GetResponse<"/subscriptions/{subId}", "delete">>;
|
|
587
579
|
};
|
|
580
|
+
/**
|
|
581
|
+
* @tags messages
|
|
582
|
+
*/
|
|
583
|
+
messages: {
|
|
584
|
+
/**
|
|
585
|
+
*
|
|
586
|
+
*
|
|
587
|
+
* @tags messages
|
|
588
|
+
* @summary Search messages by phrases and time interval
|
|
589
|
+
*
|
|
590
|
+
* [Documentation](.../messages/operation/messages.searchMessages)
|
|
591
|
+
*/
|
|
592
|
+
searchMessages: (body: GetRequestBody<"/messages/search", "post">, options?: RequestOptions) => Promise<GetResponse<"/messages/search", "post">>;
|
|
593
|
+
/**
|
|
594
|
+
*
|
|
595
|
+
*
|
|
596
|
+
* @tags messages
|
|
597
|
+
* @summary Get messages context around specified message IDs
|
|
598
|
+
*
|
|
599
|
+
* [Documentation](.../messages/operation/messages.getMessagesContext)
|
|
600
|
+
*/
|
|
601
|
+
getMessagesContext: (body: GetRequestBody<"/messages/context", "post">, options?: RequestOptions) => Promise<GetResponse<"/messages/context", "post">>;
|
|
602
|
+
/**
|
|
603
|
+
*
|
|
604
|
+
*
|
|
605
|
+
* @tags messages
|
|
606
|
+
* @summary Search messages by phrases and time interval (async with webhook)
|
|
607
|
+
*
|
|
608
|
+
* [Documentation](.../messages/operation/messages.searchMessagesWebhook)
|
|
609
|
+
*/
|
|
610
|
+
searchMessagesWebhook: (externalId: paths["/messages/search/webhook/{externalId}"]["post"]["parameters"]["path"]["externalId"], body: GetRequestBody<"/messages/search/webhook/{externalId}", "post">, options?: RequestOptions) => Promise<GetResponse<"/messages/search/webhook/{externalId}", "post">>;
|
|
611
|
+
};
|
|
588
612
|
/**
|
|
589
613
|
* @tags accounts
|
|
590
614
|
*/
|
|
@@ -598,6 +622,15 @@ declare class EApi {
|
|
|
598
622
|
* [Documentation](.../accounts/operation/accounts.list)
|
|
599
623
|
*/
|
|
600
624
|
list: (options?: RequestOptions) => Promise<GetResponse<"/accounts/list", "get">>;
|
|
625
|
+
/**
|
|
626
|
+
*
|
|
627
|
+
*
|
|
628
|
+
* @tags accounts
|
|
629
|
+
* @summary Get common chats between account and user (async with webhook)
|
|
630
|
+
*
|
|
631
|
+
* [Documentation](.../accounts/operation/accounts.getCommonChats)
|
|
632
|
+
*/
|
|
633
|
+
getCommonChats: (externalId: paths["/accounts/common-chats/{externalId}"]["post"]["parameters"]["path"]["externalId"], body: GetRequestBody<"/accounts/common-chats/{externalId}", "post">, options?: RequestOptions) => Promise<GetResponse<"/accounts/common-chats/{externalId}", "post">>;
|
|
601
634
|
};
|
|
602
635
|
}
|
|
603
636
|
|
package/dist/index.js
CHANGED
|
@@ -119,54 +119,6 @@ class EApi {
|
|
|
119
119
|
return this.request("/health", void 0, { method: "GET", ...options });
|
|
120
120
|
}
|
|
121
121
|
};
|
|
122
|
-
/**
|
|
123
|
-
* @tags messages
|
|
124
|
-
*/
|
|
125
|
-
messages = {
|
|
126
|
-
/**
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
* @tags messages
|
|
130
|
-
* @summary Search messages by phrases and time interval
|
|
131
|
-
*
|
|
132
|
-
* [Documentation](.../messages/operation/messages.searchMessages)
|
|
133
|
-
*/
|
|
134
|
-
searchMessages: (body, options) => {
|
|
135
|
-
return this.request("/messages/search", body, {
|
|
136
|
-
method: "POST",
|
|
137
|
-
...options
|
|
138
|
-
});
|
|
139
|
-
},
|
|
140
|
-
/**
|
|
141
|
-
*
|
|
142
|
-
*
|
|
143
|
-
* @tags messages
|
|
144
|
-
* @summary Get messages context around specified message IDs
|
|
145
|
-
*
|
|
146
|
-
* [Documentation](.../messages/operation/messages.getMessagesContext)
|
|
147
|
-
*/
|
|
148
|
-
getMessagesContext: (body, options) => {
|
|
149
|
-
return this.request("/messages/context", body, {
|
|
150
|
-
method: "POST",
|
|
151
|
-
...options
|
|
152
|
-
});
|
|
153
|
-
},
|
|
154
|
-
/**
|
|
155
|
-
*
|
|
156
|
-
*
|
|
157
|
-
* @tags messages
|
|
158
|
-
* @summary Search messages by phrases and time interval (async with webhook)
|
|
159
|
-
*
|
|
160
|
-
* [Documentation](.../messages/operation/messages.searchMessagesWebhook)
|
|
161
|
-
*/
|
|
162
|
-
searchMessagesWebhook: (externalId, body, options) => {
|
|
163
|
-
return this.request(
|
|
164
|
-
`/messages/search/webhook/${externalId}`,
|
|
165
|
-
body,
|
|
166
|
-
{ method: "POST", ...options }
|
|
167
|
-
);
|
|
168
|
-
}
|
|
169
|
-
};
|
|
170
122
|
/**
|
|
171
123
|
* @tags chats
|
|
172
124
|
*/
|
|
@@ -293,6 +245,20 @@ class EApi {
|
|
|
293
245
|
method: "POST",
|
|
294
246
|
...options
|
|
295
247
|
});
|
|
248
|
+
},
|
|
249
|
+
/**
|
|
250
|
+
*
|
|
251
|
+
*
|
|
252
|
+
* @tags chats
|
|
253
|
+
* @summary Search for user presence in specified chats (sync)
|
|
254
|
+
*
|
|
255
|
+
* [Documentation](.../chats/operation/chats.userPresence)
|
|
256
|
+
*/
|
|
257
|
+
userPresence: (body, options) => {
|
|
258
|
+
return this.request("/chats/user-presence", body, {
|
|
259
|
+
method: "POST",
|
|
260
|
+
...options
|
|
261
|
+
});
|
|
296
262
|
}
|
|
297
263
|
};
|
|
298
264
|
/**
|
|
@@ -370,6 +336,54 @@ class EApi {
|
|
|
370
336
|
});
|
|
371
337
|
}
|
|
372
338
|
};
|
|
339
|
+
/**
|
|
340
|
+
* @tags messages
|
|
341
|
+
*/
|
|
342
|
+
messages = {
|
|
343
|
+
/**
|
|
344
|
+
*
|
|
345
|
+
*
|
|
346
|
+
* @tags messages
|
|
347
|
+
* @summary Search messages by phrases and time interval
|
|
348
|
+
*
|
|
349
|
+
* [Documentation](.../messages/operation/messages.searchMessages)
|
|
350
|
+
*/
|
|
351
|
+
searchMessages: (body, options) => {
|
|
352
|
+
return this.request("/messages/search", body, {
|
|
353
|
+
method: "POST",
|
|
354
|
+
...options
|
|
355
|
+
});
|
|
356
|
+
},
|
|
357
|
+
/**
|
|
358
|
+
*
|
|
359
|
+
*
|
|
360
|
+
* @tags messages
|
|
361
|
+
* @summary Get messages context around specified message IDs
|
|
362
|
+
*
|
|
363
|
+
* [Documentation](.../messages/operation/messages.getMessagesContext)
|
|
364
|
+
*/
|
|
365
|
+
getMessagesContext: (body, options) => {
|
|
366
|
+
return this.request("/messages/context", body, {
|
|
367
|
+
method: "POST",
|
|
368
|
+
...options
|
|
369
|
+
});
|
|
370
|
+
},
|
|
371
|
+
/**
|
|
372
|
+
*
|
|
373
|
+
*
|
|
374
|
+
* @tags messages
|
|
375
|
+
* @summary Search messages by phrases and time interval (async with webhook)
|
|
376
|
+
*
|
|
377
|
+
* [Documentation](.../messages/operation/messages.searchMessagesWebhook)
|
|
378
|
+
*/
|
|
379
|
+
searchMessagesWebhook: (externalId, body, options) => {
|
|
380
|
+
return this.request(
|
|
381
|
+
`/messages/search/webhook/${externalId}`,
|
|
382
|
+
body,
|
|
383
|
+
{ method: "POST", ...options }
|
|
384
|
+
);
|
|
385
|
+
}
|
|
386
|
+
};
|
|
373
387
|
/**
|
|
374
388
|
* @tags accounts
|
|
375
389
|
*/
|
|
@@ -387,6 +401,20 @@ class EApi {
|
|
|
387
401
|
method: "GET",
|
|
388
402
|
...options
|
|
389
403
|
});
|
|
404
|
+
},
|
|
405
|
+
/**
|
|
406
|
+
*
|
|
407
|
+
*
|
|
408
|
+
* @tags accounts
|
|
409
|
+
* @summary Get common chats between account and user (async with webhook)
|
|
410
|
+
*
|
|
411
|
+
* [Documentation](.../accounts/operation/accounts.getCommonChats)
|
|
412
|
+
*/
|
|
413
|
+
getCommonChats: (externalId, body, options) => {
|
|
414
|
+
return this.request(`/accounts/common-chats/${externalId}`, body, {
|
|
415
|
+
method: "POST",
|
|
416
|
+
...options
|
|
417
|
+
});
|
|
390
418
|
}
|
|
391
419
|
};
|
|
392
420
|
/** @generated stop-generate-methods */
|