chz-telegram-bot 0.5.4 → 0.6.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.
- package/README.md +41 -31
- package/dist/builtin/helpAction.d.ts +2 -0
- package/dist/builtin/helpAction.d.ts.map +1 -0
- package/dist/builtin/helpAction.js +14 -0
- package/dist/dtos/chatHistoryMessage.d.ts +35 -0
- package/dist/dtos/chatHistoryMessage.d.ts.map +1 -0
- package/dist/dtos/chatHistoryMessage.js +32 -0
- package/dist/dtos/chatInfo.d.ts +17 -0
- package/dist/dtos/chatInfo.d.ts.map +1 -0
- package/dist/dtos/chatInfo.js +16 -0
- package/dist/dtos/commandTriggerCheckResult.d.ts +24 -0
- package/dist/dtos/commandTriggerCheckResult.d.ts.map +1 -0
- package/dist/dtos/commandTriggerCheckResult.js +34 -0
- package/dist/dtos/cooldownInfo.d.ts +13 -0
- package/dist/dtos/cooldownInfo.d.ts.map +1 -0
- package/dist/dtos/cooldownInfo.js +12 -0
- package/dist/dtos/incomingMessage.d.ts +19 -0
- package/dist/dtos/incomingMessage.d.ts.map +1 -0
- package/dist/dtos/incomingMessage.js +63 -0
- package/dist/dtos/incomingQuery.d.ts +10 -0
- package/dist/dtos/incomingQuery.d.ts.map +1 -0
- package/dist/dtos/incomingQuery.js +14 -0
- package/dist/dtos/messageInfo.d.ts +22 -0
- package/dist/dtos/messageInfo.d.ts.map +1 -0
- package/dist/dtos/messageInfo.js +20 -0
- package/dist/dtos/propertyProviderSets.d.ts +16 -0
- package/dist/dtos/propertyProviderSets.d.ts.map +1 -0
- package/dist/dtos/propertyProviderSets.js +1 -0
- package/dist/dtos/replyInfo.d.ts +6 -0
- package/dist/dtos/replyInfo.d.ts.map +1 -0
- package/dist/dtos/replyInfo.js +8 -0
- package/dist/dtos/responses/delay.d.ts +16 -0
- package/dist/dtos/responses/delay.d.ts.map +1 -0
- package/dist/dtos/responses/delay.js +15 -0
- package/dist/dtos/responses/imageMessage.d.ts +22 -0
- package/dist/dtos/responses/imageMessage.d.ts.map +1 -0
- package/dist/dtos/responses/imageMessage.js +21 -0
- package/dist/dtos/responses/inlineQueryResponse.d.ts +13 -0
- package/dist/dtos/responses/inlineQueryResponse.d.ts.map +1 -0
- package/dist/dtos/responses/inlineQueryResponse.js +15 -0
- package/dist/dtos/responses/reaction.d.ts +16 -0
- package/dist/dtos/responses/reaction.d.ts.map +1 -0
- package/dist/dtos/responses/reaction.js +17 -0
- package/dist/dtos/responses/textMessage.d.ts +23 -0
- package/dist/dtos/responses/textMessage.d.ts.map +1 -0
- package/dist/dtos/responses/textMessage.js +24 -0
- package/dist/dtos/responses/unpin.d.ts +15 -0
- package/dist/dtos/responses/unpin.d.ts.map +1 -0
- package/dist/dtos/responses/unpin.js +15 -0
- package/dist/dtos/responses/videoMessage.d.ts +22 -0
- package/dist/dtos/responses/videoMessage.d.ts.map +1 -0
- package/dist/dtos/responses/videoMessage.js +21 -0
- package/dist/dtos/userInfo.d.ts +12 -0
- package/dist/dtos/userInfo.d.ts.map +1 -0
- package/dist/dtos/userInfo.js +12 -0
- package/dist/entities/actions/commandAction.d.ts +31 -0
- package/dist/entities/actions/commandAction.d.ts.map +1 -0
- package/dist/entities/actions/commandAction.js +149 -0
- package/dist/entities/actions/inlineQueryAction.d.ts +14 -0
- package/dist/entities/actions/inlineQueryAction.d.ts.map +1 -0
- package/dist/entities/actions/inlineQueryAction.js +51 -0
- package/dist/entities/actions/replyCaptureAction.d.ts +15 -0
- package/dist/entities/actions/replyCaptureAction.d.ts.map +1 -0
- package/dist/entities/actions/replyCaptureAction.js +66 -0
- package/dist/entities/actions/scheduledAction.d.ts +24 -0
- package/dist/entities/actions/scheduledAction.d.ts.map +1 -0
- package/dist/entities/actions/scheduledAction.js +92 -0
- package/dist/entities/botInstance.d.ts +36 -0
- package/dist/entities/botInstance.d.ts.map +1 -0
- package/dist/entities/botInstance.js +39 -0
- package/dist/entities/cachedStateFactory.d.ts +7 -0
- package/dist/entities/cachedStateFactory.d.ts.map +1 -0
- package/dist/entities/cachedStateFactory.js +8 -0
- package/dist/entities/context/baseContext.d.ts +39 -0
- package/dist/entities/context/baseContext.d.ts.map +1 -0
- package/dist/entities/context/baseContext.js +56 -0
- package/dist/entities/context/chatContext.d.ts +50 -0
- package/dist/entities/context/chatContext.d.ts.map +1 -0
- package/dist/entities/context/chatContext.js +65 -0
- package/dist/entities/context/inlineQueryContext.d.ts +27 -0
- package/dist/entities/context/inlineQueryContext.d.ts.map +1 -0
- package/dist/entities/context/inlineQueryContext.js +29 -0
- package/dist/entities/context/messageContext.d.ts +92 -0
- package/dist/entities/context/messageContext.d.ts.map +1 -0
- package/dist/entities/context/messageContext.js +116 -0
- package/dist/entities/context/replyContext.d.ts +89 -0
- package/dist/entities/context/replyContext.d.ts.map +1 -0
- package/dist/entities/context/replyContext.js +124 -0
- package/dist/entities/states/actionStateBase.d.ts +6 -0
- package/dist/entities/states/actionStateBase.d.ts.map +1 -0
- package/dist/entities/states/actionStateBase.js +4 -0
- package/dist/entities/taskRecord.d.ts +8 -0
- package/dist/entities/taskRecord.d.ts.map +1 -0
- package/dist/entities/taskRecord.js +10 -0
- package/dist/eslint.config.d.ts +3 -0
- package/dist/eslint.config.d.ts.map +1 -0
- package/dist/eslint.config.js +51 -0
- package/dist/helpers/builders/commandActionBuilder.d.ts +100 -0
- package/dist/helpers/builders/commandActionBuilder.d.ts.map +1 -0
- package/dist/helpers/builders/commandActionBuilder.js +146 -0
- package/dist/helpers/builders/inlineQueryActionBuilder.d.ts +37 -0
- package/dist/helpers/builders/inlineQueryActionBuilder.d.ts.map +1 -0
- package/dist/helpers/builders/inlineQueryActionBuilder.js +50 -0
- package/dist/helpers/builders/scheduledActionBuilder.d.ts +68 -0
- package/dist/helpers/builders/scheduledActionBuilder.d.ts.map +1 -0
- package/dist/helpers/builders/scheduledActionBuilder.js +95 -0
- package/dist/helpers/mapUtils.d.ts +10 -0
- package/dist/helpers/mapUtils.d.ts.map +1 -0
- package/dist/helpers/mapUtils.js +13 -0
- package/dist/helpers/noop.d.ts +9 -0
- package/dist/helpers/noop.d.ts.map +1 -0
- package/dist/helpers/noop.js +17 -0
- package/dist/helpers/objectFromEntries.d.ts +2 -0
- package/dist/helpers/objectFromEntries.d.ts.map +1 -0
- package/dist/helpers/objectFromEntries.js +3 -0
- package/dist/helpers/timeConvertions.d.ts +5 -0
- package/dist/helpers/timeConvertions.d.ts.map +1 -0
- package/dist/helpers/timeConvertions.js +9 -0
- package/dist/helpers/toArray.d.ts +2 -0
- package/dist/helpers/toArray.d.ts.map +1 -0
- package/dist/helpers/toArray.js +3 -0
- package/dist/helpers/traceFactory.d.ts +3 -0
- package/dist/helpers/traceFactory.d.ts.map +1 -0
- package/dist/helpers/traceFactory.js +3 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +20 -0
- package/dist/main.d.ts +49 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +33 -0
- package/dist/services/actionProcessingService.d.ts +25 -0
- package/dist/services/actionProcessingService.d.ts.map +1 -0
- package/dist/services/actionProcessingService.js +50 -0
- package/dist/services/actionProcessors/baseProcessor.d.ts +18 -0
- package/dist/services/actionProcessors/baseProcessor.d.ts.map +1 -0
- package/dist/services/actionProcessors/baseProcessor.js +33 -0
- package/dist/services/actionProcessors/commandActionProcessor.d.ts +19 -0
- package/dist/services/actionProcessors/commandActionProcessor.d.ts.map +1 -0
- package/dist/services/actionProcessors/commandActionProcessor.js +130 -0
- package/dist/services/actionProcessors/inlineQueryActionProcessor.d.ts +11 -0
- package/dist/services/actionProcessors/inlineQueryActionProcessor.d.ts.map +1 -0
- package/dist/services/actionProcessors/inlineQueryActionProcessor.js +69 -0
- package/dist/services/actionProcessors/scheduledActionProcessor.d.ts +17 -0
- package/dist/services/actionProcessors/scheduledActionProcessor.d.ts.map +1 -0
- package/dist/services/actionProcessors/scheduledActionProcessor.js +55 -0
- package/dist/services/jsonFileStorage.d.ts +25 -0
- package/dist/services/jsonFileStorage.d.ts.map +1 -0
- package/dist/services/jsonFileStorage.js +133 -0
- package/dist/services/nodeTimeoutScheduler.d.ts +13 -0
- package/dist/services/nodeTimeoutScheduler.d.ts.map +1 -0
- package/dist/services/nodeTimeoutScheduler.js +50 -0
- package/dist/services/responseProcessingQueue.d.ts +12 -0
- package/dist/services/responseProcessingQueue.d.ts.map +1 -0
- package/dist/services/responseProcessingQueue.js +37 -0
- package/dist/services/telegramApi.d.ts +23 -0
- package/dist/services/telegramApi.d.ts.map +1 -0
- package/dist/services/telegramApi.js +163 -0
- package/dist/types/action.d.ts +14 -0
- package/dist/types/action.d.ts.map +1 -0
- package/dist/types/action.js +1 -0
- package/dist/types/actionState.d.ts +5 -0
- package/dist/types/actionState.d.ts.map +1 -0
- package/dist/types/actionState.js +1 -0
- package/dist/types/cachedValueAccessor.d.ts +2 -0
- package/dist/types/cachedValueAccessor.d.ts.map +1 -0
- package/dist/types/cachedValueAccessor.js +1 -0
- package/dist/types/capture.d.ts +24 -0
- package/dist/types/capture.d.ts.map +1 -0
- package/dist/types/capture.js +1 -0
- package/dist/types/commandCondition.d.ts +8 -0
- package/dist/types/commandCondition.d.ts.map +1 -0
- package/dist/types/commandCondition.js +1 -0
- package/dist/types/commandTrigger.d.ts +2 -0
- package/dist/types/commandTrigger.d.ts.map +1 -0
- package/dist/types/commandTrigger.js +1 -0
- package/dist/types/events.d.ts +193 -0
- package/dist/types/events.d.ts.map +1 -0
- package/dist/types/events.js +69 -0
- package/dist/types/externalAliases.d.ts +11 -0
- package/dist/types/externalAliases.d.ts.map +1 -0
- package/dist/types/externalAliases.js +1 -0
- package/dist/types/handlers.d.ts +21 -0
- package/dist/types/handlers.d.ts.map +1 -0
- package/dist/types/handlers.js +1 -0
- package/dist/types/inputFile.d.ts +5 -0
- package/dist/types/inputFile.d.ts.map +1 -0
- package/dist/types/inputFile.js +1 -0
- package/dist/types/logger.d.ts +1 -0
- package/dist/types/logger.d.ts.map +1 -0
- package/dist/types/logger.js +1 -0
- package/dist/types/messageSendingOptions.d.ts +9 -0
- package/dist/types/messageSendingOptions.d.ts.map +1 -0
- package/dist/types/messageSendingOptions.js +1 -0
- package/dist/types/messageTypes.d.ts +20 -0
- package/dist/types/messageTypes.d.ts.map +1 -0
- package/dist/types/messageTypes.js +18 -0
- package/dist/types/propertyProvider.d.ts +8 -0
- package/dist/types/propertyProvider.d.ts.map +1 -0
- package/dist/types/propertyProvider.js +1 -0
- package/dist/types/response.d.ts +39 -0
- package/dist/types/response.d.ts.map +1 -0
- package/dist/types/response.js +9 -0
- package/dist/types/scheduler.d.ts +7 -0
- package/dist/types/scheduler.d.ts.map +1 -0
- package/dist/types/scheduler.js +1 -0
- package/dist/types/storage.d.ts +11 -0
- package/dist/types/storage.d.ts.map +1 -0
- package/dist/types/storage.js +1 -0
- package/dist/types/timeValues.d.ts +15 -0
- package/dist/types/timeValues.d.ts.map +1 -0
- package/dist/types/timeValues.js +1 -0
- package/dist/types/trace.d.ts +6 -0
- package/dist/types/trace.d.ts.map +1 -0
- package/dist/types/trace.js +1 -0
- package/entities/actions/commandAction.ts +11 -3
- package/entities/actions/inlineQueryAction.ts +9 -1
- package/entities/actions/replyCaptureAction.ts +9 -3
- package/entities/actions/scheduledAction.ts +31 -10
- package/entities/botInstance.ts +18 -25
- package/entities/context/baseContext.ts +9 -4
- package/index.ts +1 -1
- package/main.ts +1 -10
- package/package.json +38 -38
- package/services/actionProcessingService.ts +11 -15
- package/services/actionProcessors/baseProcessor.ts +9 -9
- package/services/actionProcessors/commandActionProcessor.ts +35 -46
- package/services/actionProcessors/inlineQueryActionProcessor.ts +24 -20
- package/services/actionProcessors/scheduledActionProcessor.ts +5 -10
- package/services/jsonFileStorage.ts +27 -1
- package/services/nodeTimeoutScheduler.ts +22 -22
- package/services/telegramApi.ts +53 -23
- package/types/events.ts +285 -0
- package/services/jsonLogger.ts +0 -112
- package/types/logger.ts +0 -39
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { resolve } from 'path';
|
|
2
|
+
import { ImageMessage } from '../../dtos/responses/imageMessage';
|
|
3
|
+
import { Reaction } from '../../dtos/responses/reaction';
|
|
4
|
+
import { TextMessage } from '../../dtos/responses/textMessage';
|
|
5
|
+
import { VideoMessage } from '../../dtos/responses/videoMessage';
|
|
6
|
+
import { ChatContextInternal } from './chatContext';
|
|
7
|
+
import { ReplyInfo } from '../../dtos/replyInfo';
|
|
8
|
+
/**
|
|
9
|
+
* Context of action executed in chat, in response to a message
|
|
10
|
+
*/
|
|
11
|
+
export class MessageContextInternal extends ChatContextInternal {
|
|
12
|
+
/** Information about the user that triggered this action */
|
|
13
|
+
userInfo;
|
|
14
|
+
/** Information about the message that triggered this action */
|
|
15
|
+
messageInfo;
|
|
16
|
+
/** Collection of Regexp match results on a message that triggered this action. Will be empty if trigger is not a Regexp. */
|
|
17
|
+
matchResults = [];
|
|
18
|
+
/** Indicates if cooldown should be started after action is executed. Set to `true` by default. */
|
|
19
|
+
startCooldown = true;
|
|
20
|
+
/** Bot info from Telegram */
|
|
21
|
+
botInfo;
|
|
22
|
+
customCooldown;
|
|
23
|
+
getQuotePart(quote) {
|
|
24
|
+
if (typeof quote != 'boolean')
|
|
25
|
+
return quote;
|
|
26
|
+
return this.matchResults.length == 0
|
|
27
|
+
? this.messageInfo.text
|
|
28
|
+
: this.matchResults[0][1];
|
|
29
|
+
}
|
|
30
|
+
replyWithText(text, quote, options) {
|
|
31
|
+
const quotedPart = this.getQuotePart(quote);
|
|
32
|
+
const response = new TextMessage(text, this.chatInfo, this.traceId, this.action, new ReplyInfo(this.messageInfo.id, quote ? quotedPart : undefined), options);
|
|
33
|
+
this.responses.push(response);
|
|
34
|
+
return this.createCaptureController(response);
|
|
35
|
+
}
|
|
36
|
+
replyWithImage(name, quote, options) {
|
|
37
|
+
const quotedPart = this.getQuotePart(quote);
|
|
38
|
+
const response = new ImageMessage({ source: resolve(`./content/${name}.png`) }, this.chatInfo, this.traceId, this.action, new ReplyInfo(this.messageInfo.id, quote ? quotedPart : undefined), options);
|
|
39
|
+
this.responses.push(response);
|
|
40
|
+
return this.createCaptureController(response);
|
|
41
|
+
}
|
|
42
|
+
replyWithVideo(name, quote, options) {
|
|
43
|
+
const quotedPart = this.getQuotePart(quote);
|
|
44
|
+
const response = new VideoMessage({ source: resolve(`./content/${name}.mp4`) }, this.chatInfo, this.traceId, this.action, new ReplyInfo(this.messageInfo.id, quote ? quotedPart : undefined), options);
|
|
45
|
+
this.responses.push(response);
|
|
46
|
+
return this.createCaptureController(response);
|
|
47
|
+
}
|
|
48
|
+
skipCooldown() {
|
|
49
|
+
this.startCooldown = false;
|
|
50
|
+
}
|
|
51
|
+
startCustomCooldown(customCooldown) {
|
|
52
|
+
this.startCooldown = true;
|
|
53
|
+
this.customCooldown = customCooldown;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Collection of actions that can be done as a reply to a message that triggered this action
|
|
57
|
+
*/
|
|
58
|
+
reply = {
|
|
59
|
+
/**
|
|
60
|
+
* Collection of actions that can be done as a reply to a message, quoting the part that triggered this action
|
|
61
|
+
* If regex is matched, first match will be quoted
|
|
62
|
+
*/
|
|
63
|
+
andQuote: {
|
|
64
|
+
/**
|
|
65
|
+
* Reply with text message to message that triggered this action after action execution is finished.
|
|
66
|
+
* If multiple responses are sent, they will be sent in the order they were added, with delay of at least 35ms as per Telegram rate-limit.
|
|
67
|
+
* @param text Message contents.
|
|
68
|
+
* @param options Message sending option.
|
|
69
|
+
*/
|
|
70
|
+
withText: (text, quote, options) => this.replyWithText(text, quote ?? true, options),
|
|
71
|
+
/**
|
|
72
|
+
* Reply with image message to message that triggered this action after action execution is finished.
|
|
73
|
+
* If multiple responses are sent, they will be sent in the order they were added, with delay of at least 35ms as per Telegram rate-limit.
|
|
74
|
+
* @param text Message contents.
|
|
75
|
+
* @param options Message sending option.
|
|
76
|
+
*/
|
|
77
|
+
withImage: (name, quote, options) => this.replyWithImage(name, quote ?? true, options),
|
|
78
|
+
/**
|
|
79
|
+
* Reply with video/gif message to message that triggered this action after action execution is finished.
|
|
80
|
+
* If multiple responses are sent, they will be sent in the order they were added, with delay of at least 35ms as per Telegram rate-limit.
|
|
81
|
+
* @param text Message contents.
|
|
82
|
+
* @param options Message sending option.
|
|
83
|
+
*/
|
|
84
|
+
withVideo: (name, quote, options) => this.replyWithVideo(name, quote ?? true, options)
|
|
85
|
+
},
|
|
86
|
+
/**
|
|
87
|
+
* Reply with text message to message that triggered this action after action execution is finished.
|
|
88
|
+
* If multiple responses are sent, they will be sent in the order they were added, with delay of at least 35ms as per Telegram rate-limit.
|
|
89
|
+
* @param text Message contents.
|
|
90
|
+
* @param options Message sending option.
|
|
91
|
+
*/
|
|
92
|
+
withText: (text, options) => this.replyWithText(text, false, options),
|
|
93
|
+
/**
|
|
94
|
+
* Reply with image message to message that triggered this action after action execution is finished.
|
|
95
|
+
* If multiple responses are sent, they will be sent in the order they were added, with delay of at least 35ms as per Telegram rate-limit.
|
|
96
|
+
* @param text Message contents.
|
|
97
|
+
* @param options Message sending option.
|
|
98
|
+
*/
|
|
99
|
+
withImage: (name, options) => this.replyWithImage(name, false, options),
|
|
100
|
+
/**
|
|
101
|
+
* Reply with video/gif message to message that triggered this action after action execution is finished.
|
|
102
|
+
* If multiple responses are sent, they will be sent in the order they were added, with delay of at least 35ms as per Telegram rate-limit.
|
|
103
|
+
* @param text Message contents.
|
|
104
|
+
* @param options Message sending option.
|
|
105
|
+
*/
|
|
106
|
+
withVideo: (name, options) => this.replyWithVideo(name, false, options),
|
|
107
|
+
/**
|
|
108
|
+
* React to the message that triggered this action after action execution is finished.
|
|
109
|
+
* If multiple responses are sent, they will be sent in the order they were added, with delay of at least 35ms as per Telegram rate-limit.
|
|
110
|
+
* @param emoji Telegram emoji to react with.
|
|
111
|
+
*/
|
|
112
|
+
withReaction: (emoji) => {
|
|
113
|
+
this.responses.push(new Reaction(this.traceId, this.chatInfo, this.messageInfo.id, emoji, this.action));
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { IActionState } from '../../types/actionState';
|
|
2
|
+
import { TextMessageSendingOptions, MessageSendingOptions } from '../../types/messageSendingOptions';
|
|
3
|
+
import { ReplyCaptureAction } from '../actions/replyCaptureAction';
|
|
4
|
+
import { BaseContextInternal, BaseContextPropertiesToOmit } from './baseContext';
|
|
5
|
+
import { UserInfo } from '../../dtos/userInfo';
|
|
6
|
+
import { MessageInfo } from '../../dtos/messageInfo';
|
|
7
|
+
import { TelegramUser, TelegramEmoji } from '../../types/externalAliases';
|
|
8
|
+
export type ReplyContext<TActionState extends IActionState> = Omit<ReplyContextInternal<TActionState>, BaseContextPropertiesToOmit | 'messageId' | 'startCooldown' | 'customCooldown'>;
|
|
9
|
+
export declare class ReplyContextInternal<TParentActionState extends IActionState> extends BaseContextInternal<ReplyCaptureAction<TParentActionState>> {
|
|
10
|
+
/** Collection of Regexp match results on a message that triggered this action. Will be empty if trigger is not a Regexp. */
|
|
11
|
+
matchResults: RegExpExecArray[];
|
|
12
|
+
/** Id of a message that triggered this action. */
|
|
13
|
+
replyMessageId: number | undefined;
|
|
14
|
+
/** Information about the user that triggered this action */
|
|
15
|
+
userInfo: UserInfo;
|
|
16
|
+
/** Information about the message that triggered this action */
|
|
17
|
+
messageInfo: MessageInfo;
|
|
18
|
+
/** Bot info from Telegram */
|
|
19
|
+
botInfo: TelegramUser;
|
|
20
|
+
isInitialized: boolean;
|
|
21
|
+
private getQuotePart;
|
|
22
|
+
private replyWithText;
|
|
23
|
+
private replyWithImage;
|
|
24
|
+
private replyWithVideo;
|
|
25
|
+
/**
|
|
26
|
+
* Stops capturing replies and removes this action
|
|
27
|
+
*/
|
|
28
|
+
stopCapture(): void;
|
|
29
|
+
/**
|
|
30
|
+
* Collection of actions that can be done as a reply to a message that triggered this action
|
|
31
|
+
*/
|
|
32
|
+
reply: {
|
|
33
|
+
/**
|
|
34
|
+
* Collection of actions that can be done as a reply to a message, quoting the part that triggered this action
|
|
35
|
+
* If regex is matched, first match will be quoted
|
|
36
|
+
*/
|
|
37
|
+
andQuote: {
|
|
38
|
+
/**
|
|
39
|
+
* Reply with text message to message that triggered this action after action execution is finished.
|
|
40
|
+
* If multiple responses are sent, they will be sent in the order they were added, with delay of at least 35ms as per Telegram rate-limit.
|
|
41
|
+
* @param text Message contents.
|
|
42
|
+
* @param options Message sending option.
|
|
43
|
+
*/
|
|
44
|
+
withText: (text: string, quote?: string, options?: TextMessageSendingOptions) => import("../..").ICaptureController;
|
|
45
|
+
/**
|
|
46
|
+
* Reply with image message to message that triggered this action after action execution is finished.
|
|
47
|
+
* If multiple responses are sent, they will be sent in the order they were added, with delay of at least 35ms as per Telegram rate-limit.
|
|
48
|
+
* @param text Message contents.
|
|
49
|
+
* @param options Message sending option.
|
|
50
|
+
*/
|
|
51
|
+
withImage: (name: string, quote?: string, options?: MessageSendingOptions) => import("../..").ICaptureController;
|
|
52
|
+
/**
|
|
53
|
+
* Reply with video/gif message to message that triggered this action after action execution is finished.
|
|
54
|
+
* If multiple responses are sent, they will be sent in the order they were added, with delay of at least 35ms as per Telegram rate-limit.
|
|
55
|
+
* @param text Message contents.
|
|
56
|
+
* @param options Message sending option.
|
|
57
|
+
*/
|
|
58
|
+
withVideo: (name: string, quote?: string, options?: MessageSendingOptions) => import("../..").ICaptureController;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Reply with text message to message that triggered this action after action execution is finished.
|
|
62
|
+
* If multiple responses are sent, they will be sent in the order they were added, with delay of at least 35ms as per Telegram rate-limit.
|
|
63
|
+
* @param text Message contents.
|
|
64
|
+
* @param options Message sending option.
|
|
65
|
+
*/
|
|
66
|
+
withText: (text: string, options?: TextMessageSendingOptions) => import("../..").ICaptureController;
|
|
67
|
+
/**
|
|
68
|
+
* Reply with image message to message that triggered this action after action execution is finished.
|
|
69
|
+
* If multiple responses are sent, they will be sent in the order they were added, with delay of at least 35ms as per Telegram rate-limit.
|
|
70
|
+
* @param text Message contents.
|
|
71
|
+
* @param options Message sending option.
|
|
72
|
+
*/
|
|
73
|
+
withImage: (name: string, options?: MessageSendingOptions) => import("../..").ICaptureController;
|
|
74
|
+
/**
|
|
75
|
+
* Reply with video/gif message to message that triggered this action after action execution is finished.
|
|
76
|
+
* If multiple responses are sent, they will be sent in the order they were added, with delay of at least 35ms as per Telegram rate-limit.
|
|
77
|
+
* @param text Message contents.
|
|
78
|
+
* @param options Message sending option.
|
|
79
|
+
*/
|
|
80
|
+
withVideo: (name: string, options?: MessageSendingOptions) => import("../..").ICaptureController;
|
|
81
|
+
/**
|
|
82
|
+
* React to the message that triggered this action after action execution is finished.
|
|
83
|
+
* If multiple responses are sent, they will be sent in the order they were added, with delay of at least 35ms as per Telegram rate-limit.
|
|
84
|
+
* @param emoji Telegram emoji to react with.
|
|
85
|
+
*/
|
|
86
|
+
withReaction: (emoji: TelegramEmoji) => void;
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=replyContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"replyContext.d.ts","sourceRoot":"","sources":["../../../entities/context/replyContext.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EACH,yBAAyB,EACzB,qBAAqB,EACxB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAEnE,OAAO,EACH,mBAAmB,EACnB,2BAA2B,EAC9B,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE1E,MAAM,MAAM,YAAY,CAAC,YAAY,SAAS,YAAY,IAAI,IAAI,CAC9D,oBAAoB,CAAC,YAAY,CAAC,EAChC,2BAA2B,GAC3B,WAAW,GACX,eAAe,GACf,gBAAgB,CACrB,CAAC;AAEF,qBAAa,oBAAoB,CAC7B,kBAAkB,SAAS,YAAY,CACzC,SAAQ,mBAAmB,CAAC,kBAAkB,CAAC,kBAAkB,CAAC,CAAC;IACjE,4HAA4H;IAC5H,YAAY,EAAG,eAAe,EAAE,CAAC;IACjC,kDAAkD;IAClD,cAAc,EAAG,MAAM,GAAG,SAAS,CAAC;IACpC,4DAA4D;IAC5D,QAAQ,EAAG,QAAQ,CAAC;IACpB,+DAA+D;IAC/D,WAAW,EAAG,WAAW,CAAC;IAC1B,6BAA6B;IAC7B,OAAO,EAAG,YAAY,CAAC;IAEvB,aAAa,UAAS;IAEtB,OAAO,CAAC,YAAY;IAQpB,OAAO,CAAC,aAAa;IAqBrB,OAAO,CAAC,cAAc;IAqBtB,OAAO,CAAC,cAAc;IAqBtB;;OAEG;IACH,WAAW;IAIX;;OAEG;IACH,KAAK;QACD;;;WAGG;;YAEC;;;;;eAKG;6BAEO,MAAM,UACJ,MAAM,YACJ,yBAAyB;YAIvC;;;;;eAKG;8BAEO,MAAM,UACJ,MAAM,YACJ,qBAAqB;YAKnC;;;;;eAKG;8BAEO,MAAM,UACJ,MAAM,YACJ,qBAAqB;;QAMvC;;;;;WAKG;yBACc,MAAM,YAAY,yBAAyB;QAG5D;;;;;WAKG;0BACe,MAAM,YAAY,qBAAqB;QAIzD;;;;;WAKG;0BACe,MAAM,YAAY,qBAAqB;QAIzD;;;;WAIG;8BACmB,aAAa;MAWrC;CACL"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { ReplyInfo } from '../../dtos/replyInfo';
|
|
2
|
+
import { ImageMessage } from '../../dtos/responses/imageMessage';
|
|
3
|
+
import { Reaction } from '../../dtos/responses/reaction';
|
|
4
|
+
import { TextMessage } from '../../dtos/responses/textMessage';
|
|
5
|
+
import { VideoMessage } from '../../dtos/responses/videoMessage';
|
|
6
|
+
import { resolve } from 'path';
|
|
7
|
+
import { BaseContextInternal } from './baseContext';
|
|
8
|
+
export class ReplyContextInternal extends BaseContextInternal {
|
|
9
|
+
/** Collection of Regexp match results on a message that triggered this action. Will be empty if trigger is not a Regexp. */
|
|
10
|
+
matchResults;
|
|
11
|
+
/** Id of a message that triggered this action. */
|
|
12
|
+
replyMessageId;
|
|
13
|
+
/** Information about the user that triggered this action */
|
|
14
|
+
userInfo;
|
|
15
|
+
/** Information about the message that triggered this action */
|
|
16
|
+
messageInfo;
|
|
17
|
+
/** Bot info from Telegram */
|
|
18
|
+
botInfo;
|
|
19
|
+
isInitialized = false;
|
|
20
|
+
getQuotePart(quote) {
|
|
21
|
+
if (typeof quote != 'boolean')
|
|
22
|
+
return quote;
|
|
23
|
+
return this.matchResults.length == 0
|
|
24
|
+
? this.messageInfo.text
|
|
25
|
+
: this.matchResults[0][1];
|
|
26
|
+
}
|
|
27
|
+
replyWithText(text, quote, options) {
|
|
28
|
+
const quotedPart = this.getQuotePart(quote);
|
|
29
|
+
const response = new TextMessage(text, this.chatInfo, this.traceId, this.action, new ReplyInfo(this.messageInfo.id, quote ? quotedPart : undefined), options);
|
|
30
|
+
this.responses.push(response);
|
|
31
|
+
return this.createCaptureController(response);
|
|
32
|
+
}
|
|
33
|
+
replyWithImage(name, quote, options) {
|
|
34
|
+
const quotedPart = this.getQuotePart(quote);
|
|
35
|
+
const response = new ImageMessage({ source: resolve(`./content/${name}.png`) }, this.chatInfo, this.traceId, this.action, new ReplyInfo(this.messageInfo.id, quote ? quotedPart : undefined), options);
|
|
36
|
+
this.responses.push(response);
|
|
37
|
+
return this.createCaptureController(response);
|
|
38
|
+
}
|
|
39
|
+
replyWithVideo(name, quote, options) {
|
|
40
|
+
const quotedPart = this.getQuotePart(quote);
|
|
41
|
+
const response = new VideoMessage({ source: resolve(`./content/${name}.mp4`) }, this.chatInfo, this.traceId, this.action, new ReplyInfo(this.messageInfo.id, quote ? quotedPart : undefined), options);
|
|
42
|
+
this.responses.push(response);
|
|
43
|
+
return this.createCaptureController(response);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Stops capturing replies and removes this action
|
|
47
|
+
*/
|
|
48
|
+
stopCapture() {
|
|
49
|
+
this.action.abortController.abort();
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Collection of actions that can be done as a reply to a message that triggered this action
|
|
53
|
+
*/
|
|
54
|
+
reply = {
|
|
55
|
+
/**
|
|
56
|
+
* Collection of actions that can be done as a reply to a message, quoting the part that triggered this action
|
|
57
|
+
* If regex is matched, first match will be quoted
|
|
58
|
+
*/
|
|
59
|
+
andQuote: {
|
|
60
|
+
/**
|
|
61
|
+
* Reply with text message to message that triggered this action after action execution is finished.
|
|
62
|
+
* If multiple responses are sent, they will be sent in the order they were added, with delay of at least 35ms as per Telegram rate-limit.
|
|
63
|
+
* @param text Message contents.
|
|
64
|
+
* @param options Message sending option.
|
|
65
|
+
*/
|
|
66
|
+
withText: (text, quote, options) => {
|
|
67
|
+
return this.replyWithText(text, quote ?? true, options);
|
|
68
|
+
},
|
|
69
|
+
/**
|
|
70
|
+
* Reply with image message to message that triggered this action after action execution is finished.
|
|
71
|
+
* If multiple responses are sent, they will be sent in the order they were added, with delay of at least 35ms as per Telegram rate-limit.
|
|
72
|
+
* @param text Message contents.
|
|
73
|
+
* @param options Message sending option.
|
|
74
|
+
*/
|
|
75
|
+
withImage: (name, quote, options) => {
|
|
76
|
+
return this.replyWithImage(name, quote ?? true, options);
|
|
77
|
+
},
|
|
78
|
+
/**
|
|
79
|
+
* Reply with video/gif message to message that triggered this action after action execution is finished.
|
|
80
|
+
* If multiple responses are sent, they will be sent in the order they were added, with delay of at least 35ms as per Telegram rate-limit.
|
|
81
|
+
* @param text Message contents.
|
|
82
|
+
* @param options Message sending option.
|
|
83
|
+
*/
|
|
84
|
+
withVideo: (name, quote, options) => {
|
|
85
|
+
return this.replyWithVideo(name, quote ?? true, options);
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
/**
|
|
89
|
+
* Reply with text message to message that triggered this action after action execution is finished.
|
|
90
|
+
* If multiple responses are sent, they will be sent in the order they were added, with delay of at least 35ms as per Telegram rate-limit.
|
|
91
|
+
* @param text Message contents.
|
|
92
|
+
* @param options Message sending option.
|
|
93
|
+
*/
|
|
94
|
+
withText: (text, options) => {
|
|
95
|
+
return this.replyWithText(text, false, options);
|
|
96
|
+
},
|
|
97
|
+
/**
|
|
98
|
+
* Reply with image message to message that triggered this action after action execution is finished.
|
|
99
|
+
* If multiple responses are sent, they will be sent in the order they were added, with delay of at least 35ms as per Telegram rate-limit.
|
|
100
|
+
* @param text Message contents.
|
|
101
|
+
* @param options Message sending option.
|
|
102
|
+
*/
|
|
103
|
+
withImage: (name, options) => {
|
|
104
|
+
return this.replyWithImage(name, false, options);
|
|
105
|
+
},
|
|
106
|
+
/**
|
|
107
|
+
* Reply with video/gif message to message that triggered this action after action execution is finished.
|
|
108
|
+
* If multiple responses are sent, they will be sent in the order they were added, with delay of at least 35ms as per Telegram rate-limit.
|
|
109
|
+
* @param text Message contents.
|
|
110
|
+
* @param options Message sending option.
|
|
111
|
+
*/
|
|
112
|
+
withVideo: (name, options) => {
|
|
113
|
+
return this.replyWithVideo(name, false, options);
|
|
114
|
+
},
|
|
115
|
+
/**
|
|
116
|
+
* React to the message that triggered this action after action execution is finished.
|
|
117
|
+
* If multiple responses are sent, they will be sent in the order they were added, with delay of at least 35ms as per Telegram rate-limit.
|
|
118
|
+
* @param emoji Telegram emoji to react with.
|
|
119
|
+
*/
|
|
120
|
+
withReaction: (emoji) => {
|
|
121
|
+
this.responses.push(new Reaction(this.traceId, this.chatInfo, this.messageInfo.id, emoji, this.action));
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actionStateBase.d.ts","sourceRoot":"","sources":["../../../entities/states/actionStateBase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,qBAAa,eAAgB,YAAW,YAAY;IAChD,cAAc,EAAE,MAAM,EAAE,CAAM;IAC9B,gBAAgB,SAAK;CACxB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Milliseconds } from '../types/timeValues';
|
|
2
|
+
export declare class TaskRecord {
|
|
3
|
+
readonly name: string;
|
|
4
|
+
readonly taskId: NodeJS.Timeout;
|
|
5
|
+
readonly interval: Milliseconds;
|
|
6
|
+
constructor(name: string, taskId: NodeJS.Timeout, interval: Milliseconds);
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=taskRecord.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"taskRecord.d.ts","sourceRoot":"","sources":["../../entities/taskRecord.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,qBAAa,UAAU;IACnB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,OAAO,CAAC;IAChC,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;gBAEpB,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,OAAO,EAAE,QAAQ,EAAE,YAAY;CAK3E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eslint.config.d.ts","sourceRoot":"","sources":["../eslint.config.ts"],"names":[],"mappings":";AAIA,wBAoDE"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import eslint from '@eslint/js';
|
|
2
|
+
import tseslint from 'typescript-eslint';
|
|
3
|
+
import parser from '@typescript-eslint/parser';
|
|
4
|
+
export default tseslint.config({
|
|
5
|
+
ignores: ['dist/**']
|
|
6
|
+
}, eslint.configs.recommended, tseslint.configs.strictTypeChecked, {
|
|
7
|
+
languageOptions: {
|
|
8
|
+
parser,
|
|
9
|
+
parserOptions: {
|
|
10
|
+
project: './tsconfig.json',
|
|
11
|
+
tsconfigRootDir: __dirname,
|
|
12
|
+
sourceType: 'module',
|
|
13
|
+
projectService: true
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
plugins: { '@typescript-eslint': tseslint.plugin },
|
|
17
|
+
rules: {
|
|
18
|
+
'@typescript-eslint/switch-exhaustiveness-check': 'error',
|
|
19
|
+
'@typescript-eslint/no-unused-vars': [
|
|
20
|
+
'error',
|
|
21
|
+
{
|
|
22
|
+
args: 'all',
|
|
23
|
+
argsIgnorePattern: '^_',
|
|
24
|
+
caughtErrors: 'all',
|
|
25
|
+
caughtErrorsIgnorePattern: '^_',
|
|
26
|
+
destructuredArrayIgnorePattern: '^_',
|
|
27
|
+
varsIgnorePattern: '^_',
|
|
28
|
+
ignoreRestSiblings: true
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
'@typescript-eslint/no-misused-promises': [
|
|
32
|
+
'error',
|
|
33
|
+
{
|
|
34
|
+
checksVoidReturn: true,
|
|
35
|
+
checksConditionals: true
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
'@typescript-eslint/restrict-template-expressions': [
|
|
39
|
+
'error',
|
|
40
|
+
{
|
|
41
|
+
allowNumber: true
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
'@typescript-eslint/unbound-method': [
|
|
45
|
+
'error',
|
|
46
|
+
{
|
|
47
|
+
ignoreStatic: true
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
});
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { CommandHandler } from '../../types/handlers';
|
|
2
|
+
import { CommandCondition } from '../../types/commandCondition';
|
|
3
|
+
import { Seconds } from '../../types/timeValues';
|
|
4
|
+
import { CommandAction } from '../../entities/actions/commandAction';
|
|
5
|
+
import { ActionStateBase } from '../../entities/states/actionStateBase';
|
|
6
|
+
import { IActionState } from '../../types/actionState';
|
|
7
|
+
import { CommandTrigger } from '../../types/commandTrigger';
|
|
8
|
+
import { CooldownInfo } from '../../dtos/cooldownInfo';
|
|
9
|
+
import { CommandActionPropertyProvider } from '../../types/propertyProvider';
|
|
10
|
+
/**
|
|
11
|
+
* Builder for `CommandAction` with state represented by `TActionState`
|
|
12
|
+
*/
|
|
13
|
+
export declare class CommandActionBuilderWithState<TActionState extends IActionState> {
|
|
14
|
+
private readonly name;
|
|
15
|
+
private trigger;
|
|
16
|
+
private activeProvider;
|
|
17
|
+
private cooldownSettingsProvider;
|
|
18
|
+
private blacklistProvider;
|
|
19
|
+
private whitelistProvider;
|
|
20
|
+
private allowedUsersProvider;
|
|
21
|
+
private readmeFactory;
|
|
22
|
+
private readonly stateConstructor;
|
|
23
|
+
private handler;
|
|
24
|
+
private condition;
|
|
25
|
+
private maxAllowedSimultaniousExecutions;
|
|
26
|
+
/**
|
|
27
|
+
* Builder for `CommandAction` with state represented by `TActionState`
|
|
28
|
+
* @param name Action name, will be used for logging and storage
|
|
29
|
+
* @param stateConstructor Function that creates default state object
|
|
30
|
+
*/
|
|
31
|
+
constructor(name: string, stateConstructor: () => TActionState);
|
|
32
|
+
/**
|
|
33
|
+
* Defines action trigger
|
|
34
|
+
* @param trigger If `string` or `string[]` is provided, will be triggered only on exact message match.
|
|
35
|
+
*
|
|
36
|
+
* If `RegExp` or `RegExp[]` is provided, will be triggered on successful match.
|
|
37
|
+
*/
|
|
38
|
+
on(trigger: CommandTrigger | CommandTrigger[]): this;
|
|
39
|
+
/** Defines id (or ids) of users that are allowed to trigger this action.
|
|
40
|
+
* @param id User id or ids
|
|
41
|
+
*/
|
|
42
|
+
from(id: number | number[]): this;
|
|
43
|
+
/**
|
|
44
|
+
* Sets chats whitelist for this action.
|
|
45
|
+
* @param chatIds Chats ids to allow.
|
|
46
|
+
*/
|
|
47
|
+
in(chatIds: number[]): this;
|
|
48
|
+
/**
|
|
49
|
+
* Sets chats blacklist for this action.
|
|
50
|
+
* @param chatIds Chats ids to ignore.
|
|
51
|
+
*/
|
|
52
|
+
notIn(chatIds: number[]): this;
|
|
53
|
+
/** Defines action logic itself, will be executed on trigger.
|
|
54
|
+
* @param handler Callback that will be called on trigger
|
|
55
|
+
*/
|
|
56
|
+
do(handler: CommandHandler<TActionState>): this;
|
|
57
|
+
/** Defines condition that will be checked before trigger match check is executed.
|
|
58
|
+
* @param condition Condition check predicate
|
|
59
|
+
*/
|
|
60
|
+
when(condition: CommandCondition<TActionState>): this;
|
|
61
|
+
/**
|
|
62
|
+
* Sets factory method for readme (shown on /help) for this action.
|
|
63
|
+
* @param readmeFactory readme factory
|
|
64
|
+
*/
|
|
65
|
+
withHelp(readmeFactory: (botName: string) => string): this;
|
|
66
|
+
/** If called during building, action is marked as disabled and never checked. */
|
|
67
|
+
disabled(): this;
|
|
68
|
+
/** Sets maximum number of simultaniously executing handlers for this command per chat. 0 is treated as unlimited. */
|
|
69
|
+
withRatelimit(maxAllowedSimultaniousExecutions: number): this;
|
|
70
|
+
/** Sets action cooldown settings.
|
|
71
|
+
* @param cooldownSettings Settings.
|
|
72
|
+
*/
|
|
73
|
+
withCooldown(cooldownSettings: {
|
|
74
|
+
cooldown: Seconds;
|
|
75
|
+
message?: string;
|
|
76
|
+
}): this;
|
|
77
|
+
/**
|
|
78
|
+
* Configures action to use property value providers instead of static value to allow changes in runtime
|
|
79
|
+
*/
|
|
80
|
+
withConfiguration(configuration: CommandActionProvidersConfiguration | (() => CommandActionProvidersConfiguration)): this;
|
|
81
|
+
/** Builds action */
|
|
82
|
+
build(): CommandAction<TActionState>;
|
|
83
|
+
}
|
|
84
|
+
export type CommandActionProvidersConfiguration = {
|
|
85
|
+
cooldownProvider?: CommandActionPropertyProvider<CooldownInfo>;
|
|
86
|
+
isActiveProvider?: CommandActionPropertyProvider<boolean>;
|
|
87
|
+
chatsBlacklistProvider?: CommandActionPropertyProvider<number[]>;
|
|
88
|
+
chatsWhitelistProvider?: CommandActionPropertyProvider<number[]>;
|
|
89
|
+
usersWhitelistProvider?: CommandActionPropertyProvider<number[]>;
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* Builder for `CommandAction` with state represented by default state (containing only last execution date).
|
|
93
|
+
*/
|
|
94
|
+
export declare class CommandActionBuilder extends CommandActionBuilderWithState<ActionStateBase> {
|
|
95
|
+
/**
|
|
96
|
+
* Builder for `CommandAction` with state represented by default state (containing only last execution date).
|
|
97
|
+
*/
|
|
98
|
+
constructor(name: string);
|
|
99
|
+
}
|
|
100
|
+
//# sourceMappingURL=commandActionBuilder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commandActionBuilder.d.ts","sourceRoot":"","sources":["../../../helpers/builders/commandActionBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAGvD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,6BAA6B,EAAE,MAAM,8BAA8B,CAAC;AAE7E;;GAEG;AACH,qBAAa,6BAA6B,CAAC,YAAY,SAAS,YAAY;IACxE,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;IAC9B,OAAO,CAAC,OAAO,CAAyC;IAExD,OAAO,CAAC,cAAc,CAAsD;IAC5E,OAAO,CAAC,wBAAwB,CACS;IACzC,OAAO,CAAC,iBAAiB,CACZ;IACb,OAAO,CAAC,iBAAiB,CACZ;IACb,OAAO,CAAC,oBAAoB,CACf;IAEb,OAAO,CAAC,aAAa,CAAiD;IACtE,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAqB;IACtD,OAAO,CAAC,OAAO,CAA2C;IAC1D,OAAO,CAAC,SAAS,CAA6C;IAC9D,OAAO,CAAC,gCAAgC,CAAa;IAErD;;;;OAIG;gBACS,IAAI,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,YAAY;IAK9D;;;;;OAKG;IACH,EAAE,CAAC,OAAO,EAAE,cAAc,GAAG,cAAc,EAAE;IAM7C;;OAEG;IACH,IAAI,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,EAAE;IAO1B;;;OAGG;IACH,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE;IAMpB;;;OAGG;IACH,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE;IAMvB;;OAEG;IACH,EAAE,CAAC,OAAO,EAAE,cAAc,CAAC,YAAY,CAAC;IAMxC;;OAEG;IACH,IAAI,CAAC,SAAS,EAAE,gBAAgB,CAAC,YAAY,CAAC;IAM9C;;;OAGG;IACH,QAAQ,CAAC,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM;IAMnD,iFAAiF;IACjF,QAAQ;IAMR,qHAAqH;IACrH,aAAa,CAAC,gCAAgC,EAAE,MAAM;IAOtD;;OAEG;IACH,YAAY,CAAC,gBAAgB,EAAE;QAAE,QAAQ,EAAE,OAAO,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE;IAUtE;;OAEG;IACH,iBAAiB,CACb,aAAa,EACP,mCAAmC,GACnC,CAAC,MAAM,mCAAmC,CAAC;IAwBrD,oBAAoB;IACpB,KAAK;CAkBR;AAED,MAAM,MAAM,mCAAmC,GAAG;IAC9C,gBAAgB,CAAC,EAAE,6BAA6B,CAAC,YAAY,CAAC,CAAC;IAC/D,gBAAgB,CAAC,EAAE,6BAA6B,CAAC,OAAO,CAAC,CAAC;IAC1D,sBAAsB,CAAC,EAAE,6BAA6B,CAAC,MAAM,EAAE,CAAC,CAAC;IACjE,sBAAsB,CAAC,EAAE,6BAA6B,CAAC,MAAM,EAAE,CAAC,CAAC;IACjE,sBAAsB,CAAC,EAAE,6BAA6B,CAAC,MAAM,EAAE,CAAC,CAAC;CACpE,CAAC;AAEF;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,6BAA6B,CAAC,eAAe,CAAC;IACpF;;OAEG;gBACS,IAAI,EAAE,MAAM;CAG3B"}
|