platform-types 1.10.748 → 1.10.750
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/cjs/store.js +2 -1
- package/dist/order.d.ts +12 -15
- package/dist/payment.d.ts +35 -0
- package/dist/store.d.ts +27 -3
- package/dist/store.js +2 -1
- package/package.json +1 -1
package/dist/cjs/store.js
CHANGED
|
@@ -20,7 +20,8 @@ exports.CUSTOM_DOMAIN_SLOT_LIMIT = 2;
|
|
|
20
20
|
exports.CUSTOM_DOMAIN_ROW_LIMIT = 10;
|
|
21
21
|
/**
|
|
22
22
|
* Every `StoreOnboardingReviewArea` — the ONE list. `PATCH /store` validates
|
|
23
|
-
* `config.onboarding.reviewed` against it, so an
|
|
23
|
+
* both `config.onboarding.reviewed` and `onboardingReviewAdd` against it, so an
|
|
24
|
+
* area is added in one place.
|
|
24
25
|
*/
|
|
25
26
|
exports.STORE_ONBOARDING_REVIEW_AREAS = ['payments', 'delivery', 'pricing'];
|
|
26
27
|
/**
|
package/dist/order.d.ts
CHANGED
|
@@ -1641,24 +1641,21 @@ declare global {
|
|
|
1641
1641
|
interface LinkedPaymentEntry {
|
|
1642
1642
|
source: 'mp' | 'stripe' | 'mp_movement';
|
|
1643
1643
|
/**
|
|
1644
|
-
* The amount this
|
|
1645
|
-
* — **not** the amount originally settled. It is what
|
|
1644
|
+
* The amount this payment counts toward the order. It is what
|
|
1646
1645
|
* `deriveOrderFinancialAxis` sums, so it has to mean money the order can
|
|
1647
1646
|
* still count.
|
|
1648
1647
|
*
|
|
1649
|
-
* ⚠️
|
|
1650
|
-
*
|
|
1651
|
-
*
|
|
1652
|
-
*
|
|
1653
|
-
*
|
|
1654
|
-
*
|
|
1655
|
-
*
|
|
1656
|
-
*
|
|
1657
|
-
*
|
|
1658
|
-
*
|
|
1659
|
-
*
|
|
1660
|
-
* A consumer reconciling against provider refund history will find those
|
|
1661
|
-
* rows disagree, and the disagreement is the back catalogue, not a bug.
|
|
1648
|
+
* ⚠️ **No writer shrinks it on a refund.** A refund or settled chargeback
|
|
1649
|
+
* MercadoPago reports later is detected and recorded on the payment's
|
|
1650
|
+
* status observation, never here: the entry keeps its linked figure until
|
|
1651
|
+
* the operator mirrors the refund by hand (an unlink removes the entry).
|
|
1652
|
+
* Entries on HISTORICAL orders may carry a smaller figure (or be gone):
|
|
1653
|
+
* the removed outbound MercadoPago refund lowered a partially refunded
|
|
1654
|
+
* entry to its un-refunded remainder and removed an exhausted one, and
|
|
1655
|
+
* those rows keep what it wrote. Entries written before that refund
|
|
1656
|
+
* existed carry their pre-refund figure; nothing is backfilled either way,
|
|
1657
|
+
* so a consumer reconciling against provider refund history will find
|
|
1658
|
+
* rows that disagree, and the disagreement is the back catalogue, not a bug.
|
|
1662
1659
|
*
|
|
1663
1660
|
* ⚠️ Denominated in `currency` below — the PAYMENT's denomination, not the
|
|
1664
1661
|
* order's. Never sum this field across entries without converting.
|
package/dist/payment.d.ts
CHANGED
|
@@ -35,6 +35,41 @@ declare global {
|
|
|
35
35
|
source: PaymentReceivedSource;
|
|
36
36
|
paidAt: number;
|
|
37
37
|
};
|
|
38
|
+
/**
|
|
39
|
+
* MercadoPago's CUMULATIVE refunded amount for this payment, in its own currency
|
|
40
|
+
* (`transaction_amount_refunded`, else the sum of `refunds[]` with status
|
|
41
|
+
* `approved`; never less than the full `amount` on `providerStatus: 'refunded'`). Written by
|
|
42
|
+
* the payment status service (`mercadopagoPaymentStatus.ts`) on every observation
|
|
43
|
+
* — the webhook and the poller's re-check alike. Absent means none observed, never
|
|
44
|
+
* an unknown. Present ⇒ a link refuses the payment (`LINK_LOCKED` `refunded-payment`).
|
|
45
|
+
*/
|
|
46
|
+
refundedAmount?: number;
|
|
47
|
+
/**
|
|
48
|
+
* MercadoPago's `refunds[]` as last observed, same writer: `id` is MercadoPago's
|
|
49
|
+
* numeric refund id as a string, `amount` in the payment's currency, `status` as
|
|
50
|
+
* MercadoPago states it (`approved` once the money moved, `in_process` before), and
|
|
51
|
+
* `at` its `date_created` in epoch ms. Absent when MercadoPago listed none.
|
|
52
|
+
*/
|
|
53
|
+
refunds?: {
|
|
54
|
+
id: string;
|
|
55
|
+
amount: number;
|
|
56
|
+
status: string;
|
|
57
|
+
at: number;
|
|
58
|
+
}[];
|
|
59
|
+
/**
|
|
60
|
+
* A dispute on the payment, same writer: present while `providerStatus` is
|
|
61
|
+
* `charged_back` or `in_mediation`. A later observation that shows neither clears it,
|
|
62
|
+
* except a SETTLED chargeback, which is kept through a later `approved`. On
|
|
63
|
+
* `charged_back`, `statusDetail` says what happened to the money: `settled` (taken for
|
|
64
|
+
* the full amount — reported for the operator to mirror by hand; the books are not
|
|
65
|
+
* changed), `reimbursed` (MercadoPago covered the seller) or `in_process` (still
|
|
66
|
+
* open). Any other detail, and a mediation, reads as still open. Present ⇒ a link
|
|
67
|
+
* refuses the payment.
|
|
68
|
+
*/
|
|
69
|
+
chargeback?: {
|
|
70
|
+
status: string;
|
|
71
|
+
statusDetail?: string;
|
|
72
|
+
};
|
|
38
73
|
}
|
|
39
74
|
/** GET /payments/pending returns this page inside the standard data envelope. */
|
|
40
75
|
interface MpPaymentObservationPage {
|
package/dist/store.d.ts
CHANGED
|
@@ -875,8 +875,14 @@ declare global {
|
|
|
875
875
|
* Guided-setup onboarding progress (ADR-0020). First-login is derived
|
|
876
876
|
* FE-side (absent, or neither `completed` nor `skipped` ⇒ show wizard).
|
|
877
877
|
* `reviewed` lists the seeded setup areas the admin confirmed with «Ya
|
|
878
|
-
* lo revisé»; absent ⇒ none reviewed.
|
|
879
|
-
*
|
|
878
|
+
* lo revisé»; absent ⇒ none reviewed. No `PATCH /store` removes a mark: a
|
|
879
|
+
* body carrying this block writes `step` / `completed` / `skipped` as sent
|
|
880
|
+
* (member by member onto a stored block) and never SETs `reviewed` — each
|
|
881
|
+
* incoming area is appended conditionally after that write, so the result
|
|
882
|
+
* is the stored list followed by every new area, a block sent without
|
|
883
|
+
* `reviewed` keeps the stored list, and a mark another browser lands while
|
|
884
|
+
* the request is in flight survives. To ADD a mark without sending the
|
|
885
|
+
* block, use `StoreUpdateInput.onboardingReviewAdd`.
|
|
880
886
|
*/
|
|
881
887
|
onboarding?: {
|
|
882
888
|
step: number;
|
|
@@ -1686,6 +1692,23 @@ declare global {
|
|
|
1686
1692
|
newPhotoURL?: string;
|
|
1687
1693
|
/** Leaves to REMOVE from the row — see `StoreRemovableField`. */
|
|
1688
1694
|
removeFields?: StoreRemovableField[];
|
|
1695
|
+
/**
|
|
1696
|
+
* `PATCH /store` only (the closed `POST /store` body refuses it 400). Adds
|
|
1697
|
+
* each area to `config.onboarding.reviewed` with its own conditional
|
|
1698
|
+
* append on the store row — no read-modify-write — so two browsers marking
|
|
1699
|
+
* different areas at once both persist, and an area already present is a
|
|
1700
|
+
* no-op. At least one area; repeats collapse; any value outside
|
|
1701
|
+
* `STORE_ONBOARDING_REVIEW_AREAS` is a 400 with nothing written. A store
|
|
1702
|
+
* with no `config.onboarding` gets `{ step: 0, completed: false, skipped:
|
|
1703
|
+
* false }` plus the added areas, which the wizard reads as absence did.
|
|
1704
|
+
* Writable by every role that may write `config.onboarding` (USER
|
|
1705
|
+
* included). Applied AFTER the rest of the same body, together with any
|
|
1706
|
+
* areas in a `config.onboarding.reviewed` sent alongside it (that list's
|
|
1707
|
+
* first); the block itself never SETs the list, so it cannot drop an area.
|
|
1708
|
+
* The main write committing and an append then failing answers an error but
|
|
1709
|
+
* still broadcasts the row as it stands.
|
|
1710
|
+
*/
|
|
1711
|
+
onboardingReviewAdd?: StoreOnboardingReviewArea[];
|
|
1689
1712
|
}
|
|
1690
1713
|
interface Method {
|
|
1691
1714
|
id: number;
|
|
@@ -2117,7 +2140,8 @@ export declare const CUSTOM_DOMAIN_SLOT_LIMIT = 2;
|
|
|
2117
2140
|
export declare const CUSTOM_DOMAIN_ROW_LIMIT = 10;
|
|
2118
2141
|
/**
|
|
2119
2142
|
* Every `StoreOnboardingReviewArea` — the ONE list. `PATCH /store` validates
|
|
2120
|
-
* `config.onboarding.reviewed` against it, so an
|
|
2143
|
+
* both `config.onboarding.reviewed` and `onboardingReviewAdd` against it, so an
|
|
2144
|
+
* area is added in one place.
|
|
2121
2145
|
*/
|
|
2122
2146
|
export declare const STORE_ONBOARDING_REVIEW_AREAS: readonly ["payments", "delivery", "pricing"];
|
|
2123
2147
|
/**
|
package/dist/store.js
CHANGED
|
@@ -17,7 +17,8 @@ export const CUSTOM_DOMAIN_SLOT_LIMIT = 2;
|
|
|
17
17
|
export const CUSTOM_DOMAIN_ROW_LIMIT = 10;
|
|
18
18
|
/**
|
|
19
19
|
* Every `StoreOnboardingReviewArea` — the ONE list. `PATCH /store` validates
|
|
20
|
-
* `config.onboarding.reviewed` against it, so an
|
|
20
|
+
* both `config.onboarding.reviewed` and `onboardingReviewAdd` against it, so an
|
|
21
|
+
* area is added in one place.
|
|
21
22
|
*/
|
|
22
23
|
export const STORE_ONBOARDING_REVIEW_AREAS = ['payments', 'delivery', 'pricing'];
|
|
23
24
|
/**
|