diff --git a/packages/admin-ui/src/lib/core/src/common/generated-types.ts b/packages/admin-ui/src/lib/core/src/common/generated-types.ts index 00988366e5..8228bfecd9 100644 --- a/packages/admin-ui/src/lib/core/src/common/generated-types.ts +++ b/packages/admin-ui/src/lib/core/src/common/generated-types.ts @@ -3256,6 +3256,8 @@ export type Mutation = { updateUserChannels: UserStatus; /** Update an existing Zone */ updateZone: Zone; + /** Manually verify a customer account, bypassing the email verification token flow. */ + verifyCustomerAccount: Customer; }; @@ -4213,6 +4215,11 @@ export type MutationUpdateZoneArgs = { input: UpdateZoneInput; }; + +export type MutationVerifyCustomerAccountArgs = { + id: Scalars['ID']['input']; +}; + export type NativeAuthInput = { password: Scalars['String']['input']; username: Scalars['String']['input']; diff --git a/packages/common/src/generated-types.ts b/packages/common/src/generated-types.ts index ba05d13405..b9e77b4f1b 100644 --- a/packages/common/src/generated-types.ts +++ b/packages/common/src/generated-types.ts @@ -3236,6 +3236,8 @@ export type Mutation = { updateTaxRate: TaxRate; /** Update an existing Zone */ updateZone: Zone; + /** Manually verify a customer account, bypassing the email verification token flow. */ + verifyCustomerAccount: Customer; }; @@ -4148,6 +4150,11 @@ export type MutationUpdateZoneArgs = { input: UpdateZoneInput; }; + +export type MutationVerifyCustomerAccountArgs = { + id: Scalars['ID']['input']; +}; + export type NativeAuthInput = { password: Scalars['String']['input']; username: Scalars['String']['input']; diff --git a/packages/core/e2e/customer.e2e-spec.ts b/packages/core/e2e/customer.e2e-spec.ts index 9b55c5c20c..ecd8943a01 100644 --- a/packages/core/e2e/customer.e2e-spec.ts +++ b/packages/core/e2e/customer.e2e-spec.ts @@ -1,7 +1,7 @@ import { DeletionResult, ErrorCode, HistoryEntryType } from '@vendure/common/lib/generated-types'; import { omit } from '@vendure/common/lib/omit'; import { pick } from '@vendure/common/lib/pick'; -import { AccountRegistrationEvent, EventBus } from '@vendure/core'; +import { AccountRegistrationEvent, AccountVerifiedEvent, EventBus } from '@vendure/core'; import { createErrorResultGuard, createTestEnvironment, ErrorResultGuard } from '@vendure/testing'; import path from 'path'; import { afterAll, beforeAll, describe, expect, it, vi } from 'vitest'; @@ -29,6 +29,7 @@ import { updateAddressDocument, updateCustomerDocument, updateCustomerNoteDocument, + verifyCustomerAccountDocument, } from './graphql/shared-definitions'; import { activeOrderCustomerDocument, @@ -681,4 +682,89 @@ describe('Customer resolver', () => { expect(after?.history.totalItems).toBe(historyCount - 1); }); }); + + describe('verifyCustomerAccount', () => { + let unverifiedCustomerId: string; + + beforeAll(async () => { + const { createCustomer } = await adminClient.query(createCustomerDocument, { + input: { + emailAddress: 'unverified@test.com', + firstName: 'Unverified', + lastName: 'Customer', + }, + }); + customerErrorGuard.assertSuccess(createCustomer); + unverifiedCustomerId = createCustomer.id; + expect(createCustomer.user!.verified).toBe(false); + }); + + it('verifies an unverified customer', async () => { + const { verifyCustomerAccount } = await adminClient.query(verifyCustomerAccountDocument, { + id: unverifiedCustomerId, + }); + + expect(verifyCustomerAccount.user!.verified).toBe(true); + }); + + it('records a CUSTOMER_VERIFIED history entry', async () => { + const { customer } = await adminClient.query(getCustomerHistoryDocument, { + id: unverifiedCustomerId, + options: { + filter: { + type: { + eq: HistoryEntryType.CUSTOMER_VERIFIED, + }, + }, + }, + }); + + customerHistoryGuard.assertSuccess(customer); + + expect(customer.history.items.map(pick(['type', 'data']))).toContainEqual({ + type: HistoryEntryType.CUSTOMER_VERIFIED, + data: { strategy: 'native' }, + }); + }); + + it('emits an AccountVerifiedEvent', async () => { + const { createCustomer } = await adminClient.query(createCustomerDocument, { + input: { + emailAddress: 'unverified2@test.com', + firstName: 'Unverified2', + lastName: 'Customer', + }, + }); + customerErrorGuard.assertSuccess(createCustomer); + + const eventFn = vi.fn(); + let resolveFn: () => void; + const subscription = server.app + .get(EventBus) + .ofType(AccountVerifiedEvent) + .subscribe(event => { + eventFn(event); + resolveFn?.(); + }); + const eventReceived = new Promise(resolve => { + resolveFn = resolve; + }); + + await adminClient.query(verifyCustomerAccountDocument, { id: createCustomer.id }); + await eventReceived; + + expect(eventFn).toHaveBeenCalledTimes(1); + expect(eventFn.mock.calls[0][0] instanceof AccountVerifiedEvent).toBe(true); + + subscription.unsubscribe(); + }); + + it('is idempotent for an already-verified customer', async () => { + const { verifyCustomerAccount } = await adminClient.query(verifyCustomerAccountDocument, { + id: unverifiedCustomerId, + }); + + expect(verifyCustomerAccount.user!.verified).toBe(true); + }); + }); }); diff --git a/packages/core/e2e/graphql/graphql-env-admin.d.ts b/packages/core/e2e/graphql/graphql-env-admin.d.ts index d4365e8e50..48f3ee87ae 100644 --- a/packages/core/e2e/graphql/graphql-env-admin.d.ts +++ b/packages/core/e2e/graphql/graphql-env-admin.d.ts @@ -243,7 +243,7 @@ export type introspection_types = { 'Money': unknown; 'MoveCollectionInput': { kind: 'INPUT_OBJECT'; name: 'MoveCollectionInput'; isOneOf: false; inputFields: [{ name: 'collectionId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }, { name: 'parentId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }, { name: 'index'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; defaultValue: null }]; }; 'MultipleOrderError': { kind: 'OBJECT'; name: 'MultipleOrderError'; fields: { 'errorCode': { name: 'errorCode'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'ENUM'; name: 'ErrorCode'; ofType: null; }; } }; 'message': { name: 'message'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; }; }; - 'Mutation': { kind: 'OBJECT'; name: 'Mutation'; fields: { 'addCustomersToGroup': { name: 'addCustomersToGroup'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'CustomerGroup'; ofType: null; }; } }; 'addFulfillmentToOrder': { name: 'addFulfillmentToOrder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'AddFulfillmentToOrderResult'; ofType: null; }; } }; 'addItemToDraftOrder': { name: 'addItemToDraftOrder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'UpdateOrderItemsResult'; ofType: null; }; } }; 'addManualPaymentToOrder': { name: 'addManualPaymentToOrder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'AddManualPaymentToOrderResult'; ofType: null; }; } }; 'addMembersToZone': { name: 'addMembersToZone'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Zone'; ofType: null; }; } }; 'addNoteToCustomer': { name: 'addNoteToCustomer'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Customer'; ofType: null; }; } }; 'addNoteToOrder': { name: 'addNoteToOrder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Order'; ofType: null; }; } }; 'addOptionGroupToProduct': { name: 'addOptionGroupToProduct'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Product'; ofType: null; }; } }; 'adjustDraftOrderLine': { name: 'adjustDraftOrderLine'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'UpdateOrderItemsResult'; ofType: null; }; } }; 'applyCouponCodeToDraftOrder': { name: 'applyCouponCodeToDraftOrder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'ApplyCouponCodeResult'; ofType: null; }; } }; 'assignAssetsToChannel': { name: 'assignAssetsToChannel'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Asset'; ofType: null; }; }; }; } }; 'assignCollectionsToChannel': { name: 'assignCollectionsToChannel'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Collection'; ofType: null; }; }; }; } }; 'assignFacetsToChannel': { name: 'assignFacetsToChannel'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Facet'; ofType: null; }; }; }; } }; 'assignPaymentMethodsToChannel': { name: 'assignPaymentMethodsToChannel'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PaymentMethod'; ofType: null; }; }; }; } }; 'assignProductOptionGroupsToChannel': { name: 'assignProductOptionGroupsToChannel'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ProductOptionGroup'; ofType: null; }; }; }; } }; 'assignProductVariantsToChannel': { name: 'assignProductVariantsToChannel'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ProductVariant'; ofType: null; }; }; }; } }; 'assignProductsToChannel': { name: 'assignProductsToChannel'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Product'; ofType: null; }; }; }; } }; 'assignPromotionsToChannel': { name: 'assignPromotionsToChannel'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Promotion'; ofType: null; }; }; }; } }; 'assignRoleToAdministrator': { name: 'assignRoleToAdministrator'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Administrator'; ofType: null; }; } }; 'assignShippingMethodsToChannel': { name: 'assignShippingMethodsToChannel'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ShippingMethod'; ofType: null; }; }; }; } }; 'assignStockLocationsToChannel': { name: 'assignStockLocationsToChannel'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'StockLocation'; ofType: null; }; }; }; } }; 'authenticate': { name: 'authenticate'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'AuthenticationResult'; ofType: null; }; } }; 'cancelJob': { name: 'cancelJob'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Job'; ofType: null; }; } }; 'cancelOrder': { name: 'cancelOrder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'CancelOrderResult'; ofType: null; }; } }; 'cancelPayment': { name: 'cancelPayment'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'CancelPaymentResult'; ofType: null; }; } }; 'createAdministrator': { name: 'createAdministrator'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Administrator'; ofType: null; }; } }; 'createApiKey': { name: 'createApiKey'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'CreateApiKeyResult'; ofType: null; }; } }; 'createAssets': { name: 'createAssets'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'CreateAssetResult'; ofType: null; }; }; }; } }; 'createChannel': { name: 'createChannel'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'CreateChannelResult'; ofType: null; }; } }; 'createCollection': { name: 'createCollection'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Collection'; ofType: null; }; } }; 'createCountry': { name: 'createCountry'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Country'; ofType: null; }; } }; 'createCustomer': { name: 'createCustomer'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'CreateCustomerResult'; ofType: null; }; } }; 'createCustomerAddress': { name: 'createCustomerAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Address'; ofType: null; }; } }; 'createCustomerGroup': { name: 'createCustomerGroup'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'CustomerGroup'; ofType: null; }; } }; 'createDraftOrder': { name: 'createDraftOrder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Order'; ofType: null; }; } }; 'createFacet': { name: 'createFacet'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Facet'; ofType: null; }; } }; 'createFacetValue': { name: 'createFacetValue'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'FacetValue'; ofType: null; }; } }; 'createFacetValues': { name: 'createFacetValues'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'FacetValue'; ofType: null; }; }; }; } }; 'createPaymentMethod': { name: 'createPaymentMethod'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PaymentMethod'; ofType: null; }; } }; 'createProduct': { name: 'createProduct'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Product'; ofType: null; }; } }; 'createProductOption': { name: 'createProductOption'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ProductOption'; ofType: null; }; } }; 'createProductOptionGroup': { name: 'createProductOptionGroup'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ProductOptionGroup'; ofType: null; }; } }; 'createProductVariants': { name: 'createProductVariants'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'OBJECT'; name: 'ProductVariant'; ofType: null; }; }; } }; 'createPromotion': { name: 'createPromotion'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'CreatePromotionResult'; ofType: null; }; } }; 'createProvince': { name: 'createProvince'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Province'; ofType: null; }; } }; 'createRole': { name: 'createRole'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Role'; ofType: null; }; } }; 'createSeller': { name: 'createSeller'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Seller'; ofType: null; }; } }; 'createShippingMethod': { name: 'createShippingMethod'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ShippingMethod'; ofType: null; }; } }; 'createStockLocation': { name: 'createStockLocation'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'StockLocation'; ofType: null; }; } }; 'createTag': { name: 'createTag'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Tag'; ofType: null; }; } }; 'createTaxCategory': { name: 'createTaxCategory'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'TaxCategory'; ofType: null; }; } }; 'createTaxRate': { name: 'createTaxRate'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'TaxRate'; ofType: null; }; } }; 'createZone': { name: 'createZone'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Zone'; ofType: null; }; } }; 'deleteAdministrator': { name: 'deleteAdministrator'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteAdministrators': { name: 'deleteAdministrators'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; }; }; } }; 'deleteApiKeys': { name: 'deleteApiKeys'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; }; }; } }; 'deleteAsset': { name: 'deleteAsset'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteAssets': { name: 'deleteAssets'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteChannel': { name: 'deleteChannel'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteChannels': { name: 'deleteChannels'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; }; }; } }; 'deleteCollection': { name: 'deleteCollection'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteCollections': { name: 'deleteCollections'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; }; }; } }; 'deleteCountries': { name: 'deleteCountries'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; }; }; } }; 'deleteCountry': { name: 'deleteCountry'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteCustomer': { name: 'deleteCustomer'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteCustomerAddress': { name: 'deleteCustomerAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Success'; ofType: null; }; } }; 'deleteCustomerGroup': { name: 'deleteCustomerGroup'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteCustomerGroups': { name: 'deleteCustomerGroups'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; }; }; } }; 'deleteCustomerNote': { name: 'deleteCustomerNote'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteCustomers': { name: 'deleteCustomers'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; }; }; } }; 'deleteDraftOrder': { name: 'deleteDraftOrder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteFacet': { name: 'deleteFacet'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteFacetValues': { name: 'deleteFacetValues'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; }; }; } }; 'deleteFacets': { name: 'deleteFacets'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; }; }; } }; 'deleteOrderNote': { name: 'deleteOrderNote'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deletePaymentMethod': { name: 'deletePaymentMethod'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deletePaymentMethods': { name: 'deletePaymentMethods'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; }; }; } }; 'deleteProduct': { name: 'deleteProduct'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteProductOption': { name: 'deleteProductOption'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteProductOptionGroup': { name: 'deleteProductOptionGroup'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteProductOptionGroups': { name: 'deleteProductOptionGroups'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; }; }; } }; 'deleteProductVariant': { name: 'deleteProductVariant'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteProductVariants': { name: 'deleteProductVariants'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; }; }; } }; 'deleteProducts': { name: 'deleteProducts'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; }; }; } }; 'deletePromotion': { name: 'deletePromotion'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deletePromotions': { name: 'deletePromotions'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; }; }; } }; 'deleteProvince': { name: 'deleteProvince'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteRole': { name: 'deleteRole'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteRoles': { name: 'deleteRoles'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; }; }; } }; 'deleteSeller': { name: 'deleteSeller'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteSellers': { name: 'deleteSellers'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; }; }; } }; 'deleteShippingMethod': { name: 'deleteShippingMethod'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteShippingMethods': { name: 'deleteShippingMethods'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; }; }; } }; 'deleteStockLocation': { name: 'deleteStockLocation'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteStockLocations': { name: 'deleteStockLocations'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; }; }; } }; 'deleteTag': { name: 'deleteTag'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteTaxCategories': { name: 'deleteTaxCategories'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; }; }; } }; 'deleteTaxCategory': { name: 'deleteTaxCategory'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteTaxRate': { name: 'deleteTaxRate'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteTaxRates': { name: 'deleteTaxRates'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; }; }; } }; 'deleteZone': { name: 'deleteZone'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteZones': { name: 'deleteZones'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; }; }; } }; 'duplicateEntity': { name: 'duplicateEntity'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'DuplicateEntityResult'; ofType: null; }; } }; 'flushBufferedJobs': { name: 'flushBufferedJobs'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Success'; ofType: null; }; } }; 'importProducts': { name: 'importProducts'; type: { kind: 'OBJECT'; name: 'ImportInfo'; ofType: null; } }; 'login': { name: 'login'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'NativeAuthenticationResult'; ofType: null; }; } }; 'logout': { name: 'logout'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Success'; ofType: null; }; } }; 'modifyOrder': { name: 'modifyOrder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'ModifyOrderResult'; ofType: null; }; } }; 'moveCollection': { name: 'moveCollection'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Collection'; ofType: null; }; } }; 'refundOrder': { name: 'refundOrder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'RefundOrderResult'; ofType: null; }; } }; 'reindex': { name: 'reindex'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Job'; ofType: null; }; } }; 'removeCollectionsFromChannel': { name: 'removeCollectionsFromChannel'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Collection'; ofType: null; }; }; }; } }; 'removeCouponCodeFromDraftOrder': { name: 'removeCouponCodeFromDraftOrder'; type: { kind: 'OBJECT'; name: 'Order'; ofType: null; } }; 'removeCustomersFromGroup': { name: 'removeCustomersFromGroup'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'CustomerGroup'; ofType: null; }; } }; 'removeDraftOrderLine': { name: 'removeDraftOrderLine'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'RemoveOrderItemsResult'; ofType: null; }; } }; 'removeFacetsFromChannel': { name: 'removeFacetsFromChannel'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'RemoveFacetFromChannelResult'; ofType: null; }; }; }; } }; 'removeMembersFromZone': { name: 'removeMembersFromZone'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Zone'; ofType: null; }; } }; 'removeOptionGroupFromProduct': { name: 'removeOptionGroupFromProduct'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'RemoveOptionGroupFromProductResult'; ofType: null; }; } }; 'removePaymentMethodsFromChannel': { name: 'removePaymentMethodsFromChannel'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PaymentMethod'; ofType: null; }; }; }; } }; 'removeProductOptionGroupsFromChannel': { name: 'removeProductOptionGroupsFromChannel'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'RemoveProductOptionGroupFromChannelResult'; ofType: null; }; }; }; } }; 'removeProductVariantsFromChannel': { name: 'removeProductVariantsFromChannel'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ProductVariant'; ofType: null; }; }; }; } }; 'removeProductsFromChannel': { name: 'removeProductsFromChannel'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Product'; ofType: null; }; }; }; } }; 'removePromotionsFromChannel': { name: 'removePromotionsFromChannel'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Promotion'; ofType: null; }; }; }; } }; 'removeSettledJobs': { name: 'removeSettledJobs'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'removeShippingMethodsFromChannel': { name: 'removeShippingMethodsFromChannel'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ShippingMethod'; ofType: null; }; }; }; } }; 'removeStockLocationsFromChannel': { name: 'removeStockLocationsFromChannel'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'StockLocation'; ofType: null; }; }; }; } }; 'rotateApiKey': { name: 'rotateApiKey'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'RotateApiKeyResult'; ofType: null; }; } }; 'runPendingSearchIndexUpdates': { name: 'runPendingSearchIndexUpdates'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Success'; ofType: null; }; } }; 'runScheduledTask': { name: 'runScheduledTask'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Success'; ofType: null; }; } }; 'setCustomerForDraftOrder': { name: 'setCustomerForDraftOrder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'SetCustomerForDraftOrderResult'; ofType: null; }; } }; 'setDraftOrderBillingAddress': { name: 'setDraftOrderBillingAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Order'; ofType: null; }; } }; 'setDraftOrderCustomFields': { name: 'setDraftOrderCustomFields'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Order'; ofType: null; }; } }; 'setDraftOrderShippingAddress': { name: 'setDraftOrderShippingAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Order'; ofType: null; }; } }; 'setDraftOrderShippingMethod': { name: 'setDraftOrderShippingMethod'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'SetOrderShippingMethodResult'; ofType: null; }; } }; 'setOrderCustomFields': { name: 'setOrderCustomFields'; type: { kind: 'OBJECT'; name: 'Order'; ofType: null; } }; 'setOrderCustomer': { name: 'setOrderCustomer'; type: { kind: 'OBJECT'; name: 'Order'; ofType: null; } }; 'setSettingsStoreValue': { name: 'setSettingsStoreValue'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'SetSettingsStoreValueResult'; ofType: null; }; } }; 'setSettingsStoreValues': { name: 'setSettingsStoreValues'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'SetSettingsStoreValueResult'; ofType: null; }; }; }; } }; 'settlePayment': { name: 'settlePayment'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'SettlePaymentResult'; ofType: null; }; } }; 'settleRefund': { name: 'settleRefund'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'SettleRefundResult'; ofType: null; }; } }; 'transitionFulfillmentToState': { name: 'transitionFulfillmentToState'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'TransitionFulfillmentToStateResult'; ofType: null; }; } }; 'transitionOrderToState': { name: 'transitionOrderToState'; type: { kind: 'UNION'; name: 'TransitionOrderToStateResult'; ofType: null; } }; 'transitionPaymentToState': { name: 'transitionPaymentToState'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'TransitionPaymentToStateResult'; ofType: null; }; } }; 'unsetDraftOrderBillingAddress': { name: 'unsetDraftOrderBillingAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Order'; ofType: null; }; } }; 'unsetDraftOrderShippingAddress': { name: 'unsetDraftOrderShippingAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Order'; ofType: null; }; } }; 'updateActiveAdministrator': { name: 'updateActiveAdministrator'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Administrator'; ofType: null; }; } }; 'updateAdministrator': { name: 'updateAdministrator'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Administrator'; ofType: null; }; } }; 'updateApiKey': { name: 'updateApiKey'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ApiKey'; ofType: null; }; } }; 'updateAsset': { name: 'updateAsset'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Asset'; ofType: null; }; } }; 'updateChannel': { name: 'updateChannel'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'UpdateChannelResult'; ofType: null; }; } }; 'updateCollection': { name: 'updateCollection'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Collection'; ofType: null; }; } }; 'updateCountry': { name: 'updateCountry'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Country'; ofType: null; }; } }; 'updateCustomer': { name: 'updateCustomer'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'UpdateCustomerResult'; ofType: null; }; } }; 'updateCustomerAddress': { name: 'updateCustomerAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Address'; ofType: null; }; } }; 'updateCustomerGroup': { name: 'updateCustomerGroup'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'CustomerGroup'; ofType: null; }; } }; 'updateCustomerNote': { name: 'updateCustomerNote'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'HistoryEntry'; ofType: null; }; } }; 'updateFacet': { name: 'updateFacet'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Facet'; ofType: null; }; } }; 'updateFacetValue': { name: 'updateFacetValue'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'FacetValue'; ofType: null; }; } }; 'updateFacetValues': { name: 'updateFacetValues'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'FacetValue'; ofType: null; }; }; }; } }; 'updateGlobalSettings': { name: 'updateGlobalSettings'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'UpdateGlobalSettingsResult'; ofType: null; }; } }; 'updateOrderNote': { name: 'updateOrderNote'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'HistoryEntry'; ofType: null; }; } }; 'updatePaymentMethod': { name: 'updatePaymentMethod'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PaymentMethod'; ofType: null; }; } }; 'updateProduct': { name: 'updateProduct'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Product'; ofType: null; }; } }; 'updateProductOption': { name: 'updateProductOption'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ProductOption'; ofType: null; }; } }; 'updateProductOptionGroup': { name: 'updateProductOptionGroup'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ProductOptionGroup'; ofType: null; }; } }; 'updateProductVariant': { name: 'updateProductVariant'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ProductVariant'; ofType: null; }; } }; 'updateProductVariants': { name: 'updateProductVariants'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'OBJECT'; name: 'ProductVariant'; ofType: null; }; }; } }; 'updateProducts': { name: 'updateProducts'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Product'; ofType: null; }; }; }; } }; 'updatePromotion': { name: 'updatePromotion'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'UpdatePromotionResult'; ofType: null; }; } }; 'updateProvince': { name: 'updateProvince'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Province'; ofType: null; }; } }; 'updateRole': { name: 'updateRole'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Role'; ofType: null; }; } }; 'updateScheduledTask': { name: 'updateScheduledTask'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ScheduledTask'; ofType: null; }; } }; 'updateSeller': { name: 'updateSeller'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Seller'; ofType: null; }; } }; 'updateShippingMethod': { name: 'updateShippingMethod'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ShippingMethod'; ofType: null; }; } }; 'updateStockLocation': { name: 'updateStockLocation'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'StockLocation'; ofType: null; }; } }; 'updateTag': { name: 'updateTag'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Tag'; ofType: null; }; } }; 'updateTaxCategory': { name: 'updateTaxCategory'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'TaxCategory'; ofType: null; }; } }; 'updateTaxRate': { name: 'updateTaxRate'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'TaxRate'; ofType: null; }; } }; 'updateZone': { name: 'updateZone'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Zone'; ofType: null; }; } }; }; }; + 'Mutation': { kind: 'OBJECT'; name: 'Mutation'; fields: { 'addCustomersToGroup': { name: 'addCustomersToGroup'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'CustomerGroup'; ofType: null; }; } }; 'addFulfillmentToOrder': { name: 'addFulfillmentToOrder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'AddFulfillmentToOrderResult'; ofType: null; }; } }; 'addItemToDraftOrder': { name: 'addItemToDraftOrder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'UpdateOrderItemsResult'; ofType: null; }; } }; 'addManualPaymentToOrder': { name: 'addManualPaymentToOrder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'AddManualPaymentToOrderResult'; ofType: null; }; } }; 'addMembersToZone': { name: 'addMembersToZone'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Zone'; ofType: null; }; } }; 'addNoteToCustomer': { name: 'addNoteToCustomer'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Customer'; ofType: null; }; } }; 'addNoteToOrder': { name: 'addNoteToOrder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Order'; ofType: null; }; } }; 'addOptionGroupToProduct': { name: 'addOptionGroupToProduct'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Product'; ofType: null; }; } }; 'adjustDraftOrderLine': { name: 'adjustDraftOrderLine'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'UpdateOrderItemsResult'; ofType: null; }; } }; 'applyCouponCodeToDraftOrder': { name: 'applyCouponCodeToDraftOrder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'ApplyCouponCodeResult'; ofType: null; }; } }; 'assignAssetsToChannel': { name: 'assignAssetsToChannel'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Asset'; ofType: null; }; }; }; } }; 'assignCollectionsToChannel': { name: 'assignCollectionsToChannel'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Collection'; ofType: null; }; }; }; } }; 'assignFacetsToChannel': { name: 'assignFacetsToChannel'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Facet'; ofType: null; }; }; }; } }; 'assignPaymentMethodsToChannel': { name: 'assignPaymentMethodsToChannel'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PaymentMethod'; ofType: null; }; }; }; } }; 'assignProductOptionGroupsToChannel': { name: 'assignProductOptionGroupsToChannel'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ProductOptionGroup'; ofType: null; }; }; }; } }; 'assignProductVariantsToChannel': { name: 'assignProductVariantsToChannel'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ProductVariant'; ofType: null; }; }; }; } }; 'assignProductsToChannel': { name: 'assignProductsToChannel'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Product'; ofType: null; }; }; }; } }; 'assignPromotionsToChannel': { name: 'assignPromotionsToChannel'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Promotion'; ofType: null; }; }; }; } }; 'assignRoleToAdministrator': { name: 'assignRoleToAdministrator'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Administrator'; ofType: null; }; } }; 'assignShippingMethodsToChannel': { name: 'assignShippingMethodsToChannel'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ShippingMethod'; ofType: null; }; }; }; } }; 'assignStockLocationsToChannel': { name: 'assignStockLocationsToChannel'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'StockLocation'; ofType: null; }; }; }; } }; 'authenticate': { name: 'authenticate'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'AuthenticationResult'; ofType: null; }; } }; 'cancelJob': { name: 'cancelJob'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Job'; ofType: null; }; } }; 'cancelOrder': { name: 'cancelOrder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'CancelOrderResult'; ofType: null; }; } }; 'cancelPayment': { name: 'cancelPayment'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'CancelPaymentResult'; ofType: null; }; } }; 'createAdministrator': { name: 'createAdministrator'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Administrator'; ofType: null; }; } }; 'createApiKey': { name: 'createApiKey'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'CreateApiKeyResult'; ofType: null; }; } }; 'createAssets': { name: 'createAssets'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'CreateAssetResult'; ofType: null; }; }; }; } }; 'createChannel': { name: 'createChannel'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'CreateChannelResult'; ofType: null; }; } }; 'createCollection': { name: 'createCollection'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Collection'; ofType: null; }; } }; 'createCountry': { name: 'createCountry'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Country'; ofType: null; }; } }; 'createCustomer': { name: 'createCustomer'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'CreateCustomerResult'; ofType: null; }; } }; 'createCustomerAddress': { name: 'createCustomerAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Address'; ofType: null; }; } }; 'createCustomerGroup': { name: 'createCustomerGroup'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'CustomerGroup'; ofType: null; }; } }; 'createDraftOrder': { name: 'createDraftOrder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Order'; ofType: null; }; } }; 'createFacet': { name: 'createFacet'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Facet'; ofType: null; }; } }; 'createFacetValue': { name: 'createFacetValue'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'FacetValue'; ofType: null; }; } }; 'createFacetValues': { name: 'createFacetValues'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'FacetValue'; ofType: null; }; }; }; } }; 'createPaymentMethod': { name: 'createPaymentMethod'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PaymentMethod'; ofType: null; }; } }; 'createProduct': { name: 'createProduct'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Product'; ofType: null; }; } }; 'createProductOption': { name: 'createProductOption'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ProductOption'; ofType: null; }; } }; 'createProductOptionGroup': { name: 'createProductOptionGroup'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ProductOptionGroup'; ofType: null; }; } }; 'createProductVariants': { name: 'createProductVariants'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'OBJECT'; name: 'ProductVariant'; ofType: null; }; }; } }; 'createPromotion': { name: 'createPromotion'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'CreatePromotionResult'; ofType: null; }; } }; 'createProvince': { name: 'createProvince'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Province'; ofType: null; }; } }; 'createRole': { name: 'createRole'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Role'; ofType: null; }; } }; 'createSeller': { name: 'createSeller'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Seller'; ofType: null; }; } }; 'createShippingMethod': { name: 'createShippingMethod'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ShippingMethod'; ofType: null; }; } }; 'createStockLocation': { name: 'createStockLocation'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'StockLocation'; ofType: null; }; } }; 'createTag': { name: 'createTag'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Tag'; ofType: null; }; } }; 'createTaxCategory': { name: 'createTaxCategory'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'TaxCategory'; ofType: null; }; } }; 'createTaxRate': { name: 'createTaxRate'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'TaxRate'; ofType: null; }; } }; 'createZone': { name: 'createZone'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Zone'; ofType: null; }; } }; 'deleteAdministrator': { name: 'deleteAdministrator'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteAdministrators': { name: 'deleteAdministrators'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; }; }; } }; 'deleteApiKeys': { name: 'deleteApiKeys'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; }; }; } }; 'deleteAsset': { name: 'deleteAsset'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteAssets': { name: 'deleteAssets'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteChannel': { name: 'deleteChannel'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteChannels': { name: 'deleteChannels'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; }; }; } }; 'deleteCollection': { name: 'deleteCollection'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteCollections': { name: 'deleteCollections'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; }; }; } }; 'deleteCountries': { name: 'deleteCountries'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; }; }; } }; 'deleteCountry': { name: 'deleteCountry'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteCustomer': { name: 'deleteCustomer'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteCustomerAddress': { name: 'deleteCustomerAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Success'; ofType: null; }; } }; 'deleteCustomerGroup': { name: 'deleteCustomerGroup'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteCustomerGroups': { name: 'deleteCustomerGroups'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; }; }; } }; 'deleteCustomerNote': { name: 'deleteCustomerNote'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteCustomers': { name: 'deleteCustomers'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; }; }; } }; 'deleteDraftOrder': { name: 'deleteDraftOrder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteFacet': { name: 'deleteFacet'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteFacetValues': { name: 'deleteFacetValues'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; }; }; } }; 'deleteFacets': { name: 'deleteFacets'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; }; }; } }; 'deleteOrderNote': { name: 'deleteOrderNote'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deletePaymentMethod': { name: 'deletePaymentMethod'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deletePaymentMethods': { name: 'deletePaymentMethods'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; }; }; } }; 'deleteProduct': { name: 'deleteProduct'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteProductOption': { name: 'deleteProductOption'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteProductOptionGroup': { name: 'deleteProductOptionGroup'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteProductOptionGroups': { name: 'deleteProductOptionGroups'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; }; }; } }; 'deleteProductVariant': { name: 'deleteProductVariant'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteProductVariants': { name: 'deleteProductVariants'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; }; }; } }; 'deleteProducts': { name: 'deleteProducts'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; }; }; } }; 'deletePromotion': { name: 'deletePromotion'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deletePromotions': { name: 'deletePromotions'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; }; }; } }; 'deleteProvince': { name: 'deleteProvince'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteRole': { name: 'deleteRole'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteRoles': { name: 'deleteRoles'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; }; }; } }; 'deleteSeller': { name: 'deleteSeller'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteSellers': { name: 'deleteSellers'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; }; }; } }; 'deleteShippingMethod': { name: 'deleteShippingMethod'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteShippingMethods': { name: 'deleteShippingMethods'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; }; }; } }; 'deleteStockLocation': { name: 'deleteStockLocation'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteStockLocations': { name: 'deleteStockLocations'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; }; }; } }; 'deleteTag': { name: 'deleteTag'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteTaxCategories': { name: 'deleteTaxCategories'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; }; }; } }; 'deleteTaxCategory': { name: 'deleteTaxCategory'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteTaxRate': { name: 'deleteTaxRate'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteTaxRates': { name: 'deleteTaxRates'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; }; }; } }; 'deleteZone': { name: 'deleteZone'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; } }; 'deleteZones': { name: 'deleteZones'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DeletionResponse'; ofType: null; }; }; }; } }; 'duplicateEntity': { name: 'duplicateEntity'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'DuplicateEntityResult'; ofType: null; }; } }; 'flushBufferedJobs': { name: 'flushBufferedJobs'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Success'; ofType: null; }; } }; 'importProducts': { name: 'importProducts'; type: { kind: 'OBJECT'; name: 'ImportInfo'; ofType: null; } }; 'login': { name: 'login'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'NativeAuthenticationResult'; ofType: null; }; } }; 'logout': { name: 'logout'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Success'; ofType: null; }; } }; 'modifyOrder': { name: 'modifyOrder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'ModifyOrderResult'; ofType: null; }; } }; 'moveCollection': { name: 'moveCollection'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Collection'; ofType: null; }; } }; 'refundOrder': { name: 'refundOrder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'RefundOrderResult'; ofType: null; }; } }; 'reindex': { name: 'reindex'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Job'; ofType: null; }; } }; 'removeCollectionsFromChannel': { name: 'removeCollectionsFromChannel'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Collection'; ofType: null; }; }; }; } }; 'removeCouponCodeFromDraftOrder': { name: 'removeCouponCodeFromDraftOrder'; type: { kind: 'OBJECT'; name: 'Order'; ofType: null; } }; 'removeCustomersFromGroup': { name: 'removeCustomersFromGroup'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'CustomerGroup'; ofType: null; }; } }; 'removeDraftOrderLine': { name: 'removeDraftOrderLine'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'RemoveOrderItemsResult'; ofType: null; }; } }; 'removeFacetsFromChannel': { name: 'removeFacetsFromChannel'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'RemoveFacetFromChannelResult'; ofType: null; }; }; }; } }; 'removeMembersFromZone': { name: 'removeMembersFromZone'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Zone'; ofType: null; }; } }; 'removeOptionGroupFromProduct': { name: 'removeOptionGroupFromProduct'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'RemoveOptionGroupFromProductResult'; ofType: null; }; } }; 'removePaymentMethodsFromChannel': { name: 'removePaymentMethodsFromChannel'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PaymentMethod'; ofType: null; }; }; }; } }; 'removeProductOptionGroupsFromChannel': { name: 'removeProductOptionGroupsFromChannel'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'RemoveProductOptionGroupFromChannelResult'; ofType: null; }; }; }; } }; 'removeProductVariantsFromChannel': { name: 'removeProductVariantsFromChannel'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ProductVariant'; ofType: null; }; }; }; } }; 'removeProductsFromChannel': { name: 'removeProductsFromChannel'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Product'; ofType: null; }; }; }; } }; 'removePromotionsFromChannel': { name: 'removePromotionsFromChannel'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Promotion'; ofType: null; }; }; }; } }; 'removeSettledJobs': { name: 'removeSettledJobs'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'removeShippingMethodsFromChannel': { name: 'removeShippingMethodsFromChannel'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ShippingMethod'; ofType: null; }; }; }; } }; 'removeStockLocationsFromChannel': { name: 'removeStockLocationsFromChannel'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'StockLocation'; ofType: null; }; }; }; } }; 'rotateApiKey': { name: 'rotateApiKey'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'RotateApiKeyResult'; ofType: null; }; } }; 'runPendingSearchIndexUpdates': { name: 'runPendingSearchIndexUpdates'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Success'; ofType: null; }; } }; 'runScheduledTask': { name: 'runScheduledTask'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Success'; ofType: null; }; } }; 'setCustomerForDraftOrder': { name: 'setCustomerForDraftOrder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'SetCustomerForDraftOrderResult'; ofType: null; }; } }; 'setDraftOrderBillingAddress': { name: 'setDraftOrderBillingAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Order'; ofType: null; }; } }; 'setDraftOrderCustomFields': { name: 'setDraftOrderCustomFields'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Order'; ofType: null; }; } }; 'setDraftOrderShippingAddress': { name: 'setDraftOrderShippingAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Order'; ofType: null; }; } }; 'setDraftOrderShippingMethod': { name: 'setDraftOrderShippingMethod'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'SetOrderShippingMethodResult'; ofType: null; }; } }; 'setOrderCustomFields': { name: 'setOrderCustomFields'; type: { kind: 'OBJECT'; name: 'Order'; ofType: null; } }; 'setOrderCustomer': { name: 'setOrderCustomer'; type: { kind: 'OBJECT'; name: 'Order'; ofType: null; } }; 'setSettingsStoreValue': { name: 'setSettingsStoreValue'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'SetSettingsStoreValueResult'; ofType: null; }; } }; 'setSettingsStoreValues': { name: 'setSettingsStoreValues'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'SetSettingsStoreValueResult'; ofType: null; }; }; }; } }; 'settlePayment': { name: 'settlePayment'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'SettlePaymentResult'; ofType: null; }; } }; 'settleRefund': { name: 'settleRefund'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'SettleRefundResult'; ofType: null; }; } }; 'transitionFulfillmentToState': { name: 'transitionFulfillmentToState'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'TransitionFulfillmentToStateResult'; ofType: null; }; } }; 'transitionOrderToState': { name: 'transitionOrderToState'; type: { kind: 'UNION'; name: 'TransitionOrderToStateResult'; ofType: null; } }; 'transitionPaymentToState': { name: 'transitionPaymentToState'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'TransitionPaymentToStateResult'; ofType: null; }; } }; 'unsetDraftOrderBillingAddress': { name: 'unsetDraftOrderBillingAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Order'; ofType: null; }; } }; 'unsetDraftOrderShippingAddress': { name: 'unsetDraftOrderShippingAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Order'; ofType: null; }; } }; 'updateActiveAdministrator': { name: 'updateActiveAdministrator'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Administrator'; ofType: null; }; } }; 'updateAdministrator': { name: 'updateAdministrator'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Administrator'; ofType: null; }; } }; 'updateApiKey': { name: 'updateApiKey'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ApiKey'; ofType: null; }; } }; 'updateAsset': { name: 'updateAsset'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Asset'; ofType: null; }; } }; 'updateChannel': { name: 'updateChannel'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'UpdateChannelResult'; ofType: null; }; } }; 'updateCollection': { name: 'updateCollection'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Collection'; ofType: null; }; } }; 'updateCountry': { name: 'updateCountry'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Country'; ofType: null; }; } }; 'updateCustomer': { name: 'updateCustomer'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'UpdateCustomerResult'; ofType: null; }; } }; 'updateCustomerAddress': { name: 'updateCustomerAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Address'; ofType: null; }; } }; 'updateCustomerGroup': { name: 'updateCustomerGroup'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'CustomerGroup'; ofType: null; }; } }; 'updateCustomerNote': { name: 'updateCustomerNote'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'HistoryEntry'; ofType: null; }; } }; 'updateFacet': { name: 'updateFacet'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Facet'; ofType: null; }; } }; 'updateFacetValue': { name: 'updateFacetValue'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'FacetValue'; ofType: null; }; } }; 'updateFacetValues': { name: 'updateFacetValues'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'FacetValue'; ofType: null; }; }; }; } }; 'updateGlobalSettings': { name: 'updateGlobalSettings'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'UpdateGlobalSettingsResult'; ofType: null; }; } }; 'updateOrderNote': { name: 'updateOrderNote'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'HistoryEntry'; ofType: null; }; } }; 'updatePaymentMethod': { name: 'updatePaymentMethod'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PaymentMethod'; ofType: null; }; } }; 'updateProduct': { name: 'updateProduct'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Product'; ofType: null; }; } }; 'updateProductOption': { name: 'updateProductOption'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ProductOption'; ofType: null; }; } }; 'updateProductOptionGroup': { name: 'updateProductOptionGroup'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ProductOptionGroup'; ofType: null; }; } }; 'updateProductVariant': { name: 'updateProductVariant'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ProductVariant'; ofType: null; }; } }; 'updateProductVariants': { name: 'updateProductVariants'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'OBJECT'; name: 'ProductVariant'; ofType: null; }; }; } }; 'updateProducts': { name: 'updateProducts'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Product'; ofType: null; }; }; }; } }; 'updatePromotion': { name: 'updatePromotion'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'UpdatePromotionResult'; ofType: null; }; } }; 'updateProvince': { name: 'updateProvince'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Province'; ofType: null; }; } }; 'updateRole': { name: 'updateRole'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Role'; ofType: null; }; } }; 'updateScheduledTask': { name: 'updateScheduledTask'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ScheduledTask'; ofType: null; }; } }; 'updateSeller': { name: 'updateSeller'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Seller'; ofType: null; }; } }; 'updateShippingMethod': { name: 'updateShippingMethod'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ShippingMethod'; ofType: null; }; } }; 'updateStockLocation': { name: 'updateStockLocation'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'StockLocation'; ofType: null; }; } }; 'updateTag': { name: 'updateTag'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Tag'; ofType: null; }; } }; 'updateTaxCategory': { name: 'updateTaxCategory'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'TaxCategory'; ofType: null; }; } }; 'updateTaxRate': { name: 'updateTaxRate'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'TaxRate'; ofType: null; }; } }; 'updateZone': { name: 'updateZone'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Zone'; ofType: null; }; } }; 'verifyCustomerAccount': { name: 'verifyCustomerAccount'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Customer'; ofType: null; }; } }; }; }; 'NativeAuthInput': { kind: 'INPUT_OBJECT'; name: 'NativeAuthInput'; isOneOf: false; inputFields: [{ name: 'username'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'password'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }]; }; 'NativeAuthStrategyError': { kind: 'OBJECT'; name: 'NativeAuthStrategyError'; fields: { 'errorCode': { name: 'errorCode'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'ENUM'; name: 'ErrorCode'; ofType: null; }; } }; 'message': { name: 'message'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; }; }; 'NativeAuthenticationResult': { kind: 'UNION'; name: 'NativeAuthenticationResult'; fields: {}; possibleTypes: 'CurrentUser' | 'InvalidCredentialsError' | 'NativeAuthStrategyError'; }; @@ -517,17 +517,17 @@ export type introspection_types = { * instead save to a .ts instead of a .d.ts file. */ export type introspection = { - name: never; - query: 'Query'; - mutation: 'Mutation'; - subscription: never; - types: introspection_types; + name: never; + query: 'Query'; + mutation: 'Mutation'; + subscription: never; + types: introspection_types; }; -import 'gql.tada'; +import * as gqlTada from 'gql.tada'; declare module 'gql.tada' { - interface setupSchema { - introspection: introspection; - } -} + interface setupSchema { + introspection: introspection + } +} \ No newline at end of file diff --git a/packages/core/e2e/graphql/shared-definitions.ts b/packages/core/e2e/graphql/shared-definitions.ts index fbe4f4553b..bfb1bab496 100644 --- a/packages/core/e2e/graphql/shared-definitions.ts +++ b/packages/core/e2e/graphql/shared-definitions.ts @@ -1082,6 +1082,17 @@ export const deleteCustomerNoteDocument = graphql(` } `); +export const verifyCustomerAccountDocument = graphql( + ` + mutation VerifyCustomerAccount($id: ID!) { + verifyCustomerAccount(id: $id) { + ...Customer + } + } + `, + [customerFragment], +); + export const updateCustomerGroupDocument = graphql( ` mutation UpdateCustomerGroup($input: UpdateCustomerGroupInput!) { diff --git a/packages/core/src/api/resolvers/admin/customer.resolver.ts b/packages/core/src/api/resolvers/admin/customer.resolver.ts index 66b2f28d00..4bcd71b979 100644 --- a/packages/core/src/api/resolvers/admin/customer.resolver.ts +++ b/packages/core/src/api/resolvers/admin/customer.resolver.ts @@ -12,6 +12,7 @@ import { MutationUpdateCustomerAddressArgs, MutationUpdateCustomerArgs, MutationUpdateCustomerNoteArgs, + MutationVerifyCustomerAccountArgs, Permission, QueryCustomerArgs, QueryCustomersArgs, @@ -143,6 +144,16 @@ export class CustomerResolver { return Promise.all(args.ids.map(id => this.deleteCustomer(ctx, { id }))); } + @Transaction() + @Mutation() + @Allow(Permission.UpdateCustomer) + async verifyCustomerAccount( + @Ctx() ctx: RequestContext, + @Args() args: MutationVerifyCustomerAccountArgs, + ): Promise { + return this.customerService.verifyCustomerAccount(ctx, args.id); + } + @Transaction() @Mutation() @Allow(Permission.UpdateCustomer) diff --git a/packages/core/src/api/schema/admin-api/customer.api.graphql b/packages/core/src/api/schema/admin-api/customer.api.graphql index be869e57d2..d5de67216d 100644 --- a/packages/core/src/api/schema/admin-api/customer.api.graphql +++ b/packages/core/src/api/schema/admin-api/customer.api.graphql @@ -28,6 +28,9 @@ type Mutation { addNoteToCustomer(input: AddNoteToCustomerInput!): Customer! updateCustomerNote(input: UpdateCustomerNoteInput!): HistoryEntry! deleteCustomerNote(id: ID!): DeletionResponse! + + "Manually verify a customer account, bypassing the email verification token flow." + verifyCustomerAccount(id: ID!): Customer! } input UpdateCustomerInput { diff --git a/packages/core/src/service/services/customer.service.ts b/packages/core/src/service/services/customer.service.ts index 462f03500c..e2351725b4 100644 --- a/packages/core/src/service/services/customer.service.ts +++ b/packages/core/src/service/services/customer.service.ts @@ -511,6 +511,46 @@ export class CustomerService { return user; } + /** + * @description + * Manually marks a Customer's email address as verified, bypassing the email + * verification token flow. Intended for use by administrators when the customer + * has not received or is unable to complete the verification email. + * + * If the Customer is already verified, this method is a no-op and returns the + * Customer unchanged. + */ + async verifyCustomerAccount(ctx: RequestContext, customerId: ID): Promise { + const customer = await this.connection.getEntityOrThrow(ctx, Customer, customerId, { + channelId: ctx.channelId, + relations: ['user', 'user.authenticationMethods'], + }); + if (!customer.user) { + throw new InternalServerError('error.cannot-locate-customer-for-user'); + } + if (!customer.user.verified) { + const nativeAuthMethod = customer.user.getNativeAuthenticationMethod(false); + if (nativeAuthMethod) { + nativeAuthMethod.verificationToken = null; + await this.connection + .getRepository(ctx, NativeAuthenticationMethod) + .save(nativeAuthMethod); + } + customer.user.verified = true; + await this.connection.getRepository(ctx, User).save(customer.user, { reload: false }); + await this.historyService.createHistoryEntryForCustomer({ + customerId: customer.id, + ctx, + type: HistoryEntryType.CUSTOMER_VERIFIED, + data: { + strategy: NATIVE_AUTH_STRATEGY_NAME, + }, + }); + await this.eventBus.publish(new AccountVerifiedEvent(ctx, customer)); + } + return assertFound(this.findOne(ctx, customer.id)); + } + /** * @description * Publishes a new {@link PasswordResetEvent} for the given email address. This event creates diff --git a/packages/dashboard/src/app/routes/_authenticated/_customers/customers.graphql.ts b/packages/dashboard/src/app/routes/_authenticated/_customers/customers.graphql.ts index f5e5b623e5..ea946f1a2a 100644 --- a/packages/dashboard/src/app/routes/_authenticated/_customers/customers.graphql.ts +++ b/packages/dashboard/src/app/routes/_authenticated/_customers/customers.graphql.ts @@ -142,6 +142,18 @@ export const deleteCustomerDocument = graphql(` } `); +export const verifyCustomerAccountDocument = graphql(` + mutation VerifyCustomerAccount($id: ID!) { + verifyCustomerAccount(id: $id) { + id + user { + id + verified + } + } + } +`); + export const createCustomerAddressDocument = graphql(` mutation CreateCustomerAddress($customerId: ID!, $input: CreateAddressInput!) { createCustomerAddress(customerId: $customerId, input: $input) { diff --git a/packages/dashboard/src/app/routes/_authenticated/_customers/customers_.$id.tsx b/packages/dashboard/src/app/routes/_authenticated/_customers/customers_.$id.tsx index cef9c14680..fd420360fa 100644 --- a/packages/dashboard/src/app/routes/_authenticated/_customers/customers_.$id.tsx +++ b/packages/dashboard/src/app/routes/_authenticated/_customers/customers_.$id.tsx @@ -45,6 +45,7 @@ import { customerDetailDocument, removeCustomerFromGroupDocument, updateCustomerDocument, + verifyCustomerAccountDocument, } from './customers.graphql.js'; const pageId = 'customer-detail'; @@ -145,12 +146,35 @@ function CustomerDetailPage() { }, }); + const { mutate: verifyCustomer, isPending: isVerifyPending } = useMutation({ + mutationFn: api.mutate(verifyCustomerAccountDocument), + onSuccess: () => { + toast.success(t`Customer account verified`); + refreshEntity(); + }, + onError: () => { + toast.error(t`Failed to verify customer account`); + }, + }); + const customerName = entity ? `${entity.firstName} ${entity.lastName}` : ''; return ( {creatingNewEntity ? New customer : customerName} + {entity?.user && !entity.user.verified && ( + + + + )}