UNPKG

@scayle/storefront-core

Version:

Collection of essential utilities to work with the Storefront API

28 lines (27 loc) 930 B
import type { RpcHandler, ShopUser, UpdatePasswordParams } from '../../../types'; /** * Updates the shop user. * * @param payload The payload containing partial user data to update. * @param context The RPC context. * * @returns The updated user. It will return an `ErrorResponse` alternatively * if updating user information fails. */ export declare const updateShopUser: RpcHandler<Partial<ShopUser>, { user: ShopUser; }>; /** * Updates the user's password. * * @param payload The payload with old and new password. * @param payload.oldPassword The current password. * @param payload.newPassword The new password. * @param context The RPC context. * * @returns The user object (or undefined if an error occurs and shopUser is undefined). * It will return an `ErrorResponse` if updating the password fails. */ export declare const updatePassword: RpcHandler<UpdatePasswordParams, { user?: ShopUser; }>;