evo360-types 1.3.213 → 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;
@@ -10352,6 +10352,7 @@ export declare const zInvoiceTakerSnapshotSchema: z.ZodObject<{
10352
10352
  email: z.ZodOptional<z.ZodString>;
10353
10353
  phone: z.ZodOptional<z.ZodString>;
10354
10354
  cpf_cnpj: z.ZodOptional<z.ZodString>;
10355
+ customerId: z.ZodOptional<z.ZodString>;
10355
10356
  address: z.ZodOptional<z.ZodObject<{
10356
10357
  street: z.ZodOptional<z.ZodString>;
10357
10358
  number: z.ZodOptional<z.ZodString>;
@@ -10395,6 +10396,7 @@ export declare const zInvoiceTakerSnapshotSchema: z.ZodObject<{
10395
10396
  country: z.ZodOptional<z.ZodString>;
10396
10397
  }, z.ZodTypeAny, "passthrough"> | undefined;
10397
10398
  phone?: string | undefined;
10399
+ customerId?: string | undefined;
10398
10400
  cpf_cnpj?: string | undefined;
10399
10401
  }, {
10400
10402
  name: string;
@@ -10411,6 +10413,7 @@ export declare const zInvoiceTakerSnapshotSchema: z.ZodObject<{
10411
10413
  country: z.ZodOptional<z.ZodString>;
10412
10414
  }, z.ZodTypeAny, "passthrough"> | undefined;
10413
10415
  phone?: string | undefined;
10416
+ customerId?: string | undefined;
10414
10417
  cpf_cnpj?: string | undefined;
10415
10418
  }>;
10416
10419
  export declare const zInvoiceTakerRefSchema: z.ZodObject<{
@@ -10423,6 +10426,7 @@ export declare const zInvoiceTakerRefSchema: z.ZodObject<{
10423
10426
  email: z.ZodOptional<z.ZodString>;
10424
10427
  phone: z.ZodOptional<z.ZodString>;
10425
10428
  cpf_cnpj: z.ZodOptional<z.ZodString>;
10429
+ customerId: z.ZodOptional<z.ZodString>;
10426
10430
  address: z.ZodOptional<z.ZodObject<{
10427
10431
  street: z.ZodOptional<z.ZodString>;
10428
10432
  number: z.ZodOptional<z.ZodString>;
@@ -10466,6 +10470,7 @@ export declare const zInvoiceTakerRefSchema: z.ZodObject<{
10466
10470
  country: z.ZodOptional<z.ZodString>;
10467
10471
  }, z.ZodTypeAny, "passthrough"> | undefined;
10468
10472
  phone?: string | undefined;
10473
+ customerId?: string | undefined;
10469
10474
  cpf_cnpj?: string | undefined;
10470
10475
  }, {
10471
10476
  name: string;
@@ -10482,6 +10487,7 @@ export declare const zInvoiceTakerRefSchema: z.ZodObject<{
10482
10487
  country: z.ZodOptional<z.ZodString>;
10483
10488
  }, z.ZodTypeAny, "passthrough"> | undefined;
10484
10489
  phone?: string | undefined;
10490
+ customerId?: string | undefined;
10485
10491
  cpf_cnpj?: string | undefined;
10486
10492
  }>;
10487
10493
  }, "strip", z.ZodTypeAny, {
@@ -10500,6 +10506,7 @@ export declare const zInvoiceTakerRefSchema: z.ZodObject<{
10500
10506
  country: z.ZodOptional<z.ZodString>;
10501
10507
  }, z.ZodTypeAny, "passthrough"> | undefined;
10502
10508
  phone?: string | undefined;
10509
+ customerId?: string | undefined;
10503
10510
  cpf_cnpj?: string | undefined;
10504
10511
  };
10505
10512
  lead_id?: string | undefined;
@@ -10521,6 +10528,7 @@ export declare const zInvoiceTakerRefSchema: z.ZodObject<{
10521
10528
  country: z.ZodOptional<z.ZodString>;
10522
10529
  }, z.ZodTypeAny, "passthrough"> | undefined;
10523
10530
  phone?: string | undefined;
10531
+ customerId?: string | undefined;
10524
10532
  cpf_cnpj?: string | undefined;
10525
10533
  };
10526
10534
  lead_id?: string | undefined;
@@ -10544,6 +10552,8 @@ export declare const zInvoiceSourceRefSchema: z.ZodObject<{
10544
10552
  label: z.ZodOptional<z.ZodString>;
10545
10553
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
10546
10554
  }, z.ZodTypeAny, "passthrough">>;
10555
+ import { zExternalObjectTypeSchema, zExternalLinkSchema } from "../evo-task/zod-schemas";
10556
+ export { zExternalObjectTypeSchema, zExternalLinkSchema };
10547
10557
  export declare const zProviderServiceInvoiceStatusSchema: z.ZodEnum<["SCHEDULED", "SYNCHRONIZED", "AUTHORIZED", "PROCESSING_CANCELLATION", "CANCELED", "CANCELLATION_DENIED", "ERROR"]>;
10548
10558
  export declare const zServiceInvoiceStateSchema: z.ZodEnum<["DRAFT", "SENT", "SCHEDULED", "SYNCHRONIZED", "AUTHORIZED", "PROCESSING_CANCELLATION", "CANCELED", "CANCELLATION_DENIED", "ERROR"]>;
10549
10559
  export declare const zServiceLineItemSchema: z.ZodObject<{
@@ -10685,7 +10695,9 @@ export declare const zServiceInvoiceSchema: z.ZodObject<{
10685
10695
  updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
10686
10696
  deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
10687
10697
  } & {
10688
- provider: z.ZodString;
10698
+ providerId: z.ZodString;
10699
+ provider_name: z.ZodOptional<z.ZodString>;
10700
+ provider_env: z.ZodOptional<z.ZodEnum<["Sandbox", "Production"]>>;
10689
10701
  provider_account_id: z.ZodOptional<z.ZodString>;
10690
10702
  provider_invoice_id: z.ZodOptional<z.ZodString>;
10691
10703
  state: z.ZodEnum<["DRAFT", "SENT", "SCHEDULED", "SYNCHRONIZED", "AUTHORIZED", "PROCESSING_CANCELLATION", "CANCELED", "CANCELLATION_DENIED", "ERROR"]>;
@@ -10717,6 +10729,7 @@ export declare const zServiceInvoiceSchema: z.ZodObject<{
10717
10729
  email: z.ZodOptional<z.ZodString>;
10718
10730
  phone: z.ZodOptional<z.ZodString>;
10719
10731
  cpf_cnpj: z.ZodOptional<z.ZodString>;
10732
+ customerId: z.ZodOptional<z.ZodString>;
10720
10733
  address: z.ZodOptional<z.ZodObject<{
10721
10734
  street: z.ZodOptional<z.ZodString>;
10722
10735
  number: z.ZodOptional<z.ZodString>;
@@ -10760,6 +10773,7 @@ export declare const zServiceInvoiceSchema: z.ZodObject<{
10760
10773
  country: z.ZodOptional<z.ZodString>;
10761
10774
  }, z.ZodTypeAny, "passthrough"> | undefined;
10762
10775
  phone?: string | undefined;
10776
+ customerId?: string | undefined;
10763
10777
  cpf_cnpj?: string | undefined;
10764
10778
  }, {
10765
10779
  name: string;
@@ -10776,6 +10790,7 @@ export declare const zServiceInvoiceSchema: z.ZodObject<{
10776
10790
  country: z.ZodOptional<z.ZodString>;
10777
10791
  }, z.ZodTypeAny, "passthrough"> | undefined;
10778
10792
  phone?: string | undefined;
10793
+ customerId?: string | undefined;
10779
10794
  cpf_cnpj?: string | undefined;
10780
10795
  }>;
10781
10796
  }, "strip", z.ZodTypeAny, {
@@ -10794,6 +10809,7 @@ export declare const zServiceInvoiceSchema: z.ZodObject<{
10794
10809
  country: z.ZodOptional<z.ZodString>;
10795
10810
  }, z.ZodTypeAny, "passthrough"> | undefined;
10796
10811
  phone?: string | undefined;
10812
+ customerId?: string | undefined;
10797
10813
  cpf_cnpj?: string | undefined;
10798
10814
  };
10799
10815
  lead_id?: string | undefined;
@@ -10815,6 +10831,7 @@ export declare const zServiceInvoiceSchema: z.ZodObject<{
10815
10831
  country: z.ZodOptional<z.ZodString>;
10816
10832
  }, z.ZodTypeAny, "passthrough"> | undefined;
10817
10833
  phone?: string | undefined;
10834
+ customerId?: string | undefined;
10818
10835
  cpf_cnpj?: string | undefined;
10819
10836
  };
10820
10837
  lead_id?: string | undefined;
@@ -10837,6 +10854,22 @@ export declare const zServiceInvoiceSchema: z.ZodObject<{
10837
10854
  label: z.ZodOptional<z.ZodString>;
10838
10855
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
10839
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">>;
10840
10873
  competence_date: z.ZodOptional<z.ZodEffects<z.ZodDate, Date, unknown>>;
10841
10874
  service_description: z.ZodOptional<z.ZodString>;
10842
10875
  items: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -10992,7 +11025,9 @@ export declare const zServiceInvoiceSchema: z.ZodObject<{
10992
11025
  updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
10993
11026
  deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
10994
11027
  } & {
10995
- provider: z.ZodString;
11028
+ providerId: z.ZodString;
11029
+ provider_name: z.ZodOptional<z.ZodString>;
11030
+ provider_env: z.ZodOptional<z.ZodEnum<["Sandbox", "Production"]>>;
10996
11031
  provider_account_id: z.ZodOptional<z.ZodString>;
10997
11032
  provider_invoice_id: z.ZodOptional<z.ZodString>;
10998
11033
  state: z.ZodEnum<["DRAFT", "SENT", "SCHEDULED", "SYNCHRONIZED", "AUTHORIZED", "PROCESSING_CANCELLATION", "CANCELED", "CANCELLATION_DENIED", "ERROR"]>;
@@ -11024,6 +11059,7 @@ export declare const zServiceInvoiceSchema: z.ZodObject<{
11024
11059
  email: z.ZodOptional<z.ZodString>;
11025
11060
  phone: z.ZodOptional<z.ZodString>;
11026
11061
  cpf_cnpj: z.ZodOptional<z.ZodString>;
11062
+ customerId: z.ZodOptional<z.ZodString>;
11027
11063
  address: z.ZodOptional<z.ZodObject<{
11028
11064
  street: z.ZodOptional<z.ZodString>;
11029
11065
  number: z.ZodOptional<z.ZodString>;
@@ -11067,6 +11103,7 @@ export declare const zServiceInvoiceSchema: z.ZodObject<{
11067
11103
  country: z.ZodOptional<z.ZodString>;
11068
11104
  }, z.ZodTypeAny, "passthrough"> | undefined;
11069
11105
  phone?: string | undefined;
11106
+ customerId?: string | undefined;
11070
11107
  cpf_cnpj?: string | undefined;
11071
11108
  }, {
11072
11109
  name: string;
@@ -11083,6 +11120,7 @@ export declare const zServiceInvoiceSchema: z.ZodObject<{
11083
11120
  country: z.ZodOptional<z.ZodString>;
11084
11121
  }, z.ZodTypeAny, "passthrough"> | undefined;
11085
11122
  phone?: string | undefined;
11123
+ customerId?: string | undefined;
11086
11124
  cpf_cnpj?: string | undefined;
11087
11125
  }>;
11088
11126
  }, "strip", z.ZodTypeAny, {
@@ -11101,6 +11139,7 @@ export declare const zServiceInvoiceSchema: z.ZodObject<{
11101
11139
  country: z.ZodOptional<z.ZodString>;
11102
11140
  }, z.ZodTypeAny, "passthrough"> | undefined;
11103
11141
  phone?: string | undefined;
11142
+ customerId?: string | undefined;
11104
11143
  cpf_cnpj?: string | undefined;
11105
11144
  };
11106
11145
  lead_id?: string | undefined;
@@ -11122,6 +11161,7 @@ export declare const zServiceInvoiceSchema: z.ZodObject<{
11122
11161
  country: z.ZodOptional<z.ZodString>;
11123
11162
  }, z.ZodTypeAny, "passthrough"> | undefined;
11124
11163
  phone?: string | undefined;
11164
+ customerId?: string | undefined;
11125
11165
  cpf_cnpj?: string | undefined;
11126
11166
  };
11127
11167
  lead_id?: string | undefined;
@@ -11144,6 +11184,22 @@ export declare const zServiceInvoiceSchema: z.ZodObject<{
11144
11184
  label: z.ZodOptional<z.ZodString>;
11145
11185
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
11146
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">>;
11147
11203
  competence_date: z.ZodOptional<z.ZodEffects<z.ZodDate, Date, unknown>>;
11148
11204
  service_description: z.ZodOptional<z.ZodString>;
11149
11205
  items: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -11299,7 +11355,9 @@ export declare const zServiceInvoiceSchema: z.ZodObject<{
11299
11355
  updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
11300
11356
  deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
11301
11357
  } & {
11302
- provider: z.ZodString;
11358
+ providerId: z.ZodString;
11359
+ provider_name: z.ZodOptional<z.ZodString>;
11360
+ provider_env: z.ZodOptional<z.ZodEnum<["Sandbox", "Production"]>>;
11303
11361
  provider_account_id: z.ZodOptional<z.ZodString>;
11304
11362
  provider_invoice_id: z.ZodOptional<z.ZodString>;
11305
11363
  state: z.ZodEnum<["DRAFT", "SENT", "SCHEDULED", "SYNCHRONIZED", "AUTHORIZED", "PROCESSING_CANCELLATION", "CANCELED", "CANCELLATION_DENIED", "ERROR"]>;
@@ -11331,6 +11389,7 @@ export declare const zServiceInvoiceSchema: z.ZodObject<{
11331
11389
  email: z.ZodOptional<z.ZodString>;
11332
11390
  phone: z.ZodOptional<z.ZodString>;
11333
11391
  cpf_cnpj: z.ZodOptional<z.ZodString>;
11392
+ customerId: z.ZodOptional<z.ZodString>;
11334
11393
  address: z.ZodOptional<z.ZodObject<{
11335
11394
  street: z.ZodOptional<z.ZodString>;
11336
11395
  number: z.ZodOptional<z.ZodString>;
@@ -11374,6 +11433,7 @@ export declare const zServiceInvoiceSchema: z.ZodObject<{
11374
11433
  country: z.ZodOptional<z.ZodString>;
11375
11434
  }, z.ZodTypeAny, "passthrough"> | undefined;
11376
11435
  phone?: string | undefined;
11436
+ customerId?: string | undefined;
11377
11437
  cpf_cnpj?: string | undefined;
11378
11438
  }, {
11379
11439
  name: string;
@@ -11390,6 +11450,7 @@ export declare const zServiceInvoiceSchema: z.ZodObject<{
11390
11450
  country: z.ZodOptional<z.ZodString>;
11391
11451
  }, z.ZodTypeAny, "passthrough"> | undefined;
11392
11452
  phone?: string | undefined;
11453
+ customerId?: string | undefined;
11393
11454
  cpf_cnpj?: string | undefined;
11394
11455
  }>;
11395
11456
  }, "strip", z.ZodTypeAny, {
@@ -11408,6 +11469,7 @@ export declare const zServiceInvoiceSchema: z.ZodObject<{
11408
11469
  country: z.ZodOptional<z.ZodString>;
11409
11470
  }, z.ZodTypeAny, "passthrough"> | undefined;
11410
11471
  phone?: string | undefined;
11472
+ customerId?: string | undefined;
11411
11473
  cpf_cnpj?: string | undefined;
11412
11474
  };
11413
11475
  lead_id?: string | undefined;
@@ -11429,6 +11491,7 @@ export declare const zServiceInvoiceSchema: z.ZodObject<{
11429
11491
  country: z.ZodOptional<z.ZodString>;
11430
11492
  }, z.ZodTypeAny, "passthrough"> | undefined;
11431
11493
  phone?: string | undefined;
11494
+ customerId?: string | undefined;
11432
11495
  cpf_cnpj?: string | undefined;
11433
11496
  };
11434
11497
  lead_id?: string | undefined;
@@ -11451,6 +11514,22 @@ export declare const zServiceInvoiceSchema: z.ZodObject<{
11451
11514
  label: z.ZodOptional<z.ZodString>;
11452
11515
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
11453
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">>;
11454
11533
  competence_date: z.ZodOptional<z.ZodEffects<z.ZodDate, Date, unknown>>;
11455
11534
  service_description: z.ZodOptional<z.ZodString>;
11456
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 ----
@@ -442,6 +442,7 @@ exports.zInvoiceTakerSnapshotSchema = zod_1.z.object({
442
442
  email: zod_1.z.string().optional(),
443
443
  phone: zod_1.z.string().optional(),
444
444
  cpf_cnpj: zod_1.z.string().optional(),
445
+ customerId: zod_1.z.string().optional(),
445
446
  address: exports.zInvoiceTakerSnapshotAddressSchema.optional(),
446
447
  });
447
448
  exports.zInvoiceTakerRefSchema = zod_1.z.object({
@@ -467,6 +468,10 @@ exports.zInvoiceSourceRefSchema = zod_1.z
467
468
  metadata: zod_1.z.record(zod_1.z.unknown()).optional(),
468
469
  })
469
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; } });
470
475
  exports.zProviderServiceInvoiceStatusSchema = zod_1.z.enum([
471
476
  "SCHEDULED",
472
477
  "SYNCHRONIZED",
@@ -543,7 +548,9 @@ exports.zProviderPayloadSnapshotSchema = zod_1.z.object({
543
548
  });
544
549
  exports.zServiceInvoiceSchema = zod_schemas_1.zFireDocSchema
545
550
  .extend({
546
- provider: zod_1.z.string(),
551
+ providerId: zod_1.z.string(),
552
+ provider_name: zod_1.z.string().optional(),
553
+ provider_env: exports.zProviderEnvSchema.optional(),
547
554
  provider_account_id: zod_1.z.string().optional(),
548
555
  provider_invoice_id: zod_1.z.string().optional(),
549
556
  state: exports.zServiceInvoiceStateSchema,
@@ -560,6 +567,7 @@ exports.zServiceInvoiceSchema = zod_schemas_1.zFireDocSchema
560
567
  .optional(),
561
568
  taker: exports.zInvoiceTakerRefSchema,
562
569
  source: exports.zInvoiceSourceRefSchema.optional(),
570
+ externalLinks: zod_1.z.array(zod_schemas_2.zExternalLinkSchema).optional(),
563
571
  competence_date: zod_schemas_1.zFirestoreDateSchema.optional(),
564
572
  service_description: zod_1.z.string().optional(),
565
573
  items: zod_1.z.array(exports.zServiceLineItemSchema).optional(),
@@ -477,6 +477,7 @@ export const zInvoiceTakerSnapshotSchema = z.object({
477
477
  email: z.string().optional(),
478
478
  phone: z.string().optional(),
479
479
  cpf_cnpj: z.string().optional(),
480
+ customerId: z.string().optional(),
480
481
  address: zInvoiceTakerSnapshotAddressSchema.optional(),
481
482
  });
482
483
 
@@ -506,6 +507,10 @@ export const zInvoiceSourceRefSchema = z
506
507
  })
507
508
  .passthrough();
508
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
+
509
514
  export const zProviderServiceInvoiceStatusSchema = z.enum([
510
515
  "SCHEDULED",
511
516
  "SYNCHRONIZED",
@@ -591,7 +596,9 @@ export const zProviderPayloadSnapshotSchema = z.object({
591
596
 
592
597
  export const zServiceInvoiceSchema = zFireDocSchema
593
598
  .extend({
594
- provider: z.string(),
599
+ providerId: z.string(),
600
+ provider_name: z.string().optional(),
601
+ provider_env: zProviderEnvSchema.optional(),
595
602
  provider_account_id: z.string().optional(),
596
603
  provider_invoice_id: z.string().optional(),
597
604
  state: zServiceInvoiceStateSchema,
@@ -608,6 +615,7 @@ export const zServiceInvoiceSchema = zFireDocSchema
608
615
  .optional(),
609
616
  taker: zInvoiceTakerRefSchema,
610
617
  source: zInvoiceSourceRefSchema.optional(),
618
+ externalLinks: z.array(zExternalLinkSchema).optional(),
611
619
  competence_date: zFirestoreDateSchema.optional(),
612
620
  service_description: z.string().optional(),
613
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 {
@@ -7,6 +7,7 @@ export interface IInvoiceTakerSnapshot {
7
7
  email?: string;
8
8
  phone?: string;
9
9
  cpf_cnpj?: string;
10
+ customerId?: string;
10
11
  address?: {
11
12
  street?: string;
12
13
  number?: string;
@@ -95,7 +96,9 @@ export interface IProviderInvoiceError {
95
96
  details?: unknown;
96
97
  }
97
98
  export interface IServiceInvoice extends IFireDoc {
98
- provider: string;
99
+ providerId: string;
100
+ provider_name?: string;
101
+ provider_env?: "Sandbox" | "Production";
99
102
  provider_account_id?: string;
100
103
  provider_invoice_id?: string;
101
104
  state: ServiceInvoiceState;
@@ -109,6 +112,7 @@ export interface IServiceInvoice extends IFireDoc {
109
112
  };
110
113
  taker: IInvoiceTakerRef;
111
114
  source?: IInvoiceSourceRef;
115
+ externalLinks?: IExternalLink[];
112
116
  competence_date?: Date;
113
117
  service_description?: string;
114
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
 
@@ -14,6 +14,9 @@ export interface IInvoiceTakerSnapshot {
14
14
  // CPF or CNPJ digits only recommended
15
15
  cpf_cnpj?: string;
16
16
 
17
+ // Provider customer ID (e.g., Asaas customer ID)
18
+ customerId?: string;
19
+
17
20
  // Some municipalities require address; keep it optional but available.
18
21
  address?: {
19
22
  street?: string;
@@ -129,7 +132,9 @@ export interface IProviderInvoiceError {
129
132
  }
130
133
 
131
134
  export interface IServiceInvoice extends IFireDoc {
132
- provider: string;
135
+ providerId: string;
136
+ provider_name?: string;
137
+ provider_env?: "Sandbox" | "Production";
133
138
 
134
139
  // Subaccount context: which Provider account issued it (clinic)
135
140
  provider_account_id?: string;
@@ -156,6 +161,9 @@ export interface IServiceInvoice extends IFireDoc {
156
161
  // What this invoice is about (generic)
157
162
  source?: IInvoiceSourceRef;
158
163
 
164
+ // Links to other documents (crm_lead, med_patient, etc.)
165
+ externalLinks?: IExternalLink[];
166
+
159
167
  // Service content
160
168
  competence_date?: Date; // service competence (month/day depending on rules)
161
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.213",
3
+ "version": "1.3.217",
4
4
  "description": "HREVO360 Shared Types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",