@devite/shopware-client 1.5.4 → 1.5.6
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 +2 -3
- package/dist/index.d.cts +3 -2
- package/dist/index.d.mts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.mjs +2 -3
- package/dist/types/api/admin/product/review/ProductReview.d.ts +1 -0
- package/dist/types/api/global/GenericRecord.d.ts +1 -3
- package/dist/types/api/store/cart/Cart.d.ts +7 -2
- package/dist/types/api/store/cart/delivery/CartDeliveryPosition.d.ts +2 -2
- package/dist/types/api/store/cart/delivery/index.d.ts +6 -0
- package/dist/types/api/store/cart/index.d.ts +2 -0
- package/dist/types/api/store/{lineItem/LineItem.d.ts → cart/lineItem/CartLineItem.d.ts} +11 -10
- package/dist/types/api/store/cart/lineItem/CartLineItemPayload.d.ts +1 -0
- package/dist/types/api/store/cart/lineItem/CartLineItemType.d.ts +1 -0
- package/dist/types/api/store/cart/lineItem/index.d.ts +3 -0
- package/dist/types/api/store/customer/Customer.d.ts +1 -1
- package/dist/types/api/store/index.d.ts +0 -1
- package/dist/types/api/store/order/OrderLineItem.d.ts +2 -2
- package/dist/types/api/store/order/OrderPrice.d.ts +5 -1
- package/dist/types/clients/store/AccountClient.d.ts +6 -1
- package/dist/types/clients/store/CartClient.d.ts +3 -6
- package/dist/types/clients/store/OrderClient.d.ts +7 -3
- package/package.json +4 -4
- package/dist/types/api/store/lineItem/LineItemPayload.d.ts +0 -26
- package/dist/types/api/store/lineItem/LineItemType.d.ts +0 -1
- package/dist/types/api/store/lineItem/index.d.ts +0 -3
package/dist/index.cjs
CHANGED
|
@@ -12866,7 +12866,7 @@ class AccountClient extends Client {
|
|
|
12866
12866
|
* @throws {ShopwareError | import('ofetch').FetchError} if the request failed
|
|
12867
12867
|
*/
|
|
12868
12868
|
async getCustomer(request = {}) {
|
|
12869
|
-
const response = await this.
|
|
12869
|
+
const response = await this.post(
|
|
12870
12870
|
`/account/customer`,
|
|
12871
12871
|
this.client.withContextToken({
|
|
12872
12872
|
body: new JsonPayload(request)
|
|
@@ -13048,8 +13048,7 @@ class CartClient extends Client {
|
|
|
13048
13048
|
"/checkout/cart",
|
|
13049
13049
|
this.client.withContextToken()
|
|
13050
13050
|
);
|
|
13051
|
-
if (response.statusCode ===
|
|
13052
|
-
return response.body.data;
|
|
13051
|
+
if (response.statusCode === 204) return;
|
|
13053
13052
|
throw new ShopwareError("Failed to delete cart", response);
|
|
13054
13053
|
}
|
|
13055
13054
|
/**
|
package/dist/index.d.cts
CHANGED
|
@@ -99,7 +99,7 @@ import { UserListResponse, UserCreateRequest, UserCreateResponse, UserListSearch
|
|
|
99
99
|
import { WebhookListResponse, WebhookCreateRequest, WebhookCreateResponse, WebhookListSearchRequest, WebhookListSearchResponse, WebhookSingleResponse, WebhookUpdateRequest, WebhookUpdateResponse, WebhookAggregationRequest, WebhookAggregationResponse, EventLogListResponse, EventLogCreateRequest, EventLogCreateResponse, EventLogListSearchRequest, EventLogListSearchResponse, EventLogSingleResponse, EventLogUpdateRequest, EventLogUpdateResponse, EventLogAggregationRequest, EventLogAggregationResponse } from '#types/clients/admin/WebhookClient';
|
|
100
100
|
import { AccountNewsletterRecipientListRequest, AccountNewsletterRecipientListResponse, AccountUpdateRequest, AccountUpdateResponse, AccountEmailChangeRequest, AccountEmailChangeResponse, AccountLanguageChangeRequest, AccountLanguageChangeResponse, AccountPasswordChangeRequest, AccountPasswordChangeResponse, AccountPaymentMethodChangeResponse, AccountRecoveryExpiryCheckRequest, AccountRecoveryExpiryCheckResponse, AccountGetRequest, AccountGetResponse, AccountPasswordRecoveryRequest, AccountPasswordRecoveryResponse, AccountPasswordRecoveryMailRequest, AccountPasswordRecoveryMailResponse, CustomerRegistrationConfirmRequest, CustomerRegisterRequest, CustomerRegisterResponse, CustomerRegisterGroupConfigResponse } from '#types/clients/store/AccountClient';
|
|
101
101
|
import { AddressCreateRequest as AddressCreateRequest$2, AddressCreateResponse as AddressCreateResponse$2, AddressUpdateRequest as AddressUpdateRequest$2, AddressUpdateResponse as AddressUpdateResponse$2, AddressListRequest, AddressListResponse as AddressListResponse$2 } from '#types/clients/store/AddressClient';
|
|
102
|
-
import { CartGetOrCreateResponse,
|
|
102
|
+
import { CartGetOrCreateResponse, CartAddItemsRequest, CartAddItemsResponse, CartRemoveItemsRequest, CartRemoveItemsResponse, CartUpdateItemsRequest, CartUpdateItemsResponse } from '#types/clients/store/CartClient';
|
|
103
103
|
import { CategoryListRequest, CategoryListResponse as CategoryListResponse$1, CategorySingleRequest, CategorySingleResponse as CategorySingleResponse$1, NavigationMenuRequest, NavigationMenuResponse } from '#types/clients/store/CategoryClient';
|
|
104
104
|
import { ContactFormSubmitRequest, ContactFormSubmitResponse, CMSPageResolveResponse, MediaEntityResolveRequest, MediaEntityResolveResponse, LandingPageResolveRequest, LandingPageResolveResponse } from '#types/clients/store/ContentClient';
|
|
105
105
|
import { ContextGetResponse, ContextUpdateRequest, ContextUpdateResponse } from '#types/clients/store/ContextClient';
|
|
@@ -3373,6 +3373,7 @@ type ProductReview = ProductReview$1 & {
|
|
|
3373
3373
|
externalUser?: string;
|
|
3374
3374
|
externalEmail?: string;
|
|
3375
3375
|
product?: Product;
|
|
3376
|
+
customerId?: string;
|
|
3376
3377
|
customer?: Customer;
|
|
3377
3378
|
salesChannel?: SalesChannel;
|
|
3378
3379
|
language?: Language;
|
|
@@ -7234,7 +7235,7 @@ declare class CartClient extends Client {
|
|
|
7234
7235
|
/**
|
|
7235
7236
|
* @throws {ShopwareError | import('ofetch').FetchError} if the request failed
|
|
7236
7237
|
*/
|
|
7237
|
-
deleteCart(): Promise<
|
|
7238
|
+
deleteCart(): Promise<void>;
|
|
7238
7239
|
/**
|
|
7239
7240
|
* @throws {ShopwareError | import('ofetch').FetchError} if the request failed
|
|
7240
7241
|
*/
|
package/dist/index.d.mts
CHANGED
|
@@ -99,7 +99,7 @@ import { UserListResponse, UserCreateRequest, UserCreateResponse, UserListSearch
|
|
|
99
99
|
import { WebhookListResponse, WebhookCreateRequest, WebhookCreateResponse, WebhookListSearchRequest, WebhookListSearchResponse, WebhookSingleResponse, WebhookUpdateRequest, WebhookUpdateResponse, WebhookAggregationRequest, WebhookAggregationResponse, EventLogListResponse, EventLogCreateRequest, EventLogCreateResponse, EventLogListSearchRequest, EventLogListSearchResponse, EventLogSingleResponse, EventLogUpdateRequest, EventLogUpdateResponse, EventLogAggregationRequest, EventLogAggregationResponse } from '#types/clients/admin/WebhookClient';
|
|
100
100
|
import { AccountNewsletterRecipientListRequest, AccountNewsletterRecipientListResponse, AccountUpdateRequest, AccountUpdateResponse, AccountEmailChangeRequest, AccountEmailChangeResponse, AccountLanguageChangeRequest, AccountLanguageChangeResponse, AccountPasswordChangeRequest, AccountPasswordChangeResponse, AccountPaymentMethodChangeResponse, AccountRecoveryExpiryCheckRequest, AccountRecoveryExpiryCheckResponse, AccountGetRequest, AccountGetResponse, AccountPasswordRecoveryRequest, AccountPasswordRecoveryResponse, AccountPasswordRecoveryMailRequest, AccountPasswordRecoveryMailResponse, CustomerRegistrationConfirmRequest, CustomerRegisterRequest, CustomerRegisterResponse, CustomerRegisterGroupConfigResponse } from '#types/clients/store/AccountClient';
|
|
101
101
|
import { AddressCreateRequest as AddressCreateRequest$2, AddressCreateResponse as AddressCreateResponse$2, AddressUpdateRequest as AddressUpdateRequest$2, AddressUpdateResponse as AddressUpdateResponse$2, AddressListRequest, AddressListResponse as AddressListResponse$2 } from '#types/clients/store/AddressClient';
|
|
102
|
-
import { CartGetOrCreateResponse,
|
|
102
|
+
import { CartGetOrCreateResponse, CartAddItemsRequest, CartAddItemsResponse, CartRemoveItemsRequest, CartRemoveItemsResponse, CartUpdateItemsRequest, CartUpdateItemsResponse } from '#types/clients/store/CartClient';
|
|
103
103
|
import { CategoryListRequest, CategoryListResponse as CategoryListResponse$1, CategorySingleRequest, CategorySingleResponse as CategorySingleResponse$1, NavigationMenuRequest, NavigationMenuResponse } from '#types/clients/store/CategoryClient';
|
|
104
104
|
import { ContactFormSubmitRequest, ContactFormSubmitResponse, CMSPageResolveResponse, MediaEntityResolveRequest, MediaEntityResolveResponse, LandingPageResolveRequest, LandingPageResolveResponse } from '#types/clients/store/ContentClient';
|
|
105
105
|
import { ContextGetResponse, ContextUpdateRequest, ContextUpdateResponse } from '#types/clients/store/ContextClient';
|
|
@@ -3373,6 +3373,7 @@ type ProductReview = ProductReview$1 & {
|
|
|
3373
3373
|
externalUser?: string;
|
|
3374
3374
|
externalEmail?: string;
|
|
3375
3375
|
product?: Product;
|
|
3376
|
+
customerId?: string;
|
|
3376
3377
|
customer?: Customer;
|
|
3377
3378
|
salesChannel?: SalesChannel;
|
|
3378
3379
|
language?: Language;
|
|
@@ -7234,7 +7235,7 @@ declare class CartClient extends Client {
|
|
|
7234
7235
|
/**
|
|
7235
7236
|
* @throws {ShopwareError | import('ofetch').FetchError} if the request failed
|
|
7236
7237
|
*/
|
|
7237
|
-
deleteCart(): Promise<
|
|
7238
|
+
deleteCart(): Promise<void>;
|
|
7238
7239
|
/**
|
|
7239
7240
|
* @throws {ShopwareError | import('ofetch').FetchError} if the request failed
|
|
7240
7241
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -99,7 +99,7 @@ import { UserListResponse, UserCreateRequest, UserCreateResponse, UserListSearch
|
|
|
99
99
|
import { WebhookListResponse, WebhookCreateRequest, WebhookCreateResponse, WebhookListSearchRequest, WebhookListSearchResponse, WebhookSingleResponse, WebhookUpdateRequest, WebhookUpdateResponse, WebhookAggregationRequest, WebhookAggregationResponse, EventLogListResponse, EventLogCreateRequest, EventLogCreateResponse, EventLogListSearchRequest, EventLogListSearchResponse, EventLogSingleResponse, EventLogUpdateRequest, EventLogUpdateResponse, EventLogAggregationRequest, EventLogAggregationResponse } from '#types/clients/admin/WebhookClient';
|
|
100
100
|
import { AccountNewsletterRecipientListRequest, AccountNewsletterRecipientListResponse, AccountUpdateRequest, AccountUpdateResponse, AccountEmailChangeRequest, AccountEmailChangeResponse, AccountLanguageChangeRequest, AccountLanguageChangeResponse, AccountPasswordChangeRequest, AccountPasswordChangeResponse, AccountPaymentMethodChangeResponse, AccountRecoveryExpiryCheckRequest, AccountRecoveryExpiryCheckResponse, AccountGetRequest, AccountGetResponse, AccountPasswordRecoveryRequest, AccountPasswordRecoveryResponse, AccountPasswordRecoveryMailRequest, AccountPasswordRecoveryMailResponse, CustomerRegistrationConfirmRequest, CustomerRegisterRequest, CustomerRegisterResponse, CustomerRegisterGroupConfigResponse } from '#types/clients/store/AccountClient';
|
|
101
101
|
import { AddressCreateRequest as AddressCreateRequest$2, AddressCreateResponse as AddressCreateResponse$2, AddressUpdateRequest as AddressUpdateRequest$2, AddressUpdateResponse as AddressUpdateResponse$2, AddressListRequest, AddressListResponse as AddressListResponse$2 } from '#types/clients/store/AddressClient';
|
|
102
|
-
import { CartGetOrCreateResponse,
|
|
102
|
+
import { CartGetOrCreateResponse, CartAddItemsRequest, CartAddItemsResponse, CartRemoveItemsRequest, CartRemoveItemsResponse, CartUpdateItemsRequest, CartUpdateItemsResponse } from '#types/clients/store/CartClient';
|
|
103
103
|
import { CategoryListRequest, CategoryListResponse as CategoryListResponse$1, CategorySingleRequest, CategorySingleResponse as CategorySingleResponse$1, NavigationMenuRequest, NavigationMenuResponse } from '#types/clients/store/CategoryClient';
|
|
104
104
|
import { ContactFormSubmitRequest, ContactFormSubmitResponse, CMSPageResolveResponse, MediaEntityResolveRequest, MediaEntityResolveResponse, LandingPageResolveRequest, LandingPageResolveResponse } from '#types/clients/store/ContentClient';
|
|
105
105
|
import { ContextGetResponse, ContextUpdateRequest, ContextUpdateResponse } from '#types/clients/store/ContextClient';
|
|
@@ -3373,6 +3373,7 @@ type ProductReview = ProductReview$1 & {
|
|
|
3373
3373
|
externalUser?: string;
|
|
3374
3374
|
externalEmail?: string;
|
|
3375
3375
|
product?: Product;
|
|
3376
|
+
customerId?: string;
|
|
3376
3377
|
customer?: Customer;
|
|
3377
3378
|
salesChannel?: SalesChannel;
|
|
3378
3379
|
language?: Language;
|
|
@@ -7234,7 +7235,7 @@ declare class CartClient extends Client {
|
|
|
7234
7235
|
/**
|
|
7235
7236
|
* @throws {ShopwareError | import('ofetch').FetchError} if the request failed
|
|
7236
7237
|
*/
|
|
7237
|
-
deleteCart(): Promise<
|
|
7238
|
+
deleteCart(): Promise<void>;
|
|
7238
7239
|
/**
|
|
7239
7240
|
* @throws {ShopwareError | import('ofetch').FetchError} if the request failed
|
|
7240
7241
|
*/
|
package/dist/index.mjs
CHANGED
|
@@ -12864,7 +12864,7 @@ class AccountClient extends Client {
|
|
|
12864
12864
|
* @throws {ShopwareError | import('ofetch').FetchError} if the request failed
|
|
12865
12865
|
*/
|
|
12866
12866
|
async getCustomer(request = {}) {
|
|
12867
|
-
const response = await this.
|
|
12867
|
+
const response = await this.post(
|
|
12868
12868
|
`/account/customer`,
|
|
12869
12869
|
this.client.withContextToken({
|
|
12870
12870
|
body: new JsonPayload(request)
|
|
@@ -13046,8 +13046,7 @@ class CartClient extends Client {
|
|
|
13046
13046
|
"/checkout/cart",
|
|
13047
13047
|
this.client.withContextToken()
|
|
13048
13048
|
);
|
|
13049
|
-
if (response.statusCode ===
|
|
13050
|
-
return response.body.data;
|
|
13049
|
+
if (response.statusCode === 204) return;
|
|
13051
13050
|
throw new ShopwareError("Failed to delete cart", response);
|
|
13052
13051
|
}
|
|
13053
13052
|
/**
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import { CalculatedPrice } from "../price/CalculatedPrice";
|
|
2
2
|
import { CartError } from "./CartError";
|
|
3
3
|
import { CartDelivery } from "./delivery/CartDelivery";
|
|
4
|
-
import {
|
|
4
|
+
import { CartLineItem } from "#types/api/store";
|
|
5
5
|
export interface Cart {
|
|
6
6
|
name?: string;
|
|
7
7
|
token?: string;
|
|
8
8
|
price?: CalculatedPrice;
|
|
9
|
-
lineItems?: Array<
|
|
9
|
+
lineItems?: Array<CartLineItem>;
|
|
10
|
+
source?: string;
|
|
11
|
+
states?: Array<string>;
|
|
12
|
+
hash?: string;
|
|
10
13
|
errors?: Array<CartError>;
|
|
14
|
+
errorHash?: string;
|
|
15
|
+
extensions?: Record<string, any>;
|
|
11
16
|
deliveries?: Array<CartDelivery>;
|
|
12
17
|
transactions?: Array<{
|
|
13
18
|
paymentMethodId?: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { CartDeliveryDate } from "./CartDeliveryDate";
|
|
2
|
-
import {
|
|
2
|
+
import { CartLineItem } from "#types/api/store/cart/lineItem/CartLineItem";
|
|
3
3
|
import { CalculatedPrice } from "../../price/CalculatedPrice";
|
|
4
4
|
export interface CartDeliveryPosition {
|
|
5
5
|
deliveryDate?: CartDeliveryDate;
|
|
6
6
|
identifier?: string;
|
|
7
|
-
lineItem?:
|
|
7
|
+
lineItem?: CartLineItem;
|
|
8
8
|
price?: CalculatedPrice;
|
|
9
9
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { CartDelivery } from "./CartDelivery";
|
|
2
|
+
export { CartDeliveryDate } from "./CartDeliveryDate";
|
|
3
|
+
export { CartDeliveryInformation } from "./CartDeliveryInformation";
|
|
4
|
+
export { CartDeliveryPosition } from "./CartDeliveryPosition";
|
|
5
|
+
export { CartDeliveryShippingLocation } from "./CartDeliveryShippingLocation";
|
|
6
|
+
export { CartDeliveryTime } from "./CartDeliveryTime";
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { Media } from "
|
|
2
|
-
import { CartDeliveryInformation } from "../
|
|
3
|
-
import {
|
|
4
|
-
import { CalculatedPrice } from "
|
|
5
|
-
import { CartPriceQuantity } from "
|
|
6
|
-
import {
|
|
7
|
-
export interface
|
|
8
|
-
|
|
1
|
+
import { Media } from "../../media/Media";
|
|
2
|
+
import { CartDeliveryInformation } from "../delivery/CartDeliveryInformation";
|
|
3
|
+
import { CartLineItemPayload } from "./CartLineItemPayload";
|
|
4
|
+
import { CalculatedPrice } from "../../price/CalculatedPrice";
|
|
5
|
+
import { CartPriceQuantity } from "../../price/cart/CartPriceQuantity";
|
|
6
|
+
import { CartLineItemType } from "./CartLineItemType";
|
|
7
|
+
export interface CartLineItem {
|
|
8
|
+
apiAlias: "cart_line_item";
|
|
9
|
+
children?: Array<CartLineItem>;
|
|
9
10
|
cover?: Media;
|
|
10
11
|
dataContextHash?: string;
|
|
11
12
|
dataTimestamp?: string;
|
|
@@ -16,7 +17,7 @@ export interface LineItem {
|
|
|
16
17
|
label?: string;
|
|
17
18
|
modified?: string;
|
|
18
19
|
modifiedByApp?: boolean;
|
|
19
|
-
payload?:
|
|
20
|
+
payload?: CartLineItemPayload;
|
|
20
21
|
price?: CalculatedPrice;
|
|
21
22
|
priceDefinition?: CartPriceQuantity;
|
|
22
23
|
quantity?: number;
|
|
@@ -29,6 +30,6 @@ export interface LineItem {
|
|
|
29
30
|
removable?: boolean;
|
|
30
31
|
stackable?: boolean;
|
|
31
32
|
states?: Array<"is-physical" | "is-download">;
|
|
32
|
-
type:
|
|
33
|
+
type: CartLineItemType;
|
|
33
34
|
uniqueIdentifier?: string;
|
|
34
35
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type CartLineItemPayload = Record<string, any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type CartLineItemType = "product" | "credit" | "custom" | "promotion" | "discount" | "container" | "quantity";
|
|
@@ -39,7 +39,7 @@ export interface Customer {
|
|
|
39
39
|
readonly reviewCount?: number;
|
|
40
40
|
customFields?: GenericRecord;
|
|
41
41
|
readonly tagIds?: Array<string>;
|
|
42
|
-
accountType?:
|
|
42
|
+
accountType?: "private" | "business";
|
|
43
43
|
createdById?: string;
|
|
44
44
|
updatedById?: string;
|
|
45
45
|
defaultPaymentMethodId: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CartLineItemPayload } from "#types/api/store/cart/lineItem/CartLineItemPayload";
|
|
2
2
|
import { CartPriceQuantity } from "../price/cart/CartPriceQuantity";
|
|
3
3
|
import { GenericRecord } from "#types/api/global/GenericRecord";
|
|
4
4
|
import { Media } from "../media/Media";
|
|
@@ -20,7 +20,7 @@ export interface OrderLineItem {
|
|
|
20
20
|
referencedId?: string;
|
|
21
21
|
quantity: number;
|
|
22
22
|
label: string;
|
|
23
|
-
payload?:
|
|
23
|
+
payload?: CartLineItemPayload;
|
|
24
24
|
good?: boolean;
|
|
25
25
|
removable?: boolean;
|
|
26
26
|
stackable?: boolean;
|
|
@@ -2,6 +2,7 @@ import { Criteria } from "#types/api/global/query/Criteria";
|
|
|
2
2
|
import { Customer } from "#types/api/store/customer/Customer";
|
|
3
3
|
import { CustomerAddress } from "#types/api/store/customer/address/CustomerAddress";
|
|
4
4
|
import { CustomerGroup } from "#types/api/store";
|
|
5
|
+
import { GenericRecord } from "#types/api/global";
|
|
5
6
|
export interface AccountEmailChangeRequest {
|
|
6
7
|
email: string;
|
|
7
8
|
emailConfirmation: string;
|
|
@@ -59,6 +60,7 @@ export interface AccountRecoveryExpiryCheckResponse {
|
|
|
59
60
|
};
|
|
60
61
|
}
|
|
61
62
|
export interface AccountUpdateRequest {
|
|
63
|
+
accountType?: "private" | "business";
|
|
62
64
|
salutationId?: string;
|
|
63
65
|
title?: string;
|
|
64
66
|
firstName: string;
|
|
@@ -67,13 +69,15 @@ export interface AccountUpdateRequest {
|
|
|
67
69
|
birthdayDay?: number;
|
|
68
70
|
birthdayMonth?: number;
|
|
69
71
|
birthdayYear?: number;
|
|
72
|
+
vatIds?: Array<string>;
|
|
73
|
+
customFields?: GenericRecord;
|
|
70
74
|
}
|
|
71
75
|
export interface AccountUpdateResponse {
|
|
72
76
|
success?: boolean;
|
|
73
77
|
}
|
|
74
78
|
export interface CustomerRegisterRequest {
|
|
75
79
|
email: string;
|
|
76
|
-
password
|
|
80
|
+
password?: string;
|
|
77
81
|
salutationId: string;
|
|
78
82
|
firstName: string;
|
|
79
83
|
lastName: string;
|
|
@@ -92,6 +96,7 @@ export interface CustomerRegisterRequest {
|
|
|
92
96
|
accountType?: "private" | "business";
|
|
93
97
|
company?: string;
|
|
94
98
|
vatIds?: Array<string>;
|
|
99
|
+
customFields?: GenericRecord;
|
|
95
100
|
}
|
|
96
101
|
export type CustomerRegisterResponse = {
|
|
97
102
|
accountType: "private" | "business";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CartLineItem } from "#types/api/store/cart/lineItem/CartLineItem";
|
|
2
2
|
import { Cart } from "#types/api/store/cart/Cart";
|
|
3
3
|
export interface CartAddItemsRequest {
|
|
4
|
-
items?: Array<
|
|
4
|
+
items?: Array<CartLineItem>;
|
|
5
5
|
}
|
|
6
6
|
export type CartAddItemsResponse = Cart;
|
|
7
7
|
export interface CartRemoveItemsRequest {
|
|
@@ -9,10 +9,7 @@ export interface CartRemoveItemsRequest {
|
|
|
9
9
|
}
|
|
10
10
|
export type CartRemoveItemsResponse = Cart;
|
|
11
11
|
export interface CartUpdateItemsRequest {
|
|
12
|
-
items?: Array<
|
|
12
|
+
items?: Array<CartLineItem>;
|
|
13
13
|
}
|
|
14
14
|
export type CartUpdateItemsResponse = Cart;
|
|
15
|
-
export interface CartDeleteResponse {
|
|
16
|
-
success?: boolean;
|
|
17
|
-
}
|
|
18
15
|
export type CartGetOrCreateResponse = Cart;
|
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
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
|
+
import { EntitySearchResult } from "#types/api/store";
|
|
4
5
|
export interface OrderPaymentInitiateRequest {
|
|
5
6
|
orderId: string;
|
|
6
7
|
finishUrl?: string;
|
|
7
8
|
errorUrl?: string;
|
|
9
|
+
paymentDetails?: Record<string, any>;
|
|
8
10
|
}
|
|
9
11
|
export interface OrderPaymentInitiateResponse {
|
|
10
|
-
redirectUrl: string;
|
|
12
|
+
redirectUrl: string | null;
|
|
11
13
|
}
|
|
12
14
|
export interface OrderCancelRequest {
|
|
13
15
|
orderId: string;
|
|
14
16
|
}
|
|
15
17
|
export type OrderCancelResponse = StateMachineState;
|
|
16
18
|
export type OrderDownloadFileResponse = Blob;
|
|
17
|
-
export interface OrderFromCartRequest {
|
|
19
|
+
export interface OrderFromCartRequest extends Criteria {
|
|
18
20
|
customerComment?: string;
|
|
19
21
|
affiliateCode?: string;
|
|
20
22
|
campaignCode?: string;
|
|
@@ -24,7 +26,9 @@ export type OrderListRequest = Criteria & {
|
|
|
24
26
|
checkPromotion?: boolean;
|
|
25
27
|
};
|
|
26
28
|
export interface OrderListResponse {
|
|
27
|
-
orders:
|
|
29
|
+
orders: EntitySearchResult & {
|
|
30
|
+
elements?: Array<Order>;
|
|
31
|
+
};
|
|
28
32
|
paymentChangeable: Record<string, boolean>;
|
|
29
33
|
}
|
|
30
34
|
export interface OrderUpdatePaymentMethodRequest {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devite/shopware-client",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.6",
|
|
4
4
|
"description": "Third party API client for Shopware 6.",
|
|
5
5
|
"repository": "devite-io/shopware-client",
|
|
6
6
|
"license": "MIT",
|
|
@@ -41,12 +41,12 @@
|
|
|
41
41
|
"dist"
|
|
42
42
|
],
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@types/node": "^22.
|
|
44
|
+
"@types/node": "^22.15.12",
|
|
45
45
|
"changelogen": "^0.5.7",
|
|
46
|
-
"eslint": "^9.
|
|
46
|
+
"eslint": "^9.26.0",
|
|
47
47
|
"prettier": "^3.5.3",
|
|
48
48
|
"typescript": "^5.8.3",
|
|
49
|
-
"typescript-eslint": "^8.
|
|
49
|
+
"typescript-eslint": "^8.32.0",
|
|
50
50
|
"unbuild": "^3.5.0",
|
|
51
51
|
"vitest": "^2.1.9"
|
|
52
52
|
},
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { GenericRecord } from "#types/api/global/GenericRecord";
|
|
2
|
-
export interface LineItemPayload {
|
|
3
|
-
categoryIds: Array<string>;
|
|
4
|
-
readonly createdAt?: string;
|
|
5
|
-
readonly updatedAt?: string;
|
|
6
|
-
customFields?: GenericRecord;
|
|
7
|
-
features?: Array<string>;
|
|
8
|
-
isCloseout?: boolean;
|
|
9
|
-
isNew?: boolean;
|
|
10
|
-
manufacturerId?: string;
|
|
11
|
-
markAsTopseller?: boolean;
|
|
12
|
-
optionIds?: Array<string>;
|
|
13
|
-
options?: Array<{
|
|
14
|
-
group: string;
|
|
15
|
-
name: string;
|
|
16
|
-
}>;
|
|
17
|
-
parentId?: string;
|
|
18
|
-
productNumber?: string;
|
|
19
|
-
propertyIds?: Array<string>;
|
|
20
|
-
releaseDate?: string;
|
|
21
|
-
stock?: number;
|
|
22
|
-
streamIds?: Array<string>;
|
|
23
|
-
tagsIds?: Array<string>;
|
|
24
|
-
taxId: string;
|
|
25
|
-
[key: string]: any;
|
|
26
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type LineItemType = "product" | "credit" | "custom" | "promotion" | "discount" | "container" | "quantity";
|