platform-types 1.10.760 → 1.10.761

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.
@@ -19,7 +19,7 @@
19
19
  * no operator write can carry it back onto the order.
20
20
  */
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.PAYMENT_ATTEMPT_RESOLUTION_CAUSES = exports.ORDER_NOT_PAYABLE_REASONS = exports.PAYMENT_ATTEMPT_ERROR_CODES = exports.PAYMENT_ATTEMPT_STATES = void 0;
22
+ exports.PAYMENT_HOLD_MINUTES_DEFAULT = exports.PAYMENT_HOLD_MINUTES_MAX = exports.PAYMENT_HOLD_MINUTES_MIN = exports.PAYMENT_ATTEMPT_RESOLUTION_CAUSES = exports.ORDER_NOT_PAYABLE_REASONS = exports.PAYMENT_ATTEMPT_ERROR_CODES = exports.PAYMENT_ATTEMPT_STATES = void 0;
23
23
  /** Every {@link PaymentAttemptState}, in lifecycle order. */
24
24
  exports.PAYMENT_ATTEMPT_STATES = [
25
25
  'created',
@@ -86,3 +86,12 @@ exports.PAYMENT_ATTEMPT_RESOLUTION_CAUSES = [
86
86
  'not-settled',
87
87
  'late-capture',
88
88
  ];
89
+ /**
90
+ * The bounds of the store's payment hold, `ecommerce.config.paymentHoldMinutes`
91
+ * — how long a new attempt stays payable, in whole minutes. Both writers refuse
92
+ * a value outside `[MIN, MAX]` (`400 VALIDATION_FAILED`); the start reads an
93
+ * absent or out-of-range stored value as `DEFAULT`.
94
+ */
95
+ exports.PAYMENT_HOLD_MINUTES_MIN = 15;
96
+ exports.PAYMENT_HOLD_MINUTES_MAX = 1440;
97
+ exports.PAYMENT_HOLD_MINUTES_DEFAULT = 60;
package/dist/payment.d.ts CHANGED
@@ -136,6 +136,18 @@ declare global {
136
136
  externalReference?: string;
137
137
  reconciled?: boolean;
138
138
  reconcileReason?: string;
139
+ /**
140
+ * MercadoPago's own money breakdown, in major units of `currency`: `gross` is
141
+ * `transaction_amount`, `net` is `transaction_details.net_received_amount`
142
+ * (what the store received), and `fee` is what MercadoPago kept
143
+ * (`gross − net`; the collector-paid `fee_details` when MercadoPago states no
144
+ * net). Each is present only when MercadoPago reported it, on MercadoPago
145
+ * payments recorded since these fields existed. Absent means "not recorded",
146
+ * never zero; a `fee` of `0` is a fee-free payment.
147
+ */
148
+ gross?: number;
149
+ fee?: number;
150
+ net?: number;
139
151
  }
140
152
  /**
141
153
  * Confidence tier for a link suggestion.
@@ -34,7 +34,9 @@ declare global {
34
34
  * left as it is and the attempt stays `expired` — not `resolution`, since
35
35
  * that money is not this attempt's.
36
36
  * - `cancelled` — the order was cancelled while the attempt was live.
37
- * - `refunded` — the approved payment was refunded.
37
+ * - `refunded` — the approved payment was refunded. Only from `approved`: a
38
+ * refund on a `resolution` attempt is the operator's resolution work and
39
+ * leaves it `resolution`.
38
40
  * - `charged_back` — the approved payment was charged back.
39
41
  * - `resolution` — money landed that must NOT settle the order: an approval
40
42
  * on an order already paid, on an expired or cancelled order, or for an
@@ -175,4 +177,13 @@ export declare const ORDER_NOT_PAYABLE_REASONS: readonly ["cancelled", "paid", "
175
177
  * expired or been cancelled, or the order was already cancelled.
176
178
  */
177
179
  export declare const PAYMENT_ATTEMPT_RESOLUTION_CAUSES: readonly ["second-approval", "amount-mismatch", "order-mismatch", "order-already-paid", "not-settled", "late-capture"];
180
+ /**
181
+ * The bounds of the store's payment hold, `ecommerce.config.paymentHoldMinutes`
182
+ * — how long a new attempt stays payable, in whole minutes. Both writers refuse
183
+ * a value outside `[MIN, MAX]` (`400 VALIDATION_FAILED`); the start reads an
184
+ * absent or out-of-range stored value as `DEFAULT`.
185
+ */
186
+ export declare const PAYMENT_HOLD_MINUTES_MIN = 15;
187
+ export declare const PAYMENT_HOLD_MINUTES_MAX = 1440;
188
+ export declare const PAYMENT_HOLD_MINUTES_DEFAULT = 60;
178
189
  export {};
@@ -83,3 +83,12 @@ export const PAYMENT_ATTEMPT_RESOLUTION_CAUSES = [
83
83
  'not-settled',
84
84
  'late-capture',
85
85
  ];
86
+ /**
87
+ * The bounds of the store's payment hold, `ecommerce.config.paymentHoldMinutes`
88
+ * — how long a new attempt stays payable, in whole minutes. Both writers refuse
89
+ * a value outside `[MIN, MAX]` (`400 VALIDATION_FAILED`); the start reads an
90
+ * absent or out-of-range stored value as `DEFAULT`.
91
+ */
92
+ export const PAYMENT_HOLD_MINUTES_MIN = 15;
93
+ export const PAYMENT_HOLD_MINUTES_MAX = 1440;
94
+ export const PAYMENT_HOLD_MINUTES_DEFAULT = 60;
package/dist/store.d.ts CHANGED
@@ -146,6 +146,18 @@ declare global {
146
146
  * frame), so the storefront can say the account needs approval.
147
147
  */
148
148
  registrationMode?: 'open' | 'approval';
149
+ /**
150
+ * How long a storefront online payment holds the order, in whole
151
+ * minutes: the payment attempt's `expiresAt` and its Checkout Pro
152
+ * Preference's `expiration_date_to` are this far from the start.
153
+ * An integer from `PAYMENT_HOLD_MINUTES_MIN` (15) to
154
+ * `PAYMENT_HOLD_MINUTES_MAX` (1440); absent means
155
+ * `PAYMENT_HOLD_MINUTES_DEFAULT` (60), and so does a stored value
156
+ * outside that range. Written by `PATCH /store` (ADMIN) and
157
+ * `PUT /platform/stores/{storeId}` (MANAGER). Never sent to shoppers:
158
+ * they see the attempt's `expiresAt` instead.
159
+ */
160
+ paymentHoldMinutes?: number;
149
161
  showStocks?: boolean;
150
162
  };
151
163
  sidebar?: {
@@ -188,7 +200,7 @@ declare global {
188
200
  * data: { field: 'ecommerce.config.newCustomerPriceList', value: number }; nothing written.
189
201
  */
190
202
  interface EcommercePatchInput {
191
- config?: Pick<NonNullable<Ecommerce['config']>, 'showDefaultPriceList' | 'newCustomerPriceList' | 'registrationMode'> & StorefrontLiveSettingsPatch;
203
+ config?: Pick<NonNullable<Ecommerce['config']>, 'showDefaultPriceList' | 'newCustomerPriceList' | 'registrationMode' | 'paymentHoldMinutes'> & StorefrontLiveSettingsPatch;
192
204
  sidebar?: Ecommerce['sidebar'];
193
205
  home?: Omit<NonNullable<Ecommerce['home']>, 'displayOrders' | 'displayProfile'>;
194
206
  themeColors?: Ecommerce['themeColors'];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "platform-types",
3
- "version": "1.10.760",
3
+ "version": "1.10.761",
4
4
  "description": "Shared wire and entity contracts for the platform.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",