interface SiteInvite { /** * Invite ID. * @readonly */ _id?: string; /** * Site ID the user is invited to as a collaborator. * @readonly */ siteId?: string; /** Email address where the invite was sent. */ email?: string; /** Role IDs included in the invite. */ policyIds?: string[]; /** * Deprecated. Use `inviterAccountId`. * @readonly * @deprecated */ inviterId?: string; /** * Invite Status. * * Supported values: * - **Pending:** The invite has been sent and is valid, waiting for the user's response. * - **Used:** The invite has been accepted. * - **Deleted:** The invite has been deleted or revoked. * - **Declined:** The user declined the invite. * - **Expired:** The invite has expired without being accepted. */ status?: InviteStatus; /** Link to accept the invite. */ acceptLink?: string; /** * Inviting account ID. * @readonly */ inviterAccountId?: string; /** * Account ID that accepted the invite. Populated only once the invite is accepted. * @readonly */ acceptedByAccountId?: string | null; /** Date the invite was created. */ dateCreated?: Date | null; /** User's Wix Bookings staff ID, if relevant. */ staffId?: string | null; /** Invite expiration date */ expirationDate?: Date | null; } /** Invite status stating whether the invite was accepted, waiting to be accepted, deleted etc.. */ declare enum InviteStatus { Pending = "Pending", Used = "Used", Deleted = "Deleted", Declined = "Declined", Expired = "Expired" } interface GetSiteInvitesRequest { } interface GetSiteInvitesResponse { invites?: SiteInvite[]; } interface QuerySiteInvitesRequest { /** * Supports only `filter` field with * `"filter" : { * "acceptedByAccountId":{"$in": [, , ...]} * }` */ query?: QueryV2; } interface QueryV2 extends QueryV2PagingMethodOneOf { /** Paging options to limit and skip the number of items. */ paging?: Paging; /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: CursorPaging; /** * Filter object. * * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section). */ filter?: Record | null; /** * Sort object. * * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section). */ sort?: Sorting[]; /** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */ fields?: string[]; /** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */ fieldsets?: string[]; } /** @oneof */ interface QueryV2PagingMethodOneOf { /** Paging options to limit and skip the number of items. */ paging?: Paging; /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: CursorPaging; } interface Sorting { /** Name of the field to sort by. */ fieldName?: string; /** Sort order. */ order?: SortOrder; } declare enum SortOrder { ASC = "ASC", DESC = "DESC" } interface Paging { /** Number of items to load. */ limit?: number | null; /** Number of items to skip in the current sort order. */ offset?: number | null; } interface CursorPaging { /** Maximum number of items to return in the results. */ limit?: number | null; /** * Pointer to the next or previous page in the list of results. * * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. */ cursor?: string | null; } interface QuerySiteInvitesResponse { invites?: SiteInvite[]; } interface GetSiteInviteRequest { _id?: string; } interface GetSiteInviteResponse { invite?: SiteInvite; } interface SiteInviteRequest { /** The role ids to be assigned */ policyIds?: string[]; /** Invitee email */ email?: string; /** The language of emails that will be used only for recipients that don't have a user, in case this parameter is unspecified, the sender's language will be used instead */ defaultEmailLanguage?: string | null; } interface SiteInviteResponse { /** Invites that were sent. */ invite?: SiteInvite; } interface BulkSiteInviteRequest { /** Role IDs, referred to as policy IDs, to assign to the contributors. */ policyIds: string[]; /** Email addresses to which the invites should be sent. */ emails: string[]; /** Details explaining the purpose of the invite. */ invitePurpose?: string | null; /** Language of emails to send. Relevant only for recipients that don't currently have a Wix user ID. Default: Site owner's language. */ defaultEmailLanguage?: string | null; } interface BulkSiteInviteResponse { /** Invites that were sent successfully. */ invites?: SiteInvite[]; /** Invites that failed. */ failedEmails?: string[]; } interface ResendSiteInviteRequest { /** Invite ID. */ inviteId: string; /** Language of emails to send. Relevant only for recipients that don't currently have a Wix user ID. Default: Site owner's language. */ defaultEmailLanguage?: string | null; } interface AcceptSiteInviteRequest { inviteToken?: string; } interface AcceptSiteInviteResponse { } interface RevokeSiteInviteRequest { /** Invite ID. */ inviteId: string; } interface RevokeSiteInviteResponse { } interface UpdateSiteInviteRequest { inviteId?: string; policyIds?: string[]; staffId?: string | null; } interface UpdateSiteInviteResponse { } interface GetContributorLimitRequest { } interface GetContributorLimitResponse { contributorLimitation?: ContributorLimitation; } interface ContributorLimitation { contributorLimit?: number; leftInvites?: number; } interface ParseSiteInviteTokenRequest { inviteToken?: string; } interface ParseSiteInviteTokenResponse { inviteId?: string; siteId?: string; status?: InviteStatus; } interface SiteInviteNonNullableFields { _id: string; siteId: string; email: string; policyIds: string[]; inviterId: string; status: InviteStatus; acceptLink: string; inviterAccountId: string; } interface BulkSiteInviteResponseNonNullableFields { invites: SiteInviteNonNullableFields[]; failedEmails: string[]; } interface SiteInviteResponseNonNullableFields { invite?: SiteInviteNonNullableFields; } /** * Creates and sends emails inviting potential site contributors to become contributors in the requesting site. * > **Important**: This call requires an account level API key and cannot be authenticated with the standard authorization header. API keys are currently available to selected beta users only. * @param policyIds - Role IDs, referred to as policy IDs, to assign to the contributors. * @public * @documentationMaturity preview * @requiredField options.emails * @requiredField policyIds * @permissionId site-users.send-invite */ declare function bulkInvite(policyIds: string[], options?: BulkInviteOptions): Promise; interface BulkInviteOptions { /** Email addresses to which the invites should be sent. */ emails: string[]; /** Details explaining the purpose of the invite. */ invitePurpose?: string | null; /** Language of emails to send. Relevant only for recipients that don't currently have a Wix user ID. Default: Site owner's language. */ defaultEmailLanguage?: string | null; } /** * Resends the email invitation to a potential site contributor. * > **Important**: This call requires an account level API key and cannot be authenticated with the standard authorization header. API keys are currently available to selected beta users only. * @param inviteId - Invite ID. * @public * @documentationMaturity preview * @requiredField inviteId * @permissionId site-users.send-invite */ declare function resendInvite(inviteId: string, options?: ResendInviteOptions): Promise; interface ResendInviteOptions { /** Language of emails to send. Relevant only for recipients that don't currently have a Wix user ID. Default: Site owner's language. */ defaultEmailLanguage?: string | null; } /** * Revokes a pending site contributor invite. * > **Important**: This call requires an account level API key and cannot be authenticated with the standard authorization header. API keys are currently available to selected beta users only. * @param inviteId - Invite ID. * @public * @documentationMaturity preview * @requiredField inviteId * @permissionId site-users.delete-invite */ declare function revokeInvite(inviteId: string): Promise; export { type AcceptSiteInviteRequest, type AcceptSiteInviteResponse, type BulkInviteOptions, type BulkSiteInviteRequest, type BulkSiteInviteResponse, type BulkSiteInviteResponseNonNullableFields, type ContributorLimitation, type CursorPaging, type GetContributorLimitRequest, type GetContributorLimitResponse, type GetSiteInviteRequest, type GetSiteInviteResponse, type GetSiteInvitesRequest, type GetSiteInvitesResponse, InviteStatus, type Paging, type ParseSiteInviteTokenRequest, type ParseSiteInviteTokenResponse, type QuerySiteInvitesRequest, type QuerySiteInvitesResponse, type QueryV2, type QueryV2PagingMethodOneOf, type ResendInviteOptions, type ResendSiteInviteRequest, type RevokeSiteInviteRequest, type RevokeSiteInviteResponse, type SiteInvite, type SiteInviteRequest, type SiteInviteResponse, type SiteInviteResponseNonNullableFields, SortOrder, type Sorting, type UpdateSiteInviteRequest, type UpdateSiteInviteResponse, bulkInvite, resendInvite, revokeInvite };