@teamnovu/kit-shopware-composables 0.0.5 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/dist/global.d.ts +8 -0
  2. package/dist/helpers/checkout/index.d.ts +1 -1
  3. package/dist/helpers/checkout/{useAddresses.d.ts → useCheckoutAddresses.d.ts} +9 -51
  4. package/dist/helpers/checkout/useOrderDetails.d.ts +3 -8
  5. package/dist/helpers/checkout/usePaymentMethods.d.ts +11 -49
  6. package/dist/helpers/checkout/useShippingMethods.d.ts +11 -55
  7. package/dist/helpers/general/usePagination.d.ts +3 -1
  8. package/dist/helpers/user/useIsLoggedIn.d.ts +3 -2
  9. package/dist/helpers/user/useUser.d.ts +4 -106
  10. package/dist/index.mjs +808 -640
  11. package/dist/keys.d.ts +42 -1
  12. package/dist/query/address/index.d.ts +1 -0
  13. package/dist/query/address/useCreateCustomerAddressMutation.d.ts +7 -6
  14. package/dist/query/address/useDeleteCustomerAddressMutation.d.ts +2 -1
  15. package/dist/query/address/useListAddressQuery.d.ts +5 -36
  16. package/dist/query/address/useUpdateCustomerAddressMutation.d.ts +167 -0
  17. package/dist/query/cart/useAddLineItemMutation.d.ts +7 -6
  18. package/dist/query/cart/useReadCartQuery.d.ts +5 -100
  19. package/dist/query/cart/useRemoveLineItemMutation.d.ts +7 -6
  20. package/dist/query/cart/useUpdateLineItemMutation.d.ts +7 -6
  21. package/dist/query/checkout/index.d.ts +0 -1
  22. package/dist/query/checkout/useCreateOrderMutation.d.ts +7 -6
  23. package/dist/query/context/useReadContextQuery.d.ts +8 -148
  24. package/dist/query/context/useUpdateContextMutation.d.ts +7 -6
  25. package/dist/query/country/index.d.ts +1 -0
  26. package/dist/query/country/useReadCountryQuery.d.ts +17 -0
  27. package/dist/query/customer/useChangeEmailMutation.d.ts +7 -6
  28. package/dist/query/customer/useChangeProfileMutation.d.ts +7 -6
  29. package/dist/query/customer/useLoginCustomerMutation.d.ts +7 -6
  30. package/dist/query/customer/useLogoutCustomerMutation.d.ts +7 -6
  31. package/dist/query/customer/useReadCustomerQuery.d.ts +10 -213
  32. package/dist/query/customer/useRegisterCustomerMutation.d.ts +7 -6
  33. package/dist/query/index.d.ts +4 -0
  34. package/dist/query/navigation/index.d.ts +1 -0
  35. package/dist/query/navigation/useReadNavigationQuery.d.ts +22 -0
  36. package/dist/query/order/useReadOrderQuery.d.ts +5 -32
  37. package/dist/query/payment/useHandlePaymentMutation.d.ts +7 -6
  38. package/dist/query/payment/useOrderSetPaymentMutation.d.ts +7 -6
  39. package/dist/query/payment/useReadPaymentMethodQuery.d.ts +5 -20
  40. package/dist/query/products/useReadCategoryListQuery.d.ts +5 -36
  41. package/dist/query/products/useReadCompactProductListingQuery.d.ts +5 -20
  42. package/dist/query/products/useReadCustomProductDetailQuery.d.ts +5 -52
  43. package/dist/query/salutation/index.d.ts +1 -0
  44. package/dist/query/salutation/useReadSalutationQuery.d.ts +17 -0
  45. package/dist/query/seoUrl/index.d.ts +1 -0
  46. package/dist/query/seoUrl/useReadSeoUrlQuery.d.ts +17 -0
  47. package/dist/query/shipping/useReadShippingMethodQuery.d.ts +5 -44
  48. package/dist/query/types/index.d.ts +1 -0
  49. package/dist/query/types/operations.d.ts +3 -3
  50. package/dist/query/types/query.d.ts +2 -3
  51. package/dist/query/types/util.d.ts +6 -0
  52. package/dist/util/unrefOptions.d.ts +2 -2
  53. package/docs/index.md +3 -3
  54. package/package.json +6 -4
  55. package/src/global.d.ts +8 -0
  56. package/src/helpers/checkout/index.ts +1 -1
  57. package/src/helpers/checkout/{useAddresses.ts → useCheckoutAddresses.ts} +2 -2
  58. package/src/helpers/checkout/useOrderDetails.ts +1 -1
  59. package/src/helpers/checkout/useOrderPayment.ts +1 -1
  60. package/src/helpers/checkout/usePaymentMethods.ts +5 -2
  61. package/src/helpers/checkout/useShippingMethods.ts +5 -2
  62. package/src/helpers/general/usePagination.ts +10 -5
  63. package/src/helpers/user/useIsLoggedIn.ts +6 -8
  64. package/src/helpers/user/useUser.ts +1 -1
  65. package/src/inject.ts +1 -1
  66. package/src/keys.ts +66 -1
  67. package/src/query/address/index.ts +1 -0
  68. package/src/query/address/useCreateCustomerAddressMutation.ts +7 -6
  69. package/src/query/address/useDeleteCustomerAddressMutation.ts +7 -6
  70. package/src/query/address/useUpdateCustomerAddressMutation.ts +42 -0
  71. package/src/query/cart/useAddLineItemMutation.ts +7 -6
  72. package/src/query/cart/useRemoveLineItemMutation.ts +6 -5
  73. package/src/query/cart/useUpdateLineItemMutation.ts +5 -4
  74. package/src/query/checkout/index.ts +0 -1
  75. package/src/query/checkout/useCreateOrderMutation.ts +11 -8
  76. package/src/query/context/useReadContextQuery.ts +14 -5
  77. package/src/query/context/useUpdateContextMutation.ts +6 -5
  78. package/src/query/country/index.ts +1 -0
  79. package/src/query/country/useReadCountryQuery.ts +31 -0
  80. package/src/query/customer/useChangeEmailMutation.ts +7 -7
  81. package/src/query/customer/useChangeProfileMutation.ts +7 -7
  82. package/src/query/customer/useLoginCustomerMutation.ts +12 -9
  83. package/src/query/customer/useLogoutCustomerMutation.ts +11 -7
  84. package/src/query/customer/useReadCustomerQuery.ts +2 -1
  85. package/src/query/customer/useRegisterCustomerMutation.ts +7 -7
  86. package/src/query/index.ts +4 -0
  87. package/src/query/navigation/index.ts +1 -0
  88. package/src/query/navigation/useReadNavigationQuery.ts +43 -0
  89. package/src/query/order/useReadOrderQuery.ts +0 -2
  90. package/src/query/payment/useHandlePaymentMutation.ts +5 -4
  91. package/src/query/payment/useOrderSetPaymentMutation.ts +6 -5
  92. package/src/query/salutation/index.ts +1 -0
  93. package/src/query/salutation/useReadSalutationQuery.ts +31 -0
  94. package/src/query/seoUrl/index.ts +1 -0
  95. package/src/query/seoUrl/useReadSeoUrlQuery.ts +31 -0
  96. package/src/query/types/index.ts +1 -0
  97. package/src/query/types/operations.ts +5 -5
  98. package/src/query/types/query.ts +4 -6
  99. package/src/query/types/util.ts +19 -0
  100. package/src/util/unrefOptions.ts +4 -4
  101. package/src/util/useOptimistic.ts +2 -1
  102. package/tsconfig.json +4 -2
  103. package/vite.config.js +6 -1
  104. package/dist/query/checkout/useCheckout.d.ts +0 -1
  105. package/src/query/checkout/useCheckout.ts +0 -2
