@skravets/eapi 0.0.47 → 0.0.48

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.
@@ -15,6 +15,14 @@ interface paths {
15
15
  /** Health check */
16
16
  get: operations["app.health"];
17
17
  };
18
+ "/health/egress": {
19
+ /** Health check (egress) */
20
+ get: operations["app.healthEgress"];
21
+ };
22
+ "/health/db": {
23
+ /** Health check (db) */
24
+ get: operations["app.healthDb"];
25
+ };
18
26
  "/chats": {
19
27
  /** Get Hello World! */
20
28
  get: operations["channels.getHello"];
@@ -51,6 +59,10 @@ interface paths {
51
59
  /** Resolve telegram usernames */
52
60
  post: operations["chats.resolveUsername"];
53
61
  };
62
+ "/chats/peer-access": {
63
+ /** Get account access info for chats by username */
64
+ post: operations["chats.getPeerAccess"];
65
+ };
54
66
  "/chats/user-presence": {
55
67
  /** Search for user presence in specified chats (sync) */
56
68
  post: operations["chats.userPresence"];
@@ -101,7 +113,7 @@ interface components {
101
113
  channel_id: number;
102
114
  /**
103
115
  * Format: date-time
104
- * @example 2026-01-23T13:28:55.622Z
116
+ * @example 2026-02-04T11:39:14.803Z
105
117
  */
106
118
  message_created_at: string;
107
119
  /** @example 123 */
@@ -359,6 +371,31 @@ interface components {
359
371
  ResolveUsernamesReqDto: {
360
372
  usernames: string[];
361
373
  };
374
+ PeerAccessRequestDto: {
375
+ /**
376
+ * @description List of usernames to check access for
377
+ * @example [
378
+ * "durov",
379
+ * "telegram"
380
+ * ]
381
+ */
382
+ usernames: string[];
383
+ };
384
+ PeerAccessItemDto: {
385
+ /** @description Username that was queried */
386
+ username: string;
387
+ /** @description Resolved peer ID, null if not resolved */
388
+ peerId?: null | number;
389
+ /** @description Flood wait end time for resolving username (ISO datetime) */
390
+ floodWaitOnResolveUsernameEndsAt?: null | string;
391
+ /** @description Flood wait end time for getting history (ISO datetime) */
392
+ floodWaitOnGetHistoryEndsAt?: null | string;
393
+ /** @description Spam block end time (ISO datetime) */
394
+ spamBlockUntil?: null | string;
395
+ };
396
+ PeerAccessResponseDto: {
397
+ results: components["schemas"]["PeerAccessItemDto"][];
398
+ };
362
399
  ChatIdentifierDto: {
363
400
  /**
364
401
  * @description Chat ID (numeric)
@@ -796,6 +833,38 @@ interface operations {
796
833
  };
797
834
  };
798
835
  };
836
+ "app.healthEgress": {
837
+ parameters: {
838
+ header: {
839
+ /** @description `Basic token`, where token is `id:secret` base64 encoded */
840
+ Authorization: string;
841
+ };
842
+ };
843
+ responses: {
844
+ /** @description OK */
845
+ 200: {
846
+ headers: {
847
+ [name: string]: unknown;
848
+ };
849
+ };
850
+ };
851
+ };
852
+ "app.healthDb": {
853
+ parameters: {
854
+ header: {
855
+ /** @description `Basic token`, where token is `id:secret` base64 encoded */
856
+ Authorization: string;
857
+ };
858
+ };
859
+ responses: {
860
+ /** @description OK */
861
+ 200: {
862
+ headers: {
863
+ [name: string]: unknown;
864
+ };
865
+ };
866
+ };
867
+ };
799
868
  "channels.getHello": {
800
869
  parameters: {
801
870
  header: {
@@ -1066,6 +1135,35 @@ interface operations {
1066
1135
  };
1067
1136
  };
1068
1137
  };
1138
+ "chats.getPeerAccess": {
1139
+ parameters: {
1140
+ header: {
1141
+ /** @description `Basic token`, where token is `id:secret` base64 encoded */
1142
+ Authorization: string;
1143
+ };
1144
+ };
1145
+ requestBody: {
1146
+ content: {
1147
+ "application/json": components["schemas"]["PeerAccessRequestDto"];
1148
+ };
1149
+ };
1150
+ responses: {
1151
+ 200: {
1152
+ headers: {
1153
+ [name: string]: unknown;
1154
+ };
1155
+ content: {
1156
+ "application/json": components["schemas"]["PeerAccessResponseDto"];
1157
+ };
1158
+ };
1159
+ /** @description Unauthorized */
1160
+ 401: {
1161
+ headers: {
1162
+ [name: string]: unknown;
1163
+ };
1164
+ };
1165
+ };
1166
+ };
1069
1167
  "chats.userPresence": {
1070
1168
  parameters: {
1071
1169
  header: {
@@ -15,6 +15,14 @@ interface paths {
15
15
  /** Health check */
16
16
  get: operations["app.health"];
17
17
  };
18
+ "/health/egress": {
19
+ /** Health check (egress) */
20
+ get: operations["app.healthEgress"];
21
+ };
22
+ "/health/db": {
23
+ /** Health check (db) */
24
+ get: operations["app.healthDb"];
25
+ };
18
26
  "/chats": {
19
27
  /** Get Hello World! */
20
28
  get: operations["channels.getHello"];
@@ -51,6 +59,10 @@ interface paths {
51
59
  /** Resolve telegram usernames */
52
60
  post: operations["chats.resolveUsername"];
53
61
  };
62
+ "/chats/peer-access": {
63
+ /** Get account access info for chats by username */
64
+ post: operations["chats.getPeerAccess"];
65
+ };
54
66
  "/chats/user-presence": {
55
67
  /** Search for user presence in specified chats (sync) */
56
68
  post: operations["chats.userPresence"];
@@ -101,7 +113,7 @@ interface components {
101
113
  channel_id: number;
102
114
  /**
103
115
  * Format: date-time
104
- * @example 2026-01-23T13:28:55.622Z
116
+ * @example 2026-02-04T11:39:14.803Z
105
117
  */
106
118
  message_created_at: string;
107
119
  /** @example 123 */
@@ -359,6 +371,31 @@ interface components {
359
371
  ResolveUsernamesReqDto: {
360
372
  usernames: string[];
361
373
  };
374
+ PeerAccessRequestDto: {
375
+ /**
376
+ * @description List of usernames to check access for
377
+ * @example [
378
+ * "durov",
379
+ * "telegram"
380
+ * ]
381
+ */
382
+ usernames: string[];
383
+ };
384
+ PeerAccessItemDto: {
385
+ /** @description Username that was queried */
386
+ username: string;
387
+ /** @description Resolved peer ID, null if not resolved */
388
+ peerId?: null | number;
389
+ /** @description Flood wait end time for resolving username (ISO datetime) */
390
+ floodWaitOnResolveUsernameEndsAt?: null | string;
391
+ /** @description Flood wait end time for getting history (ISO datetime) */
392
+ floodWaitOnGetHistoryEndsAt?: null | string;
393
+ /** @description Spam block end time (ISO datetime) */
394
+ spamBlockUntil?: null | string;
395
+ };
396
+ PeerAccessResponseDto: {
397
+ results: components["schemas"]["PeerAccessItemDto"][];
398
+ };
362
399
  ChatIdentifierDto: {
363
400
  /**
364
401
  * @description Chat ID (numeric)
@@ -796,6 +833,38 @@ interface operations {
796
833
  };
797
834
  };
798
835
  };
836
+ "app.healthEgress": {
837
+ parameters: {
838
+ header: {
839
+ /** @description `Basic token`, where token is `id:secret` base64 encoded */
840
+ Authorization: string;
841
+ };
842
+ };
843
+ responses: {
844
+ /** @description OK */
845
+ 200: {
846
+ headers: {
847
+ [name: string]: unknown;
848
+ };
849
+ };
850
+ };
851
+ };
852
+ "app.healthDb": {
853
+ parameters: {
854
+ header: {
855
+ /** @description `Basic token`, where token is `id:secret` base64 encoded */
856
+ Authorization: string;
857
+ };
858
+ };
859
+ responses: {
860
+ /** @description OK */
861
+ 200: {
862
+ headers: {
863
+ [name: string]: unknown;
864
+ };
865
+ };
866
+ };
867
+ };
799
868
  "channels.getHello": {
800
869
  parameters: {
801
870
  header: {
@@ -1066,6 +1135,35 @@ interface operations {
1066
1135
  };
1067
1136
  };
1068
1137
  };
1138
+ "chats.getPeerAccess": {
1139
+ parameters: {
1140
+ header: {
1141
+ /** @description `Basic token`, where token is `id:secret` base64 encoded */
1142
+ Authorization: string;
1143
+ };
1144
+ };
1145
+ requestBody: {
1146
+ content: {
1147
+ "application/json": components["schemas"]["PeerAccessRequestDto"];
1148
+ };
1149
+ };
1150
+ responses: {
1151
+ 200: {
1152
+ headers: {
1153
+ [name: string]: unknown;
1154
+ };
1155
+ content: {
1156
+ "application/json": components["schemas"]["PeerAccessResponseDto"];
1157
+ };
1158
+ };
1159
+ /** @description Unauthorized */
1160
+ 401: {
1161
+ headers: {
1162
+ [name: string]: unknown;
1163
+ };
1164
+ };
1165
+ };
1166
+ };
1069
1167
  "chats.userPresence": {
1070
1168
  parameters: {
1071
1169
  header: {
package/dist/index.cjs CHANGED
@@ -119,6 +119,34 @@ class EApi {
119
119
  */
120
120
  health: (options) => {
121
121
  return this.request("/health", void 0, { method: "GET", ...options });
122
+ },
123
+ /**
124
+ *
125
+ *
126
+ * @tags App
127
+ * @summary Health check (egress)
128
+ *
129
+ * [Documentation](.../App/operation/app.healthEgress)
130
+ */
131
+ healthEgress: (options) => {
132
+ return this.request("/health/egress", void 0, {
133
+ method: "GET",
134
+ ...options
135
+ });
136
+ },
137
+ /**
138
+ *
139
+ *
140
+ * @tags App
141
+ * @summary Health check (db)
142
+ *
143
+ * [Documentation](.../App/operation/app.healthDb)
144
+ */
145
+ healthDb: (options) => {
146
+ return this.request("/health/db", void 0, {
147
+ method: "GET",
148
+ ...options
149
+ });
122
150
  }
123
151
  };
124
152
  /**
@@ -248,6 +276,20 @@ class EApi {
248
276
  ...options
249
277
  });
250
278
  },
279
+ /**
280
+ *
281
+ *
282
+ * @tags chats
283
+ * @summary Get account access info for chats by username
284
+ *
285
+ * [Documentation](.../chats/operation/chats.getPeerAccess)
286
+ */
287
+ getPeerAccess: (body, options) => {
288
+ return this.request("/chats/peer-access", body, {
289
+ method: "POST",
290
+ ...options
291
+ });
292
+ },
251
293
  /**
252
294
  *
253
295
  *
package/dist/index.d.cts CHANGED
@@ -114,8 +114,19 @@ interface MessageStored {
114
114
  entities: EntityItem[];
115
115
  matchReason?: MessageMatchReason;
116
116
  }
117
+ interface FarmAccount {
118
+ tgId: number;
119
+ firstName?: string;
120
+ lastName?: string;
121
+ username?: string;
122
+ bio?: string;
123
+ spamBlockUntil?: string | null;
124
+ floodWaitOnResolveUsernameEndsAt?: string | null;
125
+ floodWaitOnGetHistoryEndsAt?: string | null;
126
+ }
117
127
  interface PublishersStatusQueueInputChatParsed {
118
128
  chat: ChatStored;
129
+ account: FarmAccount;
119
130
  metadata: {
120
131
  externalId: string;
121
132
  };
@@ -142,6 +153,7 @@ interface PublishersStatusQueueInputMessagesParsed {
142
153
  boostsForUnrestrict?: number | null;
143
154
  paidMessagePrice?: number | null;
144
155
  };
156
+ account: FarmAccount;
145
157
  offset: {
146
158
  start: number;
147
159
  end: number;
@@ -245,7 +257,7 @@ interface PublishersStatusQueueAccountUpdated {
245
257
  interface PublishersStatusQueueAccountUpdatedResult extends PublishersStatusQueueAccountUpdated {
246
258
  type: "account_updated";
247
259
  }
248
- type AccountUpdateChanges = AccountUnavailableUpdate | AccountProfileUpdate | AccountSpamBlockUpdate;
260
+ type AccountUpdateChanges = AccountUnavailableUpdate | AccountProfileUpdate | AccountSpamBlockUpdate | AccountFloodWaitUpdate;
249
261
  interface AccountUnavailableUpdate {
250
262
  type: "unavailable";
251
263
  updates: {
@@ -274,6 +286,15 @@ interface AccountSpamBlockUpdate {
274
286
  spamBlockReason?: string;
275
287
  };
276
288
  }
289
+ interface AccountFloodWaitUpdate {
290
+ type: "flood_wait";
291
+ updates: {
292
+ method: "resolve" | "getHistory" | "join" | "send";
293
+ floodWaitOnResolveUsernameEndsAt?: string | null;
294
+ floodWaitOnGetHistoryEndsAt?: string | null;
295
+ seconds?: number;
296
+ };
297
+ }
277
298
  type StreamPaginatorFlushReason = "chunk-limit" | "stream-end";
278
299
  interface StreamPaginationChunkMeta {
279
300
  chunkIndex: number;
@@ -431,6 +452,24 @@ declare class EApi {
431
452
  * [Documentation](.../App/operation/app.health)
432
453
  */
433
454
  health: (options?: RequestOptions) => Promise<GetResponse<"/health", "get">>;
455
+ /**
456
+ *
457
+ *
458
+ * @tags App
459
+ * @summary Health check (egress)
460
+ *
461
+ * [Documentation](.../App/operation/app.healthEgress)
462
+ */
463
+ healthEgress: (options?: RequestOptions) => Promise<GetResponse<"/health/egress", "get">>;
464
+ /**
465
+ *
466
+ *
467
+ * @tags App
468
+ * @summary Health check (db)
469
+ *
470
+ * [Documentation](.../App/operation/app.healthDb)
471
+ */
472
+ healthDb: (options?: RequestOptions) => Promise<GetResponse<"/health/db", "get">>;
434
473
  };
435
474
  /**
436
475
  * @tags chats
@@ -517,6 +556,15 @@ declare class EApi {
517
556
  * [Documentation](.../chats/operation/chats.resolveUsername)
518
557
  */
519
558
  resolveUsername: (body: GetRequestBody<"/chats/resolve", "post">, options?: RequestOptions) => Promise<GetResponse<"/chats/resolve", "post">>;
559
+ /**
560
+ *
561
+ *
562
+ * @tags chats
563
+ * @summary Get account access info for chats by username
564
+ *
565
+ * [Documentation](.../chats/operation/chats.getPeerAccess)
566
+ */
567
+ getPeerAccess: (body: GetRequestBody<"/chats/peer-access", "post">, options?: RequestOptions) => Promise<GetResponse<"/chats/peer-access", "post">>;
520
568
  /**
521
569
  *
522
570
  *
package/dist/index.d.ts CHANGED
@@ -114,8 +114,19 @@ interface MessageStored {
114
114
  entities: EntityItem[];
115
115
  matchReason?: MessageMatchReason;
116
116
  }
117
+ interface FarmAccount {
118
+ tgId: number;
119
+ firstName?: string;
120
+ lastName?: string;
121
+ username?: string;
122
+ bio?: string;
123
+ spamBlockUntil?: string | null;
124
+ floodWaitOnResolveUsernameEndsAt?: string | null;
125
+ floodWaitOnGetHistoryEndsAt?: string | null;
126
+ }
117
127
  interface PublishersStatusQueueInputChatParsed {
118
128
  chat: ChatStored;
129
+ account: FarmAccount;
119
130
  metadata: {
120
131
  externalId: string;
121
132
  };
@@ -142,6 +153,7 @@ interface PublishersStatusQueueInputMessagesParsed {
142
153
  boostsForUnrestrict?: number | null;
143
154
  paidMessagePrice?: number | null;
144
155
  };
156
+ account: FarmAccount;
145
157
  offset: {
146
158
  start: number;
147
159
  end: number;
@@ -245,7 +257,7 @@ interface PublishersStatusQueueAccountUpdated {
245
257
  interface PublishersStatusQueueAccountUpdatedResult extends PublishersStatusQueueAccountUpdated {
246
258
  type: "account_updated";
247
259
  }
248
- type AccountUpdateChanges = AccountUnavailableUpdate | AccountProfileUpdate | AccountSpamBlockUpdate;
260
+ type AccountUpdateChanges = AccountUnavailableUpdate | AccountProfileUpdate | AccountSpamBlockUpdate | AccountFloodWaitUpdate;
249
261
  interface AccountUnavailableUpdate {
250
262
  type: "unavailable";
251
263
  updates: {
@@ -274,6 +286,15 @@ interface AccountSpamBlockUpdate {
274
286
  spamBlockReason?: string;
275
287
  };
276
288
  }
289
+ interface AccountFloodWaitUpdate {
290
+ type: "flood_wait";
291
+ updates: {
292
+ method: "resolve" | "getHistory" | "join" | "send";
293
+ floodWaitOnResolveUsernameEndsAt?: string | null;
294
+ floodWaitOnGetHistoryEndsAt?: string | null;
295
+ seconds?: number;
296
+ };
297
+ }
277
298
  type StreamPaginatorFlushReason = "chunk-limit" | "stream-end";
278
299
  interface StreamPaginationChunkMeta {
279
300
  chunkIndex: number;
@@ -431,6 +452,24 @@ declare class EApi {
431
452
  * [Documentation](.../App/operation/app.health)
432
453
  */
433
454
  health: (options?: RequestOptions) => Promise<GetResponse<"/health", "get">>;
455
+ /**
456
+ *
457
+ *
458
+ * @tags App
459
+ * @summary Health check (egress)
460
+ *
461
+ * [Documentation](.../App/operation/app.healthEgress)
462
+ */
463
+ healthEgress: (options?: RequestOptions) => Promise<GetResponse<"/health/egress", "get">>;
464
+ /**
465
+ *
466
+ *
467
+ * @tags App
468
+ * @summary Health check (db)
469
+ *
470
+ * [Documentation](.../App/operation/app.healthDb)
471
+ */
472
+ healthDb: (options?: RequestOptions) => Promise<GetResponse<"/health/db", "get">>;
434
473
  };
435
474
  /**
436
475
  * @tags chats
@@ -517,6 +556,15 @@ declare class EApi {
517
556
  * [Documentation](.../chats/operation/chats.resolveUsername)
518
557
  */
519
558
  resolveUsername: (body: GetRequestBody<"/chats/resolve", "post">, options?: RequestOptions) => Promise<GetResponse<"/chats/resolve", "post">>;
559
+ /**
560
+ *
561
+ *
562
+ * @tags chats
563
+ * @summary Get account access info for chats by username
564
+ *
565
+ * [Documentation](.../chats/operation/chats.getPeerAccess)
566
+ */
567
+ getPeerAccess: (body: GetRequestBody<"/chats/peer-access", "post">, options?: RequestOptions) => Promise<GetResponse<"/chats/peer-access", "post">>;
520
568
  /**
521
569
  *
522
570
  *
package/dist/index.js CHANGED
@@ -117,6 +117,34 @@ class EApi {
117
117
  */
118
118
  health: (options) => {
119
119
  return this.request("/health", void 0, { method: "GET", ...options });
120
+ },
121
+ /**
122
+ *
123
+ *
124
+ * @tags App
125
+ * @summary Health check (egress)
126
+ *
127
+ * [Documentation](.../App/operation/app.healthEgress)
128
+ */
129
+ healthEgress: (options) => {
130
+ return this.request("/health/egress", void 0, {
131
+ method: "GET",
132
+ ...options
133
+ });
134
+ },
135
+ /**
136
+ *
137
+ *
138
+ * @tags App
139
+ * @summary Health check (db)
140
+ *
141
+ * [Documentation](.../App/operation/app.healthDb)
142
+ */
143
+ healthDb: (options) => {
144
+ return this.request("/health/db", void 0, {
145
+ method: "GET",
146
+ ...options
147
+ });
120
148
  }
121
149
  };
122
150
  /**
@@ -246,6 +274,20 @@ class EApi {
246
274
  ...options
247
275
  });
248
276
  },
277
+ /**
278
+ *
279
+ *
280
+ * @tags chats
281
+ * @summary Get account access info for chats by username
282
+ *
283
+ * [Documentation](.../chats/operation/chats.getPeerAccess)
284
+ */
285
+ getPeerAccess: (body, options) => {
286
+ return this.request("/chats/peer-access", body, {
287
+ method: "POST",
288
+ ...options
289
+ });
290
+ },
249
291
  /**
250
292
  *
251
293
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skravets/eapi",
3
- "version": "0.0.47",
3
+ "version": "0.0.48",
4
4
  "module": "./dist/index.js",
5
5
  "main": "./dist/index.cjs",
6
6
  "types": "./dist/index.d.ts",