chz-telegram-bot 0.3.14 → 0.3.16

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 (91) hide show
  1. package/LICENSE.md +21 -0
  2. package/dist/builtin/helpAction.d.ts +1 -1
  3. package/dist/builtin/helpAction.d.ts.map +1 -1
  4. package/dist/dtos/chatInfo.d.ts +10 -1
  5. package/dist/dtos/chatInfo.d.ts.map +1 -1
  6. package/dist/dtos/chatInfo.js +11 -5
  7. package/dist/dtos/commandTriggerCheckResult.d.ts +5 -5
  8. package/dist/dtos/commandTriggerCheckResult.d.ts.map +1 -1
  9. package/dist/dtos/commandTriggerCheckResult.js +4 -4
  10. package/dist/dtos/cooldownInfo.d.ts +9 -3
  11. package/dist/dtos/cooldownInfo.d.ts.map +1 -1
  12. package/dist/dtos/cooldownInfo.js +5 -1
  13. package/dist/dtos/incomingMessage.d.ts +1 -1
  14. package/dist/dtos/incomingMessage.d.ts.map +1 -1
  15. package/dist/dtos/incomingMessage.js +2 -2
  16. package/dist/dtos/incomingQuery.d.ts.map +1 -1
  17. package/dist/dtos/messageInfo.d.ts +21 -0
  18. package/dist/dtos/messageInfo.d.ts.map +1 -0
  19. package/dist/dtos/messageInfo.js +24 -0
  20. package/dist/dtos/userInfo.d.ts +12 -0
  21. package/dist/dtos/userInfo.d.ts.map +1 -0
  22. package/dist/dtos/userInfo.js +16 -0
  23. package/dist/entities/actions/commandAction.d.ts +2 -2
  24. package/dist/entities/actions/commandAction.d.ts.map +1 -1
  25. package/dist/entities/actions/commandAction.js +7 -7
  26. package/dist/entities/actions/inlineQueryAction.d.ts +2 -2
  27. package/dist/entities/actions/inlineQueryAction.d.ts.map +1 -1
  28. package/dist/entities/actions/replyCaptureAction.d.ts +4 -4
  29. package/dist/entities/actions/replyCaptureAction.d.ts.map +1 -1
  30. package/dist/entities/actions/replyCaptureAction.js +4 -4
  31. package/dist/entities/actions/scheduledAction.d.ts +2 -2
  32. package/dist/entities/actions/scheduledAction.d.ts.map +1 -1
  33. package/dist/entities/context/baseContext.d.ts +2 -1
  34. package/dist/entities/context/baseContext.d.ts.map +1 -1
  35. package/dist/entities/context/baseContext.js +3 -3
  36. package/dist/entities/context/chatContext.d.ts +3 -2
  37. package/dist/entities/context/chatContext.d.ts.map +1 -1
  38. package/dist/entities/context/chatContext.js +3 -3
  39. package/dist/entities/context/inlineQueryContext.d.ts +3 -2
  40. package/dist/entities/context/inlineQueryContext.d.ts.map +1 -1
  41. package/dist/entities/context/inlineQueryContext.js +3 -3
  42. package/dist/entities/context/messageContext.d.ts +11 -15
  43. package/dist/entities/context/messageContext.d.ts.map +1 -1
  44. package/dist/entities/context/messageContext.js +15 -20
  45. package/dist/entities/context/replyContext.d.ts +9 -15
  46. package/dist/entities/context/replyContext.d.ts.map +1 -1
  47. package/dist/entities/context/replyContext.js +12 -20
  48. package/dist/helpers/mapUtils.d.ts +9 -2
  49. package/dist/helpers/mapUtils.d.ts.map +1 -1
  50. package/dist/helpers/mapUtils.js +1 -1
  51. package/dist/index.d.ts +13 -9
  52. package/dist/index.d.ts.map +1 -1
  53. package/dist/index.js +14 -11
  54. package/dist/services/actionProcessors/baseProcessor.d.ts +2 -2
  55. package/dist/services/actionProcessors/baseProcessor.d.ts.map +1 -1
  56. package/dist/services/actionProcessors/commandActionProcessor.d.ts +1 -0
  57. package/dist/services/actionProcessors/commandActionProcessor.d.ts.map +1 -1
  58. package/dist/services/actionProcessors/commandActionProcessor.js +18 -19
  59. package/dist/services/actionProcessors/inlineQueryActionProcessor.js +1 -1
  60. package/dist/services/actionProcessors/scheduledActionProcessor.d.ts.map +1 -1
  61. package/dist/services/actionProcessors/scheduledActionProcessor.js +2 -2
  62. package/dist/types/action.d.ts +2 -2
  63. package/dist/types/action.d.ts.map +1 -1
  64. package/dist/types/capture.d.ts +3 -3
  65. package/dist/types/capture.d.ts.map +1 -1
  66. package/dtos/chatInfo.ts +10 -9
  67. package/dtos/commandTriggerCheckResult.ts +5 -15
  68. package/dtos/cooldownInfo.ts +6 -1
  69. package/dtos/incomingMessage.ts +7 -2
  70. package/dtos/incomingQuery.ts +4 -12
  71. package/dtos/messageInfo.ts +17 -0
  72. package/dtos/userInfo.ts +8 -0
  73. package/entities/actions/commandAction.ts +11 -11
  74. package/entities/actions/inlineQueryAction.ts +2 -2
  75. package/entities/actions/replyCaptureAction.ts +9 -9
  76. package/entities/actions/scheduledAction.ts +2 -2
  77. package/entities/context/baseContext.ts +11 -1
  78. package/entities/context/chatContext.ts +16 -5
  79. package/entities/context/inlineQueryContext.ts +10 -2
  80. package/entities/context/messageContext.ts +24 -25
  81. package/entities/context/replyContext.ts +26 -25
  82. package/helpers/mapUtils.ts +15 -2
  83. package/index.ts +13 -9
  84. package/package.json +15 -1
  85. package/services/actionProcessors/baseProcessor.ts +3 -3
  86. package/services/actionProcessors/commandActionProcessor.ts +43 -21
  87. package/services/actionProcessors/inlineQueryActionProcessor.ts +3 -3
  88. package/services/actionProcessors/scheduledActionProcessor.ts +7 -4
  89. package/types/action.ts +2 -2
  90. package/types/capture.ts +5 -3
  91. package/chz-telegram-bot-0.3.14.tgz +0 -0
