import { NonNullablePaths } from '@wix/sdk-types'; interface SiteInvite { /** * Invite ID. * @format GUID * @readonly */ _id?: string; /** * Site ID the user is invited to as a collaborator. * @format GUID * @readonly */ siteId?: string; /** * Email address where the invite was sent. * @format EMAIL */ 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?: InviteStatusWithLiterals; /** Link to accept the invite. */ acceptLink?: string; /** * Inviting account ID. * @format GUID * @readonly */ inviterAccountId?: string; /** * Account ID that accepted the invite. Populated only once the invite is accepted. * @format GUID * @readonly */ acceptedByAccountId?: string | null; /** Date the invite was created. */ dateCreated?: Date | null; /** * User's Wix Bookings staff ID, if relevant. * @format GUID */ staffId?: string | null; /** Invite expiration date */ expirationDate?: Date | null; /** * Location ids included in the invite * @format GUID * @readonly * @maxSize 20 */ locationIds?: string[]; /** * A set of capability keys representing the actions that the caller is allowed * to perform on this specific contributor. This field is calculated based on the * identity of the request sender and may differ between callers. * @maxSize 20 * @maxLength 20 */ callerCapabilities?: string[]; } /** 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" } /** @enumType */ type InviteStatusWithLiterals = InviteStatus | 'Pending' | 'Used' | 'Deleted' | 'Declined' | '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 offset 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 [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters). */ filter?: Record | null; /** * Sort object. * * Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting). */ 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 offset 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. * @maxLength 512 */ fieldName?: string; /** Sort order. */ order?: SortOrderWithLiterals; } declare enum SortOrder { ASC = "ASC", DESC = "DESC" } /** @enumType */ type SortOrderWithLiterals = SortOrder | 'ASC' | '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. * @max 100 */ 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. * @maxLength 16000 */ 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 * @format 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; /** Location restriction for the invite. */ locationRestriction?: LocationRestriction; } interface LocationRestriction { /** * @format GUID * @maxSize 20 */ locationIds?: string[]; } 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. * @minSize 1 * @maxSize 10 */ 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; /** Location restriction for the invite. */ locationRestriction?: LocationRestriction; } 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[]; /** @format GUID */ staffId?: string | null; locationRestriction?: LocationRestriction; } 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?: InviteStatusWithLiterals; } /** * 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 * @requiredField options.emails * @requiredField policyIds * @param options - Filter options. The `emails` field **must** be passed. * @permissionId site-users.send-invite * @applicableIdentity APP * @fqn com.wixpress.invites.api.SiteInvitesApi.BulkInvite */ declare function bulkInvite(policyIds: string[], options?: NonNullablePaths): Promise>; interface BulkInviteOptions { /** * Email addresses to which the invites should be sent. * @minSize 1 * @maxSize 10 */ 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; /** Location restriction for the invite. */ locationRestriction?: LocationRestriction; } /** * 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 * @requiredField inviteId * @param options - Filter options. * @permissionId site-users.send-invite * @applicableIdentity APP * @fqn com.wixpress.invites.api.SiteInvitesApi.ResendInvite */ 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 * @requiredField inviteId * @permissionId site-users.delete-invite * @applicableIdentity APP * @fqn com.wixpress.invites.api.SiteInvitesApi.RevokeInvite */ declare function revokeInvite(inviteId: string): Promise; export { type AcceptSiteInviteRequest, type AcceptSiteInviteResponse, type BulkInviteOptions, type BulkSiteInviteRequest, type BulkSiteInviteResponse, type ContributorLimitation, type CursorPaging, type GetContributorLimitRequest, type GetContributorLimitResponse, type GetSiteInviteRequest, type GetSiteInviteResponse, type GetSiteInvitesRequest, type GetSiteInvitesResponse, InviteStatus, type InviteStatusWithLiterals, type LocationRestriction, 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, SortOrder, type SortOrderWithLiterals, type Sorting, type UpdateSiteInviteRequest, type UpdateSiteInviteResponse, bulkInvite, resendInvite, revokeInvite };