@fayz-ai/sdk 0.10.1 → 0.12.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.
Files changed (44) hide show
  1. package/README.md +1 -1
  2. package/dist/automations.d.ts +94 -0
  3. package/dist/automations.d.ts.map +1 -0
  4. package/dist/automations.js +61 -0
  5. package/dist/automations.js.map +1 -0
  6. package/dist/{chunk-7UXTYT6I.js → chunk-4YRHC5N7.js} +490 -31
  7. package/dist/chunk-4YRHC5N7.js.map +1 -0
  8. package/dist/chunk-7TTGX2SM.js +135 -0
  9. package/dist/chunk-7TTGX2SM.js.map +1 -0
  10. package/dist/events.d.ts +48 -0
  11. package/dist/events.d.ts.map +1 -0
  12. package/dist/events.js +101 -0
  13. package/dist/events.js.map +1 -0
  14. package/dist/index.d.ts +8 -0
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +307 -3
  17. package/dist/index.js.map +1 -1
  18. package/dist/lib/app-shell-pwa.d.ts +13 -0
  19. package/dist/lib/app-shell-pwa.d.ts.map +1 -0
  20. package/dist/lib/boot-skeleton.d.ts +33 -0
  21. package/dist/lib/boot-skeleton.d.ts.map +1 -0
  22. package/dist/lib/connector-oauth.d.ts +118 -0
  23. package/dist/lib/connector-oauth.d.ts.map +1 -0
  24. package/dist/lib/credentials.d.ts +98 -0
  25. package/dist/lib/credentials.d.ts.map +1 -0
  26. package/dist/lib/dedupe-fetch.d.ts +26 -0
  27. package/dist/lib/dedupe-fetch.d.ts.map +1 -0
  28. package/dist/lib/platform-url.d.ts +15 -0
  29. package/dist/lib/platform-url.d.ts.map +1 -0
  30. package/dist/lib/runtime-token.d.ts +104 -0
  31. package/dist/lib/runtime-token.d.ts.map +1 -0
  32. package/dist/release-channels.js +1 -1
  33. package/dist/release-channels.json +93 -93
  34. package/dist/shop.d.ts +381 -11
  35. package/dist/shop.d.ts.map +1 -1
  36. package/dist/shop.js +1 -1
  37. package/dist/vite.d.ts +19 -0
  38. package/dist/vite.d.ts.map +1 -1
  39. package/dist/vite.js +374 -47
  40. package/dist/vite.js.map +1 -1
  41. package/package.json +9 -1
  42. package/dist/chunk-7UXTYT6I.js.map +0 -1
  43. package/dist/chunk-KVMRRT3O.js +0 -135
  44. package/dist/chunk-KVMRRT3O.js.map +0 -1
