@aracna/telegram-bot 1.9.6 → 1.9.8

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.
Files changed (47) hide show
  1. package/definitions/enums.js +2 -2
  2. package/definitions/types.d.ts +4 -0
  3. package/modules/api.js +1 -24
  4. package/package.json +3 -4
  5. package/declarations/definitions/types.d.ts +0 -4
  6. package/declarations/index.d.ts +0 -12
  7. /package/{declarations/builders → builders}/button.builder.d.ts +0 -0
  8. /package/{declarations/childs → childs}/add.d.ts +0 -0
  9. /package/{declarations/childs → childs}/answer.d.ts +0 -0
  10. /package/{declarations/childs → childs}/ban.d.ts +0 -0
  11. /package/{declarations/childs → childs}/create.d.ts +0 -0
  12. /package/{declarations/childs → childs}/delete.d.ts +0 -0
  13. /package/{declarations/childs → childs}/download.d.ts +0 -0
  14. /package/{declarations/childs → childs}/edit.d.ts +0 -0
  15. /package/{declarations/childs → childs}/export.d.ts +0 -0
  16. /package/{declarations/childs → childs}/forward.d.ts +0 -0
  17. /package/{declarations/childs → childs}/get.d.ts +0 -0
  18. /package/{declarations/childs → childs}/leave.d.ts +0 -0
  19. /package/{declarations/childs → childs}/pin.d.ts +0 -0
  20. /package/{declarations/childs → childs}/polling.d.ts +0 -0
  21. /package/{declarations/childs → childs}/privates/send.private.d.ts +0 -0
  22. /package/{declarations/childs → childs}/promote.d.ts +0 -0
  23. /package/{declarations/childs → childs}/restrict.d.ts +0 -0
  24. /package/{declarations/childs → childs}/send.d.ts +0 -0
  25. /package/{declarations/childs → childs}/set.d.ts +0 -0
  26. /package/{declarations/childs → childs}/stop.d.ts +0 -0
  27. /package/{declarations/childs → childs}/unban.d.ts +0 -0
  28. /package/{declarations/childs → childs}/unpin.d.ts +0 -0
  29. /package/{declarations/childs → childs}/upload.d.ts +0 -0
  30. /package/{declarations/childs → childs}/webhook.d.ts +0 -0
  31. /package/{declarations/definitions → definitions}/constants.d.ts +0 -0
  32. /package/{declarations/definitions → definitions}/enums.d.ts +0 -0
  33. /package/{declarations/definitions → definitions}/interfaces.d.ts +0 -0
  34. /package/{declarations/loggers → loggers}/module.logger.d.ts +0 -0
  35. /package/{declarations/modules → modules}/api.d.ts +0 -0
  36. /package/{declarations/modules → modules}/builder.d.ts +0 -0
  37. /package/{declarations/modules → modules}/child.d.ts +0 -0
  38. /package/{declarations/modules → modules}/configuration.d.ts +0 -0
  39. /package/{declarations/modules → modules}/dummy.d.ts +0 -0
  40. /package/{declarations/modules → modules}/telegram.d.ts +0 -0
  41. /package/{declarations/utils → utils}/callback.query.utils.d.ts +0 -0
  42. /package/{declarations/utils → utils}/command.utils.d.ts +0 -0
  43. /package/{declarations/utils → utils}/context.utils.d.ts +0 -0
  44. /package/{declarations/utils → utils}/html.utils.d.ts +0 -0
  45. /package/{declarations/utils → utils}/inline.keyboard.utils.d.ts +0 -0
  46. /package/{declarations/utils → utils}/reply.to.message.utils.d.ts +0 -0
  47. /package/{declarations/utils → utils}/start.utils.d.ts +0 -0
@@ -4,7 +4,7 @@ exports.UpdateType = exports.LoggerName = void 0;
4
4
  var LoggerName;
5
5
  (function (LoggerName) {
6
6
  LoggerName["MODULE"] = "TELEGRAM_MODULE";
7
- })(LoggerName = exports.LoggerName || (exports.LoggerName = {}));
7
+ })(LoggerName || (exports.LoggerName = LoggerName = {}));
8
8
  var UpdateType;
