@rodrigobeber/patoai-dtos 4.7.71 → 4.7.72

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.
@@ -14,3 +14,4 @@ export * from './sent-template.dto';
14
14
  export * from './send-text.dto';
15
15
  export * from './send-buttons.dto';
16
16
  export * from './message-status.dto';
17
+ export * from './telegram.dto';
package/dist/uh/index.js CHANGED
@@ -30,3 +30,4 @@ __exportStar(require("./sent-template.dto"), exports);
30
30
  __exportStar(require("./send-text.dto"), exports);
31
31
  __exportStar(require("./send-buttons.dto"), exports);
32
32
  __exportStar(require("./message-status.dto"), exports);
33
+ __exportStar(require("./telegram.dto"), exports);
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Contrato RPC crew -> uh para o ciclo de vida do webhook do Telegram.
3
+ *
4
+ * O onboarding e feito no crew, mas quem fala com a Bot API e o uh: o `secret_token`
5
+ * do webhook e o APP_SECRET do uh e a URL registrada e a rota do proprio uh
6
+ * (POST /telegram/:botId). Por isso getMe/setWebhook/deleteWebhook rodam la.
7
+ */
8
+ export interface TelegramSetupDto {
9
+ /** Token do bot no formato `<botId>:<hash>`, obtido no @BotFather. */
10
+ token: string;
11
+ }
12
+ export interface TelegramSetupResultDto {
13
+ /** Id numerico do bot (prefixo do token). Vira o `channelId` do canal. */
14
+ botId: string;
15
+ username: string;
16
+ firstName: string;
17
+ /** URL registrada no setWebhook (sem o secret da query). */
18
+ webhookUrl: string;
19
+ }
20
+ export interface TelegramWebhookInfoDto {
21
+ botId: string;
22
+ username: string;
23
+ /** URL atualmente registrada no Telegram. Vazia quando nao ha webhook. */
24
+ url: string;
25
+ pendingUpdateCount: number;
26
+ lastErrorMessage?: string;
27
+ /** Unix timestamp (segundos) do ultimo erro de entrega. */
28
+ lastErrorDate?: number;
29
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rodrigobeber/patoai-dtos",
3
- "version": "4.7.71",
3
+ "version": "4.7.72",
4
4
  "description": "Data Transfer Objects for PatoAI",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",