sinfactura-types 1.8.1 → 1.8.3

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/api.d.ts CHANGED
@@ -5,7 +5,38 @@ declare global {
5
5
  message: string | null;
6
6
  data: T;
7
7
  ConsumedCapacity?: Record<string, string | number>;
8
- LastEvaluatedKey?: Record<string, string>;
8
+ /**
9
+ * Either a DynamoDB key object or an opaque, already-encoded cursor string,
10
+ * depending on the endpoint (api#1983):
11
+ *
12
+ * - **Key object** — a handler surfacing a raw page cursor from its own
13
+ * `Query` (`GET /products`, `/customers`, `/invoices`, `/users`,
14
+ * `/notifications`, `/logs`, the platform MP log endpoints). Key attributes
15
+ * are `S` or `N`, so a value can be a NUMBER whenever the query rides a
16
+ * GSI with a numeric sort key: `GET /invoices`' date branch (`PK-dated`)
17
+ * yields `{ PK, SK, dated }` with a numeric `dated`, and `GET /products`'
18
+ * list branch (`PK-updatedAt`) likewise. Previously typed
19
+ * `Record<string, string>`, which those endpoints never actually matched.
20
+ * - **Opaque string** — a base64url cursor the caller round-trips back
21
+ * unparsed as `?startKey=`. `GET /suppliers?mode=invoices` and
22
+ * `mode=invoiceFiles` emit this: their cursor is derived from the last
23
+ * RETURNED row, never from a raw `LastEvaluatedKey`, which can skip rows.
24
+ *
25
+ * Consumers must not assume this is enumerable — treat the string form as
26
+ * opaque and pass it straight back.
27
+ */
28
+ LastEvaluatedKey?: string | Record<string, string | number>;
29
+ /**
30
+ * Set by endpoints whose result was capped before the query was exhausted,
31
+ * i.e. rows are genuinely missing (api#1983). Emitted today by
32
+ * `GET /reports?mode=sales` and `mode=supplier-invoices`.
33
+ *
34
+ * Distinct from `LastEvaluatedKey`: an endpoint can be truncated with NO
35
+ * cursor to continue from, so `truncated: true` is not "fetch the next page",
36
+ * it is "this answer is incomplete". Fiscal exports never set it — they fail
37
+ * the request instead, because a short fiscal file must not be returned at all.
38
+ */
39
+ truncated?: boolean;
9
40
  }
10
41
  }
11
42
  export {};
package/dist/invoice.d.ts CHANGED
@@ -363,6 +363,13 @@ declare global {
363
363
  effectiveFrom: string;
364
364
  acceptanceWindowDays: number;
365
365
  acceptanceWindowValidThrough?: string;
366
+ /**
367
+ * api#1754 — epoch-ms last-write trace, set by the api on every threshold
368
+ * write and echoed on GET /config + the POST response (api PLATFORM_API.md
369
+ * section 20). OPTIONAL by design: a row written before the field carries
370
+ * none, so a reader must not treat its absence as "never updated".
371
+ */
372
+ updatedAt?: number;
366
373
  }
367
374
  }
368
375
  export {};
package/dist/store.d.ts CHANGED
@@ -109,6 +109,14 @@ declare global {
109
109
  * default — does NOT reinterpret existing Account rows.
110
110
  */
111
111
  defaultAccountCurrency?: string;
112
+ /**
113
+ * api#1768 / ADR-0004 section 5 — tenant opt-out from AI product
114
+ * enrichment. Absent is the (common) "tenant never touched the toggle"
115
+ * default and does NOT block; only an explicit `true` blocks. The api
116
+ * gate is fail-CLOSED on a read failure, but open on a missing field —
117
+ * do not conflate the two.
118
+ */
119
+ aiOptOut?: boolean;
112
120
  /**
113
121
  * api#1740 — per-category × per-channel notification/feedback defaults.
114
122
  * Store-level baseline the app layers per-device overrides on top of
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sinfactura-types",
3
- "version": "1.8.1",
3
+ "version": "1.8.3",
4
4
  "main": "dist/index.js",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",