@devite/shopware-client 1.0.0

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 (197) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +52 -0
  3. package/dist/index.cjs +1330 -0
  4. package/dist/index.d.cts +2186 -0
  5. package/dist/index.d.mts +2186 -0
  6. package/dist/index.d.ts +2186 -0
  7. package/dist/index.mjs +1314 -0
  8. package/dist/src/ShopwareClient.d.ts +31 -0
  9. package/dist/src/auth/AuthenticationStore.d.ts +8 -0
  10. package/dist/src/auth/AuthenticationType.d.ts +5 -0
  11. package/dist/src/auth/entries/AuthenticationEntry.d.ts +10 -0
  12. package/dist/src/auth/entries/ContextTokenEntry.d.ts +13 -0
  13. package/dist/src/auth/entries/OAuthEntry.d.ts +15 -0
  14. package/dist/src/auth/entries/index.d.ts +3 -0
  15. package/dist/src/auth/errors/ExpiredError.d.ts +4 -0
  16. package/dist/src/auth/errors/NotSavedError.d.ts +4 -0
  17. package/dist/src/auth/errors/index.d.ts +2 -0
  18. package/dist/src/auth/index.d.ts +4 -0
  19. package/dist/src/clients/AccountClient.d.ts +16 -0
  20. package/dist/src/clients/AddressClient.d.ts +11 -0
  21. package/dist/src/clients/CartClient.d.ts +10 -0
  22. package/dist/src/clients/CategoryClient.d.ts +8 -0
  23. package/dist/src/clients/Client.d.ts +16 -0
  24. package/dist/src/clients/ContentClient.d.ts +9 -0
  25. package/dist/src/clients/ContextClient.d.ts +7 -0
  26. package/dist/src/clients/CustomerAuthenticationClient.d.ts +11 -0
  27. package/dist/src/clients/DocumentClient.d.ts +6 -0
  28. package/dist/src/clients/GatewayClient.d.ts +6 -0
  29. package/dist/src/clients/NewsletterClient.d.ts +8 -0
  30. package/dist/src/clients/OrderClient.d.ts +10 -0
  31. package/dist/src/clients/PaymentClient.d.ts +6 -0
  32. package/dist/src/clients/ProductClient.d.ts +14 -0
  33. package/dist/src/clients/SeoClient.d.ts +8 -0
  34. package/dist/src/clients/SystemClient.d.ts +12 -0
  35. package/dist/src/clients/WishlistClient.d.ts +9 -0
  36. package/dist/src/clients/index.d.ts +17 -0
  37. package/dist/src/index.d.ts +1 -0
  38. package/dist/src/payloads/BinaryPayload.d.ts +10 -0
  39. package/dist/src/payloads/JsonPayload.d.ts +10 -0
  40. package/dist/src/payloads/Payload.d.ts +6 -0
  41. package/dist/src/payloads/index.d.ts +3 -0
  42. package/dist/tests/auth/AuthenticationStore.test.d.ts +1 -0
  43. package/dist/tests/auth/entries/ContextTokenEntry.test.d.ts +1 -0
  44. package/dist/tests/auth/entries/OAuthEntry.test.d.ts +1 -0
  45. package/dist/types/ClientRequestOptions.d.ts +8 -0
  46. package/dist/types/ClientResponse.d.ts +7 -0
  47. package/dist/types/HTTPRequestMethod.d.ts +8 -0
  48. package/dist/types/RequestCacheEntry.d.ts +5 -0
  49. package/dist/types/auth/OAuthResponseBody.d.ts +5 -0
  50. package/dist/types/auth/index.d.ts +1 -0
  51. package/dist/types/clients/AccountClient.d.ts +70 -0
  52. package/dist/types/clients/AddressClient.d.ts +7 -0
  53. package/dist/types/clients/CartClient.d.ts +17 -0
  54. package/dist/types/clients/CategoryClient.d.ts +12 -0
  55. package/dist/types/clients/ContentClient.d.ts +29 -0
  56. package/dist/types/clients/ContextClient.d.ts +18 -0
  57. package/dist/types/clients/CustomerAuthenticationClient.d.ts +44 -0
  58. package/dist/types/clients/DocumentClient.d.ts +3 -0
  59. package/dist/types/clients/GatewayClient.d.ts +18 -0
  60. package/dist/types/clients/NewsletterClient.d.ts +21 -0
  61. package/dist/types/clients/OrderClient.d.ts +26 -0
  62. package/dist/types/clients/PaymentClient.d.ts +8 -0
  63. package/dist/types/clients/ProductClient.d.ts +49 -0
  64. package/dist/types/clients/SeoClient.d.ts +7 -0
  65. package/dist/types/clients/SystemClient.d.ts +33 -0
  66. package/dist/types/clients/WishlistClient.d.ts +21 -0
  67. package/dist/types/clients/index.d.ts +16 -0
  68. package/dist/types/index.d.ts +7 -0
  69. package/dist/types/storeApi/Currency.d.ts +26 -0
  70. package/dist/types/storeApi/DeliveryTime.d.ts +12 -0
  71. package/dist/types/storeApi/EntitySearchResult.d.ts +7 -0
  72. package/dist/types/storeApi/GenericRecord.d.ts +3 -0
  73. package/dist/types/storeApi/PaymentMethod.d.ts +24 -0
  74. package/dist/types/storeApi/Rule.d.ts +10 -0
  75. package/dist/types/storeApi/Salutation.d.ts +11 -0
  76. package/dist/types/storeApi/StateMachineState.d.ts +10 -0
  77. package/dist/types/storeApi/Tag.d.ts +6 -0
  78. package/dist/types/storeApi/Tax.d.ts +10 -0
  79. package/dist/types/storeApi/TotalCountMode.d.ts +1 -0
  80. package/dist/types/storeApi/Unit.d.ts +10 -0
  81. package/dist/types/storeApi/aggregation/AggregationEntity.d.ts +6 -0
  82. package/dist/types/storeApi/aggregation/AggregationFilter.d.ts +6 -0
  83. package/dist/types/storeApi/aggregation/AggregationHistogram.d.ts +8 -0
  84. package/dist/types/storeApi/aggregation/AggregationMetrics.d.ts +5 -0
  85. package/dist/types/storeApi/aggregation/AggregationRange.d.ts +13 -0
  86. package/dist/types/storeApi/aggregation/AggregationTerms.d.ts +8 -0
  87. package/dist/types/storeApi/aggregation/Aggregations.d.ts +2 -0
  88. package/dist/types/storeApi/aggregation/index.d.ts +7 -0
  89. package/dist/types/storeApi/cart/Cart.d.ts +19 -0
  90. package/dist/types/storeApi/cart/CartDelivery.d.ts +13 -0
  91. package/dist/types/storeApi/cart/CartDeliveryDate.d.ts +4 -0
  92. package/dist/types/storeApi/cart/CartDeliveryInformation.d.ts +12 -0
  93. package/dist/types/storeApi/cart/CartDeliveryPosition.d.ts +9 -0
  94. package/dist/types/storeApi/cart/CartDeliveryShippingLocation.d.ts +7 -0
  95. package/dist/types/storeApi/cart/CartDeliveryTime.d.ts +7 -0
  96. package/dist/types/storeApi/cart/CartError.d.ts +8 -0
  97. package/dist/types/storeApi/cart/CartItems.d.ts +2 -0
  98. package/dist/types/storeApi/cart/index.d.ts +9 -0
  99. package/dist/types/storeApi/category/Category.d.ts +50 -0
  100. package/dist/types/storeApi/category/MainCategory.d.ts +10 -0
  101. package/dist/types/storeApi/category/index.d.ts +2 -0
  102. package/dist/types/storeApi/cms/BackgroundMediaMode.d.ts +1 -0
  103. package/dist/types/storeApi/cms/CmsBlock.d.ts +28 -0
  104. package/dist/types/storeApi/cms/CmsPage.d.ts +23 -0
  105. package/dist/types/storeApi/cms/CmsSection.d.ts +25 -0
  106. package/dist/types/storeApi/cms/CmsSlot.d.ts +20 -0
  107. package/dist/types/storeApi/cms/LandingPage.d.ts +23 -0
  108. package/dist/types/storeApi/cms/Visibility.d.ts +5 -0
  109. package/dist/types/storeApi/cms/index.d.ts +7 -0
  110. package/dist/types/storeApi/country/Country.d.ts +40 -0
  111. package/dist/types/storeApi/country/CountryState.d.ts +13 -0
  112. package/dist/types/storeApi/country/index.d.ts +2 -0
  113. package/dist/types/storeApi/customer/Customer.d.ts +61 -0
  114. package/dist/types/storeApi/customer/CustomerAddress.d.ts +7 -0
  115. package/dist/types/storeApi/customer/CustomerAddressBody.d.ts +23 -0
  116. package/dist/types/storeApi/customer/CustomerGroup.d.ts +20 -0
  117. package/dist/types/storeApi/customer/index.d.ts +4 -0
  118. package/dist/types/storeApi/document/ShopwareDocument.d.ts +29 -0
  119. package/dist/types/storeApi/document/ShopwareDocumentBaseConfig.d.ts +17 -0
  120. package/dist/types/storeApi/document/ShopwareDocumentType.d.ts +10 -0
  121. package/dist/types/storeApi/document/index.d.ts +3 -0
  122. package/dist/types/storeApi/filter/EqualsFilter.d.ts +5 -0
  123. package/dist/types/storeApi/filter/Filters.d.ts +2 -0
  124. package/dist/types/storeApi/filter/MultiNotFilter.d.ts +6 -0
  125. package/dist/types/storeApi/filter/RangeFilter.d.ts +10 -0
  126. package/dist/types/storeApi/filter/SimpleFilter.d.ts +5 -0
  127. package/dist/types/storeApi/filter/index.d.ts +5 -0
  128. package/dist/types/storeApi/index.d.ts +32 -0
  129. package/dist/types/storeApi/lineItem/LineItem.d.ts +32 -0
  130. package/dist/types/storeApi/lineItem/LineItemPayload.d.ts +74 -0
  131. package/dist/types/storeApi/lineItem/LineItemType.d.ts +1 -0
  132. package/dist/types/storeApi/lineItem/index.d.ts +3 -0
  133. package/dist/types/storeApi/link/Link.d.ts +4 -0
  134. package/dist/types/storeApi/link/Links.d.ts +2 -0
  135. package/dist/types/storeApi/link/index.d.ts +2 -0
  136. package/dist/types/storeApi/locale/Language.d.ts +16 -0
  137. package/dist/types/storeApi/locale/Locale.d.ts +11 -0
  138. package/dist/types/storeApi/locale/index.d.ts +2 -0
  139. package/dist/types/storeApi/media/Media.d.ts +25 -0
  140. package/dist/types/storeApi/media/MediaThumbnail.d.ts +12 -0
  141. package/dist/types/storeApi/media/ProductMedia.d.ts +15 -0
  142. package/dist/types/storeApi/media/index.d.ts +3 -0
  143. package/dist/types/storeApi/order/Order.d.ts +58 -0
  144. package/dist/types/storeApi/order/OrderAddress.d.ts +8 -0
  145. package/dist/types/storeApi/order/OrderCustomer.d.ts +18 -0
  146. package/dist/types/storeApi/order/OrderDelivery.d.ts +24 -0
  147. package/dist/types/storeApi/order/OrderDeliveryPosition.d.ts +17 -0
  148. package/dist/types/storeApi/order/OrderLineItem.d.ts +43 -0
  149. package/dist/types/storeApi/order/OrderLineItemDownload.d.ts +17 -0
  150. package/dist/types/storeApi/order/OrderReturn.d.ts +14 -0
  151. package/dist/types/storeApi/order/OrderReturnLineItem.d.ts +14 -0
  152. package/dist/types/storeApi/order/OrderReturnLineItemReason.d.ts +6 -0
  153. package/dist/types/storeApi/order/OrderTransaction.d.ts +22 -0
  154. package/dist/types/storeApi/order/OrderTransactionCapture.d.ts +20 -0
  155. package/dist/types/storeApi/order/OrderTransactionCaptureRefund.d.ts +21 -0
  156. package/dist/types/storeApi/order/OrderTransactionCaptureRefundPosition.d.ts +21 -0
  157. package/dist/types/storeApi/order/index.d.ts +14 -0
  158. package/dist/types/storeApi/price/CalculatedPrice.d.ts +25 -0
  159. package/dist/types/storeApi/price/CartListPrice.d.ts +6 -0
  160. package/dist/types/storeApi/price/CartPriceQuantity.d.ts +16 -0
  161. package/dist/types/storeApi/price/CartPriceReference.d.ts +12 -0
  162. package/dist/types/storeApi/price/CartRegulationPrice.d.ts +4 -0
  163. package/dist/types/storeApi/price/Price.d.ts +18 -0
  164. package/dist/types/storeApi/price/index.d.ts +6 -0
  165. package/dist/types/storeApi/product/Product.d.ts +107 -0
  166. package/dist/types/storeApi/product/ProductConfiguratorSetting.d.ts +17 -0
  167. package/dist/types/storeApi/product/ProductDownload.d.ts +16 -0
  168. package/dist/types/storeApi/product/ProductListingResult.d.ts +29 -0
  169. package/dist/types/storeApi/product/ProductManufacturer.d.ts +15 -0
  170. package/dist/types/storeApi/product/ProductReview.d.ts +16 -0
  171. package/dist/types/storeApi/product/ProductReviewSummary.d.ts +8 -0
  172. package/dist/types/storeApi/product/ProductStream.d.ts +10 -0
  173. package/dist/types/storeApi/product/crossSelling/CrossSellingElement.d.ts +9 -0
  174. package/dist/types/storeApi/product/crossSelling/ProductCrossSelling.d.ts +13 -0
  175. package/dist/types/storeApi/product/crossSelling/index.d.ts +2 -0
  176. package/dist/types/storeApi/product/index.d.ts +9 -0
  177. package/dist/types/storeApi/propertyGroup/PropertyGroup.d.ts +17 -0
  178. package/dist/types/storeApi/propertyGroup/PropertyGroupOption.d.ts +18 -0
  179. package/dist/types/storeApi/propertyGroup/index.d.ts +2 -0
  180. package/dist/types/storeApi/query/Criteria.d.ts +20 -0
  181. package/dist/types/storeApi/query/Include.d.ts +1 -0
  182. package/dist/types/storeApi/query/Query.d.ts +5 -0
  183. package/dist/types/storeApi/query/Sort.d.ts +6 -0
  184. package/dist/types/storeApi/query/index.d.ts +5 -0
  185. package/dist/types/storeApi/query/product/ProductListingCriteria.d.ts +25 -0
  186. package/dist/types/storeApi/query/product/ProductListingFlags.d.ts +4 -0
  187. package/dist/types/storeApi/query/product/index.d.ts +2 -0
  188. package/dist/types/storeApi/salesChannel/SalesChannel.d.ts +23 -0
  189. package/dist/types/storeApi/salesChannel/SalesChannelContext.d.ts +38 -0
  190. package/dist/types/storeApi/salesChannel/index.d.ts +2 -0
  191. package/dist/types/storeApi/seo/SeoUrlEntity.d.ts +18 -0
  192. package/dist/types/storeApi/seo/Sitemap.d.ts +4 -0
  193. package/dist/types/storeApi/seo/index.d.ts +2 -0
  194. package/dist/types/storeApi/shippingMethod/ShippingMethod.d.ts +29 -0
  195. package/dist/types/storeApi/shippingMethod/ShippingMethodPrice.d.ts +15 -0
  196. package/dist/types/storeApi/shippingMethod/index.d.ts +2 -0
  197. package/package.json +45 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Justus Geramb
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,52 @@
1
+ # Shopware Client
2
+
3
+ [![npm version][npm-version-src]][npm-version-href]
4
+
5
+ Third party API client for Shopware 6 that supports StoreAPI and AdminAPI.
6
+
7
+ ## Quick Setup
8
+
9
+ Install the client in your JavaScript project:
10
+
11
+ ```bash
12
+ npx install @devite/shopware-client
13
+ ```
14
+
15
+ That's it! You can now use the Shopware API in your project ✨
16
+
17
+
18
+ ## Getting started
19
+
20
+ ```javascript
21
+ import { ShopwareClient } from '@devite/shopware-client';
22
+
23
+ // TODO: Add examples
24
+ ```
25
+
26
+ ## Contribution
27
+
28
+ <details>
29
+ <summary>Local development</summary>
30
+
31
+ ```bash
32
+ # Install dependencies
33
+ pnpm install
34
+
35
+ # Generate module types and build the module
36
+ pnpm build
37
+
38
+ # Run ESLint
39
+ pnpm lint
40
+
41
+ # Run Vitest
42
+ pnpm test
43
+ pnpm test:watch
44
+
45
+ # Release new version
46
+ pnpm release
47
+ ```
48
+ </details>
49
+
50
+ <!-- Badges -->
51
+ [npm-version-src]: https://img.shields.io/npm/v/@devite/shopware-client/latest.svg?style=flat&colorA=020420&colorB=00DC82
52
+ [npm-version-href]: https://npmjs.com/package/@devite/shopware-client