@cimplify/sdk 0.92.0 → 0.93.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 +3 -3
- package/dist/advanced.d.ts +3 -3
- package/dist/advanced.js +20 -20
- package/dist/advanced.mjs +1 -1
- package/dist/{chunk-OAHSF542.js → chunk-6Y7KC5YZ.js} +11 -0
- package/dist/{chunk-3MBMIEWT.js → chunk-AWNWP5J3.js} +4 -4
- package/dist/{chunk-3XD2FVP4.mjs → chunk-FKARGZK3.mjs} +195 -60
- package/dist/{chunk-DCRN67NO.js → chunk-QLGZIBRO.js} +237 -102
- package/dist/{chunk-54H2YYIW.mjs → chunk-QXWX7CD2.mjs} +2 -2
- package/dist/{chunk-IVJEUGWF.js → chunk-VEOAMBEX.js} +1 -3
- package/dist/{chunk-T7LDBZZZ.mjs → chunk-VUSHG3HA.mjs} +1 -3
- package/dist/{chunk-PYBFTMHI.mjs → chunk-X36FZZT6.mjs} +11 -0
- package/dist/{client-CeW3acve.d.ts → client-BTL9d_nN.d.mts} +29 -2
- package/dist/{client-BQbSKlHS.d.mts → client-BX30FAWZ.d.ts} +29 -2
- package/dist/{client-Bw4HtLP1.d.mts → client-Bhe2TnFW.d.mts} +2 -2
- package/dist/{client-Otzv_rgP.d.ts → client-DrkuEK_I.d.ts} +2 -2
- package/dist/{index-CmIboQjl.d.mts → index-BuNjyfaV.d.mts} +3 -3
- package/dist/{index-DgoRwz8l.d.ts → index-D-w5h82t.d.ts} +3 -3
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +69 -69
- package/dist/index.mjs +3 -3
- package/dist/mock/cli.mjs +11 -0
- package/dist/mock/library.js +11 -0
- package/dist/mock/library.mjs +11 -0
- package/dist/mock/msw.js +11 -0
- package/dist/mock/msw.mjs +11 -0
- package/dist/{payment-Cq8FT1B6.d.ts → payment-By0JidTe.d.ts} +1 -1
- package/dist/{payment-BFtLqiG2.d.mts → payment-pKPpaORI.d.mts} +1 -1
- package/dist/{price-DaFXT-Lr.d.ts → price-23RNXftz.d.ts} +1 -1
- package/dist/{price-DleDWk_s.d.mts → price-BvRtp6ak.d.mts} +1 -1
- package/dist/{product-bZ8G5Z8D.d.mts → product-O8-wcHSe.d.mts} +11 -0
- package/dist/{product-bZ8G5Z8D.d.ts → product-O8-wcHSe.d.ts} +11 -0
- package/dist/react.d.mts +13 -5
- package/dist/react.d.ts +13 -5
- package/dist/react.js +174 -75
- package/dist/react.mjs +156 -58
- package/dist/{server-D-iK-bNt.d.mts → server-BN9ZCAKT.d.mts} +5 -1
- package/dist/{server-DwsY9hlX.d.ts → server-DDGbfW_S.d.ts} +5 -1
- package/dist/server.d.mts +4 -4
- package/dist/server.d.ts +4 -4
- package/dist/server.js +7 -7
- package/dist/server.mjs +2 -2
- package/dist/testing/msw.d.mts +2 -2
- package/dist/testing/msw.d.ts +2 -2
- package/dist/testing/msw.js +2 -2
- package/dist/testing/msw.mjs +1 -1
- package/dist/testing/suite.d.mts +6 -6
- package/dist/testing/suite.d.ts +6 -6
- package/dist/testing/suite.js +23 -23
- package/dist/testing/suite.mjs +4 -4
- package/dist/testing.d.mts +5 -5
- package/dist/testing.d.ts +5 -5
- package/dist/testing.js +79 -79
- package/dist/testing.mjs +5 -5
- package/dist/utils.d.mts +4 -4
- package/dist/utils.d.ts +4 -4
- package/package.json +1 -1
- package/registry/chat-widget.json +1 -1
package/dist/testing/suite.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
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-
|
|
6
|
-
import '../product-
|
|
7
|
-
import '../payment-
|
|
2
|
+
import { T as TestClientHandle } from '../client-DrkuEK_I.js';
|
|
3
|
+
import { C as CreateAppOptions } from '../server-DDGbfW_S.js';
|
|
4
|
+
export { S as SeedName } from '../server-DDGbfW_S.js';
|
|
5
|
+
import '../client-BX30FAWZ.js';
|
|
6
|
+
import '../product-O8-wcHSe.js';
|
|
7
|
+
import '../payment-By0JidTe.js';
|
|
8
8
|
import 'hono';
|
|
9
9
|
|
|
10
10
|
/**
|
package/dist/testing/suite.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var chunkAWNWP5J3_js = require('../chunk-AWNWP5J3.js');
|
|
4
|
+
require('../chunk-6Y7KC5YZ.js');
|
|
5
5
|
require('../chunk-XREIZ56K.js');
|
|
6
|
-
require('../chunk-
|
|
7
|
-
require('../chunk-
|
|
6
|
+
require('../chunk-QLGZIBRO.js');
|
|
7
|
+
require('../chunk-VEOAMBEX.js');
|
|
8
8
|
require('../chunk-PTPOQVXS.js');
|
|
9
9
|
require('../chunk-AETVRBKI.js');
|
|
10
10
|
require('../chunk-OWW5GUSB.js');
|
|
@@ -21,11 +21,11 @@ var PLACEHOLDER_PHRASES = [
|
|
|
21
21
|
function createBrandSuite(opts) {
|
|
22
22
|
vitest.describe(opts.label ?? "brand schema", () => {
|
|
23
23
|
vitest.it("conforms to the Cimplify brand contract", () => {
|
|
24
|
-
vitest.expect(() =>
|
|
24
|
+
vitest.expect(() => chunkAWNWP5J3_js.assertBrand(opts.brand)).not.toThrow();
|
|
25
25
|
});
|
|
26
26
|
vitest.it("declares a known mock seed", () => {
|
|
27
27
|
const b = opts.brand;
|
|
28
|
-
vitest.expect(
|
|
28
|
+
vitest.expect(chunkAWNWP5J3_js.SeedNameSchema.safeParse(b.mock?.seed).success).toBe(true);
|
|
29
29
|
});
|
|
30
30
|
vitest.it("has no placeholder copy left in", () => {
|
|
31
31
|
const offenders = [];
|
|
@@ -57,7 +57,7 @@ ${msg}`);
|
|
|
57
57
|
vitest.expect(b.mock?.businessId).toMatch(/^bus_/);
|
|
58
58
|
});
|
|
59
59
|
vitest.it("zod-parses cleanly", () => {
|
|
60
|
-
const result =
|
|
60
|
+
const result = chunkAWNWP5J3_js.BrandSchema.safeParse(opts.brand);
|
|
61
61
|
if (!result.success) {
|
|
62
62
|
throw new Error(
|
|
63
63
|
"Brand schema violations:\n" + result.error.issues.map((i) => ` \u2022 brand.${i.path.join(".")}: ${i.message}`).join("\n")
|
|
@@ -72,23 +72,23 @@ function createCartFlowSuite(opts = {}) {
|
|
|
72
72
|
vitest.describe(opts.label ?? "cart flow against in-process mock", () => {
|
|
73
73
|
let h;
|
|
74
74
|
vitest.beforeEach(() => {
|
|
75
|
-
h =
|
|
75
|
+
h = chunkAWNWP5J3_js.createTestClient(opts);
|
|
76
76
|
});
|
|
77
77
|
vitest.afterEach(() => h.dispose());
|
|
78
78
|
vitest.it("starts with an empty cart matching the canonical shape", async () => {
|
|
79
79
|
const res = await h.client.cart.get();
|
|
80
80
|
vitest.expect(res.ok).toBe(true);
|
|
81
81
|
if (!res.ok) return;
|
|
82
|
-
vitest.expect(() =>
|
|
82
|
+
vitest.expect(() => chunkAWNWP5J3_js.assertCart(res.value)).not.toThrow();
|
|
83
83
|
vitest.expect(res.value.items).toHaveLength(0);
|
|
84
84
|
});
|
|
85
85
|
vitest.it("adds the first product, persists it, and returns a shape-valid cart", async () => {
|
|
86
|
-
const { product, variantId } = await
|
|
86
|
+
const { product, variantId } = await chunkAWNWP5J3_js.fixtures.addFirstProduct(h.client);
|
|
87
87
|
vitest.expect(product.id).toBeTruthy();
|
|
88
88
|
const get = await h.client.cart.get();
|
|
89
89
|
vitest.expect(get.ok).toBe(true);
|
|
90
90
|
if (!get.ok) return;
|
|
91
|
-
vitest.expect(() =>
|
|
91
|
+
vitest.expect(() => chunkAWNWP5J3_js.assertCart(get.value)).not.toThrow();
|
|
92
92
|
vitest.expect(get.value.items).toHaveLength(1);
|
|
93
93
|
vitest.expect(get.value.items[0]?.item_id).toBe(product.id);
|
|
94
94
|
if (variantId) {
|
|
@@ -99,8 +99,8 @@ function createCartFlowSuite(opts = {}) {
|
|
|
99
99
|
vitest.expect(parseFloat(String(get.value.pricing.subtotal))).toBeGreaterThan(0);
|
|
100
100
|
});
|
|
101
101
|
vitest.it("dedupes by line_key when adding the same product twice", async () => {
|
|
102
|
-
await
|
|
103
|
-
await
|
|
102
|
+
await chunkAWNWP5J3_js.fixtures.addFirstProduct(h.client);
|
|
103
|
+
await chunkAWNWP5J3_js.fixtures.addFirstProduct(h.client);
|
|
104
104
|
const res = await h.client.cart.get();
|
|
105
105
|
vitest.expect(res.ok).toBe(true);
|
|
106
106
|
if (!res.ok) return;
|
|
@@ -108,7 +108,7 @@ function createCartFlowSuite(opts = {}) {
|
|
|
108
108
|
vitest.expect(res.value.items[0]?.quantity).toBe(2);
|
|
109
109
|
});
|
|
110
110
|
vitest.it("removes items and zeroes the subtotal", async () => {
|
|
111
|
-
await
|
|
111
|
+
await chunkAWNWP5J3_js.fixtures.addFirstProduct(h.client);
|
|
112
112
|
const before = await h.client.cart.get();
|
|
113
113
|
if (!before.ok) throw before.error;
|
|
114
114
|
const itemId = before.value.items[0]?.id;
|
|
@@ -134,28 +134,28 @@ function createContractSuite(opts = {}) {
|
|
|
134
134
|
vitest.describe(opts.label ?? "SDK \u2194 mock contract", () => {
|
|
135
135
|
let h;
|
|
136
136
|
vitest.beforeEach(() => {
|
|
137
|
-
h =
|
|
137
|
+
h = chunkAWNWP5J3_js.createTestClient(opts);
|
|
138
138
|
});
|
|
139
139
|
vitest.afterEach(() => h.dispose());
|
|
140
140
|
vitest.it("AddItemPayload schema accepts a minimal valid body", () => {
|
|
141
|
-
const result =
|
|
141
|
+
const result = chunkAWNWP5J3_js.AddItemPayloadSchema.safeParse({ item_id: "prod_x", quantity: 1 });
|
|
142
142
|
vitest.expect(result.success).toBe(true);
|
|
143
143
|
});
|
|
144
144
|
vitest.it("AddItemPayload schema rejects negative quantity", () => {
|
|
145
|
-
const result =
|
|
145
|
+
const result = chunkAWNWP5J3_js.AddItemPayloadSchema.safeParse({ item_id: "prod_x", quantity: -1 });
|
|
146
146
|
vitest.expect(result.success).toBe(false);
|
|
147
147
|
});
|
|
148
148
|
vitest.it("AddItemPayload schema rejects empty item_id", () => {
|
|
149
|
-
const result =
|
|
149
|
+
const result = chunkAWNWP5J3_js.AddItemPayloadSchema.safeParse({ item_id: "", quantity: 1 });
|
|
150
150
|
vitest.expect(result.success).toBe(false);
|
|
151
151
|
});
|
|
152
152
|
vitest.it("Cart line items returned by the mock match CartItemSchema", async () => {
|
|
153
|
-
const { product } = await
|
|
153
|
+
const { product } = await chunkAWNWP5J3_js.fixtures.addFirstProduct(h.client);
|
|
154
154
|
const get = await h.client.cart.get();
|
|
155
155
|
if (!get.ok) throw get.error;
|
|
156
156
|
vitest.expect(get.value.items.length).toBeGreaterThan(0);
|
|
157
157
|
for (const item of get.value.items) {
|
|
158
|
-
const result =
|
|
158
|
+
const result = chunkAWNWP5J3_js.CartItemSchema.safeParse(item);
|
|
159
159
|
if (!result.success) {
|
|
160
160
|
const issues = result.error.issues.map((i) => ` \u2022 ${i.path.join(".")}: ${i.message}`).join("\n");
|
|
161
161
|
throw new Error(`Cart item shape mismatch for ${product.name}:
|
|
@@ -165,19 +165,19 @@ ${issues}`);
|
|
|
165
165
|
}
|
|
166
166
|
});
|
|
167
167
|
vitest.it("CheckoutResponse from the mock includes bill_token", async () => {
|
|
168
|
-
await
|
|
168
|
+
await chunkAWNWP5J3_js.fixtures.addFirstProduct(h.client);
|
|
169
169
|
const cartRes = await h.client.cart.get();
|
|
170
170
|
if (!cartRes.ok) throw cartRes.error;
|
|
171
171
|
const checkout = await h.client.checkout.process({
|
|
172
172
|
cart_id: cartRes.value.id,
|
|
173
|
-
customer:
|
|
173
|
+
customer: chunkAWNWP5J3_js.fixtures.customer(),
|
|
174
174
|
order_type: "delivery",
|
|
175
175
|
payment_method: "mobile_money",
|
|
176
176
|
mobile_money_details: { phone_number: "+233244000000", provider: "mtn" }
|
|
177
177
|
});
|
|
178
178
|
vitest.expect(checkout.ok).toBe(true);
|
|
179
179
|
if (!checkout.ok) return;
|
|
180
|
-
const result =
|
|
180
|
+
const result = chunkAWNWP5J3_js.CheckoutResponseSchema.safeParse(checkout.value);
|
|
181
181
|
if (!result.success) {
|
|
182
182
|
const issues = result.error.issues.map((i) => ` \u2022 ${i.path.join(".")}: ${i.message}`).join("\n");
|
|
183
183
|
throw new Error(`CheckoutResponse shape mismatch:
|
package/dist/testing/suite.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { assertBrand, SeedNameSchema, BrandSchema, createTestClient, assertCart, fixtures, AddItemPayloadSchema, CartItemSchema, CheckoutResponseSchema } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
import { assertBrand, SeedNameSchema, BrandSchema, createTestClient, assertCart, fixtures, AddItemPayloadSchema, CartItemSchema, CheckoutResponseSchema } from '../chunk-QXWX7CD2.mjs';
|
|
2
|
+
import '../chunk-X36FZZT6.mjs';
|
|
3
3
|
import '../chunk-U4MW6PYU.mjs';
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-FKARGZK3.mjs';
|
|
5
|
+
import '../chunk-VUSHG3HA.mjs';
|
|
6
6
|
import '../chunk-KFLGQGMC.mjs';
|
|
7
7
|
import '../chunk-K5EN2W2Q.mjs';
|
|
8
8
|
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-
|
|
5
|
-
import './product-
|
|
6
|
-
import './payment-
|
|
7
|
-
import './server-
|
|
3
|
+
export { A as AddFirstProductOptions, a as AddFirstProductResult, P as ProductSummary, T as TestClientHandle, c as createTestClient, f as fixtures } from './client-Bhe2TnFW.mjs';
|
|
4
|
+
import './client-BTL9d_nN.mjs';
|
|
5
|
+
import './product-O8-wcHSe.mjs';
|
|
6
|
+
import './payment-pKPpaORI.mjs';
|
|
7
|
+
import './server-BN9ZCAKT.mjs';
|
|
8
8
|
import 'hono';
|
|
9
9
|
|
|
10
10
|
/**
|
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-
|
|
5
|
-
import './product-
|
|
6
|
-
import './payment-
|
|
7
|
-
import './server-
|
|
3
|
+
export { A as AddFirstProductOptions, a as AddFirstProductResult, P as ProductSummary, T as TestClientHandle, c as createTestClient, f as fixtures } from './client-DrkuEK_I.js';
|
|
4
|
+
import './client-BX30FAWZ.js';
|
|
5
|
+
import './product-O8-wcHSe.js';
|
|
6
|
+
import './payment-By0JidTe.js';
|
|
7
|
+
import './server-DDGbfW_S.js';
|
|
8
8
|
import 'hono';
|
|
9
9
|
|
|
10
10
|
/**
|
package/dist/testing.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var chunkAWNWP5J3_js = require('./chunk-AWNWP5J3.js');
|
|
4
|
+
require('./chunk-6Y7KC5YZ.js');
|
|
5
5
|
require('./chunk-XREIZ56K.js');
|
|
6
|
-
require('./chunk-
|
|
7
|
-
require('./chunk-
|
|
6
|
+
require('./chunk-QLGZIBRO.js');
|
|
7
|
+
require('./chunk-VEOAMBEX.js');
|
|
8
8
|
require('./chunk-PTPOQVXS.js');
|
|
9
9
|
require('./chunk-AETVRBKI.js');
|
|
10
10
|
require('./chunk-OWW5GUSB.js');
|
|
11
11
|
var zod = require('zod');
|
|
12
12
|
|
|
13
13
|
var PUBLIC_SCHEMAS = {
|
|
14
|
-
Brand:
|
|
15
|
-
AddItemPayload:
|
|
16
|
-
Cart:
|
|
17
|
-
CartItem:
|
|
18
|
-
CartPricing:
|
|
19
|
-
CheckoutBody:
|
|
20
|
-
CheckoutResponse:
|
|
21
|
-
VariantInfo:
|
|
14
|
+
Brand: chunkAWNWP5J3_js.BrandSchema,
|
|
15
|
+
AddItemPayload: chunkAWNWP5J3_js.AddItemPayloadSchema,
|
|
16
|
+
Cart: chunkAWNWP5J3_js.CartSchema,
|
|
17
|
+
CartItem: chunkAWNWP5J3_js.CartItemSchema,
|
|
18
|
+
CartPricing: chunkAWNWP5J3_js.CartPricingSchema,
|
|
19
|
+
CheckoutBody: chunkAWNWP5J3_js.CheckoutBodySchema,
|
|
20
|
+
CheckoutResponse: chunkAWNWP5J3_js.CheckoutResponseSchema,
|
|
21
|
+
VariantInfo: chunkAWNWP5J3_js.VariantInfoSchema
|
|
22
22
|
};
|
|
23
23
|
function exportJsonSchemas() {
|
|
24
24
|
const out = {};
|
|
25
25
|
for (const [name, schema] of Object.entries(PUBLIC_SCHEMAS)) {
|
|
26
|
-
const meta =
|
|
27
|
-
const json = zod.z.toJSONSchema(schema, { metadata:
|
|
26
|
+
const meta = chunkAWNWP5J3_js.cimplifyRegistry.get(schema);
|
|
27
|
+
const json = zod.z.toJSONSchema(schema, { metadata: chunkAWNWP5J3_js.cimplifyRegistry });
|
|
28
28
|
if (meta) {
|
|
29
29
|
json.$id = meta.id;
|
|
30
30
|
json["x-cimplify-version"] = meta.version;
|
|
@@ -36,16 +36,16 @@ function exportJsonSchemas() {
|
|
|
36
36
|
function listRegisteredSchemas() {
|
|
37
37
|
const entries = [];
|
|
38
38
|
for (const schema of [
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
39
|
+
chunkAWNWP5J3_js.BrandSchema,
|
|
40
|
+
chunkAWNWP5J3_js.AddItemPayloadSchema,
|
|
41
|
+
chunkAWNWP5J3_js.CartSchema,
|
|
42
|
+
chunkAWNWP5J3_js.CartItemSchema,
|
|
43
|
+
chunkAWNWP5J3_js.CartPricingSchema,
|
|
44
|
+
chunkAWNWP5J3_js.CheckoutBodySchema,
|
|
45
|
+
chunkAWNWP5J3_js.CheckoutResponseSchema,
|
|
46
|
+
chunkAWNWP5J3_js.VariantInfoSchema
|
|
47
47
|
]) {
|
|
48
|
-
const meta =
|
|
48
|
+
const meta = chunkAWNWP5J3_js.cimplifyRegistry.get(schema);
|
|
49
49
|
if (meta) entries.push({ schema, meta });
|
|
50
50
|
}
|
|
51
51
|
return entries;
|
|
@@ -53,227 +53,227 @@ function listRegisteredSchemas() {
|
|
|
53
53
|
|
|
54
54
|
Object.defineProperty(exports, "AddItemPayloadSchema", {
|
|
55
55
|
enumerable: true,
|
|
56
|
-
get: function () { return
|
|
56
|
+
get: function () { return chunkAWNWP5J3_js.AddItemPayloadSchema; }
|
|
57
57
|
});
|
|
58
58
|
Object.defineProperty(exports, "AddOnDetailsSchema", {
|
|
59
59
|
enumerable: true,
|
|
60
|
-
get: function () { return
|
|
60
|
+
get: function () { return chunkAWNWP5J3_js.AddOnDetailsSchema; }
|
|
61
61
|
});
|
|
62
62
|
Object.defineProperty(exports, "AddOnGroupDetailsSchema", {
|
|
63
63
|
enumerable: true,
|
|
64
|
-
get: function () { return
|
|
64
|
+
get: function () { return chunkAWNWP5J3_js.AddOnGroupDetailsSchema; }
|
|
65
65
|
});
|
|
66
66
|
Object.defineProperty(exports, "AddOnInDetailsSchema", {
|
|
67
67
|
enumerable: true,
|
|
68
|
-
get: function () { return
|
|
68
|
+
get: function () { return chunkAWNWP5J3_js.AddOnInDetailsSchema; }
|
|
69
69
|
});
|
|
70
70
|
Object.defineProperty(exports, "AddOnOptionDetailsSchema", {
|
|
71
71
|
enumerable: true,
|
|
72
|
-
get: function () { return
|
|
72
|
+
get: function () { return chunkAWNWP5J3_js.AddOnOptionDetailsSchema; }
|
|
73
73
|
});
|
|
74
74
|
Object.defineProperty(exports, "AuthorizationTypeSchema", {
|
|
75
75
|
enumerable: true,
|
|
76
|
-
get: function () { return
|
|
76
|
+
get: function () { return chunkAWNWP5J3_js.AuthorizationTypeSchema; }
|
|
77
77
|
});
|
|
78
78
|
Object.defineProperty(exports, "BrandContactSchema", {
|
|
79
79
|
enumerable: true,
|
|
80
|
-
get: function () { return
|
|
80
|
+
get: function () { return chunkAWNWP5J3_js.BrandContactSchema; }
|
|
81
81
|
});
|
|
82
82
|
Object.defineProperty(exports, "BrandFaqSchema", {
|
|
83
83
|
enumerable: true,
|
|
84
|
-
get: function () { return
|
|
84
|
+
get: function () { return chunkAWNWP5J3_js.BrandFaqSchema; }
|
|
85
85
|
});
|
|
86
86
|
Object.defineProperty(exports, "BrandHeroSchema", {
|
|
87
87
|
enumerable: true,
|
|
88
|
-
get: function () { return
|
|
88
|
+
get: function () { return chunkAWNWP5J3_js.BrandHeroSchema; }
|
|
89
89
|
});
|
|
90
90
|
Object.defineProperty(exports, "BrandNavLinkSchema", {
|
|
91
91
|
enumerable: true,
|
|
92
|
-
get: function () { return
|
|
92
|
+
get: function () { return chunkAWNWP5J3_js.BrandNavLinkSchema; }
|
|
93
93
|
});
|
|
94
94
|
Object.defineProperty(exports, "BrandPolicyPageSchema", {
|
|
95
95
|
enumerable: true,
|
|
96
|
-
get: function () { return
|
|
96
|
+
get: function () { return chunkAWNWP5J3_js.BrandPolicyPageSchema; }
|
|
97
97
|
});
|
|
98
98
|
Object.defineProperty(exports, "BrandPolicySectionSchema", {
|
|
99
99
|
enumerable: true,
|
|
100
|
-
get: function () { return
|
|
100
|
+
get: function () { return chunkAWNWP5J3_js.BrandPolicySectionSchema; }
|
|
101
101
|
});
|
|
102
102
|
Object.defineProperty(exports, "BrandSchema", {
|
|
103
103
|
enumerable: true,
|
|
104
|
-
get: function () { return
|
|
104
|
+
get: function () { return chunkAWNWP5J3_js.BrandSchema; }
|
|
105
105
|
});
|
|
106
106
|
Object.defineProperty(exports, "BrandSocialSchema", {
|
|
107
107
|
enumerable: true,
|
|
108
|
-
get: function () { return
|
|
108
|
+
get: function () { return chunkAWNWP5J3_js.BrandSocialSchema; }
|
|
109
109
|
});
|
|
110
110
|
Object.defineProperty(exports, "BundleResolvedSchema", {
|
|
111
111
|
enumerable: true,
|
|
112
|
-
get: function () { return
|
|
112
|
+
get: function () { return chunkAWNWP5J3_js.BundleResolvedSchema; }
|
|
113
113
|
});
|
|
114
114
|
Object.defineProperty(exports, "BundleSelectionInputSchema", {
|
|
115
115
|
enumerable: true,
|
|
116
|
-
get: function () { return
|
|
116
|
+
get: function () { return chunkAWNWP5J3_js.BundleSelectionInputSchema; }
|
|
117
117
|
});
|
|
118
118
|
Object.defineProperty(exports, "CartItemSchema", {
|
|
119
119
|
enumerable: true,
|
|
120
|
-
get: function () { return
|
|
120
|
+
get: function () { return chunkAWNWP5J3_js.CartItemSchema; }
|
|
121
121
|
});
|
|
122
122
|
Object.defineProperty(exports, "CartPricingSchema", {
|
|
123
123
|
enumerable: true,
|
|
124
|
-
get: function () { return
|
|
124
|
+
get: function () { return chunkAWNWP5J3_js.CartPricingSchema; }
|
|
125
125
|
});
|
|
126
126
|
Object.defineProperty(exports, "CartSchema", {
|
|
127
127
|
enumerable: true,
|
|
128
|
-
get: function () { return
|
|
128
|
+
get: function () { return chunkAWNWP5J3_js.CartSchema; }
|
|
129
129
|
});
|
|
130
130
|
Object.defineProperty(exports, "CheckoutBodySchema", {
|
|
131
131
|
enumerable: true,
|
|
132
|
-
get: function () { return
|
|
132
|
+
get: function () { return chunkAWNWP5J3_js.CheckoutBodySchema; }
|
|
133
133
|
});
|
|
134
134
|
Object.defineProperty(exports, "CheckoutCustomerSchema", {
|
|
135
135
|
enumerable: true,
|
|
136
|
-
get: function () { return
|
|
136
|
+
get: function () { return chunkAWNWP5J3_js.CheckoutCustomerSchema; }
|
|
137
137
|
});
|
|
138
138
|
Object.defineProperty(exports, "CheckoutResponseSchema", {
|
|
139
139
|
enumerable: true,
|
|
140
|
-
get: function () { return
|
|
140
|
+
get: function () { return chunkAWNWP5J3_js.CheckoutResponseSchema; }
|
|
141
141
|
});
|
|
142
142
|
Object.defineProperty(exports, "ChosenPriceSchema", {
|
|
143
143
|
enumerable: true,
|
|
144
|
-
get: function () { return
|
|
144
|
+
get: function () { return chunkAWNWP5J3_js.ChosenPriceSchema; }
|
|
145
145
|
});
|
|
146
146
|
Object.defineProperty(exports, "CompositeResolvedSchema", {
|
|
147
147
|
enumerable: true,
|
|
148
|
-
get: function () { return
|
|
148
|
+
get: function () { return chunkAWNWP5J3_js.CompositeResolvedSchema; }
|
|
149
149
|
});
|
|
150
150
|
Object.defineProperty(exports, "CompositeSelectionInputSchema", {
|
|
151
151
|
enumerable: true,
|
|
152
|
-
get: function () { return
|
|
152
|
+
get: function () { return chunkAWNWP5J3_js.CompositeSelectionInputSchema; }
|
|
153
153
|
});
|
|
154
154
|
Object.defineProperty(exports, "CountryCodeSchema", {
|
|
155
155
|
enumerable: true,
|
|
156
|
-
get: function () { return
|
|
156
|
+
get: function () { return chunkAWNWP5J3_js.CountryCodeSchema; }
|
|
157
157
|
});
|
|
158
158
|
Object.defineProperty(exports, "CurrencyCodeSchema", {
|
|
159
159
|
enumerable: true,
|
|
160
|
-
get: function () { return
|
|
160
|
+
get: function () { return chunkAWNWP5J3_js.CurrencyCodeSchema; }
|
|
161
161
|
});
|
|
162
162
|
Object.defineProperty(exports, "CustomerInputValueSchema", {
|
|
163
163
|
enumerable: true,
|
|
164
|
-
get: function () { return
|
|
164
|
+
get: function () { return chunkAWNWP5J3_js.CustomerInputValueSchema; }
|
|
165
165
|
});
|
|
166
166
|
Object.defineProperty(exports, "DiscountDetailsSchema", {
|
|
167
167
|
enumerable: true,
|
|
168
|
-
get: function () { return
|
|
168
|
+
get: function () { return chunkAWNWP5J3_js.DiscountDetailsSchema; }
|
|
169
169
|
});
|
|
170
170
|
Object.defineProperty(exports, "IsoDateTimeSchema", {
|
|
171
171
|
enumerable: true,
|
|
172
|
-
get: function () { return
|
|
172
|
+
get: function () { return chunkAWNWP5J3_js.IsoDateTimeSchema; }
|
|
173
173
|
});
|
|
174
174
|
Object.defineProperty(exports, "LineTypeSchema", {
|
|
175
175
|
enumerable: true,
|
|
176
|
-
get: function () { return
|
|
176
|
+
get: function () { return chunkAWNWP5J3_js.LineTypeSchema; }
|
|
177
177
|
});
|
|
178
178
|
Object.defineProperty(exports, "LocaleSchema", {
|
|
179
179
|
enumerable: true,
|
|
180
|
-
get: function () { return
|
|
180
|
+
get: function () { return chunkAWNWP5J3_js.LocaleSchema; }
|
|
181
181
|
});
|
|
182
182
|
Object.defineProperty(exports, "MoneyLooseSchema", {
|
|
183
183
|
enumerable: true,
|
|
184
|
-
get: function () { return
|
|
184
|
+
get: function () { return chunkAWNWP5J3_js.MoneyLooseSchema; }
|
|
185
185
|
});
|
|
186
186
|
Object.defineProperty(exports, "MoneySchema", {
|
|
187
187
|
enumerable: true,
|
|
188
|
-
get: function () { return
|
|
188
|
+
get: function () { return chunkAWNWP5J3_js.MoneySchema; }
|
|
189
189
|
});
|
|
190
190
|
Object.defineProperty(exports, "NextActionSchema", {
|
|
191
191
|
enumerable: true,
|
|
192
|
-
get: function () { return
|
|
192
|
+
get: function () { return chunkAWNWP5J3_js.NextActionSchema; }
|
|
193
193
|
});
|
|
194
194
|
Object.defineProperty(exports, "PhoneE164Schema", {
|
|
195
195
|
enumerable: true,
|
|
196
|
-
get: function () { return
|
|
196
|
+
get: function () { return chunkAWNWP5J3_js.PhoneE164Schema; }
|
|
197
197
|
});
|
|
198
198
|
Object.defineProperty(exports, "ProductTypeSchema", {
|
|
199
199
|
enumerable: true,
|
|
200
|
-
get: function () { return
|
|
200
|
+
get: function () { return chunkAWNWP5J3_js.ProductTypeSchema; }
|
|
201
201
|
});
|
|
202
202
|
Object.defineProperty(exports, "SchemaViolationError", {
|
|
203
203
|
enumerable: true,
|
|
204
|
-
get: function () { return
|
|
204
|
+
get: function () { return chunkAWNWP5J3_js.SchemaViolationError; }
|
|
205
205
|
});
|
|
206
206
|
Object.defineProperty(exports, "SeedNameSchema", {
|
|
207
207
|
enumerable: true,
|
|
208
|
-
get: function () { return
|
|
208
|
+
get: function () { return chunkAWNWP5J3_js.SeedNameSchema; }
|
|
209
209
|
});
|
|
210
210
|
Object.defineProperty(exports, "SelectedAddOnOptionSchema", {
|
|
211
211
|
enumerable: true,
|
|
212
|
-
get: function () { return
|
|
212
|
+
get: function () { return chunkAWNWP5J3_js.SelectedAddOnOptionSchema; }
|
|
213
213
|
});
|
|
214
214
|
Object.defineProperty(exports, "ServiceStatusSchema", {
|
|
215
215
|
enumerable: true,
|
|
216
|
-
get: function () { return
|
|
216
|
+
get: function () { return chunkAWNWP5J3_js.ServiceStatusSchema; }
|
|
217
217
|
});
|
|
218
218
|
Object.defineProperty(exports, "TimestampSchema", {
|
|
219
219
|
enumerable: true,
|
|
220
|
-
get: function () { return
|
|
220
|
+
get: function () { return chunkAWNWP5J3_js.TimestampSchema; }
|
|
221
221
|
});
|
|
222
222
|
Object.defineProperty(exports, "VariantDetailsSchema", {
|
|
223
223
|
enumerable: true,
|
|
224
|
-
get: function () { return
|
|
224
|
+
get: function () { return chunkAWNWP5J3_js.VariantDetailsSchema; }
|
|
225
225
|
});
|
|
226
226
|
Object.defineProperty(exports, "VariantDisplayAttributeSchema", {
|
|
227
227
|
enumerable: true,
|
|
228
|
-
get: function () { return
|
|
228
|
+
get: function () { return chunkAWNWP5J3_js.VariantDisplayAttributeSchema; }
|
|
229
229
|
});
|
|
230
230
|
Object.defineProperty(exports, "VariantInfoSchema", {
|
|
231
231
|
enumerable: true,
|
|
232
|
-
get: function () { return
|
|
232
|
+
get: function () { return chunkAWNWP5J3_js.VariantInfoSchema; }
|
|
233
233
|
});
|
|
234
234
|
Object.defineProperty(exports, "assertAddItemPayload", {
|
|
235
235
|
enumerable: true,
|
|
236
|
-
get: function () { return
|
|
236
|
+
get: function () { return chunkAWNWP5J3_js.assertAddItemPayload; }
|
|
237
237
|
});
|
|
238
238
|
Object.defineProperty(exports, "assertBrand", {
|
|
239
239
|
enumerable: true,
|
|
240
|
-
get: function () { return
|
|
240
|
+
get: function () { return chunkAWNWP5J3_js.assertBrand; }
|
|
241
241
|
});
|
|
242
242
|
Object.defineProperty(exports, "assertCart", {
|
|
243
243
|
enumerable: true,
|
|
244
|
-
get: function () { return
|
|
244
|
+
get: function () { return chunkAWNWP5J3_js.assertCart; }
|
|
245
245
|
});
|
|
246
246
|
Object.defineProperty(exports, "assertCartItem", {
|
|
247
247
|
enumerable: true,
|
|
248
|
-
get: function () { return
|
|
248
|
+
get: function () { return chunkAWNWP5J3_js.assertCartItem; }
|
|
249
249
|
});
|
|
250
250
|
Object.defineProperty(exports, "assertCheckoutBody", {
|
|
251
251
|
enumerable: true,
|
|
252
|
-
get: function () { return
|
|
252
|
+
get: function () { return chunkAWNWP5J3_js.assertCheckoutBody; }
|
|
253
253
|
});
|
|
254
254
|
Object.defineProperty(exports, "assertCheckoutResponse", {
|
|
255
255
|
enumerable: true,
|
|
256
|
-
get: function () { return
|
|
256
|
+
get: function () { return chunkAWNWP5J3_js.assertCheckoutResponse; }
|
|
257
257
|
});
|
|
258
258
|
Object.defineProperty(exports, "cimplifyRegistry", {
|
|
259
259
|
enumerable: true,
|
|
260
|
-
get: function () { return
|
|
260
|
+
get: function () { return chunkAWNWP5J3_js.cimplifyRegistry; }
|
|
261
261
|
});
|
|
262
262
|
Object.defineProperty(exports, "createTestClient", {
|
|
263
263
|
enumerable: true,
|
|
264
|
-
get: function () { return
|
|
264
|
+
get: function () { return chunkAWNWP5J3_js.createTestClient; }
|
|
265
265
|
});
|
|
266
266
|
Object.defineProperty(exports, "fixtures", {
|
|
267
267
|
enumerable: true,
|
|
268
|
-
get: function () { return
|
|
268
|
+
get: function () { return chunkAWNWP5J3_js.fixtures; }
|
|
269
269
|
});
|
|
270
270
|
Object.defineProperty(exports, "makeAssertion", {
|
|
271
271
|
enumerable: true,
|
|
272
|
-
get: function () { return
|
|
272
|
+
get: function () { return chunkAWNWP5J3_js.makeAssertion; }
|
|
273
273
|
});
|
|
274
274
|
Object.defineProperty(exports, "registerSchema", {
|
|
275
275
|
enumerable: true,
|
|
276
|
-
get: function () { return
|
|
276
|
+
get: function () { return chunkAWNWP5J3_js.registerSchema; }
|
|
277
277
|
});
|
|
278
278
|
exports.exportJsonSchemas = exportJsonSchemas;
|
|
279
279
|
exports.listRegisteredSchemas = listRegisteredSchemas;
|
package/dist/testing.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
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-
|
|
1
|
+
import { VariantInfoSchema, CheckoutResponseSchema, CheckoutBodySchema, CartPricingSchema, CartItemSchema, CartSchema, AddItemPayloadSchema, BrandSchema, cimplifyRegistry } from './chunk-QXWX7CD2.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-QXWX7CD2.mjs';
|
|
3
|
+
import './chunk-X36FZZT6.mjs';
|
|
4
4
|
import './chunk-U4MW6PYU.mjs';
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-
|
|
5
|
+
import './chunk-FKARGZK3.mjs';
|
|
6
|
+
import './chunk-VUSHG3HA.mjs';
|
|
7
7
|
import './chunk-KFLGQGMC.mjs';
|
|
8
8
|
import './chunk-K5EN2W2Q.mjs';
|
|
9
9
|
import './chunk-3G6RQLXK.mjs';
|
package/dist/utils.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { C as CURRENCY_SYMBOLS, M as MOBILE_MONEY_PROVIDERS, c as categorizePaymentError, d as detectMobileMoneyProvider, f as formatMoney, a as formatNumberCompact, b as formatPrice, e as formatPriceAdjustment, g as formatPriceCompact, i as formatPriceWithTax, j as formatProductPrice, k as getBasePrice, l as getCurrencySymbol, m as getDiscountPercentage, n as getDisplayPrice, o as getMarkupPercentage, q as getProductCurrency, r as getTaxAmount, t as hasTaxInfo, u as isOnSale, v as isPaymentStatusFailure, w as isPaymentStatusRequiresAction, x as isPaymentStatusSuccess, y as isTaxInclusive, z as isValidPhoneForContext, A as normalizePaymentResponse, B as normalizePhoneToE164, D as normalizeStatusResponse, E as parsePrice, F as resolvePhoneCountryCode } from './index-
|
|
2
|
-
import './product-
|
|
3
|
-
import './price-
|
|
4
|
-
import './payment-
|
|
1
|
+
export { C as CURRENCY_SYMBOLS, M as MOBILE_MONEY_PROVIDERS, c as categorizePaymentError, d as detectMobileMoneyProvider, f as formatMoney, a as formatNumberCompact, b as formatPrice, e as formatPriceAdjustment, g as formatPriceCompact, i as formatPriceWithTax, j as formatProductPrice, k as getBasePrice, l as getCurrencySymbol, m as getDiscountPercentage, n as getDisplayPrice, o as getMarkupPercentage, q as getProductCurrency, r as getTaxAmount, t as hasTaxInfo, u as isOnSale, v as isPaymentStatusFailure, w as isPaymentStatusRequiresAction, x as isPaymentStatusSuccess, y as isTaxInclusive, z as isValidPhoneForContext, A as normalizePaymentResponse, B as normalizePhoneToE164, D as normalizeStatusResponse, E as parsePrice, F as resolvePhoneCountryCode } from './index-BuNjyfaV.mjs';
|
|
2
|
+
import './product-O8-wcHSe.mjs';
|
|
3
|
+
import './price-BvRtp6ak.mjs';
|
|
4
|
+
import './payment-pKPpaORI.mjs';
|
|
5
5
|
import 'libphonenumber-js';
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { C as CURRENCY_SYMBOLS, M as MOBILE_MONEY_PROVIDERS, c as categorizePaymentError, d as detectMobileMoneyProvider, f as formatMoney, a as formatNumberCompact, b as formatPrice, e as formatPriceAdjustment, g as formatPriceCompact, i as formatPriceWithTax, j as formatProductPrice, k as getBasePrice, l as getCurrencySymbol, m as getDiscountPercentage, n as getDisplayPrice, o as getMarkupPercentage, q as getProductCurrency, r as getTaxAmount, t as hasTaxInfo, u as isOnSale, v as isPaymentStatusFailure, w as isPaymentStatusRequiresAction, x as isPaymentStatusSuccess, y as isTaxInclusive, z as isValidPhoneForContext, A as normalizePaymentResponse, B as normalizePhoneToE164, D as normalizeStatusResponse, E as parsePrice, F as resolvePhoneCountryCode } from './index-
|
|
2
|
-
import './product-
|
|
3
|
-
import './price-
|
|
4
|
-
import './payment-
|
|
1
|
+
export { C as CURRENCY_SYMBOLS, M as MOBILE_MONEY_PROVIDERS, c as categorizePaymentError, d as detectMobileMoneyProvider, f as formatMoney, a as formatNumberCompact, b as formatPrice, e as formatPriceAdjustment, g as formatPriceCompact, i as formatPriceWithTax, j as formatProductPrice, k as getBasePrice, l as getCurrencySymbol, m as getDiscountPercentage, n as getDisplayPrice, o as getMarkupPercentage, q as getProductCurrency, r as getTaxAmount, t as hasTaxInfo, u as isOnSale, v as isPaymentStatusFailure, w as isPaymentStatusRequiresAction, x as isPaymentStatusSuccess, y as isTaxInclusive, z as isValidPhoneForContext, A as normalizePaymentResponse, B as normalizePhoneToE164, D as normalizeStatusResponse, E as parsePrice, F as resolvePhoneCountryCode } from './index-D-w5h82t.js';
|
|
2
|
+
import './product-O8-wcHSe.js';
|
|
3
|
+
import './price-23RNXftz.js';
|
|
4
|
+
import './payment-By0JidTe.js';
|
|
5
5
|
import 'libphonenumber-js';
|