Skip to content

Commit

Permalink
chore(payments-plugin): Reinstate missing Mollie api types
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbromley committed Jul 17, 2024
1 parent 7003682 commit c2e567d
Show file tree
Hide file tree
Showing 3 changed files with 192 additions and 18 deletions.
49 changes: 43 additions & 6 deletions packages/payments-plugin/e2e/graphql/generated-admin-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1617,6 +1617,7 @@ export enum ErrorCode {
MANUAL_PAYMENT_STATE_ERROR = 'MANUAL_PAYMENT_STATE_ERROR',
MIME_TYPE_ERROR = 'MIME_TYPE_ERROR',
MISSING_CONDITIONS_ERROR = 'MISSING_CONDITIONS_ERROR',
MOLLIE_PAYMENT_INTENT_ERROR = 'MOLLIE_PAYMENT_INTENT_ERROR',
MULTIPLE_ORDER_ERROR = 'MULTIPLE_ORDER_ERROR',
NATIVE_AUTH_STRATEGY_ERROR = 'NATIVE_AUTH_STRATEGY_ERROR',
NEGATIVE_QUANTITY_ERROR = 'NEGATIVE_QUANTITY_ERROR',
Expand All @@ -1626,6 +1627,7 @@ export enum ErrorCode {
ORDER_LIMIT_ERROR = 'ORDER_LIMIT_ERROR',
ORDER_MODIFICATION_ERROR = 'ORDER_MODIFICATION_ERROR',
ORDER_MODIFICATION_STATE_ERROR = 'ORDER_MODIFICATION_STATE_ERROR',
ORDER_PAYMENT_STATE_ERROR = 'ORDER_PAYMENT_STATE_ERROR',
ORDER_STATE_TRANSITION_ERROR = 'ORDER_STATE_TRANSITION_ERROR',
PAYMENT_METHOD_MISSING_ERROR = 'PAYMENT_METHOD_MISSING_ERROR',
PAYMENT_ORDER_MISMATCH_ERROR = 'PAYMENT_ORDER_MISMATCH_ERROR',
Expand Down Expand Up @@ -2599,6 +2601,41 @@ export type ModifyOrderResult =
| PaymentMethodMissingError
| RefundPaymentIdMissingError;

export type MolliePaymentIntent = {
url: Scalars['String']['output'];
};

export type MolliePaymentIntentError = ErrorResult & {
errorCode: ErrorCode;
message: Scalars['String']['output'];
};

export type MolliePaymentIntentInput = {
/**
* Optional preselected Mollie payment method. When this is passed
* the payment selection step will be skipped.
*/
molliePaymentMethodCode?: InputMaybe<Scalars['String']['input']>;
/**
* Use this to create a payment intent for a specific order. This allows you to create intents for
* orders that are not active orders.
*/
orderId?: InputMaybe<Scalars['String']['input']>;
/**
* The code of the Vendure payment method to use for the payment.
* Must have Mollie as payment method handler.
* Without this, the first method with Mollie as handler will be used.
*/
paymentMethodCode?: InputMaybe<Scalars['String']['input']>;
/**
* The redirect url to which the customer will be redirected after the payment is completed.
* The configured fallback redirect will be used if this is not provided.
*/
redirectUrl?: InputMaybe<Scalars['String']['input']>;
};

export type MolliePaymentIntentResult = MolliePaymentIntent | MolliePaymentIntentError;

export type MoveCollectionInput = {
collectionId: Scalars['ID']['input'];
index: Scalars['Int']['input'];
Expand Down Expand Up @@ -2684,6 +2721,7 @@ export type Mutation = {
createFacet: Facet;
/** Create one or more FacetValues */
createFacetValues: Array<FacetValue>;
createMolliePaymentIntent: MolliePaymentIntentResult;
/** Create existing PaymentMethod */
createPaymentMethod: PaymentMethod;
/** Create a new Product */
Expand Down Expand Up @@ -2805,12 +2843,7 @@ export type Mutation = {
duplicateEntity: DuplicateEntityResult;
flushBufferedJobs: Success;
importProducts?: Maybe<ImportInfo>;
/**
* Authenticates the user using the native authentication strategy. This mutation is an alias for authenticate({ native: { ... }})
*
* The `rememberMe` option applies when using cookie-based sessions, and if `true` it will set the maxAge of the session cookie
* to 1 year.
*/
/** Authenticates the user using the native authentication strategy. This mutation is an alias for `authenticate({ native: { ... }})` */
login: NativeAuthenticationResult;
logout: Success;
/**
Expand Down Expand Up @@ -3076,6 +3109,10 @@ export type MutationCreateFacetValuesArgs = {
input: Array<CreateFacetValueInput>;
};

export type MutationCreateMolliePaymentIntentArgs = {
input: MolliePaymentIntentInput;
};

export type MutationCreatePaymentMethodArgs = {
input: CreatePaymentMethodInput;
};
Expand Down
78 changes: 72 additions & 6 deletions packages/payments-plugin/e2e/graphql/generated-shop-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -895,6 +895,7 @@ export enum ErrorCode {
INSUFFICIENT_STOCK_ERROR = 'INSUFFICIENT_STOCK_ERROR',
INVALID_CREDENTIALS_ERROR = 'INVALID_CREDENTIALS_ERROR',
MISSING_PASSWORD_ERROR = 'MISSING_PASSWORD_ERROR',
MOLLIE_PAYMENT_INTENT_ERROR = 'MOLLIE_PAYMENT_INTENT_ERROR',
NATIVE_AUTH_STRATEGY_ERROR = 'NATIVE_AUTH_STRATEGY_ERROR',
NEGATIVE_QUANTITY_ERROR = 'NEGATIVE_QUANTITY_ERROR',
NOT_VERIFIED_ERROR = 'NOT_VERIFIED_ERROR',
Expand Down Expand Up @@ -1629,6 +1630,66 @@ export type MissingPasswordError = ErrorResult & {
message: Scalars['String']['output'];
};

export type MollieAmount = {
currency?: Maybe<Scalars['String']['output']>;
value?: Maybe<Scalars['String']['output']>;
};

export type MolliePaymentIntent = {
url: Scalars['String']['output'];
};

export type MolliePaymentIntentError = ErrorResult & {
errorCode: ErrorCode;
message: Scalars['String']['output'];
};

export type MolliePaymentIntentInput = {
/**
* Optional preselected Mollie payment method. When this is passed
* the payment selection step will be skipped.
*/
molliePaymentMethodCode?: InputMaybe<Scalars['String']['input']>;
/**
* Use this to create a payment intent for a specific order. This allows you to create intents for
* orders that are not active orders.
*/
orderId?: InputMaybe<Scalars['String']['input']>;
/**
* The code of the Vendure payment method to use for the payment.
* Must have Mollie as payment method handler.
* Without this, the first method with Mollie as handler will be used.
*/
paymentMethodCode?: InputMaybe<Scalars['String']['input']>;
/**
* The redirect url to which the customer will be redirected after the payment is completed.
* The configured fallback redirect will be used if this is not provided.
*/
redirectUrl?: InputMaybe<Scalars['String']['input']>;
};

export type MolliePaymentIntentResult = MolliePaymentIntent | MolliePaymentIntentError;

export type MolliePaymentMethod = {
code: Scalars['String']['output'];
description?: Maybe<Scalars['String']['output']>;
id: Scalars['ID']['output'];
image?: Maybe<MolliePaymentMethodImages>;
maximumAmount?: Maybe<MollieAmount>;
minimumAmount?: Maybe<MollieAmount>;
status?: Maybe<Scalars['String']['output']>;
};

export type MolliePaymentMethodImages = {
size1x?: Maybe<Scalars['String']['output']>;
size2x?: Maybe<Scalars['String']['output']>;
svg?: Maybe<Scalars['String']['output']>;
};

export type MolliePaymentMethodsInput = {
paymentMethodCode: Scalars['String']['input'];
};

export type Mutation = {
/** Adds an item to the order. If custom fields are defined on the OrderLine entity, a third argument 'customFields' will be available. */
addItemToOrder: UpdateOrderItemsResult;
Expand All @@ -1642,14 +1703,10 @@ export type Mutation = {
authenticate: AuthenticationResult;
/** Create a new Customer Address */
createCustomerAddress: Address;
createMolliePaymentIntent: MolliePaymentIntentResult;
/** Delete an existing Address */
deleteCustomerAddress: Success;
/**
* Authenticates the user using the native authentication strategy. This mutation is an alias for authenticate({ native: { ... }})
*
* The `rememberMe` option applies when using cookie-based sessions, and if `true` it will set the maxAge of the session cookie
* to 1 year.
*/
/** Authenticates the user using the native authentication strategy. This mutation is an alias for `authenticate({ native: { ... }})` */
login: NativeAuthenticationResult;
/** End the current authenticated session */
logout: Success;
Expand Down Expand Up @@ -1753,6 +1810,10 @@ export type MutationCreateCustomerAddressArgs = {
input: CreateAddressInput;
};

export type MutationCreateMolliePaymentIntentArgs = {
input: MolliePaymentIntentInput;
};

export type MutationDeleteCustomerAddressArgs = {
id: Scalars['ID']['input'];
};
Expand Down Expand Up @@ -2756,6 +2817,7 @@ export type Query = {
facets: FacetList;
/** Returns information about the current authenticated User */
me?: Maybe<CurrentUser>;
molliePaymentMethods: Array<MolliePaymentMethod>;
/** Returns the possible next states that the activeOrder can transition to */
nextOrderStates: Array<Scalars['String']['output']>;
/**
Expand Down Expand Up @@ -2795,6 +2857,10 @@ export type QueryFacetsArgs = {
options?: InputMaybe<FacetListOptions>;
};

export type QueryMolliePaymentMethodsArgs = {
input: MolliePaymentMethodsInput;
};

export type QueryOrderArgs = {
id: Scalars['ID']['input'];
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -926,6 +926,7 @@ export enum ErrorCode {
INSUFFICIENT_STOCK_ERROR = 'INSUFFICIENT_STOCK_ERROR',
INVALID_CREDENTIALS_ERROR = 'INVALID_CREDENTIALS_ERROR',
MISSING_PASSWORD_ERROR = 'MISSING_PASSWORD_ERROR',
MOLLIE_PAYMENT_INTENT_ERROR = 'MOLLIE_PAYMENT_INTENT_ERROR',
NATIVE_AUTH_STRATEGY_ERROR = 'NATIVE_AUTH_STRATEGY_ERROR',
NEGATIVE_QUANTITY_ERROR = 'NEGATIVE_QUANTITY_ERROR',
NOT_VERIFIED_ERROR = 'NOT_VERIFIED_ERROR',
Expand Down Expand Up @@ -1684,6 +1685,71 @@ export type MissingPasswordError = ErrorResult & {
message: Scalars['String']['output'];
};

export type MollieAmount = {
__typename?: 'MollieAmount';
currency?: Maybe<Scalars['String']['output']>;
value?: Maybe<Scalars['String']['output']>;
};

export type MolliePaymentIntent = {
__typename?: 'MolliePaymentIntent';
url: Scalars['String']['output'];
};

export type MolliePaymentIntentError = ErrorResult & {
__typename?: 'MolliePaymentIntentError';
errorCode: ErrorCode;
message: Scalars['String']['output'];
};

export type MolliePaymentIntentInput = {
/**
* Optional preselected Mollie payment method. When this is passed
* the payment selection step will be skipped.
*/
molliePaymentMethodCode?: InputMaybe<Scalars['String']['input']>;
/**
* Use this to create a payment intent for a specific order. This allows you to create intents for
* orders that are not active orders.
*/
orderId?: InputMaybe<Scalars['String']['input']>;
/**
* The code of the Vendure payment method to use for the payment.
* Must have Mollie as payment method handler.
* Without this, the first method with Mollie as handler will be used.
*/
paymentMethodCode?: InputMaybe<Scalars['String']['input']>;
/**
* The redirect url to which the customer will be redirected after the payment is completed.
* The configured fallback redirect will be used if this is not provided.
*/
redirectUrl?: InputMaybe<Scalars['String']['input']>;
};

export type MolliePaymentIntentResult = MolliePaymentIntent | MolliePaymentIntentError;

export type MolliePaymentMethod = {
__typename?: 'MolliePaymentMethod';
code: Scalars['String']['output'];
description?: Maybe<Scalars['String']['output']>;
id: Scalars['ID']['output'];
image?: Maybe<MolliePaymentMethodImages>;
maximumAmount?: Maybe<MollieAmount>;
minimumAmount?: Maybe<MollieAmount>;
status?: Maybe<Scalars['String']['output']>;
};

export type MolliePaymentMethodImages = {
__typename?: 'MolliePaymentMethodImages';
size1x?: Maybe<Scalars['String']['output']>;
size2x?: Maybe<Scalars['String']['output']>;
svg?: Maybe<Scalars['String']['output']>;
};

export type MolliePaymentMethodsInput = {
paymentMethodCode: Scalars['String']['input'];
};

export type Mutation = {
__typename?: 'Mutation';
/** Adds an item to the order. If custom fields are defined on the OrderLine entity, a third argument 'customFields' will be available. */
Expand All @@ -1698,14 +1764,10 @@ export type Mutation = {
authenticate: AuthenticationResult;
/** Create a new Customer Address */
createCustomerAddress: Address;
createMolliePaymentIntent: MolliePaymentIntentResult;
/** Delete an existing Address */
deleteCustomerAddress: Success;
/**
* Authenticates the user using the native authentication strategy. This mutation is an alias for authenticate({ native: { ... }})
*
* The `rememberMe` option applies when using cookie-based sessions, and if `true` it will set the maxAge of the session cookie
* to 1 year.
*/
/** Authenticates the user using the native authentication strategy. This mutation is an alias for `authenticate({ native: { ... }})` */
login: NativeAuthenticationResult;
/** End the current authenticated session */
logout: Success;
Expand Down Expand Up @@ -1809,6 +1871,10 @@ export type MutationCreateCustomerAddressArgs = {
input: CreateAddressInput;
};

export type MutationCreateMolliePaymentIntentArgs = {
input: MolliePaymentIntentInput;
};

export type MutationDeleteCustomerAddressArgs = {
id: Scalars['ID']['input'];
};
Expand Down Expand Up @@ -2852,6 +2918,7 @@ export type Query = {
facets: FacetList;
/** Returns information about the current authenticated User */
me?: Maybe<CurrentUser>;
molliePaymentMethods: Array<MolliePaymentMethod>;
/** Returns the possible next states that the activeOrder can transition to */
nextOrderStates: Array<Scalars['String']['output']>;
/**
Expand Down Expand Up @@ -2891,6 +2958,10 @@ export type QueryFacetsArgs = {
options?: InputMaybe<FacetListOptions>;
};

export type QueryMolliePaymentMethodsArgs = {
input: MolliePaymentMethodsInput;
};

export type QueryOrderArgs = {
id: Scalars['ID']['input'];
};
Expand Down

0 comments on commit c2e567d

Please sign in to comment.