@fanfare-io/fanfare-sdk-contracts 0.12.0 → 0.13.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/auction.d.ts +1 -0
- package/dist/auction.js +18 -14
- package/dist/errors.d.ts +16 -0
- package/dist/errors.js +9 -1
- package/package.json +1 -1
package/dist/auction.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export declare const AuctionBidderStateResponseSchema: v.LooseObjectSchema<{
|
|
|
6
6
|
readonly winningBidAmount: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
|
|
7
7
|
readonly bidCount: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
8
8
|
readonly admissionGrant: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
9
|
+
readonly degraded: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
9
10
|
}, undefined>;
|
|
10
11
|
export type AuctionBidderStateResponse = InferOutput<typeof AuctionBidderStateResponseSchema>;
|
|
11
12
|
export declare const AuctionHighestBidResponseSchema: v.LooseObjectSchema<{
|
package/dist/auction.js
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
const
|
|
3
|
-
status:
|
|
4
|
-
lastBidAmount:
|
|
5
|
-
winningBidAmount:
|
|
6
|
-
bidCount:
|
|
7
|
-
admissionGrant:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}),
|
|
1
|
+
import * as o from "valibot";
|
|
2
|
+
const e = o.string(), t = o.pipe(e, o.regex(/^\d{1,12}(\.\d{1,8})?$/)), n = o.picklist(["NOT_BID", "BIDDING", "WINNING", "OUTBID", "WON", "LOST"]), s = o.looseObject({
|
|
3
|
+
status: n,
|
|
4
|
+
lastBidAmount: o.nullish(t),
|
|
5
|
+
winningBidAmount: o.optional(t),
|
|
6
|
+
bidCount: o.optional(o.number()),
|
|
7
|
+
admissionGrant: o.optional(e),
|
|
8
|
+
// The bid is committed, but a post-commit effect (event fan-out, credential mint) did not
|
|
9
|
+
// complete on this request. The standing is authoritative; a later status read reconciles
|
|
10
|
+
// whatever the effect would have projected.
|
|
11
|
+
degraded: o.optional(o.boolean())
|
|
12
|
+
}), a = o.looseObject({
|
|
13
|
+
amount: t
|
|
14
|
+
}), i = o.looseObject({
|
|
15
|
+
amount: t,
|
|
16
|
+
timestamp: e,
|
|
17
|
+
isHighest: o.boolean()
|
|
18
|
+
}), c = o.array(i);
|
|
15
19
|
export {
|
|
16
20
|
i as AuctionBidHistoryItemResponseSchema,
|
|
17
21
|
c as AuctionBidHistoryResponseSchema,
|
package/dist/errors.d.ts
CHANGED
|
@@ -50,6 +50,12 @@ export declare const FingerprintErrorCodes: {
|
|
|
50
50
|
export declare const DistributionErrorCodes: {
|
|
51
51
|
readonly DISTRIBUTION_NOT_OPEN: "DISTRIBUTION_NOT_OPEN";
|
|
52
52
|
readonly DISTRIBUTION_CLOSED: "DISTRIBUTION_CLOSED";
|
|
53
|
+
/**
|
|
54
|
+
* An operator deactivated this distribution, ending it ahead of its own schedule.
|
|
55
|
+
* Distinct from `DISTRIBUTION_CLOSED`, which is a distribution that ran its course:
|
|
56
|
+
* both are terminal, but only this one means a human took the drop down.
|
|
57
|
+
*/
|
|
58
|
+
readonly DISTRIBUTION_DEACTIVATED: "DISTRIBUTION_DEACTIVATED";
|
|
53
59
|
readonly DISTRIBUTION_FULL: "DISTRIBUTION_FULL";
|
|
54
60
|
readonly DISTRIBUTION_ORDER_LIMIT: "DISTRIBUTION_ORDER_LIMIT";
|
|
55
61
|
};
|
|
@@ -59,6 +65,8 @@ export declare const AdmissionErrorCodes: {
|
|
|
59
65
|
readonly ADMISSION_GRANT_INVALID: "ADMISSION_GRANT_INVALID";
|
|
60
66
|
readonly ADMISSION_ORIGINAL_ENTRY_REQUIRED: "ADMISSION_ORIGINAL_ENTRY_REQUIRED";
|
|
61
67
|
readonly ADMISSION_KEY_MISMATCH: "ADMISSION_KEY_MISMATCH";
|
|
68
|
+
/** A live admission is already held, so the requested operation is refused in its favour. */
|
|
69
|
+
readonly ADMISSION_ACTIVE: "ADMISSION_ACTIVE";
|
|
62
70
|
};
|
|
63
71
|
export declare const BotChallengeErrorCodes: {
|
|
64
72
|
readonly BOT_CHALLENGE_INVALID: "BOT_CHALLENGE_INVALID";
|
|
@@ -126,8 +134,16 @@ export declare const ErrorCodeMap: {
|
|
|
126
134
|
readonly ADMISSION_GRANT_INVALID: "ADMISSION_GRANT_INVALID";
|
|
127
135
|
readonly ADMISSION_ORIGINAL_ENTRY_REQUIRED: "ADMISSION_ORIGINAL_ENTRY_REQUIRED";
|
|
128
136
|
readonly ADMISSION_KEY_MISMATCH: "ADMISSION_KEY_MISMATCH";
|
|
137
|
+
/** A live admission is already held, so the requested operation is refused in its favour. */
|
|
138
|
+
readonly ADMISSION_ACTIVE: "ADMISSION_ACTIVE";
|
|
129
139
|
readonly DISTRIBUTION_NOT_OPEN: "DISTRIBUTION_NOT_OPEN";
|
|
130
140
|
readonly DISTRIBUTION_CLOSED: "DISTRIBUTION_CLOSED";
|
|
141
|
+
/**
|
|
142
|
+
* An operator deactivated this distribution, ending it ahead of its own schedule.
|
|
143
|
+
* Distinct from `DISTRIBUTION_CLOSED`, which is a distribution that ran its course:
|
|
144
|
+
* both are terminal, but only this one means a human took the drop down.
|
|
145
|
+
*/
|
|
146
|
+
readonly DISTRIBUTION_DEACTIVATED: "DISTRIBUTION_DEACTIVATED";
|
|
131
147
|
readonly DISTRIBUTION_FULL: "DISTRIBUTION_FULL";
|
|
132
148
|
readonly DISTRIBUTION_ORDER_LIMIT: "DISTRIBUTION_ORDER_LIMIT";
|
|
133
149
|
readonly FINGERPRINT_REQUIRED: "FINGERPRINT_REQUIRED";
|
package/dist/errors.js
CHANGED
|
@@ -37,6 +37,12 @@ const I = {
|
|
|
37
37
|
}, A = {
|
|
38
38
|
DISTRIBUTION_NOT_OPEN: "DISTRIBUTION_NOT_OPEN",
|
|
39
39
|
DISTRIBUTION_CLOSED: "DISTRIBUTION_CLOSED",
|
|
40
|
+
/**
|
|
41
|
+
* An operator deactivated this distribution, ending it ahead of its own schedule.
|
|
42
|
+
* Distinct from `DISTRIBUTION_CLOSED`, which is a distribution that ran its course:
|
|
43
|
+
* both are terminal, but only this one means a human took the drop down.
|
|
44
|
+
*/
|
|
45
|
+
DISTRIBUTION_DEACTIVATED: "DISTRIBUTION_DEACTIVATED",
|
|
40
46
|
DISTRIBUTION_FULL: "DISTRIBUTION_FULL",
|
|
41
47
|
DISTRIBUTION_ORDER_LIMIT: "DISTRIBUTION_ORDER_LIMIT"
|
|
42
48
|
}, R = {
|
|
@@ -44,7 +50,9 @@ const I = {
|
|
|
44
50
|
ADMISSION_PROOF_REQUIRED: "ADMISSION_PROOF_REQUIRED",
|
|
45
51
|
ADMISSION_GRANT_INVALID: "ADMISSION_GRANT_INVALID",
|
|
46
52
|
ADMISSION_ORIGINAL_ENTRY_REQUIRED: "ADMISSION_ORIGINAL_ENTRY_REQUIRED",
|
|
47
|
-
ADMISSION_KEY_MISMATCH: "ADMISSION_KEY_MISMATCH"
|
|
53
|
+
ADMISSION_KEY_MISMATCH: "ADMISSION_KEY_MISMATCH",
|
|
54
|
+
/** A live admission is already held, so the requested operation is refused in its favour. */
|
|
55
|
+
ADMISSION_ACTIVE: "ADMISSION_ACTIVE"
|
|
48
56
|
}, D = {
|
|
49
57
|
BOT_CHALLENGE_INVALID: "BOT_CHALLENGE_INVALID",
|
|
50
58
|
BOT_CHALLENGE_EXPIRED: "BOT_CHALLENGE_EXPIRED",
|
package/package.json
CHANGED