Skip to main content

updateRoleOfInvitationForFarm

@nmi-agro/fdm-source


@nmi-agro/fdm-source / fdm-core/src / updateRoleOfInvitationForFarm

Function: updateRoleOfInvitationForFarm()

updateRoleOfInvitationForFarm(fdm, principal_id, invitation_id, role): Promise<void>

Defined in: fdm-core/src/farm.ts:997

Updates the role on a pending invitation for a farm.

This function looks up the invitation by invitation_id, checks if the acting principal has 'share' permission on the farm, then updates the role field.

Parameters

fdm

any

The FDM instance.

principal_id

any

The identifier of the principal updating the role (must have 'share' permission).

invitation_id

string

The identifier of the invitation to update.

role

The new role to assign.

"owner" | "advisor" | "researcher"

Returns

Promise<void>