evo360-types 1.3.316 → 1.3.318

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.
@@ -129,6 +129,8 @@ export declare const zHubiaV1ChannelConfigSchema: z.ZodObject<{
129
129
  timezone: z.ZodDefault<z.ZodString>;
130
130
  }, z.ZodTypeAny, "passthrough">>;
131
131
  export type IHubiaV1ChannelConfig = z.infer<typeof zHubiaV1ChannelConfigSchema>;
132
+ export declare const zHubiaConversationModeSchema: z.ZodEnum<["ai_only", "hybrid_assist", "human_only", "blocked"]>;
133
+ export type IHubiaConversationMode = z.infer<typeof zHubiaConversationModeSchema>;
132
134
  export declare const zAiBindingSchema: z.ZodObject<{
133
135
  id: z.ZodString;
134
136
  ref: z.ZodAny;
@@ -143,6 +145,12 @@ export declare const zAiBindingSchema: z.ZodObject<{
143
145
  topic: z.ZodString;
144
146
  active: z.ZodDefault<z.ZodBoolean>;
145
147
  priority: z.ZodDefault<z.ZodNumber>;
148
+ /** Default conversation mode for new threads in this department.
149
+ * ai_only — AI responds directly to patient
150
+ * hybrid_assist — AI generates suggestions for operator
151
+ * human_only — AI disabled, operator can switch to other modes
152
+ * blocked — AI disabled, operator CANNOT change mode (admin lock) */
153
+ default_mode: z.ZodDefault<z.ZodEnum<["ai_only", "hybrid_assist", "human_only", "blocked"]>>;
146
154
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
147
155
  id: z.ZodString;
148
156
  ref: z.ZodAny;
@@ -157,6 +165,12 @@ export declare const zAiBindingSchema: z.ZodObject<{
157
165
  topic: z.ZodString;
158
166
  active: z.ZodDefault<z.ZodBoolean>;
159
167
  priority: z.ZodDefault<z.ZodNumber>;
168
+ /** Default conversation mode for new threads in this department.
169
+ * ai_only — AI responds directly to patient
170
+ * hybrid_assist — AI generates suggestions for operator
171
+ * human_only — AI disabled, operator can switch to other modes
172
+ * blocked — AI disabled, operator CANNOT change mode (admin lock) */
173
+ default_mode: z.ZodDefault<z.ZodEnum<["ai_only", "hybrid_assist", "human_only", "blocked"]>>;
160
174
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
161
175
  id: z.ZodString;
162
176
  ref: z.ZodAny;
@@ -171,7 +185,11 @@ export declare const zAiBindingSchema: z.ZodObject<{
171
185
  topic: z.ZodString;
172
186
  active: z.ZodDefault<z.ZodBoolean>;
173
187
  priority: z.ZodDefault<z.ZodNumber>;
188
+ /** Default conversation mode for new threads in this department.
189
+ * ai_only — AI responds directly to patient
190
+ * hybrid_assist — AI generates suggestions for operator
191
+ * human_only — AI disabled, operator can switch to other modes
192
+ * blocked — AI disabled, operator CANNOT change mode (admin lock) */
193
+ default_mode: z.ZodDefault<z.ZodEnum<["ai_only", "hybrid_assist", "human_only", "blocked"]>>;
174
194
  }, z.ZodTypeAny, "passthrough">>;
175
195
  export type IAiBinding = z.infer<typeof zAiBindingSchema>;
176
- export declare const zHubiaConversationModeSchema: z.ZodEnum<["ai_only", "hybrid_assist", "human_only", "blocked"]>;
177
- export type IHubiaConversationMode = z.infer<typeof zHubiaConversationModeSchema>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.zHubiaConversationModeSchema = exports.zAiBindingSchema = exports.zHubiaV1ChannelConfigSchema = exports.zHubiaAttendanceModeSchema = void 0;
3
+ exports.zAiBindingSchema = exports.zHubiaConversationModeSchema = exports.zHubiaV1ChannelConfigSchema = exports.zHubiaAttendanceModeSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const zod_schemas_1 = require("../../shared/zod-schemas");
6
6
  // ───────── Attendance Mode (how AI operates on this channel) ─────────
@@ -29,6 +29,8 @@ exports.zHubiaV1ChannelConfigSchema = zod_schemas_1.zFireDocSchema.extend({
29
29
  }),
30
30
  timezone: zod_1.z.string().default("America/Sao_Paulo"),
31
31
  }).passthrough();
32
+ // ───────── Conversation Mode ─────────
33
+ exports.zHubiaConversationModeSchema = zod_1.z.enum(["ai_only", "hybrid_assist", "human_only", "blocked"]);
32
34
  // ───────── AI Binding (department → AI agent routing) ─────────
33
35
  exports.zAiBindingSchema = zod_schemas_1.zFireDocSchema.extend({
34
36
  agent_type: zod_1.z.string(), // 'evo-hubia-v1', future: 'evo-hubia-v2', etc.
@@ -36,6 +38,10 @@ exports.zAiBindingSchema = zod_schemas_1.zFireDocSchema.extend({
36
38
  topic: zod_1.z.string(), // PubSub topic for this agent: 'hubia-inbound-message'
37
39
  active: zod_1.z.boolean().default(true),
38
40
  priority: zod_1.z.number().default(1), // 1 = primary, 2 = fallback
41
+ /** Default conversation mode for new threads in this department.
42
+ * ai_only — AI responds directly to patient
43
+ * hybrid_assist — AI generates suggestions for operator
44
+ * human_only — AI disabled, operator can switch to other modes
45
+ * blocked — AI disabled, operator CANNOT change mode (admin lock) */
46
+ default_mode: exports.zHubiaConversationModeSchema.default("ai_only"),
39
47
  }).passthrough();
40
- // ───────── Conversation State ─────────
41
- exports.zHubiaConversationModeSchema = zod_1.z.enum(["ai_only", "hybrid_assist", "human_only", "blocked"]);
@@ -34,6 +34,11 @@ export const zHubiaV1ChannelConfigSchema = zFireDocSchema.extend({
34
34
 
35
35
  export type IHubiaV1ChannelConfig = z.infer<typeof zHubiaV1ChannelConfigSchema>;
36
36
 
37
+ // ───────── Conversation Mode ─────────
38
+
39
+ export const zHubiaConversationModeSchema = z.enum(["ai_only", "hybrid_assist", "human_only", "blocked"]);
40
+ export type IHubiaConversationMode = z.infer<typeof zHubiaConversationModeSchema>;
41
+
37
42
  // ───────── AI Binding (department → AI agent routing) ─────────
38
43
 
39
44
  export const zAiBindingSchema = zFireDocSchema.extend({
@@ -42,11 +47,13 @@ export const zAiBindingSchema = zFireDocSchema.extend({
42
47
  topic: z.string(), // PubSub topic for this agent: 'hubia-inbound-message'
43
48
  active: z.boolean().default(true),
44
49
  priority: z.number().default(1), // 1 = primary, 2 = fallback
50
+ /** Default conversation mode for new threads in this department.
51
+ * ai_only — AI responds directly to patient
52
+ * hybrid_assist — AI generates suggestions for operator
53
+ * human_only — AI disabled, operator can switch to other modes
54
+ * blocked — AI disabled, operator CANNOT change mode (admin lock) */
55
+ default_mode: zHubiaConversationModeSchema.default("ai_only"),
45
56
  }).passthrough();
46
57
 
47
58
  export type IAiBinding = z.infer<typeof zAiBindingSchema>;
48
59
 
49
- // ───────── Conversation State ─────────
50
-
51
- export const zHubiaConversationModeSchema = z.enum(["ai_only", "hybrid_assist", "human_only", "blocked"]);
52
- export type IHubiaConversationMode = z.infer<typeof zHubiaConversationModeSchema>;
@@ -70,6 +70,8 @@ export declare const zMedCalendarSchema: z.ZodObject<{
70
70
  total: z.ZodOptional<z.ZodNumber>;
71
71
  deleted: z.ZodOptional<z.ZodNumber>;
72
72
  }, z.ZodTypeAny, "passthrough">>>>;
73
+ available_weekdays: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodNumber, "many">>>;
74
+ available_for_hubia: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
73
75
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
74
76
  id: z.ZodString;
75
77
  ref: z.ZodAny;
@@ -141,6 +143,8 @@ export declare const zMedCalendarSchema: z.ZodObject<{
141
143
  total: z.ZodOptional<z.ZodNumber>;
142
144
  deleted: z.ZodOptional<z.ZodNumber>;
143
145
  }, z.ZodTypeAny, "passthrough">>>>;
146
+ available_weekdays: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodNumber, "many">>>;
147
+ available_for_hubia: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
144
148
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
145
149
  id: z.ZodString;
146
150
  ref: z.ZodAny;
@@ -212,4 +216,6 @@ export declare const zMedCalendarSchema: z.ZodObject<{
212
216
  total: z.ZodOptional<z.ZodNumber>;
213
217
  deleted: z.ZodOptional<z.ZodNumber>;
214
218
  }, z.ZodTypeAny, "passthrough">>>>;
219
+ available_weekdays: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodNumber, "many">>>;
220
+ available_for_hubia: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
215
221
  }, z.ZodTypeAny, "passthrough">>;
@@ -37,5 +37,10 @@ exports.zMedCalendarSchema = zod_schemas_1.zFireDocSchema
37
37
  tags: zod_1.z.array(zod_schemas_1.zTagSchema).nullable().optional(),
38
38
  userRef: zod_1.z.any(),
39
39
  appointmentCounters: zod_schemas_2.zAppointmentCountersSchema.nullable().optional(),
40
+ available_weekdays: zod_1.z
41
+ .array(zod_1.z.number().min(0).max(6))
42
+ .default([1, 2, 3, 4, 5])
43
+ .optional(),
44
+ available_for_hubia: zod_1.z.boolean().default(false).optional(),
40
45
  })
41
46
  .passthrough();
@@ -35,5 +35,10 @@ export const zMedCalendarSchema = zFireDocSchema
35
35
  tags: z.array(zTagSchema).nullable().optional(),
36
36
  userRef: z.any(),
37
37
  appointmentCounters: zAppointmentCountersSchema.nullable().optional(),
38
+ available_weekdays: z
39
+ .array(z.number().min(0).max(6))
40
+ .default([1, 2, 3, 4, 5])
41
+ .optional(),
42
+ available_for_hubia: z.boolean().default(false).optional(),
38
43
  })
39
44
  .passthrough();
@@ -32,6 +32,8 @@ export interface IInboxItem {
32
32
  department_id: string;
33
33
  status: 'open' | 'closed';
34
34
  assigned_user_id?: string | null;
35
+ /** Who is currently attending: 'ai', 'human', or null (unassigned) */
36
+ attendant_type?: 'ai' | 'human' | null;
35
37
  last_message_at?: Date;
36
38
  last_inbound_at?: Date;
37
39
  last_message_preview?: string;
@@ -45,6 +45,8 @@ export interface IInboxItem {
45
45
  department_id: string;
46
46
  status: 'open' | 'closed';
47
47
  assigned_user_id?: string | null;
48
+ /** Who is currently attending: 'ai', 'human', or null (unassigned) */
49
+ attendant_type?: 'ai' | 'human' | null;
48
50
  last_message_at?: Date;
49
51
  last_inbound_at?: Date;
50
52
  last_message_preview?: string;
@@ -33,5 +33,7 @@ export interface IMedCalendar extends IFireDoc {
33
33
  tags?: ITag[] | null;
34
34
  userRef?: FirestoreDocumentReference;
35
35
  appointmentCounters?: IAppointmentCounters | null;
36
+ available_weekdays?: number[];
37
+ available_for_hubia?: boolean;
36
38
  [key: string]: unknown;
37
39
  }
@@ -40,5 +40,9 @@ export interface IMedCalendar extends IFireDoc {
40
40
  userRef?: FirestoreDocumentReference;
41
41
  // Contadores de appointments
42
42
  appointmentCounters?: IAppointmentCounters | null;
43
+ // Dias da semana em que a agenda atende (0=domingo ... 6=sábado)
44
+ available_weekdays?: number[];
45
+ // Se true, a agenda é elegível para oferecer horários via HubIA
46
+ available_for_hubia?: boolean;
43
47
  [key: string]: unknown; // index signature
44
48
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "evo360-types",
3
- "version": "1.3.316",
3
+ "version": "1.3.318",
4
4
  "description": "HREVO360 Shared Types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",