/// <reference types="node" />
import type { EventEmitter } from 'events';
/**
 * The LanguageCode is a 2-letter code following the ISO 639-1 standard.
 */
export type LanguageCode = 'aa' | 'ab' | 'af' | 'ak' | 'sq' | 'am' | 'ar' | 'an' | 'hy' | 'as' | 'av' | 'ae' | 'ay' | 'az' | 'ba' | 'bm' | 'eu' | 'be' | 'bn' | 'bh' | 'bi' | 'bo' | 'bs' | 'br' | 'bg' | 'my' | 'ca' | 'cs' | 'ch' | 'ce' | 'zh' | 'cu' | 'cv' | 'kw' | 'co' | 'cr' | 'cy' | 'cs' | 'da' | 'de' | 'dv' | 'nl' | 'dz' | 'el' | 'en' | 'eo' | 'et' | 'eu' | 'ee' | 'fo' | 'fa' | 'fj' | 'fi' | 'fr' | 'fr' | 'fy' | 'ff' | 'ka' | 'de' | 'gd' | 'ga' | 'gl' | 'gv' | 'el' | 'gn' | 'gu' | 'ht' | 'ha' | 'he' | 'hz' | 'hi' | 'ho' | 'hr' | 'hu' | 'hy' | 'ig' | 'is' | 'io' | 'ii' | 'iu' | 'ie' | 'ia' | 'id' | 'ik' | 'is' | 'it' | 'jv' | 'ja' | 'kl' | 'kn' | 'ks' | 'ka' | 'kr' | 'kk' | 'km' | 'ki' | 'rw' | 'ky' | 'kv' | 'kg' | 'ko' | 'kj' | 'ku' | 'lo' | 'la' | 'lv' | 'li' | 'ln' | 'lt' | 'lb' | 'lu' | 'lg' | 'mk' | 'mh' | 'ml' | 'mi' | 'mr' | 'ms' | 'mk' | 'mg' | 'mt' | 'mn' | 'mi' | 'ms' | 'my' | 'na' | 'nv' | 'nr' | 'nd' | 'ng' | 'ne' | 'nl' | 'nn' | 'nb' | 'no' | 'ny' | 'oc' | 'oj' | 'or' | 'om' | 'os' | 'pa' | 'fa' | 'pi' | 'pl' | 'pt' | 'ps' | 'qu' | 'rm' | 'ro' | 'ro' | 'rn' | 'ru' | 'sg' | 'sa' | 'si' | 'sk' | 'sk' | 'sl' | 'se' | 'sm' | 'sn' | 'sd' | 'so' | 'st' | 'es' | 'sq' | 'sc' | 'sr' | 'ss' | 'su' | 'sw' | 'sv' | 'ty' | 'ta' | 'tt' | 'te' | 'tg' | 'tl' | 'th' | 'bo' | 'ti' | 'to' | 'tn' | 'ts' | 'tk' | 'tr' | 'tw' | 'ug' | 'uk' | 'ur' | 'uz' | 've' | 'vi' | 'vo' | 'cy' | 'wa' | 'wo' | 'xh' | 'yi' | 'yo' | 'za' | 'zh' | 'zu';
export type AssetType = 'document' | 'photo' | 'url' | 'page' | 'video' | 'raw' | 'audio' | 'icon' | 'webapp';
export interface AssetPermissions {
    annotate: boolean;
    download: boolean;
    share: boolean;
}
export interface OriginalAsset {
    id: string;
    slug: string;
    name: string;
    displayName: string;
    description: string;
    createdAt: number | string;
    updatedAt: number | string;
    expiresAt: number | string | null;
    type: AssetType;
    permissions: AssetPermissions;
}
export interface Asset {
    /** Id is not cross platform, use slug as unique identifier. */
    id: string;
    slug: string;
    name: string;
    displayName: string;
    description: string | null;
    createdAt: Date;
    updatedAt: Date;
    expiresAt: Date | null;
    type: AssetType;
    permissions: AssetPermissions;
}
export interface EnrichedAsset {
    /** Id is not cross platform, use slug as unique identifier. */
    id: string;
    slug: string;
    name: string;
    displayName: string;
    description: string | null;
    fileUrl: string;
    previewUrl: string;
    createdAt: Date;
    updatedAt: Date;
    expiresAt: Date | null;
    type: AssetType;
    permissions: AssetPermissions;
}
export type Version = number;
export interface OriginalUserInfo {
    id: string;
    email: string;
    user_name: string;
    full_name: string;
}
export interface UserInfo {
    /** Id is not cross platform */
    id: string;
    email: string;
    userName: string;
    fullName: string;
}
export interface DeviceInfo {
    locale: LanguageCode;
    /** On Windows, it will also return 'web' */
    app: 'web' | 'ios' | 'android';
}
export type Feature = 'shareEmail' | 'shareLink' | 'collections' | 'sharedSpaces';
export interface Collection {
    /** Id is not cross platform, use getCollections() to get the current platform Id. */
    id: string;
    name: string;
}
export interface SharedSpace {
    id: string;
}
export type ShareType = 'email' | 'link';
export interface ShareResultType {
    /** All assets were added to the share dialog and the dialog is shown. */
    success: string;
    /**
     * Some assets were not added to the share dialog, because they could be
     * expired, unshareable, deleted, ...
     */
    partial: string;
    /** No assets were added and the dialog is NOT shown. */
    error: string;
}
export type ShareResult = keyof ShareResultType;
export type ToastReason = 'timeout' | 'clicked';
export interface Toast {
    type: 'info' | 'success' | 'error';
    text: string;
    actionText?: string;
}
export type ModalReason = 'cancel' | string;
export interface ModalButton {
    reason: ModalReason;
    text: string;
    tinted: boolean;
}
export interface Modal {
    title: string;
    text: string;
    buttons: ModalButton[];
}
export type AnyEvent = unknown;
export interface UploadData {
    file: File | Blob;
    filename: string;
}
export interface UploadProgress {
    bytesTotal: number;
    bytesSent: number;
}
export interface UploadError {
    reason: string;
}
export interface PageViewTouchpoint {
    /**
     * The unique id for this touch point.
     * This should never change, not even across versions.
     */
    id: string;
    /**
     * The current name of this touch point. This can change over time.
     * The last name sent will be shown in the analytics.
     */
    name?: string;
    /**
     * The id of the page the user is currently on.
     */
    sourceId: string;
    /**
     * The name of the page the user is currently on.
     */
    sourceName?: string;
    /**
     * The id of the page this touch point is linking to. The id of the new page.
     */
    destinationId: string;
    /**
     * The current name of the page this touch point is linking to. The name of
     * the new page. The last name sent will be shown in the analytics.
     */
    destinationName?: string;
    fields?: {
        /**
         * Path representing the depth of the page (in this example, you could
         * compare on category level, item level and detail level)
         *
         * Example: 'category A/item B/detail C'
         * */
        pageviewDepth: string;
        /**
         * How the page is displayed (page, tab, slide, ...)
         *
         * Example: 'tab'
         */
        pageviewType: string;
    };
}
export interface EventTouchpoint {
    /**
     * The unique id for this touch point.
     * This should never change, not even across versions.
     */
    id: string;
    /**
     * The current name of this touch point. This can change over time.
     * The last send name will be shown in the analytics.
     */
    name?: string;
    /**
     * The id of the page the user is currently on.
     */
    sourceId: string;
    /**
     * The name of the page the user is currently on.
     */
    sourceName?: string;
    fields?: {
        /**
         * The object that was interacted with
         *
         * Example: 'Video'
         */
        eventCategory: string;
        /**
         * The type of interaction
         *
         * Example: 'play'
         */
        eventAction: string;
        /**
         * Useful for categorizing events
         *
         * Example: 'Fall Campaign'
         */
        eventLabel: string;
        /**
         * A numeric value associated with the event
         *
         * Example: 42
         */
        eventValue: number;
    };
}
export interface TrackEventPageView {
    type: 'pageview';
    touchpoint: PageViewTouchpoint;
}
export interface TrackEventEvent {
    type: 'event';
    touchpoint: EventTouchpoint;
}
export interface OriginalStatusEmitter extends EventEmitter {
    /**
     * Do something when the upload is queued.
     * @event
     */
    on(event: 'queued', listener: () => void): this;
    /**
     * Do something when uploading.
     * @event
     */
    on(event: 'uploading', listener: (data: UploadProgress) => void): this;
    /**
     * Do something when processing.
     * @event
     */
    on(event: 'processing', listener: () => void): this;
    /**
     * The upload has been successfully uploaded and is processed.
     * @event
     */
    on(event: 'success', listener: (data: {
        asset: OriginalAsset;
    }) => void): this;
    /**
     * At some point the upload failed.
     * @event
     */
    on(event: 'failed', listener: (error: UploadError) => void): this;
}
export interface StatusEmitter extends EventEmitter {
    /**
     * Do something when the upload is queued.
     * @event
     */
    on(event: 'queued', listener: () => void): this;
    /**
     * Do something when uploading.
     * @event
     */
    on(event: 'uploading', listener: (data: UploadProgress) => void): this;
    /**
     * Do something when processing.
     * @event
     */
    on(event: 'processing', listener: () => void): this;
    /**
     * The upload has been successfully uploaded and is processed.
     * @event
     */
    on(event: 'success', listener: (data: {
        asset: Asset;
    }) => void): this;
    /**
     * At some point the upload failed.
     * @event
     */
    on(event: 'failed', listener: (error: UploadError) => void): this;
}
export interface Label {
    value: string;
    description?: string;
    limit?: number;
}
export type OriginalLabel = Label | string;
export interface ContentUrl {
    type: 'url';
    value?: string;
    description?: string;
}
export interface ContentFolder {
    type: 'folder';
    value?: string;
    description?: string;
}
export interface ContentChannel {
    type: 'channel';
    value?: string;
    description?: string;
}
export interface ContentAsset {
    type: 'asset';
    value?: [string];
    result?: [string];
    description?: string;
}
export interface ContentAssetTags {
    type: 'tags';
    value?: {
        or?: string[];
        and?: string[];
    };
    result?: [string];
    description?: string;
}
export interface ContentPage {
    type: 'page';
    value?: [string];
    result?: [string];
    description?: string;
}
export interface ContentPageTags {
    type: 'pagetags';
    value?: {
        or?: string[];
        and?: string[];
    };
    result?: [string];
    description?: string;
}
export type Content = ContentUrl | ContentFolder | ContentChannel | ContentAsset | ContentAssetTags | ContentPage | ContentPageTags;
export type Labels = {
    [key: string]: Labels | Label;
} | Label;
export type OriginalLabels = {
    [key: string]: OriginalLabels | OriginalLabel;
} | OriginalLabel;
export type Contents = {
    [key: string]: Contents | Content;
} | Content;
export interface OriginalConfigJSON {
    labels: Record<string, OriginalLabels> | unknown[];
    contents: Record<string, Contents> | unknown[];
    assets?: Record<OriginalAsset['id'], OriginalAsset> | unknown[];
}
interface BaseConfigJSON {
    labels: Record<string, Labels>;
    contents: Record<string, Contents>;
}
/**
 * The ConfigJSON object is the computed result of the experience app editor
 * which is driven by the config.json file.
 */
export interface ConfigJSON extends BaseConfigJSON {
    /**
     * The maximum amount of assets returned is 2000, use getAssetsByTags if you
     * need more results.
     */
    assets: Record<Asset['id'], Asset>;
}
/**
 * The ConfigJSON object is the computed result of the experience app editor
 * which is driven by the config.json file, enriched with the {@link getAssetFileUrl}
 * and {@link getAssetPreviewUrl} method.
 */
export interface EnrichedConfigJSON extends BaseConfigJSON {
    /**
     * The maximum amount of assets returned is 2000, use getAssetsByTags if you
     * need more results.
     */
    assets: Record<EnrichedAsset['id'], EnrichedAsset>;
}
export interface ParseConfigOptions {
    localLabels?: boolean;
}
export interface PasswordModalConfig {
    description?: string;
    placeholder?: string;
    buttonText?: string;
    containerStyle?: string;
    descriptionStyle?: string;
    formStyle?: string;
    inputStyle?: string;
    buttonStyle?: string;
}
export {};
