@edgible-team/sdk
    Preparing search index...

    Class InvitesClient

    Organization invite lifecycle: create, list, accept, decline, cancel.

    Index

    Constructors

    • Parameters

      • call: Caller

        authed Caller for the user-scoped invite endpoints.

      • callPublic: Caller = call

        auth-less Caller for the public, pre-auth signup-flow endpoint (checkPending). Defaults to call so existing tests construct with a single caller.

      Returns InvitesClient

    Methods

    • Accept an invite; returns the organization the caller just joined.

      Parameters

      Returns Promise<OrganizationData>

    • Cancel (revoke) a pending invite.

      Parameters

      Returns Promise<void>

      NotFoundError if the invite does not exist.

    • Check a user's pending invites by email — the PUBLIC, pre-auth signup-flow endpoint (GET /organization-invites/check/{email}). Unlike listForUser (post-auth, user-scoped), this runs on the auth-less pipeline so it can be called before the invitee has signed in. Returns PENDING, non-expired, organization-name-enriched invites (the backend's redundant total is dropped — use .length).

      Parameters

      Returns Promise<InviteResponse[]>

    • Invite a user to an organization.

      Parameters

      Returns Promise<InviteResponse>

      ValidationError if the request body is rejected.

    • Decline an invite addressed to the caller.

      Parameters

      Returns Promise<void>

      NotFoundError if the invite does not exist.

    • List an organization's invites, optionally filtered by ?status=.

      Parameters

      Returns Promise<InviteResponse[]>

    • List a user's invites, optionally filtered by ?status=.

      Parameters

      Returns Promise<InviteResponse[]>