@marianmeres/collection-types 2.12.0 → 2.14.0

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.
Files changed (2) hide show
  1. package/dist/payment.d.ts +11 -0
  2. package/package.json +1 -1
package/dist/payment.d.ts CHANGED
@@ -19,6 +19,17 @@ export interface PaymentData {
19
19
  status: PaymentStatus;
20
20
  /** Payment amount */
21
21
  amount: number;
22
+ /**
23
+ * Cumulative amount refunded so far, in the same units as {@link amount}.
24
+ * Absent or `0` = nothing refunded.
25
+ *
26
+ * A value **below** `amount` is a PARTIAL refund, and `status` deliberately
27
+ * stays `"completed"` in that case — a partially refunded payment is still a
28
+ * completed one. So `status === "refunded"` answers "was ALL of it
29
+ * returned?", and this field answers "was ANY of it returned?". Reading the
30
+ * former as the latter is wrong the moment a partial refund happens.
31
+ */
32
+ refunded_amount?: number;
22
33
  /** Currency code */
23
34
  currency: string;
24
35
  /** Provider-specific reference ID */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marianmeres/collection-types",
3
- "version": "2.12.0",
3
+ "version": "2.14.0",
4
4
  "type": "module",
5
5
  "main": "dist/mod.js",
6
6
  "types": "dist/mod.d.ts",