@teamnovu/kit-shopware-composables 0.0.5 → 0.0.6
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/global.d.ts +8 -0
- package/dist/helpers/checkout/useAddresses.d.ts +9 -51
- package/dist/helpers/checkout/useOrderDetails.d.ts +3 -8
- package/dist/helpers/checkout/usePaymentMethods.d.ts +11 -49
- package/dist/helpers/checkout/useShippingMethods.d.ts +11 -55
- package/dist/helpers/general/usePagination.d.ts +3 -1
- package/dist/helpers/user/useIsLoggedIn.d.ts +3 -2
- package/dist/helpers/user/useUser.d.ts +4 -106
- package/dist/index.mjs +810 -640
- package/dist/keys.d.ts +42 -1
- package/dist/query/address/index.d.ts +1 -0
- package/dist/query/address/useCreateCustomerAddressMutation.d.ts +7 -6
- package/dist/query/address/useDeleteCustomerAddressMutation.d.ts +2 -1
- package/dist/query/address/useListAddressQuery.d.ts +5 -36
- package/dist/query/address/useUpdateCustomerAddressMutation.d.ts +167 -0
- package/dist/query/cart/useAddLineItemMutation.d.ts +7 -6
- package/dist/query/cart/useReadCartQuery.d.ts +5 -100
- package/dist/query/cart/useRemoveLineItemMutation.d.ts +7 -6
- package/dist/query/cart/useUpdateLineItemMutation.d.ts +7 -6
- package/dist/query/checkout/useCreateOrderMutation.d.ts +7 -6
- package/dist/query/context/useReadContextQuery.d.ts +8 -148
- package/dist/query/context/useUpdateContextMutation.d.ts +7 -6
- package/dist/query/country/index.d.ts +1 -0
- package/dist/query/country/useReadCountryQuery.d.ts +17 -0
- package/dist/query/customer/useChangeEmailMutation.d.ts +7 -6
- package/dist/query/customer/useChangeProfileMutation.d.ts +7 -6
- package/dist/query/customer/useLoginCustomerMutation.d.ts +7 -6
- package/dist/query/customer/useLogoutCustomerMutation.d.ts +7 -6
- package/dist/query/customer/useReadCustomerQuery.d.ts +10 -213
- package/dist/query/customer/useRegisterCustomerMutation.d.ts +7 -6
- package/dist/query/index.d.ts +4 -0
- package/dist/query/navigation/index.d.ts +1 -0
- package/dist/query/navigation/useReadNavigationQuery.d.ts +22 -0
- package/dist/query/order/useReadOrderQuery.d.ts +5 -32
- package/dist/query/payment/useHandlePaymentMutation.d.ts +7 -6
- package/dist/query/payment/useOrderSetPaymentMutation.d.ts +7 -6
- package/dist/query/payment/useReadPaymentMethodQuery.d.ts +5 -20
- package/dist/query/products/useReadCategoryListQuery.d.ts +5 -36
- package/dist/query/products/useReadCompactProductListingQuery.d.ts +5 -20
- package/dist/query/products/useReadCustomProductDetailQuery.d.ts +5 -52
- package/dist/query/salutation/index.d.ts +1 -0
- package/dist/query/salutation/useReadSalutationQuery.d.ts +17 -0
- package/dist/query/seoUrl/index.d.ts +1 -0
- package/dist/query/seoUrl/useReadSeoUrlQuery.d.ts +17 -0
- package/dist/query/shipping/useReadShippingMethodQuery.d.ts +5 -44
- package/dist/query/types/index.d.ts +1 -0
- package/dist/query/types/operations.d.ts +3 -3
- package/dist/query/types/query.d.ts +2 -3
- package/dist/query/types/util.d.ts +6 -0
- package/dist/util/unrefOptions.d.ts +2 -2
- package/package.json +6 -4
- package/src/global.d.ts +8 -0
- package/src/helpers/checkout/useAddresses.ts +1 -1
- package/src/helpers/checkout/useOrderDetails.ts +1 -1
- package/src/helpers/checkout/useOrderPayment.ts +1 -1
- package/src/helpers/checkout/usePaymentMethods.ts +5 -2
- package/src/helpers/checkout/useShippingMethods.ts +5 -2
- package/src/helpers/general/usePagination.ts +10 -5
- package/src/helpers/user/useIsLoggedIn.ts +6 -8
- package/src/helpers/user/useUser.ts +1 -1
- package/src/inject.ts +1 -1
- package/src/keys.ts +66 -1
- package/src/query/address/index.ts +1 -0
- package/src/query/address/useCreateCustomerAddressMutation.ts +7 -6
- package/src/query/address/useDeleteCustomerAddressMutation.ts +7 -6
- package/src/query/address/useUpdateCustomerAddressMutation.ts +42 -0
- package/src/query/cart/useAddLineItemMutation.ts +7 -6
- package/src/query/cart/useRemoveLineItemMutation.ts +6 -5
- package/src/query/cart/useUpdateLineItemMutation.ts +5 -4
- package/src/query/checkout/useCreateOrderMutation.ts +11 -8
- package/src/query/context/useReadContextQuery.ts +14 -5
- package/src/query/context/useUpdateContextMutation.ts +6 -5
- package/src/query/country/index.ts +1 -0
- package/src/query/country/useReadCountryQuery.ts +31 -0
- package/src/query/customer/useChangeEmailMutation.ts +7 -7
- package/src/query/customer/useChangeProfileMutation.ts +7 -7
- package/src/query/customer/useLoginCustomerMutation.ts +12 -9
- package/src/query/customer/useLogoutCustomerMutation.ts +11 -7
- package/src/query/customer/useReadCustomerQuery.ts +2 -1
- package/src/query/customer/useRegisterCustomerMutation.ts +7 -7
- package/src/query/index.ts +4 -0
- package/src/query/navigation/index.ts +1 -0
- package/src/query/navigation/useReadNavigationQuery.ts +43 -0
- package/src/query/order/useReadOrderQuery.ts +0 -2
- package/src/query/payment/useHandlePaymentMutation.ts +5 -4
- package/src/query/payment/useOrderSetPaymentMutation.ts +6 -5
- package/src/query/salutation/index.ts +1 -0
- package/src/query/salutation/useReadSalutationQuery.ts +31 -0
- package/src/query/seoUrl/index.ts +1 -0
- package/src/query/seoUrl/useReadSeoUrlQuery.ts +31 -0
- package/src/query/types/index.ts +1 -0
- package/src/query/types/operations.ts +5 -5
- package/src/query/types/query.ts +4 -6
- package/src/query/types/util.ts +19 -0
- package/src/util/unrefOptions.ts +4 -4
- package/src/util/useOptimistic.ts +2 -1
- package/tsconfig.json +4 -2
- package/vite.config.js +6 -1
package/dist/global.d.ts
ADDED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { Schemas, components, GenericRecord } from '../../../api-types/storeApiTypes.d.ts';
|
|
2
2
|
import { UseMutationReturnType, MutationObserverIdleResult, MutationObserverLoadingResult, MutationObserverErrorResult, MutationObserverSuccessResult, UseQueryReturnType } from '@tanstack/vue-query';
|
|
3
|
+
import { ShopwareApiError, BrandedResponse } from '@teamnovu/kit-shopware-api-client';
|
|
4
|
+
import { Operations } from '../..';
|
|
3
5
|
import { ComputedRef } from 'vue';
|
|
4
6
|
export declare function useCheckoutAddresses(): {
|
|
5
7
|
contextUpdateMutation: UseMutationReturnType<{
|
|
6
8
|
redirectUrl?: string;
|
|
7
|
-
},
|
|
9
|
+
}, Error | ShopwareApiError, {
|
|
8
10
|
billingAddressId?: string;
|
|
9
11
|
countryId?: string;
|
|
10
12
|
countryStateId?: string;
|
|
@@ -15,7 +17,7 @@ export declare function useCheckoutAddresses(): {
|
|
|
15
17
|
shippingMethodId?: string;
|
|
16
18
|
}, unknown, Omit< MutationObserverIdleResult<{
|
|
17
19
|
redirectUrl?: string;
|
|
18
|
-
},
|
|
20
|
+
}, Error | ShopwareApiError, {
|
|
19
21
|
billingAddressId?: string;
|
|
20
22
|
countryId?: string;
|
|
21
23
|
countryStateId?: string;
|
|
@@ -26,7 +28,7 @@ export declare function useCheckoutAddresses(): {
|
|
|
26
28
|
shippingMethodId?: string;
|
|
27
29
|
}, unknown>, "mutate" | "reset"> | Omit< MutationObserverLoadingResult<{
|
|
28
30
|
redirectUrl?: string;
|
|
29
|
-
},
|
|
31
|
+
}, Error | ShopwareApiError, {
|
|
30
32
|
billingAddressId?: string;
|
|
31
33
|
countryId?: string;
|
|
32
34
|
countryStateId?: string;
|
|
@@ -37,7 +39,7 @@ export declare function useCheckoutAddresses(): {
|
|
|
37
39
|
shippingMethodId?: string;
|
|
38
40
|
}, unknown>, "mutate" | "reset"> | Omit< MutationObserverErrorResult<{
|
|
39
41
|
redirectUrl?: string;
|
|
40
|
-
},
|
|
42
|
+
}, Error | ShopwareApiError, {
|
|
41
43
|
billingAddressId?: string;
|
|
42
44
|
countryId?: string;
|
|
43
45
|
countryStateId?: string;
|
|
@@ -48,7 +50,7 @@ export declare function useCheckoutAddresses(): {
|
|
|
48
50
|
shippingMethodId?: string;
|
|
49
51
|
}, unknown>, "mutate" | "reset"> | Omit< MutationObserverSuccessResult<{
|
|
50
52
|
redirectUrl?: string;
|
|
51
|
-
},
|
|
53
|
+
}, Error | ShopwareApiError, {
|
|
52
54
|
billingAddressId?: string;
|
|
53
55
|
countryId?: string;
|
|
54
56
|
countryStateId?: string;
|
|
@@ -58,52 +60,8 @@ export declare function useCheckoutAddresses(): {
|
|
|
58
60
|
shippingAddressId?: string;
|
|
59
61
|
shippingMethodId?: string;
|
|
60
62
|
}, unknown>, "mutate" | "reset">>;
|
|
61
|
-
contextQuery: UseQueryReturnType<
|
|
62
|
-
|
|
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
|
-
addressListQuery: UseQueryReturnType<{
|
|
99
|
-
elements: components["schemas"]["CustomerAddress"][];
|
|
100
|
-
} & {
|
|
101
|
-
aggregations?: GenericRecord[];
|
|
102
|
-
entity?: string;
|
|
103
|
-
limit?: number;
|
|
104
|
-
page?: number;
|
|
105
|
-
total?: number;
|
|
106
|
-
}, Error>;
|
|
63
|
+
contextQuery: UseQueryReturnType<BrandedResponse<Operations, "readContext get /context">, Error>;
|
|
64
|
+
addressListQuery: UseQueryReturnType<BrandedResponse<Operations, "listAddress post /account/list-address">, Error>;
|
|
107
65
|
setBillingAddress: (address: Schemas["CustomerAddress"]) => Promise<void>;
|
|
108
66
|
setShippingAddress: (address: Schemas["CustomerAddress"]) => Promise<void>;
|
|
109
67
|
isSaving: ComputedRef<boolean>;
|
|
@@ -2,6 +2,8 @@ import { MaybeRef, ComputedRef } from 'vue';
|
|
|
2
2
|
import { Schemas } from '../../query/types';
|
|
3
3
|
import { components, GenericRecord } from '../../../api-types/storeApiTypes';
|
|
4
4
|
import { UseQueryReturnType } from '@tanstack/vue-query';
|
|
5
|
+
import { BrandedResponse } from '@teamnovu/kit-shopware-api-client';
|
|
6
|
+
import { Operations } from '../..';
|
|
5
7
|
export declare function useOrderDetails(orderId: MaybeRef<string>, criteria?: Schemas['Criteria']): {
|
|
6
8
|
order: ComputedRef<{
|
|
7
9
|
addresses?: components["schemas"]["OrderAddress"][];
|
|
@@ -174,12 +176,5 @@ export declare function useOrderDetails(orderId: MaybeRef<string>, criteria?: Sc
|
|
|
174
176
|
readonly updatedAt?: string;
|
|
175
177
|
} | undefined>;
|
|
176
178
|
paymentChangeable: ComputedRef<boolean>;
|
|
177
|
-
orderQuery: UseQueryReturnType<
|
|
178
|
-
orders: {
|
|
179
|
-
elements: components["schemas"]["Order"][];
|
|
180
|
-
} & components["schemas"]["EntitySearchResult"];
|
|
181
|
-
paymentChangeable?: {
|
|
182
|
-
[key: string]: boolean;
|
|
183
|
-
};
|
|
184
|
-
}, Error>;
|
|
179
|
+
orderQuery: UseQueryReturnType<BrandedResponse<Operations, "readOrder post /order">, Error>;
|
|
185
180
|
};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { UseMutationReturnType, MutationObserverIdleResult, MutationObserverLoadingResult, MutationObserverErrorResult, MutationObserverSuccessResult, UseQueryReturnType } from '@tanstack/vue-query';
|
|
2
|
-
import {
|
|
2
|
+
import { ShopwareApiError, BrandedResponse } from '@teamnovu/kit-shopware-api-client';
|
|
3
|
+
import { Operations } from '../..';
|
|
3
4
|
import { ComputedRef } from 'vue';
|
|
5
|
+
import { GenericRecord, components } from '../../../api-types/storeApiTypes';
|
|
4
6
|
export declare function usePaymentMethods(): {
|
|
5
7
|
contextUpdateMutation: UseMutationReturnType<{
|
|
6
8
|
redirectUrl?: string;
|
|
7
|
-
},
|
|
9
|
+
}, Error | ShopwareApiError, {
|
|
8
10
|
billingAddressId?: string;
|
|
9
11
|
countryId?: string;
|
|
10
12
|
countryStateId?: string;
|
|
@@ -15,7 +17,7 @@ export declare function usePaymentMethods(): {
|
|
|
15
17
|
shippingMethodId?: string;
|
|
16
18
|
}, unknown, Omit< MutationObserverIdleResult<{
|
|
17
19
|
redirectUrl?: string;
|
|
18
|
-
},
|
|
20
|
+
}, Error | ShopwareApiError, {
|
|
19
21
|
billingAddressId?: string;
|
|
20
22
|
countryId?: string;
|
|
21
23
|
countryStateId?: string;
|
|
@@ -26,7 +28,7 @@ export declare function usePaymentMethods(): {
|
|
|
26
28
|
shippingMethodId?: string;
|
|
27
29
|
}, unknown>, "mutate" | "reset"> | Omit< MutationObserverLoadingResult<{
|
|
28
30
|
redirectUrl?: string;
|
|
29
|
-
},
|
|
31
|
+
}, Error | ShopwareApiError, {
|
|
30
32
|
billingAddressId?: string;
|
|
31
33
|
countryId?: string;
|
|
32
34
|
countryStateId?: string;
|
|
@@ -37,7 +39,7 @@ export declare function usePaymentMethods(): {
|
|
|
37
39
|
shippingMethodId?: string;
|
|
38
40
|
}, unknown>, "mutate" | "reset"> | Omit< MutationObserverErrorResult<{
|
|
39
41
|
redirectUrl?: string;
|
|
40
|
-
},
|
|
42
|
+
}, Error | ShopwareApiError, {
|
|
41
43
|
billingAddressId?: string;
|
|
42
44
|
countryId?: string;
|
|
43
45
|
countryStateId?: string;
|
|
@@ -48,7 +50,7 @@ export declare function usePaymentMethods(): {
|
|
|
48
50
|
shippingMethodId?: string;
|
|
49
51
|
}, unknown>, "mutate" | "reset"> | Omit< MutationObserverSuccessResult<{
|
|
50
52
|
redirectUrl?: string;
|
|
51
|
-
},
|
|
53
|
+
}, Error | ShopwareApiError, {
|
|
52
54
|
billingAddressId?: string;
|
|
53
55
|
countryId?: string;
|
|
54
56
|
countryStateId?: string;
|
|
@@ -58,48 +60,8 @@ export declare function usePaymentMethods(): {
|
|
|
58
60
|
shippingAddressId?: string;
|
|
59
61
|
shippingMethodId?: string;
|
|
60
62
|
}, unknown>, "mutate" | "reset">>;
|
|
61
|
-
contextQuery: UseQueryReturnType<
|
|
62
|
-
|
|
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
|
-
paymentMethodsQuery: UseQueryReturnType<{
|
|
99
|
-
aggregations?: GenericRecord;
|
|
100
|
-
elements?: components["schemas"]["PaymentMethod"][];
|
|
101
|
-
total?: number;
|
|
102
|
-
}, Error>;
|
|
63
|
+
contextQuery: UseQueryReturnType<BrandedResponse<Operations, "readContext get /context">, Error>;
|
|
64
|
+
paymentMethodsQuery: UseQueryReturnType<BrandedResponse<Operations, "readPaymentMethod post /payment-method">, Error>;
|
|
103
65
|
activePaymentMethod: ComputedRef<{
|
|
104
66
|
active?: boolean;
|
|
105
67
|
afterOrderEnabled?: boolean;
|
|
@@ -151,5 +113,5 @@ export declare function usePaymentMethods(): {
|
|
|
151
113
|
technicalName: string;
|
|
152
114
|
};
|
|
153
115
|
readonly updatedAt?: string;
|
|
154
|
-
}[]
|
|
116
|
+
}[]>;
|
|
155
117
|
};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { UseMutationReturnType, MutationObserverIdleResult, MutationObserverLoadingResult, MutationObserverErrorResult, MutationObserverSuccessResult, UseQueryReturnType } from '@tanstack/vue-query';
|
|
2
|
-
import {
|
|
2
|
+
import { ShopwareApiError, BrandedResponse } from '@teamnovu/kit-shopware-api-client';
|
|
3
|
+
import { Operations } from '../..';
|
|
3
4
|
import { ComputedRef } from 'vue';
|
|
5
|
+
import { components, GenericRecord } from '../../../api-types/storeApiTypes';
|
|
4
6
|
export declare function useShippingMethods(): {
|
|
5
7
|
contextUpdateMutation: UseMutationReturnType<{
|
|
6
8
|
redirectUrl?: string;
|
|
7
|
-
},
|
|
9
|
+
}, Error | ShopwareApiError, {
|
|
8
10
|
billingAddressId?: string;
|
|
9
11
|
countryId?: string;
|
|
10
12
|
countryStateId?: string;
|
|
@@ -15,7 +17,7 @@ export declare function useShippingMethods(): {
|
|
|
15
17
|
shippingMethodId?: string;
|
|
16
18
|
}, unknown, Omit< MutationObserverIdleResult<{
|
|
17
19
|
redirectUrl?: string;
|
|
18
|
-
},
|
|
20
|
+
}, Error | ShopwareApiError, {
|
|
19
21
|
billingAddressId?: string;
|
|
20
22
|
countryId?: string;
|
|
21
23
|
countryStateId?: string;
|
|
@@ -26,7 +28,7 @@ export declare function useShippingMethods(): {
|
|
|
26
28
|
shippingMethodId?: string;
|
|
27
29
|
}, unknown>, "mutate" | "reset"> | Omit< MutationObserverLoadingResult<{
|
|
28
30
|
redirectUrl?: string;
|
|
29
|
-
},
|
|
31
|
+
}, Error | ShopwareApiError, {
|
|
30
32
|
billingAddressId?: string;
|
|
31
33
|
countryId?: string;
|
|
32
34
|
countryStateId?: string;
|
|
@@ -37,7 +39,7 @@ export declare function useShippingMethods(): {
|
|
|
37
39
|
shippingMethodId?: string;
|
|
38
40
|
}, unknown>, "mutate" | "reset"> | Omit< MutationObserverErrorResult<{
|
|
39
41
|
redirectUrl?: string;
|
|
40
|
-
},
|
|
42
|
+
}, Error | ShopwareApiError, {
|
|
41
43
|
billingAddressId?: string;
|
|
42
44
|
countryId?: string;
|
|
43
45
|
countryStateId?: string;
|
|
@@ -48,7 +50,7 @@ export declare function useShippingMethods(): {
|
|
|
48
50
|
shippingMethodId?: string;
|
|
49
51
|
}, unknown>, "mutate" | "reset"> | Omit< MutationObserverSuccessResult<{
|
|
50
52
|
redirectUrl?: string;
|
|
51
|
-
},
|
|
53
|
+
}, Error | ShopwareApiError, {
|
|
52
54
|
billingAddressId?: string;
|
|
53
55
|
countryId?: string;
|
|
54
56
|
countryStateId?: string;
|
|
@@ -58,54 +60,8 @@ export declare function useShippingMethods(): {
|
|
|
58
60
|
shippingAddressId?: string;
|
|
59
61
|
shippingMethodId?: string;
|
|
60
62
|
}, unknown>, "mutate" | "reset">>;
|
|
61
|
-
contextQuery: UseQueryReturnType<
|
|
62
|
-
|
|
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>;
|
|
63
|
+
contextQuery: UseQueryReturnType<BrandedResponse<Operations, "readContext get /context">, Error>;
|
|
64
|
+
shippingMethodsQuery: UseQueryReturnType<BrandedResponse<Operations, "readShippingMethod post /shipping-method">, Error>;
|
|
109
65
|
activeShippingMethod: ComputedRef<{
|
|
110
66
|
active?: boolean;
|
|
111
67
|
availabilityRule?: components["schemas"]["Rule"];
|
|
@@ -169,5 +125,5 @@ export declare function useShippingMethods(): {
|
|
|
169
125
|
trackingUrl: string;
|
|
170
126
|
};
|
|
171
127
|
readonly updatedAt?: string;
|
|
172
|
-
}[]
|
|
128
|
+
}[]>;
|
|
173
129
|
};
|
|
@@ -4,6 +4,7 @@ interface PaginationOptions {
|
|
|
4
4
|
page?: MaybeRef<number>;
|
|
5
5
|
total?: MaybeRef<number>;
|
|
6
6
|
limit?: MaybeRef<number>;
|
|
7
|
+
totalCountMode?: MaybeRef<'exact' | 'next-pages' | 'none'>;
|
|
7
8
|
}
|
|
8
9
|
export declare function usePagination(opts?: PaginationOptions): {
|
|
9
10
|
page: number;
|
|
@@ -12,10 +13,11 @@ export declare function usePagination(opts?: PaginationOptions): {
|
|
|
12
13
|
pageCount: ComputedRef<number>;
|
|
13
14
|
isLastPage: ComputedRef<boolean>;
|
|
14
15
|
isFirstPage: ComputedRef<boolean>;
|
|
15
|
-
usePaginationSync: (data: MaybeRef<Schemas["EntitySearchResult"]>) => void;
|
|
16
|
+
usePaginationSync: (data: MaybeRef<Schemas["EntitySearchResult"] | undefined>) => void;
|
|
16
17
|
queryOptions: ComputedRef<{
|
|
17
18
|
p: number;
|
|
18
19
|
limit: number | undefined;
|
|
20
|
+
'total-count-mode': "none" | "exact" | "next-pages";
|
|
19
21
|
}>;
|
|
20
22
|
};
|
|
21
23
|
export {};
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import { ComputedRef } from 'vue';
|
|
2
|
-
|
|
1
|
+
import { MaybeRef, ComputedRef } from 'vue';
|
|
2
|
+
import { Schemas } from '../../../api-types/storeApiTypes.d.ts';
|
|
3
|
+
export declare function useIsLoggedIn(context: MaybeRef<Schemas['SalesChannelContext'] | undefined>): ComputedRef<boolean>;
|
|
@@ -1,61 +1,11 @@
|
|
|
1
1
|
import { Schemas } from '../../query/types';
|
|
2
2
|
import { ComputedRef } from 'vue';
|
|
3
|
+
import { BrandedResponse } from '@teamnovu/kit-shopware-api-client';
|
|
4
|
+
import { Operations } from '../..';
|
|
3
5
|
import { components, GenericRecord } from '../../../api-types/storeApiTypes';
|
|
4
6
|
import { UseQueryReturnType } from '@tanstack/vue-query';
|
|
5
7
|
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>;
|
|
8
|
+
user: ComputedRef< BrandedResponse<Operations, "readCustomer post /account/customer"> | undefined>;
|
|
59
9
|
isLoggedIn: ComputedRef<boolean>;
|
|
60
10
|
isCustomerSession: ComputedRef<boolean>;
|
|
61
11
|
isGuestSession: ComputedRef<boolean>;
|
|
@@ -111,57 +61,5 @@ export declare function useUser(criteria?: Schemas['Criteria']): {
|
|
|
111
61
|
readonly updatedAt?: string;
|
|
112
62
|
zipcode?: string;
|
|
113
63
|
} | 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>;
|
|
64
|
+
customerQuery: UseQueryReturnType<BrandedResponse<Operations, "readCustomer post /account/customer">, Error>;
|
|
167
65
|
};
|