Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions packages/admin-ui/src/lib/core/src/common/generated-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,16 @@ export enum AdjustmentType {
PROMOTION = 'PROMOTION'
}

/**
* Returned by `verifyCustomerAccountAsAdmin` to expose the randomly generated password to the
* administrator. The cleartext password is included in the response only once and is not persisted
* anywhere else; the administrator is responsible for securely transmitting it to the customer.
*/
export type AdminGeneratedPassword = {
__typename?: 'AdminGeneratedPassword';
password: Scalars['String']['output'];
};

export type Administrator = Node & {
__typename?: 'Administrator';
createdAt: Scalars['DateTime']['output'];
Expand Down Expand Up @@ -1561,6 +1571,18 @@ export type CustomerOrdersArgs = {
options?: InputMaybe<OrderListOptions>;
};

/**
* Returned when an administrator action requires the Customer to be in a specific account state
* (e.g. trying to reset the password of a guest or registered customer, or trying to manually
* verify a customer that is already verified or has no User).
*/
export type CustomerAccountStateError = ErrorResult & {
__typename?: 'CustomerAccountStateError';
accountState: Scalars['String']['output'];
errorCode: ErrorCode;
message: Scalars['String']['output'];
};

export type CustomerFilterParameter = {
_and?: InputMaybe<Array<CustomerFilterParameter>>;
_or?: InputMaybe<Array<CustomerFilterParameter>>;
Expand Down Expand Up @@ -1811,6 +1833,7 @@ export enum ErrorCode {
COUPON_CODE_INVALID_ERROR = 'COUPON_CODE_INVALID_ERROR',
COUPON_CODE_LIMIT_ERROR = 'COUPON_CODE_LIMIT_ERROR',
CREATE_FULFILLMENT_ERROR = 'CREATE_FULFILLMENT_ERROR',
CUSTOMER_ACCOUNT_STATE_ERROR = 'CUSTOMER_ACCOUNT_STATE_ERROR',
DUPLICATE_ENTITY_ERROR = 'DUPLICATE_ENTITY_ERROR',
EMAIL_ADDRESS_CONFLICT_ERROR = 'EMAIL_ADDRESS_CONFLICT_ERROR',
EMPTY_ORDER_LINE_SELECTION_ERROR = 'EMPTY_ORDER_LINE_SELECTION_ERROR',
Expand Down Expand Up @@ -3151,6 +3174,13 @@ export type Mutation = {
removeStockLocationsFromChannel: Array<StockLocation>;
requestCompleted: Scalars['Int']['output'];
requestStarted: Scalars['Int']['output'];
/**
* Triggers the standard password-reset email flow for a verified Customer, on behalf of an
* administrator. Equivalent to the Customer calling `requestPasswordReset` from the Shop API:
* a reset token is issued and a `PasswordResetEvent` is published so the configured email
* handler can send the customer a reset link.
*/
resetCustomerPasswordAsAdmin: ResetCustomerPasswordAsAdminResult;
/**
* Replaces the old with a new API-Key.
* This is a convenience method to invalidate an API-Key without
Expand Down Expand Up @@ -3256,6 +3286,12 @@ export type Mutation = {
updateUserChannels: UserStatus;
/** Update an existing Zone */
updateZone: Zone;
/**
* Completes the email verification step of a registered Customer with a randomly generated
* password. Returns the generated password so the administrator can communicate it to the
* customer. Intended for situations where the customer never confirmed the verification email.
*/
verifyCustomerAccountAsAdmin: VerifyCustomerAccountAsAdminResult;
};


Expand Down Expand Up @@ -3900,6 +3936,11 @@ export type MutationRemoveStockLocationsFromChannelArgs = {
};


export type MutationResetCustomerPasswordAsAdminArgs = {
customerId: Scalars['ID']['input'];
};


export type MutationRotateApiKeyArgs = {
id: Scalars['ID']['input'];
};
Expand Down Expand Up @@ -4213,6 +4254,11 @@ export type MutationUpdateZoneArgs = {
input: UpdateZoneInput;
};


export type MutationVerifyCustomerAccountAsAdminArgs = {
customerId: Scalars['ID']['input'];
};

export type NativeAuthInput = {
password: Scalars['String']['input'];
username: Scalars['String']['input'];
Expand Down Expand Up @@ -6130,6 +6176,8 @@ export type RemoveStockLocationsFromChannelInput = {
stockLocationIds: Array<Scalars['ID']['input']>;
};

export type ResetCustomerPasswordAsAdminResult = CustomerAccountStateError | Success;

export type Return = Node & StockMovement & {
__typename?: 'Return';
createdAt: Scalars['DateTime']['output'];
Expand Down Expand Up @@ -7343,6 +7391,8 @@ export type UserStatusInput = {
username: Scalars['String']['input'];
};

export type VerifyCustomerAccountAsAdminResult = AdminGeneratedPassword | CustomerAccountStateError;

export type Zone = Node & {
__typename?: 'Zone';
createdAt: Scalars['DateTime']['output'];
Expand Down Expand Up @@ -9258,6 +9308,8 @@ type ErrorResult_CouponCodeLimitError_Fragment = { __typename?: 'CouponCodeLimit

type ErrorResult_CreateFulfillmentError_Fragment = { __typename?: 'CreateFulfillmentError', errorCode: ErrorCode, message: string };

type ErrorResult_CustomerAccountStateError_Fragment = { __typename?: 'CustomerAccountStateError', errorCode: ErrorCode, message: string };

type ErrorResult_DuplicateEntityError_Fragment = { __typename?: 'DuplicateEntityError', errorCode: ErrorCode, message: string };

type ErrorResult_EmailAddressConflictError_Fragment = { __typename?: 'EmailAddressConflictError', errorCode: ErrorCode, message: string };
Expand Down Expand Up @@ -9343,6 +9395,7 @@ export type ErrorResultFragment =
| ErrorResult_CouponCodeInvalidError_Fragment
| ErrorResult_CouponCodeLimitError_Fragment
| ErrorResult_CreateFulfillmentError_Fragment
| ErrorResult_CustomerAccountStateError_Fragment
| ErrorResult_DuplicateEntityError_Fragment
| ErrorResult_EmailAddressConflictError_Fragment
| ErrorResult_EmptyOrderLineSelectionError_Fragment
Expand Down
Loading
Loading