@peable.to/shared-types 0.12.0 → 0.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.
- package/dist/cjs/dispute.js +76 -0
- package/dist/cjs/file.js +44 -0
- package/dist/cjs/index.js +22 -1
- package/dist/cjs/money.js +36 -4
- package/dist/cjs/paymentMethodConfiguration.js +54 -0
- package/dist/cjs/requestLog.js +18 -0
- package/dist/cjs/testHelpers.js +21 -0
- package/dist/esm/dispute.js +74 -1
- package/dist/esm/file.js +41 -0
- package/dist/esm/index.js +6 -1
- package/dist/esm/money.js +35 -3
- package/dist/esm/paymentMethodConfiguration.js +51 -0
- package/dist/esm/requestLog.js +15 -0
- package/dist/esm/testHelpers.js +18 -0
- package/dist/types/dispute.d.ts +106 -99
- package/dist/types/event.d.ts +8 -2
- package/dist/types/file.d.ts +78 -0
- package/dist/types/index.d.ts +6 -2
- package/dist/types/merchant.d.ts +7 -0
- package/dist/types/merchantDisplay.d.ts +2 -0
- package/dist/types/money.d.ts +11 -3
- package/dist/types/paymentIntent.d.ts +22 -3
- package/dist/types/paymentMethodConfiguration.d.ts +116 -0
- package/dist/types/requestLog.d.ts +40 -0
- package/dist/types/testHelpers.d.ts +23 -0
- package/package.json +1 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Test helpers (`/v1/test_helpers/*`) — test mode only.
|
|
3
|
+
*
|
|
4
|
+
* They drive a test-mode object through the SAME state machine a real payment
|
|
5
|
+
* moves through, so a merchant can exercise their integration end to end
|
|
6
|
+
* without a wallet or a card: every transition a helper makes is one the
|
|
7
|
+
* gateway would make, with the same events and webhooks.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* What `simulate_faircoin_payment` pretends the payer did.
|
|
11
|
+
*
|
|
12
|
+
* - `settled` — paid the full amount, which is then seen in the mempool and
|
|
13
|
+
* confirmed: `broadcast → confirming → settled`
|
|
14
|
+
* (`payment_intent.confirming`, then `payment_intent.settled`).
|
|
15
|
+
* - `underpaid` — sent less than the amount: `broadcast → failed`
|
|
16
|
+
* (`payment_intent.failed`).
|
|
17
|
+
*/
|
|
18
|
+
export declare const SIMULATED_FAIRCOIN_OUTCOMES: readonly ["settled", "underpaid"];
|
|
19
|
+
export type SimulatedFaircoinOutcome = (typeof SIMULATED_FAIRCOIN_OUTCOMES)[number];
|
|
20
|
+
export interface SimulateFaircoinPaymentParams {
|
|
21
|
+
/** Default `settled`. */
|
|
22
|
+
outcome?: SimulatedFaircoinOutcome;
|
|
23
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@peable.to/shared-types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "Shared TypeScript types for the Peable Gateway — the wire contract shared by the backend, SDK, and frontend.",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|