import * as _wix_sdk_types from '@wix/sdk-types'; import { QuerySpec, Query as Query$1, NonNullablePaths } from '@wix/sdk-types'; /** A custom field that can be suggested for Wix users to add to member profiles. */ interface CustomFieldSuggestion { /** * Custom field name. * @maxLength 150 */ name?: string | null; /** Privacy level of the custom field. */ defaultPrivacy?: PrivacyWithLiterals; /** Type of information to provide for members. */ fieldType?: TypeWithLiterals; /** Social network type. */ socialType?: SocialTypeTypeWithLiterals; /** Field origin. */ fieldOrigin?: OriginWithLiterals; /** * Custom field ID. * @format GUID */ customFieldId?: 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 Type { /** 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 TypeWithLiterals = Type | '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'; interface ListCustomFieldSuggestionsRequest { paging?: Paging; sorting?: Sorting[]; } interface Paging { /** Number of items to load. */ limit?: number | null; /** Number of items to skip in the current sort order. */ offset?: number | null; } interface Sorting { /** * Name of the field to sort by. * @maxLength 512 */ fieldName?: string; /** Sort order. */ order?: SortOrderWithLiterals; /** * Origin point for geo-distance sorting on a GEO field * results are ordered by distance from this point (ASC = nearest first, DESC = farthest first). */ origin?: AddressLocation; } declare enum SortOrder { ASC = "ASC", DESC = "DESC" } /** @enumType */ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC'; interface AddressLocation { /** Address latitude. */ latitude?: number | null; /** Address longitude. */ longitude?: number | null; } interface ListCustomFieldSuggestionsResponse { /** Custom field suggestions. */ suggestions?: CustomFieldSuggestion[]; /** Metadata for the paginated results. */ metadata?: PagingMetadata; } interface PagingMetadata { /** Number of items returned in the response. */ count?: number | null; /** Offset that was requested. */ offset?: number | null; /** Total number of items that match the query. */ total?: number | null; /** Flag that indicates the server failed to calculate the `total` field. */ tooManyToCount?: boolean | null; } interface QueryCustomFieldSuggestionsRequest { /** Query options. See [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language) for more details. */ query?: Query; } interface Query { /** * Filter object. * * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section). */ filter?: any; /** * Cursor paging options. * * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging). */ paging?: Paging; /** * Sort object. * * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section). */ sorting?: Sorting[]; } interface QueryCustomFieldSuggestionsResponse { /** Custom field suggestion. */ suggestions?: CustomFieldSuggestion[]; /** Metadata for the paginated results. */ metadata?: PagingMetadata; } /** * Retrieves a list of suggestions for both custom fields and existing fields available from the Wix Members Area. * @public * @permissionId MEMBERS.CUSTOM_FIELDS_SUGGESTIONS_READ * @applicableIdentity APP * @fqn com.wixpress.members.customfields.suggestions.CustomFieldSuggestions.ListCustomFieldSuggestions */ declare function listCustomFieldSuggestions(options?: ListCustomFieldSuggestionsOptions): Promise>; interface ListCustomFieldSuggestionsOptions { paging?: Paging; sorting?: Sorting[]; } /** * Retrieves a list of up to 100 custom field suggestions, given the provided filters, fieldsets, sorting and paging, and returns a [`SuggestionsQueryBuilder`](https://dev.wix.com/docs/sdk/backend-modules/members/custom-field-suggestions/suggestions-query-builder/find) object. * * The returned object contains the query definition which is typically used to run the query using the [`find()`](https://dev.wix.com/docs/sdk/backend-modules/members/custom-field-suggestions/suggestions-query-builder/find) method. * * You can refine the query by chaining `SuggestionsQueryBuilder` methods onto the query. `SuggestionsQueryBuilder` methods enable you to sort, filter, and control the results that `queryCustomFieldSuggestions()` returns. The methods that are chained to `queryCustomFieldSuggestions()` are applied in the order they are called. * * `queryCustomFieldSuggestions()` runs with the following `SuggestionsQueryBuilder` defaults that you can override: * - [`skip`: `0`](https://dev.wix.com/docs/sdk/backend-modules/members/custom-field-suggestions/suggestions-query-builder/skip) * - [`limit`: `50`](https://dev.wix.com/docs/sdk/backend-modules/members/custom-field-suggestions/suggestions-query-builder/limit) * * * @public * @permissionId MEMBERS.CUSTOM_FIELDS_SUGGESTIONS_READ * @applicableIdentity APP * @fqn com.wixpress.members.customfields.suggestions.CustomFieldSuggestions.QueryCustomFieldSuggestions */ declare function queryCustomFieldSuggestions(): SuggestionsQueryBuilder; interface QueryOffsetResult { currentPage: number | undefined; totalPages: number | undefined; totalCount: number | undefined; hasNext: () => boolean; hasPrev: () => boolean; length: number; pageSize: number; } interface SuggestionsQueryResult extends QueryOffsetResult { items: CustomFieldSuggestion[]; query: SuggestionsQueryBuilder; next: () => Promise; prev: () => Promise; } interface SuggestionsQueryBuilder { /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ eq: (propertyName: 'name' | 'fieldType', value: any) => SuggestionsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ ne: (propertyName: 'name' | 'fieldType', value: any) => SuggestionsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ ge: (propertyName: 'name', value: any) => SuggestionsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ gt: (propertyName: 'name', value: any) => SuggestionsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ le: (propertyName: 'name', value: any) => SuggestionsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ lt: (propertyName: 'name', value: any) => SuggestionsQueryBuilder; /** @param propertyName - Property whose value is compared with `string`. * @param string - String to compare against. Case-insensitive. */ startsWith: (propertyName: 'name', value: string) => SuggestionsQueryBuilder; /** @param propertyName - Property whose value is compared with `values`. * @param values - List of values to compare against. */ hasSome: (propertyName: 'name' | 'fieldType', value: any[]) => SuggestionsQueryBuilder; in: (propertyName: 'name' | 'fieldType', value: any) => SuggestionsQueryBuilder; exists: (propertyName: 'name' | 'fieldType', value: boolean) => SuggestionsQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */ ascending: (...propertyNames: Array<'name' | 'fieldType'>) => SuggestionsQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */ descending: (...propertyNames: Array<'name' | 'fieldType'>) => SuggestionsQueryBuilder; /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */ limit: (limit: number) => SuggestionsQueryBuilder; /** @param skip - Number of items to skip in the query results before returning the results. */ skip: (skip: number) => SuggestionsQueryBuilder; find: () => Promise; } /** * @hidden * @fqn com.wixpress.members.customfields.suggestions.CustomFieldSuggestions.QueryCustomFieldSuggestions * @requiredField query */ declare function typedQueryCustomFieldSuggestions(query: CustomFieldSuggestionQuery): Promise>; interface CustomFieldSuggestionQuerySpec extends QuerySpec { paging: 'offset'; wql: [ { fields: ['fieldType', 'name']; operators: '*'; sort: 'BOTH'; } ]; } type CommonQueryWithEntityContext = Query$1; type CustomFieldSuggestionQuery = { /** Filter object. Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section). */ filter?: CommonQueryWithEntityContext['filter']; /** Cursor paging options. Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging). */ paging?: { /** Number of items to load. */ limit?: NonNullable['limit'] | null; /** Number of items to skip in the current sort order. */ offset?: NonNullable['offset'] | null; }; }; declare const utils: { query: { QueryBuilder: () => _wix_sdk_types.QueryBuilder; Filter: _wix_sdk_types.FilterFactory; Sort: _wix_sdk_types.SortFactory; }; }; export { type AddressLocation, type CommonQueryWithEntityContext, type CustomFieldSuggestion, type CustomFieldSuggestionQuery, type CustomFieldSuggestionQuerySpec, type ListCustomFieldSuggestionsOptions, type ListCustomFieldSuggestionsRequest, type ListCustomFieldSuggestionsResponse, Origin, type OriginWithLiterals, type Paging, type PagingMetadata, Privacy, type PrivacyWithLiterals, type Query, type QueryCustomFieldSuggestionsRequest, type QueryCustomFieldSuggestionsResponse, SocialTypeType, type SocialTypeTypeWithLiterals, SortOrder, type SortOrderWithLiterals, type Sorting, type SuggestionsQueryBuilder, type SuggestionsQueryResult, Type, type TypeWithLiterals, listCustomFieldSuggestions, queryCustomFieldSuggestions, typedQueryCustomFieldSuggestions, utils };