@moonbase.sh/vue 0.4.24 → 0.4.26
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/index.cjs +188 -86
- package/dist/index.d.cts +44 -76
- package/dist/index.d.ts +44 -76
- package/dist/index.js +174 -74
- package/package.json +5 -5
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as _moonbase_sh_storefront_api from '@moonbase.sh/storefront-api';
|
|
2
|
-
import { MoonbaseConfiguration, Storefront, Order, User, UrchinTrackingModule, MoonbaseClient, LineItem, OpenOrder, Money, CompletedOrder, ActivationRequest, Address, CommunicationPreferences, StorefrontBundle, StorefrontProduct, PricingVariation, ActivationMethod, Activation, Download, Vendor } from '@moonbase.sh/storefront-api';
|
|
2
|
+
import { MoonbaseConfiguration, Storefront, Order, User, UrchinTrackingModule, MoonbaseClient, LineItem, OpenOrder, Money, CompletedOrder, ActivationRequest, Address, CommunicationPreferences, StorefrontBundle, StorefrontProduct, PricingVariation, StorefrontOffer, ActivationMethod, Activation, Download, Vendor } from '@moonbase.sh/storefront-api';
|
|
3
3
|
export * from '@moonbase.sh/storefront-api';
|
|
4
4
|
import * as vue from 'vue';
|
|
5
|
-
import {
|
|
5
|
+
import { Ref, UnwrapRef, Plugin, App, MaybeRef, InjectionKey } from 'vue';
|
|
6
6
|
|
|
7
7
|
interface StorefrontContext extends Pick<Plugin, keyof Plugin> {
|
|
8
8
|
configuration: MoonbaseConfiguration;
|
|
@@ -237,6 +237,7 @@ declare function useCart(context?: StorefrontContext): {
|
|
|
237
237
|
tagline: string;
|
|
238
238
|
iconUrl: string | null;
|
|
239
239
|
} | undefined;
|
|
240
|
+
offerId?: string | undefined;
|
|
240
241
|
isDefaultVariation?: boolean | null | undefined;
|
|
241
242
|
isSubcriptionPayment?: boolean | null | undefined;
|
|
242
243
|
variation?: {
|
|
@@ -315,20 +316,7 @@ declare function useCart(context?: StorefrontContext): {
|
|
|
315
316
|
} | null | undefined;
|
|
316
317
|
price?: Record<string, number> | undefined;
|
|
317
318
|
partial?: boolean | undefined;
|
|
318
|
-
|
|
319
|
-
id: string;
|
|
320
|
-
name: string;
|
|
321
|
-
tagline: string;
|
|
322
|
-
iconUrl: string | null;
|
|
323
|
-
products: ({
|
|
324
|
-
id: string;
|
|
325
|
-
name: string;
|
|
326
|
-
tagline: string;
|
|
327
|
-
iconUrl: string | null;
|
|
328
|
-
} & {
|
|
329
|
-
included?: boolean | undefined;
|
|
330
|
-
})[];
|
|
331
|
-
} | undefined;
|
|
319
|
+
offerId?: string | undefined;
|
|
332
320
|
isDefaultVariation?: boolean | null | undefined;
|
|
333
321
|
isSubcriptionPayment?: boolean | null | undefined;
|
|
334
322
|
variation?: {
|
|
@@ -381,13 +369,30 @@ declare function useCart(context?: StorefrontContext): {
|
|
|
381
369
|
total?: Record<string, number> | undefined;
|
|
382
370
|
recurringPaymentUseCount?: number | undefined;
|
|
383
371
|
} | undefined;
|
|
372
|
+
replaced?: string[] | undefined;
|
|
373
|
+
bundle?: {
|
|
374
|
+
id: string;
|
|
375
|
+
name: string;
|
|
376
|
+
tagline: string;
|
|
377
|
+
iconUrl: string | null;
|
|
378
|
+
products: ({
|
|
379
|
+
id: string;
|
|
380
|
+
name: string;
|
|
381
|
+
tagline: string;
|
|
382
|
+
iconUrl: string | null;
|
|
383
|
+
} & {
|
|
384
|
+
included?: boolean | undefined;
|
|
385
|
+
})[];
|
|
386
|
+
} | undefined;
|
|
384
387
|
})[]>;
|
|
385
388
|
currency: vue.ComputedRef<string>;
|
|
386
389
|
total: vue.ComputedRef<{
|
|
387
390
|
amount: number;
|
|
388
391
|
currency: string;
|
|
389
392
|
}>;
|
|
390
|
-
addToCart: (item:
|
|
393
|
+
addToCart: (item: MaybeRef<StorefrontProduct> | MaybeRef<StorefrontBundle>, variation?: PricingVariation, offer?: StorefrontOffer, options?: {
|
|
394
|
+
bundleBehaviour?: "append" | "replace";
|
|
395
|
+
}) => CartItem;
|
|
391
396
|
setQuantity: (cartItem: CartItem, quantity: number) => CartItem;
|
|
392
397
|
removeFromCart: (cartItem: CartItem) => void;
|
|
393
398
|
checkout: (options: {
|
|
@@ -587,49 +592,7 @@ declare function useInventory(context?: StorefrontContext): {
|
|
|
587
592
|
}>>;
|
|
588
593
|
revokeActivation: (activation: Activation) => Promise<void>;
|
|
589
594
|
activateProduct: (deviceToken: string, activationMethod: ActivationMethod) => Promise<{
|
|
590
|
-
license:
|
|
591
|
-
id: string;
|
|
592
|
-
status: _moonbase_sh_storefront_api.LicenseStatus;
|
|
593
|
-
product: {
|
|
594
|
-
id: string;
|
|
595
|
-
name: string;
|
|
596
|
-
tagline: string;
|
|
597
|
-
currentVersion: string | null;
|
|
598
|
-
downloadsNeedsUser: boolean;
|
|
599
|
-
downloadsNeedsOwnership: boolean;
|
|
600
|
-
description?: string | null | undefined;
|
|
601
|
-
website?: string | undefined;
|
|
602
|
-
iconUrl?: string | undefined;
|
|
603
|
-
numberOfLicenses?: number | undefined;
|
|
604
|
-
numberOfTrials?: number | undefined;
|
|
605
|
-
currentActivations?: number | undefined;
|
|
606
|
-
maxActivations?: number | undefined;
|
|
607
|
-
externalLicenses?: number | undefined;
|
|
608
|
-
subscriptionLicenses?: number | undefined;
|
|
609
|
-
version?: string | undefined;
|
|
610
|
-
prerelease?: boolean | undefined;
|
|
611
|
-
releaseDescription?: string | undefined;
|
|
612
|
-
downloads?: {
|
|
613
|
-
name: string;
|
|
614
|
-
path: string | null;
|
|
615
|
-
key: string;
|
|
616
|
-
platform: _moonbase_sh_storefront_api.Platform;
|
|
617
|
-
size: number;
|
|
618
|
-
manifest?: {
|
|
619
|
-
files: {
|
|
620
|
-
name: string;
|
|
621
|
-
path: string;
|
|
622
|
-
}[];
|
|
623
|
-
licensePath: string | null;
|
|
624
|
-
} | undefined;
|
|
625
|
-
}[] | undefined;
|
|
626
|
-
};
|
|
627
|
-
activeNumberOfActivations: number;
|
|
628
|
-
maxNumberOfActivations: number;
|
|
629
|
-
createdAt: Date;
|
|
630
|
-
expiresAt?: Date | undefined;
|
|
631
|
-
externalFulfillment?: string | undefined;
|
|
632
|
-
};
|
|
595
|
+
license: _moonbase_sh_storefront_api.License;
|
|
633
596
|
url: string;
|
|
634
597
|
}>;
|
|
635
598
|
downloadProduct: (download: Download) => Promise<void>;
|
|
@@ -671,7 +634,7 @@ declare function useInventory(context?: StorefrontContext): {
|
|
|
671
634
|
product: {
|
|
672
635
|
id: string;
|
|
673
636
|
name: string;
|
|
674
|
-
type: "
|
|
637
|
+
type: "Product";
|
|
675
638
|
description: string;
|
|
676
639
|
tagline: string;
|
|
677
640
|
iconUrl: string | null;
|
|
@@ -767,7 +730,7 @@ declare function useInventory(context?: StorefrontContext): {
|
|
|
767
730
|
bundle: {
|
|
768
731
|
id: string;
|
|
769
732
|
name: string;
|
|
770
|
-
type: "
|
|
733
|
+
type: "Bundle";
|
|
771
734
|
description: string;
|
|
772
735
|
tagline: string;
|
|
773
736
|
iconUrl: string | null;
|
|
@@ -776,7 +739,7 @@ declare function useInventory(context?: StorefrontContext): {
|
|
|
776
739
|
products: ({
|
|
777
740
|
id: string;
|
|
778
741
|
name: string;
|
|
779
|
-
type: "
|
|
742
|
+
type: "Product";
|
|
780
743
|
description: string;
|
|
781
744
|
tagline: string;
|
|
782
745
|
iconUrl: string | null;
|
|
@@ -977,7 +940,7 @@ declare function useInventory(context?: StorefrontContext): {
|
|
|
977
940
|
product: {
|
|
978
941
|
id: string;
|
|
979
942
|
name: string;
|
|
980
|
-
type: "
|
|
943
|
+
type: "Product";
|
|
981
944
|
description: string;
|
|
982
945
|
tagline: string;
|
|
983
946
|
iconUrl: string | null;
|
|
@@ -1073,7 +1036,7 @@ declare function useInventory(context?: StorefrontContext): {
|
|
|
1073
1036
|
bundle: {
|
|
1074
1037
|
id: string;
|
|
1075
1038
|
name: string;
|
|
1076
|
-
type: "
|
|
1039
|
+
type: "Bundle";
|
|
1077
1040
|
description: string;
|
|
1078
1041
|
tagline: string;
|
|
1079
1042
|
iconUrl: string | null;
|
|
@@ -1082,7 +1045,7 @@ declare function useInventory(context?: StorefrontContext): {
|
|
|
1082
1045
|
products: ({
|
|
1083
1046
|
id: string;
|
|
1084
1047
|
name: string;
|
|
1085
|
-
type: "
|
|
1048
|
+
type: "Product";
|
|
1086
1049
|
description: string;
|
|
1087
1050
|
tagline: string;
|
|
1088
1051
|
iconUrl: string | null;
|
|
@@ -1283,7 +1246,7 @@ declare function useInventory(context?: StorefrontContext): {
|
|
|
1283
1246
|
product: {
|
|
1284
1247
|
id: string;
|
|
1285
1248
|
name: string;
|
|
1286
|
-
type: "
|
|
1249
|
+
type: "Product";
|
|
1287
1250
|
description: string;
|
|
1288
1251
|
tagline: string;
|
|
1289
1252
|
iconUrl: string | null;
|
|
@@ -1379,7 +1342,7 @@ declare function useInventory(context?: StorefrontContext): {
|
|
|
1379
1342
|
bundle: {
|
|
1380
1343
|
id: string;
|
|
1381
1344
|
name: string;
|
|
1382
|
-
type: "
|
|
1345
|
+
type: "Bundle";
|
|
1383
1346
|
description: string;
|
|
1384
1347
|
tagline: string;
|
|
1385
1348
|
iconUrl: string | null;
|
|
@@ -1388,7 +1351,7 @@ declare function useInventory(context?: StorefrontContext): {
|
|
|
1388
1351
|
products: ({
|
|
1389
1352
|
id: string;
|
|
1390
1353
|
name: string;
|
|
1391
|
-
type: "
|
|
1354
|
+
type: "Product";
|
|
1392
1355
|
description: string;
|
|
1393
1356
|
tagline: string;
|
|
1394
1357
|
iconUrl: string | null;
|
|
@@ -1560,6 +1523,11 @@ declare function useInventory(context?: StorefrontContext): {
|
|
|
1560
1523
|
}>;
|
|
1561
1524
|
};
|
|
1562
1525
|
|
|
1526
|
+
declare function useOffer(offerId: string, context?: StorefrontContext): Ref<StorefrontOffer | null>;
|
|
1527
|
+
|
|
1528
|
+
declare function useOffers(context?: StorefrontContext): Ref<StorefrontOffer[]>;
|
|
1529
|
+
declare function useEligibleOffers(context?: StorefrontContext): Ref<StorefrontOffer[]>;
|
|
1530
|
+
|
|
1563
1531
|
declare function useProduct(productId: string, context?: StorefrontContext): Ref<StorefrontProduct | null>;
|
|
1564
1532
|
|
|
1565
1533
|
declare function useProducts(context?: StorefrontContext): Ref<StorefrontProduct[]>;
|
|
@@ -1581,7 +1549,7 @@ declare function useVoucher(context?: StorefrontContext): {
|
|
|
1581
1549
|
value: {
|
|
1582
1550
|
id: string;
|
|
1583
1551
|
name: string;
|
|
1584
|
-
type: "
|
|
1552
|
+
type: "Product";
|
|
1585
1553
|
description: string;
|
|
1586
1554
|
tagline: string;
|
|
1587
1555
|
iconUrl: string | null;
|
|
@@ -1677,7 +1645,7 @@ declare function useVoucher(context?: StorefrontContext): {
|
|
|
1677
1645
|
value: {
|
|
1678
1646
|
id: string;
|
|
1679
1647
|
name: string;
|
|
1680
|
-
type: "
|
|
1648
|
+
type: "Bundle";
|
|
1681
1649
|
description: string;
|
|
1682
1650
|
tagline: string;
|
|
1683
1651
|
iconUrl: string | null;
|
|
@@ -1686,7 +1654,7 @@ declare function useVoucher(context?: StorefrontContext): {
|
|
|
1686
1654
|
products: ({
|
|
1687
1655
|
id: string;
|
|
1688
1656
|
name: string;
|
|
1689
|
-
type: "
|
|
1657
|
+
type: "Product";
|
|
1690
1658
|
description: string;
|
|
1691
1659
|
tagline: string;
|
|
1692
1660
|
iconUrl: string | null;
|
|
@@ -1860,7 +1828,7 @@ declare function useVoucher(context?: StorefrontContext): {
|
|
|
1860
1828
|
value: {
|
|
1861
1829
|
id: string;
|
|
1862
1830
|
name: string;
|
|
1863
|
-
type: "
|
|
1831
|
+
type: "Product";
|
|
1864
1832
|
description: string;
|
|
1865
1833
|
tagline: string;
|
|
1866
1834
|
iconUrl: string | null;
|
|
@@ -1956,7 +1924,7 @@ declare function useVoucher(context?: StorefrontContext): {
|
|
|
1956
1924
|
value: {
|
|
1957
1925
|
id: string;
|
|
1958
1926
|
name: string;
|
|
1959
|
-
type: "
|
|
1927
|
+
type: "Bundle";
|
|
1960
1928
|
description: string;
|
|
1961
1929
|
tagline: string;
|
|
1962
1930
|
iconUrl: string | null;
|
|
@@ -1965,7 +1933,7 @@ declare function useVoucher(context?: StorefrontContext): {
|
|
|
1965
1933
|
products: ({
|
|
1966
1934
|
id: string;
|
|
1967
1935
|
name: string;
|
|
1968
|
-
type: "
|
|
1936
|
+
type: "Product";
|
|
1969
1937
|
description: string;
|
|
1970
1938
|
tagline: string;
|
|
1971
1939
|
iconUrl: string | null;
|
|
@@ -2139,4 +2107,4 @@ interface Cart {
|
|
|
2139
2107
|
type CartItem = LineItem;
|
|
2140
2108
|
declare function createStorefront(endpoint: string, stateFactory?: StateFactory, config?: Omit<MoonbaseConfiguration, 'endpoint'>): StorefrontContext;
|
|
2141
2109
|
|
|
2142
|
-
export { type ActivationRequestComposable, type Cart, type CartItem, type CheckoutItem, type VendorComposable, createStorefront, storefrontKey, useActivationRequest, useAuth, useBundle, useBundles, useCart, useCheckout, useInventory, useProduct, useProducts, useVendor, useVoucher };
|
|
2110
|
+
export { type ActivationRequestComposable, type Cart, type CartItem, type CheckoutItem, type VendorComposable, createStorefront, storefrontKey, useActivationRequest, useAuth, useBundle, useBundles, useCart, useCheckout, useEligibleOffers, useInventory, useOffer, useOffers, useProduct, useProducts, useVendor, useVoucher };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as _moonbase_sh_storefront_api from '@moonbase.sh/storefront-api';
|
|
2
|
-
import { MoonbaseConfiguration, Storefront, Order, User, UrchinTrackingModule, MoonbaseClient, LineItem, OpenOrder, Money, CompletedOrder, ActivationRequest, Address, CommunicationPreferences, StorefrontBundle, StorefrontProduct, PricingVariation, ActivationMethod, Activation, Download, Vendor } from '@moonbase.sh/storefront-api';
|
|
2
|
+
import { MoonbaseConfiguration, Storefront, Order, User, UrchinTrackingModule, MoonbaseClient, LineItem, OpenOrder, Money, CompletedOrder, ActivationRequest, Address, CommunicationPreferences, StorefrontBundle, StorefrontProduct, PricingVariation, StorefrontOffer, ActivationMethod, Activation, Download, Vendor } from '@moonbase.sh/storefront-api';
|
|
3
3
|
export * from '@moonbase.sh/storefront-api';
|
|
4
4
|
import * as vue from 'vue';
|
|
5
|
-
import {
|
|
5
|
+
import { Ref, UnwrapRef, Plugin, App, MaybeRef, InjectionKey } from 'vue';
|
|
6
6
|
|
|
7
7
|
interface StorefrontContext extends Pick<Plugin, keyof Plugin> {
|
|
8
8
|
configuration: MoonbaseConfiguration;
|
|
@@ -237,6 +237,7 @@ declare function useCart(context?: StorefrontContext): {
|
|
|
237
237
|
tagline: string;
|
|
238
238
|
iconUrl: string | null;
|
|
239
239
|
} | undefined;
|
|
240
|
+
offerId?: string | undefined;
|
|
240
241
|
isDefaultVariation?: boolean | null | undefined;
|
|
241
242
|
isSubcriptionPayment?: boolean | null | undefined;
|
|
242
243
|
variation?: {
|
|
@@ -315,20 +316,7 @@ declare function useCart(context?: StorefrontContext): {
|
|
|
315
316
|
} | null | undefined;
|
|
316
317
|
price?: Record<string, number> | undefined;
|
|
317
318
|
partial?: boolean | undefined;
|
|
318
|
-
|
|
319
|
-
id: string;
|
|
320
|
-
name: string;
|
|
321
|
-
tagline: string;
|
|
322
|
-
iconUrl: string | null;
|
|
323
|
-
products: ({
|
|
324
|
-
id: string;
|
|
325
|
-
name: string;
|
|
326
|
-
tagline: string;
|
|
327
|
-
iconUrl: string | null;
|
|
328
|
-
} & {
|
|
329
|
-
included?: boolean | undefined;
|
|
330
|
-
})[];
|
|
331
|
-
} | undefined;
|
|
319
|
+
offerId?: string | undefined;
|
|
332
320
|
isDefaultVariation?: boolean | null | undefined;
|
|
333
321
|
isSubcriptionPayment?: boolean | null | undefined;
|
|
334
322
|
variation?: {
|
|
@@ -381,13 +369,30 @@ declare function useCart(context?: StorefrontContext): {
|
|
|
381
369
|
total?: Record<string, number> | undefined;
|
|
382
370
|
recurringPaymentUseCount?: number | undefined;
|
|
383
371
|
} | undefined;
|
|
372
|
+
replaced?: string[] | undefined;
|
|
373
|
+
bundle?: {
|
|
374
|
+
id: string;
|
|
375
|
+
name: string;
|
|
376
|
+
tagline: string;
|
|
377
|
+
iconUrl: string | null;
|
|
378
|
+
products: ({
|
|
379
|
+
id: string;
|
|
380
|
+
name: string;
|
|
381
|
+
tagline: string;
|
|
382
|
+
iconUrl: string | null;
|
|
383
|
+
} & {
|
|
384
|
+
included?: boolean | undefined;
|
|
385
|
+
})[];
|
|
386
|
+
} | undefined;
|
|
384
387
|
})[]>;
|
|
385
388
|
currency: vue.ComputedRef<string>;
|
|
386
389
|
total: vue.ComputedRef<{
|
|
387
390
|
amount: number;
|
|
388
391
|
currency: string;
|
|
389
392
|
}>;
|
|
390
|
-
addToCart: (item:
|
|
393
|
+
addToCart: (item: MaybeRef<StorefrontProduct> | MaybeRef<StorefrontBundle>, variation?: PricingVariation, offer?: StorefrontOffer, options?: {
|
|
394
|
+
bundleBehaviour?: "append" | "replace";
|
|
395
|
+
}) => CartItem;
|
|
391
396
|
setQuantity: (cartItem: CartItem, quantity: number) => CartItem;
|
|
392
397
|
removeFromCart: (cartItem: CartItem) => void;
|
|
393
398
|
checkout: (options: {
|
|
@@ -587,49 +592,7 @@ declare function useInventory(context?: StorefrontContext): {
|
|
|
587
592
|
}>>;
|
|
588
593
|
revokeActivation: (activation: Activation) => Promise<void>;
|
|
589
594
|
activateProduct: (deviceToken: string, activationMethod: ActivationMethod) => Promise<{
|
|
590
|
-
license:
|
|
591
|
-
id: string;
|
|
592
|
-
status: _moonbase_sh_storefront_api.LicenseStatus;
|
|
593
|
-
product: {
|
|
594
|
-
id: string;
|
|
595
|
-
name: string;
|
|
596
|
-
tagline: string;
|
|
597
|
-
currentVersion: string | null;
|
|
598
|
-
downloadsNeedsUser: boolean;
|
|
599
|
-
downloadsNeedsOwnership: boolean;
|
|
600
|
-
description?: string | null | undefined;
|
|
601
|
-
website?: string | undefined;
|
|
602
|
-
iconUrl?: string | undefined;
|
|
603
|
-
numberOfLicenses?: number | undefined;
|
|
604
|
-
numberOfTrials?: number | undefined;
|
|
605
|
-
currentActivations?: number | undefined;
|
|
606
|
-
maxActivations?: number | undefined;
|
|
607
|
-
externalLicenses?: number | undefined;
|
|
608
|
-
subscriptionLicenses?: number | undefined;
|
|
609
|
-
version?: string | undefined;
|
|
610
|
-
prerelease?: boolean | undefined;
|
|
611
|
-
releaseDescription?: string | undefined;
|
|
612
|
-
downloads?: {
|
|
613
|
-
name: string;
|
|
614
|
-
path: string | null;
|
|
615
|
-
key: string;
|
|
616
|
-
platform: _moonbase_sh_storefront_api.Platform;
|
|
617
|
-
size: number;
|
|
618
|
-
manifest?: {
|
|
619
|
-
files: {
|
|
620
|
-
name: string;
|
|
621
|
-
path: string;
|
|
622
|
-
}[];
|
|
623
|
-
licensePath: string | null;
|
|
624
|
-
} | undefined;
|
|
625
|
-
}[] | undefined;
|
|
626
|
-
};
|
|
627
|
-
activeNumberOfActivations: number;
|
|
628
|
-
maxNumberOfActivations: number;
|
|
629
|
-
createdAt: Date;
|
|
630
|
-
expiresAt?: Date | undefined;
|
|
631
|
-
externalFulfillment?: string | undefined;
|
|
632
|
-
};
|
|
595
|
+
license: _moonbase_sh_storefront_api.License;
|
|
633
596
|
url: string;
|
|
634
597
|
}>;
|
|
635
598
|
downloadProduct: (download: Download) => Promise<void>;
|
|
@@ -671,7 +634,7 @@ declare function useInventory(context?: StorefrontContext): {
|
|
|
671
634
|
product: {
|
|
672
635
|
id: string;
|
|
673
636
|
name: string;
|
|
674
|
-
type: "
|
|
637
|
+
type: "Product";
|
|
675
638
|
description: string;
|
|
676
639
|
tagline: string;
|
|
677
640
|
iconUrl: string | null;
|
|
@@ -767,7 +730,7 @@ declare function useInventory(context?: StorefrontContext): {
|
|
|
767
730
|
bundle: {
|
|
768
731
|
id: string;
|
|
769
732
|
name: string;
|
|
770
|
-
type: "
|
|
733
|
+
type: "Bundle";
|
|
771
734
|
description: string;
|
|
772
735
|
tagline: string;
|
|
773
736
|
iconUrl: string | null;
|
|
@@ -776,7 +739,7 @@ declare function useInventory(context?: StorefrontContext): {
|
|
|
776
739
|
products: ({
|
|
777
740
|
id: string;
|
|
778
741
|
name: string;
|
|
779
|
-
type: "
|
|
742
|
+
type: "Product";
|
|
780
743
|
description: string;
|
|
781
744
|
tagline: string;
|
|
782
745
|
iconUrl: string | null;
|
|
@@ -977,7 +940,7 @@ declare function useInventory(context?: StorefrontContext): {
|
|
|
977
940
|
product: {
|
|
978
941
|
id: string;
|
|
979
942
|
name: string;
|
|
980
|
-
type: "
|
|
943
|
+
type: "Product";
|
|
981
944
|
description: string;
|
|
982
945
|
tagline: string;
|
|
983
946
|
iconUrl: string | null;
|
|
@@ -1073,7 +1036,7 @@ declare function useInventory(context?: StorefrontContext): {
|
|
|
1073
1036
|
bundle: {
|
|
1074
1037
|
id: string;
|
|
1075
1038
|
name: string;
|
|
1076
|
-
type: "
|
|
1039
|
+
type: "Bundle";
|
|
1077
1040
|
description: string;
|
|
1078
1041
|
tagline: string;
|
|
1079
1042
|
iconUrl: string | null;
|
|
@@ -1082,7 +1045,7 @@ declare function useInventory(context?: StorefrontContext): {
|
|
|
1082
1045
|
products: ({
|
|
1083
1046
|
id: string;
|
|
1084
1047
|
name: string;
|
|
1085
|
-
type: "
|
|
1048
|
+
type: "Product";
|
|
1086
1049
|
description: string;
|
|
1087
1050
|
tagline: string;
|
|
1088
1051
|
iconUrl: string | null;
|
|
@@ -1283,7 +1246,7 @@ declare function useInventory(context?: StorefrontContext): {
|
|
|
1283
1246
|
product: {
|
|
1284
1247
|
id: string;
|
|
1285
1248
|
name: string;
|
|
1286
|
-
type: "
|
|
1249
|
+
type: "Product";
|
|
1287
1250
|
description: string;
|
|
1288
1251
|
tagline: string;
|
|
1289
1252
|
iconUrl: string | null;
|
|
@@ -1379,7 +1342,7 @@ declare function useInventory(context?: StorefrontContext): {
|
|
|
1379
1342
|
bundle: {
|
|
1380
1343
|
id: string;
|
|
1381
1344
|
name: string;
|
|
1382
|
-
type: "
|
|
1345
|
+
type: "Bundle";
|
|
1383
1346
|
description: string;
|
|
1384
1347
|
tagline: string;
|
|
1385
1348
|
iconUrl: string | null;
|
|
@@ -1388,7 +1351,7 @@ declare function useInventory(context?: StorefrontContext): {
|
|
|
1388
1351
|
products: ({
|
|
1389
1352
|
id: string;
|
|
1390
1353
|
name: string;
|
|
1391
|
-
type: "
|
|
1354
|
+
type: "Product";
|
|
1392
1355
|
description: string;
|
|
1393
1356
|
tagline: string;
|
|
1394
1357
|
iconUrl: string | null;
|
|
@@ -1560,6 +1523,11 @@ declare function useInventory(context?: StorefrontContext): {
|
|
|
1560
1523
|
}>;
|
|
1561
1524
|
};
|
|
1562
1525
|
|
|
1526
|
+
declare function useOffer(offerId: string, context?: StorefrontContext): Ref<StorefrontOffer | null>;
|
|
1527
|
+
|
|
1528
|
+
declare function useOffers(context?: StorefrontContext): Ref<StorefrontOffer[]>;
|
|
1529
|
+
declare function useEligibleOffers(context?: StorefrontContext): Ref<StorefrontOffer[]>;
|
|
1530
|
+
|
|
1563
1531
|
declare function useProduct(productId: string, context?: StorefrontContext): Ref<StorefrontProduct | null>;
|
|
1564
1532
|
|
|
1565
1533
|
declare function useProducts(context?: StorefrontContext): Ref<StorefrontProduct[]>;
|
|
@@ -1581,7 +1549,7 @@ declare function useVoucher(context?: StorefrontContext): {
|
|
|
1581
1549
|
value: {
|
|
1582
1550
|
id: string;
|
|
1583
1551
|
name: string;
|
|
1584
|
-
type: "
|
|
1552
|
+
type: "Product";
|
|
1585
1553
|
description: string;
|
|
1586
1554
|
tagline: string;
|
|
1587
1555
|
iconUrl: string | null;
|
|
@@ -1677,7 +1645,7 @@ declare function useVoucher(context?: StorefrontContext): {
|
|
|
1677
1645
|
value: {
|
|
1678
1646
|
id: string;
|
|
1679
1647
|
name: string;
|
|
1680
|
-
type: "
|
|
1648
|
+
type: "Bundle";
|
|
1681
1649
|
description: string;
|
|
1682
1650
|
tagline: string;
|
|
1683
1651
|
iconUrl: string | null;
|
|
@@ -1686,7 +1654,7 @@ declare function useVoucher(context?: StorefrontContext): {
|
|
|
1686
1654
|
products: ({
|
|
1687
1655
|
id: string;
|
|
1688
1656
|
name: string;
|
|
1689
|
-
type: "
|
|
1657
|
+
type: "Product";
|
|
1690
1658
|
description: string;
|
|
1691
1659
|
tagline: string;
|
|
1692
1660
|
iconUrl: string | null;
|
|
@@ -1860,7 +1828,7 @@ declare function useVoucher(context?: StorefrontContext): {
|
|
|
1860
1828
|
value: {
|
|
1861
1829
|
id: string;
|
|
1862
1830
|
name: string;
|
|
1863
|
-
type: "
|
|
1831
|
+
type: "Product";
|
|
1864
1832
|
description: string;
|
|
1865
1833
|
tagline: string;
|
|
1866
1834
|
iconUrl: string | null;
|
|
@@ -1956,7 +1924,7 @@ declare function useVoucher(context?: StorefrontContext): {
|
|
|
1956
1924
|
value: {
|
|
1957
1925
|
id: string;
|
|
1958
1926
|
name: string;
|
|
1959
|
-
type: "
|
|
1927
|
+
type: "Bundle";
|
|
1960
1928
|
description: string;
|
|
1961
1929
|
tagline: string;
|
|
1962
1930
|
iconUrl: string | null;
|
|
@@ -1965,7 +1933,7 @@ declare function useVoucher(context?: StorefrontContext): {
|
|
|
1965
1933
|
products: ({
|
|
1966
1934
|
id: string;
|
|
1967
1935
|
name: string;
|
|
1968
|
-
type: "
|
|
1936
|
+
type: "Product";
|
|
1969
1937
|
description: string;
|
|
1970
1938
|
tagline: string;
|
|
1971
1939
|
iconUrl: string | null;
|
|
@@ -2139,4 +2107,4 @@ interface Cart {
|
|
|
2139
2107
|
type CartItem = LineItem;
|
|
2140
2108
|
declare function createStorefront(endpoint: string, stateFactory?: StateFactory, config?: Omit<MoonbaseConfiguration, 'endpoint'>): StorefrontContext;
|
|
2141
2109
|
|
|
2142
|
-
export { type ActivationRequestComposable, type Cart, type CartItem, type CheckoutItem, type VendorComposable, createStorefront, storefrontKey, useActivationRequest, useAuth, useBundle, useBundles, useCart, useCheckout, useInventory, useProduct, useProducts, useVendor, useVoucher };
|
|
2110
|
+
export { type ActivationRequestComposable, type Cart, type CartItem, type CheckoutItem, type VendorComposable, createStorefront, storefrontKey, useActivationRequest, useAuth, useBundle, useBundles, useCart, useCheckout, useEligibleOffers, useInventory, useOffer, useOffers, useProduct, useProducts, useVendor, useVoucher };
|