@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/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,87 @@ 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
+ };
389
+ /**
390
+ * @tags accounts
391
+ */
392
+ accounts = {
393
+ /**
394
+ *
395
+ *
396
+ * @tags accounts
397
+ * @summary List of Telegram accounts
398
+ *
399
+ * [Documentation](.../accounts/operation/accounts.list)
400
+ */
401
+ list: (options) => {
402
+ return this.request("/accounts/list", void 0, {
403
+ method: "GET",
404
+ ...options
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
+ });
420
+ }
421
+ };
375
422
  /** @generated stop-generate-methods */
376
423
  }
377
424
 
package/dist/index.d.cts CHANGED
@@ -169,7 +169,7 @@ interface PublishersStatusQueueInputJoin {
169
169
  firstName?: string;
170
170
  lastName?: string;
171
171
  };
172
- status: "UNAVAILABLE" | "ALREADY_JOINED" | "JOINED" | "FLOOD_WAIT" | "INVITE_REQUEST_SENT" | "USERNAME_BELONGS_TO_USER" | "CHANNELS_TOO_MUCH";
172
+ status: "UNAVAILABLE" | "ALREADY_JOINED" | "JOINED" | "FLOOD_WAIT" | "INVITE_REQUEST_SENT" | "USERNAME_BELONGS_TO_USER" | "CHANNELS_TOO_MUCH" | "ACCOUNT_NOT_FOUND";
173
173
  seconds?: number;
174
174
  }
175
175
  interface PublishersStatusQueueInputJoinResult extends PublishersStatusQueueInputJoin {
@@ -417,38 +417,6 @@ declare class EApi {
417
417
  */
418
418
  health: (options?: RequestOptions) => Promise<GetResponse<"/health", "get">>;
419
419
  };
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
420
  /**
453
421
  * @tags chats
454
422
  */
@@ -534,6 +502,15 @@ declare class EApi {
534
502
  * [Documentation](.../chats/operation/chats.resolveUsername)
535
503
  */
536
504
  resolveUsername: (body: GetRequestBody<"/chats/resolve", "post">, options?: RequestOptions) => Promise<GetResponse<"/chats/resolve", "post">>;
505
+ /**
506
+ *
507
+ *
508
+ * @tags chats
509
+ * @summary Search for user presence in specified chats (sync)
510
+ *
511
+ * [Documentation](.../chats/operation/chats.userPresence)
512
+ */
513
+ userPresence: (body: GetRequestBody<"/chats/user-presence", "post">, options?: RequestOptions) => Promise<GetResponse<"/chats/user-presence", "post">>;
537
514
  };
538
515
  /**
539
516
  * @tags subscriptions
@@ -585,6 +562,61 @@ declare class EApi {
585
562
  */
586
563
  delete: (subId: paths["/subscriptions/{subId}"]["delete"]["parameters"]["path"]["subId"], options?: RequestOptions) => Promise<GetResponse<"/subscriptions/{subId}", "delete">>;
587
564
  };
565
+ /**
566
+ * @tags messages
567
+ */
568
+ messages: {
569
+ /**
570
+ *
571
+ *
572
+ * @tags messages
573
+ * @summary Search messages by phrases and time interval
574
+ *
575
+ * [Documentation](.../messages/operation/messages.searchMessages)
576
+ */
577
+ searchMessages: (body: GetRequestBody<"/messages/search", "post">, options?: RequestOptions) => Promise<GetResponse<"/messages/search", "post">>;
578
+ /**
579
+ *
580
+ *
581
+ * @tags messages
582
+ * @summary Get messages context around specified message IDs
583
+ *
584
+ * [Documentation](.../messages/operation/messages.getMessagesContext)
585
+ */
586
+ getMessagesContext: (body: GetRequestBody<"/messages/context", "post">, options?: RequestOptions) => Promise<GetResponse<"/messages/context", "post">>;
587
+ /**
588
+ *
589
+ *
590
+ * @tags messages
591
+ * @summary Search messages by phrases and time interval (async with webhook)
592
+ *
593
+ * [Documentation](.../messages/operation/messages.searchMessagesWebhook)
594
+ */
595
+ 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">>;
596
+ };
597
+ /**
598
+ * @tags accounts
599
+ */
600
+ accounts: {
601
+ /**
602
+ *
603
+ *
604
+ * @tags accounts
605
+ * @summary List of Telegram accounts
606
+ *
607
+ * [Documentation](.../accounts/operation/accounts.list)
608
+ */
609
+ list: (options?: RequestOptions) => Promise<GetResponse<"/accounts/list", "get">>;
610
+ /**
611
+ *
612
+ *
613
+ * @tags accounts
614
+ * @summary Get common chats between account and user (async with webhook)
615
+ *
616
+ * [Documentation](.../accounts/operation/accounts.getCommonChats)
617
+ */
618
+ 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">>;
619
+ };
588
620
  }
589
621
 
590
622
  export { EApi, type EApiOptions, webhookHandler };
package/dist/index.d.ts CHANGED
@@ -169,7 +169,7 @@ interface PublishersStatusQueueInputJoin {
169
169
  firstName?: string;
170
170
  lastName?: string;
171
171
  };
