@skravets/eapi 0.0.47 → 0.0.49
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 +109 -1
- package/dist/api-types.d.ts +109 -1
- package/dist/index.cjs +42 -0
- package/dist/index.d.cts +49 -1
- package/dist/index.d.ts +49 -1
- package/dist/index.js +42 -0
- package/package.json +1 -1
package/dist/api-types.d.cts
CHANGED
|
@@ -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-
|
|
116
|
+
* @example 2026-02-04T12:12:10.111Z
|
|
105
117
|
*/
|
|
106
118
|
message_created_at: string;
|
|
107
119
|
/** @example 123 */
|
|
@@ -359,6 +371,41 @@ 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
|
+
PeerAccessAccountDto: {
|
|
385
|
+
/** @description Account ID */
|
|
386
|
+
accountId: number;
|
|
387
|
+
/** @description Account phone number */
|
|
388
|
+
phone: string;
|
|
389
|
+
/** @description Session ID */
|
|
390
|
+
sessionId: number;
|
|
391
|
+
/** @description Flood wait end time for resolving username (ISO datetime) */
|
|
392
|
+
floodWaitOnResolveUsernameEndsAt?: null | string;
|
|
393
|
+
/** @description Flood wait end time for getting history (ISO datetime) */
|
|
394
|
+
floodWaitOnGetHistoryEndsAt?: null | string;
|
|
395
|
+
/** @description Spam block end time (ISO datetime) */
|
|
396
|
+
spamBlockUntil?: null | string;
|
|
397
|
+
};
|
|
398
|
+
PeerAccessChatDto: {
|
|
399
|
+
/** @description Username that was queried */
|
|
400
|
+
username: string;
|
|
401
|
+
/** @description Resolved peer ID, null if not resolved */
|
|
402
|
+
peerId?: null | number;
|
|
403
|
+
/** @description Accounts that have access to this chat */
|
|
404
|
+
accounts: components["schemas"]["PeerAccessAccountDto"][];
|
|
405
|
+
};
|
|
406
|
+
PeerAccessResponseDto: {
|
|
407
|
+
chats: components["schemas"]["PeerAccessChatDto"][];
|
|
408
|
+
};
|
|
362
409
|
ChatIdentifierDto: {
|
|
363
410
|
/**
|
|
364
411
|
* @description Chat ID (numeric)
|
|
@@ -796,6 +843,38 @@ interface operations {
|
|
|
796
843
|
};
|
|
797
844
|
};
|
|
798
845
|
};
|
|
846
|
+
"app.healthEgress": {
|
|
847
|
+
parameters: {
|
|
848
|
+
header: {
|
|
849
|
+
/** @description `Basic token`, where token is `id:secret` base64 encoded */
|
|
850
|
+
Authorization: string;
|
|
851
|
+
};
|
|
852
|
+
};
|
|
853
|
+
responses: {
|
|
854
|
+
/** @description OK */
|
|
855
|
+
200: {
|
|
856
|
+
headers: {
|
|
857
|
+
[name: string]: unknown;
|
|
858
|
+
};
|
|
859
|
+
};
|
|
860
|
+
};
|
|
861
|
+
};
|
|
862
|
+
"app.healthDb": {
|
|
863
|
+
parameters: {
|
|
864
|
+
header: {
|
|
865
|
+
/** @description `Basic token`, where token is `id:secret` base64 encoded */
|
|
866
|
+
Authorization: string;
|
|
867
|
+
};
|
|
868
|
+
};
|
|
869
|
+
responses: {
|
|
870
|
+
/** @description OK */
|
|
871
|
+
200: {
|
|
872
|
+
headers: {
|
|
873
|
+
[name: string]: unknown;
|
|
874
|
+
};
|
|
875
|
+
};
|
|
876
|
+
};
|
|
877
|
+
};
|
|
799
878
|
"channels.getHello": {
|
|
800
879
|
parameters: {
|
|
801
880
|
header: {
|
|
@@ -1066,6 +1145,35 @@ interface operations {
|
|
|
1066
1145
|
};
|
|
1067
1146
|
};
|
|
1068
1147
|
};
|
|
1148
|
+
"chats.getPeerAccess": {
|
|
1149
|
+
parameters: {
|
|
1150
|
+
header: {
|
|
1151
|
+
/** @description `Basic token`, where token is `id:secret` base64 encoded */
|
|
1152
|
+
Authorization: string;
|
|
1153
|
+
};
|
|
1154
|
+
};
|
|
1155
|
+
requestBody: {
|
|
1156
|
+
content: {
|
|
1157
|
+
"application/json": components["schemas"]["PeerAccessRequestDto"];
|
|
1158
|
+
};
|
|
1159
|
+
};
|
|
1160
|
+
responses: {
|
|
1161
|
+
200: {
|
|
1162
|
+
headers: {
|
|
1163
|
+
[name: string]: unknown;
|
|
1164
|
+
};
|
|
1165
|
+
content: {
|
|
1166
|
+
"application/json": components["schemas"]["PeerAccessResponseDto"];
|
|
1167
|
+
};
|
|
1168
|
+
};
|
|
1169
|
+
/** @description Unauthorized */
|
|
1170
|
+
401: {
|
|
1171
|
+
headers: {
|
|
1172
|
+
[name: string]: unknown;
|
|
1173
|
+
};
|
|
1174
|
+
};
|
|
1175
|
+
};
|
|
1176
|
+
};
|
|
1069
1177
|
"chats.userPresence": {
|
|
1070
1178
|
parameters: {
|
|
1071
1179
|
header: {
|
package/dist/api-types.d.ts
CHANGED
|
@@ -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-
|
|
116
|
+
* @example 2026-02-04T12:12:10.111Z
|
|
105
117
|
*/
|
|
106
118
|
message_created_at: string;
|
|
107
119
|
/** @example 123 */
|
|
@@ -359,6 +371,41 @@ 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
|
+
PeerAccessAccountDto: {
|
|
385
|
+
/** @description Account ID */
|
|
386
|
+
accountId: number;
|
|
387
|
+
/** @description Account phone number */
|
|
388
|
+
phone: string;
|
|
389
|
+
/** @description Session ID */
|
|
390
|
+
sessionId: number;
|
|
391
|
+
/** @description Flood wait end time for resolving username (ISO datetime) */
|
|
392
|
+
floodWaitOnResolveUsernameEndsAt?: null | string;
|
|
393
|
+
/** @description Flood wait end time for getting history (ISO datetime) */
|
|
394
|
+
floodWaitOnGetHistoryEndsAt?: null | string;
|
|
395
|
+
/** @description Spam block end time (ISO datetime) */
|
|
396
|
+
spamBlockUntil?: null | string;
|
|
397
|
+
};
|
|
398
|
+
PeerAccessChatDto: {
|
|
399
|
+
/** @description Username that was queried */
|
|
400
|
+
username: string;
|
|
401
|
+
/** @description Resolved peer ID, null if not resolved */
|
|
402
|
+
peerId?: null | number;
|
|
403
|
+
/** @description Accounts that have access to this chat */
|
|
404
|
+
accounts: components["schemas"]["PeerAccessAccountDto"][];
|
|
405
|
+
};
|
|
406
|
+
PeerAccessResponseDto: {
|
|
407
|
+
chats: components["schemas"]["PeerAccessChatDto"][];
|
|
408
|
+
};
|
|
362
409
|
ChatIdentifierDto: {
|
|
363
410
|
/**
|
|
364
411
|
* @description Chat ID (numeric)
|
|
@@ -796,6 +843,38 @@ interface operations {
|
|
|
796
843
|
};
|
|
797
844
|
};
|
|
798
845
|
};
|
|
846
|
+
"app.healthEgress": {
|
|
847
|
+
parameters: {
|
|
848
|
+
header: {
|
|
849
|
+
/** @description `Basic token`, where token is `id:secret` base64 encoded */
|
|
850
|
+
Authorization: string;
|
|
851
|
+
};
|
|
852
|
+
};
|
|
853
|
+
responses: {
|
|
854
|
+
/** @description OK */
|
|
855
|
+
200: {
|
|
856
|
+
headers: {
|
|
857
|
+
[name: string]: unknown;
|
|
858
|
+
};
|
|
859
|
+
};
|
|
860
|
+
};
|
|
861
|
+
};
|
|
862
|
+
"app.healthDb": {
|
|
863
|
+
parameters: {
|
|
864
|
+
header: {
|
|
865
|
+
/** @description `Basic token`, where token is `id:secret` base64 encoded */
|
|
866
|
+
Authorization: string;
|
|
867
|
+
};
|
|
868
|
+
};
|
|
869
|
+
responses: {
|
|
870
|
+
/** @description OK */
|
|
871
|
+
200: {
|
|
872
|
+
headers: {
|
|
873
|
+
[name: string]: unknown;
|
|
874
|
+
};
|
|
875
|
+
};
|
|
876
|
+
};
|
|
877
|
+
};
|
|
799
878
|
"channels.getHello": {
|
|
800
879
|
parameters: {
|
|
801
880
|
header: {
|
|
@@ -1066,6 +1145,35 @@ interface operations {
|
|
|
1066
1145
|
};
|
|
1067
1146
|
};
|
|
1068
1147
|
};
|
|
1148
|
+
"chats.getPeerAccess": {
|
|
1149
|
+
parameters: {
|
|
1150
|
+
header: {
|
|
1151
|
+
/** @description `Basic token`, where token is `id:secret` base64 encoded */
|
|
1152
|
+
Authorization: string;
|
|
1153
|
+
};
|
|
1154
|
+
};
|
|
1155
|
+
requestBody: {
|
|
1156
|
+
content: {
|
|
1157
|
+
"application/json": components["schemas"]["PeerAccessRequestDto"];
|
|
1158
|
+
};
|
|
1159
|
+
};
|
|
1160
|
+
responses: {
|
|
1161
|
+
200: {
|
|
1162
|
+
headers: {
|
|
1163
|
+
[name: string]: unknown;
|
|
1164
|
+
};
|
|
1165
|
+
content: {
|
|
1166
|
+
"application/json": components["schemas"]["PeerAccessResponseDto"];
|
|
1167
|
+
};
|
|
1168
|
+
};
|
|
1169
|
+
/** @description Unauthorized */
|
|
1170
|
+
401: {
|
|
1171
|
+
headers: {
|
|
1172
|
+
[name: string]: unknown;
|
|
1173
|
+
};
|
|
1174
|
+
};
|
|
1175
|
+
};
|
|
1176
|
+
};
|
|
1069
1177
|
"chats.userPresence": {
|
|
1070
1178
|
parameters: {
|
|
1071
1179
|
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
|
*
|