evo360-types 1.3.125 → 1.3.127

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.
@@ -670,6 +670,7 @@ export declare const zPatientSchema: z.ZodObject<z.objectUtil.extendShape<z.obje
670
670
  notes?: string | undefined;
671
671
  }>, "many">>>;
672
672
  notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
673
+ appointmentCounters: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNumber>>>;
673
674
  tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
674
675
  name: z.ZodString;
675
676
  color: z.ZodOptional<z.ZodString>;
@@ -828,6 +829,7 @@ export declare const zPatientSchema: z.ZodObject<z.objectUtil.extendShape<z.obje
828
829
  notes?: string | undefined;
829
830
  }>, "many">>>;
830
831
  notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
832
+ appointmentCounters: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNumber>>>;
831
833
  tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
832
834
  name: z.ZodString;
833
835
  color: z.ZodOptional<z.ZodString>;
@@ -986,6 +988,7 @@ export declare const zPatientSchema: z.ZodObject<z.objectUtil.extendShape<z.obje
986
988
  notes?: string | undefined;
987
989
  }>, "many">>>;
988
990
  notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
991
+ appointmentCounters: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNumber>>>;
989
992
  tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
990
993
  name: z.ZodString;
991
994
  color: z.ZodOptional<z.ZodString>;
@@ -97,6 +97,7 @@ exports.zPatientSchema = zod_schemas_3.zProfileSchema // Extend from ProfileSche
97
97
  .nullable()
98
98
  .optional(),
99
99
  notes: zod_1.z.string().nullable().optional(),
100
+ appointmentCounters: zod_1.z.record(zod_1.z.string(), zod_1.z.number()).nullable().optional(),
100
101
  tags: zod_1.z.array(zod_schemas_2.zTagSchema).nullable().optional(),
101
102
  userRef: zod_1.z.any(),
102
103
  })
@@ -114,6 +114,7 @@ export const zPatientSchema = zProfileSchema // Extend from ProfileSchema
114
114
  .nullable()
115
115
  .optional(),
116
116
  notes: z.string().nullable().optional(),
117
+ appointmentCounters: z.record(z.string(), z.number()).nullable().optional(),
117
118
  tags: z.array(zTagSchema).nullable().optional(),
118
119
  userRef: z.any(),
119
120
  })
@@ -2,6 +2,7 @@ import { z } from "zod";
2
2
  export declare const zTaskActionSchema: z.ZodEnum<["CREATE_TASK", "DELETE_TASK", "UPDATE_TASK"]>;
3
3
  export declare const zTaskStatusSchema: z.ZodEnum<["not_started", "in_progress", "completed", "cancelled", "on_hold"]>;
4
4
  export declare const zTaskPrioritySchema: z.ZodEnum<["low", "medium", "high"]>;