package/dist/shop.d.ts CHANGED
@@ -2,6 +2,18 @@ export interface FayzShopProviderOptions {
2
2
  supabaseUrl?: string;
3
3
  publishableKey?: string;
4
4
  storeId?: string;
5
+ /**
6
+ * Where the pool's edge functions live. Defaults to `${supabaseUrl}/functions/v1`,
7
+ * which is right in every deployed environment.
8
+ *
9
+ * It exists for the one case that default cannot serve: a function under
10
+ * development runs on the developer's machine (`supabase functions serve`),
11
+ * and it has to be the LOCAL copy that runs, because a deployed function
12
+ * cannot reach a platform API on localhost — and tunnelling the credential
13
+ * broker onto the public internet to work around that is not a trade anyone
14
+ * should make for a dev loop.
15
+ */
16
+ functionsUrl?: string;
5
17
  apiBaseUrl?: string;
6
18
  projectId?: string;
7
19
  mode?: 'broker' | 'supabase';
@@ -24,6 +36,126 @@ export interface FayzShopProviderOptions {
24
36
  */
25
37
  type AccessTokenResolver = () => string | null | undefined;
26
38
  export declare function setShopAccessTokenResolver(resolver: AccessTokenResolver | null): void;
39
+ /**
40
+ * Declared here rather than imported, like ShippingQuoteOption below: this
41
+ * package is the storefront's only dependency and must not drag @fayz-ai/shop
42
+ * into a published-mode install. The shape is asserted against the real
43
+ * provider by the fleet typecheck.
44
+ */
45
+ interface PaymentChargeResult {
46
+ state: 'pending' | 'paid' | 'refunded' | 'failed' | 'unopened';
47
+ orderId: string;
48
+ reference?: string | null;
49
+ charge?: {
50
+ emv: string;
51
+ qrcodeBase64: string | null;
52
+ expiresAt: string;
53
+ } | null;
54
+ providerStatus?: string | null;
55
+ }
56
+ /** Same reason as PaymentChargeResult: declared, not imported. */
57
+ interface CheckoutSessionInput {
58
+ items: Array<{
59
+ productId: string;
60
+ variantId?: string | null;
61
+ quantity: number;
62
+ optionsLabel?: string | null;
63
+ }>;
64
+ customer: {
65
+ name?: string | null;
66
+ email: string;
67
+ document?: string | null;
68
+ };
69
+ shippingAddress?: Record<string, unknown> | null;
70
+ discountCode?: string | null;
71
+ paymentMethod?: string;
72
+ /** O adquirente que deve cobrar. Ausente cai na AbacatePay. */
73
+ provider?: string | null;
74
+ }
75
+ interface CheckoutSession {
76
+ sessionId: string;
77
+ total: number;
78
+ charge: {
79
+ emv: string;
80
+ qrcodeBase64: string | null;
81
+ expiresAt: string;
82
+ } | null;
83
+ state: 'open' | 'paid' | 'failed' | 'expired';
84
+ /** Quem abriu esta cobrança — devolvido para que a consulta bata na função certa. */
85
+ provider?: string | null;
86
+ }
87
+ interface CheckoutSettlement {
88
+ state: 'open' | 'paid' | 'failed' | 'expired' | 'unknown';
89
+ orderId?: string | null;
90
+ reason?: string | null;
91
+ }
92
+ /** The subset of `ShippingQuoteOption` this package produces, declared locally
93
+ * because @fayz-ai/sdk depends on nothing — see quoteShipping. */
94
+ interface ShippingQuoteOption {
95
+ zoneId: string;
96
+ name: string;
97
+ carrier?: string;
98
+ rate: number;
99
+ baseRate: number;
100
+ freeAbove?: number | null;
101
+ etaMinDays?: number;
102
+ etaMaxDays?: number;
103
+ free: boolean;
104
+ }
105
+ /**
106
+ * What is in the cart, for the box the carrier prices.
107
+ *
108
+ * A resolver rather than an argument because the call site that matters —
109
+ * `delivery.store.resolve(postalCode, subtotal)` — has been passing a postcode
110
+ * and a subtotal since before any carrier existed, and every storefront in the
111
+ * wild calls it that way. Wiring it here is done once by the runtime, exactly
112
+ * like setShopAccessTokenResolver above.
113
+ *
114
+ * Unset is a supported state: the quote function falls back to the store's
115
+ * package defaults, which is what makes the first quote work for a catalogue
116
+ * nobody has measured yet.
117
+ */
118
+ export interface ShippingQuoteItem {
119
+ quantity: number;
120
+ weight?: number | null;
121
+ /** As the merchant typed it ('kg', 'g', 'lb'). The function converts; until
122
+ * FAY-1407 it assumed kg, so a catalogue measured in grams quoted parcels a
123
+ * thousand times too heavy. */
124
+ weightUnit?: string | null;
125
+ /** Centimetres. The column names carry the unit, so there is no second one. */
126
+ height?: number | null;
127
+ width?: number | null;
128
+ length?: number | null;
129
+ /**
130
+ * A embalagem que o LOJISTA escolheu para este produto (0047). Quando vem
131
+ * preenchida ela manda: a escolha dele não é uma sugestão para o algoritmo
132
+ * que procura a menor caixa em que o carrinho cabe.
133
+ */
134
+ packageId?: string | null;
135
+ /** False keeps the line out of the box entirely — and a cart where every
136
+ * line is false never reaches a carrier. */
137
+ isPhysical?: boolean;
138
+ productId?: string;
139
+ variantId?: string;
140
+ name?: string;
141
+ sku?: string | null;
142
+ }
143
+ type ShippingItemsResolver = () => ShippingQuoteItem[];
144
+ export declare function setShopShippingItemsResolver(resolver: ShippingItemsResolver | null): void;
145
+ /**
146
+ * "A loja quer que a gente pergunte a um gateway?"
147
+ *
148
+ * A resposta é do LOJISTA (`StoreSettings.carrierQuotes`) e vive no navegador,
149
+ * que já carrega a política no boot. Este pacote não a lê sozinho — daí o mesmo
150
+ * encaixe do carrinho: quem monta a vitrine registra o resolvedor.
151
+ *
152
+ * `undefined` = não decidido, e não decidido pergunta (é como sempre foi).
153
+ * `false` é a escolha explícita de quem calcula pelas próprias faixas: enquanto
154
+ * ninguém lia isto, marcar "eu mesmo calculo" não mudava NADA no checkout, e a
155
+ * cotação da transportadora continuava ganhando das faixas dela.
156
+ */
157
+ type CarrierQuotesResolver = () => boolean | undefined;
158
+ export declare function setShopCarrierQuotesResolver(resolver: CarrierQuotesResolver | null): void;
27
159
  export interface FayzShopProductMetadataOverlay {
28
160
  sku?: string | null;
29
161
  slug?: string | null;
@@ -109,6 +241,9 @@ export declare function createFayzShopProvider(options: FayzShopProviderOptions)
109
241
  isPhysical: boolean;
110
242
  weight: number | null;
111
243
  weightUnit: string;
244
+ heightCm: number | null;
245
+ widthCm: number | null;
246
+ lengthCm: number | null;
112
247
  createdAt: string;
113
248
  updatedAt: string;
114
249
  }[]>;
@@ -140,6 +275,9 @@ export declare function createFayzShopProvider(options: FayzShopProviderOptions)
140
275
  isPhysical: boolean;
141
276
  weight: number | null;
142
277
  weightUnit: string;
278
+ heightCm: number | null;
279
+ widthCm: number | null;
280
+ lengthCm: number | null;
143
281
  createdAt: string;
144
282
  updatedAt: string;
145
283
  } | null>;
@@ -206,6 +344,9 @@ export declare function createFayzShopProvider(options: FayzShopProviderOptions)
206
344
  isPhysical: boolean;
207
345
  weight: number | null;
208
346
  weightUnit: string;
347
+ heightCm: number | null;
348
+ widthCm: number | null;
349
+ lengthCm: number | null;
209
350
  createdAt: string;
210
351
  updatedAt: string;
211
352
  }[]>;
