@cimplify/sdk 0.43.0 → 0.44.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.
@@ -47,7 +47,7 @@ Init flags:
47
47
  Mock flags:
48
48
  --port <num> Port (default 8787)
49
49
  --host <host> Host (default 127.0.0.1)
50
- --seed <name> default | restaurant | retail | services | grocery | reesa-storefront | empty
50
+ --seed <name> default | restaurant | retail | services | grocery | fashion | reesa-storefront | empty
51
51
  --auth-mode <mode> permissive (default) | strict
52
52
  --otp <code> Default OTP code (default 123456)
53
53
  --persist <file> Persist state to JSON file
package/dist/mock/cli.mjs CHANGED
@@ -8626,6 +8626,442 @@ function seedGrocery(registry) {
8626
8626
  return { businessId };
8627
8627
  }
8628
8628
 
8629
+ // src/mock/seeds/fashion.ts
8630
+ var ISO8 = "2026-01-01T00:00:00.000Z";
8631
+ var img3 = (id) => `https://images.unsplash.com/photo-${id}?w=900&h=1200&fit=crop&auto=format&q=80`;
8632
+ var PHOTO2 = {
8633
+ "heavyweight-hoodie-charcoal": "1556905055-8f358a7a47b2",
8634
+ "heavyweight-hoodie-cream": "1576566588028-4147f3842f27",
8635
+ "heavyweight-hoodie-cobalt": "1542838686-37da4a9fd1b3",
8636
+ "studio-tee-black": "1521572163474-6864f9cf17ab",
8637
+ "studio-tee-natural": "1485518882345-15568b007407",
8638
+ "graphic-tee-frx-mark": "1521223890158-f9f7c3d5d504",
8639
+ "carbon-bomber": "1591047139829-d91aecb6caea",
8640
+ "field-jacket-olive": "1564859228273-274232fdb516",
8641
+ "wide-leg-trouser": "1542272604-787c3835535d",
8642
+ "track-pant-charcoal": "1604176354204-9268737828e4",
8643
+ "studio-cap": "1620799140408-edc6dcb6d633",
8644
+ "tote-natural": "1591195853828-11db59a44f6b",
8645
+ "knit-beanie": "1542838132-92c53300491e",
8646
+ "studio-sock-3pack": "1602810318383-e386cc2a3ccf"
8647
+ };
8648
+ var photoFor2 = (slug) => img3(PHOTO2[slug] ?? "1556905055-8f358a7a47b2");
8649
+ var SIZES = ["XS", "S", "M", "L", "XL", "2XL"];
8650
+ function seedFashion(registry) {
8651
+ const businessId = "bus_studio_frx";
8652
+ const business = {
8653
+ id: businessId,
8654
+ name: "Studio FRX",
8655
+ handle: "studiofrx",
8656
+ business_type: "retail",
8657
+ email: "hello@studiofrx.test",
8658
+ default_currency: "GHS",
8659
+ default_phone: "+233244000000",
8660
+ default_address: "Osu Oxford Street, Accra",
8661
+ default_offers_table_service: false,
8662
+ default_accepts_online_orders: true,
8663
+ image: img3("1490481651871-ab68de25d43d"),
8664
+ status: "active",
8665
+ created_at: ISO8,
8666
+ updated_at: ISO8,
8667
+ created_by: "seed",
8668
+ preferences: {
8669
+ tagline: "Limited-run streetwear from Accra",
8670
+ description: "Heavyweight cotton, garment-dyed in Tema, hand-screened. Each drop is a closed run \u2014 when it's gone, it's gone.",
8671
+ instagram: "https://instagram.com/studiofrx",
8672
+ theme: "monochrome",
8673
+ checkout: { allow_guest: true }
8674
+ },
8675
+ is_online_only: false,
8676
+ enabled_payment_types: ["card", "mobile_money"],
8677
+ default_location_settings: {},
8678
+ country_code: "GH",
8679
+ timezone: "Africa/Accra"
8680
+ };
8681
+ registry.businesses.put(businessId, business);
8682
+ const categories = [
8683
+ { slug: "new-arrivals", name: "New Arrivals", description: "Just dropped \u2014 the latest from the studio." },
8684
+ { slug: "hoodies", name: "Hoodies", description: "Heavyweight 500gsm, garment-dyed in Tema." },
8685
+ { slug: "tees", name: "Tees", description: "14oz cotton, oversized cut, hand-screened." },
8686
+ { slug: "outerwear", name: "Outerwear", description: "Bombers, field jackets, made for layering." },
8687
+ { slug: "bottoms", name: "Bottoms", description: "Wide-leg trousers and track pants." },
8688
+ { slug: "accessories", name: "Accessories", description: "Caps, totes, beanies, socks." }
8689
+ ];
8690
+ const catIds = /* @__PURE__ */ new Map();
8691
+ for (const c of categories) {
8692
+ const id = `cat_${c.slug}`;
8693
+ catIds.set(c.slug, id);
8694
+ const cat = {
8695
+ id,
8696
+ business_id: businessId,
8697
+ name: c.name,
8698
+ slug: c.slug,
8699
+ description: c.description,
8700
+ product_ids: [],
8701
+ display_order: 0,
8702
+ is_active: true,
8703
+ created_at: ISO8,
8704
+ updated_at: ISO8
8705
+ };
8706
+ registry.categories.put(id, cat);
8707
+ }
8708
+ const products = [
8709
+ // Hoodies
8710
+ {
8711
+ slug: "heavyweight-hoodie-charcoal",
8712
+ name: "Heavyweight Hoodie \xB7 Charcoal",
8713
+ price: "650.00",
8714
+ category: "hoodies",
8715
+ description: "500gsm garment-dyed cotton, hand-screened FRX seal at chest. Numbered run of 600. Oversized fit; size down for regular cut.",
8716
+ tags: ["hoodie", "signature", "drop-04"],
8717
+ isSignature: true
8718
+ },
8719
+ {
8720
+ slug: "heavyweight-hoodie-cream",
8721
+ name: "Heavyweight Hoodie \xB7 Cream",
8722
+ price: "650.00",
8723
+ category: "hoodies",
8724
+ description: "500gsm garment-dyed cotton in natural cream. Numbered run of 600.",
8725
+ tags: ["hoodie", "drop-04"],
8726
+ isNew: true
8727
+ },
8728
+ {
8729
+ slug: "heavyweight-hoodie-cobalt",
8730
+ name: "Heavyweight Hoodie \xB7 Cobalt",
8731
+ price: "650.00",
8732
+ category: "hoodies",
8733
+ description: "Limited cobalt-blue colourway. 500gsm garment-dyed cotton. Numbered run of 200.",
8734
+ tags: ["hoodie", "limited", "drop-04"],
8735
+ isNew: true
8736
+ },
8737
+ // Tees
8738
+ {
8739
+ slug: "studio-tee-black",
8740
+ name: "Studio Tee \xB7 Black",
8741
+ price: "220.00",
8742
+ category: "tees",
8743
+ description: "14oz heavyweight cotton, garment-dyed. Dropped shoulder, oversized fit. The everyday FRX.",
8744
+ tags: ["tee", "signature"],
8745
+ isSignature: true
8746
+ },
8747
+ {
8748
+ slug: "studio-tee-natural",
8749
+ name: "Studio Tee \xB7 Natural",
8750
+ price: "220.00",
8751
+ category: "tees",
8752
+ description: "14oz heavyweight cotton in undyed natural. Softens beautifully with wear.",
8753
+ tags: ["tee"]
8754
+ },
8755
+ {
8756
+ slug: "graphic-tee-frx-mark",
8757
+ name: "Graphic Tee \xB7 FRX Mark",
8758
+ price: "260.00",
8759
+ category: "tees",
8760
+ description: "Hand-screened FRX seal, oversized fit. 14oz cotton. Numbered run of 400.",
8761
+ tags: ["tee", "graphic", "drop-04"],
8762
+ isNew: true
8763
+ },
8764
+ // Outerwear
8765
+ {
8766
+ slug: "carbon-bomber",
8767
+ name: "Carbon Bomber",
8768
+ price: "1200.00",
8769
+ category: "outerwear",
8770
+ description: "Waxed cotton outer, ribbed cuffs, two-way zip. Cut for layering over a hoodie.",
8771
+ tags: ["outerwear", "premium"],
8772
+ isSignature: true
8773
+ },
8774
+ {
8775
+ slug: "field-jacket-olive",
8776
+ name: "Field Jacket \xB7 Olive",
8777
+ price: "1450.00",
8778
+ category: "outerwear",
8779
+ description: "Garment-dyed military canvas, four utility pockets, drawcord hem. A workhorse.",
8780
+ tags: ["outerwear", "premium", "drop-04"],
8781
+ isNew: true
8782
+ },
8783
+ // Bottoms
8784
+ {
8785
+ slug: "wide-leg-trouser",
8786
+ name: "Wide-Leg Trouser",
8787
+ price: "480.00",
8788
+ category: "bottoms",
8789
+ description: "Heavy twill cotton, pleated front, side pockets. Cut for an oversized silhouette.",
8790
+ tags: ["bottom"]
8791
+ },
8792
+ {
8793
+ slug: "track-pant-charcoal",
8794
+ name: "Track Pant \xB7 Charcoal",
8795
+ price: "380.00",
8796
+ category: "bottoms",
8797
+ description: "Heavyweight loopback fleece, tapered leg, elasticated cuffs. The bottom half of the hoodie set.",
8798
+ tags: ["bottom"]
8799
+ },
8800
+ // Accessories
8801
+ {
8802
+ slug: "studio-cap",
8803
+ name: "Studio Cap",
8804
+ price: "120.00",
8805
+ category: "accessories",
8806
+ description: "Brushed cotton 6-panel, embroidered FRX. Adjustable strap.",
8807
+ tags: ["accessory"]
8808
+ },
8809
+ {
8810
+ slug: "tote-natural",
8811
+ name: "Studio Tote \xB7 Natural",
8812
+ price: "150.00",
8813
+ category: "accessories",
8814
+ description: "12oz natural canvas, screen-printed FRX seal. Roomy.",
8815
+ tags: ["accessory"]
8816
+ },
8817
+ {
8818
+ slug: "knit-beanie",
8819
+ name: "Knit Beanie",
8820
+ price: "140.00",
8821
+ category: "accessories",
8822
+ description: "Merino wool blend, woven label. Two colourways.",
8823
+ tags: ["accessory"]
8824
+ },
8825
+ {
8826
+ slug: "studio-sock-3pack",
8827
+ name: "Studio Sock \xB7 3-pack",
8828
+ price: "180.00",
8829
+ category: "accessories",
8830
+ description: "Heavy-cuff crew socks, 3-pack. Cotton-rich blend.",
8831
+ tags: ["accessory"]
8832
+ }
8833
+ ];
8834
+ for (const p of products) {
8835
+ const id = `prod_${p.slug}`;
8836
+ const catId = catIds.get(p.category);
8837
+ const product = {
8838
+ id,
8839
+ business_id: businessId,
8840
+ name: p.name,
8841
+ slug: p.slug,
8842
+ description: p.description,
8843
+ product_type: "product",
8844
+ base_price: p.price,
8845
+ currency: "GHS",
8846
+ image: photoFor2(p.slug),
8847
+ images: [photoFor2(p.slug)],
8848
+ is_available: true,
8849
+ category_ids: [catId],
8850
+ collection_ids: [],
8851
+ add_on_ids: [],
8852
+ variant_ids: [],
8853
+ tags: p.tags ?? [],
8854
+ is_signature: p.isSignature ?? false,
8855
+ is_new: p.isNew ?? false,
8856
+ render_hint: "physical",
8857
+ created_at: ISO8,
8858
+ updated_at: ISO8
8859
+ };
8860
+ registry.products.put(id, product);
8861
+ const cat = registry.categories.get(catId);
8862
+ cat.product_ids.push(id);
8863
+ registry.categories.put(catId, cat);
8864
+ }
8865
+ for (const p of products) {
8866
+ const productId = `prod_${p.slug}`;
8867
+ const axis = {
8868
+ id: `axis_${p.slug}_size`,
8869
+ business_id: businessId,
8870
+ product_id: productId,
8871
+ name: "Size",
8872
+ display_order: 0,
8873
+ affects_recipe: false,
8874
+ values: SIZES.map((s, i) => ({
8875
+ id: `axv_${p.slug}_size_${s.toLowerCase()}`,
8876
+ business_id: businessId,
8877
+ axis_id: `axis_${p.slug}_size`,
8878
+ name: s,
8879
+ display_order: i,
8880
+ created_at: ISO8,
8881
+ updated_at: ISO8
8882
+ })),
8883
+ created_at: ISO8,
8884
+ updated_at: ISO8
8885
+ };
8886
+ registry.variantAxes.put(axis.id, axis);
8887
+ const variantIds = [];
8888
+ let firstVariant = true;
8889
+ for (const sz of axis.values) {
8890
+ const variantId = `var_${p.slug}_size_${sz.name.toLowerCase()}`;
8891
+ const variant = {
8892
+ id: variantId,
8893
+ product_id: productId,
8894
+ business_id: businessId,
8895
+ name: sz.name,
8896
+ sku: `${p.slug.toUpperCase()}-${sz.name}`,
8897
+ price_adjustment: "0.00",
8898
+ component_multiplier: "1.00",
8899
+ is_default: firstVariant,
8900
+ is_active: true,
8901
+ axis_value_ids: [sz.id],
8902
+ created_at: ISO8,
8903
+ updated_at: ISO8
8904
+ };
8905
+ registry.variants.put(variantId, variant);
8906
+ variantIds.push(variantId);
8907
+ firstVariant = false;
8908
+ }
8909
+ const product = registry.products.get(productId);
8910
+ product.variant_ids = variantIds;
8911
+ registry.products.put(productId, product);
8912
+ }
8913
+ const drop04 = {
8914
+ id: "col_drop_04",
8915
+ business_id: businessId,
8916
+ name: "Drop 04",
8917
+ slug: "drop-04",
8918
+ description: "Spring 2026 capsule. 412 pieces left.",
8919
+ product_ids: [
8920
+ "prod_heavyweight-hoodie-charcoal",
8921
+ "prod_heavyweight-hoodie-cream",
8922
+ "prod_heavyweight-hoodie-cobalt",
8923
+ "prod_graphic-tee-frx-mark",
8924
+ "prod_field-jacket-olive"
8925
+ ],
8926
+ is_active: true,
8927
+ created_at: ISO8,
8928
+ updated_at: ISO8
8929
+ };
8930
+ const bestSellers = {
8931
+ id: "col_best_sellers",
8932
+ business_id: businessId,
8933
+ name: "Best Sellers",
8934
+ slug: "best-sellers",
8935
+ description: "What everyone's buying.",
8936
+ product_ids: [
8937
+ "prod_studio-tee-black",
8938
+ "prod_heavyweight-hoodie-charcoal",
8939
+ "prod_carbon-bomber",
8940
+ "prod_studio-cap",
8941
+ "prod_track-pant-charcoal"
8942
+ ],
8943
+ is_active: true,
8944
+ created_at: ISO8,
8945
+ updated_at: ISO8
8946
+ };
8947
+ registry.collections.put(drop04.id, drop04);
8948
+ registry.collections.put(bestSellers.id, bestSellers);
8949
+ for (const col of [drop04, bestSellers]) {
8950
+ for (const pid of col.product_ids) {
8951
+ const p = registry.products.get(pid);
8952
+ if (p) {
8953
+ p.collection_ids.push(col.id);
8954
+ registry.products.put(pid, p);
8955
+ }
8956
+ }
8957
+ }
8958
+ const tags = [
8959
+ { id: "tag_signature", business_id: businessId, name: "Signature", slug: "signature", color: "#0a0a0a", sort_order: 0, usage_count: 3, created_at: ISO8, updated_at: ISO8 },
8960
+ { id: "tag_drop_04", business_id: businessId, name: "Drop 04", slug: "drop-04", color: "#dc2626", sort_order: 1, usage_count: 5, created_at: ISO8, updated_at: ISO8 },
8961
+ { id: "tag_limited", business_id: businessId, name: "Limited", slug: "limited", color: "#dc2626", sort_order: 2, usage_count: 1, created_at: ISO8, updated_at: ISO8 },
8962
+ { id: "tag_premium", business_id: businessId, name: "Premium", slug: "premium", color: "#7c3aed", sort_order: 3, usage_count: 2, created_at: ISO8, updated_at: ISO8 }
8963
+ ];
8964
+ for (const t of tags) registry.tags.put(t.id, t);
8965
+ const apparel = {
8966
+ id: "tax_apparel",
8967
+ business_id: businessId,
8968
+ name: "Apparel",
8969
+ slug: "apparel",
8970
+ path: ["Apparel"],
8971
+ attribute_template_ids: ["attr_fabric", "attr_country_of_origin"],
8972
+ created_at: ISO8,
8973
+ updated_at: ISO8
8974
+ };
8975
+ registry.taxonomies.put(apparel.id, apparel);
8976
+ const attrs = [
8977
+ {
8978
+ id: "attr_fabric",
8979
+ business_id: businessId,
8980
+ namespace: "core",
8981
+ name: "Fabric",
8982
+ slug: "fabric",
8983
+ description: 'Material composition (e.g. "100% cotton, 500gsm").',
8984
+ attribute_type: "text",
8985
+ is_required: false,
8986
+ is_filterable: true,
8987
+ visibility: "public",
8988
+ display_order: 0,
8989
+ applies_to: "product",
8990
+ created_at: ISO8,
8991
+ updated_at: ISO8
8992
+ },
8993
+ {
8994
+ id: "attr_country_of_origin",
8995
+ business_id: businessId,
8996
+ namespace: "core",
8997
+ name: "Country of origin",
8998
+ slug: "country-of-origin",
8999
+ attribute_type: "text",
9000
+ is_required: false,
9001
+ is_filterable: true,
9002
+ visibility: "public",
9003
+ display_order: 1,
9004
+ applies_to: "product",
9005
+ created_at: ISO8,
9006
+ updated_at: ISO8
9007
+ },
9008
+ {
9009
+ id: "attr_fit",
9010
+ business_id: businessId,
9011
+ namespace: "core",
9012
+ name: "Fit",
9013
+ slug: "fit",
9014
+ attribute_type: "single_select",
9015
+ options: ["regular", "oversized", "relaxed", "slim"],
9016
+ is_required: false,
9017
+ is_filterable: true,
9018
+ visibility: "public",
9019
+ display_order: 2,
9020
+ applies_to: "product",
9021
+ created_at: ISO8,
9022
+ updated_at: ISO8
9023
+ }
9024
+ ];
9025
+ for (const a of attrs) registry.attributeDefs.put(a.id, a);
9026
+ const articles = [
9027
+ {
9028
+ id: "kb_sizing",
9029
+ business_id: businessId,
9030
+ title: "Sizing & fit",
9031
+ slug: "sizing",
9032
+ content: "Our pieces are cut for an oversized, dropped-shoulder fit. Order true to size for the intended fit; size down for a regular cut. Charts on every product page.",
9033
+ category: "products",
9034
+ tags: ["sizing", "fit"],
9035
+ created_at: ISO8,
9036
+ updated_at: ISO8
9037
+ },
9038
+ {
9039
+ id: "kb_drops",
9040
+ business_id: businessId,
9041
+ title: "Drops & restocks",
9042
+ slug: "drops",
9043
+ content: "Each drop is a closed, numbered run. We don't restock. The FRX list gets a 24-hour head start before each drop opens to the public.",
9044
+ category: "general",
9045
+ tags: ["drops", "restocks"],
9046
+ created_at: ISO8,
9047
+ updated_at: ISO8
9048
+ },
9049
+ {
9050
+ id: "kb_returns",
9051
+ business_id: businessId,
9052
+ title: "Returns",
9053
+ slug: "returns",
9054
+ content: "Free returns within 30 days from the US, UK, and EU. Item must be unworn with original tags. Underwear and final-sale items aren't returnable.",
9055
+ category: "logistics",
9056
+ tags: ["returns"],
9057
+ created_at: ISO8,
9058
+ updated_at: ISO8
9059
+ }
9060
+ ];
9061
+ for (const a of articles) registry.knowledgeArticles.put(a.id, a);
9062
+ return { businessId };
9063
+ }
9064
+
8629
9065
  // src/mock/seeds/registry.ts
