|
|
@@ -15,19 +15,17 @@ export type Scalars = {
|
|
|
export class ErrorResult {
|
|
|
readonly __typename: string;
|
|
|
readonly errorCode: string;
|
|
|
- readonly message: Scalars['String'];
|
|
|
+message: Scalars['String'];
|
|
|
}
|
|
|
|
|
|
export class AlreadyRefundedError extends ErrorResult {
|
|
|
readonly __typename = 'AlreadyRefundedError';
|
|
|
readonly errorCode = 'ALREADY_REFUNDED_ERROR' as any;
|
|
|
readonly message = 'ALREADY_REFUNDED_ERROR';
|
|
|
- readonly refundId: Scalars['ID'];
|
|
|
constructor(
|
|
|
- input: { refundId: Scalars['ID'] }
|
|
|
+ public refundId: Scalars['ID'],
|
|
|
) {
|
|
|
super();
|
|
|
- this.refundId = input.refundId
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -35,12 +33,21 @@ export class CancelActiveOrderError extends ErrorResult {
|
|
|
readonly __typename = 'CancelActiveOrderError';
|
|
|
readonly errorCode = 'CANCEL_ACTIVE_ORDER_ERROR' as any;
|
|
|
readonly message = 'CANCEL_ACTIVE_ORDER_ERROR';
|
|
|
- readonly orderState: Scalars['String'];
|
|
|
constructor(
|
|
|
- input: { orderState: Scalars['String'] }
|
|
|
+ public orderState: Scalars['String'],
|
|
|
+ ) {
|
|
|
+ super();
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+export class CancelPaymentError extends ErrorResult {
|
|
|
+ readonly __typename = 'CancelPaymentError';
|
|
|
+ readonly errorCode = 'CANCEL_PAYMENT_ERROR' as any;
|
|
|
+ readonly message = 'CANCEL_PAYMENT_ERROR';
|
|
|
+ constructor(
|
|
|
+ public paymentErrorMessage: Scalars['String'],
|
|
|
) {
|
|
|
super();
|
|
|
- this.orderState = input.orderState
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -48,14 +55,11 @@ export class ChannelDefaultLanguageError extends ErrorResult {
|
|
|
readonly __typename = 'ChannelDefaultLanguageError';
|
|
|
readonly errorCode = 'CHANNEL_DEFAULT_LANGUAGE_ERROR' as any;
|
|
|
readonly message = 'CHANNEL_DEFAULT_LANGUAGE_ERROR';
|
|
|
- readonly channelCode: Scalars['String'];
|
|
|
- readonly language: Scalars['String'];
|
|
|
constructor(
|
|
|
- input: { channelCode: Scalars['String'], language: Scalars['String'] }
|
|
|
+ public language: Scalars['String'],
|
|
|
+ public channelCode: Scalars['String'],
|
|
|
) {
|
|
|
super();
|
|
|
- this.channelCode = input.channelCode
|
|
|
- this.language = input.language
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -63,12 +67,10 @@ export class CouponCodeExpiredError extends ErrorResult {
|
|
|
readonly __typename = 'CouponCodeExpiredError';
|
|
|
readonly errorCode = 'COUPON_CODE_EXPIRED_ERROR' as any;
|
|
|
readonly message = 'COUPON_CODE_EXPIRED_ERROR';
|
|
|
- readonly couponCode: Scalars['String'];
|
|
|
constructor(
|
|
|
- input: { couponCode: Scalars['String'] }
|
|
|
+ public couponCode: Scalars['String'],
|
|
|
) {
|
|
|
super();
|
|
|
- this.couponCode = input.couponCode
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -76,12 +78,10 @@ export class CouponCodeInvalidError extends ErrorResult {
|
|
|
readonly __typename = 'CouponCodeInvalidError';
|
|
|
readonly errorCode = 'COUPON_CODE_INVALID_ERROR' as any;
|
|
|
readonly message = 'COUPON_CODE_INVALID_ERROR';
|
|
|
- readonly couponCode: Scalars['String'];
|
|
|
constructor(
|
|
|
- input: { couponCode: Scalars['String'] }
|
|
|
+ public couponCode: Scalars['String'],
|
|
|
) {
|
|
|
super();
|
|
|
- this.couponCode = input.couponCode
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -89,14 +89,11 @@ export class CouponCodeLimitError extends ErrorResult {
|
|
|
readonly __typename = 'CouponCodeLimitError';
|
|
|
readonly errorCode = 'COUPON_CODE_LIMIT_ERROR' as any;
|
|
|
readonly message = 'COUPON_CODE_LIMIT_ERROR';
|
|
|
- readonly couponCode: Scalars['String'];
|
|
|
- readonly limit: Scalars['Int'];
|
|
|
constructor(
|
|
|
- input: { couponCode: Scalars['String'], limit: Scalars['Int'] }
|
|
|
+ public couponCode: Scalars['String'],
|
|
|
+ public limit: Scalars['Int'],
|
|
|
) {
|
|
|
super();
|
|
|
- this.couponCode = input.couponCode
|
|
|
- this.limit = input.limit
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -104,12 +101,10 @@ export class CreateFulfillmentError extends ErrorResult {
|
|
|
readonly __typename = 'CreateFulfillmentError';
|
|
|
readonly errorCode = 'CREATE_FULFILLMENT_ERROR' as any;
|
|
|
readonly message = 'CREATE_FULFILLMENT_ERROR';
|
|
|
- readonly fulfillmentHandlerError: Scalars['String'];
|
|
|
constructor(
|
|
|
- input: { fulfillmentHandlerError: Scalars['String'] }
|
|
|
+ public fulfillmentHandlerError: Scalars['String'],
|
|
|
) {
|
|
|
super();
|
|
|
- this.fulfillmentHandlerError = input.fulfillmentHandlerError
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -118,7 +113,6 @@ export class EmailAddressConflictError extends ErrorResult {
|
|
|
readonly errorCode = 'EMAIL_ADDRESS_CONFLICT_ERROR' as any;
|
|
|
readonly message = 'EMAIL_ADDRESS_CONFLICT_ERROR';
|
|
|
constructor(
|
|
|
-
|
|
|
) {
|
|
|
super();
|
|
|
}
|
|
|
@@ -129,7 +123,6 @@ export class EmptyOrderLineSelectionError extends ErrorResult {
|
|
|
readonly errorCode = 'EMPTY_ORDER_LINE_SELECTION_ERROR' as any;
|
|
|
readonly message = 'EMPTY_ORDER_LINE_SELECTION_ERROR';
|
|
|
constructor(
|
|
|
-
|
|
|
) {
|
|
|
super();
|
|
|
}
|
|
|
@@ -139,16 +132,12 @@ export class FulfillmentStateTransitionError extends ErrorResult {
|
|
|
readonly __typename = 'FulfillmentStateTransitionError';
|
|
|
readonly errorCode = 'FULFILLMENT_STATE_TRANSITION_ERROR' as any;
|
|
|
readonly message = 'FULFILLMENT_STATE_TRANSITION_ERROR';
|
|
|
- readonly fromState: Scalars['String'];
|
|
|
- readonly toState: Scalars['String'];
|
|
|
- readonly transitionError: Scalars['String'];
|
|
|
constructor(
|
|
|
- input: { fromState: Scalars['String'], toState: Scalars['String'], transitionError: Scalars['String'] }
|
|
|
+ public transitionError: Scalars['String'],
|
|
|
+ public fromState: Scalars['String'],
|
|
|
+ public toState: Scalars['String'],
|
|
|
) {
|
|
|
super();
|
|
|
- this.fromState = input.fromState
|
|
|
- this.toState = input.toState
|
|
|
- this.transitionError = input.transitionError
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -156,14 +145,11 @@ export class InsufficientStockError extends ErrorResult {
|
|
|
readonly __typename = 'InsufficientStockError';
|
|
|
readonly errorCode = 'INSUFFICIENT_STOCK_ERROR' as any;
|
|
|
readonly message = 'INSUFFICIENT_STOCK_ERROR';
|
|
|
- readonly order: any;
|
|
|
- readonly quantityAvailable: Scalars['Int'];
|
|
|
constructor(
|
|
|
- input: { order: any, quantityAvailable: Scalars['Int'] }
|
|
|
+ public quantityAvailable: Scalars['Int'],
|
|
|
+ public order: any,
|
|
|
) {
|
|
|
super();
|
|
|
- this.order = input.order
|
|
|
- this.quantityAvailable = input.quantityAvailable
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -171,16 +157,12 @@ export class InsufficientStockOnHandError extends ErrorResult {
|
|
|
readonly __typename = 'InsufficientStockOnHandError';
|
|
|
readonly errorCode = 'INSUFFICIENT_STOCK_ON_HAND_ERROR' as any;
|
|
|
readonly message = 'INSUFFICIENT_STOCK_ON_HAND_ERROR';
|
|
|
- readonly productVariantId: Scalars['ID'];
|
|
|
- readonly productVariantName: Scalars['String'];
|
|
|
- readonly stockOnHand: Scalars['Int'];
|
|
|
constructor(
|
|
|
- input: { productVariantId: Scalars['ID'], productVariantName: Scalars['String'], stockOnHand: Scalars['Int'] }
|
|
|
+ public productVariantId: Scalars['ID'],
|
|
|
+ public productVariantName: Scalars['String'],
|
|
|
+ public stockOnHand: Scalars['Int'],
|
|
|
) {
|
|
|
super();
|
|
|
- this.productVariantId = input.productVariantId
|
|
|
- this.productVariantName = input.productVariantName
|
|
|
- this.stockOnHand = input.stockOnHand
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -188,12 +170,10 @@ export class InvalidCredentialsError extends ErrorResult {
|
|
|
readonly __typename = 'InvalidCredentialsError';
|
|
|
readonly errorCode = 'INVALID_CREDENTIALS_ERROR' as any;
|
|
|
readonly message = 'INVALID_CREDENTIALS_ERROR';
|
|
|
- readonly authenticationError: Scalars['String'];
|
|
|
constructor(
|
|
|
- input: { authenticationError: Scalars['String'] }
|
|
|
+ public authenticationError: Scalars['String'],
|
|
|
) {
|
|
|
super();
|
|
|
- this.authenticationError = input.authenticationError
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -202,7 +182,6 @@ export class InvalidFulfillmentHandlerError extends ErrorResult {
|
|
|
readonly errorCode = 'INVALID_FULFILLMENT_HANDLER_ERROR' as any;
|
|
|
readonly message = 'INVALID_FULFILLMENT_HANDLER_ERROR';
|
|
|
constructor(
|
|
|
-
|
|
|
) {
|
|
|
super();
|
|
|
}
|
|
|
@@ -213,7 +192,6 @@ export class ItemsAlreadyFulfilledError extends ErrorResult {
|
|
|
readonly errorCode = 'ITEMS_ALREADY_FULFILLED_ERROR' as any;
|
|
|
readonly message = 'ITEMS_ALREADY_FULFILLED_ERROR';
|
|
|
constructor(
|
|
|
-
|
|
|
) {
|
|
|
super();
|
|
|
}
|
|
|
@@ -223,12 +201,10 @@ export class LanguageNotAvailableError extends ErrorResult {
|
|
|
readonly __typename = 'LanguageNotAvailableError';
|
|
|
readonly errorCode = 'LANGUAGE_NOT_AVAILABLE_ERROR' as any;
|
|
|
readonly message = 'LANGUAGE_NOT_AVAILABLE_ERROR';
|
|
|
- readonly languageCode: Scalars['String'];
|
|
|
constructor(
|
|
|
- input: { languageCode: Scalars['String'] }
|
|
|
+ public languageCode: Scalars['String'],
|
|
|
) {
|
|
|
super();
|
|
|
- this.languageCode = input.languageCode
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -237,7 +213,6 @@ export class ManualPaymentStateError extends ErrorResult {
|
|
|
readonly errorCode = 'MANUAL_PAYMENT_STATE_ERROR' as any;
|
|
|
readonly message = 'MANUAL_PAYMENT_STATE_ERROR';
|
|
|
constructor(
|
|
|
-
|
|
|
) {
|
|
|
super();
|
|
|
}
|
|
|
@@ -247,14 +222,11 @@ export class MimeTypeError extends ErrorResult {
|
|
|
readonly __typename = 'MimeTypeError';
|
|
|
readonly errorCode = 'MIME_TYPE_ERROR' as any;
|
|
|
readonly message = 'MIME_TYPE_ERROR';
|
|
|
- readonly fileName: Scalars['String'];
|
|
|
- readonly mimeType: Scalars['String'];
|
|
|
constructor(
|
|
|
- input: { fileName: Scalars['String'], mimeType: Scalars['String'] }
|
|
|
+ public fileName: Scalars['String'],
|
|
|
+ public mimeType: Scalars['String'],
|
|
|
) {
|
|
|
super();
|
|
|
- this.fileName = input.fileName
|
|
|
- this.mimeType = input.mimeType
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -263,7 +235,6 @@ export class MissingConditionsError extends ErrorResult {
|
|
|
readonly errorCode = 'MISSING_CONDITIONS_ERROR' as any;
|
|
|
readonly message = 'MISSING_CONDITIONS_ERROR';
|
|
|
constructor(
|
|
|
-
|
|
|
) {
|
|
|
super();
|
|
|
}
|
|
|
@@ -274,7 +245,6 @@ export class MultipleOrderError extends ErrorResult {
|
|
|
readonly errorCode = 'MULTIPLE_ORDER_ERROR' as any;
|
|
|
readonly message = 'MULTIPLE_ORDER_ERROR';
|
|
|
constructor(
|
|
|
-
|
|
|
) {
|
|
|
super();
|
|
|
}
|
|
|
@@ -285,7 +255,6 @@ export class NativeAuthStrategyError extends ErrorResult {
|
|
|
readonly errorCode = 'NATIVE_AUTH_STRATEGY_ERROR' as any;
|
|
|
readonly message = 'NATIVE_AUTH_STRATEGY_ERROR';
|
|
|
constructor(
|
|
|
-
|
|
|
) {
|
|
|
super();
|
|
|
}
|
|
|
@@ -296,7 +265,6 @@ export class NegativeQuantityError extends ErrorResult {
|
|
|
readonly errorCode = 'NEGATIVE_QUANTITY_ERROR' as any;
|
|
|
readonly message = 'NEGATIVE_QUANTITY_ERROR';
|
|
|
constructor(
|
|
|
-
|
|
|
) {
|
|
|
super();
|
|
|
}
|
|
|
@@ -307,7 +275,6 @@ export class NoChangesSpecifiedError extends ErrorResult {
|
|
|
readonly errorCode = 'NO_CHANGES_SPECIFIED_ERROR' as any;
|
|
|
readonly message = 'NO_CHANGES_SPECIFIED_ERROR';
|
|
|
constructor(
|
|
|
-
|
|
|
) {
|
|
|
super();
|
|
|
}
|
|
|
@@ -318,7 +285,6 @@ export class NothingToRefundError extends ErrorResult {
|
|
|
readonly errorCode = 'NOTHING_TO_REFUND_ERROR' as any;
|
|
|
readonly message = 'NOTHING_TO_REFUND_ERROR';
|
|
|
constructor(
|
|
|
-
|
|
|
) {
|
|
|
super();
|
|
|
}
|
|
|
@@ -328,12 +294,10 @@ export class OrderLimitError extends ErrorResult {
|
|
|
readonly __typename = 'OrderLimitError';
|
|
|
readonly errorCode = 'ORDER_LIMIT_ERROR' as any;
|
|
|
readonly message = 'ORDER_LIMIT_ERROR';
|
|
|
- readonly maxItems: Scalars['Int'];
|
|
|
constructor(
|
|
|
- input: { maxItems: Scalars['Int'] }
|
|
|
+ public maxItems: Scalars['Int'],
|
|
|
) {
|
|
|
super();
|
|
|
- this.maxItems = input.maxItems
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -342,7 +306,6 @@ export class OrderModificationStateError extends ErrorResult {
|
|
|
readonly errorCode = 'ORDER_MODIFICATION_STATE_ERROR' as any;
|
|
|
readonly message = 'ORDER_MODIFICATION_STATE_ERROR';
|
|
|
constructor(
|
|
|
-
|
|
|
) {
|
|
|
super();
|
|
|
}
|
|
|
@@ -352,16 +315,12 @@ export class OrderStateTransitionError extends ErrorResult {
|
|
|
readonly __typename = 'OrderStateTransitionError';
|
|
|
readonly errorCode = 'ORDER_STATE_TRANSITION_ERROR' as any;
|
|
|
readonly message = 'ORDER_STATE_TRANSITION_ERROR';
|
|
|
- readonly fromState: Scalars['String'];
|
|
|
- readonly toState: Scalars['String'];
|
|
|
- readonly transitionError: Scalars['String'];
|
|
|
constructor(
|
|
|
- input: { fromState: Scalars['String'], toState: Scalars['String'], transitionError: Scalars['String'] }
|
|
|
+ public transitionError: Scalars['String'],
|
|
|
+ public fromState: Scalars['String'],
|
|
|
+ public toState: Scalars['String'],
|
|
|
) {
|
|
|
super();
|
|
|
- this.fromState = input.fromState
|
|
|
- this.toState = input.toState
|
|
|
- this.transitionError = input.transitionError
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -370,7 +329,6 @@ export class PaymentMethodMissingError extends ErrorResult {
|
|
|
readonly errorCode = 'PAYMENT_METHOD_MISSING_ERROR' as any;
|
|
|
readonly message = 'PAYMENT_METHOD_MISSING_ERROR';
|
|
|
constructor(
|
|
|
-
|
|
|
) {
|
|
|
super();
|
|
|
}
|
|
|
@@ -381,7 +339,6 @@ export class PaymentOrderMismatchError extends ErrorResult {
|
|
|
readonly errorCode = 'PAYMENT_ORDER_MISMATCH_ERROR' as any;
|
|
|
readonly message = 'PAYMENT_ORDER_MISMATCH_ERROR';
|
|
|
constructor(
|
|
|
-
|
|
|
) {
|
|
|
super();
|
|
|
}
|
|
|
@@ -391,16 +348,12 @@ export class PaymentStateTransitionError extends ErrorResult {
|
|
|
readonly __typename = 'PaymentStateTransitionError';
|
|
|
readonly errorCode = 'PAYMENT_STATE_TRANSITION_ERROR' as any;
|
|
|
readonly message = 'PAYMENT_STATE_TRANSITION_ERROR';
|
|
|
- readonly fromState: Scalars['String'];
|
|
|
- readonly toState: Scalars['String'];
|
|
|
- readonly transitionError: Scalars['String'];
|
|
|
constructor(
|
|
|
- input: { fromState: Scalars['String'], toState: Scalars['String'], transitionError: Scalars['String'] }
|
|
|
+ public transitionError: Scalars['String'],
|
|
|
+ public fromState: Scalars['String'],
|
|
|
+ public toState: Scalars['String'],
|
|
|
) {
|
|
|
super();
|
|
|
- this.fromState = input.fromState
|
|
|
- this.toState = input.toState
|
|
|
- this.transitionError = input.transitionError
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -408,14 +361,11 @@ export class ProductOptionInUseError extends ErrorResult {
|
|
|
readonly __typename = 'ProductOptionInUseError';
|
|
|
readonly errorCode = 'PRODUCT_OPTION_IN_USE_ERROR' as any;
|
|
|
readonly message = 'PRODUCT_OPTION_IN_USE_ERROR';
|
|
|
- readonly optionGroupCode: Scalars['String'];
|
|
|
- readonly productVariantCount: Scalars['Int'];
|
|
|
constructor(
|
|
|
- input: { optionGroupCode: Scalars['String'], productVariantCount: Scalars['Int'] }
|
|
|
+ public optionGroupCode: Scalars['String'],
|
|
|
+ public productVariantCount: Scalars['Int'],
|
|
|
) {
|
|
|
super();
|
|
|
- this.optionGroupCode = input.optionGroupCode
|
|
|
- this.productVariantCount = input.productVariantCount
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -424,7 +374,6 @@ export class QuantityTooGreatError extends ErrorResult {
|
|
|
readonly errorCode = 'QUANTITY_TOO_GREAT_ERROR' as any;
|
|
|
readonly message = 'QUANTITY_TOO_GREAT_ERROR';
|
|
|
constructor(
|
|
|
-
|
|
|
) {
|
|
|
super();
|
|
|
}
|
|
|
@@ -434,12 +383,10 @@ export class RefundOrderStateError extends ErrorResult {
|
|
|
readonly __typename = 'RefundOrderStateError';
|
|
|
readonly errorCode = 'REFUND_ORDER_STATE_ERROR' as any;
|
|
|
readonly message = 'REFUND_ORDER_STATE_ERROR';
|
|
|
- readonly orderState: Scalars['String'];
|
|
|
constructor(
|
|
|
- input: { orderState: Scalars['String'] }
|
|
|
+ public orderState: Scalars['String'],
|
|
|
) {
|
|
|
super();
|
|
|
- this.orderState = input.orderState
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -448,7 +395,6 @@ export class RefundPaymentIdMissingError extends ErrorResult {
|
|
|
readonly errorCode = 'REFUND_PAYMENT_ID_MISSING_ERROR' as any;
|
|
|
readonly message = 'REFUND_PAYMENT_ID_MISSING_ERROR';
|
|
|
constructor(
|
|
|
-
|
|
|
) {
|
|
|
super();
|
|
|
}
|
|
|
@@ -458,16 +404,12 @@ export class RefundStateTransitionError extends ErrorResult {
|
|
|
readonly __typename = 'RefundStateTransitionError';
|
|
|
readonly errorCode = 'REFUND_STATE_TRANSITION_ERROR' as any;
|
|
|
readonly message = 'REFUND_STATE_TRANSITION_ERROR';
|
|
|
- readonly fromState: Scalars['String'];
|
|
|
- readonly toState: Scalars['String'];
|
|
|
- readonly transitionError: Scalars['String'];
|
|
|
constructor(
|
|
|
- input: { fromState: Scalars['String'], toState: Scalars['String'], transitionError: Scalars['String'] }
|
|
|
+ public transitionError: Scalars['String'],
|
|
|
+ public fromState: Scalars['String'],
|
|
|
+ public toState: Scalars['String'],
|
|
|
) {
|
|
|
super();
|
|
|
- this.fromState = input.fromState
|
|
|
- this.toState = input.toState
|
|
|
- this.transitionError = input.transitionError
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -475,30 +417,28 @@ export class SettlePaymentError extends ErrorResult {
|
|
|
readonly __typename = 'SettlePaymentError';
|
|
|
readonly errorCode = 'SETTLE_PAYMENT_ERROR' as any;
|
|
|
readonly message = 'SETTLE_PAYMENT_ERROR';
|
|
|
- readonly paymentErrorMessage: Scalars['String'];
|
|
|
constructor(
|
|
|
- input: { paymentErrorMessage: Scalars['String'] }
|
|
|
+ public paymentErrorMessage: Scalars['String'],
|
|
|
) {
|
|
|
super();
|
|
|
- this.paymentErrorMessage = input.paymentErrorMessage
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
-const errorTypeNames = new Set(['AlreadyRefundedError', 'CancelActiveOrderError', 'ChannelDefaultLanguageError', 'CouponCodeExpiredError', 'CouponCodeInvalidError', 'CouponCodeLimitError', 'CreateFulfillmentError', 'EmailAddressConflictError', 'EmptyOrderLineSelectionError', 'FulfillmentStateTransitionError', 'InsufficientStockError', 'InsufficientStockOnHandError', 'InvalidCredentialsError', 'InvalidFulfillmentHandlerError', 'ItemsAlreadyFulfilledError', 'LanguageNotAvailableError', 'ManualPaymentStateError', 'MimeTypeError', 'MissingConditionsError', 'MultipleOrderError', 'NativeAuthStrategyError', 'NegativeQuantityError', 'NoChangesSpecifiedError', 'NothingToRefundError', 'OrderLimitError', 'OrderModificationStateError', 'OrderStateTransitionError', 'PaymentMethodMissingError', 'PaymentOrderMismatchError', 'PaymentStateTransitionError', 'ProductOptionInUseError', 'QuantityTooGreatError', 'RefundOrderStateError', 'RefundPaymentIdMissingError', 'RefundStateTransitionError', 'SettlePaymentError']);
|
|
|
+const errorTypeNames = new Set(['AlreadyRefundedError', 'CancelActiveOrderError', 'CancelPaymentError', 'ChannelDefaultLanguageError', 'CouponCodeExpiredError', 'CouponCodeInvalidError', 'CouponCodeLimitError', 'CreateFulfillmentError', 'EmailAddressConflictError', 'EmptyOrderLineSelectionError', 'FulfillmentStateTransitionError', 'InsufficientStockError', 'InsufficientStockOnHandError', 'InvalidCredentialsError', 'InvalidFulfillmentHandlerError', 'ItemsAlreadyFulfilledError', 'LanguageNotAvailableError', 'ManualPaymentStateError', 'MimeTypeError', 'MissingConditionsError', 'MultipleOrderError', 'NativeAuthStrategyError', 'NegativeQuantityError', 'NoChangesSpecifiedError', 'NothingToRefundError', 'OrderLimitError', 'OrderModificationStateError', 'OrderStateTransitionError', 'PaymentMethodMissingError', 'PaymentOrderMismatchError', 'PaymentStateTransitionError', 'ProductOptionInUseError', 'QuantityTooGreatError', 'RefundOrderStateError', 'RefundPaymentIdMissingError', 'RefundStateTransitionError', 'SettlePaymentError']);
|
|
|
function isGraphQLError(input: any): input is import('@vendure/common/lib/generated-types').ErrorResult {
|
|
|
return input instanceof ErrorResult || errorTypeNames.has(input.__typename);
|
|
|
}
|
|
|
|
|
|
export const adminErrorOperationTypeResolvers = {
|
|
|
- AddFulfillmentToOrderResult: {
|
|
|
+ CreateAssetResult: {
|
|
|
__resolveType(value: any) {
|
|
|
- return isGraphQLError(value) ? (value as any).__typename : 'Fulfillment';
|
|
|
+ return isGraphQLError(value) ? (value as any).__typename : 'Asset';
|
|
|
},
|
|
|
},
|
|
|
- AddManualPaymentToOrderResult: {
|
|
|
+ NativeAuthenticationResult: {
|
|
|
__resolveType(value: any) {
|
|
|
- return isGraphQLError(value) ? (value as any).__typename : 'Order';
|
|
|
+ return isGraphQLError(value) ? (value as any).__typename : 'CurrentUser';
|
|
|
},
|
|
|
},
|
|
|
AuthenticationResult: {
|
|
|
@@ -506,17 +446,12 @@ export const adminErrorOperationTypeResolvers = {
|
|
|
return isGraphQLError(value) ? (value as any).__typename : 'CurrentUser';
|
|
|
},
|
|
|
},
|
|
|
- CancelOrderResult: {
|
|
|
- __resolveType(value: any) {
|
|
|
- return isGraphQLError(value) ? (value as any).__typename : 'Order';
|
|
|
- },
|
|
|
- },
|
|
|
- CreateAssetResult: {
|
|
|
+ CreateChannelResult: {
|
|
|
__resolveType(value: any) {
|
|
|
- return isGraphQLError(value) ? (value as any).__typename : 'Asset';
|
|
|
+ return isGraphQLError(value) ? (value as any).__typename : 'Channel';
|
|
|
},
|
|
|
},
|
|
|
- CreateChannelResult: {
|
|
|
+ UpdateChannelResult: {
|
|
|
__resolveType(value: any) {
|
|
|
return isGraphQLError(value) ? (value as any).__typename : 'Channel';
|
|
|
},
|
|
|
@@ -526,44 +461,44 @@ export const adminErrorOperationTypeResolvers = {
|
|
|
return isGraphQLError(value) ? (value as any).__typename : 'Customer';
|
|
|
},
|
|
|
},
|
|
|
- CreatePromotionResult: {
|
|
|
+ UpdateCustomerResult: {
|
|
|
__resolveType(value: any) {
|
|
|
- return isGraphQLError(value) ? (value as any).__typename : 'Promotion';
|
|
|
+ return isGraphQLError(value) ? (value as any).__typename : 'Customer';
|
|
|
},
|
|
|
},
|
|
|
- NativeAuthenticationResult: {
|
|
|
+ UpdateGlobalSettingsResult: {
|
|
|
__resolveType(value: any) {
|
|
|
- return isGraphQLError(value) ? (value as any).__typename : 'CurrentUser';
|
|
|
+ return isGraphQLError(value) ? (value as any).__typename : 'GlobalSettings';
|
|
|
},
|
|
|
},
|
|
|
- ModifyOrderResult: {
|
|
|
+ SettlePaymentResult: {
|
|
|
__resolveType(value: any) {
|
|
|
- return isGraphQLError(value) ? (value as any).__typename : 'Order';
|
|
|
+ return isGraphQLError(value) ? (value as any).__typename : 'Payment';
|
|
|
},
|
|
|
},
|
|
|
- RefundOrderResult: {
|
|
|
+ CancelPaymentResult: {
|
|
|
__resolveType(value: any) {
|
|
|
- return isGraphQLError(value) ? (value as any).__typename : 'Refund';
|
|
|
+ return isGraphQLError(value) ? (value as any).__typename : 'Payment';
|
|
|
},
|
|
|
},
|
|
|
- RemoveOptionGroupFromProductResult: {
|
|
|
+ AddFulfillmentToOrderResult: {
|
|
|
__resolveType(value: any) {
|
|
|
- return isGraphQLError(value) ? (value as any).__typename : 'Product';
|
|
|
+ return isGraphQLError(value) ? (value as any).__typename : 'Fulfillment';
|
|
|
},
|
|
|
},
|
|
|
- SettlePaymentResult: {
|
|
|
+ CancelOrderResult: {
|
|
|
__resolveType(value: any) {
|
|
|
- return isGraphQLError(value) ? (value as any).__typename : 'Payment';
|
|
|
+ return isGraphQLError(value) ? (value as any).__typename : 'Order';
|
|
|
},
|
|
|
},
|
|
|
- SettleRefundResult: {
|
|
|
+ RefundOrderResult: {
|
|
|
__resolveType(value: any) {
|
|
|
return isGraphQLError(value) ? (value as any).__typename : 'Refund';
|
|
|
},
|
|
|
},
|
|
|
- TransitionFulfillmentToStateResult: {
|
|
|
+ SettleRefundResult: {
|
|
|
__resolveType(value: any) {
|
|
|
- return isGraphQLError(value) ? (value as any).__typename : 'Fulfillment';
|
|
|
+ return isGraphQLError(value) ? (value as any).__typename : 'Refund';
|
|
|
},
|
|
|
},
|
|
|
TransitionOrderToStateResult: {
|
|
|
@@ -571,24 +506,34 @@ export const adminErrorOperationTypeResolvers = {
|
|
|
return isGraphQLError(value) ? (value as any).__typename : 'Order';
|
|
|
},
|
|
|
},
|
|
|
+ TransitionFulfillmentToStateResult: {
|
|
|
+ __resolveType(value: any) {
|
|
|
+ return isGraphQLError(value) ? (value as any).__typename : 'Fulfillment';
|
|
|
+ },
|
|
|
+ },
|
|
|
TransitionPaymentToStateResult: {
|
|
|
__resolveType(value: any) {
|
|
|
return isGraphQLError(value) ? (value as any).__typename : 'Payment';
|
|
|
},
|
|
|
},
|
|
|
- UpdateChannelResult: {
|
|
|
+ ModifyOrderResult: {
|
|
|
__resolveType(value: any) {
|
|
|
- return isGraphQLError(value) ? (value as any).__typename : 'Channel';
|
|
|
+ return isGraphQLError(value) ? (value as any).__typename : 'Order';
|
|
|
},
|
|
|
},
|
|
|
- UpdateCustomerResult: {
|
|
|
+ AddManualPaymentToOrderResult: {
|
|
|
__resolveType(value: any) {
|
|
|
- return isGraphQLError(value) ? (value as any).__typename : 'Customer';
|
|
|
+ return isGraphQLError(value) ? (value as any).__typename : 'Order';
|
|
|
},
|
|
|
},
|
|
|
- UpdateGlobalSettingsResult: {
|
|
|
+ RemoveOptionGroupFromProductResult: {
|
|
|
__resolveType(value: any) {
|
|
|
- return isGraphQLError(value) ? (value as any).__typename : 'GlobalSettings';
|
|
|
+ return isGraphQLError(value) ? (value as any).__typename : 'Product';
|
|
|
+ },
|
|
|
+ },
|
|
|
+ CreatePromotionResult: {
|
|
|
+ __resolveType(value: any) {
|
|
|
+ return isGraphQLError(value) ? (value as any).__typename : 'Promotion';
|
|
|
},
|
|
|
},
|
|
|
UpdatePromotionResult: {
|