import { NonNullablePaths } from '@wix/sdk-types'; /** * A custom field application defines which members or entities a custom field applies to. * By default, custom fields apply to all members. However, custom field applications allow you to target * specific members, roles, badges, or pricing plans, or exclude certain entities. */ interface CustomFieldApplication { /** * Custom field ID. * @format GUID */ customFieldId?: string | null; /** * Custom field key. * @readonly */ customFieldKey?: string | null; /** Entities to which the custom field applies. */ applications?: ApplicationsWrapper; /** Entities from which the custom field is excluded. */ exclusions?: ExclusionsWrapper; /** Revision number, which increments by 1 each time the custom field is updated. To prevent conflicting changes, the existing revision must be used when updating a custom field. */ revision?: string | null; } interface ApplicationsWrapper { /** * List of up to 100 entities to which the the custom field applies. * @maxSize 100 */ items?: AppliesTo[]; } interface AppliesTo { /** Type of the application. */ applicationType?: TypeWithLiterals; /** * Entity ID. * @format GUID */ entityId?: string | null; } declare enum Type { /** Unknown application type. This value isn't used. */ UNKNOWN = "UNKNOWN", /** The field is applied to members with a specific role. */ ROLE = "ROLE", /** The field is applied to members with a specific badge. */ BADGE = "BADGE", /** The field is applied to members with a specific pricing plan. */ PRICING_PLAN = "PRICING_PLAN", /** The field is applied to the specified members. */ MEMBER = "MEMBER" } /** @enumType */ type TypeWithLiterals = Type | 'UNKNOWN' | 'ROLE' | 'BADGE' | 'PRICING_PLAN' | 'MEMBER'; interface ExclusionsWrapper { /** * List of up to 100 entities from which the custom field is excluded. * @maxSize 100 */ items?: Exclusion[]; } interface Exclusion { /** Type of the exclusion. */ exclusionType?: ExclusionTypeWithLiterals; /** * Entity ID. * @format GUID */ entityId?: string | null; } declare enum ExclusionType { /** Unknown exclusion type. This value isn't used. */ UNKNOWN = "UNKNOWN", /** The field is excluded from members with a specific role. */ ROLE = "ROLE", /** The field is excluded from members with a specific badge. */ BADGE = "BADGE", /** The field is excluded from members with a specific pricing plan. */ PRICING_PLAN = "PRICING_PLAN", /** The field is excluded from the specified members. */ MEMBER = "MEMBER" } /** @enumType */ type ExclusionTypeWithLiterals = ExclusionType | 'UNKNOWN' | 'ROLE' | 'BADGE' | 'PRICING_PLAN' | 'MEMBER'; interface CreateCustomFieldApplicationRequest { /** Custom field application details. */ application: CustomFieldApplication; } interface CreateCustomFieldApplicationResponse { /** The created custom field application. */ application?: CustomFieldApplication; } interface DeleteCustomFieldApplicationRequest { /** * ID of the custom field with an application to delete. * @format GUID */ customFieldId: string | null; } interface DeleteCustomFieldApplicationResponse { } interface UpdateCustomFieldApplicationRequest { /** Custom field application to update. */ application: CustomFieldApplication; } interface UpdateCustomFieldApplicationResponse { /** Updated custom field application. */ application?: CustomFieldApplication; } interface GetCustomFieldApplicationRequest { /** * ID of the custom field with an application to retrieve. * @format GUID */ customFieldId: string | null; } interface GetCustomFieldApplicationResponse { /** Retrieved custom field application. */ application?: CustomFieldApplication; } interface GetCustomFieldApplicationsRequest { /** * List of IDs of the custom fields with applications to retrieve. * @format GUID * @minSize 1 * @maxSize 100 */ customFieldIds: string[]; } interface GetCustomFieldApplicationsResponse { /** Retrieved list of custom field applications. */ applications?: CustomFieldApplication[]; } interface GetMembersCustomFieldApplicationsRequest { /** * IDs of members with custom field applications to retrieve. * @format GUID * @minSize 1 * @maxSize 100 */ memberIds: string[]; } interface GetMembersCustomFieldApplicationsResponse { /** Retrieved list of custom field applications. */ results?: MemberCustomFieldApplication[]; } interface MemberCustomFieldApplication { /** * Member ID. * @format GUID */ memberId?: string | null; /** Custom field applications for the member. */ applications?: FieldApplication[]; } interface FieldApplication { /** * Custom field key. * @readonly */ customFieldKey?: string | null; /** Whether the custom field applies to the member. */ applies?: boolean; /** Custom field details. */ customField?: CustomField; } /** * A custom field extends the default member profile with additional information fields. * Custom fields allow Wix users to collect and display specific information from members, beyond the standard profile fields. */ interface CustomField { /** * Custom field ID. * @format GUID * @readonly */ _id?: string | null; /** * Custom field title. * @minLength 1 * @maxLength 150 */ name?: string | null; /** * Custom field key. * @readonly */ key?: string | null; /** Privacy level of the custom field. */ defaultPrivacy?: PrivacyWithLiterals; /** Type of information to provide for members. */ fieldType?: FieldTypeTypeWithLiterals; /** Social network type. */ socialType?: SocialTypeTypeWithLiterals; /** * Field origin. * @readonly */ fieldOrigin?: OriginWithLiterals; /** * Which members will have the custom field in their profile. * @readonly */ appliesTo?: AppliesToEnumAppliesToWithLiterals; /** * A section which the field belongs to. * @readonly */ section?: SectionWithLiterals; /** * Date and time when the field was created. * @readonly */ _createdDate?: Date | null; /** * Date and time when the field was updated. * @readonly */ _updatedDate?: Date | null; /** Revision number, which increments by 1 each time the custom field is updated. To prevent conflicting changes, the existing revision must be used when updating a custom field. */ revision?: string | null; } declare enum Privacy { /** Unknown privacy. This value isn't used. */ UNKNOWN = "UNKNOWN", /** The information appears on the members' public profile pages. */ PUBLIC = "PUBLIC", /** Only the member can see this information. */ PRIVATE = "PRIVATE" } /** @enumType */ type PrivacyWithLiterals = Privacy | 'UNKNOWN' | 'PUBLIC' | 'PRIVATE'; declare enum FieldTypeType { /** Unknown field type. This value isn't used. */ UNKNOWN = "UNKNOWN", /** A text box to write text. */ TEXT = "TEXT", /** Only a number can be entered into the field. */ NUMBER = "NUMBER", /** Only a date can be entered into the field. */ DATE = "DATE", /** Only a URL can be entered into the field. */ URL = "URL", /** Only a link from the selected social media platform can be entered into the field. */ SOCIAL = "SOCIAL" } /** @enumType */ type FieldTypeTypeWithLiterals = FieldTypeType | 'UNKNOWN' | 'TEXT' | 'NUMBER' | 'DATE' | 'URL' | 'SOCIAL'; declare enum SocialTypeType { /** Unknown social type. This value isn't used. */ UNKNOWN = "UNKNOWN", /** Facebook social media platform. */ FACEBOOK = "FACEBOOK", /** Instagram social media platform. */ INSTAGRAM = "INSTAGRAM", /** LinkedIn social media platform. */ LINKEDIN = "LINKEDIN", /** X (formerly Twitter) social media platform. */ TWITTER = "TWITTER", /** Youtube social media platform. */ YOUTUBE = "YOUTUBE", /** Pinterest social media platform. */ PINTEREST = "PINTEREST", /** TikTok social media platform. */ TIKTOK = "TIKTOK", /** DeviantArt social media platform. */ DEVIANTART = "DEVIANTART", /** SoundCloud social media platform. */ SOUNDCLOUD = "SOUNDCLOUD", /** Tumblr social media platform. */ TUMBLR = "TUMBLR", /** Vimeo social media platform. */ VIMEO = "VIMEO", /** VKontakte social media platform. */ VKONTAKTE = "VKONTAKTE", /** Odnoklassniki social media platform. */ ODNOKLASSNIKI = "ODNOKLASSNIKI", /** Other social media platform. */ OTHER = "OTHER" } /** @enumType */ type SocialTypeTypeWithLiterals = SocialTypeType | 'UNKNOWN' | 'FACEBOOK' | 'INSTAGRAM' | 'LINKEDIN' | 'TWITTER' | 'YOUTUBE' | 'PINTEREST' | 'TIKTOK' | 'DEVIANTART' | 'SOUNDCLOUD' | 'TUMBLR' | 'VIMEO' | 'VKONTAKTE' | 'ODNOKLASSNIKI' | 'OTHER'; declare enum Origin { /** Unknown field origin. This value isn't used. */ UNKNOWN = "UNKNOWN", /** Custom field created by a Wix user. */ CUSTOM = "CUSTOM", /** Contact type of field. These are default fields that are already provided by Members Area, such as: "birth date", "position", "company". */ CONTACT = "CONTACT", /** System fields, such as: "first name", "last name", "email", "phone", "address", and "title". Some system fields are only available from the dashboard. */ SYSTEM = "SYSTEM" } /** @enumType */ type OriginWithLiterals = Origin | 'UNKNOWN' | 'CUSTOM' | 'CONTACT' | 'SYSTEM'; declare enum AppliesToEnumAppliesTo { /** Everyone will have this field. */ ALL_MEMBERS = "ALL_MEMBERS", /** Only selected members will have this field. See the [Custom Field Application API](https://dev.wix.com/docs/rest/crm/members-contacts/members/custom-fields/custom-field-applications/introduction) for more information. */ SELECTED_MEMBERS = "SELECTED_MEMBERS" } /** @enumType */ type AppliesToEnumAppliesToWithLiterals = AppliesToEnumAppliesTo | 'ALL_MEMBERS' | 'SELECTED_MEMBERS'; declare enum Section { /** General section. All custom fields and the following default fields are assigned to this section: "first name", "last name", "email", "phone", "birth date", "position", "company". */ GENERAL = "GENERAL", /** Social media section. The "social media" field is assigned to this section. */ SOCIAL = "SOCIAL", /** Display info section. The default "title" field is assigned to this section. */ DISPLAY_INFO = "DISPLAY_INFO", /** Address section. The default "address" field is assigned to this section. */ ADDRESS = "ADDRESS" } /** @enumType */ type SectionWithLiterals = Section | 'GENERAL' | 'SOCIAL' | 'DISPLAY_INFO' | 'ADDRESS'; interface GetRolesCustomFieldApplicationsRequest { /** * IDs of roles with custom field applications to retrieve. * @format GUID * @minSize 1 * @maxSize 100 */ roleIds: string[]; } interface GetRolesCustomFieldApplicationsResponse { /** Retrieved list of custom field applications. */ results?: RoleCustomFieldApplication[]; } interface RoleCustomFieldApplication { /** * Role ID. * @format GUID */ roleId?: string | null; /** Custom field applications for the role. */ applications?: FieldApplication[]; } interface DomainEvent extends DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; /** Event ID. With this ID you can easily spot duplicated events and ignore them. */ _id?: string; /** * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities. * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`. */ entityFqdn?: string; /** * Event action name, placed at the top level to make it easier for users to dispatch messages. * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`. */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number. * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; } interface EntityCreatedEvent { entity?: string; } interface RestoreInfo { deletedDate?: Date | null; } interface EntityUpdatedEvent { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntity?: string; } interface EntityDeletedEvent { /** Entity that was deleted. */ deletedEntity?: string | null; } interface ActionEvent { body?: string; } interface Empty { } interface MessageEnvelope { /** * App instance ID. * @format GUID */ instanceId?: string | null; /** * Event type. * @maxLength 150 */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Stringify payload. */ data?: string; /** Details related to the account */ accountInfo?: AccountInfo; } interface IdentificationData extends IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; /** @readonly */ identityType?: WebhookIdentityTypeWithLiterals; } /** @oneof */ interface IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; } declare enum WebhookIdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** @enumType */ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP'; interface AccountInfo { /** * ID of the Wix account associated with the event. * @format GUID */ accountId?: string | null; /** * ID of the parent Wix account. Only included when accountId belongs to a child account. * @format GUID */ parentAccountId?: string | null; /** * ID of the Wix site associated with the event. Only included when the event is tied to a specific site. * @format GUID */ siteId?: string | null; } /** * Creates a custom field application. * @param application - Custom field application details. * @public * @requiredField application * @requiredField application.applications.items.entityId * @requiredField application.customFieldId * @requiredField application.exclusions.items.entityId * @permissionId MEMBERS.CUSTOM_FIELDS_CREATE * @applicableIdentity APP * @returns The created custom field application. * @fqn com.wixpress.members.customfields.applications.CustomFieldApplications.CreateCustomFieldApplication */ declare function createCustomFieldApplication(application: NonNullablePaths): Promise>; /** * Deletes a custom field application. * * When you delete the application, the field is automatically applied to all members. * @param customFieldId - ID of the custom field with an application to delete. * @public * @requiredField customFieldId * @permissionId MEMBERS.CUSTOM_FIELDS_DELETE * @applicableIdentity APP * @fqn com.wixpress.members.customfields.applications.CustomFieldApplications.DeleteCustomFieldApplication */ declare function deleteCustomFieldApplication(customFieldId: string): Promise; /** * Updates a custom field application. * * Partial updates are not supported. Pass the whole `application` object in the request. * @param customFieldId - Custom field ID. * @public * @requiredField application * @requiredField application.applications.items.entityId * @requiredField application.exclusions.items.entityId * @requiredField application.revision * @requiredField customFieldId * @permissionId MEMBERS.CUSTOM_FIELDS_UPDATE * @applicableIdentity APP * @returns Updated custom field application. * @fqn com.wixpress.members.customfields.applications.CustomFieldApplications.UpdateCustomFieldApplication */ declare function updateCustomFieldApplication(customFieldId: string, application: NonNullablePaths): Promise>; interface UpdateCustomFieldApplication { /** * Custom field key. * @readonly */ customFieldKey?: string | null; /** Entities to which the custom field applies. */ applications?: ApplicationsWrapper; /** Entities from which the custom field is excluded. */ exclusions?: ExclusionsWrapper; /** Revision number, which increments by 1 each time the custom field is updated. To prevent conflicting changes, the existing revision must be used when updating a custom field. */ revision?: string | null; } /** * Retrieves a custom field application. * @param customFieldId - ID of the custom field with an application to retrieve. * @public * @requiredField customFieldId * @permissionId MEMBERS.CUSTOM_FIELDS_READ * @applicableIdentity APP * @fqn com.wixpress.members.customfields.applications.CustomFieldApplications.GetCustomFieldApplication */ declare function getCustomFieldApplication(customFieldId: string): Promise>; /** * Retrieves a list of custom field applications. * @param customFieldIds - List of IDs of the custom fields with applications to retrieve. * @public * @requiredField customFieldIds * @permissionId MEMBERS.CUSTOM_FIELDS_READ * @applicableIdentity APP * @fqn com.wixpress.members.customfields.applications.CustomFieldApplications.GetCustomFieldApplications */ declare function getCustomFieldApplications(customFieldIds: string[]): Promise>; /** * Retrieves a list of fields that are applied to specified members. * @param memberIds - IDs of members with custom field applications to retrieve. * @public * @requiredField memberIds * @fqn com.wixpress.members.customfields.applications.CustomFieldApplications.GetMembersCustomFieldApplications */ declare function getMembersCustomFieldApplications(memberIds: string[]): Promise>; /** * Retrieves a list of fields that are applied to specified roles. * @param roleIds - IDs of roles with custom field applications to retrieve. * @public * @requiredField roleIds * @fqn com.wixpress.members.customfields.applications.CustomFieldApplications.GetRolesCustomFieldApplications */ declare function getRolesCustomFieldApplications(roleIds: string[]): Promise>; export { type AccountInfo, type ActionEvent, type ApplicationsWrapper, type AppliesTo, AppliesToEnumAppliesTo, type AppliesToEnumAppliesToWithLiterals, type CreateCustomFieldApplicationRequest, type CreateCustomFieldApplicationResponse, type CustomField, type CustomFieldApplication, type DeleteCustomFieldApplicationRequest, type DeleteCustomFieldApplicationResponse, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type Exclusion, ExclusionType, type ExclusionTypeWithLiterals, type ExclusionsWrapper, type FieldApplication, FieldTypeType, type FieldTypeTypeWithLiterals, type GetCustomFieldApplicationRequest, type GetCustomFieldApplicationResponse, type GetCustomFieldApplicationsRequest, type GetCustomFieldApplicationsResponse, type GetMembersCustomFieldApplicationsRequest, type GetMembersCustomFieldApplicationsResponse, type GetRolesCustomFieldApplicationsRequest, type GetRolesCustomFieldApplicationsResponse, type IdentificationData, type IdentificationDataIdOneOf, type MemberCustomFieldApplication, type MessageEnvelope, Origin, type OriginWithLiterals, Privacy, type PrivacyWithLiterals, type RestoreInfo, type RoleCustomFieldApplication, Section, type SectionWithLiterals, SocialTypeType, type SocialTypeTypeWithLiterals, Type, type TypeWithLiterals, type UpdateCustomFieldApplication, type UpdateCustomFieldApplicationRequest, type UpdateCustomFieldApplicationResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, createCustomFieldApplication, deleteCustomFieldApplication, getCustomFieldApplication, getCustomFieldApplications, getMembersCustomFieldApplications, getRolesCustomFieldApplications, updateCustomFieldApplication };