Validates the invite token, upserts the member by the invited email, links them to the seller with the invited role (as owner if the seller has none yet), binds the auth identity when the member is new, and deletes the consumed invite. Triggered by POST /vendor/members/invites/accept. Emits member_invite.accepted.
Usage
import { acceptMemberInviteWorkflow } from "@mercurjs/core/workflows"
const { result } = await acceptMemberInviteWorkflow(container).run({
input: {
invite_token: "eyJhbGciOi...",
auth_identity_id: "authid_123",
first_name: "Jane",
last_name: "Doe",
},
})
Signed invite token from the invitation link.
Auth identity of the accepting user.
Existing member id; when set, no auth metadata is written.
First name for a newly created member.
Last name for a newly created member.
Result
The member linked to the seller.