@teamnovu/kit-shopware-composables 0.0.2 → 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.
Files changed (142) hide show
  1. package/api-types/storeApiSchema.localhost.http +1 -1
  2. package/dist/helpers/checkout/index.d.ts +5 -0
  3. package/dist/helpers/checkout/useAddresses.d.ts +210 -0
  4. package/dist/helpers/checkout/useOrderDetails.d.ts +186 -0
  5. package/dist/helpers/checkout/useOrderPayment.d.ts +73 -0
  6. package/dist/helpers/checkout/usePaymentMethods.d.ts +155 -0
  7. package/dist/helpers/checkout/useShippingMethods.d.ts +173 -0
  8. package/dist/helpers/general/index.d.ts +2 -0
  9. package/dist/{usePagination.d.ts → helpers/general/usePagination.d.ts} +1 -1
  10. package/dist/{general → helpers/general}/useSeoUrl.d.ts +1 -1
  11. package/dist/helpers/index.d.ts +4 -0
  12. package/dist/helpers/product/index.d.ts +2 -0
  13. package/dist/helpers/product/useProductPrice.d.ts +61 -0
  14. package/dist/{products → helpers/product}/useProductVariantForOptions.d.ts +1 -1
  15. package/dist/helpers/user/index.d.ts +2 -0
  16. package/dist/helpers/user/useIsLoggedIn.d.ts +2 -0
  17. package/dist/helpers/user/useUser.d.ts +167 -0
  18. package/dist/index.d.ts +3 -188
  19. package/dist/index.mjs +871 -185
  20. package/dist/inject.d.ts +2 -2
  21. package/dist/keys.d.ts +35 -0
  22. package/dist/query/address/index.d.ts +3 -0
  23. package/dist/query/address/useCreateCustomerAddressMutation.d.ts +166 -0
  24. package/dist/query/address/useDeleteCustomerAddressMutation.d.ts +5 -0
  25. package/dist/query/address/useListAddressQuery.d.ts +48 -0
  26. package/dist/query/cart/index.d.ts +4 -0
  27. package/dist/query/cart/useAddLineItemMutation.d.ts +131 -0
  28. package/dist/query/cart/useReadCartQuery.d.ts +108 -0
  29. package/dist/query/cart/useRemoveLineItemMutation.d.ts +136 -0
  30. package/dist/query/cart/useUpdateLineItemMutation.d.ts +131 -0
  31. package/dist/query/checkout/index.d.ts +2 -0
  32. package/dist/query/checkout/useCheckout.d.ts +1 -0
  33. package/dist/query/checkout/useCreateOrderMutation.d.ts +281 -0
  34. package/dist/query/context/index.d.ts +2 -0
  35. package/dist/query/context/useReadContextQuery.d.ts +153 -0
  36. package/dist/query/context/useUpdateContextMutation.d.ts +60 -0
  37. package/dist/query/customer/index.d.ts +6 -0
  38. package/dist/query/customer/useChangeEmailMutation.d.ts +15 -0
  39. package/dist/query/customer/useChangeProfileMutation.d.ts +15 -0
  40. package/dist/query/customer/useLoginCustomerMutation.d.ts +30 -0
  41. package/dist/query/customer/useLogoutCustomerMutation.d.ts +15 -0
  42. package/dist/query/customer/useReadCustomerQuery.d.ts +220 -0
  43. package/dist/query/customer/useRegisterCustomerMutation.d.ts +266 -0
  44. package/dist/query/index.d.ts +10 -0
  45. package/dist/query/order/index.d.ts +1 -0
  46. package/dist/query/order/useReadOrderQuery.d.ts +44 -0
  47. package/dist/query/payment/index.d.ts +3 -0
  48. package/dist/query/payment/useHandlePaymentMutation.d.ts +15 -0
  49. package/dist/query/payment/useOrderSetPaymentMutation.d.ts +15 -0
  50. package/dist/query/payment/useReadPaymentMethodQuery.d.ts +31 -0
  51. package/dist/query/products/index.d.ts +3 -0
  52. package/dist/query/products/useReadCategoryListQuery.d.ts +48 -0
  53. package/dist/query/products/useReadCompactProductListingQuery.d.ts +35 -0
  54. package/dist/query/products/useReadCustomProductDetailQuery.d.ts +67 -0
  55. package/dist/query/shipping/index.d.ts +1 -0
  56. package/dist/query/shipping/useReadShippingMethodQuery.d.ts +55 -0
  57. package/dist/query/types/index.d.ts +2 -0
  58. package/dist/query/types/operations.d.ts +5 -0
  59. package/dist/query/types/query.d.ts +17 -0
  60. package/dist/util/index.d.ts +3 -0
  61. package/dist/util/unrefOptions.d.ts +4 -0
  62. package/dist/util/useOptimistic.d.ts +12 -0
  63. package/docs/index.md +457 -0
  64. package/docs/info.json +3 -0
  65. package/package.json +6 -2
  66. package/src/helpers/checkout/index.ts +5 -0
  67. package/src/helpers/checkout/useAddresses.ts +57 -0
  68. package/src/helpers/checkout/useOrderDetails.ts +94 -0
  69. package/src/helpers/checkout/useOrderPayment.ts +28 -0
  70. package/src/helpers/checkout/usePaymentMethods.ts +35 -0
  71. package/src/helpers/checkout/useShippingMethods.ts +35 -0
  72. package/src/helpers/general/index.ts +2 -0
  73. package/src/helpers/index.ts +4 -0
  74. package/src/helpers/product/index.ts +2 -0
  75. package/src/{products → helpers/product}/useProductPrice.ts +4 -45
  76. package/src/{products → helpers/product}/useProductVariantForOptions.ts +8 -2
  77. package/src/helpers/user/index.ts +2 -0
  78. package/src/helpers/user/useIsLoggedIn.ts +10 -0
  79. package/src/helpers/user/useUser.ts +53 -0
  80. package/src/index.ts +4 -21
  81. package/src/inject.ts +3 -3
  82. package/src/keys.ts +61 -0
  83. package/src/query/address/index.ts +3 -0
  84. package/src/query/address/useCreateCustomerAddressMutation.ts +32 -0
  85. package/src/query/address/useDeleteCustomerAddressMutation.ts +32 -0
  86. package/src/query/address/useListAddressQuery.ts +29 -0
  87. package/src/query/cart/index.ts +4 -0
  88. package/src/query/cart/useAddLineItemMutation.ts +45 -0
  89. package/src/query/cart/useReadCartQuery.ts +28 -0
  90. package/src/query/cart/useRemoveLineItemMutation.ts +32 -0
  91. package/src/query/cart/useUpdateLineItemMutation.ts +45 -0
  92. package/src/query/checkout/index.ts +2 -0
  93. package/src/query/checkout/useCheckout.ts +2 -0
  94. package/src/query/checkout/useCreateOrderMutation.ts +35 -0
  95. package/src/query/context/index.ts +2 -0
  96. package/src/query/context/useReadContextQuery.ts +19 -0
  97. package/src/query/context/useUpdateContextMutation.ts +36 -0
  98. package/src/query/customer/index.ts +6 -0
  99. package/src/query/customer/useChangeEmailMutation.ts +32 -0
  100. package/src/query/customer/useChangeProfileMutation.ts +32 -0
  101. package/src/query/customer/useLoginCustomerMutation.ts +42 -0
  102. package/src/query/customer/useLogoutCustomerMutation.ts +32 -0
  103. package/src/query/customer/useReadCustomerQuery.ts +27 -0
  104. package/src/query/customer/useRegisterCustomerMutation.ts +32 -0
  105. package/src/query/index.ts +10 -0
  106. package/src/query/order/index.ts +1 -0
  107. package/src/query/order/useReadOrderQuery.ts +33 -0
  108. package/src/query/payment/index.ts +3 -0
  109. package/src/query/payment/useHandlePaymentMutation.ts +27 -0
  110. package/src/query/payment/useOrderSetPaymentMutation.ts +32 -0
  111. package/src/query/payment/useReadPaymentMethodQuery.ts +30 -0
  112. package/src/query/products/index.ts +3 -0
  113. package/src/query/products/useReadCategoryListQuery.ts +28 -0
  114. package/src/query/products/useReadCompactProductListingQuery.ts +41 -0
  115. package/src/query/products/useReadCustomProductDetailQuery.ts +41 -0
  116. package/src/query/shipping/index.ts +1 -0
  117. package/src/query/shipping/useReadShippingMethodQuery.ts +29 -0
  118. package/src/query/types/index.ts +2 -0
  119. package/src/query/types/operations.ts +6 -0
  120. package/src/query/types/query.ts +39 -0
  121. package/src/util/index.ts +3 -0
  122. package/src/util/unrefOptions.ts +19 -0
  123. package/src/util/useOptimistic.ts +49 -0
  124. package/tsconfig.json +5 -2
  125. package/dist/context/useContextOptions.d.ts +0 -9
  126. package/dist/context/useContextUpdate.d.ts +0 -4
  127. package/dist/products/useCategoryQueryOptions.d.ts +0 -17
  128. package/dist/products/useProductListingQueryOptions.d.ts +0 -19
  129. package/dist/products/useProductListingQueryOptions.test.d.ts +0 -1
  130. package/dist/products/useProductPrice.d.ts +0 -48
  131. package/dist/products/useProductQueryOptions.d.ts +0 -19
  132. package/dist/types/query.d.ts +0 -7
  133. package/eslint.config.mjs +0 -84
  134. package/src/context/useContextOptions.ts +0 -16
  135. package/src/context/useContextUpdate.ts +0 -16
  136. package/src/products/useCategoryQueryOptions.ts +0 -25
  137. package/src/products/useProductListingQueryOptions.test.ts +0 -24
  138. package/src/products/useProductListingQueryOptions.ts +0 -28
  139. package/src/products/useProductQueryOptions.ts +0 -28
  140. package/src/types/query.ts +0 -18
  141. /package/src/{usePagination.ts → helpers/general/usePagination.ts} +0 -0
  142. /package/src/{general → helpers/general}/useSeoUrl.ts +0 -0
