Skip to main content

cancelInvitationForFarm

@nmi-agro/fdm-source


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

Function: cancelInvitationForFarm()

cancelInvitationForFarm(fdm, principal_id, invitation_id): Promise<void>

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

Cancels a pending invitation for a farm.

This function checks if the acting principal has 'share' permission on the farm, then sets the invitation status to "declined", effectively cancelling it.

Parameters

fdm

any

The FDM instance.

principal_id

any

The identifier of the principal cancelling the invitation (must have 'share' permission).

invitation_id

string

The identifier of the invitation to cancel.

Returns

Promise<void>