8630
9066
  var SEEDS = {
8631
9067
  default: seedDefault,
@@ -8634,7 +9070,8 @@ var SEEDS = {
8634
9070
  restaurant: seedRestaurant,
8635
9071
  retail: seedRetail,
8636
9072
  services: seedServices,
8637
- grocery: seedGrocery
9073
+ grocery: seedGrocery,
9074
+ fashion: seedFashion
8638
9075
  };
8639
9076
  function applySeed(registry, name) {
8640
9077
  const fn = SEEDS[name];
@@ -8927,7 +9364,7 @@ Usage:
8927
9364
  Flags:
8928
9365
  --port, -p <num> Port to listen on (default 8787)
8929
9366
  --host <host> Host to bind (default 127.0.0.1)
8930
- --seed <name> default | restaurant | retail | services | grocery | reesa-storefront | empty
9367
+ --seed <name> default | restaurant | retail | services | grocery | fashion | reesa-storefront | empty
8931
9368
  --auth-mode <mode> permissive (auto-mint sessions) | strict
8932
9369
  --otp <code> Default OTP code (default 123456)
8933
9370
  --seed-rng <n> Deterministic RNG seed
@@ -1,5 +1,5 @@
1
- import { M as MockBus, a as MockEvent } from '../server-CVEsjECc.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-CVEsjECc.mjs';
1
+ import { M as MockBus, a as MockEvent } from '../server-DD-Cd1Ob.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-DD-Cd1Ob.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-CVEsjECc.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-CVEsjECc.js';
1
+ import { M as MockBus, a as MockEvent } from '../server-DD-Cd1Ob.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-DD-Cd1Ob.js';
3
3
  import 'hono';
4
4
 
5
5
  interface WebhookOptions {