evo360-types 1.3.600 → 1.3.604

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.
@@ -29,71 +29,71 @@ export declare const zHubiaV1ChannelConfigSchema: z.ZodObject<{
29
29
  version: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
30
30
  updated_at: z.ZodOptional<z.ZodOptional<z.ZodAny>>;
31
31
  }, "strip", z.ZodTypeAny, {
32
+ text?: string | undefined;
32
33
  version?: number | undefined;
33
34
  updated_at?: any;
34
- text?: string | undefined;
35
35
  }, {
36
+ text?: string | undefined;
36
37
  version?: number | undefined;
37
38
  updated_at?: any;
38
- text?: string | undefined;
39
39
  }>>;
40
40
  safety: z.ZodOptional<z.ZodObject<{
41
41
  text: z.ZodOptional<z.ZodDefault<z.ZodString>>;
42
42
  version: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
43
43
  updated_at: z.ZodOptional<z.ZodOptional<z.ZodAny>>;
44
44
  }, "strip", z.ZodTypeAny, {
45
+ text?: string | undefined;
45
46
  version?: number | undefined;
46
47
  updated_at?: any;
47
- text?: string | undefined;
48
48
  }, {
49
+ text?: string | undefined;
49
50
  version?: number | undefined;
50
51
  updated_at?: any;
51
- text?: string | undefined;
52
52
  }>>;
53
53
  channel_custom: z.ZodOptional<z.ZodObject<{
54
54
  text: z.ZodOptional<z.ZodDefault<z.ZodString>>;
55
55
  version: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
56
56
  updated_at: z.ZodOptional<z.ZodOptional<z.ZodAny>>;
57
57
  }, "strip", z.ZodTypeAny, {
58
+ text?: string | undefined;
58
59
  version?: number | undefined;
59
60
  updated_at?: any;
60
- text?: string | undefined;
61
61
  }, {
62
+ text?: string | undefined;
62
63
  version?: number | undefined;
63
64
  updated_at?: any;
64
- text?: string | undefined;
65
65
  }>>;
66
66
  }, "strip", z.ZodTypeAny, {
67
67
  identity?: {
68
+ text?: string | undefined;
68
69
  version?: number | undefined;
69
70
  updated_at?: any;
70
- text?: string | undefined;
71
71
  } | undefined;
72
72
  safety?: {
73
+ text?: string | undefined;
73
74
  version?: number | undefined;
74
75
  updated_at?: any;
75
- text?: string | undefined;
76
76
  } | undefined;
77
77
  channel_custom?: {
78
+ text?: string | undefined;
78
79
  version?: number | undefined;
79
80
  updated_at?: any;
80
- text?: string | undefined;
81
81
  } | undefined;
82
82
  }, {
83
83
  identity?: {
84
+ text?: string | undefined;
84
85
  version?: number | undefined;
85
86
  updated_at?: any;
86
- text?: string | undefined;
87
87
  } | undefined;
88
88
  safety?: {
89
+ text?: string | undefined;
89
90
  version?: number | undefined;
90
91
  updated_at?: any;
91
- text?: string | undefined;
92
92
  } | undefined;
93
93
  channel_custom?: {
94
+ text?: string | undefined;
94
95
  version?: number | undefined;
95
96
  updated_at?: any;
96
- text?: string | undefined;
97
97
  } | undefined;
98
98
  }>>;
99
99
  toolkit_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -159,71 +159,71 @@ export declare const zHubiaV1ChannelConfigSchema: z.ZodObject<{
159
159
  version: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
160
160
  updated_at: z.ZodOptional<z.ZodOptional<z.ZodAny>>;
161
161
  }, "strip", z.ZodTypeAny, {
162
+ text?: string | undefined;
162
163
  version?: number | undefined;
163
164
  updated_at?: any;
164
- text?: string | undefined;
165
165
  }, {
166
+ text?: string | undefined;
166
167
  version?: number | undefined;
167
168
  updated_at?: any;
168
- text?: string | undefined;
169
169
  }>>;
