evo360-types 1.3.283 → 1.3.286

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.
@@ -0,0 +1,27 @@
1
+ import type { IFireGlobalDoc } from '../../shared';
2
+ export type NexFinopsContractStatus = 'draft' | 'active' | 'inactive' | 'ended' | 'canceled';
3
+ export type NexFinopsContractRecurrence = 'one_time' | 'monthly';
4
+ export type NexFinopsPaymentMethod = 'pix' | 'boleto' | 'payment_link';
5
+ export interface INexFinopsContractServiceItem {
6
+ category: string;
7
+ description: string;
8
+ /** Valor unitário (decimal, BRL). */
9
+ amount: number;
10
+ }
11
+ export interface INexFinopsContract extends IFireGlobalDoc {
12
+ customer_id: string;
13
+ customer_ref?: string | null;
14
+ code?: string | null;
15
+ name: string;
16
+ status: NexFinopsContractStatus;
17
+ starts_at: string;
18
+ ends_at?: string | null;
19
+ recurrence: NexFinopsContractRecurrence;
20
+ due_day: number;
21
+ accepted_payment_methods: NexFinopsPaymentMethod[];
22
+ services: INexFinopsContractServiceItem[];
23
+ total_amount: number;
24
+ currency: 'BRL';
25
+ notes?: string | null;
26
+ }
27
+ export declare const NEX_FINOPS_CONTRACT_STATUS_TRANSITIONS: Record<NexFinopsContractStatus, NexFinopsContractStatus[]>;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NEX_FINOPS_CONTRACT_STATUS_TRANSITIONS = void 0;
4
+ // ── Status transitions ──
5
+ exports.NEX_FINOPS_CONTRACT_STATUS_TRANSITIONS = {
6
+ draft: ['active', 'canceled'],
7
+ active: ['inactive', 'ended', 'canceled'],
8
+ inactive: ['active'],
9
+ ended: [],
10
+ canceled: [],
11
+ };
@@ -0,0 +1,62 @@
1
+ import type { IFireGlobalDoc } from '../../shared';
2
+
3
+ // ── Status & Recurrence ──
4
+
5
+ export type NexFinopsContractStatus = 'draft' | 'active' | 'inactive' | 'ended' | 'canceled';
6
+ export type NexFinopsContractRecurrence = 'one_time' | 'monthly';
7
+ export type NexFinopsPaymentMethod = 'pix' | 'boleto' | 'payment_link';
8
+
9
+ // ── Service Item ──
10
+
11
+ export interface INexFinopsContractServiceItem {
12
+ category: string;
13
+ description: string;
14
+ /** Valor unitário (decimal, BRL). */
15
+ amount: number;
16
+ }
17
+
18
+ // ── Main Document ──
19
+
20
+ export interface INexFinopsContract extends IFireGlobalDoc {
21
+ // Vínculos
22
+ customer_id: string;
23
+ customer_ref?: string | null;
24
+
25
+ // Identificação
26
+ code?: string | null;
27
+ name: string;
28
+ status: NexFinopsContractStatus;
29
+
30
+ // Vigência
31
+ starts_at: string;
32
+ ends_at?: string | null;
33
+
34
+ // Recorrência e vencimento
35
+ recurrence: NexFinopsContractRecurrence;
36
+ due_day: number;
37
+
38
+ // Formas de pagamento aceitas
39
+ accepted_payment_methods: NexFinopsPaymentMethod[];
40
+
41
+ // Serviços
42
+ services: INexFinopsContractServiceItem[];
43
+
44
+ // Valor total (calculado = soma dos services[].amount)
45
+ total_amount: number;
46
+
47
+ // Moeda
48
+ currency: 'BRL';
49
+
50
+ // Observações
51
+ notes?: string | null;
52
+ }
53
+
54
+ // ── Status transitions ──
55
+
56
+ export const NEX_FINOPS_CONTRACT_STATUS_TRANSITIONS: Record<NexFinopsContractStatus, NexFinopsContractStatus[]> = {
57
+ draft: ['active', 'canceled'],
58
+ active: ['inactive', 'ended', 'canceled'],
59
+ inactive: ['active'],
60
+ ended: [],
61
+ canceled: [],
62
+ };
@@ -1,6 +1,7 @@
1
1
  export * from "./fb_collections";
2
2
  export * from "./common";
3
3
  export * from "./common/taker";
4
+ export * from "./common/contract";
4
5
  export * from "./providers";
5
6
  export * from "./providers/provider_fiscal_types";
6
7
  export * from "./providers/asaas/asaas_provider";
@@ -18,6 +18,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
18
18
  __exportStar(require("./fb_collections"), exports);
19
19
  __exportStar(require("./common"), exports);
20
20
  __exportStar(require("./common/taker"), exports);
21
+ __exportStar(require("./common/contract"), exports);
21
22
  __exportStar(require("./providers"), exports);
22
23
  __exportStar(require("./providers/provider_fiscal_types"), exports);
23
24
  __exportStar(require("./providers/asaas/asaas_provider"), exports);
@@ -3,6 +3,7 @@
3
3
  export * from "./fb_collections";
4
4
  export * from "./common";
5
5
  export * from "./common/taker";
6
+ export * from "./common/contract";
6
7
  export * from "./providers";
7
8
  export * from "./providers/provider_fiscal_types";
8
9
  export * from "./providers/asaas/asaas_provider";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "evo360-types",
3
- "version": "1.3.283",
3
+ "version": "1.3.286",
4
4
  "description": "HREVO360 Shared Types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",