evo360-types 1.3.664 → 1.3.667

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.
@@ -1026,6 +1026,8 @@ exports.zNfseFeeReimbursementExecuteSchema = zod_1.z
1026
1026
  invoice_count: zod_1.z.number().int().positive(),
1027
1027
  fee_value: zod_1.z.number().positive(),
1028
1028
  amount: zod_1.z.number().positive(),
1029
+ /** Adendo D1: `wallet_id` da linha da prévia; divergiu no execute => `preview_drift`. */
1030
+ wallet_id: zod_1.z.string().min(1),
1029
1031
  }),
1030
1032
  })
1031
1033
  .strict();
@@ -1126,6 +1126,8 @@ export const zNfseFeeReimbursementExecuteSchema = z
1126
1126
  invoice_count: z.number().int().positive(),
1127
1127
  fee_value: z.number().positive(),
1128
1128
  amount: z.number().positive(),
1129
+ /** Adendo D1: `wallet_id` da linha da prévia; divergiu no execute => `preview_drift`. */
1130
+ wallet_id: z.string().min(1),
1129
1131
  }),
1130
1132
  })
1131
1133
  .strict();
@@ -129,6 +129,7 @@ export declare const zInsuranceCompanySchema: z.ZodObject<{
129
129
  name: z.ZodDefault<z.ZodOptional<z.ZodString>>;
130
130
  kind: z.ZodDefault<z.ZodOptional<z.ZodString>>;
131
131
  line1: z.ZodDefault<z.ZodOptional<z.ZodString>>;
132
+ number: z.ZodDefault<z.ZodOptional<z.ZodEffects<z.ZodString, string, unknown>>>;
132
133
  line2: z.ZodDefault<z.ZodOptional<z.ZodString>>;
133
134
  neighborhood: z.ZodDefault<z.ZodOptional<z.ZodString>>;
134
135
  city: z.ZodDefault<z.ZodOptional<z.ZodString>>;
@@ -137,6 +138,7 @@ export declare const zInsuranceCompanySchema: z.ZodObject<{
137
138
  country: z.ZodDefault<z.ZodOptional<z.ZodString>>;
138
139
  geo: z.ZodOptional<z.ZodAny>;
139
140
  }, "strip", z.ZodTypeAny, {
141
+ number: string;
140
142
  name: string;
141
143
  kind: string;
142
144
  country: string;
@@ -148,6 +150,7 @@ export declare const zInsuranceCompanySchema: z.ZodObject<{
148
150
  zip: string;
149
151
  geo?: any;
150
152
  }, {
153
+ number?: unknown;
151
154
  name?: string | undefined;
152
155
  kind?: string | undefined;
153
156
  country?: string | undefined;
@@ -268,6 +271,7 @@ export declare const zInsuranceCompanySchema: z.ZodObject<{
268
271
  name: z.ZodDefault<z.ZodOptional<z.ZodString>>;
269
272
  kind: z.ZodDefault<z.ZodOptional<z.ZodString>>;
270
273
  line1: z.ZodDefault<z.ZodOptional<z.ZodString>>;
274
+ number: z.ZodDefault<z.ZodOptional<z.ZodEffects<z.ZodString, string, unknown>>>;
271
275
  line2: z.ZodDefault<z.ZodOptional<z.ZodString>>;
272
276
  neighborhood: z.ZodDefault<z.ZodOptional<z.ZodString>>;
273
277
  city: z.ZodDefault<z.ZodOptional<z.ZodString>>;
@@ -276,6 +280,7 @@ export declare const zInsuranceCompanySchema: z.ZodObject<{
276
280
  country: z.ZodDefault<z.ZodOptional<z.ZodString>>;
277
281
  geo: z.ZodOptional<z.ZodAny>;
278
282
  }, "strip", z.ZodTypeAny, {
283
+ number: string;
279
284
  name: string;
280
285
  kind: string;
281
286
  country: string;
@@ -287,6 +292,7 @@ export declare const zInsuranceCompanySchema: z.ZodObject<{
287
292
  zip: string;
288
293
  geo?: any;
289
294
  }, {
295
+ number?: unknown;
290
296
  name?: string | undefined;
291
297
  kind?: string | undefined;
292
298
  country?: string | undefined;
@@ -407,6 +413,7 @@ export declare const zInsuranceCompanySchema: z.ZodObject<{
407
413
  name: z.ZodDefault<z.ZodOptional<z.ZodString>>;
408
414
  kind: z.ZodDefault<z.ZodOptional<z.ZodString>>;
409
415
  line1: z.ZodDefault<z.ZodOptional<z.ZodString>>;
416
+ number: z.ZodDefault<z.ZodOptional<z.ZodEffects<z.ZodString, string, unknown>>>;
410
417
  line2: z.ZodDefault<z.ZodOptional<z.ZodString>>;
411
418
  neighborhood: z.ZodDefault<z.ZodOptional<z.ZodString>>;
412
419
  city: z.ZodDefault<z.ZodOptional<z.ZodString>>;
@@ -415,6 +422,7 @@ export declare const zInsuranceCompanySchema: z.ZodObject<{
415
422
  country: z.ZodDefault<z.ZodOptional<z.ZodString>>;
416
423
  geo: z.ZodOptional<z.ZodAny>;
417
424
  }, "strip", z.ZodTypeAny, {
425
+ number: string;
418
426
  name: string;
419
427
  kind: string;
420
428
  country: string;
@@ -426,6 +434,7 @@ export declare const zInsuranceCompanySchema: z.ZodObject<{
426
434
  zip: string;
427
435
  geo?: any;
428
436
  }, {
437
+ number?: unknown;
429
438
  name?: string | undefined;
430
439
  kind?: string | undefined;
431
440
  country?: string | undefined;
@@ -124,6 +124,7 @@ export declare const zProfessionalSchema: z.ZodObject<{
124
124
  name: z.ZodDefault<z.ZodOptional<z.ZodString>>;
125
125
  kind: z.ZodDefault<z.ZodOptional<z.ZodString>>;
126
126
  line1: z.ZodDefault<z.ZodOptional<z.ZodString>>;
127
+ number: z.ZodDefault<z.ZodOptional<z.ZodEffects<z.ZodString, string, unknown>>>;
127
128
  line2: z.ZodDefault<z.ZodOptional<z.ZodString>>;
128
129
  neighborhood: z.ZodDefault<z.ZodOptional<z.ZodString>>;
129
130
  city: z.ZodDefault<z.ZodOptional<z.ZodString>>;
@@ -132,6 +133,7 @@ export declare const zProfessionalSchema: z.ZodObject<{
132
133
  country: z.ZodDefault<z.ZodOptional<z.ZodString>>;
133
134
  geo: z.ZodOptional<z.ZodAny>;
134
135
  }, "strip", z.ZodTypeAny, {
136
+ number: string;
135
137
  name: string;
136
138
  kind: string;
137
139
  country: string;
@@ -143,6 +145,7 @@ export declare const zProfessionalSchema: z.ZodObject<{
143
145
  zip: string;
144
146
  geo?: any;
145
147
  }, {
148
+ number?: unknown;
146
149
  name?: string | undefined;
147
150
  kind?: string | undefined;
148
151
  country?: string | undefined;
@@ -278,6 +281,7 @@ export declare const zProfessionalSchema: z.ZodObject<{
278
281
  name: z.ZodDefault<z.ZodOptional<z.ZodString>>;
279
282
  kind: z.ZodDefault<z.ZodOptional<z.ZodString>>;
280
283
  line1: z.ZodDefault<z.ZodOptional<z.ZodString>>;
284
+ number: z.ZodDefault<z.ZodOptional<z.ZodEffects<z.ZodString, string, unknown>>>;
281
285
  line2: z.ZodDefault<z.ZodOptional<z.ZodString>>;
282
286
  neighborhood: z.ZodDefault<z.ZodOptional<z.ZodString>>;
283
287
  city: z.ZodDefault<z.ZodOptional<z.ZodString>>;
@@ -286,6 +290,7 @@ export declare const zProfessionalSchema: z.ZodObject<{
286
290
  country: z.ZodDefault<z.ZodOptional<z.ZodString>>;
287
291
  geo: z.ZodOptional<z.ZodAny>;
288
292
  }, "strip", z.ZodTypeAny, {
293
+ number: string;
289
294
  name: string;
290
295
  kind: string;
291
296
  country: string;
@@ -297,6 +302,7 @@ export declare const zProfessionalSchema: z.ZodObject<{
297
302
  zip: string;
298
303
  geo?: any;
299
304
  }, {
305
+ number?: unknown;
300
306
  name?: string | undefined;
301
307
  kind?: string | undefined;
302
308
  country?: string | undefined;
@@ -432,6 +438,7 @@ export declare const zProfessionalSchema: z.ZodObject<{
432
438
  name: z.ZodDefault<z.ZodOptional<z.ZodString>>;
433
439
  kind: z.ZodDefault<z.ZodOptional<z.ZodString>>;
434
440
  line1: z.ZodDefault<z.ZodOptional<z.ZodString>>;
441
+ number: z.ZodDefault<z.ZodOptional<z.ZodEffects<z.ZodString, string, unknown>>>;
435
442
  line2: z.ZodDefault<z.ZodOptional<z.ZodString>>;
436
443
  neighborhood: z.ZodDefault<z.ZodOptional<z.ZodString>>;
437
444
  city: z.ZodDefault<z.ZodOptional<z.ZodString>>;
@@ -440,6 +447,7 @@ export declare const zProfessionalSchema: z.ZodObject<{
440
447
  country: z.ZodDefault<z.ZodOptional<z.ZodString>>;
441
448
  geo: z.ZodOptional<z.ZodAny>;
442
449
  }, "strip", z.ZodTypeAny, {
450
+ number: string;
443
451
  name: string;
444
452
  kind: string;
445
453
  country: string;
@@ -451,6 +459,7 @@ export declare const zProfessionalSchema: z.ZodObject<{
451
459
  zip: string;
452
460
  geo?: any;
453
461
  }, {
462
+ number?: unknown;
454
463
  name?: string | undefined;
455
464
  kind?: string | undefined;
456
465
  country?: string | undefined;
@@ -973,6 +982,7 @@ export declare const zPatientSchema: z.ZodObject<{
973
982
  name: z.ZodDefault<z.ZodOptional<z.ZodString>>;
974
983
  kind: z.ZodDefault<z.ZodOptional<z.ZodString>>;
975
984
  line1: z.ZodDefault<z.ZodOptional<z.ZodString>>;
985
+ number: z.ZodDefault<z.ZodOptional<z.ZodEffects<z.ZodString, string, unknown>>>;
976
986
  line2: z.ZodDefault<z.ZodOptional<z.ZodString>>;
977
987
  neighborhood: z.ZodDefault<z.ZodOptional<z.ZodString>>;
978
988
  city: z.ZodDefault<z.ZodOptional<z.ZodString>>;
@@ -981,6 +991,7 @@ export declare const zPatientSchema: z.ZodObject<{
981
991
  country: z.ZodDefault<z.ZodOptional<z.ZodString>>;
982
992
  geo: z.ZodOptional<z.ZodAny>;
983
993
  }, "strip", z.ZodTypeAny, {
994
+ number: string;
984
995
  name: string;
985
996
  kind: string;
986
997
  country: string;
@@ -992,6 +1003,7 @@ export declare const zPatientSchema: z.ZodObject<{
992
1003
  zip: string;
993
1004
  geo?: any;
994
1005
  }, {
1006
+ number?: unknown;
995
1007
  name?: string | undefined;
996
1008
  kind?: string | undefined;
997
1009
  country?: string | undefined;
@@ -1621,6 +1633,7 @@ export declare const zPatientSchema: z.ZodObject<{
1621
1633
  name: z.ZodDefault<z.ZodOptional<z.ZodString>>;
1622
1634
  kind: z.ZodDefault<z.ZodOptional<z.ZodString>>;
1623
1635
  line1: z.ZodDefault<z.ZodOptional<z.ZodString>>;
1636
+ number: z.ZodDefault<z.ZodOptional<z.ZodEffects<z.ZodString, string, unknown>>>;
1624
1637
  line2: z.ZodDefault<z.ZodOptional<z.ZodString>>;
1625
1638
  neighborhood: z.ZodDefault<z.ZodOptional<z.ZodString>>;
1626
1639
  city: z.ZodDefault<z.ZodOptional<z.ZodString>>;
@@ -1629,6 +1642,7 @@ export declare const zPatientSchema: z.ZodObject<{
1629
1642
  country: z.ZodDefault<z.ZodOptional<z.ZodString>>;
1630
1643
  geo: z.ZodOptional<z.ZodAny>;
1631
1644
  }, "strip", z.ZodTypeAny, {
1645
+ number: string;
1632
1646
  name: string;
1633
1647
  kind: string;
1634
1648
  country: string;
@@ -1640,6 +1654,7 @@ export declare const zPatientSchema: z.ZodObject<{
1640
1654
  zip: string;
1641
1655
  geo?: any;
1642
1656
  }, {
1657
+ number?: unknown;
1643
1658
  name?: string | undefined;
1644
1659
  kind?: string | undefined;
1645
1660
  country?: string | undefined;
@@ -2269,6 +2284,7 @@ export declare const zPatientSchema: z.ZodObject<{
2269
2284
  name: z.ZodDefault<z.ZodOptional<z.ZodString>>;
2270
2285
  kind: z.ZodDefault<z.ZodOptional<z.ZodString>>;
2271
2286
  line1: z.ZodDefault<z.ZodOptional<z.ZodString>>;
2287
+ number: z.ZodDefault<z.ZodOptional<z.ZodEffects<z.ZodString, string, unknown>>>;
2272
2288
  line2: z.ZodDefault<z.ZodOptional<z.ZodString>>;
2273
2289
  neighborhood: z.ZodDefault<z.ZodOptional<z.ZodString>>;
2274
2290
  city: z.ZodDefault<z.ZodOptional<z.ZodString>>;
@@ -2277,6 +2293,7 @@ export declare const zPatientSchema: z.ZodObject<{
2277
2293
  country: z.ZodDefault<z.ZodOptional<z.ZodString>>;
2278
2294
  geo: z.ZodOptional<z.ZodAny>;
2279
2295
  }, "strip", z.ZodTypeAny, {
2296
+ number: string;
2280
2297
  name: string;
2281
2298
  kind: string;
2282
2299
  country: string;
@@ -2288,6 +2305,7 @@ export declare const zPatientSchema: z.ZodObject<{
2288
2305
  zip: string;
2289
2306
  geo?: any;
2290
2307
  }, {
2308
+ number?: unknown;
2291
2309
  name?: string | undefined;
2292
2310
  kind?: string | undefined;
2293
2311
  country?: string | undefined;
@@ -53,6 +53,7 @@ export declare const zAddressSchema: z.ZodObject<{
53
53
  name: z.ZodDefault<z.ZodOptional<z.ZodString>>;
54
54
  kind: z.ZodDefault<z.ZodOptional<z.ZodString>>;
55
55
  line1: z.ZodDefault<z.ZodOptional<z.ZodString>>;
56
+ number: z.ZodDefault<z.ZodOptional<z.ZodEffects<z.ZodString, string, unknown>>>;
56
57
  line2: z.ZodDefault<z.ZodOptional<z.ZodString>>;
57
58
  neighborhood: z.ZodDefault<z.ZodOptional<z.ZodString>>;
58
59
  city: z.ZodDefault<z.ZodOptional<z.ZodString>>;
@@ -61,6 +62,7 @@ export declare const zAddressSchema: z.ZodObject<{
61
62
  country: z.ZodDefault<z.ZodOptional<z.ZodString>>;
62
63
  geo: z.ZodOptional<z.ZodAny>;
63
64
  }, "strip", z.ZodTypeAny, {
65
+ number: string;
64
66
  name: string;
65
67
  kind: string;
66
68
  country: string;
@@ -72,6 +74,7 @@ export declare const zAddressSchema: z.ZodObject<{
72
74
  zip: string;
73
75
  geo?: any;
74
76
  }, {
77
+ number?: unknown;
75
78
  name?: string | undefined;
76
79
  kind?: string | undefined;
77
80
  country?: string | undefined;
@@ -73,6 +73,10 @@ exports.zAddressSchema = zod_1.z.object({
73
73
  name: zod_1.z.string().max(255).optional().default(""),
74
74
  kind: zod_1.z.string().max(255).optional().default(""),
75
75
  line1: zod_1.z.string().max(255).optional().default(""),
76
+ number: zod_1.z
77
+ .preprocess((v) => (v === null || v === undefined ? "" : String(v)), zod_1.z.string().max(255))
78
+ .optional()
79
+ .default(""),
76
80
  line2: zod_1.z.string().max(255).optional().default(""),
77
81
  neighborhood: zod_1.z.string().max(255).optional().default(""),
78
82
  city: zod_1.z.string().max(255).optional().default(""),
@@ -87,6 +87,10 @@ export const zAddressSchema = z.object({
87
87
  name: z.string().max(255).optional().default(""),
88
88
  kind: z.string().max(255).optional().default(""),
89
89
  line1: z.string().max(255).optional().default(""),
90
+ number: z
91
+ .preprocess((v) => (v === null || v === undefined ? "" : String(v)), z.string().max(255))
92
+ .optional()
93
+ .default(""),
90
94
  line2: z.string().max(255).optional().default(""),
91
95
  neighborhood: z.string().max(255).optional().default(""),
92
96
  city: z.string().max(255).optional().default(""),
@@ -14,6 +14,8 @@ export declare const NFSE_FEE_REIMBURSEMENT_TRANSITIONS: Record<NfseFeeReimburse
14
14
  export declare const NFSE_FEE_REIMBURSEMENT_CONSUMING_STATES: readonly string[];
15
15
  /** Estados em voo: bloqueiam nova execução para o mesmo tenant/competência. */
16
16
  export declare const NFSE_FEE_REIMBURSEMENT_IN_FLIGHT_STATES: readonly string[];
17
+ /** De onde veio o `wallet_id` do destino (Adendo D1). */
18
+ export type NfseFeeReimbursementWalletSource = 'account_scope' | 'asaas_wallets_api';
17
19
  /** D1: plugável. Só `asaas_internal_transfer` é implementado; `pix` fica para depois. */
18
20
  export type NfseFeeReimbursementPayoutMethod = 'asaas_internal_transfer';
19
21
  export interface INfseFeeReimbursement {
@@ -28,10 +30,14 @@ export interface INfseFeeReimbursement {
28
30
  state_reason?: string | null;
29
31
  provider: {
30
32
  id: string;
31
- type: 'asaas_subaccount';
33
+ /** Adendo D1: `asaas` = conta própria do tenant; `asaas_subaccount` = subconta da master. */
34
+ type: 'asaas' | 'asaas_subaccount';
32
35
  env: 'production';
33
- asaas_account_id: string;
36
+ /** Só a subconta tem; conta própria => `null`. */
37
+ asaas_account_id?: string | null;
34
38
  wallet_id: string;
39
+ /** `account_scope` (subconta, persistido) | `asaas_wallets_api` (conta própria, `GET /v3/wallets/` com a chave do tenant; só snapshot). */
40
+ wallet_source: NfseFeeReimbursementWalletSource;
35
41
  };
36
42
  /** Snapshot do que foi reembolsado. */
37
43
  invoices: {
@@ -82,7 +88,7 @@ export interface INfseFeeReimbursement {
82
88
  updated_at: string;
83
89
  done_at?: string | null;
84
90
  }
85
- export type NfseFeeReimbursementEligibility = 'eligible' | 'nothing_to_reimburse' | 'in_flight' | 'open_competencia' | 'not_eligible_own_account' | 'not_eligible_contract_flag' | 'no_contract' | 'subaccount_not_ready' | 'fee_unavailable';
91
+ export type NfseFeeReimbursementEligibility = 'eligible' | 'nothing_to_reimburse' | 'in_flight' | 'open_competencia' | 'not_eligible_contract_flag' | 'no_contract' | 'subaccount_not_ready' | 'wallet_unavailable' | 'ambiguous_provider' | 'fee_unavailable';
86
92
  export interface INfseFeeReimbursementPreviewRow {
87
93
  tenant: string;
88
94
  tenant_name?: string | null;
@@ -92,6 +98,7 @@ export interface INfseFeeReimbursementPreviewRow {
92
98
  provider_id?: string | null;
93
99
  provider_type?: string | null;
94
100
  wallet_id?: string | null;
101
+ wallet_source?: NfseFeeReimbursementWalletSource | null;
95
102
  /** Autorizadas na competência, do provider. */
96
103
  invoice_count_total: number;
97
104
  invoice_count_already_reimbursed: number;
@@ -43,6 +43,9 @@ export const NFSE_FEE_REIMBURSEMENT_CONSUMING_STATES: readonly string[] = ['awai
43
43
  /** Estados em voo: bloqueiam nova execução para o mesmo tenant/competência. */
44
44
  export const NFSE_FEE_REIMBURSEMENT_IN_FLIGHT_STATES: readonly string[] = ['awaiting_authorization', 'pending'];
45
45
 
46
+ /** De onde veio o `wallet_id` do destino (Adendo D1). */
47
+ export type NfseFeeReimbursementWalletSource = 'account_scope' | 'asaas_wallets_api';
48
+
46
49
  /** D1: plugável. Só `asaas_internal_transfer` é implementado; `pix` fica para depois. */
47
50
  export type NfseFeeReimbursementPayoutMethod = 'asaas_internal_transfer';
48
51
 
@@ -58,10 +61,14 @@ export interface INfseFeeReimbursement {
58
61
  state_reason?: string | null;
59
62
  provider: {
60
63
  id: string;
61
- type: 'asaas_subaccount';
64
+ /** Adendo D1: `asaas` = conta própria do tenant; `asaas_subaccount` = subconta da master. */
65
+ type: 'asaas' | 'asaas_subaccount';
62
66
  env: 'production';
63
- asaas_account_id: string;
67
+ /** Só a subconta tem; conta própria => `null`. */
68
+ asaas_account_id?: string | null;
64
69
  wallet_id: string;
70
+ /** `account_scope` (subconta, persistido) | `asaas_wallets_api` (conta própria, `GET /v3/wallets/` com a chave do tenant; só snapshot). */
71
+ wallet_source: NfseFeeReimbursementWalletSource;
65
72
  };
66
73
  /** Snapshot do que foi reembolsado. */
67
74
  invoices: { count: number; ids: string[] };
@@ -108,10 +115,11 @@ export type NfseFeeReimbursementEligibility =
108
115
  | 'nothing_to_reimburse'
109
116
  | 'in_flight'
110
117
  | 'open_competencia'
111
- | 'not_eligible_own_account' // provider type 'asaas' (conta própria) — D1
112
118
  | 'not_eligible_contract_flag'
113
119
  | 'no_contract'
114
- | 'subaccount_not_ready' // subconta inativa/sem wallet_id/sem env production
120
+ | 'subaccount_not_ready' // subconta ativa sem account_scope.wallet_id
121
+ | 'wallet_unavailable' // conta própria: GET /v3/wallets/ com 0, >1 wallets ou erro
122
+ | 'ambiguous_provider' // mais de 1 provider Asaas ativo (asaas/asaas_subaccount) em production
115
123
  | 'fee_unavailable'; // GET /v3/myAccount/fees falhou ou sem invoice.feeValue
116
124
 
117
125
  export interface INfseFeeReimbursementPreviewRow {
@@ -123,6 +131,7 @@ export interface INfseFeeReimbursementPreviewRow {
123
131
  provider_id?: string | null;
124
132
  provider_type?: string | null;
125
133
  wallet_id?: string | null;
134
+ wallet_source?: NfseFeeReimbursementWalletSource | null;
126
135
  /** Autorizadas na competência, do provider. */
127
136
  invoice_count_total: number;
128
137
  invoice_count_already_reimbursed: number;
@@ -39,6 +39,8 @@ export interface IAddress {
39
39
  name?: string;
40
40
  kind?: string;
41
41
  line1?: string;
42
+ /** Número do logradouro. */
43
+ number?: string;
42
44
  line2?: string;
43
45
  neighborhood?: string;
44
46
  city?: string;
@@ -51,6 +51,8 @@ export interface IAddress {
51
51
  name?: string;
52
52
  kind?: string;
53
53
  line1?: string;
54
+ /** Número do logradouro. */
55
+ number?: string;
54
56
  line2?: string;
55
57
  neighborhood?: string;
56
58
  city?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "evo360-types",
3
- "version": "1.3.664",
3
+ "version": "1.3.667",
4
4
  "description": "HREVO360 Shared Types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",