@grom.js/effect-tg 0.8.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +169 -5
- package/dist/BotApi.d.ts +42 -12
- package/dist/BotApi.d.ts.map +1 -1
- package/dist/BotApi.js +18 -2
- package/dist/BotApi.js.map +1 -1
- package/dist/BotApiError.d.ts +46 -71
- package/dist/BotApiError.d.ts.map +1 -1
- package/dist/BotApiError.js +59 -41
- package/dist/BotApiError.js.map +1 -1
- package/dist/BotApiTransport.d.ts +10 -17
- package/dist/BotApiTransport.d.ts.map +1 -1
- package/dist/BotApiTransport.js +2 -7
- package/dist/BotApiTransport.js.map +1 -1
- package/dist/BotApiUrl.d.ts +6 -8
- package/dist/BotApiUrl.d.ts.map +1 -1
- package/dist/BotApiUrl.js.map +1 -1
- package/dist/Content.d.ts.map +1 -1
- package/dist/Dialog.d.ts +96 -41
- package/dist/Dialog.d.ts.map +1 -1
- package/dist/Dialog.js +60 -25
- package/dist/Dialog.js.map +1 -1
- package/dist/File.d.ts +1 -2
- package/dist/File.d.ts.map +1 -1
- package/dist/File.js +1 -1
- package/dist/File.js.map +1 -1
- package/dist/Markup.d.ts.map +1 -1
- package/dist/Runner.d.ts +1 -1
- package/dist/Runner.d.ts.map +1 -1
- package/dist/Send.d.ts +57 -130
- package/dist/Send.d.ts.map +1 -1
- package/dist/Send.js +65 -128
- package/dist/Send.js.map +1 -1
- package/dist/Text.d.ts.map +1 -1
- package/dist/internal/botApi.d.ts +3 -1
- package/dist/internal/botApi.d.ts.map +1 -1
- package/dist/internal/botApi.gen.d.ts +6501 -0
- package/dist/internal/botApi.gen.d.ts.map +1 -0
- package/dist/internal/botApi.gen.js +2 -0
- package/dist/internal/botApi.gen.js.map +1 -0
- package/dist/internal/botApi.js +2 -6
- package/dist/internal/botApi.js.map +1 -1
- package/dist/internal/botApiError.d.ts +5 -2
- package/dist/internal/botApiError.d.ts.map +1 -1
- package/dist/internal/botApiError.js +8 -18
- package/dist/internal/botApiError.js.map +1 -1
- package/dist/internal/botApiTransport.d.ts +5 -2
- package/dist/internal/botApiTransport.d.ts.map +1 -1
- package/dist/internal/botApiTransport.js +14 -10
- package/dist/internal/botApiTransport.js.map +1 -1
- package/dist/internal/dialog.d.ts +27 -10
- package/dist/internal/dialog.d.ts.map +1 -1
- package/dist/internal/dialog.js +88 -14
- package/dist/internal/dialog.js.map +1 -1
- package/dist/internal/file.d.ts +1 -1
- package/dist/internal/file.d.ts.map +1 -1
- package/dist/internal/file.js +1 -1
- package/dist/internal/file.js.map +1 -1
- package/dist/internal/runner.d.ts +4 -5
- package/dist/internal/runner.d.ts.map +1 -1
- package/dist/internal/runner.js +14 -19
- package/dist/internal/runner.js.map +1 -1
- package/dist/internal/send.d.ts +4 -4
- package/dist/internal/send.d.ts.map +1 -1
- package/dist/internal/send.js +62 -51
- package/dist/internal/send.js.map +1 -1
- package/package.json +11 -9
- package/src/BotApi.ts +100 -31
- package/src/BotApiError.ts +109 -63
- package/src/BotApiTransport.ts +18 -20
- package/src/BotApiUrl.ts +6 -8
- package/src/Content.ts +14 -14
- package/src/Dialog.ts +164 -42
- package/src/File.ts +3 -4
- package/src/Markup.ts +5 -5
- package/src/Send.ts +114 -202
- package/src/Text.ts +5 -5
- package/src/internal/botApi.gen.ts +6783 -0
- package/src/internal/botApi.ts +7 -11
- package/src/internal/botApiError.ts +15 -20
- package/src/internal/botApiTransport.ts +25 -17
- package/src/internal/dialog.ts +109 -26
- package/src/internal/file.ts +1 -1
- package/src/internal/runner.ts +34 -38
- package/src/internal/send.ts +161 -132
- package/dist/internal/botApiMethods.gen.d.ts +0 -2110
- package/dist/internal/botApiMethods.gen.d.ts.map +0 -1
- package/dist/internal/botApiMethods.gen.js +0 -2
- package/dist/internal/botApiMethods.gen.js.map +0 -1
- package/dist/internal/botApiShape.gen.d.ts +0 -406
- package/dist/internal/botApiShape.gen.d.ts.map +0 -1
- package/dist/internal/botApiShape.gen.js +0 -2
- package/dist/internal/botApiShape.gen.js.map +0 -1
- package/dist/internal/botApiTypes.gen.d.ts +0 -3986
- package/dist/internal/botApiTypes.gen.d.ts.map +0 -1
- package/dist/internal/botApiTypes.gen.js +0 -2
- package/dist/internal/botApiTypes.gen.js.map +0 -1
- package/src/internal/botApiMethods.gen.ts +0 -2111
- package/src/internal/botApiShape.gen.ts +0 -406
- package/src/internal/botApiTypes.gen.ts +0 -4264
package/dist/Send.d.ts
CHANGED
|
@@ -3,124 +3,87 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import type * as BotApi from './BotApi.ts';
|
|
5
5
|
import type * as BotApiError from './BotApiError.ts';
|
|
6
|
-
import type * as BotApiTransport from './BotApiTransport.ts';
|
|
7
6
|
import type * as Content from './Content.ts';
|
|
8
|
-
import type * as
|
|
7
|
+
import type * as Dialog from './Dialog.ts';
|
|
9
8
|
import type * as Markup from './Markup.ts';
|
|
10
9
|
import * as Context from 'effect/Context';
|
|
11
10
|
import * as Data from 'effect/Data';
|
|
12
11
|
import * as Effect from 'effect/Effect';
|
|
13
12
|
import * as Inspectable from 'effect/Inspectable';
|
|
14
|
-
declare const MessageToSendTypeId: unique symbol;
|
|
15
|
-
declare const Dialog_base: Context.TagClass<Dialog, "@grom.js/effect-tg/Send/Dialog", Dialog_.Dialog>;
|
|
16
13
|
/**
|
|
17
|
-
*
|
|
18
|
-
|
|
19
|
-
export declare class Dialog extends Dialog_base {
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Options for sending a message.
|
|
23
|
-
*
|
|
24
|
-
* @see {@link https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1message_send_options.html td.td_api.messageSendOptions}
|
|
25
|
-
*/
|
|
26
|
-
export declare class Options extends Data.Class<{
|
|
27
|
-
disableNotification?: boolean;
|
|
28
|
-
protectContent?: boolean;
|
|
29
|
-
allowPaidBroadcast?: boolean;
|
|
30
|
-
}> {
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Sends a message directly with explicit parameters.
|
|
34
|
-
*
|
|
35
|
-
* Prefer {@linkcode message} for more composability.
|
|
36
|
-
*
|
|
37
|
-
* Example:
|
|
38
|
-
* ```ts
|
|
39
|
-
* yield* Send.sendMessage({
|
|
40
|
-
* content: new Content.Text({
|
|
41
|
-
* text,
|
|
42
|
-
* linkPreview: Option.none(),
|
|
43
|
-
* }),
|
|
44
|
-
* dialog: new Dialog.UserId(userId),
|
|
45
|
-
* options: new Send.Options({
|
|
46
|
-
* protectContent: true,
|
|
47
|
-
* }),
|
|
48
|
-
* })
|
|
49
|
-
* ```
|
|
50
|
-
*
|
|
51
|
-
* @see {@link https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1send_message.html td.td_api.sendMessage}
|
|
14
|
+
* Sends a message by calling the appropriate `send*` Bot API method
|
|
15
|
+
* and passing the required parameters.
|
|
52
16
|
*/
|
|
53
17
|
export declare const sendMessage: (params: {
|
|
54
18
|
content: Content.Content;
|
|
55
|
-
dialog:
|
|
19
|
+
dialog: Dialog.Dialog | Dialog.DialogId;
|
|
56
20
|
options?: Options;
|
|
57
21
|
markup?: Markup.Markup;
|
|
58
|
-
}) => Effect.Effect<BotApi.Types.Message, BotApiError.BotApiError
|
|
59
|
-
|
|
22
|
+
}) => Effect.Effect<BotApi.Types.Message, BotApiError.BotApiError, BotApi.BotApi>;
|
|
23
|
+
export declare const MessageToSendTypeId: unique symbol;
|
|
24
|
+
export type MessageToSendTypeId = typeof MessageToSendTypeId;
|
|
60
25
|
/**
|
|
61
|
-
*
|
|
26
|
+
* Message prepared to be sent.
|
|
62
27
|
*/
|
|
63
|
-
export interface MessageToSend extends Inspectable.Inspectable,
|
|
28
|
+
export interface MessageToSend extends Inspectable.Inspectable, Effect.Effect<BotApi.Types.Message, BotApiError.BotApiError, BotApi.BotApi | TargetDialog> {
|
|
64
29
|
readonly [MessageToSendTypeId]: typeof MessageToSendTypeId;
|
|
65
30
|
readonly content: Content.Content;
|
|
66
|
-
readonly
|
|
67
|
-
readonly
|
|
31
|
+
readonly markup?: Markup.Markup;
|
|
32
|
+
readonly options?: Options;
|
|
68
33
|
}
|
|
69
34
|
/**
|
|
70
|
-
* Creates a message to
|
|
71
|
-
*
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
35
|
+
* Creates a message prepared to be sent with the specified content
|
|
36
|
+
* and optional parameters.
|
|
37
|
+
*/
|
|
38
|
+
export declare const message: (content: Content.Content, params?: {
|
|
39
|
+
markup?: Markup.Markup;
|
|
40
|
+
options?: Options;
|
|
41
|
+
}) => MessageToSend;
|
|
42
|
+
declare const TargetDialog_base: Context.TagClass<TargetDialog, "@grom.js/effect-tg/Send/TargetDialog", Dialog.DialogId | Dialog.Dialog>;
|
|
43
|
+
/**
|
|
44
|
+
* Target dialog for sending messages.
|
|
45
|
+
*/
|
|
46
|
+
export declare class TargetDialog extends TargetDialog_base {
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Provides the target dialog for sending messages.
|
|
50
|
+
*/
|
|
81
51
|
export declare const to: {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
*
|
|
85
|
-
* Example:
|
|
86
|
-
* ```ts
|
|
87
|
-
* // Per-message
|
|
88
|
-
* yield* Send.message(content).pipe(
|
|
89
|
-
* Send.withProtection,
|
|
90
|
-
* Send.to(dialog),
|
|
91
|
-
* )
|
|
92
|
-
*
|
|
93
|
-
* // For entire handler (multiple sends)
|
|
94
|
-
* const handler = Effect.gen(function* () {
|
|
95
|
-
* yield* Send.message(content1)
|
|
96
|
-
* yield* Send.message(content2)
|
|
97
|
-
* }).pipe(Send.to(dialog))
|
|
98
|
-
* ```
|
|
99
|
-
*/
|
|
100
|
-
(dialog: Dialog_.Dialog): <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A, E, Exclude<R, Dialog>>;
|
|
101
|
-
<A, E, R>(effect: Effect.Effect<A, E, R>, dialog: Dialog_.Dialog): Effect.Effect<A, E, Exclude<R, Dialog>>;
|
|
52
|
+
(dialog: Dialog.Dialog): <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A, E, Exclude<R, TargetDialog>>;
|
|
53
|
+
<A, E, R>(effect: Effect.Effect<A, E, R>, dialog: Dialog.Dialog): Effect.Effect<A, E, Exclude<R, TargetDialog>>;
|
|
102
54
|
};
|
|
55
|
+
/**
|
|
56
|
+
* Sets the reply markup for the message.
|
|
57
|
+
*/
|
|
58
|
+
export declare const withMarkup: {
|
|
59
|
+
(markup: Markup.Markup): (self: MessageToSend) => MessageToSend;
|
|
60
|
+
(self: MessageToSend, markup: Markup.Markup): MessageToSend;
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Removes the reply markup from the message.
|
|
64
|
+
*/
|
|
65
|
+
export declare const withoutMarkup: (self: MessageToSend) => MessageToSend;
|
|
66
|
+
/**
|
|
67
|
+
* Options for sending a message.
|
|
68
|
+
*/
|
|
69
|
+
export declare class Options extends Data.Class<{
|
|
70
|
+
disableNotification?: boolean;
|
|
71
|
+
protectContent?: boolean;
|
|
72
|
+
allowPaidBroadcast?: boolean;
|
|
73
|
+
}> {
|
|
74
|
+
}
|
|
75
|
+
export declare const options: (args: {
|
|
76
|
+
disableNotification?: boolean;
|
|
77
|
+
protectContent?: boolean;
|
|
78
|
+
allowPaidBroadcast?: boolean;
|
|
79
|
+
}) => Options;
|
|
103
80
|
/**
|
|
104
81
|
* Modifies the options for sending a message by merging with existing options.
|
|
105
82
|
*
|
|
106
|
-
* Example:
|
|
107
|
-
* ```ts
|
|
108
|
-
* yield* Send.message(content).pipe(
|
|
109
|
-
* Send.withOptions({
|
|
110
|
-
* disableNotification: true,
|
|
111
|
-
* protectContent: true,
|
|
112
|
-
* }),
|
|
113
|
-
* Send.to(dialog),
|
|
114
|
-
* )
|
|
115
|
-
* ```
|
|
116
|
-
*
|
|
117
83
|
* Available shortcuts:
|
|
118
|
-
* - {@linkcode withoutNotification}
|
|
119
|
-
* - {@linkcode
|
|
120
|
-
* - {@linkcode
|
|
121
|
-
* - {@linkcode withContentProtection}
|
|
122
|
-
* - {@linkcode withoutPaidBroadcast}
|
|
123
|
-
* - {@linkcode withPaidBroadcast}
|
|
84
|
+
* - {@linkcode withNotification} / {@linkcode withoutNotification}
|
|
85
|
+
* - {@linkcode withContentProtection} / {@linkcode withoutContentProtection}
|
|
86
|
+
* - {@linkcode withPaidBroadcast} / {@linkcode withoutPaidBroadcast}
|
|
124
87
|
*/
|
|
125
88
|
export declare const withOptions: {
|
|
126
89
|
(options: Options): (self: MessageToSend) => MessageToSend;
|
|
@@ -128,63 +91,27 @@ export declare const withOptions: {
|
|
|
128
91
|
};
|
|
129
92
|
/**
|
|
130
93
|
* Disables notification for the message.
|
|
131
|
-
*
|
|
132
|
-
* Shortcut for `withOptions({ disableNotification: true })`.
|
|
133
94
|
*/
|
|
134
95
|
export declare const withoutNotification: (self: MessageToSend) => MessageToSend;
|
|
135
96
|
/**
|
|
136
97
|
* Enables notification for the message.
|
|
137
|
-
*
|
|
138
|
-
* Shortcut for `withOptions({ disableNotification: false })`.
|
|
139
98
|
*/
|
|
140
99
|
export declare const withNotification: (self: MessageToSend) => MessageToSend;
|
|
141
100
|
/**
|
|
142
101
|
* Allows message content to be saved and forwarded.
|
|
143
|
-
*
|
|
144
|
-
* Shortcut for `withOptions({ protectContent: false })`.
|
|
145
102
|
*/
|
|
146
103
|
export declare const withoutContentProtection: (self: MessageToSend) => MessageToSend;
|
|
147
104
|
/**
|
|
148
105
|
* Protects message content from saving and forwarding.
|
|
149
|
-
*
|
|
150
|
-
* Shortcut for `withOptions({ protectContent: true })`.
|
|
151
106
|
*/
|
|
152
107
|
export declare const withContentProtection: (self: MessageToSend) => MessageToSend;
|
|
153
108
|
/**
|
|
154
109
|
* Disallows paid broadcast for the message.
|
|
155
|
-
*
|
|
156
|
-
* Shortcut for `withOptions({ allowPaidBroadcast: false })`.
|
|
157
110
|
*/
|
|
158
111
|
export declare const withoutPaidBroadcast: (self: MessageToSend) => MessageToSend;
|
|
159
112
|
/**
|
|
160
113
|
* Allows paid broadcast for the message.
|
|
161
|
-
*
|
|
162
|
-
* Shortcut for `withOptions({ allowPaidBroadcast: true })`.
|
|
163
114
|
*/
|
|
164
115
|
export declare const withPaidBroadcast: (self: MessageToSend) => MessageToSend;
|
|
165
|
-
/**
|
|
166
|
-
* Sets the reply markup for the message.
|
|
167
|
-
*
|
|
168
|
-
* Example:
|
|
169
|
-
* ```ts
|
|
170
|
-
* yield* Send.message(content).pipe(
|
|
171
|
-
* Send.withMarkup(
|
|
172
|
-
* new Markup.ForceReply({
|
|
173
|
-
* selective: false,
|
|
174
|
-
* inputPlaceholder: Option.some("effect-tg or grammY?"),
|
|
175
|
-
* }),
|
|
176
|
-
* ),
|
|
177
|
-
* Send.to(dialog),
|
|
178
|
-
* )
|
|
179
|
-
* ```
|
|
180
|
-
*/
|
|
181
|
-
export declare const withMarkup: {
|
|
182
|
-
(markup: Markup.Markup): (self: MessageToSend) => MessageToSend;
|
|
183
|
-
(self: MessageToSend, markup: Markup.Markup): MessageToSend;
|
|
184
|
-
};
|
|
185
|
-
/**
|
|
186
|
-
* Removes the reply markup from the message.
|
|
187
|
-
*/
|
|
188
|
-
export declare const withoutMarkup: (self: MessageToSend) => MessageToSend;
|
|
189
116
|
export {};
|
|
190
117
|
//# sourceMappingURL=Send.d.ts.map
|
package/dist/Send.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Send.d.ts","sourceRoot":"","sources":["../src/Send.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,KAAK,WAAW,MAAM,kBAAkB,CAAA;AACpD,OAAO,KAAK,KAAK,
|
|
1
|
+
{"version":3,"file":"Send.d.ts","sourceRoot":"","sources":["../src/Send.ts"],"names":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
7
7
|
import * as Effectable from 'effect/Effectable';
|
|
8
8
|
import * as Function from 'effect/Function';
|
|
9
9
|
import * as Inspectable from 'effect/Inspectable';
|
|
10
|
-
import * as Pipeable from 'effect/Pipeable';
|
|
11
10
|
import * as internal from "./internal/send.js";
|
|
12
|
-
//
|
|
13
|
-
|
|
14
|
-
//
|
|
11
|
+
// =============================================================================
|
|
12
|
+
// Send Methods
|
|
13
|
+
// =============================================================================
|
|
15
14
|
/**
|
|
16
|
-
*
|
|
17
|
-
|
|
18
|
-
export class Dialog extends Context.Tag('@grom.js/effect-tg/Send/Dialog')() {
|
|
19
|
-
}
|
|
20
|
-
// ─── Options ──────────────────────────────────────────────────────
|
|
21
|
-
/**
|
|
22
|
-
* Options for sending a message.
|
|
23
|
-
*
|
|
24
|
-
* @see {@link https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1message_send_options.html td.td_api.messageSendOptions}
|
|
25
|
-
*/
|
|
26
|
-
export class Options extends Data.Class {
|
|
27
|
-
}
|
|
28
|
-
// ─── Direct Send ──────────────────────────────────────────────────
|
|
29
|
-
/**
|
|
30
|
-
* Sends a message directly with explicit parameters.
|
|
31
|
-
*
|
|
32
|
-
* Prefer {@linkcode message} for more composability.
|
|
33
|
-
*
|
|
34
|
-
* Example:
|
|
35
|
-
* ```ts
|
|
36
|
-
* yield* Send.sendMessage({
|
|
37
|
-
* content: new Content.Text({
|
|
38
|
-
* text,
|
|
39
|
-
* linkPreview: Option.none(),
|
|
40
|
-
* }),
|
|
41
|
-
* dialog: new Dialog.UserId(userId),
|
|
42
|
-
* options: new Send.Options({
|
|
43
|
-
* protectContent: true,
|
|
44
|
-
* }),
|
|
45
|
-
* })
|
|
46
|
-
* ```
|
|
47
|
-
*
|
|
48
|
-
* @see {@link https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1send_message.html td.td_api.sendMessage}
|
|
15
|
+
* Sends a message by calling the appropriate `send*` Bot API method
|
|
16
|
+
* and passing the required parameters.
|
|
49
17
|
*/
|
|
50
18
|
export const sendMessage = internal.sendMessage;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
19
|
+
// =============================================================================
|
|
20
|
+
// MessageToSend
|
|
21
|
+
// =============================================================================
|
|
22
|
+
export const MessageToSendTypeId = Symbol.for('@grom.js/effect-tg/Send/MessageToSend');
|
|
23
|
+
const MessageToSendProto = {
|
|
54
24
|
...Inspectable.BaseProto,
|
|
25
|
+
...Effectable.CommitPrototype,
|
|
26
|
+
[MessageToSendTypeId]: MessageToSendTypeId,
|
|
55
27
|
commit() {
|
|
56
|
-
return Effect.flatMap(
|
|
28
|
+
return Effect.flatMap(TargetDialog, dialog => sendMessage({
|
|
57
29
|
dialog,
|
|
58
30
|
content: this.content,
|
|
59
|
-
options: this.options,
|
|
60
31
|
markup: this.markup,
|
|
32
|
+
options: this.options,
|
|
61
33
|
}));
|
|
62
34
|
},
|
|
63
35
|
toJSON() {
|
|
64
36
|
return {
|
|
65
37
|
_id: this[MessageToSendTypeId].description,
|
|
66
38
|
content: this.content,
|
|
67
|
-
options: this.options,
|
|
68
39
|
markup: this.markup,
|
|
40
|
+
options: this.options,
|
|
69
41
|
};
|
|
70
42
|
},
|
|
71
|
-
pipe() {
|
|
72
|
-
// eslint-disable-next-line prefer-rest-params
|
|
73
|
-
return Pipeable.pipeArguments(this, arguments);
|
|
74
|
-
},
|
|
75
43
|
};
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
44
|
+
/**
|
|
45
|
+
* Creates a message prepared to be sent with the specified content
|
|
46
|
+
* and optional parameters.
|
|
47
|
+
*/
|
|
48
|
+
export const message = (content, params) => {
|
|
49
|
+
const self = Object.create(MessageToSendProto);
|
|
50
|
+
self.content = content;
|
|
51
|
+
self.markup = params?.markup;
|
|
52
|
+
self.options = params?.options;
|
|
81
53
|
return self;
|
|
82
54
|
};
|
|
83
|
-
//
|
|
55
|
+
// =============================================================================
|
|
56
|
+
// TargetDialog
|
|
57
|
+
// =============================================================================
|
|
84
58
|
/**
|
|
85
|
-
*
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
*
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
59
|
+
* Target dialog for sending messages.
|
|
60
|
+
*/
|
|
61
|
+
export class TargetDialog extends Context.Tag('@grom.js/effect-tg/Send/TargetDialog')() {
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Provides the target dialog for sending messages.
|
|
65
|
+
*/
|
|
66
|
+
export const to = Function.dual(2, (effect, dialog) => (Effect.provideService(effect, TargetDialog, dialog)));
|
|
67
|
+
// =============================================================================
|
|
68
|
+
// Reply Markup
|
|
69
|
+
// =============================================================================
|
|
70
|
+
/**
|
|
71
|
+
* Sets the reply markup for the message.
|
|
72
|
+
*/
|
|
73
|
+
export const withMarkup = Function.dual(2, (self, markup) => (message(self.content, {
|
|
74
|
+
markup,
|
|
75
|
+
options: self.options,
|
|
76
|
+
})));
|
|
77
|
+
/**
|
|
78
|
+
* Removes the reply markup from the message.
|
|
94
79
|
*/
|
|
95
|
-
export const
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
80
|
+
export const withoutMarkup = self => message(self.content, {
|
|
81
|
+
markup: undefined,
|
|
82
|
+
options: self.options,
|
|
83
|
+
});
|
|
84
|
+
// =============================================================================
|
|
85
|
+
// Send Options
|
|
86
|
+
// =============================================================================
|
|
87
|
+
/**
|
|
88
|
+
* Options for sending a message.
|
|
89
|
+
*/
|
|
90
|
+
export class Options extends Data.Class {
|
|
91
|
+
}
|
|
92
|
+
export const options = (args) => new Options(args);
|
|
99
93
|
/**
|
|
100
94
|
* Modifies the options for sending a message by merging with existing options.
|
|
101
95
|
*
|
|
102
|
-
* Example:
|
|
103
|
-
* ```ts
|
|
104
|
-
* yield* Send.message(content).pipe(
|
|
105
|
-
* Send.withOptions({
|
|
106
|
-
* disableNotification: true,
|
|
107
|
-
* protectContent: true,
|
|
108
|
-
* }),
|
|
109
|
-
* Send.to(dialog),
|
|
110
|
-
* )
|
|
111
|
-
* ```
|
|
112
|
-
*
|
|
113
96
|
* Available shortcuts:
|
|
114
|
-
* - {@linkcode withoutNotification}
|
|
115
|
-
* - {@linkcode
|
|
116
|
-
* - {@linkcode
|
|
117
|
-
* - {@linkcode withContentProtection}
|
|
118
|
-
* - {@linkcode withoutPaidBroadcast}
|
|
119
|
-
* - {@linkcode withPaidBroadcast}
|
|
97
|
+
* - {@linkcode withNotification} / {@linkcode withoutNotification}
|
|
98
|
+
* - {@linkcode withContentProtection} / {@linkcode withoutContentProtection}
|
|
99
|
+
* - {@linkcode withPaidBroadcast} / {@linkcode withoutPaidBroadcast}
|
|
120
100
|
*/
|
|
121
|
-
export const withOptions = Function.dual(2, (self, options) => (
|
|
122
|
-
|
|
101
|
+
export const withOptions = Function.dual(2, (self, options) => (message(self.content, {
|
|
102
|
+
markup: self.markup,
|
|
123
103
|
options: new Options({
|
|
124
104
|
...self.options,
|
|
125
105
|
...options,
|
|
126
106
|
}),
|
|
127
|
-
markup: self.markup,
|
|
128
107
|
})));
|
|
129
108
|
/**
|
|
130
109
|
* Disables notification for the message.
|
|
131
|
-
*
|
|
132
|
-
* Shortcut for `withOptions({ disableNotification: true })`.
|
|
133
110
|
*/
|
|
134
111
|
export const withoutNotification = withOptions({ disableNotification: true });
|
|
135
112
|
/**
|
|
136
113
|
* Enables notification for the message.
|
|
137
|
-
*
|
|
138
|
-
* Shortcut for `withOptions({ disableNotification: false })`.
|
|
139
114
|
*/
|
|
140
115
|
export const withNotification = withOptions({ disableNotification: false });
|
|
141
116
|
/**
|
|
142
117
|
* Allows message content to be saved and forwarded.
|
|
143
|
-
*
|
|
144
|
-
* Shortcut for `withOptions({ protectContent: false })`.
|
|
145
118
|
*/
|
|
146
119
|
export const withoutContentProtection = withOptions({ protectContent: false });
|
|
147
120
|
/**
|
|
148
121
|
* Protects message content from saving and forwarding.
|
|
149
|
-
*
|
|
150
|
-
* Shortcut for `withOptions({ protectContent: true })`.
|
|
151
122
|
*/
|
|
152
123
|
export const withContentProtection = withOptions({ protectContent: true });
|
|
153
124
|
/**
|
|
154
125
|
* Disallows paid broadcast for the message.
|
|
155
|
-
*
|
|
156
|
-
* Shortcut for `withOptions({ allowPaidBroadcast: false })`.
|
|
157
126
|
*/
|
|
158
127
|
export const withoutPaidBroadcast = withOptions({ allowPaidBroadcast: false });
|
|
159
128
|
/**
|
|
160
129
|
* Allows paid broadcast for the message.
|
|
161
|
-
*
|
|
162
|
-
* Shortcut for `withOptions({ allowPaidBroadcast: true })`.
|
|
163
130
|
*/
|
|
164
131
|
export const withPaidBroadcast = withOptions({ allowPaidBroadcast: true });
|
|
165
|
-
// ─── Markup Combinators ──────────────────────────────────────────
|
|
166
|
-
/**
|
|
167
|
-
* Sets the reply markup for the message.
|
|
168
|
-
*
|
|
169
|
-
* Example:
|
|
170
|
-
* ```ts
|
|
171
|
-
* yield* Send.message(content).pipe(
|
|
172
|
-
* Send.withMarkup(
|
|
173
|
-
* new Markup.ForceReply({
|
|
174
|
-
* selective: false,
|
|
175
|
-
* inputPlaceholder: Option.some("effect-tg or grammY?"),
|
|
176
|
-
* }),
|
|
177
|
-
* ),
|
|
178
|
-
* Send.to(dialog),
|
|
179
|
-
* )
|
|
180
|
-
* ```
|
|
181
|
-
*/
|
|
182
|
-
export const withMarkup = Function.dual(2, (self, markup) => (make({
|
|
183
|
-
content: self.content,
|
|
184
|
-
options: self.options,
|
|
185
|
-
markup,
|
|
186
|
-
})));
|
|
187
|
-
/**
|
|
188
|
-
* Removes the reply markup from the message.
|
|
189
|
-
*/
|
|
190
|
-
export const withoutMarkup = self => make({
|
|
191
|
-
content: self.content,
|
|
192
|
-
options: self.options,
|
|
193
|
-
markup: undefined,
|
|
194
|
-
});
|
|
195
132
|
//# sourceMappingURL=Send.js.map
|
package/dist/Send.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Send.js","sourceRoot":"","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 -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../src/Text.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAGxC;;GAEG;AACH,MAAM,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../src/Text.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAGxC;;GAEG;AACH,MAAM,MAAM,IAAI,GACZ,KAAK,GACL,IAAI,GACJ,QAAQ,GACR,GAAG,CAAA;;;;AAEP,qBAAa,KAAM,SAAQ,WAA0B;IACnD,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,aAAa,CAAC,CAAA;CACtC,CAAC;CAAG;;;;AAEL,qBAAa,IAAK,SAAQ,UAAyB;IACjD,IAAI,EAAE,MAAM,CAAA;CACb,CAAC;CAAG;;;;AAEL,qBAAa,QAAS,SAAQ,cAA6B;IACzD,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAC;CAAG;;;;AAEL,qBAAa,GAAI,SAAQ,SAAwB;IAC/C,GAAG,EAAE,UAAU,CAAA;CAChB,CAAC;CAAG;AAIL,eAAO,MAAM,KAAK,GAChB,MAAM,MAAM,EACZ,WAAW,KAAK,CAAC,KAAK,CAAC,aAAa,CAAC,KACpC,KAAsC,CAAA;AAEzC,eAAO,MAAM,IAAI,GAAI,MAAM,MAAM,KAAG,IAA0B,CAAA;AAE9D,eAAO,MAAM,QAAQ,GAAI,UAAU,MAAM,KAAG,QAAsC,CAAA;AAElF,eAAO,MAAM,GAAG,GAAI,KAAK,UAAU,KAAG,GAAuB,CAAA"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type * as BotApi from '../BotApi.ts';
|
|
2
2
|
import type * as BotApiTransport from '../BotApiTransport.ts';
|
|
3
|
-
export declare const make: (transport:
|
|
3
|
+
export declare const make: ({ transport, }: {
|
|
4
|
+
transport: BotApiTransport.Service;
|
|
5
|
+
}) => BotApi.Service;
|
|
4
6
|
//# sourceMappingURL=botApi.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"botApi.d.ts","sourceRoot":"","sources":["../../src/internal/botApi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,MAAM,cAAc,CAAA;AAC3C,OAAO,KAAK,KAAK,eAAe,MAAM,uBAAuB,CAAA;AAI7D,eAAO,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"botApi.d.ts","sourceRoot":"","sources":["../../src/internal/botApi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,MAAM,cAAc,CAAA;AAC3C,OAAO,KAAK,KAAK,eAAe,MAAM,uBAAuB,CAAA;AAI7D,eAAO,MAAM,IAAI,GAAI,gBAElB;IACD,SAAS,EAAE,eAAe,CAAC,OAAO,CAAA;CACnC,KAAG,MAAM,CAAC,OAkBV,CAAA"}
|