5
+ export declare const zIATaskTypeSchema: z.ZodEnum<["data_analysis", "content_generation", "classification", "extraction", "summarization", "translation", "sentiment_analysis", "question_answering", "send_reminder", "request_contact_info", "request_operator_info", "confirm_appointment", "send_documents", "create_appointment", "reschedule_appointment", "cancel_appointment", "financial_charge", "custom"]>;
5
6
  export declare const zTaskSchema: z.ZodObject<z.objectUtil.extendShape<{
6
7
  id: z.ZodString;
7
8
  ref: z.ZodAny;
@@ -40,6 +41,20 @@ export declare const zTaskSchema: z.ZodObject<z.objectUtil.extendShape<{
40
41
  color?: string | undefined;
41
42
  category?: string | null | undefined;
42
43
  }>, "many">>>;
44
+ ia_assigned: z.ZodOptional<z.ZodBoolean>;
45
+ ia_agent: z.ZodOptional<z.ZodString>;
46
+ ia_duescheduled: z.ZodOptional<z.ZodDate>;
47
+ ia_task_type: z.ZodOptional<z.ZodEnum<["data_analysis", "content_generation", "classification", "extraction", "summarization", "translation", "sentiment_analysis", "question_answering", "send_reminder", "request_contact_info", "request_operator_info", "confirm_appointment", "send_documents", "create_appointment", "reschedule_appointment", "cancel_appointment", "financial_charge", "custom"]>>;
48
+ ia_result: z.ZodOptional<z.ZodString>;
49
+ ia_result_code: z.ZodOptional<z.ZodNumber>;
50
+ ia_started_at: z.ZodOptional<z.ZodDate>;
51
+ ia_completed_at: z.ZodOptional<z.ZodDate>;
52
+ ia_error: z.ZodOptional<z.ZodString>;
53
+ ia_retry_count: z.ZodOptional<z.ZodNumber>;
54
+ ia_metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
55
+ ia_prompt: z.ZodOptional<z.ZodString>;
56
+ ia_model: z.ZodOptional<z.ZodString>;
57
+ ia_progress: z.ZodOptional<z.ZodNumber>;
43
58
  }>, "passthrough", z.ZodTypeAny, z.objectOutputType<z.objectUtil.extendShape<{
44
59
  id: z.ZodString;
45
60
  ref: z.ZodAny;
@@ -78,6 +93,20 @@ export declare const zTaskSchema: z.ZodObject<z.objectUtil.extendShape<{
78
93
  color?: string | undefined;
79
94
  category?: string | null | undefined;
80
95
  }>, "many">>>;
96
+ ia_assigned: z.ZodOptional<z.ZodBoolean>;
97
+ ia_agent: z.ZodOptional<z.ZodString>;
98
+ ia_duescheduled: z.ZodOptional<z.ZodDate>;
99
+ ia_task_type: z.ZodOptional<z.ZodEnum<["data_analysis", "content_generation", "classification", "extraction", "summarization", "translation", "sentiment_analysis", "question_answering", "send_reminder", "request_contact_info", "request_operator_info", "confirm_appointment", "send_documents", "create_appointment", "reschedule_appointment", "cancel_appointment", "financial_charge", "custom"]>>;
100
+ ia_result: z.ZodOptional<z.ZodString>;
101
+ ia_result_code: z.ZodOptional<z.ZodNumber>;
102
+ ia_started_at: z.ZodOptional<z.ZodDate>;
103
+ ia_completed_at: z.ZodOptional<z.ZodDate>;
104
+ ia_error: z.ZodOptional<z.ZodString>;
105
+ ia_retry_count: z.ZodOptional<z.ZodNumber>;
106
+ ia_metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
107
+ ia_prompt: z.ZodOptional<z.ZodString>;
108
+ ia_model: z.ZodOptional<z.ZodString>;
109
+ ia_progress: z.ZodOptional<z.ZodNumber>;
81
110
  }>, z.ZodTypeAny, "passthrough">, z.objectInputType<z.objectUtil.extendShape<{
82
111
  id: z.ZodString;
83
112
  ref: z.ZodAny;
@@ -116,4 +145,64 @@ export declare const zTaskSchema: z.ZodObject<z.objectUtil.extendShape<{
116
145
  color?: string | undefined;
117
146
  category?: string | null | undefined;
118
147
  }>, "many">>>;
148
+ ia_assigned: z.ZodOptional<z.ZodBoolean>;
149
+ ia_agent: z.ZodOptional<z.ZodString>;
150
+ ia_duescheduled: z.ZodOptional<z.ZodDate>;
151
+ ia_task_type: z.ZodOptional<z.ZodEnum<["data_analysis", "content_generation", "classification", "extraction", "summarization", "translation", "sentiment_analysis", "question_answering", "send_reminder", "request_contact_info", "request_operator_info", "confirm_appointment", "send_documents", "create_appointment", "reschedule_appointment", "cancel_appointment", "financial_charge", "custom"]>>;
152
+ ia_result: z.ZodOptional<z.ZodString>;
153
+ ia_result_code: z.ZodOptional<z.ZodNumber>;
154
+ ia_started_at: z.ZodOptional<z.ZodDate>;
155
+ ia_completed_at: z.ZodOptional<z.ZodDate>;
156
+ ia_error: z.ZodOptional<z.ZodString>;
157
+ ia_retry_count: z.ZodOptional<z.ZodNumber>;
158
+ ia_metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
159
+ ia_prompt: z.ZodOptional<z.ZodString>;
160
+ ia_model: z.ZodOptional<z.ZodString>;
161
+ ia_progress: z.ZodOptional<z.ZodNumber>;
162
+ }>, z.ZodTypeAny, "passthrough">>;
163
+ export declare const zTaskCommentSchema: z.ZodObject<z.objectUtil.extendShape<{
164
+ id: z.ZodString;
165
+ ref: z.ZodAny;
166
+ tenant: z.ZodString;
167
+ model_ver: z.ZodDefault<z.ZodNumber>;
168
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
169
+ updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
170
+ deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
171
+ }, {
172
+ taskId: z.ZodString;
173
+ text: z.ZodString;
174
+ authorName: z.ZodString;
175
+ authorRef: z.ZodOptional<z.ZodAny>;
176
+ edited: z.ZodOptional<z.ZodBoolean>;
177
+ edited_at: z.ZodOptional<z.ZodDate>;
178
+ }>, "passthrough", z.ZodTypeAny, z.objectOutputType<z.objectUtil.extendShape<{
179
+ id: z.ZodString;
180
+ ref: z.ZodAny;
181
+ tenant: z.ZodString;
182
+ model_ver: z.ZodDefault<z.ZodNumber>;
183
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
184
+ updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
185
+ deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
186
+ }, {
187
+ taskId: z.ZodString;
188
+ text: z.ZodString;
189
+ authorName: z.ZodString;
190
+ authorRef: z.ZodOptional<z.ZodAny>;
191
+ edited: z.ZodOptional<z.ZodBoolean>;
192
+ edited_at: z.ZodOptional<z.ZodDate>;
193
+ }>, z.ZodTypeAny, "passthrough">, z.objectInputType<z.objectUtil.extendShape<{
194
+ id: z.ZodString;
195
+ ref: z.ZodAny;
196
+ tenant: z.ZodString;
197
+ model_ver: z.ZodDefault<z.ZodNumber>;
198
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
199
+ updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
200
+ deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
201
+ }, {
202
+ taskId: z.ZodString;
203
+ text: z.ZodString;
204
+ authorName: z.ZodString;
205
+ authorRef: z.ZodOptional<z.ZodAny>;
206
+ edited: z.ZodOptional<z.ZodBoolean>;
207
+ edited_at: z.ZodOptional<z.ZodDate>;
119
208
  }>, z.ZodTypeAny, "passthrough">>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.zTaskSchema = exports.zTaskPrioritySchema = exports.zTaskStatusSchema = exports.zTaskActionSchema = void 0;
