@effect-ak/tg-bot-client 0.0.7 → 0.1.0
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/cjs/client/_client.js +2 -2
- package/dist/cjs/client/const.js +2 -1
- package/dist/cjs/index.js +0 -22
- package/dist/dts/client/_client.d.ts +3 -3
- package/dist/dts/client/const.d.ts +1 -0
- package/dist/dts/index.d.ts +0 -2
- package/dist/dts/specification/api.d.ts +784 -2774
- package/dist/dts/specification/types.d.ts +1382 -3542
- package/dist/esm/client/_client.js +1 -1
- package/dist/esm/client/const.js +1 -0
- package/dist/esm/index.js +2 -2
- package/package.json +7 -4
- package/readme.md +12 -3
|
@@ -6,11 +6,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.makeTgBotClient = void 0;
|
|
7
7
|
var _executeRequest = require("./execute-request.js");
|
|
8
8
|
var _downloadFile = require("./download-file.js");
|
|
9
|
-
|
|
9
|
+
var _const = require("./const.js");
|
|
10
10
|
const makeTgBotClient = inputConfig => {
|
|
11
11
|
const config = {
|
|
12
12
|
...inputConfig,
|
|
13
|
-
baseUrl: inputConfig.baseUrl ?? defaultBaseUrl
|
|
13
|
+
baseUrl: inputConfig.baseUrl ?? _const.defaultBaseUrl
|
|
14
14
|
};
|
|
15
15
|
const execute = (0, _executeRequest.makeExecute)(config);
|
|
16
16
|
const file = (0, _downloadFile.makeDownloadFile)(config, execute);
|
package/dist/cjs/client/const.js
CHANGED
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.messageEffectIdCodes = exports.isMessageEffect = exports.MESSAGE_EFFECTS = void 0;
|
|
6
|
+
exports.messageEffectIdCodes = exports.isMessageEffect = exports.defaultBaseUrl = exports.MESSAGE_EFFECTS = void 0;
|
|
7
|
+
const defaultBaseUrl = exports.defaultBaseUrl = "https://api.telegram.org";
|
|
7
8
|
const MESSAGE_EFFECTS = exports.MESSAGE_EFFECTS = {
|
|
8
9
|
"🔥": "5104841245755180586",
|
|
9
10
|
"👍": "5107584321108051014",
|
package/dist/cjs/index.js
CHANGED
|
@@ -24,26 +24,4 @@ Object.keys(_client).forEach(function (key) {
|
|
|
24
24
|
return _client[key];
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
|
-
});
|
|
28
|
-
var _api = require("./specification/api.js");
|
|
29
|
-
Object.keys(_api).forEach(function (key) {
|
|
30
|
-
if (key === "default" || key === "__esModule") return;
|
|
31
|
-
if (key in exports && exports[key] === _api[key]) return;
|
|
32
|
-
Object.defineProperty(exports, key, {
|
|
33
|
-
enumerable: true,
|
|
34
|
-
get: function () {
|
|
35
|
-
return _api[key];
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
var _types = require("./specification/types.js");
|
|
40
|
-
Object.keys(_types).forEach(function (key) {
|
|
41
|
-
if (key === "default" || key === "__esModule") return;
|
|
42
|
-
if (key in exports && exports[key] === _types[key]) return;
|
|
43
|
-
Object.defineProperty(exports, key, {
|
|
44
|
-
enumerable: true,
|
|
45
|
-
get: function () {
|
|
46
|
-
return _types[key];
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
27
|
});
|
|
@@ -11,9 +11,9 @@ export declare const makeTgBotClient: (inputConfig: SetOptional<BotConfig, "base
|
|
|
11
11
|
success?: File;
|
|
12
12
|
error?: import("./errors.js").TgBotClientError;
|
|
13
13
|
}>;
|
|
14
|
-
readonly execute: <M extends keyof import("../
|
|
15
|
-
success?: ReturnType<import("../
|
|
14
|
+
readonly execute: <M extends keyof import("../specification/api.js").Api>(method: M, input: Parameters<import("../specification/api.js").Api[M]>[0]) => Promise<{
|
|
15
|
+
success?: ReturnType<import("../specification/api.js").Api[M]>;
|
|
16
16
|
error?: import("./errors.js").TgBotClientError;
|
|
17
17
|
}>;
|
|
18
|
-
readonly unsafeExecute: <M extends keyof import("../
|
|
18
|
+
readonly unsafeExecute: <M extends keyof import("../specification/api.js").Api>(method: M, input: Parameters<import("../specification/api.js").Api[M]>[0]) => Promise<ReturnType<import("../specification/api.js").Api[M]>>;
|
|
19
19
|
};
|
package/dist/dts/index.d.ts
CHANGED