@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/msw.js CHANGED
@@ -9650,6 +9650,451 @@ function seedPharmacy(registry) {
9650
9650
  return { businessId };
9651
9651
  }
9652
9652
 
9653
+ // src/mock/seeds/auto.ts
9654
+ var ISO10 = "2026-01-01T00:00:00.000Z";
9655
+ var photoFor7 = (slug) => seedImage("auto", slug);
9656
+ function seedAuto(registry) {
9657
+ const businessId = "bus_driveline_auto";
9658
+ const business = {
9659
+ id: businessId,
9660
+ name: "Driveline Auto Parts",
9661
+ handle: "driveline",
9662
+ business_type: "retail",
9663
+ email: "parts@drivelineauto.test",
9664
+ default_currency: "GHS",
9665
+ default_phone: "+233244600600",
9666
+ default_address: "Spintex Road, Accra",
9667
+ default_offers_table_service: false,
9668
+ default_accepts_online_orders: true,
9669
+ image: photoFor7("business-hero"),
9670
+ status: "active",
9671
+ created_at: ISO10,
9672
+ updated_at: ISO10,
9673
+ created_by: "seed",
9674
+ preferences: {
9675
+ theme: "garage",
9676
+ tagline: "Genuine parts. Same-day. Across Ghana.",
9677
+ checkout: { allow_guest: true }
9678
+ },
9679
+ is_online_only: false,
9680
+ enabled_payment_types: ["card", "mobile_money", "cash"],
9681
+ default_location_settings: {},
9682
+ country_code: "GH",
9683
+ timezone: "Africa/Accra"
9684
+ };
9685
+ registry.businesses.put(businessId, business);
9686
+ const categories = [
9687
+ { slug: "engine-oil", name: "Engine Oil & Fluids" },
9688
+ { slug: "filters", name: "Filters" },
9689
+ { slug: "brakes", name: "Brakes" },
9690
+ { slug: "batteries", name: "Batteries" },
9691
+ { slug: "tires", name: "Tires & Wheels" },
9692
+ { slug: "bulbs", name: "Lights & Bulbs" },
9693
+ { slug: "wipers", name: "Wipers & Exterior" },
9694
+ { slug: "tools", name: "Tools & Accessories" }
9695
+ ];
9696
+ const catIds = /* @__PURE__ */ new Map();
9697
+ for (const c of categories) {
9698
+ const id = `cat_${c.slug}`;
9699
+ catIds.set(c.slug, id);
9700
+ const cat = {
9701
+ id,
9702
+ business_id: businessId,
9703
+ name: c.name,
9704
+ slug: c.slug,
9705
+ description: `Driveline \u2014 ${c.name}`,
9706
+ product_ids: [],
9707
+ display_order: 0,
9708
+ is_active: true,
9709
+ created_at: ISO10,
9710
+ updated_at: ISO10
9711
+ };
9712
+ registry.categories.put(id, cat);
9713
+ }
9714
+ const products = [
9715
+ // Engine oil & fluids
9716
+ {
9717
+ slug: "engine-oil-5w30",
9718
+ name: "5W-30 Full Synthetic Motor Oil (5L)",
9719
+ price: "320.00",
9720
+ category: "engine-oil",
9721
+ description: "API SP / ILSAC GF-6A full synthetic. Recommended for most modern petrol engines.",
9722
+ tags: ["oil", "synthetic", "fits:universal"]
9723
+ },
9724
+ {
9725
+ slug: "engine-oil-5w40",
9726
+ name: "5W-40 Full Synthetic Motor Oil (5L)",
9727
+ price: "335.00",
9728
+ category: "engine-oil",
9729
+ description: "Higher viscosity for European petrol and diesel engines. API SN / ACEA C3.",
9730
+ tags: ["oil", "synthetic", "fits:universal"]
9731
+ },
9732
+ {
9733
+ slug: "engine-oil-10w40",
9734
+ name: "10W-40 Semi-Synthetic Motor Oil (5L)",
9735
+ price: "240.00",
9736
+ category: "engine-oil",
9737
+ description: "All-weather semi-synthetic. Ideal for older or high-mileage engines.",
9738
+ tags: ["oil", "semi-synthetic", "fits:universal"]
9739
+ },
9740
+ {
9741
+ slug: "brake-fluid",
9742
+ name: "DOT 4 Brake Fluid (500ml)",
9743
+ price: "55.00",
9744
+ category: "engine-oil",
9745
+ description: "High-boiling-point hydraulic brake fluid. Replace every 2 years.",
9746
+ tags: ["fluid", "fits:universal"]
9747
+ },
9748
+ {
9749
+ slug: "coolant",
9750
+ name: "Long-Life Coolant Concentrate (1L)",
9751
+ price: "75.00",
9752
+ category: "engine-oil",
9753
+ description: "Ethylene-glycol concentrate. Dilute 50/50 with distilled water.",
9754
+ tags: ["fluid", "fits:universal"]
9755
+ },
9756
+ {
9757
+ slug: "transmission-fluid",
9758
+ name: "ATF Dexron VI (1L)",
9759
+ price: "95.00",
9760
+ category: "engine-oil",
9761
+ description: "Full-synthetic automatic transmission fluid. Backwards-compatible with Dexron III/II.",
9762
+ tags: ["fluid", "fits:universal"]
9763
+ },
9764
+ // Filters
9765
+ {
9766
+ slug: "oil-filter",
9767
+ name: "Oil Filter \u2014 Toyota / Honda / Nissan 1.5L\u20132.5L",
9768
+ price: "55.00",
9769
+ category: "filters",
9770
+ description: "Spin-on oil filter. Fits most Japanese-make 4-cylinder engines.",
9771
+ tags: ["filter", "fits:toyota", "fits:honda", "fits:nissan"]
9772
+ },
9773
+ {
9774
+ slug: "air-filter",
9775
+ name: "Engine Air Filter \u2014 Toyota Corolla / Yaris (2014\u20132024)",
9776
+ price: "85.00",
9777
+ category: "filters",
9778
+ description: "Pleated paper element. Replace every 20,000 km.",
9779
+ tags: ["filter", "fits:toyota", "fits:toyota:corolla", "fits:toyota:yaris"]
9780
+ },
9781
+ {
9782
+ slug: "cabin-filter",
9783
+ name: "Cabin Air Filter \u2014 Honda Civic / CR-V (2016\u20132023)",
9784
+ price: "95.00",
9785
+ category: "filters",
9786
+ description: "Activated-charcoal cabin filter. Improves AC airflow and traps pollen.",
9787
+ tags: ["filter", "fits:honda", "fits:honda:civic", "fits:honda:cr-v"]
9788
+ },
9789
+ {
9790
+ slug: "fuel-filter",
9791
+ name: "Fuel Filter \u2014 Nissan Almera / Sentra (2015\u20132024)",
9792
+ price: "120.00",
9793
+ category: "filters",
9794
+ description: "In-line fuel filter. Replace every 40,000 km.",
9795
+ tags: ["filter", "fits:nissan", "fits:nissan:almera", "fits:nissan:sentra"]
9796
+ },
9797
+ // Brakes
9798
+ {
9799
+ slug: "brake-pads-front",
9800
+ name: "Front Brake Pads \u2014 Toyota Corolla (2014\u20132024)",
9801
+ price: "280.00",
9802
+ category: "brakes",
9803
+ description: "Low-dust ceramic compound. Includes anti-squeal shims.",
9804
+ tags: ["brakes", "ceramic", "fits:toyota", "fits:toyota:corolla"]
9805
+ },
9806
+ {
9807
+ slug: "brake-pads-rear",
9808
+ name: "Rear Brake Pads \u2014 Honda Civic (2016\u20132023)",
9809
+ price: "240.00",
9810
+ category: "brakes",
9811
+ description: "Semi-metallic compound. Quiet, low-dust.",
9812
+ tags: ["brakes", "fits:honda", "fits:honda:civic"]
9813
+ },
9814
+ {
9815
+ slug: "brake-discs",
9816
+ name: "Front Brake Discs (pair) \u2014 Hyundai Elantra (2017\u20132024)",
9817
+ price: "650.00",
9818
+ category: "brakes",
9819
+ description: "Vented rotors with anti-corrosion coating. Sold as a pair.",
9820
+ tags: ["brakes", "fits:hyundai", "fits:hyundai:elantra"]
9821
+ },
9822
+ {
9823
+ slug: "spark-plugs",
9824
+ name: "Iridium Spark Plugs (set of 4) \u2014 Toyota / Honda 1.5L\u20132.0L",
9825
+ price: "180.00",
9826
+ category: "brakes",
9827
+ description: "Long-life iridium spark plugs. Lasts 100,000 km.",
9828
+ tags: ["ignition", "fits:toyota", "fits:honda"]
9829
+ },
9830
+ // Batteries
9831
+ {
9832
+ slug: "battery-60ah",
9833
+ name: "60Ah Maintenance-Free Battery",
9834
+ price: "780.00",
9835
+ category: "batteries",
9836
+ description: "CCA 540A. Fits most Japanese saloons. 2-year warranty.",
9837
+ tags: ["battery", "fits:toyota", "fits:honda", "fits:nissan", "fits:hyundai"]
9838
+ },
9839
+ {
9840
+ slug: "battery-70ah",
9841
+ name: "70Ah Maintenance-Free Battery",
9842
+ price: "920.00",
9843
+ category: "batteries",
9844
+ description: "CCA 640A. Fits SUVs and European saloons. 2-year warranty.",
9845
+ tags: ["battery", "fits:toyota", "fits:hyundai", "fits:volkswagen"]
9846
+ },
9847
+ {
9848
+ slug: "battery-100ah",
9849
+ name: "100Ah Heavy-Duty Battery",
9850
+ price: "1450.00",
9851
+ category: "batteries",
9852
+ description: "CCA 850A. For 4x4s, diesel engines, and aftermarket audio. 2-year warranty.",
9853
+ tags: ["battery", "heavy-duty", "fits:toyota", "fits:nissan"]
9854
+ },
9855
+ // Tires & wheels
9856
+ {
9857
+ slug: "tire-195-65-r15",
9858
+ name: "Tire 195/65 R15 \u2014 All-Season",
9859
+ price: "620.00",
9860
+ category: "tires",
9861
+ description: "Fits Toyota Corolla, Yaris, and most compact saloons. Treadwear 480.",
9862
+ tags: ["tire", "fits:toyota", "fits:toyota:corolla", "fits:toyota:yaris"]
9863
+ },
9864
+ {
9865
+ slug: "tire-205-55-r16",
9866
+ name: "Tire 205/55 R16 \u2014 All-Season",
9867
+ price: "780.00",
9868
+ category: "tires",
9869
+ description: "Fits Honda Civic, Mazda 3, VW Jetta. Treadwear 500.",
9870
+ tags: ["tire", "fits:honda", "fits:honda:civic", "fits:mazda", "fits:volkswagen"]
9871
+ },
9872
+ {
9873
+ slug: "tire-all-terrain",
9874
+ name: "Tire 265/70 R17 \u2014 All-Terrain",
9875
+ price: "1280.00",
9876
+ category: "tires",
9877
+ description: "Fits Toyota Hilux, Ford Ranger, Mitsubishi L200. Aggressive mud-and-snow tread.",
9878
+ tags: ["tire", "all-terrain", "fits:toyota", "fits:toyota:hilux", "fits:ford"]
9879
+ },
9880
+ // Lights & bulbs
9881
+ {
9882
+ slug: "h4-bulb",
9883
+ name: "H4 Halogen Bulb (pair) \u2014 Universal",
9884
+ price: "85.00",
9885
+ category: "bulbs",
9886
+ description: "55/60W halogen headlight bulbs. Drop-in replacement.",
9887
+ tags: ["bulb", "halogen", "fits:universal"]
9888
+ },
9889
+ {
9890
+ slug: "h7-led-headlight",
9891
+ name: "H7 LED Headlight Conversion (pair)",
9892
+ price: "320.00",
9893
+ category: "bulbs",
9894
+ description: "6000K daylight white. CANbus-compatible; no dashboard error.",
9895
+ tags: ["bulb", "led", "fits:universal"]
9896
+ },
9897
+ {
9898
+ slug: "brake-light-bulb",
9899
+ name: "Brake / Tail Light Bulb (pair) \u2014 P21W",
9900
+ price: "35.00",
9901
+ category: "bulbs",
9902
+ description: "21W stop and tail light bulbs. Universal bayonet fit.",
9903
+ tags: ["bulb", "fits:universal"]
9904
+ },
9905
+ // Wipers & exterior
9906
+ {
9907
+ slug: "wiper-blades-22",
9908
+ name: 'Wiper Blades 22" (pair)',
9909
+ price: "95.00",
9910
+ category: "wipers",
9911
+ description: "Soft-rubber refill. Fits Toyota Corolla, Honda Civic, and most compact saloons.",
9912
+ tags: ["wiper", "fits:universal"]
9913
+ },
9914
+ {
9915
+ slug: "wiper-blades-24",
9916
+ name: 'Wiper Blades 24" (pair)',
9917
+ price: "110.00",
9918
+ category: "wipers",
9919
+ description: "Soft-rubber refill. Fits Toyota Camry, Honda Accord, Hyundai Sonata.",
9920
+ tags: ["wiper", "fits:universal"]
9921
+ },
9922
+ {
9923
+ slug: "washer-fluid",
9924
+ name: "Concentrated Washer Fluid (1L)",
9925
+ price: "25.00",
9926
+ category: "wipers",
9927
+ description: "Dilutes 1:10. Bug-and-tar cleaner, anti-streak.",
9928
+ tags: ["fluid", "fits:universal"]
9929
+ },
9930
+ {
9931
+ slug: "floor-mats",
9932
+ name: "All-Weather Floor Mats (set of 4)",
9933
+ price: "180.00",
9934
+ category: "wipers",
9935
+ description: "Heavy-duty rubber. Trimmable to fit any vehicle.",
9936
+ tags: ["interior", "fits:universal"]
9937
+ },
9938
+ // Tools & accessories
9939
+ {
9940
+ slug: "dashcam",
9941
+ name: "1080p Dashcam with GPS",
9942
+ price: "650.00",
9943
+ category: "tools",
9944
+ description: "Loop recording, G-sensor, 32GB card included. 12V cigarette-lighter plug.",
9945
+ tags: ["electronics", "fits:universal"]
9946
+ },
9947
+ {
9948
+ slug: "jumper-cables",
9949
+ name: "Heavy-Duty Jumper Cables (4m, 1000A)",
9950
+ price: "220.00",
9951
+ category: "tools",
9952
+ description: "4-gauge copper-clad cables. Suitable for cars, SUVs, and small trucks.",
9953
+ tags: ["tool", "fits:universal"]
9954
+ },
9955
+ {
9956
+ slug: "tire-inflator",
9957
+ name: "12V Portable Tire Inflator",
9958
+ price: "280.00",
9959
+ category: "tools",
9960
+ description: "150 PSI compressor with digital gauge and auto-shutoff. Cigarette-lighter plug.",
9961
+ tags: ["tool", "fits:universal"]
9962
+ },
9963
+ {
9964
+ slug: "microfiber-cloth",
9965
+ name: "Microfiber Detailing Cloth (6 pack)",
9966
+ price: "60.00",
9967
+ category: "tools",
9968
+ description: "Lint-free 40x40cm microfiber cloths. Wash-and-reuse.",
9969
+ tags: ["detailing", "fits:universal"]
9970
+ }
9971
+ ];
9972
+ for (const p of products) {
9973
+ const id = `prod_${p.slug}`;
9974
+ const catId = catIds.get(p.category);
9975
+ const product = {
9976
+ id,
9977
+ business_id: businessId,
9978
+ name: p.name,
9979
+ slug: p.slug,
9980
+ description: p.description,
9981
+ product_type: "product",
9982
+ base_price: p.price,
9983
+ currency: "GHS",
9984
+ image: photoFor7(p.slug),
9985
+ images: [photoFor7(p.slug)],
9986
+ is_available: true,
9987
+ category_ids: [catId],
9988
+ collection_ids: [],
9989
+ add_on_ids: [],
9990
+ variant_ids: [],
9991
+ tags: p.tags ?? [],
9992
+ created_at: ISO10,
9993
+ updated_at: ISO10
9994
+ };
9995
+ registry.products.put(id, product);
9996
+ const cat = registry.categories.get(catId);
9997
+ cat.product_ids.push(id);
9998
+ registry.categories.put(catId, cat);
9999
+ }
10000
+ const serviceKit = {
10001
+ id: "col_service_kit",
10002
+ business_id: businessId,
10003
+ name: "Service-due kit",
10004
+ slug: "service-kit",
10005
+ description: "Everything for a routine oil-and-filter service.",
10006
+ product_ids: [
10007
+ "prod_engine-oil-5w30",
10008
+ "prod_oil-filter",
10009
+ "prod_air-filter",
10010
+ "prod_cabin-filter",
10011
+ "prod_spark-plugs"
10012
+ ],
10013
+ is_active: true,
10014
+ created_at: ISO10,
10015
+ updated_at: ISO10
10016
+ };
10017
+ registry.collections.put(serviceKit.id, serviceKit);
10018
+ for (const pid of serviceKit.product_ids) {
10019
+ const p = registry.products.get(pid);
10020
+ if (p) {
10021
+ p.collection_ids.push(serviceKit.id);
10022
+ registry.products.put(pid, p);
10023
+ }
10024
+ }
10025
+ const tagDefs = [
10026
+ { slug: "oil", name: "Oil" },
10027
+ { slug: "filter", name: "Filter" },
10028
+ { slug: "brakes", name: "Brakes" },
10029
+ { slug: "battery", name: "Battery" },
10030
+ { slug: "tire", name: "Tire" },
10031
+ { slug: "fits:toyota", name: "Fits Toyota" },
10032
+ { slug: "fits:honda", name: "Fits Honda" },
10033
+ { slug: "fits:nissan", name: "Fits Nissan" },
10034
+ { slug: "fits:hyundai", name: "Fits Hyundai" },
10035
+ { slug: "fits:universal", name: "Fits Universal" }
10036
+ ];
10037
+ const tags = tagDefs.map((t, i) => ({
10038
+ id: `tag_${t.slug.replace(/[:]/g, "_")}`,
10039
+ business_id: businessId,
10040
+ name: t.name,
10041
+ slug: t.slug,
10042
+ sort_order: i,
10043
+ usage_count: 0,
10044
+ created_at: ISO10,
10045
+ updated_at: ISO10
10046
+ }));
10047
+ for (const t of tags) registry.tags.put(t.id, t);
10048
+ const taxonomy = {
10049
+ id: "tax_driveline",
10050
+ business_id: businessId,
10051
+ name: "Driveline catalogue",
10052
+ slug: "catalogue",
10053
+ path: [],
10054
+ attribute_template_ids: [],
10055
+ created_at: ISO10,
10056
+ updated_at: ISO10
10057
+ };
10058
+ registry.taxonomies.put(taxonomy.id, taxonomy);
10059
+ const kb = [
10060
+ {
10061
+ id: "kb_fitment",
10062
+ business_id: businessId,
10063
+ title: "How fitment works",
10064
+ slug: "fitment",
10065
+ 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.",
10066
+ category: "fitment",
10067
+ tags: ["fitment"],
10068
+ created_at: ISO10,
10069
+ updated_at: ISO10
10070
+ },
10071
+ {
10072
+ id: "kb_returns",
10073
+ business_id: businessId,
10074
+ title: "Returns & exchanges",
10075
+ slug: "returns",
10076
+ content: "Wrong part? 30-day exchange on unopened items. Electrical parts (bulbs, batteries, dashcams) are exchange-only once installed.",
10077
+ category: "policies",
10078
+ tags: ["returns"],
10079
+ created_at: ISO10,
10080
+ updated_at: ISO10
10081
+ },
10082
+ {
10083
+ id: "kb_install",
10084
+ business_id: businessId,
10085
+ title: "Installation",
10086
+ slug: "installation",
10087
+ content: "Need help fitting a part? Our partner workshops on Spintex and Tema Industrial offer flat-rate fitting from GH\u20B580. Ask at checkout.",
10088
+ category: "service",
10089
+ tags: ["installation"],
10090
+ created_at: ISO10,
10091
+ updated_at: ISO10
10092
+ }
10093
+ ];
10094
+ for (const a of kb) registry.knowledgeArticles.put(a.id, a);
10095
+ return { businessId };
10096
+ }
10097
+
9653
10098
  // src/mock/seeds/registry.ts
9654
10099
  var SEEDS = {
9655
10100
  default: seedDefault,
@@ -9660,7 +10105,8 @@ var SEEDS = {
9660
10105
  services: seedServices,
9661
10106
  grocery: seedGrocery,
9662
10107
  fashion: seedFashion,
9663
- pharmacy: seedPharmacy
10108
+ pharmacy: seedPharmacy,
10109
+ auto: seedAuto
9664
10110
  };
9665
10111
  function applySeed(registry, name) {
9666
10112
  const fn = SEEDS[name];