|
|
@@ -155,6 +155,8 @@ export type AlreadyRefundedError = ErrorResult & {
|
|
|
refundId: Scalars['ID'];
|
|
|
};
|
|
|
|
|
|
+export type ApplyCouponCodeResult = Order | CouponCodeExpiredError | CouponCodeInvalidError | CouponCodeLimitError;
|
|
|
+
|
|
|
export type Asset = Node & {
|
|
|
__typename?: 'Asset';
|
|
|
tags: Array<Tag>;
|
|
|
@@ -1461,7 +1463,10 @@ export enum ErrorCode {
|
|
|
INSUFFICIENT_STOCK_ERROR = 'INSUFFICIENT_STOCK_ERROR',
|
|
|
COUPON_CODE_INVALID_ERROR = 'COUPON_CODE_INVALID_ERROR',
|
|
|
COUPON_CODE_EXPIRED_ERROR = 'COUPON_CODE_EXPIRED_ERROR',
|
|
|
- COUPON_CODE_LIMIT_ERROR = 'COUPON_CODE_LIMIT_ERROR'
|
|
|
+ COUPON_CODE_LIMIT_ERROR = 'COUPON_CODE_LIMIT_ERROR',
|
|
|
+ ORDER_MODIFICATION_ERROR = 'ORDER_MODIFICATION_ERROR',
|
|
|
+ INELIGIBLE_SHIPPING_METHOD_ERROR = 'INELIGIBLE_SHIPPING_METHOD_ERROR',
|
|
|
+ NO_ACTIVE_ORDER_ERROR = 'NO_ACTIVE_ORDER_ERROR'
|
|
|
}
|
|
|
|
|
|
export type ErrorResult = {
|
|
|
@@ -1757,6 +1762,13 @@ export type ImportInfo = {
|
|
|
imported: Scalars['Int'];
|
|
|
};
|
|
|
|
|
|
+/** Returned when attempting to set a ShippingMethod for which the Order is not eligible */
|
|
|
+export type IneligibleShippingMethodError = ErrorResult & {
|
|
|
+ __typename?: 'IneligibleShippingMethodError';
|
|
|
+ errorCode: ErrorCode;
|
|
|
+ message: Scalars['String'];
|
|
|
+};
|
|
|
+
|
|
|
/** Returned when attempting to add more items to the Order than are available */
|
|
|
export type InsufficientStockError = ErrorResult & {
|
|
|
__typename?: 'InsufficientStockError';
|
|
|
@@ -2464,6 +2476,27 @@ export type Mutation = {
|
|
|
* Payment.
|
|
|
*/
|
|
|
addManualPaymentToOrder: AddManualPaymentToOrderResult;
|
|
|
+ /** Creates a draft Order */
|
|
|
+ createDraftOrder: Order;
|
|
|
+ /** Adds an item to the draft Order. If custom fields are defined on the OrderLine entity, a third argument 'customFields' will be available. */
|
|
|
+ addItemToDraftOrder: UpdateOrderItemsResult;
|
|
|
+ /** Adjusts a draft OrderLine. If custom fields are defined on the OrderLine entity, a third argument 'customFields' of type `OrderLineCustomFieldsInput` will be available. */
|
|
|
+ adjustDraftOrderLine: UpdateOrderItemsResult;
|
|
|
+ /** Remove an OrderLine from the draft Order */
|
|
|
+ removeDraftOrderLine: RemoveOrderItemsResult;
|
|
|
+ setCustomerForDraftOrder: SetCustomerForDraftOrderResult;
|
|
|
+ /** Sets the shipping address for a draft Order */
|
|
|
+ setDraftOrderShippingAddress: Order;
|
|
|
+ /** Sets the billing address for a draft Order */
|
|
|
+ setDraftOrderBillingAddress: Order;
|
|
|
+ /** Allows any custom fields to be set for the active order */
|
|
|
+ setDraftOrderCustomFields: Order;
|
|
|
+ /** Applies the given coupon code to the draft Order */
|
|
|
+ applyCouponCodeToDraftOrder: ApplyCouponCodeResult;
|
|
|
+ /** Removes the given coupon code from the draft Order */
|
|
|
+ removeCouponCodeFromDraftOrder?: Maybe<Order>;
|
|
|
+ /** Sets the shipping method by id, which can be obtained with the `eligibleShippingMethodsForDraftOrder` query */
|
|
|
+ setDraftOrderShippingMethod: SetOrderShippingMethodResult;
|
|
|
/** Create existing PaymentMethod */
|
|
|
createPaymentMethod: PaymentMethod;
|
|
|
/** Update an existing PaymentMethod */
|
|
|
@@ -2917,6 +2950,69 @@ export type MutationAddManualPaymentToOrderArgs = {
|
|
|
};
|
|
|
|
|
|
|
|
|
+export type MutationAddItemToDraftOrderArgs = {
|
|
|
+ orderId: Scalars['ID'];
|
|
|
+ productVariantId: Scalars['ID'];
|
|
|
+ quantity: Scalars['Int'];
|
|
|
+};
|
|
|
+
|
|
|
+
|
|
|
+export type MutationAdjustDraftOrderLineArgs = {
|
|
|
+ orderId: Scalars['ID'];
|
|
|
+ orderLineId: Scalars['ID'];
|
|
|
+ quantity: Scalars['Int'];
|
|
|
+};
|
|
|
+
|
|
|
+
|
|
|
+export type MutationRemoveDraftOrderLineArgs = {
|
|
|
+ orderId: Scalars['ID'];
|
|
|
+ orderLineId: Scalars['ID'];
|
|
|
+};
|
|
|
+
|
|
|
+
|
|
|
+export type MutationSetCustomerForDraftOrderArgs = {
|
|
|
+ orderId: Scalars['ID'];
|
|
|
+ customerId?: Maybe<Scalars['ID']>;
|
|
|
+ input?: Maybe<CreateCustomerInput>;
|
|
|
+};
|
|
|
+
|
|
|
+
|
|
|
+export type MutationSetDraftOrderShippingAddressArgs = {
|
|
|
+ orderId: Scalars['ID'];
|
|
|
+ input: CreateAddressInput;
|
|
|
+};
|
|
|
+
|
|
|
+
|
|
|
+export type MutationSetDraftOrderBillingAddressArgs = {
|
|
|
+ orderId: Scalars['ID'];
|
|
|
+ input: CreateAddressInput;
|
|
|
+};
|
|
|
+
|
|
|
+
|
|
|
+export type MutationSetDraftOrderCustomFieldsArgs = {
|
|
|
+ orderId: Scalars['ID'];
|
|
|
+ input: UpdateOrderInput;
|
|
|
+};
|
|
|
+
|
|
|
+
|
|
|
+export type MutationApplyCouponCodeToDraftOrderArgs = {
|
|
|
+ orderId: Scalars['ID'];
|
|
|
+ couponCode: Scalars['String'];
|
|
|
+};
|
|
|
+
|
|
|
+
|
|
|
+export type MutationRemoveCouponCodeFromDraftOrderArgs = {
|
|
|
+ orderId: Scalars['ID'];
|
|
|
+ couponCode: Scalars['String'];
|
|
|
+};
|
|
|
+
|
|
|
+
|
|
|
+export type MutationSetDraftOrderShippingMethodArgs = {
|
|
|
+ orderId: Scalars['ID'];
|
|
|
+ shippingMethodId: Scalars['ID'];
|
|
|
+};
|
|
|
+
|
|
|
+
|
|
|
export type MutationCreatePaymentMethodArgs = {
|
|
|
input: CreatePaymentMethodInput;
|
|
|
};
|
|
|
@@ -3182,6 +3278,16 @@ export type NegativeQuantityError = ErrorResult & {
|
|
|
message: Scalars['String'];
|
|
|
};
|
|
|
|
|
|
+/**
|
|
|
+ * Returned when invoking a mutation which depends on there being an active Order on the
|
|
|
+ * current session.
|
|
|
+ */
|
|
|
+export type NoActiveOrderError = ErrorResult & {
|
|
|
+ __typename?: 'NoActiveOrderError';
|
|
|
+ errorCode: ErrorCode;
|
|
|
+ message: Scalars['String'];
|
|
|
+};
|
|
|
+
|
|
|
/** Returned when a call to modifyOrder fails to specify any changes */
|
|
|
export type NoChangesSpecifiedError = ErrorResult & {
|
|
|
__typename?: 'NoChangesSpecifiedError';
|
|
|
@@ -3464,6 +3570,13 @@ export type OrderModification = Node & {
|
|
|
isSettled: Scalars['Boolean'];
|
|
|
};
|
|
|
|
|
|
+/** Returned when attempting to modify the contents of an Order that is not in the `AddingItems` state. */
|
|
|
+export type OrderModificationError = ErrorResult & {
|
|
|
+ __typename?: 'OrderModificationError';
|
|
|
+ errorCode: ErrorCode;
|
|
|
+ message: Scalars['String'];
|
|
|
+};
|
|
|
+
|
|
|
/** Returned when attempting to modify the contents of an Order that is not in the `Modifying` state. */
|
|
|
export type OrderModificationStateError = ErrorResult & {
|
|
|
__typename?: 'OrderModificationStateError';
|
|
|
@@ -4217,6 +4330,8 @@ export type Query = {
|
|
|
jobBufferSize: Array<JobBufferSize>;
|
|
|
order?: Maybe<Order>;
|
|
|
orders: OrderList;
|
|
|
+ /** Returns a list of eligible shipping methods for the draft Order */
|
|
|
+ eligibleShippingMethodsForDraftOrder: Array<ShippingMethodQuote>;
|
|
|
paymentMethods: PaymentMethodList;
|
|
|
paymentMethod?: Maybe<PaymentMethod>;
|
|
|
paymentMethodEligibilityCheckers: Array<ConfigurableOperationDefinition>;
|
|
|
@@ -4369,6 +4484,11 @@ export type QueryOrdersArgs = {
|
|
|
};
|
|
|
|
|
|
|
|
|
+export type QueryEligibleShippingMethodsForDraftOrderArgs = {
|
|
|
+ orderId: Scalars['ID'];
|
|
|
+};
|
|
|
+
|
|
|
+
|
|
|
export type QueryPaymentMethodsArgs = {
|
|
|
options?: Maybe<PaymentMethodListOptions>;
|
|
|
};
|
|
|
@@ -4582,6 +4702,8 @@ export type RemoveFacetsFromChannelInput = {
|
|
|
|
|
|
export type RemoveOptionGroupFromProductResult = Product | ProductOptionInUseError;
|
|
|
|
|
|
+export type RemoveOrderItemsResult = Order | OrderModificationError;
|
|
|
+
|
|
|
export type RemoveProductVariantsFromChannelInput = {
|
|
|
productVariantIds: Array<Scalars['ID']>;
|
|
|
channelId: Scalars['ID'];
|
|
|
@@ -4739,6 +4861,10 @@ export type ServerConfig = {
|
|
|
customFieldConfig: CustomFields;
|
|
|
};
|
|
|
|
|
|
+export type SetCustomerForDraftOrderResult = Order | EmailAddressConflictError;
|
|
|
+
|
|
|
+export type SetOrderShippingMethodResult = Order | OrderModificationError | IneligibleShippingMethodError | NoActiveOrderError;
|
|
|
+
|
|
|
/** Returned if the Payment settlement fails */
|
|
|
export type SettlePaymentError = ErrorResult & {
|
|
|
__typename?: 'SettlePaymentError';
|
|
|
@@ -5277,6 +5403,8 @@ export type UpdateOrderInput = {
|
|
|
customFields?: Maybe<Scalars['JSON']>;
|
|
|
};
|
|
|
|
|
|
+export type UpdateOrderItemsResult = Order | OrderModificationError | OrderLimitError | NegativeQuantityError | InsufficientStockError;
|
|
|
+
|
|
|
export type UpdateOrderNoteInput = {
|
|
|
noteId: Scalars['ID'];
|
|
|
note?: Maybe<Scalars['String']>;
|