import { CreateInviteRequest as CreateInviteRequest$1, CreateInviteResponse as CreateInviteResponse$1 } from './index.typings.js'; import '@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; } type __PublicMethodMetaInfo = { getUrl: (context: any) => string; httpMethod: K; path: string; pathParams: M; __requestType: T; __originalRequestType: S; __responseType: Q; __originalResponseType: R; }; declare function createInvite(): __PublicMethodMetaInfo<'POST', {}, CreateInviteRequest$1, CreateInviteRequest, CreateInviteResponse$1, CreateInviteResponse>; export { type AcceptAccountInviteRequest as AcceptAccountInviteRequestOriginal, type AcceptAccountInviteResponse as AcceptAccountInviteResponseOriginal, type AccountInvite as AccountInviteOriginal, type AccountInviteRequest as AccountInviteRequestOriginal, type AccountInviteResponse as AccountInviteResponseOriginal, type AccountResourceContext as AccountResourceContextOriginal, type BulkAccountInviteRequest as BulkAccountInviteRequestOriginal, type BulkAccountInviteResponse as BulkAccountInviteResponseOriginal, type ConditionOperatorOperatorsOneOf as ConditionOperatorOperatorsOneOfOriginal, type ConditionOperator as ConditionOperatorOriginal, type Condition as ConditionOriginal, type ConditionTypeOfOneOf as ConditionTypeOfOneOfOriginal, type ConditionType as ConditionTypeOriginal, type ConditionValue as ConditionValueOriginal, type ConditionValueValueOneOf as ConditionValueValueOneOfOriginal, type CreateInviteRequest as CreateInviteRequestOriginal, type CreateInviteResponse as CreateInviteResponseOriginal, type DependOnOperator as DependOnOperatorOriginal, type EnvironmentConditionConditionOneOf as EnvironmentConditionConditionOneOfOriginal, type EnvironmentCondition as EnvironmentConditionOriginal, type EqualOperator as EqualOperatorOriginal, type ExperimentCondition as ExperimentConditionOriginal, type ExperimentOperator as ExperimentOperatorOriginal, type FullNameResource as FullNameResourceOriginal, type FullNameResourceResourceContextOneOf as FullNameResourceResourceContextOneOfOriginal, type GetAccountInviteRequest as GetAccountInviteRequestOriginal, type GetAccountInviteResponse as GetAccountInviteResponseOriginal, type GetAccountInvitesRequest as GetAccountInvitesRequestOriginal, type GetAccountInvitesResponse as GetAccountInvitesResponseOriginal, type InviteAssignment as InviteAssignmentOriginal, type InviteFailure as InviteFailureOriginal, type InviteResourceAssignment as InviteResourceAssignmentOriginal, InviteStatus as InviteStatusOriginal, type InviteStatusWithLiterals as InviteStatusWithLiteralsOriginal, JoinedConditionOperator as JoinedConditionOperatorOriginal, type JoinedConditionOperatorWithLiterals as JoinedConditionOperatorWithLiteralsOriginal, type JoinedCondition as JoinedConditionOriginal, type LikeOperator as LikeOperatorOriginal, type OrganizationResourceContext as OrganizationResourceContextOriginal, type ParseAccountInviteTokenRequest as ParseAccountInviteTokenRequestOriginal, type ParseAccountInviteTokenResponse as ParseAccountInviteTokenResponseOriginal, type PolicyCondition as PolicyConditionOriginal, type ResendAccountInviteRequest as ResendAccountInviteRequestOriginal, type Resource as ResourceOriginal, type RevokeAccountInviteRequest as RevokeAccountInviteRequestOriginal, type RevokeAccountInviteResponse as RevokeAccountInviteResponseOriginal, SimpleConditionOperator as SimpleConditionOperatorOriginal, type SimpleConditionOperatorWithLiterals as SimpleConditionOperatorWithLiteralsOriginal, type SimpleCondition as SimpleConditionOriginal, type SimpleConditionValue as SimpleConditionValueOriginal, type SimpleConditionValueValueOneOf as SimpleConditionValueValueOneOfOriginal, type SiteResourceContext as SiteResourceContextOriginal, type SubjectContext as SubjectContextOriginal, SubjectContextType as SubjectContextTypeOriginal, type SubjectContextTypeWithLiterals as SubjectContextTypeWithLiteralsOriginal, type SubjectInviteAssignments as SubjectInviteAssignmentsOriginal, type Subject as SubjectOriginal, SubjectType as SubjectTypeOriginal, type SubjectTypeWithLiterals as SubjectTypeWithLiteralsOriginal, type UpdateAccountInviteAssignmentsRequest as UpdateAccountInviteAssignmentsRequestOriginal, type UpdateAccountInviteAssignmentsResponse as UpdateAccountInviteAssignmentsResponseOriginal, type UpdateAccountInviteRequest as UpdateAccountInviteRequestOriginal, type UpdateAccountInviteResponse as UpdateAccountInviteResponseOriginal, type __PublicMethodMetaInfo, createInvite };