evo360-types 1.3.286 → 1.3.292
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.
- package/dist/apps/evo-crm/dic/zod-schemas.d.ts +3 -0
- package/dist/apps/evo-crm/dic/zod-schemas.js +1 -0
- package/dist/apps/evo-crm/dic/zod-schemas.ts +1 -0
- package/dist/types/evo-crm/dic/index.d.ts +1 -0
- package/dist/types/evo-crm/dic/index.ts +1 -0
- package/dist/types/evo-finops/common/billing.d.ts +59 -0
- package/dist/types/evo-finops/common/billing.js +11 -0
- package/dist/types/evo-finops/common/billing.ts +112 -0
- package/dist/types/evo-finops/index.d.ts +1 -0
- package/dist/types/evo-finops/index.js +1 -0
- package/dist/types/evo-finops/index.ts +1 -0
- package/package.json +1 -1
|
@@ -203,6 +203,7 @@ export declare const zQualificationSchema: z.ZodObject<{
|
|
|
203
203
|
code: z.ZodString;
|
|
204
204
|
name: z.ZodString;
|
|
205
205
|
funnelLevel: z.ZodEnum<["invalid", "new", "trying_contact", "contacted", "qualifying", "qualified", "disqualified", "presented", "proposal_sent", "negotiating", "won", "lost", "waiting_reply", "follow_up_later"]>;
|
|
206
|
+
hide: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
206
207
|
tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
207
208
|
name: z.ZodString;
|
|
208
209
|
color: z.ZodOptional<z.ZodString>;
|
|
@@ -234,6 +235,7 @@ export declare const zQualificationSchema: z.ZodObject<{
|
|
|
234
235
|
code: z.ZodString;
|
|
235
236
|
name: z.ZodString;
|
|
236
237
|
funnelLevel: z.ZodEnum<["invalid", "new", "trying_contact", "contacted", "qualifying", "qualified", "disqualified", "presented", "proposal_sent", "negotiating", "won", "lost", "waiting_reply", "follow_up_later"]>;
|
|
238
|
+
hide: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
237
239
|
tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
238
240
|
name: z.ZodString;
|
|
239
241
|
color: z.ZodOptional<z.ZodString>;
|
|
@@ -265,6 +267,7 @@ export declare const zQualificationSchema: z.ZodObject<{
|
|
|
265
267
|
code: z.ZodString;
|
|
266
268
|
name: z.ZodString;
|
|
267
269
|
funnelLevel: z.ZodEnum<["invalid", "new", "trying_contact", "contacted", "qualifying", "qualified", "disqualified", "presented", "proposal_sent", "negotiating", "won", "lost", "waiting_reply", "follow_up_later"]>;
|
|
270
|
+
hide: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
268
271
|
tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
269
272
|
name: z.ZodString;
|
|
270
273
|
color: z.ZodOptional<z.ZodString>;
|
|
@@ -41,6 +41,7 @@ exports.zQualificationSchema = zod_schemas_1.zFireDocSchema
|
|
|
41
41
|
code: zod_1.z.string().min(1).max(20),
|
|
42
42
|
name: zod_1.z.string().min(1).max(255),
|
|
43
43
|
funnelLevel: exports.zQualificationFunnelLevelSchema,
|
|
44
|
+
hide: zod_1.z.boolean().optional().default(false),
|
|
44
45
|
tags: zod_1.z.array(zod_schemas_1.zTagSchema).nullable().optional(),
|
|
45
46
|
})
|
|
46
47
|
.passthrough();
|
|
@@ -42,6 +42,7 @@ export const zQualificationSchema = zFireDocSchema
|
|
|
42
42
|
code: z.string().min(1).max(20),
|
|
43
43
|
name: z.string().min(1).max(255),
|
|
44
44
|
funnelLevel: zQualificationFunnelLevelSchema,
|
|
45
|
+
hide: z.boolean().optional().default(false),
|
|
45
46
|
tags: z.array(zTagSchema).nullable().optional(),
|
|
46
47
|
})
|
|
47
48
|
.passthrough();
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { IFireGlobalDoc } from '../../shared';
|
|
2
|
+
export type NexFinopsBillingStatus = 'draft' | 'issued' | 'paid' | 'overdue' | 'canceled';
|
|
3
|
+
export interface INexFinopsBillingServiceItem {
|
|
4
|
+
category: string;
|
|
5
|
+
description: string;
|
|
6
|
+
amount: number;
|
|
7
|
+
}
|
|
8
|
+
export interface INexFinopsBillingPaymentOption {
|
|
9
|
+
type: 'pix' | 'boleto' | 'payment_link';
|
|
10
|
+
provider_id?: string | null;
|
|
11
|
+
external_id?: string | null;
|
|
12
|
+
url?: string | null;
|
|
13
|
+
digitable_line?: string | null;
|
|
14
|
+
qr_code_payload?: string | null;
|
|
15
|
+
expires_at?: string | null;
|
|
16
|
+
status?: string | null;
|
|
17
|
+
}
|
|
18
|
+
export interface INexFinopsBillingCompetency {
|
|
19
|
+
year: number;
|
|
20
|
+
month: number;
|
|
21
|
+
key: string;
|
|
22
|
+
}
|
|
23
|
+
export interface INexFinopsBillingAttachment {
|
|
24
|
+
/** Nome original do arquivo. */
|
|
25
|
+
filename: string;
|
|
26
|
+
/** Content-type (e.g. application/pdf). */
|
|
27
|
+
content_type: string;
|
|
28
|
+
/** Path no GCS bucket. */
|
|
29
|
+
storage_path: string;
|
|
30
|
+
/** URL pública ou signed URL (quando disponível). */
|
|
31
|
+
url?: string | null;
|
|
32
|
+
/** Timestamp de upload. */
|
|
33
|
+
uploaded_at: string;
|
|
34
|
+
}
|
|
35
|
+
export interface INexFinopsBilling extends IFireGlobalDoc {
|
|
36
|
+
customer_id: string;
|
|
37
|
+
customer_ref?: string | null;
|
|
38
|
+
contract_id: string;
|
|
39
|
+
contract_ref?: string | null;
|
|
40
|
+
status: NexFinopsBillingStatus;
|
|
41
|
+
contact_email?: string | null;
|
|
42
|
+
contact_phone?: string | null;
|
|
43
|
+
services: INexFinopsBillingServiceItem[];
|
|
44
|
+
amount: number;
|
|
45
|
+
discount: number;
|
|
46
|
+
total: number;
|
|
47
|
+
currency: 'BRL';
|
|
48
|
+
due_at: string;
|
|
49
|
+
pix?: string | null;
|
|
50
|
+
paid_at?: string | null;
|
|
51
|
+
payment_method?: string | null;
|
|
52
|
+
payment_options?: INexFinopsBillingPaymentOption[];
|
|
53
|
+
attachments?: INexFinopsBillingAttachment[];
|
|
54
|
+
competency?: INexFinopsBillingCompetency | null;
|
|
55
|
+
contract_snapshot?: Record<string, unknown> | null;
|
|
56
|
+
customer_snapshot?: Record<string, unknown> | null;
|
|
57
|
+
notes?: string | null;
|
|
58
|
+
}
|
|
59
|
+
export declare const NEX_FINOPS_BILLING_STATUS_TRANSITIONS: Record<NexFinopsBillingStatus, NexFinopsBillingStatus[]>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NEX_FINOPS_BILLING_STATUS_TRANSITIONS = void 0;
|
|
4
|
+
// ── Status transitions ──
|
|
5
|
+
exports.NEX_FINOPS_BILLING_STATUS_TRANSITIONS = {
|
|
6
|
+
draft: ['issued', 'canceled'],
|
|
7
|
+
issued: ['paid', 'overdue', 'canceled'],
|
|
8
|
+
overdue: ['paid'],
|
|
9
|
+
paid: [],
|
|
10
|
+
canceled: [],
|
|
11
|
+
};
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import type { IFireGlobalDoc } from '../../shared';
|
|
2
|
+
|
|
3
|
+
// ── Status ──
|
|
4
|
+
|
|
5
|
+
export type NexFinopsBillingStatus =
|
|
6
|
+
| 'draft'
|
|
7
|
+
| 'issued'
|
|
8
|
+
| 'paid'
|
|
9
|
+
| 'overdue'
|
|
10
|
+
| 'canceled';
|
|
11
|
+
|
|
12
|
+
// ── Sub-interfaces ──
|
|
13
|
+
|
|
14
|
+
export interface INexFinopsBillingServiceItem {
|
|
15
|
+
category: string;
|
|
16
|
+
description: string;
|
|
17
|
+
amount: number;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface INexFinopsBillingPaymentOption {
|
|
21
|
+
type: 'pix' | 'boleto' | 'payment_link';
|
|
22
|
+
provider_id?: string | null;
|
|
23
|
+
external_id?: string | null;
|
|
24
|
+
url?: string | null;
|
|
25
|
+
digitable_line?: string | null;
|
|
26
|
+
qr_code_payload?: string | null;
|
|
27
|
+
expires_at?: string | null;
|
|
28
|
+
status?: string | null;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface INexFinopsBillingCompetency {
|
|
32
|
+
year: number;
|
|
33
|
+
month: number;
|
|
34
|
+
key: string;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface INexFinopsBillingAttachment {
|
|
38
|
+
/** Nome original do arquivo. */
|
|
39
|
+
filename: string;
|
|
40
|
+
/** Content-type (e.g. application/pdf). */
|
|
41
|
+
content_type: string;
|
|
42
|
+
/** Path no GCS bucket. */
|
|
43
|
+
storage_path: string;
|
|
44
|
+
/** URL pública ou signed URL (quando disponível). */
|
|
45
|
+
url?: string | null;
|
|
46
|
+
/** Timestamp de upload. */
|
|
47
|
+
uploaded_at: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// ── Main Document ──
|
|
51
|
+
|
|
52
|
+
export interface INexFinopsBilling extends IFireGlobalDoc {
|
|
53
|
+
// Vínculos
|
|
54
|
+
customer_id: string;
|
|
55
|
+
customer_ref?: string | null;
|
|
56
|
+
contract_id: string;
|
|
57
|
+
contract_ref?: string | null;
|
|
58
|
+
|
|
59
|
+
// Status
|
|
60
|
+
status: NexFinopsBillingStatus;
|
|
61
|
+
|
|
62
|
+
// Contato (copiado do cliente na geração, editável)
|
|
63
|
+
contact_email?: string | null;
|
|
64
|
+
contact_phone?: string | null;
|
|
65
|
+
|
|
66
|
+
// Serviços (snapshot do contrato, editável na cobrança)
|
|
67
|
+
services: INexFinopsBillingServiceItem[];
|
|
68
|
+
|
|
69
|
+
// Valores
|
|
70
|
+
amount: number;
|
|
71
|
+
discount: number;
|
|
72
|
+
total: number;
|
|
73
|
+
currency: 'BRL';
|
|
74
|
+
|
|
75
|
+
// Vencimento
|
|
76
|
+
due_at: string;
|
|
77
|
+
|
|
78
|
+
// PIX copia e cola
|
|
79
|
+
pix?: string | null;
|
|
80
|
+
|
|
81
|
+
// Pagamento
|
|
82
|
+
paid_at?: string | null;
|
|
83
|
+
payment_method?: string | null;
|
|
84
|
+
|
|
85
|
+
// Formas de pagamento emitidas
|
|
86
|
+
payment_options?: INexFinopsBillingPaymentOption[];
|
|
87
|
+
|
|
88
|
+
// Anexos (boleto PDF, etc.)
|
|
89
|
+
attachments?: INexFinopsBillingAttachment[];
|
|
90
|
+
|
|
91
|
+
// Competência
|
|
92
|
+
competency?: INexFinopsBillingCompetency | null;
|
|
93
|
+
|
|
94
|
+
// Snapshot do contrato no momento da geração
|
|
95
|
+
contract_snapshot?: Record<string, unknown> | null;
|
|
96
|
+
|
|
97
|
+
// Snapshot do cliente no momento da geração (dados para NF)
|
|
98
|
+
customer_snapshot?: Record<string, unknown> | null;
|
|
99
|
+
|
|
100
|
+
// Observações
|
|
101
|
+
notes?: string | null;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// ── Status transitions ──
|
|
105
|
+
|
|
106
|
+
export const NEX_FINOPS_BILLING_STATUS_TRANSITIONS: Record<NexFinopsBillingStatus, NexFinopsBillingStatus[]> = {
|
|
107
|
+
draft: ['issued', 'canceled'],
|
|
108
|
+
issued: ['paid', 'overdue', 'canceled'],
|
|
109
|
+
overdue: ['paid'],
|
|
110
|
+
paid: [],
|
|
111
|
+
canceled: [],
|
|
112
|
+
};
|
|
@@ -2,6 +2,7 @@ export * from "./fb_collections";
|
|
|
2
2
|
export * from "./common";
|
|
3
3
|
export * from "./common/taker";
|
|
4
4
|
export * from "./common/contract";
|
|
5
|
+
export * from "./common/billing";
|
|
5
6
|
export * from "./providers";
|
|
6
7
|
export * from "./providers/provider_fiscal_types";
|
|
7
8
|
export * from "./providers/asaas/asaas_provider";
|
|
@@ -19,6 +19,7 @@ __exportStar(require("./fb_collections"), exports);
|
|
|
19
19
|
__exportStar(require("./common"), exports);
|
|
20
20
|
__exportStar(require("./common/taker"), exports);
|
|
21
21
|
__exportStar(require("./common/contract"), exports);
|
|
22
|
+
__exportStar(require("./common/billing"), exports);
|
|
22
23
|
__exportStar(require("./providers"), exports);
|
|
23
24
|
__exportStar(require("./providers/provider_fiscal_types"), exports);
|
|
24
25
|
__exportStar(require("./providers/asaas/asaas_provider"), exports);
|
|
@@ -4,6 +4,7 @@ export * from "./fb_collections";
|
|
|
4
4
|
export * from "./common";
|
|
5
5
|
export * from "./common/taker";
|
|
6
6
|
export * from "./common/contract";
|
|
7
|
+
export * from "./common/billing";
|
|
7
8
|
export * from "./providers";
|
|
8
9
|
export * from "./providers/provider_fiscal_types";
|
|
9
10
|
export * from "./providers/asaas/asaas_provider";
|