@vue-storefront/core
Advanced tools
Comparing version 2.0.9 to 2.0.10
@@ -12,1 +12,2 @@ export * from './useCartFactory'; | ||
export * from './useFacetFactory'; | ||
export * from './useContentFactory'; |
import { UseUserBilling } from '../types'; | ||
export interface UseUserBillingFactoryParams<ADDRESS> { | ||
export interface UseUserBillingFactoryParams<USER_BILLING, USER_BILLING_ITEM> { | ||
addAddress: (params: { | ||
address: Readonly<ADDRESS>; | ||
addresses: Readonly<ADDRESS[]>; | ||
}) => Promise<ADDRESS[]>; | ||
address: Readonly<USER_BILLING_ITEM>; | ||
billing: Readonly<USER_BILLING>; | ||
}) => Promise<USER_BILLING>; | ||
deleteAddress: (params: { | ||
address: Readonly<ADDRESS>; | ||
defaultAddress: Readonly<ADDRESS>; | ||
addresses: Readonly<ADDRESS[]>; | ||
}) => Promise<ADDRESS[]>; | ||
address: Readonly<USER_BILLING_ITEM>; | ||
billing: Readonly<USER_BILLING>; | ||
}) => Promise<USER_BILLING>; | ||
updateAddress: (params: { | ||
address: Readonly<ADDRESS>; | ||
defaultAddress: Readonly<ADDRESS>; | ||
addresses: Readonly<ADDRESS[]>; | ||
}) => Promise<ADDRESS[]>; | ||
address: Readonly<USER_BILLING_ITEM>; | ||
billing: Readonly<USER_BILLING>; | ||
}) => Promise<USER_BILLING>; | ||
load: (params: { | ||
addresses: Readonly<ADDRESS[]>; | ||
}) => Promise<ADDRESS[]>; | ||
billing: Readonly<USER_BILLING>; | ||
}) => Promise<USER_BILLING>; | ||
setDefault: (params: { | ||
address: Readonly<ADDRESS>; | ||
defaultAddress: Readonly<ADDRESS>; | ||
addresses: Readonly<ADDRESS[]>; | ||
}) => Promise<ADDRESS>; | ||
address: Readonly<USER_BILLING_ITEM>; | ||
billing: Readonly<USER_BILLING>; | ||
}) => Promise<USER_BILLING>; | ||
} | ||
export declare const useUserBillingFactory: <ADDRESS>(factoryParams: UseUserBillingFactoryParams<ADDRESS>) => { | ||
useUserBilling: () => UseUserBilling<ADDRESS>; | ||
export declare const useUserBillingFactory: <USER_BILLING, USER_BILLING_ITEM>(factoryParams: UseUserBillingFactoryParams<USER_BILLING, USER_BILLING_ITEM>) => { | ||
useUserBilling: () => UseUserBilling<USER_BILLING, USER_BILLING_ITEM>; | ||
}; |
@@ -1,13 +0,13 @@ | ||
import { UseWishlist } from '../types'; | ||
import { UseWishlist, CustomQuery } from '../types'; | ||
export declare type UseWishlistFactoryParams<WISHLIST, WISHLIST_ITEM, PRODUCT> = { | ||
loadWishlist: () => Promise<WISHLIST>; | ||
loadWishlist: (customQuery?: CustomQuery) => Promise<WISHLIST>; | ||
addToWishlist: (params: { | ||
currentWishlist: WISHLIST; | ||
product: PRODUCT; | ||
}) => Promise<WISHLIST>; | ||
}, customQuery?: CustomQuery) => Promise<WISHLIST>; | ||
removeFromWishlist: (params: { | ||
currentWishlist: WISHLIST; | ||
product: WISHLIST_ITEM; | ||
}) => Promise<WISHLIST>; | ||
clearWishlist: (prams: { | ||
}, customQuery?: CustomQuery) => Promise<WISHLIST>; | ||
clearWishlist: (params: { | ||
currentWishlist: WISHLIST; | ||
@@ -14,0 +14,0 @@ }) => Promise<WISHLIST>; |
@@ -85,2 +85,3 @@ import { Ref } from '@vue/composition-api'; | ||
getStreetName: (address: USER_SHIPPING_ITEM) => string; | ||
getStreetNumber: (address: USER_SHIPPING_ITEM) => string | number; | ||
getCity: (address: USER_SHIPPING_ITEM) => string; | ||
@@ -90,3 +91,2 @@ getFirstName: (address: USER_SHIPPING_ITEM) => string; | ||
getCountry: (address: USER_SHIPPING_ITEM) => string; | ||
getStreetNumber: (address: USER_SHIPPING_ITEM) => string; | ||
getPhone: (address: USER_SHIPPING_ITEM) => string; | ||
@@ -97,14 +97,35 @@ getEmail: (address: USER_SHIPPING_ITEM) => string; | ||
getTaxNumber: (address: USER_SHIPPING_ITEM) => string; | ||
getId: (address: USER_SHIPPING_ITEM) => string | number; | ||
getApartmentNumber: (address: USER_SHIPPING_ITEM) => string | number; | ||
isDefault: (address: USER_SHIPPING_ITEM) => boolean; | ||
} | ||
export interface UseUserBilling<ADDRESS> { | ||
addresses: ComputedProperty<ADDRESS[]>; | ||
totalAddresses: ComputedProperty<number>; | ||
addAddress: (address: ADDRESS) => Promise<void>; | ||
deleteAddress: (address: ADDRESS) => Promise<void>; | ||
updateAddress: (address: ADDRESS) => Promise<void>; | ||
export interface UseUserBilling<USER_BILLING, USER_BILLING_ITEM> { | ||
billing: ComputedProperty<USER_BILLING>; | ||
addAddress: (address: USER_BILLING_ITEM) => Promise<void>; | ||
deleteAddress: (address: USER_BILLING_ITEM) => Promise<void>; | ||
updateAddress: (address: USER_BILLING_ITEM) => Promise<void>; | ||
load: () => Promise<void>; | ||
defaultAddress: ComputedProperty<ADDRESS>; | ||
setDefault: (address: ADDRESS) => Promise<void>; | ||
setDefault: (address: USER_BILLING_ITEM) => Promise<void>; | ||
loading: ComputedProperty<boolean>; | ||
} | ||
export interface UserBillingGetters<USER_BILLING, USER_BILLING_ITEM> { | ||
getAddresses: (billing: USER_BILLING, criteria?: Record<string, any>) => USER_BILLING_ITEM[]; | ||
getDefault: (billing: USER_BILLING) => USER_BILLING_ITEM; | ||
getTotal: (billing: USER_BILLING) => number; | ||
getPostCode: (address: USER_BILLING_ITEM) => string; | ||
getStreetName: (address: USER_BILLING_ITEM) => string; | ||
getStreetNumber: (address: USER_BILLING_ITEM) => string | number; | ||
getCity: (address: USER_BILLING_ITEM) => string; | ||
getFirstName: (address: USER_BILLING_ITEM) => string; | ||
getLastName: (address: USER_BILLING_ITEM) => string; | ||
getCountry: (address: USER_BILLING_ITEM) => string; | ||
getPhone: (address: USER_BILLING_ITEM) => string; | ||
getEmail: (address: USER_BILLING_ITEM) => string; | ||
getProvince: (address: USER_BILLING_ITEM) => string; | ||
getCompanyName: (address: USER_BILLING_ITEM) => string; | ||
getTaxNumber: (address: USER_BILLING_ITEM) => string; | ||
getId: (address: USER_BILLING_ITEM) => string; | ||
getApartmentNumber: (address: USER_BILLING_ITEM) => string | number; | ||
isDefault: (address: USER_BILLING_ITEM) => boolean; | ||
} | ||
export interface UseCategory<CATEGORY> { | ||
@@ -136,8 +157,11 @@ categories: ComputedProperty<CATEGORY[]>; | ||
wishlist: ComputedProperty<WISHLIST>; | ||
addToWishlist: (product: PRODUCT) => Promise<void>; | ||
isOnWishlist: (product: PRODUCT) => boolean; | ||
removeFromWishlist: (product: WISHLIST_ITEM) => Promise<void>; | ||
clearWishlist: () => Promise<void>; | ||
loadWishlist: () => Promise<void>; | ||
loading: ComputedProperty<boolean>; | ||
addToWishlist(product: PRODUCT): Promise<void>; | ||
addToWishlist(product: PRODUCT, customQuery?: CustomQuery): Promise<void>; | ||
removeFromWishlist(product: WISHLIST_ITEM): Promise<void>; | ||
removeFromWishlist(product: WISHLIST_ITEM, customQuery?: CustomQuery): Promise<void>; | ||
loadWishlist(): Promise<void>; | ||
loadWishlist(customQuery?: CustomQuery): Promise<void>; | ||
clearWishlist(): Promise<void>; | ||
isOnWishlist(product: PRODUCT): boolean; | ||
} | ||
@@ -176,2 +200,12 @@ export interface UseCompare<PRODUCT> { | ||
} | ||
export interface UseContent<CONTENT, CONTENT_SEARCH_PARAMS> { | ||
search: (params: CONTENT_SEARCH_PARAMS) => Promise<void>; | ||
content: ComputedProperty<CONTENT>; | ||
loading: ComputedProperty<boolean>; | ||
error: ComputedProperty<string | null>; | ||
} | ||
export interface RenderComponent { | ||
componentName: string; | ||
props?: {}; | ||
} | ||
export interface ProductGetters<PRODUCT, PRODUCT_FILTER> { | ||
@@ -230,2 +264,3 @@ getName: (product: PRODUCT) => string; | ||
getFullName: (customer: USER) => string; | ||
getEmailAddress: (customer: USER) => string; | ||
[getterName: string]: (element: any, options?: any) => unknown; | ||
@@ -232,0 +267,0 @@ } |
{ | ||
"name": "@vue-storefront/core", | ||
"version": "2.0.9", | ||
"version": "2.0.10", | ||
"sideEffects": false, | ||
@@ -13,3 +13,4 @@ "main": "lib/index.cjs.js", | ||
"build": "yarn build:client && yarn build:server", | ||
"dev": "rollup -c rollup-client.config.js -w" | ||
"dev": "rollup -c rollup-client.config.js -w", | ||
"prepublish": "yarn build" | ||
}, | ||
@@ -16,0 +17,0 @@ "dependencies": { |
@@ -12,1 +12,2 @@ export * from './useCartFactory'; | ||
export * from './useFacetFactory'; | ||
export * from './useContentFactory'; |
import { UseUserBilling } from '../types'; | ||
export interface UseUserBillingFactoryParams<ADDRESS> { | ||
export interface UseUserBillingFactoryParams<USER_BILLING, USER_BILLING_ITEM> { | ||
addAddress: (params: { | ||
address: Readonly<ADDRESS>; | ||
addresses: Readonly<ADDRESS[]>; | ||
}) => Promise<ADDRESS[]>; | ||
address: Readonly<USER_BILLING_ITEM>; | ||
billing: Readonly<USER_BILLING>; | ||
}) => Promise<USER_BILLING>; | ||
deleteAddress: (params: { | ||
address: Readonly<ADDRESS>; | ||
defaultAddress: Readonly<ADDRESS>; | ||
addresses: Readonly<ADDRESS[]>; | ||
}) => Promise<ADDRESS[]>; | ||
address: Readonly<USER_BILLING_ITEM>; | ||
billing: Readonly<USER_BILLING>; | ||
}) => Promise<USER_BILLING>; | ||
updateAddress: (params: { | ||
address: Readonly<ADDRESS>; | ||
defaultAddress: Readonly<ADDRESS>; | ||
addresses: Readonly<ADDRESS[]>; | ||
}) => Promise<ADDRESS[]>; | ||
address: Readonly<USER_BILLING_ITEM>; | ||
billing: Readonly<USER_BILLING>; | ||
}) => Promise<USER_BILLING>; | ||
load: (params: { | ||
addresses: Readonly<ADDRESS[]>; | ||
}) => Promise<ADDRESS[]>; | ||
billing: Readonly<USER_BILLING>; | ||
}) => Promise<USER_BILLING>; | ||
setDefault: (params: { | ||
address: Readonly<ADDRESS>; | ||
defaultAddress: Readonly<ADDRESS>; | ||
addresses: Readonly<ADDRESS[]>; | ||
}) => Promise<ADDRESS>; | ||
address: Readonly<USER_BILLING_ITEM>; | ||
billing: Readonly<USER_BILLING>; | ||
}) => Promise<USER_BILLING>; | ||
} | ||
export declare const useUserBillingFactory: <ADDRESS>(factoryParams: UseUserBillingFactoryParams<ADDRESS>) => { | ||
useUserBilling: () => UseUserBilling<ADDRESS>; | ||
export declare const useUserBillingFactory: <USER_BILLING, USER_BILLING_ITEM>(factoryParams: UseUserBillingFactoryParams<USER_BILLING, USER_BILLING_ITEM>) => { | ||
useUserBilling: () => UseUserBilling<USER_BILLING, USER_BILLING_ITEM>; | ||
}; |
@@ -1,13 +0,13 @@ | ||
import { UseWishlist } from '../types'; | ||
import { UseWishlist, CustomQuery } from '../types'; | ||
export declare type UseWishlistFactoryParams<WISHLIST, WISHLIST_ITEM, PRODUCT> = { | ||
loadWishlist: () => Promise<WISHLIST>; | ||
loadWishlist: (customQuery?: CustomQuery) => Promise<WISHLIST>; | ||
addToWishlist: (params: { | ||
currentWishlist: WISHLIST; | ||
product: PRODUCT; | ||
}) => Promise<WISHLIST>; | ||
}, customQuery?: CustomQuery) => Promise<WISHLIST>; | ||
removeFromWishlist: (params: { | ||
currentWishlist: WISHLIST; | ||
product: WISHLIST_ITEM; | ||
}) => Promise<WISHLIST>; | ||
clearWishlist: (prams: { | ||
}, customQuery?: CustomQuery) => Promise<WISHLIST>; | ||
clearWishlist: (params: { | ||
currentWishlist: WISHLIST; | ||
@@ -14,0 +14,0 @@ }) => Promise<WISHLIST>; |
@@ -85,2 +85,3 @@ import { Ref } from '@vue/composition-api'; | ||
getStreetName: (address: USER_SHIPPING_ITEM) => string; | ||
getStreetNumber: (address: USER_SHIPPING_ITEM) => string | number; | ||
getCity: (address: USER_SHIPPING_ITEM) => string; | ||
@@ -90,3 +91,2 @@ getFirstName: (address: USER_SHIPPING_ITEM) => string; | ||
getCountry: (address: USER_SHIPPING_ITEM) => string; | ||
getStreetNumber: (address: USER_SHIPPING_ITEM) => string; | ||
getPhone: (address: USER_SHIPPING_ITEM) => string; | ||
@@ -97,14 +97,35 @@ getEmail: (address: USER_SHIPPING_ITEM) => string; | ||
getTaxNumber: (address: USER_SHIPPING_ITEM) => string; | ||
getId: (address: USER_SHIPPING_ITEM) => string | number; | ||
getApartmentNumber: (address: USER_SHIPPING_ITEM) => string | number; | ||
isDefault: (address: USER_SHIPPING_ITEM) => boolean; | ||
} | ||
export interface UseUserBilling<ADDRESS> { | ||
addresses: ComputedProperty<ADDRESS[]>; | ||
totalAddresses: ComputedProperty<number>; | ||
addAddress: (address: ADDRESS) => Promise<void>; | ||
deleteAddress: (address: ADDRESS) => Promise<void>; | ||
updateAddress: (address: ADDRESS) => Promise<void>; | ||
export interface UseUserBilling<USER_BILLING, USER_BILLING_ITEM> { | ||
billing: ComputedProperty<USER_BILLING>; | ||
addAddress: (address: USER_BILLING_ITEM) => Promise<void>; | ||
deleteAddress: (address: USER_BILLING_ITEM) => Promise<void>; | ||
updateAddress: (address: USER_BILLING_ITEM) => Promise<void>; | ||
load: () => Promise<void>; | ||
defaultAddress: ComputedProperty<ADDRESS>; | ||
setDefault: (address: ADDRESS) => Promise<void>; | ||
setDefault: (address: USER_BILLING_ITEM) => Promise<void>; | ||
loading: ComputedProperty<boolean>; | ||
} | ||
export interface UserBillingGetters<USER_BILLING, USER_BILLING_ITEM> { | ||
getAddresses: (billing: USER_BILLING, criteria?: Record<string, any>) => USER_BILLING_ITEM[]; | ||
getDefault: (billing: USER_BILLING) => USER_BILLING_ITEM; | ||
getTotal: (billing: USER_BILLING) => number; | ||
getPostCode: (address: USER_BILLING_ITEM) => string; | ||
getStreetName: (address: USER_BILLING_ITEM) => string; | ||
getStreetNumber: (address: USER_BILLING_ITEM) => string | number; | ||
getCity: (address: USER_BILLING_ITEM) => string; | ||
getFirstName: (address: USER_BILLING_ITEM) => string; | ||
getLastName: (address: USER_BILLING_ITEM) => string; | ||
getCountry: (address: USER_BILLING_ITEM) => string; | ||
getPhone: (address: USER_BILLING_ITEM) => string; | ||
getEmail: (address: USER_BILLING_ITEM) => string; | ||
getProvince: (address: USER_BILLING_ITEM) => string; | ||
getCompanyName: (address: USER_BILLING_ITEM) => string; | ||
getTaxNumber: (address: USER_BILLING_ITEM) => string; | ||
getId: (address: USER_BILLING_ITEM) => string; | ||
getApartmentNumber: (address: USER_BILLING_ITEM) => string | number; | ||
isDefault: (address: USER_BILLING_ITEM) => boolean; | ||
} | ||
export interface UseCategory<CATEGORY> { | ||
@@ -136,8 +157,11 @@ categories: ComputedProperty<CATEGORY[]>; | ||
wishlist: ComputedProperty<WISHLIST>; | ||
addToWishlist: (product: PRODUCT) => Promise<void>; | ||
isOnWishlist: (product: PRODUCT) => boolean; | ||
removeFromWishlist: (product: WISHLIST_ITEM) => Promise<void>; | ||
clearWishlist: () => Promise<void>; | ||
loadWishlist: () => Promise<void>; | ||
loading: ComputedProperty<boolean>; | ||
addToWishlist(product: PRODUCT): Promise<void>; | ||
addToWishlist(product: PRODUCT, customQuery?: CustomQuery): Promise<void>; | ||
removeFromWishlist(product: WISHLIST_ITEM): Promise<void>; | ||
removeFromWishlist(product: WISHLIST_ITEM, customQuery?: CustomQuery): Promise<void>; | ||
loadWishlist(): Promise<void>; | ||
loadWishlist(customQuery?: CustomQuery): Promise<void>; | ||
clearWishlist(): Promise<void>; | ||
isOnWishlist(product: PRODUCT): boolean; | ||
} | ||
@@ -176,2 +200,12 @@ export interface UseCompare<PRODUCT> { | ||
} | ||
export interface UseContent<CONTENT, CONTENT_SEARCH_PARAMS> { | ||
search: (params: CONTENT_SEARCH_PARAMS) => Promise<void>; | ||
content: ComputedProperty<CONTENT>; | ||
loading: ComputedProperty<boolean>; | ||
error: ComputedProperty<string | null>; | ||
} | ||
export interface RenderComponent { | ||
componentName: string; | ||
props?: {}; | ||
} | ||
export interface ProductGetters<PRODUCT, PRODUCT_FILTER> { | ||
@@ -230,2 +264,3 @@ getName: (product: PRODUCT) => string; | ||
getFullName: (customer: USER) => string; | ||
getEmailAddress: (customer: USER) => string; | ||
[getterName: string]: (element: any, options?: any) => unknown; | ||
@@ -232,0 +267,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
674411
70
7910