@devite/shopware-client 1.5.6 → 1.5.8
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/dist/index.cjs +11 -14
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +11 -14
- package/dist/types/clients/store/OrderClient.d.ts +2 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -110,6 +110,9 @@ class ShopwareClient {
|
|
|
110
110
|
* @throws {import('ofetch').FetchError} if the request is invalid
|
|
111
111
|
*/
|
|
112
112
|
doRequest(path, options) {
|
|
113
|
+
if (path.length > 2048) {
|
|
114
|
+
throw new Error("Path may not exceed 2048 characters");
|
|
115
|
+
}
|
|
113
116
|
const serializedBody = options?.body?.serialize() || void 0;
|
|
114
117
|
let cacheKey = null;
|
|
115
118
|
if (options?.maxAge && options.maxAge > 0) {
|
|
@@ -12891,12 +12894,9 @@ class AccountClient extends Client {
|
|
|
12891
12894
|
* @throws {ShopwareError | import('ofetch').FetchError} if the request failed
|
|
12892
12895
|
*/
|
|
12893
12896
|
async confirmRecoveryPassword(request) {
|
|
12894
|
-
const response = await this.post(
|
|
12895
|
-
|
|
12896
|
-
|
|
12897
|
-
body: new JsonPayload(request)
|
|
12898
|
-
})
|
|
12899
|
-
);
|
|
12897
|
+
const response = await this.post(`/account/recovery-password-confirm`, {
|
|
12898
|
+
body: new JsonPayload(request)
|
|
12899
|
+
});
|
|
12900
12900
|
if (response.statusCode === 200)
|
|
12901
12901
|
return response.body.data;
|
|
12902
12902
|
throw new ShopwareError("Failed to confirm recovery password", response);
|
|
@@ -12905,12 +12905,9 @@ class AccountClient extends Client {
|
|
|
12905
12905
|
* @throws {ShopwareError | import('ofetch').FetchError} if the request failed
|
|
12906
12906
|
*/
|
|
12907
12907
|
async requestPasswordRecoveryMail(request) {
|
|
12908
|
-
const response = await this.post(
|
|
12909
|
-
|
|
12910
|
-
|
|
12911
|
-
body: new JsonPayload(request)
|
|
12912
|
-
})
|
|
12913
|
-
);
|
|
12908
|
+
const response = await this.post(`/account/recovery-password`, {
|
|
12909
|
+
body: new JsonPayload(request)
|
|
12910
|
+
});
|
|
12914
12911
|
if (response.statusCode === 200)
|
|
12915
12912
|
return response.body.data;
|
|
12916
12913
|
throw new ShopwareError("Failed to request password recovery mail", response);
|
|
@@ -13312,13 +13309,13 @@ class OrderClient extends Client {
|
|
|
13312
13309
|
/**
|
|
13313
13310
|
* @throws {ShopwareError | import('ofetch').FetchError} if the request failed
|
|
13314
13311
|
*/
|
|
13315
|
-
async
|
|
13312
|
+
async handlePayment(request) {
|
|
13316
13313
|
const response = await this.post("/handle-payment", {
|
|
13317
13314
|
body: new JsonPayload(request)
|
|
13318
13315
|
});
|
|
13319
13316
|
if (response.statusCode === 200)
|
|
13320
13317
|
return response.body.data;
|
|
13321
|
-
throw new ShopwareError("Failed to
|
|
13318
|
+
throw new ShopwareError("Failed to handle order payment", response);
|
|
13322
13319
|
}
|
|
13323
13320
|
/**
|
|
13324
13321
|
* @throws {ShopwareError | import('ofetch').FetchError} if the request failed
|
package/dist/index.d.cts
CHANGED
|
@@ -107,7 +107,7 @@ import { CustomerLoginRequest, CustomerLoginResponse, CustomerLoginImitateReques
|
|
|
107
107
|
import { DocumentDownloadRequest, DocumentDownloadResponse } from '#types/clients/store/DocumentClient';
|
|
108
108
|
import { GatewayCheckoutResponse } from '#types/clients/store/GatewayClient';
|
|
109
109
|
import { NewsletterConfirmRequest, NewsletterUpdateRequest, NewsletterUnsubscribeRequest } from '#types/clients/store/NewsletterClient';
|
|
110
|
-
import {
|
|
110
|
+
import { OrderPaymentHandleRequest, OrderPaymentHandleResponse, OrderCancelRequest, OrderCancelResponse, OrderListRequest, OrderListResponse as OrderListResponse$1, OrderUpdatePaymentMethodRequest, OrderUpdatePaymentMethodResponse, OrderDownloadFileResponse, OrderFromCartRequest, OrderFromCartResponse } from '#types/clients/store/OrderClient';
|
|
111
111
|
import { ProductListingListWithCategoryRequest, ProductListingListWithCategoryResponse, ProductCrossSellingGroupListResponse, ProductSingleRequest, ProductSingleResponse as ProductSingleResponse$1, ProductListRequest, ProductListResponse as ProductListResponse$1, ProductReviewListRequest, ProductReviewListResponse, ProductReviewSaveRequest, ProductVariantWithOptionsRequest, ProductVariantWithOptionsResponse, ProductSearchRequest, ProductSearchResponse, ProductSearchSuggestionListRequest, ProductSearchSuggestionListResponse } from '#types/clients/store/ProductClient';
|
|
112
112
|
import { SeoRouteListRequest, SeoRouteListResponse, SitemapListResponse, SitemapDownloadResponse } from '#types/clients/store/SeoClient';
|
|
113
113
|
import { LanguageListRequest, LanguageListResponse as LanguageListResponse$1, SalutationListRequest, SalutationListResponse as SalutationListResponse$1, CurrencyListRequest, CurrencyListResponse as CurrencyListResponse$1, CountryStateListRequest, CountryStateListResponse, CountryListRequest, CountryListResponse as CountryListResponse$1, ShippingMethodListRequest, ShippingMethodListResponse as ShippingMethodListResponse$2, PaymentMethodListRequest, PaymentMethodListResponse as PaymentMethodListResponse$2 } from '#types/clients/store/SystemClient';
|
|
@@ -7343,7 +7343,7 @@ declare class OrderClient extends Client {
|
|
|
7343
7343
|
/**
|
|
7344
7344
|
* @throws {ShopwareError | import('ofetch').FetchError} if the request failed
|
|
7345
7345
|
*/
|
|
7346
|
-
|
|
7346
|
+
handlePayment(request: OrderPaymentHandleRequest): Promise<OrderPaymentHandleResponse>;
|
|
7347
7347
|
/**
|
|
7348
7348
|
* @throws {ShopwareError | import('ofetch').FetchError} if the request failed
|
|
7349
7349
|
*/
|
package/dist/index.d.mts
CHANGED
|
@@ -107,7 +107,7 @@ import { CustomerLoginRequest, CustomerLoginResponse, CustomerLoginImitateReques
|
|
|
107
107
|
import { DocumentDownloadRequest, DocumentDownloadResponse } from '#types/clients/store/DocumentClient';
|
|
108
108
|
import { GatewayCheckoutResponse } from '#types/clients/store/GatewayClient';
|
|
109
109
|
import { NewsletterConfirmRequest, NewsletterUpdateRequest, NewsletterUnsubscribeRequest } from '#types/clients/store/NewsletterClient';
|
|
110
|
-
import {
|
|
110
|
+
import { OrderPaymentHandleRequest, OrderPaymentHandleResponse, OrderCancelRequest, OrderCancelResponse, OrderListRequest, OrderListResponse as OrderListResponse$1, OrderUpdatePaymentMethodRequest, OrderUpdatePaymentMethodResponse, OrderDownloadFileResponse, OrderFromCartRequest, OrderFromCartResponse } from '#types/clients/store/OrderClient';
|
|
111
111
|
import { ProductListingListWithCategoryRequest, ProductListingListWithCategoryResponse, ProductCrossSellingGroupListResponse, ProductSingleRequest, ProductSingleResponse as ProductSingleResponse$1, ProductListRequest, ProductListResponse as ProductListResponse$1, ProductReviewListRequest, ProductReviewListResponse, ProductReviewSaveRequest, ProductVariantWithOptionsRequest, ProductVariantWithOptionsResponse, ProductSearchRequest, ProductSearchResponse, ProductSearchSuggestionListRequest, ProductSearchSuggestionListResponse } from '#types/clients/store/ProductClient';
|
|
112
112
|
import { SeoRouteListRequest, SeoRouteListResponse, SitemapListResponse, SitemapDownloadResponse } from '#types/clients/store/SeoClient';
|
|
113
113
|
import { LanguageListRequest, LanguageListResponse as LanguageListResponse$1, SalutationListRequest, SalutationListResponse as SalutationListResponse$1, CurrencyListRequest, CurrencyListResponse as CurrencyListResponse$1, CountryStateListRequest, CountryStateListResponse, CountryListRequest, CountryListResponse as CountryListResponse$1, ShippingMethodListRequest, ShippingMethodListResponse as ShippingMethodListResponse$2, PaymentMethodListRequest, PaymentMethodListResponse as PaymentMethodListResponse$2 } from '#types/clients/store/SystemClient';
|
|
@@ -7343,7 +7343,7 @@ declare class OrderClient extends Client {
|
|
|
7343
7343
|
/**
|
|
7344
7344
|
* @throws {ShopwareError | import('ofetch').FetchError} if the request failed
|
|
7345
7345
|
*/
|
|
7346
|
-
|
|
7346
|
+
handlePayment(request: OrderPaymentHandleRequest): Promise<OrderPaymentHandleResponse>;
|
|
7347
7347
|
/**
|
|
7348
7348
|
* @throws {ShopwareError | import('ofetch').FetchError} if the request failed
|
|
7349
7349
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -107,7 +107,7 @@ import { CustomerLoginRequest, CustomerLoginResponse, CustomerLoginImitateReques
|
|
|
107
107
|
import { DocumentDownloadRequest, DocumentDownloadResponse } from '#types/clients/store/DocumentClient';
|
|
108
108
|
import { GatewayCheckoutResponse } from '#types/clients/store/GatewayClient';
|
|
109
109
|
import { NewsletterConfirmRequest, NewsletterUpdateRequest, NewsletterUnsubscribeRequest } from '#types/clients/store/NewsletterClient';
|
|
110
|
-
import {
|
|
110
|
+
import { OrderPaymentHandleRequest, OrderPaymentHandleResponse, OrderCancelRequest, OrderCancelResponse, OrderListRequest, OrderListResponse as OrderListResponse$1, OrderUpdatePaymentMethodRequest, OrderUpdatePaymentMethodResponse, OrderDownloadFileResponse, OrderFromCartRequest, OrderFromCartResponse } from '#types/clients/store/OrderClient';
|
|
111
111
|
import { ProductListingListWithCategoryRequest, ProductListingListWithCategoryResponse, ProductCrossSellingGroupListResponse, ProductSingleRequest, ProductSingleResponse as ProductSingleResponse$1, ProductListRequest, ProductListResponse as ProductListResponse$1, ProductReviewListRequest, ProductReviewListResponse, ProductReviewSaveRequest, ProductVariantWithOptionsRequest, ProductVariantWithOptionsResponse, ProductSearchRequest, ProductSearchResponse, ProductSearchSuggestionListRequest, ProductSearchSuggestionListResponse } from '#types/clients/store/ProductClient';
|
|
112
112
|
import { SeoRouteListRequest, SeoRouteListResponse, SitemapListResponse, SitemapDownloadResponse } from '#types/clients/store/SeoClient';
|
|
113
113
|
import { LanguageListRequest, LanguageListResponse as LanguageListResponse$1, SalutationListRequest, SalutationListResponse as SalutationListResponse$1, CurrencyListRequest, CurrencyListResponse as CurrencyListResponse$1, CountryStateListRequest, CountryStateListResponse, CountryListRequest, CountryListResponse as CountryListResponse$1, ShippingMethodListRequest, ShippingMethodListResponse as ShippingMethodListResponse$2, PaymentMethodListRequest, PaymentMethodListResponse as PaymentMethodListResponse$2 } from '#types/clients/store/SystemClient';
|
|
@@ -7343,7 +7343,7 @@ declare class OrderClient extends Client {
|
|
|
7343
7343
|
/**
|
|
7344
7344
|
* @throws {ShopwareError | import('ofetch').FetchError} if the request failed
|
|
7345
7345
|
*/
|
|
7346
|
-
|
|
7346
|
+
handlePayment(request: OrderPaymentHandleRequest): Promise<OrderPaymentHandleResponse>;
|
|
7347
7347
|
/**
|
|
7348
7348
|
* @throws {ShopwareError | import('ofetch').FetchError} if the request failed
|
|
7349
7349
|
*/
|
package/dist/index.mjs
CHANGED
|
@@ -108,6 +108,9 @@ class ShopwareClient {
|
|
|
108
108
|
* @throws {import('ofetch').FetchError} if the request is invalid
|
|
109
109
|
*/
|
|
110
110
|
doRequest(path, options) {
|
|
111
|
+
if (path.length > 2048) {
|
|
112
|
+
throw new Error("Path may not exceed 2048 characters");
|
|
113
|
+
}
|
|
111
114
|
const serializedBody = options?.body?.serialize() || void 0;
|
|
112
115
|
let cacheKey = null;
|
|
113
116
|
if (options?.maxAge && options.maxAge > 0) {
|
|
@@ -12889,12 +12892,9 @@ class AccountClient extends Client {
|
|
|
12889
12892
|
* @throws {ShopwareError | import('ofetch').FetchError} if the request failed
|
|
12890
12893
|
*/
|
|
12891
12894
|
async confirmRecoveryPassword(request) {
|
|
12892
|
-
const response = await this.post(
|
|
12893
|
-
|
|
12894
|
-
|
|
12895
|
-
body: new JsonPayload(request)
|
|
12896
|
-
})
|
|
12897
|
-
);
|
|
12895
|
+
const response = await this.post(`/account/recovery-password-confirm`, {
|
|
12896
|
+
body: new JsonPayload(request)
|
|
12897
|
+
});
|
|
12898
12898
|
if (response.statusCode === 200)
|
|
12899
12899
|
return response.body.data;
|
|
12900
12900
|
throw new ShopwareError("Failed to confirm recovery password", response);
|
|
@@ -12903,12 +12903,9 @@ class AccountClient extends Client {
|
|
|
12903
12903
|
* @throws {ShopwareError | import('ofetch').FetchError} if the request failed
|
|
12904
12904
|
*/
|
|
12905
12905
|
async requestPasswordRecoveryMail(request) {
|
|
12906
|
-
const response = await this.post(
|
|
12907
|
-
|
|
12908
|
-
|
|
12909
|
-
body: new JsonPayload(request)
|
|
12910
|
-
})
|
|
12911
|
-
);
|
|
12906
|
+
const response = await this.post(`/account/recovery-password`, {
|
|
12907
|
+
body: new JsonPayload(request)
|
|
12908
|
+
});
|
|
12912
12909
|
if (response.statusCode === 200)
|
|
12913
12910
|
return response.body.data;
|
|
12914
12911
|
throw new ShopwareError("Failed to request password recovery mail", response);
|
|
@@ -13310,13 +13307,13 @@ class OrderClient extends Client {
|
|
|
13310
13307
|
/**
|
|
13311
13308
|
* @throws {ShopwareError | import('ofetch').FetchError} if the request failed
|
|
13312
13309
|
*/
|
|
13313
|
-
async
|
|
13310
|
+
async handlePayment(request) {
|
|
13314
13311
|
const response = await this.post("/handle-payment", {
|
|
13315
13312
|
body: new JsonPayload(request)
|
|
13316
13313
|
});
|
|
13317
13314
|
if (response.statusCode === 200)
|
|
13318
13315
|
return response.body.data;
|
|
13319
|
-
throw new ShopwareError("Failed to
|
|
13316
|
+
throw new ShopwareError("Failed to handle order payment", response);
|
|
13320
13317
|
}
|
|
13321
13318
|
/**
|
|
13322
13319
|
* @throws {ShopwareError | import('ofetch').FetchError} if the request failed
|
|
@@ -2,13 +2,13 @@ import { StateMachineState } from "#types/api/store/StateMachineState";
|
|
|
2
2
|
import { Order } from "#types/api/store/order/Order";
|
|
3
3
|
import { Criteria } from "#types/api/global/query/Criteria";
|
|
4
4
|
import { EntitySearchResult } from "#types/api/store";
|
|
5
|
-
export interface
|
|
5
|
+
export interface OrderPaymentHandleRequest {
|
|
6
6
|
orderId: string;
|
|
7
7
|
finishUrl?: string;
|
|
8
8
|
errorUrl?: string;
|
|
9
9
|
paymentDetails?: Record<string, any>;
|
|
10
10
|
}
|
|
11
|
-
export interface
|
|
11
|
+
export interface OrderPaymentHandleResponse {
|
|
12
12
|
redirectUrl: string | null;
|
|
13
13
|
}
|
|
14
14
|
export interface OrderCancelRequest {
|