evo360-types 1.3.218 → 1.3.220
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.
|
@@ -10870,6 +10870,94 @@ export declare const zServiceInvoiceSchema: z.ZodObject<{
|
|
|
10870
10870
|
label: z.ZodOptional<z.ZodString>;
|
|
10871
10871
|
ref: z.ZodOptional<z.ZodAny>;
|
|
10872
10872
|
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
10873
|
+
evo_chat: z.ZodOptional<z.ZodObject<{
|
|
10874
|
+
notifications: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
10875
|
+
at: z.ZodEffects<z.ZodDate, Date, unknown>;
|
|
10876
|
+
payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
10877
|
+
result: z.ZodOptional<z.ZodObject<{
|
|
10878
|
+
success: z.ZodBoolean;
|
|
10879
|
+
message_id: z.ZodOptional<z.ZodString>;
|
|
10880
|
+
}, "strip", z.ZodTypeAny, {
|
|
10881
|
+
success: boolean;
|
|
10882
|
+
message_id?: string | undefined;
|
|
10883
|
+
}, {
|
|
10884
|
+
success: boolean;
|
|
10885
|
+
message_id?: string | undefined;
|
|
10886
|
+
}>>;
|
|
10887
|
+
}, "strip", z.ZodTypeAny, {
|
|
10888
|
+
payload: Record<string, unknown>;
|
|
10889
|
+
at: Date;
|
|
10890
|
+
result?: {
|
|
10891
|
+
success: boolean;
|
|
10892
|
+
message_id?: string | undefined;
|
|
10893
|
+
} | undefined;
|
|
10894
|
+
}, {
|
|
10895
|
+
payload: Record<string, unknown>;
|
|
10896
|
+
result?: {
|
|
10897
|
+
success: boolean;
|
|
10898
|
+
message_id?: string | undefined;
|
|
10899
|
+
} | undefined;
|
|
10900
|
+
at?: unknown;
|
|
10901
|
+
}>, "many">>;
|
|
10902
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
10903
|
+
notifications: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
10904
|
+
at: z.ZodEffects<z.ZodDate, Date, unknown>;
|
|
10905
|
+
payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
10906
|
+
result: z.ZodOptional<z.ZodObject<{
|
|
10907
|
+
success: z.ZodBoolean;
|
|
10908
|
+
message_id: z.ZodOptional<z.ZodString>;
|
|
10909
|
+
}, "strip", z.ZodTypeAny, {
|
|
10910
|
+
success: boolean;
|
|
10911
|
+
message_id?: string | undefined;
|
|
10912
|
+
}, {
|
|
10913
|
+
success: boolean;
|
|
10914
|
+
message_id?: string | undefined;
|
|
10915
|
+
}>>;
|
|
10916
|
+
}, "strip", z.ZodTypeAny, {
|
|
10917
|
+
payload: Record<string, unknown>;
|
|
10918
|
+
at: Date;
|
|
10919
|
+
result?: {
|
|
10920
|
+
success: boolean;
|
|
10921
|
+
message_id?: string | undefined;
|
|
10922
|
+
} | undefined;
|
|
10923
|
+
}, {
|
|
10924
|
+
payload: Record<string, unknown>;
|
|
10925
|
+
result?: {
|
|
10926
|
+
success: boolean;
|
|
10927
|
+
message_id?: string | undefined;
|
|
10928
|
+
} | undefined;
|
|
10929
|
+
at?: unknown;
|
|
10930
|
+
}>, "many">>;
|
|
10931
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
10932
|
+
notifications: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
10933
|
+
at: z.ZodEffects<z.ZodDate, Date, unknown>;
|
|
10934
|
+
payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
10935
|
+
result: z.ZodOptional<z.ZodObject<{
|
|
10936
|
+
success: z.ZodBoolean;
|
|
10937
|
+
message_id: z.ZodOptional<z.ZodString>;
|
|
10938
|
+
}, "strip", z.ZodTypeAny, {
|
|
10939
|
+
success: boolean;
|
|
10940
|
+
message_id?: string | undefined;
|
|
10941
|
+
}, {
|
|
10942
|
+
success: boolean;
|
|
10943
|
+
message_id?: string | undefined;
|
|
10944
|
+
}>>;
|
|
10945
|
+
}, "strip", z.ZodTypeAny, {
|
|
10946
|
+
payload: Record<string, unknown>;
|
|
10947
|
+
at: Date;
|
|
10948
|
+
result?: {
|
|
10949
|
+
success: boolean;
|
|
10950
|
+
message_id?: string | undefined;
|
|
10951
|
+
} | undefined;
|
|
10952
|
+
}, {
|
|
10953
|
+
payload: Record<string, unknown>;
|
|
10954
|
+
result?: {
|
|
10955
|
+
success: boolean;
|
|
10956
|
+
message_id?: string | undefined;
|
|
10957
|
+
} | undefined;
|
|
10958
|
+
at?: unknown;
|
|
10959
|
+
}>, "many">>;
|
|
10960
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
10873
10961
|
competence_date: z.ZodOptional<z.ZodEffects<z.ZodDate, Date, unknown>>;
|
|
10874
10962
|
service_description: z.ZodOptional<z.ZodString>;
|
|
10875
10963
|
items: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -11200,6 +11288,94 @@ export declare const zServiceInvoiceSchema: z.ZodObject<{
|
|
|
11200
11288
|
label: z.ZodOptional<z.ZodString>;
|
|
11201
11289
|
ref: z.ZodOptional<z.ZodAny>;
|
|
11202
11290
|
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
11291
|
+
evo_chat: z.ZodOptional<z.ZodObject<{
|
|
11292
|
+
notifications: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
11293
|
+
at: z.ZodEffects<z.ZodDate, Date, unknown>;
|
|
11294
|
+
payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
11295
|
+
result: z.ZodOptional<z.ZodObject<{
|
|
11296
|
+
success: z.ZodBoolean;
|
|
11297
|
+
message_id: z.ZodOptional<z.ZodString>;
|
|
11298
|
+
}, "strip", z.ZodTypeAny, {
|
|
11299
|
+
success: boolean;
|
|
11300
|
+
message_id?: string | undefined;
|
|
11301
|
+
}, {
|
|
11302
|
+
success: boolean;
|
|
11303
|
+
message_id?: string | undefined;
|
|
11304
|
+
}>>;
|
|
11305
|
+
}, "strip", z.ZodTypeAny, {
|
|
11306
|
+
payload: Record<string, unknown>;
|
|
11307
|
+
at: Date;
|
|
11308
|
+
result?: {
|
|
11309
|
+
success: boolean;
|
|
11310
|
+
message_id?: string | undefined;
|
|
11311
|
+
} | undefined;
|
|
11312
|
+
}, {
|
|
11313
|
+
payload: Record<string, unknown>;
|
|
11314
|
+
result?: {
|
|
11315
|
+
success: boolean;
|
|
11316
|
+
message_id?: string | undefined;
|
|
11317
|
+
} | undefined;
|
|
11318
|
+
at?: unknown;
|
|
11319
|
+
}>, "many">>;
|
|
11320
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
11321
|
+
notifications: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
11322
|
+
at: z.ZodEffects<z.ZodDate, Date, unknown>;
|
|
11323
|
+
payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
11324
|
+
result: z.ZodOptional<z.ZodObject<{
|
|
11325
|
+
success: z.ZodBoolean;
|
|
11326
|
+
message_id: z.ZodOptional<z.ZodString>;
|
|
11327
|
+
}, "strip", z.ZodTypeAny, {
|
|
11328
|
+
success: boolean;
|
|
11329
|
+
message_id?: string | undefined;
|
|
11330
|
+
}, {
|
|
11331
|
+
success: boolean;
|
|
11332
|
+
message_id?: string | undefined;
|
|
11333
|
+
}>>;
|
|
11334
|
+
}, "strip", z.ZodTypeAny, {
|
|
11335
|
+
payload: Record<string, unknown>;
|
|
11336
|
+
at: Date;
|
|
11337
|
+
result?: {
|
|
11338
|
+
success: boolean;
|
|
11339
|
+
message_id?: string | undefined;
|
|
11340
|
+
} | undefined;
|
|
11341
|
+
}, {
|
|
11342
|
+
payload: Record<string, unknown>;
|
|
11343
|
+
result?: {
|
|
11344
|
+
success: boolean;
|
|
11345
|
+
message_id?: string | undefined;
|
|
11346
|
+
} | undefined;
|
|
11347
|
+
at?: unknown;
|
|
11348
|
+
}>, "many">>;
|
|
11349
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
11350
|
+
notifications: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
11351
|
+
at: z.ZodEffects<z.ZodDate, Date, unknown>;
|
|
11352
|
+
payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
11353
|
+
result: z.ZodOptional<z.ZodObject<{
|
|
11354
|
+
success: z.ZodBoolean;
|
|
11355
|
+
message_id: z.ZodOptional<z.ZodString>;
|
|
11356
|
+
}, "strip", z.ZodTypeAny, {
|
|
11357
|
+
success: boolean;
|
|
11358
|
+
message_id?: string | undefined;
|
|
11359
|
+
}, {
|
|
11360
|
+
success: boolean;
|
|
11361
|
+
message_id?: string | undefined;
|
|
11362
|
+
}>>;
|
|
11363
|
+
}, "strip", z.ZodTypeAny, {
|
|
11364
|
+
payload: Record<string, unknown>;
|
|
11365
|
+
at: Date;
|
|
11366
|
+
result?: {
|
|
11367
|
+
success: boolean;
|
|
11368
|
+
message_id?: string | undefined;
|
|
11369
|
+
} | undefined;
|
|
11370
|
+
}, {
|
|
11371
|
+
payload: Record<string, unknown>;
|
|
11372
|
+
result?: {
|
|
11373
|
+
success: boolean;
|
|
11374
|
+
message_id?: string | undefined;
|
|
11375
|
+
} | undefined;
|
|
11376
|
+
at?: unknown;
|
|
11377
|
+
}>, "many">>;
|
|
11378
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
11203
11379
|
competence_date: z.ZodOptional<z.ZodEffects<z.ZodDate, Date, unknown>>;
|
|
11204
11380
|
service_description: z.ZodOptional<z.ZodString>;
|
|
11205
11381
|
items: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -11530,6 +11706,94 @@ export declare const zServiceInvoiceSchema: z.ZodObject<{
|
|
|
11530
11706
|
label: z.ZodOptional<z.ZodString>;
|
|
11531
11707
|
ref: z.ZodOptional<z.ZodAny>;
|
|
11532
11708
|
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
11709
|
+
evo_chat: z.ZodOptional<z.ZodObject<{
|
|
11710
|
+
notifications: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
11711
|
+
at: z.ZodEffects<z.ZodDate, Date, unknown>;
|
|
11712
|
+
payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
11713
|
+
result: z.ZodOptional<z.ZodObject<{
|
|
11714
|
+
success: z.ZodBoolean;
|
|
11715
|
+
message_id: z.ZodOptional<z.ZodString>;
|
|
11716
|
+
}, "strip", z.ZodTypeAny, {
|
|
11717
|
+
success: boolean;
|
|
11718
|
+
message_id?: string | undefined;
|
|
11719
|
+
}, {
|
|
11720
|
+
success: boolean;
|
|
11721
|
+
message_id?: string | undefined;
|
|
11722
|
+
}>>;
|
|
11723
|
+
}, "strip", z.ZodTypeAny, {
|
|
11724
|
+
payload: Record<string, unknown>;
|
|
11725
|
+
at: Date;
|
|
11726
|
+
result?: {
|
|
11727
|
+
success: boolean;
|
|
11728
|
+
message_id?: string | undefined;
|
|
11729
|
+
} | undefined;
|
|
11730
|
+
}, {
|
|
11731
|
+
payload: Record<string, unknown>;
|
|
11732
|
+
result?: {
|
|
11733
|
+
success: boolean;
|
|
11734
|
+
message_id?: string | undefined;
|
|
11735
|
+
} | undefined;
|
|
11736
|
+
at?: unknown;
|
|
11737
|
+
}>, "many">>;
|
|
11738
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
11739
|
+
notifications: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
11740
|
+
at: z.ZodEffects<z.ZodDate, Date, unknown>;
|
|
11741
|
+
payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
11742
|
+
result: z.ZodOptional<z.ZodObject<{
|
|
11743
|
+
success: z.ZodBoolean;
|
|
11744
|
+
message_id: z.ZodOptional<z.ZodString>;
|
|
11745
|
+
}, "strip", z.ZodTypeAny, {
|
|
11746
|
+
success: boolean;
|
|
11747
|
+
message_id?: string | undefined;
|
|
11748
|
+
}, {
|
|
11749
|
+
success: boolean;
|
|
11750
|
+
message_id?: string | undefined;
|
|
11751
|
+
}>>;
|
|
11752
|
+
}, "strip", z.ZodTypeAny, {
|
|
11753
|
+
payload: Record<string, unknown>;
|
|
11754
|
+
at: Date;
|
|
11755
|
+
result?: {
|
|
11756
|
+
success: boolean;
|
|
11757
|
+
message_id?: string | undefined;
|
|
11758
|
+
} | undefined;
|
|
11759
|
+
}, {
|
|
11760
|
+
payload: Record<string, unknown>;
|
|
11761
|
+
result?: {
|
|
11762
|
+
success: boolean;
|
|
11763
|
+
message_id?: string | undefined;
|
|
11764
|
+
} | undefined;
|
|
11765
|
+
at?: unknown;
|
|
11766
|
+
}>, "many">>;
|
|
11767
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
11768
|
+
notifications: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
11769
|
+
at: z.ZodEffects<z.ZodDate, Date, unknown>;
|
|
11770
|
+
payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
11771
|
+
result: z.ZodOptional<z.ZodObject<{
|
|
11772
|
+
success: z.ZodBoolean;
|
|
11773
|
+
message_id: z.ZodOptional<z.ZodString>;
|
|
11774
|
+
}, "strip", z.ZodTypeAny, {
|
|
11775
|
+
success: boolean;
|
|
11776
|
+
message_id?: string | undefined;
|
|
11777
|
+
}, {
|
|
11778
|
+
success: boolean;
|
|
11779
|
+
message_id?: string | undefined;
|
|
11780
|
+
}>>;
|
|
11781
|
+
}, "strip", z.ZodTypeAny, {
|
|
11782
|
+
payload: Record<string, unknown>;
|
|
11783
|
+
at: Date;
|
|
11784
|
+
result?: {
|
|
11785
|
+
success: boolean;
|
|
11786
|
+
message_id?: string | undefined;
|
|
11787
|
+
} | undefined;
|
|
11788
|
+
}, {
|
|
11789
|
+
payload: Record<string, unknown>;
|
|
11790
|
+
result?: {
|
|
11791
|
+
success: boolean;
|
|
11792
|
+
message_id?: string | undefined;
|
|
11793
|
+
} | undefined;
|
|
11794
|
+
at?: unknown;
|
|
11795
|
+
}>, "many">>;
|
|
11796
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
11533
11797
|
competence_date: z.ZodOptional<z.ZodEffects<z.ZodDate, Date, unknown>>;
|
|
11534
11798
|
service_description: z.ZodOptional<z.ZodString>;
|
|
11535
11799
|
items: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -568,6 +568,18 @@ exports.zServiceInvoiceSchema = zod_schemas_1.zFireDocSchema
|
|
|
568
568
|
taker: exports.zInvoiceTakerRefSchema,
|
|
569
569
|
source: exports.zInvoiceSourceRefSchema.optional(),
|
|
570
570
|
externalLinks: zod_1.z.array(zod_schemas_2.zExternalLinkSchema).optional(),
|
|
571
|
+
evo_chat: zod_1.z
|
|
572
|
+
.object({
|
|
573
|
+
notifications: zod_1.z
|
|
574
|
+
.array(zod_1.z.object({
|
|
575
|
+
at: zod_schemas_1.zFirestoreDateSchema,
|
|
576
|
+
payload: zod_1.z.record(zod_1.z.unknown()),
|
|
577
|
+
result: zod_1.z.object({ success: zod_1.z.boolean(), message_id: zod_1.z.string().optional() }).optional(),
|
|
578
|
+
}))
|
|
579
|
+
.optional(),
|
|
580
|
+
})
|
|
581
|
+
.passthrough()
|
|
582
|
+
.optional(),
|
|
571
583
|
competence_date: zod_schemas_1.zFirestoreDateSchema.optional(),
|
|
572
584
|
service_description: zod_1.z.string().optional(),
|
|
573
585
|
items: zod_1.z.array(exports.zServiceLineItemSchema).optional(),
|
|
@@ -616,6 +616,20 @@ export const zServiceInvoiceSchema = zFireDocSchema
|
|
|
616
616
|
taker: zInvoiceTakerRefSchema,
|
|
617
617
|
source: zInvoiceSourceRefSchema.optional(),
|
|
618
618
|
externalLinks: z.array(zExternalLinkSchema).optional(),
|
|
619
|
+
evo_chat: z
|
|
620
|
+
.object({
|
|
621
|
+
notifications: z
|
|
622
|
+
.array(
|
|
623
|
+
z.object({
|
|
624
|
+
at: zFirestoreDateSchema,
|
|
625
|
+
payload: z.record(z.unknown()),
|
|
626
|
+
result: z.object({ success: z.boolean(), message_id: z.string().optional() }).optional(),
|
|
627
|
+
})
|
|
628
|
+
)
|
|
629
|
+
.optional(),
|
|
630
|
+
})
|
|
631
|
+
.passthrough()
|
|
632
|
+
.optional(),
|
|
619
633
|
competence_date: zFirestoreDateSchema.optional(),
|
|
620
634
|
service_description: z.string().optional(),
|
|
621
635
|
items: z.array(zServiceLineItemSchema).optional(),
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ISendMessageRequest } from "../../evo-chat/chatbee";
|
|
1
2
|
import { IFireDoc, IExternalLink } from "../../shared";
|
|
2
3
|
import { ProviderTrace, ProviderPayloadSnapshot } from "../common";
|
|
3
4
|
import { InvoiceTakerType } from "../common/taker";
|
|
@@ -84,6 +85,15 @@ export interface IProviderInvoiceLinks {
|
|
|
84
85
|
pdf_storage_url?: string;
|
|
85
86
|
xml_storage_url?: string;
|
|
86
87
|
}
|
|
88
|
+
/** Record of a chat notification sent for this invoice (e.g. NFSe sent via WhatsApp). */
|
|
89
|
+
export interface IInvoiceChatNotification {
|
|
90
|
+
at: Date;
|
|
91
|
+
payload: ISendMessageRequest;
|
|
92
|
+
result?: {
|
|
93
|
+
success: boolean;
|
|
94
|
+
message_id?: string;
|
|
95
|
+
};
|
|
96
|
+
}
|
|
87
97
|
export interface IProviderInvoiceIdentifiers {
|
|
88
98
|
number?: string;
|
|
89
99
|
verification_code?: string;
|
|
@@ -113,6 +123,9 @@ export interface IServiceInvoice extends IFireDoc {
|
|
|
113
123
|
taker: IInvoiceTakerRef;
|
|
114
124
|
source?: IInvoiceSourceRef;
|
|
115
125
|
externalLinks?: IExternalLink[];
|
|
126
|
+
evo_chat?: {
|
|
127
|
+
notifications?: IInvoiceChatNotification[];
|
|
128
|
+
};
|
|
116
129
|
competence_date?: Date;
|
|
117
130
|
service_description?: string;
|
|
118
131
|
items?: IServiceLineItem[];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// core/types/invoices.ts
|
|
2
2
|
|
|
3
|
+
import type { ISendMessageRequest } from "../../evo-chat/chatbee";
|
|
3
4
|
import { IFireDoc, IExternalLink } from "../../shared";
|
|
4
5
|
import { ProviderTrace, ProviderPayloadSnapshot } from "../common";
|
|
5
6
|
import { InvoiceTakerType } from "../common/taker";
|
|
@@ -117,6 +118,13 @@ export interface IProviderInvoiceLinks {
|
|
|
117
118
|
xml_storage_url?: string;
|
|
118
119
|
}
|
|
119
120
|
|
|
121
|
+
/** Record of a chat notification sent for this invoice (e.g. NFSe sent via WhatsApp). */
|
|
122
|
+
export interface IInvoiceChatNotification {
|
|
123
|
+
at: Date;
|
|
124
|
+
payload: ISendMessageRequest;
|
|
125
|
+
result?: { success: boolean; message_id?: string };
|
|
126
|
+
}
|
|
127
|
+
|
|
120
128
|
export interface IProviderInvoiceIdentifiers {
|
|
121
129
|
// Typical NFSe identifiers from provider / prefeitura
|
|
122
130
|
number?: string; // NF number
|
|
@@ -164,6 +172,9 @@ export interface IServiceInvoice extends IFireDoc {
|
|
|
164
172
|
// Links to other documents (crm_lead, med_patient, etc.)
|
|
165
173
|
externalLinks?: IExternalLink[];
|
|
166
174
|
|
|
175
|
+
// Chat notifications (e.g. NFSe sent via WhatsApp)
|
|
176
|
+
evo_chat?: { notifications?: IInvoiceChatNotification[] };
|
|
177
|
+
|
|
167
178
|
// Service content
|
|
168
179
|
competence_date?: Date; // service competence (month/day depending on rules)
|
|
169
180
|
service_description?: string; // free text (if single-line)
|