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 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
@@ -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,7 @@ declare global {
257
257
  accessTicket_RSF?: string;
258
258
  hasCert?: boolean;
259
259
  hasKey?: boolean;
260
+ certExpiry?: number;
260
261
  }
261
262
  type StoreAttributeNames = keyof Store;
262
263
  interface Method {
package/dist/user.d.ts CHANGED
@@ -37,6 +37,7 @@ declare global {
37
37
  failedAttempts?: number;
38
38
  lockedUntil?: number;
39
39
  };
40
+ warnings?: StoreWarning[];
40
41
  }
41
42
  type UserNotifications = Partial<Record<NotificationTypeEnum, boolean>>;
42
43
  type UserPermissions = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sinfactura-types",
3
- "version": "1.6.23",
3
+ "version": "1.6.25",
4
4
  "main": "dist/index.js",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",