@teamnovu/kit-shopware-composables 0.0.3 → 0.0.4
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/api-types/storeApiSchema.localhost.http +1 -1
- package/dist/helpers/checkout/index.d.ts +5 -0
- package/dist/helpers/checkout/useAddresses.d.ts +210 -0
- package/dist/helpers/checkout/useOrderDetails.d.ts +186 -0
- package/dist/helpers/checkout/useOrderPayment.d.ts +73 -0
- package/dist/helpers/checkout/usePaymentMethods.d.ts +155 -0
- package/dist/helpers/checkout/useShippingMethods.d.ts +173 -0
- package/dist/helpers/general/index.d.ts +2 -0
- package/dist/{usePagination.d.ts → helpers/general/usePagination.d.ts} +1 -1
- package/dist/{general → helpers/general}/useSeoUrl.d.ts +1 -1
- package/dist/helpers/index.d.ts +4 -0
- package/dist/helpers/product/index.d.ts +2 -0
- package/dist/helpers/product/useProductPrice.d.ts +61 -0
- package/dist/{products → helpers/product}/useProductVariantForOptions.d.ts +1 -1
- package/dist/helpers/user/index.d.ts +2 -0
- package/dist/helpers/user/useIsLoggedIn.d.ts +2 -0
- package/dist/helpers/user/useUser.d.ts +167 -0
- package/dist/index.d.ts +3 -221
- package/dist/index.mjs +851 -222
- package/dist/inject.d.ts +2 -2
- package/dist/keys.d.ts +32 -0
- package/dist/query/address/index.d.ts +3 -0
- package/dist/query/address/useCreateCustomerAddressMutation.d.ts +166 -0
- package/dist/query/address/useDeleteCustomerAddressMutation.d.ts +5 -0
- package/dist/query/address/useListAddressQuery.d.ts +48 -0
- package/dist/query/cart/index.d.ts +4 -0
- package/dist/query/cart/useAddLineItemMutation.d.ts +131 -0
- package/dist/query/cart/useReadCartQuery.d.ts +108 -0
- package/dist/query/cart/useRemoveLineItemMutation.d.ts +136 -0
- package/dist/query/cart/useUpdateLineItemMutation.d.ts +131 -0
- package/dist/query/checkout/index.d.ts +2 -0
- package/dist/query/checkout/useCheckout.d.ts +1 -0
- package/dist/query/checkout/useCreateOrderMutation.d.ts +281 -0
- package/dist/query/context/index.d.ts +2 -0
- package/dist/query/context/useReadContextQuery.d.ts +153 -0
- package/dist/query/context/useUpdateContextMutation.d.ts +60 -0
- package/dist/query/customer/index.d.ts +6 -0
- package/dist/query/customer/useChangeEmailMutation.d.ts +15 -0
- package/dist/query/customer/useChangeProfileMutation.d.ts +15 -0
- package/dist/query/customer/useLoginCustomerMutation.d.ts +30 -0
- package/dist/query/customer/useLogoutCustomerMutation.d.ts +15 -0
- package/dist/query/customer/useReadCustomerQuery.d.ts +220 -0
- package/dist/query/customer/useRegisterCustomerMutation.d.ts +266 -0
- package/dist/query/index.d.ts +10 -0
- package/dist/query/order/index.d.ts +1 -0
- package/dist/query/order/useReadOrderQuery.d.ts +44 -0
- package/dist/query/payment/index.d.ts +3 -0
- package/dist/query/payment/useHandlePaymentMutation.d.ts +15 -0
- package/dist/query/payment/useOrderSetPaymentMutation.d.ts +15 -0
- package/dist/query/payment/useReadPaymentMethodQuery.d.ts +31 -0
- package/dist/query/products/index.d.ts +3 -0
- package/dist/query/products/useReadCategoryListQuery.d.ts +48 -0
- package/dist/query/products/useReadCompactProductListingQuery.d.ts +35 -0
- package/dist/query/products/useReadCustomProductDetailQuery.d.ts +67 -0
- package/dist/query/shipping/index.d.ts +1 -0
- package/dist/query/shipping/useReadShippingMethodQuery.d.ts +55 -0
- package/dist/query/types/index.d.ts +2 -0
- package/dist/query/types/operations.d.ts +5 -0
- package/dist/query/types/query.d.ts +17 -0
- package/dist/util/index.d.ts +3 -0
- package/dist/util/unrefOptions.d.ts +4 -0
- package/dist/util/useOptimistic.d.ts +12 -0
- package/docs/index.md +457 -0
- package/docs/info.json +3 -0
- package/package.json +5 -1
- package/src/helpers/checkout/index.ts +5 -0
- package/src/helpers/checkout/useAddresses.ts +57 -0
- package/src/helpers/checkout/useOrderDetails.ts +94 -0
- package/src/helpers/checkout/useOrderPayment.ts +28 -0
- package/src/helpers/checkout/usePaymentMethods.ts +35 -0
- package/src/helpers/checkout/useShippingMethods.ts +35 -0
- package/src/helpers/general/index.ts +2 -0
- package/src/helpers/index.ts +4 -0
- package/src/helpers/product/index.ts +2 -0
- package/src/{products → helpers/product}/useProductPrice.ts +1 -43
- package/src/helpers/user/index.ts +2 -0
- package/src/helpers/user/useIsLoggedIn.ts +10 -0
- package/src/helpers/user/useUser.ts +53 -0
- package/src/index.ts +4 -29
- package/src/inject.ts +3 -3
- package/src/keys.ts +57 -0
- package/src/query/address/index.ts +3 -0
- package/src/query/address/useCreateCustomerAddressMutation.ts +32 -0
- package/src/query/address/useDeleteCustomerAddressMutation.ts +32 -0
- package/src/query/address/useListAddressQuery.ts +29 -0
- package/src/query/cart/index.ts +4 -0
- package/src/query/cart/useAddLineItemMutation.ts +45 -0
- package/src/query/cart/useReadCartQuery.ts +28 -0
- package/src/query/cart/useRemoveLineItemMutation.ts +32 -0
- package/src/query/cart/useUpdateLineItemMutation.ts +45 -0
- package/src/query/checkout/index.ts +2 -0
- package/src/query/checkout/useCheckout.ts +2 -0
- package/src/query/checkout/useCreateOrderMutation.ts +35 -0
- package/src/query/context/index.ts +2 -0
- package/src/query/context/useReadContextQuery.ts +19 -0
- package/src/query/context/useUpdateContextMutation.ts +36 -0
- package/src/query/customer/index.ts +6 -0
- package/src/query/customer/useChangeEmailMutation.ts +32 -0
- package/src/query/customer/useChangeProfileMutation.ts +32 -0
- package/src/query/customer/useLoginCustomerMutation.ts +42 -0
- package/src/query/customer/useLogoutCustomerMutation.ts +32 -0
- package/src/query/customer/useReadCustomerQuery.ts +27 -0
- package/src/query/customer/useRegisterCustomerMutation.ts +32 -0
- package/src/query/index.ts +10 -0
- package/src/query/order/index.ts +1 -0
- package/src/query/order/useReadOrderQuery.ts +33 -0
- package/src/query/payment/index.ts +3 -0
- package/src/query/payment/useHandlePaymentMutation.ts +27 -0
- package/src/query/payment/useOrderSetPaymentMutation.ts +32 -0
- package/src/query/payment/useReadPaymentMethodQuery.ts +30 -0
- package/src/query/products/index.ts +3 -0
- package/src/query/products/useReadCategoryListQuery.ts +28 -0
- package/src/query/products/useReadCompactProductListingQuery.ts +41 -0
- package/src/query/products/useReadCustomProductDetailQuery.ts +41 -0
- package/src/query/shipping/index.ts +1 -0
- package/src/query/shipping/useReadShippingMethodQuery.ts +29 -0
- package/src/query/types/index.ts +2 -0
- package/src/query/types/operations.ts +6 -0
- package/src/query/types/query.ts +39 -0
- package/src/util/index.ts +3 -0
- package/src/util/unrefOptions.ts +19 -0
- package/src/util/useOptimistic.ts +49 -0
- package/tsconfig.json +5 -2
- package/dist/cart/useCartAddItemMutation.d.ts +0 -12
- package/dist/cart/useCartQueryOptions.d.ts +0 -9
- package/dist/cart/useCartRemoveItemMutation.d.ts +0 -7
- package/dist/cart/useCartUpdateItemMutation.d.ts +0 -12
- package/dist/context/useContextOptions.d.ts +0 -9
- package/dist/context/useContextUpdate.d.ts +0 -4
- package/dist/products/useCategoryQueryOptions.d.ts +0 -17
- package/dist/products/useProductListingQueryOptions.d.ts +0 -19
- package/dist/products/useProductListingQueryOptions.test.d.ts +0 -1
- package/dist/products/useProductPrice.d.ts +0 -49
- package/dist/products/useProductQueryOptions.d.ts +0 -19
- package/dist/types/query.d.ts +0 -7
- package/src/cart/useCartAddItemMutation.ts +0 -48
- package/src/cart/useCartQueryOptions.ts +0 -19
- package/src/cart/useCartRemoveItemMutation.ts +0 -32
- package/src/cart/useCartUpdateItemMutation.ts +0 -48
- package/src/context/useContextOptions.ts +0 -16
- package/src/context/useContextUpdate.ts +0 -16
- package/src/products/useCategoryQueryOptions.ts +0 -25
- package/src/products/useProductListingQueryOptions.test.ts +0 -24
- package/src/products/useProductListingQueryOptions.ts +0 -29
- package/src/products/useProductQueryOptions.ts +0 -29
- package/src/types/query.ts +0 -18
- /package/src/{usePagination.ts → helpers/general/usePagination.ts} +0 -0
- /package/src/{general → helpers/general}/useSeoUrl.ts +0 -0
- /package/src/{products → helpers/product}/useProductVariantForOptions.ts +0 -0
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { UseMutationReturnType, MutationObserverIdleResult, MutationObserverLoadingResult, MutationObserverErrorResult, MutationObserverSuccessResult, UseQueryReturnType } from '@tanstack/vue-query';
|
|
2
|
+
import { components, GenericRecord } from '../../../api-types/storeApiTypes';
|
|
3
|
+
import { ComputedRef } from 'vue';
|
|
4
|
+
export declare function useShippingMethods(): {
|
|
5
|
+
contextUpdateMutation: UseMutationReturnType<{
|
|
6
|
+
redirectUrl?: string;
|
|
7
|
+
}, unknown, {
|
|
8
|
+
billingAddressId?: string;
|
|
9
|
+
countryId?: string;
|
|
10
|
+
countryStateId?: string;
|
|
11
|
+
currencyId?: string;
|
|
12
|
+
languageId?: string;
|
|
13
|
+
paymentMethodId?: string;
|
|
14
|
+
shippingAddressId?: string;
|
|
15
|
+
shippingMethodId?: string;
|
|
16
|
+
}, unknown, Omit< MutationObserverIdleResult<{
|
|
17
|
+
redirectUrl?: string;
|
|
18
|
+
}, unknown, {
|
|
19
|
+
billingAddressId?: string;
|
|
20
|
+
countryId?: string;
|
|
21
|
+
countryStateId?: string;
|
|
22
|
+
currencyId?: string;
|
|
23
|
+
languageId?: string;
|
|
24
|
+
paymentMethodId?: string;
|
|
25
|
+
shippingAddressId?: string;
|
|
26
|
+
shippingMethodId?: string;
|
|
27
|
+
}, unknown>, "mutate" | "reset"> | Omit< MutationObserverLoadingResult<{
|
|
28
|
+
redirectUrl?: string;
|
|
29
|
+
}, unknown, {
|
|
30
|
+
billingAddressId?: string;
|
|
31
|
+
countryId?: string;
|
|
32
|
+
countryStateId?: string;
|
|
33
|
+
currencyId?: string;
|
|
34
|
+
languageId?: string;
|
|
35
|
+
paymentMethodId?: string;
|
|
36
|
+
shippingAddressId?: string;
|
|
37
|
+
shippingMethodId?: string;
|
|
38
|
+
}, unknown>, "mutate" | "reset"> | Omit< MutationObserverErrorResult<{
|
|
39
|
+
redirectUrl?: string;
|
|
40
|
+
}, unknown, {
|
|
41
|
+
billingAddressId?: string;
|
|
42
|
+
countryId?: string;
|
|
43
|
+
countryStateId?: string;
|
|
44
|
+
currencyId?: string;
|
|
45
|
+
languageId?: string;
|
|
46
|
+
paymentMethodId?: string;
|
|
47
|
+
shippingAddressId?: string;
|
|
48
|
+
shippingMethodId?: string;
|
|
49
|
+
}, unknown>, "mutate" | "reset"> | Omit< MutationObserverSuccessResult<{
|
|
50
|
+
redirectUrl?: string;
|
|
51
|
+
}, unknown, {
|
|
52
|
+
billingAddressId?: string;
|
|
53
|
+
countryId?: string;
|
|
54
|
+
countryStateId?: string;
|
|
55
|
+
currencyId?: string;
|
|
56
|
+
languageId?: string;
|
|
57
|
+
paymentMethodId?: string;
|
|
58
|
+
shippingAddressId?: string;
|
|
59
|
+
shippingMethodId?: string;
|
|
60
|
+
}, unknown>, "mutate" | "reset">>;
|
|
61
|
+
contextQuery: UseQueryReturnType<{
|
|
62
|
+
apiAlias: "sales_channel_context";
|
|
63
|
+
context?: {
|
|
64
|
+
currencyFactor?: number;
|
|
65
|
+
currencyId?: string;
|
|
66
|
+
currencyPrecision?: number;
|
|
67
|
+
languageIdChain?: string[];
|
|
68
|
+
scope?: string;
|
|
69
|
+
source?: string;
|
|
70
|
+
taxState?: string;
|
|
71
|
+
useCache?: boolean;
|
|
72
|
+
versionId?: string;
|
|
73
|
+
};
|
|
74
|
+
currency?: components["schemas"]["Currency"];
|
|
75
|
+
currentCustomerGroup?: {
|
|
76
|
+
displayGross?: boolean;
|
|
77
|
+
name?: string;
|
|
78
|
+
};
|
|
79
|
+
customer?: components["schemas"]["Customer"];
|
|
80
|
+
fallbackCustomerGroup?: {
|
|
81
|
+
displayGross?: boolean;
|
|
82
|
+
name?: string;
|
|
83
|
+
};
|
|
84
|
+
paymentMethod?: components["schemas"]["PaymentMethod"];
|
|
85
|
+
salesChannel: components["schemas"]["SalesChannel"];
|
|
86
|
+
shippingLocation?: {
|
|
87
|
+
address?: components["schemas"]["CustomerAddress"];
|
|
88
|
+
apiAlias?: "cart_delivery_shipping_location";
|
|
89
|
+
country?: components["schemas"]["Country"];
|
|
90
|
+
};
|
|
91
|
+
shippingMethod?: components["schemas"]["ShippingMethod"];
|
|
92
|
+
taxRules?: {
|
|
93
|
+
name?: string;
|
|
94
|
+
taxRate?: number;
|
|
95
|
+
}[];
|
|
96
|
+
token?: string;
|
|
97
|
+
}, Error>;
|
|
98
|
+
shippingMethodsQuery: UseQueryReturnType<{
|
|
99
|
+
aggregations?: GenericRecord;
|
|
100
|
+
elements: components["schemas"]["ShippingMethod"][];
|
|
101
|
+
total?: number;
|
|
102
|
+
} & {
|
|
103
|
+
aggregations?: GenericRecord[];
|
|
104
|
+
entity?: string;
|
|
105
|
+
limit?: number;
|
|
106
|
+
page?: number;
|
|
107
|
+
total?: number;
|
|
108
|
+
}, Error>;
|
|
109
|
+
activeShippingMethod: ComputedRef<{
|
|
110
|
+
active?: boolean;
|
|
111
|
+
availabilityRule?: components["schemas"]["Rule"];
|
|
112
|
+
readonly createdAt?: string;
|
|
113
|
+
customFields?: GenericRecord;
|
|
114
|
+
deliveryTime?: components["schemas"]["DeliveryTime"];
|
|
115
|
+
deliveryTimeId: string;
|
|
116
|
+
description?: string;
|
|
117
|
+
id: string;
|
|
118
|
+
media?: components["schemas"]["Media"];
|
|
119
|
+
mediaId?: string;
|
|
120
|
+
name: string;
|
|
121
|
+
position?: number;
|
|
122
|
+
prices?: components["schemas"]["ShippingMethodPrice"][];
|
|
123
|
+
tags?: components["schemas"]["Tag"][];
|
|
124
|
+
tax?: components["schemas"]["Tax"];
|
|
125
|
+
taxType?: string;
|
|
126
|
+
technicalName: string;
|
|
127
|
+
trackingUrl?: string;
|
|
128
|
+
translated: {
|
|
129
|
+
deliveryTimeId: string;
|
|
130
|
+
description: string;
|
|
131
|
+
mediaId: string;
|
|
132
|
+
name: string;
|
|
133
|
+
taxType: string;
|
|
134
|
+
technicalName: string;
|
|
135
|
+
trackingUrl: string;
|
|
136
|
+
};
|
|
137
|
+
readonly updatedAt?: string;
|
|
138
|
+
} | undefined>;
|
|
139
|
+
setShippingMethod: (shippingMethodId: string) => Promise<{
|
|
140
|
+
redirectUrl?: string;
|
|
141
|
+
}>;
|
|
142
|
+
isSaving: ComputedRef<boolean>;
|
|
143
|
+
shippingMethods: ComputedRef<{
|
|
144
|
+
active?: boolean;
|
|
145
|
+
availabilityRule?: components["schemas"]["Rule"];
|
|
146
|
+
readonly createdAt?: string;
|
|
147
|
+
customFields?: GenericRecord;
|
|
148
|
+
deliveryTime?: components["schemas"]["DeliveryTime"];
|
|
149
|
+
deliveryTimeId: string;
|
|
150
|
+
description?: string;
|
|
151
|
+
id: string;
|
|
152
|
+
media?: components["schemas"]["Media"];
|
|
153
|
+
mediaId?: string;
|
|
154
|
+
name: string;
|
|
155
|
+
position?: number;
|
|
156
|
+
prices?: components["schemas"]["ShippingMethodPrice"][];
|
|
157
|
+
tags?: components["schemas"]["Tag"][];
|
|
158
|
+
tax?: components["schemas"]["Tax"];
|
|
159
|
+
taxType?: string;
|
|
160
|
+
technicalName: string;
|
|
161
|
+
trackingUrl?: string;
|
|
162
|
+
translated: {
|
|
163
|
+
deliveryTimeId: string;
|
|
164
|
+
description: string;
|
|
165
|
+
mediaId: string;
|
|
166
|
+
name: string;
|
|
167
|
+
taxType: string;
|
|
168
|
+
technicalName: string;
|
|
169
|
+
trackingUrl: string;
|
|
170
|
+
};
|
|
171
|
+
readonly updatedAt?: string;
|
|
172
|
+
}[] | undefined>;
|
|
173
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { Schemas, components } from '../../../api-types/storeApiTypes.d.ts';
|
|
2
|
+
import { ComputedRef, Ref } from 'vue';
|
|
3
|
+
import { TierPrice } from '@shopware/helpers';
|
|
4
|
+
/**
|
|
5
|
+
* The purpose of the `useProductPrice` function is to abstract the logic
|
|
6
|
+
* to expose most useful helpers for price displaying.
|
|
7
|
+
*
|
|
8
|
+
* @public
|
|
9
|
+
* @category Product
|
|
10
|
+
*/
|
|
11
|
+
export declare function useProductPrice(product: Ref<Schemas['Product'] | undefined>): {
|
|
12
|
+
price: ComputedRef<{
|
|
13
|
+
apiAlias: "calculated_price";
|
|
14
|
+
calculatedTaxes: {
|
|
15
|
+
apiAlias: "cart_tax_calculated";
|
|
16
|
+
price: number;
|
|
17
|
+
tax: number;
|
|
18
|
+
taxRate: number;
|
|
19
|
+
}[];
|
|
20
|
+
hasRange: boolean;
|
|
21
|
+
listPrice: components["schemas"]["CartListPrice"] | null;
|
|
22
|
+
netPrice: number;
|
|
23
|
+
positionPrice: number;
|
|
24
|
+
quantity: number;
|
|
25
|
+
rawTotal: number;
|
|
26
|
+
referencePrice: components["schemas"]["CartPriceReference"] | null;
|
|
27
|
+
regulationPrice: {
|
|
28
|
+
apiAlias?: "cart_regulation_price";
|
|
29
|
+
price?: number;
|
|
30
|
+
} | null;
|
|
31
|
+
taxRules: {
|
|
32
|
+
name?: string;
|
|
33
|
+
taxRate?: number;
|
|
34
|
+
}[];
|
|
35
|
+
taxStatus: "net" | "tax-free";
|
|
36
|
+
totalPrice: number;
|
|
37
|
+
unitPrice: number;
|
|
38
|
+
variantId?: string | null;
|
|
39
|
+
} | undefined>;
|
|
40
|
+
totalPrice: ComputedRef<number | undefined>;
|
|
41
|
+
unitPrice: ComputedRef<number | undefined>;
|
|
42
|
+
displayFromVariants: ComputedRef<number | false | undefined>;
|
|
43
|
+
displayFrom: ComputedRef<boolean>;
|
|
44
|
+
tierPrices: ComputedRef< TierPrice[]>;
|
|
45
|
+
referencePrice: ComputedRef<{
|
|
46
|
+
apiAlias: "cart_price_reference";
|
|
47
|
+
hasRange: boolean;
|
|
48
|
+
listPrice: components["schemas"]["CartListPrice"] | null;
|
|
49
|
+
price?: number;
|
|
50
|
+
purchaseUnit?: number;
|
|
51
|
+
referenceUnit?: number;
|
|
52
|
+
regulationPrice: {
|
|
53
|
+
apiAlias?: "cart_regulation_price";
|
|
54
|
+
price?: number;
|
|
55
|
+
} | null;
|
|
56
|
+
unitName: string;
|
|
57
|
+
variantId?: string | null;
|
|
58
|
+
} | null | undefined>;
|
|
59
|
+
isListPrice: ComputedRef<boolean>;
|
|
60
|
+
regulationPrice: ComputedRef<number | undefined>;
|
|
61
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Schemas, components, GenericRecord } from '
|
|
1
|
+
import { Schemas, components, GenericRecord } from '../../../api-types/storeApiTypes.d.ts';
|
|
2
2
|
import { MaybeRef, ComputedRef } from 'vue';
|
|
3
3
|
type DetailProduct<S extends Schemas> = S['CustomProductDetailResponse']['product'];
|
|
4
4
|
export declare function getProductVariantForOptions<S extends Schemas>(product: DetailProduct<S>, optionIds: string[]): {
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { Schemas } from '../../query/types';
|
|
2
|
+
import { ComputedRef } from 'vue';
|
|
3
|
+
import { components, GenericRecord } from '../../../api-types/storeApiTypes';
|
|
4
|
+
import { UseQueryReturnType } from '@tanstack/vue-query';
|
|
5
|
+
export declare function useUser(criteria?: Schemas['Criteria']): {
|
|
6
|
+
user: ComputedRef<({
|
|
7
|
+
active?: boolean;
|
|
8
|
+
activeBillingAddress: components["schemas"]["CustomerAddress"];
|
|
9
|
+
activeShippingAddress: components["schemas"]["CustomerAddress"];
|
|
10
|
+
addresses?: components["schemas"]["CustomerAddress"][];
|
|
11
|
+
affiliateCode?: string;
|
|
12
|
+
apiAlias: "customer";
|
|
13
|
+
birthday?: string;
|
|
14
|
+
campaignCode?: string;
|
|
15
|
+
readonly createdAt?: string;
|
|
16
|
+
createdById?: string;
|
|
17
|
+
customerNumber: string;
|
|
18
|
+
customFields?: GenericRecord;
|
|
19
|
+
defaultBillingAddress?: components["schemas"]["CustomerAddress"];
|
|
20
|
+
defaultBillingAddressId: string;
|
|
21
|
+
defaultShippingAddress?: components["schemas"]["CustomerAddress"];
|
|
22
|
+
defaultShippingAddressId: string;
|
|
23
|
+
doubleOptInConfirmDate?: string;
|
|
24
|
+
doubleOptInEmailSentDate?: string;
|
|
25
|
+
doubleOptInRegistration?: boolean;
|
|
26
|
+
email: string;
|
|
27
|
+
firstLogin?: string;
|
|
28
|
+
firstName: string;
|
|
29
|
+
group?: components["schemas"]["CustomerGroup"];
|
|
30
|
+
groupId: string;
|
|
31
|
+
guest?: boolean;
|
|
32
|
+
hash?: string;
|
|
33
|
+
id: string;
|
|
34
|
+
language?: components["schemas"]["Language"];
|
|
35
|
+
languageId: string;
|
|
36
|
+
lastLogin?: string;
|
|
37
|
+
lastName: string;
|
|
38
|
+
readonly lastOrderDate?: string;
|
|
39
|
+
lastPaymentMethod?: components["schemas"]["PaymentMethod"];
|
|
40
|
+
lastPaymentMethodId?: string;
|
|
41
|
+
readonly orderCount?: number;
|
|
42
|
+
readonly orderTotalAmount?: number;
|
|
43
|
+
readonly reviewCount?: number;
|
|
44
|
+
salesChannelId: string;
|
|
45
|
+
salutation?: components["schemas"]["Salutation"];
|
|
46
|
+
salutationId?: string;
|
|
47
|
+
readonly tagIds?: string[];
|
|
48
|
+
tags?: components["schemas"]["Tag"][];
|
|
49
|
+
title?: string;
|
|
50
|
+
readonly updatedAt?: string;
|
|
51
|
+
updatedById?: string;
|
|
52
|
+
} & ({
|
|
53
|
+
accountType: "private";
|
|
54
|
+
} | {
|
|
55
|
+
accountType: "business";
|
|
56
|
+
company: string;
|
|
57
|
+
vatIds: [string, ...string[]];
|
|
58
|
+
})) | undefined>;
|
|
59
|
+
isLoggedIn: ComputedRef<boolean>;
|
|
60
|
+
isCustomerSession: ComputedRef<boolean>;
|
|
61
|
+
isGuestSession: ComputedRef<boolean>;
|
|
62
|
+
defaultBillingAddressId: ComputedRef<string | null>;
|
|
63
|
+
defaultShippingAddressId: ComputedRef<string | null>;
|
|
64
|
+
userDefaultBillingAddress: ComputedRef<{
|
|
65
|
+
additionalAddressLine1?: string;
|
|
66
|
+
additionalAddressLine2?: string;
|
|
67
|
+
city: string;
|
|
68
|
+
company?: string;
|
|
69
|
+
country?: components["schemas"]["Country"];
|
|
70
|
+
countryId: string;
|
|
71
|
+
countryState?: components["schemas"]["CountryState"];
|
|
72
|
+
countryStateId?: string;
|
|
73
|
+
readonly createdAt?: string;
|
|
74
|
+
customerId: string;
|
|
75
|
+
customFields?: GenericRecord;
|
|
76
|
+
department?: string;
|
|
77
|
+
firstName: string;
|
|
78
|
+
hash?: string;
|
|
79
|
+
id: string;
|
|
80
|
+
lastName: string;
|
|
81
|
+
phoneNumber?: string;
|
|
82
|
+
salutation?: components["schemas"]["Salutation"];
|
|
83
|
+
salutationId?: string;
|
|
84
|
+
street: string;
|
|
85
|
+
title?: string;
|
|
86
|
+
readonly updatedAt?: string;
|
|
87
|
+
zipcode?: string;
|
|
88
|
+
} | null>;
|
|
89
|
+
userDefaultShippingAddress: ComputedRef<{
|
|
90
|
+
additionalAddressLine1?: string;
|
|
91
|
+
additionalAddressLine2?: string;
|
|
92
|
+
city: string;
|
|
93
|
+
company?: string;
|
|
94
|
+
country?: components["schemas"]["Country"];
|
|
95
|
+
countryId: string;
|
|
96
|
+
countryState?: components["schemas"]["CountryState"];
|
|
97
|
+
countryStateId?: string;
|
|
98
|
+
readonly createdAt?: string;
|
|
99
|
+
customerId: string;
|
|
100
|
+
customFields?: GenericRecord;
|
|
101
|
+
department?: string;
|
|
102
|
+
firstName: string;
|
|
103
|
+
hash?: string;
|
|
104
|
+
id: string;
|
|
105
|
+
lastName: string;
|
|
106
|
+
phoneNumber?: string;
|
|
107
|
+
salutation?: components["schemas"]["Salutation"];
|
|
108
|
+
salutationId?: string;
|
|
109
|
+
street: string;
|
|
110
|
+
title?: string;
|
|
111
|
+
readonly updatedAt?: string;
|
|
112
|
+
zipcode?: string;
|
|
113
|
+
} | null>;
|
|
114
|
+
customerQuery: UseQueryReturnType<{
|
|
115
|
+
active?: boolean;
|
|
116
|
+
activeBillingAddress: components["schemas"]["CustomerAddress"];
|
|
117
|
+
activeShippingAddress: components["schemas"]["CustomerAddress"];
|
|
118
|
+
addresses?: components["schemas"]["CustomerAddress"][];
|
|
119
|
+
affiliateCode?: string;
|
|
120
|
+
apiAlias: "customer";
|
|
121
|
+
birthday?: string;
|
|
122
|
+
campaignCode?: string;
|
|
123
|
+
readonly createdAt?: string;
|
|
124
|
+
createdById?: string;
|
|
125
|
+
customerNumber: string;
|
|
126
|
+
customFields?: GenericRecord;
|
|
127
|
+
defaultBillingAddress?: components["schemas"]["CustomerAddress"];
|
|
128
|
+
defaultBillingAddressId: string;
|
|
129
|
+
defaultShippingAddress?: components["schemas"]["CustomerAddress"];
|
|
130
|
+
defaultShippingAddressId: string;
|
|
131
|
+
doubleOptInConfirmDate?: string;
|
|
132
|
+
doubleOptInEmailSentDate?: string;
|
|
133
|
+
doubleOptInRegistration?: boolean;
|
|
134
|
+
email: string;
|
|
135
|
+
firstLogin?: string;
|
|
136
|
+
firstName: string;
|
|
137
|
+
group?: components["schemas"]["CustomerGroup"];
|
|
138
|
+
groupId: string;
|
|
139
|
+
guest?: boolean;
|
|
140
|
+
hash?: string;
|
|
141
|
+
id: string;
|
|
142
|
+
language?: components["schemas"]["Language"];
|
|
143
|
+
languageId: string;
|
|
144
|
+
lastLogin?: string;
|
|
145
|
+
lastName: string;
|
|
146
|
+
readonly lastOrderDate?: string;
|
|
147
|
+
lastPaymentMethod?: components["schemas"]["PaymentMethod"];
|
|
148
|
+
lastPaymentMethodId?: string;
|
|
149
|
+
readonly orderCount?: number;
|
|
150
|
+
readonly orderTotalAmount?: number;
|
|
151
|
+
readonly reviewCount?: number;
|
|
152
|
+
salesChannelId: string;
|
|
153
|
+
salutation?: components["schemas"]["Salutation"];
|
|
154
|
+
salutationId?: string;
|
|
155
|
+
readonly tagIds?: string[];
|
|
156
|
+
tags?: components["schemas"]["Tag"][];
|
|
157
|
+
title?: string;
|
|
158
|
+
readonly updatedAt?: string;
|
|
159
|
+
updatedById?: string;
|
|
160
|
+
} & ({
|
|
161
|
+
accountType: "private";
|
|
162
|
+
} | {
|
|
163
|
+
accountType: "business";
|
|
164
|
+
company: string;
|
|
165
|
+
vatIds: [string, ...string[]];
|
|
166
|
+
}), Error>;
|
|
167
|
+
};
|