import { NonNullablePaths } from '@wix/sdk-types'; interface AccountInvite { /** * Invite ID. * @format GUID * @readonly */ _id?: string; /** * Account ID. * @format GUID * @readonly */ accountId?: string; /** * Email address where the invite was sent. * @format EMAIL */ email?: string; /** * Deprecated. Use `policyIds`. * @deprecated */ role?: 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 has 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; /** Role IDs included in the invite. */ policyIds?: string[]; /** Date the invite was last updated. */ dateUpdated?: Date | null; /** Assets the users are invited to join. */ assignments?: InviteResourceAssignment[]; /** 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" } /** @enumType */ type InviteStatusWithLiterals = InviteStatus | 'Pending' | 'Used' | 'Deleted' | 'Declined' | 'Expired'; interface InviteResourceAssignment { /** Role ID. */ policyId?: string; /** Resources the user will be able to access. */ assignments?: InviteAssignment[]; } interface InviteAssignment { /** Full name of resource to be assigned. */ fullNameResource?: FullNameResource; } interface FullNameResource extends FullNameResourceResourceContextOneOf { /** Specific site details. */ siteContext?: SiteResourceContext; /** Specific account details. */ accountContext?: AccountResourceContext; } /** @oneof */ interface FullNameResourceResourceContextOneOf { /** Specific site details. */ siteContext?: SiteResourceContext; /** Specific account details. */ accountContext?: AccountResourceContext; } /** Site resource context. It indicates that the resource is under a site (can be the site itself or some asset of a site, like a blog post) */ interface SiteResourceContext { /** Site ID. */ metasiteId?: string; } /** Account resource contexts. It indicates that the resource is under the account (can be the account itself or some asset of an account, like a logo or a domain) */ interface AccountResourceContext { /** Account ID. */ accountId?: string; } interface OrganizationResourceContext { } /** * A custom resource. Is used to represent some asset that is not a direct resource context (site or account), but something custom. * For example: payment method, blog post, domain, logo. */ interface Resource { /** The resource id. */ _id?: string | null; /** The resource type */ type?: string | null; } interface PolicyCondition { /** The type of the condition */ condition?: ConditionType; } interface ConditionType extends ConditionTypeOfOneOf { /** @deprecated */ simpleCondition?: SimpleCondition; /** A logic combination between several conditions, with an operator between them */ joinedConditions?: JoinedCondition; /** @deprecated */ environmentCondition?: EnvironmentCondition; /** A single condition */ condition?: Condition; } /** @oneof */ interface ConditionTypeOfOneOf { /** @deprecated */ simpleCondition?: SimpleCondition; /** A logic combination between several conditions, with an operator between them */ joinedConditions?: JoinedCondition; /** @deprecated */ environmentCondition?: EnvironmentCondition; /** A single condition */ condition?: Condition; } interface SimpleCondition { attrName?: string; value?: SimpleConditionValue; op?: SimpleConditionOperatorWithLiterals; conditionModelId?: string; } interface SimpleConditionValue extends SimpleConditionValueValueOneOf { attrName?: string; stringValue?: string; boolValue?: boolean; } /** @oneof */ interface SimpleConditionValueValueOneOf { attrName?: string; stringValue?: string; boolValue?: boolean; } declare enum SimpleConditionOperator { UNKNOWN_SIMPLE_OP = "UNKNOWN_SIMPLE_OP", EQUAL = "EQUAL" } /** @enumType */ type SimpleConditionOperatorWithLiterals = SimpleConditionOperator | 'UNKNOWN_SIMPLE_OP' | 'EQUAL'; interface JoinedCondition { /** The operator that should be used when evaluating the condition */ op?: JoinedConditionOperatorWithLiterals; /** The conditions that should be evaluated, and then joined using the operator provided */ conditions?: ConditionType[]; } declare enum JoinedConditionOperator { UNKNOWN_JOIN_OP = "UNKNOWN_JOIN_OP", OR = "OR", AND = "AND" } /** @enumType */ type JoinedConditionOperatorWithLiterals = JoinedConditionOperator | 'UNKNOWN_JOIN_OP' | 'OR' | 'AND'; interface EnvironmentCondition extends EnvironmentConditionConditionOneOf { experimentCondition?: ExperimentCondition; } /** @oneof */ interface EnvironmentConditionConditionOneOf { experimentCondition?: ExperimentCondition; } interface ExperimentCondition { spec?: string; fallbackValue?: string; expectedValue?: string; } interface Condition { /** The unique identifier of the condition model. Indicates which actions the condition is working on */ conditionModelId?: string; /** The operator that should be evaluated */ operator?: ConditionOperator; } interface ConditionOperator extends ConditionOperatorOperatorsOneOf { /** Comparison of equality - will be evaluated to true if the given parties are equal */ equals?: EqualOperator; /** Regex operator - will be evaluated to true if the given value matches the provided regex */ like?: LikeOperator; /** Petri experiment - will be evaluated using petri. */ experiment?: ExperimentOperator; /** Operator that indicates a dependency on another subject being allowed to perform something. */ dependOn?: DependOnOperator; } /** @oneof */ interface ConditionOperatorOperatorsOneOf { /** Comparison of equality - will be evaluated to true if the given parties are equal */ equals?: EqualOperator; /** Regex operator - will be evaluated to true if the given value matches the provided regex */ like?: LikeOperator; /** Petri experiment - will be evaluated using petri. */ experiment?: ExperimentOperator; /** Operator that indicates a dependency on another subject being allowed to perform something. */ dependOn?: DependOnOperator; } interface EqualOperator { /** The attribute which should be compared. The attribute will be first evaluated to a value, and then compared the other side (attribute/value) */ attrName?: string; /** The value to compare to. If the two parties are equal - we will return true. */ value?: ConditionValue; } interface ConditionValue extends ConditionValueValueOneOf { /** an attribute. We'll first retrieve the value of the attribute (from the request or from pre-indexed values), and then compare to what it needs to be compared with. */ attrName?: string; /** a value with a string type. Will be compared to the attribute provided, and be true only if they match the operator. */ stringValue?: string; /** a value with a boolean type. Will be compared to the attribute provided, and be true only if they match the operator. */ boolValue?: boolean; } /** @oneof */ interface ConditionValueValueOneOf { /** an attribute. We'll first retrieve the value of the attribute (from the request or from pre-indexed values), and then compare to what it needs to be compared with. */ attrName?: string; /** a value with a string type. Will be compared to the attribute provided, and be true only if they match the operator. */ stringValue?: string; /** a value with a boolean type. Will be compared to the attribute provided, and be true only if they match the operator. */ boolValue?: boolean; } interface LikeOperator { /** The attribute which should be compared. The attribute will be first evaluated to a value, and then compared the regex values provided. */ attrName?: string; /** The regex values which the attribute value should be evaluated on. If the attribute value matches at least one of the regular expressions provided - we will return true */ values?: string[]; } interface ExperimentOperator { /** The spec to conduct the experiment on. */ spec?: string; /** The value to use if the experiment could not be conducted */ fallbackValue?: string; /** The expected value of the experiment conduction. If it matches the actual value - true will be returned. Otherwise - false. */ expectedValue?: string; } /** Implies that the policy takes affect only if the depend on subject is permitted as well. */ interface DependOnOperator { /** The subject on which the current entry depends on. If the subject is allowed to perform what the query was about - the condition will be evaluated to true. Otherwise - false */ dependOnSubject?: Subject; } interface Subject { /** ID of identity assigned to the asset. */ _id?: string; /** Type of identity assigned to the asset. Supported subject types include user IDs, account IDs, and app IDs. */ subjectType?: SubjectTypeWithLiterals; /** Context of identity assigned to the asset. For example, a `subjectType` = `USER` will have `context` = `ACCOUNT`. */ context?: SubjectContext; } declare enum SubjectType { UNKNOWN = "UNKNOWN", ACCOUNT = "ACCOUNT", USER = "USER", USER_GROUP = "USER_GROUP", MEMBER_GROUP = "MEMBER_GROUP", VISITOR_GROUP = "VISITOR_GROUP", EXTERNAL_APP = "EXTERNAL_APP", ACCOUNT_GROUP = "ACCOUNT_GROUP", WIX_APP = "WIX_APP" } /** @enumType */ type SubjectTypeWithLiterals = SubjectType | 'UNKNOWN' | 'ACCOUNT' | 'USER' | 'USER_GROUP' | 'MEMBER_GROUP' | 'VISITOR_GROUP' | 'EXTERNAL_APP' | 'ACCOUNT_GROUP' | 'WIX_APP'; interface SubjectContext { _id?: string; contextType?: SubjectContextTypeWithLiterals; } declare enum SubjectContextType { UNKNOWN_CTX = "UNKNOWN_CTX", ORG_CTX = "ORG_CTX", ACCOUNT_CTX = "ACCOUNT_CTX" } /** @enumType */ type SubjectContextTypeWithLiterals = SubjectContextType | 'UNKNOWN_CTX' | 'ORG_CTX' | 'ACCOUNT_CTX'; interface GetAccountInvitesRequest { } interface GetAccountInvitesResponse { invites?: AccountInvite[]; } interface GetAccountInviteRequest { _id?: string; } interface GetAccountInviteResponse { invite?: AccountInvite; } interface AccountInviteRequest { role?: string; /** @format EMAIL */ email?: string; policyIds?: string[]; } interface AccountInviteResponse { invite?: AccountInvite; } interface CreateInviteRequest { /** * Array of potential team members' email addresses and their corresponding assignments (how they will be assigned when they accept the invite). * @minSize 1 * @maxSize 50 */ subjectsAssignments: SubjectInviteAssignments[]; /** 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 SubjectInviteAssignments { /** * Invitee's email address. * @format EMAIL */ subjectEmail?: string; /** Mapping of roles (referred to here as policies) and assets (referred to here as resources) that will be assigned to the invitee when they accept the invite. When no resources are specified, the invitee will be given access to everything within the account. */ assignments?: InviteResourceAssignment[]; } interface CreateInviteResponse { /** Invites that were sent successfully. */ successfulInvites?: AccountInvite[]; /** Invites that failed. */ failedInvites?: InviteFailure[]; } interface InviteFailure { /** * Email address of the failed invite. * @format EMAIL */ subjectEmail?: string; /** Error description. */ errorMessage?: string; } interface BulkAccountInviteRequest { role?: string; emails?: string[]; policyIds?: string[]; } interface BulkAccountInviteResponse { invites?: AccountInvite[]; failedEmails?: string[]; } interface ResendAccountInviteRequest { inviteId?: 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 AcceptAccountInviteRequest { inviteToken?: string; } interface AcceptAccountInviteResponse { } interface RevokeAccountInviteRequest { inviteId?: string; } interface RevokeAccountInviteResponse { } interface UpdateAccountInviteRequest { inviteId?: string; role?: string; policyIds?: string[]; } interface UpdateAccountInviteResponse { } interface UpdateAccountInviteAssignmentsRequest { inviteId?: string; assignments?: InviteResourceAssignment[]; } interface UpdateAccountInviteAssignmentsResponse { } interface ParseAccountInviteTokenRequest { inviteToken?: string; } interface ParseAccountInviteTokenResponse { inviteId?: string; accountId?: string; status?: InviteStatusWithLiterals; } /** * Creates and sends invite emails to a list of potential team members, inviting them to become team members of the requesting account. * The invites may be limited to a specific resource (site or other asset). * Maximum 50 invitees can be specified per call. * * > **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 subjectsAssignments - Array of potential team members' email addresses and their corresponding assignments (how they will be assigned when they accept the invite). * @public * @requiredField subjectsAssignments * @param options - Filter options. * @permissionId team.send-invite * @applicableIdentity APP * @fqn com.wixpress.invites.api.AccountInvitesApi.CreateInvite */ declare function createInvite(subjectsAssignments: SubjectInviteAssignments[], options?: CreateInviteOptions): Promise>; interface CreateInviteOptions { /** 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; } export { type AcceptAccountInviteRequest, type AcceptAccountInviteResponse, type AccountInvite, type AccountInviteRequest, type AccountInviteResponse, type AccountResourceContext, type BulkAccountInviteRequest, type BulkAccountInviteResponse, type Condition, type ConditionOperator, type ConditionOperatorOperatorsOneOf, type ConditionType, type ConditionTypeOfOneOf, type ConditionValue, type ConditionValueValueOneOf, type CreateInviteOptions, type CreateInviteRequest, type CreateInviteResponse, type DependOnOperator, type EnvironmentCondition, type EnvironmentConditionConditionOneOf, type EqualOperator, type ExperimentCondition, type ExperimentOperator, type FullNameResource, type FullNameResourceResourceContextOneOf, type GetAccountInviteRequest, type GetAccountInviteResponse, type GetAccountInvitesRequest, type GetAccountInvitesResponse, type InviteAssignment, type InviteFailure, type InviteResourceAssignment, InviteStatus, type InviteStatusWithLiterals, type JoinedCondition, JoinedConditionOperator, type JoinedConditionOperatorWithLiterals, type LikeOperator, type OrganizationResourceContext, type ParseAccountInviteTokenRequest, type ParseAccountInviteTokenResponse, type PolicyCondition, type ResendAccountInviteRequest, type Resource, type RevokeAccountInviteRequest, type RevokeAccountInviteResponse, type SimpleCondition, SimpleConditionOperator, type SimpleConditionOperatorWithLiterals, type SimpleConditionValue, type SimpleConditionValueValueOneOf, type SiteResourceContext, type Subject, type SubjectContext, SubjectContextType, type SubjectContextTypeWithLiterals, type SubjectInviteAssignments, SubjectType, type SubjectTypeWithLiterals, type UpdateAccountInviteAssignmentsRequest, type UpdateAccountInviteAssignmentsResponse, type UpdateAccountInviteRequest, type UpdateAccountInviteResponse, createInvite };