@skravets/eapi 0.0.42 → 0.0.43
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 +108 -1
- package/dist/api-types.d.ts +108 -1
- package/dist/index.cjs +19 -0
- package/dist/index.d.cts +15 -1
- package/dist/index.d.ts +15 -1
- package/dist/index.js +19 -0
- package/package.json +1 -1
package/dist/api-types.d.cts
CHANGED
|
@@ -77,6 +77,10 @@ interface paths {
|
|
|
77
77
|
/** Delete subscription by subscription id */
|
|
78
78
|
delete: operations["subscriptions.delete"];
|
|
79
79
|
};
|
|
80
|
+
"/accounts/list": {
|
|
81
|
+
/** List of Telegram accounts */
|
|
82
|
+
get: operations["accounts.list"];
|
|
83
|
+
};
|
|
80
84
|
}
|
|
81
85
|
/**
|
|
82
86
|
* Сгенерированные из OpenAPI типы для `components`
|
|
@@ -192,7 +196,7 @@ interface components {
|
|
|
192
196
|
channel_id: number;
|
|
193
197
|
/**
|
|
194
198
|
* Format: date-time
|
|
195
|
-
* @example
|
|
199
|
+
* @example 2026-01-13T09:56:16.054Z
|
|
196
200
|
*/
|
|
197
201
|
message_created_at: string;
|
|
198
202
|
/** @example 123 */
|
|
@@ -602,6 +606,84 @@ interface components {
|
|
|
602
606
|
key?: string;
|
|
603
607
|
query: components["schemas"]["SubscriptionQuery"];
|
|
604
608
|
};
|
|
609
|
+
TelegramStatusDto: {
|
|
610
|
+
floodWaitEndsAt?: string;
|
|
611
|
+
floodWait?: number;
|
|
612
|
+
floodWaitBy?: string;
|
|
613
|
+
isBanned?: boolean;
|
|
614
|
+
isAccountFrozen?: boolean;
|
|
615
|
+
isAuthKeyDuplicated?: boolean;
|
|
616
|
+
isSessionRevoked?: boolean;
|
|
617
|
+
isAuthKeyUnregistered?: boolean;
|
|
618
|
+
busyFor?: string;
|
|
619
|
+
lastError?: string;
|
|
620
|
+
selectReason?: string;
|
|
621
|
+
resolveMisses?: number;
|
|
622
|
+
};
|
|
623
|
+
DcInfoDto: {
|
|
624
|
+
id: number;
|
|
625
|
+
ipAddress: string;
|
|
626
|
+
port: number;
|
|
627
|
+
ipv6?: boolean;
|
|
628
|
+
mediaOnly?: boolean;
|
|
629
|
+
testMode?: boolean;
|
|
630
|
+
};
|
|
631
|
+
PrimaryDcsDto: {
|
|
632
|
+
main: components["schemas"]["DcInfoDto"];
|
|
633
|
+
media: components["schemas"]["DcInfoDto"];
|
|
634
|
+
};
|
|
635
|
+
SelfInfoDto: {
|
|
636
|
+
id: number;
|
|
637
|
+
usernames: string[];
|
|
638
|
+
firstName?: string;
|
|
639
|
+
lastName?: string;
|
|
640
|
+
isPremium: boolean;
|
|
641
|
+
isBot: boolean;
|
|
642
|
+
};
|
|
643
|
+
AccountSessionDto: {
|
|
644
|
+
id: number;
|
|
645
|
+
primaryDcs: components["schemas"]["PrimaryDcsDto"];
|
|
646
|
+
self: (null | components["schemas"]["SelfInfoDto"]) & components["schemas"]["SelfInfoDto"];
|
|
647
|
+
/**
|
|
648
|
+
* @description Auth keys by DC ID
|
|
649
|
+
* @example {
|
|
650
|
+
* "1": "base64string",
|
|
651
|
+
* "2": "base64string"
|
|
652
|
+
* }
|
|
653
|
+
*/
|
|
654
|
+
authKeys: Record<string, never>;
|
|
655
|
+
/** @description Base64 encoded avatar URI */
|
|
656
|
+
avatarUri: null | string;
|
|
657
|
+
apiId: number;
|
|
658
|
+
apiHash: string;
|
|
659
|
+
};
|
|
660
|
+
AccountInfoDto: {
|
|
661
|
+
raw: null | Record<string, never>;
|
|
662
|
+
tgId: number;
|
|
663
|
+
username: null | string;
|
|
664
|
+
firstName: null | string;
|
|
665
|
+
lastName: null | string;
|
|
666
|
+
};
|
|
667
|
+
ProxyDto: {
|
|
668
|
+
/** @enum {string} */
|
|
669
|
+
type: "socks5";
|
|
670
|
+
host: string;
|
|
671
|
+
port: number;
|
|
672
|
+
username: null | string;
|
|
673
|
+
password: null | string;
|
|
674
|
+
full: null | string;
|
|
675
|
+
};
|
|
676
|
+
AccountDto: {
|
|
677
|
+
phone: string;
|
|
678
|
+
status: components["schemas"]["TelegramStatusDto"];
|
|
679
|
+
sessions: components["schemas"]["AccountSessionDto"][];
|
|
680
|
+
info: (null | components["schemas"]["AccountInfoDto"]) & components["schemas"]["AccountInfoDto"];
|
|
681
|
+
proxy: (null | components["schemas"]["ProxyDto"]) & components["schemas"]["ProxyDto"];
|
|
682
|
+
};
|
|
683
|
+
ListAccountsResponseDto: {
|
|
684
|
+
count: number;
|
|
685
|
+
accounts: components["schemas"]["AccountDto"][];
|
|
686
|
+
};
|
|
605
687
|
};
|
|
606
688
|
}
|
|
607
689
|
type $defs = Record<string, never>;
|
|
@@ -1179,6 +1261,31 @@ interface operations {
|
|
|
1179
1261
|
};
|
|
1180
1262
|
};
|
|
1181
1263
|
};
|
|
1264
|
+
"accounts.list": {
|
|
1265
|
+
parameters: {
|
|
1266
|
+
header: {
|
|
1267
|
+
/** @description `Basic token`, where token is `id:secret` base64 encoded */
|
|
1268
|
+
Authorization: string;
|
|
1269
|
+
};
|
|
1270
|
+
};
|
|
1271
|
+
responses: {
|
|
1272
|
+
/** @description List of Telegram accounts */
|
|
1273
|
+
200: {
|
|
1274
|
+
headers: {
|
|
1275
|
+
[name: string]: unknown;
|
|
1276
|
+
};
|
|
1277
|
+
content: {
|
|
1278
|
+
"application/json": components["schemas"]["ListAccountsResponseDto"];
|
|
1279
|
+
};
|
|
1280
|
+
};
|
|
1281
|
+
/** @description Unauthorized */
|
|
1282
|
+
401: {
|
|
1283
|
+
headers: {
|
|
1284
|
+
[name: string]: unknown;
|
|
1285
|
+
};
|
|
1286
|
+
};
|
|
1287
|
+
};
|
|
1288
|
+
};
|
|
1182
1289
|
}
|
|
1183
1290
|
|
|
1184
1291
|
export type { $defs, components, operations, paths };
|
package/dist/api-types.d.ts
CHANGED
|
@@ -77,6 +77,10 @@ interface paths {
|
|
|
77
77
|
/** Delete subscription by subscription id */
|
|
78
78
|
delete: operations["subscriptions.delete"];
|
|
79
79
|
};
|
|
80
|
+
"/accounts/list": {
|
|
81
|
+
/** List of Telegram accounts */
|
|
82
|
+
get: operations["accounts.list"];
|
|
83
|
+
};
|
|
80
84
|
}
|
|
81
85
|
/**
|
|
82
86
|
* Сгенерированные из OpenAPI типы для `components`
|
|
@@ -192,7 +196,7 @@ interface components {
|
|
|
192
196
|
channel_id: number;
|
|
193
197
|
/**
|
|
194
198
|
* Format: date-time
|
|
195
|
-
* @example
|
|
199
|
+
* @example 2026-01-13T09:56:16.054Z
|
|
196
200
|
*/
|
|
197
201
|
message_created_at: string;
|
|
198
202
|
/** @example 123 */
|
|
@@ -602,6 +606,84 @@ interface components {
|
|
|
602
606
|
key?: string;
|
|
603
607
|
query: components["schemas"]["SubscriptionQuery"];
|
|
604
608
|
};
|
|
609
|
+
TelegramStatusDto: {
|
|
610
|
+
floodWaitEndsAt?: string;
|
|
611
|
+
floodWait?: number;
|
|
612
|
+
floodWaitBy?: string;
|
|
613
|
+
isBanned?: boolean;
|
|
614
|
+
isAccountFrozen?: boolean;
|
|
615
|
+
isAuthKeyDuplicated?: boolean;
|
|
616
|
+
isSessionRevoked?: boolean;
|
|
617
|
+
isAuthKeyUnregistered?: boolean;
|
|
618
|
+
busyFor?: string;
|
|
619
|
+
lastError?: string;
|
|
620
|
+
selectReason?: string;
|
|
621
|
+
resolveMisses?: number;
|
|
622
|
+
};
|
|
623
|
+
DcInfoDto: {
|
|
624
|
+
id: number;
|
|
625
|
+
ipAddress: string;
|
|
626
|
+
port: number;
|
|
627
|
+
ipv6?: boolean;
|
|
628
|
+
mediaOnly?: boolean;
|
|
629
|
+
testMode?: boolean;
|
|
630
|
+
};
|
|
631
|
+
PrimaryDcsDto: {
|
|
632
|
+
main: components["schemas"]["DcInfoDto"];
|
|
633
|
+
media: components["schemas"]["DcInfoDto"];
|
|
634
|
+
};
|
|
635
|
+
SelfInfoDto: {
|
|
636
|
+
id: number;
|
|
637
|
+
usernames: string[];
|
|
638
|
+
firstName?: string;
|
|
639
|
+
lastName?: string;
|
|
640
|
+
isPremium: boolean;
|
|
641
|
+
isBot: boolean;
|
|
642
|
+
};
|
|
643
|
+
AccountSessionDto: {
|
|
644
|
+
id: number;
|
|
645
|
+
primaryDcs: components["schemas"]["PrimaryDcsDto"];
|
|
646
|
+
self: (null | components["schemas"]["SelfInfoDto"]) & components["schemas"]["SelfInfoDto"];
|
|
647
|
+
/**
|
|
648
|
+
* @description Auth keys by DC ID
|
|
649
|
+
* @example {
|
|
650
|
+
* "1": "base64string",
|
|
651
|
+
* "2": "base64string"
|
|
652
|
+
* }
|
|
653
|
+
*/
|
|
654
|
+
authKeys: Record<string, never>;
|
|
655
|
+
/** @description Base64 encoded avatar URI */
|
|
656
|
+
avatarUri: null | string;
|
|
657
|
+
apiId: number;
|
|
658
|
+
apiHash: string;
|
|
659
|
+
};
|
|
660
|
+
AccountInfoDto: {
|
|
661
|
+
raw: null | Record<string, never>;
|
|
662
|
+
tgId: number;
|
|
663
|
+
username: null | string;
|
|
664
|
+
firstName: null | string;
|
|
665
|
+
lastName: null | string;
|
|
666
|
+
};
|
|
667
|
+
ProxyDto: {
|
|
668
|
+
/** @enum {string} */
|
|
669
|
+
type: "socks5";
|
|
670
|
+
host: string;
|
|
671
|
+
port: number;
|
|
672
|
+
username: null | string;
|
|
673
|
+
password: null | string;
|
|
674
|
+
full: null | string;
|
|
675
|
+
};
|
|
676
|
+
AccountDto: {
|
|
677
|
+
phone: string;
|
|
678
|
+
status: components["schemas"]["TelegramStatusDto"];
|
|
679
|
+
sessions: components["schemas"]["AccountSessionDto"][];
|
|
680
|
+
info: (null | components["schemas"]["AccountInfoDto"]) & components["schemas"]["AccountInfoDto"];
|
|
681
|
+
proxy: (null | components["schemas"]["ProxyDto"]) & components["schemas"]["ProxyDto"];
|
|
682
|
+
};
|
|
683
|
+
ListAccountsResponseDto: {
|
|
684
|
+
count: number;
|
|
685
|
+
accounts: components["schemas"]["AccountDto"][];
|
|
686
|
+
};
|
|
605
687
|
};
|
|
606
688
|
}
|
|
607
689
|
type $defs = Record<string, never>;
|
|
@@ -1179,6 +1261,31 @@ interface operations {
|
|
|
1179
1261
|
};
|
|
1180
1262
|
};
|
|
1181
1263
|
};
|
|
1264
|
+
"accounts.list": {
|
|
1265
|
+
parameters: {
|
|
1266
|
+
header: {
|
|
1267
|
+
/** @description `Basic token`, where token is `id:secret` base64 encoded */
|
|
1268
|
+
Authorization: string;
|
|
1269
|
+
};
|
|
1270
|
+
};
|
|
1271
|
+
responses: {
|
|
1272
|
+
/** @description List of Telegram accounts */
|
|
1273
|
+
200: {
|
|
1274
|
+
headers: {
|
|
1275
|
+
[name: string]: unknown;
|
|
1276
|
+
};
|
|
1277
|
+
content: {
|
|
1278
|
+
"application/json": components["schemas"]["ListAccountsResponseDto"];
|
|
1279
|
+
};
|
|
1280
|
+
};
|
|
1281
|
+
/** @description Unauthorized */
|
|
1282
|
+
401: {
|
|
1283
|
+
headers: {
|
|
1284
|
+
[name: string]: unknown;
|
|
1285
|
+
};
|
|
1286
|
+
};
|
|
1287
|
+
};
|
|
1288
|
+
};
|
|
1182
1289
|
}
|
|
1183
1290
|
|
|
1184
1291
|
export type { $defs, components, operations, paths };
|
package/dist/index.cjs
CHANGED
|
@@ -372,6 +372,25 @@ class EApi {
|
|
|
372
372
|
});
|
|
373
373
|
}
|
|
374
374
|
};
|
|
375
|
+
/**
|
|
376
|
+
* @tags accounts
|
|
377
|
+
*/
|
|
378
|
+
accounts = {
|
|
379
|
+
/**
|
|
380
|
+
*
|
|
381
|
+
*
|
|
382
|
+
* @tags accounts
|
|
383
|
+
* @summary List of Telegram accounts
|
|
384
|
+
*
|
|
385
|
+
* [Documentation](.../accounts/operation/accounts.list)
|
|
386
|
+
*/
|
|
387
|
+
list: (options) => {
|
|
388
|
+
return this.request("/accounts/list", void 0, {
|
|
389
|
+
method: "GET",
|
|
390
|
+
...options
|
|
391
|
+
});
|
|
392
|
+
}
|
|
393
|
+
};
|
|
375
394
|
/** @generated stop-generate-methods */
|
|
376
395
|
}
|
|
377
396
|
|
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 {
|
|
@@ -585,6 +585,20 @@ declare class EApi {
|
|
|
585
585
|
*/
|
|
586
586
|
delete: (subId: paths["/subscriptions/{subId}"]["delete"]["parameters"]["path"]["subId"], options?: RequestOptions) => Promise<GetResponse<"/subscriptions/{subId}", "delete">>;
|
|
587
587
|
};
|
|
588
|
+
/**
|
|
589
|
+
* @tags accounts
|
|
590
|
+
*/
|
|
591
|
+
accounts: {
|
|
592
|
+
/**
|
|
593
|
+
*
|
|
594
|
+
*
|
|
595
|
+
* @tags accounts
|
|
596
|
+
* @summary List of Telegram accounts
|
|
597
|
+
*
|
|
598
|
+
* [Documentation](.../accounts/operation/accounts.list)
|
|
599
|
+
*/
|
|
600
|
+
list: (options?: RequestOptions) => Promise<GetResponse<"/accounts/list", "get">>;
|
|
601
|
+
};
|
|
588
602
|
}
|
|
589
603
|
|
|
590
604
|
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 {
|
|
@@ -585,6 +585,20 @@ declare class EApi {
|
|
|
585
585
|
*/
|
|
586
586
|
delete: (subId: paths["/subscriptions/{subId}"]["delete"]["parameters"]["path"]["subId"], options?: RequestOptions) => Promise<GetResponse<"/subscriptions/{subId}", "delete">>;
|
|
587
587
|
};
|
|
588
|
+
/**
|
|
589
|
+
* @tags accounts
|
|
590
|
+
*/
|
|
591
|
+
accounts: {
|
|
592
|
+
/**
|
|
593
|
+
*
|
|
594
|
+
*
|
|
595
|
+
* @tags accounts
|
|
596
|
+
* @summary List of Telegram accounts
|
|
597
|
+
*
|
|
598
|
+
* [Documentation](.../accounts/operation/accounts.list)
|
|
599
|
+
*/
|
|
600
|
+
list: (options?: RequestOptions) => Promise<GetResponse<"/accounts/list", "get">>;
|
|
601
|
+
};
|
|
588
602
|
}
|
|
589
603
|
|
|
590
604
|
export { EApi, type EApiOptions, webhookHandler };
|
package/dist/index.js
CHANGED
|
@@ -370,6 +370,25 @@ class EApi {
|
|
|
370
370
|
});
|
|
371
371
|
}
|
|
372
372
|
};
|
|
373
|
+
/**
|
|
374
|
+
* @tags accounts
|
|
375
|
+
*/
|
|
376
|
+
accounts = {
|
|
377
|
+
/**
|
|
378
|
+
*
|
|
379
|
+
*
|
|
380
|
+
* @tags accounts
|
|
381
|
+
* @summary List of Telegram accounts
|
|
382
|
+
*
|
|
383
|
+
* [Documentation](.../accounts/operation/accounts.list)
|
|
384
|
+
*/
|
|
385
|
+
list: (options) => {
|
|
386
|
+
return this.request("/accounts/list", void 0, {
|
|
387
|
+
method: "GET",
|
|
388
|
+
...options
|
|
389
|
+
});
|
|
390
|
+
}
|
|
391
|
+
};
|
|
373
392
|
/** @generated stop-generate-methods */
|
|
374
393
|
}
|
|
375
394
|
|