170
170
  safety: z.ZodOptional<z.ZodObject<{
171
171
  text: z.ZodOptional<z.ZodDefault<z.ZodString>>;
172
172
  version: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
173
173
  updated_at: z.ZodOptional<z.ZodOptional<z.ZodAny>>;
174
174
  }, "strip", z.ZodTypeAny, {
175
+ text?: string | undefined;
175
176
  version?: number | undefined;
176
177
  updated_at?: any;
177
- text?: string | undefined;
178
178
  }, {
179
+ text?: string | undefined;
179
180
  version?: number | undefined;
180
181
  updated_at?: any;
181
- text?: string | undefined;
182
182
  }>>;
183
183
  channel_custom: z.ZodOptional<z.ZodObject<{
184
184
  text: z.ZodOptional<z.ZodDefault<z.ZodString>>;
185
185
  version: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
186
186
  updated_at: z.ZodOptional<z.ZodOptional<z.ZodAny>>;
187
187
  }, "strip", z.ZodTypeAny, {
188
+ text?: string | undefined;
188
189
  version?: number | undefined;
189
190
  updated_at?: any;
190
- text?: string | undefined;
191
191
  }, {
192
+ text?: string | undefined;
192
193
  version?: number | undefined;
193
194
  updated_at?: any;
194
- text?: string | undefined;
195
195
  }>>;
196
196
  }, "strip", z.ZodTypeAny, {
197
197
  identity?: {
198
+ text?: string | undefined;
198
199
  version?: number | undefined;
199
200
  updated_at?: any;
200
- text?: string | undefined;
201
201
  } | undefined;
202
202
  safety?: {
203
+ text?: string | undefined;
203
204
  version?: number | undefined;
204
205
  updated_at?: any;
205
- text?: string | undefined;
206
206
  } | undefined;
207
207
  channel_custom?: {
208
+ text?: string | undefined;
208
209
  version?: number | undefined;
209
210
  updated_at?: any;
210
- text?: string | undefined;
211
211
  } | undefined;
212
212
  }, {
213
213
  identity?: {
214
+ text?: string | undefined;
214
215
  version?: number | undefined;
215
216
  updated_at?: any;
216
- text?: string | undefined;
217
217
  } | undefined;
218
218
  safety?: {
219
+ text?: string | undefined;
219
220
  version?: number | undefined;
220
221
  updated_at?: any;
221
- text?: string | undefined;
222
222
  } | undefined;
223
223
  channel_custom?: {
224
+ text?: string | undefined;
224
225
  version?: number | undefined;
225
226
  updated_at?: any;
226
- text?: string | undefined;
227
227
  } | undefined;
228
228
  }>>;
229
229
  toolkit_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -289,71 +289,71 @@ export declare const zHubiaV1ChannelConfigSchema: z.ZodObject<{
289
289
  version: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
290
290
  updated_at: z.ZodOptional<z.ZodOptional<z.ZodAny>>;
291
291
  }, "strip", z.ZodTypeAny, {
292
+ text?: string | undefined;
292
293
  version?: number | undefined;
293
294
  updated_at?: any;
294
- text?: string | undefined;
295
295
  }, {
296
+ text?: string | undefined;
296
297
  version?: number | undefined;
297
298
  updated_at?: any;
298
- text?: string | undefined;
299
299
  }>>;
300
300
  safety: z.ZodOptional<z.ZodObject<{
301
301
  text: z.ZodOptional<z.ZodDefault<z.ZodString>>;
302
302
  version: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
303
303
  updated_at: z.ZodOptional<z.ZodOptional<z.ZodAny>>;
304
304
  }, "strip", z.ZodTypeAny, {
305
+ text?: string | undefined;
305
306
  version?: number | undefined;
306
307
  updated_at?: any;
307
- text?: string | undefined;
308
308
  }, {
309
+ text?: string | undefined;
309
310
  version?: number | undefined;
310
311
  updated_at?: any;
311
- text?: string | undefined;
312
312
  }>>;