@@ -237,6 +378,9 @@ export declare function createFayzShopProvider(options: FayzShopProviderOptions)
237
378
  isPhysical: boolean;
238
379
  weight: number | null;
239
380
  weightUnit: string;
381
+ heightCm: number | null;
382
+ widthCm: number | null;
383
+ lengthCm: number | null;
240
384
  createdAt: string;
241
385
  updatedAt: string;
242
386
  } | null>;
@@ -269,6 +413,11 @@ export declare function createFayzShopProvider(options: FayzShopProviderOptions)
269
413
  position: number;
270
414
  status: "active" | "archived";
271
415
  imageId: string | null;
416
+ weight: number | null;
417
+ weightUnit: string | null;
418
+ heightCm: number | null;
419
+ widthCm: number | null;
420
+ lengthCm: number | null;
272
421
  }[];
273
422
  }>;
274
423
  listCategories(): Promise<{
@@ -317,6 +466,16 @@ export declare function createFayzShopProvider(options: FayzShopProviderOptions)
317
466
  total: number;
318
467
  imageUrl: string | null;
319
468
  }[];
469
+ shipments: {
470
+ id: string;
471
+ status: string;
472
+ carrier: string | null;
473
+ trackingCode: string | null;
474
+ trackingUrl: string | null;
475
+ shippedAt: string | null;
476
+ estimatedDeliveryAt: string | null;
477
+ deliveredAt: string | null;
478
+ }[];
320
479
  createdAt: string;
