platform-types 1.10.744 → 1.10.746
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 +1 -1
- package/dist/cjs/terminal.js +0 -1
- package/dist/mercadopago.d.ts +0 -4
- package/dist/order.d.ts +1 -1
- package/dist/platform.d.ts +7 -1
- package/dist/store.d.ts +2 -0
- package/dist/terminal.d.ts +3 -10
- package/dist/terminal.js +0 -1
- package/dist/webhook.d.ts +3 -3
- package/package.json +1 -1
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
|
-
/**
|
|
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/cjs/terminal.js
CHANGED
|
@@ -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/mercadopago.d.ts
CHANGED
|
@@ -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
|
package/dist/platform.d.ts
CHANGED
|
@@ -449,7 +449,13 @@ export interface TenantHealthEnvelope {
|
|
|
449
449
|
certBand: CertBand | null;
|
|
450
450
|
};
|
|
451
451
|
integrations: {
|
|
452
|
-
/**
|
|
452
|
+
/**
|
|
453
|
+
* Presence and expiry ONLY — never the OAuth tokens. Read from the nested
|
|
454
|
+
* `integrations.mercadopago` leaf only, never the legacy flat blob.
|
|
455
|
+
* `connected` means linked: a `userId` is present and the automatic
|
|
456
|
+
* revocation has not stamped `disconnectedAt`. It stays `true` after
|
|
457
|
+
* `oauthExpiresAt` passes — that epoch is what grades a lapsing grant.
|
|
458
|
+
*/
|
|
453
459
|
mercadopago: {
|
|
454
460
|
connected: boolean;
|
|
455
461
|
oauthExpiresAt: number | null;
|
package/dist/store.d.ts
CHANGED
|
@@ -1288,7 +1288,9 @@ declare global {
|
|
|
1288
1288
|
liveMode?: boolean;
|
|
1289
1289
|
/** @deprecated Never populated: the OAuth callback drops the token response's `public_key` and no other writer exists (sanitizers deliberately treat it as non-secret, but nothing writes it). */
|
|
1290
1290
|
publicKey?: string;
|
|
1291
|
+
/** @deprecated Never populated: no writer stamps it. Derive the connection from `userId`, `disconnectedAt` and `expiresAt`. */
|
|
1291
1292
|
status?: MercadopagoConnectionStatus;
|
|
1293
|
+
/** unix ms; set by the automatic revocation, which keeps `userId`. The tenant disconnect removes the whole leaf instead. */
|
|
1292
1294
|
disconnectedAt?: number;
|
|
1293
1295
|
lastTokenRefreshAt?: number;
|
|
1294
1296
|
tokenRefreshFailures?: number;
|
package/dist/terminal.d.ts
CHANGED
|
@@ -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
|
|
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.
|
|
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", "
|
|
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
|
|
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
|
|
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
|
*
|