313
313
  channel_custom: z.ZodOptional<z.ZodObject<{
314
314
  text: z.ZodOptional<z.ZodDefault<z.ZodString>>;
315
315
  version: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
316
316
  updated_at: z.ZodOptional<z.ZodOptional<z.ZodAny>>;
317
317
  }, "strip", z.ZodTypeAny, {
318
+ text?: string | undefined;
318
319
  version?: number | undefined;
319
320
  updated_at?: any;
320
- text?: string | undefined;
321
321
  }, {
322
+ text?: string | undefined;
322
323
  version?: number | undefined;
323
324
  updated_at?: any;
324
- text?: string | undefined;
325
325
  }>>;
326
326
  }, "strip", z.ZodTypeAny, {
327
327
  identity?: {
328
+ text?: string | undefined;
328
329
  version?: number | undefined;
329
330
  updated_at?: any;
330
- text?: string | undefined;
331
331
  } | undefined;
332
332
  safety?: {
333
+ text?: string | undefined;
333
334
  version?: number | undefined;
334
335
  updated_at?: any;
335
- text?: string | undefined;
336
336
  } | undefined;
337
337
  channel_custom?: {
338
+ text?: string | undefined;
338
339
  version?: number | undefined;
339
340
  updated_at?: any;
340
- text?: string | undefined;
341
341
  } | undefined;
342
342
  }, {
343
343
  identity?: {
344
+ text?: string | undefined;
344
345
  version?: number | undefined;
345
346
  updated_at?: any;
346
- text?: string | undefined;
347
347
  } | undefined;
348
348
  safety?: {
349
+ text?: string | undefined;
349
350
  version?: number | undefined;
350
351
  updated_at?: any;
351
- text?: string | undefined;
352
352
  } | undefined;
353
353
  channel_custom?: {
354
+ text?: string | undefined;
354
355
  version?: number | undefined;
355
356
  updated_at?: any;
356
- text?: string | undefined;
357
357
  } | undefined;
358
358
  }>>;