321
480
  updatedAt: string;
322
481
  }[]>;
@@ -352,6 +511,16 @@ export declare function createFayzShopProvider(options: FayzShopProviderOptions)
352
511
  total: number;
353
512
  imageUrl: string | null;
354
513
  }[];
514
+ shipments: {
515
+ id: string;
516
+ status: string;
517
+ carrier: string | null;
518
+ trackingCode: string | null;
519
+ trackingUrl: string | null;
520
+ shippedAt: string | null;
521
+ estimatedDeliveryAt: string | null;
522
+ deliveredAt: string | null;
523
+ }[];
355
524
  createdAt: string;
356
525
  updatedAt: string;
357
526
  } | null>;
@@ -387,9 +556,154 @@ export declare function createFayzShopProvider(options: FayzShopProviderOptions)
387
556
  total: number;
388
557
  imageUrl: string | null;
389
558
  }[];
559
+ shipments: {
560
+ id: string;
561
+ status: string;
562
+ carrier: string | null;
563
+ trackingCode: string | null;
564
+ trackingUrl: string | null;
565
+ shippedAt: string | null;
566
+ estimatedDeliveryAt: string | null;
567
+ deliveredAt: string | null;
568
+ }[];
390
569
  createdAt: string;
391
570
  updatedAt: string;
392
571
  } | null>;