172
- status: "UNAVAILABLE" | "ALREADY_JOINED" | "JOINED" | "FLOOD_WAIT" | "INVITE_REQUEST_SENT" | "USERNAME_BELONGS_TO_USER" | "CHANNELS_TOO_MUCH";
172
+ status: "UNAVAILABLE" | "ALREADY_JOINED" | "JOINED" | "FLOOD_WAIT" | "INVITE_REQUEST_SENT" | "USERNAME_BELONGS_TO_USER" | "CHANNELS_TOO_MUCH" | "ACCOUNT_NOT_FOUND";
173
173
  seconds?: number;
174
174
  }
175
175
  interface PublishersStatusQueueInputJoinResult extends PublishersStatusQueueInputJoin {
@@ -417,38 +417,6 @@ declare class EApi {
417
417
  */
418
418
  health: (options?: RequestOptions) => Promise<GetResponse<"/health", "get">>;
419
419
  };
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
420
  /**
453
421
  * @tags chats
454
422
  */
@@ -534,6 +502,15 @@ declare class EApi {
534
502
  * [Documentation](.../chats/operation/chats.resolveUsername)
535
503
  */
536
504
  resolveUsername: (body: GetRequestBody<"/chats/resolve", "post">, options?: RequestOptions) => Promise<GetResponse<"/chats/resolve", "post">>;
505
+ /**
506
+ *
507
+ *
508
+ * @tags chats
509
+ * @summary Search for user presence in specified chats (sync)
510
+ *
511
+ * [Documentation](.../chats/operation/chats.userPresence)
512
+ */
513
+ userPresence: (body: GetRequestBody<"/chats/user-presence", "post">, options?: RequestOptions) => Promise<GetResponse<"/chats/user-presence", "post">>;
537
514
  };
538
515
  /**
539
516
  * @tags subscriptions
@@ -585,6 +562,61 @@ declare class EApi {
585
562
  */
586
563
  delete: (subId: paths["/subscriptions/{subId}"]["delete"]["parameters"]["path"]["subId"], options?: RequestOptions) => Promise<GetResponse<"/subscriptions/{subId}", "delete">>;
587
564
  };
565
+ /**
566
+ * @tags messages
567
+ */
568
+ messages: {
569
+ /**
570
+ *
571
+ *
572
+ * @tags messages
573
+ * @summary Search messages by phrases and time interval
574
+ *
575
+ * [Documentation](.../messages/operation/messages.searchMessages)
576
+ */
577
+ searchMessages: (body: GetRequestBody<"/messages/search", "post">, options?: RequestOptions) => Promise<GetResponse<"/messages/search", "post">>;
578
+ /**
579
+ *
580
+ *
581
+ * @tags messages
582
+ * @summary Get messages context around specified message IDs
583
+ *
584
+ * [Documentation](.../messages/operation/messages.getMessagesContext)
585
+ */
586
+ getMessagesContext: (body: GetRequestBody<"/messages/context", "post">, options?: RequestOptions) => Promise<GetResponse<"/messages/context", "post">>;
587
+ /**
588
+ *
589
+ *
590
+ * @tags messages
591
+ * @summary Search messages by phrases and time interval (async with webhook)
592
+ *
593
+ * [Documentation](.../messages/operation/messages.searchMessagesWebhook)
594
+ */
595
+ 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">>;
596
+ };
597
+ /**
598
+ * @tags accounts
599
+ */
600
+ accounts: {
601
+ /**
602
+ *
603
+ *
604
+ * @tags accounts
605
+ * @summary List of Telegram accounts
606
+ *
607
+ * [Documentation](.../accounts/operation/accounts.list)
608
+ */
609
+ list: (options?: RequestOptions) => Promise<GetResponse<"/accounts/list", "get">>;
610
+ /**
611
+ *
612
+ *
613
+ * @tags accounts
614
+ * @summary Get common chats between account and user (async with webhook)
615
+ *
616
+ * [Documentation](.../accounts/operation/accounts.getCommonChats)
617
+ */
618
+ 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">>;
619
+ };
588
620
  }
589
621
 
590
622
  export { EApi, type EApiOptions, webhookHandler };
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,87 @@ 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
+ };
387
+ /**
388
+ * @tags accounts
389
+ */
390
+ accounts = {
391
+ /**
392
+ *
393
+ *
394
+ * @tags accounts
395
+ * @summary List of Telegram accounts
396
+ *
397
+ * [Documentation](.../accounts/operation/accounts.list)
398
+ */
399
+ list: (options) => {
400
+ return this.request("/accounts/list", void 0, {
401
+ method: "GET",
402
+ ...options
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
+ });
418
+ }
419
+ };
373
420
  /** @generated stop-generate-methods */
374
421
  }
375
422
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skravets/eapi",
3
- "version": "0.0.42",
3
+ "version": "0.0.44",
4
4
  "module": "./dist/index.js",
5
5
  "main": "./dist/index.cjs",
6
6
  "types": "./dist/index.d.ts",