359
359
  toolkit_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -280,9 +280,9 @@ export declare const zAppointmentStatusSchema: z.ZodObject<{
280
280
  }, "strip", z.ZodTypeAny, {
281
281
  name: string;
282
282
  id: string;
283
+ order: number;
283
284
  tenant: string;
284
285
  model_ver: number;
285
- order: number;
286
286
  base_type: "cancelled" | "scheduled" | "confirmed" | "rescheduled" | "pre_checkin" | "waiting" | "in_progress" | "completed" | "no_show" | "cancelled_by_clinic" | "cancelled_by_patient" | "extra_slot" | "awaiting_payment" | "paid" | "awaiting_documents" | "blocked" | "waiting_list" | "expired";
287
287
  ref?: any;
288
288
  created_at?: Date | null | undefined;
@@ -292,8 +292,8 @@ export declare const zAppointmentStatusSchema: z.ZodObject<{
292
292
  }, {
293
293
  name: string;
294
294
  id: string;
295
- tenant: string;
296
295
  order: number;
296
+ tenant: string;
297
297
  base_type: "cancelled" | "scheduled" | "confirmed" | "rescheduled" | "pre_checkin" | "waiting" | "in_progress" | "completed" | "no_show" | "cancelled_by_clinic" | "cancelled_by_patient" | "extra_slot" | "awaiting_payment" | "paid" | "awaiting_documents" | "blocked" | "waiting_list" | "expired";
298
298
  ref?: any;
299
299
  model_ver?: number | undefined;
@@ -318,9 +318,9 @@ export declare const zAppointmentTypeSchema: z.ZodObject<{
318
318
  }, "strip", z.ZodTypeAny, {
319
319
  name: string;
320
320
  id: string;
321
+ order: number;
321
322
  tenant: string;
322
323
  model_ver: number;
323
- order: number;
324
324
  base_type: "blocked" | "consultation" | "follow_up" | "procedure" | "surgery" | "exam" | "evaluation" | "emergency" | "check_up" | "vaccination" | "fit_test" | "therapy" | "meeting";
325
325
  ref?: any;
326
326
  created_at?: Date | null | undefined;
@@ -330,8 +330,8 @@ export declare const zAppointmentTypeSchema: z.ZodObject<{
330
330
  }, {
331
331
  name: string;
332
332
  id: string;
333
- tenant: string;
334
333
  order: number;
334
+ tenant: string;
335
335
  base_type: "blocked" | "consultation" | "follow_up" | "procedure" | "surgery" | "exam" | "evaluation" | "emergency" | "check_up" | "vaccination" | "fit_test" | "therapy" | "meeting";
336
336
  ref?: any;
337
337
  model_ver?: number | undefined;
@@ -1082,6 +1082,7 @@ export declare const zPatientSchema: z.ZodObject<{
1082
1082
  color?: string | undefined;
1083
1083
  category?: string | null | undefined;
1084
1084
  }>, "many">>>;
1085
+ capture_data: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>>>;
1085
1086
  userRef: z.ZodAny;
1086
1087
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1087
1088
  id: z.ZodString;
@@ -1435,6 +1436,7 @@ export declare const zPatientSchema: z.ZodObject<{
1435
1436
  color?: string | undefined;
1436
1437
  category?: string | null | undefined;
1437
1438
  }>, "many">>>;
1439
+ capture_data: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>>>;
1438
1440
  userRef: z.ZodAny;
1439
1441
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1440
1442
  id: z.ZodString;
@@ -1788,5 +1790,6 @@ export declare const zPatientSchema: z.ZodObject<{
1788
1790
  color?: string | undefined;
1789
1791
  category?: string | null | undefined;
1790
1792
  }>, "many">>>;
1793
+ capture_data: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>>>;
1791
1794
  userRef: z.ZodAny;
1792
1795
  }, z.ZodTypeAny, "passthrough">>;
@@ -156,6 +156,7 @@ exports.zPatientSchema = zod_schemas_4.zProfileSchema // Extend from ProfileSche
156
156
  attachments: zod_1.z.array(exports.zPatientAttachmentSchema).nullable().optional(),
157
157
  attachmentExternalLinkKeys: zod_1.z.array(zod_1.z.string()).nullable().optional(),
158
158
  tags: zod_1.z.array(zod_schemas_2.zTagSchema).nullable().optional(),
159
+ capture_data: zod_schemas_2.zCaptureDataMapSchema.nullable().optional(),
159
160
  userRef: zod_1.z.any(),
160
161
  })
161
162
  .passthrough();
@@ -8,6 +8,7 @@ import {
8
8
  } from "../dic/zod-schemas";
9
9
  import {
10
10
  zAddressSchema,
11
+ zCaptureDataMapSchema,
11
12
  zContactSchema,
12
13
  zTagSchema,
13
14
  } from "../../shared/zod-schemas";
@@ -177,6 +178,7 @@ export const zPatientSchema = zProfileSchema // Extend from ProfileSchema
177
178
  attachments: z.array(zPatientAttachmentSchema).nullable().optional(),
178
179
  attachmentExternalLinkKeys: z.array(z.string()).nullable().optional(),
179
180
  tags: z.array(zTagSchema).nullable().optional(),
181
+ capture_data: zCaptureDataMapSchema.nullable().optional(),
180
182
  userRef: z.any(),
181
183
  })
182
184
  .passthrough();
@@ -108,3 +108,103 @@ export declare const zContactSchema: z.ZodObject<{
108
108
  instagram_username: z.ZodOptional<z.ZodNullable<z.ZodString>>;
109
109
  bsuid: z.ZodOptional<z.ZodNullable<z.ZodString>>;
110
110
  }, z.ZodTypeAny, "passthrough">>;
