sinfactura-types 1.6.23 → 1.6.25
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/account.d.ts +9 -0
- package/dist/afip.d.ts +14 -0
- package/dist/cash.d.ts +51 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/invoice.d.ts +3 -0
- package/dist/print.d.ts +27 -0
- package/dist/print.js +1 -0
- package/dist/store.d.ts +1 -0
- package/dist/user.d.ts +1 -0
- package/package.json +1 -1
package/dist/account.d.ts
CHANGED
|
@@ -35,6 +35,15 @@ declare global {
|
|
|
35
35
|
balance?: number;
|
|
36
36
|
userId: string;
|
|
37
37
|
deleted?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Provenance of a link-derived credit row (api#933 / PR#943, app#1344).
|
|
40
|
+
* Set together ONLY when POST /payments/{source}/{paymentId}/link runs with
|
|
41
|
+
* applyCredit:true and auto-creates this Account credit row. Manual PAGO
|
|
42
|
+
* rows leave both undefined. The FE reads them to render the source chip
|
|
43
|
+
* and dedup against the matching PaymentReceived projection row.
|
|
44
|
+
*/
|
|
45
|
+
paymentRefSource?: PaymentReceivedSource;
|
|
46
|
+
paymentRefId?: string;
|
|
38
47
|
}
|
|
39
48
|
}
|
|
40
49
|
export {};
|
package/dist/afip.d.ts
CHANGED
|
@@ -78,5 +78,19 @@ declare global {
|
|
|
78
78
|
errorConstancia?: AfipErrorConstancia;
|
|
79
79
|
errorRegimenGeneral?: AfipErrorRegimenGeneral;
|
|
80
80
|
}
|
|
81
|
+
/**
|
|
82
|
+
* Cached AFIP/ARCA platform-wide health snapshot (api#1213). One DDB row
|
|
83
|
+
* (PK 'AFIP_HEALTH', SK 'current') overwritten every ~5 min by the
|
|
84
|
+
* afipHealthPoller cron; served by anonymous GET /afip/health behind the
|
|
85
|
+
* public /estado page. Each *Server is 'OK' when healthy, else an AFIP-side
|
|
86
|
+
* status code. BE-internal name: AfipHealthSnapshot.
|
|
87
|
+
*/
|
|
88
|
+
interface AfipHealth {
|
|
89
|
+
appServer: string;
|
|
90
|
+
authServer: string;
|
|
91
|
+
dbServer: string;
|
|
92
|
+
lastSuccessAt?: number;
|
|
93
|
+
fetchedAt: number;
|
|
94
|
+
}
|
|
81
95
|
}
|
|
82
96
|
export {};
|
package/dist/cash.d.ts
CHANGED
|
@@ -15,5 +15,56 @@ declare global {
|
|
|
15
15
|
balanceByCurrency?: Record<string, number>;
|
|
16
16
|
incomeByCurrency?: Record<string, number>;
|
|
17
17
|
}
|
|
18
|
+
type CashShiftStatus = 'OPEN' | 'CLOSED' | 'RECONCILED' | 'REJECTED';
|
|
19
|
+
type CashEventType = 'apertura' | 'cash-in' | 'cash-out' | 'sale' | 'refund' | 'tip' | 'cierre' | 'reconcile';
|
|
20
|
+
/**
|
|
21
|
+
* A cashier's drawer shift — one per cashier per day. PK `STORE#{storeId}`,
|
|
22
|
+
* SK `SHIFT#{shiftId}` where `shiftId = ${date}-${userId}`. State machine:
|
|
23
|
+
* OPEN → CLOSED (blind count) → RECONCILED | REJECTED (manager).
|
|
24
|
+
*/
|
|
25
|
+
interface CashShift {
|
|
26
|
+
shiftId: string;
|
|
27
|
+
storeId: string;
|
|
28
|
+
userId: string;
|
|
29
|
+
date: number;
|
|
30
|
+
status: CashShiftStatus;
|
|
31
|
+
float: number;
|
|
32
|
+
currency: string;
|
|
33
|
+
openedAt: number;
|
|
34
|
+
openedBy: string;
|
|
35
|
+
openedByName?: string;
|
|
36
|
+
closedAt?: number;
|
|
37
|
+
closedBy?: string;
|
|
38
|
+
closedByName?: string;
|
|
39
|
+
declaredCount?: number;
|
|
40
|
+
expectedBalance?: number;
|
|
41
|
+
eventSeq?: number;
|
|
42
|
+
reconciledAt?: number;
|
|
43
|
+
reconciledBy?: string;
|
|
44
|
+
reconciledByName?: string;
|
|
45
|
+
variance?: number;
|
|
46
|
+
reconcileDecision?: 'approved' | 'rejected';
|
|
47
|
+
reconcileNote?: string;
|
|
48
|
+
tipDistribution?: Record<string, number>;
|
|
49
|
+
createdAt: number;
|
|
50
|
+
updatedAt?: number;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Append-only audit row for every drawer movement. PK `SHIFT#{shiftId}`,
|
|
54
|
+
* SK `EVENT#{createdAt}#{eventId}`. Never overwritten or deleted —
|
|
55
|
+
* reconciliation replays it.
|
|
56
|
+
*/
|
|
57
|
+
interface CashEvent {
|
|
58
|
+
eventId: string;
|
|
59
|
+
shiftId: string;
|
|
60
|
+
storeId: string;
|
|
61
|
+
type: CashEventType;
|
|
62
|
+
amount: number;
|
|
63
|
+
direction?: 'income' | 'outcome';
|
|
64
|
+
concept?: string;
|
|
65
|
+
currency: string;
|
|
66
|
+
userId: string;
|
|
67
|
+
createdAt: number;
|
|
68
|
+
}
|
|
18
69
|
}
|
|
19
70
|
export {};
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/dist/invoice.d.ts
CHANGED
package/dist/print.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
type PrintJobState = 'queued' | 'sent' | 'printed' | 'error';
|
|
3
|
+
type PrintContentType = 'pdf_uri' | 'pdf_base64' | 'raw_uri' | 'raw_base64';
|
|
4
|
+
interface PrintOptions {
|
|
5
|
+
bin?: string;
|
|
6
|
+
collate?: boolean;
|
|
7
|
+
color?: boolean;
|
|
8
|
+
copies?: number;
|
|
9
|
+
dpi?: string;
|
|
10
|
+
duplex?: 'long-edge' | 'short-edge' | 'one-sided';
|
|
11
|
+
fit_to_page?: boolean;
|
|
12
|
+
media?: string;
|
|
13
|
+
nup?: number;
|
|
14
|
+
pages?: string;
|
|
15
|
+
paper?: string;
|
|
16
|
+
rotate?: 0 | 90 | 180 | 270;
|
|
17
|
+
}
|
|
18
|
+
interface PrintJobTransition {
|
|
19
|
+
jobId: string;
|
|
20
|
+
state: PrintJobState;
|
|
21
|
+
ts: number;
|
|
22
|
+
source: 'be' | 'agent';
|
|
23
|
+
detail?: string;
|
|
24
|
+
errorCode?: string;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
export {};
|
package/dist/print.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/store.d.ts
CHANGED
package/dist/user.d.ts
CHANGED