Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
niklaswolf committed Nov 18, 2020
2 parents 8cfba0d + 8727821 commit ece55ef
Show file tree
Hide file tree
Showing 90 changed files with 2,651 additions and 772 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Shopware PWA

[![CircleCI](https://circleci.com/gh/DivanteLtd/shopware-pwa.svg?style=svg)](https://circleci.com/gh/DivanteLtd/shopware-pwa) [![Coverage Status](https://coveralls.io/repos/github/DivanteLtd/shopware-pwa/badge.svg?branch=master)](https://coveralls.io/github/DivanteLtd/shopware-pwa) [![Greenkeeper badge](https://badges.greenkeeper.io/DivanteLtd/shopware-pwa.svg)](https://greenkeeper.io/)
[![CircleCI](https://circleci.com/gh/DivanteLtd/shopware-pwa.svg?style=svg)](https://circleci.com/gh/DivanteLtd/shopware-pwa) [![Coverage Status](https://coveralls.io/repos/github/DivanteLtd/shopware-pwa/badge.svg?branch=master)](https://coveralls.io/github/DivanteLtd/shopware-pwa) [![Snyk badge](https://snyk.io/test/github/DivanteLtd/shopware-pwa/badge.svg)](https://snyk.io/)

<a href="https://shopware-pwa-docs.vuestorefront.io" target="_blank" rel=”noopener”>Documentation</a>

Expand Down Expand Up @@ -49,8 +49,8 @@ If you have any questions or ideas feel free to join our slack: https://vuestore
Before you start testing it locally, **try it out on CodeSandbox**
_(including shopware-pwa CLI commands in embedded terminal)_

[![Edit shopware-pwa v0.4.2](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/busy-worker-d68et?fontsize=14&hidenavigation=1&theme=dark)
v0.4.2 (latest release)
[![Edit shopware-pwa v0.5.1](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/shopware-pwa-v050-zmr5p?file=/README.md)
v0.5.1 (latest release)

### Usage

Expand Down
89 changes: 48 additions & 41 deletions api/shopware-6-client.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,23 @@ import { StoreNavigationElement } from '@shopware-pwa/commons/interfaces/models/
// @beta @deprecated
export function addCartItemQuantity(itemId: string, quantity: number, contextInstance?: ShopwareApiInstance): Promise<Cart>;

// @beta
export function addProductReview(productId: string, productReviewData: {
title: string;
content: string;
points: number;
}, contextInstance?: ShopwareApiInstance): Promise<void>;

// @beta
export function addProductToCart(productId: string, quantity?: number, contextInstance?: ShopwareApiInstance): Promise<Cart>;

// @alpha
// @beta
export function addPromotionCode(promotionCode: string, contextInstance?: ShopwareApiInstance): Promise<Cart>;

// @beta
export function changeCartItemQuantity(itemId: string, newQuantity?: number, contextInstance?: ShopwareApiInstance): Promise<Cart>;

// @alpha
// @beta
export function clearCart(contextInstance?: ShopwareApiInstance): Promise<ContextTokenResponse>;

// @beta (undocumented)
Expand Down Expand Up @@ -88,33 +95,33 @@ export interface ContactFormData {
subject: string;
}

// @alpha
// @beta
export function createCustomerAddress(params: Partial<CustomerAddress>, contextInstance?: ShopwareApiInstance): Promise<string>;

// @alpha
// @beta
export function createGuestOrder(params: GuestOrderParams, contextInstance?: ShopwareApiInstance): Promise<Order>;

// @beta (undocumented)
export function createInstance(initialConfig?: ClientSettings): ShopwareApiInstance;

// @alpha
// @beta
export function createOrder(contextInstance?: ShopwareApiInstance): Promise<Order>;

// @alpha (undocumented)
// @beta (undocumented)
export interface CustomerRegisterResponse {
// (undocumented)
data: string;
}

// @alpha (undocumented)
// @beta (undocumented)
export interface CustomerResetPasswordParam {
// (undocumented)
email: string;
// (undocumented)
storefrontUrl?: string;
}

// @alpha (undocumented)
// @beta (undocumented)
export interface CustomerUpdateEmailParam {
// (undocumented)
email: string;
Expand All @@ -124,7 +131,7 @@ export interface CustomerUpdateEmailParam {
password: string;
}

// @alpha (undocumented)
// @beta (undocumented)
export interface CustomerUpdatePasswordParam {
// (undocumented)
newPassword: string;
Expand All @@ -134,7 +141,7 @@ export interface CustomerUpdatePasswordParam {
password: string;
}

// @alpha (undocumented)
// @beta (undocumented)
export interface CustomerUpdateProfileParam {
// (undocumented)
firstName: string;
Expand All @@ -146,25 +153,25 @@ export interface CustomerUpdateProfileParam {
title: string | null;
}

// @alpha
// @beta
export function deleteCustomerAddress(addressId: string, contextInstance?: ShopwareApiInstance): Promise<void>;

// @alpha
// @beta
export function getAvailableCountries(contextInstance?: ShopwareApiInstance): Promise<SearchResult<Country[]>>;

// @alpha (undocumented)
// @beta (undocumented)
export function getAvailableCurrencies(contextInstance?: ShopwareApiInstance): Promise<Currency[]>;

// @alpha (undocumented)
// @beta (undocumented)
export function getAvailableLanguages(contextInstance?: ShopwareApiInstance): Promise<Language[]>;

// @alpha (undocumented)
// @beta (undocumented)
export function getAvailablePaymentMethods(contextInstance?: ShopwareApiInstance): Promise<PaymentMethod[]>;

// @alpha
// @beta
export function getAvailableSalutations(contextInstance?: ShopwareApiInstance): Promise<SearchResult<Salutation[]>>;

// @alpha (undocumented)
// @beta (undocumented)
export function getAvailableShippingMethods(contextInstance?: ShopwareApiInstance): Promise<ShippingMethod[]>;

// @beta
Expand All @@ -179,7 +186,7 @@ export function getCategory(categoryId: string, contextInstance?: ShopwareApiIns
// @beta
export const getCategoryProducts: (categoryId: string, criteria?: ShopwareSearchParams | undefined, contextInstance?: ShopwareApiInstance) => Promise<ProductListingResult>;

// @alpha
// @beta
export const getCategoryProductsListing: (categoryId: string, searchCriteria?: SearchCriteria | undefined, contextInstance?: ShopwareApiInstance) => Promise<ProductListingResult>;

// @beta (undocumented)
Expand All @@ -188,13 +195,13 @@ export function getCmsPage(path: string, criteria?: ShopwareSearchParams, contex
// @beta
export function getCustomer(contextInstance?: ShopwareApiInstance): Promise<Customer | null>;

// @alpha
// @beta
export function getCustomerAddress(addressId: string, contextInstance?: ShopwareApiInstance): Promise<CustomerAddress>;

// @beta
export function getCustomerAddresses(contextInstance?: ShopwareApiInstance): Promise<CustomerAddress[]>;

// @alpha
// @beta
export function getCustomerOrderDetails(orderId: string, contextInstance?: ShopwareApiInstance): Promise<Order | undefined>;

// @beta
Expand All @@ -219,13 +226,13 @@ export function getOrderPaymentUrl({ orderId, finishUrl, }: {
paymentUrl: string;
}>;

// @alpha (undocumented)
// @beta (undocumented)
export function getPage(path: string, searchCriteria?: SearchCriteria, contextInstance?: ShopwareApiInstance): Promise<PageResolverResult<CmsPage>>;

// @alpha (undocumented)
// @beta (undocumented)
export function getPaymentMethodDetails(paymentId: string, contextInstance?: ShopwareApiInstance): Promise<PaymentMethod>;

// @alpha
// @beta
export function getProduct(productId: string, params?: any, contextInstance?: ShopwareApiInstance): Promise<Product>;

// @beta (undocumented)
Expand All @@ -243,10 +250,10 @@ export function getResults(term: string, searchCriteria?: SearchCriteria, contex
// @beta (undocumented)
export function getSearchResults(term: string, searchCriteria?: SearchCriteria, contextInstance?: ShopwareApiInstance): Promise<ProductListingResult>;

// @alpha
// @beta
export function getSessionContext(contextInstance?: ShopwareApiInstance): Promise<SessionContext>;

// @alpha (undocumented)
// @beta (undocumented)
export function getShippingMethodDetails(shippingId: string, contextInstance?: ShopwareApiInstance): Promise<ShippingMethod>;

// @beta (undocumented)
Expand All @@ -266,7 +273,7 @@ export interface GetStoreNavigationParams {
searchCriteria?: SearchCriteria;
}

// @alpha (undocumented)
// @beta (undocumented)
export function getStoreOrderPaymentUrl(orderId: string, contextInstance?: ShopwareApiInstance): Promise<{
redirectResponse: unknown;
apiAlias: string;
Expand All @@ -275,10 +282,10 @@ export function getStoreOrderPaymentUrl(orderId: string, contextInstance?: Shopw
// @alpha @deprecated (undocumented)
export function getSuggestedResults(term: string, searchCriteria?: SearchCriteria, contextInstance?: ShopwareApiInstance): Promise<ProductListingResult>;

// @alpha (undocumented)
// @beta (undocumented)
export function getUserCountry(countryId: string, contextInstance?: ShopwareApiInstance): Promise<Country>;

// @alpha (undocumented)
// @beta (undocumented)
export function getUserSalutation(salutationId: string, contextInstance?: ShopwareApiInstance): Promise<Salutation>;

// @beta
Expand Down Expand Up @@ -371,13 +378,13 @@ export interface PageResolverResult<T> {
resourceType: string;
}

// @alpha
// @beta
export function register(params: CustomerRegistrationParams, contextInstance?: ShopwareApiInstance): Promise<CustomerRegisterResponse>;

// @beta
export function removeCartItem(itemId: string, contextInstance?: ShopwareApiInstance): Promise<Cart>;

// @alpha
// @beta
export function resetPassword(params: CustomerResetPasswordParam, contextInstance?: ShopwareApiInstance): Promise<void>;

// @beta
Expand All @@ -389,28 +396,28 @@ export function searchSuggestedProducts(criteria?: ShopwareSearchParams, context
// @beta (undocumented)
export function sendContactForm(params: ContactFormData, contextInstance?: ShopwareApiInstance): Promise<void>;

// @alpha
// @beta
export function setCurrentBillingAddress(billingAddressId: string, contextInstance?: ShopwareApiInstance): Promise<ContextTokenResponse>;

// @alpha (undocumented)
// @beta (undocumented)
export function setCurrentCurrency(newCurrencyID: string, contextInstance?: ShopwareApiInstance): Promise<ContextTokenResponse>;

// @alpha (undocumented)
// @beta (undocumented)
export function setCurrentLanguage(newLanguageId: string, contextInstance?: ShopwareApiInstance): Promise<ContextTokenResponse>;

// @alpha (undocumented)
// @beta (undocumented)
export function setCurrentPaymentMethod(newPaymentMethodId: string, contextInstance?: ShopwareApiInstance): Promise<ContextTokenResponse>;

// @alpha
// @beta
export function setCurrentShippingAddress(shippingAddressId: string, contextInstance?: ShopwareApiInstance): Promise<ContextTokenResponse>;

// @alpha (undocumented)
// @beta (undocumented)
export function setCurrentShippingMethod(newShippingMethodId: string, contextInstance?: ShopwareApiInstance): Promise<ContextTokenResponse>;

// @alpha
// @beta
export function setDefaultCustomerBillingAddress(addressId: string, contextInstance?: ShopwareApiInstance): Promise<string>;

// @alpha
// @beta
export function setDefaultCustomerShippingAddress(addressId: string, contextInstance?: ShopwareApiInstance): Promise<string>;

// @beta
Expand Down Expand Up @@ -441,13 +448,13 @@ export interface ShopwareApiInstance {
// @beta
export const update: (config?: ClientSettings) => void;

// @alpha
// @beta
export function updateEmail(params: CustomerUpdateEmailParam, contextInstance?: ShopwareApiInstance): Promise<void>;

// @alpha
// @beta
export function updatePassword(params: CustomerUpdatePasswordParam, contextInstance?: ShopwareApiInstance): Promise<void>;

// @alpha
// @beta
export function updateProfile(params: CustomerUpdateProfileParam, contextInstance?: ShopwareApiInstance): Promise<void>;


Expand Down
2 changes: 1 addition & 1 deletion docs/landing/getting-started/upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The supported API versions of Shopware 6 are v3 and v2. Generally speaking, each

We want Shopware PWA to be in sync with the latest endpoints of Shopware, to be able to ship new features to you as soon as they are released within Shopware.

## Migrate version 0.4.x to 0.5.x - not released yet!
## Migrate version 0.4.x to 0.5.x

**MIGRATION STEPS**:

Expand Down
37 changes: 37 additions & 0 deletions docs/landing/resources/api/shopware-6-client.addproductreview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@shopware-pwa/shopware-6-client](./shopware-6-client.md) &gt; [addProductReview](./shopware-6-client.addproductreview.md)

## addProductReview() function

> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
>
Add a review to specific product by its ID

<b>Signature:</b>

```typescript
export declare function addProductReview(productId: string, productReviewData: {
title: string;
content: string;
points: number;
}, contextInstance?: ShopwareApiInstance): Promise<void>;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| productId | string | |
| productReviewData | { title: string; content: string; points: number; } | |
| contextInstance | [ShopwareApiInstance](./shopware-6-client.shopwareapiinstance.md) | |

<b>Returns:</b>

Promise&lt;void&gt;

## Exceptions

ClientApiError

34 changes: 34 additions & 0 deletions docs/landing/resources/api/shopware-6-client.addpromotioncode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@shopware-pwa/shopware-6-client](./shopware-6-client.md) &gt; [addPromotionCode](./shopware-6-client.addpromotioncode.md)

## addPromotionCode() function

> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
>
Adds new promotion code to the cart by its code.

Promotion code is being added as separate cart item line.

<b>Signature:</b>

```typescript
export declare function addPromotionCode(promotionCode: string, contextInstance?: ShopwareApiInstance): Promise<Cart>;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| promotionCode | string | |
| contextInstance | [ShopwareApiInstance](./shopware-6-client.shopwareapiinstance.md) | |

<b>Returns:</b>

Promise&lt;Cart&gt;

## Exceptions

ClientApiError

Loading

0 comments on commit ece55ef

Please sign in to comment.