package/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Alex Halanin
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,2 +1,2 @@
1
- export declare function buildHelpCommand(readmes: string[], botUsername: string): import("../entities/actions/commandAction").CommandAction<import("..").ActionStateBase>;
1
+ export declare function buildHelpCommand(readmes: string[], botUsername: string): import("..").CommandAction<import("..").ActionStateBase>;
2
2
  //# sourceMappingURL=helpAction.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"helpAction.d.ts","sourceRoot":"","sources":["../../builtin/helpAction.ts"],"names":[],"mappings":"AAGA,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,WAAW,EAAE,MAAM,2FAUtE"}
1
+ {"version":3,"file":"helpAction.d.ts","sourceRoot":"","sources":["../../builtin/helpAction.ts"],"names":[],"mappings":"AAGA,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,WAAW,EAAE,MAAM,4DAUtE"}
@@ -1,8 +1,17 @@
1
+ import { IncomingMessage } from './incomingMessage';
1
2
  export declare class ChatInfo {
2
3
  /** Id of a chat that action is executed in. */
3
4
  readonly id: number;
4
5
  /** Name of a chat that action is executed in. */
5
6
  readonly name: string;
6
- constructor(chatId: number, chatName: string);
7
+ /** Last 100 messages in chat where action is executed */
8
+ readonly messageHistory: IncomingMessage[];
9
+ constructor(
10
+ /** Id of a chat that action is executed in. */
11
+ id: number,
12
+ /** Name of a chat that action is executed in. */
13
+ name: string,
14
+ /** Last 100 messages in chat where action is executed */
15
+ messageHistory: IncomingMessage[]);
7
16
  }
8
17
  //# sourceMappingURL=chatInfo.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chatInfo.d.ts","sourceRoot":"","sources":["../../dtos/chatInfo.ts"],"names":[],"mappings":"AAAA,qBAAa,QAAQ;IACjB,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,iDAAiD;IACjD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;gBAEV,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;CAI/C"}