572
+ /**
573
+ * Opens the charge, or reports what the acquirer says about it.
574
+ *
575
+ * Both go through the pool's own functions, for the same reason
576
+ * `quoteFromCarrier` does: the credential is redeemed server-side and the
577
+ * storefront never learns the acquirer's URL, let alone its token. Neither
578
+ * call carries an amount — the function reads it off the order row, so a
579
+ * tampered body buys nothing.
580
+ *
581
+ * A store with no acquirer connected answers 404, which surfaces as
582
+ * `unopened`: the page then simply shows the order as pending, which is the
583
+ * behaviour every store had before this existed.
584
+ */
585
+ openCharge(orderId: string, method?: "pix"): Promise<PaymentChargeResult>;
586
+ paymentState(orderId: string): Promise<PaymentChargeResult>;
587
+ /**
588
+ * Open a charge for a cart that is NOT yet an order.
589
+ *
590
+ * Nothing about money leaves the browser: the function re-prices every line
591
+ * from the catalogue, so the total that comes back is the store's, not the
592
+ * caller's. `sessionId` is the only handle, and it neither reads nor pays on
593
+ * its own — `settleCheckoutSession` is what turns it into an order, and only
594
+ * after the acquirer says the money is in.
595
+ */
596
+ openCheckoutSession(input: CheckoutSessionInput): Promise<CheckoutSession>;
597
+ /**
598
+ * Ask whether the money landed. Called on a timer, so a network blip must
599
+ * read as "still waiting" (`unknown`) and never as a payment that failed —
600
+ * one wrong `failed` here throws away a cart the buyer already paid for.
601
+ */
602
+ settleCheckoutSession(sessionId: string, provider?: string | null): Promise<CheckoutSettlement>;
603
+ /**
604
+ * The merchant's policy, as the shopper's browser is allowed to see it.
605
+ *
606
+ * Without this the settings screens wrote to a table nobody read on this
607
+ * side: StorefrontConfigHost skips the overlay when the provider has no
608
+ * such method, so the checkout kept offering whatever the app declared at
609
+ * build time — a store that turned boleto off still showed boleto.
610
+ *
611
+ * Through the RPC, never the table: plg_shop_settings is closed to anon on
612
+ * purpose and shop_store_settings() is the narrow window (storefront
613
+ * columns only, published stores only). A failure answers null, which is
614
+ * "no policy" — the declared config stands and the store still sells.
615
+ */
616
+ getPublicStoreSettings(): Promise<{
617
+ currency: string;
618
+ locale: string;
619
+ showOutOfStock: boolean | undefined;
620
+ paymentMethods: string[] | undefined;
621
+ paymentProvider: string;
622
+ guestCheckout: boolean | undefined;
623
+ requireConfirmedEmail: boolean | undefined;
624
+ marketingOptIn: boolean | undefined;
625
+ discountsEnabled: boolean | undefined;
626
+ checkoutFields: object | undefined;
627
+ carrierQuotes: boolean | undefined;
628
+ } | null>;
629
+ /**
630
+ * Dispatch by hand.
631
+ *
632
+ * All three are SECURITY DEFINER RPCs that check store membership
633
+ * themselves — the browser cannot ship someone else's order by holding its
634
+ * id, which is why these are not table writes.
635
+ */
636
+ validateDiscountCode(code: string, subtotal?: number): Promise<{
637
+ valid: boolean;
638
+ code: string | null;
639
+ type: "percentage" | "fixed_amount" | null;
640
+ value: number;
641
+ reason: string | undefined;
642
+ }>;
643
+ cancelOrder(orderId: string, reason?: string): Promise<{
644
+ id: string;
645
+ tenantId: string;
646
+ orderNumber: number;
647
+ status: FayzShopOrderStatus;
648
+ financialStatus: FayzShopFinancialStatus;
649
+ fulfillmentStatus: FayzShopFulfillmentStatus;
650
+ currency: string;
651
+ subtotal: number;
652
+ taxTotal: number;
653
+ discountTotal: number;
654
+ shippingTotal: number;
655
+ total: number;
656
+ customerId: string | null;
657
+ customerName: string | null;
658
+ customerEmail: string | null;
659
+ discountCode: string | null;
660
+ notes: string | null;
661
+ shippingAddress: Record<string, string | undefined> | null;
662
+ paymentMethodKind: string | null;
663
+ paidAt: string | null;
664
+ items: {
665
+ id: string;
666
+ orderId: string;
667
+ productId: string | null;
668
+ name: string;
669
+ sku: string | null;
670
+ quantity: number;
671
+ unitPrice: number;
672
+ total: number;
673
+ imageUrl: string | null;
674
+ }[];
675
+ shipments: {
676
+ id: string;
677
+ status: string;
678
+ carrier: string | null;
679
+ trackingCode: string | null;
680
+ trackingUrl: string | null;
681
+ shippedAt: string | null;
682
+ estimatedDeliveryAt: string | null;
683
+ deliveredAt: string | null;
684
+ }[];
685
+ createdAt: string;
686
+ updatedAt: string;
687
+ } | null>;
688
+ createFulfillment(input: {
689
+ orderId: string;
690
+ carrier?: string;
691
+ trackingCode?: string;
692
+ locationId?: string;
693
+ notes?: string;
694
+ items?: Array<{
695
+ orderItemId: string;
696
+ quantity: number;
697
+ }>;
698
+ }): Promise<string>;
699
+ shipFulfillment(id: string, input: {
700
+ trackingCode?: string;
701
+ trackingUrl?: string;
702
+ carrier?: string;
703
+ }): Promise<void>;
704
+ /** Chegou. Só o lojista sabe disso — nenhum provedor nos avisa hoje. */
705
+ deliverFulfillment(id: string, deliveredAt?: string): Promise<void>;
706
+ cancelFulfillment(id: string, note?: string): Promise<void>;
393
707
  createOrder(input: {
394
708
  customerId?: string;
395
709
  customerName?: string;
@@ -439,6 +753,16 @@ export declare function createFayzShopProvider(options: FayzShopProviderOptions)
439
753
  total: number;
440
754
  imageUrl: string | null;
441
755
  }[];
756
+ shipments: {
757
+ id: string;
758
+ status: string;
759
+ carrier: string | null;
760
+ trackingCode: string | null;
761
+ trackingUrl: string | null;
762
+ shippedAt: string | null;
763
+ estimatedDeliveryAt: string | null;
764
+ deliveredAt: string | null;
765
+ }[];
442
766
  createdAt: string;
443
767
  updatedAt: string;
444
768
  } | null>;