111
+ export declare const zCaptureDataFieldTypeSchema: z.ZodEnum<["text", "number", "date", "select", "boolean"]>;
112
+ export declare const zCaptureDataFieldOptionSchema: z.ZodObject<{
113
+ value: z.ZodString;
114
+ label: z.ZodString;
115
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
116
+ value: z.ZodString;
117
+ label: z.ZodString;
118
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
119
+ value: z.ZodString;
120
+ label: z.ZodString;
121
+ }, z.ZodTypeAny, "passthrough">>;
122
+ /**
123
+ * Campo do dicionário (qualquer entidade). O `code` aceita o legado (1–64);
124
+ * o slug `^[a-z][a-z0-9_]{0,63}$` é regra de CRIAÇÃO, aplicada no backend.
125
+ */
126
+ export declare const zCaptureDataFieldSchema: z.ZodObject<{
127
+ id: z.ZodString;
128
+ ref: z.ZodAny;
129
+ tenant: z.ZodString;
130
+ model_ver: z.ZodDefault<z.ZodNumber>;
131
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
132
+ updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
133
+ deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
134
+ } & {
135
+ code: z.ZodString;
136
+ name: z.ZodString;
137
+ type: z.ZodOptional<z.ZodEnum<["text", "number", "date", "select", "boolean"]>>;
138
+ options: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
139
+ value: z.ZodString;
140
+ label: z.ZodString;
141
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
142
+ value: z.ZodString;
143
+ label: z.ZodString;
144
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
145
+ value: z.ZodString;
146
+ label: z.ZodString;
147
+ }, z.ZodTypeAny, "passthrough">>, "many">>>;
148
+ required: z.ZodOptional<z.ZodBoolean>;
149
+ order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
150
+ searchable: z.ZodOptional<z.ZodBoolean>;
151
+ mcp_description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
152
+ mcp_enabled: z.ZodOptional<z.ZodBoolean>;
153
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
154
+ id: z.ZodString;
155
+ ref: z.ZodAny;
156
+ tenant: z.ZodString;
157
+ model_ver: z.ZodDefault<z.ZodNumber>;
158
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
159
+ updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
160
+ deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
161
+ } & {
162
+ code: z.ZodString;
163
+ name: z.ZodString;
164
+ type: z.ZodOptional<z.ZodEnum<["text", "number", "date", "select", "boolean"]>>;
165
+ options: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
166
+ value: z.ZodString;
167
+ label: z.ZodString;
168
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
169
+ value: z.ZodString;
170
+ label: z.ZodString;
171
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
172
+ value: z.ZodString;
173
+ label: z.ZodString;
174
+ }, z.ZodTypeAny, "passthrough">>, "many">>>;
175
+ required: z.ZodOptional<z.ZodBoolean>;
176
+ order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
177
+ searchable: z.ZodOptional<z.ZodBoolean>;
178
+ mcp_description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
179
+ mcp_enabled: z.ZodOptional<z.ZodBoolean>;
180
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
181
+ id: z.ZodString;
182
+ ref: z.ZodAny;
183
+ tenant: z.ZodString;
184
+ model_ver: z.ZodDefault<z.ZodNumber>;
185
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
186
+ updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
187
+ deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
188
+ } & {
189
+ code: z.ZodString;
190
+ name: z.ZodString;
191
+ type: z.ZodOptional<z.ZodEnum<["text", "number", "date", "select", "boolean"]>>;
192
+ options: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
193
+ value: z.ZodString;
194
+ label: z.ZodString;
195
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
196
+ value: z.ZodString;
197
+ label: z.ZodString;
198
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
199
+ value: z.ZodString;
200
+ label: z.ZodString;
201
+ }, z.ZodTypeAny, "passthrough">>, "many">>>;
202
+ required: z.ZodOptional<z.ZodBoolean>;
203
+ order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
204
+ searchable: z.ZodOptional<z.ZodBoolean>;
205
+ mcp_description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
206
+ mcp_enabled: z.ZodOptional<z.ZodBoolean>;
207
+ }, z.ZodTypeAny, "passthrough">>;
208
+ export declare const zCaptureDataValueSchema: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>;
209
+ /** Mapa `capture_data` gravado na entidade. */
210
+ export declare const zCaptureDataMapSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.zContactSchema = exports.zAddressSchema = exports.zTagSchema = exports.zFireDocSchema = exports.zFirestoreDateSchema = exports.zEvoAppSchema = void 0;
3
+ exports.zCaptureDataMapSchema = exports.zCaptureDataValueSchema = exports.zCaptureDataFieldSchema = exports.zCaptureDataFieldOptionSchema = exports.zCaptureDataFieldTypeSchema = exports.zContactSchema = exports.zAddressSchema = exports.zTagSchema = exports.zFireDocSchema = exports.zFirestoreDateSchema = exports.zEvoAppSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  // Enum for activity read status
6
6
  exports.zEvoAppSchema = zod_1.z.enum([
@@ -92,3 +92,41 @@ exports.zContactSchema = zod_1.z.object({
92
92
  // WhatsApp BSUID (Business-Scoped User ID) — contato que a Meta entrega sem telefone
93
93
  bsuid: zod_1.z.string().nullable().optional(),
94
94
  }).passthrough();
95
+ // ----- Campos complementares (capture-data) — feat-196
96
+ exports.zCaptureDataFieldTypeSchema = zod_1.z.enum([
97
+ "text",
98
+ "number",
99
+ "date",
100
+ "select",
101
+ "boolean",
102
+ ]);
103
+ exports.zCaptureDataFieldOptionSchema = zod_1.z
104
+ .object({
105
+ value: zod_1.z.string().min(1).max(255),
106
+ label: zod_1.z.string().min(1).max(255),
107
+ })
108
+ .passthrough();
109
+ /**
110
+ * Campo do dicionário (qualquer entidade). O `code` aceita o legado (1–64);
111
+ * o slug `^[a-z][a-z0-9_]{0,63}$` é regra de CRIAÇÃO, aplicada no backend.
112
+ */
113
+ exports.zCaptureDataFieldSchema = exports.zFireDocSchema
114
+ .extend({
115
+ code: zod_1.z.string().min(1).max(64),
116
+ name: zod_1.z.string().min(1).max(255),
117
+ type: exports.zCaptureDataFieldTypeSchema.optional(),
118
+ options: zod_1.z.array(exports.zCaptureDataFieldOptionSchema).nullable().optional(),
119
+ required: zod_1.z.boolean().optional(),
120
+ order: zod_1.z.number().int().nullable().optional(),
121
+ searchable: zod_1.z.boolean().optional(),
122
+ mcp_description: zod_1.z.string().max(2000).nullable().optional(),
123
+ mcp_enabled: zod_1.z.boolean().optional(),
124
+ })
125
+ .passthrough();
126
+ exports.zCaptureDataValueSchema = zod_1.z.union([
127
+ zod_1.z.string(),
128
+ zod_1.z.number(),
129
+ zod_1.z.boolean(),
130
+ ]);
131
+ /** Mapa `capture_data` gravado na entidade. */
132
+ exports.zCaptureDataMapSchema = zod_1.z.record(exports.zCaptureDataValueSchema);
@@ -107,3 +107,47 @@ export const zContactSchema = z.object({
107
107
  // WhatsApp BSUID (Business-Scoped User ID) — contato que a Meta entrega sem telefone
108
108
  bsuid: z.string().nullable().optional(),
109
109
  }).passthrough();
110
+
111
+ // ----- Campos complementares (capture-data) — feat-196
112
+
113
+ export const zCaptureDataFieldTypeSchema = z.enum([
114
+ "text",
115
+ "number",
116
+ "date",
117
+ "select",
118
+ "boolean",
119
+ ]);
120
+
121
+ export const zCaptureDataFieldOptionSchema = z
122
+ .object({
123
+ value: z.string().min(1).max(255),
124
+ label: z.string().min(1).max(255),
125
+ })
126
+ .passthrough();
127
+
128
+ /**
129
+ * Campo do dicionário (qualquer entidade). O `code` aceita o legado (1–64);
130
+ * o slug `^[a-z][a-z0-9_]{0,63}$` é regra de CRIAÇÃO, aplicada no backend.
131
+ */
132
+ export const zCaptureDataFieldSchema = zFireDocSchema
133
+ .extend({
134
+ code: z.string().min(1).max(64),
135
+ name: z.string().min(1).max(255),
136
+ type: zCaptureDataFieldTypeSchema.optional(),
137
+ options: z.array(zCaptureDataFieldOptionSchema).nullable().optional(),
138
+ required: z.boolean().optional(),
139
+ order: z.number().int().nullable().optional(),
140
+ searchable: z.boolean().optional(),
141
+ mcp_description: z.string().max(2000).nullable().optional(),
142
+ mcp_enabled: z.boolean().optional(),
143
+ })
144
+ .passthrough();
145
+
146
+ export const zCaptureDataValueSchema = z.union([
147
+ z.string(),
148
+ z.number(),
149
+ z.boolean(),
150
+ ]);
151
+
152
+ /** Mapa `capture_data` gravado na entidade. */
153
+ export const zCaptureDataMapSchema = z.record(zCaptureDataValueSchema);
@@ -1,5 +1,5 @@
1
1
  export * from "../fb_collections";
2
- import { FirestoreDocumentReference, IAddress, IContact, IExternalLink, ITag } from "../../shared";
2
+ import { CaptureDataMap, FirestoreDocumentReference, IAddress, IContact, IExternalLink, ITag } from "../../shared";
3
3
  import { IProfile } from "../../evo-people";
4
4
  import { QualificationFunnelLevel } from "../dic";
5
5
  export declare const EvoCrmLeadPermissions: {
@@ -112,6 +112,8 @@ export interface ILead extends IProfile {
112
112
  /** Derivado de `externalLinks` (`"type:id"`) pelo model — habilita `array-contains`. */
113
113
  externalLinkKeys?: string[];
114
114
  tags?: ITag[] | null;
115
+ /** Campos complementares (code → valor), validados contra o dicionário `dics/leads/capture-data` (feat-196). */
116
+ capture_data?: CaptureDataMap | null;
115
117
  userRef?: FirestoreDocumentReference;
116
118
  ctwa_clid?: string | null;
117
119
  /**
@@ -1,6 +1,7 @@
1
1
  export * from "../fb_collections";
2
2
 
3
3
  import {
4
+ CaptureDataMap,
4
5
  FirestoreDocumentReference,
5
6
  IAddress,
6
7
  IContact,
@@ -154,6 +155,8 @@ export interface ILead extends IProfile {
154
155
  /** Derivado de `externalLinks` (`"type:id"`) pelo model — habilita `array-contains`. */
155
156
  externalLinkKeys?: string[];
156
157
  tags?: ITag[] | null;
158
+ /** Campos complementares (code → valor), validados contra o dicionário `dics/leads/capture-data` (feat-196). */
159
+ capture_data?: CaptureDataMap | null;
157
160
  userRef?: FirestoreDocumentReference;
158
161
  // CTWA attribution (feat-034) — capturado do referral do 1º inbound vindo de anúncio Click-to-WhatsApp.
159
162
  ctwa_clid?: string | null;
@@ -27,12 +27,34 @@ export type NexFinopsProposalPaymentMethod = 'boleto' | 'card_subscription' | 'p
27
27
  * o texto pronto em `loyalty_period_label`.
28
28
  */
29
29
  export type NexFinopsProposalLoyaltyPeriod = 'none' | '3m' | '6m' | '1y' | '2y';
30
- /** Dados que o vendedor já conhece e a página pública usa para pré-preencher. */
30
+ /**
31
+ * Dados que o vendedor já conhece e a página pública usa para pré-preencher.
32
+ * Os nomes seguem `INexVendasJourneyCustomerData`/`INexVendasJourneyCompany` da
33
+ * jornada, exceto `company`, que é a razão social (lá, `legal_name`).
34
+ *
35
+ * Com `customer_id` na proposta, o backend grava aqui um SNAPSHOT do cadastro do
36
+ * cliente a cada create/update (o que o vendedor enviar é sobrescrito); sem
37
+ * `customer_id`, vale o que o vendedor digitou. `document_number` e
38
+ * `responsible_cpf` são gravados só com dígitos.
39
+ */
31
40
  export interface INexFinopsProposalPrefill {
32
41
  name?: string | null;
33
42
  email?: string | null;
34
43
  phone?: string | null;
44
+ /** Razão social. */
35
45
  company?: string | null;
46
+ trade_name?: string | null;
47
+ document_type?: 'cpf' | 'cnpj' | null;
48
+ document_number?: string | null;
49
+ /** CPF de quem assina. No cadastro PF coincide com `document_number`. */
50
+ responsible_cpf?: string | null;
51
+ zip?: string | null;
52
+ street?: string | null;
53
+ number?: string | null;
54
+ complement?: string | null;
55
+ district?: string | null;
56
+ city?: string | null;
57
+ state?: string | null;
36
58
  }
37
59
  export interface INexFinopsProposal extends IFireGlobalDoc {
38
60
  origem: NexFinopsProposalOrigem;
@@ -91,13 +113,19 @@ export interface INexFinopsProposalPublic {
91
113
  */
92
114
  loyalty_period_label?: string | null;
93
115
  /**
94
- * Dados de contato que o vendedor cadastrou, por inteiro, para a página
95
- * pública pré-preencher o formulário. `null` quando a proposta não tem prefill;
96
- * cada campo é `null` quando ausente. Nunca documento (CPF/CNPJ).
116
+ * Dados que o vendedor cadastrou, por inteiro, para a página pública
117
+ * pré-preencher o formulário. `null` quando a proposta não tem prefill; cada
118
+ * campo é `null` quando ausente.
97
119
  *
98
120
  * Decisão do usuário (2026-09-23): a proposta existe para o cliente não
99
121
  * precisar preencher. Quem tem o link vê o contato do lead — risco aceito.
100
122
  * Supera, neste ponto, a projeção só-nome da feat-128.
123
+ *
124
+ * Documento INCLUÍDO desde a feat-194 (2026-09-24), revogando o "nunca
125
+ * documento" da fix-150: CNPJ, CPF do titular PF e CPF do responsável saem
126
+ * para quem tem o link, porque pré-preencher CPF/CNPJ só funciona se o
127
+ * endpoint público os entregar. Risco LGPD (CPF é dado pessoal) registrado;
128
+ * restringir a CNPJ depois muda só a projeção, não o contrato.
101
129
  */
102
130
  prefill: INexFinopsProposalPublicPrefill | null;
103
131
  /**
@@ -108,11 +136,26 @@ export interface INexFinopsProposalPublic {
108
136
  name: string | null;
109
137
  };
110
138
  }
139
+ /** Mesmos campos de `INexFinopsProposalPrefill`, cada um `null` quando ausente. */
111
140
  export interface INexFinopsProposalPublicPrefill {
112
141
  name: string | null;
113
142
  email: string | null;
114
143
  phone: string | null;
144
+ /** Razão social. */
115
145
  company: string | null;
146
+ trade_name: string | null;
147
+ document_type: 'cpf' | 'cnpj' | null;
148
+ /** Só dígitos. */
149
+ document_number: string | null;
150
+ /** Só dígitos. */
151
+ responsible_cpf: string | null;
152
+ zip: string | null;
153
+ street: string | null;
154
+ number: string | null;
155
+ complement: string | null;
156
+ district: string | null;
157
+ city: string | null;
158
+ state: string | null;
116
159
  }
117
160
  export declare const NEX_FINOPS_PROPOSAL_STATUS_TRANSITIONS: Record<NexFinopsProposalStatus, NexFinopsProposalStatus[]>;
118
161
  /**