evo360-types 1.3.214 → 1.3.217

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.
@@ -210,15 +210,15 @@ export declare const zChatbeeContactSchema: z.ZodObject<{
210
210
  type: z.ZodOptional<z.ZodString>;
211
211
  }, "strip", z.ZodTypeAny, {
212
212
  name?: string | undefined;
213
- id?: string | undefined;
214
213
  type?: string | undefined;
214
+ id?: string | undefined;
215
215
  external_id?: string | null | undefined;
216
216
  address?: string | undefined;
217
217
  is_group?: boolean | undefined;
218
218
  }, {
219
219
  name?: string | undefined;
220
- id?: string | undefined;
221
220
  type?: string | undefined;
221
+ id?: string | undefined;
222
222
  external_id?: string | null | undefined;
223
223
  address?: string | undefined;
224
224
  is_group?: unknown;
@@ -500,16 +500,16 @@ export declare const zSendTextMessageRequestSchema: z.ZodObject<{
500
500
  tenant: z.ZodString;
501
501
  text: z.ZodString;
502
502
  }, "strip", z.ZodTypeAny, {
503
- tenant: string;
504
503
  type: "text";
504
+ tenant: string;
505
505
  text: string;
506
506
  channel_id: string;
507
507
  contact_address: string;
508
508
  department_id: string;
509
509
  contact_custom_name?: string | undefined;
510
510
  }, {
511
- tenant: string;
512
511
  type: "text";
512
+ tenant: string;
513
513
  text: string;
514
514
  channel_id: string;
515
515
  contact_address: string;
@@ -573,8 +573,8 @@ export declare const zSendTemplateMessageRequestSchema: z.ZodObject<{
573
573
  payload: string;
574
574
  }>, "many">>;
575
575
  }, "strip", z.ZodTypeAny, {
576
- tenant: string;
577
576
  type: "template";
577
+ tenant: string;
578
578
  channel_id: string;
579
579
  contact_address: string;
580
580
  template_name: string;
@@ -600,8 +600,8 @@ export declare const zSendTemplateMessageRequestSchema: z.ZodObject<{
600
600
  payload: string;
601
601
  }[] | undefined;
602
602
  }, {
603
- tenant: string;
604
603
  type: "template";
604
+ tenant: string;
605
605
  channel_id: string;
606
606
  contact_address: string;
607
607
  template_name: string;
@@ -639,16 +639,16 @@ export declare const zSendMessageRequestSchema: z.ZodDiscriminatedUnion<"type",
639
639
  tenant: z.ZodString;
640
640
  text: z.ZodString;
641
641
  }, "strip", z.ZodTypeAny, {
642
- tenant: string;
643
642
  type: "text";
643
+ tenant: string;
644
644
  text: string;
645
645
  channel_id: string;
646
646
  contact_address: string;
647
647
  department_id: string;
648
648
  contact_custom_name?: string | undefined;
649
649
  }, {
650
- tenant: string;
651
650
  type: "text";
651
+ tenant: string;
652
652
  text: string;
653
653
  channel_id: string;
654
654
  contact_address: string;
@@ -708,8 +708,8 @@ export declare const zSendMessageRequestSchema: z.ZodDiscriminatedUnion<"type",
708
708
  payload: string;
709
709
  }>, "many">>;
710
710
  }, "strip", z.ZodTypeAny, {
711
- tenant: string;
712
711
  type: "template";
712
+ tenant: string;
713
713
  channel_id: string;
714
714
  contact_address: string;
715
715
  template_name: string;
@@ -735,8 +735,8 @@ export declare const zSendMessageRequestSchema: z.ZodDiscriminatedUnion<"type",
735
735
  payload: string;
736
736
  }[] | undefined;
