@cimplify/sdk 0.45.4 → 0.45.5

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/mock/cli.mjs CHANGED
@@ -10284,6 +10284,451 @@ function seedPharmacy(registry) {
10284
10284
  return { businessId };
10285
10285
  }
10286
10286
 
10287
+ // src/mock/seeds/auto.ts
10288
+ var ISO10 = "2026-01-01T00:00:00.000Z";
10289
+ var photoFor7 = (slug) => seedImage("auto", slug);
10290
+ function seedAuto(registry) {
10291
+ const businessId = "bus_driveline_auto";
10292
+ const business = {
10293
+ id: businessId,
10294
+ name: "Driveline Auto Parts",
10295
+ handle: "driveline",
10296
+ business_type: "retail",
10297
+ email: "parts@drivelineauto.test",
10298
+ default_currency: "GHS",
10299
+ default_phone: "+233244600600",
10300
+ default_address: "Spintex Road, Accra",
10301
+ default_offers_table_service: false,
10302
+ default_accepts_online_orders: true,
10303
+ image: photoFor7("business-hero"),
10304
+ status: "active",
10305
+ created_at: ISO10,
10306
+ updated_at: ISO10,
10307
+ created_by: "seed",
10308
+ preferences: {
10309
+ theme: "garage",
10310
+ tagline: "Genuine parts. Same-day. Across Ghana.",
10311
+ checkout: { allow_guest: true }
10312
+ },
10313
+ is_online_only: false,
10314
+ enabled_payment_types: ["card", "mobile_money", "cash"],
10315
+ default_location_settings: {},
10316
+ country_code: "GH",
10317
+ timezone: "Africa/Accra"
10318
+ };
10319
+ registry.businesses.put(businessId, business);
10320
+ const categories = [
10321
+ { slug: "engine-oil", name: "Engine Oil & Fluids" },
10322
+ { slug: "filters", name: "Filters" },
10323
+ { slug: "brakes", name: "Brakes" },
10324
+ { slug: "batteries", name: "Batteries" },
10325
+ { slug: "tires", name: "Tires & Wheels" },
10326
+ { slug: "bulbs", name: "Lights & Bulbs" },
10327
+ { slug: "wipers", name: "Wipers & Exterior" },
10328
+ { slug: "tools", name: "Tools & Accessories" }
10329
+ ];
10330
+ const catIds = /* @__PURE__ */ new Map();
10331
+ for (const c of categories) {
10332
+ const id = `cat_${c.slug}`;
10333
+ catIds.set(c.slug, id);
10334
+ const cat = {
10335
+ id,
10336
+ business_id: businessId,
10337
+ name: c.name,
10338
+ slug: c.slug,
10339
+ description: `Driveline \u2014 ${c.name}`,
10340
+ product_ids: [],
10341
+ display_order: 0,
10342
+ is_active: true,
10343
+ created_at: ISO10,
10344
+ updated_at: ISO10
10345
+ };
10346
+ registry.categories.put(id, cat);
10347
+ }
10348
+ const products = [
10349
+ // Engine oil & fluids
10350
+ {
10351
+ slug: "engine-oil-5w30",
10352
+ name: "5W-30 Full Synthetic Motor Oil (5L)",
10353
+ price: "320.00",
10354
+ category: "engine-oil",
10355
+ description: "API SP / ILSAC GF-6A full synthetic. Recommended for most modern petrol engines.",
10356
+ tags: ["oil", "synthetic", "fits:universal"]
10357
+ },
10358
+ {
10359
+ slug: "engine-oil-5w40",
10360
+ name: "5W-40 Full Synthetic Motor Oil (5L)",
10361
+ price: "335.00",
10362
+ category: "engine-oil",
10363
+ description: "Higher viscosity for European petrol and diesel engines. API SN / ACEA C3.",
10364
+ tags: ["oil", "synthetic", "fits:universal"]
10365
+ },
10366
+ {
10367
+ slug: "engine-oil-10w40",
10368
+ name: "10W-40 Semi-Synthetic Motor Oil (5L)",
10369
+ price: "240.00",
10370
+ category: "engine-oil",
10371
+ description: "All-weather semi-synthetic. Ideal for older or high-mileage engines.",
10372
+ tags: ["oil", "semi-synthetic", "fits:universal"]
10373
+ },
10374
+ {
10375
+ slug: "brake-fluid",
10376
+ name: "DOT 4 Brake Fluid (500ml)",
10377
+ price: "55.00",
10378
+ category: "engine-oil",
10379
+ description: "High-boiling-point hydraulic brake fluid. Replace every 2 years.",
10380
+ tags: ["fluid", "fits:universal"]
10381
+ },
10382
+ {
10383
+ slug: "coolant",
10384
+ name: "Long-Life Coolant Concentrate (1L)",
10385
+ price: "75.00",
10386
+ category: "engine-oil",
10387
+ description: "Ethylene-glycol concentrate. Dilute 50/50 with distilled water.",
10388
+ tags: ["fluid", "fits:universal"]
10389
+ },
10390
+ {
10391
+ slug: "transmission-fluid",
10392
+ name: "ATF Dexron VI (1L)",
10393
+ price: "95.00",
10394
+ category: "engine-oil",
10395
+ description: "Full-synthetic automatic transmission fluid. Backwards-compatible with Dexron III/II.",
10396
+ tags: ["fluid", "fits:universal"]
10397
+ },
10398
+ // Filters
10399
+ {
10400
+ slug: "oil-filter",
10401
+ name: "Oil Filter \u2014 Toyota / Honda / Nissan 1.5L\u20132.5L",
10402
+ price: "55.00",
10403
+ category: "filters",
10404
+ description: "Spin-on oil filter. Fits most Japanese-make 4-cylinder engines.",
10405
+ tags: ["filter", "fits:toyota", "fits:honda", "fits:nissan"]
10406
+ },
10407
+ {
10408
+ slug: "air-filter",
10409
+ name: "Engine Air Filter \u2014 Toyota Corolla / Yaris (2014\u20132024)",
10410
+ price: "85.00",
10411
+ category: "filters",
10412
+ description: "Pleated paper element. Replace every 20,000 km.",
10413
+ tags: ["filter", "fits:toyota", "fits:toyota:corolla", "fits:toyota:yaris"]
10414
+ },
10415
+ {
10416
+ slug: "cabin-filter",
10417
+ name: "Cabin Air Filter \u2014 Honda Civic / CR-V (2016\u20132023)",
10418
+ price: "95.00",
10419
+ category: "filters",
10420
+ description: "Activated-charcoal cabin filter. Improves AC airflow and traps pollen.",
10421
+ tags: ["filter", "fits:honda", "fits:honda:civic", "fits:honda:cr-v"]
10422
+ },
10423
+ {
10424
+ slug: "fuel-filter",
10425
+ name: "Fuel Filter \u2014 Nissan Almera / Sentra (2015\u20132024)",
10426
+ price: "120.00",
10427
+ category: "filters",
10428
+ description: "In-line fuel filter. Replace every 40,000 km.",
10429
+ tags: ["filter", "fits:nissan", "fits:nissan:almera", "fits:nissan:sentra"]
10430
+ },
10431
+ // Brakes
10432
+ {
10433
+ slug: "brake-pads-front",
10434
+ name: "Front Brake Pads \u2014 Toyota Corolla (2014\u20132024)",
10435
+ price: "280.00",
10436
+ category: "brakes",
10437
+ description: "Low-dust ceramic compound. Includes anti-squeal shims.",
10438
+ tags: ["brakes", "ceramic", "fits:toyota", "fits:toyota:corolla"]
10439
+ },
10440
+ {
10441
+ slug: "brake-pads-rear",
10442
+ name: "Rear Brake Pads \u2014 Honda Civic (2016\u20132023)",
10443
+ price: "240.00",
10444
+ category: "brakes",
10445
+ description: "Semi-metallic compound. Quiet, low-dust.",
10446
+ tags: ["brakes", "fits:honda", "fits:honda:civic"]
10447
+ },
10448
+ {
10449
+ slug: "brake-discs",
10450
+ name: "Front Brake Discs (pair) \u2014 Hyundai Elantra (2017\u20132024)",
10451
+ price: "650.00",
10452
+ category: "brakes",
10453
+ description: "Vented rotors with anti-corrosion coating. Sold as a pair.",
10454
+ tags: ["brakes", "fits:hyundai", "fits:hyundai:elantra"]
10455
+ },
10456
+ {
10457
+ slug: "spark-plugs",
10458
+ name: "Iridium Spark Plugs (set of 4) \u2014 Toyota / Honda 1.5L\u20132.0L",
10459
+ price: "180.00",
10460
+ category: "brakes",
10461
+ description: "Long-life iridium spark plugs. Lasts 100,000 km.",
10462
+ tags: ["ignition", "fits:toyota", "fits:honda"]
10463
+ },
10464
+ // Batteries
10465
+ {
10466
+ slug: "battery-60ah",
10467
+ name: "60Ah Maintenance-Free Battery",
10468
+ price: "780.00",
10469
+ category: "batteries",
10470
+ description: "CCA 540A. Fits most Japanese saloons. 2-year warranty.",
10471
+ tags: ["battery", "fits:toyota", "fits:honda", "fits:nissan", "fits:hyundai"]
10472
+ },
10473
+ {
10474
+ slug: "battery-70ah",
10475
+ name: "70Ah Maintenance-Free Battery",
10476
+ price: "920.00",
10477
+ category: "batteries",
10478
+ description: "CCA 640A. Fits SUVs and European saloons. 2-year warranty.",
10479
+ tags: ["battery", "fits:toyota", "fits:hyundai", "fits:volkswagen"]
10480
+ },
10481
+ {
10482
+ slug: "battery-100ah",
10483
+ name: "100Ah Heavy-Duty Battery",
10484
+ price: "1450.00",
10485
+ category: "batteries",
10486
+ description: "CCA 850A. For 4x4s, diesel engines, and aftermarket audio. 2-year warranty.",
10487
+ tags: ["battery", "heavy-duty", "fits:toyota", "fits:nissan"]
10488
+ },
10489
+ // Tires & wheels
10490
+ {
10491
+ slug: "tire-195-65-r15",
10492
+ name: "Tire 195/65 R15 \u2014 All-Season",
10493
+ price: "620.00",
10494
+ category: "tires",
10495
+ description: "Fits Toyota Corolla, Yaris, and most compact saloons. Treadwear 480.",
10496
+ tags: ["tire", "fits:toyota", "fits:toyota:corolla", "fits:toyota:yaris"]
10497
+ },
10498
+ {
10499
+ slug: "tire-205-55-r16",
10500
+ name: "Tire 205/55 R16 \u2014 All-Season",
10501
+ price: "780.00",
10502
+ category: "tires",
10503
+ description: "Fits Honda Civic, Mazda 3, VW Jetta. Treadwear 500.",
10504
+ tags: ["tire", "fits:honda", "fits:honda:civic", "fits:mazda", "fits:volkswagen"]
10505
+ },
10506
+ {
10507
+ slug: "tire-all-terrain",
10508
+ name: "Tire 265/70 R17 \u2014 All-Terrain",
10509
+ price: "1280.00",
10510
+ category: "tires",
10511
+ description: "Fits Toyota Hilux, Ford Ranger, Mitsubishi L200. Aggressive mud-and-snow tread.",
10512
+ tags: ["tire", "all-terrain", "fits:toyota", "fits:toyota:hilux", "fits:ford"]
10513
+ },
10514
+ // Lights & bulbs
10515
+ {
10516
+ slug: "h4-bulb",
10517
+ name: "H4 Halogen Bulb (pair) \u2014 Universal",
10518
+ price: "85.00",
10519
+ category: "bulbs",
10520
+ description: "55/60W halogen headlight bulbs. Drop-in replacement.",
10521
+ tags: ["bulb", "halogen", "fits:universal"]
10522
+ },
10523
+ {
10524
+ slug: "h7-led-headlight",
10525
+ name: "H7 LED Headlight Conversion (pair)",
10526
+ price: "320.00",
10527
+ category: "bulbs",
10528
+ description: "6000K daylight white. CANbus-compatible; no dashboard error.",
10529
+ tags: ["bulb", "led", "fits:universal"]
10530
+ },
10531
+ {
10532
+ slug: "brake-light-bulb",
10533
+ name: "Brake / Tail Light Bulb (pair) \u2014 P21W",
10534
+ price: "35.00",
10535
+ category: "bulbs",
10536
+ description: "21W stop and tail light bulbs. Universal bayonet fit.",
10537
+ tags: ["bulb", "fits:universal"]
10538
+ },
10539
+ // Wipers & exterior
10540
+ {
10541
+ slug: "wiper-blades-22",
10542
+ name: 'Wiper Blades 22" (pair)',
10543
+ price: "95.00",
10544
+ category: "wipers",
10545
+ description: "Soft-rubber refill. Fits Toyota Corolla, Honda Civic, and most compact saloons.",
10546
+ tags: ["wiper", "fits:universal"]
10547
+ },
10548
+ {
10549
+ slug: "wiper-blades-24",
10550
+ name: 'Wiper Blades 24" (pair)',
10551
+ price: "110.00",
10552
+ category: "wipers",
10553
+ description: "Soft-rubber refill. Fits Toyota Camry, Honda Accord, Hyundai Sonata.",
10554
+ tags: ["wiper", "fits:universal"]
10555
+ },
10556
+ {
10557
+ slug: "washer-fluid",
10558
+ name: "Concentrated Washer Fluid (1L)",
10559
+ price: "25.00",
10560
+ category: "wipers",
10561
+ description: "Dilutes 1:10. Bug-and-tar cleaner, anti-streak.",
10562
+ tags: ["fluid", "fits:universal"]
10563
+ },
10564
+ {
10565
+ slug: "floor-mats",
10566
+ name: "All-Weather Floor Mats (set of 4)",
10567
+ price: "180.00",
10568
+ category: "wipers",
10569
+ description: "Heavy-duty rubber. Trimmable to fit any vehicle.",
10570
+ tags: ["interior", "fits:universal"]
10571
+ },
10572
+ // Tools & accessories
10573
+ {
10574
+ slug: "dashcam",
10575
+ name: "1080p Dashcam with GPS",
10576
+ price: "650.00",
10577
+ category: "tools",
10578
+ description: "Loop recording, G-sensor, 32GB card included. 12V cigarette-lighter plug.",
10579
+ tags: ["electronics", "fits:universal"]
10580
+ },
10581
+ {
10582
+ slug: "jumper-cables",
10583
+ name: "Heavy-Duty Jumper Cables (4m, 1000A)",
10584
+ price: "220.00",
10585
+ category: "tools",
10586
+ description: "4-gauge copper-clad cables. Suitable for cars, SUVs, and small trucks.",
10587
+ tags: ["tool", "fits:universal"]
10588
+ },
10589
+ {
10590
+ slug: "tire-inflator",
10591
+ name: "12V Portable Tire Inflator",
10592
+ price: "280.00",
10593
+ category: "tools",
10594
+ description: "150 PSI compressor with digital gauge and auto-shutoff. Cigarette-lighter plug.",
10595
+ tags: ["tool", "fits:universal"]
10596
+ },
10597
+ {
10598
+ slug: "microfiber-cloth",
10599
+ name: "Microfiber Detailing Cloth (6 pack)",
10600
+ price: "60.00",
10601
+ category: "tools",
10602
+ description: "Lint-free 40x40cm microfiber cloths. Wash-and-reuse.",
10603
+ tags: ["detailing", "fits:universal"]
10604
+ }
10605
+ ];
10606
+ for (const p of products) {
10607
+ const id = `prod_${p.slug}`;
10608
+ const catId = catIds.get(p.category);
10609
+ const product = {
10610
+ id,
10611
+ business_id: businessId,
10612
+ name: p.name,
10613
+ slug: p.slug,
10614
+ description: p.description,
10615
+ product_type: "product",
10616
+ base_price: p.price,
10617
+ currency: "GHS",
10618
+ image: photoFor7(p.slug),
10619
+ images: [photoFor7(p.slug)],
10620
+ is_available: true,
10621
+ category_ids: [catId],
10622
+ collection_ids: [],
10623
+ add_on_ids: [],
10624
+ variant_ids: [],
10625
+ tags: p.tags ?? [],
10626
+ created_at: ISO10,
10627
+ updated_at: ISO10
10628
+ };
10629
+ registry.products.put(id, product);
10630
+ const cat = registry.categories.get(catId);
10631
+ cat.product_ids.push(id);
10632
+ registry.categories.put(catId, cat);
10633
+ }
10634
+ const serviceKit = {
10635
+ id: "col_service_kit",
10636
+ business_id: businessId,
10637
+ name: "Service-due kit",
10638
+ slug: "service-kit",
10639
+ description: "Everything for a routine oil-and-filter service.",
10640
+ product_ids: [
10641
+ "prod_engine-oil-5w30",
10642
+ "prod_oil-filter",
10643
+ "prod_air-filter",
10644
+ "prod_cabin-filter",
10645
+ "prod_spark-plugs"
10646
+ ],
10647
+ is_active: true,
10648
+ created_at: ISO10,
10649
+ updated_at: ISO10
10650
+ };
10651
+ registry.collections.put(serviceKit.id, serviceKit);
10652
+ for (const pid of serviceKit.product_ids) {
10653
+ const p = registry.products.get(pid);
10654
+ if (p) {
10655
+ p.collection_ids.push(serviceKit.id);
10656
+ registry.products.put(pid, p);
10657
+ }
10658
+ }
10659
+ const tagDefs = [
10660
+ { slug: "oil", name: "Oil" },
10661
+ { slug: "filter", name: "Filter" },
10662
+ { slug: "brakes", name: "Brakes" },
10663
+ { slug: "battery", name: "Battery" },
10664
+ { slug: "tire", name: "Tire" },
10665
+ { slug: "fits:toyota", name: "Fits Toyota" },
10666
+ { slug: "fits:honda", name: "Fits Honda" },
10667
+ { slug: "fits:nissan", name: "Fits Nissan" },
10668
+ { slug: "fits:hyundai", name: "Fits Hyundai" },
10669
+ { slug: "fits:universal", name: "Fits Universal" }
10670
+ ];
10671
+ const tags = tagDefs.map((t, i) => ({
10672
+ id: `tag_${t.slug.replace(/[:]/g, "_")}`,
10673
+ business_id: businessId,
10674
+ name: t.name,
10675
+ slug: t.slug,
10676
+ sort_order: i,
10677
+ usage_count: 0,
10678
+ created_at: ISO10,
10679
+ updated_at: ISO10
10680
+ }));
10681
+ for (const t of tags) registry.tags.put(t.id, t);
10682
+ const taxonomy = {
10683
+ id: "tax_driveline",
10684
+ business_id: businessId,
10685
+ name: "Driveline catalogue",
10686
+ slug: "catalogue",
10687
+ path: [],
10688
+ attribute_template_ids: [],
10689
+ created_at: ISO10,
10690
+ updated_at: ISO10
10691
+ };
10692
+ registry.taxonomies.put(taxonomy.id, taxonomy);
10693
+ const kb = [
10694
+ {
10695
+ id: "kb_fitment",
10696
+ business_id: businessId,
10697
+ title: "How fitment works",
10698
+ slug: "fitment",
10699
+ content: "Every Driveline part lists which makes and models it fits. Use the fitment finder on the home page to filter the whole catalogue to parts that match your vehicle. Universal parts (oil, wipers, tools) always appear regardless of your selection.",
10700
+ category: "fitment",
10701
+ tags: ["fitment"],
10702
+ created_at: ISO10,
10703
+ updated_at: ISO10
10704
+ },
10705
+ {
10706
+ id: "kb_returns",
10707
+ business_id: businessId,
10708
+ title: "Returns & exchanges",
10709
+ slug: "returns",
10710
+ content: "Wrong part? 30-day exchange on unopened items. Electrical parts (bulbs, batteries, dashcams) are exchange-only once installed.",
10711
+ category: "policies",
10712
+ tags: ["returns"],
10713
+ created_at: ISO10,
10714
+ updated_at: ISO10
10715
+ },
10716
+ {
10717
+ id: "kb_install",
10718
+ business_id: businessId,
10719
+ title: "Installation",
10720
+ slug: "installation",
10721
+ content: "Need help fitting a part? Our partner workshops on Spintex and Tema Industrial offer flat-rate fitting from GH\u20B580. Ask at checkout.",
10722
+ category: "service",
10723
+ tags: ["installation"],
10724
+ created_at: ISO10,
10725
+ updated_at: ISO10
10726
+ }
10727
+ ];
10728
+ for (const a of kb) registry.knowledgeArticles.put(a.id, a);
10729
+ return { businessId };
10730
+ }
10731
+
10287
10732
  // src/mock/seeds/registry.ts
