@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,31 @@
|
|
|
1
|
+
import { ClientRequestOptions, ClientResponse, RequestCacheEntry } from "#types";
|
|
2
|
+
import { AccountClient, AddressClient, CartClient, CategoryClient, ContentClient, ContextClient, CustomerAuthenticationClient, DocumentClient, GatewayClient, NewsletterClient, OrderClient, PaymentClient, ProductClient, SeoClient, SystemClient, WishlistClient } from "#clients";
|
|
3
|
+
import { AuthenticationStore } from "#auth";
|
|
4
|
+
declare class ShopwareClient {
|
|
5
|
+
private readonly baseUrl;
|
|
6
|
+
private readonly apiKey;
|
|
7
|
+
readonly authStore: AuthenticationStore;
|
|
8
|
+
readonly cache: Map<string, RequestCacheEntry>;
|
|
9
|
+
constructor(baseUrl: string, apiKey: string);
|
|
10
|
+
doRequest(path: string, options?: ClientRequestOptions): Promise<ClientResponse>;
|
|
11
|
+
private parseBody;
|
|
12
|
+
withContextToken(options: ClientRequestOptions): ClientRequestOptions;
|
|
13
|
+
withOAuth(options: ClientRequestOptions): Promise<ClientRequestOptions>;
|
|
14
|
+
forAccount(): AccountClient;
|
|
15
|
+
forAddress(): AddressClient;
|
|
16
|
+
forCart(): CartClient;
|
|
17
|
+
forCategory(): CategoryClient;
|
|
18
|
+
forContent(): ContentClient;
|
|
19
|
+
forContext(): ContextClient;
|
|
20
|
+
forCustomerAuthentication(): CustomerAuthenticationClient;
|
|
21
|
+
forDocument(): DocumentClient;
|
|
22
|
+
forGateway(): GatewayClient;
|
|
23
|
+
forNewsletter(): NewsletterClient;
|
|
24
|
+
forOrder(): OrderClient;
|
|
25
|
+
forPayment(): PaymentClient;
|
|
26
|
+
forProduct(): ProductClient;
|
|
27
|
+
forSeo(): SeoClient;
|
|
28
|
+
forSystem(): SystemClient;
|
|
29
|
+
forWishlist(): WishlistClient;
|
|
30
|
+
}
|
|
31
|
+
export default ShopwareClient;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AuthenticationEntry } from "./entries";
|
|
2
|
+
import AuthenticationType from "./AuthenticationType";
|
|
3
|
+
declare class AuthenticationStore {
|
|
4
|
+
entries: Map<AuthenticationType, AuthenticationEntry>;
|
|
5
|
+
getOrCreateEntry(entry: AuthenticationEntry): AuthenticationEntry;
|
|
6
|
+
getEntry(type: AuthenticationType): AuthenticationEntry | undefined;
|
|
7
|
+
}
|
|
8
|
+
export default AuthenticationStore;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AuthenticationType } from "..";
|
|
2
|
+
import { ClientRequestOptions, ClientResponse } from "#types";
|
|
3
|
+
interface AuthenticationEntry {
|
|
4
|
+
getType(): AuthenticationType;
|
|
5
|
+
isSaved(): boolean;
|
|
6
|
+
save(response: ClientResponse): void;
|
|
7
|
+
clear(): void;
|
|
8
|
+
load(): ClientRequestOptions;
|
|
9
|
+
}
|
|
10
|
+
export default AuthenticationEntry;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AuthenticationEntry } from ".";
|
|
2
|
+
import { ClientRequestOptions, ClientResponse } from "#types";
|
|
3
|
+
import { AuthenticationType } from "..";
|
|
4
|
+
declare class ContextTokenEntry implements AuthenticationEntry {
|
|
5
|
+
token: string | null;
|
|
6
|
+
constructor(token?: string | null);
|
|
7
|
+
getType(): AuthenticationType;
|
|
8
|
+
isSaved(): boolean;
|
|
9
|
+
save(response: ClientResponse): void;
|
|
10
|
+
clear(): void;
|
|
11
|
+
load(): ClientRequestOptions;
|
|
12
|
+
}
|
|
13
|
+
export default ContextTokenEntry;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AuthenticationEntry } from ".";
|
|
2
|
+
import { ClientResponse } from "#types";
|
|
3
|
+
import { AuthenticationType } from "..";
|
|
4
|
+
declare class OAuthEntry implements AuthenticationEntry {
|
|
5
|
+
accessToken: string | null;
|
|
6
|
+
refreshToken: string | null;
|
|
7
|
+
expiresAt: number | null;
|
|
8
|
+
constructor(accessToken?: string | null, refreshToken?: string | null, expiresAt?: number | null);
|
|
9
|
+
getType(): AuthenticationType;
|
|
10
|
+
isSaved(): boolean;
|
|
11
|
+
save(response: ClientResponse): void;
|
|
12
|
+
clear(): void;
|
|
13
|
+
load(): any;
|
|
14
|
+
}
|
|
15
|
+
export default OAuthEntry;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Client } from "#clients";
|
|
2
|
+
import { AccountEmailChangeRequest, AccountEmailChangeResponse, AccountGetRequest, AccountGetResponse, AccountLanguageChangeRequest, AccountLanguageChangeResponse, AccountNewsletterRecipientListRequest, AccountNewsletterRecipientListResponse, AccountPasswordChangeRequest, AccountPasswordChangeResponse, AccountPasswordRecoveryMailRequest, AccountPasswordRecoveryMailResponse, AccountPasswordRecoveryRequest, AccountPasswordRecoveryResponse, AccountPaymentMethodChangeResponse, AccountRecoveryExpiryCheckRequest, AccountRecoveryExpiryCheckResponse, AccountUpdateRequest, AccountUpdateResponse } from "#types";
|
|
3
|
+
declare class AccountClient extends Client {
|
|
4
|
+
getNewsletterRecipientList(request?: AccountNewsletterRecipientListRequest): Promise<AccountNewsletterRecipientListResponse>;
|
|
5
|
+
changeProfile(request: AccountUpdateRequest): Promise<AccountUpdateResponse>;
|
|
6
|
+
changeEmail(request: AccountEmailChangeRequest): Promise<AccountEmailChangeResponse>;
|
|
7
|
+
changeLanguage(request: AccountLanguageChangeRequest): Promise<AccountLanguageChangeResponse>;
|
|
8
|
+
changePassword(request: AccountPasswordChangeRequest): Promise<AccountPasswordChangeResponse>;
|
|
9
|
+
changePaymentMethod(paymentMethodId: string): Promise<AccountPaymentMethodChangeResponse>;
|
|
10
|
+
isCustomerRecoveryExpired(request: AccountRecoveryExpiryCheckRequest): Promise<AccountRecoveryExpiryCheckResponse>;
|
|
11
|
+
getCustomer(request?: AccountGetRequest): Promise<AccountGetResponse>;
|
|
12
|
+
deleteCustomer(): Promise<undefined>;
|
|
13
|
+
confirmRecoveryPassword(request: AccountPasswordRecoveryRequest): Promise<AccountPasswordRecoveryResponse>;
|
|
14
|
+
requestPasswordRecoveryMail(request: AccountPasswordRecoveryMailRequest): Promise<AccountPasswordRecoveryMailResponse>;
|
|
15
|
+
}
|
|
16
|
+
export default AccountClient;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Client } from "#clients";
|
|
2
|
+
import { AddressCreateRequest, AddressCreateResponse, AddressListRequest, AddressListResponse, AddressUpdateRequest, AddressUpdateResponse } from "#types";
|
|
3
|
+
declare class AddressClient extends Client {
|
|
4
|
+
deleteAddress(addressId: string): Promise<undefined>;
|
|
5
|
+
updateAddress(addressId: string, request: AddressUpdateRequest): Promise<AddressUpdateResponse>;
|
|
6
|
+
getAddressList(request?: AddressListRequest): Promise<AddressListResponse>;
|
|
7
|
+
changeDefaultShippingAddress(addressId: string): Promise<undefined>;
|
|
8
|
+
changeDefaultBillingAddress(addressId: string): Promise<undefined>;
|
|
9
|
+
createAddress(request: AddressCreateRequest): Promise<AddressCreateResponse>;
|
|
10
|
+
}
|
|
11
|
+
export default AddressClient;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Client } from "#clients";
|
|
2
|
+
import { CartAddItemsRequest, CartAddItemsResponse, CartDeleteResponse, CartGetOrCreateResponse, CartRemoveItemsRequest, CartRemoveItemsResponse, CartUpdateItemsRequest, CartUpdateItemsResponse } from "#types";
|
|
3
|
+
declare class CartClient extends Client {
|
|
4
|
+
getOrCreateCart(): Promise<CartGetOrCreateResponse>;
|
|
5
|
+
deleteCart(): Promise<CartDeleteResponse>;
|
|
6
|
+
addLineItemsToCart(request: CartAddItemsRequest): Promise<CartAddItemsResponse>;
|
|
7
|
+
removeLineItemsFromCart(request: CartRemoveItemsRequest): Promise<CartRemoveItemsResponse>;
|
|
8
|
+
updateLineItemsInCart(request: CartUpdateItemsRequest): Promise<CartUpdateItemsResponse>;
|
|
9
|
+
}
|
|
10
|
+
export default CartClient;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Client } from "#clients";
|
|
2
|
+
import { CategoryListRequest, CategoryListResponse, CategorySingleRequest, CategorySingleResponse, NavigationMenuRequest, NavigationMenuResponse } from "#types";
|
|
3
|
+
declare class CategoryClient extends Client {
|
|
4
|
+
getCategoryList(request?: CategoryListRequest): Promise<CategoryListResponse>;
|
|
5
|
+
getCategory(categoryId: string, includeSeoUrls: boolean, request: CategorySingleRequest): Promise<CategorySingleResponse>;
|
|
6
|
+
getNavigationMenu(activeId: string, rootId: string, includeSeoUrls: boolean, request?: NavigationMenuRequest): Promise<NavigationMenuResponse>;
|
|
7
|
+
}
|
|
8
|
+
export default CategoryClient;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import ShopwareClient from "../ShopwareClient";
|
|
2
|
+
import { ClientRequestOptions, HTTPRequestMethod } from "#types";
|
|
3
|
+
declare class Client {
|
|
4
|
+
protected readonly client: ShopwareClient;
|
|
5
|
+
constructor(client: ShopwareClient);
|
|
6
|
+
protected doRequest(method: HTTPRequestMethod, path: string, options?: ClientRequestOptions): Promise<import("#types").ClientResponse>;
|
|
7
|
+
protected get(path: string, options?: ClientRequestOptions): Promise<import("#types").ClientResponse>;
|
|
8
|
+
protected post(path: string, options?: ClientRequestOptions): Promise<import("#types").ClientResponse>;
|
|
9
|
+
protected delete(path: string, options?: ClientRequestOptions): Promise<import("#types").ClientResponse>;
|
|
10
|
+
protected patch(path: string, options?: ClientRequestOptions): Promise<import("#types").ClientResponse>;
|
|
11
|
+
protected put(path: string, options?: ClientRequestOptions): Promise<import("#types").ClientResponse>;
|
|
12
|
+
protected options(path: string, options?: ClientRequestOptions): Promise<import("#types").ClientResponse>;
|
|
13
|
+
protected withContextToken(options?: ClientRequestOptions): ClientRequestOptions;
|
|
14
|
+
protected withOAuth(options?: ClientRequestOptions): Promise<ClientRequestOptions>;
|
|
15
|
+
}
|
|
16
|
+
export default Client;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Client } from "#clients";
|
|
2
|
+
import { CMSPageResolveResponse, ContactFormSubmitRequest, ContactFormSubmitResponse, LandingPageResolveRequest, LandingPageResolveResponse, MediaEntityResolveRequest, MediaEntityResolveResponse } from "#types";
|
|
3
|
+
declare class ContentClient extends Client {
|
|
4
|
+
submitContactForm(request: ContactFormSubmitRequest): Promise<ContactFormSubmitResponse>;
|
|
5
|
+
resolveCMSPage(id: string): Promise<CMSPageResolveResponse>;
|
|
6
|
+
resolveMedia(request: MediaEntityResolveRequest): Promise<MediaEntityResolveResponse>;
|
|
7
|
+
resolveLandingPage(landingPageId: string, request: LandingPageResolveRequest): Promise<LandingPageResolveResponse>;
|
|
8
|
+
}
|
|
9
|
+
export default ContentClient;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Client } from "#clients";
|
|
2
|
+
import { ContextGetResponse, ContextUpdateRequest, ContextUpdateResponse } from "#types";
|
|
3
|
+
declare class ContextClient extends Client {
|
|
4
|
+
getContext(): Promise<ContextGetResponse>;
|
|
5
|
+
updateContext(context: ContextUpdateRequest): Promise<ContextUpdateResponse>;
|
|
6
|
+
}
|
|
7
|
+
export default ContextClient;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Client } from "#clients";
|
|
2
|
+
import { CustomerLoginImitateRequest, CustomerLoginImitateResponse, CustomerLoginRequest, CustomerLoginResponse, CustomerLogoutResponse, CustomerRegisterGroupConfigResponse, CustomerRegisterRequest, CustomerRegisterResponse, CustomerRegistrationConfirmRequest } from "#types";
|
|
3
|
+
declare class CustomerAuthenticationClient extends Client {
|
|
4
|
+
login(request: CustomerLoginRequest): Promise<CustomerLoginResponse>;
|
|
5
|
+
imitateLogin(request: CustomerLoginImitateRequest): Promise<CustomerLoginImitateResponse>;
|
|
6
|
+
logout(): Promise<CustomerLogoutResponse>;
|
|
7
|
+
confirmRegistration(request: CustomerRegistrationConfirmRequest): Promise<undefined>;
|
|
8
|
+
register(request: CustomerRegisterRequest): Promise<CustomerRegisterResponse>;
|
|
9
|
+
getRegistrationSettingsForGroup(customerGroupId: string): Promise<CustomerRegisterGroupConfigResponse>;
|
|
10
|
+
}
|
|
11
|
+
export default CustomerAuthenticationClient;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Client } from "#clients";
|
|
2
|
+
import { DocumentDownloadRequest, DocumentDownloadResponse } from "#types";
|
|
3
|
+
declare class DocumentClient extends Client {
|
|
4
|
+
downloadDocument(deepLinkCode: string, documentId: string, request: DocumentDownloadRequest): Promise<DocumentDownloadResponse>;
|
|
5
|
+
}
|
|
6
|
+
export default DocumentClient;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Client } from "#clients";
|
|
2
|
+
import { NewsletterConfirmRequest, NewsletterUnsubscribeRequest, NewsletterUpdateRequest } from "#types";
|
|
3
|
+
declare class NewsletterClient extends Client {
|
|
4
|
+
confirmSubscription(request: NewsletterConfirmRequest): Promise<undefined>;
|
|
5
|
+
updateSubscription(request: NewsletterUpdateRequest): Promise<undefined>;
|
|
6
|
+
unsubscribe(request: NewsletterUnsubscribeRequest): Promise<undefined>;
|
|
7
|
+
}
|
|
8
|
+
export default NewsletterClient;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Client } from "#clients";
|
|
2
|
+
import { OrderCancelRequest, OrderCancelResponse, OrderDownloadFileResponse, OrderFromCartRequest, OrderFromCartResponse, OrderListRequest, OrderListResponse, OrderUpdatePaymentMethodRequest, OrderUpdatePaymentMethodResponse } from "#types";
|
|
3
|
+
declare class OrderClient extends Client {
|
|
4
|
+
cancelOrder(request: OrderCancelRequest): Promise<OrderCancelResponse>;
|
|
5
|
+
getOrderList(request?: OrderListRequest): Promise<OrderListResponse>;
|
|
6
|
+
updateOrderPaymentMethod(request: OrderUpdatePaymentMethodRequest): Promise<OrderUpdatePaymentMethodResponse>;
|
|
7
|
+
downloadPurchasedFile(downloadId: string, orderId: string): Promise<OrderDownloadFileResponse>;
|
|
8
|
+
createOrderFromCart(request?: OrderFromCartRequest): Promise<OrderFromCartResponse>;
|
|
9
|
+
}
|
|
10
|
+
export default OrderClient;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Client } from "#clients";
|
|
2
|
+
import { OrderPaymentInitiateRequest, OrderPaymentInitiateResponse } from "#types";
|
|
3
|
+
declare class PaymentClient extends Client {
|
|
4
|
+
initiateOrderPayment(request: OrderPaymentInitiateRequest): Promise<OrderPaymentInitiateResponse>;
|
|
5
|
+
}
|
|
6
|
+
export default PaymentClient;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Client } from "#clients";
|
|
2
|
+
import { ProductCrossSellingGroupListResponse, ProductListingListWithCategoryRequest, ProductListingListWithCategoryResponse, ProductListRequest, ProductListResponse, ProductReviewListRequest, ProductReviewListResponse, ProductReviewSaveRequest, ProductSearchRequest, ProductSearchResponse, ProductSearchSuggestionListRequest, ProductSearchSuggestionListResponse, ProductSingleRequest, ProductSingleResponse, ProductVariantWithOptionsRequest, ProductVariantWithOptionsResponse } from "#types";
|
|
3
|
+
declare class ProductClient extends Client {
|
|
4
|
+
getProductListingByCategory(categoryId: string, request?: ProductListingListWithCategoryRequest): Promise<ProductListingListWithCategoryResponse>;
|
|
5
|
+
getCrossSellingGroupsForProduct(productId: string): Promise<ProductCrossSellingGroupListResponse>;
|
|
6
|
+
getProduct(productId: string, includeSeoUrls: boolean, request?: ProductSingleRequest): Promise<ProductSingleResponse>;
|
|
7
|
+
getProductList(request?: ProductListRequest): Promise<ProductListResponse>;
|
|
8
|
+
getReviewsForProduct(productId: string, request?: ProductReviewListRequest): Promise<ProductReviewListResponse>;
|
|
9
|
+
saveReviewForProduct(productId: string, request: ProductReviewSaveRequest): Promise<undefined>;
|
|
10
|
+
findProductVariantWithOptions(productId: string, request: ProductVariantWithOptionsRequest): Promise<ProductVariantWithOptionsResponse>;
|
|
11
|
+
searchProducts(request: ProductSearchRequest): Promise<ProductSearchResponse>;
|
|
12
|
+
getSearchSuggestions(request: ProductSearchSuggestionListRequest): Promise<ProductSearchSuggestionListResponse>;
|
|
13
|
+
}
|
|
14
|
+
export default ProductClient;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Client } from "#clients";
|
|
2
|
+
import { SeoRouteListRequest, SeoRouteListResponse, SitemapDownloadResponse, SitemapListResponse } from "#types";
|
|
3
|
+
declare class SeoClient extends Client {
|
|
4
|
+
getSeoRouteList(request?: SeoRouteListRequest): Promise<SeoRouteListResponse>;
|
|
5
|
+
fetchSitemapList(): Promise<SitemapListResponse>;
|
|
6
|
+
downloadSitemap(filePath: string): Promise<SitemapDownloadResponse>;
|
|
7
|
+
}
|
|
8
|
+
export default SeoClient;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Client } from "#clients";
|
|
2
|
+
import { CountryListRequest, CountryListResponse, CountryStateListRequest, CountryStateListResponse, CurrencyListRequest, CurrencyListResponse, LanguageListRequest, LanguageListResponse, PaymentMethodListRequest, PaymentMethodListResponse, SalutationListRequest, SalutationListResponse, ShippingMethodListRequest, ShippingMethodListResponse } from "#types";
|
|
3
|
+
declare class SystemClient extends Client {
|
|
4
|
+
getLanguageList(request?: LanguageListRequest): Promise<LanguageListResponse>;
|
|
5
|
+
getSalutationList(request?: SalutationListRequest): Promise<SalutationListResponse>;
|
|
6
|
+
getCurrencyList(request?: CurrencyListRequest): Promise<CurrencyListResponse>;
|
|
7
|
+
getCountryStateList(countryId: string, request?: CountryStateListRequest): Promise<CountryStateListResponse>;
|
|
8
|
+
getCountryList(request?: CountryListRequest): Promise<CountryListResponse>;
|
|
9
|
+
getShippingMethodList(request?: ShippingMethodListRequest): Promise<ShippingMethodListResponse>;
|
|
10
|
+
getPaymentMethodList(request?: PaymentMethodListRequest): Promise<PaymentMethodListResponse>;
|
|
11
|
+
}
|
|
12
|
+
export default SystemClient;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Client } from "#clients";
|
|
2
|
+
import { WishlistGetRequest, WishlistGetResponse, WishlistMergeOrCreateRequest, WishlistMergeOrCreateResponse, WishlistProductAddResponse, WishlistProductRemoveResponse } from "#types";
|
|
3
|
+
declare class WishlistClient extends Client {
|
|
4
|
+
addProductToWishlist(productId: string): Promise<WishlistProductAddResponse>;
|
|
5
|
+
getWishlist(request?: WishlistGetRequest): Promise<WishlistGetResponse>;
|
|
6
|
+
mergeOrCreateWishlist(request: WishlistMergeOrCreateRequest): Promise<WishlistMergeOrCreateResponse>;
|
|
7
|
+
removeProductFromWishlist(productId: string): Promise<WishlistProductRemoveResponse>;
|
|
8
|
+
}
|
|
9
|
+
export default WishlistClient;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export { default as Client } from "./Client";
|
|
2
|
+
export { default as AccountClient } from "./AccountClient";
|
|
3
|
+
export { default as AddressClient } from "./AddressClient";
|
|
4
|
+
export { default as CartClient } from "./CartClient";
|
|
5
|
+
export { default as CategoryClient } from "./CategoryClient";
|
|
6
|
+
export { default as ContentClient } from "./ContentClient";
|
|
7
|
+
export { default as ContextClient } from "./ContextClient";
|
|
8
|
+
export { default as CustomerAuthenticationClient } from "./CustomerAuthenticationClient";
|
|
9
|
+
export { default as DocumentClient } from "./DocumentClient";
|
|
10
|
+
export { default as GatewayClient } from "./GatewayClient";
|
|
11
|
+
export { default as NewsletterClient } from "./NewsletterClient";
|
|
12
|
+
export { default as OrderClient } from "./OrderClient";
|
|
13
|
+
export { default as PaymentClient } from "./PaymentClient";
|
|
14
|
+
export { default as ProductClient } from "./ProductClient";
|
|
15
|
+
export { default as SeoClient } from "./SeoClient";
|
|
16
|
+
export { default as SystemClient } from "./SystemClient";
|
|
17
|
+
export { default as WishlistClient } from "./WishlistClient";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ShopwareClient } from "./ShopwareClient";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import Payload from "./Payload";
|
|
2
|
+
declare class BinaryPayload extends Payload<Blob> {
|
|
3
|
+
static CONTENT_TYPE: string;
|
|
4
|
+
data?: Blob;
|
|
5
|
+
constructor(data?: Blob);
|
|
6
|
+
contentType(): string;
|
|
7
|
+
deserialize(data: Blob): Promise<void>;
|
|
8
|
+
serialize(): Blob | undefined;
|
|
9
|
+
}
|
|
10
|
+
export default BinaryPayload;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import Payload from "./Payload";
|
|
2
|
+
declare class JsonPayload extends Payload<string> {
|
|
3
|
+
static CONTENT_TYPE: string;
|
|
4
|
+
data?: object;
|
|
5
|
+
constructor(data?: object);
|
|
6
|
+
contentType(): string;
|
|
7
|
+
deserialize(data: Blob): Promise<void>;
|
|
8
|
+
serialize(): string | undefined;
|
|
9
|
+
}
|
|
10
|
+
export default JsonPayload;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { OAuthResponseBody } from "./OAuthResponseBody";
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { Criteria, Customer } from "../storeApi";
|
|
2
|
+
export type AccountEmailChangeRequest = {
|
|
3
|
+
email: string;
|
|
4
|
+
emailConfirmation: string;
|
|
5
|
+
password: string;
|
|
6
|
+
};
|
|
7
|
+
export type AccountEmailChangeResponse = {
|
|
8
|
+
success?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export type AccountGetRequest = Criteria;
|
|
11
|
+
export type AccountGetResponse = Customer;
|
|
12
|
+
export type AccountLanguageChangeRequest = {
|
|
13
|
+
language?: string;
|
|
14
|
+
};
|
|
15
|
+
export type AccountLanguageChangeResponse = {
|
|
16
|
+
success?: boolean;
|
|
17
|
+
};
|
|
18
|
+
export type AccountNewsletterRecipientListRequest = Criteria;
|
|
19
|
+
export type AccountNewsletterRecipientListResponse = {
|
|
20
|
+
apiAlias: "account_newsletter_recipient";
|
|
21
|
+
status: "undefined" | "notSet" | "direct" | "optIn" | "optOut";
|
|
22
|
+
};
|
|
23
|
+
export type AccountPasswordChangeRequest = {
|
|
24
|
+
password: string;
|
|
25
|
+
newPassword: string;
|
|
26
|
+
newPasswordConfirm: string;
|
|
27
|
+
};
|
|
28
|
+
export type AccountPasswordChangeResponse = {
|
|
29
|
+
success?: boolean;
|
|
30
|
+
};
|
|
31
|
+
export type AccountPasswordRecoveryMailRequest = {
|
|
32
|
+
email: string;
|
|
33
|
+
storefrontUrl: string;
|
|
34
|
+
};
|
|
35
|
+
export type AccountPasswordRecoveryMailResponse = {
|
|
36
|
+
success?: boolean;
|
|
37
|
+
};
|
|
38
|
+
export type AccountPasswordRecoveryRequest = {
|
|
39
|
+
hash: string;
|
|
40
|
+
newPassword: string;
|
|
41
|
+
newPasswordConfirm: string;
|
|
42
|
+
};
|
|
43
|
+
export type AccountPasswordRecoveryResponse = {
|
|
44
|
+
success?: boolean;
|
|
45
|
+
};
|
|
46
|
+
export type AccountPaymentMethodChangeResponse = {
|
|
47
|
+
success?: boolean;
|
|
48
|
+
};
|
|
49
|
+
export type AccountRecoveryExpiryCheckRequest = {
|
|
50
|
+
hash: string;
|
|
51
|
+
};
|
|
52
|
+
export type AccountRecoveryExpiryCheckResponse = {
|
|
53
|
+
apiAlias?: "array_struct";
|
|
54
|
+
data?: {
|
|
55
|
+
isExpired: boolean;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
export type AccountUpdateRequest = {
|
|
59
|
+
salutationId?: string;
|
|
60
|
+
title?: string;
|
|
61
|
+
firstName: string;
|
|
62
|
+
lastName: string;
|
|
63
|
+
company?: string;
|
|
64
|
+
birthdayDay?: number;
|
|
65
|
+
birthdayMonth?: number;
|
|
66
|
+
birthdayYear?: number;
|
|
67
|
+
};
|
|
68
|
+
export type AccountUpdateResponse = {
|
|
69
|
+
success?: boolean;
|
|
70
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Criteria, CustomerAddress, CustomerAddressBody } from "../storeApi";
|
|
2
|
+
export type AddressListRequest = Criteria;
|
|
3
|
+
export type AddressListResponse = Array<CustomerAddress>;
|
|
4
|
+
export type AddressCreateRequest = CustomerAddressBody;
|
|
5
|
+
export type AddressCreateResponse = CustomerAddress;
|
|
6
|
+
export type AddressUpdateRequest = CustomerAddressBody;
|
|
7
|
+
export type AddressUpdateResponse = CustomerAddressBody;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Cart, LineItem } from "../storeApi";
|
|
2
|
+
export type CartAddItemsRequest = {
|
|
3
|
+
items?: Array<LineItem>;
|
|
4
|
+
};
|
|
5
|
+
export type CartAddItemsResponse = Cart;
|
|
6
|
+
export type CartRemoveItemsRequest = {
|
|
7
|
+
ids: Array<string>;
|
|
8
|
+
};
|
|
9
|
+
export type CartRemoveItemsResponse = Cart;
|
|
10
|
+
export type CartUpdateItemsRequest = {
|
|
11
|
+
items?: Array<LineItem>;
|
|
12
|
+
};
|
|
13
|
+
export type CartUpdateItemsResponse = Cart;
|
|
14
|
+
export type CartDeleteResponse = {
|
|
15
|
+
success?: boolean;
|
|
16
|
+
};
|
|
17
|
+
export type CartGetOrCreateResponse = Cart;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Category, Criteria, EntitySearchResult } from "../storeApi";
|
|
2
|
+
export type CategoryListRequest = Criteria;
|
|
3
|
+
export type CategoryListResponse = EntitySearchResult & {
|
|
4
|
+
elements?: Array<Category>;
|
|
5
|
+
};
|
|
6
|
+
export type CategorySingleRequest = Criteria;
|
|
7
|
+
export type CategorySingleResponse = Category;
|
|
8
|
+
export type NavigationMenuRequest = Criteria & {
|
|
9
|
+
depth?: number;
|
|
10
|
+
buildTree?: Array<object>;
|
|
11
|
+
};
|
|
12
|
+
export type NavigationMenuResponse = Array<Category>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { CmsPage, LandingPage, Media, ProductListingCriteria } from "../storeApi";
|
|
2
|
+
export type CMSPageResolveRequest = {
|
|
3
|
+
slots?: string;
|
|
4
|
+
} & ProductListingCriteria;
|
|
5
|
+
export type CMSPageResolveResponse = CmsPage;
|
|
6
|
+
export type ContactFormSubmitRequest = {
|
|
7
|
+
salutationId: string;
|
|
8
|
+
firstName?: string;
|
|
9
|
+
lastName?: string;
|
|
10
|
+
email: string;
|
|
11
|
+
phone?: string;
|
|
12
|
+
subject: string;
|
|
13
|
+
comment: string;
|
|
14
|
+
navigationId?: string;
|
|
15
|
+
slotId?: string;
|
|
16
|
+
cmsPageType?: string;
|
|
17
|
+
entityName?: string;
|
|
18
|
+
};
|
|
19
|
+
export type ContactFormSubmitResponse = {
|
|
20
|
+
success?: boolean;
|
|
21
|
+
};
|
|
22
|
+
export type LandingPageResolveRequest = {
|
|
23
|
+
slots?: string;
|
|
24
|
+
} & ProductListingCriteria;
|
|
25
|
+
export type LandingPageResolveResponse = LandingPage;
|
|
26
|
+
export type MediaEntityResolveRequest = {
|
|
27
|
+
ids: Array<string>;
|
|
28
|
+
};
|
|
29
|
+
export type MediaEntityResolveResponse = Array<Media>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SalesChannelContext } from "../storeApi";
|
|
2
|
+
export type ContextGetRequest = {
|
|
3
|
+
id: string;
|
|
4
|
+
};
|
|
5
|
+
export type ContextGetResponse = SalesChannelContext;
|
|
6
|
+
export type ContextUpdateRequest = {
|
|
7
|
+
currencyId?: string;
|
|
8
|
+
languageId?: string;
|
|
9
|
+
billingAddressId?: string;
|
|
10
|
+
shippingAddressId?: string;
|
|
11
|
+
paymentMethodId?: string;
|
|
12
|
+
shippingMethodId?: string;
|
|
13
|
+
countryId?: string;
|
|
14
|
+
countryStateId?: string;
|
|
15
|
+
};
|
|
16
|
+
export type ContextUpdateResponse = {
|
|
17
|
+
redirectUrl?: string;
|
|
18
|
+
};
|