@wrcb/cb-common 1.0.904 → 1.0.906

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/build/index.d.ts CHANGED
@@ -60,6 +60,7 @@ export * from './types/trabalhoHomeOffice';
60
60
  export * from './types/crm';
61
61
  export * from './types/clinica';
62
62
  export * from './types/companion';
63
+ export * from './types/telegram';
63
64
  export * from './events/subjects';
64
65
  export * from './events/baseListener';
65
66
  export * from './events/basePublisher';
package/build/index.js CHANGED
@@ -88,6 +88,7 @@ __exportStar(require("./types/trabalhoHomeOffice"), exports);
88
88
  __exportStar(require("./types/crm"), exports);
89
89
  __exportStar(require("./types/clinica"), exports);
90
90
  __exportStar(require("./types/companion"), exports);
91
+ __exportStar(require("./types/telegram"), exports);
91
92
  __exportStar(require("./events/subjects"), exports);
92
93
  __exportStar(require("./events/baseListener"), exports);
93
94
  __exportStar(require("./events/basePublisher"), exports);
@@ -82,8 +82,6 @@ export interface ClinicaProfessionalRules {
82
82
  reminders: ClinicaReminder[];
83
83
  photosEnabled: boolean;
84
84
  }
85
- /** 1 = só informa, 3 = equilibrada (padrão), 5 = máxima. */
86
- export type ClinicaAggressiveness = 1 | 2 | 3 | 4 | 5;
87
85
  /** Foto de resultado de um atendimento do catálogo. */
88
86
  export interface ClinicaServicePhoto {
89
87
  id: string;
@@ -134,7 +134,7 @@ var ClinicaAssistantActionType;
134
134
  ClinicaAssistantActionType["ActivateCampaign"] = "ActivateCampaign";
135
135
  ClinicaAssistantActionType["SetCampaignBudget"] = "SetCampaignBudget";
136
136
  ClinicaAssistantActionType["CreateCampaignFromPost"] = "CreateCampaignFromPost";
137
- // Funil: cria ou muda uma etapa (nome, descrição, IA, insistência e as
137
+ // Funil: cria ou muda uma etapa (nome, descrição, IA, como agir e as
138
138
  // mensagens da etapa). Follow-ups: a lista inteira de passos da cadência.
139
139
  ClinicaAssistantActionType["SaveStage"] = "SaveStage";
140
140
  ClinicaAssistantActionType["SaveFollowUps"] = "SaveFollowUps";
@@ -49,7 +49,7 @@ export interface CrmStage {
49
49
  isWon: boolean;
50
50
  isLost: boolean;
51
51
  slaMinutes: number | null;
52
- aggressiveness?: number | null;
52
+ aiInstructions?: string | null;
53
53
  messages?: CrmStageMessage[];
54
54
  }
55
55
  /**
@@ -0,0 +1,56 @@
1
+ import { CompanionCard } from './companion';
2
+ export interface TelegramUser {
3
+ id: number;
4
+ is_bot: boolean;
5
+ first_name: string;
6
+ username?: string;
7
+ /** Idioma do app da pessoa, ex.: "pt-br". */
8
+ language_code?: string;
9
+ }
10
+ export interface TelegramChat {
11
+ id: number;
12
+ type: string;
13
+ }
14
+ export interface TelegramBusinessBotRights {
15
+ /** Pode responder nas conversas privadas com mensagem recebida nas últimas 24h. */
16
+ can_reply?: boolean;
17
+ /** Pode marcar mensagens recebidas como lidas. */
18
+ can_read_messages?: boolean;
19
+ }
20
+ export interface TelegramBusinessConnection {
21
+ id: string;
22
+ /** A conta que conectou o bot: a conta da influencer. */
23
+ user: TelegramUser;
24
+ user_chat_id: number;
25
+ date: number;
26
+ rights?: TelegramBusinessBotRights;
27
+ is_enabled: boolean;
28
+ }
29
+ export interface TelegramMessage {
30
+ message_id: number;
31
+ date: number;
32
+ chat: TelegramChat;
33
+ from?: TelegramUser;
34
+ business_connection_id?: string;
35
+ /** O bot que enviou em nome da conta. Só em mensagem de saída. */
36
+ sender_business_bot?: TelegramUser;
37
+ text?: string;
38
+ caption?: string;
39
+ photo?: unknown[];
40
+ video?: unknown;
41
+ video_note?: unknown;
42
+ voice?: unknown;
43
+ audio?: unknown;
44
+ sticker?: unknown;
45
+ document?: unknown;
46
+ }
47
+ export interface TelegramUpdate {
48
+ update_id: number;
49
+ business_connection?: TelegramBusinessConnection;
50
+ business_message?: TelegramMessage;
51
+ }
52
+ /** O card da página /telegram: o card público mais o link da conta. */
53
+ export interface TelegramCompanionCard extends CompanionCard {
54
+ /** https://t.me/<usuario> */
55
+ telegramUrl: string;
56
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -197,7 +197,8 @@ export interface ThoSettingsData {
197
197
  }
198
198
  export declare enum ThoAutopostNetwork {
199
199
  Facebook = "Facebook",
200
- Telegram = "Telegram"
200
+ Telegram = "Telegram",
201
+ Instagram = "Instagram"
201
202
  }
202
203
  export interface ThoAutopostNextData {
203
204
  jobListing: JobListingDTO;
@@ -206,6 +207,17 @@ export interface ThoAutopostNextData {
206
207
  imageUrl: string;
207
208
  jobUrl: string;
208
209
  }
210
+ export interface ThoAutopostBatchItem {
211
+ jobListing: JobListingDTO;
212
+ jobUrl: string;
213
+ }
214
+ export interface ThoAutopostBatchData {
215
+ network: ThoAutopostNetwork;
216
+ items: ThoAutopostBatchItem[];
217
+ }
218
+ export interface ThoAutopostReleaseData {
219
+ released: number;
220
+ }
209
221
  export interface ThoAiProfileBioRequest {
210
222
  categoryIds?: string[];
211
223
  languages?: string[];
@@ -234,15 +234,19 @@ var ThoPaymentMode;
234
234
  // URL da arte, e a marca como publicada na mesma chamada. Cada rede tem a sua
235
235
  // fila: a mesma vaga sai no Facebook e no Telegram, cada uma no seu momento.
236
236
  //
237
- // Dois consumidores hoje, mesma rota:
238
- // Facebook — agente dirigindo o Chrome fora do cluster, porque grupo do
239
- // Facebook não tem API.
240
- // Telegram — workflow do n8n, que tem API e não precisa de navegador.
237
+ // Consumidores hoje:
238
+ // Facebook — agente dirigindo o Chrome fora do cluster, porque grupo do
239
+ // Facebook não tem API. Usa /autopost/next.
240
+ // Telegram — workflow do n8n, que tem API e não precisa de navegador. Usa
241
+ // /autopost/next.
242
+ // Instagram — n8n montando carrossel e reels. Usa /autopost/batch, que entrega
243
+ // várias vagas de uma vez, sem legenda nem arte por vaga.
241
244
  // ---------------------------------------------------------------------------
242
- // Redes atendidas pelo autopost. Instagram e TikTok entram aqui quando a
243
- // página tiver audiência.
245
+ // Redes atendidas pelo autopost. TikTok entra aqui quando a página tiver
246
+ // audiência.
244
247
  var ThoAutopostNetwork;
245
248
  (function (ThoAutopostNetwork) {
246
249
  ThoAutopostNetwork["Facebook"] = "Facebook";
247
250
  ThoAutopostNetwork["Telegram"] = "Telegram";
251
+ ThoAutopostNetwork["Instagram"] = "Instagram";
248
252
  })(ThoAutopostNetwork || (exports.ThoAutopostNetwork = ThoAutopostNetwork = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wrcb/cb-common",
3
- "version": "1.0.904",
3
+ "version": "1.0.906",
4
4
  "description": "Common resources between services",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",