@cimplify/sdk 0.70.2 → 0.71.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/advanced.d.mts +1 -1
- package/dist/advanced.d.ts +1 -1
- package/dist/advanced.js +20 -20
- package/dist/advanced.mjs +1 -1
- package/dist/{chunk-M2CXZQHS.mjs → chunk-3BKMNVTR.mjs} +2 -1
- package/dist/{chunk-6XXVA3IV.mjs → chunk-BYWJSPT4.mjs} +2 -2
- package/dist/{chunk-BCWPRPK7.js → chunk-CV5QMDQS.js} +2 -1
- package/dist/{chunk-EAVXSFAB.mjs → chunk-H337NF4O.mjs} +1 -1
- package/dist/{chunk-O3ECKVOM.mjs → chunk-J7L5LHGK.mjs} +30 -11
- package/dist/{chunk-I4MP2XZS.js → chunk-OGQFDCZM.js} +30 -11
- package/dist/{chunk-QZQEGRGB.js → chunk-QS4XDVHI.js} +35 -35
- package/dist/{chunk-SC5DUKGD.js → chunk-Y64AIRGW.js} +4 -4
- package/dist/{client-Des_GqmQ.d.ts → client-BvqaIlJ0.d.ts} +2 -2
- package/dist/{client-DRJvXz54.d.mts → client-C7EMuGoz.d.mts} +9 -7
- package/dist/{client-DjQhg6yr.d.ts → client-D6CZ2Ggp.d.ts} +9 -7
- package/dist/{client-BRGGjeny.d.mts → client-DWA_XIh3.d.mts} +2 -2
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +68 -68
- package/dist/index.mjs +3 -3
- package/dist/mock/cli.mjs +30 -11
- package/dist/mock/library.js +30 -11
- package/dist/mock/library.mjs +30 -11
- package/dist/mock/msw.js +30 -11
- package/dist/mock/msw.mjs +30 -11
- package/dist/react.d.mts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js +16 -16
- package/dist/react.mjs +2 -2
- package/dist/server/tanstack.d.mts +74 -0
- package/dist/server/tanstack.d.ts +74 -0
- package/dist/server/tanstack.js +291 -0
- package/dist/server/tanstack.mjs +279 -0
- package/dist/{server-D8rwqZQ6.d.mts → server-DDQ1O3XR.d.mts} +4 -1
- package/dist/{server-BQzz921M.d.ts → server-DMvQp27Z.d.ts} +4 -1
- package/dist/server.d.mts +2 -2
- package/dist/server.d.ts +2 -2
- package/dist/server.js +7 -7
- package/dist/server.mjs +2 -2
- package/dist/testing/msw.d.mts +1 -1
- package/dist/testing/msw.d.ts +1 -1
- package/dist/testing/msw.js +2 -2
- package/dist/testing/msw.mjs +1 -1
- package/dist/testing/suite.d.mts +4 -4
- package/dist/testing/suite.d.ts +4 -4
- package/dist/testing/suite.js +23 -23
- package/dist/testing/suite.mjs +4 -4
- package/dist/testing.d.mts +18 -18
- package/dist/testing.d.ts +18 -18
- package/dist/testing.js +79 -79
- package/dist/testing.mjs +5 -5
- package/package.json +7 -1
package/dist/testing/msw.d.ts
CHANGED
package/dist/testing/msw.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkOGQFDCZM_js = require('../chunk-OGQFDCZM.js');
|
|
4
4
|
require('../chunk-XA3ZNR75.js');
|
|
5
5
|
require('../chunk-OWW5GUSB.js');
|
|
6
6
|
|
|
7
7
|
// src/mock/msw.ts
|
|
8
8
|
async function createMswHandlers(options = {}) {
|
|
9
9
|
const baseUrl = options.baseUrl ?? "http://localhost:8787";
|
|
10
|
-
const handle =
|
|
10
|
+
const handle = chunkOGQFDCZM_js.createMockApp(options);
|
|
11
11
|
const msw = await import('msw').catch(() => {
|
|
12
12
|
throw new Error("msw is required to use @cimplify/sdk/mock/msw \u2014 install it as a peer dependency");
|
|
13
13
|
});
|
package/dist/testing/msw.mjs
CHANGED
package/dist/testing/suite.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { TestAPI } from 'vitest';
|
|
2
|
-
import { T as TestClientHandle } from '../client-
|
|
3
|
-
import { C as CreateAppOptions } from '../server-
|
|
4
|
-
export { S as SeedName } from '../server-
|
|
5
|
-
import '../client-
|
|
2
|
+
import { T as TestClientHandle } from '../client-DWA_XIh3.mjs';
|
|
3
|
+
import { C as CreateAppOptions } from '../server-DDQ1O3XR.mjs';
|
|
4
|
+
export { S as SeedName } from '../server-DDQ1O3XR.mjs';
|
|
5
|
+
import '../client-C7EMuGoz.mjs';
|
|
6
6
|
import '../product-B_kS4Oxa.mjs';
|
|
7
7
|
import '../payment-DVS7ZUEp.mjs';
|
|
8
8
|
import 'hono';
|
package/dist/testing/suite.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { TestAPI } from 'vitest';
|
|
2
|
-
import { T as TestClientHandle } from '../client-
|
|
3
|
-
import { C as CreateAppOptions } from '../server-
|
|
4
|
-
export { S as SeedName } from '../server-
|
|
5
|
-
import '../client-
|
|
2
|
+
import { T as TestClientHandle } from '../client-BvqaIlJ0.js';
|
|
3
|
+
import { C as CreateAppOptions } from '../server-DMvQp27Z.js';
|
|
4
|
+
export { S as SeedName } from '../server-DMvQp27Z.js';
|
|
5
|
+
import '../client-D6CZ2Ggp.js';
|
|
6
6
|
import '../product-B_kS4Oxa.js';
|
|
7
7
|
import '../payment-sn-yGL7v.js';
|
|
8
8
|
import 'hono';
|
package/dist/testing/suite.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
5
|
-
require('../chunk-
|
|
6
|
-
require('../chunk-
|
|
3
|
+
var chunkY64AIRGW_js = require('../chunk-Y64AIRGW.js');
|
|
4
|
+
require('../chunk-OGQFDCZM.js');
|
|
5
|
+
require('../chunk-QS4XDVHI.js');
|
|
6
|
+
require('../chunk-CV5QMDQS.js');
|
|
7
7
|
require('../chunk-7Y2O3E4D.js');
|
|
8
8
|
require('../chunk-XA3ZNR75.js');
|
|
9
9
|
require('../chunk-OWW5GUSB.js');
|
|
@@ -20,11 +20,11 @@ var PLACEHOLDER_PHRASES = [
|
|
|
20
20
|
function createBrandSuite(opts) {
|
|
21
21
|
vitest.describe(opts.label ?? "brand schema", () => {
|
|
22
22
|
vitest.it("conforms to the Cimplify brand contract", () => {
|
|
23
|
-
vitest.expect(() =>
|
|
23
|
+
vitest.expect(() => chunkY64AIRGW_js.assertBrand(opts.brand)).not.toThrow();
|
|
24
24
|
});
|
|
25
25
|
vitest.it("declares a known mock seed", () => {
|
|
26
26
|
const b = opts.brand;
|
|
27
|
-
vitest.expect(
|
|
27
|
+
vitest.expect(chunkY64AIRGW_js.SeedNameSchema.safeParse(b.mock?.seed).success).toBe(true);
|
|
28
28
|
});
|
|
29
29
|
vitest.it("has no placeholder copy left in", () => {
|
|
30
30
|
const offenders = [];
|
|
@@ -56,7 +56,7 @@ ${msg}`);
|
|
|
56
56
|
vitest.expect(b.mock?.businessId).toMatch(/^bus_/);
|
|
57
57
|
});
|
|
58
58
|
vitest.it("zod-parses cleanly", () => {
|
|
59
|
-
const result =
|
|
59
|
+
const result = chunkY64AIRGW_js.BrandSchema.safeParse(opts.brand);
|
|
60
60
|
if (!result.success) {
|
|
61
61
|
throw new Error(
|
|
62
62
|
"Brand schema violations:\n" + result.error.issues.map((i) => ` \u2022 brand.${i.path.join(".")}: ${i.message}`).join("\n")
|
|
@@ -71,23 +71,23 @@ function createCartFlowSuite(opts = {}) {
|
|
|
71
71
|
vitest.describe(opts.label ?? "cart flow against in-process mock", () => {
|
|
72
72
|
let h;
|
|
73
73
|
vitest.beforeEach(() => {
|
|
74
|
-
h =
|
|
74
|
+
h = chunkY64AIRGW_js.createTestClient(opts);
|
|
75
75
|
});
|
|
76
76
|
vitest.afterEach(() => h.dispose());
|
|
77
77
|
vitest.it("starts with an empty cart matching the canonical shape", async () => {
|
|
78
78
|
const res = await h.client.cart.get();
|
|
79
79
|
vitest.expect(res.ok).toBe(true);
|
|
80
80
|
if (!res.ok) return;
|
|
81
|
-
vitest.expect(() =>
|
|
81
|
+
vitest.expect(() => chunkY64AIRGW_js.assertCart(res.value)).not.toThrow();
|
|
82
82
|
vitest.expect(res.value.items).toHaveLength(0);
|
|
83
83
|
});
|
|
84
84
|
vitest.it("adds the first product, persists it, and returns a shape-valid cart", async () => {
|
|
85
|
-
const { product, variantId } = await
|
|
85
|
+
const { product, variantId } = await chunkY64AIRGW_js.fixtures.addFirstProduct(h.client);
|
|
86
86
|
vitest.expect(product.id).toBeTruthy();
|
|
87
87
|
const get = await h.client.cart.get();
|
|
88
88
|
vitest.expect(get.ok).toBe(true);
|
|
89
89
|
if (!get.ok) return;
|
|
90
|
-
vitest.expect(() =>
|
|
90
|
+
vitest.expect(() => chunkY64AIRGW_js.assertCart(get.value)).not.toThrow();
|
|
91
91
|
vitest.expect(get.value.items).toHaveLength(1);
|
|
92
92
|
vitest.expect(get.value.items[0]?.item_id).toBe(product.id);
|
|
93
93
|
if (variantId) {
|
|
@@ -98,8 +98,8 @@ function createCartFlowSuite(opts = {}) {
|
|
|
98
98
|
vitest.expect(parseFloat(String(get.value.pricing.subtotal))).toBeGreaterThan(0);
|
|
99
99
|
});
|
|
100
100
|
vitest.it("dedupes by line_key when adding the same product twice", async () => {
|
|
101
|
-
await
|
|
102
|
-
await
|
|
101
|
+
await chunkY64AIRGW_js.fixtures.addFirstProduct(h.client);
|
|
102
|
+
await chunkY64AIRGW_js.fixtures.addFirstProduct(h.client);
|
|
103
103
|
const res = await h.client.cart.get();
|
|
104
104
|
vitest.expect(res.ok).toBe(true);
|
|
105
105
|
if (!res.ok) return;
|
|
@@ -107,7 +107,7 @@ function createCartFlowSuite(opts = {}) {
|
|
|
107
107
|
vitest.expect(res.value.items[0]?.quantity).toBe(2);
|
|
108
108
|
});
|
|
109
109
|
vitest.it("removes items and zeroes the subtotal", async () => {
|
|
110
|
-
await
|
|
110
|
+
await chunkY64AIRGW_js.fixtures.addFirstProduct(h.client);
|
|
111
111
|
const before = await h.client.cart.get();
|
|
112
112
|
if (!before.ok) throw before.error;
|
|
113
113
|
const itemId = before.value.items[0]?.id;
|
|
@@ -133,28 +133,28 @@ function createContractSuite(opts = {}) {
|
|
|
133
133
|
vitest.describe(opts.label ?? "SDK \u2194 mock contract", () => {
|
|
134
134
|
let h;
|
|
135
135
|
vitest.beforeEach(() => {
|
|
136
|
-
h =
|
|
136
|
+
h = chunkY64AIRGW_js.createTestClient(opts);
|
|
137
137
|
});
|
|
138
138
|
vitest.afterEach(() => h.dispose());
|
|
139
139
|
vitest.it("AddItemPayload schema accepts a minimal valid body", () => {
|
|
140
|
-
const result =
|
|
140
|
+
const result = chunkY64AIRGW_js.AddItemPayloadSchema.safeParse({ item_id: "prod_x", quantity: 1 });
|
|
141
141
|
vitest.expect(result.success).toBe(true);
|
|
142
142
|
});
|
|
143
143
|
vitest.it("AddItemPayload schema rejects negative quantity", () => {
|
|
144
|
-
const result =
|
|
144
|
+
const result = chunkY64AIRGW_js.AddItemPayloadSchema.safeParse({ item_id: "prod_x", quantity: -1 });
|
|
145
145
|
vitest.expect(result.success).toBe(false);
|
|
146
146
|
});
|
|
147
147
|
vitest.it("AddItemPayload schema rejects empty item_id", () => {
|
|
148
|
-
const result =
|
|
148
|
+
const result = chunkY64AIRGW_js.AddItemPayloadSchema.safeParse({ item_id: "", quantity: 1 });
|
|
149
149
|
vitest.expect(result.success).toBe(false);
|
|
150
150
|
});
|
|
151
151
|
vitest.it("Cart line items returned by the mock match CartItemSchema", async () => {
|
|
152
|
-
const { product } = await
|
|
152
|
+
const { product } = await chunkY64AIRGW_js.fixtures.addFirstProduct(h.client);
|
|
153
153
|
const get = await h.client.cart.get();
|
|
154
154
|
if (!get.ok) throw get.error;
|
|
155
155
|
vitest.expect(get.value.items.length).toBeGreaterThan(0);
|
|
156
156
|
for (const item of get.value.items) {
|
|
157
|
-
const result =
|
|
157
|
+
const result = chunkY64AIRGW_js.CartItemSchema.safeParse(item);
|
|
158
158
|
if (!result.success) {
|
|
159
159
|
const issues = result.error.issues.map((i) => ` \u2022 ${i.path.join(".")}: ${i.message}`).join("\n");
|
|
160
160
|
throw new Error(`Cart item shape mismatch for ${product.name}:
|
|
@@ -164,19 +164,19 @@ ${issues}`);
|
|
|
164
164
|
}
|
|
165
165
|
});
|
|
166
166
|
vitest.it("CheckoutResponse from the mock includes bill_token", async () => {
|
|
167
|
-
await
|
|
167
|
+
await chunkY64AIRGW_js.fixtures.addFirstProduct(h.client);
|
|
168
168
|
const cartRes = await h.client.cart.get();
|
|
169
169
|
if (!cartRes.ok) throw cartRes.error;
|
|
170
170
|
const checkout = await h.client.checkout.process({
|
|
171
171
|
cart_id: cartRes.value.id,
|
|
172
|
-
customer:
|
|
172
|
+
customer: chunkY64AIRGW_js.fixtures.customer(),
|
|
173
173
|
order_type: "delivery",
|
|
174
174
|
payment_method: "mobile_money",
|
|
175
175
|
mobile_money_details: { phone_number: "+233244000000", provider: "mtn" }
|
|
176
176
|
});
|
|
177
177
|
vitest.expect(checkout.ok).toBe(true);
|
|
178
178
|
if (!checkout.ok) return;
|
|
179
|
-
const result =
|
|
179
|
+
const result = chunkY64AIRGW_js.CheckoutResponseSchema.safeParse(checkout.value);
|
|
180
180
|
if (!result.success) {
|
|
181
181
|
const issues = result.error.issues.map((i) => ` \u2022 ${i.path.join(".")}: ${i.message}`).join("\n");
|
|
182
182
|
throw new Error(`CheckoutResponse shape mismatch:
|
package/dist/testing/suite.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { assertBrand, SeedNameSchema, BrandSchema, createTestClient, assertCart, fixtures, AddItemPayloadSchema, CartItemSchema, CheckoutResponseSchema } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
1
|
+
import { assertBrand, SeedNameSchema, BrandSchema, createTestClient, assertCart, fixtures, AddItemPayloadSchema, CartItemSchema, CheckoutResponseSchema } from '../chunk-BYWJSPT4.mjs';
|
|
2
|
+
import '../chunk-J7L5LHGK.mjs';
|
|
3
|
+
import '../chunk-H337NF4O.mjs';
|
|
4
|
+
import '../chunk-3BKMNVTR.mjs';
|
|
5
5
|
import '../chunk-TD3AY34U.mjs';
|
|
6
6
|
import '../chunk-AMZXALF6.mjs';
|
|
7
7
|
import '../chunk-3G6RQLXK.mjs';
|
package/dist/testing.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { $ZodType } from 'zod/v4/core';
|
|
3
|
-
export { A as AddFirstProductOptions, a as AddFirstProductResult, P as ProductSummary, T as TestClientHandle, c as createTestClient, f as fixtures } from './client-
|
|
4
|
-
import './client-
|
|
3
|
+
export { A as AddFirstProductOptions, a as AddFirstProductResult, P as ProductSummary, T as TestClientHandle, c as createTestClient, f as fixtures } from './client-DWA_XIh3.mjs';
|
|
4
|
+
import './client-C7EMuGoz.mjs';
|
|
5
5
|
import './product-B_kS4Oxa.mjs';
|
|
6
6
|
import './payment-DVS7ZUEp.mjs';
|
|
7
|
-
import './server-
|
|
7
|
+
import './server-DDQ1O3XR.mjs';
|
|
8
8
|
import 'hono';
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -54,8 +54,8 @@ declare const CountryCodeSchema: z.ZodString;
|
|
|
54
54
|
declare const LocaleSchema: z.ZodString;
|
|
55
55
|
declare const PhoneE164Schema: z.ZodString;
|
|
56
56
|
declare const SeedNameSchema: z.ZodEnum<{
|
|
57
|
-
default: "default";
|
|
58
57
|
empty: "empty";
|
|
58
|
+
default: "default";
|
|
59
59
|
"reesa-storefront": "reesa-storefront";
|
|
60
60
|
restaurant: "restaurant";
|
|
61
61
|
retail: "retail";
|
|
@@ -71,11 +71,11 @@ declare const ProductTypeSchema: z.ZodEnum<{
|
|
|
71
71
|
composite: "composite";
|
|
72
72
|
}>;
|
|
73
73
|
declare const LineTypeSchema: z.ZodEnum<{
|
|
74
|
+
simple: "simple";
|
|
74
75
|
service: "service";
|
|
75
76
|
digital: "digital";
|
|
76
77
|
bundle: "bundle";
|
|
77
78
|
composite: "composite";
|
|
78
|
-
simple: "simple";
|
|
79
79
|
}>;
|
|
80
80
|
declare const ServiceStatusSchema: z.ZodEnum<{
|
|
81
81
|
pending: "pending";
|
|
@@ -365,8 +365,8 @@ declare const BrandSchema: z.ZodObject<{
|
|
|
365
365
|
}, z.core.$strip>;
|
|
366
366
|
mock: z.ZodObject<{
|
|
367
367
|
seed: z.ZodEnum<{
|
|
368
|
-
default: "default";
|
|
369
368
|
empty: "empty";
|
|
369
|
+
default: "default";
|
|
370
370
|
"reesa-storefront": "reesa-storefront";
|
|
371
371
|
restaurant: "restaurant";
|
|
372
372
|
retail: "retail";
|
|
@@ -531,7 +531,7 @@ declare const assertBrand: (value: unknown) => asserts value is {
|
|
|
531
531
|
summary: string;
|
|
532
532
|
};
|
|
533
533
|
mock: {
|
|
534
|
-
seed: "
|
|
534
|
+
seed: "empty" | "default" | "reesa-storefront" | "restaurant" | "retail" | "services" | "grocery" | "fashion";
|
|
535
535
|
businessId: string;
|
|
536
536
|
};
|
|
537
537
|
trustItems?: {
|
|
@@ -780,11 +780,11 @@ declare const CartItemSchema: z.ZodObject<{
|
|
|
780
780
|
quantity: z.ZodNumber;
|
|
781
781
|
line_key: z.ZodString;
|
|
782
782
|
line_type: z.ZodEnum<{
|
|
783
|
+
simple: "simple";
|
|
783
784
|
service: "service";
|
|
784
785
|
digital: "digital";
|
|
785
786
|
bundle: "bundle";
|
|
786
787
|
composite: "composite";
|
|
787
|
-
simple: "simple";
|
|
788
788
|
}>;
|
|
789
789
|
name: z.ZodString;
|
|
790
790
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -926,7 +926,7 @@ declare const assertCartItem: (value: unknown) => asserts value is {
|
|
|
926
926
|
item_id: string;
|
|
927
927
|
quantity: number;
|
|
928
928
|
line_key: string;
|
|
929
|
-
line_type: "
|
|
929
|
+
line_type: "simple" | "service" | "digital" | "bundle" | "composite";
|
|
930
930
|
name: string;
|
|
931
931
|
is_available: boolean;
|
|
932
932
|
base_price: string;
|
|
@@ -1076,11 +1076,11 @@ declare const CartSchema: z.ZodObject<{
|
|
|
1076
1076
|
quantity: z.ZodNumber;
|
|
1077
1077
|
line_key: z.ZodString;
|
|
1078
1078
|
line_type: z.ZodEnum<{
|
|
1079
|
+
simple: "simple";
|
|
1079
1080
|
service: "service";
|
|
1080
1081
|
digital: "digital";
|
|
1081
1082
|
bundle: "bundle";
|
|
1082
1083
|
composite: "composite";
|
|
1083
|
-
simple: "simple";
|
|
1084
1084
|
}>;
|
|
1085
1085
|
name: z.ZodString;
|
|
1086
1086
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -1249,7 +1249,7 @@ declare const assertCart: (value: unknown) => asserts value is {
|
|
|
1249
1249
|
item_id: string;
|
|
1250
1250
|
quantity: number;
|
|
1251
1251
|
line_key: string;
|
|
1252
|
-
line_type: "
|
|
1252
|
+
line_type: "simple" | "service" | "digital" | "bundle" | "composite";
|
|
1253
1253
|
name: string;
|
|
1254
1254
|
is_available: boolean;
|
|
1255
1255
|
base_price: string;
|
|
@@ -1462,10 +1462,10 @@ declare const assertCheckoutBody: (value: unknown) => asserts value is {
|
|
|
1462
1462
|
};
|
|
1463
1463
|
declare const AuthorizationTypeSchema: z.ZodEnum<{
|
|
1464
1464
|
phone: "phone";
|
|
1465
|
-
address: "address";
|
|
1466
1465
|
otp: "otp";
|
|
1467
1466
|
pin: "pin";
|
|
1468
1467
|
birthday: "birthday";
|
|
1468
|
+
address: "address";
|
|
1469
1469
|
}>;
|
|
1470
1470
|
declare const NextActionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1471
1471
|
type: z.ZodLiteral<"none">;
|
|
@@ -1485,10 +1485,10 @@ declare const CheckoutResponseSchema: z.ZodObject<{
|
|
|
1485
1485
|
requires_authorization: z.ZodBoolean;
|
|
1486
1486
|
authorization_type: z.ZodOptional<z.ZodEnum<{
|
|
1487
1487
|
phone: "phone";
|
|
1488
|
-
address: "address";
|
|
1489
1488
|
otp: "otp";
|
|
1490
1489
|
pin: "pin";
|
|
1491
1490
|
birthday: "birthday";
|
|
1491
|
+
address: "address";
|
|
1492
1492
|
}>>;
|
|
1493
1493
|
next_action: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1494
1494
|
type: z.ZodLiteral<"none">;
|
|
@@ -1525,7 +1525,7 @@ declare const assertCheckoutResponse: (value: unknown) => asserts value is {
|
|
|
1525
1525
|
display_text?: string | undefined;
|
|
1526
1526
|
};
|
|
1527
1527
|
payment_reference?: string | undefined;
|
|
1528
|
-
authorization_type?: "phone" | "
|
|
1528
|
+
authorization_type?: "phone" | "otp" | "pin" | "birthday" | "address" | undefined;
|
|
1529
1529
|
provider?: string | undefined;
|
|
1530
1530
|
authorization_url?: string | undefined;
|
|
1531
1531
|
display_text?: string | undefined;
|
|
@@ -1724,8 +1724,8 @@ declare const PUBLIC_SCHEMAS: {
|
|
|
1724
1724
|
}, z.core.$strip>;
|
|
1725
1725
|
mock: z.ZodObject<{
|
|
1726
1726
|
seed: z.ZodEnum<{
|
|
1727
|
-
default: "default";
|
|
1728
1727
|
empty: "empty";
|
|
1728
|
+
default: "default";
|
|
1729
1729
|
"reesa-storefront": "reesa-storefront";
|
|
1730
1730
|
restaurant: "restaurant";
|
|
1731
1731
|
retail: "retail";
|
|
@@ -1785,11 +1785,11 @@ declare const PUBLIC_SCHEMAS: {
|
|
|
1785
1785
|
quantity: z.ZodNumber;
|
|
1786
1786
|
line_key: z.ZodString;
|
|
1787
1787
|
line_type: z.ZodEnum<{
|
|
1788
|
+
simple: "simple";
|
|
1788
1789
|
service: "service";
|
|
1789
1790
|
digital: "digital";
|
|
1790
1791
|
bundle: "bundle";
|
|
1791
1792
|
composite: "composite";
|
|
1792
|
-
simple: "simple";
|
|
1793
1793
|
}>;
|
|
1794
1794
|
name: z.ZodString;
|
|
1795
1795
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -1953,11 +1953,11 @@ declare const PUBLIC_SCHEMAS: {
|
|
|
1953
1953
|
quantity: z.ZodNumber;
|
|
1954
1954
|
line_key: z.ZodString;
|
|
1955
1955
|
line_type: z.ZodEnum<{
|
|
1956
|
+
simple: "simple";
|
|
1956
1957
|
service: "service";
|
|
1957
1958
|
digital: "digital";
|
|
1958
1959
|
bundle: "bundle";
|
|
1959
1960
|
composite: "composite";
|
|
1960
|
-
simple: "simple";
|
|
1961
1961
|
}>;
|
|
1962
1962
|
name: z.ZodString;
|
|
1963
1963
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -2131,10 +2131,10 @@ declare const PUBLIC_SCHEMAS: {
|
|
|
2131
2131
|
requires_authorization: z.ZodBoolean;
|
|
2132
2132
|
authorization_type: z.ZodOptional<z.ZodEnum<{
|
|
2133
2133
|
phone: "phone";
|
|
2134
|
-
address: "address";
|
|
2135
2134
|
otp: "otp";
|
|
2136
2135
|
pin: "pin";
|
|
2137
2136
|
birthday: "birthday";
|
|
2137
|
+
address: "address";
|
|
2138
2138
|
}>>;
|
|
2139
2139
|
next_action: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2140
2140
|
type: z.ZodLiteral<"none">;
|
package/dist/testing.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { $ZodType } from 'zod/v4/core';
|
|
3
|
-
export { A as AddFirstProductOptions, a as AddFirstProductResult, P as ProductSummary, T as TestClientHandle, c as createTestClient, f as fixtures } from './client-
|
|
4
|
-
import './client-
|
|
3
|
+
export { A as AddFirstProductOptions, a as AddFirstProductResult, P as ProductSummary, T as TestClientHandle, c as createTestClient, f as fixtures } from './client-BvqaIlJ0.js';
|
|
4
|
+
import './client-D6CZ2Ggp.js';
|
|
5
5
|
import './product-B_kS4Oxa.js';
|
|
6
6
|
import './payment-sn-yGL7v.js';
|
|
7
|
-
import './server-
|
|
7
|
+
import './server-DMvQp27Z.js';
|
|
8
8
|
import 'hono';
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -54,8 +54,8 @@ declare const CountryCodeSchema: z.ZodString;
|
|
|
54
54
|
declare const LocaleSchema: z.ZodString;
|
|
55
55
|
declare const PhoneE164Schema: z.ZodString;
|
|
56
56
|
declare const SeedNameSchema: z.ZodEnum<{
|
|
57
|
-
default: "default";
|
|
58
57
|
empty: "empty";
|
|
58
|
+
default: "default";
|
|
59
59
|
"reesa-storefront": "reesa-storefront";
|
|
60
60
|
restaurant: "restaurant";
|
|
61
61
|
retail: "retail";
|
|
@@ -71,11 +71,11 @@ declare const ProductTypeSchema: z.ZodEnum<{
|
|
|
71
71
|
composite: "composite";
|
|
72
72
|
}>;
|
|
73
73
|
declare const LineTypeSchema: z.ZodEnum<{
|
|
74
|
+
simple: "simple";
|
|
74
75
|
service: "service";
|
|
75
76
|
digital: "digital";
|
|
76
77
|
bundle: "bundle";
|
|
77
78
|
composite: "composite";
|
|
78
|
-
simple: "simple";
|
|
79
79
|
}>;
|
|
80
80
|
declare const ServiceStatusSchema: z.ZodEnum<{
|
|
81
81
|
pending: "pending";
|
|
@@ -365,8 +365,8 @@ declare const BrandSchema: z.ZodObject<{
|
|
|
365
365
|
}, z.core.$strip>;
|
|
366
366
|
mock: z.ZodObject<{
|
|
367
367
|
seed: z.ZodEnum<{
|
|
368
|
-
default: "default";
|
|
369
368
|
empty: "empty";
|
|
369
|
+
default: "default";
|
|
370
370
|
"reesa-storefront": "reesa-storefront";
|
|
371
371
|
restaurant: "restaurant";
|
|
372
372
|
retail: "retail";
|
|
@@ -531,7 +531,7 @@ declare const assertBrand: (value: unknown) => asserts value is {
|
|
|
531
531
|
summary: string;
|
|
532
532
|
};
|
|
533
533
|
mock: {
|
|
534
|
-
seed: "
|
|
534
|
+
seed: "empty" | "default" | "reesa-storefront" | "restaurant" | "retail" | "services" | "grocery" | "fashion";
|
|
535
535
|
businessId: string;
|
|
536
536
|
};
|
|
537
537
|
trustItems?: {
|
|
@@ -780,11 +780,11 @@ declare const CartItemSchema: z.ZodObject<{
|
|
|
780
780
|
quantity: z.ZodNumber;
|
|
781
781
|
line_key: z.ZodString;
|
|
782
782
|
line_type: z.ZodEnum<{
|
|
783
|
+
simple: "simple";
|
|
783
784
|
service: "service";
|
|
784
785
|
digital: "digital";
|
|
785
786
|
bundle: "bundle";
|
|
786
787
|
composite: "composite";
|
|
787
|
-
simple: "simple";
|
|
788
788
|
}>;
|
|
789
789
|
name: z.ZodString;
|
|
790
790
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -926,7 +926,7 @@ declare const assertCartItem: (value: unknown) => asserts value is {
|
|
|
926
926
|
item_id: string;
|
|
927
927
|
quantity: number;
|
|
928
928
|
line_key: string;
|
|
929
|
-
line_type: "
|
|
929
|
+
line_type: "simple" | "service" | "digital" | "bundle" | "composite";
|
|
930
930
|
name: string;
|
|
931
931
|
is_available: boolean;
|
|
932
932
|
base_price: string;
|
|
@@ -1076,11 +1076,11 @@ declare const CartSchema: z.ZodObject<{
|
|
|
1076
1076
|
quantity: z.ZodNumber;
|
|
1077
1077
|
line_key: z.ZodString;
|
|
1078
1078
|
line_type: z.ZodEnum<{
|
|
1079
|
+
simple: "simple";
|
|
1079
1080
|
service: "service";
|
|
1080
1081
|
digital: "digital";
|
|
1081
1082
|
bundle: "bundle";
|
|
1082
1083
|
composite: "composite";
|
|
1083
|
-
simple: "simple";
|
|
1084
1084
|
}>;
|
|
1085
1085
|
name: z.ZodString;
|
|
1086
1086
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -1249,7 +1249,7 @@ declare const assertCart: (value: unknown) => asserts value is {
|
|
|
1249
1249
|
item_id: string;
|
|
1250
1250
|
quantity: number;
|
|
1251
1251
|
line_key: string;
|
|
1252
|
-
line_type: "
|
|
1252
|
+
line_type: "simple" | "service" | "digital" | "bundle" | "composite";
|
|
1253
1253
|
name: string;
|
|
1254
1254
|
is_available: boolean;
|
|
1255
1255
|
base_price: string;
|
|
@@ -1462,10 +1462,10 @@ declare const assertCheckoutBody: (value: unknown) => asserts value is {
|
|
|
1462
1462
|
};
|
|
1463
1463
|
declare const AuthorizationTypeSchema: z.ZodEnum<{
|
|
1464
1464
|
phone: "phone";
|
|
1465
|
-
address: "address";
|
|
1466
1465
|
otp: "otp";
|
|
1467
1466
|
pin: "pin";
|
|
1468
1467
|
birthday: "birthday";
|
|
1468
|
+
address: "address";
|
|
1469
1469
|
}>;
|
|
1470
1470
|
declare const NextActionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1471
1471
|
type: z.ZodLiteral<"none">;
|
|
@@ -1485,10 +1485,10 @@ declare const CheckoutResponseSchema: z.ZodObject<{
|
|
|
1485
1485
|
requires_authorization: z.ZodBoolean;
|
|
1486
1486
|
authorization_type: z.ZodOptional<z.ZodEnum<{
|
|
1487
1487
|
phone: "phone";
|
|
1488
|
-
address: "address";
|
|
1489
1488
|
otp: "otp";
|
|
1490
1489
|
pin: "pin";
|
|
1491
1490
|
birthday: "birthday";
|
|
1491
|
+
address: "address";
|
|
1492
1492
|
}>>;
|
|
1493
1493
|
next_action: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1494
1494
|
type: z.ZodLiteral<"none">;
|
|
@@ -1525,7 +1525,7 @@ declare const assertCheckoutResponse: (value: unknown) => asserts value is {
|
|
|
1525
1525
|
display_text?: string | undefined;
|
|
1526
1526
|
};
|
|
1527
1527
|
payment_reference?: string | undefined;
|
|
1528
|
-
authorization_type?: "phone" | "
|
|
1528
|
+
authorization_type?: "phone" | "otp" | "pin" | "birthday" | "address" | undefined;
|
|
1529
1529
|
provider?: string | undefined;
|
|
1530
1530
|
authorization_url?: string | undefined;
|
|
1531
1531
|
display_text?: string | undefined;
|
|
@@ -1724,8 +1724,8 @@ declare const PUBLIC_SCHEMAS: {
|
|
|
1724
1724
|
}, z.core.$strip>;
|
|
1725
1725
|
mock: z.ZodObject<{
|
|
1726
1726
|
seed: z.ZodEnum<{
|
|
1727
|
-
default: "default";
|
|
1728
1727
|
empty: "empty";
|
|
1728
|
+
default: "default";
|
|
1729
1729
|
"reesa-storefront": "reesa-storefront";
|
|
1730
1730
|
restaurant: "restaurant";
|
|
1731
1731
|
retail: "retail";
|
|
@@ -1785,11 +1785,11 @@ declare const PUBLIC_SCHEMAS: {
|
|
|
1785
1785
|
quantity: z.ZodNumber;
|
|
1786
1786
|
line_key: z.ZodString;
|
|
1787
1787
|
line_type: z.ZodEnum<{
|
|
1788
|
+
simple: "simple";
|
|
1788
1789
|
service: "service";
|
|
1789
1790
|
digital: "digital";
|
|
1790
1791
|
bundle: "bundle";
|
|
1791
1792
|
composite: "composite";
|
|
1792
|
-
simple: "simple";
|
|
1793
1793
|
}>;
|
|
1794
1794
|
name: z.ZodString;
|
|
1795
1795
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -1953,11 +1953,11 @@ declare const PUBLIC_SCHEMAS: {
|
|
|
1953
1953
|
quantity: z.ZodNumber;
|
|
1954
1954
|
line_key: z.ZodString;
|
|
1955
1955
|
line_type: z.ZodEnum<{
|
|
1956
|
+
simple: "simple";
|
|
1956
1957
|
service: "service";
|
|
1957
1958
|
digital: "digital";
|
|
1958
1959
|
bundle: "bundle";
|
|
1959
1960
|
composite: "composite";
|
|
1960
|
-
simple: "simple";
|
|
1961
1961
|
}>;
|
|
1962
1962
|
name: z.ZodString;
|
|
1963
1963
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -2131,10 +2131,10 @@ declare const PUBLIC_SCHEMAS: {
|
|
|
2131
2131
|
requires_authorization: z.ZodBoolean;
|
|
2132
2132
|
authorization_type: z.ZodOptional<z.ZodEnum<{
|
|
2133
2133
|
phone: "phone";
|
|
2134
|
-
address: "address";
|
|
2135
2134
|
otp: "otp";
|
|
2136
2135
|
pin: "pin";
|
|
2137
2136
|
birthday: "birthday";
|
|
2137
|
+
address: "address";
|
|
2138
2138
|
}>>;
|
|
2139
2139
|
next_action: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2140
2140
|
type: z.ZodLiteral<"none">;
|