package/dist/keys.d.ts CHANGED
@@ -9,6 +9,19 @@ export declare const categoryKeys: {
9
9
  readonly body: unknown;
10
10
  }];
11
11
  };
12
+ export declare const navigationKeys: {
13
+ all: () => readonly ["navigation"];
14
+ lists: () => readonly ["navigation", "list"];
15
+ list: (body: MaybeRef<unknown>) => readonly ["navigation", "list", {
16
+ readonly body: unknown;
17
+ }];
18
+ details: () => readonly ["navigation", "detail"];
19
+ detail: (activeId: MaybeRef<string>, rootId: MaybeRef<string>, body: MaybeRef<unknown>) => readonly ["navigation", "detail", {
20
+ readonly activeId: MaybeRef<string>;
21
+ readonly rootId: MaybeRef<string>;
22
+ readonly body: unknown;
23
+ }];
24
+ };
12
25
  export declare const productKeys: {
13
26
  all: () => readonly ["product"];
14
27
  lists: () => readonly ["product", "list"];
@@ -26,7 +39,10 @@ export declare const cartKeys: {
26
39
  get: () => readonly ["cart"];
27
40
  };
28
41
  export declare const customerKeys: {
29
- get: () => readonly ["customer"];
42
+ all: () => readonly ["customer"];
43
+ detail: (body: MaybeRef<unknown>) => readonly ["customer", {
44
+ readonly body: unknown;
45
+ }];
30
46
  };
31
47
  export declare const addressKeys: {
32
48
  all: () => readonly ["address"];
@@ -34,6 +50,10 @@ export declare const addressKeys: {
34
50
  list: (body: MaybeRef<unknown>) => readonly ["address", "list", {
35
51
  readonly body: unknown;
36
52
  }];
53
+ details: () => readonly ["address", "detail"];
54
+ detail: (addressId: string, body?: MaybeRef<unknown>) => readonly ["address", "detail", string, ...{
55
+ body: {};
56
+ }[]];
37
57
  };
38
58
  export declare const shippingKeys: {
39
59
  all: () => readonly ["shippingMethod"];
@@ -57,3 +77,24 @@ export declare const orderKeys: {
57
77
  readonly body: unknown;
58
78
  }];
59
79
  };
80
+ export declare const seoUrlKeys: {
81
+ all: () => readonly ["seoUrl"];
82
+ lists: () => readonly ["seoUrl", "list"];
83
+ list: (body: MaybeRef<unknown>) => readonly ["seoUrl", "list", {
84
+ readonly body: unknown;
85
+ }];
86
+ };
87
+ export declare const salutationKeys: {
88
+ all: () => readonly ["salutation"];
89
+ lists: () => readonly ["salutation", "list"];
90
+ list: (body: MaybeRef<unknown>) => readonly ["salutation", "list", {
91
+ readonly body: unknown;
92
+ }];
93
+ };
94
+ export declare const countryKeys: {
95
+ all: () => readonly ["country"];
96
+ lists: () => readonly ["country", "list"];
97
+ list: (body: MaybeRef<unknown>) => readonly ["country", "list", {
98
+ readonly body: unknown;
99
+ }];
100
+ };
@@ -1,3 +1,4 @@
1
1
  export * from './useListAddressQuery';
2
2
  export * from './useCreateCustomerAddressMutation';
3
3
  export * from './useDeleteCustomerAddressMutation';
4
+ export * from './useUpdateCustomerAddressMutation';
@@ -1,8 +1,9 @@
1
1
  import { UseMutationOptions, UseMutationReturnType, MutationObserverIdleResult, MutationObserverLoadingResult, MutationObserverErrorResult, MutationObserverSuccessResult } from '@tanstack/vue-query';
2
+ import { ShopwareApiError } from '@teamnovu/kit-shopware-api-client';
2
3
  import { OperationOptions, OperationResponse } from '../types/query';
3
4
  import { components, GenericRecord } from '../../../api-types/storeApiTypes';
4
5
  declare const createCustomerAddressOperation = "createCustomerAddress post /account/address";
5
- export declare function useCreateCustomerAddressMutation(mutationOptions?: UseMutationOptions<OperationResponse<typeof createCustomerAddressOperation>, unknown, OperationOptions<typeof createCustomerAddressOperation>>): UseMutationReturnType<{
6
+ export declare function useCreateCustomerAddressMutation(mutationOptions?: UseMutationOptions<OperationResponse<typeof createCustomerAddressOperation>, ShopwareApiError | Error, OperationOptions<typeof createCustomerAddressOperation>>): UseMutationReturnType<{
6
7
  additionalAddressLine1?: string;
7
8
  additionalAddressLine2?: string;
8
9
  city: string;
@@ -34,7 +35,7 @@ export declare function useCreateCustomerAddressMutation(mutationOptions?: UseMu
34
35
  readonly id?: string;
35
36
  salutation: components["schemas"]["Salutation"];
36
37
  updatedAt: string | null;
37
- }, unknown, OperationOptions<"createCustomerAddress post /account/address">, unknown, Omit< MutationObserverIdleResult<{
38
+ }, Error | ShopwareApiError, OperationOptions<"createCustomerAddress post /account/address">, unknown, Omit< MutationObserverIdleResult<{
38
39
  additionalAddressLine1?: string;
39
40
  additionalAddressLine2?: string;
40
41
  city: string;
@@ -66,7 +67,7 @@ export declare function useCreateCustomerAddressMutation(mutationOptions?: UseMu
66
67
  readonly id?: string;
67
68
  salutation: components["schemas"]["Salutation"];
68
69
  updatedAt: string | null;
69
- }, unknown, OperationOptions<"createCustomerAddress post /account/address">, unknown>, "mutate" | "reset"> | Omit< MutationObserverLoadingResult<{
70
+ }, Error | ShopwareApiError, OperationOptions<"createCustomerAddress post /account/address">, unknown>, "mutate" | "reset"> | Omit< MutationObserverLoadingResult<{
70
71
  additionalAddressLine1?: string;
71
72
  additionalAddressLine2?: string;
72
73
  city: string;
@@ -98,7 +99,7 @@ export declare function useCreateCustomerAddressMutation(mutationOptions?: UseMu
98
99
  readonly id?: string;
99
100
  salutation: components["schemas"]["Salutation"];
100
101
  updatedAt: string | null;
101
- }, unknown, OperationOptions<"createCustomerAddress post /account/address">, unknown>, "mutate" | "reset"> | Omit< MutationObserverErrorResult<{
102
+ }, Error | ShopwareApiError, OperationOptions<"createCustomerAddress post /account/address">, unknown>, "mutate" | "reset"> | Omit< MutationObserverErrorResult<{
102
103
  additionalAddressLine1?: string;
103
104
  additionalAddressLine2?: string;
104
105
  city: string;
@@ -130,7 +131,7 @@ export declare function useCreateCustomerAddressMutation(mutationOptions?: UseMu
130
131
  readonly id?: string;
131
132
  salutation: components["schemas"]["Salutation"];
132
133
  updatedAt: string | null;
133
- }, unknown, OperationOptions<"createCustomerAddress post /account/address">, unknown>, "mutate" | "reset"> | Omit< MutationObserverSuccessResult<{
134
+ }, Error | ShopwareApiError, OperationOptions<"createCustomerAddress post /account/address">, unknown>, "mutate" | "reset"> | Omit< MutationObserverSuccessResult<{
134
135
  additionalAddressLine1?: string;
135
136
  additionalAddressLine2?: string;
136
137
  city: string;
@@ -162,5 +163,5 @@ export declare function useCreateCustomerAddressMutation(mutationOptions?: UseMu
162
163
  readonly id?: string;
163
164
  salutation: components["schemas"]["Salutation"];
164
165
  updatedAt: string | null;
165
- }, unknown, OperationOptions<"createCustomerAddress post /account/address">, unknown>, "mutate" | "reset">>;
166
+ }, Error | ShopwareApiError, OperationOptions<"createCustomerAddress post /account/address">, unknown>, "mutate" | "reset">>;
166
167
  export {};
@@ -1,5 +1,6 @@
1
1
  import { UseMutationOptions, UseMutationReturnType, MutationObserverIdleResult, MutationObserverLoadingResult, MutationObserverErrorResult, MutationObserverSuccessResult } from '@tanstack/vue-query';
2
+ import { ShopwareApiError } from '@teamnovu/kit-shopware-api-client';
2
3
  import { OperationOptions, OperationResponse } from '../types/query';
3
4
  declare const deleteCustomerAddressOperation = "deleteCustomerAddress delete /account/address/{addressId}";
4
- export declare function useDeleteCustomerAddressMutation(mutationOptions?: UseMutationOptions<OperationResponse<typeof deleteCustomerAddressOperation>, unknown, OperationOptions<typeof deleteCustomerAddressOperation>>): UseMutationReturnType<never, unknown, OperationOptions<"deleteCustomerAddress delete /account/address/{addressId}">, unknown, Omit< MutationObserverIdleResult<never, unknown, OperationOptions<"deleteCustomerAddress delete /account/address/{addressId}">, unknown>, "mutate" | "reset"> | Omit< MutationObserverLoadingResult<never, unknown, OperationOptions<"deleteCustomerAddress delete /account/address/{addressId}">, unknown>, "mutate" | "reset"> | Omit< MutationObserverErrorResult<never, unknown, OperationOptions<"deleteCustomerAddress delete /account/address/{addressId}">, unknown>, "mutate" | "reset"> | Omit< MutationObserverSuccessResult<never, unknown, OperationOptions<"deleteCustomerAddress delete /account/address/{addressId}">, unknown>, "mutate" | "reset">>;
5
+ export declare function useDeleteCustomerAddressMutation(mutationOptions?: UseMutationOptions<OperationResponse<typeof deleteCustomerAddressOperation>, ShopwareApiError | Error, OperationOptions<typeof deleteCustomerAddressOperation>>): UseMutationReturnType<never, Error | ShopwareApiError, OperationOptions<"deleteCustomerAddress delete /account/address/{addressId}">, unknown, Omit< MutationObserverIdleResult<never, Error | ShopwareApiError, OperationOptions<"deleteCustomerAddress delete /account/address/{addressId}">, unknown>, "mutate" | "reset"> | Omit< MutationObserverLoadingResult<never, Error | ShopwareApiError, OperationOptions<"deleteCustomerAddress delete /account/address/{addressId}">, unknown>, "mutate" | "reset"> | Omit< MutationObserverErrorResult<never, Error | ShopwareApiError, OperationOptions<"deleteCustomerAddress delete /account/address/{addressId}">, unknown>, "mutate" | "reset"> | Omit< MutationObserverSuccessResult<never, Error | ShopwareApiError, OperationOptions<"deleteCustomerAddress delete /account/address/{addressId}">, unknown>, "mutate" | "reset">>;
5
6
  export {};
@@ -1,48 +1,17 @@
1
1
  import { OperationOptions } from '../types/query';
2
2
  import { UndefinedInitialQueryOptions, UseQueryReturnType } from '@tanstack/vue-query';
3
- import { components, GenericRecord } from '../../../api-types/storeApiTypes';
3
+ import { BrandedResponse } from '@teamnovu/kit-shopware-api-client';
4
+ import { Operations } from '..';
4
5
  declare const listAddressOperation = "listAddress post /account/list-address";
5
- export declare function useListAddressQueryOptions(options?: OperationOptions<typeof listAddressOperation>): UndefinedInitialQueryOptions<{
6
- elements: components["schemas"]["CustomerAddress"][];
7
- } & {
8
- aggregations?: GenericRecord[];
9
- entity?: string;
10
- limit?: number;
11
- page?: number;
12
- total?: number;
13
- }, Error, {
14
- elements: components["schemas"]["CustomerAddress"][];
15
- } & {
16
- aggregations?: GenericRecord[];
17
- entity?: string;
18
- limit?: number;
19
- page?: number;
20
- total?: number;
21
- }, readonly ["address", "list", {
6
+ export declare function useListAddressQueryOptions(options?: OperationOptions<typeof listAddressOperation>): UndefinedInitialQueryOptions<BrandedResponse<Operations, "listAddress post /account/list-address">, Error, BrandedResponse<Operations, "listAddress post /account/list-address">, readonly ["address", "list", {
22
7
  readonly body: unknown;
23
8
  }]> & {
24
9
  queryKey: readonly ["address", "list", {
25
10
  readonly body: unknown;
26
11
  }] & {
27
- [dataTagSymbol]: {
28
- elements: components["schemas"]["CustomerAddress"][];
29
- } & {
30
- aggregations?: GenericRecord[];
31
- entity?: string;
32
- limit?: number;
33
- page?: number;
34
- total?: number;
35
- };
12
+ [dataTagSymbol]: BrandedResponse<Operations, "listAddress post /account/list-address">;
36
13
  [dataTagErrorSymbol]: Error;
37
14
  };
38
15
  };
39
- export declare function useListAddressQuery(options?: OperationOptions<typeof listAddressOperation>): UseQueryReturnType<{
40
- elements: components["schemas"]["CustomerAddress"][];
41
- } & {
42
- aggregations?: GenericRecord[];
43
- entity?: string;
44
- limit?: number;
45
- page?: number;
46
- total?: number;
47
- }, Error>;
16
+ export declare function useListAddressQuery(options?: OperationOptions<typeof listAddressOperation>): UseQueryReturnType<BrandedResponse<Operations, "listAddress post /account/list-address">, Error>;
48
17
  export {};
@@ -0,0 +1,167 @@
1
+ import { UseMutationOptions, UseMutationReturnType, MutationObserverIdleResult, MutationObserverLoadingResult, MutationObserverErrorResult, MutationObserverSuccessResult } from '@tanstack/vue-query';
2
+ import { ShopwareApiError } from '@teamnovu/kit-shopware-api-client';
3
+ import { OperationOptions, OperationResponse } from '../types/query';
4
+ import { components, GenericRecord } from '../../../api-types/storeApiTypes';
5
+ declare const updateCustomerAddressOperation = "updateCustomerAddress patch /account/address/{addressId}";
6
+ export declare function useUpdateCustomerAddressMutation(mutationOptions?: UseMutationOptions<OperationResponse<typeof updateCustomerAddressOperation>, ShopwareApiError | Error, OperationOptions<typeof updateCustomerAddressOperation>>): UseMutationReturnType<{
7
+ additionalAddressLine1?: string;
8
+ additionalAddressLine2?: string;
9
+ city: string;
10
+ company?: string;
11
+ country?: components["schemas"]["Country"];
12
+ countryId: string;
13
+ countryState?: components["schemas"]["CountryState"];
14
+ countryStateId?: string;
15
+ readonly createdAt?: string;
16
+ customerId: string;
17
+ customFields?: GenericRecord;
18
+ department?: string;
19
+ firstName: string;
20
+ hash?: string;
21
+ id: string;
22
+ lastName: string;
23
+ phoneNumber?: string;
24
+ salutation?: components["schemas"]["Salutation"];
25
+ salutationId?: string;
26
+ street: string;
27
+ title?: string;
28
+ readonly updatedAt?: string;
29
+ zipcode?: string;
30
+ } & {
31
+ country: components["schemas"]["Country"];
32
+ countryState?: components["schemas"]["CountryState"] | null;
33
+ createdAt: string;
34
+ readonly customerId: string;
35
+ readonly id?: string;
36
+ salutation: components["schemas"]["Salutation"];
37
+ updatedAt: string | null;
38
+ }, Error | ShopwareApiError, OperationOptions<"updateCustomerAddress patch /account/address/{addressId}">, unknown, Omit< MutationObserverIdleResult<{
39
+ additionalAddressLine1?: string;
40
+ additionalAddressLine2?: string;
41
+ city: string;
42
+ company?: string;
43
+ country?: components["schemas"]["Country"];
44
+ countryId: string;
45
+ countryState?: components["schemas"]["CountryState"];
46
+ countryStateId?: string;
47
+ readonly createdAt?: string;
48
+ customerId: string;
49
+ customFields?: GenericRecord;
50
+ department?: string;
51
+ firstName: string;
52
+ hash?: string;
53
+ id: string;
54
+ lastName: string;
55
+ phoneNumber?: string;
56
+ salutation?: components["schemas"]["Salutation"];
57
+ salutationId?: string;
58
+ street: string;
59
+ title?: string;
60
+ readonly updatedAt?: string;
61
+ zipcode?: string;
62
+ } & {
63
+ country: components["schemas"]["Country"];
64
+ countryState?: components["schemas"]["CountryState"] | null;
65
+ createdAt: string;
66
+ readonly customerId: string;
67
+ readonly id?: string;
68
+ salutation: components["schemas"]["Salutation"];
69
+ updatedAt: string | null;
70
+ }, Error | ShopwareApiError, OperationOptions<"updateCustomerAddress patch /account/address/{addressId}">, unknown>, "mutate" | "reset"> | Omit< MutationObserverLoadingResult<{
71
+ additionalAddressLine1?: string;
72
+ additionalAddressLine2?: string;
73
+ city: string;
74
+ company?: string;
75
+ country?: components["schemas"]["Country"];
76
+ countryId: string;
77
+ countryState?: components["schemas"]["CountryState"];
78
+ countryStateId?: string;
79
+ readonly createdAt?: string;
80
+ customerId: string;
81
+ customFields?: GenericRecord;
82
+ department?: string;
83
+ firstName: string;
84
+ hash?: string;
85
+ id: string;
86
+ lastName: string;
87
+ phoneNumber?: string;
88
+ salutation?: components["schemas"]["Salutation"];
89
+ salutationId?: string;
90
+ street: string;
91
+ title?: string;
92
+ readonly updatedAt?: string;
93
+ zipcode?: string;
94
+ } & {
95
+ country: components["schemas"]["Country"];
96
+ countryState?: components["schemas"]["CountryState"] | null;
97
+ createdAt: string;
98
+ readonly customerId: string;
99
+ readonly id?: string;
100
+ salutation: components["schemas"]["Salutation"];
101
+ updatedAt: string | null;
102
+ }, Error | ShopwareApiError, OperationOptions<"updateCustomerAddress patch /account/address/{addressId}">, unknown>, "mutate" | "reset"> | Omit< MutationObserverErrorResult<{
103
+ additionalAddressLine1?: string;
104
+ additionalAddressLine2?: string;
105
+ city: string;
106
+ company?: string;
107
+ country?: components["schemas"]["Country"];
108
+ countryId: string;
109
+ countryState?: components["schemas"]["CountryState"];
110
+ countryStateId?: string;
111
+ readonly createdAt?: string;
112
+ customerId: string;
113
+ customFields?: GenericRecord;
114
+ department?: string;
115
+ firstName: string;
116
+ hash?: string;
117
+ id: string;
118
+ lastName: string;
119
+ phoneNumber?: string;
120
+ salutation?: components["schemas"]["Salutation"];
121
+ salutationId?: string;
122
+ street: string;
123
+ title?: string;
124
+ readonly updatedAt?: string;
125
+ zipcode?: string;
126
+ } & {
127
+ country: components["schemas"]["Country"];
128
+ countryState?: components["schemas"]["CountryState"] | null;
129
+ createdAt: string;
130
+ readonly customerId: string;
131
+ readonly id?: string;
132
+ salutation: components["schemas"]["Salutation"];
133
+ updatedAt: string | null;
134
+ }, Error | ShopwareApiError, OperationOptions<"updateCustomerAddress patch /account/address/{addressId}">, unknown>, "mutate" | "reset"> | Omit< MutationObserverSuccessResult<{
135
+ additionalAddressLine1?: string;
136
+ additionalAddressLine2?: string;
137
+ city: string;
138
+ company?: string;
139
+ country?: components["schemas"]["Country"];
140
+ countryId: string;
141
+ countryState?: components["schemas"]["CountryState"];
142
+ countryStateId?: string;
143
+ readonly createdAt?: string;
144
+ customerId: string;
145
+ customFields?: GenericRecord;
146
+ department?: string;
147
+ firstName: string;
148
+ hash?: string;
149
+ id: string;
150
+ lastName: string;
151
+ phoneNumber?: string;
152
+ salutation?: components["schemas"]["Salutation"];
153
+ salutationId?: string;
154
+ street: string;
155
+ title?: string;
156
+ readonly updatedAt?: string;
157
+ zipcode?: string;
158
+ } & {
159
+ country: components["schemas"]["Country"];
160
+ countryState?: components["schemas"]["CountryState"] | null;
161
+ createdAt: string;
162
+ readonly customerId: string;
163
+ readonly id?: string;
164
+ salutation: components["schemas"]["Salutation"];
165
+ updatedAt: string | null;
166
+ }, Error | ShopwareApiError, OperationOptions<"updateCustomerAddress patch /account/address/{addressId}">, unknown>, "mutate" | "reset">>;
167
+ export {};
@@ -1,4 +1,5 @@
1
1
  import { UseMutationOptions, UseMutationReturnType, MutationObserverIdleResult, MutationObserverLoadingResult, MutationObserverErrorResult, MutationObserverSuccessResult } from '@tanstack/vue-query';
2
+ import { ShopwareApiError } from '@teamnovu/kit-shopware-api-client';
2
3
  import { OperationBody, OperationResponse } from '../types/query';
3
4
  import { components } from '../../../api-types/storeApiTypes';
4
5
  declare const addCartItemOperation = "addLineItem post /checkout/cart/line-item";
@@ -7,7 +8,7 @@ type LineItemPayload = Partial<Omit<LineItem, 'id' | 'quantity' | 'type'>> & Req
7
8
  type Body = Omit<OperationBody<typeof addCartItemOperation>, 'items'> & {
8
9
  items: LineItemPayload[];
9
10
  };
10
- export declare function useAddLineItemMutation(mutationOptions: UseMutationOptions<OperationResponse<typeof addCartItemOperation>, unknown, Body>): UseMutationReturnType<{
11
+ export declare function useAddLineItemMutation(mutationOptions?: UseMutationOptions<OperationResponse<typeof addCartItemOperation>, ShopwareApiError | Error, Body>): UseMutationReturnType<{
11
12
  affiliateCode?: string | null;
12
13
  apiAlias: "cart";
13
14
  campaignCode?: string | null;
@@ -31,7 +32,7 @@ export declare function useAddLineItemMutation(mutationOptions: UseMutationOptio
31
32
  amount?: components["schemas"]["CalculatedPrice"];
32
33
  paymentMethodId?: string;
33
34
  }[];
34
- }, unknown, Body, unknown, Omit< MutationObserverIdleResult<{
35
+ }, Error | ShopwareApiError, Body, unknown, Omit< MutationObserverIdleResult<{
35
36
  affiliateCode?: string | null;
36
37
  apiAlias: "cart";
37
38
  campaignCode?: string | null;
@@ -55,7 +56,7 @@ export declare function useAddLineItemMutation(mutationOptions: UseMutationOptio
55
56
  amount?: components["schemas"]["CalculatedPrice"];
56
57
  paymentMethodId?: string;
57
58
  }[];
58
- }, unknown, Body, unknown>, "mutate" | "reset"> | Omit< MutationObserverLoadingResult<{
59
+ }, Error | ShopwareApiError, Body, unknown>, "mutate" | "reset"> | Omit< MutationObserverLoadingResult<{
59
60
  affiliateCode?: string | null;
60
61
  apiAlias: "cart";
61
62
  campaignCode?: string | null;
@@ -79,7 +80,7 @@ export declare function useAddLineItemMutation(mutationOptions: UseMutationOptio
79
80
  amount?: components["schemas"]["CalculatedPrice"];
80
81
  paymentMethodId?: string;
81
82
  }[];
82
- }, unknown, Body, unknown>, "mutate" | "reset"> | Omit< MutationObserverErrorResult<{
83
+ }, Error | ShopwareApiError, Body, unknown>, "mutate" | "reset"> | Omit< MutationObserverErrorResult<{
83
84
  affiliateCode?: string | null;
84
85
  apiAlias: "cart";
85
86
  campaignCode?: string | null;
@@ -103,7 +104,7 @@ export declare function useAddLineItemMutation(mutationOptions: UseMutationOptio
103
104
  amount?: components["schemas"]["CalculatedPrice"];
104
105
  paymentMethodId?: string;
105
106
  }[];
106
- }, unknown, Body, unknown>, "mutate" | "reset"> | Omit< MutationObserverSuccessResult<{
107
+ }, Error | ShopwareApiError, Body, unknown>, "mutate" | "reset"> | Omit< MutationObserverSuccessResult<{
107
108
  affiliateCode?: string | null;
108
109
  apiAlias: "cart";
109
110
  campaignCode?: string | null;
@@ -127,5 +128,5 @@ export declare function useAddLineItemMutation(mutationOptions: UseMutationOptio
127
128
  amount?: components["schemas"]["CalculatedPrice"];
128
129
  paymentMethodId?: string;
129
130
  }[];
130
- }, unknown, Body, unknown>, "mutate" | "reset">>;
131
+ }, Error | ShopwareApiError, Body, unknown>, "mutate" | "reset">>;
131
132
  export {};
@@ -1,108 +1,13 @@
1
1
  import { OperationOptions } from '../types/query';
2
2
  import { UndefinedInitialQueryOptions, UseQueryReturnType } from '@tanstack/vue-query';
3
- import { components } from '../../../api-types/storeApiTypes';
3
+ import { BrandedResponse } from '@teamnovu/kit-shopware-api-client';
4
+ import { Operations } from '..';
4
5
  declare const readCartOperation = "readCart get /checkout/cart";
5
- export declare function useReadCartQueryOptions(options?: OperationOptions<typeof readCartOperation>): UndefinedInitialQueryOptions<{
6
- affiliateCode?: string | null;
7
- apiAlias: "cart";
8
- campaignCode?: string | null;
9
- customerComment?: string | null;
10
- deliveries?: components["schemas"]["CartDelivery"][];
11
- errors?: components["schemas"]["CartError"][] | {
12
- [key: string]: {
13
- code: number;
14
- key: string;
15
- level: number;
16
- message: string;
17
- messageKey: string;
18
- };
19
- };
20
- lineItems?: components["schemas"]["LineItem"][];
21
- modified?: boolean;
22
- name?: string;
23
- price: components["schemas"]["CalculatedPrice"];
24
- token?: string;
25
- transactions?: {
26
- amount?: components["schemas"]["CalculatedPrice"];
27
- paymentMethodId?: string;
28
- }[];
29
- }, Error, {
30
- affiliateCode?: string | null;
31
- apiAlias: "cart";
32
- campaignCode?: string | null;
33
- customerComment?: string | null;
34
- deliveries?: components["schemas"]["CartDelivery"][];
35
- errors?: components["schemas"]["CartError"][] | {
36
- [key: string]: {
37
- code: number;
38
- key: string;
39
- level: number;
40
- message: string;
41
- messageKey: string;
42
- };
43
- };
44
- lineItems?: components["schemas"]["LineItem"][];
45
- modified?: boolean;
46
- name?: string;
47
- price: components["schemas"]["CalculatedPrice"];
48
- token?: string;
49
- transactions?: {
50
- amount?: components["schemas"]["CalculatedPrice"];
51
- paymentMethodId?: string;
52
- }[];
53
- }, readonly ["cart"]> & {
6
+ export declare function useReadCartQueryOptions(options?: OperationOptions<typeof readCartOperation>): UndefinedInitialQueryOptions<BrandedResponse<Operations, "readCart get /checkout/cart">, Error, BrandedResponse<Operations, "readCart get /checkout/cart">, readonly ["cart"]> & {
54
7
  queryKey: readonly ["cart"] & {
55
- [dataTagSymbol]: {
56
- affiliateCode?: string | null;
57
- apiAlias: "cart";
58
- campaignCode?: string | null;
59
- customerComment?: string | null;
60
- deliveries?: components["schemas"]["CartDelivery"][];
61
- errors?: components["schemas"]["CartError"][] | {
62
- [key: string]: {
63
- code: number;
64
- key: string;
65
- level: number;
66
- message: string;
67
- messageKey: string;
68
- };
69
- };
70
- lineItems?: components["schemas"]["LineItem"][];
71
- modified?: boolean;
72
- name?: string;
73
- price: components["schemas"]["CalculatedPrice"];
74
- token?: string;
75
- transactions?: {
76
- amount?: components["schemas"]["CalculatedPrice"];
77
- paymentMethodId?: string;
78
- }[];
79
- };
8
+ [dataTagSymbol]: BrandedResponse<Operations, "readCart get /checkout/cart">;
80
9
  [dataTagErrorSymbol]: Error;
81
10
  };
82
11
  };
83
- export declare function useReadCartQuery(): UseQueryReturnType<{
84
- affiliateCode?: string | null;
85
- apiAlias: "cart";
86
- campaignCode?: string | null;
87
- customerComment?: string | null;
88
- deliveries?: components["schemas"]["CartDelivery"][];
89
- errors?: components["schemas"]["CartError"][] | {
90
- [key: string]: {
91
- code: number;
92
- key: string;
93
- level: number;
94
- message: string;
95
- messageKey: string;
96
- };
97
- };
98
- lineItems?: components["schemas"]["LineItem"][];
99
- modified?: boolean;
100
- name?: string;
101
- price: components["schemas"]["CalculatedPrice"];
102
- token?: string;
103
- transactions?: {
104
- amount?: components["schemas"]["CalculatedPrice"];
105
- paymentMethodId?: string;
106
- }[];
107
- }, Error>;
12
+ export declare function useReadCartQuery(): UseQueryReturnType<BrandedResponse<Operations, "readCart get /checkout/cart">, Error>;
108
13
  export {};
@@ -1,8 +1,9 @@
1
1
  import { UseMutationOptions, UseMutationReturnType, MutationObserverIdleResult, MutationObserverLoadingResult, MutationObserverErrorResult, MutationObserverSuccessResult } from '@tanstack/vue-query';
2
+ import { ShopwareApiError } from '@teamnovu/kit-shopware-api-client';
2
3
  import { OperationBody, OperationResponse } from '../types/query';
3
4
  import { components } from '../../../api-types/storeApiTypes';
4
5
  declare const removeCartItemOperation = "removeLineItem post /checkout/cart/line-item/delete";
5
- export declare function useRemoveLineItemMutation(mutationOptions?: UseMutationOptions<OperationResponse<typeof removeCartItemOperation>, unknown, OperationBody<typeof removeCartItemOperation>>): UseMutationReturnType<{
6
+ export declare function useRemoveLineItemMutation(mutationOptions?: UseMutationOptions<OperationResponse<typeof removeCartItemOperation>, ShopwareApiError | Error, OperationBody<typeof removeCartItemOperation>>): UseMutationReturnType<{
6
7
  affiliateCode?: string | null;
7
8
  apiAlias: "cart";
8
9
  campaignCode?: string | null;
@@ -26,7 +27,7 @@ export declare function useRemoveLineItemMutation(mutationOptions?: UseMutationO
26
27
  amount?: components["schemas"]["CalculatedPrice"];
27
28
  paymentMethodId?: string;
28
29
  }[];
29
- }, unknown, {
30
+ }, Error | ShopwareApiError, {
30
31
  ids: [string, ...string[]];
31
32
  }, unknown, Omit< MutationObserverIdleResult<{
32
33
  affiliateCode?: string | null;
@@ -52,7 +53,7 @@ export declare function useRemoveLineItemMutation(mutationOptions?: UseMutationO
52
53
  amount?: components["schemas"]["CalculatedPrice"];
53
54
  paymentMethodId?: string;
54
55
  }[];
55
- }, unknown, {
56
+ }, Error | ShopwareApiError, {
56
57
  ids: [string, ...string[]];
57
58
  }, unknown>, "mutate" | "reset"> | Omit< MutationObserverLoadingResult<{
58
59
  affiliateCode?: string | null;
@@ -78,7 +79,7 @@ export declare function useRemoveLineItemMutation(mutationOptions?: UseMutationO
78
79
  amount?: components["schemas"]["CalculatedPrice"];
79
80
  paymentMethodId?: string;
80
81
  }[];
81
- }, unknown, {
82
+ }, Error | ShopwareApiError, {
82
83
  ids: [string, ...string[]];
83
84
  }, unknown>, "mutate" | "reset"> | Omit< MutationObserverErrorResult<{
84
85
  affiliateCode?: string | null;
@@ -104,7 +105,7 @@ export declare function useRemoveLineItemMutation(mutationOptions?: UseMutationO
104
105
  amount?: components["schemas"]["CalculatedPrice"];
105
106
  paymentMethodId?: string;
106
107
  }[];
107
- }, unknown, {
108
+ }, Error | ShopwareApiError, {
108
109
  ids: [string, ...string[]];
109
110
  }, unknown>, "mutate" | "reset"> | Omit< MutationObserverSuccessResult<{
110
111
  affiliateCode?: string | null;
@@ -130,7 +131,7 @@ export declare function useRemoveLineItemMutation(mutationOptions?: UseMutationO
130
131
  amount?: components["schemas"]["CalculatedPrice"];
131
132
  paymentMethodId?: string;
132
133
  }[];
133
- }, unknown, {
134
+ }, Error | ShopwareApiError, {
134
135
  ids: [string, ...string[]];
135
136
  }, unknown>, "mutate" | "reset">>;
136
137
  export {};
@@ -1,4 +1,5 @@
1
1
  import { UseMutationOptions, UseMutationReturnType, MutationObserverIdleResult, MutationObserverLoadingResult, MutationObserverErrorResult, MutationObserverSuccessResult } from '@tanstack/vue-query';
2
+ import { ShopwareApiError } from '@teamnovu/kit-shopware-api-client';
2
3
  import { OperationBody, OperationResponse } from '../types/query';
3
4
  import { components } from '../../../api-types/storeApiTypes';
4
5
  declare const updateCartItemOperation = "updateLineItem patch /checkout/cart/line-item";
@@ -7,7 +8,7 @@ type LineItemPayload = Partial<Omit<LineItem, 'id' | 'quantity' | 'type'>> & Req
7
8
  type Body = Omit<OperationBody<typeof updateCartItemOperation>, 'items'> & {
8
9
  items: LineItemPayload[];
9
10
  };
10
- export declare function useUpdateLineItemMutation(mutationOptions?: UseMutationOptions<OperationResponse<typeof updateCartItemOperation>, unknown, Body>): UseMutationReturnType<{
11
+ export declare function useUpdateLineItemMutation(mutationOptions?: UseMutationOptions<OperationResponse<typeof updateCartItemOperation>, ShopwareApiError | Error, Body>): UseMutationReturnType<{
11
12
  affiliateCode?: string | null;
12
13
  apiAlias: "cart";
13
14
  campaignCode?: string | null;
@@ -31,7 +32,7 @@ export declare function useUpdateLineItemMutation(mutationOptions?: UseMutationO
31
32
  amount?: components["schemas"]["CalculatedPrice"];
32
33
  paymentMethodId?: string;
33
34
  }[];
34
- }, unknown, Body, unknown, Omit< MutationObserverIdleResult<{
35
+ }, Error | ShopwareApiError, Body, unknown, Omit< MutationObserverIdleResult<{
35
36
  affiliateCode?: string | null;
36
37
  apiAlias: "cart";
37
38
  campaignCode?: string | null;
@@ -55,7 +56,7 @@ export declare function useUpdateLineItemMutation(mutationOptions?: UseMutationO
55
56
  amount?: components["schemas"]["CalculatedPrice"];
56
57
  paymentMethodId?: string;
57
58
  }[];
58
- }, unknown, Body, unknown>, "mutate" | "reset"> | Omit< MutationObserverLoadingResult<{
59
+ }, Error | ShopwareApiError, Body, unknown>, "mutate" | "reset"> | Omit< MutationObserverLoadingResult<{
59
60
  affiliateCode?: string | null;
60
61
  apiAlias: "cart";
61
62
  campaignCode?: string | null;
@@ -79,7 +80,7 @@ export declare function useUpdateLineItemMutation(mutationOptions?: UseMutationO
79
80
  amount?: components["schemas"]["CalculatedPrice"];
80
81
  paymentMethodId?: string;
81
82
  }[];
82
- }, unknown, Body, unknown>, "mutate" | "reset"> | Omit< MutationObserverErrorResult<{
83
+ }, Error | ShopwareApiError, Body, unknown>, "mutate" | "reset"> | Omit< MutationObserverErrorResult<{
83
84
  affiliateCode?: string | null;
84
85
  apiAlias: "cart";
85
86
  campaignCode?: string | null;
@@ -103,7 +104,7 @@ export declare function useUpdateLineItemMutation(mutationOptions?: UseMutationO
103
104
  amount?: components["schemas"]["CalculatedPrice"];
104
105
  paymentMethodId?: string;
105
106
  }[];
106
- }, unknown, Body, unknown>, "mutate" | "reset"> | Omit< MutationObserverSuccessResult<{
107
+ }, Error | ShopwareApiError, Body, unknown>, "mutate" | "reset"> | Omit< MutationObserverSuccessResult<{
107
108
  affiliateCode?: string | null;
108
109
  apiAlias: "cart";
109
110
  campaignCode?: string | null;
@@ -127,5 +128,5 @@ export declare function useUpdateLineItemMutation(mutationOptions?: UseMutationO
127
128
  amount?: components["schemas"]["CalculatedPrice"];
128
129
  paymentMethodId?: string;
129
130
  }[];
130
- }, unknown, Body, unknown>, "mutate" | "reset">>;
131
+ }, Error | ShopwareApiError, Body, unknown>, "mutate" | "reset">>;
131
132
  export {};
@@ -1,2 +1 @@
1
- export * from './useCheckout';
2
1
  export * from './useCreateOrderMutation';