@prismshadow/penguin-server · packages/server/src/runtime/messaging/module.ts:45 · Child of MessagingHubModule

MessagingModule

module

No JSDoc comment in source yet.

API

@Module({
  contributes: {
    "HttpModule.routes": [
      {
        id: "messaging.session-routes",
        prefix: "/api/sessions",
        auth: "user",
        order: 280,
      },
    ],
  },
  children: [
    FeishuMessaging,
    TelegramMessaging,
    QqMessaging,
    WechatMessaging,
    QqScanFlow,
    WechatScanFlow,
  ],
})
export class MessagingModule {
  @Use() private readonly paths!: Paths;
  @Use() private readonly channels!: Channels;
  @Use() private readonly clock!: Clock;
  @Use() private readonly tuning!: MessagingTuning;
  @Use() private readonly log!: Log;
  @Use() private readonly messagingRepo!: MessagingBindings;
  @Use() private readonly sessionsRepo!: SessionIndex;
  @Use() private readonly workspaceFiles!: WorkspaceFiles;
  @Use() private readonly settings!: Settings;
  @Use() private readonly runner!: MessagingTaskRunner;
  @Use() private readonly errors!: Errors;
  @Use() private readonly access!: Access;
  @Provide() messaging!: Messaging;
  @Bind("messaging.session-routes") sessionRoutesRoutes!: Hono<AppEnv>;
  async setup({ contributions, effect }: ClassCtx);
}

Dependencies & Wiring

Extracted from class decorators
@Userequires (12)
paths: Paths · channels: Channels · clock: Clock · tuning: MessagingTuning · log: Log · messagingRepo: MessagingBindings · sessionsRepo: SessionIndex · workspaceFiles: WorkspaceFiles · settings: Settings · runner: MessagingTaskRunner · errors: Errors · access: Access
@Provideprovides (1)
messaging: Messaging
@Bindbinds (1)
sessionRoutesRoutes → messaging.session-routes: Hono<AppEnv>

Contributes

{
  "HttpModule.routes": [
    {
      "id": "messaging.session-routes",
      "prefix": "/api/sessions",
      "auth": "user",
      "order": 280
    }
  ]
}

Target slots: HttpModule.routes

Children (6)

FeishuMessaging

The feishu connector, contributed to messaging.connectors like any third-party one would be.

View component → (library/messaging/src/feishu-connector.ts:318)

@UserequiresFeishuSdkHandle
@Bindslotmessaging-feishu.connector

TelegramMessaging

The telegram connector, contributed to messaging.connectors like any third-party one would be.

View component → (library/messaging/src/telegram-connector.ts:601)

@Bindslotmessaging-telegram.connector

QqMessaging

The qq connector, contributed to messaging.connectors like any third-party one would be.

View component → (library/messaging/src/qq-connector.ts:784)

@Bindslotmessaging-qq.connector

WechatMessaging

The wechat connector, contributed to messaging.connectors like any third-party one would be.

View component → (library/messaging/src/wechat-connector.ts:1083)

@Bindslotmessaging-wechat.connector

QqScanFlow

QQ's scan flow, contributed to messaging.scanFlows the way its connector is contributed to messaging.connectors. A completed poll is answered with the scanned bot's appId.

View component → (library/messaging/src/qq-scan.ts:467)

@Bindslotmessaging-qq.scan-flow
@contributesslotsMessagingModule.scanFlows

WechatScanFlow

WeChat's scan flow, contributed to messaging.scanFlows the way its connector is contributed to messaging.connectors. A completed poll is answered with the scanned bot's botId.

View component → (library/messaging/src/wechat-scan.ts:504)

@Bindslotmessaging-wechat.scan-flow
@contributesslotsMessagingModule.scanFlows

Exports (0)

None (module-private).