export interface Member { /** * member's id * @readonly */ id?: string; /** * `true` if member completed email verification, otherwise `false` * @readonly */ emailVerified?: boolean; /** * member's role: * * `OWNER` - member that belongs to site owner * `CONTRIBUTOR` - member that belongs to a contributor in site * `MEMBER` - other members that registered to site */ role?: Role; /** email to be used when logging in */ loginEmail?: string | null; /** member's full name */ memberName?: string | null; /** member's first name */ firstName?: string | null; /** member's last name */ lastName?: string | null; /** * Deprecated: please use `picture` field instead. * URL for member's profile image * @deprecated */ imageUrl?: string | null; /** member's nickname (exposed to other members) */ nickname?: string | null; /** `PUBLIC` if other members can view this profile, `PRIVATE` otherwise */ profilePrivacyStatus?: SiteMemberPrivacyStatus; /** url segment for accessing the member's profile */ slug?: string | null; /** member's language */ language?: string | null; /** * member's status: * * `ACTIVE` - when member is approved * `APPLICANT` - when pending site owner's approval * `BLOCKED` - when member is blocked by the site's owner * `INACTIVE` - not used */ status?: SiteMemberStatus; /** * date the member was created * @readonly */ creationDate?: Date | null; /** * date the member was last updated * @readonly */ lastUpdateDate?: Date | null; /** * date of last login * @readonly */ lastLoginDate?: Date | null; /** * member's email addresses * (returned when `include_contact_details` is set to `true`) */ emails?: string[]; /** * member's phone numbers * (returned when `include_contact_details` is set to `true`) */ phones?: string[]; /** * member's addresses * (returned when `include_contact_details` is set to `true`) */ addresses?: Address[]; /** * labels attached to the member by the owner (in contacts dashboard) * (returned when `include_contact_details` is set to `true`) */ labels?: string[]; /** * custom fields set for the member by the owner (in contacts dashboard) * (returned when `include_contact_details` is set to `true`) */ customFields?: CustomField[]; /** * member's profile picture * supports both media-items and external urls */ picture?: Image; /** member's user id */ userId?: string | null; /** Groups the the member is registered to */ groups?: Group[]; /** * member's contact id * @readonly */ contactId?: string | null; } export declare enum Role { UNDEFINED_ROLE = "UNDEFINED_ROLE", MEMBER = "MEMBER", OWNER = "OWNER", CONTRIBUTOR = "CONTRIBUTOR" } export declare enum SiteMemberPrivacyStatus { UNDEFINED = "UNDEFINED", PUBLIC = "PUBLIC", PRIVATE = "PRIVATE", COMMUNITY = "COMMUNITY" } export declare enum SiteMemberStatus { UNDEFINED_STATUS = "UNDEFINED_STATUS", APPLICANT = "APPLICANT", ACTIVE = "ACTIVE", INACTIVE = "INACTIVE", BLOCKED = "BLOCKED", OFFLINE_ONLY = "OFFLINE_ONLY" } export interface Address { /** member's street address */ street?: string | null; /** member's city */ city?: string | null; /** member's region */ region?: string | null; /** member's country */ country?: string | null; /** member's postal code */ postalCode?: string | null; } export interface CustomField extends CustomFieldValueOneOf { strValue?: string | null; numValue?: number; dateValue?: Date | null; name?: string; } /** @oneof */ export interface CustomFieldValueOneOf { strValue?: string | null; numValue?: number; dateValue?: Date | null; } export interface Image { /** WixMedia image ID. */ id?: string; /** Image URL. */ url?: string; /** * Original image height. * @readonly */ height?: number; /** * Original image width. * @readonly */ width?: number; /** Image alt text. */ altText?: string | null; /** * Image filename. * @readonly */ filename?: string | null; } export interface FocalPoint { /** X-coordinate of the focal point. */ x?: number; /** Y-coordinate of the focal point. */ y?: number; /** crop by height */ height?: number | null; /** crop by width */ width?: number | null; } export interface Group { id?: string; name?: string; type?: string; } export interface ListMembersRequest { /** for paging - maximum number of records to retrieve */ limit?: number; /** for paging - how many records to skip */ offset?: number; /** sort order - list of field and direction tuples. e.g. `["first_name:asc", "last_name:desc"]` */ order?: string[]; /** partial response request - list of field names to get back in response */ fields?: string[]; /** filter members with specific status */ status?: SiteMemberStatus; /** whether to include contact details */ includeContactDetails?: boolean; } export interface ListMembersResponse { /** members returned by List request */ members?: Member[]; /** pagination information */ pagination?: PaginationResponse; } export interface PaginationResponse { /** offset that was applied to the request */ offset?: number; /** limit that was applied to the request */ limit?: number; /** total rows available */ total?: number; /** indication that the total count was too expensive to calculate */ tooManyToCount?: boolean; } export interface SearchRequest { /** paging - offset and limit */ paging?: Paging; /** search by field */ searchBy?: SearchBy; /** partial response request - list of field names to get back in response */ fields?: string[]; /** filters */ filterBy?: FilterBy; /** ASC or DESC order */ sort?: Sorting; } export interface Paging { /** Number of items to load. */ limit?: number | null; /** Number of items to skip in the current sort order. */ offset?: number | null; } export interface SearchBy { /** nick name filter */ nickname?: string | null; } export interface FilterBy { /** filter members with specific status */ status?: string | null; /** group Id filter */ groupId?: string | null; /** privacy status filter */ privacyStatus?: SiteMemberPrivacyStatus; /** roles filter */ roles?: Role[]; } export declare enum Sorting { DESC = "DESC", ASC = "ASC" } export interface SearchResponse { /** members returned by List request */ members?: Member[]; /** pagination information */ pagination?: PaginationResponse; } export interface GetCurrentMemberRequest { } export interface GetMemberResponse { member?: Member; } export interface GetMemberRequest { /** unique identifier of the requested member(required) */ id?: string; /** whether to include contact details */ includeContactDetails?: boolean; /** whether to include groups details */ includeGroupsDetails?: boolean; } export interface GetUserMembershipsRequest { /** unique identifier of the requested **Wix** user */ userId?: string; /** paging - offset and limit ( the max limit for page is 200) */ paging?: Paging; } export interface GetUserMembershipsResponse { /** sequence of member's of the user with there metaSiteId */ userMemberships?: UserMembership[]; } export interface UserMembership { /** member id */ memberId?: string; /** meta site id whom the member existing on */ metasiteId?: string; } export interface GetMemberRoleRequest { id?: string; } export interface GetMemberRoleResponse { /** * member's role: * * `OWNER` - member that belongs to site owner * `CONTRIBUTOR` - member that belongs to a contributor in site * `MEMBER` - other members that registered to site */ role?: Role; userId?: string | null; status?: SiteMemberStatus; contactId?: string | null; } export interface GetMemberRolesRequest { /** user_id and/or contact_id */ ids?: string[]; } export interface GetMemberRolesResponse { idsToRoles?: Record; } export interface MemberRole { /** * member's role: * * `OWNER` - member that belongs to site owner * `CONTRIBUTOR` - member that belongs to a contributor in site * `MEMBER` - other members that registered to site */ role?: Role; userId?: string | null; status?: SiteMemberStatus; contactId?: string | null; } export interface BatchGetMembersRequest { /** unique identifier of the requested member(required) */ ids?: string[]; /** whether to include contact details */ includeContactDetails?: boolean; /** whether to include groups details */ includeGroupsDetails?: boolean; } export interface BatchGetMembersResponse { /** lest of members details */ members?: Member[]; } export interface GetAuthorizedPagesRequest { id?: string; siteId?: string; } export interface GetAuthorizedPagesResponse { authorizedPages?: Record; } export interface UpdateMemberRequest { /** member id */ id?: string; /** the Member object containing the fields to update */ member?: Member; /** * an explicit declaration of contact fields that should be updated by this request. * *Currently only affects contact fields. */ fieldMask?: string[]; } export interface UpdateMemberResponse { /** updated member */ member?: Member; } export interface ChangeLoginEmailRequest { /** Member ID. */ id: string; /** New login email address. */ newEmail?: string; /** Whether to revoke active sessions immediately after changing the member's login email. */ revokeCurrentSessions?: boolean | null; } export interface ChangeLoginEmailResponse { /** Member with the updated login email address. */ member?: Member; } export interface QueryMembersRequest { /** * query - See https://github.com/wix-private/platformization-guidelines/blob/master/Server/API-Query.md * supported fields: `id`, `login_email`, `status`, `language`, `date_created`, `last_update_date`, `flags`, `name`, `first_name`, `last_name`, `nickname`, `email_verified`, `privacy_status` */ query?: string; /** whether to include contact details */ includeContactDetails?: boolean; /** whether to include offline members */ includeOfflineMembers?: boolean; } export interface QueryMembersResponse { /** members matching the query criteria */ members?: Member[]; /** pagination information */ pagination?: PaginationResponse; } export interface DeleteMemberRequest { /** id of member that should be deleted (required) */ id?: string; /** defines if the request is a bulk action */ isBulkAction?: boolean; } export interface DeleteMemberResponse { } export interface ApproveMemberRequest extends ApproveMemberRequestMemberIdentifierOneOf { /** ID of the member to approve. */ id?: string; /** Login email address of the member to approve. */ email?: string; /** * */ token?: string; } /** @oneof */ export interface ApproveMemberRequestMemberIdentifierOneOf { /** ID of the member to approve. */ id?: string; /** Login email address of the member to approve. */ email?: string; /** * */ token?: string; } export interface ApproveMemberResponse { session?: Session; } export interface Session { token?: string | null; } export interface BlockMemberRequest extends BlockMemberRequestMemberIdentifierOneOf { id?: string; /** Login email address of the member to block. */ email?: string; /** Indicate the source of the block request */ source?: Source; } /** @oneof */ export interface BlockMemberRequestMemberIdentifierOneOf { id?: string; /** Login email address of the member to block. */ email?: string; } export declare enum Source { UNKNOWN = "UNKNOWN", HANDLING_SPAM = "HANDLING_SPAM" } export interface BlockMemberResponse { } export interface MakeMemberOfflineRequest { /** unique identifier of the requested member */ id?: string; } export interface MakeMemberOfflineResponse { } /** Registration options. */ export interface RegisterRequest { /** Login email address for the new site member. */ email?: string; /** * Password the new site member will use to log in. * * Must be 4 to 15 ASCII-printable characters. */ password?: string; /** Contact information for the registered member. */ contactInfo?: MemberContactInfo; /** identification of the app that initiated the register request */ dialogData?: DialogData; /** * Sets the privacy status of a new member upon registration. * * - `PUBLIC`: Member is visible to everyone. * - `PRIVATE`: Member is hidden from site visitors and other site members. Member is returned only to site contributors and apps with the appropriate permissions. * - `UNKNOWN`: Insufficient permissions to get the status. */ profilePrivacyStatus?: SiteMemberPrivacyStatus; /** is registration offline */ isOfflineRegistration?: boolean; recaptchaToken?: string | null; invisibleRecaptchaToken?: string | null; emailVerification?: EmailVerification; /** * an indication that the request needs to follow mobile signup flow * difference from the regular flow is the OTP email */ isMobile?: boolean | null; } export interface MemberContactInfo { /** First name. */ firstName?: string | null; /** Last name. */ lastName?: string | null; /** Contact's profile picture. */ picture?: string | null; /** Contact's email addresses. */ emails?: string[]; /** Contact's phone numbers. */ phones?: string[]; /** List of contact's labels. */ labels?: string[]; /** * Contact's locale, formatted as an * [IETF BCP 47 language tag](https://tools.ietf.org/html/rfc5646). * Typically, this is a lowercase 2-letter language code, * followed by a hyphen, * followed by an uppercase 2-letter country code. * * For example, German from Germany is formatted as `"de-DE"`, * and U.S. English is formatted as `"en-US"`. */ locale?: string | null; /** * Any number of custom fields. * [Custom fields](https://support.wix.com/en/article/adding-custom-fields-to-contacts) * are used to store additional information about your site's contacts. * When setting a custom field, use key:value pairs, * where the key matches the names defined in your site's * [Contact List](https://support.wix.com/en/article/accessing-your-contact-list). * You can only set values for custom fields that already exist in the Contacts application. */ customFields?: CustomField[]; } export interface DialogData { visitorId?: string | null; appId?: string | null; initiator?: string | null; } export interface EmailVerification { /** Id of the verification process */ verificationId?: string; /** 6-digit code to verify (between 100000 and 999999) */ otp?: string; } export interface RegisterResponse { /** Newly registered member. */ member?: Member; /** * in case the site is open for registration, all members are automatically * approved. they will get a temporary token for obtaining a valid session */ session?: Session; /** * in case the site requires members approval, the registered member * will be an applicant until he's approved. the token can be used as a member * identifier for approval using the `MembersService.Approve` API */ approvalToken?: string | null; } export interface EmailVerificationRequired { /** Id of the verification process. */ verificationId?: string; } export interface EmailVerificationFailed { /** Id of the failed verification process. */ verificationId?: string; /** Reason for verification failure. */ verificationFailureReason?: VerificationFailureReason; } export declare enum VerificationFailureReason { /** Default value - means no failure */ UNSPECIFIED = "UNSPECIFIED", /** Bad verification code */ BAD_CODE = "BAD_CODE", /** Verification code was not found */ NOT_FOUND = "NOT_FOUND", /** Error while sending the code to the user */ SEND_CODE_ERROR = "SEND_CODE_ERROR" } export interface LoginRequest { /** Login email address. */ email?: string; /** Member password. */ password?: string; /** Recaptcha token. */ recaptchaToken?: string; /** Invisible recaptcha token. */ invisibleRecaptchaToken?: string; emailVerification?: EmailVerification; /** * an indication that the request needs to follow mobile login flow * difference from the regular flow is the OTP email */ isMobile?: boolean | null; } /** Session token for logging the member in. */ export interface LoginResponse { session?: Session; /** the member's details */ member?: Member; } export interface GetResetPasswordLinkRequest { /** Contact ID of the member whose password will be reset. */ contactId?: string; } export interface GetResetPasswordLinkResponse { /** * Reset password link. * Valid for one use, up to two weeks from when it is created. */ resetPasswordLink?: string; } export interface SendSetPasswordEmailRequest { /** Login email of the member whose password will be set. */ email: string; /** * > **Deprecated:** * > This field has been replaced with * > `hideIgnoreMessage` * > and will be removed on June 30, 2022. * > If your app uses this field, * > we recommend updating your code as soon as possible. * * Whether the email is being sent by member request. * * If `true`, the email tells the member * they can safely ignore * if they did not request the password change. * * Defaults to `false`. * @deprecated */ requestedByMember?: boolean; /** * Whether to hide the ignore this email message . * * If `true`, the email tells the member * they can safely ignore * if they did not request the password change. * * Default: `false`. */ hideIgnoreMessage?: boolean; } export interface SendSetPasswordEmailResponse { /** Indicates if the request was successfully received. */ accepted?: boolean; } export interface ResetPasswordRequest { /** Contact ID of the member whose password will be reset. */ contactId?: string; } export interface ResetPasswordResponse { /** Indicates if the request was successfully received. */ accepted?: boolean; } export interface SocialLoginRequest extends SocialLoginRequestLoginOneOf { appleLogin?: AppleLogin; googleLogin?: GoogleLogin; facebookLogin?: FacebookLogin; /** Must either pass explicit msid OR signed instance with visitor */ metaSiteId?: string | null; } /** @oneof */ export interface SocialLoginRequestLoginOneOf { appleLogin?: AppleLogin; googleLogin?: GoogleLogin; facebookLogin?: FacebookLogin; } export interface AppleLogin { /** JWT signed by apple, contains target (aud), email etc */ token?: string; } export interface GoogleLogin { /** JWT signed by Google, contains target (aud), email etc */ token?: string; } export interface FacebookLogin { /** AccessToken created by Facebook, used to later fetch details over API */ token?: string; } interface CustomFieldNonNullableFields { numValue: number; name: string; } interface FocalPointNonNullableFields { x: number; y: number; } interface ImageNonNullableFields { id: string; url: string; height: number; width: number; focalPoint?: FocalPointNonNullableFields; } interface GroupNonNullableFields { id: string; name: string; type: string; } interface MemberNonNullableFields { id: string; emailVerified: boolean; role: Role; profilePrivacyStatus: SiteMemberPrivacyStatus; status: SiteMemberStatus; emails: string[]; phones: string[]; labels: string[]; customFields: CustomFieldNonNullableFields[]; picture?: ImageNonNullableFields; groups: GroupNonNullableFields[]; } export interface ChangeLoginEmailResponseNonNullableFields { member?: MemberNonNullableFields; } export interface RegisterResponseNonNullableFields { member?: MemberNonNullableFields; } export interface LoginResponseNonNullableFields { member?: MemberNonNullableFields; } export interface SendSetPasswordEmailResponseNonNullableFields { accepted: boolean; } export {};