@shopware/composables 0.0.0-canary-20250116155626

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 (137) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +172 -0
  3. package/composables/index.ts +1 -0
  4. package/dist/index.d.mts +2239 -0
  5. package/dist/index.d.ts +2239 -0
  6. package/dist/index.mjs +2686 -0
  7. package/nuxt.config.ts +14 -0
  8. package/package.json +83 -0
  9. package/src/_test/index.ts +1 -0
  10. package/src/_test/useSetup.ts +43 -0
  11. package/src/cms/README.md +9 -0
  12. package/src/cms/cmsAssociations.ts +28 -0
  13. package/src/cms/index.ts +2 -0
  14. package/src/cms/useCmsElementConfig.test.ts +145 -0
  15. package/src/cms/useCmsElementConfig.ts +29 -0
  16. package/src/cms/useCmsElementImage.test.ts +179 -0
  17. package/src/cms/useCmsElementImage.ts +103 -0
  18. package/src/cms/useCmsElementProductBox.test.ts +15 -0
  19. package/src/cms/useCmsElementProductBox.ts +25 -0
  20. package/src/createShopwareContext.test.ts +23 -0
  21. package/src/createShopwareContext.ts +43 -0
  22. package/src/devtools/plugin.ts +201 -0
  23. package/src/helpers/ContextError.spec.ts +20 -0
  24. package/src/helpers/ContextError.ts +6 -0
  25. package/src/index.test.ts +54 -0
  26. package/src/index.ts +111 -0
  27. package/src/mocks/Cart.ts +774 -0
  28. package/src/mocks/CmsPage.ts +544 -0
  29. package/src/mocks/CmsProductBox.ts +377 -0
  30. package/src/mocks/Configurator.ts +123 -0
  31. package/src/mocks/Country.ts +184 -0
  32. package/src/mocks/CrossSellingResponse.ts +552 -0
  33. package/src/mocks/LandingPage.ts +62 -0
  34. package/src/mocks/Menu.ts +598 -0
  35. package/src/mocks/Order.ts +1151 -0
  36. package/src/mocks/Product.ts +473 -0
  37. package/src/mocks/ProductTierPrices.ts +771 -0
  38. package/src/mocks/Salutations.ts +51 -0
  39. package/src/mocks/Search.ts +518 -0
  40. package/src/types/cmsBlockTypes.ts +80 -0
  41. package/src/types/cmsElementTypes.ts +381 -0
  42. package/src/types/cmsSectionTypes.ts +15 -0
  43. package/src/types/index.ts +52 -0
  44. package/src/useAddToCart/useAddToCart.test.ts +39 -0
  45. package/src/useAddToCart/useAddToCart.ts +90 -0
  46. package/src/useAddress/useAddress.test.ts +134 -0
  47. package/src/useAddress/useAddress.ts +202 -0
  48. package/src/useB2bQuoteManagement/useB2bQuoteManagement.test.ts +137 -0
  49. package/src/useB2bQuoteManagement/useB2bQuoteManagement.ts +225 -0
  50. package/src/useBreadcrumbs/useBreadcrumbs.test.ts +71 -0
  51. package/src/useBreadcrumbs/useBreadcrumbs.ts +89 -0
  52. package/src/useCart/useCart.test.ts +251 -0
  53. package/src/useCart/useCart.ts +314 -0
  54. package/src/useCartErrorParamsResolver/useCartErrorParamsResolver.test.ts +122 -0
  55. package/src/useCartErrorParamsResolver/useCartErrorParamsResolver.ts +80 -0
  56. package/src/useCartItem/useCartItem.test.ts +168 -0
  57. package/src/useCartItem/useCartItem.ts +157 -0
  58. package/src/useCartNotification/useCartNotification.test.ts +129 -0
  59. package/src/useCartNotification/useCartNotification.ts +63 -0
  60. package/src/useCategory/useCategory.test.ts +14 -0
  61. package/src/useCategory/useCategory.ts +32 -0
  62. package/src/useCategorySearch/useCategorySearch.test.ts +98 -0
  63. package/src/useCategorySearch/useCategorySearch.ts +81 -0
  64. package/src/useCheckout/useCheckout.test.ts +104 -0
  65. package/src/useCheckout/useCheckout.ts +163 -0
  66. package/src/useCmsBlock/useCmsBlock.test.ts +25 -0
  67. package/src/useCmsBlock/useCmsBlock.ts +36 -0
  68. package/src/useCmsMeta/useCmsMeta.test.ts +17 -0
  69. package/src/useCmsMeta/useCmsMeta.ts +46 -0
  70. package/src/useCmsSection/useCmsSection.test.ts +18 -0
  71. package/src/useCmsSection/useCmsSection.ts +39 -0
  72. package/src/useCmsTranslations/useCmsTranslations.test.ts +10 -0
  73. package/src/useCmsTranslations/useCmsTranslations.ts +9 -0
  74. package/src/useContext/useContext.ts +36 -0
  75. package/src/useCountries/useCountries.test.ts +64 -0
  76. package/src/useCountries/useCountries.ts +64 -0
  77. package/src/useCustomerOrders/useCustomerOrders.test.ts +47 -0
  78. package/src/useCustomerOrders/useCustomerOrders.ts +89 -0
  79. package/src/useCustomerPassword/useCustomerPassword.test.ts +164 -0
  80. package/src/useCustomerPassword/useCustomerPassword.ts +57 -0
  81. package/src/useDefaultOrderAssociations/useDefaultOrderAssociations.test.ts +41 -0
  82. package/src/useDefaultOrderAssociations/useDefaultOrderAssociations.ts +45 -0
  83. package/src/useInternationalization/useInternationalization.test.ts +155 -0
  84. package/src/useInternationalization/useInternationalization.ts +159 -0
  85. package/src/useLandingSearch/useLandingSearch.test.ts +30 -0
  86. package/src/useLandingSearch/useLandingSearch.ts +58 -0
  87. package/src/useListing/useListing.test.ts +249 -0
  88. package/src/useListing/useListing.ts +592 -0
  89. package/src/useLocalWishlist/useLocalWishlist.test.ts +54 -0
  90. package/src/useLocalWishlist/useLocalWishlist.ts +95 -0
  91. package/src/useNavigation/useNavigation.test.ts +68 -0
  92. package/src/useNavigation/useNavigation.ts +83 -0
  93. package/src/useNavigationContext/useNavigationContext.test.ts +48 -0
  94. package/src/useNavigationContext/useNavigationContext.ts +39 -0
  95. package/src/useNavigationSearch/useNavigationSearch.test.ts +110 -0
  96. package/src/useNavigationSearch/useNavigationSearch.ts +60 -0
  97. package/src/useNewsletter/useNewsletter.test.ts +55 -0
  98. package/src/useNewsletter/useNewsletter.ts +109 -0
  99. package/src/useNotifications/useNotifications.test.ts +56 -0
  100. package/src/useNotifications/useNotifications.ts +119 -0
  101. package/src/useOrderDetails/useOrderDetails.test.ts +224 -0
  102. package/src/useOrderDetails/useOrderDetails.ts +329 -0
  103. package/src/useOrderPayment/useOrderPayment.test.ts +80 -0
  104. package/src/useOrderPayment/useOrderPayment.ts +119 -0
  105. package/src/usePrice/usePrice.test.ts +97 -0
  106. package/src/usePrice/usePrice.ts +106 -0
  107. package/src/useProduct/useProduct.test.ts +36 -0
  108. package/src/useProduct/useProduct.ts +56 -0
  109. package/src/useProductAssociations/useProductAssociations.spec.ts +105 -0
  110. package/src/useProductAssociations/useProductAssociations.ts +107 -0
  111. package/src/useProductConfigurator/useProductConfigurator.spec.ts +77 -0
  112. package/src/useProductConfigurator/useProductConfigurator.ts +134 -0
  113. package/src/useProductPrice/useProductPrice.test.ts +126 -0
  114. package/src/useProductPrice/useProductPrice.ts +131 -0
  115. package/src/useProductReviews/useProductReviews.test.ts +45 -0
  116. package/src/useProductReviews/useProductReviews.ts +80 -0
  117. package/src/useProductSearch/useProductSearch.test.ts +37 -0
  118. package/src/useProductSearch/useProductSearch.ts +58 -0
  119. package/src/useProductSearchSuggest/useProductSearchSuggest.test.ts +19 -0
  120. package/src/useProductSearchSuggest/useProductSearchSuggest.ts +67 -0
  121. package/src/useProductWishlist/useProductWishlist.test.ts +63 -0
  122. package/src/useProductWishlist/useProductWishlist.ts +74 -0
  123. package/src/useSalutations/useSalutations.spec.ts +37 -0
  124. package/src/useSalutations/useSalutations.ts +55 -0
  125. package/src/useSessionContext/useSessionContext.test.ts +221 -0
  126. package/src/useSessionContext/useSessionContext.ts +281 -0
  127. package/src/useShopwareContext/useShopwareContext.test.ts +8 -0
  128. package/src/useShopwareContext/useShopwareContext.ts +31 -0
  129. package/src/useSyncWishlist/useSyncWishlist.test.ts +117 -0
  130. package/src/useSyncWishlist/useSyncWishlist.ts +117 -0
  131. package/src/useUrlResolver/useUrlResolver.test.ts +25 -0
  132. package/src/useUrlResolver/useUrlResolver.ts +31 -0
  133. package/src/useUser/useUser.test.ts +290 -0
  134. package/src/useUser/useUser.ts +321 -0
  135. package/src/useWishlist/useWishlist.test.ts +178 -0
  136. package/src/useWishlist/useWishlist.ts +128 -0
  137. package/types/api-types.ts +11 -0
