@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
@@ -0,0 +1,16 @@
1
+ import { GenericRecord } from "../GenericRecord";
2
+ export type ProductReview = {
3
+ id: string;
4
+ productId: string;
5
+ productIdVersionId?: string;
6
+ salesChannelId: string;
7
+ languageId: string;
8
+ title: string;
9
+ content: string;
10
+ points: number;
11
+ status?: boolean;
12
+ comment?: string;
13
+ customFields?: GenericRecord;
14
+ readonly createdAt?: string;
15
+ readonly updatedAt?: string;
16
+ };
@@ -0,0 +1,8 @@
1
+ export type ProductReviewSummary = {
2
+ id: any;
3
+ productId: any;
4
+ salesChannelId: any;
5
+ summary: any;
6
+ visible: any;
7
+ translated: any;
8
+ };
@@ -0,0 +1,10 @@
1
+ import { GenericRecord } from "../GenericRecord";
2
+ export type ProductStream = {
3
+ id: string;
4
+ name: string;
5
+ description?: string;
6
+ customFields?: GenericRecord;
7
+ readonly createdAt?: string;
8
+ readonly updatedAt?: string;
9
+ translated?: object;
10
+ };
@@ -0,0 +1,9 @@
1
+ import { ProductCrossSelling } from ".";
2
+ import { Product } from "../Product";
3
+ export type CrossSellingElement = {
4
+ apiAlias: "cross_selling_element";
5
+ crossSelling: Array<ProductCrossSelling>;
6
+ products: Array<Product>;
7
+ total: number;
8
+ streamId: string;
9
+ };
@@ -0,0 +1,13 @@
1
+ export type ProductCrossSelling = {
2
+ id: string;
3
+ name: string;
4
+ position?: number;
5
+ sortBy?: string;
6
+ sortDirection?: string;
7
+ type?: string;
8
+ active?: boolean;
9
+ limit?: number;
10
+ readonly createdAt?: string;
11
+ readonly updatedAt?: string;
12
+ translated?: object;
13
+ };
@@ -0,0 +1,2 @@
1
+ export { CrossSellingElement } from "./CrossSellingElement";
2
+ export { ProductCrossSelling } from "./ProductCrossSelling";
@@ -0,0 +1,9 @@
1
+ export * from "./crossSelling";
2
+ export { Product } from "./Product";
3
+ export { ProductConfiguratorSetting } from "./ProductConfiguratorSetting";
4
+ export { ProductDownload } from "./ProductDownload";
5
+ export { ProductListingResult } from "./ProductListingResult";
6
+ export { ProductManufacturer } from "./ProductManufacturer";
7
+ export { ProductReview } from "./ProductReview";
8
+ export { ProductReviewSummary } from "./ProductReviewSummary";
9
+ export { ProductStream } from "./ProductStream";
@@ -0,0 +1,17 @@
1
+ import { GenericRecord } from "../GenericRecord";
2
+ import { PropertyGroupOption } from ".";
3
+ export type PropertyGroup = {
4
+ id: string;
5
+ name: string;
6
+ description?: string;
7
+ displayType?: "text" | "image" | "dropdown" | "color";
8
+ sortingType?: "name" | "position";
9
+ filterable?: boolean;
10
+ visibleOnProductDetailPage?: boolean;
11
+ position?: number;
12
+ customFields?: GenericRecord;
13
+ readonly createdAt?: string;
14
+ readonly updatedAt?: string;
15
+ translated?: object;
16
+ options?: Array<PropertyGroupOption>;
17
+ };
@@ -0,0 +1,18 @@
1
+ import { GenericRecord } from "../GenericRecord";
2
+ import { Media } from "../media";
3
+ import { PropertyGroup } from ".";
4
+ export type PropertyGroupOption = {
5
+ id: string;
6
+ groupId: string;
7
+ name: string;
8
+ position?: number;
9
+ colorHexCode?: string;
10
+ mediaId?: string;
11
+ customFields?: GenericRecord;
12
+ readonly createdAt?: string;
13
+ readonly updatedAt?: string;
14
+ translated?: object;
15
+ media?: Media;
16
+ group: PropertyGroup;
17
+ option: string;
18
+ };
@@ -0,0 +1,2 @@
1
+ export { PropertyGroup } from "./PropertyGroup";
2
+ export { PropertyGroupOption } from "./PropertyGroupOption";
@@ -0,0 +1,20 @@
1
+ import { Filters } from "../filter";
2
+ import { Include, Query, Sort } from ".";
3
+ import { Aggregations } from "../aggregation";
4
+ import { TotalCountMode } from "../TotalCountMode";
5
+ export type Criteria = {
6
+ page?: number;
7
+ term?: string;
8
+ limit?: number;
9
+ filter?: Filters;
10
+ ids?: Array<string>;
11
+ query?: Array<Query>;
12
+ associations?: Array<Criteria>;
13
+ "post-filter"?: Filters;
14
+ sort?: Array<Sort>;
15
+ aggregations?: Aggregations;
16
+ fields?: Array<string>;
17
+ grouping?: Array<string>;
18
+ "total-count-mode"?: TotalCountMode;
19
+ includes?: Include;
20
+ };
@@ -0,0 +1 @@
1
+ export type Include = Record<string, Array<string>>;
@@ -0,0 +1,5 @@
1
+ import { EqualsFilter, MultiNotFilter, RangeFilter, SimpleFilter } from "../filter";
2
+ export type Query = {
3
+ score: number;
4
+ query: SimpleFilter | EqualsFilter | MultiNotFilter | RangeFilter;
5
+ };
@@ -0,0 +1,6 @@
1
+ export type Sort = {
2
+ field: string;
3
+ order: "ASC" | "DESC";
4
+ naturalSorting?: boolean;
5
+ type?: string;
6
+ };
@@ -0,0 +1,5 @@
1
+ export * from "./product";
2
+ export { Criteria } from "./Criteria";
3
+ export { Include } from "./Include";
4
+ export { Query } from "./Query";
5
+ export { Sort } from "./Sort";
@@ -0,0 +1,25 @@
1
+ import { Criteria } from "../Criteria";
2
+ import { Filters, SimpleFilter } from "../../filter";
3
+ import { Sort } from "../Sort";
4
+ export type ProductListingCriteria = Criteria & {
5
+ order?: string;
6
+ limit?: number;
7
+ p?: number;
8
+ manufacturer?: string;
9
+ "min-price"?: number;
10
+ "max-price"?: number;
11
+ rating?: number;
12
+ "shipping-free"?: boolean;
13
+ properties?: string;
14
+ "manufacturer-filter"?: boolean;
15
+ "price-filter"?: boolean;
16
+ "rating-filter"?: boolean;
17
+ "shipping-free-filter"?: boolean;
18
+ "property-filter"?: boolean;
19
+ "property-whitelist"?: string;
20
+ "reduce-aggregations"?: string | null;
21
+ } & {
22
+ filter?: Filters | SimpleFilter;
23
+ sort?: Array<Sort> | Sort;
24
+ "post-filter"?: Filters | SimpleFilter;
25
+ };
@@ -0,0 +1,4 @@
1
+ export type ProductListingFlags = {
2
+ "no-aggregations"?: string | null;
3
+ "only-aggregations"?: string | null;
4
+ };
@@ -0,0 +1,2 @@
1
+ export { ProductListingCriteria } from "./ProductListingCriteria";
2
+ export { ProductListingFlags } from "./ProductListingFlags";
@@ -0,0 +1,23 @@
1
+ export type SalesChannel = {
2
+ typeId?: string;
3
+ languageId?: string;
4
+ currencyId?: string;
5
+ paymentMethodId?: string;
6
+ shippingMethodId?: string;
7
+ countryId?: string;
8
+ navigationCategoryId?: string;
9
+ navigationCategoryDepth?: number;
10
+ footerCategoryId?: string;
11
+ serviceCategoryId?: string;
12
+ name?: string;
13
+ shortName?: string;
14
+ accessKey?: string;
15
+ active?: boolean;
16
+ maintenance?: boolean;
17
+ maintenanceIpWhitelist?: string;
18
+ mailHeaderFooterId?: string;
19
+ customerGroupId?: string;
20
+ hreflangActive?: boolean;
21
+ hreflangDefaultDomainId?: string;
22
+ analyticsId?: string;
23
+ };
@@ -0,0 +1,38 @@
1
+ import { Currency } from "../Currency";
2
+ import { SalesChannel } from ".";
3
+ import { Customer } from "../customer";
4
+ import { PaymentMethod } from "../PaymentMethod";
5
+ import { CartDeliveryShippingLocation } from "../cart";
6
+ import { ShippingMethod } from "../shippingMethod";
7
+ export type SalesChannelContext = {
8
+ token?: string;
9
+ currentCustomerGroup?: {
10
+ name?: string;
11
+ displayGross?: boolean;
12
+ };
13
+ fallbackCustomerGroup?: {
14
+ name?: string;
15
+ displayGross?: boolean;
16
+ };
17
+ currency?: Currency;
18
+ salesChannel?: SalesChannel;
19
+ taxRules?: Array<{
20
+ taxRate?: number;
21
+ name?: string;
22
+ }>;
23
+ customer?: Customer;
24
+ paymentMethod?: PaymentMethod;
25
+ shippingLocation?: CartDeliveryShippingLocation;
26
+ shippingMethod?: ShippingMethod;
27
+ context?: {
28
+ versionId?: string;
29
+ currencyId?: string;
30
+ currencyFactor?: number;
31
+ currencyPrecision?: number;
32
+ languageIdChain?: string;
33
+ scope?: string;
34
+ source?: string;
35
+ taxState?: "gross" | "net";
36
+ useCache?: boolean;
37
+ };
38
+ };
@@ -0,0 +1,2 @@
1
+ export { SalesChannel } from "./SalesChannel";
2
+ export { SalesChannelContext } from "./SalesChannelContext";
@@ -0,0 +1,18 @@
1
+ import { GenericRecord } from "../GenericRecord";
2
+ export type SeoUrlEntity = {
3
+ id: string;
4
+ salesChannelId?: string;
5
+ languageId: string;
6
+ foreignKey: string;
7
+ routeName: "frontend.navigation.page" | "frontend.landing.page" | "frontend.detail.page";
8
+ pathInfo: string;
9
+ seoPathInfo: string;
10
+ isCanonical?: boolean;
11
+ isModified?: boolean;
12
+ isDeleted?: boolean;
13
+ error?: string;
14
+ url?: string;
15
+ customFields?: GenericRecord;
16
+ readonly createdAt?: string;
17
+ readonly updatedAt?: string;
18
+ };
@@ -0,0 +1,4 @@
1
+ export type Sitemap = {
2
+ filename: string;
3
+ created: string;
4
+ };
@@ -0,0 +1,2 @@
1
+ export { SeoUrlEntity } from "./SeoUrlEntity";
2
+ export { Sitemap } from "./Sitemap";
@@ -0,0 +1,29 @@
1
+ import { GenericRecord } from "../GenericRecord";
2
+ import { DeliveryTime } from "../DeliveryTime";
3
+ import { Rule } from "../Rule";
4
+ import { ShippingMethodPrice } from ".";
5
+ import { Media } from "../media";
6
+ import { Tag } from "../Tag";
7
+ import { Tax } from "../Tax";
8
+ export type ShippingMethod = {
9
+ id: string;
10
+ name: string;
11
+ active?: boolean;
12
+ position?: number;
13
+ customFields?: GenericRecord;
14
+ mediaId?: string;
15
+ deliveryTimeId: string;
16
+ taxType?: "Free" | "Net" | "Gross";
17
+ description?: string;
18
+ trackingUrl?: string;
19
+ technicalName?: string;
20
+ readonly createdAt?: string;
21
+ readonly updatedAt?: string;
22
+ translated?: object;
23
+ deliveryTime?: DeliveryTime;
24
+ availabilityRule?: Rule;
25
+ prices?: Array<ShippingMethodPrice>;
26
+ media?: Media;
27
+ tags?: Array<Tag>;
28
+ tax?: Tax;
29
+ };
@@ -0,0 +1,15 @@
1
+ import { Price } from "../price";
2
+ import { GenericRecord } from "../GenericRecord";
3
+ export type ShippingMethodPrice = {
4
+ id: string;
5
+ shippingMethodId: string;
6
+ ruleId?: string;
7
+ calculation?: number;
8
+ calculationRuleId?: string;
9
+ quantityStart?: number;
10
+ quantityEnd?: number;
11
+ currencyPrice: Array<Price>;
12
+ customFields?: GenericRecord;
13
+ readonly createdAt?: string;
14
+ readonly updatedAt?: string;
15
+ };
@@ -0,0 +1,2 @@
1
+ export { ShippingMethod } from "./ShippingMethod";
2
+ export { ShippingMethodPrice } from "./ShippingMethodPrice";
package/package.json ADDED
@@ -0,0 +1,45 @@
1
+ {
2
+ "name": "@devite/shopware-client",
3
+ "version": "1.0.0",
4
+ "description": "Third party API client for Shopware 6.",
5
+ "repository": "devite-io/shopware-client",
6
+ "license": "MIT",
7
+ "author": {
8
+ "name": "Justus Geramb <justus@devite.io>",
9
+ "url": "https://www.devite.io"
10
+ },
11
+ "type": "module",
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/types.d.ts",
15
+ "import": "./dist/module.mjs",
16
+ "require": "./dist/module.cjs"
17
+ }
18
+ },
19
+ "main": "./dist/module.cjs",
20
+ "types": "./dist/types.d.ts",
21
+ "files": [
22
+ "dist"
23
+ ],
24
+ "devDependencies": {
25
+ "@types/node": "^22.10.2",
26
+ "changelogen": "^0.5.7",
27
+ "eslint": "^9.17.0",
28
+ "prettier": "^3.4.2",
29
+ "typescript": "^5.7.2",
30
+ "typescript-eslint": "^8.18.2",
31
+ "unbuild": "^2.0.0",
32
+ "vitest": "^2.1.8"
33
+ },
34
+ "dependencies": {
35
+ "ofetch": "^1.4.1"
36
+ },
37
+ "scripts": {
38
+ "build": "export NODE_ENV=production && unbuild && pnpm build:types",
39
+ "build:types": "tsc --declaration --emitDeclarationOnly",
40
+ "lint": "eslint src/**/*.ts* --fix && tsc --noEmit",
41
+ "test": "vitest run --passWithNoTests --typecheck",
42
+ "test:watch": "vitest watch --typecheck",
43
+ "release": "pnpm lint && pnpm test && pnpm build && changelogen --release && pnpm publish --access=public && git push --follow-tags"
44
+ }
45
+ }