@fun-xyz/fiat-contract 0.15.0 → 0.16.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/README.md +3 -0
- package/dist/{chunk-CXYGWKAG.mjs → chunk-PEJOU52N.mjs} +2 -2
- package/dist/index.js +8 -3
- package/dist/index.mjs +8 -3
- package/dist/table.js +1 -1
- package/dist/table.mjs +1 -1
- package/dist/types.d.ts +5 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -85,6 +85,9 @@ this package is [ENG-5268](https://linear.app/funxyz/issue/ENG-5268).
|
|
|
85
85
|
is present, and PAY must never be exposed without real current economics.
|
|
86
86
|
15. **KYC may precede pricing.** Provider auth or activation may legitimately defer pricing, so a
|
|
87
87
|
KYC state may omit `quote`. A real `Quote` still requires `quoteRef`, and PAY is never quote-less.
|
|
88
|
+
16. **Correction text never decides retry.** A correctable provider rejection returns
|
|
89
|
+
`KYC{CAPTURE}` and may carry `correctionReason` for display. Clients decide that retry is allowed
|
|
90
|
+
from the state and its transitions; provider-authored text is never a branch key.
|
|
88
91
|
|
|
89
92
|
## KYC SDK hints, results, and client delivery
|
|
90
93
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// package.json
|
|
2
|
-
var version = "0.
|
|
2
|
+
var version = "0.16.0";
|
|
3
3
|
|
|
4
4
|
// src/table.ts
|
|
5
5
|
var TABLE_VERSION = version;
|
|
@@ -514,4 +514,4 @@ export {
|
|
|
514
514
|
tableEntry,
|
|
515
515
|
isTerminal
|
|
516
516
|
};
|
|
517
|
-
//# sourceMappingURL=chunk-
|
|
517
|
+
//# sourceMappingURL=chunk-PEJOU52N.mjs.map
|
package/dist/index.js
CHANGED
|
@@ -841,6 +841,7 @@ var $kycCaptureState = obj({
|
|
|
841
841
|
phase: import_zod.z.literal("CAPTURE"),
|
|
842
842
|
quote: $quote.optional(),
|
|
843
843
|
surface: $surface,
|
|
844
|
+
correctionReason: import_zod.z.string().min(1).max(1024).optional(),
|
|
844
845
|
error: $failureReason.optional()
|
|
845
846
|
});
|
|
846
847
|
var KycCaptureStateSchema = $kycCaptureState;
|
|
@@ -960,7 +961,7 @@ var $stepResponse = import_zod.z.union([$providerBoundStepResponse, $blockedStep
|
|
|
960
961
|
var FiatStepResponseSchema = $stepResponse;
|
|
961
962
|
|
|
962
963
|
// package.json
|
|
963
|
-
var version = "0.
|
|
964
|
+
var version = "0.16.0";
|
|
964
965
|
|
|
965
966
|
// src/table.ts
|
|
966
967
|
var TABLE_VERSION = version;
|
|
@@ -1790,7 +1791,8 @@ var FIXTURE_DATA = {
|
|
|
1790
1791
|
}
|
|
1791
1792
|
},
|
|
1792
1793
|
"expiresAt": "\u2026"
|
|
1793
|
-
}
|
|
1794
|
+
},
|
|
1795
|
+
"correctionReason": "The image is too blurry. Upload a clearer photo of this document."
|
|
1794
1796
|
},
|
|
1795
1797
|
"provider": "TRANSAK",
|
|
1796
1798
|
"transitions": [
|
|
@@ -2254,7 +2256,10 @@ var FIXTURES = [
|
|
|
2254
2256
|
docRef: "Fiat KYC \xB7 embedded Sumsub WebSDK",
|
|
2255
2257
|
screen: 8,
|
|
2256
2258
|
stateKey: "KYC/CAPTURE",
|
|
2257
|
-
notes: [
|
|
2259
|
+
notes: [
|
|
2260
|
+
"The client mounts the Sumsub adapter; no URL or iframe is emitted.",
|
|
2261
|
+
"A retry may carry provider-authored correctionReason display text; clients never branch on it."
|
|
2262
|
+
]
|
|
2258
2263
|
},
|
|
2259
2264
|
{
|
|
2260
2265
|
id: "screen-09-kyc-in-review",
|
package/dist/index.mjs
CHANGED
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
tableEntry,
|
|
13
13
|
unofferedEndpoints,
|
|
14
14
|
unreachableStates
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-PEJOU52N.mjs";
|
|
16
16
|
|
|
17
17
|
// src/codes.ts
|
|
18
18
|
var US_STATE_CODES = [
|
|
@@ -738,6 +738,7 @@ var $kycCaptureState = obj({
|
|
|
738
738
|
phase: z.literal("CAPTURE"),
|
|
739
739
|
quote: $quote.optional(),
|
|
740
740
|
surface: $surface,
|
|
741
|
+
correctionReason: z.string().min(1).max(1024).optional(),
|
|
741
742
|
error: $failureReason.optional()
|
|
742
743
|
});
|
|
743
744
|
var KycCaptureStateSchema = $kycCaptureState;
|
|
@@ -1185,7 +1186,8 @@ var FIXTURE_DATA = {
|
|
|
1185
1186
|
}
|
|
1186
1187
|
},
|
|
1187
1188
|
"expiresAt": "\u2026"
|
|
1188
|
-
}
|
|
1189
|
+
},
|
|
1190
|
+
"correctionReason": "The image is too blurry. Upload a clearer photo of this document."
|
|
1189
1191
|
},
|
|
1190
1192
|
"provider": "TRANSAK",
|
|
1191
1193
|
"transitions": [
|
|
@@ -1649,7 +1651,10 @@ var FIXTURES = [
|
|
|
1649
1651
|
docRef: "Fiat KYC \xB7 embedded Sumsub WebSDK",
|
|
1650
1652
|
screen: 8,
|
|
1651
1653
|
stateKey: "KYC/CAPTURE",
|
|
1652
|
-
notes: [
|
|
1654
|
+
notes: [
|
|
1655
|
+
"The client mounts the Sumsub adapter; no URL or iframe is emitted.",
|
|
1656
|
+
"A retry may carry provider-authored correctionReason display text; clients never branch on it."
|
|
1657
|
+
]
|
|
1653
1658
|
},
|
|
1654
1659
|
{
|
|
1655
1660
|
id: "screen-09-kyc-in-review",
|
package/dist/table.js
CHANGED
package/dist/table.mjs
CHANGED
package/dist/types.d.ts
CHANGED
|
@@ -553,6 +553,11 @@ export type FlowState =
|
|
|
553
553
|
phase: 'CAPTURE';
|
|
554
554
|
quote?: Quote;
|
|
555
555
|
surface: Surface;
|
|
556
|
+
/**
|
|
557
|
+
* Provider-authored guidance for correcting the previous verification attempt. Display-only:
|
|
558
|
+
* clients must use the state and transitions, never this text, to decide whether retry is allowed.
|
|
559
|
+
*/
|
|
560
|
+
correctionReason?: string;
|
|
556
561
|
error?: FailureReason;
|
|
557
562
|
} | {
|
|
558
563
|
kind: 'KYC';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fun-xyz/fiat-contract",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"description": "Published conformance contract for Fun's headless fiat onramp: FlowState/Transition types, zod schemas, the transition table as data, recorded fixtures, assertion helpers.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|