10288
10733
  var SEEDS = {
10289
10734
  default: seedDefault,
@@ -10294,7 +10739,8 @@ var SEEDS = {
10294
10739
  services: seedServices,
10295
10740
  grocery: seedGrocery,
10296
10741
  fashion: seedFashion,
10297
- pharmacy: seedPharmacy
10742
+ pharmacy: seedPharmacy,
10743
+ auto: seedAuto
10298
10744
  };
10299
10745
  function applySeed(registry, name) {
10300
10746
  const fn = SEEDS[name];
@@ -1,5 +1,5 @@
1
- import { M as MockBus, a as MockEvent } from '../server-CiUhgjZA.mjs';
2
- export { A as AppHandle, m as Clock, C as CreateAppOptions, D as Deps, I as IdGen, h as MockBusiness, j as MockCart, l as MockEventType, d as MockOptions, k as MockOrder, i as MockProduct, S as SeedName, f as Session, g as StateRegistry, e as applySeed, b as createDeps, c as createMockApp } from '../server-CiUhgjZA.mjs';
1
+ import { M as MockBus, a as MockEvent } from '../server-CzthOeYS.mjs';
2
+ export { A as AppHandle, m as Clock, C as CreateAppOptions, D as Deps, I as IdGen, h as MockBusiness, j as MockCart, l as MockEventType, d as MockOptions, k as MockOrder, i as MockProduct, S as SeedName, f as Session, g as StateRegistry, e as applySeed, b as createDeps, c as createMockApp } from '../server-CzthOeYS.mjs';
3
3
  import 'hono';
4
4
 
5
5
  interface WebhookOptions {
@@ -1,5 +1,5 @@
1
- import { M as MockBus, a as MockEvent } from '../server-CiUhgjZA.js';
2
- export { A as AppHandle, m as Clock, C as CreateAppOptions, D as Deps, I as IdGen, h as MockBusiness, j as MockCart, l as MockEventType, d as MockOptions, k as MockOrder, i as MockProduct, S as SeedName, f as Session, g as StateRegistry, e as applySeed, b as createDeps, c as createMockApp } from '../server-CiUhgjZA.js';
1
+ import { M as MockBus, a as MockEvent } from '../server-CzthOeYS.js';
2
+ export { A as AppHandle, m as Clock, C as CreateAppOptions, D as Deps, I as IdGen, h as MockBusiness, j as MockCart, l as MockEventType, d as MockOptions, k as MockOrder, i as MockProduct, S as SeedName, f as Session, g as StateRegistry, e as applySeed, b as createDeps, c as createMockApp } from '../server-CzthOeYS.js';
3
3
  import 'hono';
4
4
 
5
5
  interface WebhookOptions {