@types/tgfancy 0.13.1 → 0.13.3
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.
- tgfancy/LICENSE +1 -1
- tgfancy/README.md +85 -5
- tgfancy/index.d.ts +16 -16
- tgfancy/package.json +7 -4
tgfancy/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) Microsoft Corporation.
|
|
3
|
+
Copyright (c) Microsoft Corporation.
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
tgfancy/README.md
CHANGED
|
@@ -5,12 +5,92 @@
|
|
|
5
5
|
This package contains type definitions for tgfancy (https://github.com/GochoMugo/tgfancy).
|
|
6
6
|
|
|
7
7
|
# Details
|
|
8
|
-
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/tgfancy
|
|
8
|
+
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/tgfancy.
|
|
9
|
+
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/tgfancy/index.d.ts)
|
|
10
|
+
````ts
|
|
11
|
+
// Type definitions for tgfancy 0.13
|
|
12
|
+
// Project: https://github.com/GochoMugo/tgfancy
|
|
13
|
+
// Definitions by: Giorgio Garasto <https://github.com/Dabolus>
|
|
14
|
+
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
15
|
+
// TypeScript Version: 2.3
|
|
16
|
+
|
|
17
|
+
import * as TelegramBot from "node-telegram-bot-api";
|
|
18
|
+
|
|
19
|
+
declare namespace Tgfancy {
|
|
20
|
+
interface ChatIdResolutionOptions {
|
|
21
|
+
resolve(token: string, chatId: number | string, callback: (error: Error | null, target: any) => void): void;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
interface EmojificationOptions {
|
|
25
|
+
emojify(text: string): string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
interface RatelimitingOptions {
|
|
29
|
+
maxRetries?: number | undefined;
|
|
30
|
+
timeout?: number | undefined;
|
|
31
|
+
notify?(methodName: string, ...args: any[]): void;
|
|
32
|
+
maxBackoff?: number | undefined;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
interface WebSocketOptions {
|
|
36
|
+
url: string;
|
|
37
|
+
autoOpen?: boolean | undefined;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
interface TgfancyOptions {
|
|
41
|
+
chatIdResolution?: boolean | ChatIdResolutionOptions | undefined;
|
|
42
|
+
emojification?: boolean | EmojificationOptions | undefined;
|
|
43
|
+
kickWithoutBan?: boolean | undefined;
|
|
44
|
+
openshiftWebHook?: boolean | undefined;
|
|
45
|
+
orderedSending?: boolean | undefined;
|
|
46
|
+
ratelimiting?: boolean | RatelimitingOptions | undefined;
|
|
47
|
+
textPaging?: boolean | undefined;
|
|
48
|
+
webSocket?: boolean | WebSocketOptions | undefined;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
interface ConstructorOptions extends TelegramBot.ConstructorOptions {
|
|
52
|
+
tgfancy?: TgfancyOptions | undefined;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
interface ResolvedChat {
|
|
56
|
+
id: number | string;
|
|
57
|
+
username: string;
|
|
58
|
+
type: string;
|
|
59
|
+
when: string;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
interface ResolvedGroupOrChannel extends ResolvedChat {
|
|
63
|
+
title: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
interface ResolvedUser extends ResolvedChat {
|
|
67
|
+
first_name: string;
|
|
68
|
+
last_name?: string | undefined;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
declare class Tgfancy extends TelegramBot {
|
|
73
|
+
constructor(token: string, options?: Tgfancy.ConstructorOptions);
|
|
74
|
+
|
|
75
|
+
resolveChatId(chatId: string): Promise<Tgfancy.ResolvedChat>;
|
|
76
|
+
|
|
77
|
+
openWebSocket(): Promise<undefined>;
|
|
78
|
+
|
|
79
|
+
closeWebSocket(): Promise<undefined>;
|
|
80
|
+
|
|
81
|
+
hasOpenWebSocket(): boolean;
|
|
82
|
+
|
|
83
|
+
kickChatMember(chatId: number | string, userId: number | string, ban?: boolean): Promise<boolean>;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export = Tgfancy;
|
|
9
87
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
88
|
+
````
|
|
89
|
+
|
|
90
|
+
### Additional Details
|
|
91
|
+
* Last updated: Tue, 12 Sep 2023 12:34:37 GMT
|
|
92
|
+
* Dependencies: [@types/node-telegram-bot-api](https://npmjs.com/package/@types/node-telegram-bot-api)
|
|
13
93
|
* Global values: none
|
|
14
94
|
|
|
15
95
|
# Credits
|
|
16
|
-
These definitions were written by Giorgio Garasto
|
|
96
|
+
These definitions were written by [Giorgio Garasto](https://github.com/Dabolus).
|
tgfancy/index.d.ts
CHANGED
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
5
5
|
// TypeScript Version: 2.3
|
|
6
6
|
|
|
7
|
-
import * as TelegramBot from
|
|
7
|
+
import * as TelegramBot from "node-telegram-bot-api";
|
|
8
8
|
|
|
9
9
|
declare namespace Tgfancy {
|
|
10
10
|
interface ChatIdResolutionOptions {
|
|
11
|
-
resolve(token: string, chatId: number | string, callback: (
|
|
11
|
+
resolve(token: string, chatId: number | string, callback: (error: Error | null, target: any) => void): void;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
interface EmojificationOptions {
|
|
@@ -16,30 +16,30 @@ declare namespace Tgfancy {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
interface RatelimitingOptions {
|
|
19
|
-
maxRetries?: number;
|
|
20
|
-
timeout?: number;
|
|
19
|
+
maxRetries?: number | undefined;
|
|
20
|
+
timeout?: number | undefined;
|
|
21
21
|
notify?(methodName: string, ...args: any[]): void;
|
|
22
|
-
maxBackoff?: number;
|
|
22
|
+
maxBackoff?: number | undefined;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
interface WebSocketOptions {
|
|
26
26
|
url: string;
|
|
27
|
-
autoOpen?: boolean;
|
|
27
|
+
autoOpen?: boolean | undefined;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
interface TgfancyOptions {
|
|
31
|
-
chatIdResolution?: boolean | ChatIdResolutionOptions;
|
|
32
|
-
emojification?: boolean | EmojificationOptions;
|
|
33
|
-
kickWithoutBan?: boolean;
|
|
34
|
-
openshiftWebHook?: boolean;
|
|
35
|
-
orderedSending?: boolean;
|
|
36
|
-
ratelimiting?: boolean | RatelimitingOptions;
|
|
37
|
-
textPaging?: boolean;
|
|
38
|
-
webSocket?: boolean | WebSocketOptions;
|
|
31
|
+
chatIdResolution?: boolean | ChatIdResolutionOptions | undefined;
|
|
32
|
+
emojification?: boolean | EmojificationOptions | undefined;
|
|
33
|
+
kickWithoutBan?: boolean | undefined;
|
|
34
|
+
openshiftWebHook?: boolean | undefined;
|
|
35
|
+
orderedSending?: boolean | undefined;
|
|
36
|
+
ratelimiting?: boolean | RatelimitingOptions | undefined;
|
|
37
|
+
textPaging?: boolean | undefined;
|
|
38
|
+
webSocket?: boolean | WebSocketOptions | undefined;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
interface ConstructorOptions extends TelegramBot.ConstructorOptions {
|
|
42
|
-
tgfancy?: TgfancyOptions;
|
|
42
|
+
tgfancy?: TgfancyOptions | undefined;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
interface ResolvedChat {
|
|
@@ -55,7 +55,7 @@ declare namespace Tgfancy {
|
|
|
55
55
|
|
|
56
56
|
interface ResolvedUser extends ResolvedChat {
|
|
57
57
|
first_name: string;
|
|
58
|
-
last_name?: string;
|
|
58
|
+
last_name?: string | undefined;
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
|
tgfancy/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/tgfancy",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.3",
|
|
4
4
|
"description": "TypeScript definitions for tgfancy",
|
|
5
|
+
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/tgfancy",
|
|
5
6
|
"license": "MIT",
|
|
6
7
|
"contributors": [
|
|
7
8
|
{
|
|
@@ -11,14 +12,16 @@
|
|
|
11
12
|
}
|
|
12
13
|
],
|
|
13
14
|
"main": "",
|
|
15
|
+
"types": "index.d.ts",
|
|
14
16
|
"repository": {
|
|
15
17
|
"type": "git",
|
|
16
|
-
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git"
|
|
18
|
+
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
|
19
|
+
"directory": "types/tgfancy"
|
|
17
20
|
},
|
|
18
21
|
"scripts": {},
|
|
19
22
|
"dependencies": {
|
|
20
23
|
"@types/node-telegram-bot-api": "*"
|
|
21
24
|
},
|
|
22
|
-
"typesPublisherContentHash": "
|
|
23
|
-
"typeScriptVersion": "
|
|
25
|
+
"typesPublisherContentHash": "fb16d41d87a543132c9e16018f3cf2e4ea93a937acac705a48e5da7ab3c247b6",
|
|
26
|
+
"typeScriptVersion": "4.3"
|
|
24
27
|
}
|