sinfactura-types 1.6.23 → 1.6.24

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/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
@@ -18,6 +18,7 @@ export * from "./mercadopago";
18
18
  export * from "./notification";
19
19
  export * from "./order";
20
20
  export * from "./payment";
21
+ export * from "./print";
21
22
  export * from "./product";
22
23
  export * from "./return";
23
24
  export * from "./serviceOrder";
package/dist/index.js CHANGED
@@ -18,6 +18,7 @@ export * from "./mercadopago";
18
18
  export * from "./notification";
19
19
  export * from "./order";
20
20
  export * from "./payment";
21
+ export * from "./print";
21
22
  export * from "./product";
22
23
  export * from "./return";
23
24
  export * from "./serviceOrder";
package/dist/invoice.d.ts CHANGED
@@ -38,6 +38,9 @@ declare global {
38
38
  serviceEndDate?: number;
39
39
  paymentDueDate?: number;
40
40
  serviceOrderId?: string;
41
+ attemptedCbteNro?: number;
42
+ attemptedCbteFch?: string;
43
+ invoicePrinted?: boolean;
41
44
  }
42
45
  interface InvoiceItem {
43
46
  code: string;
@@ -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
@@ -257,6 +257,8 @@ declare global {
257
257
  accessTicket_RSF?: string;
258
258
  hasCert?: boolean;
259
259
  hasKey?: boolean;
260
+ afipCertExpiresAt?: string;
261
+ afipCertExpiresInDays?: number;
260
262
  }
261
263
  type StoreAttributeNames = keyof Store;
262
264
  interface Method {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sinfactura-types",
3
- "version": "1.6.23",
3
+ "version": "1.6.24",
4
4
  "main": "dist/index.js",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",