3
+ exports.zTaskCommentSchema = exports.zTaskSchema = exports.zIATaskTypeSchema = exports.zTaskPrioritySchema = exports.zTaskStatusSchema = exports.zTaskActionSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const zod_schemas_1 = require("../shared/zod-schemas");
6
6
  exports.zTaskActionSchema = zod_1.z.enum([
@@ -16,6 +16,26 @@ exports.zTaskStatusSchema = zod_1.z.enum([
16
16
  "on_hold",
17
17
  ]);
18
18
  exports.zTaskPrioritySchema = zod_1.z.enum(["low", "medium", "high"]);
19
+ exports.zIATaskTypeSchema = zod_1.z.enum([
20
+ "data_analysis",
21
+ "content_generation",
22
+ "classification",
23
+ "extraction",
24
+ "summarization",
25
+ "translation",
26
+ "sentiment_analysis",
27
+ "question_answering",
28
+ "send_reminder",
29
+ "request_contact_info",
30
+ "request_operator_info",
31
+ "confirm_appointment",
32
+ "send_documents",
33
+ "create_appointment",
34
+ "reschedule_appointment",
35
+ "cancel_appointment",
36
+ "financial_charge",
37
+ "custom",
38
+ ]);
19
39
  // Schema para a interface ITask
20
40
  exports.zTaskSchema = zod_schemas_1.zFireDocSchema
21
41
  .extend({
@@ -30,5 +50,31 @@ exports.zTaskSchema = zod_schemas_1.zFireDocSchema
30
50
  assigneeName: zod_1.z.string().optional(),
31
51
  assigneeRef: zod_1.z.any().optional(),
32
52
  tags: zod_1.z.array(zod_schemas_1.zTagSchema).nullable().optional(),
53
+ // IA (Inteligência Artificial) related fields
54
+ ia_assigned: zod_1.z.boolean().optional(),
55
+ ia_agent: zod_1.z.string().optional(),
56
+ ia_duescheduled: zod_1.z.coerce.date().optional(),
57
+ ia_task_type: exports.zIATaskTypeSchema.optional(),
58
+ ia_result: zod_1.z.string().optional(),
59
+ ia_result_code: zod_1.z.number().optional(),
60
+ ia_started_at: zod_1.z.coerce.date().optional(),
61
+ ia_completed_at: zod_1.z.coerce.date().optional(),
62
+ ia_error: zod_1.z.string().optional(),
63
+ ia_retry_count: zod_1.z.number().optional(),
64
+ ia_metadata: zod_1.z.record(zod_1.z.unknown()).optional(),
65
+ ia_prompt: zod_1.z.string().optional(),
66
+ ia_model: zod_1.z.string().optional(),
67
+ ia_progress: zod_1.z.number().min(0).max(100).optional(),
68
+ })
69
+ .passthrough();
70
+ // Schema para a interface ITaskComment
71
+ exports.zTaskCommentSchema = zod_schemas_1.zFireDocSchema
72
+ .extend({
73
+ taskId: zod_1.z.string(),
74
+ text: zod_1.z.string(),
75
+ authorName: zod_1.z.string(),
76
+ authorRef: zod_1.z.any().optional(),
77
+ edited: zod_1.z.boolean().optional(),
78
+ edited_at: zod_1.z.coerce.date().optional(),
33
79
  })
34
80
  .passthrough();
@@ -17,6 +17,27 @@ export const zTaskStatusSchema = z.enum([
17
17
 
18
18
  export const zTaskPrioritySchema = z.enum(["low", "medium", "high"]);
19
19
 
20
+ export const zIATaskTypeSchema = z.enum([
21
+ "data_analysis",
22
+ "content_generation",
23
+ "classification",
24
+ "extraction",
25
+ "summarization",
26
+ "translation",
27
+ "sentiment_analysis",
28
+ "question_answering",
29
+ "send_reminder",
30
+ "request_contact_info",
31
+ "request_operator_info",
32
+ "confirm_appointment",
33
+ "send_documents",
34
+ "create_appointment",
35
+ "reschedule_appointment",
36
+ "cancel_appointment",
37
+ "financial_charge",
38
+ "custom",
39
+ ]);
40
+
20
41
  // Schema para a interface ITask
21
42
  export const zTaskSchema = zFireDocSchema
22
43
  .extend({
@@ -31,5 +52,32 @@ export const zTaskSchema = zFireDocSchema
31
52
  assigneeName: z.string().optional(),
32
53
  assigneeRef: z.any().optional(),
33
54
  tags: z.array(zTagSchema).nullable().optional(),
55
+ // IA (Inteligência Artificial) related fields
56
+ ia_assigned: z.boolean().optional(),
57
+ ia_agent: z.string().optional(),
58
+ ia_duescheduled: z.coerce.date().optional(),
59
+ ia_task_type: zIATaskTypeSchema.optional(),
60
+ ia_result: z.string().optional(),
61
+ ia_result_code: z.number().optional(),
62
+ ia_started_at: z.coerce.date().optional(),
63
+ ia_completed_at: z.coerce.date().optional(),
64
+ ia_error: z.string().optional(),
65
+ ia_retry_count: z.number().optional(),
66
+ ia_metadata: z.record(z.unknown()).optional(),
67
+ ia_prompt: z.string().optional(),
68
+ ia_model: z.string().optional(),
69
+ ia_progress: z.number().min(0).max(100).optional(),
70
+ })
71
+ .passthrough();
72
+
73
+ // Schema para a interface ITaskComment
74
+ export const zTaskCommentSchema = zFireDocSchema
75
+ .extend({
76
+ taskId: z.string(),
77
+ text: z.string(),
78
+ authorName: z.string(),
79
+ authorRef: z.any().optional(),
80
+ edited: z.boolean().optional(),
81
+ edited_at: z.coerce.date().optional(),
34
82
  })
35
83
  .passthrough();
@@ -122,6 +122,7 @@ export interface IPatient extends IProfile {
122
122
  allergies?: IPatientAllergy[] | null;
123
123
  chronic_conditions?: IPatientChronicCondition[] | null;
124
124
  notes?: string | null;
125
+ appointmentCounters?: Record<string, number> | null;
125
126
  tags?: ITag[] | null;
126
127
  userRef?: FirestoreDocumentReference;
127
128
  [key: string]: unknown;
@@ -177,6 +177,8 @@ export interface IPatient extends IProfile {
177
177
  allergies?: IPatientAllergy[] | null; // Lista de alergias conhecidas
178
178
  chronic_conditions?: IPatientChronicCondition[] | null; // Lista de doenças crônicas do paciente
179
179
  notes?: string | null; // Anotações sobre o paciente
180
+ // Contadores de appointments por status
181
+ appointmentCounters?: Record<string, number> | null; // Map de status -> quantidade de appointments
180
182
  tags?: ITag[] | null;
181
183
  userRef?: FirestoreDocumentReference;
182
184
  [key: string]: unknown; // index signature
@@ -20,6 +20,27 @@ export declare enum ITaskPriority {
20
20
  Medium = "medium",
21
21
  High = "high"
22
22
  }
23
+ export type IATaskType = "data_analysis" | "content_generation" | "classification" | "extraction" | "summarization" | "translation" | "sentiment_analysis" | "question_answering" | "send_reminder" | "request_contact_info" | "request_operator_info" | "confirm_appointment" | "send_documents" | "create_appointment" | "reschedule_appointment" | "cancel_appointment" | "financial_charge" | "custom";
24
+ export declare enum IIATaskType {
25
+ DataAnalysis = "data_analysis",
26
+ ContentGeneration = "content_generation",
27
+ Classification = "classification",
28
+ Extraction = "extraction",
29
+ Summarization = "summarization",
30
+ Translation = "translation",
31
+ SentimentAnalysis = "sentiment_analysis",
32
+ QuestionAnswering = "question_answering",
33
+ SendReminder = "send_reminder",
34
+ RequestContactInfo = "request_contact_info",
35
+ RequestOperatorInfo = "request_operator_info",
36
+ ConfirmAppointment = "confirm_appointment",
37
+ SendDocuments = "send_documents",
38
+ CreateAppointment = "create_appointment",
39
+ RescheduleAppointment = "reschedule_appointment",
40
+ CancelAppointment = "cancel_appointment",
41
+ FinancialCharge = "financial_charge",
42
+ Custom = "custom"
43
+ }
23
44
  export interface ITask extends IFireDoc {
24
45
  title: string;
25
46
  description?: string;
@@ -32,5 +53,28 @@ export interface ITask extends IFireDoc {
32
53
  assigneeName?: string;
33
54
  assigneeRef?: FirestoreDocumentReference;
34
55
  tags?: ITag[] | null;
56
+ ia_assigned?: boolean;
57
+ ia_agent?: string;
58
+ ia_duescheduled?: Date;
59
+ ia_task_type?: IATaskType;
60
+ ia_result?: string;
61
+ ia_result_code?: number;
62
+ ia_started_at?: Date;
63
+ ia_completed_at?: Date;
64
+ ia_error?: string;
65
+ ia_retry_count?: number;
66
+ ia_metadata?: Record<string, unknown>;
67
+ ia_prompt?: string;
68
+ ia_model?: string;
69
+ ia_progress?: number;
70
+ [key: string]: unknown;
71
+ }
72
+ export interface ITaskComment extends IFireDoc {
73
+ taskId: string;
74
+ text: string;
75
+ authorName: string;
76
+ authorRef?: FirestoreDocumentReference;
77
+ edited?: boolean;
78
+ edited_at?: Date;
35
79
  [key: string]: unknown;
36
80
  }
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.ITaskPriority = exports.ITaskStatus = exports.ITaskAction = void 0;
17
+ exports.IIATaskType = exports.ITaskPriority = exports.ITaskStatus = exports.ITaskAction = void 0;
18
18
  __exportStar(require("./fb_collections"), exports);
19
19
  var ITaskAction;
20
20
  (function (ITaskAction) {
@@ -36,3 +36,24 @@ var ITaskPriority;
36
36
  ITaskPriority["Medium"] = "medium";
37
37
  ITaskPriority["High"] = "high";
38
38
  })(ITaskPriority || (exports.ITaskPriority = ITaskPriority = {}));
39
+ var IIATaskType;
40
+ (function (IIATaskType) {
41
+ IIATaskType["DataAnalysis"] = "data_analysis";
42
+ IIATaskType["ContentGeneration"] = "content_generation";
43
+ IIATaskType["Classification"] = "classification";
44
+ IIATaskType["Extraction"] = "extraction";
45
+ IIATaskType["Summarization"] = "summarization";
46
+ IIATaskType["Translation"] = "translation";
47
+ IIATaskType["SentimentAnalysis"] = "sentiment_analysis";
48
+ IIATaskType["QuestionAnswering"] = "question_answering";
49
+ IIATaskType["SendReminder"] = "send_reminder";
50
+ IIATaskType["RequestContactInfo"] = "request_contact_info";
51
+ IIATaskType["RequestOperatorInfo"] = "request_operator_info";
52
+ IIATaskType["ConfirmAppointment"] = "confirm_appointment";
53
+ IIATaskType["SendDocuments"] = "send_documents";
54
+ IIATaskType["CreateAppointment"] = "create_appointment";
55
+ IIATaskType["RescheduleAppointment"] = "reschedule_appointment";
56
+ IIATaskType["CancelAppointment"] = "cancel_appointment";
57
+ IIATaskType["FinancialCharge"] = "financial_charge";
58
+ IIATaskType["Custom"] = "custom";
59
+ })(IIATaskType || (exports.IIATaskType = IIATaskType = {}));
@@ -35,6 +35,48 @@ export enum ITaskPriority {
35
35
  High = "high",
36
36
  }
37
37
 
38
+ // Enum for IA Task Type
39
+ export type IATaskType =
40
+ | "data_analysis"
41
+ | "content_generation"
42
+ | "classification"
43
+ | "extraction"
44
+ | "summarization"
45
+ | "translation"
46
+ | "sentiment_analysis"
47
+ | "question_answering"
48
+ | "send_reminder"
49
+ | "request_contact_info"
50
+ | "request_operator_info"
51
+ | "confirm_appointment"
52
+ | "send_documents"
53
+ | "create_appointment"
54
+ | "reschedule_appointment"
55
+ | "cancel_appointment"
56
+ | "financial_charge"
57
+ | "custom";
58
+
59
+ export enum IIATaskType {
60
+ DataAnalysis = "data_analysis",
61
+ ContentGeneration = "content_generation",
62
+ Classification = "classification",
63
+ Extraction = "extraction",
64
+ Summarization = "summarization",
65
+ Translation = "translation",
66
+ SentimentAnalysis = "sentiment_analysis",
67
+ QuestionAnswering = "question_answering",
68
+ SendReminder = "send_reminder",
69
+ RequestContactInfo = "request_contact_info",
70
+ RequestOperatorInfo = "request_operator_info",
71
+ ConfirmAppointment = "confirm_appointment",
72
+ SendDocuments = "send_documents",
73
+ CreateAppointment = "create_appointment",
74
+ RescheduleAppointment = "reschedule_appointment",
75
+ CancelAppointment = "cancel_appointment",
76
+ FinancialCharge = "financial_charge",
77
+ Custom = "custom",
78
+ }
79
+
38
80
  // Interface for Task Instances (taskInstances)
39
81
  export interface ITask extends IFireDoc {
40
82
  title: string; // Title of the task
@@ -48,5 +90,31 @@ export interface ITask extends IFireDoc {
48
90
  assigneeName?: string; // Name of the assignee (optional)
49
91
  assigneeRef?: FirestoreDocumentReference; // Reference to the assignee (optional)
50
92
  tags?: ITag[] | null;
93
+ // IA (Inteligência Artificial) related fields
94
+ ia_assigned?: boolean; // Indicates if the task is assigned to an AI agent
95
+ ia_agent?: string; // Identifier/name of the AI agent assigned to the task
96
+ ia_duescheduled?: Date; // Scheduled due date for AI execution
97
+ ia_task_type?: IATaskType; // Type of AI task to be executed
98
+ ia_result?: string; // Result/output from AI execution
99
+ ia_result_code?: number; // Result code from AI execution (e.g., HTTP status, error code)
100
+ ia_started_at?: Date; // Timestamp when AI started processing the task
101
+ ia_completed_at?: Date; // Timestamp when AI completed processing the task
102
+ ia_error?: string; // Error message if AI execution failed
103
+ ia_retry_count?: number; // Number of retry attempts for AI execution
104
+ ia_metadata?: Record<string, unknown>; // Additional metadata about AI execution
105
+ ia_prompt?: string; // Prompt used for AI task execution
106
+ ia_model?: string; // AI model used for task execution
107
+ ia_progress?: number; // Progress percentage (0-100) of AI task execution
108
+ [key: string]: unknown; // index signature
109
+ }
110
+
111
+ // Interface for Task Comments (sub-collection in Firestore)
112
+ export interface ITaskComment extends IFireDoc {
113
+ taskId: string; // ID of the task
114
+ text: string; // Comment text content
115
+ authorName: string; // Name of the user who created the comment
116
+ authorRef?: FirestoreDocumentReference; // Reference to the user who created the comment
117
+ edited?: boolean; // Indicates if the comment was edited
118
+ edited_at?: Date; // Timestamp when the comment was last edited
51
119
  [key: string]: unknown; // index signature
52
120
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "evo360-types",
3
- "version": "1.3.125",
3
+ "version": "1.3.127",
4
4
  "description": "HREVO360 Shared Types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",