package/dist/inject.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { operations } from '../api-types/storeApiTypes.d.ts';
2
1
  import { ShopwareClient } from '@teamnovu/kit-shopware-api-client';
3
2
  import { InjectionKey } from 'vue';
3
+ import { Operations } from './query/types/operations';
4
4
  export declare const shopwareClientKey: InjectionKey<ShopwareClient<never>>;
5
- export declare function useShopwareQueryClient<Operations>(): ShopwareClient<operations & Operations>;
5
+ export declare function useShopwareQueryClient(): ShopwareClient<Operations>;
package/dist/keys.d.ts CHANGED
@@ -22,3 +22,38 @@ export declare const productKeys: {
22
22
  readonly body: unknown;
23
23
  }];
24
24
  };
25
+ export declare const cartKeys: {
26
+ get: () => readonly ["cart"];
27
+ };
28
+ export declare const customerKeys: {
29
+ get: () => readonly ["customer"];
30
+ };
31
+ export declare const addressKeys: {
32
+ all: () => readonly ["address"];
33
+ lists: () => readonly ["address", "list"];
34
+ list: (body: MaybeRef<unknown>) => readonly ["address", "list", {
35
+ readonly body: unknown;
36
+ }];
37
+ };
38
+ export declare const shippingKeys: {
39
+ all: () => readonly ["shippingMethod"];
40
+ lists: () => readonly ["shippingMethod", "list"];
41
+ list: (body: MaybeRef<unknown>) => readonly ["shippingMethod", "list", {
42
+ readonly body: unknown;
43
+ }];
44
+ };
45
+ export declare const paymentKeys: {
46
+ all: () => readonly ["paymentMethod"];
47
+ lists: () => readonly ["paymentMethod", "list"];
48
+ list: (body: MaybeRef<unknown>) => readonly ["paymentMethod", "list", {
49
+ readonly body: unknown;
50
+ }];
51
+ };
52
+ export declare const orderKeys: {
53
+ all: () => readonly ["order"];
54
+ lists: () => readonly ["order", "list"];
55
+ details: () => readonly ["order", "detail"];
56
+ detail: (body: MaybeRef<unknown>) => readonly ["order", "detail", {
57
+ readonly body: unknown;
58
+ }];
59
+ };
@@ -0,0 +1,3 @@
1
+ export * from './useListAddressQuery';
2
+ export * from './useCreateCustomerAddressMutation';
3
+ export * from './useDeleteCustomerAddressMutation';
@@ -0,0 +1,166 @@
1
+ import { UseMutationOptions, UseMutationReturnType, MutationObserverIdleResult, MutationObserverLoadingResult, MutationObserverErrorResult, MutationObserverSuccessResult } from '@tanstack/vue-query';
2
+ import { OperationOptions, OperationResponse } from '../types/query';
3
+ import { components, GenericRecord } from '../../../api-types/storeApiTypes';
4
+ declare const createCustomerAddressOperation = "createCustomerAddress post /account/address";
5
+ export declare function useCreateCustomerAddressMutation(mutationOptions?: UseMutationOptions<OperationResponse<typeof createCustomerAddressOperation>, unknown, OperationOptions<typeof createCustomerAddressOperation>>): UseMutationReturnType<{
6
+ additionalAddressLine1?: string;
7
+ additionalAddressLine2?: string;
8
+ city: string;
9
+ company?: string;
10
+ country?: components["schemas"]["Country"];
11
+ countryId: string;
12
+ countryState?: components["schemas"]["CountryState"];
13
+ countryStateId?: string;
14
+ readonly createdAt?: string;
15
+ customerId: string;
16
+ customFields?: GenericRecord;
17
+ department?: string;
18
+ firstName: string;
19
+ hash?: string;
20
+ id: string;
21
+ lastName: string;
22
+ phoneNumber?: string;
23
+ salutation?: components["schemas"]["Salutation"];
24
+ salutationId?: string;
25
+ street: string;
26
+ title?: string;
27
+ readonly updatedAt?: string;
28
+ zipcode?: string;
29
+ } & {
30
+ country: components["schemas"]["Country"];
31
+ countryState?: components["schemas"]["CountryState"] | null;
32
+ createdAt: string;
33
+ readonly customerId: string;
34
+ readonly id?: string;
35
+ salutation: components["schemas"]["Salutation"];
36
+ updatedAt: string | null;
37
+ }, unknown, OperationOptions<"createCustomerAddress post /account/address">, unknown, Omit< MutationObserverIdleResult<{
38
+ additionalAddressLine1?: string;
39
+ additionalAddressLine2?: string;
40
+ city: string;
41
+ company?: string;
42
+ country?: components["schemas"]["Country"];
43
+ countryId: string;
44
+ countryState?: components["schemas"]["CountryState"];
45
+ countryStateId?: string;
46
+ readonly createdAt?: string;
47
+ customerId: string;
48
+ customFields?: GenericRecord;
49
+ department?: string;
50
+ firstName: string;
51
+ hash?: string;
52
+ id: string;
53
+ lastName: string;
54
+ phoneNumber?: string;
55
+ salutation?: components["schemas"]["Salutation"];
56
+ salutationId?: string;
57
+ street: string;
58
+ title?: string;
59
+ readonly updatedAt?: string;
60
+ zipcode?: string;
61
+ } & {
62
+ country: components["schemas"]["Country"];
63
+ countryState?: components["schemas"]["CountryState"] | null;
64
+ createdAt: string;
65
+ readonly customerId: string;
66
+ readonly id?: string;
67
+ salutation: components["schemas"]["Salutation"];
68
+ updatedAt: string | null;
69
+ }, unknown, OperationOptions<"createCustomerAddress post /account/address">, unknown>, "mutate" | "reset"> | Omit< MutationObserverLoadingResult<{
70
+ additionalAddressLine1?: string;
71
+ additionalAddressLine2?: string;
72
+ city: string;
73
+ company?: string;
74
+ country?: components["schemas"]["Country"];
75
+ countryId: string;
76
+ countryState?: components["schemas"]["CountryState"];
77
+ countryStateId?: string;
78
+ readonly createdAt?: string;
79
+ customerId: string;
80
+ customFields?: GenericRecord;
81
+ department?: string;
82
+ firstName: string;
83
+ hash?: string;
84
+ id: string;
85
+ lastName: string;
86
+ phoneNumber?: string;
87
+ salutation?: components["schemas"]["Salutation"];
88
+ salutationId?: string;
89
+ street: string;
90
+ title?: string;
91
+ readonly updatedAt?: string;
92
+ zipcode?: string;
93
+ } & {
94
+ country: components["schemas"]["Country"];
95
+ countryState?: components["schemas"]["CountryState"] | null;
96
+ createdAt: string;
97
+ readonly customerId: string;
98
+ readonly id?: string;
99
+ salutation: components["schemas"]["Salutation"];
100
+ updatedAt: string | null;
101
+ }, unknown, OperationOptions<"createCustomerAddress post /account/address">, unknown>, "mutate" | "reset"> | Omit< MutationObserverErrorResult<{
102
+ additionalAddressLine1?: string;
103
+ additionalAddressLine2?: string;
104
+ city: string;
105
+ company?: string;
106
+ country?: components["schemas"]["Country"];
107
+ countryId: string;
108
+ countryState?: components["schemas"]["CountryState"];
109
+ countryStateId?: string;
110
+ readonly createdAt?: string;
111
+ customerId: string;
112
+ customFields?: GenericRecord;
113
+ department?: string;
114
+ firstName: string;
115
+ hash?: string;
116
+ id: string;
117
+ lastName: string;
118
+ phoneNumber?: string;
119
+ salutation?: components["schemas"]["Salutation"];
120
+ salutationId?: string;
121
+ street: string;
122
+ title?: string;
123
+ readonly updatedAt?: string;
124
+ zipcode?: string;
125
+ } & {
126
+ country: components["schemas"]["Country"];
127
+ countryState?: components["schemas"]["CountryState"] | null;
128
+ createdAt: string;
129
+ readonly customerId: string;
130
+ readonly id?: string;
131
+ salutation: components["schemas"]["Salutation"];
132
+ updatedAt: string | null;
133
+ }, unknown, OperationOptions<"createCustomerAddress post /account/address">, unknown>, "mutate" | "reset"> | Omit< MutationObserverSuccessResult<{
134
+ additionalAddressLine1?: string;
135
+ additionalAddressLine2?: string;
136
+ city: string;
137
+ company?: string;
138
+ country?: components["schemas"]["Country"];
139
+ countryId: string;
140
+ countryState?: components["schemas"]["CountryState"];
141
+ countryStateId?: string;
142
+ readonly createdAt?: string;
143
+ customerId: string;
144
+ customFields?: GenericRecord;
145
+ department?: string;
146
+ firstName: string;
147
+ hash?: string;
148
+ id: string;
149
+ lastName: string;
150
+ phoneNumber?: string;
151
+ salutation?: components["schemas"]["Salutation"];
152
+ salutationId?: string;
153
+ street: string;
154
+ title?: string;
155
+ readonly updatedAt?: string;
156
+ zipcode?: string;
157
+ } & {
158
+ country: components["schemas"]["Country"];
159
+ countryState?: components["schemas"]["CountryState"] | null;
160
+ createdAt: string;
161
+ readonly customerId: string;
162
+ readonly id?: string;
163
+ salutation: components["schemas"]["Salutation"];
164
+ updatedAt: string | null;
165
+ }, unknown, OperationOptions<"createCustomerAddress post /account/address">, unknown>, "mutate" | "reset">>;
166
+ export {};
@@ -0,0 +1,5 @@
1
+ import { UseMutationOptions, UseMutationReturnType, MutationObserverIdleResult, MutationObserverLoadingResult, MutationObserverErrorResult, MutationObserverSuccessResult } from '@tanstack/vue-query';
2
+ import { OperationOptions, OperationResponse } from '../types/query';
3
+ 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 {};
@@ -0,0 +1,48 @@
1
+ import { OperationOptions } from '../types/query';
2
+ import { UndefinedInitialQueryOptions, UseQueryReturnType } from '@tanstack/vue-query';
3
+ import { components, GenericRecord } from '../../../api-types/storeApiTypes';
4
+ 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", {
22
+ readonly body: unknown;
23
+ }]> & {
24
+ queryKey: readonly ["address", "list", {
25
+ readonly body: unknown;
26
+ }] & {
27
+ [dataTagSymbol]: {
28
+ elements: components["schemas"]["CustomerAddress"][];
29
+ } & {
30
+ aggregations?: GenericRecord[];
31
+ entity?: string;
32
+ limit?: number;
33
+ page?: number;
34
+ total?: number;
35
+ };
36
+ [dataTagErrorSymbol]: Error;
37
+ };
38
+ };
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>;
48
+ export {};
@@ -0,0 +1,4 @@
1
+ export * from './useAddLineItemMutation';
2
+ export * from './useReadCartQuery';
3
+ export * from './useRemoveLineItemMutation';
4
+ export * from './useUpdateLineItemMutation';
@@ -0,0 +1,131 @@
1
+ import { UseMutationOptions, UseMutationReturnType, MutationObserverIdleResult, MutationObserverLoadingResult, MutationObserverErrorResult, MutationObserverSuccessResult } from '@tanstack/vue-query';
2
+ import { OperationBody, OperationResponse } from '../types/query';
3
+ import { components } from '../../../api-types/storeApiTypes';
4
+ declare const addCartItemOperation = "addLineItem post /checkout/cart/line-item";
5
+ type LineItem = OperationBody<typeof addCartItemOperation>['items'][number];
6
+ type LineItemPayload = Partial<Omit<LineItem, 'id' | 'quantity' | 'type'>> & Required<Pick<LineItem, 'id' | 'quantity' | 'type'>>;
7
+ type Body = Omit<OperationBody<typeof addCartItemOperation>, 'items'> & {
8
+ items: LineItemPayload[];
9
+ };
10
+ export declare function useAddLineItemMutation(mutationOptions: UseMutationOptions<OperationResponse<typeof addCartItemOperation>, unknown, Body>): UseMutationReturnType<{
11
+ affiliateCode?: string | null;
12
+ apiAlias: "cart";
13
+ campaignCode?: string | null;
14
+ customerComment?: string | null;
15
+ deliveries?: components["schemas"]["CartDelivery"][];
16
+ errors?: components["schemas"]["CartError"][] | {
17
+ [key: string]: {
18
+ code: number;
19
+ key: string;
20
+ level: number;
21
+ message: string;
22
+ messageKey: string;
23
+ };
24
+ };
25
+ lineItems?: components["schemas"]["LineItem"][];
26
+ modified?: boolean;
27
+ name?: string;
28
+ price: components["schemas"]["CalculatedPrice"];
29
+ token?: string;
30
+ transactions?: {
31
+ amount?: components["schemas"]["CalculatedPrice"];
32
+ paymentMethodId?: string;
33
+ }[];
34
+ }, unknown, Body, unknown, Omit< MutationObserverIdleResult<{
35
+ affiliateCode?: string | null;
36
+ apiAlias: "cart";
37
+ campaignCode?: string | null;
38
+ customerComment?: string | null;
39
+ deliveries?: components["schemas"]["CartDelivery"][];
40
+ errors?: components["schemas"]["CartError"][] | {
41
+ [key: string]: {
42
+ code: number;
43
+ key: string;
44
+ level: number;
45
+ message: string;
46
+ messageKey: string;
47
+ };
48
+ };
49
+ lineItems?: components["schemas"]["LineItem"][];
50
+ modified?: boolean;
51
+ name?: string;
52
+ price: components["schemas"]["CalculatedPrice"];
53
+ token?: string;
54
+ transactions?: {
55
+ amount?: components["schemas"]["CalculatedPrice"];
56
+ paymentMethodId?: string;
57
+ }[];
58
+ }, unknown, Body, unknown>, "mutate" | "reset"> | Omit< MutationObserverLoadingResult<{
59
+ affiliateCode?: string | null;
60
+ apiAlias: "cart";
61
+ campaignCode?: string | null;
62
+ customerComment?: string | null;
63
+ deliveries?: components["schemas"]["CartDelivery"][];
64
+ errors?: components["schemas"]["CartError"][] | {
65
+ [key: string]: {
66
+ code: number;
67
+ key: string;
68
+ level: number;
69
+ message: string;
70
+ messageKey: string;
71
+ };
72
+ };
73
+ lineItems?: components["schemas"]["LineItem"][];
74
+ modified?: boolean;
75
+ name?: string;
76
+ price: components["schemas"]["CalculatedPrice"];
77
+ token?: string;
78
+ transactions?: {
79
+ amount?: components["schemas"]["CalculatedPrice"];
80
+ paymentMethodId?: string;
81
+ }[];
82
+ }, unknown, Body, unknown>, "mutate" | "reset"> | Omit< MutationObserverErrorResult<{
83
+ affiliateCode?: string | null;
84
+ apiAlias: "cart";
85
+ campaignCode?: string | null;
86
+ customerComment?: string | null;
87
+ deliveries?: components["schemas"]["CartDelivery"][];
88
+ errors?: components["schemas"]["CartError"][] | {
89
+ [key: string]: {
90
+ code: number;
91
+ key: string;
92
+ level: number;
93
+ message: string;
94
+ messageKey: string;
95
+ };
96
+ };
97
+ lineItems?: components["schemas"]["LineItem"][];
98
+ modified?: boolean;
99
+ name?: string;
100
+ price: components["schemas"]["CalculatedPrice"];
101
+ token?: string;
102
+ transactions?: {
103
+ amount?: components["schemas"]["CalculatedPrice"];
104
+ paymentMethodId?: string;
105
+ }[];
106
+ }, unknown, Body, unknown>, "mutate" | "reset"> | Omit< MutationObserverSuccessResult<{
107
+ affiliateCode?: string | null;
108
+ apiAlias: "cart";
109
+ campaignCode?: string | null;
110
+ customerComment?: string | null;
111
+ deliveries?: components["schemas"]["CartDelivery"][];
112
+ errors?: components["schemas"]["CartError"][] | {
113
+ [key: string]: {
114
+ code: number;
115
+ key: string;
116
+ level: number;
117
+ message: string;
118
+ messageKey: string;
119
+ };
120
+ };
121
+ lineItems?: components["schemas"]["LineItem"][];
122
+ modified?: boolean;
123
+ name?: string;
124
+ price: components["schemas"]["CalculatedPrice"];
125
+ token?: string;
126
+ transactions?: {
127
+ amount?: components["schemas"]["CalculatedPrice"];
128
+ paymentMethodId?: string;
129
+ }[];
130
+ }, unknown, Body, unknown>, "mutate" | "reset">>;
131
+ export {};
@@ -0,0 +1,108 @@
1
+ import { OperationOptions } from '../types/query';
2
+ import { UndefinedInitialQueryOptions, UseQueryReturnType } from '@tanstack/vue-query';
3
+ import { components } from '../../../api-types/storeApiTypes';
4
+ 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"]> & {
54
+ 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
+ };
80
+ [dataTagErrorSymbol]: Error;
81
+ };
82
+ };
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>;
108
+ export {};
@@ -0,0 +1,136 @@
1
+ import { UseMutationOptions, UseMutationReturnType, MutationObserverIdleResult, MutationObserverLoadingResult, MutationObserverErrorResult, MutationObserverSuccessResult } from '@tanstack/vue-query';
2
+ import { OperationBody, OperationResponse } from '../types/query';
3
+ import { components } from '../../../api-types/storeApiTypes';
4
+ 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
+ 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
+ }, unknown, {
30
+ ids: [string, ...string[]];
31
+ }, unknown, Omit< MutationObserverIdleResult<{
32
+ affiliateCode?: string | null;
33
+ apiAlias: "cart";
34
+ campaignCode?: string | null;
35
+ customerComment?: string | null;
36
+ deliveries?: components["schemas"]["CartDelivery"][];
37
+ errors?: components["schemas"]["CartError"][] | {
38
+ [key: string]: {
39
+ code: number;
40
+ key: string;
41
+ level: number;
42
+ message: string;
43
+ messageKey: string;
44
+ };
45
+ };
46
+ lineItems?: components["schemas"]["LineItem"][];
47
+ modified?: boolean;
48
+ name?: string;
49
+ price: components["schemas"]["CalculatedPrice"];
50
+ token?: string;
51
+ transactions?: {
52
+ amount?: components["schemas"]["CalculatedPrice"];
53
+ paymentMethodId?: string;
54
+ }[];
55
+ }, unknown, {
56
+ ids: [string, ...string[]];
57
+ }, unknown>, "mutate" | "reset"> | Omit< MutationObserverLoadingResult<{
58
+ affiliateCode?: string | null;
59
+ apiAlias: "cart";
60
+ campaignCode?: string | null;
61
+ customerComment?: string | null;
62
+ deliveries?: components["schemas"]["CartDelivery"][];
63
+ errors?: components["schemas"]["CartError"][] | {
64
+ [key: string]: {
65
+ code: number;
66
+ key: string;
67
+ level: number;
68
+ message: string;
69
+ messageKey: string;
70
+ };
71
+ };
72
+ lineItems?: components["schemas"]["LineItem"][];
73
+ modified?: boolean;
74
+ name?: string;
75
+ price: components["schemas"]["CalculatedPrice"];
76
+ token?: string;
77
+ transactions?: {
78
+ amount?: components["schemas"]["CalculatedPrice"];
79
+ paymentMethodId?: string;
80
+ }[];
81
+ }, unknown, {
82
+ ids: [string, ...string[]];
83
+ }, unknown>, "mutate" | "reset"> | Omit< MutationObserverErrorResult<{
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
+ }, unknown, {
108
+ ids: [string, ...string[]];
109
+ }, unknown>, "mutate" | "reset"> | Omit< MutationObserverSuccessResult<{
110
+ affiliateCode?: string | null;
111
+ apiAlias: "cart";
112
+ campaignCode?: string | null;
113
+ customerComment?: string | null;
114
+ deliveries?: components["schemas"]["CartDelivery"][];
115
+ errors?: components["schemas"]["CartError"][] | {
116
+ [key: string]: {
117
+ code: number;
118
+ key: string;
119
+ level: number;
120
+ message: string;
121
+ messageKey: string;
122
+ };
123
+ };
124
+ lineItems?: components["schemas"]["LineItem"][];
125
+ modified?: boolean;
126
+ name?: string;
127
+ price: components["schemas"]["CalculatedPrice"];
128
+ token?: string;
129
+ transactions?: {
130
+ amount?: components["schemas"]["CalculatedPrice"];
131
+ paymentMethodId?: string;
132
+ }[];
133
+ }, unknown, {
134
+ ids: [string, ...string[]];
135
+ }, unknown>, "mutate" | "reset">>;
136
+ export {};