@cimplify/sdk 0.78.0 → 0.80.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/{chunk-XRJCLWJ2.mjs → chunk-BNA4GW4D.mjs} +11 -1
- package/dist/{chunk-7EYA527E.mjs → chunk-FIC5S3KD.mjs} +2 -2
- package/dist/{chunk-EIJKO43W.js → chunk-KMP4HVA2.js} +4 -4
- package/dist/{chunk-H337NF4O.mjs → chunk-NJGJCQWF.mjs} +103 -1
- package/dist/{chunk-QS4XDVHI.js → chunk-NV445GMS.js} +103 -0
- package/dist/{chunk-2SJUHD32.js → chunk-OSTOGR4F.js} +11 -1
- package/dist/{client-BFuRYjAL.d.mts → client-6BNd11sq.d.mts} +1 -1
- package/dist/{client-BW82Vq-p.d.ts → client-CuoWlAfH.d.ts} +1 -1
- package/dist/{client-B1ix2-Og.d.mts → client-Czbt-mej.d.mts} +34 -1
- package/dist/{client-DxW_uHll.d.ts → client-D22iSqke.d.ts} +34 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +13 -9
- package/dist/index.mjs +1 -1
- package/dist/mock/cli.mjs +11 -1
- package/dist/mock/library.js +11 -1
- package/dist/mock/library.mjs +11 -1
- package/dist/mock/msw.js +11 -1
- package/dist/mock/msw.mjs +11 -1
- package/dist/react.d.mts +46 -4
- package/dist/react.d.ts +46 -4
- package/dist/react.js +348 -51
- package/dist/react.mjs +327 -52
- package/dist/server.d.mts +2 -2
- package/dist/server.d.ts +2 -2
- package/dist/server.js +2 -2
- package/dist/server.mjs +1 -1
- package/dist/testing/msw.js +2 -2
- package/dist/testing/msw.mjs +1 -1
- package/dist/testing/suite.d.mts +2 -2
- package/dist/testing/suite.d.ts +2 -2
- package/dist/testing/suite.js +22 -22
- package/dist/testing/suite.mjs +3 -3
- package/dist/testing.d.mts +2 -2
- package/dist/testing.d.ts +2 -2
- package/dist/testing.js +78 -78
- package/dist/testing.mjs +4 -4
- package/package.json +7 -2
- package/registry/catalogue-page.json +1 -1
- package/registry/product-card.json +1 -1
- package/registry/product-grid.json +1 -1
- package/registry/product-image-gallery.json +1 -1
- package/registry/product-page.json +1 -1
- package/registry/recently-viewed.json +1 -1
- package/registry/recommendation-carousel.json +1 -1
- package/registry/search-input.json +1 -1
package/dist/testing/msw.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkOSTOGR4F_js = require('../chunk-OSTOGR4F.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 = chunkOSTOGR4F_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-
|
|
2
|
+
import { T as TestClientHandle } from '../client-6BNd11sq.mjs';
|
|
3
3
|
import { C as CreateAppOptions } from '../server-CGO4zneR.mjs';
|
|
4
4
|
export { S as SeedName } from '../server-CGO4zneR.mjs';
|
|
5
|
-
import '../client-
|
|
5
|
+
import '../client-Czbt-mej.mjs';
|
|
6
6
|
import '../product-BgFOFmQw.mjs';
|
|
7
7
|
import '../payment-B7qzWdaJ.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-
|
|
2
|
+
import { T as TestClientHandle } from '../client-CuoWlAfH.js';
|
|
3
3
|
import { C as CreateAppOptions } from '../server-Daq42vK7.js';
|
|
4
4
|
export { S as SeedName } from '../server-Daq42vK7.js';
|
|
5
|
-
import '../client-
|
|
5
|
+
import '../client-D22iSqke.js';
|
|
6
6
|
import '../product-BgFOFmQw.js';
|
|
7
7
|
import '../payment-mVIJIJcq.js';
|
|
8
8
|
import 'hono';
|
package/dist/testing/suite.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
5
|
-
require('../chunk-
|
|
3
|
+
var chunkKMP4HVA2_js = require('../chunk-KMP4HVA2.js');
|
|
4
|
+
require('../chunk-OSTOGR4F.js');
|
|
5
|
+
require('../chunk-NV445GMS.js');
|
|
6
6
|
require('../chunk-CV5QMDQS.js');
|
|
7
7
|
require('../chunk-7Y2O3E4D.js');
|
|
8
8
|
require('../chunk-XA3ZNR75.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(() => chunkKMP4HVA2_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(chunkKMP4HVA2_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 = chunkKMP4HVA2_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 = chunkKMP4HVA2_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(() => chunkKMP4HVA2_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 chunkKMP4HVA2_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(() => chunkKMP4HVA2_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 chunkKMP4HVA2_js.fixtures.addFirstProduct(h.client);
|
|
102
|
+
await chunkKMP4HVA2_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 chunkKMP4HVA2_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 = chunkKMP4HVA2_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 = chunkKMP4HVA2_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 = chunkKMP4HVA2_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 = chunkKMP4HVA2_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 chunkKMP4HVA2_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 = chunkKMP4HVA2_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 chunkKMP4HVA2_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: chunkKMP4HVA2_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 = chunkKMP4HVA2_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,6 +1,6 @@
|
|
|
1
|
-
import { assertBrand, SeedNameSchema, BrandSchema, createTestClient, assertCart, fixtures, AddItemPayloadSchema, CartItemSchema, CheckoutResponseSchema } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
import { assertBrand, SeedNameSchema, BrandSchema, createTestClient, assertCart, fixtures, AddItemPayloadSchema, CartItemSchema, CheckoutResponseSchema } from '../chunk-FIC5S3KD.mjs';
|
|
2
|
+
import '../chunk-BNA4GW4D.mjs';
|
|
3
|
+
import '../chunk-NJGJCQWF.mjs';
|
|
4
4
|
import '../chunk-3BKMNVTR.mjs';
|
|
5
5
|
import '../chunk-TD3AY34U.mjs';
|
|
6
6
|
import '../chunk-AMZXALF6.mjs';
|
package/dist/testing.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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-6BNd11sq.mjs';
|
|
4
|
+
import './client-Czbt-mej.mjs';
|
|
5
5
|
import './product-BgFOFmQw.mjs';
|
|
6
6
|
import './payment-B7qzWdaJ.mjs';
|
|
7
7
|
import './server-CGO4zneR.mjs';
|
package/dist/testing.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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-CuoWlAfH.js';
|
|
4
|
+
import './client-D22iSqke.js';
|
|
5
5
|
import './product-BgFOFmQw.js';
|
|
6
6
|
import './payment-mVIJIJcq.js';
|
|
7
7
|
import './server-Daq42vK7.js';
|
package/dist/testing.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
3
|
+
var chunkKMP4HVA2_js = require('./chunk-KMP4HVA2.js');
|
|
4
|
+
require('./chunk-OSTOGR4F.js');
|
|
5
|
+
require('./chunk-NV445GMS.js');
|
|
6
6
|
require('./chunk-CV5QMDQS.js');
|
|
7
7
|
require('./chunk-7Y2O3E4D.js');
|
|
8
8
|
require('./chunk-XA3ZNR75.js');
|
|
@@ -10,20 +10,20 @@ require('./chunk-OWW5GUSB.js');
|
|
|
10
10
|
var zod = require('zod');
|
|
11
11
|
|
|
12
12
|
var PUBLIC_SCHEMAS = {
|
|
13
|
-
Brand:
|
|
14
|
-
AddItemPayload:
|
|
15
|
-
Cart:
|
|
16
|
-
CartItem:
|
|
17
|
-
CartPricing:
|
|
18
|
-
CheckoutBody:
|
|
19
|
-
CheckoutResponse:
|
|
20
|
-
VariantInfo:
|
|
13
|
+
Brand: chunkKMP4HVA2_js.BrandSchema,
|
|
14
|
+
AddItemPayload: chunkKMP4HVA2_js.AddItemPayloadSchema,
|
|
15
|
+
Cart: chunkKMP4HVA2_js.CartSchema,
|
|
16
|
+
CartItem: chunkKMP4HVA2_js.CartItemSchema,
|
|
17
|
+
CartPricing: chunkKMP4HVA2_js.CartPricingSchema,
|
|
18
|
+
CheckoutBody: chunkKMP4HVA2_js.CheckoutBodySchema,
|
|
19
|
+
CheckoutResponse: chunkKMP4HVA2_js.CheckoutResponseSchema,
|
|
20
|
+
VariantInfo: chunkKMP4HVA2_js.VariantInfoSchema
|
|
21
21
|
};
|
|
22
22
|
function exportJsonSchemas() {
|
|
23
23
|
const out = {};
|
|
24
24
|
for (const [name, schema] of Object.entries(PUBLIC_SCHEMAS)) {
|
|
25
|
-
const meta =
|
|
26
|
-
const json = zod.z.toJSONSchema(schema, { metadata:
|
|
25
|
+
const meta = chunkKMP4HVA2_js.cimplifyRegistry.get(schema);
|
|
26
|
+
const json = zod.z.toJSONSchema(schema, { metadata: chunkKMP4HVA2_js.cimplifyRegistry });
|
|
27
27
|
if (meta) {
|
|
28
28
|
json.$id = meta.id;
|
|
29
29
|
json["x-cimplify-version"] = meta.version;
|
|
@@ -35,16 +35,16 @@ function exportJsonSchemas() {
|
|
|
35
35
|
function listRegisteredSchemas() {
|
|
36
36
|
const entries = [];
|
|
37
37
|
for (const schema of [
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
38
|
+
chunkKMP4HVA2_js.BrandSchema,
|
|
39
|
+
chunkKMP4HVA2_js.AddItemPayloadSchema,
|
|
40
|
+
chunkKMP4HVA2_js.CartSchema,
|
|
41
|
+
chunkKMP4HVA2_js.CartItemSchema,
|
|
42
|
+
chunkKMP4HVA2_js.CartPricingSchema,
|
|
43
|
+
chunkKMP4HVA2_js.CheckoutBodySchema,
|
|
44
|
+
chunkKMP4HVA2_js.CheckoutResponseSchema,
|
|
45
|
+
chunkKMP4HVA2_js.VariantInfoSchema
|
|
46
46
|
]) {
|
|
47
|
-
const meta =
|
|
47
|
+
const meta = chunkKMP4HVA2_js.cimplifyRegistry.get(schema);
|
|
48
48
|
if (meta) entries.push({ schema, meta });
|
|
49
49
|
}
|
|
50
50
|
return entries;
|
|
@@ -52,227 +52,227 @@ function listRegisteredSchemas() {
|
|
|
52
52
|
|
|
53
53
|
Object.defineProperty(exports, "AddItemPayloadSchema", {
|
|
54
54
|
enumerable: true,
|
|
55
|
-
get: function () { return
|
|
55
|
+
get: function () { return chunkKMP4HVA2_js.AddItemPayloadSchema; }
|
|
56
56
|
});
|
|
57
57
|
Object.defineProperty(exports, "AddOnDetailsSchema", {
|
|
58
58
|
enumerable: true,
|
|
59
|
-
get: function () { return
|
|
59
|
+
get: function () { return chunkKMP4HVA2_js.AddOnDetailsSchema; }
|
|
60
60
|
});
|
|
61
61
|
Object.defineProperty(exports, "AddOnGroupDetailsSchema", {
|
|
62
62
|
enumerable: true,
|
|
63
|
-
get: function () { return
|
|
63
|
+
get: function () { return chunkKMP4HVA2_js.AddOnGroupDetailsSchema; }
|
|
64
64
|
});
|
|
65
65
|
Object.defineProperty(exports, "AddOnInDetailsSchema", {
|
|
66
66
|
enumerable: true,
|
|
67
|
-
get: function () { return
|
|
67
|
+
get: function () { return chunkKMP4HVA2_js.AddOnInDetailsSchema; }
|
|
68
68
|
});
|
|
69
69
|
Object.defineProperty(exports, "AddOnOptionDetailsSchema", {
|
|
70
70
|
enumerable: true,
|
|
71
|
-
get: function () { return
|
|
71
|
+
get: function () { return chunkKMP4HVA2_js.AddOnOptionDetailsSchema; }
|
|
72
72
|
});
|
|
73
73
|
Object.defineProperty(exports, "AuthorizationTypeSchema", {
|
|
74
74
|
enumerable: true,
|
|
75
|
-
get: function () { return
|
|
75
|
+
get: function () { return chunkKMP4HVA2_js.AuthorizationTypeSchema; }
|
|
76
76
|
});
|
|
77
77
|
Object.defineProperty(exports, "BrandContactSchema", {
|
|
78
78
|
enumerable: true,
|
|
79
|
-
get: function () { return
|
|
79
|
+
get: function () { return chunkKMP4HVA2_js.BrandContactSchema; }
|
|
80
80
|
});
|
|
81
81
|
Object.defineProperty(exports, "BrandFaqSchema", {
|
|
82
82
|
enumerable: true,
|
|
83
|
-
get: function () { return
|
|
83
|
+
get: function () { return chunkKMP4HVA2_js.BrandFaqSchema; }
|
|
84
84
|
});
|
|
85
85
|
Object.defineProperty(exports, "BrandHeroSchema", {
|
|
86
86
|
enumerable: true,
|
|
87
|
-
get: function () { return
|
|
87
|
+
get: function () { return chunkKMP4HVA2_js.BrandHeroSchema; }
|
|
88
88
|
});
|
|
89
89
|
Object.defineProperty(exports, "BrandNavLinkSchema", {
|
|
90
90
|
enumerable: true,
|
|
91
|
-
get: function () { return
|
|
91
|
+
get: function () { return chunkKMP4HVA2_js.BrandNavLinkSchema; }
|
|
92
92
|
});
|
|
93
93
|
Object.defineProperty(exports, "BrandPolicyPageSchema", {
|
|
94
94
|
enumerable: true,
|
|
95
|
-
get: function () { return
|
|
95
|
+
get: function () { return chunkKMP4HVA2_js.BrandPolicyPageSchema; }
|
|
96
96
|
});
|
|
97
97
|
Object.defineProperty(exports, "BrandPolicySectionSchema", {
|
|
98
98
|
enumerable: true,
|
|
99
|
-
get: function () { return
|
|
99
|
+
get: function () { return chunkKMP4HVA2_js.BrandPolicySectionSchema; }
|
|
100
100
|
});
|
|
101
101
|
Object.defineProperty(exports, "BrandSchema", {
|
|
102
102
|
enumerable: true,
|
|
103
|
-
get: function () { return
|
|
103
|
+
get: function () { return chunkKMP4HVA2_js.BrandSchema; }
|
|
104
104
|
});
|
|
105
105
|
Object.defineProperty(exports, "BrandSocialSchema", {
|
|
106
106
|
enumerable: true,
|
|
107
|
-
get: function () { return
|
|
107
|
+
get: function () { return chunkKMP4HVA2_js.BrandSocialSchema; }
|
|
108
108
|
});
|
|
109
109
|
Object.defineProperty(exports, "BundleResolvedSchema", {
|
|
110
110
|
enumerable: true,
|
|
111
|
-
get: function () { return
|
|
111
|
+
get: function () { return chunkKMP4HVA2_js.BundleResolvedSchema; }
|
|
112
112
|
});
|
|
113
113
|
Object.defineProperty(exports, "BundleSelectionInputSchema", {
|
|
114
114
|
enumerable: true,
|
|
115
|
-
get: function () { return
|
|
115
|
+
get: function () { return chunkKMP4HVA2_js.BundleSelectionInputSchema; }
|
|
116
116
|
});
|
|
117
117
|
Object.defineProperty(exports, "CartItemSchema", {
|
|
118
118
|
enumerable: true,
|
|
119
|
-
get: function () { return
|
|
119
|
+
get: function () { return chunkKMP4HVA2_js.CartItemSchema; }
|
|
120
120
|
});
|
|
121
121
|
Object.defineProperty(exports, "CartPricingSchema", {
|
|
122
122
|
enumerable: true,
|
|
123
|
-
get: function () { return
|
|
123
|
+
get: function () { return chunkKMP4HVA2_js.CartPricingSchema; }
|
|
124
124
|
});
|
|
125
125
|
Object.defineProperty(exports, "CartSchema", {
|
|
126
126
|
enumerable: true,
|
|
127
|
-
get: function () { return
|
|
127
|
+
get: function () { return chunkKMP4HVA2_js.CartSchema; }
|
|
128
128
|
});
|
|
129
129
|
Object.defineProperty(exports, "CheckoutBodySchema", {
|
|
130
130
|
enumerable: true,
|
|
131
|
-
get: function () { return
|
|
131
|
+
get: function () { return chunkKMP4HVA2_js.CheckoutBodySchema; }
|
|
132
132
|
});
|
|
133
133
|
Object.defineProperty(exports, "CheckoutCustomerSchema", {
|
|
134
134
|
enumerable: true,
|
|
135
|
-
get: function () { return
|
|
135
|
+
get: function () { return chunkKMP4HVA2_js.CheckoutCustomerSchema; }
|
|
136
136
|
});
|
|
137
137
|
Object.defineProperty(exports, "CheckoutResponseSchema", {
|
|
138
138
|
enumerable: true,
|
|
139
|
-
get: function () { return
|
|
139
|
+
get: function () { return chunkKMP4HVA2_js.CheckoutResponseSchema; }
|
|
140
140
|
});
|
|
141
141
|
Object.defineProperty(exports, "ChosenPriceSchema", {
|
|
142
142
|
enumerable: true,
|
|
143
|
-
get: function () { return
|
|
143
|
+
get: function () { return chunkKMP4HVA2_js.ChosenPriceSchema; }
|
|
144
144
|
});
|
|
145
145
|
Object.defineProperty(exports, "CompositeResolvedSchema", {
|
|
146
146
|
enumerable: true,
|
|
147
|
-
get: function () { return
|
|
147
|
+
get: function () { return chunkKMP4HVA2_js.CompositeResolvedSchema; }
|
|
148
148
|
});
|
|
149
149
|
Object.defineProperty(exports, "CompositeSelectionInputSchema", {
|
|
150
150
|
enumerable: true,
|
|
151
|
-
get: function () { return
|
|
151
|
+
get: function () { return chunkKMP4HVA2_js.CompositeSelectionInputSchema; }
|
|
152
152
|
});
|
|
153
153
|
Object.defineProperty(exports, "CountryCodeSchema", {
|
|
154
154
|
enumerable: true,
|
|
155
|
-
get: function () { return
|
|
155
|
+
get: function () { return chunkKMP4HVA2_js.CountryCodeSchema; }
|
|
156
156
|
});
|
|
157
157
|
Object.defineProperty(exports, "CurrencyCodeSchema", {
|
|
158
158
|
enumerable: true,
|
|
159
|
-
get: function () { return
|
|
159
|
+
get: function () { return chunkKMP4HVA2_js.CurrencyCodeSchema; }
|
|
160
160
|
});
|
|
161
161
|
Object.defineProperty(exports, "CustomerInputValueSchema", {
|
|
162
162
|
enumerable: true,
|
|
163
|
-
get: function () { return
|
|
163
|
+
get: function () { return chunkKMP4HVA2_js.CustomerInputValueSchema; }
|
|
164
164
|
});
|
|
165
165
|
Object.defineProperty(exports, "DiscountDetailsSchema", {
|
|
166
166
|
enumerable: true,
|
|
167
|
-
get: function () { return
|
|
167
|
+
get: function () { return chunkKMP4HVA2_js.DiscountDetailsSchema; }
|
|
168
168
|
});
|
|
169
169
|
Object.defineProperty(exports, "IsoDateTimeSchema", {
|
|
170
170
|
enumerable: true,
|
|
171
|
-
get: function () { return
|
|
171
|
+
get: function () { return chunkKMP4HVA2_js.IsoDateTimeSchema; }
|
|
172
172
|
});
|
|
173
173
|
Object.defineProperty(exports, "LineTypeSchema", {
|
|
174
174
|
enumerable: true,
|
|
175
|
-
get: function () { return
|
|
175
|
+
get: function () { return chunkKMP4HVA2_js.LineTypeSchema; }
|
|
176
176
|
});
|
|
177
177
|
Object.defineProperty(exports, "LocaleSchema", {
|
|
178
178
|
enumerable: true,
|
|
179
|
-
get: function () { return
|
|
179
|
+
get: function () { return chunkKMP4HVA2_js.LocaleSchema; }
|
|
180
180
|
});
|
|
181
181
|
Object.defineProperty(exports, "MoneyLooseSchema", {
|
|
182
182
|
enumerable: true,
|
|
183
|
-
get: function () { return
|
|
183
|
+
get: function () { return chunkKMP4HVA2_js.MoneyLooseSchema; }
|
|
184
184
|
});
|
|
185
185
|
Object.defineProperty(exports, "MoneySchema", {
|
|
186
186
|
enumerable: true,
|
|
187
|
-
get: function () { return
|
|
187
|
+
get: function () { return chunkKMP4HVA2_js.MoneySchema; }
|
|
188
188
|
});
|
|
189
189
|
Object.defineProperty(exports, "NextActionSchema", {
|
|
190
190
|
enumerable: true,
|
|
191
|
-
get: function () { return
|
|
191
|
+
get: function () { return chunkKMP4HVA2_js.NextActionSchema; }
|
|
192
192
|
});
|
|
193
193
|
Object.defineProperty(exports, "PhoneE164Schema", {
|
|
194
194
|
enumerable: true,
|
|
195
|
-
get: function () { return
|
|
195
|
+
get: function () { return chunkKMP4HVA2_js.PhoneE164Schema; }
|
|
196
196
|
});
|
|
197
197
|
Object.defineProperty(exports, "ProductTypeSchema", {
|
|
198
198
|
enumerable: true,
|
|
199
|
-
get: function () { return
|
|
199
|
+
get: function () { return chunkKMP4HVA2_js.ProductTypeSchema; }
|
|
200
200
|
});
|
|
201
201
|
Object.defineProperty(exports, "SchemaViolationError", {
|
|
202
202
|
enumerable: true,
|
|
203
|
-
get: function () { return
|
|
203
|
+
get: function () { return chunkKMP4HVA2_js.SchemaViolationError; }
|
|
204
204
|
});
|
|
205
205
|
Object.defineProperty(exports, "SeedNameSchema", {
|
|
206
206
|
enumerable: true,
|
|
207
|
-
get: function () { return
|
|
207
|
+
get: function () { return chunkKMP4HVA2_js.SeedNameSchema; }
|
|
208
208
|
});
|
|
209
209
|
Object.defineProperty(exports, "SelectedAddOnOptionSchema", {
|
|
210
210
|
enumerable: true,
|
|
211
|
-
get: function () { return
|
|
211
|
+
get: function () { return chunkKMP4HVA2_js.SelectedAddOnOptionSchema; }
|
|
212
212
|
});
|
|
213
213
|
Object.defineProperty(exports, "ServiceStatusSchema", {
|
|
214
214
|
enumerable: true,
|
|
215
|
-
get: function () { return
|
|
215
|
+
get: function () { return chunkKMP4HVA2_js.ServiceStatusSchema; }
|
|
216
216
|
});
|
|
217
217
|
Object.defineProperty(exports, "TimestampSchema", {
|
|
218
218
|
enumerable: true,
|
|
219
|
-
get: function () { return
|
|
219
|
+
get: function () { return chunkKMP4HVA2_js.TimestampSchema; }
|
|
220
220
|
});
|
|
221
221
|
Object.defineProperty(exports, "VariantDetailsSchema", {
|
|
222
222
|
enumerable: true,
|
|
223
|
-
get: function () { return
|
|
223
|
+
get: function () { return chunkKMP4HVA2_js.VariantDetailsSchema; }
|
|
224
224
|
});
|
|
225
225
|
Object.defineProperty(exports, "VariantDisplayAttributeSchema", {
|
|
226
226
|
enumerable: true,
|
|
227
|
-
get: function () { return
|
|
227
|
+
get: function () { return chunkKMP4HVA2_js.VariantDisplayAttributeSchema; }
|
|
228
228
|
});
|
|
229
229
|
Object.defineProperty(exports, "VariantInfoSchema", {
|
|
230
230
|
enumerable: true,
|
|
231
|
-
get: function () { return
|
|
231
|
+
get: function () { return chunkKMP4HVA2_js.VariantInfoSchema; }
|
|
232
232
|
});
|
|
233
233
|
Object.defineProperty(exports, "assertAddItemPayload", {
|
|
234
234
|
enumerable: true,
|
|
235
|
-
get: function () { return
|
|
235
|
+
get: function () { return chunkKMP4HVA2_js.assertAddItemPayload; }
|
|
236
236
|
});
|
|
237
237
|
Object.defineProperty(exports, "assertBrand", {
|
|
238
238
|
enumerable: true,
|
|
239
|
-
get: function () { return
|
|
239
|
+
get: function () { return chunkKMP4HVA2_js.assertBrand; }
|
|
240
240
|
});
|
|
241
241
|
Object.defineProperty(exports, "assertCart", {
|
|
242
242
|
enumerable: true,
|
|
243
|
-
get: function () { return
|
|
243
|
+
get: function () { return chunkKMP4HVA2_js.assertCart; }
|
|
244
244
|
});
|
|
245
245
|
Object.defineProperty(exports, "assertCartItem", {
|
|
246
246
|
enumerable: true,
|
|
247
|
-
get: function () { return
|
|
247
|
+
get: function () { return chunkKMP4HVA2_js.assertCartItem; }
|
|
248
248
|
});
|
|
249
249
|
Object.defineProperty(exports, "assertCheckoutBody", {
|
|
250
250
|
enumerable: true,
|
|
251
|
-
get: function () { return
|
|
251
|
+
get: function () { return chunkKMP4HVA2_js.assertCheckoutBody; }
|
|
252
252
|
});
|
|
253
253
|
Object.defineProperty(exports, "assertCheckoutResponse", {
|
|
254
254
|
enumerable: true,
|
|
255
|
-
get: function () { return
|
|
255
|
+
get: function () { return chunkKMP4HVA2_js.assertCheckoutResponse; }
|
|
256
256
|
});
|
|
257
257
|
Object.defineProperty(exports, "cimplifyRegistry", {
|
|
258
258
|
enumerable: true,
|
|
259
|
-
get: function () { return
|
|
259
|
+
get: function () { return chunkKMP4HVA2_js.cimplifyRegistry; }
|
|
260
260
|
});
|
|
261
261
|
Object.defineProperty(exports, "createTestClient", {
|
|
262
262
|
enumerable: true,
|
|
263
|
-
get: function () { return
|
|
263
|
+
get: function () { return chunkKMP4HVA2_js.createTestClient; }
|
|
264
264
|
});
|
|
265
265
|
Object.defineProperty(exports, "fixtures", {
|
|
266
266
|
enumerable: true,
|
|
267
|
-
get: function () { return
|
|
267
|
+
get: function () { return chunkKMP4HVA2_js.fixtures; }
|
|
268
268
|
});
|
|
269
269
|
Object.defineProperty(exports, "makeAssertion", {
|
|
270
270
|
enumerable: true,
|
|
271
|
-
get: function () { return
|
|
271
|
+
get: function () { return chunkKMP4HVA2_js.makeAssertion; }
|
|
272
272
|
});
|
|
273
273
|
Object.defineProperty(exports, "registerSchema", {
|
|
274
274
|
enumerable: true,
|
|
275
|
-
get: function () { return
|
|
275
|
+
get: function () { return chunkKMP4HVA2_js.registerSchema; }
|
|
276
276
|
});
|
|
277
277
|
exports.exportJsonSchemas = exportJsonSchemas;
|
|
278
278
|
exports.listRegisteredSchemas = listRegisteredSchemas;
|
package/dist/testing.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { VariantInfoSchema, CheckoutResponseSchema, CheckoutBodySchema, CartPricingSchema, CartItemSchema, CartSchema, AddItemPayloadSchema, BrandSchema, cimplifyRegistry } from './chunk-
|
|
2
|
-
export { AddItemPayloadSchema, AddOnDetailsSchema, AddOnGroupDetailsSchema, AddOnInDetailsSchema, AddOnOptionDetailsSchema, AuthorizationTypeSchema, BrandContactSchema, BrandFaqSchema, BrandHeroSchema, BrandNavLinkSchema, BrandPolicyPageSchema, BrandPolicySectionSchema, BrandSchema, BrandSocialSchema, BundleResolvedSchema, BundleSelectionInputSchema, CartItemSchema, CartPricingSchema, CartSchema, CheckoutBodySchema, CheckoutCustomerSchema, CheckoutResponseSchema, ChosenPriceSchema, CompositeResolvedSchema, CompositeSelectionInputSchema, CountryCodeSchema, CurrencyCodeSchema, CustomerInputValueSchema, DiscountDetailsSchema, IsoDateTimeSchema, LineTypeSchema, LocaleSchema, MoneyLooseSchema, MoneySchema, NextActionSchema, PhoneE164Schema, ProductTypeSchema, SchemaViolationError, SeedNameSchema, SelectedAddOnOptionSchema, ServiceStatusSchema, TimestampSchema, VariantDetailsSchema, VariantDisplayAttributeSchema, VariantInfoSchema, assertAddItemPayload, assertBrand, assertCart, assertCartItem, assertCheckoutBody, assertCheckoutResponse, cimplifyRegistry, createTestClient, fixtures, makeAssertion, registerSchema } from './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
1
|
+
import { VariantInfoSchema, CheckoutResponseSchema, CheckoutBodySchema, CartPricingSchema, CartItemSchema, CartSchema, AddItemPayloadSchema, BrandSchema, cimplifyRegistry } from './chunk-FIC5S3KD.mjs';
|
|
2
|
+
export { AddItemPayloadSchema, AddOnDetailsSchema, AddOnGroupDetailsSchema, AddOnInDetailsSchema, AddOnOptionDetailsSchema, AuthorizationTypeSchema, BrandContactSchema, BrandFaqSchema, BrandHeroSchema, BrandNavLinkSchema, BrandPolicyPageSchema, BrandPolicySectionSchema, BrandSchema, BrandSocialSchema, BundleResolvedSchema, BundleSelectionInputSchema, CartItemSchema, CartPricingSchema, CartSchema, CheckoutBodySchema, CheckoutCustomerSchema, CheckoutResponseSchema, ChosenPriceSchema, CompositeResolvedSchema, CompositeSelectionInputSchema, CountryCodeSchema, CurrencyCodeSchema, CustomerInputValueSchema, DiscountDetailsSchema, IsoDateTimeSchema, LineTypeSchema, LocaleSchema, MoneyLooseSchema, MoneySchema, NextActionSchema, PhoneE164Schema, ProductTypeSchema, SchemaViolationError, SeedNameSchema, SelectedAddOnOptionSchema, ServiceStatusSchema, TimestampSchema, VariantDetailsSchema, VariantDisplayAttributeSchema, VariantInfoSchema, assertAddItemPayload, assertBrand, assertCart, assertCartItem, assertCheckoutBody, assertCheckoutResponse, cimplifyRegistry, createTestClient, fixtures, makeAssertion, registerSchema } from './chunk-FIC5S3KD.mjs';
|
|
3
|
+
import './chunk-BNA4GW4D.mjs';
|
|
4
|
+
import './chunk-NJGJCQWF.mjs';
|
|
5
5
|
import './chunk-3BKMNVTR.mjs';
|
|
6
6
|
import './chunk-TD3AY34U.mjs';
|
|
7
7
|
import './chunk-AMZXALF6.mjs';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cimplify/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.80.0",
|
|
4
4
|
"description": "Cimplify Commerce SDK for storefronts",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cimplify",
|
|
@@ -113,7 +113,8 @@
|
|
|
113
113
|
"@paystack/inline-js": "^2.22.8",
|
|
114
114
|
"react": ">=17.0.0",
|
|
115
115
|
"msw": ">=2.0.0",
|
|
116
|
-
"vitest": ">=2.0.0"
|
|
116
|
+
"vitest": ">=2.0.0",
|
|
117
|
+
"react-dom": ">=17.0.0"
|
|
117
118
|
},
|
|
118
119
|
"peerDependenciesMeta": {
|
|
119
120
|
"@paystack/inline-js": {
|
|
@@ -127,6 +128,9 @@
|
|
|
127
128
|
},
|
|
128
129
|
"vitest": {
|
|
129
130
|
"optional": true
|
|
131
|
+
},
|
|
132
|
+
"react-dom": {
|
|
133
|
+
"optional": true
|
|
130
134
|
}
|
|
131
135
|
},
|
|
132
136
|
"devDependencies": {
|
|
@@ -139,6 +143,7 @@
|
|
|
139
143
|
"@testing-library/react": "^16.3.2",
|
|
140
144
|
"@types/node": "^25.6.0",
|
|
141
145
|
"@types/react": "^19.2.14",
|
|
146
|
+
"@types/react-dom": "^19",
|
|
142
147
|
"@typescript/native-preview": "^7.0.0-dev.20260503.1",
|
|
143
148
|
"hono": "^4.7.7",
|
|
144
149
|
"jsdom": "^29.1.1",
|