import { RpcMethod } from './commonTypes'; export type AccountInvitesService_List = RpcMethod; export type AccountInvitesService_Resend = RpcMethod; export type AccountInvitesService_Delete = RpcMethod; export type AccountInvitesService_Create = RpcMethod; export interface AccountInvitesService { /** Lists pending team invitations for the current account, newest first, with paging and optional email substring search. Use to see who has been invited to join the account before resending or deleting an invite. */ List: AccountInvitesService_List; /** Re-sends the invitation email for an existing invite identified by its invite code, refreshing its last-sent date. Rate-limited to once per hour per invite; use when the invitee never received or lost the original signup email. */ Resend: AccountInvitesService_Resend; /** Revokes a pending team invitation for the current account, identified by the invitee email, so its signup link stops working. Use to cancel an outstanding invite; differs from resend_account_invite which re-emails it. */ Delete: AccountInvitesService_Delete; /** Invites a user by email to join the current account under a named account group, creating the invite and emailing them a signup link. Use to add a team member; fails if the email is already a user or already has a pending invite. */ Create: AccountInvitesService_Create; } export type ListRequest_OrderBy = 'INVITE_DATE' | 'EMAIL' | 'STATUS'; export type ListRequest_OrderDirection = 'ASC' | 'DESC'; export type ListRequest = { page?: number; perPage?: number; orderBy?: ListRequest_OrderBy; orderDirection?: ListRequest_OrderDirection; /** Case-insensitive substring match on invitee email (ILIKE %value%); omit to list all invites. */ searchByEmail?: string; }; export type ListResponse_Invite = { code: string; email: string; lastSentDate: Date; status: string; }; export type ListResponse = { invites: ListResponse_Invite[]; page: number; perPage: number; total: number; }; export type ResendRequest = { /** Invite code (token) identifying which invitation to re-send. */ code?: string; }; export type ResendResponse = {}; export type CreateRequest = { /** Name of the account group (permission role) to assign the invited user to. */ group?: string; /** Email address of the person to invite. */ email?: string; }; export type CreateResponse = {}; export type DeleteRequest = { /** Invitee email address identifying which pending invite to revoke. */ email?: string; }; export type DeleteResponse = {};