export interface ItemsSelectionProvider {
    /** Provider unique identifier. */
    key?: string;
    /** The app ID of the provider. */
    appId?: string;
    /** Supported search params. */
    searchParams?: SearchParams;
    /** Visual content data like provider name and icon. */
    contentData?: ContentData;
    /** Optional additional step taken after the initial item selection. */
    additionalStepInfo?: AdditionalStepInfo;
    /**
     * Optional supported tags, used to change the content of the request based on specified tag.
     * @maxSize 50
     */
    supportedTags?: Tag[];
    /** Optional add new button info to create during initial item selection. */
    createNewItemInfo?: CreateNewItemInfo;
    /** Optional configuration settings for how the thumbnail is displayed. */
    itemThumbnail?: ItemThumbnail;
    /** Pagination Mode */
    paginationMode?: PaginationMode;
    /**
     * Additional fields associated with the provider.
     * @internal
     * @maxSize 100
     */
    tagsOverrides?: TagOverridesEntry[];
    /** Optional render overrides for the provider. */
    renderOverrides?: ItemsSelectionProviderConfigRenderOverrides;
}
export interface SearchParams {
    /**
     * Supported search parameters.
     * @maxSize 50
     */
    fields?: SearchField[];
    /**
     * Filters for viewing only part of the items. Maximum one filter per tag.
     * @maxSize 100
     */
    filters?: FilterInfo[];
}
export interface SearchField {
    /** Supported searchable fields. */
    key?: string;
    /**
     * Item description.
     * @minLength 1
     * @maxLength 100
     */
    description?: string;
}
export interface FilterInfo extends FilterInfoOptionsOneOf {
    /** Static hardcoded options */
    staticOptions?: StaticFilterOptions;
    /** The filter options are items of another provider */
    providerOptions?: ProviderFilterOptions;
    /**
     * Key of the filter
     * @minLength 1
     * @maxLength 100
     */
    key?: string;
    /** Optional filter will be shown only for consumers with this tag. Only one filter is allowed per tag. */
    tag?: Tag;
    /** The filter selection type. */
    selectionType?: FilterSelectionType;
    /** Filter options type. For now only static options are supported */
    optionsType?: FilterOptionsType;
    /**
     * Optional placeholder text to display on the filter
     * @maxLength 500
     */
    placeholder?: string | null;
}
/** @oneof */
export interface FilterInfoOptionsOneOf {
    /** Static hardcoded options */
    staticOptions?: StaticFilterOptions;
    /** The filter options are items of another provider */
    providerOptions?: ProviderFilterOptions;
}
export declare enum Tag {
    UNKNOWN_TAG = "UNKNOWN_TAG",
    EMBEDDABLE = "EMBEDDABLE",
    ECOM_EDIT_ORDER = "ECOM_EDIT_ORDER",
    ECOM_CREATE_ORDER = "ECOM_CREATE_ORDER",
    INBOX = "INBOX",
    ECOM_CREATE_PAY_LINK = "ECOM_CREATE_PAY_LINK",
    ECOM_DELIVERY_PROFILES = "ECOM_DELIVERY_PROFILES",
    ADD_TO_CATEGORY = "ADD_TO_CATEGORY",
    MY_BUSINESS = "MY_BUSINESS",
    PIPELINE_LINKED_ENTITY = "PIPELINE_LINKED_ENTITY",
    GET_PAID = "GET_PAID",
    PIPELINE_CARD_CATALOG_ITEM = "PIPELINE_CARD_CATALOG_ITEM"
}
export declare enum FilterSelectionType {
    UNKNOWN_SELECTION = "UNKNOWN_SELECTION",
    /** Allow to select only a single item */
    SINGLE_SELECTION = "SINGLE_SELECTION",
    /** Allow to select multiple items */
    MULTIPLE_SELECTION = "MULTIPLE_SELECTION"
}
export declare enum FilterOptionsType {
    UNKNOWN_FILTER_OPTIONS = "UNKNOWN_FILTER_OPTIONS",
    /** Static hardcoded options */
    STATIC = "STATIC",
    PROVIDER = "PROVIDER"
}
export interface StaticFilterOptions {
    /**
     * List of hardcoded options for a filter
     * @maxSize 50
     */
    data?: StaticFilterOption[];
}
export interface StaticFilterOption {
    /**
     * Title of a filter option
     * @minLength 1
     * @maxLength 500
     */
    label?: string;
    /**
     * Value of a filter option
     * @minLength 1
     * @maxLength 100
     */
    value?: string;
}
export interface ProviderFilterOptions {
    /**
     * Provider identifier for fetching filter options
     * @minLength 3
     * @maxLength 250
     */
    key?: string;
}
export interface ContentData {
    /**
     * Provider icon. Choose an icon name from the [Wix Design System](https://www.wixdesignsystem.com/).
     * @minLength 3
     * @maxLength 50
     */
    iconKey?: string | null;
    /**
     * Provider name.
     * @minLength 1
     * @maxLength 100
     */
    providerName?: string;
    /**
     * Item title.
     * @minLength 1
     * @maxLength 100
     */
    title?: string;
    /**
     * Button label.
     * @minLength 1
     * @maxLength 50
     */
    button?: string;
    /**
     * Item description.
     * @minLength 1
     * @maxLength 100
     */
    subtitle?: string | null;
    /** Learn more link. */
    learnMore?: LearnMore;
}
export interface LearnMore {
    /**
     * The url of the learn more link. If you want a dynamic url according to the user locale, you can add {{locale}} variable within the string.
     * @maxLength 2048
     */
    url?: string;
    /**
     * Optional link label.
     * @maxLength 500
     */
    label?: string | null;
}
export interface AdditionalStepInfo {
    /** ID of the widget associated with the step. */
    widgetId?: string;
    /**
     * one app (mobile) component id that will be opened to show additional step
     * @internal
     * @minLength 1
     * @maxLength 50
     */
    mobileComponentId?: string | null;
    /**
     * Title of the additional step.
     * @minLength 1
     * @maxLength 100
     */
    title?: string;
    /**
     * Subtitle of the additional step.
     * @maxLength 100
     */
    subtitle?: string | null;
    /** Hide item note if exists when showing selected item on additional step header, default: false. */
    hideItemNote?: boolean | null;
}
export interface CreateNewItemInfo {
    /** ID of the widget associated with the new item modal. */
    widgetId?: string;
    /**
     * one app (mobile) component id that will be opened to create a new item
     * @internal
     * @minLength 1
     * @maxLength 50
     */
    mobileComponentId?: string | null;
    /**
     * Button label for creating a new item
     * @minLength 1
     * @maxLength 50
     */
    buttonText?: string | null;
}
export interface ItemThumbnail extends ItemThumbnailOptionsOneOf {
    /** Configuration specific to images. */
    imageConfig?: ImageConfig;
    /** Configuration specific to avatars. */
    avatarConfig?: AvatarConfig;
    /** Thumbnail type */
    type?: ThumbnailType;
    /** Whether the thumbnail is hidden from the UI. */
    hidden?: boolean | null;
}
/** @oneof */
export interface ItemThumbnailOptionsOneOf {
    /** Configuration specific to images. */
    imageConfig?: ImageConfig;
    /** Configuration specific to avatars. */
    avatarConfig?: AvatarConfig;
}
export declare enum ThumbnailType {
    UNKNOWN_THUMBNAIL_TYPE = "UNKNOWN_THUMBNAIL_TYPE",
    IMAGE = "IMAGE",
    AVATAR = "AVATAR"
}
export interface ImageConfig {
    shape?: ImageShape;
}
export declare enum ImageShape {
    UNKNOWN_SHAPE = "UNKNOWN_SHAPE",
    /** Circle */
    CIRCLE = "CIRCLE",
    /** Square */
    SQUARE = "SQUARE",
    /** Rectangle */
    RECTANGLE = "RECTANGLE"
}
export interface AvatarConfig {
    shape?: AvatarShape;
}
export declare enum AvatarShape {
    UNKNOWN_SHAPE = "UNKNOWN_SHAPE",
    /** Circle */
    CIRCLE = "CIRCLE",
    /** Square */
    SQUARE = "SQUARE"
}
export declare enum PaginationMode {
    UNKNOWN_PAGINATION_MODE = "UNKNOWN_PAGINATION_MODE",
    CURSOR = "CURSOR",
    OFFSET = "OFFSET"
}
export interface TagOverridesEntry {
    /** The tag associated with the overrides. */
    tag?: Tag;
    /** The overrides for the tag. */
    overrides?: TagOverrides;
}
export interface TagOverrides {
    /** Additional fields associated with the provider. */
    additionalFields?: Record<string, any> | null;
    /** Display data such as provider name. */
    contentData?: ContentDataOverrides;
}
export interface ContentDataOverrides {
    /**
     * Provider name.
     * @minLength 1
     * @maxLength 100
     */
    providerName?: string | null;
}
export interface ItemsSelectionProviderConfigRenderOverrides {
    /** Whether to hide the search bar in the picker UI */
    hideSearch?: boolean | null;
}
export interface ListInstalledProvidersRequest {
    /** An optional tag to filter providers that have been tagged with the specified tag. */
    tag?: Tag;
}
export interface ListInstalledProvidersResponse {
    /** List of installed providers. */
    providers?: ItemsSelectionProvider[];
}
export interface ListProvidersRequest {
    /** An optional tag to filter providers that have been tagged with the specified tag. */
    tag?: Tag;
}
export interface ListProvidersResponse {
    /** List of registered providers. */
    providers?: ItemsSelectionProvider[];
}
export interface QueryItemsRequest {
    /** The provider key used to identify the provider being queried. */
    providerKey: string;
    /** An optional query object containing search parameters and filtering criteria. */
    query?: Query;
    /** An optional tag to change the content of the request. */
    tag?: Tag;
}
export interface Query extends QueryPagingMethodOneOf {
    /** Paging options to limit and skip the number of items. */
    paging?: Paging;
    /** Cursor token pointing to a page of results. Not used in the first request. Following requests include a cursor token and do not define `filter`. */
    cursorPaging?: CursorPaging;
    /**
     * Filter object.
     * See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) for more information.
     */
    filter?: Record<string, any> | null;
    /**
     * An optional repeated field that allows to specify sorting criteria for the search results.
     * @internal
     * @deprecated
     */
    sort?: Sorting[];
    /**
     * Plain text search for an exact match.
     *
     * Supported properties are defined in the `searchParams.fields` property of the Item Selection Provider configuration in the Wix Developers Center.
     *
     * Max: 100 characters
     */
    search?: string | null;
}
/** @oneof */
export interface QueryPagingMethodOneOf {
    /** Paging options to limit and skip the number of items. */
    paging?: Paging;
    /** Cursor token pointing to a page of results. Not used in the first request. Following requests include a cursor token and do not define `filter`. */
    cursorPaging?: CursorPaging;
}
export interface Sorting {
    /**
     * Name of the field to sort by.
     * @maxLength 512
     */
    fieldName?: string;
    /** Sort order. */
    order?: SortOrder;
    /**
     * When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by
     * a specific element from a collection, filter can/should be provided to ensure correct sort value is picked.
     *
     * If multiple filters are provided, they are combined with AND operator.
     *
     * Example:
     * Given we have document like {"id": "1", "nestedField": [{"price": 10, "region": "EU"}, {"price": 20, "region": "US"}]}
     * and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be
     * { fieldName: "nestedField.price", "select_items_by": [{"nestedField.region": "US"}] }
     * @internal
     * @maxSize 10
     */
    selectItemsBy?: Record<string, any>[] | null;
}
export declare enum SortOrder {
    ASC = "ASC",
    DESC = "DESC"
}
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 CursorPaging {
    /**
     * Maximum number of items to return in the results.
     * @max 100
     */
    limit?: number | null;
    /**
     * Pointer to the next or previous page in the list of results.
     *
     * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
     * Not relevant for the first request.
     * @maxLength 16000
     */
    cursor?: string | null;
}
export interface QueryItemsResponse {
    /** Items. */
    items?: Item[];
    /** Pagination. */
    pagingMetadata?: PagingMetadataV2;
    /** Optional rendering overrides. */
    renderOverrides?: RenderOverrides;
}
export interface Item {
    /** Item ID. */
    id?: string;
    /**
     * Item name.
     * @maxLength 250
     */
    name?: string | null;
    /**
     * Item description.
     * @maxLength 1000
     */
    description?: string | null;
    /** Item image. */
    image?: Image;
    /**
     * Additional information about the item. For example, an item's price.
     * @maxLength 100
     */
    note?: string | null;
    /**
     * Indicates whether the item has additional steps, additional step will replace any existing additional_data exists on the item.
     * @internal
     */
    hasAdditionalStep?: boolean | null;
    /**
     * Additional data associated with an item. The content of this object changes based on the Wix service defined in the `tag` field.
     * @internal
     * @deprecated Additional data associated with an item. The content of this object changes based on the Wix service defined in the `tag` field.
     * @replacedBy additional_fields
     * @targetRemovalDate 2025-01-01
     */
    additionalData?: AdditionalData;
    /** Additional fields associated with an item. The content of this object might changes based on the Wix service defined in the `tag` field. */
    additionalFields?: Record<string, any> | null;
}
export interface Image {
    /**
     * Image URL.
     * @maxLength 2048
     */
    url?: string | null;
}
export interface AdditionalData extends AdditionalDataDataOneOf {
    /** Additional data associated with ecom catalog order. */
    ecomCatalogData?: EcomCatalogData;
    /** Additional data associated with inbox */
    inboxData?: InboxData;
}
/** @oneof */
export interface AdditionalDataDataOneOf {
    /** Additional data associated with ecom catalog order. */
    ecomCatalogData?: EcomCatalogData;
    /** Additional data associated with inbox */
    inboxData?: InboxData;
}
export interface EcomCatalogData {
    /**
     * ID of the app that owns the order.
     * @format GUID
     */
    appId?: string;
    /**
     * ID of the catalog item associated with the order.
     * @minLength 1
     * @maxLength 36
     */
    catalogItemId?: string;
    /**
     * Price of the item associated with the order.
     * @decimalValue options { gte:0, lte:1000000000000000 }
     */
    price?: string;
    /** Additional options associated with the order. */
    options?: Record<string, any> | null;
}
export interface InboxData {
    /**
     * An array of actions that is supported by Inbox page
     * @maxSize 50
     */
    actions?: Action[];
}
export interface Action {
    /**
     * The title of the action
     * @maxLength 100
     */
    title?: string;
    /**
     * The url of the action
     * @maxLength 2048
     */
    url?: string;
}
export interface PagingMetadataV2 {
    /** 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. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
    total?: number | null;
    /** Flag that indicates the server failed to calculate the `total` field. */
    tooManyToCount?: boolean | null;
    /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
    cursors?: Cursors;
    /**
     * Indicates if there are more results after the current page.
     * If `true`, another page of results can be retrieved.
     * If `false`, this is the last page.
     * @internal
     */
    hasNext?: boolean | null;
}
export interface Cursors {
    /**
     * Cursor string pointing to the next page in the list of results.
     * @maxLength 16000
     */
    next?: string | null;
    /**
     * Cursor pointing to the previous page in the list of results.
     * @maxLength 16000
     */
    prev?: string | null;
}
export interface RenderOverrides {
    /** Optional empty state UI configuration for empty query items response. */
    emptyState?: QueryItemsEmptyState;
    /**
     * Total text to display in a custom consumer UI, for example "10 products", "1 service". The content of this text might change based on the Wix service defined in the `tag` field.
     * @maxLength 200
     */
    totalText?: string | null;
}
export interface QueryItemsEmptyState {
    /**
     * Title of the empty state.
     * @maxLength 200
     */
    title?: string | null;
    /**
     * Subtitle of the empty state.
     * @maxLength 200
     */
    subtitle?: string | null;
}
/** @docsIgnore */
export declare type QueryItemsApplicationErrors = {
    code?: 'PROVIDER_NOT_FOUND';
    description?: string;
    data?: Record<string, any>;
};
