@rebuy/rebuy 3.44.1 → 3.45.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/index.cjs +457 -449
- package/dist/index.mjs +457 -449
- package/dist/schema/postPurchaseFinish.d.ts +27 -0
- package/package.json +1 -1
|
@@ -13,9 +13,35 @@ export declare const FinishedPurchaseSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
13
13
|
unprocessed: "unprocessed";
|
|
14
14
|
}>)[]]>;
|
|
15
15
|
}, z.core.$strict>]>;
|
|
16
|
+
/**
|
|
17
|
+
* Why the client finished: the buyer declined every Offer (`decline-all`), the timer ran out (`timer-expiry`),
|
|
18
|
+
* a transition Ended or could not read the next Offer (`end`), or a purchase's result stayed unknown
|
|
19
|
+
* (`unknown-result`).
|
|
20
|
+
*/
|
|
21
|
+
export declare const PostPurchaseFinishReasonSchema: z.ZodEnum<{
|
|
22
|
+
end: "end";
|
|
23
|
+
"decline-all": "decline-all";
|
|
24
|
+
"timer-expiry": "timer-expiry";
|
|
25
|
+
"unknown-result": "unknown-result";
|
|
26
|
+
}>;
|
|
27
|
+
/**
|
|
28
|
+
* Both reasons are optional so a finish from before they existed still parses. `endReason` names an End's
|
|
29
|
+
* cause and rides only with `end`; an `unavailable` transition finishes as `end` without one.
|
|
30
|
+
*/
|
|
16
31
|
export declare const SessionFinishRequestSchema: z.ZodObject<{
|
|
17
32
|
checkoutToken: z.ZodString;
|
|
18
33
|
shop: z.ZodString;
|
|
34
|
+
endReason: z.ZodOptional<z.ZodEnum<{
|
|
35
|
+
"no-child": "no-child";
|
|
36
|
+
"no-products": "no-products";
|
|
37
|
+
"accept-cap": "accept-cap";
|
|
38
|
+
}>>;
|
|
39
|
+
reason: z.ZodOptional<z.ZodEnum<{
|
|
40
|
+
end: "end";
|
|
41
|
+
"decline-all": "decline-all";
|
|
42
|
+
"timer-expiry": "timer-expiry";
|
|
43
|
+
"unknown-result": "unknown-result";
|
|
44
|
+
}>>;
|
|
19
45
|
}, z.core.$strict>;
|
|
20
46
|
/** Closure plus the effects finish observed; the closure and exit-policy shapes are the session contract's. */
|
|
21
47
|
export declare const SessionFinishResponseSchema: z.ZodObject<{
|
|
@@ -90,6 +116,7 @@ export declare const SessionFinishResponseSchema: z.ZodObject<{
|
|
|
90
116
|
}, z.core.$strip>;
|
|
91
117
|
successful: z.ZodLiteral<true>;
|
|
92
118
|
}, z.core.$strip>;
|
|
119
|
+
export type PostPurchaseFinishReason = z.infer<typeof PostPurchaseFinishReasonSchema>;
|
|
93
120
|
export type FinishedPurchase = z.infer<typeof FinishedPurchaseSchema>;
|
|
94
121
|
export type SessionFinishRequest = z.infer<typeof SessionFinishRequestSchema>;
|
|
95
122
|
export type SessionFinishResponse = z.infer<typeof SessionFinishResponseSchema>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rebuy/rebuy",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.45.0",
|
|
4
4
|
"description": "Shared zod schemas, legacy-to-CAB widget transforms, and server orchestrators for Rebuy's Shopify consumers (rebuy-api, admin-nextjs, rebuy-shopify-extensions)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Rebuy, Inc.",
|