platform-types 1.10.743 → 1.10.745

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/audit.d.ts CHANGED
@@ -153,7 +153,7 @@ declare global {
153
153
  | 'order_shipment_created'
154
154
  /** A shipment was voided; when the order was delivered, this un-delivered it. */
155
155
  | 'order_shipment_voided' | 'payment_linked' | 'payment_unlinked'
156
- /** A MercadoPago refund shrank or dropped the payment's `linkedPayments` entry. */
156
+ /** HISTORICAL: written only by the removed outbound MercadoPago refund; kept so old timeline rows still parse. */
157
157
  | 'payment_refunded'
158
158
  /** At least one till tender leg was appended (an absorbed replay writes none). */
159
159
  | 'tender_added'
package/dist/auth.d.ts CHANGED
@@ -613,10 +613,9 @@ declare global {
613
613
  * no single principal to attribute the row to. Never render "no login
614
614
  * attempts" as "nobody tried".
615
615
  *
616
- * `jti` is the same identifier as `CustomerSession.jti`, so a `success` row
617
- * can be joined to the session it created — that is how a customer tells
618
- * "this unfamiliar sign-in is the device still listed as live" from "it has
619
- * since expired".
616
+ * No login-history row carries the refresh token id (`jti`) on any surface:
617
+ * a session handle is published only on the session lists
618
+ * (`CustomerSession.jti` / `OperatorSession.jti`), whose revoke flows use it.
620
619
  */
621
620
  interface CustomerLoginAttempt {
622
621
  outcome: LoginOutcome;
@@ -629,8 +628,10 @@ declare global {
629
628
  /** Client build string, when the caller sent one. */
630
629
  clientVersion?: string;
631
630
  /**
632
- * The refresh token id this attempt minted. Present on `success` rows
633
- * only, and joins to `CustomerSession.jti`.
631
+ * @deprecated Never sent. The row stores the refresh token id a success
632
+ * minted, but no login-history read publishes it; the session lists carry
633
+ * the handle a revoke needs. Kept so a consumer that still reads it (as a
634
+ * React key fallback, say) compiles — it is simply always absent.
634
635
  */
635
636
  jti?: string;
636
637
  /**
@@ -181,7 +181,6 @@ exports.TERMINAL_PAIRING_CODE_TTL_SECONDS = 10 * 60;
181
181
  /** Money-out actions whose operator sessions require a different ADMIN-or-higher approver. */
182
182
  exports.TERMINAL_ELEVATION_ACTIONS = [
183
183
  'order.deposit-refund',
184
- 'mercadopago.refund',
185
184
  'shift.refund',
186
185
  'shift.cash-out',
187
186
  'cash.withdrawal',
package/dist/log.d.ts CHANGED
@@ -51,8 +51,16 @@ declare global {
51
51
  entry: FiscalAuditLogRow;
52
52
  }) | (AuditHistoryRowBase & {
53
53
  surface: 'loginHistory';
54
- entry: Omit<CustomerLoginAttempt, 'ttl'>;
54
+ entry: AuditHistoryLoginEntry;
55
55
  });
56
+ /**
57
+ * A `loginHistory` history row's `entry`: the attempt WITHOUT its address, agent or token id.
58
+ * `GET /logs?mode=history` is IP-free for every role and lens; only the staff-only audit export
59
+ * file ({@link AuditExportLoginEntry}) carries `ip` and `userAgent`, and no surface carries `jti`.
60
+ */
61
+ type AuditHistoryLoginEntry = Omit<CustomerLoginAttempt, 'ttl' | 'ip' | 'userAgent' | 'jti'>;
62
+ /** A `loginHistory` audit export row's `entry`: the history entry plus the stored `ip` and `userAgent`. */
63
+ type AuditExportLoginEntry = AuditHistoryLoginEntry & Pick<CustomerLoginAttempt, 'ip' | 'userAgent'>;
56
64
  /**
57
65
  * How much of one surface this page covers. `complete` means the surface has
58
66
  * nothing older in the range; `paging` means it has more; `incomplete` means a
@@ -96,7 +104,13 @@ declare global {
96
104
  coverage: AuditHistorySourceCoverage[];
97
105
  }
98
106
  type AuditExportTier = 'hot' | 'cold' | 'cold-error-output';
99
- type AuditExportRow = AuditHistoryRow & {
107
+ /** A history row as the export captures it; a `loginHistory` row's `entry` keeps `ip`/`userAgent`. */
108
+ type AuditExportRow = (Exclude<AuditHistoryRow, {
109
+ surface: 'loginHistory';
110
+ }> | (AuditHistoryRowBase & {
111
+ surface: 'loginHistory';
112
+ entry: AuditExportLoginEntry;
113
+ })) & {
100
114
  tier: AuditExportTier;
101
115
  };
102
116
  interface AuditExportColdCoverage {
@@ -1,8 +1,4 @@
1
1
  declare global {
2
- type MpRefundRequest = {
3
- amount?: number;
4
- reason?: string;
5
- } & TerminalElevationAuthorization;
6
2
  /**
7
3
  * Device fetched from `GET /point/integration-api/devices` (BE → FE so the
8
4
  * admin can pick which physical device receives a payment intent).
package/dist/order.d.ts CHANGED
@@ -184,7 +184,7 @@ declare global {
184
184
  * (the explicit `shiftId`, or the caller's own open drawer). A shift's
185
185
  * tender report counts the leg by THIS, so an order tendered across days
186
186
  * reports each leg under the shift that took it. A provider-refund reversal
187
- * mirrors the shift of the leg it reverses. A seña REFUND leg
187
+ * (no writer yet) mirrors the shift of the leg it reverses. A seña REFUND leg
188
188
  * (`deposit.kind: 'refund'`) is the exception to "the shift that took it":
189
189
  * a CASH one names the drawer the cash LEFT — the refunding operator's own,
190
190
  * else the one that took the seña (another cashier's), else the store
@@ -456,7 +456,6 @@ declare global {
456
456
  * `403 ELEVATION_INVALID`. Per {@link TERMINAL_ELEVATION_ACTIONS}:
457
457
  *
458
458
  * - `'order.deposit-refund'` — the `orderId` of the {@link OrderDepositRefundRequest}. Required.
459
- * - `'mercadopago.refund'` — the MercadoPago `paymentId` being refunded. Required.
460
459
  * - `'shift.refund'` / `'shift.cash-out'` — the path `{id}` (the `shiftId`) of
461
460
  * `POST /shifts/{id}/movements` ({@link ShiftMovementRequest}). Required.
462
461
  * - `'cash.withdrawal'` ({@link CashPostRequest}) and `'account.cash-debit'`
@@ -469,7 +468,7 @@ declare global {
469
468
  * in the body) binds the compensation drawer of the stored row instead.
470
469
  * A client never computes a drawer id.
471
470
  *
472
- * The four required subjects are refused by the mint's validation when
471
+ * The three required subjects are refused by the mint's validation when
473
472
  * missing (`400`). For the two drawer-bound actions the mint checks, before
474
473
  * any PIN work, only the body fields it reads (`400 VALIDATION_FAILED`, paths
475
474
  * under `body`): `currency`, a cash edit's `cashId`, an account debit's
@@ -501,13 +500,7 @@ declare global {
501
500
  * fingerprint of the cash, account, shift-movement and deposit-refund
502
501
  * writes, so a retry carrying a FRESH token with the same key replays the
503
502
  * committed response instead of answering `422 IDEMPOTENCY_KEY_REUSE`. A
504
- * body without a token fingerprints exactly as before. A MercadoPago refund
505
- * has no stored-response replay: its elevation is consumed before the refund
506
- * claim, so a retry with the same token answers `403 ELEVATION_INVALID`, and
507
- * a retry with a fresh one spends that approval and then meets the refund's
508
- * own state (`409
509
- * MP_ALREADY_REFUNDED` once the payment is exhausted, `409
510
- * MP_REFUND_IN_PROGRESS` while another attempt holds the claim).
503
+ * body without a token fingerprints exactly as before.
511
504
  */
512
505
  interface TerminalElevationAuthorization {
513
506
  elevationToken?: string;
@@ -654,7 +647,7 @@ export declare const PRINT_AGENT_SESSION_TTL_SECONDS: number;
654
647
  export declare const TERMINAL_ENROLMENT_TTL_SECONDS: number;
655
648
  export declare const TERMINAL_PAIRING_CODE_TTL_SECONDS: number;
656
649
  /** Money-out actions whose operator sessions require a different ADMIN-or-higher approver. */
657
- export declare const TERMINAL_ELEVATION_ACTIONS: readonly ["order.deposit-refund", "mercadopago.refund", "shift.refund", "shift.cash-out", "cash.withdrawal", "account.cash-debit"];
650
+ export declare const TERMINAL_ELEVATION_ACTIONS: readonly ["order.deposit-refund", "shift.refund", "shift.cash-out", "cash.withdrawal", "account.cash-debit"];
658
651
  export type TerminalElevationAction = (typeof TERMINAL_ELEVATION_ACTIONS)[number];
659
652
  /**
660
653
  * Existing PIN, validation and idempotency refusals retain their current
package/dist/terminal.js CHANGED
@@ -178,7 +178,6 @@ export const TERMINAL_PAIRING_CODE_TTL_SECONDS = 10 * 60;
178
178
  /** Money-out actions whose operator sessions require a different ADMIN-or-higher approver. */
179
179
  export const TERMINAL_ELEVATION_ACTIONS = [
180
180
  'order.deposit-refund',
181
- 'mercadopago.refund',
182
181
  'shift.refund',
183
182
  'shift.cash-out',
184
183
  'cash.withdrawal',
package/dist/webhook.d.ts CHANGED
@@ -547,8 +547,8 @@ export interface OrderStatusChangedPayload {
547
547
  * REAL moves only (`from !== to`), announced after the write commits, from
548
548
  * every writer that moves the axis on an existing order: the counter tender,
549
549
  * both provider settlement webhooks (Stripe, MercadoPago), the payment link
550
- * (operator, MercadoLibre collection and MercadoPago movements auto-link), the
551
- * payment unlink and the MercadoPago refund. A redelivered settlement, a top-up
550
+ * (operator, MercadoLibre collection and MercadoPago movements auto-link), and the
551
+ * payment unlink. A redelivered settlement, a top-up
552
552
  * that leaves a `partial` order `partial`, and a link that is refused all
553
553
  * announce nothing.
554
554
  *
@@ -556,7 +556,7 @@ export interface OrderStatusChangedPayload {
556
556
  * its first `financialStatus`, which is not a transition; `order.created`
557
557
  * already announces the row.
558
558
  *
559
- * ⚠️ **Downgrades are events too.** An unlink or a refund can move `paid` back
559
+ * ⚠️ **Downgrades are events too.** An unlink can move `paid` back
560
560
  * to `partial` or `pending`; a subscriber that only handles `to: 'paid'` misses
561
561
  * money given back.
562
562
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "platform-types",
3
- "version": "1.10.743",
3
+ "version": "1.10.745",
4
4
  "description": "Shared wire and entity contracts for the platform.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",