evo360-types 1.3.207 → 1.3.211
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.
|
@@ -9791,16 +9791,19 @@ export declare const zTakerAddressSchema: z.ZodObject<{
|
|
|
9791
9791
|
export declare const zTakerProviderRefsSchema: z.ZodObject<{
|
|
9792
9792
|
provider_id: z.ZodString;
|
|
9793
9793
|
provider_type: z.ZodEnum<["asaas", "asaas_subaccount", "unknown"]>;
|
|
9794
|
+
provider_env: z.ZodOptional<z.ZodEnum<["Sandbox", "Production"]>>;
|
|
9794
9795
|
remote_customer_id: z.ZodOptional<z.ZodString>;
|
|
9795
9796
|
extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
9796
9797
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
9797
9798
|
provider_id: z.ZodString;
|
|
9798
9799
|
provider_type: z.ZodEnum<["asaas", "asaas_subaccount", "unknown"]>;
|
|
9800
|
+
provider_env: z.ZodOptional<z.ZodEnum<["Sandbox", "Production"]>>;
|
|
9799
9801
|
remote_customer_id: z.ZodOptional<z.ZodString>;
|
|
9800
9802
|
extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
9801
9803
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
9802
9804
|
provider_id: z.ZodString;
|
|
9803
9805
|
provider_type: z.ZodEnum<["asaas", "asaas_subaccount", "unknown"]>;
|
|
9806
|
+
provider_env: z.ZodOptional<z.ZodEnum<["Sandbox", "Production"]>>;
|
|
9804
9807
|
remote_customer_id: z.ZodOptional<z.ZodString>;
|
|
9805
9808
|
extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
9806
9809
|
}, z.ZodTypeAny, "passthrough">>;
|
|
@@ -9838,6 +9841,10 @@ export declare const zTakerTaxProfileSchema: z.ZodObject<{
|
|
|
9838
9841
|
state: z.ZodOptional<z.ZodString>;
|
|
9839
9842
|
country: z.ZodOptional<z.ZodLiteral<"BR">>;
|
|
9840
9843
|
}, z.ZodTypeAny, "passthrough">>>;
|
|
9844
|
+
company: z.ZodOptional<z.ZodString>;
|
|
9845
|
+
municipal_inscription: z.ZodOptional<z.ZodString>;
|
|
9846
|
+
state_inscription: z.ZodOptional<z.ZodString>;
|
|
9847
|
+
observations: z.ZodOptional<z.ZodString>;
|
|
9841
9848
|
}, "strip", z.ZodTypeAny, {
|
|
9842
9849
|
name: string;
|
|
9843
9850
|
type: "PJ" | "PF" | "unknown";
|
|
@@ -9854,6 +9861,10 @@ export declare const zTakerTaxProfileSchema: z.ZodObject<{
|
|
|
9854
9861
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
9855
9862
|
phone?: string | undefined;
|
|
9856
9863
|
cpfCnpj?: string | undefined;
|
|
9864
|
+
company?: string | undefined;
|
|
9865
|
+
municipal_inscription?: string | undefined;
|
|
9866
|
+
state_inscription?: string | undefined;
|
|
9867
|
+
observations?: string | undefined;
|
|
9857
9868
|
}, {
|
|
9858
9869
|
name: string;
|
|
9859
9870
|
type: "PJ" | "PF" | "unknown";
|
|
@@ -9870,6 +9881,10 @@ export declare const zTakerTaxProfileSchema: z.ZodObject<{
|
|
|
9870
9881
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
9871
9882
|
phone?: string | undefined;
|
|
9872
9883
|
cpfCnpj?: string | undefined;
|
|
9884
|
+
company?: string | undefined;
|
|
9885
|
+
municipal_inscription?: string | undefined;
|
|
9886
|
+
state_inscription?: string | undefined;
|
|
9887
|
+
observations?: string | undefined;
|
|
9873
9888
|
}>;
|
|
9874
9889
|
export declare const zTakerDocumentSchema: z.ZodObject<{
|
|
9875
9890
|
id: z.ZodString;
|
|
@@ -9913,22 +9928,29 @@ export declare const zTakerDocumentSchema: z.ZodObject<{
|
|
|
9913
9928
|
state: z.ZodOptional<z.ZodString>;
|
|
9914
9929
|
country: z.ZodOptional<z.ZodLiteral<"BR">>;
|
|
9915
9930
|
}, z.ZodTypeAny, "passthrough">>>;
|
|
9931
|
+
company: z.ZodOptional<z.ZodString>;
|
|
9932
|
+
municipal_inscription: z.ZodOptional<z.ZodString>;
|
|
9933
|
+
state_inscription: z.ZodOptional<z.ZodString>;
|
|
9934
|
+
observations: z.ZodOptional<z.ZodString>;
|
|
9916
9935
|
patient_id: z.ZodOptional<z.ZodString>;
|
|
9917
9936
|
lead_id: z.ZodOptional<z.ZodString>;
|
|
9918
9937
|
chat_contact_id: z.ZodOptional<z.ZodString>;
|
|
9919
9938
|
provider_refs: z.ZodArray<z.ZodObject<{
|
|
9920
9939
|
provider_id: z.ZodString;
|
|
9921
9940
|
provider_type: z.ZodEnum<["asaas", "asaas_subaccount", "unknown"]>;
|
|
9941
|
+
provider_env: z.ZodOptional<z.ZodEnum<["Sandbox", "Production"]>>;
|
|
9922
9942
|
remote_customer_id: z.ZodOptional<z.ZodString>;
|
|
9923
9943
|
extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
9924
9944
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
9925
9945
|
provider_id: z.ZodString;
|
|
9926
9946
|
provider_type: z.ZodEnum<["asaas", "asaas_subaccount", "unknown"]>;
|
|
9947
|
+
provider_env: z.ZodOptional<z.ZodEnum<["Sandbox", "Production"]>>;
|
|
9927
9948
|
remote_customer_id: z.ZodOptional<z.ZodString>;
|
|
9928
9949
|
extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
9929
9950
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
9930
9951
|
provider_id: z.ZodString;
|
|
9931
9952
|
provider_type: z.ZodEnum<["asaas", "asaas_subaccount", "unknown"]>;
|
|
9953
|
+
provider_env: z.ZodOptional<z.ZodEnum<["Sandbox", "Production"]>>;
|
|
9932
9954
|
remote_customer_id: z.ZodOptional<z.ZodString>;
|
|
9933
9955
|
extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
9934
9956
|
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
@@ -9974,22 +9996,29 @@ export declare const zTakerDocumentSchema: z.ZodObject<{
|
|
|
9974
9996
|
state: z.ZodOptional<z.ZodString>;
|
|
9975
9997
|
country: z.ZodOptional<z.ZodLiteral<"BR">>;
|
|
9976
9998
|
}, z.ZodTypeAny, "passthrough">>>;
|
|
9999
|
+
company: z.ZodOptional<z.ZodString>;
|
|
10000
|
+
municipal_inscription: z.ZodOptional<z.ZodString>;
|
|
10001
|
+
state_inscription: z.ZodOptional<z.ZodString>;
|
|
10002
|
+
observations: z.ZodOptional<z.ZodString>;
|
|
9977
10003
|
patient_id: z.ZodOptional<z.ZodString>;
|
|
9978
10004
|
lead_id: z.ZodOptional<z.ZodString>;
|
|
9979
10005
|
chat_contact_id: z.ZodOptional<z.ZodString>;
|
|
9980
10006
|
provider_refs: z.ZodArray<z.ZodObject<{
|
|
9981
10007
|
provider_id: z.ZodString;
|
|
9982
10008
|
provider_type: z.ZodEnum<["asaas", "asaas_subaccount", "unknown"]>;
|
|
10009
|
+
provider_env: z.ZodOptional<z.ZodEnum<["Sandbox", "Production"]>>;
|
|
9983
10010
|
remote_customer_id: z.ZodOptional<z.ZodString>;
|
|
9984
10011
|
extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
9985
10012
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
9986
10013
|
provider_id: z.ZodString;
|
|
9987
10014
|
provider_type: z.ZodEnum<["asaas", "asaas_subaccount", "unknown"]>;
|
|
10015
|
+
provider_env: z.ZodOptional<z.ZodEnum<["Sandbox", "Production"]>>;
|
|
9988
10016
|
remote_customer_id: z.ZodOptional<z.ZodString>;
|
|
9989
10017
|
extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
9990
10018
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
9991
10019
|
provider_id: z.ZodString;
|
|
9992
10020
|
provider_type: z.ZodEnum<["asaas", "asaas_subaccount", "unknown"]>;
|
|
10021
|
+
provider_env: z.ZodOptional<z.ZodEnum<["Sandbox", "Production"]>>;
|
|
9993
10022
|
remote_customer_id: z.ZodOptional<z.ZodString>;
|
|
9994
10023
|
extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
9995
10024
|
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
@@ -10035,22 +10064,29 @@ export declare const zTakerDocumentSchema: z.ZodObject<{
|
|
|
10035
10064
|
state: z.ZodOptional<z.ZodString>;
|
|
10036
10065
|
country: z.ZodOptional<z.ZodLiteral<"BR">>;
|
|
10037
10066
|
}, z.ZodTypeAny, "passthrough">>>;
|
|
10067
|
+
company: z.ZodOptional<z.ZodString>;
|
|
10068
|
+
municipal_inscription: z.ZodOptional<z.ZodString>;
|
|
10069
|
+
state_inscription: z.ZodOptional<z.ZodString>;
|
|
10070
|
+
observations: z.ZodOptional<z.ZodString>;
|
|
10038
10071
|
patient_id: z.ZodOptional<z.ZodString>;
|
|
10039
10072
|
lead_id: z.ZodOptional<z.ZodString>;
|
|
10040
10073
|
chat_contact_id: z.ZodOptional<z.ZodString>;
|
|
10041
10074
|
provider_refs: z.ZodArray<z.ZodObject<{
|
|
10042
10075
|
provider_id: z.ZodString;
|
|
10043
10076
|
provider_type: z.ZodEnum<["asaas", "asaas_subaccount", "unknown"]>;
|
|
10077
|
+
provider_env: z.ZodOptional<z.ZodEnum<["Sandbox", "Production"]>>;
|
|
10044
10078
|
remote_customer_id: z.ZodOptional<z.ZodString>;
|
|
10045
10079
|
extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
10046
10080
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
10047
10081
|
provider_id: z.ZodString;
|
|
10048
10082
|
provider_type: z.ZodEnum<["asaas", "asaas_subaccount", "unknown"]>;
|
|
10083
|
+
provider_env: z.ZodOptional<z.ZodEnum<["Sandbox", "Production"]>>;
|
|
10049
10084
|
remote_customer_id: z.ZodOptional<z.ZodString>;
|
|
10050
10085
|
extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
10051
10086
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
10052
10087
|
provider_id: z.ZodString;
|
|
10053
10088
|
provider_type: z.ZodEnum<["asaas", "asaas_subaccount", "unknown"]>;
|
|
10089
|
+
provider_env: z.ZodOptional<z.ZodEnum<["Sandbox", "Production"]>>;
|
|
10054
10090
|
remote_customer_id: z.ZodOptional<z.ZodString>;
|
|
10055
10091
|
extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
10056
10092
|
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
@@ -6,7 +6,11 @@ const zod_1 = require("zod");
|
|
|
6
6
|
const zod_schemas_1 = require("../shared/zod-schemas");
|
|
7
7
|
// ---- Provider enums and base ----
|
|
8
8
|
exports.zProviderEnvSchema = zod_1.z.enum(["Sandbox", "Production"]);
|
|
9
|
-
exports.zFinopsProviderTypeSchema = zod_1.z.enum([
|
|
9
|
+
exports.zFinopsProviderTypeSchema = zod_1.z.enum([
|
|
10
|
+
"asaas",
|
|
11
|
+
"asaas_subaccount",
|
|
12
|
+
"unknown",
|
|
13
|
+
]);
|
|
10
14
|
exports.zFinopsActionSchema = zod_1.z.enum([
|
|
11
15
|
"nfse.issue",
|
|
12
16
|
"nfse.cancel",
|
|
@@ -241,10 +245,12 @@ exports.zAsaasProviderAsaasBlockSchema = zod_1.z.object({
|
|
|
241
245
|
}),
|
|
242
246
|
capabilities: exports.zAsaasProviderCapabilitiesSchema,
|
|
243
247
|
});
|
|
244
|
-
exports.zAsaasProviderSchema = exports.zFinopsProviderBaseSchema
|
|
248
|
+
exports.zAsaasProviderSchema = exports.zFinopsProviderBaseSchema
|
|
249
|
+
.extend({
|
|
245
250
|
type: zod_1.z.enum(["asaas", "asaas_subaccount"]),
|
|
246
251
|
asaas: exports.zAsaasProviderAsaasBlockSchema,
|
|
247
|
-
})
|
|
252
|
+
})
|
|
253
|
+
.passthrough();
|
|
248
254
|
// ---- Issuer tax profile ----
|
|
249
255
|
exports.zTaxProfileSyncStateSchema = zod_1.z.enum([
|
|
250
256
|
"not_configured",
|
|
@@ -344,6 +350,7 @@ exports.zTakerProviderRefsSchema = zod_1.z
|
|
|
344
350
|
.object({
|
|
345
351
|
provider_id: zod_1.z.string(),
|
|
346
352
|
provider_type: exports.zFinopsProviderTypeSchema,
|
|
353
|
+
provider_env: exports.zProviderEnvSchema.optional(),
|
|
347
354
|
remote_customer_id: zod_1.z.string().optional(),
|
|
348
355
|
extra: zod_1.z.record(zod_1.z.unknown()).optional(),
|
|
349
356
|
})
|
|
@@ -355,6 +362,10 @@ exports.zTakerTaxProfileSchema = zod_1.z.object({
|
|
|
355
362
|
email: zod_1.z.string().optional(),
|
|
356
363
|
phone: zod_1.z.string().optional(),
|
|
357
364
|
address: exports.zTakerAddressSchema.optional(),
|
|
365
|
+
company: zod_1.z.string().optional(),
|
|
366
|
+
municipal_inscription: zod_1.z.string().optional(),
|
|
367
|
+
state_inscription: zod_1.z.string().optional(),
|
|
368
|
+
observations: zod_1.z.string().optional(),
|
|
358
369
|
});
|
|
359
370
|
exports.zTakerDocumentSchema = zod_schemas_1.zFireDocSchema
|
|
360
371
|
.extend({
|
|
@@ -364,6 +375,10 @@ exports.zTakerDocumentSchema = zod_schemas_1.zFireDocSchema
|
|
|
364
375
|
email: zod_1.z.string().optional(),
|
|
365
376
|
phone: zod_1.z.string().optional(),
|
|
366
377
|
address: exports.zTakerAddressSchema.optional(),
|
|
378
|
+
company: zod_1.z.string().optional(),
|
|
379
|
+
municipal_inscription: zod_1.z.string().optional(),
|
|
380
|
+
state_inscription: zod_1.z.string().optional(),
|
|
381
|
+
observations: zod_1.z.string().optional(),
|
|
367
382
|
patient_id: zod_1.z.string().optional(),
|
|
368
383
|
lead_id: zod_1.z.string().optional(),
|
|
369
384
|
chat_contact_id: zod_1.z.string().optional(),
|
|
@@ -3,7 +3,11 @@ import { zFireDocSchema, zFirestoreDateSchema } from "../shared/zod-schemas";
|
|
|
3
3
|
|
|
4
4
|
// ---- Provider enums and base ----
|
|
5
5
|
export const zProviderEnvSchema = z.enum(["Sandbox", "Production"]);
|
|
6
|
-
export const zFinopsProviderTypeSchema = z.enum([
|
|
6
|
+
export const zFinopsProviderTypeSchema = z.enum([
|
|
7
|
+
"asaas",
|
|
8
|
+
"asaas_subaccount",
|
|
9
|
+
"unknown",
|
|
10
|
+
]);
|
|
7
11
|
export const zFinopsActionSchema = z.enum([
|
|
8
12
|
"nfse.issue",
|
|
9
13
|
"nfse.cancel",
|
|
@@ -258,10 +262,12 @@ export const zAsaasProviderAsaasBlockSchema = z.object({
|
|
|
258
262
|
capabilities: zAsaasProviderCapabilitiesSchema,
|
|
259
263
|
});
|
|
260
264
|
|
|
261
|
-
export const zAsaasProviderSchema = zFinopsProviderBaseSchema
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
+
export const zAsaasProviderSchema = zFinopsProviderBaseSchema
|
|
266
|
+
.extend({
|
|
267
|
+
type: z.enum(["asaas", "asaas_subaccount"]),
|
|
268
|
+
asaas: zAsaasProviderAsaasBlockSchema,
|
|
269
|
+
})
|
|
270
|
+
.passthrough();
|
|
265
271
|
|
|
266
272
|
// ---- Issuer tax profile ----
|
|
267
273
|
export const zTaxProfileSyncStateSchema = z.enum([
|
|
@@ -335,9 +341,11 @@ export const zIssuerTaxProfileSchema = zFireDocSchema
|
|
|
335
341
|
nfse: zIssuerNfseConfigSchema.optional(),
|
|
336
342
|
provider_id: z.string(),
|
|
337
343
|
provider_env: zProviderEnvSchema,
|
|
338
|
-
provider_municipal_options_snapshot:
|
|
344
|
+
provider_municipal_options_snapshot:
|
|
345
|
+
zProviderMunicipalOptionsSnapshotSchema.optional(),
|
|
339
346
|
provider_fiscal_info: zProviderFiscalInfoPayloadSchema.optional(),
|
|
340
|
-
provider_credentials_secret_refs:
|
|
347
|
+
provider_credentials_secret_refs:
|
|
348
|
+
zProviderCredentialsSecretRefsSchema.optional(),
|
|
341
349
|
provider_remote_refs: zProviderRemoteRefsSchema.optional(),
|
|
342
350
|
sync_state: zTaxProfileSyncStateSchema.optional(),
|
|
343
351
|
last_sync_at: z.string().optional(),
|
|
@@ -371,6 +379,7 @@ export const zTakerProviderRefsSchema = z
|
|
|
371
379
|
.object({
|
|
372
380
|
provider_id: z.string(),
|
|
373
381
|
provider_type: zFinopsProviderTypeSchema,
|
|
382
|
+
provider_env: zProviderEnvSchema.optional(),
|
|
374
383
|
remote_customer_id: z.string().optional(),
|
|
375
384
|
extra: z.record(z.unknown()).optional(),
|
|
376
385
|
})
|
|
@@ -383,6 +392,10 @@ export const zTakerTaxProfileSchema = z.object({
|
|
|
383
392
|
email: z.string().optional(),
|
|
384
393
|
phone: z.string().optional(),
|
|
385
394
|
address: zTakerAddressSchema.optional(),
|
|
395
|
+
company: z.string().optional(),
|
|
396
|
+
municipal_inscription: z.string().optional(),
|
|
397
|
+
state_inscription: z.string().optional(),
|
|
398
|
+
observations: z.string().optional(),
|
|
386
399
|
});
|
|
387
400
|
|
|
388
401
|
export const zTakerDocumentSchema = zFireDocSchema
|
|
@@ -393,6 +406,10 @@ export const zTakerDocumentSchema = zFireDocSchema
|
|
|
393
406
|
email: z.string().optional(),
|
|
394
407
|
phone: z.string().optional(),
|
|
395
408
|
address: zTakerAddressSchema.optional(),
|
|
409
|
+
company: z.string().optional(),
|
|
410
|
+
municipal_inscription: z.string().optional(),
|
|
411
|
+
state_inscription: z.string().optional(),
|
|
412
|
+
observations: z.string().optional(),
|
|
396
413
|
patient_id: z.string().optional(),
|
|
397
414
|
lead_id: z.string().optional(),
|
|
398
415
|
chat_contact_id: z.string().optional(),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IFireDoc } from "../../shared";
|
|
2
|
-
import { FinopsProviderType } from "../providers";
|
|
2
|
+
import { FinopsProviderType, ProviderEnv } from "../providers";
|
|
3
3
|
export type InvoiceTakerType = "PF" | "PJ" | "unknown";
|
|
4
4
|
export interface Address {
|
|
5
5
|
postalCode?: string;
|
|
@@ -18,11 +18,21 @@ export interface TakerTaxProfile {
|
|
|
18
18
|
email?: string;
|
|
19
19
|
phone?: string;
|
|
20
20
|
address?: Address;
|
|
21
|
+
/** PJ only: razão social (company legal name). */
|
|
22
|
+
company?: string;
|
|
23
|
+
/** PJ only: inscrição municipal (IM). */
|
|
24
|
+
municipal_inscription?: string;
|
|
25
|
+
/** PJ only: inscrição estadual (IE). */
|
|
26
|
+
state_inscription?: string;
|
|
27
|
+
/** Free-text observations. */
|
|
28
|
+
observations?: string;
|
|
21
29
|
}
|
|
22
30
|
/** Provider-specific references for a taker (e.g. Asaas customer id). */
|
|
23
31
|
export interface TakerProviderRefs {
|
|
24
32
|
provider_id: string;
|
|
25
33
|
provider_type: FinopsProviderType;
|
|
34
|
+
/** Provider environment (Sandbox | Production). */
|
|
35
|
+
provider_env?: ProviderEnv;
|
|
26
36
|
/** Provider remote id (e.g. asaas_customer_id). */
|
|
27
37
|
remote_customer_id?: string;
|
|
28
38
|
/** Future providers can extend here. */
|
|
@@ -36,6 +46,14 @@ export interface ITakerDocument extends IFireDoc {
|
|
|
36
46
|
email?: string;
|
|
37
47
|
phone?: string;
|
|
38
48
|
address?: Address;
|
|
49
|
+
/** PJ only: razão social (company legal name). */
|
|
50
|
+
company?: string;
|
|
51
|
+
/** PJ only: inscrição municipal (IM). */
|
|
52
|
+
municipal_inscription?: string;
|
|
53
|
+
/** PJ only: inscrição estadual (IE). */
|
|
54
|
+
state_inscription?: string;
|
|
55
|
+
/** Free-text observations. */
|
|
56
|
+
observations?: string;
|
|
39
57
|
/** Internal refs (evo-med patient, evo-crm lead, etc.) */
|
|
40
58
|
patient_id?: string;
|
|
41
59
|
lead_id?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IFireDoc } from "../../shared";
|
|
2
|
-
import { FinopsProviderType } from "../providers";
|
|
2
|
+
import { FinopsProviderType, ProviderEnv } from "../providers";
|
|
3
3
|
|
|
4
4
|
export type InvoiceTakerType = "PF" | "PJ" | "unknown";
|
|
5
5
|
|
|
@@ -25,6 +25,16 @@ export interface TakerTaxProfile {
|
|
|
25
25
|
phone?: string;
|
|
26
26
|
|
|
27
27
|
address?: Address;
|
|
28
|
+
|
|
29
|
+
/** PJ only: razão social (company legal name). */
|
|
30
|
+
company?: string;
|
|
31
|
+
/** PJ only: inscrição municipal (IM). */
|
|
32
|
+
municipal_inscription?: string;
|
|
33
|
+
/** PJ only: inscrição estadual (IE). */
|
|
34
|
+
state_inscription?: string;
|
|
35
|
+
|
|
36
|
+
/** Free-text observations. */
|
|
37
|
+
observations?: string;
|
|
28
38
|
}
|
|
29
39
|
|
|
30
40
|
/** Provider-specific references for a taker (e.g. Asaas customer id). */
|
|
@@ -32,6 +42,9 @@ export interface TakerProviderRefs {
|
|
|
32
42
|
provider_id: string;
|
|
33
43
|
provider_type: FinopsProviderType;
|
|
34
44
|
|
|
45
|
+
/** Provider environment (Sandbox | Production). */
|
|
46
|
+
provider_env?: ProviderEnv;
|
|
47
|
+
|
|
35
48
|
/** Provider remote id (e.g. asaas_customer_id). */
|
|
36
49
|
remote_customer_id?: string;
|
|
37
50
|
|
|
@@ -48,6 +61,16 @@ export interface ITakerDocument extends IFireDoc {
|
|
|
48
61
|
phone?: string;
|
|
49
62
|
address?: Address;
|
|
50
63
|
|
|
64
|
+
/** PJ only: razão social (company legal name). */
|
|
65
|
+
company?: string;
|
|
66
|
+
/** PJ only: inscrição municipal (IM). */
|
|
67
|
+
municipal_inscription?: string;
|
|
68
|
+
/** PJ only: inscrição estadual (IE). */
|
|
69
|
+
state_inscription?: string;
|
|
70
|
+
|
|
71
|
+
/** Free-text observations. */
|
|
72
|
+
observations?: string;
|
|
73
|
+
|
|
51
74
|
/** Internal refs (evo-med patient, evo-crm lead, etc.) */
|
|
52
75
|
patient_id?: string;
|
|
53
76
|
lead_id?: string;
|