737
737
  }, {
738
- tenant: string;
739
738
  type: "template";
739
+ tenant: string;
740
740
  channel_id: string;
741
741
  contact_address: string;
742
742
  template_name: string;
@@ -30,15 +30,15 @@ export declare const zChatContactSchema: z.ZodObject<{
30
30
  type: z.ZodOptional<z.ZodString>;
31
31
  }, "strip", z.ZodTypeAny, {
32
32
  name?: string | undefined;
33
- id?: string | undefined;
34
33
  type?: string | undefined;
34
+ id?: string | undefined;
35
35
  external_id?: string | null | undefined;
36
36
  address?: string | undefined;
37
37
  is_group?: boolean | undefined;
38
38
  }, {
39
39
  name?: string | undefined;
40
- id?: string | undefined;
41
40
  type?: string | undefined;
41
+ id?: string | undefined;
42
42
  external_id?: string | null | undefined;
43
43
  address?: string | undefined;
44
44
  is_group?: unknown;
@@ -251,15 +251,15 @@ export declare const zChatContactSchema: z.ZodObject<{
251
251
  type: z.ZodOptional<z.ZodString>;
252
252
  }, "strip", z.ZodTypeAny, {
253
253
  name?: string | undefined;
254
- id?: string | undefined;
255
254
  type?: string | undefined;
255
+ id?: string | undefined;
256
256
  external_id?: string | null | undefined;
257
257
  address?: string | undefined;
258
258
  is_group?: boolean | undefined;
259
259
  }, {
260
260
  name?: string | undefined;
261
- id?: string | undefined;
262
261
  type?: string | undefined;
262
+ id?: string | undefined;
263
263
  external_id?: string | null | undefined;
264
264
  address?: string | undefined;
265
265
  is_group?: unknown;
@@ -472,15 +472,15 @@ export declare const zChatContactSchema: z.ZodObject<{
472
472
  type: z.ZodOptional<z.ZodString>;
473
473
  }, "strip", z.ZodTypeAny, {
474
474
  name?: string | undefined;
475
- id?: string | undefined;
476
475
  type?: string | undefined;
476
+ id?: string | undefined;
477
477
  external_id?: string | null | undefined;
478
478
  address?: string | undefined;
479
479
  is_group?: boolean | undefined;
480
480
  }, {
481
481
  name?: string | undefined;
482
- id?: string | undefined;
483
482
  type?: string | undefined;
483
+ id?: string | undefined;
484
484
  external_id?: string | null | undefined;
485
485
  address?: string | undefined;
486
486
  is_group?: unknown;
@@ -10552,6 +10552,8 @@ export declare const zInvoiceSourceRefSchema: z.ZodObject<{
10552
10552
  label: z.ZodOptional<z.ZodString>;
10553
10553
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
10554
10554
  }, z.ZodTypeAny, "passthrough">>;
10555
+ import { zExternalObjectTypeSchema, zExternalLinkSchema } from "../evo-task/zod-schemas";
10556
+ export { zExternalObjectTypeSchema, zExternalLinkSchema };
10555
10557
  export declare const zProviderServiceInvoiceStatusSchema: z.ZodEnum<["SCHEDULED", "SYNCHRONIZED", "AUTHORIZED", "PROCESSING_CANCELLATION", "CANCELED", "CANCELLATION_DENIED", "ERROR"]>;
10556
10558
  export declare const zServiceInvoiceStateSchema: z.ZodEnum<["DRAFT", "SENT", "SCHEDULED", "SYNCHRONIZED", "AUTHORIZED", "PROCESSING_CANCELLATION", "CANCELED", "CANCELLATION_DENIED", "ERROR"]>;
10557
10559
  export declare const zServiceLineItemSchema: z.ZodObject<{
@@ -10852,6 +10854,22 @@ export declare const zServiceInvoiceSchema: z.ZodObject<{
10852
10854
  label: z.ZodOptional<z.ZodString>;
10853
10855
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
10854
10856
  }, z.ZodTypeAny, "passthrough">>>;
10857
+ externalLinks: z.ZodOptional<z.ZodArray<z.ZodObject<{
10858
+ type: z.ZodEnum<["crm_lead", "med_patient", "med_professional", "med_appointment", "chat_contact"]>;
10859
+ id: z.ZodString;
10860
+ label: z.ZodOptional<z.ZodString>;
10861
+ ref: z.ZodOptional<z.ZodAny>;
10862
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
10863
+ type: z.ZodEnum<["crm_lead", "med_patient", "med_professional", "med_appointment", "chat_contact"]>;
10864
+ id: z.ZodString;
10865
+ label: z.ZodOptional<z.ZodString>;
10866
+ ref: z.ZodOptional<z.ZodAny>;
10867
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
10868
+ type: z.ZodEnum<["crm_lead", "med_patient", "med_professional", "med_appointment", "chat_contact"]>;
10869
+ id: z.ZodString;
10870
+ label: z.ZodOptional<z.ZodString>;
10871
+ ref: z.ZodOptional<z.ZodAny>;
10872
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
10855
10873
  competence_date: z.ZodOptional<z.ZodEffects<z.ZodDate, Date, unknown>>;
10856
10874
  service_description: z.ZodOptional<z.ZodString>;
10857
10875
  items: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -11166,6 +11184,22 @@ export declare const zServiceInvoiceSchema: z.ZodObject<{
11166
11184
  label: z.ZodOptional<z.ZodString>;
11167
11185
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
11168
11186
  }, z.ZodTypeAny, "passthrough">>>;
11187
+ externalLinks: z.ZodOptional<z.ZodArray<z.ZodObject<{
11188
+ type: z.ZodEnum<["crm_lead", "med_patient", "med_professional", "med_appointment", "chat_contact"]>;
11189
+ id: z.ZodString;
11190
+ label: z.ZodOptional<z.ZodString>;
11191
+ ref: z.ZodOptional<z.ZodAny>;
11192
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
11193
+ type: z.ZodEnum<["crm_lead", "med_patient", "med_professional", "med_appointment", "chat_contact"]>;
11194
+ id: z.ZodString;
11195
+ label: z.ZodOptional<z.ZodString>;
11196
+ ref: z.ZodOptional<z.ZodAny>;
11197
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
11198
+ type: z.ZodEnum<["crm_lead", "med_patient", "med_professional", "med_appointment", "chat_contact"]>;
11199
+ id: z.ZodString;
11200
+ label: z.ZodOptional<z.ZodString>;
11201
+ ref: z.ZodOptional<z.ZodAny>;
11202
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
11169
11203
  competence_date: z.ZodOptional<z.ZodEffects<z.ZodDate, Date, unknown>>;
11170
11204
  service_description: z.ZodOptional<z.ZodString>;
11171
11205
  items: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -11480,6 +11514,22 @@ export declare const zServiceInvoiceSchema: z.ZodObject<{
11480
11514
  label: z.ZodOptional<z.ZodString>;
11481
11515
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
11482
11516
  }, z.ZodTypeAny, "passthrough">>>;
11517
+ externalLinks: z.ZodOptional<z.ZodArray<z.ZodObject<{
11518
+ type: z.ZodEnum<["crm_lead", "med_patient", "med_professional", "med_appointment", "chat_contact"]>;
11519
+ id: z.ZodString;
11520
+ label: z.ZodOptional<z.ZodString>;
11521
+ ref: z.ZodOptional<z.ZodAny>;
11522
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
11523
+ type: z.ZodEnum<["crm_lead", "med_patient", "med_professional", "med_appointment", "chat_contact"]>;
11524
+ id: z.ZodString;
11525
+ label: z.ZodOptional<z.ZodString>;
11526
+ ref: z.ZodOptional<z.ZodAny>;
11527
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
11528
+ type: z.ZodEnum<["crm_lead", "med_patient", "med_professional", "med_appointment", "chat_contact"]>;
11529
+ id: z.ZodString;
11530
+ label: z.ZodOptional<z.ZodString>;
11531
+ ref: z.ZodOptional<z.ZodAny>;
11532
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
11483
11533
  competence_date: z.ZodOptional<z.ZodEffects<z.ZodDate, Date, unknown>>;
11484
11534
  service_description: z.ZodOptional<z.ZodString>;
11485
11535
  items: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.zProviderInvoiceErrorSchema = exports.zProviderInvoiceIdentifiersSchema = exports.zProviderInvoiceLinksSchema = exports.zServiceTaxInfoSchema = exports.zServiceLineItemSchema = exports.zServiceInvoiceStateSchema = exports.zProviderServiceInvoiceStatusSchema = exports.zInvoiceSourceRefSchema = exports.zInvoiceSourceTypeSchema = exports.zInvoiceTakerRefSchema = exports.zInvoiceTakerSnapshotSchema = exports.zInvoiceTakerSnapshotAddressSchema = exports.zTakerDocumentSchema = exports.zTakerTaxProfileSchema = exports.zTakerProviderRefsSchema = exports.zTakerAddressSchema = exports.zInvoiceTakerTypeSchema = exports.zServiceSchema = exports.zCustomerServiceTaxInfoSchema = exports.zIssuerTaxProfileSchema = exports.zIssuerNfseConfigSchema = exports.zIssuerMunicipalCredentialsRefSchema = exports.zIssuerTaxRegimeSchema = exports.zIssuerCompanyIdentitySchema = exports.zIssuerCompanyAddressSchema = exports.zTaxProfileSyncStateSchema = exports.zAsaasProviderSchema = exports.zAsaasProviderAsaasBlockSchema = exports.zAsaasProviderCapabilitiesSchema = exports.zAsaasPaymentsCapabilitiesSchema = exports.zAsaasNfseCapabilitiesSchema = exports.zAsaasEnvAuthConfigSchema = exports.zAsaasSubaccountInputSchema = exports.zAsaasAccountScopeSchema = exports.zAsaasWebhookConfigSchema = exports.zRetryPolicySchema = exports.zAsaasWebhookEventSchema = exports.zAsaasAccountScopeModeSchema = exports.zProviderRemoteRefsSchema = exports.zProviderFiscalInfoPayloadSchema = exports.zProviderCredentialsInputSchema = exports.zProviderCredentialsSecretRefsSchema = exports.zProviderMunicipalOptionsSnapshotSchema = exports.zProviderOptionItemSchema = exports.zProviderMunicipalAuthTypeSchema = exports.zFinopsProviderBaseSchema = exports.zProviderStatusSchema = exports.zFinopsActionSchema = exports.zFinopsProviderTypeSchema = exports.zProviderEnvSchema = void 0;
4
- exports.zServiceInvoiceSchema = exports.zProviderPayloadSnapshotSchema = exports.zProviderTraceSchema = void 0;
3
+ exports.zProviderInvoiceLinksSchema = exports.zServiceTaxInfoSchema = exports.zServiceLineItemSchema = exports.zServiceInvoiceStateSchema = exports.zProviderServiceInvoiceStatusSchema = exports.zExternalLinkSchema = exports.zExternalObjectTypeSchema = exports.zInvoiceSourceRefSchema = exports.zInvoiceSourceTypeSchema = exports.zInvoiceTakerRefSchema = exports.zInvoiceTakerSnapshotSchema = exports.zInvoiceTakerSnapshotAddressSchema = exports.zTakerDocumentSchema = exports.zTakerTaxProfileSchema = exports.zTakerProviderRefsSchema = exports.zTakerAddressSchema = exports.zInvoiceTakerTypeSchema = exports.zServiceSchema = exports.zCustomerServiceTaxInfoSchema = exports.zIssuerTaxProfileSchema = exports.zIssuerNfseConfigSchema = exports.zIssuerMunicipalCredentialsRefSchema = exports.zIssuerTaxRegimeSchema = exports.zIssuerCompanyIdentitySchema = exports.zIssuerCompanyAddressSchema = exports.zTaxProfileSyncStateSchema = exports.zAsaasProviderSchema = exports.zAsaasProviderAsaasBlockSchema = exports.zAsaasProviderCapabilitiesSchema = exports.zAsaasPaymentsCapabilitiesSchema = exports.zAsaasNfseCapabilitiesSchema = exports.zAsaasEnvAuthConfigSchema = exports.zAsaasSubaccountInputSchema = exports.zAsaasAccountScopeSchema = exports.zAsaasWebhookConfigSchema = exports.zRetryPolicySchema = exports.zAsaasWebhookEventSchema = exports.zAsaasAccountScopeModeSchema = exports.zProviderRemoteRefsSchema = exports.zProviderFiscalInfoPayloadSchema = exports.zProviderCredentialsInputSchema = exports.zProviderCredentialsSecretRefsSchema = exports.zProviderMunicipalOptionsSnapshotSchema = exports.zProviderOptionItemSchema = exports.zProviderMunicipalAuthTypeSchema = exports.zFinopsProviderBaseSchema = exports.zProviderStatusSchema = exports.zFinopsActionSchema = exports.zFinopsProviderTypeSchema = exports.zProviderEnvSchema = void 0;
4
+ exports.zServiceInvoiceSchema = exports.zProviderPayloadSnapshotSchema = exports.zProviderTraceSchema = exports.zProviderInvoiceErrorSchema = exports.zProviderInvoiceIdentifiersSchema = void 0;
5
5
  const zod_1 = require("zod");
6
6
  const zod_schemas_1 = require("../shared/zod-schemas");
7
7
  // ---- Provider enums and base ----
@@ -468,6 +468,10 @@ exports.zInvoiceSourceRefSchema = zod_1.z
468
468
  metadata: zod_1.z.record(zod_1.z.unknown()).optional(),
469
469
  })
470
470
  .passthrough();
471
+ // External link schema (shared across modules) - imported from evo-task to avoid duplication
472
+ const zod_schemas_2 = require("../evo-task/zod-schemas");
473
+ Object.defineProperty(exports, "zExternalObjectTypeSchema", { enumerable: true, get: function () { return zod_schemas_2.zExternalObjectTypeSchema; } });
474
+ Object.defineProperty(exports, "zExternalLinkSchema", { enumerable: true, get: function () { return zod_schemas_2.zExternalLinkSchema; } });
471
475
  exports.zProviderServiceInvoiceStatusSchema = zod_1.z.enum([
472
476
  "SCHEDULED",
473
477
  "SYNCHRONIZED",
@@ -563,6 +567,7 @@ exports.zServiceInvoiceSchema = zod_schemas_1.zFireDocSchema
563
567
  .optional(),
564
568
  taker: exports.zInvoiceTakerRefSchema,
565
569
  source: exports.zInvoiceSourceRefSchema.optional(),
570
+ externalLinks: zod_1.z.array(zod_schemas_2.zExternalLinkSchema).optional(),
566
571
  competence_date: zod_schemas_1.zFirestoreDateSchema.optional(),
567
572
  service_description: zod_1.z.string().optional(),
568
573
  items: zod_1.z.array(exports.zServiceLineItemSchema).optional(),
@@ -507,6 +507,10 @@ export const zInvoiceSourceRefSchema = z
507
507
  })
508
508
  .passthrough();
509
509
 
510
+ // External link schema (shared across modules) - imported from evo-task to avoid duplication
511
+ import { zExternalObjectTypeSchema, zExternalLinkSchema } from "../evo-task/zod-schemas";
512
+ export { zExternalObjectTypeSchema, zExternalLinkSchema };
513
+
510
514
  export const zProviderServiceInvoiceStatusSchema = z.enum([
511
515
  "SCHEDULED",
512
516
  "SYNCHRONIZED",
@@ -611,6 +615,7 @@ export const zServiceInvoiceSchema = zFireDocSchema
611
615
  .optional(),
612
616
  taker: zInvoiceTakerRefSchema,
613
617
  source: zInvoiceSourceRefSchema.optional(),
618
+ externalLinks: z.array(zExternalLinkSchema).optional(),
614
619
  competence_date: zFirestoreDateSchema.optional(),
615
620
  service_description: z.string().optional(),
616
621
  items: z.array(zServiceLineItemSchema).optional(),
@@ -8,8 +8,25 @@ export declare const zTaskAutoHandlerSchema: z.ZodEnum<["notifications", "ai_age
8
8
  export declare const zTaskRetryStrategySchema: z.ZodEnum<["fixed", "exponential"]>;
9
9
  export declare const zTaskDedupScopeSchema: z.ZodEnum<["per_recipient", "per_recipient_and_object", "custom"]>;
10
10
  export declare const zTaskDedupWindowSchema: z.ZodEnum<["same_day", "n_hours", "custom"]>;
11
+ export declare const zExternalObjectTypeSchema: z.ZodEnum<["crm_lead", "med_patient", "med_professional", "med_appointment", "chat_contact"]>;
11
12
  export declare const zTaskExternalObjectTypeSchema: z.ZodEnum<["crm_lead", "med_patient", "med_professional", "med_appointment", "chat_contact"]>;
12
13
  export declare const zTaskExecutionStatusSchema: z.ZodEnum<["success", "error", "retry"]>;
14
+ export declare const zExternalLinkSchema: z.ZodObject<{
15
+ type: z.ZodEnum<["crm_lead", "med_patient", "med_professional", "med_appointment", "chat_contact"]>;
16
+ id: z.ZodString;
17
+ label: z.ZodOptional<z.ZodString>;
18
+ ref: z.ZodOptional<z.ZodAny>;
19
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
20
+ type: z.ZodEnum<["crm_lead", "med_patient", "med_professional", "med_appointment", "chat_contact"]>;
21
+ id: z.ZodString;
22
+ label: z.ZodOptional<z.ZodString>;
23
+ ref: z.ZodOptional<z.ZodAny>;
24
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
25
+ type: z.ZodEnum<["crm_lead", "med_patient", "med_professional", "med_appointment", "chat_contact"]>;
26
+ id: z.ZodString;
27
+ label: z.ZodOptional<z.ZodString>;
28
+ ref: z.ZodOptional<z.ZodAny>;
29
+ }, z.ZodTypeAny, "passthrough">>;
13
30
  export declare const zTaskExternalLinkSchema: z.ZodObject<{
14
31
  type: z.ZodEnum<["crm_lead", "med_patient", "med_professional", "med_appointment", "chat_contact"]>;
15
32
  id: z.ZodString;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.zTaskLogSchema = exports.zTaskExecutionSchema = exports.zTaskExecutionProviderSchema = exports.zTaskExecutionErrorSchema = exports.zTaskCommentSchema = exports.zTaskCommentAuthorSchema = exports.zTaskSchema = exports.zTaskCreatorSchema = exports.zTaskOnFailureSchema = exports.zTaskAutoSpecSchema = exports.zTaskDedupSchema = exports.zTaskRetryPolicySchema = exports.zTaskLockSchema = exports.zTaskUserAssigneeSchema = exports.zTaskScheduleSchema = exports.zTaskExternalLinkSchema = exports.zTaskExecutionStatusSchema = exports.zTaskExternalObjectTypeSchema = exports.zTaskDedupWindowSchema = exports.zTaskDedupScopeSchema = exports.zTaskRetryStrategySchema = exports.zTaskAutoHandlerSchema = exports.zTaskModeSchema = exports.zTaskSourceSchema = exports.zTaskPrioritySchema = exports.zTaskStatusSchema = exports.zTaskActionSchema = void 0;
3
+ exports.zTaskLogSchema = exports.zTaskExecutionSchema = exports.zTaskExecutionProviderSchema = exports.zTaskExecutionErrorSchema = exports.zTaskCommentSchema = exports.zTaskCommentAuthorSchema = exports.zTaskSchema = exports.zTaskCreatorSchema = exports.zTaskOnFailureSchema = exports.zTaskAutoSpecSchema = exports.zTaskDedupSchema = exports.zTaskRetryPolicySchema = exports.zTaskLockSchema = exports.zTaskUserAssigneeSchema = exports.zTaskScheduleSchema = exports.zTaskExternalLinkSchema = exports.zExternalLinkSchema = exports.zTaskExecutionStatusSchema = exports.zTaskExternalObjectTypeSchema = exports.zExternalObjectTypeSchema = exports.zTaskDedupWindowSchema = exports.zTaskDedupScopeSchema = exports.zTaskRetryStrategySchema = exports.zTaskAutoHandlerSchema = exports.zTaskModeSchema = exports.zTaskSourceSchema = 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([
@@ -34,21 +34,26 @@ exports.zTaskDedupScopeSchema = zod_1.z.enum([
34
34
  "custom",
35
35
  ]);
36
36
  exports.zTaskDedupWindowSchema = zod_1.z.enum(["same_day", "n_hours", "custom"]);
37
- exports.zTaskExternalObjectTypeSchema = zod_1.z.enum([
37
+ // External object type schema (promoted to shared, renamed from Task-specific)
38
+ exports.zExternalObjectTypeSchema = zod_1.z.enum([
38
39
  "crm_lead",
39
40
  "med_patient",
40
41
  "med_professional",
41
42
  "med_appointment",
42
43
  "chat_contact",
43
44
  ]);
45
+ // Backward compatibility alias
46
+ exports.zTaskExternalObjectTypeSchema = exports.zExternalObjectTypeSchema;
44
47
  exports.zTaskExecutionStatusSchema = zod_1.z.enum(["success", "error", "retry"]);
45
- // Schema para ITaskExternalLink
46
- exports.zTaskExternalLinkSchema = zod_1.z.object({
47
- type: exports.zTaskExternalObjectTypeSchema,
48
+ // Schema para IExternalLink (promoted to shared, renamed from Task-specific)
49
+ exports.zExternalLinkSchema = zod_1.z.object({
50
+ type: exports.zExternalObjectTypeSchema,
48
51
  id: zod_1.z.string(),
49
52
  label: zod_1.z.string().optional(),
50
53
  ref: zod_1.z.any().optional(), // FirestoreDocumentReference
51
54
  }).passthrough();
55
+ // Backward compatibility alias
56
+ exports.zTaskExternalLinkSchema = exports.zExternalLinkSchema;
52
57
  // Schema para ITaskSchedule
53
58
  exports.zTaskScheduleSchema = zod_1.z.object({
54
59
  execute_at: zod_1.z.coerce.date().optional(),
@@ -41,7 +41,8 @@ export const zTaskDedupScopeSchema = z.enum([
41
41
 
42
42
  export const zTaskDedupWindowSchema = z.enum(["same_day", "n_hours", "custom"]);
43
43
 
44
- export const zTaskExternalObjectTypeSchema = z.enum([
44
+ // External object type schema (promoted to shared, renamed from Task-specific)
45
+ export const zExternalObjectTypeSchema = z.enum([
45
46
  "crm_lead",
46
47
  "med_patient",
47
48
  "med_professional",
@@ -49,16 +50,22 @@ export const zTaskExternalObjectTypeSchema = z.enum([
49
50
  "chat_contact",
50
51
  ]);
51
52
 
53
+ // Backward compatibility alias
54
+ export const zTaskExternalObjectTypeSchema = zExternalObjectTypeSchema;
55
+
52
56
  export const zTaskExecutionStatusSchema = z.enum(["success", "error", "retry"]);
53
57
 
54
- // Schema para ITaskExternalLink
55
- export const zTaskExternalLinkSchema = z.object({
56
- type: zTaskExternalObjectTypeSchema,
58
+ // Schema para IExternalLink (promoted to shared, renamed from Task-specific)
59
+ export const zExternalLinkSchema = z.object({
60
+ type: zExternalObjectTypeSchema,
57
61
  id: z.string(),
58
62
  label: z.string().optional(),
59
63
  ref: z.any().optional(), // FirestoreDocumentReference
60
64
  }).passthrough();
61
65
 
66
+ // Backward compatibility alias
67
+ export const zTaskExternalLinkSchema = zExternalLinkSchema;
68
+
62
69
  // Schema para ITaskSchedule
63
70
  export const zTaskScheduleSchema = z.object({
64
71
  execute_at: z.coerce.date().optional(),
@@ -1,4 +1,4 @@
1
- import { IFireDoc } from "../../shared";
1
+ import { IFireDoc, IExternalLink } from "../../shared";
2
2
  import { ProviderTrace, ProviderPayloadSnapshot } from "../common";
3
3
  import { InvoiceTakerType } from "../common/taker";
4
4
  export interface IInvoiceTakerSnapshot {
@@ -112,6 +112,7 @@ export interface IServiceInvoice extends IFireDoc {
112
112
  };
113
113
  taker: IInvoiceTakerRef;
114
114
  source?: IInvoiceSourceRef;
115
+ externalLinks?: IExternalLink[];
115
116
  competence_date?: Date;
116
117
  service_description?: string;
117
118
  items?: IServiceLineItem[];
@@ -1,6 +1,6 @@
1
1
  // core/types/invoices.ts
2
2
 
3
- import { IFireDoc } from "../../shared";
3
+ import { IFireDoc, IExternalLink } from "../../shared";
4
4
  import { ProviderTrace, ProviderPayloadSnapshot } from "../common";
5
5
  import { InvoiceTakerType } from "../common/taker";
6
6
 
@@ -161,6 +161,9 @@ export interface IServiceInvoice extends IFireDoc {
161
161
  // What this invoice is about (generic)
162
162
  source?: IInvoiceSourceRef;
163
163
 
164
+ // Links to other documents (crm_lead, med_patient, etc.)
165
+ externalLinks?: IExternalLink[];
166
+
164
167
  // Service content
165
168
  competence_date?: Date; // service competence (month/day depending on rules)
166
169
  service_description?: string; // free text (if single-line)
@@ -1,5 +1,5 @@
1
1
  export * from "./fb_collections";
2
- import type { FirestoreDocumentReference, IFireDoc, ITag } from "../shared";
2
+ import type { FirestoreDocumentReference, IFireDoc, ITag, IExternalLink } from "../shared";
3
3
  export declare const EvoTaskPermissions: {
4
4
  readonly List: "evo_task_read";
5
5
  readonly Get: "evo_task_read";
@@ -95,21 +95,8 @@ export interface ITaskDedup {
95
95
  importance?: number;
96
96
  [key: string]: unknown;
97
97
  }
98
- export declare const TaskExternalObjectTypeEnum: {
99
- readonly CrmLead: "crm_lead";
100
- readonly MedPatient: "med_patient";
101
- readonly MedProfessional: "med_professional";
102
- readonly MedAppointment: "med_appointment";
103
- readonly ChatContact: "chat_contact";
104
- };
105
- export type TaskExternalObjectType = (typeof TaskExternalObjectTypeEnum)[keyof typeof TaskExternalObjectTypeEnum];
106
- export interface ITaskExternalLink {
107
- type: TaskExternalObjectType;
108
- id: string;
109
- label?: string;
110
- ref?: FirestoreDocumentReference;
111
- [key: string]: unknown;
112
- }
98
+ export type { ExternalObjectType, ExternalObjectTypeEnum, IExternalLink } from "../shared";
99
+ export type { ExternalObjectType as TaskExternalObjectType, ExternalObjectTypeEnum as TaskExternalObjectTypeEnum, IExternalLink as ITaskExternalLink } from "../shared";
113
100
  export interface ITaskUserAssignee {
114
101
  kind: "user";
115
102
  name?: string;
@@ -161,7 +148,7 @@ export interface ITaskBase extends IFireDoc {
161
148
  };
162
149
  schedule?: ITaskSchedule;
163
150
  tags?: ITag[] | null;
164
- externalLinks?: ITaskExternalLink[];
151
+ externalLinks?: IExternalLink[];
165
152
  idempotency_key?: string;
166
153
  dedup?: ITaskDedup;
167
154
  metadata?: Record<string, unknown>;
@@ -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.TaskExecutionStatusEnum = exports.TaskExternalObjectTypeEnum = exports.TaskDedupWindowEnum = exports.TaskDedupScopeEnum = exports.TaskRetryStrategyEnum = exports.TaskAutoHandlerEnum = exports.TaskModeEnum = exports.TaskSourceEnum = exports.TaskPriorityEnum = exports.TaskStatusEnum = exports.TaskActionEnum = exports.EvoTaskPermissions = void 0;
17
+ exports.TaskExecutionStatusEnum = exports.TaskDedupWindowEnum = exports.TaskDedupScopeEnum = exports.TaskRetryStrategyEnum = exports.TaskAutoHandlerEnum = exports.TaskModeEnum = exports.TaskSourceEnum = exports.TaskPriorityEnum = exports.TaskStatusEnum = exports.TaskActionEnum = exports.EvoTaskPermissions = void 0;
18
18
  __exportStar(require("./fb_collections"), exports);
19
19
  // Permissões para o task
20
20
  exports.EvoTaskPermissions = {
@@ -93,14 +93,6 @@ exports.TaskDedupWindowEnum = {
93
93
  NHours: "n_hours",
94
94
  Custom: "custom",
95
95
  };
96
- // ----- External object links (for unified UI views)
97
- exports.TaskExternalObjectTypeEnum = {
98
- CrmLead: "crm_lead",
99
- MedPatient: "med_patient",
100
- MedProfessional: "med_professional",
101
- MedAppointment: "med_appointment",
102
- ChatContact: "chat_contact",
103
- };
104
96
  // ----- Task execution attempts (sub-collection: tasks/{taskId}/executions)
105
97
  exports.TaskExecutionStatusEnum = {
106
98
  Success: "success",
@@ -1,5 +1,5 @@
1
1
  export * from "./fb_collections";
2
- import type { FirestoreDocumentReference, IFireDoc, ITag } from "../shared";
2
+ import type { FirestoreDocumentReference, IFireDoc, ITag, IExternalLink } from "../shared";
3
3
 
4
4
  // Permissões para o task
5
5
  export const EvoTaskPermissions = {
@@ -149,24 +149,10 @@ export interface ITaskDedup {
149
149
  }
150
150
 
151
151
  // ----- External object links (for unified UI views)
152
- export const TaskExternalObjectTypeEnum = {
153
- CrmLead: "crm_lead",
154
- MedPatient: "med_patient",
155
- MedProfessional: "med_professional",
156
- MedAppointment: "med_appointment",
157
- ChatContact: "chat_contact",
158
- } as const;
159
-
160
- export type TaskExternalObjectType =
161
- (typeof TaskExternalObjectTypeEnum)[keyof typeof TaskExternalObjectTypeEnum];
162
-
163
- export interface ITaskExternalLink {
164
- type: TaskExternalObjectType;
165
- id: string;
166
- label?: string;
167
- ref?: FirestoreDocumentReference;
168
- [key: string]: unknown;
169
- }
152
+ // Types moved to shared/external-links.ts for reuse across modules
153
+ // Re-export both original names (from shared) and Task-specific aliases for backward compatibility
154
+ export type { ExternalObjectType, ExternalObjectTypeEnum, IExternalLink } from "../shared";
155
+ export type { ExternalObjectType as TaskExternalObjectType, ExternalObjectTypeEnum as TaskExternalObjectTypeEnum, IExternalLink as ITaskExternalLink } from "../shared";
170
156
 
171
157
  // ----- Assignee (human)
172
158
  export interface ITaskUserAssignee {
@@ -242,7 +228,7 @@ export interface ITaskBase extends IFireDoc {
242
228
 
243
229
  // Links and taxonomy
244
230
  tags?: ITag[] | null;
245
- externalLinks?: ITaskExternalLink[];
231
+ externalLinks?: IExternalLink[];
246
232
 
247
233
  // Optional deterministic key to avoid duplicates on rebuild/events
248
234
  idempotency_key?: string;
@@ -0,0 +1,16 @@
1
+ import type { FirestoreDocumentReference } from ".";
2
+ export declare const ExternalObjectTypeEnum: {
3
+ readonly CrmLead: "crm_lead";
4
+ readonly MedPatient: "med_patient";
5
+ readonly MedProfessional: "med_professional";
6
+ readonly MedAppointment: "med_appointment";
7
+ readonly ChatContact: "chat_contact";
8
+ };
9
+ export type ExternalObjectType = (typeof ExternalObjectTypeEnum)[keyof typeof ExternalObjectTypeEnum];
10
+ export interface IExternalLink {
11
+ type: ExternalObjectType;
12
+ id: string;
13
+ label?: string;
14
+ ref?: FirestoreDocumentReference;
15
+ [key: string]: unknown;
16
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ExternalObjectTypeEnum = void 0;
4
+ // ----- External object links (for unified UI views across modules)
5
+ // Promoted from evo-task to shared for reuse in invoices, tasks, and other modules
6
+ exports.ExternalObjectTypeEnum = {
7
+ CrmLead: "crm_lead",
8
+ MedPatient: "med_patient",
9
+ MedProfessional: "med_professional",
10
+ MedAppointment: "med_appointment",
11
+ ChatContact: "chat_contact",
12
+ };
@@ -0,0 +1,23 @@
1
+ import type { FirestoreDocumentReference } from ".";
2
+
3
+ // ----- External object links (for unified UI views across modules)
4
+ // Promoted from evo-task to shared for reuse in invoices, tasks, and other modules
5
+
6
+ export const ExternalObjectTypeEnum = {
7
+ CrmLead: "crm_lead",
8
+ MedPatient: "med_patient",
9
+ MedProfessional: "med_professional",
10
+ MedAppointment: "med_appointment",
11
+ ChatContact: "chat_contact",
12
+ } as const;
13
+
14
+ export type ExternalObjectType =
15
+ (typeof ExternalObjectTypeEnum)[keyof typeof ExternalObjectTypeEnum];
16
+
17
+ export interface IExternalLink {
18
+ type: ExternalObjectType;
19
+ id: string;
20
+ label?: string;
21
+ ref?: FirestoreDocumentReference;
22
+ [key: string]: unknown;
23
+ }
@@ -1,4 +1,5 @@
1
1
  export * from "./fb_collections";
2
+ export * from "./external-links";
2
3
  export interface FirestoreDocumentReference {
3
4
  id: string;
4
5
  path: string;
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.IEvoApp = void 0;
18
18
  __exportStar(require("./fb_collections"), exports);
19
+ __exportStar(require("./external-links"), exports);
19
20
  var IEvoApp;
20
21
  (function (IEvoApp) {
21
22
  IEvoApp["EvoActivity"] = "evo-activity";
@@ -1,4 +1,5 @@
1
1
  export * from "./fb_collections";
2
+ export * from "./external-links";
2
3
 
3
4
  // ----- FirestoreTypes
4
5
  // Definir o tipo unificado para DocumentReference
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "evo360-types",
3
- "version": "1.3.214",
3
+ "version": "1.3.217",
4
4
  "description": "HREVO360 Shared Types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",