@acorex-platform/extension-communication-telegram-client 0.0.21

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.
@@ -0,0 +1,83 @@
1
+ declare const RootConfig: {
2
+ readonly module: {
3
+ readonly name: "CommunicationTelegramExtension";
4
+ readonly icon: "fa-brands fa-telegram";
5
+ };
6
+ readonly config: {
7
+ readonly i18n: "extensions-communication-telegram";
8
+ };
9
+ readonly integration: {
10
+ readonly channelKey: "telegram";
11
+ readonly providerId: "telegram";
12
+ };
13
+ };
14
+ declare const AXPCommunicationTelegramSettingKeys: {
15
+ /** Tenant-scoped bot token for Telegram delivery (IntegrationConnection is preferred at runtime). */
16
+ readonly BotToken: "CommunicationTelegramExtension:Setting:Tenant.BotToken";
17
+ readonly DebugRedirectChatId: "CommunicationTelegramExtension:Setting:Debug.Redirect.ChatId";
18
+ readonly UserDeliveryChannelEnabled: "CommunicationTelegramExtension:Setting:User.DeliveryChannel.Enabled";
19
+ };
20
+ /** Keys seeded at platform scope on startup (never include secrets). */
21
+ declare const AXP_COMMUNICATION_TELEGRAM_PLATFORM_SEED_DEFAULTS: Record<string, unknown>;
22
+ declare const AXP_COMMUNICATION_TELEGRAM_SETTING_DEFAULTS: Record<string, unknown>;
23
+ declare const AXECommunicationTelegramCommandKeys: {
24
+ readonly TestTelegram: "CommunicationTelegramExtension:Communication:TestTelegram";
25
+ readonly ConnectionConnect: "CommunicationTelegramExtension:Integration:Connect";
26
+ readonly LinkStart: "CommunicationTelegramExtension:Link:Start";
27
+ readonly LinkStatus: "CommunicationTelegramExtension:Link:Status";
28
+ };
29
+
30
+ /** Shared communication integration domain (Telegram, WhatsApp, …). */
31
+ declare const AXE_COMMUNICATION_DOMAIN_ID = "communication";
32
+
33
+ /**
34
+ * Tenant-scoped Telegram bot credentials stored on IntegrationConnection.config.
35
+ */
36
+ interface CommunicationTelegramTenantConnectionConfig {
37
+ botToken?: string;
38
+ }
39
+
40
+ declare const AXP_COMMUNICATION_TELEGRAM_ERROR_CODES: {
41
+ readonly CHAT_ID_REQUIRED: "COMMUNICATION_TELEGRAM_CHAT_ID_REQUIRED";
42
+ readonly BOT_TOKEN_NOT_CONFIGURED: "COMMUNICATION_TELEGRAM_BOT_TOKEN_NOT_CONFIGURED";
43
+ readonly TENANT_REQUIRED: "COMMUNICATION_TELEGRAM_TENANT_REQUIRED";
44
+ readonly CHAT_NOT_FOUND: "COMMUNICATION_TELEGRAM_CHAT_NOT_FOUND";
45
+ readonly BOT_UNAUTHORIZED: "COMMUNICATION_TELEGRAM_BOT_UNAUTHORIZED";
46
+ readonly BOT_BLOCKED: "COMMUNICATION_TELEGRAM_BOT_BLOCKED";
47
+ readonly BOT_CANNOT_INITIATE: "COMMUNICATION_TELEGRAM_BOT_CANNOT_INITIATE";
48
+ readonly API_ERROR: "COMMUNICATION_TELEGRAM_API_ERROR";
49
+ };
50
+ type AXPCommunicationTelegramErrorCode = (typeof AXP_COMMUNICATION_TELEGRAM_ERROR_CODES)[keyof typeof AXP_COMMUNICATION_TELEGRAM_ERROR_CODES];
51
+ interface AXPCommunicationTelegramApiErrorPayload {
52
+ code: AXPCommunicationTelegramErrorCode;
53
+ description?: string;
54
+ }
55
+
56
+ interface CommunicationTelegramLinkStartResult {
57
+ linkToken: string;
58
+ deepLinkUrl: string;
59
+ botUsername: string;
60
+ expiresAt: string;
61
+ }
62
+ type CommunicationTelegramLinkStatus = 'pending' | 'linked' | 'expired';
63
+ interface CommunicationTelegramLinkStatusResult {
64
+ status: CommunicationTelegramLinkStatus;
65
+ chatId?: string;
66
+ username?: string;
67
+ displayName?: string;
68
+ }
69
+ interface CommunicationTelegramUserLinkConfig {
70
+ chatId: string;
71
+ username?: string | null;
72
+ }
73
+
74
+ interface CommunicationTelegramTestInput {
75
+ chatId: string;
76
+ }
77
+ interface CommunicationTelegramTestResult {
78
+ chatId: string;
79
+ messageId?: number;
80
+ }
81
+
82
+ export { AXECommunicationTelegramCommandKeys, AXE_COMMUNICATION_DOMAIN_ID, AXPCommunicationTelegramSettingKeys, AXP_COMMUNICATION_TELEGRAM_ERROR_CODES, AXP_COMMUNICATION_TELEGRAM_PLATFORM_SEED_DEFAULTS, AXP_COMMUNICATION_TELEGRAM_SETTING_DEFAULTS, RootConfig };
83
+ export type { AXPCommunicationTelegramApiErrorPayload, AXPCommunicationTelegramErrorCode, CommunicationTelegramLinkStartResult, CommunicationTelegramLinkStatus, CommunicationTelegramLinkStatusResult, CommunicationTelegramTenantConnectionConfig, CommunicationTelegramTestInput, CommunicationTelegramTestResult, CommunicationTelegramUserLinkConfig };
@@ -0,0 +1,40 @@
1
+ import * as i0 from '@angular/core';
2
+ import * as i1 from '@acorex-platform/module-integration-management-client';
3
+ import { CommunicationTelegramTestInput, CommunicationTelegramTestResult, CommunicationTelegramLinkStartResult, CommunicationTelegramLinkStatusResult } from '@acorex-platform/extension-communication-telegram-client/contracts';
4
+ import { AXPLogoAppearance, AXPLogoProvider } from '@acorex-platform/framework-client/core';
5
+
6
+ declare class AXECommunicationTelegramExtensionModule {
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXECommunicationTelegramExtensionModule, never>;
8
+ static ɵmod: i0.ɵɵNgModuleDeclaration<AXECommunicationTelegramExtensionModule, never, [typeof i1.AXMIntegrationManagementModule], never>;
9
+ static ɵinj: i0.ɵɵInjectorDeclaration<AXECommunicationTelegramExtensionModule>;
10
+ }
11
+
12
+ declare abstract class AXPCommunicationTelegramClient {
13
+ abstract testTelegram(input: CommunicationTelegramTestInput): Promise<CommunicationTelegramTestResult>;
14
+ abstract startTelegramLink(): Promise<CommunicationTelegramLinkStartResult>;
15
+ abstract getTelegramLinkStatus(linkToken: string): Promise<CommunicationTelegramLinkStatusResult>;
16
+ }
17
+
18
+ declare class AXECommunicationTelegramLogoComponent {
19
+ appearance: i0.InputSignal<AXPLogoAppearance>;
20
+ size: i0.InputSignal<number>;
21
+ protected readonly markPath = "M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z";
22
+ protected readonly markBlue = "#26A5E4";
23
+ protected readonly resolvedAppearance: i0.Signal<"colored" | "monochrome">;
24
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXECommunicationTelegramLogoComponent, never>;
25
+ static ɵcmp: i0.ɵɵComponentDeclaration<AXECommunicationTelegramLogoComponent, "axe-telegram-logo", never, { "appearance": { "alias": "appearance"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
26
+ }
27
+
28
+ declare const axpTelegramLogoKey: "telegram";
29
+
30
+ declare const AXE_TELEGRAM_MARK_BLUE = "#26A5E4";
31
+ /** Circle + paper plane (Telegram brand mark). */
32
+ declare const AXE_TELEGRAM_MARK_PATH = "M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z";
33
+
34
+ declare const AXE_TELEGRAM_LOGO_PROVIDER: {
35
+ readonly provide: i0.InjectionToken<AXPLogoProvider[]>;
36
+ readonly useValue: AXPLogoProvider;
37
+ readonly multi: true;
38
+ };
39
+
40
+ export { AXECommunicationTelegramExtensionModule, AXECommunicationTelegramLogoComponent, AXE_TELEGRAM_LOGO_PROVIDER, AXE_TELEGRAM_MARK_BLUE, AXE_TELEGRAM_MARK_PATH, AXPCommunicationTelegramClient, axpTelegramLogoKey };