1
+ {"version":3,"file":"chatInfo.d.ts","sourceRoot":"","sources":["../../dtos/chatInfo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,qBAAa,QAAQ;IAEb,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,EAAE,MAAM;IACnB,iDAAiD;IACjD,QAAQ,CAAC,IAAI,EAAE,MAAM;IACrB,yDAAyD;IACzD,QAAQ,CAAC,cAAc,EAAE,eAAe,EAAE;;IAL1C,+CAA+C;IACtC,EAAE,EAAE,MAAM;IACnB,iDAAiD;IACxC,IAAI,EAAE,MAAM;IACrB,yDAAyD;IAChD,cAAc,EAAE,eAAe,EAAE;CAEjD"}
@@ -2,13 +2,19 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ChatInfo = void 0;
4
4
  class ChatInfo {
5
- /** Id of a chat that action is executed in. */
6
5
  id;
7
- /** Name of a chat that action is executed in. */
8
6
  name;
9
- constructor(chatId, chatName) {
10
- this.id = chatId;
11
- this.name = chatName;
7
+ messageHistory;
8
+ constructor(
9
+ /** Id of a chat that action is executed in. */
10
+ id,
11
+ /** Name of a chat that action is executed in. */
12
+ name,
13
+ /** Last 100 messages in chat where action is executed */
14
+ messageHistory) {
15
+ this.id = id;
16
+ this.name = name;
17
+ this.messageHistory = messageHistory;
12
18
  }
13
19
  }
14
20
  exports.ChatInfo = ChatInfo;
@@ -8,14 +8,14 @@ declare const _SkipTriggerReasonsObject: {
8
8
  };
9
9
  export type SkipTriggerReasons = keyof typeof _SkipTriggerReasonsObject;
10
10
  export declare class CommandTriggerCheckResult {
11
- static DontTriggerAndSkipCooldown(reason: SkipTriggerReasons): CommandTriggerCheckResult;
12
- static DoNotTrigger(reason: SkipTriggerReasons): CommandTriggerCheckResult;
13
- static Trigger(): CommandTriggerCheckResult;
14
11
  readonly shouldExecute: boolean;
15
12
  readonly matchResults: RegExpExecArray[];
16
13
  readonly skipCooldown: boolean;
17
- readonly reason: SkipTriggerReasons | undefined;
18
- constructor(shouldExecute: boolean, matchResults: RegExpExecArray[], skipCooldown: boolean, reason?: SkipTriggerReasons);
14
+ readonly reason?: SkipTriggerReasons | undefined;
15
+ static DontTriggerAndSkipCooldown(reason: SkipTriggerReasons): CommandTriggerCheckResult;
16
+ static DoNotTrigger(reason: SkipTriggerReasons): CommandTriggerCheckResult;
17
+ static Trigger(): CommandTriggerCheckResult;
18
+ constructor(shouldExecute: boolean, matchResults: RegExpExecArray[], skipCooldown: boolean, reason?: SkipTriggerReasons | undefined);
19
19
  mergeWith(other: CommandTriggerCheckResult): CommandTriggerCheckResult;
20
20
  }
21
21
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"commandTriggerCheckResult.d.ts","sourceRoot":"","sources":["../../dtos/commandTriggerCheckResult.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,yBAAyB;;;;;;;CAOrB,CAAC;AAEX,MAAM,MAAM,kBAAkB,GAAG,MAAM,OAAO,yBAAyB,CAAC;AAExE,qBAAa,yBAAyB;IAClC,MAAM,CAAC,0BAA0B,CAAC,MAAM,EAAE,kBAAkB;IAG5D,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,kBAAkB;IAG9C,MAAM,CAAC,OAAO;IAId,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,YAAY,EAAE,eAAe,EAAE,CAAC;IACzC,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,MAAM,EAAE,kBAAkB,GAAG,SAAS,CAAC;gBAG5C,aAAa,EAAE,OAAO,EACtB,YAAY,EAAE,eAAe,EAAE,EAC/B,YAAY,EAAE,OAAO,EACrB,MAAM,CAAC,EAAE,kBAAkB;IAQ/B,SAAS,CAAC,KAAK,EAAE,yBAAyB;CAQ7C"}
1
+ {"version":3,"file":"commandTriggerCheckResult.d.ts","sourceRoot":"","sources":["../../dtos/commandTriggerCheckResult.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,yBAAyB;;;;;;;CAOrB,CAAC;AAEX,MAAM,MAAM,kBAAkB,GAAG,MAAM,OAAO,yBAAyB,CAAC;AAExE,qBAAa,yBAAyB;IAY9B,QAAQ,CAAC,aAAa,EAAE,OAAO;IAC/B,QAAQ,CAAC,YAAY,EAAE,eAAe,EAAE;IACxC,QAAQ,CAAC,YAAY,EAAE,OAAO;IAC9B,QAAQ,CAAC,MAAM,CAAC,EAAE,kBAAkB;IAdxC,MAAM,CAAC,0BAA0B,CAAC,MAAM,EAAE,kBAAkB;IAG5D,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,kBAAkB;IAG9C,MAAM,CAAC,OAAO;gBAKD,aAAa,EAAE,OAAO,EACtB,YAAY,EAAE,eAAe,EAAE,EAC/B,YAAY,EAAE,OAAO,EACrB,MAAM,CAAC,EAAE,kBAAkB,YAAA;IAGxC,SAAS,CAAC,KAAK,EAAE,yBAAyB;CAQ7C"}
@@ -10,6 +10,10 @@ const _SkipTriggerReasonsObject = {
10
10
  Other: 'Other'
11
11
  };
12
12
  class CommandTriggerCheckResult {
13
+ shouldExecute;
14
+ matchResults;
15
+ skipCooldown;
16
+ reason;
13
17
  static DontTriggerAndSkipCooldown(reason) {
14
18
  return new CommandTriggerCheckResult(false, [], true, reason);
15
19
  }
@@ -19,10 +23,6 @@ class CommandTriggerCheckResult {
19
23
  static Trigger() {
20
24
  return new CommandTriggerCheckResult(true, [], false);
21
25
  }
22
- shouldExecute;
23
- matchResults;
24
- skipCooldown;
25
- reason;
26
26
  constructor(shouldExecute, matchResults, skipCooldown, reason) {
27
27
  this.shouldExecute = shouldExecute;
28
28
  this.matchResults = matchResults;
@@ -1,7 +1,13 @@
1
1
  import { Seconds } from '../types/timeValues';
2
2
  export declare class CooldownInfo {
3
- seconds: Seconds;
4
- message: string | undefined;
5
- constructor(seconds: Seconds, message: string | undefined);
3
+ /** New one-time cooldown in seconds */
4
+ readonly seconds: Seconds;
5
+ /** Cooldown message to be shown */
6
+ readonly message: string | undefined;
7
+ constructor(
8
+ /** New one-time cooldown in seconds */
9
+ seconds: Seconds,
10
+ /** Cooldown message to be shown */
11
+ message: string | undefined);
6
12
  }
7
13
  //# sourceMappingURL=cooldownInfo.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cooldownInfo.d.ts","sourceRoot":"","sources":["../../dtos/cooldownInfo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,qBAAa,YAAY;IACF,OAAO,EAAE,OAAO;IAAS,OAAO,EAAE,MAAM,GAAG,SAAS;gBAApD,OAAO,EAAE,OAAO,EAAS,OAAO,EAAE,MAAM,GAAG,SAAS;CAC1E"}
1
+ {"version":3,"file":"cooldownInfo.d.ts","sourceRoot":"","sources":["../../dtos/cooldownInfo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,qBAAa,YAAY;IAEjB,uCAAuC;IACvC,QAAQ,CAAC,OAAO,EAAE,OAAO;IACzB,mCAAmC;IACnC,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS;;IAHpC,uCAAuC;IAC9B,OAAO,EAAE,OAAO;IACzB,mCAAmC;IAC1B,OAAO,EAAE,MAAM,GAAG,SAAS;CAE3C"}
@@ -4,7 +4,11 @@ exports.CooldownInfo = void 0;
4
4
  class CooldownInfo {
5
5
  seconds;
6
6
  message;
7
- constructor(seconds, message) {
7
+ constructor(
8
+ /** New one-time cooldown in seconds */
9
+ seconds,
10
+ /** Cooldown message to be shown */
11
+ message) {
8
12
  this.seconds = seconds;
9
13
  this.message = message;
10
14
  }
@@ -12,6 +12,6 @@ export declare class IncomingMessage {
12
12
  readonly replyToMessageId: number | undefined;
13
13
  readonly updateObject: TelegrafContextMessage;
14
14
  private detectMessageType;
15
- constructor(ctxMessage: TelegrafContextMessage, botName: string);
15
+ constructor(ctxMessage: TelegrafContextMessage, botName: string, history: IncomingMessage[]);
16
16
  }
17
17
  //# sourceMappingURL=incomingMessage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"incomingMessage.d.ts","sourceRoot":"","sources":["../../dtos/incomingMessage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAEvD,OAAO,EAEH,gBAAgB,EAChB,sBAAsB,EACzB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,qBAAa,eAAe;IACxB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,IAAI,EAAE,IAAI,GAAG,SAAS,CAAC;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAChC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;IAE9C,QAAQ,CAAC,YAAY,EAAE,sBAAsB,CAAC;IAE9C,OAAO,CAAC,iBAAiB;gBAoBb,UAAU,EAAE,sBAAsB,EAAE,OAAO,EAAE,MAAM;CA2BlE"}
1
+ {"version":3,"file":"incomingMessage.d.ts","sourceRoot":"","sources":["../../dtos/incomingMessage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAEvD,OAAO,EAEH,gBAAgB,EAChB,sBAAsB,EACzB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,qBAAa,eAAe;IACxB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,IAAI,EAAE,IAAI,GAAG,SAAS,CAAC;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAChC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;IAE9C,QAAQ,CAAC,YAAY,EAAE,sBAAsB,CAAC;IAE9C,OAAO,CAAC,iBAAiB;gBAqBrB,UAAU,EAAE,sBAAsB,EAClC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,eAAe,EAAE;CA6BjC"}
@@ -43,7 +43,7 @@ class IncomingMessage {
43
43
  return messageTypes_1.MessageType.Location;
44
44
  return messageTypes_1.MessageType.Unknown;
45
45
  }
46
- constructor(ctxMessage, botName) {
46
+ constructor(ctxMessage, botName, history) {
47
47
  this.traceId = (0, traceFactory_1.createTrace)(this, botName, (0, crypto_1.randomInt)(10000, 99999).toString());
48
48
  this.messageId = ctxMessage.message_id;
49
49
  this.replyToMessageId =
@@ -59,7 +59,7 @@ class IncomingMessage {
59
59
  : '';
60
60
  this.chatInfo = new chatInfo_1.ChatInfo(ctxMessage.chat.id, 'title' in ctxMessage.chat
61
61
  ? `${ctxMessage.chat.title} ${ctxMessage.chat.id}`
62
- : 'DM');
62
+ : 'DM', history);
63
63
  this.type = this.detectMessageType(ctxMessage);
64
64
  this.updateObject = ctxMessage;
65
65
  }
@@ -1 +1 @@
1
- {"version":3,"file":"incomingQuery.d.ts","sourceRoot":"","sources":["../../dtos/incomingQuery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,qBAAa,mBAAmB;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC;gBAGtC,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO;CAQvB"}
1
+ {"version":3,"file":"incomingQuery.d.ts","sourceRoot":"","sources":["../../dtos/incomingQuery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,qBAAa,mBAAmB;IAIxB,QAAQ,CAAC,OAAO,EAAE,MAAM;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM;IACvB,QAAQ,CAAC,OAAO,EAAE,OAAO;IAN7B,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC;gBAG7B,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO;CAIhC"}
@@ -0,0 +1,21 @@
1
+ import { MessageTypeValue, TelegrafContextMessage } from '../types/messageTypes';
2
+ export declare class MessageInfo {
3
+ /** Id of a message that triggered this action. */
4
+ readonly id: number;
5
+ /** Text of a message that triggered this action. */
6
+ readonly text: string;
7
+ /** Type of message being received */
8
+ readonly type: MessageTypeValue;
9
+ /** Message object recieved from Telegram */
10
+ readonly telegramUpdateObject: TelegrafContextMessage;
11
+ constructor(
12
+ /** Id of a message that triggered this action. */
13
+ id: number,
14
+ /** Text of a message that triggered this action. */
15
+ text: string,
16
+ /** Type of message being received */
17
+ type: MessageTypeValue,
18
+ /** Message object recieved from Telegram */
19
+ telegramUpdateObject: TelegrafContextMessage);
20
+ }
21
+ //# sourceMappingURL=messageInfo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messageInfo.d.ts","sourceRoot":"","sources":["../../dtos/messageInfo.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,gBAAgB,EAChB,sBAAsB,EACzB,MAAM,uBAAuB,CAAC;AAE/B,qBAAa,WAAW;IAEhB,kDAAkD;IAClD,QAAQ,CAAC,EAAE,EAAE,MAAM;IACnB,oDAAoD;IACpD,QAAQ,CAAC,IAAI,EAAE,MAAM;IACrB,qCAAqC;IACrC,QAAQ,CAAC,IAAI,EAAE,gBAAgB;IAC/B,4CAA4C;IAC5C,QAAQ,CAAC,oBAAoB,EAAE,sBAAsB;;IAPrD,kDAAkD;IACzC,EAAE,EAAE,MAAM;IACnB,oDAAoD;IAC3C,IAAI,EAAE,MAAM;IACrB,qCAAqC;IAC5B,IAAI,EAAE,gBAAgB;IAC/B,4CAA4C;IACnC,oBAAoB,EAAE,sBAAsB;CAE5D"}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MessageInfo = void 0;
4
+ class MessageInfo {
5
+ id;
6
+ text;
7
+ type;
8
+ telegramUpdateObject;
9
+ constructor(
10
+ /** Id of a message that triggered this action. */
11
+ id,
12
+ /** Text of a message that triggered this action. */
13
+ text,
14
+ /** Type of message being received */
15
+ type,
16
+ /** Message object recieved from Telegram */
17
+ telegramUpdateObject) {
18
+ this.id = id;
19
+ this.text = text;
20
+ this.type = type;
21
+ this.telegramUpdateObject = telegramUpdateObject;
22
+ }
23
+ }
24
+ exports.MessageInfo = MessageInfo;
@@ -0,0 +1,12 @@
1
+ export declare class UserInfo {
2
+ /** Id of a user that sent a message that triggered this action. */
3
+ readonly id: number;
4
+ /** Name of a user that sent a message that triggered this action. */
5
+ readonly name: string;
6
+ constructor(
7
+ /** Id of a user that sent a message that triggered this action. */
8
+ id: number,
9
+ /** Name of a user that sent a message that triggered this action. */
10
+ name: string);
11
+ }
12
+ //# sourceMappingURL=userInfo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"userInfo.d.ts","sourceRoot":"","sources":["../../dtos/userInfo.ts"],"names":[],"mappings":"AAAA,qBAAa,QAAQ;IAEb,mEAAmE;IACnE,QAAQ,CAAC,EAAE,EAAE,MAAM;IACnB,qEAAqE;IACrE,QAAQ,CAAC,IAAI,EAAE,MAAM;;IAHrB,mEAAmE;IAC1D,EAAE,EAAE,MAAM;IACnB,qEAAqE;IAC5D,IAAI,EAAE,MAAM;CAE5B"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UserInfo = void 0;
4
+ class UserInfo {
5
+ id;
6
+ name;
7
+ constructor(
8
+ /** Id of a user that sent a message that triggered this action. */
9
+ id,
10
+ /** Name of a user that sent a message that triggered this action. */
11
+ name) {
12
+ this.id = id;
13
+ this.name = name;
14
+ }
15
+ }
16
+ exports.UserInfo = UserInfo;
@@ -2,7 +2,7 @@ import { CommandHandler } from '../../types/handlers';
2
2
  import { CommandCondition } from '../../types/commandCondition';
3
3
  import { IActionState } from '../../types/actionState';
4
4
  import { IActionWithState, ActionKey } from '../../types/action';
5
- import { MessageContext } from '../context/messageContext';
5
+ import { MessageContextInternal } from '../context/messageContext';
6
6
  import { CommandTrigger } from '../../types/commandTrigger';
7
7
  import { Sema as Semaphore } from 'async-sema';
8
8
  import { CooldownInfo } from '../../dtos/cooldownInfo';
@@ -23,7 +23,7 @@ export declare class CommandAction<TActionState extends IActionState> implements
23
23
  readonly maxAllowedSimultaniousExecutions: number;
24
24
  lastCustomCooldown: Seconds | undefined;
25
25
  constructor(trigger: CommandTrigger | CommandTrigger[], handler: CommandHandler<TActionState>, name: string, active: boolean, cooldownInfo: CooldownInfo, chatsBlacklist: number[], allowedUsers: number[], maxAllowedSimultaniousExecutions: number, condition: CommandCondition<TActionState>, stateConstructor: () => TActionState, readmeFactory: (botName: string) => string);
26
- exec(ctx: MessageContext<TActionState>): Promise<import("../../types/response").BotResponse[]>;
26
+ exec(ctx: MessageContextInternal<TActionState>): Promise<import("../../types/response").BotResponse[]>;
27
27
  private checkIfShouldBeExecuted;
28
28
  private checkTrigger;
29
29
  }
@@ -1 +1 @@
1
- {"version":3,"file":"commandAction.d.ts","sourceRoot":"","sources":["../../../entities/actions/commandAction.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAGhE,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEjE,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAG5D,OAAO,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,YAAY,CAAC;AAE/C,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAGvD,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD,qBAAa,aAAa,CAAC,YAAY,SAAS,YAAY,CACxD,YAAW,gBAAgB,CAAC,YAAY,CAAC;IAEzC,QAAQ,CAAC,mBAAmB,yBAAgC;IAE5D,QAAQ,CAAC,QAAQ,EAAE,cAAc,EAAE,CAAC;IACpC,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC,YAAY,CAAC,CAAC;IAC/C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QA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,YAAY,EAAE,MAAM,EAAE,EACtB,gCAAgC,EAAE,MAAM,EACxC,SAAS,EAAE,gBAAgB,CAAC,YAAY,CAAC,EACzC,gBAAgB,EAAE,MAAM,YAAY,EACpC,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM;IAkBxC,IAAI,CAAC,GAAG,EAAE,sBAAsB,CAAC,YAAY,CAAC;IA8EpD,OAAO,CAAC,uBAAuB;IA0C/B,OAAO,CAAC,YAAY;CAuCvB"}
@@ -62,7 +62,7 @@ class CommandAction {
62
62
  if (!shouldExecute) {
63
63
  if (reason == 'OnCooldown' && this.cooldownInfo.message)
64
64
  return [
65
- new textMessage_1.TextMessage(this.cooldownInfo.message, ctx.chatInfo, ctx.traceId, this, new replyInfo_1.ReplyInfo(ctx.messageId))
65
+ new textMessage_1.TextMessage(this.cooldownInfo.message, ctx.chatInfo, ctx.traceId, this, new replyInfo_1.ReplyInfo(ctx.messageInfo.id))
66
66
  ];
67
67
  return noop_1.Noop.NoResponse;
68
68
  }
@@ -87,10 +87,10 @@ class CommandAction {
87
87
  const triggerCheckResult = this.checkTrigger(ctx, trigger);
88
88
  if (!triggerCheckResult.shouldExecute)
89
89
  return triggerCheckResult;
90
- if (!ctx.fromUserId)
90
+ if (!ctx.userInfo.id)
91
91
  return commandTriggerCheckResult_1.CommandTriggerCheckResult.DontTriggerAndSkipCooldown('UserIdMissing');
92
92
  const isUserAllowed = this.allowedUsers.length == 0 ||
93
- this.allowedUsers.includes(ctx.fromUserId);
93
+ this.allowedUsers.includes(ctx.userInfo.id);
94
94
  if (!isUserAllowed)
95
95
  return commandTriggerCheckResult_1.CommandTriggerCheckResult.DontTriggerAndSkipCooldown('UserForbidden');
96
96
  const lastExecutedDate = (0, moment_1.default)(state.lastExecutedDate);
@@ -104,21 +104,21 @@ class CommandAction {
104
104
  return triggerCheckResult;
105
105
  }
106
106
  checkTrigger(ctx, trigger) {
107
- if (trigger == messageTypes_1.MessageType.Any || trigger == ctx.messageType)
107
+ if (trigger == messageTypes_1.MessageType.Any || trigger == ctx.messageInfo.type)
108
108
  return commandTriggerCheckResult_1.CommandTriggerCheckResult.Trigger();
109
109
  if (typeof trigger == 'string')
110
- return ctx.messageText.toLowerCase() == trigger.toLowerCase()
110
+ return ctx.messageInfo.text.toLowerCase() == trigger.toLowerCase()
111
111
  ? commandTriggerCheckResult_1.CommandTriggerCheckResult.Trigger()
112
112
  : commandTriggerCheckResult_1.CommandTriggerCheckResult.DoNotTrigger('TriggerNotSatisfied');
113
113
  const matchResults = [];
114
114
  trigger.lastIndex = 0;
115
- const execResult = trigger.exec(ctx.messageText);
115
+ const execResult = trigger.exec(ctx.messageInfo.text);
116
116
  if (execResult != null) {
117
117
  let regexMatchLimit = 100;
118
118
  matchResults.push(execResult);
119
119
  if (trigger.global) {
120
120
  while (regexMatchLimit > 0) {
121
- const nextResult = trigger.exec(ctx.messageText);
121
+ const nextResult = trigger.exec(ctx.messageInfo.text);
122
122
  if (nextResult == null)
123
123
  break;
124
124
  matchResults.push(nextResult);
@@ -1,5 +1,5 @@
1
1
  import { ActionKey, IAction } from '../../types/action';
2
- import { InlineQueryContext } from '../context/inlineQueryContext';
2
+ import { InlineQueryContextInternal } from '../context/inlineQueryContext';
3
3
  import { InlineQueryHandler } from '../../types/handlers';
4
4
  export declare class InlineQueryAction implements IAction {
5
5
  readonly key: ActionKey;
@@ -8,6 +8,6 @@ export declare class InlineQueryAction implements IAction {
8
8
  readonly name: string;
9
9
  readonly pattern: RegExp;
10
10
  constructor(handler: InlineQueryHandler, name: string, active: boolean, pattern: RegExp);
11
- exec(ctx: InlineQueryContext): Promise<import("../../types/response").BotResponse[]>;
11
+ exec(ctx: InlineQueryContextInternal): Promise<import("../../types/response").BotResponse[]>;
12
12
  }
13
13
  //# sourceMappingURL=inlineQueryAction.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"inlineQueryAction.d.ts","sourceRoot":"","sources":["../../../entities/actions/inlineQueryAction.ts"],"names":[],"mapp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C7C"}
@@ -1,15 +1,15 @@
1
1
  import { IActionState } from '../../types/actionState';
2
2
  import { CommandTrigger } from '../../types/commandTrigger';
3
3
  import { ActionKey, IAction, IActionWithState } from '../../types/action';
4
- import { ReplyContext } from '../context/replyContext';
4
+ import { ReplyContextInternal } from '../context/replyContext';
5
5
  export declare class ReplyCaptureAction<TParentActionState extends IActionState> implements IAction {
6
6
  readonly parentMessageId: number;
7
7
  readonly key: ActionKey;
8
- readonly handler: (replyContext: ReplyContext<TParentActionState>) => Promise<void>;
8
+ readonly handler: (replyContext: ReplyContextInternal<TParentActionState>) => Promise<void>;
9
9
  readonly triggers: CommandTrigger[];
10
10
  readonly abortController: AbortController;
11
- constructor(parentMessageId: number, parentAction: IActionWithState<TParentActionState>, handler: (replyContext: ReplyContext<TParentActionState>) => Promise<void>, triggers: CommandTrigger[], abortController: AbortController);
12
- exec(ctx: ReplyContext<TParentActionState>): Promise<import("../../types/response").BotResponse[]>;
11
+ constructor(parentMessageId: number, parentAction: IActionWithState<TParentActionState>, handler: (replyContext: ReplyContextInternal<TParentActionState>) => Promise<void>, triggers: CommandTrigger[], abortController: AbortController);
12
+ exec(ctx: ReplyContextInternal<TParentActionState>): Promise<import("../../types/response").BotResponse[]>;
13
13
  private checkIfShouldBeExecuted;
14
14
  }
15
15
  //# sourceMappingURL=replyCaptureAction.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"replyCaptureAction.d.ts","sourceRoot":"","sources":["../../../entities/actions/replyCaptureAction.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,qBAAa,kBAAkB,CAAC,kBAAkB,SAAS,YAAY,CACnE,YAA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AQ,EAAE,cAAc,EAAE,CAAC;IACpC,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC;gBAGtC,eAAe,EAAE,MAAM,EACvB,YAAY,EAAE,gBAAgB,CAAC,kBAAkB,CAAC,EAClD,OAAO,EAAE,CACL,YAAY,EAAE,oBAAoB,CAAC,kBAAkB,CAAC,KACrD,OAAO,CAAC,IAAI,CAAC,EAClB,QAAQ,EAAE,cAAc,EAAE,EAC1B,eAAe,EAAE,eAAe;IAY9B,IAAI,CAAC,GAAG,EAAE,oBAAoB,CAAC,kBAAkB,CAAC;IAyBxD,OAAO,CAAC,uBAAuB;CA+ClC"}
@@ -34,22 +34,22 @@ class ReplyCaptureAction {
34
34
  checkIfShouldBeExecuted(ctx, trigger) {
35
35
  if (ctx.replyMessageId != this.parentMessageId)
36
36
  return commandTriggerCheckResult_1.CommandTriggerCheckResult.DoNotTrigger('TriggerNotSatisfied');
37
- if (trigger == ctx.messageType)
37
+ if (trigger == ctx.messageInfo.type)
38
38
  return commandTriggerCheckResult_1.CommandTriggerCheckResult.Trigger();
39
39
  if (typeof trigger == 'string')
40
- if (ctx.messageText.toLowerCase() == trigger.toLowerCase())
40
+ if (ctx.messageInfo.text.toLowerCase() == trigger.toLowerCase())
41
41
  return commandTriggerCheckResult_1.CommandTriggerCheckResult.Trigger();
42
42
  else
43
43
  return commandTriggerCheckResult_1.CommandTriggerCheckResult.DoNotTrigger('TriggerNotSatisfied');
44
44
  const matchResults = [];
45
45
  trigger.lastIndex = 0;
46
- const execResult = trigger.exec(ctx.messageText);
46
+ const execResult = trigger.exec(ctx.messageInfo.text);
47
47
  if (execResult != null) {
48
48
  let regexMatchLimit = 100;
49
49
  matchResults.push(execResult);
50
50
  if (trigger.global) {
51
51
  while (regexMatchLimit > 0) {
52
- const nextResult = trigger.exec(ctx.messageText);
52
+ const nextResult = trigger.exec(ctx.messageInfo.text);
53
53
  if (nextResult == null)
54
54
  break;
55
55
  matchResults.push(nextResult);
@@ -4,7 +4,7 @@ import { HoursOfDay } from '../../types/timeValues';
4
4
  import { IActionState } from '../../types/actionState';
5
5
  import { IActionWithState, ActionKey } from '../../types/action';
6
6
  import { CachedStateFactory } from '../cachedStateFactory';
7
- import { ChatContext } from '../context/chatContext';
7
+ import { ChatContextInternal } from '../context/chatContext';
8
8
  export declare class ScheduledAction<TActionState extends IActionState> implements IActionWithState<TActionState> {
9
9
  static readonly locks: Map<string, Semaphore>;
10
10
  readonly name: string;
@@ -17,7 +17,7 @@ export declare class ScheduledAction<TActionState extends IActionState> implemen
17
17
  readonly cachedStateFactories: Map<string, CachedStateFactory>;
18
18
  readonly handler: ScheduledHandler<TActionState>;
19
19
  constructor(name: string, handler: ScheduledHandler<TActionState>, timeinHours: HoursOfDay, active: boolean, whitelist: number[], cachedStateFactories: Map<string, CachedStateFactory>, stateConstructor: () => TActionState);
20
- exec(ctx: ChatContext<TActionState>): Promise<import("../../types/response").BotResponse[]>;
20
+ exec(ctx: ChatContextInternal<TActionState>): Promise<import("../../types/response").BotResponse[]>;
21
21
  private getCachedValue;
22
22
  private checkIfShouldBeExecuted;
23
23
  }
@@ -1 +1 @@
1
- {"version":3,"file":"scheduledAction.d.ts","sourceRoot":"","sources":["../../../entities/actions/scheduledAction.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAKrD,qBAAa,eAAe,CAAC,YAAY,SAAS,YAAY,CAC1D,YAAW,gBAAgB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E,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAK7D,qBAAa,eAAe,CAAC,YAAY,SAAS,YAAY,CAC1D,YAAW,gBAAgB,CAAC,YAAY,CAAC;IAEzC,MAAM,CAAC,QAAQ,CAAC,KAAK,yBAAgC;IAErD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,UAAU,CAAC;IACjC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,cAAc,EAAE,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,GAAG,EAAE,SAAS,CAAC;IAExB,QAAQ,CAAC,WAAW,uBAA8B;IAClD,QAAQ,CAAC,gBAAgB,EAAE,MAAM,YAAY,CAAC;IAC9C,QAAQ,CAAC,oBAAoB,EAAE,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;IAC/D,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAC,YAAY,CAAC,CAAC;gBAG7C,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,gBAAgB,CAAC,YAAY,CAAC,EACvC,WAAW,EAAE,UAAU,EACvB,MAAM,EAAE,OAAO,EACf,SAAS,EAAE,MAAM,EAAE,EACnB,oBAAoB,EAAE,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,EACrD,gBAAgB,EAAE,MAAM,YAAY;IAYlC,IAAI,CAAC,GAAG,EAAE,mBAAmB,CAAC,YAAY,CAAC;YAuCnC,cAAc;IA4C5B,OAAO,CAAC,uBAAuB;CAalC"}
@@ -6,7 +6,8 @@ import { BotResponse } from '../../types/response';
6
6
  import { IScheduler } from '../../types/scheduler';
7
7
  import { IStorageClient } from '../../types/storage';
8
8
  import { TraceId } from '../../types/trace';
9
- export declare abstract class BaseContext<TAction extends IAction> {
9
+ export type BaseContextPropertiesToOmit = 'action' | 'isInitialized' | 'storage' | 'scheduler' | 'logger' | 'responses' | 'traceId' | 'botName';
10
+ export declare abstract class BaseContextInternal<TAction extends IAction> {
10
11
  isInitialized: boolean;
11
12
  private _responses;
12
13
  action: TAction;
@@ -1 +1 @@
1
- {"version":3,"file":"baseContext.d.ts","sourceRoot":"","sources":["../../../entities/context/baseContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,8BAAsB,WAAW,CAAC,OAAO,SAAS,OAAO;IACrD,aAAa,UAAS;IACtB,OAAO,CAAC,UAAU,CAAqB;IAEvC,MAAM,EAAG,OAAO,CAAC;IAEjB,iEAAiE;IACjE,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC;IACjC,2DAA2D;IAC3D,QAAQ,CAAC,SAAS,EAAE,UAAU,CAAC;IAC/B,MAAM,EAAG,aAAa,CAAC;IACvB,sCAAsC;IACtC,OAAO,EAAG,OAAO,CAAC;IAClB,+CAA+C;IAC/C,OAAO,EAAG,MAAM,CAAC;IACjB,wBAAwB;IACxB,QAAQ,EAAG,QAAQ,CAAC;IAEpB,uDAAuD;IACvD,IAAW,SAAS,IAAI,WAAW,EAAE,CAEpC;IACD,IAAW,SAAS,CAAC,KAAK,EAAE,WAAW,EAAE,EAExC;gBAEW,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,UAAU;IAK1D;;;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AE,WAAW,EAAE,EAExC;gBAEW,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,UAAU;IAK1D;;;;OAIG;IACG,WAAW,CAAC,mBAAmB,SAAS,YAAY,EACtD,MAAM,EAAE,gBAAgB,CAAC,mBAAmB,CAAC;CAWpD"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BaseContext = void 0;
4
- class BaseContext {
3
+ exports.BaseContextInternal = void 0;
4
+ class BaseContextInternal {
5
5
  isInitialized = false;
6
6
  _responses = [];
7
7
  action;
@@ -41,4 +41,4 @@ class BaseContext {
41
41
  return Object.freeze(stateForChat);
42
42
  }
43
43
  }
44
- exports.BaseContext = BaseContext;
44
+ exports.BaseContextInternal = BaseContextInternal;
@@ -4,12 +4,13 @@ import { IActionState } from '../../types/actionState';
4
4
  import { IReplyResponse } from '../../types/response';
5
5
  import { Milliseconds } from '../../types/timeValues';
6
6
  import { ICaptureController } from '../../types/capture';
7
- import { BaseContext } from './baseContext';
7
+ import { BaseContextInternal, BaseContextPropertiesToOmit } from './baseContext';
8
8
  import { ScheduledAction } from '../actions/scheduledAction';
9
+ export type ChatContext<TActionState extends IActionState, TAction extends IActionWithState<TActionState> = ScheduledAction<TActionState>> = Omit<ChatContextInternal<TActionState, TAction>, BaseContextPropertiesToOmit>;
9
10
  /**
10
11
  * Context of action executed in chat.
11
12
  */
12
- export declare class ChatContext<TActionState extends IActionState, TAction extends IActionWithState<TActionState> = ScheduledAction<TActionState>> extends BaseContext<TAction> {
13
+ export declare class ChatContextInternal<TActionState extends IActionState, TAction extends IActionWithState<TActionState> = ScheduledAction<TActionState>> extends BaseContextInternal<TAction> {
13
14
  protected createCaptureController(response: IReplyResponse): ICaptureController;
14
15
  /**
15
16
  * Collection of actions that send something to chat as a standalone message.
@@ -1 +1 @@
1
- {"version":3,"file":"chatContext.d.ts","sourceRoot":"","sources":["../../../entities/context/chatContext.ts"],"names":[],"mappings":"AAKA,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;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAGzD,OAAO,EACH,mBAAmB,EACnB,2BAA2B,EAC9B,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7D,MAAM,MAAM,WAAW,CACnB,YAAY,SAAS,YAAY,EACjC,OAAO,SAAS,gBAAgB,CAAC,YAAY,CAAC,GAAG,eAAe,CAAC,YAAY,CAAC,IAC9E,IAAI,CACJ,mBAAmB,CAAC,YAAY,EAAE,OAAO,CAAC,EAC1C,2BAA2B,CAC9B,CAAC;AAEF;;GAEG;AACH,qBAAa,mBAAmB,CAC5B,YAAY,SAAS,YAAY,EACjC,OAAO,SAAS,gBAAgB,CAAC,YAAY,CAAC,GAAG,eAAe,CAAC,YAAY,CAAC,CAChF,SAAQ,mBAAmB,CAAC,OAAO,CAAC;IAClC,SAAS,CAAC,uBAAuB,CAC7B,QAAQ,EAAE,cAAc,GACzB,kBAAkB;IAmBrB;;OAEG;IACH,IAAI;QACA;;;;;WAKG;qBACU,MAAM,YAAY,yBAAyB;QAexD;;;;;WAKG;sBACW,MAAM,YAAY,qBAAqB;QAerD;;;;;WAKG;sBACW,MAAM,YAAY,qBAAqB;MAcvD;IAEF;;;;OAIG;IACH,YAAY,CAAC,SAAS,EAAE,MAAM;IAW9B;;;OAGG;IACH,IAAI,CAAC,KAAK,EAAE,YAAY;CAK3B"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ChatContext = void 0;
3
+ exports.ChatContextInternal = void 0;
4
4
  const path_1 = require("path");
5
5
  const imageMessage_1 = require("../../dtos/responses/imageMessage");
6
6
  const textMessage_1 = require("../../dtos/responses/textMessage");
@@ -11,7 +11,7 @@ const baseContext_1 = require("./baseContext");
11
11
  /**
12
12
  * Context of action executed in chat.
13
13
  */
14
- class ChatContext extends baseContext_1.BaseContext {
14
+ class ChatContextInternal extends baseContext_1.BaseContextInternal {
15
15
  createCaptureController(response) {
16
16
  return {
17
17
  captureReplies: (trigger, handler, abortController) => {
@@ -78,4 +78,4 @@ class ChatContext extends baseContext_1.BaseContext {
78
78
  this.responses.push(new delay_1.DelayResponse(delay, this.chatInfo, this.traceId, this.action));
79
79
  }
80
80
  }
81
- exports.ChatContext = ChatContext;
81
+ exports.ChatContextInternal = ChatContextInternal;
@@ -1,8 +1,9 @@
1
1
  import { InlineQueryResult } from 'telegraf/types';
2
2
  import { BotResponse } from '../../types/response';
3
3
  import { InlineQueryAction } from '../actions/inlineQueryAction';
4
- import { BaseContext } from './baseContext';
5
- export declare class InlineQueryContext extends BaseContext<InlineQueryAction> {
4
+ import { BaseContextInternal, BaseContextPropertiesToOmit } from './baseContext';
5
+ export type InlineQueryContext = Omit<InlineQueryContextInternal, BaseContextPropertiesToOmit | 'queryResults' | 'queryId'>;
6
+ export declare class InlineQueryContextInternal extends BaseContextInternal<InlineQueryAction> {
6
7
  queryResults: InlineQueryResult[];
7
8
  /**
8
9
  * Abort signal to be utilized in query handler.
@@ -1 +1 @@
1
- {"version":3,"file":"inlineQueryContext.d.ts","sourceRoot":"","sources":["../../../entities/context/inlineQueryContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAEjE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,qBAAa,kBAAmB,SAAQ,WAAW,CAAC,iBAAiB,CAAC;IAClE,YAAY,EAAE,iBAAiB,EAAE,CAAM;IACvC;;;OAGG;IACH,WAAW,EAAG,WAAW,CAAC;IAE1B,uDAAuD;IACvD,IAAI,SAAS,IAAI,WAAW,EAAE,CAS7B;IACD,wBAA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