@@ -474,6 +798,16 @@ export declare function createFayzShopProvider(options: FayzShopProviderOptions)
474
798
  total: number;
475
799
  imageUrl: string | null;
476
800
  }[];
801
+ shipments: {
802
+ id: string;
803
+ status: string;
804
+ carrier: string | null;
805
+ trackingCode: string | null;
806
+ trackingUrl: string | null;
807
+ shippedAt: string | null;
808
+ estimatedDeliveryAt: string | null;
809
+ deliveredAt: string | null;
810
+ }[];
477
811
  createdAt: string;
478
812
  updatedAt: string;
479
813
  } | null>;
@@ -502,6 +836,10 @@ export declare function createFayzShopProvider(options: FayzShopProviderOptions)
502
836
  recipient?: string;
503
837
  phone?: string;
504
838
  label?: string;
839
+ /** CPF/CNPJ, digits only. Not an address field — it rides here because
840
+ * shop_place_order's signature cannot grow one without a DROP; 0050's
841
+ * trigger lifts it to plg_shop_orders.customer_document. */
842
+ document?: string;
505
843
  };
506
844
  paymentMethod?: "pix" | "credit_card" | "debit_card" | "boleto" | "cash" | "other";
507
845
  metadata?: Record<string, unknown>;
@@ -543,6 +881,16 @@ export declare function createFayzShopProvider(options: FayzShopProviderOptions)
543
881
  total: number;
544
882
  imageUrl: string | null;
545
883
  }[];
884
+ shipments: {
885
+ id: string;
886
+ status: string;
887
+ carrier: string | null;
888
+ trackingCode: string | null;
889
+ trackingUrl: string | null;
890
+ shippedAt: string | null;
891
+ estimatedDeliveryAt: string | null;
892
+ deliveredAt: string | null;
893
+ }[];
546
894
  createdAt: string;
547
895
  updatedAt: string;
548
896
  }>;
@@ -553,6 +901,7 @@ export declare function createFayzShopProvider(options: FayzShopProviderOptions)
553
901
  lastName: string;
554
902
  email: string | null;
555
903
  phone: string | null;
904
+ document: string | null;
556
905
  notes: string | null;
557
906
  ordersCount: number;
558
907
  totalSpent: number;
@@ -566,6 +915,7 @@ export declare function createFayzShopProvider(options: FayzShopProviderOptions)
566
915
  lastName: string;
567
916
  email: string | null;
568
917
  phone: string | null;
918
+ document: string | null;
569
919
  notes: string | null;
570
920
  ordersCount: number;
571
921
  totalSpent: number;
@@ -582,23 +932,41 @@ export declare function createFayzShopProvider(options: FayzShopProviderOptions)
582
932
  lastName: string;
583
933
  email: string | null;
584
934
  phone: string | null;
935
+ document: string | null;
585
936
  notes: string | null;
586
937
  ordersCount: number;
587
938
  totalSpent: number;
588
939
  createdAt: string;
