@fun-xyz/fiat-contract 0.20.0 → 0.20.1
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 +1 -1
- package/dist/{chunk-TV6IWKTB.mjs → chunk-544S4IEU.mjs} +2 -2
- package/dist/{chunk-QXJ54JWX.mjs → chunk-WRRCWAY2.mjs} +1 -1
- package/dist/index.js +2 -2
- package/dist/index.mjs +3 -3
- package/dist/table.js +1 -1
- package/dist/table.mjs +1 -1
- package/dist/terms.d.ts +2 -1
- package/dist/terms.mjs +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -112,7 +112,7 @@ offers transitions, and a `terms` entry that is not a unique `CHECKOUT` document
|
|
|
112
112
|
`{ provider, acceptances: [{ documentId, version, contentDigest, acceptedAt }] }`, each document at
|
|
113
113
|
most once; `FiatTermsResponse` is `{ recorded }`, the recorded document ids. A fault is a
|
|
114
114
|
`FiatTermsErrorBody`: the shared `errorCode`, `errorMsg` and `reqId`, plus `reason` (`STALE_TERMS`,
|
|
115
|
-
`IN_PROGRESS`, `IDEMPOTENCY_KEY_REUSED`, `INVALID_REQUEST`, `RATE_LIMITED`) and `recovery`.
|
|
115
|
+
`IN_PROGRESS`, `IDEMPOTENCY_KEY_REUSED`, `INVALID_REQUEST`, `RATE_LIMITED`, `PROVIDER_UNAVAILABLE`) and `recovery`.
|
|
116
116
|
|
|
117
117
|
**MoonPay (`./moonpay`).** One route, `MOONPAY_ENDPOINTS.intent`. A `MoonPayIntentRequest` is one of
|
|
118
118
|
three kinds:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// package.json
|
|
2
|
-
var version = "0.20.
|
|
2
|
+
var version = "0.20.1";
|
|
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-544S4IEU.mjs.map
|
package/dist/index.js
CHANGED
|
@@ -1001,7 +1001,7 @@ var $termsErrorBody = obj({
|
|
|
1001
1001
|
errorCode: $nonBlank,
|
|
1002
1002
|
errorMsg: import_zod.z.string(),
|
|
1003
1003
|
reqId: import_zod.z.string().optional(),
|
|
1004
|
-
reason: import_zod.z.enum(["STALE_TERMS", "IN_PROGRESS", "IDEMPOTENCY_KEY_REUSED", "INVALID_REQUEST", "RATE_LIMITED"]),
|
|
1004
|
+
reason: import_zod.z.enum(["STALE_TERMS", "IN_PROGRESS", "IDEMPOTENCY_KEY_REUSED", "INVALID_REQUEST", "RATE_LIMITED", "PROVIDER_UNAVAILABLE"]),
|
|
1005
1005
|
recovery: import_zod.z.enum(["RETRY", "REQUOTE", "NONE"])
|
|
1006
1006
|
});
|
|
1007
1007
|
var FiatTermsErrorBodySchema = $termsErrorBody;
|
|
@@ -1064,7 +1064,7 @@ var $stepResponse = import_zod.z.union([$providerBoundStepResponse, $blockedStep
|
|
|
1064
1064
|
var FiatStepResponseSchema = $stepResponse;
|
|
1065
1065
|
|
|
1066
1066
|
// package.json
|
|
1067
|
-
var version = "0.20.
|
|
1067
|
+
var version = "0.20.1";
|
|
1068
1068
|
|
|
1069
1069
|
// src/table.ts
|
|
1070
1070
|
var TABLE_VERSION = version;
|
package/dist/index.mjs
CHANGED
|
@@ -12,13 +12,13 @@ import {
|
|
|
12
12
|
tableEntry,
|
|
13
13
|
unofferedEndpoints,
|
|
14
14
|
unreachableStates
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-544S4IEU.mjs";
|
|
16
16
|
import {
|
|
17
17
|
MOONPAY_ENDPOINTS
|
|
18
18
|
} from "./chunk-UN3WTIMI.mjs";
|
|
19
19
|
import {
|
|
20
20
|
FIAT_TERMS_ENDPOINT
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-WRRCWAY2.mjs";
|
|
22
22
|
|
|
23
23
|
// src/codes.ts
|
|
24
24
|
var US_STATE_CODES = [
|
|
@@ -888,7 +888,7 @@ var $termsErrorBody = obj({
|
|
|
888
888
|
errorCode: $nonBlank,
|
|
889
889
|
errorMsg: z.string(),
|
|
890
890
|
reqId: z.string().optional(),
|
|
891
|
-
reason: z.enum(["STALE_TERMS", "IN_PROGRESS", "IDEMPOTENCY_KEY_REUSED", "INVALID_REQUEST", "RATE_LIMITED"]),
|
|
891
|
+
reason: z.enum(["STALE_TERMS", "IN_PROGRESS", "IDEMPOTENCY_KEY_REUSED", "INVALID_REQUEST", "RATE_LIMITED", "PROVIDER_UNAVAILABLE"]),
|
|
892
892
|
recovery: z.enum(["RETRY", "REQUOTE", "NONE"])
|
|
893
893
|
});
|
|
894
894
|
var FiatTermsErrorBodySchema = $termsErrorBody;
|
package/dist/table.js
CHANGED
package/dist/table.mjs
CHANGED
package/dist/terms.d.ts
CHANGED
|
@@ -49,8 +49,9 @@ export interface FiatTermsResponse {
|
|
|
49
49
|
* fetches the documents again. `IN_PROGRESS`: the same key is still running (409).
|
|
50
50
|
* `IDEMPOTENCY_KEY_REUSED`: the same key with a different body (422). `INVALID_REQUEST`: a bad body
|
|
51
51
|
* or a missing key (400). `RATE_LIMITED`: the per-login terms budget is spent (429).
|
|
52
|
+
* `PROVIDER_UNAVAILABLE`: the KYC service or a store is down (503); nothing is recorded, so retry.
|
|
52
53
|
*/
|
|
53
|
-
export type FiatTermsFaultReason = 'STALE_TERMS' | 'IN_PROGRESS' | 'IDEMPOTENCY_KEY_REUSED' | 'INVALID_REQUEST' | 'RATE_LIMITED';
|
|
54
|
+
export type FiatTermsFaultReason = 'STALE_TERMS' | 'IN_PROGRESS' | 'IDEMPOTENCY_KEY_REUSED' | 'INVALID_REQUEST' | 'RATE_LIMITED' | 'PROVIDER_UNAVAILABLE';
|
|
54
55
|
/** `RETRY` sends the same request, with the same key. `REQUOTE` goes back to `POST /fiat/quote`. `NONE` ends the flow. */
|
|
55
56
|
export type FiatTermsRecovery = 'RETRY' | 'REQUOTE' | 'NONE';
|
|
56
57
|
/** The 4xx/5xx body of `POST /fiat/terms`: the shared error body plus `reason` and `recovery`. */
|
package/dist/terms.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fun-xyz/fiat-contract",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.1",
|
|
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": {
|