@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.
- package/LICENSE +21 -0
- package/README.md +52 -0
- package/dist/index.cjs +1330 -0
- package/dist/index.d.cts +2186 -0
- package/dist/index.d.mts +2186 -0
- package/dist/index.d.ts +2186 -0
- package/dist/index.mjs +1314 -0
- package/dist/src/ShopwareClient.d.ts +31 -0
- package/dist/src/auth/AuthenticationStore.d.ts +8 -0
- package/dist/src/auth/AuthenticationType.d.ts +5 -0
- package/dist/src/auth/entries/AuthenticationEntry.d.ts +10 -0
- package/dist/src/auth/entries/ContextTokenEntry.d.ts +13 -0
- package/dist/src/auth/entries/OAuthEntry.d.ts +15 -0
- package/dist/src/auth/entries/index.d.ts +3 -0
- package/dist/src/auth/errors/ExpiredError.d.ts +4 -0
- package/dist/src/auth/errors/NotSavedError.d.ts +4 -0
- package/dist/src/auth/errors/index.d.ts +2 -0
- package/dist/src/auth/index.d.ts +4 -0
- package/dist/src/clients/AccountClient.d.ts +16 -0
- package/dist/src/clients/AddressClient.d.ts +11 -0
- package/dist/src/clients/CartClient.d.ts +10 -0
- package/dist/src/clients/CategoryClient.d.ts +8 -0
- package/dist/src/clients/Client.d.ts +16 -0
- package/dist/src/clients/ContentClient.d.ts +9 -0
- package/dist/src/clients/ContextClient.d.ts +7 -0
- package/dist/src/clients/CustomerAuthenticationClient.d.ts +11 -0
- package/dist/src/clients/DocumentClient.d.ts +6 -0
- package/dist/src/clients/GatewayClient.d.ts +6 -0
- package/dist/src/clients/NewsletterClient.d.ts +8 -0
- package/dist/src/clients/OrderClient.d.ts +10 -0
- package/dist/src/clients/PaymentClient.d.ts +6 -0
- package/dist/src/clients/ProductClient.d.ts +14 -0
- package/dist/src/clients/SeoClient.d.ts +8 -0
- package/dist/src/clients/SystemClient.d.ts +12 -0
- package/dist/src/clients/WishlistClient.d.ts +9 -0
- package/dist/src/clients/index.d.ts +17 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/payloads/BinaryPayload.d.ts +10 -0
- package/dist/src/payloads/JsonPayload.d.ts +10 -0
- package/dist/src/payloads/Payload.d.ts +6 -0
- package/dist/src/payloads/index.d.ts +3 -0
- package/dist/tests/auth/AuthenticationStore.test.d.ts +1 -0
- package/dist/tests/auth/entries/ContextTokenEntry.test.d.ts +1 -0
- package/dist/tests/auth/entries/OAuthEntry.test.d.ts +1 -0
- package/dist/types/ClientRequestOptions.d.ts +8 -0
- package/dist/types/ClientResponse.d.ts +7 -0
- package/dist/types/HTTPRequestMethod.d.ts +8 -0
- package/dist/types/RequestCacheEntry.d.ts +5 -0
- package/dist/types/auth/OAuthResponseBody.d.ts +5 -0
- package/dist/types/auth/index.d.ts +1 -0
- package/dist/types/clients/AccountClient.d.ts +70 -0
- package/dist/types/clients/AddressClient.d.ts +7 -0
- package/dist/types/clients/CartClient.d.ts +17 -0
- package/dist/types/clients/CategoryClient.d.ts +12 -0
- package/dist/types/clients/ContentClient.d.ts +29 -0
- package/dist/types/clients/ContextClient.d.ts +18 -0
- package/dist/types/clients/CustomerAuthenticationClient.d.ts +44 -0
- package/dist/types/clients/DocumentClient.d.ts +3 -0
- package/dist/types/clients/GatewayClient.d.ts +18 -0
- package/dist/types/clients/NewsletterClient.d.ts +21 -0
- package/dist/types/clients/OrderClient.d.ts +26 -0
- package/dist/types/clients/PaymentClient.d.ts +8 -0
- package/dist/types/clients/ProductClient.d.ts +49 -0
- package/dist/types/clients/SeoClient.d.ts +7 -0
- package/dist/types/clients/SystemClient.d.ts +33 -0
- package/dist/types/clients/WishlistClient.d.ts +21 -0
- package/dist/types/clients/index.d.ts +16 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/storeApi/Currency.d.ts +26 -0
- package/dist/types/storeApi/DeliveryTime.d.ts +12 -0
- package/dist/types/storeApi/EntitySearchResult.d.ts +7 -0
- package/dist/types/storeApi/GenericRecord.d.ts +3 -0
- package/dist/types/storeApi/PaymentMethod.d.ts +24 -0
- package/dist/types/storeApi/Rule.d.ts +10 -0
- package/dist/types/storeApi/Salutation.d.ts +11 -0
- package/dist/types/storeApi/StateMachineState.d.ts +10 -0
- package/dist/types/storeApi/Tag.d.ts +6 -0
- package/dist/types/storeApi/Tax.d.ts +10 -0
- package/dist/types/storeApi/TotalCountMode.d.ts +1 -0
- package/dist/types/storeApi/Unit.d.ts +10 -0
- package/dist/types/storeApi/aggregation/AggregationEntity.d.ts +6 -0
- package/dist/types/storeApi/aggregation/AggregationFilter.d.ts +6 -0
- package/dist/types/storeApi/aggregation/AggregationHistogram.d.ts +8 -0
- package/dist/types/storeApi/aggregation/AggregationMetrics.d.ts +5 -0
- package/dist/types/storeApi/aggregation/AggregationRange.d.ts +13 -0
- package/dist/types/storeApi/aggregation/AggregationTerms.d.ts +8 -0
- package/dist/types/storeApi/aggregation/Aggregations.d.ts +2 -0
- package/dist/types/storeApi/aggregation/index.d.ts +7 -0
- package/dist/types/storeApi/cart/Cart.d.ts +19 -0
- package/dist/types/storeApi/cart/CartDelivery.d.ts +13 -0
- package/dist/types/storeApi/cart/CartDeliveryDate.d.ts +4 -0
- package/dist/types/storeApi/cart/CartDeliveryInformation.d.ts +12 -0
- package/dist/types/storeApi/cart/CartDeliveryPosition.d.ts +9 -0
- package/dist/types/storeApi/cart/CartDeliveryShippingLocation.d.ts +7 -0
- package/dist/types/storeApi/cart/CartDeliveryTime.d.ts +7 -0
- package/dist/types/storeApi/cart/CartError.d.ts +8 -0
- package/dist/types/storeApi/cart/CartItems.d.ts +2 -0
- package/dist/types/storeApi/cart/index.d.ts +9 -0
- package/dist/types/storeApi/category/Category.d.ts +50 -0
- package/dist/types/storeApi/category/MainCategory.d.ts +10 -0
- package/dist/types/storeApi/category/index.d.ts +2 -0
- package/dist/types/storeApi/cms/BackgroundMediaMode.d.ts +1 -0
- package/dist/types/storeApi/cms/CmsBlock.d.ts +28 -0
- package/dist/types/storeApi/cms/CmsPage.d.ts +23 -0
- package/dist/types/storeApi/cms/CmsSection.d.ts +25 -0
- package/dist/types/storeApi/cms/CmsSlot.d.ts +20 -0
- package/dist/types/storeApi/cms/LandingPage.d.ts +23 -0
- package/dist/types/storeApi/cms/Visibility.d.ts +5 -0
- package/dist/types/storeApi/cms/index.d.ts +7 -0
- package/dist/types/storeApi/country/Country.d.ts +40 -0
- package/dist/types/storeApi/country/CountryState.d.ts +13 -0
- package/dist/types/storeApi/country/index.d.ts +2 -0
- package/dist/types/storeApi/customer/Customer.d.ts +61 -0
- package/dist/types/storeApi/customer/CustomerAddress.d.ts +7 -0
- package/dist/types/storeApi/customer/CustomerAddressBody.d.ts +23 -0
- package/dist/types/storeApi/customer/CustomerGroup.d.ts +20 -0
- package/dist/types/storeApi/customer/index.d.ts +4 -0
- package/dist/types/storeApi/document/ShopwareDocument.d.ts +29 -0
- package/dist/types/storeApi/document/ShopwareDocumentBaseConfig.d.ts +17 -0
- package/dist/types/storeApi/document/ShopwareDocumentType.d.ts +10 -0
- package/dist/types/storeApi/document/index.d.ts +3 -0
- package/dist/types/storeApi/filter/EqualsFilter.d.ts +5 -0
- package/dist/types/storeApi/filter/Filters.d.ts +2 -0
- package/dist/types/storeApi/filter/MultiNotFilter.d.ts +6 -0
- package/dist/types/storeApi/filter/RangeFilter.d.ts +10 -0
- package/dist/types/storeApi/filter/SimpleFilter.d.ts +5 -0
- package/dist/types/storeApi/filter/index.d.ts +5 -0
- package/dist/types/storeApi/index.d.ts +32 -0
- package/dist/types/storeApi/lineItem/LineItem.d.ts +32 -0
- package/dist/types/storeApi/lineItem/LineItemPayload.d.ts +74 -0
- package/dist/types/storeApi/lineItem/LineItemType.d.ts +1 -0
- package/dist/types/storeApi/lineItem/index.d.ts +3 -0
- package/dist/types/storeApi/link/Link.d.ts +4 -0
- package/dist/types/storeApi/link/Links.d.ts +2 -0
- package/dist/types/storeApi/link/index.d.ts +2 -0
- package/dist/types/storeApi/locale/Language.d.ts +16 -0
- package/dist/types/storeApi/locale/Locale.d.ts +11 -0
- package/dist/types/storeApi/locale/index.d.ts +2 -0
- package/dist/types/storeApi/media/Media.d.ts +25 -0
- package/dist/types/storeApi/media/MediaThumbnail.d.ts +12 -0
- package/dist/types/storeApi/media/ProductMedia.d.ts +15 -0
- package/dist/types/storeApi/media/index.d.ts +3 -0
- package/dist/types/storeApi/order/Order.d.ts +58 -0
- package/dist/types/storeApi/order/OrderAddress.d.ts +8 -0
- package/dist/types/storeApi/order/OrderCustomer.d.ts +18 -0
- package/dist/types/storeApi/order/OrderDelivery.d.ts +24 -0
- package/dist/types/storeApi/order/OrderDeliveryPosition.d.ts +17 -0
- package/dist/types/storeApi/order/OrderLineItem.d.ts +43 -0
- package/dist/types/storeApi/order/OrderLineItemDownload.d.ts +17 -0
- package/dist/types/storeApi/order/OrderReturn.d.ts +14 -0
- package/dist/types/storeApi/order/OrderReturnLineItem.d.ts +14 -0
- package/dist/types/storeApi/order/OrderReturnLineItemReason.d.ts +6 -0
- package/dist/types/storeApi/order/OrderTransaction.d.ts +22 -0
- package/dist/types/storeApi/order/OrderTransactionCapture.d.ts +20 -0
- package/dist/types/storeApi/order/OrderTransactionCaptureRefund.d.ts +21 -0
- package/dist/types/storeApi/order/OrderTransactionCaptureRefundPosition.d.ts +21 -0
- package/dist/types/storeApi/order/index.d.ts +14 -0
- package/dist/types/storeApi/price/CalculatedPrice.d.ts +25 -0
- package/dist/types/storeApi/price/CartListPrice.d.ts +6 -0
- package/dist/types/storeApi/price/CartPriceQuantity.d.ts +16 -0
- package/dist/types/storeApi/price/CartPriceReference.d.ts +12 -0
- package/dist/types/storeApi/price/CartRegulationPrice.d.ts +4 -0
- package/dist/types/storeApi/price/Price.d.ts +18 -0
- package/dist/types/storeApi/price/index.d.ts +6 -0
- package/dist/types/storeApi/product/Product.d.ts +107 -0
- package/dist/types/storeApi/product/ProductConfiguratorSetting.d.ts +17 -0
- package/dist/types/storeApi/product/ProductDownload.d.ts +16 -0
- package/dist/types/storeApi/product/ProductListingResult.d.ts +29 -0
- package/dist/types/storeApi/product/ProductManufacturer.d.ts +15 -0
- package/dist/types/storeApi/product/ProductReview.d.ts +16 -0
- package/dist/types/storeApi/product/ProductReviewSummary.d.ts +8 -0
- package/dist/types/storeApi/product/ProductStream.d.ts +10 -0
- package/dist/types/storeApi/product/crossSelling/CrossSellingElement.d.ts +9 -0
- package/dist/types/storeApi/product/crossSelling/ProductCrossSelling.d.ts +13 -0
- package/dist/types/storeApi/product/crossSelling/index.d.ts +2 -0
- package/dist/types/storeApi/product/index.d.ts +9 -0
- package/dist/types/storeApi/propertyGroup/PropertyGroup.d.ts +17 -0
- package/dist/types/storeApi/propertyGroup/PropertyGroupOption.d.ts +18 -0
- package/dist/types/storeApi/propertyGroup/index.d.ts +2 -0
- package/dist/types/storeApi/query/Criteria.d.ts +20 -0
- package/dist/types/storeApi/query/Include.d.ts +1 -0
- package/dist/types/storeApi/query/Query.d.ts +5 -0
- package/dist/types/storeApi/query/Sort.d.ts +6 -0
- package/dist/types/storeApi/query/index.d.ts +5 -0
- package/dist/types/storeApi/query/product/ProductListingCriteria.d.ts +25 -0
- package/dist/types/storeApi/query/product/ProductListingFlags.d.ts +4 -0
- package/dist/types/storeApi/query/product/index.d.ts +2 -0
- package/dist/types/storeApi/salesChannel/SalesChannel.d.ts +23 -0
- package/dist/types/storeApi/salesChannel/SalesChannelContext.d.ts +38 -0
- package/dist/types/storeApi/salesChannel/index.d.ts +2 -0
- package/dist/types/storeApi/seo/SeoUrlEntity.d.ts +18 -0
- package/dist/types/storeApi/seo/Sitemap.d.ts +4 -0
- package/dist/types/storeApi/seo/index.d.ts +2 -0
- package/dist/types/storeApi/shippingMethod/ShippingMethod.d.ts +29 -0
- package/dist/types/storeApi/shippingMethod/ShippingMethodPrice.d.ts +15 -0
- package/dist/types/storeApi/shippingMethod/index.d.ts +2 -0
- 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,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,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,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,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,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,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,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
|
+
};
|
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
|
+
}
|