@@ -0,0 +1,51 @@
1
+ import type { Schemas } from "#shopware";
2
+
3
+ const salutations: Schemas["Salutation"][] = [
4
+ {
5
+ translated: {
6
+ displayName: "Mr.",
7
+ letterName: "Dear Mr.",
8
+ customFields: {},
9
+ },
10
+ createdAt: "2020-08-06T06:23:29.757+00:00",
11
+ updatedAt: "2020-08-06T06:26:29.283+00:00",
12
+ salutationKey: "mr",
13
+ displayName: "Mr.",
14
+ letterName: "Dear Mr.",
15
+ customFields: null,
16
+ id: "d5e543063dd642b48ef94b02d68e5785",
17
+ apiAlias: "salutation",
18
+ },
19
+ {
20
+ translated: {
21
+ displayName: "Mrs.",
22
+ letterName: "Dear Mrs.",
23
+ customFields: {},
24
+ },
25
+ createdAt: "2020-08-06T06:23:29.768+00:00",
26
+ updatedAt: "2020-08-06T06:26:29.267+00:00",
27
+ salutationKey: "mrs",
28
+ displayName: "Mrs.",
29
+ letterName: "Dear Mrs.",
30
+ customFields: null,
31
+ id: "fef89b093c4843af86f26a07d0e81108",
32
+ apiAlias: "salutation",
33
+ },
34
+ {
35
+ translated: {
36
+ displayName: "Not specified",
37
+ letterName: " ",
38
+ customFields: {},
39
+ },
40
+ createdAt: "2020-08-06T06:23:29.780+00:00",
41
+ updatedAt: "2020-08-06T06:26:29.274+00:00",
42
+ salutationKey: "not_specified",
43
+ displayName: "Not specified",
44
+ letterName: " ",
45
+ customFields: null,
46
+ id: "b84038d62c3f4d66b3bc626df7fa949e",
47
+ apiAlias: "salutation",
48
+ },
49
+ ] as unknown as Schemas["Salutation"][];
50
+
51
+ export default salutations;
@@ -0,0 +1,518 @@
1
+ const Search = {
2
+ extensions: {
3
+ multiSearchResult: {
4
+ searchResults: {
5
+ product_manufacturer: {
6
+ elements: [],
7
+ aggregations: [],
8
+ page: 1,
9
+ limit: 30,
10
+ entity: "product_manufacturer",
11
+ total: 0,
12
+ states: [],
13
+ apiAlias: "dal_entity_search_result",
14
+ },
15
+ category: {
16
+ elements: [],
17
+ aggregations: [],
18
+ page: 1,
19
+ limit: 30,
20
+ entity: "category",
21
+ total: 0,
22
+ states: [],
23
+ apiAlias: "dal_entity_search_result",
24
+ },
25
+ },
26
+ apiAlias:
27
+ "shopware_commercial_advanced_search_domain_search_multi_search_result",
28
+ },
29
+ },
30
+ elements: [
31
+ {
32
+ extensions: {
33
+ foreignKeys: {
34
+ swagCustomizedProductsTemplateId: null,
35
+ swagCustomizedProductsTemplateVersionId:
36
+ "0fa91ce3e96a4bc2be4bd9ce752c3425",
37
+ apiAlias: "product_foreign_keys_extension",
38
+ },
39
+ search: {
40
+ extensions: [],
41
+ _uniqueIdentifier: null,
42
+ translated: [],
43
+ id: "81080519182c496f86722fa417f9106b",
44
+ productNumber: "SW10069",
45
+ autoIncrement: 28,
46
+ _score: "280",
47
+ },
48
+ },
49
+ versionId: "0fa91ce3e96a4bc2be4bd9ce752c3425",
50
+ translated: {
51
+ metaDescription: null,
52
+ name: "\u00bbArctic Rose\u00ab IKARIMI\u00ae salmon filet",
53
+ keywords: null,
54
+ description:
55
+ "\u003Cp\u003ELorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu.\u003C/p\u003E\n\u003Cp\u003EIn enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus.\u003C/p\u003E\n\u003Cp\u003EPhasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem.\u003C/p\u003E\n\u003Cp\u003EMaecenas nec odio et ante tincidunt tempus. Donec vitae sapien ut libero venenatis faucibus. Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna. Sed consequat, leo eget bibendum sodales, augue velit cursus nunc, quis gravida magna mi a libero. Fusce vulputate eleifend sapien. Vestibulum purus quam, scelerisque ut, mollis sed, nonummy id, metus. Nullam accumsan lorem in dui. Cras ultricies mi eu turpis hendrerit fringilla. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; In ac dui quis mi.\u003C/p\u003E",
56
+ metaTitle: null,
57
+ packUnit: null,
58
+ packUnitPlural: null,
59
+ customFields: {},
60
+ },
61
+ createdAt: "2020-08-06T06:26:32.805+00:00",
62
+ updatedAt: "2024-03-12T10:26:08.297+00:00",
63
+ parentId: null,
64
+ childCount: 0,
65
+ taxId: "d55571c0b59a4a538fe44f16a3a206c3",
66
+ manufacturerId: "432878e43ca440aab3afb211b2b79aba",
67
+ unitId: "83baf03daaeb44a6b736e99c85d4c102",
68
+ active: true,
69
+ displayGroup: "c3405c060fb26fe8a4a53329bedc46e4",
70
+ manufacturerNumber: null,
71
+ ean: null,
72
+ sales: 11,
73
+ productNumber: "SW10069",
74
+ stock: -56,
75
+ availableStock: -56,
76
+ available: true,
77
+ deliveryTimeId: "0caaf7f6131142f6b1fa81f3e3f6c0fb",
78
+ deliveryTime: {
79
+ translated: {
80
+ name: "1-3 days",
81
+ customFields: {},
82
+ },
83
+ createdAt: "2020-08-06T06:26:54.178+00:00",
84
+ updatedAt: "2020-08-06T06:26:54.182+00:00",
85
+ name: "1-3 days",
86
+ min: 1,
87
+ max: 3,
88
+ unit: "day",
89
+ customFields: null,
90
+ id: "0caaf7f6131142f6b1fa81f3e3f6c0fb",
91
+ apiAlias: "delivery_time",
92
+ },
93
+ restockTime: 1,
94
+ isCloseout: false,
95
+ purchaseSteps: 1,
96
+ maxPurchase: null,
97
+ minPurchase: 1,
98
+ purchaseUnit: 0.8,
99
+ referenceUnit: 1,
100
+ shippingFree: true,
101
+ markAsTopseller: false,
102
+ weight: null,
103
+ width: null,
104
+ height: null,
105
+ length: null,
106
+ releaseDate: null,
107
+ categoryTree: [
108
+ "525abe8981214bd2ba94fd33942333ec",
109
+ "bda4b60e845240b2b9d6b60e71196e14",
110
+ "ca15f1e906204da49afe666bbcca7825",
111
+ "fdc5f48ae7064410a07587fd7b8c3deb",
112
+ "eebe32ca93e94b7590c65a55a61d4cf9",
113
+ ],
114
+ streamIds: [
115
+ "1318833f46df457981763b94179d9ef0",
116
+ "5675448d6b3a4dd2a659d31a3dde74da",
117
+ ],
118
+ optionIds: null,
119
+ propertyIds: null,
120
+ name: "\u00bbArctic Rose\u00ab IKARIMI\u00ae salmon filet",
121
+ keywords: null,
122
+ description:
123
+ "\u003Cp\u003ELorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu.\u003C/p\u003E\n\u003Cp\u003EIn enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus.\u003C/p\u003E\n\u003Cp\u003EPhasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem.\u003C/p\u003E\n\u003Cp\u003EMaecenas nec odio et ante tincidunt tempus. Donec vitae sapien ut libero venenatis faucibus. Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna. Sed consequat, leo eget bibendum sodales, augue velit cursus nunc, quis gravida magna mi a libero. Fusce vulputate eleifend sapien. Vestibulum purus quam, scelerisque ut, mollis sed, nonummy id, metus. Nullam accumsan lorem in dui. Cras ultricies mi eu turpis hendrerit fringilla. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; In ac dui quis mi.\u003C/p\u003E",
124
+ metaDescription: null,
125
+ metaTitle: null,
126
+ packUnit: null,
127
+ packUnitPlural: null,
128
+ tax: {
129
+ translated: [],
130
+ createdAt: "2020-08-06T06:23:32.056+00:00",
131
+ updatedAt: "2020-08-06T06:26:46.462+00:00",
132
+ taxRate: 19,
133
+ name: "19%",
134
+ position: 0,
135
+ customFields: null,
136
+ id: "d55571c0b59a4a538fe44f16a3a206c3",
137
+ apiAlias: "tax",
138
+ },
139
+ manufacturer: {
140
+ versionId: "0fa91ce3e96a4bc2be4bd9ce752c3425",
141
+ translated: {
142
+ name: "Deutsche See",
143
+ description:
144
+ "\u003Cp\u003E You can find further information about this manufacturer \u003Ca href=\u0022http://www.deutschesee.de/\u0022 target=\u0022_blank\u0022\u003Ehere\u003C/a\u003E.\u0026nbsp;\u003C/p\u003E",
145
+ customFields: {},
146
+ },
147
+ createdAt: "2020-08-06T06:26:30.597+00:00",
148
+ updatedAt: null,
149
+ mediaId: "7fe01085296d4ece9d3738d781d287ca",
150
+ name: "Deutsche See",
151
+ link: "http://www.deutschesee.de/",
152
+ description:
153
+ "\u003Cp\u003E You can find further information about this manufacturer \u003Ca href=\u0022http://www.deutschesee.de/\u0022 target=\u0022_blank\u0022\u003Ehere\u003C/a\u003E.\u0026nbsp;\u003C/p\u003E",
154
+ media: null,
155
+ translations: null,
156
+ customFields: null,
157
+ id: "432878e43ca440aab3afb211b2b79aba",
158
+ apiAlias: "product_manufacturer",
159
+ },
160
+ unit: {
161
+ translated: {
162
+ shortCode: "kg",
163
+ name: "kilogramme",
164
+ customFields: {},
165
+ },
166
+ createdAt: "2020-08-06T06:26:30.701+00:00",
167
+ updatedAt: null,
168
+ shortCode: "kg",
169
+ name: "kilogramme",
170
+ customFields: null,
171
+ id: "83baf03daaeb44a6b736e99c85d4c102",
172
+ apiAlias: "unit",
173
+ },
174
+ cover: {
175
+ versionId: "0fa91ce3e96a4bc2be4bd9ce752c3425",
176
+ translated: [],
177
+ createdAt: "2020-08-06T06:26:32.797+00:00",
178
+ updatedAt: "2023-06-26T18:52:41.032+00:00",
179
+ productId: "81080519182c496f86722fa417f9106b",
180
+ mediaId: "934204c929db48fdb9feba2a75563c65",
181
+ position: 0,
182
+ media: {
183
+ translated: {
184
+ alt: null,
185
+ title: null,
186
+ customFields: {},
187
+ },
188
+ createdAt: "2020-08-06T06:25:58.986+00:00",
189
+ updatedAt: "2020-08-06T06:26:32.797+00:00",
190
+ mimeType: "image/jpeg",
191
+ fileExtension: "jpg",
192
+ fileSize: 170827,
193
+ title: null,
194
+ metaData: {
195
+ type: 2,
196
+ width: 1010,
197
+ height: 730,
198
+ },
199
+ uploadedAt: null,
200
+ alt: null,
201
+ url: "https://cdn.shopware.store/a/B/m/pPkDE/media/b1/48/d9/SW10069.jpg?1596695192",
202
+ fileName: "SW10069",
203
+ translations: null,
204
+ thumbnails: [
205
+ {
206
+ translated: [],
207
+ createdAt: "2020-08-06T06:25:58.984+00:00",
208
+ updatedAt: "2020-08-06T06:26:32.795+00:00",
209
+ width: 400,
210
+ path: "thumbnail/b1/48/d9/SW10069_400x400.jpg",
211
+ height: 400,
212
+ url: "https://cdn.shopware.store/a/B/m/pPkDE/thumbnail/b1/48/d9/SW10069_400x400.jpg?1596695192",
213
+ mediaId: "934204c929db48fdb9feba2a75563c65",
214
+ customFields: null,
215
+ id: "83853fda8fbe4d38a2f8c32d1bac2e5a",
216
+ apiAlias: "media_thumbnail",
217
+ },
218
+ {
219
+ translated: [],
220
+ createdAt: "2020-08-06T06:25:58.985+00:00",
221
+ updatedAt: "2020-08-06T06:26:32.796+00:00",
222
+ width: 1920,
223
+ path: "thumbnail/b1/48/d9/SW10069_1920x1920.jpg",
224
+ height: 1920,
225
+ url: "https://cdn.shopware.store/a/B/m/pPkDE/thumbnail/b1/48/d9/SW10069_1920x1920.jpg?1596695192",
226
+ mediaId: "934204c929db48fdb9feba2a75563c65",
227
+ customFields: null,
228
+ id: "a7101873fcfd4380b964ca6dc4fdd771",
229
+ apiAlias: "media_thumbnail",
230
+ },
231
+ {
232
+ translated: [],
233
+ createdAt: "2020-08-06T06:25:58.986+00:00",
234
+ updatedAt: "2020-08-06T06:26:32.797+00:00",
235
+ width: 800,
236
+ path: "thumbnail/b1/48/d9/SW10069_800x800.jpg",
237
+ height: 800,
238
+ url: "https://cdn.shopware.store/a/B/m/pPkDE/thumbnail/b1/48/d9/SW10069_800x800.jpg?1596695192",
239
+ mediaId: "934204c929db48fdb9feba2a75563c65",
240
+ customFields: null,
241
+ id: "de7a1b3d975e495fb94b0edee64e3ac9",
242
+ apiAlias: "media_thumbnail",
243
+ },
244
+ ],
245
+ hasFile: true,
246
+ private: false,
247
+ path: "media/b1/48/d9/SW10069.jpg",
248
+ config: null,
249
+ customFields: null,
250
+ id: "934204c929db48fdb9feba2a75563c65",
251
+ apiAlias: "media",
252
+ },
253
+ customFields: null,
254
+ id: "0840c89c4d834c529f28d273ea8990cd",
255
+ apiAlias: "product_media",
256
+ },
257
+ parent: null,
258
+ children: null,
259
+ media: null,
260
+ cmsPageId: "7a6d253a67204037966f42b0119704d5",
261
+ cmsPage: null,
262
+ translations: null,
263
+ categories: null,
264
+ tags: null,
265
+ properties: null,
266
+ options: [],
267
+ configuratorSettings: null,
268
+ categoriesRo: null,
269
+ coverId: "0840c89c4d834c529f28d273ea8990cd",
270
+ tagIds: null,
271
+ categoryIds: ["eebe32ca93e94b7590c65a55a61d4cf9"],
272
+ productReviews: null,
273
+ ratingAverage: null,
274
+ mainCategories: null,
275
+ seoUrls: null,
276
+ crossSellings: null,
277
+ canonicalProductId: null,
278
+ canonicalProduct: null,
279
+ streams: null,
280
+ downloads: null,
281
+ states: ["is-physical"],
282
+ customFields: {},
283
+ id: "81080519182c496f86722fa417f9106b",
284
+ calculatedPrices: [],
285
+ calculatedPrice: {
286
+ unitPrice: 39.9,
287
+ quantity: 1,
288
+ totalPrice: 39.9,
289
+ calculatedTaxes: [
290
+ {
291
+ tax: 2.61,
292
+ taxRate: 7,
293
+ price: 39.9,
294
+ apiAlias: "cart_tax_calculated",
295
+ },
296
+ ],
297
+ taxRules: [
298
+ {
299
+ taxRate: 7,
300
+ percentage: 100,
301
+ apiAlias: "cart_tax_rule",
302
+ },
303
+ ],
304
+ referencePrice: {
305
+ purchaseUnit: 0.8,
306
+ referenceUnit: 1,
307
+ unitName: "kilogramme",
308
+ price: 49.88,
309
+ apiAlias: "cart_price_reference",
310
+ },
311
+ listPrice: null,
312
+ regulationPrice: {
313
+ price: 10,
314
+ apiAlias: "cart_regulation_price",
315
+ },
316
+ apiAlias: "calculated_price",
317
+ },
318
+ sortedProperties: null,
319
+ calculatedCheapestPrice: {
320
+ unitPrice: 39.9,
321
+ quantity: 1,
322
+ totalPrice: 39.9,
323
+ calculatedTaxes: [
324
+ {
325
+ tax: 2.61,
326
+ taxRate: 7,
327
+ price: 39.9,
328
+ apiAlias: "cart_tax_calculated",
329
+ },
330
+ ],
331
+ taxRules: [
332
+ {
333
+ taxRate: 7,
334
+ percentage: 100,
335
+ apiAlias: "cart_tax_rule",
336
+ },
337
+ ],
338
+ referencePrice: {
339
+ purchaseUnit: 0.8,
340
+ referenceUnit: 1,
341
+ unitName: "kilogramme",
342
+ price: 49.88,
343
+ apiAlias: "cart_price_reference",
344
+ },
345
+ listPrice: null,
346
+ regulationPrice: {
347
+ price: 10,
348
+ apiAlias: "cart_regulation_price",
349
+ },
350
+ hasRange: false,
351
+ variantId: "81080519182c496f86722fa417f9106b",
352
+ apiAlias: "calculated_cheapest_price",
353
+ },
354
+ isNew: false,
355
+ calculatedMaxPurchase: 100,
356
+ seoCategory: null,
357
+ apiAlias: "product",
358
+ },
359
+ ],
360
+ aggregations: {
361
+ manufacturer: {
362
+ name: "manufacturer",
363
+ entities: [
364
+ {
365
+ versionId: "0fa91ce3e96a4bc2be4bd9ce752c3425",
366
+ translated: {
367
+ name: "Deutsche See",
368
+ description:
369
+ "\u003Cp\u003E You can find further information about this manufacturer \u003Ca href=\u0022http://www.deutschesee.de/\u0022 target=\u0022_blank\u0022\u003Ehere\u003C/a\u003E.\u0026nbsp;\u003C/p\u003E",
370
+ customFields: {},
371
+ },
372
+ createdAt: "2020-08-06T06:26:30.597+00:00",
373
+ updatedAt: null,
374
+ mediaId: "7fe01085296d4ece9d3738d781d287ca",
375
+ name: "Deutsche See",
376
+ link: "http://www.deutschesee.de/",
377
+ description:
378
+ "\u003Cp\u003E You can find further information about this manufacturer \u003Ca href=\u0022http://www.deutschesee.de/\u0022 target=\u0022_blank\u0022\u003Ehere\u003C/a\u003E.\u0026nbsp;\u003C/p\u003E",
379
+ media: null,
380
+ translations: null,
381
+ customFields: null,
382
+ id: "432878e43ca440aab3afb211b2b79aba",
383
+ apiAlias: "product_manufacturer",
384
+ },
385
+ ],
386
+ apiAlias: "manufacturer_aggregation",
387
+ },
388
+ price: {
389
+ name: "price",
390
+ min: "39.9000",
391
+ max: "39.9000",
392
+ avg: null,
393
+ sum: null,
394
+ apiAlias: "price_aggregation",
395
+ },
396
+ rating: {
397
+ name: "rating",
398
+ max: null,
399
+ apiAlias: "rating_aggregation",
400
+ },
401
+ "shipping-free": {
402
+ name: "shipping-free",
403
+ max: "1",
404
+ apiAlias: "shipping-free_aggregation",
405
+ },
406
+ properties: {
407
+ name: "properties",
408
+ buckets: [
409
+ {
410
+ key: "",
411
+ count: 1,
412
+ apiAlias: "aggregation_bucket",
413
+ },
414
+ ],
415
+ apiAlias: "properties_aggregation",
416
+ },
417
+ options: {
418
+ name: "options",
419
+ buckets: [
420
+ {
421
+ key: "",
422
+ count: 1,
423
+ apiAlias: "aggregation_bucket",
424
+ },
425
+ ],
426
+ apiAlias: "options_aggregation",
427
+ },
428
+ },
429
+ page: 1,
430
+ limit: 15,
431
+ entity: "product",
432
+ total: 1,
433
+ states: [],
434
+ sorting: "score",
435
+ currentFilters: {
436
+ manufacturer: [],
437
+ price: {
438
+ min: 0,
439
+ max: 0,
440
+ },
441
+ rating: null,
442
+ "shipping-free": false,
443
+ properties: [],
444
+ search: "artic",
445
+ },
446
+ availableSortings: [
447
+ {
448
+ translated: {
449
+ label: "Name A-Z",
450
+ },
451
+ createdAt: "2020-09-25T07:31:29.882+00:00",
452
+ updatedAt: null,
453
+ key: "name-asc",
454
+ priority: 4,
455
+ label: "Name A-Z",
456
+ apiAlias: "product_sorting",
457
+ },
458
+ {
459
+ translated: {
460
+ label: "Name Z-A",
461
+ },
462
+ createdAt: "2020-09-25T07:31:29.882+00:00",
463
+ updatedAt: null,
464
+ key: "name-desc",
465
+ priority: 3,
466
+ label: "Name Z-A",
467
+ apiAlias: "product_sorting",
468
+ },
469
+ {
470
+ translated: {
471
+ label: "Price ascending",
472
+ },
473
+ createdAt: "2020-09-25T07:31:29.882+00:00",
474
+ updatedAt: null,
475
+ key: "price-asc",
476
+ priority: 2,
477
+ label: "Price ascending",
478
+ apiAlias: "product_sorting",
479
+ },
480
+ {
481
+ translated: {
482
+ label: "Price descending",
483
+ },
484
+ createdAt: "2020-09-25T07:31:29.882+00:00",
485
+ updatedAt: null,
486
+ key: "price-desc",
487
+ priority: 1,
488
+ label: "Price descending",
489
+ apiAlias: "product_sorting",
490
+ },
491
+ {
492
+ translated: {
493
+ label: "Topseller",
494
+ },
495
+ createdAt: "2020-10-22T12:21:04.045+00:00",
496
+ updatedAt: null,
497
+ key: "topseller",
498
+ priority: 0,
499
+ label: "Topseller",
500
+ apiAlias: "product_sorting",
501
+ },
502
+ {
503
+ translated: {
504
+ label: "Top results",
505
+ },
506
+ createdAt: "2020-09-25T07:31:29.882+00:00",
507
+ updatedAt: null,
508
+ key: "score",
509
+ priority: 0,
510
+ label: "Top results",
511
+ apiAlias: "product_sorting",
512
+ },
513
+ ],
514
+ streamId: null,
515
+ apiAlias: "product_listing",
516
+ };
517
+
518
+ export default Search;
@@ -0,0 +1,80 @@
1
+ import type { Schemas } from "#shopware";
2
+
3
+ type BlockType<SLOT_NAMES> = Schemas["CmsBlock"] & {
4
+ slots: Array<
5
+ Schemas["CmsSlot"] & {
6
+ slot: SLOT_NAMES;
7
+ }
8
+ >;
9
+ };
10
+
11
+ type THREE_COLUMNS = "left" | "center" | "right";
12
+ type TWO_COLUMNS = "left" | "right";
13
+
14
+ export type CmsBlockText = BlockType<"content">;
15
+ export type CmsBlockTextHero = BlockType<"content">;
16
+ export type CmsBlockTextTeaser = BlockType<"content">;
17
+ export type CmsBlockTextTeaserSection = BlockType<TWO_COLUMNS>;
18
+ export type CmsBlockTextTwoColumn = BlockType<TWO_COLUMNS>;
19
+ export type CmsBlockTextThreeColumn = BlockType<THREE_COLUMNS>;
20
+
21
+ export type CmsBlockImage = BlockType<"image">;
22
+ export type CmsBlockImageCover = BlockType<"image">;
23
+ export type CmsBlockImageTwoColumn = BlockType<TWO_COLUMNS>;
24
+ export type CmsBlockImageThreeColumn = BlockType<THREE_COLUMNS>;
25
+ export type CmsBlockImageThreeCover = BlockType<THREE_COLUMNS>;
26
+ export type CmsBlockImageFourColumn = BlockType<
27
+ "left" | "center-left" | "center-right" | "right"
28
+ >;
29
+ export type CmsBlockImageBubbleRow = BlockType<THREE_COLUMNS>;
30
+ export type CmsBlockImageHighlightRow = BlockType<THREE_COLUMNS>;
31
+ export type CmsBlockImageSimpleGrid = BlockType<
32
+ "left-top" | "left-bottom" | "right"
33
+ >;
34
+ export type CmsBlockImageSlider = BlockType<"imageSlider">;
35
+ export type CmsBlockImageGallery = BlockType<"imageGallery">;
36
+
37
+ export type CmsBlockYoutubeVideo = BlockType<"video">;
38
+ export type CmsBlockVimeoVideo = BlockType<"video">;
39
+
40
+ export type CmsBlockImageText = BlockType<TWO_COLUMNS>;
41
+ export type CmsBlockImageTextCover = BlockType<TWO_COLUMNS>;
42
+ export type CmsBlockCenterText = BlockType<THREE_COLUMNS>;
43
+ export type CmsBlockImageTextRow = BlockType<
44
+ | "left-image"
45
+ | "left-text"
46
+ | "center-image"
47
+ | "center-text"
48
+ | "right-image"
49
+ | "right-text"
50
+ >;
51
+ export type CmsBlockImageTextGallery = BlockType<
52
+ | "left-image"
53
+ | "left-text"
54
+ | "center-image"
55
+ | "center-text"
56
+ | "right-image"
57
+ | "right-text"
58
+ >;
59
+ export type CmsBlockImageTextBubble = BlockType<
60
+ | "left-image"
61
+ | "left-text"
62
+ | "center-image"
63
+ | "center-text"
64
+ | "right-image"
65
+ | "right-text"
66
+ >;
67
+ export type CmsBlockTextOnImage = BlockType<"content">;
68
+
69
+ export type CmsBlockSidebarFilter = BlockType<"content">;
70
+ export type CmsBlockCategoryNavigation = BlockType<"content">;
71
+
72
+ export type CmsBlockProductHeading = BlockType<TWO_COLUMNS>;
73
+ export type CmsBlockProductThreeColumn = BlockType<THREE_COLUMNS>;
74
+ export type CmsBlockProductListing = BlockType<"content">;
75
+ export type CmsBlockProductSlider = BlockType<"productSlider">;
76
+ export type CmsBlockGalleryBuybox = BlockType<TWO_COLUMNS>;
77
+ export type CmsBlockProductDescriptionReviews = BlockType<"content">;
78
+ export type CmsBlockCrossSelling = BlockType<"content">;
79
+
80
+ export type CmsBlockForm = BlockType<"content">;