589
940
  updatedAt: string;
590
941
  }>;
591
- quoteShipping(postalCode: string, subtotal: number): Promise<{
592
- zoneId: string;
593
- name: string;
594
- carrier: string | undefined;
595
- rate: number;
596
- baseRate: number;
597
- freeAbove: number | null;
598
- etaMinDays: number | undefined;
599
- etaMaxDays: number | undefined;
600
- free: boolean;
601
- }[]>;
942
+ /**
943
+ * The carrier first, our own zones when it does not answer in time.
944
+ *
945
+ * This is `createShippingQuoter` (packages/shop/src/providers/shipping.ts)
946
+ * by hand, and the duplication is deliberate: this package declares NO
947
+ * dependencies, which is what lets a storefront pull the client without
948
+ * dragging the admin stack in behind it. Importing the primitive for twelve
949
+ * lines would trade that for tidiness. The semantics are copied exactly and
950
+ * both are worth restating —
951
+ *
952
+ * the budget is the connector's (1s, `onFailure: 'degrade'`), because a
953
+ * shopper staring at "calculando" abandons faster than they accept a
954
+ * slightly wrong price; and
955
+ *
956
+ * an EMPTY provider answer is an ANSWER, not a failure. A carrier that
957
+ * does not serve a postcode has told us something, and falling back to
958
+ * the zones there would quote a van that does not go to São Paulo.
959
+ */
960
+ quoteShipping(postalCode: string, subtotal: number): Promise<ShippingQuoteOption[]>;
961
+ /**
962
+ * Record which option the shopper picked, server-side.
963
+ *
964
+ * It sends a SERVICE, never a price: the row it points at was written by
965
+ * the quote function minutes ago, so the worst a tampered call achieves is
966
+ * choosing a different option the carrier actually offered — which is what
967
+ * the radio buttons are for. shop_place_order reads the stored price.
968
+ */
969
+ selectShippingOption(optionId: string): Promise<boolean>;
602
970
  listCustomerAddresses(customerId: string): Promise<{
603
971
  id: string;
604
972
  label: string | undefined;
@@ -627,6 +995,7 @@ export declare function createFayzShopProvider(options: FayzShopProviderOptions)
627
995
  lastName: string;
628
996
  email: string | null;
629
997
  phone: string | null;
998
+ document: string | null;
630
999
  notes: string | null;
631
1000
  ordersCount: number;
632
1001
  totalSpent: number;
@@ -646,6 +1015,7 @@ export declare function createFayzShopProvider(options: FayzShopProviderOptions)
646
1015
  lastName: string;
647
1016
  email: string | null;
648
1017
  phone: string | null;
1018
+ document: string | null;
649
1019
  notes: string | null;
650
1020
  ordersCount: number;
651
1021
  totalSpent: number;
@@ -1 +1 @@
1
- {"version":3,"file":"shop.d.ts","sourceRoot":"","sources":["../src/shop.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,uBAAuB;IACtC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAA;IAC5B,eAAe,CAAC,EAAE,8BAA8B,EAAE,CAAA;IAClD,OAAO,CAAC,EAAE,OAAO,KAAK,CAAA;CACvB;AAED;;;;;;;;;;;;;GAaG;AACH,KAAK,mBAAmB,GAAG,MAAM,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;AAI1D,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,mBAAmB,GAAG,IAAI,GAAG,IAAI,CAErF;AAED,MAAM,WAAW,8BAA8B;IAC7C,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAClC;AAED,MAAM,MAAM,qBAAqB,GAAG,OAAO,GAAG,QAAQ,GAAG,UAAU,CAAA;AACnE,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,UAAU,GAAG,WAAW,CAAA;AACnE,MAAM,MAAM,uBAAuB,GAAG,SAAS,GAAG,MAAM,GAAG,gBAAg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M,GAAG,IAAI,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE;;;;;;;;;;;;;;uBAe7H,MAAM;4BAGD,4BAA4B;;;;;;;;;;;;;;;;;oBAWpC,MAAM;;;;;;;;;;;;;;;;;;;;EAc/B"}
package/dist/shop.js CHANGED
@@ -1,4 +1,4 @@
1
- export { FayzShopError, PRODUCT_METADATA_OVERLAY_DEPRECATION, createFayzShopProvider, resetProductMetadataOverlayDeprecationWarning, setShopAccessTokenResolver } from './chunk-7UXTYT6I.js';
1
+ export { FayzShopError, PRODUCT_METADATA_OVERLAY_DEPRECATION, createFayzShopProvider, resetProductMetadataOverlayDeprecationWarning, setShopAccessTokenResolver, setShopCarrierQuotesResolver, setShopShippingItemsResolver } from './chunk-4YRHC5N7.js';
2
2
  import './chunk-HA5O3CW7.js';
3
3
  //# sourceMappingURL=shop.js.map
4
4
  //# sourceMappingURL=shop.js.map
package/dist/vite.d.ts CHANGED
@@ -1,4 +1,8 @@
1
1
  import type { UserConfig, PluginOption } from 'vite';
2
+ import { type AppShellPwaOptions } from './lib/app-shell-pwa';
3
+ import { type BootSkeletonOptions } from './lib/boot-skeleton';
4
+ export { BOOT_THEME_STORAGE_KEY, type BootSkeletonOptions } from './lib/boot-skeleton';
5
+ export { appShellPwa, type AppShellPwaOptions } from './lib/app-shell-pwa';
2
6
  export interface FayzViteOptions {
3
7
  /** Dev server port. */
4
8
  port?: number;
@@ -30,6 +34,21 @@ export interface FayzViteOptions {
30
34
  * resolution; any other resolve keys (and extra aliases) are merged in.
31
35
  */
32
36
  resolve?: UserConfig['resolve'];
37
+ /**
38
+ * The shell outline painted into index.html, so the wait for the entry chunk
39
+ * is not a blank page. Auto-detected from the app's dependencies; pass
40
+ * `{ surface: 'none' }` to opt out, or colors to match the app's palette on a
41
+ * first-ever visit (later visits reuse the palette the app itself stored).
42
+ */
43
+ bootSkeleton?: BootSkeletonOptions;
44
+ /**
45
+ * The built app precaches itself: a service worker + webmanifest emitted at
46
+ * build time, so a deployed app reloads instantly and still opens with no
47
+ * network. On by default, and build-only by construction — the dev server
48
+ * never registers a worker. Pass `false` to opt out, or an object to name
49
+ * the install / set its colors.
50
+ */
51
+ pwa?: boolean | AppShellPwaOptions;
33
52
  }
34
53
  /**
35
54
  * Shared Vite config for Fayz dogfood apps. Resolves `@fayz-ai/*` from the local
@@ -1 +1 @@
1
- {"version":3,"file":"vite.d.ts","sourceRoot":"","sources":["../src/vite.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAgB,MAAM,MAAM,CAAA;AAiBlE,MAAM,WAAW,eAAe;IAC9B,uBAAuB;IACvB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,yDAAyD;IACzD,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,gEAAgE;IAChE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAChC,+DAA+D;IAC/D,OAAO,CAAC,EAAE,YAAY,EAAE,CAAA;IACxB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,kDAAkD;IAClD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;;OAIG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAA;IAC7B;;;;OAIG;IACH,OAAO,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAA;CAChC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,8EAA8E;AAC9E,eAAO,MAAM,gBAAgB,iBAAiB,CAAA;AAE9C;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,MAAM,EACZ,MAAM,CAAC,EAAE,MAAM,EACf,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,GACpD,MAAM,CAGR;AAED,wBAAgB,QAAQ,CAAC,IAAI,GAAE,eAAoB,GAAG,UAAU,CA6D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