@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.
@@ -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
- const defaultBaseUrl = "https://api.telegram.org";
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);
@@ -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("../index.js").Api>(method: M, input: Parameters<import("../index.js").Api[M]>[0]) => Promise<{
15
- success?: ReturnType<import("../index.js").Api[M]>;
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("../index.js").Api>(method: M, input: Parameters<import("../index.js").Api[M]>[0]) => Promise<ReturnType<import("../index.js").Api[M]>>;
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
  };
@@ -1,3 +1,4 @@
1
+ export declare const defaultBaseUrl = "https://api.telegram.org";
1
2
  export declare const MESSAGE_EFFECTS: {
2
3
  readonly "\uD83D\uDD25": "5104841245755180586";
3
4
  readonly "\uD83D\uDC4D": "5107584321108051014";
@@ -1,4 +1,2 @@
1
1
  export * from "./client/const.js";
2
2
  export * from "./client/_client.js";
3
- export * from "./specification/api.js";
4
- export * from "./specification/types.js";