@cimplify/sdk 0.52.1 → 0.52.2

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.
@@ -276,7 +276,7 @@ var SESSION_TOKEN_STORAGE_KEY = "cimplify_session_token";
276
276
  var ORDER_TOKEN_PREFIX = "cimplify_ot_";
277
277
  var SESSION_TOKEN_HEADER = "x-session-token";
278
278
  var ORDER_TOKEN_TTL_MS = 24 * 60 * 60 * 1e3;
279
- var DEFAULT_TIMEOUT_MS = 3e4;
279
+ var DEFAULT_TIMEOUT_MS = 5e3;
280
280
  var DEFAULT_MAX_RETRIES = 3;
281
281
  var DEFAULT_RETRY_DELAY_MS = 1e3;
282
282
  function sleep(ms) {
@@ -278,7 +278,7 @@ var SESSION_TOKEN_STORAGE_KEY = "cimplify_session_token";
278
278
  var ORDER_TOKEN_PREFIX = "cimplify_ot_";
279
279
  var SESSION_TOKEN_HEADER = "x-session-token";
280
280
  var ORDER_TOKEN_TTL_MS = 24 * 60 * 60 * 1e3;
281
- var DEFAULT_TIMEOUT_MS = 3e4;
281
+ var DEFAULT_TIMEOUT_MS = 5e3;
282
282
  var DEFAULT_MAX_RETRIES = 3;
283
283
  var DEFAULT_RETRY_DELAY_MS = 1e3;
284
284
  function sleep(ms) {
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkQ5VGDCQF_js = require('./chunk-Q5VGDCQF.js');
4
- var chunkW6CCBNGL_js = require('./chunk-W6CCBNGL.js');
4
+ var chunkEMS6DQIX_js = require('./chunk-EMS6DQIX.js');
5
5
  var zod = require('zod');
6
6
 
7
7
  var cimplifyRegistry = zod.z.registry();
@@ -614,7 +614,7 @@ function createTestClient(options = {}) {
614
614
  if (echoed) sessionToken = echoed;
615
615
  return res;
616
616
  };
617
- const client = chunkW6CCBNGL_js.createCimplifyClient({
617
+ const client = chunkEMS6DQIX_js.createCimplifyClient({
618
618
  baseUrl: TEST_BASE_URL,
619
619
  // Link mock lives at /v1/link on the same Hono app, so point the SDK's
620
620
  // separate Link transport at the same TEST_BASE_URL.
@@ -1,5 +1,5 @@
1
1
  import { createMockApp } from './chunk-R3F55BRN.mjs';
2
- import { createCimplifyClient } from './chunk-4QDCMYYB.mjs';
2
+ import { createCimplifyClient } from './chunk-APHYBBDD.mjs';
3
3
  import { z } from 'zod';
4
4
 
5
5
  var cimplifyRegistry = z.registry();
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  var chunkMN4PNKJA_js = require('./chunk-MN4PNKJA.js');
4
4
  var chunkL5GKVQVJ_js = require('./chunk-L5GKVQVJ.js');
5
- var chunkW6CCBNGL_js = require('./chunk-W6CCBNGL.js');
5
+ var chunkEMS6DQIX_js = require('./chunk-EMS6DQIX.js');
6
6
  var chunkEQLT46ZR_js = require('./chunk-EQLT46ZR.js');
7
7
  var chunk7Y2O3E4D_js = require('./chunk-7Y2O3E4D.js');
8
8
  var chunkXA3ZNR75_js = require('./chunk-XA3ZNR75.js');
@@ -60,35 +60,35 @@ Object.defineProperty(exports, "resolvePhoneCountryCode", {
60
60
  });
61
61
  Object.defineProperty(exports, "ActivityService", {
62
62
  enumerable: true,
63
- get: function () { return chunkW6CCBNGL_js.ActivityService; }
63
+ get: function () { return chunkEMS6DQIX_js.ActivityService; }
64
64
  });
65
65
  Object.defineProperty(exports, "CimplifyClient", {
66
66
  enumerable: true,
67
- get: function () { return chunkW6CCBNGL_js.CimplifyClient; }
67
+ get: function () { return chunkEMS6DQIX_js.CimplifyClient; }
68
68
  });
69
69
  Object.defineProperty(exports, "DeliveryService", {
70
70
  enumerable: true,
71
- get: function () { return chunkW6CCBNGL_js.DeliveryService; }
71
+ get: function () { return chunkEMS6DQIX_js.DeliveryService; }
72
72
  });
73
73
  Object.defineProperty(exports, "PlacesService", {
74
74
  enumerable: true,
75
- get: function () { return chunkW6CCBNGL_js.PlacesService; }
75
+ get: function () { return chunkEMS6DQIX_js.PlacesService; }
76
76
  });
77
77
  Object.defineProperty(exports, "SubscriptionService", {
78
78
  enumerable: true,
79
- get: function () { return chunkW6CCBNGL_js.SubscriptionService; }
79
+ get: function () { return chunkEMS6DQIX_js.SubscriptionService; }
80
80
  });
81
81
  Object.defineProperty(exports, "SupportService", {
82
82
  enumerable: true,
83
- get: function () { return chunkW6CCBNGL_js.SupportService; }
83
+ get: function () { return chunkEMS6DQIX_js.SupportService; }
84
84
  });
85
85
  Object.defineProperty(exports, "UploadService", {
86
86
  enumerable: true,
87
- get: function () { return chunkW6CCBNGL_js.UploadService; }
87
+ get: function () { return chunkEMS6DQIX_js.UploadService; }
88
88
  });
89
89
  Object.defineProperty(exports, "createCimplifyClient", {
90
90
  enumerable: true,
91
- get: function () { return chunkW6CCBNGL_js.createCimplifyClient; }
91
+ get: function () { return chunkEMS6DQIX_js.createCimplifyClient; }
92
92
  });
93
93
  Object.defineProperty(exports, "AUTHORIZATION_TYPE", {
94
94
  enumerable: true,
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  export { CIMPLIFY_CDN_HOSTS, DEFAULT_CDN_BASE_URL, DURATION_UNIT, INPUT_FIELD_TYPE, PRODUCT_TYPE, RENDER_HINT, assetUrl, getVariantDisplayName, isCimplifyAsset } from './chunk-NRDRVZ62.mjs';
2
2
  export { isValidPhoneForContext, normalizePhoneToE164, resolvePhoneCountryCode } from './chunk-YOIVZ6OA.mjs';
3
- export { ActivityService, CimplifyClient, DeliveryService, PlacesService, SubscriptionService, SupportService, UploadService, createCimplifyClient } from './chunk-4QDCMYYB.mjs';
3
+ export { ActivityService, CimplifyClient, DeliveryService, PlacesService, SubscriptionService, SupportService, UploadService, createCimplifyClient } from './chunk-APHYBBDD.mjs';
4
4
  export { AUTHORIZATION_TYPE, AUTH_MUTATION, AuthService, BusinessService, CHECKOUT_MODE, CHECKOUT_MUTATION, CHECKOUT_STEP, CONTACT_TYPE, CartOperations, CatalogueQueries, CheckoutService as CheckoutOperations, CheckoutService, CimplifyElement, CimplifyElements, DEFAULT_COUNTRY, DEFAULT_CURRENCY, DEVICE_TYPE, ELEMENT_TYPES, EVENT_TYPES, FxService, InventoryService, LINK_MUTATION, LINK_QUERY, LinkService, LiteService, MESSAGE_TYPES, MOBILE_MONEY_PROVIDER, ORDER_MUTATION, ORDER_TYPE, OrderQueries, PAYMENT_METHOD, PAYMENT_MUTATION, PAYMENT_STATE, PICKUP_TIME_TYPE, SchedulingService, combine, combineObject, createElements, err, flatMap, fromPromise, generateIdempotencyKey, getOrElse, isErr, isOk, mapError, mapResult, ok, toNullable, tryCatch, unwrap } from './chunk-GLAVTDDE.mjs';
5
5
  export { CURRENCY_SYMBOLS, MOBILE_MONEY_PROVIDERS, categorizePaymentError, detectMobileMoneyProvider, formatMoney, formatNumberCompact, formatPrice, formatPriceAdjustment, formatPriceCompact, formatPriceRange, formatPriceWithTax, formatProductPrice, getBasePrice, getCurrencySymbol, getDiscountPercentage, getDisplayPrice, getMarkupPercentage, getPriceRange, getProductCurrency, getTaxAmount, getUnitPriceAtQuantity, hasTaxInfo, isOnSale, isPaymentStatusFailure, isPaymentStatusRequiresAction, isPaymentStatusSuccess, isTaxInclusive, normalizePaymentResponse, normalizeStatusResponse, parsePrice } from './chunk-TD3AY34U.mjs';
6
6
  export { CimplifyError, ERROR_HINTS, ErrorCode, IdempotencyMismatchError, ZERO, currencyCode, enrichError, getErrorHint, isCimplifyError, isIdempotencyMismatchError, isQuoteConflictRequiringConsent, isQuoteError, isRetryableError, isSupportedCurrency, money, moneyFromNumber } from './chunk-AMZXALF6.mjs';
package/dist/react.js CHANGED
@@ -2,7 +2,7 @@
2
2
  'use strict';
3
3
 
4
4
  var chunkMN4PNKJA_js = require('./chunk-MN4PNKJA.js');
5
- var chunkW6CCBNGL_js = require('./chunk-W6CCBNGL.js');
5
+ var chunkEMS6DQIX_js = require('./chunk-EMS6DQIX.js');
6
6
  var chunkEQLT46ZR_js = require('./chunk-EQLT46ZR.js');
7
7
  var chunk7Y2O3E4D_js = require('./chunk-7Y2O3E4D.js');
8
8
  var chunkXA3ZNR75_js = require('./chunk-XA3ZNR75.js');
@@ -1085,7 +1085,7 @@ var DEFAULT_COUNTRY = "US";
1085
1085
  function createDefaultClient() {
1086
1086
  const processRef = globalThis.process;
1087
1087
  const envPublicKey = processRef?.env?.NEXT_PUBLIC_CIMPLIFY_PUBLIC_KEY || "";
1088
- return chunkW6CCBNGL_js.createCimplifyClient({ publicKey: envPublicKey });
1088
+ return chunkEMS6DQIX_js.createCimplifyClient({ publicKey: envPublicKey });
1089
1089
  }
1090
1090
  function getStoredLocationId() {
1091
1091
  if (typeof window === "undefined" || !window.localStorage) {
package/dist/react.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { DURATION_UNIT, getVariantDisplayName, INPUT_FIELD_TYPE, PRODUCT_TYPE, RENDER_HINT } from './chunk-NRDRVZ62.mjs';
3
3
  export { getVariantDisplayName } from './chunk-NRDRVZ62.mjs';
4
- import { createCimplifyClient } from './chunk-4QDCMYYB.mjs';
4
+ import { createCimplifyClient } from './chunk-APHYBBDD.mjs';
5
5
  import { ELEMENT_TYPES, EVENT_TYPES } from './chunk-GLAVTDDE.mjs';
6
6
  import { formatPrice, parsePrice, getUnitPriceAtQuantity, isOnSale, getDiscountPercentage, getBasePrice, getPriceRange, formatPriceRange } from './chunk-TD3AY34U.mjs';
7
7
  import { isSupportedCurrency } from './chunk-AMZXALF6.mjs';
package/dist/server.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkW6CCBNGL_js = require('./chunk-W6CCBNGL.js');
3
+ var chunkEMS6DQIX_js = require('./chunk-EMS6DQIX.js');
4
4
  require('./chunk-EQLT46ZR.js');
5
5
  require('./chunk-7Y2O3E4D.js');
6
6
  var chunkXA3ZNR75_js = require('./chunk-XA3ZNR75.js');
@@ -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 = chunkW6CCBNGL_js.createCimplifyClient({
28
+ const client = chunkEMS6DQIX_js.createCimplifyClient({
29
29
  baseUrl,
30
30
  publicKey,
31
31
  suppressPublicKeyWarning: true
package/dist/server.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { createCimplifyClient } from './chunk-4QDCMYYB.mjs';
1
+ import { createCimplifyClient } from './chunk-APHYBBDD.mjs';
2
2
  import './chunk-GLAVTDDE.mjs';
3
3
  import './chunk-TD3AY34U.mjs';
4
4
  export { CimplifyError } from './chunk-AMZXALF6.mjs';
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunk7A3D3LFI_js = require('../chunk-7A3D3LFI.js');
3
+ var chunkROURLUXG_js = require('../chunk-ROURLUXG.js');
4
4
  require('../chunk-Q5VGDCQF.js');
5
- require('../chunk-W6CCBNGL.js');
5
+ require('../chunk-EMS6DQIX.js');
6
6
  require('../chunk-EQLT46ZR.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(() => chunk7A3D3LFI_js.assertBrand(opts.brand)).not.toThrow();
23
+ vitest.expect(() => chunkROURLUXG_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(chunk7A3D3LFI_js.SeedNameSchema.safeParse(b.mock?.seed).success).toBe(true);
27
+ vitest.expect(chunkROURLUXG_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 = chunk7A3D3LFI_js.BrandSchema.safeParse(opts.brand);
59
+ const result = chunkROURLUXG_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 = chunk7A3D3LFI_js.createTestClient(opts);
74
+ h = chunkROURLUXG_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(() => chunk7A3D3LFI_js.assertCart(res.value)).not.toThrow();
81
+ vitest.expect(() => chunkROURLUXG_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 chunk7A3D3LFI_js.fixtures.addFirstProduct(h.client);
85
+ const { product, variantId } = await chunkROURLUXG_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(() => chunk7A3D3LFI_js.assertCart(get.value)).not.toThrow();
90
+ vitest.expect(() => chunkROURLUXG_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 chunk7A3D3LFI_js.fixtures.addFirstProduct(h.client);
102
- await chunk7A3D3LFI_js.fixtures.addFirstProduct(h.client);
101
+ await chunkROURLUXG_js.fixtures.addFirstProduct(h.client);
102
+ await chunkROURLUXG_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 chunk7A3D3LFI_js.fixtures.addFirstProduct(h.client);
110
+ await chunkROURLUXG_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 = chunk7A3D3LFI_js.createTestClient(opts);
136
+ h = chunkROURLUXG_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 = chunk7A3D3LFI_js.AddItemPayloadSchema.safeParse({ item_id: "prod_x", quantity: 1 });
140
+ const result = chunkROURLUXG_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 = chunk7A3D3LFI_js.AddItemPayloadSchema.safeParse({ item_id: "prod_x", quantity: -1 });
144
+ const result = chunkROURLUXG_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 = chunk7A3D3LFI_js.AddItemPayloadSchema.safeParse({ item_id: "", quantity: 1 });
148
+ const result = chunkROURLUXG_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 chunk7A3D3LFI_js.fixtures.addFirstProduct(h.client);
152
+ const { product } = await chunkROURLUXG_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 = chunk7A3D3LFI_js.CartItemSchema.safeParse(item);
157
+ const result = chunkROURLUXG_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 chunk7A3D3LFI_js.fixtures.addFirstProduct(h.client);
167
+ await chunkROURLUXG_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: chunk7A3D3LFI_js.fixtures.customer(),
172
+ customer: chunkROURLUXG_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 = chunk7A3D3LFI_js.CheckoutResponseSchema.safeParse(checkout.value);
179
+ const result = chunkROURLUXG_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:
@@ -1,6 +1,6 @@
1
- import { assertBrand, SeedNameSchema, BrandSchema, createTestClient, assertCart, fixtures, AddItemPayloadSchema, CartItemSchema, CheckoutResponseSchema } from '../chunk-RDORJT7Y.mjs';
1
+ import { assertBrand, SeedNameSchema, BrandSchema, createTestClient, assertCart, fixtures, AddItemPayloadSchema, CartItemSchema, CheckoutResponseSchema } from '../chunk-VZS453ON.mjs';
2
2
  import '../chunk-R3F55BRN.mjs';
3
- import '../chunk-4QDCMYYB.mjs';
3
+ import '../chunk-APHYBBDD.mjs';
4
4
  import '../chunk-GLAVTDDE.mjs';
5
5
  import '../chunk-TD3AY34U.mjs';
6
6
  import '../chunk-AMZXALF6.mjs';
package/dist/testing.js CHANGED
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunk7A3D3LFI_js = require('./chunk-7A3D3LFI.js');
3
+ var chunkROURLUXG_js = require('./chunk-ROURLUXG.js');
4
4
  require('./chunk-Q5VGDCQF.js');
5
- require('./chunk-W6CCBNGL.js');
5
+ require('./chunk-EMS6DQIX.js');
6
6
  require('./chunk-EQLT46ZR.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: chunk7A3D3LFI_js.BrandSchema,
14
- AddItemPayload: chunk7A3D3LFI_js.AddItemPayloadSchema,
15
- Cart: chunk7A3D3LFI_js.CartSchema,
16
- CartItem: chunk7A3D3LFI_js.CartItemSchema,
17
- CartPricing: chunk7A3D3LFI_js.CartPricingSchema,
18
- CheckoutBody: chunk7A3D3LFI_js.CheckoutBodySchema,
19
- CheckoutResponse: chunk7A3D3LFI_js.CheckoutResponseSchema,
20
- VariantInfo: chunk7A3D3LFI_js.VariantInfoSchema
13
+ Brand: chunkROURLUXG_js.BrandSchema,
14
+ AddItemPayload: chunkROURLUXG_js.AddItemPayloadSchema,
15
+ Cart: chunkROURLUXG_js.CartSchema,
16
+ CartItem: chunkROURLUXG_js.CartItemSchema,
17
+ CartPricing: chunkROURLUXG_js.CartPricingSchema,
18
+ CheckoutBody: chunkROURLUXG_js.CheckoutBodySchema,
19
+ CheckoutResponse: chunkROURLUXG_js.CheckoutResponseSchema,
20
+ VariantInfo: chunkROURLUXG_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 = chunk7A3D3LFI_js.cimplifyRegistry.get(schema);
26
- const json = zod.z.toJSONSchema(schema, { metadata: chunk7A3D3LFI_js.cimplifyRegistry });
25
+ const meta = chunkROURLUXG_js.cimplifyRegistry.get(schema);
26
+ const json = zod.z.toJSONSchema(schema, { metadata: chunkROURLUXG_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
- chunk7A3D3LFI_js.BrandSchema,
39
- chunk7A3D3LFI_js.AddItemPayloadSchema,
40
- chunk7A3D3LFI_js.CartSchema,
41
- chunk7A3D3LFI_js.CartItemSchema,
42
- chunk7A3D3LFI_js.CartPricingSchema,
43
- chunk7A3D3LFI_js.CheckoutBodySchema,
44
- chunk7A3D3LFI_js.CheckoutResponseSchema,
45
- chunk7A3D3LFI_js.VariantInfoSchema
38
+ chunkROURLUXG_js.BrandSchema,
39
+ chunkROURLUXG_js.AddItemPayloadSchema,
40
+ chunkROURLUXG_js.CartSchema,
41
+ chunkROURLUXG_js.CartItemSchema,
42
+ chunkROURLUXG_js.CartPricingSchema,
43
+ chunkROURLUXG_js.CheckoutBodySchema,
44
+ chunkROURLUXG_js.CheckoutResponseSchema,
45
+ chunkROURLUXG_js.VariantInfoSchema
46
46
  ]) {
47
- const meta = chunk7A3D3LFI_js.cimplifyRegistry.get(schema);
47
+ const meta = chunkROURLUXG_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 chunk7A3D3LFI_js.AddItemPayloadSchema; }
55
+ get: function () { return chunkROURLUXG_js.AddItemPayloadSchema; }
56
56
  });
57
57
  Object.defineProperty(exports, "AddOnDetailsSchema", {
58
58
  enumerable: true,
59
- get: function () { return chunk7A3D3LFI_js.AddOnDetailsSchema; }
59
+ get: function () { return chunkROURLUXG_js.AddOnDetailsSchema; }
60
60
  });
61
61
  Object.defineProperty(exports, "AddOnGroupDetailsSchema", {
62
62
  enumerable: true,
63
- get: function () { return chunk7A3D3LFI_js.AddOnGroupDetailsSchema; }
63
+ get: function () { return chunkROURLUXG_js.AddOnGroupDetailsSchema; }
64
64
  });
65
65
  Object.defineProperty(exports, "AddOnInDetailsSchema", {
66
66
  enumerable: true,
67
- get: function () { return chunk7A3D3LFI_js.AddOnInDetailsSchema; }
67
+ get: function () { return chunkROURLUXG_js.AddOnInDetailsSchema; }
68
68
  });
69
69
  Object.defineProperty(exports, "AddOnOptionDetailsSchema", {
70
70
  enumerable: true,
71
- get: function () { return chunk7A3D3LFI_js.AddOnOptionDetailsSchema; }
71
+ get: function () { return chunkROURLUXG_js.AddOnOptionDetailsSchema; }
72
72
  });
73
73
  Object.defineProperty(exports, "AuthorizationTypeSchema", {
74
74
  enumerable: true,
75
- get: function () { return chunk7A3D3LFI_js.AuthorizationTypeSchema; }
75
+ get: function () { return chunkROURLUXG_js.AuthorizationTypeSchema; }
76
76
  });
77
77
  Object.defineProperty(exports, "BrandContactSchema", {
78
78
  enumerable: true,
79
- get: function () { return chunk7A3D3LFI_js.BrandContactSchema; }
79
+ get: function () { return chunkROURLUXG_js.BrandContactSchema; }
80
80
  });
81
81
  Object.defineProperty(exports, "BrandFaqSchema", {
82
82
  enumerable: true,
83
- get: function () { return chunk7A3D3LFI_js.BrandFaqSchema; }
83
+ get: function () { return chunkROURLUXG_js.BrandFaqSchema; }
84
84
  });
85
85
  Object.defineProperty(exports, "BrandHeroSchema", {
86
86
  enumerable: true,
87
- get: function () { return chunk7A3D3LFI_js.BrandHeroSchema; }
87
+ get: function () { return chunkROURLUXG_js.BrandHeroSchema; }
88
88
  });
89
89
  Object.defineProperty(exports, "BrandNavLinkSchema", {
90
90
  enumerable: true,
91
- get: function () { return chunk7A3D3LFI_js.BrandNavLinkSchema; }
91
+ get: function () { return chunkROURLUXG_js.BrandNavLinkSchema; }
92
92
  });
93
93
  Object.defineProperty(exports, "BrandPolicyPageSchema", {
94
94
  enumerable: true,
95
- get: function () { return chunk7A3D3LFI_js.BrandPolicyPageSchema; }
95
+ get: function () { return chunkROURLUXG_js.BrandPolicyPageSchema; }
96
96
  });
97
97
  Object.defineProperty(exports, "BrandPolicySectionSchema", {
98
98
  enumerable: true,
99
- get: function () { return chunk7A3D3LFI_js.BrandPolicySectionSchema; }
99
+ get: function () { return chunkROURLUXG_js.BrandPolicySectionSchema; }
100
100
  });
101
101
  Object.defineProperty(exports, "BrandSchema", {
102
102
  enumerable: true,
103
- get: function () { return chunk7A3D3LFI_js.BrandSchema; }
103
+ get: function () { return chunkROURLUXG_js.BrandSchema; }
104
104
  });
105
105
  Object.defineProperty(exports, "BrandSocialSchema", {
106
106
  enumerable: true,
107
- get: function () { return chunk7A3D3LFI_js.BrandSocialSchema; }
107
+ get: function () { return chunkROURLUXG_js.BrandSocialSchema; }
108
108
  });
109
109
  Object.defineProperty(exports, "BundleResolvedSchema", {
110
110
  enumerable: true,
111
- get: function () { return chunk7A3D3LFI_js.BundleResolvedSchema; }
111
+ get: function () { return chunkROURLUXG_js.BundleResolvedSchema; }
112
112
  });
113
113
  Object.defineProperty(exports, "BundleSelectionInputSchema", {
114
114
  enumerable: true,
115
- get: function () { return chunk7A3D3LFI_js.BundleSelectionInputSchema; }
115
+ get: function () { return chunkROURLUXG_js.BundleSelectionInputSchema; }
116
116
  });
117
117
  Object.defineProperty(exports, "CartItemSchema", {
118
118
  enumerable: true,
119
- get: function () { return chunk7A3D3LFI_js.CartItemSchema; }
119
+ get: function () { return chunkROURLUXG_js.CartItemSchema; }
120
120
  });
121
121
  Object.defineProperty(exports, "CartPricingSchema", {
122
122
  enumerable: true,
123
- get: function () { return chunk7A3D3LFI_js.CartPricingSchema; }
123
+ get: function () { return chunkROURLUXG_js.CartPricingSchema; }
124
124
  });
125
125
  Object.defineProperty(exports, "CartSchema", {
126
126
  enumerable: true,
127
- get: function () { return chunk7A3D3LFI_js.CartSchema; }
127
+ get: function () { return chunkROURLUXG_js.CartSchema; }
128
128
  });
129
129
  Object.defineProperty(exports, "CheckoutBodySchema", {
130
130
  enumerable: true,
131
- get: function () { return chunk7A3D3LFI_js.CheckoutBodySchema; }
131
+ get: function () { return chunkROURLUXG_js.CheckoutBodySchema; }
132
132
  });
133
133
  Object.defineProperty(exports, "CheckoutCustomerSchema", {
134
134
  enumerable: true,
135
- get: function () { return chunk7A3D3LFI_js.CheckoutCustomerSchema; }
135
+ get: function () { return chunkROURLUXG_js.CheckoutCustomerSchema; }
136
136
  });
137
137
  Object.defineProperty(exports, "CheckoutResponseSchema", {
138
138
  enumerable: true,
139
- get: function () { return chunk7A3D3LFI_js.CheckoutResponseSchema; }
139
+ get: function () { return chunkROURLUXG_js.CheckoutResponseSchema; }
140
140
  });
141
141
  Object.defineProperty(exports, "ChosenPriceSchema", {
142
142
  enumerable: true,
143
- get: function () { return chunk7A3D3LFI_js.ChosenPriceSchema; }
143
+ get: function () { return chunkROURLUXG_js.ChosenPriceSchema; }
144
144
  });
145
145
  Object.defineProperty(exports, "CompositeResolvedSchema", {
146
146
  enumerable: true,
147
- get: function () { return chunk7A3D3LFI_js.CompositeResolvedSchema; }
147
+ get: function () { return chunkROURLUXG_js.CompositeResolvedSchema; }
148
148
  });
149
149
  Object.defineProperty(exports, "CompositeSelectionInputSchema", {
150
150
  enumerable: true,
151
- get: function () { return chunk7A3D3LFI_js.CompositeSelectionInputSchema; }
151
+ get: function () { return chunkROURLUXG_js.CompositeSelectionInputSchema; }
152
152
  });
153
153
  Object.defineProperty(exports, "CountryCodeSchema", {
154
154
  enumerable: true,
155
- get: function () { return chunk7A3D3LFI_js.CountryCodeSchema; }
155
+ get: function () { return chunkROURLUXG_js.CountryCodeSchema; }
156
156
  });
157
157
  Object.defineProperty(exports, "CurrencyCodeSchema", {
158
158
  enumerable: true,
159
- get: function () { return chunk7A3D3LFI_js.CurrencyCodeSchema; }
159
+ get: function () { return chunkROURLUXG_js.CurrencyCodeSchema; }
160
160
  });
161
161
  Object.defineProperty(exports, "CustomerInputValueSchema", {
162
162
  enumerable: true,
163
- get: function () { return chunk7A3D3LFI_js.CustomerInputValueSchema; }
163
+ get: function () { return chunkROURLUXG_js.CustomerInputValueSchema; }
164
164
  });
165
165
  Object.defineProperty(exports, "DiscountDetailsSchema", {
166
166
  enumerable: true,
167
- get: function () { return chunk7A3D3LFI_js.DiscountDetailsSchema; }
167
+ get: function () { return chunkROURLUXG_js.DiscountDetailsSchema; }
168
168
  });
169
169
  Object.defineProperty(exports, "IsoDateTimeSchema", {
170
170
  enumerable: true,
171
- get: function () { return chunk7A3D3LFI_js.IsoDateTimeSchema; }
171
+ get: function () { return chunkROURLUXG_js.IsoDateTimeSchema; }
172
172
  });
173
173
  Object.defineProperty(exports, "LineTypeSchema", {
174
174
  enumerable: true,
175
- get: function () { return chunk7A3D3LFI_js.LineTypeSchema; }
175
+ get: function () { return chunkROURLUXG_js.LineTypeSchema; }
176
176
  });
177
177
  Object.defineProperty(exports, "LocaleSchema", {
178
178
  enumerable: true,
179
- get: function () { return chunk7A3D3LFI_js.LocaleSchema; }
179
+ get: function () { return chunkROURLUXG_js.LocaleSchema; }
180
180
  });
181
181
  Object.defineProperty(exports, "MoneyLooseSchema", {
182
182
  enumerable: true,
183
- get: function () { return chunk7A3D3LFI_js.MoneyLooseSchema; }
183
+ get: function () { return chunkROURLUXG_js.MoneyLooseSchema; }
184
184
  });
185
185
  Object.defineProperty(exports, "MoneySchema", {
186
186
  enumerable: true,
187
- get: function () { return chunk7A3D3LFI_js.MoneySchema; }
187
+ get: function () { return chunkROURLUXG_js.MoneySchema; }
188
188
  });
189
189
  Object.defineProperty(exports, "NextActionSchema", {
190
190
  enumerable: true,
191
- get: function () { return chunk7A3D3LFI_js.NextActionSchema; }
191
+ get: function () { return chunkROURLUXG_js.NextActionSchema; }
192
192
  });
193
193
  Object.defineProperty(exports, "PhoneE164Schema", {
194
194
  enumerable: true,
195
- get: function () { return chunk7A3D3LFI_js.PhoneE164Schema; }
195
+ get: function () { return chunkROURLUXG_js.PhoneE164Schema; }
196
196
  });
197
197
  Object.defineProperty(exports, "ProductTypeSchema", {
198
198
  enumerable: true,
199
- get: function () { return chunk7A3D3LFI_js.ProductTypeSchema; }
199
+ get: function () { return chunkROURLUXG_js.ProductTypeSchema; }
200
200
  });
201
201
  Object.defineProperty(exports, "SchemaViolationError", {
202
202
  enumerable: true,
203
- get: function () { return chunk7A3D3LFI_js.SchemaViolationError; }
203
+ get: function () { return chunkROURLUXG_js.SchemaViolationError; }
204
204
  });
205
205
  Object.defineProperty(exports, "SeedNameSchema", {
206
206
  enumerable: true,
207
- get: function () { return chunk7A3D3LFI_js.SeedNameSchema; }
207
+ get: function () { return chunkROURLUXG_js.SeedNameSchema; }
208
208
  });
209
209
  Object.defineProperty(exports, "SelectedAddOnOptionSchema", {
210
210
  enumerable: true,
211
- get: function () { return chunk7A3D3LFI_js.SelectedAddOnOptionSchema; }
211
+ get: function () { return chunkROURLUXG_js.SelectedAddOnOptionSchema; }
212
212
  });
213
213
  Object.defineProperty(exports, "ServiceStatusSchema", {
214
214
  enumerable: true,
215
- get: function () { return chunk7A3D3LFI_js.ServiceStatusSchema; }
215
+ get: function () { return chunkROURLUXG_js.ServiceStatusSchema; }
216
216
  });
217
217
  Object.defineProperty(exports, "TimestampSchema", {
218
218
  enumerable: true,
219
- get: function () { return chunk7A3D3LFI_js.TimestampSchema; }
219
+ get: function () { return chunkROURLUXG_js.TimestampSchema; }
220
220
  });
221
221
  Object.defineProperty(exports, "VariantDetailsSchema", {
222
222
  enumerable: true,
223
- get: function () { return chunk7A3D3LFI_js.VariantDetailsSchema; }
223
+ get: function () { return chunkROURLUXG_js.VariantDetailsSchema; }
224
224
  });
225
225
  Object.defineProperty(exports, "VariantDisplayAttributeSchema", {
226
226
  enumerable: true,
227
- get: function () { return chunk7A3D3LFI_js.VariantDisplayAttributeSchema; }
227
+ get: function () { return chunkROURLUXG_js.VariantDisplayAttributeSchema; }
228
228
  });
229
229
  Object.defineProperty(exports, "VariantInfoSchema", {
230
230
  enumerable: true,
231
- get: function () { return chunk7A3D3LFI_js.VariantInfoSchema; }
231
+ get: function () { return chunkROURLUXG_js.VariantInfoSchema; }
232
232
  });
233
233
  Object.defineProperty(exports, "assertAddItemPayload", {
234
234
  enumerable: true,
235
- get: function () { return chunk7A3D3LFI_js.assertAddItemPayload; }
235
+ get: function () { return chunkROURLUXG_js.assertAddItemPayload; }
236
236
  });
237
237
  Object.defineProperty(exports, "assertBrand", {
238
238
  enumerable: true,
239
- get: function () { return chunk7A3D3LFI_js.assertBrand; }
239
+ get: function () { return chunkROURLUXG_js.assertBrand; }
240
240
  });
241
241
  Object.defineProperty(exports, "assertCart", {
242
242
  enumerable: true,
243
- get: function () { return chunk7A3D3LFI_js.assertCart; }
243
+ get: function () { return chunkROURLUXG_js.assertCart; }
244
244
  });
245
245
  Object.defineProperty(exports, "assertCartItem", {
246
246
  enumerable: true,
247
- get: function () { return chunk7A3D3LFI_js.assertCartItem; }
247
+ get: function () { return chunkROURLUXG_js.assertCartItem; }
248
248
  });
249
249
  Object.defineProperty(exports, "assertCheckoutBody", {
250
250
  enumerable: true,
251
- get: function () { return chunk7A3D3LFI_js.assertCheckoutBody; }
251
+ get: function () { return chunkROURLUXG_js.assertCheckoutBody; }
252
252
  });
253
253
  Object.defineProperty(exports, "assertCheckoutResponse", {
254
254
  enumerable: true,
255
- get: function () { return chunk7A3D3LFI_js.assertCheckoutResponse; }
255
+ get: function () { return chunkROURLUXG_js.assertCheckoutResponse; }
256
256
  });
257
257
  Object.defineProperty(exports, "cimplifyRegistry", {
258
258
  enumerable: true,
259
- get: function () { return chunk7A3D3LFI_js.cimplifyRegistry; }
259
+ get: function () { return chunkROURLUXG_js.cimplifyRegistry; }
260
260
  });
261
261
  Object.defineProperty(exports, "createTestClient", {
262
262
  enumerable: true,
263
- get: function () { return chunk7A3D3LFI_js.createTestClient; }
263
+ get: function () { return chunkROURLUXG_js.createTestClient; }
264
264
  });
265
265
  Object.defineProperty(exports, "fixtures", {
266
266
  enumerable: true,
267
- get: function () { return chunk7A3D3LFI_js.fixtures; }
267
+ get: function () { return chunkROURLUXG_js.fixtures; }
268
268
  });
269
269
  Object.defineProperty(exports, "makeAssertion", {
270
270
  enumerable: true,
271
- get: function () { return chunk7A3D3LFI_js.makeAssertion; }
271
+ get: function () { return chunkROURLUXG_js.makeAssertion; }
272
272
  });
273
273
  Object.defineProperty(exports, "registerSchema", {
274
274
  enumerable: true,
275
- get: function () { return chunk7A3D3LFI_js.registerSchema; }
275
+ get: function () { return chunkROURLUXG_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-RDORJT7Y.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-RDORJT7Y.mjs';
1
+ import { VariantInfoSchema, CheckoutResponseSchema, CheckoutBodySchema, CartPricingSchema, CartItemSchema, CartSchema, AddItemPayloadSchema, BrandSchema, cimplifyRegistry } from './chunk-VZS453ON.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-VZS453ON.mjs';
3
3
  import './chunk-R3F55BRN.mjs';
4
- import './chunk-4QDCMYYB.mjs';
4
+ import './chunk-APHYBBDD.mjs';
5
5
  import './chunk-GLAVTDDE.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.52.1",
3
+ "version": "0.52.2",
4
4
  "description": "Cimplify Commerce SDK for storefronts",
5
5
  "keywords": [
6
6
  "cimplify",