@teactjs/runtime 0.1.0-alpha.1
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 +336 -0
- package/dist/index.js +23117 -0
- package/dist/react/src/callback-registry.d.ts +11 -0
- package/dist/react/src/callback-registry.d.ts.map +1 -0
- package/dist/react/src/components.d.ts +396 -0
- package/dist/react/src/components.d.ts.map +1 -0
- package/dist/react/src/error-boundary.d.ts +19 -0
- package/dist/react/src/error-boundary.d.ts.map +1 -0
- package/dist/react/src/hooks.d.ts +37 -0
- package/dist/react/src/hooks.d.ts.map +1 -0
- package/dist/react/src/index.d.ts +11 -0
- package/dist/react/src/index.d.ts.map +1 -0
- package/dist/renderer/src/index.d.ts +5 -0
- package/dist/renderer/src/index.d.ts.map +1 -0
- package/dist/renderer/src/nodes.d.ts +23 -0
- package/dist/renderer/src/nodes.d.ts.map +1 -0
- package/dist/renderer/src/renderer.d.ts +9 -0
- package/dist/renderer/src/renderer.d.ts.map +1 -0
- package/dist/renderer/src/types.d.ts +36 -0
- package/dist/renderer/src/types.d.ts.map +1 -0
- package/dist/runtime/src/auth-session.d.ts +51 -0
- package/dist/runtime/src/auth-session.d.ts.map +1 -0
- package/dist/runtime/src/auth.d.ts +37 -0
- package/dist/runtime/src/auth.d.ts.map +1 -0
- package/dist/runtime/src/bot.d.ts +143 -0
- package/dist/runtime/src/bot.d.ts.map +1 -0
- package/dist/runtime/src/config.d.ts +38 -0
- package/dist/runtime/src/config.d.ts.map +1 -0
- package/dist/runtime/src/context.d.ts +74 -0
- package/dist/runtime/src/context.d.ts.map +1 -0
- package/dist/runtime/src/conversation.d.ts +310 -0
- package/dist/runtime/src/conversation.d.ts.map +1 -0
- package/dist/runtime/src/event-hooks.d.ts +49 -0
- package/dist/runtime/src/event-hooks.d.ts.map +1 -0
- package/dist/runtime/src/i18n.d.ts +55 -0
- package/dist/runtime/src/i18n.d.ts.map +1 -0
- package/dist/runtime/src/index.d.ts +28 -0
- package/dist/runtime/src/index.d.ts.map +1 -0
- package/dist/runtime/src/invoice.d.ts +120 -0
- package/dist/runtime/src/invoice.d.ts.map +1 -0
- package/dist/runtime/src/media-hooks.d.ts +178 -0
- package/dist/runtime/src/media-hooks.d.ts.map +1 -0
- package/dist/runtime/src/middleware.d.ts +26 -0
- package/dist/runtime/src/middleware.d.ts.map +1 -0
- package/dist/runtime/src/plugin.d.ts +32 -0
- package/dist/runtime/src/plugin.d.ts.map +1 -0
- package/dist/runtime/src/router.d.ts +168 -0
- package/dist/runtime/src/router.d.ts.map +1 -0
- package/dist/runtime/src/session.d.ts +20 -0
- package/dist/runtime/src/session.d.ts.map +1 -0
- package/dist/runtime/src/stream.d.ts +34 -0
- package/dist/runtime/src/stream.d.ts.map +1 -0
- package/dist/telegram/src/adapter.d.ts +83 -0
- package/dist/telegram/src/adapter.d.ts.map +1 -0
- package/dist/telegram/src/conversations.d.ts +175 -0
- package/dist/telegram/src/conversations.d.ts.map +1 -0
- package/dist/telegram/src/index.d.ts +8 -0
- package/dist/telegram/src/index.d.ts.map +1 -0
- package/dist/telegram/src/serialize.d.ts +80 -0
- package/dist/telegram/src/serialize.d.ts.map +1 -0
- package/dist/telegram/src/stream.d.ts +12 -0
- package/dist/telegram/src/stream.d.ts.map +1 -0
- package/package.json +33 -0
- package/src/index.ts +64 -0
package/src/index.ts
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
export { createBot } from './bot';
|
|
2
|
+
export type { CreateBotOptions, CommandContext, CommandDef, ReplyOptions, ReplyButton, ReplyKeyboardButton, WebhookConfig } from './bot';
|
|
3
|
+
|
|
4
|
+
export { MemorySessionStore } from './session';
|
|
5
|
+
|
|
6
|
+
export { compose, commandMiddleware } from './middleware';
|
|
7
|
+
|
|
8
|
+
export { createRouter, useNavigate, useParams, useRoute, redirect } from './router';
|
|
9
|
+
export type { RouterConfig, NavigateOptions, NavigateMode, BeforeLoadContext, RouteGuard, GuardRedirect, GuardComponent, GuardReply, GuardReplyOptions, GuardButton, RouteValue, CreateRouterOptions } from './router';
|
|
10
|
+
|
|
11
|
+
export { useConversation, useForm, useConversationContext, useFormContext, Conversation, Form } from './conversation';
|
|
12
|
+
export type { ConversationState, FormFieldDef, FormResult, Validator, ValidateFn, SchemaLike, StepDef, StepsConfig, StepActions, ConversationActions, FormActions } from './conversation';
|
|
13
|
+
|
|
14
|
+
export type { TeactPlugin } from './plugin';
|
|
15
|
+
|
|
16
|
+
export { useStream } from './stream';
|
|
17
|
+
export type { UseStreamResult } from './stream';
|
|
18
|
+
|
|
19
|
+
export { authPlugin, useAuth } from './auth';
|
|
20
|
+
export type { AuthConfig, AuthState } from './auth';
|
|
21
|
+
|
|
22
|
+
export { useAuthSession } from './auth-session';
|
|
23
|
+
export type { AuthTokens, AuthSessionState } from './auth-session';
|
|
24
|
+
|
|
25
|
+
export { defineConfig } from './config';
|
|
26
|
+
export type { TeactConfig } from './config';
|
|
27
|
+
|
|
28
|
+
export {
|
|
29
|
+
RuntimeContext,
|
|
30
|
+
useBot,
|
|
31
|
+
useSession,
|
|
32
|
+
usePlatform,
|
|
33
|
+
useChatId,
|
|
34
|
+
useText,
|
|
35
|
+
useCallbackData,
|
|
36
|
+
useCommand,
|
|
37
|
+
} from './context';
|
|
38
|
+
export type { RuntimeContextValue } from './context';
|
|
39
|
+
|
|
40
|
+
export {
|
|
41
|
+
useChat,
|
|
42
|
+
useTelegram,
|
|
43
|
+
usePhoto,
|
|
44
|
+
useVideo,
|
|
45
|
+
useAnimation,
|
|
46
|
+
useAudio,
|
|
47
|
+
useVoice,
|
|
48
|
+
useDocument,
|
|
49
|
+
useSticker,
|
|
50
|
+
useLocation,
|
|
51
|
+
useContact,
|
|
52
|
+
useVenue,
|
|
53
|
+
usePoll,
|
|
54
|
+
} from './media-hooks';
|
|
55
|
+
export type { ChatInfo, TelegramAccess } from './media-hooks';
|
|
56
|
+
|
|
57
|
+
export { useOn, useEventData } from './event-hooks';
|
|
58
|
+
export type { TelegramEvent, EventContext } from './event-hooks';
|
|
59
|
+
|
|
60
|
+
export { createI18n, useLocale } from './i18n';
|
|
61
|
+
export type { I18nConfig } from './i18n';
|
|
62
|
+
|
|
63
|
+
export { useInvoice } from './invoice';
|
|
64
|
+
export type { InvoiceConfig, InvoiceResult, LabeledPrice, SuccessfulPayment } from './invoice';
|