9
9
  (function (UpdateType) {
10
10
  UpdateType["CALLBACK_QUERY"] = "CALLBACK_QUERY";
@@ -24,4 +24,4 @@ var UpdateType;
24
24
  UpdateType["REPLY_TO_MESSAGE"] = "REPLY_TO_MESSAGE";
25
25
  UpdateType["SHIPPING_QUERY"] = "SHIPPING_QUERY";
26
26
  UpdateType["START"] = "START";
27
- })(UpdateType = exports.UpdateType || (exports.UpdateType = {}));
27
+ })(UpdateType || (exports.UpdateType = UpdateType = {}));
@@ -0,0 +1,4 @@
1
+ import { UpdateType } from './enums';
2
+ import { Context } from './interfaces';
3
+ export type HandlerMiddleware<T extends UpdateType> = (context: Context[T]) => any;
4
+ export type InputFile = File | string;
package/modules/api.js CHANGED
@@ -1,27 +1,4 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  Object.defineProperty(exports, "__esModule", { value: true });
26
3
  exports.API = void 0;
27
4
  const core_1 = require("@aracna/core");
@@ -37,7 +14,7 @@ class API extends core_1.API {
37
14
  switch (method) {
38
15
  case 'GET':
39
16
  case 'POST':
40
- await (0, core_1.useNodeFetch)(await (0, core_1.tcp)(() => Promise.resolve().then(() => __importStar(require('node-fetch')))));
17
+ await (0, core_1.useNodeFetch)(await (0, core_1.tcp)(() => Promise.resolve().then(() => require('node-fetch'))));
41
18
  return (0, core_1.serializeFormData)(typeof body === 'object' ? body : {});
42
19
  default:
43
20
  return (0, core_1.serializeFormData)({});
package/package.json CHANGED
@@ -4,6 +4,7 @@
4
4
  "@aracna/core": "^1.1.41",
5
5
  "@aracna/telegram-bot-types": "^1.2.4",
6
6
  "@microsoft/api-extractor": "^7.36.4",
7
+ "@vitest/coverage-v8": "^0.34.2",
7
8
  "@vitest/ui": "^0.34.2",
8
9
  "dotenv": "^16.3.1",
9
10
  "fastify": "^4.21.0",
@@ -23,8 +24,6 @@
23
24
  "tarball": "yarn version && cp LICENSE package.json README.md dist/. && cd dist && yarn pack",
24
25
  "deploy": "yarn test && yarn build && yarn tarball && yarn publish dist/*.tgz && git push"
25
26
  },
26
- "version": "1.9.6",
27
- "dependencies": {
28
- "@vitest/coverage-v8": "^0.34.2"
29
- }
27
+ "types": "index.d.ts",
28
+ "version": "1.9.8"
30
29
  }
@@ -1,4 +0,0 @@
1
- import { UpdateType } from './enums';
2
- import { Context } from './interfaces';
3
- export declare type HandlerMiddleware<T extends UpdateType> = (context: Context[T]) => any;
4
- export declare type InputFile = File | string;
@@ -1,12 +0,0 @@
1
- export { LoggerName as TelegramLoggerName, UpdateType } from './definitions/enums';
2
- export { CallbackQuery, CallbackQueryBody, Context, Handler, HandlerOptions, MessageBody, ReplyToMessage, Start } from './definitions/interfaces';
3
- export { HandlerMiddleware, InputFile } from './definitions/types';
4
- export { Configuration as TelegramConfiguration } from './modules/configuration';
5
- export { Telegram } from './modules/telegram';
6
- export { CallbackQueryUtils } from './utils/callback.query.utils';
7
- export { CommandUtils } from './utils/command.utils';
8
- export { ContextUtils } from './utils/context.utils';
9
- export { HTMLUtils } from './utils/html.utils';
10
- export { InlineKeyboardUtils } from './utils/inline.keyboard.utils';
11
- export { ReplyToMessageUtils } from './utils/reply.to.message.utils';
12
- export { StartUtils } from './utils/start.utils';
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes