evo360-types 1.3.385 → 1.3.386

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.
@@ -10,6 +10,8 @@ export declare const zChannelProviderRefSchema: z.ZodObject<{
10
10
  token_expires_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
11
11
  username: z.ZodOptional<z.ZodString>;
12
12
  token_health: z.ZodOptional<z.ZodEnum<["ok", "expiring", "failed"]>>;
13
+ conversions_dataset_id: z.ZodOptional<z.ZodString>;
14
+ conversions_dataset_source: z.ZodOptional<z.ZodEnum<["manual", "auto"]>>;
13
15
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
14
16
  channel_id: z.ZodOptional<z.ZodString>;
15
17
  channel_uuid: z.ZodOptional<z.ZodString>;
@@ -21,6 +23,8 @@ export declare const zChannelProviderRefSchema: z.ZodObject<{
21
23
  token_expires_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
22
24
  username: z.ZodOptional<z.ZodString>;
23
25
  token_health: z.ZodOptional<z.ZodEnum<["ok", "expiring", "failed"]>>;
26
+ conversions_dataset_id: z.ZodOptional<z.ZodString>;
27
+ conversions_dataset_source: z.ZodOptional<z.ZodEnum<["manual", "auto"]>>;
24
28
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
25
29
  channel_id: z.ZodOptional<z.ZodString>;
26
30
  channel_uuid: z.ZodOptional<z.ZodString>;
@@ -32,6 +36,8 @@ export declare const zChannelProviderRefSchema: z.ZodObject<{
32
36
  token_expires_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
33
37
  username: z.ZodOptional<z.ZodString>;
34
38
  token_health: z.ZodOptional<z.ZodEnum<["ok", "expiring", "failed"]>>;
39
+ conversions_dataset_id: z.ZodOptional<z.ZodString>;
40
+ conversions_dataset_source: z.ZodOptional<z.ZodEnum<["manual", "auto"]>>;
35
41
  }, z.ZodTypeAny, "passthrough">>;
36
42
  export declare const zChannelSchema: z.ZodObject<{
37
43
  id: z.ZodString;
@@ -60,6 +66,8 @@ export declare const zChannelSchema: z.ZodObject<{
60
66
  token_expires_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
61
67
  username: z.ZodOptional<z.ZodString>;
62
68
  token_health: z.ZodOptional<z.ZodEnum<["ok", "expiring", "failed"]>>;
69
+ conversions_dataset_id: z.ZodOptional<z.ZodString>;
70
+ conversions_dataset_source: z.ZodOptional<z.ZodEnum<["manual", "auto"]>>;
63
71
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
64
72
  channel_id: z.ZodOptional<z.ZodString>;
65
73
  channel_uuid: z.ZodOptional<z.ZodString>;
@@ -71,6 +79,8 @@ export declare const zChannelSchema: z.ZodObject<{
71
79
  token_expires_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
72
80
  username: z.ZodOptional<z.ZodString>;
73
81
  token_health: z.ZodOptional<z.ZodEnum<["ok", "expiring", "failed"]>>;
82
+ conversions_dataset_id: z.ZodOptional<z.ZodString>;
83
+ conversions_dataset_source: z.ZodOptional<z.ZodEnum<["manual", "auto"]>>;
74
84
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
75
85
  channel_id: z.ZodOptional<z.ZodString>;
76
86
  channel_uuid: z.ZodOptional<z.ZodString>;
@@ -82,6 +92,8 @@ export declare const zChannelSchema: z.ZodObject<{
82
92
  token_expires_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
83
93
  username: z.ZodOptional<z.ZodString>;
84
94
  token_health: z.ZodOptional<z.ZodEnum<["ok", "expiring", "failed"]>>;
95
+ conversions_dataset_id: z.ZodOptional<z.ZodString>;
96
+ conversions_dataset_source: z.ZodOptional<z.ZodEnum<["manual", "auto"]>>;
85
97
  }, z.ZodTypeAny, "passthrough">>;
86
98
  hub_ia: z.ZodOptional<z.ZodAny>;
87
99
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
@@ -111,6 +123,8 @@ export declare const zChannelSchema: z.ZodObject<{
111
123
  token_expires_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
112
124
  username: z.ZodOptional<z.ZodString>;
113
125
  token_health: z.ZodOptional<z.ZodEnum<["ok", "expiring", "failed"]>>;
126
+ conversions_dataset_id: z.ZodOptional<z.ZodString>;
127
+ conversions_dataset_source: z.ZodOptional<z.ZodEnum<["manual", "auto"]>>;
114
128
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
115
129
  channel_id: z.ZodOptional<z.ZodString>;
116
130
  channel_uuid: z.ZodOptional<z.ZodString>;
@@ -122,6 +136,8 @@ export declare const zChannelSchema: z.ZodObject<{
122
136
  token_expires_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
123
137
  username: z.ZodOptional<z.ZodString>;
124
138
  token_health: z.ZodOptional<z.ZodEnum<["ok", "expiring", "failed"]>>;
139
+ conversions_dataset_id: z.ZodOptional<z.ZodString>;
140
+ conversions_dataset_source: z.ZodOptional<z.ZodEnum<["manual", "auto"]>>;
125
141
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
126
142
  channel_id: z.ZodOptional<z.ZodString>;
127
143
  channel_uuid: z.ZodOptional<z.ZodString>;
@@ -133,6 +149,8 @@ export declare const zChannelSchema: z.ZodObject<{
133
149
  token_expires_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
134
150
  username: z.ZodOptional<z.ZodString>;
135
151
  token_health: z.ZodOptional<z.ZodEnum<["ok", "expiring", "failed"]>>;
152
+ conversions_dataset_id: z.ZodOptional<z.ZodString>;
153
+ conversions_dataset_source: z.ZodOptional<z.ZodEnum<["manual", "auto"]>>;
136
154
  }, z.ZodTypeAny, "passthrough">>;
137
155
  hub_ia: z.ZodOptional<z.ZodAny>;
138
156
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
@@ -162,6 +180,8 @@ export declare const zChannelSchema: z.ZodObject<{
162
180
  token_expires_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
163
181
  username: z.ZodOptional<z.ZodString>;
164
182
  token_health: z.ZodOptional<z.ZodEnum<["ok", "expiring", "failed"]>>;
183
+ conversions_dataset_id: z.ZodOptional<z.ZodString>;
184
+ conversions_dataset_source: z.ZodOptional<z.ZodEnum<["manual", "auto"]>>;
165
185
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
166
186
  channel_id: z.ZodOptional<z.ZodString>;
167
187
  channel_uuid: z.ZodOptional<z.ZodString>;
@@ -173,6 +193,8 @@ export declare const zChannelSchema: z.ZodObject<{
173
193
  token_expires_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
174
194
  username: z.ZodOptional<z.ZodString>;
175
195
  token_health: z.ZodOptional<z.ZodEnum<["ok", "expiring", "failed"]>>;
196
+ conversions_dataset_id: z.ZodOptional<z.ZodString>;
197
+ conversions_dataset_source: z.ZodOptional<z.ZodEnum<["manual", "auto"]>>;
176
198
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
177
199
  channel_id: z.ZodOptional<z.ZodString>;
178
200
  channel_uuid: z.ZodOptional<z.ZodString>;
@@ -184,6 +206,8 @@ export declare const zChannelSchema: z.ZodObject<{
184
206
  token_expires_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
185
207
  username: z.ZodOptional<z.ZodString>;
186
208
  token_health: z.ZodOptional<z.ZodEnum<["ok", "expiring", "failed"]>>;
209
+ conversions_dataset_id: z.ZodOptional<z.ZodString>;
210
+ conversions_dataset_source: z.ZodOptional<z.ZodEnum<["manual", "auto"]>>;
187
211
  }, z.ZodTypeAny, "passthrough">>;
188
212
  hub_ia: z.ZodOptional<z.ZodAny>;
189
213
  }, z.ZodTypeAny, "passthrough">>;
@@ -15,6 +15,9 @@ exports.zChannelProviderRefSchema = zod_1.z.object({
15
15
  token_expires_at: zod_1.z.coerce.date().nullable().optional(),
16
16
  username: zod_1.z.string().optional(),
17
17
  token_health: zod_1.z.enum(['ok', 'expiring', 'failed']).optional(),
18
+ // CAPI Business Messaging (feat-034)
19
+ conversions_dataset_id: zod_1.z.string().optional(),
20
+ conversions_dataset_source: zod_1.z.enum(['manual', 'auto']).optional(),
18
21
  }).passthrough();
19
22
  exports.zChannelSchema = zod_schemas_1.zFireDocSchema
20
23
  .extend({
@@ -13,6 +13,9 @@ export const zChannelProviderRefSchema = z.object({
13
13
  token_expires_at: z.coerce.date().nullable().optional(),
14
14
  username: z.string().optional(),
15
15
  token_health: z.enum(['ok', 'expiring', 'failed']).optional(),
16
+ // CAPI Business Messaging (feat-034)
17
+ conversions_dataset_id: z.string().optional(),
18
+ conversions_dataset_source: z.enum(['manual', 'auto']).optional(),
16
19
  }).passthrough();
17
20
 
18
21
  export const zChannelSchema = zFireDocSchema
@@ -15,6 +15,8 @@ export interface IChannelProviderRef {
15
15
  token_expires_at?: Date | null;
16
16
  username?: string;
17
17
  token_health?: IgTokenHealth;
18
+ conversions_dataset_id?: string;
19
+ conversions_dataset_source?: 'manual' | 'auto';
18
20
  }
19
21
  export interface ICallDeflectionConfig {
20
22
  enabled: boolean;
@@ -25,6 +25,9 @@ export interface IChannelProviderRef {
25
25
  token_expires_at?: Date | null; // expiração do long-lived token
26
26
  username?: string; // @handle da conta business
27
27
  token_health?: IgTokenHealth; // saúde do refresh (cron DS1)
28
+ // CAPI Business Messaging (feat-034) — Dataset/Pixel id associado ao WABA (Events Manager).
29
+ conversions_dataset_id?: string;
30
+ conversions_dataset_source?: 'manual' | 'auto';
28
31
  }
29
32
 
30
33
  // ── Calls config (feat-029) ──
@@ -16,5 +16,6 @@ export interface IThread extends IFireDoc {
16
16
  last_message_type?: string;
17
17
  last_message_channel_id?: string;
18
18
  conversation_windows?: Record<string, IConversationWindow>;
19
+ ctwa_clid?: string | null;
19
20
  [key: string]: unknown;
20
21
  }
@@ -31,5 +31,8 @@ export interface IThread extends IFireDoc {
31
31
  // Conversation windows (key = channelId)
32
32
  conversation_windows?: Record<string, IConversationWindow>;
33
33
 
34
+ // CTWA attribution (feat-034) — espelhado do lead p/ o botão de conversão ler sem resolver o lead.
35
+ ctwa_clid?: string | null;
36
+
34
37
  [key: string]: unknown;
35
38
  }
@@ -41,5 +41,15 @@ export interface ILead extends IProfile {
41
41
  notes?: string | null;
42
42
  tags?: ITag[] | null;
43
43
  userRef?: FirestoreDocumentReference;
44
+ ctwa_clid?: string | null;
45
+ ctwa_referral?: {
46
+ source_type?: string;
47
+ source_id?: string;
48
+ source_url?: string;
49
+ headline?: string;
50
+ body?: string;
51
+ media_type?: string;
52
+ captured_at?: Date | string | null;
53
+ } | null;
44
54
  [key: string]: unknown;
45
55
  }
@@ -56,5 +56,16 @@ export interface ILead extends IProfile {
56
56
  notes?: string | null; // Anotações sobre o lead
57
57
  tags?: ITag[] | null;
58
58
  userRef?: FirestoreDocumentReference;
59
+ // CTWA attribution (feat-034) — capturado do referral do 1º inbound vindo de anúncio Click-to-WhatsApp.
60
+ ctwa_clid?: string | null;
61
+ ctwa_referral?: {
62
+ source_type?: string;
63
+ source_id?: string;
64
+ source_url?: string;
65
+ headline?: string;
66
+ body?: string;
67
+ media_type?: string;
68
+ captured_at?: Date | string | null;
69
+ } | null;
59
70
  [key: string]: unknown; // index signature
60
71
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "evo360-types",
3
- "version": "1.3.385",
3
+ "version": "1.3.386",
4
4
  "description": "HREVO360 Shared Types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",