@cimplify/sdk 0.50.2 → 0.51.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-D22UVSFN.js → chunk-CAG3TEXO.js} +2 -2
- package/dist/{chunk-CYGLTD7D.js → chunk-FJQC4VSN.js} +54 -43
- package/dist/{chunk-OFNVLUH4.mjs → chunk-FXACV333.mjs} +56 -53
- package/dist/{chunk-MBR2DBEN.mjs → chunk-GUZXQSGI.mjs} +20 -9
- package/dist/{chunk-24FK7VFL.mjs → chunk-QCS6D4XW.mjs} +1 -1
- package/dist/{chunk-DR4UPU6P.js → chunk-VOWMB2KR.js} +56 -53
- package/dist/{client-B8tJnOde.d.ts → client-B6x53-Al.d.ts} +45 -27
- package/dist/{client-BqCAm5vI.d.mts → client-BbrCopIS.d.mts} +1 -1
- package/dist/{client-BdbvMtOU.d.ts → client-BvEjhvwq.d.ts} +1 -1
- package/dist/{client-BZZK1txR.d.mts → client-CF2pmEE9.d.mts} +45 -27
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +61 -61
- package/dist/index.mjs +2 -2
- 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.d.mts +18 -10
- package/dist/server.d.ts +18 -10
- package/dist/server.js +3 -3
- package/dist/server.mjs +2 -2
- 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 +1 -1
package/dist/server.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CimplifyClient } from './client-
|
|
2
|
-
export {
|
|
1
|
+
import { C as CimplifyClient } from './client-B6x53-Al.js';
|
|
2
|
+
export { d as CacheOptions, b as ReadRequestOptions, aQ as Result } from './client-B6x53-Al.js';
|
|
3
3
|
import { IncrementalCache } from '@opennextjs/aws/types/overrides';
|
|
4
4
|
export { ap as Category, h as CimplifyError, ar as Collection, X as Product, aa as ProductWithDetails } from './product-C-xLzh7Q.js';
|
|
5
5
|
import './payment-_e99nSRj.js';
|
|
@@ -28,9 +28,17 @@ interface ServerClientOptions {
|
|
|
28
28
|
*
|
|
29
29
|
* The returned client is the exact same surface the browser uses — every
|
|
30
30
|
* resource (catalogue, cart, checkout, …) and every method works identically.
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
31
|
+
*
|
|
32
|
+
* Caching is Next.js's responsibility. Pass `cacheOptions` per read method
|
|
33
|
+
* (`{ revalidate, tags }`); the SDK forwards them as `next: { revalidate, tags }`
|
|
34
|
+
* on the underlying fetch — Next 16's documented ISR API. Invalidate via the
|
|
35
|
+
* `revalidate*` helpers (also exported from this entry) or the bare
|
|
36
|
+
* `revalidateTag` / `revalidatePath` from `next/cache`.
|
|
37
|
+
*
|
|
38
|
+
* If you have `cacheComponents: true` in `next.config.ts` (Next 16 PPR-style
|
|
39
|
+
* caching), the `'use cache'` + `cacheTag` / `cacheLife` directives work too —
|
|
40
|
+
* but they require a Node-compatible runtime and won't function on Cloudflare
|
|
41
|
+
* Workers. For Workers / WfP storefronts, stay on the ISR (`cacheOptions`) path.
|
|
34
42
|
*
|
|
35
43
|
* Errors continue to flow through `Result<T, CimplifyError>`. Use the SDK's
|
|
36
44
|
* `unwrap()` helper, or `if (!result.ok) notFound()` — whichever is
|
|
@@ -38,13 +46,13 @@ interface ServerClientOptions {
|
|
|
38
46
|
*
|
|
39
47
|
* @example
|
|
40
48
|
* import { getServerClient, tags } from "@cimplify/sdk/server";
|
|
41
|
-
*
|
|
49
|
+
*
|
|
50
|
+
* export const revalidate = 3600;
|
|
42
51
|
*
|
|
43
52
|
* async function getProduct(slug: string) {
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
* const r = await getServerClient().catalogue.getProductBySlug(slug);
|
|
53
|
+
* const r = await getServerClient().catalogue.getProductBySlug(slug, {
|
|
54
|
+
* cacheOptions: { revalidate: 3600, tags: [tags.product(slug)] },
|
|
55
|
+
* });
|
|
48
56
|
* if (!r.ok) throw new Error(r.error.message);
|
|
49
57
|
* return r.value;
|
|
50
58
|
* }
|
package/dist/server.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var chunkFJQC4VSN_js = require('./chunk-FJQC4VSN.js');
|
|
4
|
+
require('./chunk-VOWMB2KR.js');
|
|
5
5
|
require('./chunk-6RP6OPYO.js');
|
|
6
6
|
var chunkTKOTACKZ_js = require('./chunk-TKOTACKZ.js');
|
|
7
7
|
var react = require('react');
|
|
@@ -25,7 +25,7 @@ function readEnv(...keys) {
|
|
|
25
25
|
var getServerClient = react.cache((opts = {}) => {
|
|
26
26
|
const baseUrl = opts.apiUrl ?? readEnv("CIMPLIFY_API_URL", "NEXT_PUBLIC_CIMPLIFY_API_URL") ?? defaultBaseUrl();
|
|
27
27
|
const publicKey = opts.secretKey ?? readEnv("CIMPLIFY_SECRET_KEY", "NEXT_PUBLIC_CIMPLIFY_PUBLIC_KEY") ?? "mock-dev";
|
|
28
|
-
const client =
|
|
28
|
+
const client = chunkFJQC4VSN_js.createCimplifyClient({
|
|
29
29
|
baseUrl,
|
|
30
30
|
publicKey,
|
|
31
31
|
suppressPublicKeyWarning: true
|
package/dist/server.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createCimplifyClient } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
import { createCimplifyClient } from './chunk-GUZXQSGI.mjs';
|
|
2
|
+
import './chunk-FXACV333.mjs';
|
|
3
3
|
import './chunk-XY2DFX5K.mjs';
|
|
4
4
|
export { CimplifyError } from './chunk-Z2AYLZDF.mjs';
|
|
5
5
|
import { cache } from 'react';
|
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-BbrCopIS.mjs';
|
|
3
3
|
import { C as CreateAppOptions } from '../server-BgccqOLT.mjs';
|
|
4
4
|
export { S as SeedName } from '../server-BgccqOLT.mjs';
|
|
5
|
-
import '../client-
|
|
5
|
+
import '../client-CF2pmEE9.mjs';
|
|
6
6
|
import '../product-C-xLzh7Q.mjs';
|
|
7
7
|
import '../payment-9L_-GWqQ.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-BvEjhvwq.js';
|
|
3
3
|
import { C as CreateAppOptions } from '../server-72rzvJ4Y.js';
|
|
4
4
|
export { S as SeedName } from '../server-72rzvJ4Y.js';
|
|
5
|
-
import '../client-
|
|
5
|
+
import '../client-B6x53-Al.js';
|
|
6
6
|
import '../product-C-xLzh7Q.js';
|
|
7
7
|
import '../payment-_e99nSRj.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 chunkCAG3TEXO_js = require('../chunk-CAG3TEXO.js');
|
|
4
|
+
require('../chunk-FJQC4VSN.js');
|
|
5
|
+
require('../chunk-VOWMB2KR.js');
|
|
6
6
|
require('../chunk-6RP6OPYO.js');
|
|
7
7
|
require('../chunk-GEWFWQYK.js');
|
|
8
8
|
require('../chunk-TKOTACKZ.js');
|
|
@@ -19,11 +19,11 @@ var PLACEHOLDER_PHRASES = [
|
|
|
19
19
|
function createBrandSuite(opts) {
|
|
20
20
|
vitest.describe(opts.label ?? "brand schema", () => {
|
|
21
21
|
vitest.it("conforms to the Cimplify brand contract", () => {
|
|
22
|
-
vitest.expect(() =>
|
|
22
|
+
vitest.expect(() => chunkCAG3TEXO_js.assertBrand(opts.brand)).not.toThrow();
|
|
23
23
|
});
|
|
24
24
|
vitest.it("declares a known mock seed", () => {
|
|
25
25
|
const b = opts.brand;
|
|
26
|
-
vitest.expect(
|
|
26
|
+
vitest.expect(chunkCAG3TEXO_js.SeedNameSchema.safeParse(b.mock?.seed).success).toBe(true);
|
|
27
27
|
});
|
|
28
28
|
vitest.it("has no placeholder copy left in", () => {
|
|
29
29
|
const offenders = [];
|
|
@@ -55,7 +55,7 @@ ${msg}`);
|
|
|
55
55
|
vitest.expect(b.mock?.businessId).toMatch(/^bus_/);
|
|
56
56
|
});
|
|
57
57
|
vitest.it("zod-parses cleanly", () => {
|
|
58
|
-
const result =
|
|
58
|
+
const result = chunkCAG3TEXO_js.BrandSchema.safeParse(opts.brand);
|
|
59
59
|
if (!result.success) {
|
|
60
60
|
throw new Error(
|
|
61
61
|
"Brand schema violations:\n" + result.error.issues.map((i) => ` \u2022 brand.${i.path.join(".")}: ${i.message}`).join("\n")
|
|
@@ -70,23 +70,23 @@ function createCartFlowSuite(opts = {}) {
|
|
|
70
70
|
vitest.describe(opts.label ?? "cart flow against in-process mock", () => {
|
|
71
71
|
let h;
|
|
72
72
|
vitest.beforeEach(() => {
|
|
73
|
-
h =
|
|
73
|
+
h = chunkCAG3TEXO_js.createTestClient(opts);
|
|
74
74
|
});
|
|
75
75
|
vitest.afterEach(() => h.dispose());
|
|
76
76
|
vitest.it("starts with an empty cart matching the canonical shape", async () => {
|
|
77
77
|
const res = await h.client.cart.get();
|
|
78
78
|
vitest.expect(res.ok).toBe(true);
|
|
79
79
|
if (!res.ok) return;
|
|
80
|
-
vitest.expect(() =>
|
|
80
|
+
vitest.expect(() => chunkCAG3TEXO_js.assertCart(res.value)).not.toThrow();
|
|
81
81
|
vitest.expect(res.value.items).toHaveLength(0);
|
|
82
82
|
});
|
|
83
83
|
vitest.it("adds the first product, persists it, and returns a shape-valid cart", async () => {
|
|
84
|
-
const { product, variantId } = await
|
|
84
|
+
const { product, variantId } = await chunkCAG3TEXO_js.fixtures.addFirstProduct(h.client);
|
|
85
85
|
vitest.expect(product.id).toBeTruthy();
|
|
86
86
|
const get = await h.client.cart.get();
|
|
87
87
|
vitest.expect(get.ok).toBe(true);
|
|
88
88
|
if (!get.ok) return;
|
|
89
|
-
vitest.expect(() =>
|
|
89
|
+
vitest.expect(() => chunkCAG3TEXO_js.assertCart(get.value)).not.toThrow();
|
|
90
90
|
vitest.expect(get.value.items).toHaveLength(1);
|
|
91
91
|
vitest.expect(get.value.items[0]?.item_id).toBe(product.id);
|
|
92
92
|
if (variantId) {
|
|
@@ -97,8 +97,8 @@ function createCartFlowSuite(opts = {}) {
|
|
|
97
97
|
vitest.expect(parseFloat(String(get.value.pricing.subtotal))).toBeGreaterThan(0);
|
|
98
98
|
});
|
|
99
99
|
vitest.it("dedupes by line_key when adding the same product twice", async () => {
|
|
100
|
-
await
|
|
101
|
-
await
|
|
100
|
+
await chunkCAG3TEXO_js.fixtures.addFirstProduct(h.client);
|
|
101
|
+
await chunkCAG3TEXO_js.fixtures.addFirstProduct(h.client);
|
|
102
102
|
const res = await h.client.cart.get();
|
|
103
103
|
vitest.expect(res.ok).toBe(true);
|
|
104
104
|
if (!res.ok) return;
|
|
@@ -106,7 +106,7 @@ function createCartFlowSuite(opts = {}) {
|
|
|
106
106
|
vitest.expect(res.value.items[0]?.quantity).toBe(2);
|
|
107
107
|
});
|
|
108
108
|
vitest.it("removes items and zeroes the subtotal", async () => {
|
|
109
|
-
await
|
|
109
|
+
await chunkCAG3TEXO_js.fixtures.addFirstProduct(h.client);
|
|
110
110
|
const before = await h.client.cart.get();
|
|
111
111
|
if (!before.ok) throw before.error;
|
|
112
112
|
const itemId = before.value.items[0]?.id;
|
|
@@ -132,28 +132,28 @@ function createContractSuite(opts = {}) {
|
|
|
132
132
|
vitest.describe(opts.label ?? "SDK \u2194 mock contract", () => {
|
|
133
133
|
let h;
|
|
134
134
|
vitest.beforeEach(() => {
|
|
135
|
-
h =
|
|
135
|
+
h = chunkCAG3TEXO_js.createTestClient(opts);
|
|
136
136
|
});
|
|
137
137
|
vitest.afterEach(() => h.dispose());
|
|
138
138
|
vitest.it("AddItemPayload schema accepts a minimal valid body", () => {
|
|
139
|
-
const result =
|
|
139
|
+
const result = chunkCAG3TEXO_js.AddItemPayloadSchema.safeParse({ item_id: "prod_x", quantity: 1 });
|
|
140
140
|
vitest.expect(result.success).toBe(true);
|
|
141
141
|
});
|
|
142
142
|
vitest.it("AddItemPayload schema rejects negative quantity", () => {
|
|
143
|
-
const result =
|
|
143
|
+
const result = chunkCAG3TEXO_js.AddItemPayloadSchema.safeParse({ item_id: "prod_x", quantity: -1 });
|
|
144
144
|
vitest.expect(result.success).toBe(false);
|
|
145
145
|
});
|
|
146
146
|
vitest.it("AddItemPayload schema rejects empty item_id", () => {
|
|
147
|
-
const result =
|
|
147
|
+
const result = chunkCAG3TEXO_js.AddItemPayloadSchema.safeParse({ item_id: "", quantity: 1 });
|
|
148
148
|
vitest.expect(result.success).toBe(false);
|
|
149
149
|
});
|
|
150
150
|
vitest.it("Cart line items returned by the mock match CartItemSchema", async () => {
|
|
151
|
-
const { product } = await
|
|
151
|
+
const { product } = await chunkCAG3TEXO_js.fixtures.addFirstProduct(h.client);
|
|
152
152
|
const get = await h.client.cart.get();
|
|
153
153
|
if (!get.ok) throw get.error;
|
|
154
154
|
vitest.expect(get.value.items.length).toBeGreaterThan(0);
|
|
155
155
|
for (const item of get.value.items) {
|
|
156
|
-
const result =
|
|
156
|
+
const result = chunkCAG3TEXO_js.CartItemSchema.safeParse(item);
|
|
157
157
|
if (!result.success) {
|
|
158
158
|
const issues = result.error.issues.map((i) => ` \u2022 ${i.path.join(".")}: ${i.message}`).join("\n");
|
|
159
159
|
throw new Error(`Cart item shape mismatch for ${product.name}:
|
|
@@ -163,19 +163,19 @@ ${issues}`);
|
|
|
163
163
|
}
|
|
164
164
|
});
|
|
165
165
|
vitest.it("CheckoutResponse from the mock includes bill_token", async () => {
|
|
166
|
-
await
|
|
166
|
+
await chunkCAG3TEXO_js.fixtures.addFirstProduct(h.client);
|
|
167
167
|
const cartRes = await h.client.cart.get();
|
|
168
168
|
if (!cartRes.ok) throw cartRes.error;
|
|
169
169
|
const checkout = await h.client.checkout.process({
|
|
170
170
|
cart_id: cartRes.value.id,
|
|
171
|
-
customer:
|
|
171
|
+
customer: chunkCAG3TEXO_js.fixtures.customer(),
|
|
172
172
|
order_type: "delivery",
|
|
173
173
|
payment_method: "mobile_money",
|
|
174
174
|
mobile_money_details: { phone_number: "+233244000000", provider: "mtn" }
|
|
175
175
|
});
|
|
176
176
|
vitest.expect(checkout.ok).toBe(true);
|
|
177
177
|
if (!checkout.ok) return;
|
|
178
|
-
const result =
|
|
178
|
+
const result = chunkCAG3TEXO_js.CheckoutResponseSchema.safeParse(checkout.value);
|
|
179
179
|
if (!result.success) {
|
|
180
180
|
const issues = result.error.issues.map((i) => ` \u2022 ${i.path.join(".")}: ${i.message}`).join("\n");
|
|
181
181
|
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-QCS6D4XW.mjs';
|
|
2
|
+
import '../chunk-GUZXQSGI.mjs';
|
|
3
|
+
import '../chunk-FXACV333.mjs';
|
|
4
4
|
import '../chunk-XY2DFX5K.mjs';
|
|
5
5
|
import '../chunk-632JEJUS.mjs';
|
|
6
6
|
import '../chunk-Z2AYLZDF.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-BbrCopIS.mjs';
|
|
4
|
+
import './client-CF2pmEE9.mjs';
|
|
5
5
|
import './product-C-xLzh7Q.mjs';
|
|
6
6
|
import './payment-9L_-GWqQ.mjs';
|
|
7
7
|
import './server-BgccqOLT.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-BvEjhvwq.js';
|
|
4
|
+
import './client-B6x53-Al.js';
|
|
5
5
|
import './product-C-xLzh7Q.js';
|
|
6
6
|
import './payment-_e99nSRj.js';
|
|
7
7
|
import './server-72rzvJ4Y.js';
|
package/dist/testing.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
3
|
+
var chunkCAG3TEXO_js = require('./chunk-CAG3TEXO.js');
|
|
4
|
+
require('./chunk-FJQC4VSN.js');
|
|
5
|
+
require('./chunk-VOWMB2KR.js');
|
|
6
6
|
require('./chunk-6RP6OPYO.js');
|
|
7
7
|
require('./chunk-GEWFWQYK.js');
|
|
8
8
|
require('./chunk-TKOTACKZ.js');
|
|
9
9
|
var zod = require('zod');
|
|
10
10
|
|
|
11
11
|
var PUBLIC_SCHEMAS = {
|
|
12
|
-
Brand:
|
|
13
|
-
AddItemPayload:
|
|
14
|
-
Cart:
|
|
15
|
-
CartItem:
|
|
16
|
-
CartPricing:
|
|
17
|
-
CheckoutBody:
|
|
18
|
-
CheckoutResponse:
|
|
19
|
-
VariantInfo:
|
|
12
|
+
Brand: chunkCAG3TEXO_js.BrandSchema,
|
|
13
|
+
AddItemPayload: chunkCAG3TEXO_js.AddItemPayloadSchema,
|
|
14
|
+
Cart: chunkCAG3TEXO_js.CartSchema,
|
|
15
|
+
CartItem: chunkCAG3TEXO_js.CartItemSchema,
|
|
16
|
+
CartPricing: chunkCAG3TEXO_js.CartPricingSchema,
|
|
17
|
+
CheckoutBody: chunkCAG3TEXO_js.CheckoutBodySchema,
|
|
18
|
+
CheckoutResponse: chunkCAG3TEXO_js.CheckoutResponseSchema,
|
|
19
|
+
VariantInfo: chunkCAG3TEXO_js.VariantInfoSchema
|
|
20
20
|
};
|
|
21
21
|
function exportJsonSchemas() {
|
|
22
22
|
const out = {};
|
|
23
23
|
for (const [name, schema] of Object.entries(PUBLIC_SCHEMAS)) {
|
|
24
|
-
const meta =
|
|
25
|
-
const json = zod.z.toJSONSchema(schema, { metadata:
|
|
24
|
+
const meta = chunkCAG3TEXO_js.cimplifyRegistry.get(schema);
|
|
25
|
+
const json = zod.z.toJSONSchema(schema, { metadata: chunkCAG3TEXO_js.cimplifyRegistry });
|
|
26
26
|
if (meta) {
|
|
27
27
|
json.$id = meta.id;
|
|
28
28
|
json["x-cimplify-version"] = meta.version;
|
|
@@ -34,16 +34,16 @@ function exportJsonSchemas() {
|
|
|
34
34
|
function listRegisteredSchemas() {
|
|
35
35
|
const entries = [];
|
|
36
36
|
for (const schema of [
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
37
|
+
chunkCAG3TEXO_js.BrandSchema,
|
|
38
|
+
chunkCAG3TEXO_js.AddItemPayloadSchema,
|
|
39
|
+
chunkCAG3TEXO_js.CartSchema,
|
|
40
|
+
chunkCAG3TEXO_js.CartItemSchema,
|
|
41
|
+
chunkCAG3TEXO_js.CartPricingSchema,
|
|
42
|
+
chunkCAG3TEXO_js.CheckoutBodySchema,
|
|
43
|
+
chunkCAG3TEXO_js.CheckoutResponseSchema,
|
|
44
|
+
chunkCAG3TEXO_js.VariantInfoSchema
|
|
45
45
|
]) {
|
|
46
|
-
const meta =
|
|
46
|
+
const meta = chunkCAG3TEXO_js.cimplifyRegistry.get(schema);
|
|
47
47
|
if (meta) entries.push({ schema, meta });
|
|
48
48
|
}
|
|
49
49
|
return entries;
|
|
@@ -51,227 +51,227 @@ function listRegisteredSchemas() {
|
|
|
51
51
|
|
|
52
52
|
Object.defineProperty(exports, "AddItemPayloadSchema", {
|
|
53
53
|
enumerable: true,
|
|
54
|
-
get: function () { return
|
|
54
|
+
get: function () { return chunkCAG3TEXO_js.AddItemPayloadSchema; }
|
|
55
55
|
});
|
|
56
56
|
Object.defineProperty(exports, "AddOnDetailsSchema", {
|
|
57
57
|
enumerable: true,
|
|
58
|
-
get: function () { return
|
|
58
|
+
get: function () { return chunkCAG3TEXO_js.AddOnDetailsSchema; }
|
|
59
59
|
});
|
|
60
60
|
Object.defineProperty(exports, "AddOnGroupDetailsSchema", {
|
|
61
61
|
enumerable: true,
|
|
62
|
-
get: function () { return
|
|
62
|
+
get: function () { return chunkCAG3TEXO_js.AddOnGroupDetailsSchema; }
|
|
63
63
|
});
|
|
64
64
|
Object.defineProperty(exports, "AddOnInDetailsSchema", {
|
|
65
65
|
enumerable: true,
|
|
66
|
-
get: function () { return
|
|
66
|
+
get: function () { return chunkCAG3TEXO_js.AddOnInDetailsSchema; }
|
|
67
67
|
});
|
|
68
68
|
Object.defineProperty(exports, "AddOnOptionDetailsSchema", {
|
|
69
69
|
enumerable: true,
|
|
70
|
-
get: function () { return
|
|
70
|
+
get: function () { return chunkCAG3TEXO_js.AddOnOptionDetailsSchema; }
|
|
71
71
|
});
|
|
72
72
|
Object.defineProperty(exports, "AuthorizationTypeSchema", {
|
|
73
73
|
enumerable: true,
|
|
74
|
-
get: function () { return
|
|
74
|
+
get: function () { return chunkCAG3TEXO_js.AuthorizationTypeSchema; }
|
|
75
75
|
});
|
|
76
76
|
Object.defineProperty(exports, "BrandContactSchema", {
|
|
77
77
|
enumerable: true,
|
|
78
|
-
get: function () { return
|
|
78
|
+
get: function () { return chunkCAG3TEXO_js.BrandContactSchema; }
|
|
79
79
|
});
|
|
80
80
|
Object.defineProperty(exports, "BrandFaqSchema", {
|
|
81
81
|
enumerable: true,
|
|
82
|
-
get: function () { return
|
|
82
|
+
get: function () { return chunkCAG3TEXO_js.BrandFaqSchema; }
|
|
83
83
|
});
|
|
84
84
|
Object.defineProperty(exports, "BrandHeroSchema", {
|
|
85
85
|
enumerable: true,
|
|
86
|
-
get: function () { return
|
|
86
|
+
get: function () { return chunkCAG3TEXO_js.BrandHeroSchema; }
|
|
87
87
|
});
|
|
88
88
|
Object.defineProperty(exports, "BrandNavLinkSchema", {
|
|
89
89
|
enumerable: true,
|
|
90
|
-
get: function () { return
|
|
90
|
+
get: function () { return chunkCAG3TEXO_js.BrandNavLinkSchema; }
|
|
91
91
|
});
|
|
92
92
|
Object.defineProperty(exports, "BrandPolicyPageSchema", {
|
|
93
93
|
enumerable: true,
|
|
94
|
-
get: function () { return
|
|
94
|
+
get: function () { return chunkCAG3TEXO_js.BrandPolicyPageSchema; }
|
|
95
95
|
});
|
|
96
96
|
Object.defineProperty(exports, "BrandPolicySectionSchema", {
|
|
97
97
|
enumerable: true,
|
|
98
|
-
get: function () { return
|
|
98
|
+
get: function () { return chunkCAG3TEXO_js.BrandPolicySectionSchema; }
|
|
99
99
|
});
|
|
100
100
|
Object.defineProperty(exports, "BrandSchema", {
|
|
101
101
|
enumerable: true,
|
|
102
|
-
get: function () { return
|
|
102
|
+
get: function () { return chunkCAG3TEXO_js.BrandSchema; }
|
|
103
103
|
});
|
|
104
104
|
Object.defineProperty(exports, "BrandSocialSchema", {
|
|
105
105
|
enumerable: true,
|
|
106
|
-
get: function () { return
|
|
106
|
+
get: function () { return chunkCAG3TEXO_js.BrandSocialSchema; }
|
|
107
107
|
});
|
|
108
108
|
Object.defineProperty(exports, "BundleResolvedSchema", {
|
|
109
109
|
enumerable: true,
|
|
110
|
-
get: function () { return
|
|
110
|
+
get: function () { return chunkCAG3TEXO_js.BundleResolvedSchema; }
|
|
111
111
|
});
|
|
112
112
|
Object.defineProperty(exports, "BundleSelectionInputSchema", {
|
|
113
113
|
enumerable: true,
|
|
114
|
-
get: function () { return
|
|
114
|
+
get: function () { return chunkCAG3TEXO_js.BundleSelectionInputSchema; }
|
|
115
115
|
});
|
|
116
116
|
Object.defineProperty(exports, "CartItemSchema", {
|
|
117
117
|
enumerable: true,
|
|
118
|
-
get: function () { return
|
|
118
|
+
get: function () { return chunkCAG3TEXO_js.CartItemSchema; }
|
|
119
119
|
});
|
|
120
120
|
Object.defineProperty(exports, "CartPricingSchema", {
|
|
121
121
|
enumerable: true,
|
|
122
|
-
get: function () { return
|
|
122
|
+
get: function () { return chunkCAG3TEXO_js.CartPricingSchema; }
|
|
123
123
|
});
|
|
124
124
|
Object.defineProperty(exports, "CartSchema", {
|
|
125
125
|
enumerable: true,
|
|
126
|
-
get: function () { return
|
|
126
|
+
get: function () { return chunkCAG3TEXO_js.CartSchema; }
|
|
127
127
|
});
|
|
128
128
|
Object.defineProperty(exports, "CheckoutBodySchema", {
|
|
129
129
|
enumerable: true,
|
|
130
|
-
get: function () { return
|
|
130
|
+
get: function () { return chunkCAG3TEXO_js.CheckoutBodySchema; }
|
|
131
131
|
});
|
|
132
132
|
Object.defineProperty(exports, "CheckoutCustomerSchema", {
|
|
133
133
|
enumerable: true,
|
|
134
|
-
get: function () { return
|
|
134
|
+
get: function () { return chunkCAG3TEXO_js.CheckoutCustomerSchema; }
|
|
135
135
|
});
|
|
136
136
|
Object.defineProperty(exports, "CheckoutResponseSchema", {
|
|
137
137
|
enumerable: true,
|
|
138
|
-
get: function () { return
|
|
138
|
+
get: function () { return chunkCAG3TEXO_js.CheckoutResponseSchema; }
|
|
139
139
|
});
|
|
140
140
|
Object.defineProperty(exports, "ChosenPriceSchema", {
|
|
141
141
|
enumerable: true,
|
|
142
|
-
get: function () { return
|
|
142
|
+
get: function () { return chunkCAG3TEXO_js.ChosenPriceSchema; }
|
|
143
143
|
});
|
|
144
144
|
Object.defineProperty(exports, "CompositeResolvedSchema", {
|
|
145
145
|
enumerable: true,
|
|
146
|
-
get: function () { return
|
|
146
|
+
get: function () { return chunkCAG3TEXO_js.CompositeResolvedSchema; }
|
|
147
147
|
});
|
|
148
148
|
Object.defineProperty(exports, "CompositeSelectionInputSchema", {
|
|
149
149
|
enumerable: true,
|
|
150
|
-
get: function () { return
|
|
150
|
+
get: function () { return chunkCAG3TEXO_js.CompositeSelectionInputSchema; }
|
|
151
151
|
});
|
|
152
152
|
Object.defineProperty(exports, "CountryCodeSchema", {
|
|
153
153
|
enumerable: true,
|
|
154
|
-
get: function () { return
|
|
154
|
+
get: function () { return chunkCAG3TEXO_js.CountryCodeSchema; }
|
|
155
155
|
});
|
|
156
156
|
Object.defineProperty(exports, "CurrencyCodeSchema", {
|
|
157
157
|
enumerable: true,
|
|
158
|
-
get: function () { return
|
|
158
|
+
get: function () { return chunkCAG3TEXO_js.CurrencyCodeSchema; }
|
|
159
159
|
});
|
|
160
160
|
Object.defineProperty(exports, "CustomerInputValueSchema", {
|
|
161
161
|
enumerable: true,
|
|
162
|
-
get: function () { return
|
|
162
|
+
get: function () { return chunkCAG3TEXO_js.CustomerInputValueSchema; }
|
|
163
163
|
});
|
|
164
164
|
Object.defineProperty(exports, "DiscountDetailsSchema", {
|
|
165
165
|
enumerable: true,
|
|
166
|
-
get: function () { return
|
|
166
|
+
get: function () { return chunkCAG3TEXO_js.DiscountDetailsSchema; }
|
|
167
167
|
});
|
|
168
168
|
Object.defineProperty(exports, "IsoDateTimeSchema", {
|
|
169
169
|
enumerable: true,
|
|
170
|
-
get: function () { return
|
|
170
|
+
get: function () { return chunkCAG3TEXO_js.IsoDateTimeSchema; }
|
|
171
171
|
});
|
|
172
172
|
Object.defineProperty(exports, "LineTypeSchema", {
|
|
173
173
|
enumerable: true,
|
|
174
|
-
get: function () { return
|
|
174
|
+
get: function () { return chunkCAG3TEXO_js.LineTypeSchema; }
|
|
175
175
|
});
|
|
176
176
|
Object.defineProperty(exports, "LocaleSchema", {
|
|
177
177
|
enumerable: true,
|
|
178
|
-
get: function () { return
|
|
178
|
+
get: function () { return chunkCAG3TEXO_js.LocaleSchema; }
|
|
179
179
|
});
|
|
180
180
|
Object.defineProperty(exports, "MoneyLooseSchema", {
|
|
181
181
|
enumerable: true,
|
|
182
|
-
get: function () { return
|
|
182
|
+
get: function () { return chunkCAG3TEXO_js.MoneyLooseSchema; }
|
|
183
183
|
});
|
|
184
184
|
Object.defineProperty(exports, "MoneySchema", {
|
|
185
185
|
enumerable: true,
|
|
186
|
-
get: function () { return
|
|
186
|
+
get: function () { return chunkCAG3TEXO_js.MoneySchema; }
|
|
187
187
|
});
|
|
188
188
|
Object.defineProperty(exports, "NextActionSchema", {
|
|
189
189
|
enumerable: true,
|
|
190
|
-
get: function () { return
|
|
190
|
+
get: function () { return chunkCAG3TEXO_js.NextActionSchema; }
|
|
191
191
|
});
|
|
192
192
|
Object.defineProperty(exports, "PhoneE164Schema", {
|
|
193
193
|
enumerable: true,
|
|
194
|
-
get: function () { return
|
|
194
|
+
get: function () { return chunkCAG3TEXO_js.PhoneE164Schema; }
|
|
195
195
|
});
|
|
196
196
|
Object.defineProperty(exports, "ProductTypeSchema", {
|
|
197
197
|
enumerable: true,
|
|
198
|
-
get: function () { return
|
|
198
|
+
get: function () { return chunkCAG3TEXO_js.ProductTypeSchema; }
|
|
199
199
|
});
|
|
200
200
|
Object.defineProperty(exports, "SchemaViolationError", {
|
|
201
201
|
enumerable: true,
|
|
202
|
-
get: function () { return
|
|
202
|
+
get: function () { return chunkCAG3TEXO_js.SchemaViolationError; }
|
|
203
203
|
});
|
|
204
204
|
Object.defineProperty(exports, "SeedNameSchema", {
|
|
205
205
|
enumerable: true,
|
|
206
|
-
get: function () { return
|
|
206
|
+
get: function () { return chunkCAG3TEXO_js.SeedNameSchema; }
|
|
207
207
|
});
|
|
208
208
|
Object.defineProperty(exports, "SelectedAddOnOptionSchema", {
|
|
209
209
|
enumerable: true,
|
|
210
|
-
get: function () { return
|
|
210
|
+
get: function () { return chunkCAG3TEXO_js.SelectedAddOnOptionSchema; }
|
|
211
211
|
});
|
|
212
212
|
Object.defineProperty(exports, "ServiceStatusSchema", {
|
|
213
213
|
enumerable: true,
|
|
214
|
-
get: function () { return
|
|
214
|
+
get: function () { return chunkCAG3TEXO_js.ServiceStatusSchema; }
|
|
215
215
|
});
|
|
216
216
|
Object.defineProperty(exports, "TimestampSchema", {
|
|
217
217
|
enumerable: true,
|
|
218
|
-
get: function () { return
|
|
218
|
+
get: function () { return chunkCAG3TEXO_js.TimestampSchema; }
|
|
219
219
|
});
|
|
220
220
|
Object.defineProperty(exports, "VariantDetailsSchema", {
|
|
221
221
|
enumerable: true,
|
|
222
|
-
get: function () { return
|
|
222
|
+
get: function () { return chunkCAG3TEXO_js.VariantDetailsSchema; }
|
|
223
223
|
});
|
|
224
224
|
Object.defineProperty(exports, "VariantDisplayAttributeSchema", {
|
|
225
225
|
enumerable: true,
|
|
226
|
-
get: function () { return
|
|
226
|
+
get: function () { return chunkCAG3TEXO_js.VariantDisplayAttributeSchema; }
|
|
227
227
|
});
|
|
228
228
|
Object.defineProperty(exports, "VariantInfoSchema", {
|
|
229
229
|
enumerable: true,
|
|
230
|
-
get: function () { return
|
|
230
|
+
get: function () { return chunkCAG3TEXO_js.VariantInfoSchema; }
|
|
231
231
|
});
|
|
232
232
|
Object.defineProperty(exports, "assertAddItemPayload", {
|
|
233
233
|
enumerable: true,
|
|
234
|
-
get: function () { return
|
|
234
|
+
get: function () { return chunkCAG3TEXO_js.assertAddItemPayload; }
|
|
235
235
|
});
|
|
236
236
|
Object.defineProperty(exports, "assertBrand", {
|
|
237
237
|
enumerable: true,
|
|
238
|
-
get: function () { return
|
|
238
|
+
get: function () { return chunkCAG3TEXO_js.assertBrand; }
|
|
239
239
|
});
|
|
240
240
|
Object.defineProperty(exports, "assertCart", {
|
|
241
241
|
enumerable: true,
|
|
242
|
-
get: function () { return
|
|
242
|
+
get: function () { return chunkCAG3TEXO_js.assertCart; }
|
|
243
243
|
});
|
|
244
244
|
Object.defineProperty(exports, "assertCartItem", {
|
|
245
245
|
enumerable: true,
|
|
246
|
-
get: function () { return
|
|
246
|
+
get: function () { return chunkCAG3TEXO_js.assertCartItem; }
|
|
247
247
|
});
|
|
248
248
|
Object.defineProperty(exports, "assertCheckoutBody", {
|
|
249
249
|
enumerable: true,
|
|
250
|
-
get: function () { return
|
|
250
|
+
get: function () { return chunkCAG3TEXO_js.assertCheckoutBody; }
|
|
251
251
|
});
|
|
252
252
|
Object.defineProperty(exports, "assertCheckoutResponse", {
|
|
253
253
|
enumerable: true,
|
|
254
|
-
get: function () { return
|
|
254
|
+
get: function () { return chunkCAG3TEXO_js.assertCheckoutResponse; }
|
|
255
255
|
});
|
|
256
256
|
Object.defineProperty(exports, "cimplifyRegistry", {
|
|
257
257
|
enumerable: true,
|
|
258
|
-
get: function () { return
|
|
258
|
+
get: function () { return chunkCAG3TEXO_js.cimplifyRegistry; }
|
|
259
259
|
});
|
|
260
260
|
Object.defineProperty(exports, "createTestClient", {
|
|
261
261
|
enumerable: true,
|
|
262
|
-
get: function () { return
|
|
262
|
+
get: function () { return chunkCAG3TEXO_js.createTestClient; }
|
|
263
263
|
});
|
|
264
264
|
Object.defineProperty(exports, "fixtures", {
|
|
265
265
|
enumerable: true,
|
|
266
|
-
get: function () { return
|
|
266
|
+
get: function () { return chunkCAG3TEXO_js.fixtures; }
|
|
267
267
|
});
|
|
268
268
|
Object.defineProperty(exports, "makeAssertion", {
|
|
269
269
|
enumerable: true,
|
|
270
|
-
get: function () { return
|
|
270
|
+
get: function () { return chunkCAG3TEXO_js.makeAssertion; }
|
|
271
271
|
});
|
|
272
272
|
Object.defineProperty(exports, "registerSchema", {
|
|
273
273
|
enumerable: true,
|
|
274
|
-
get: function () { return
|
|
274
|
+
get: function () { return chunkCAG3TEXO_js.registerSchema; }
|
|
275
275
|
});
|
|
276
276
|
exports.exportJsonSchemas = exportJsonSchemas;
|
|
277
277
|
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-QCS6D4XW.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-QCS6D4XW.mjs';
|
|
3
|
+
import './chunk-GUZXQSGI.mjs';
|
|
4
|
+
import './chunk-FXACV333.mjs';
|
|
5
5
|
import './chunk-XY2DFX5K.mjs';
|
|
6
6
|
import './chunk-632JEJUS.mjs';
|
|
7
7
|
import './chunk-Z2AYLZDF.mjs';
|