@tokenoftrust/storefront-runner 7.14.2 → 7.15.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.
|
@@ -145,7 +145,7 @@ export function admissionMatches(
|
|
|
145
145
|
|
|
146
146
|
/** The fields of a provider order event that bind it to a final-cart admission. */
|
|
147
147
|
export interface AdmissionBoundEvent {
|
|
148
|
-
command: "observe" | "capture" | "refund" | "cancel";
|
|
148
|
+
command: "observe" | "capture" | "refund" | "dispute" | "cancel";
|
|
149
149
|
eventVersion: number;
|
|
150
150
|
sourceEventId: string;
|
|
151
151
|
source: string;
|
|
@@ -157,7 +157,7 @@ export interface AdmissionBoundEvent {
|
|
|
157
157
|
destinationDigest?: string;
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
-
const COMMAND_RANK = { observe: 0, capture: 1, refund: 2,
|
|
160
|
+
const COMMAND_RANK = { observe: 0, capture: 1, refund: 2, dispute: 3, cancel: 4 } as const;
|
|
161
161
|
|
|
162
162
|
/**
|
|
163
163
|
* The newest event that owns the order's cart binding. A paid or cart snapshot owns its lines,
|
|
@@ -92,6 +92,11 @@ export interface SourceOrderWrapper {
|
|
|
92
92
|
schema: typeof SOURCE_SCHEMA;
|
|
93
93
|
event: Record<string, unknown>;
|
|
94
94
|
provenance: Provenance;
|
|
95
|
+
/**
|
|
96
|
+
* The signed-commerce v1.8 accounting forward for this event. A sibling of `event`, so
|
|
97
|
+
* `provenance.exactOriginalEventDigest` stays the digest of the event bytes alone.
|
|
98
|
+
*/
|
|
99
|
+
forwardContract?: Record<string, unknown>;
|
|
95
100
|
}
|
|
96
101
|
export interface SourceHold {
|
|
97
102
|
holdId: string;
|
|
@@ -225,8 +230,12 @@ export function parseSourceWire(
|
|
|
225
230
|
): SourceBegin | SourceResult | SourceOrderWrapper | null {
|
|
226
231
|
if (!isRecord(v) || v.schema !== SOURCE_SCHEMA) return null;
|
|
227
232
|
if (v.kind === "source-order-event") {
|
|
233
|
+
const keys = Object.hasOwn(v, "forwardContract")
|
|
234
|
+
? ["kind", "schema", "event", "provenance", "forwardContract"]
|
|
235
|
+
: ["kind", "schema", "event", "provenance"];
|
|
228
236
|
if (
|
|
229
|
-
!exactKeys(v,
|
|
237
|
+
!exactKeys(v, keys) ||
|
|
238
|
+
(v.forwardContract !== undefined && !isRecord(v.forwardContract)) ||
|
|
230
239
|
!isRecord(v.event) ||
|
|
231
240
|
!exactKeys(v.provenance, [
|
|
232
241
|
"acceptedLedgerGeneration",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tokenoftrust/storefront-runner",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.15.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"description": "World-shareable storefront runner: multi-tenant renderer on Astro/Cloudflare. No control plane.",
|
|
6
6
|
"packageManager": "pnpm@11.9.0",
|