From ed99f72403ef6aacba6ffe81ab14f65ee74a91ee Mon Sep 17 00:00:00 2001 From: Craig Bruce Date: Fri, 23 Mar 2018 14:15:59 +1100 Subject: [PATCH 001/180] Initial commit of cast types --- .../cast.framework.breaks.d.ts | 110 + .../cast.framework.d.ts | 773 +++++++ .../cast.framework.events.d.ts | 421 ++++ .../cast.framework.messages.d.ts | 1777 +++++++++++++++++ .../cast.framework.system.d.ts | 177 ++ .../cast.framework.ui.d.ts | 194 ++ .../chromecast-caf-receiver-tests.ts | 66 + types/chromecast-caf-receiver/index.d.ts | 25 + types/chromecast-caf-receiver/tsconfig.json | 22 + types/chromecast-caf-receiver/tslint.json | 1 + 10 files changed, 3566 insertions(+) create mode 100644 types/chromecast-caf-receiver/cast.framework.breaks.d.ts create mode 100644 types/chromecast-caf-receiver/cast.framework.d.ts create mode 100644 types/chromecast-caf-receiver/cast.framework.events.d.ts create mode 100644 types/chromecast-caf-receiver/cast.framework.messages.d.ts create mode 100644 types/chromecast-caf-receiver/cast.framework.system.d.ts create mode 100644 types/chromecast-caf-receiver/cast.framework.ui.d.ts create mode 100644 types/chromecast-caf-receiver/chromecast-caf-receiver-tests.ts create mode 100644 types/chromecast-caf-receiver/index.d.ts create mode 100644 types/chromecast-caf-receiver/tsconfig.json create mode 100644 types/chromecast-caf-receiver/tslint.json diff --git a/types/chromecast-caf-receiver/cast.framework.breaks.d.ts b/types/chromecast-caf-receiver/cast.framework.breaks.d.ts new file mode 100644 index 0000000000..4fed094a12 --- /dev/null +++ b/types/chromecast-caf-receiver/cast.framework.breaks.d.ts @@ -0,0 +1,110 @@ +// Type definitions for chromecast-caf-receiver 3.x +// Project: https://developers.google.com/cast/docs/reference/caf_receiver/ +// Definitions by: Craig Bruce https://github.com/craigrbruce +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// +/// +/// +/// +/// +/// + +import { Break, BreakClip } from './cast.framework.messages'; + +export = cast.framework.breaks; + +declare namespace cast.framework.breaks { + export class BreakSeekData { + constructor(seekFrom: number, seekTo: number, breaks: Break[]); + + /** + * List of breaks + */ + breaks: Break[]; + + /** + * Current playback time + */ + seekFrom: number; + + /** + * The time to seek to + */ + seekTo: number; + } + + /** Provide context information for break clip load interceptor. */ + export class BreakClipLoadInterceptorContext { + constructor(brk: Break); + + /** + * The container break for the break clip + */ + break: Break; + } + + /** Interface to manage breaks */ + export interface BreakManager { + /** + * Get current media break by id. + * @param {*} id + */ + getBreakById(id: string): Break; + + /** + * Get current media break clip by id + * @param {*} id + */ + getBreakClipById(id: string): BreakClip; + + /** Get current media break clips. */ + getBreakClips(): BreakClip[]; + + /** Get current media breaks. */ + getBreaks(): Break[]; + + /** Returns true if watched breaks should be played. */ + getPlayWatchedBreak(): boolean; + + /** + * Provide an interceptor to allow developer to insert more break clips or modify current break clip before a break is started. + * If interceptor is null it will reset the interceptor to default one. + * By default VAST fetching and parsing logic in default interceptor. + * So if customized interceptor is set by developer; + * the VAST logic will be overridden and developers should implement their own VAST fetching and parsing logic in the provided interceptor. + * @param {*} interceptor + */ + setBreakClipLoadInterceptor( + interceptor: ( + breakClip: BreakClip, + breakClipLoaderContext?: BreakClipLoadInterceptorContext + ) => void + ): void; + + /** + * Provide an interceptor for developer to specify what breaks they want to play after seek. + * @param {*} seekInterceptor + */ + setBreakSeekInterceptor( + seekInterceptor: (breakSeekData: BreakSeekData) => void + ): void; + + /** + * Set a flag to control if the watched client stitching break should be played. + * @param {*} playWatchedBreak + */ + setPlayWatchedBreak(playWatchedBreak: boolean): void; + + /** + * Provide an interceptor to modify VAST tracking URL before it is being sent to server. + * The input of the interceptor is a string of the tracking URL. + * The interceptor can either return a modified string of URL or a Promise of modified string of URL. + * The interceptor can also return null if you want to send the tracking URL by your own code instead of by CAF. + * @param {*} interceptor + */ + setVastTrackingInterceptor( + interceptor?: (trackingUrl: string) => void + ): void; + } +} diff --git a/types/chromecast-caf-receiver/cast.framework.d.ts b/types/chromecast-caf-receiver/cast.framework.d.ts new file mode 100644 index 0000000000..a22e9a24b9 --- /dev/null +++ b/types/chromecast-caf-receiver/cast.framework.d.ts @@ -0,0 +1,773 @@ +// Type definitions for chromecast-caf-receiver 3.x +// Project: https://developers.google.com/cast/docs/reference/caf_receiver/ +// Definitions by: Craig Bruce https://github.com/craigrbruce +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// +/// +/// +/// +/// +/// + +import { EventType } from './cast.framework.events'; +import { + PlayerState, + PlayStringId, + ErrorType, + ErrorReason, + IdleReason, + MessageType, + Track, + TextTrackStyle, + QueueItem, + LoadRequestData, + QueueData, + Break, + LiveSeekableRange, + MediaInformation, + ErrorData, + RequestData, +} from './cast.framework.messages'; +import { BreakManager } from './cast.framework.breaks'; +import { EventHandler, RequestHandler, BinaryHandler } from './cast'; +import { + ApplicationData, + Sender, + StandbyState, + SystemState, +} from './cast.framework.system'; + +export = cast.framework; + +declare namespace cast.framework { + export type LoggerLevel = + | 'DEBUG' + | 'VERBOSE' + | 'INFO' + | 'WARNING' + | 'ERROR' + | 'NONE'; + + export type ContentProtection = + | 'NONE' + | 'CLEARKEY' + | 'PLAYREADY' + | 'WIDEVINE'; + + /** + * Manages text tracks. + */ + export class TextTracksManager { + constructor(params: any); + + /** + * Adds text tracks to the list. + */ + addTracks(tracks: Track[]): void; + + /** + * Creates a text track. + */ + createTrack(): Track; + + /** + * Gets all active text ids. + */ + getActiveIds(): number[]; + + /** + * Gets all active text tracks. + */ + getActiveTracks(): Track[]; + + /** + * Returns the current text track style. + */ + getTextTracksStyle(): TextTrackStyle; + + /** + * Gets text track by id. + */ + getTrackById(id: number): Track; + + /** + * Returns all text tracks. + */ + getTracks(): Track[]; + + /** + * Gets text tracks by language. + */ + getTracksByLanguage(language: string): Track[]; + + /** + * Sets text tracks to be active by id. + */ + setActiveByIds(newIds: number[]): void; + + /** + * Sets text tracks to be active by language. + */ + setActiveByLanguage(language: string): void; + + /** + * Sets text track style. + */ + setTextTrackStyle(style: TextTrackStyle): void; + } + + /** + * QueueManager exposes several queue manipulation APIs to developers. + */ + export class QueueManager { + constructor(params: any); + + /** + * Returns the current queue item. + */ + getCurrentItem(): QueueItem; + + /** + * Returns the index of the current queue item. + */ + getCurrentItemIndex(): number; + + /** + * Returns the queue items. + */ + getItems(): QueueItem[]; + + /** + * Inserts items into the queue. + */ + insertItems(items: QueueItem[], insertBefore?: number): void; + + /** + * Removes items from the queue. + */ + removeItems(itemIds: number[]): void; + + /** + * Sets whether to limit the number of queue items to be reported in Media Status (default is true). + */ + setQueueStatusLimit(limitQueueItemsInStatus: boolean): void; + + /** + * Updates existing queue items by matching itemId. + */ + updateItems(items: QueueItem[]): void; + } + + /** + * Base implementation of a queue. + */ + export class QueueBase { + /** + * Fetches a window of items using the specified item id as reference; called by the receiver MediaManager when it needs more queue items; often as a request from senders. If only one of nextCount and prevCount is non-zero; fetchItems should only return items after or before the reference item; if both nextCount and prevCount are non-zero; a window of items including the reference item should be returned. + */ + fetchItems( + itemId: number, + nextCount: number, + prevCount: number + ): QueueItem[] | Promise; + + /** + * Initializes the queue with the requestData. This is called when a new LOAD request comes in to the receiver. If this returns or resolves to null; our default queueing implementation will create a queue based on queueData.items or the single media in the load request data. + */ + initialize(requestData: LoadRequestData): QueueData | Promise; + + /** + * Returns next items after the reference item; often the end of the current queue; called by the receiver MediaManager. + */ + nextItems(itemId?: number): QueueItem[] | Promise; + + /** + * Sets the current item with the itemId; called by the receiver MediaManager when it changes the current playing item. + */ + onCurrentItemIdChanged(itemId: number): void; + + /** + * A callback for informing the following items have been inserted into the receiver queue in this session. A cloud based implementation can optionally choose to update its queue based on the new information. + */ + onItemsInserted(items: QueueItem[], insertBefore?: number): void; + + /** + * A callback for informing the following items have been removed from the receiver queue in this session. A cloud based implementation can optionally choose to update its queue based on the new information. + */ + onItemsRemoved(itemIds: number[]): void; + + /** + * Returns previous items before the reference item; often at the beginning of the queue; called by the receiver MediaManager. + */ + prevItems(itemId?: number): QueueItem[] | Promise; + + /** + * Shuffles the queue and returns new queue items. Returns null if the operation is not supported. + */ + shuffle(): QueueItem[] | Promise; + } + + /** + * Controls and monitors media playback. + */ + export class PlayerManager { + constructor(params: any); + + /** + * Adds an event listener for player event. + */ + addEventListener: ( + eventType: EventType | EventType[], + eventListener: EventHandler + ) => void; + + /** + * Sends a media status message to all senders (broadcast). Applications use this to send a custom state change. + */ + broadcastStatus( + includeMedia?: boolean, + requestId?: number, + customData?: any, + includeQueueItems?: boolean + ): void; + + /** + * + */ + getAudioTracksManager(): AudioTracksManager; + + /** + * Returns current time in sec in currently-playing break clip. + */ + getBreakClipCurrentTimeSec(): number; + + /** + * Returns duration in sec of currently-playing break clip. + */ + getBreakClipDurationSec(): number; + + /** + * Obtain the breaks (Ads) manager. + */ + getBreakManager(): BreakManager; + + /** + * Returns list of breaks. + */ + getBreaks(): Break[]; + + /** + * Gets current time in sec of current media. + */ + getCurrentTimeSec(): number; + + /** + * Gets duration in sec of currently playing media. + */ + getDurationSec(): number; + + /** + * Returns live seekable range with start and end time in seconds. The values are media time based. + */ + getLiveSeekableRange(): LiveSeekableRange; + + /** + * Gets media information of current media. + */ + getMediaInformation(): MediaInformation; + + /** + * Returns playback configuration. + */ + getPlaybackConfig(): PlaybackConfig; + + /** + * Returns current playback rate. + */ + getPlaybackRate(): number; + + /** + * Gets player state. + */ + getPlayerState(): PlayerState; + + /** + * Get the preferred playback rate. (Can be used on shutdown event to save latest preferred playback rate to a persistent storage; so it can be used in next session in the cast options). + */ + getPreferredPlaybackRate(): number; + + /** + * Get the preferred text track language. + */ + getPreferredTextLanguage(): string; + + /** + * Obtain QueueManager API. + */ + getQueueManager(): QueueManager; + + /** + * + */ + getTextTracksManager(): TextTracksManager; + + /** + * Loads media. + */ + load(loadRequest: LoadRequestData): Promise; + + /** + * Pauses currently playing media. + */ + pause(): void; + + /** + * Plays currently paused media. + */ + play(): void; + + /** + * Requests a text string to be played back locally on the receiver device. + */ + playString(stringId: PlayStringId, args?: string[]): Promise; + + /** + * Request Google Assistant to refresh the credentials. Only works if the original credentials came from the assistant. + */ + refreshCredentials(): Promise; + + /** + * Removes the event listener added for given player event. If event listener is not added; it will be ignored. + */ + removeEventListener( + eventType: EventType | EventType[], + eventListener: EventHandler + ): void; + + /** + * Seeks in current media. + */ + seek(seekTime: number): void; + + /** + * Sends an error to a specific sender + */ + sendError( + senderId: string, + requestId: number, + type: ErrorType, + reason?: ErrorReason, + customData?: any + ): void; + + /** + * Send local media request. + */ + sendLocalMediaRequest(request: RequestData): void; + + /** + * Sends a media status message to a specific sender. + */ + sendStatus( + senderId: string, + requestId: number, + includeMedia?: boolean, + customData?: any, + includeQueueItems?: boolean + ): void; + + /** + * Sets the IDLE reason. This allows applications that want to force the IDLE state to indicate the reason that made the player going to IDLE state (a custom error; for example). The idle reason will be sent in the next status message. NOTE: Most applications do not need to set this value; it is only needed if they want to make the player go to IDLE in special circumstances and the default idleReason does not reflect their intended behavior. + */ + setIdleReason(idleReason: IdleReason): void; + + /** + * Sets MediaElement to use. If Promise of MediaElement is set; media begins playback after Promise is resolved. + */ + setMediaElement(mediaElement: HTMLMediaElement): void; + + /** + * Sets media information. + */ + setMediaInformation( + mediaInformation: MediaInformation, + opt_broadcast?: boolean + ): void; + + /** + * Sets a handler to return or modify PlaybackConfig; for a specific load request. The handler paramaters are the load request data and default playback config for the receiver (provided in the context options). The handler should returns a modified playback config; or null to prevent the media from playing. The return value can be a promise to allow waiting for data from the server. + */ + setMediaPlaybackInfoHandler( + handler: ( + loadRequestData: LoadRequestData, + playbackConfig: PlaybackConfig + ) => void + ): void; + + /** + * Sets a handler to return the media url for a load request. This handler can be used to avoid having the media content url published as part of the media status. By default the media contentId is used as the content url. + */ + setMediaUrlResolver( + resolver: (loadRequestData: LoadRequestData) => void + ): void; + + /** + * Provide an interceptor of incoming and outgoing messages. The interceptor can update the request data; and return updated data; a promise of updated data if need to get more data from the server; or null if the request should not be handled. Note that if load message interceptor is provided; and no interceptor is provided for preload - the load interceptor will be called for preload messages. + */ + setMessageInterceptor( + type: MessageType, + interceptor: (requestData: RequestData) => Promise + ): void; + + /** + * Sets playback configuration on the PlayerManager. + */ + setPlaybackConfig(playbackConfig: PlaybackConfig): void; + + /** + * Set the preferred playback rate for follow up load or media items. The preferred playback rate will be updated automatically to the latest playback rate that was provided by a load request or explicit set of playback rate. + */ + setPreferredPlaybackRate(preferredPlaybackRate: number): void; + + /** + * Set the preferred text track language. The preferred text track language will be updated automatically to the latest enabled language by a load request or explicit change to text tracks. (Should be called only in idle state; and Will only apply to next loaded media). + */ + setPreferredTextLanguage(preferredTextLanguage: string): void; + + /** + * Stops currently playing media. + */ + stop(): void; + } + + /** + * Configuration to customize playback behavior. + */ + export class PlaybackConfig { + /** + * Duration of buffered media in seconds to start buffering. + */ + autoPauseDuration?: number; + + /** + * Duration of buffered media in seconds to start/resume playback after auto-paused due to buffering. + */ + autoResumeDuration?: number; + + /** + * Minimum number of buffered segments to start/resume playback. + */ + autoResumeNumberOfSegments?: number; + + /** + * A function to customize request to get a caption segment. + */ + captionsRequestHandler?: RequestHandler; + + /** + * Initial bandwidth in bits in per second. + */ + initialBandwidth?: number; + + /** + * Custom license data. + */ + licenseCustomData?: string; + + /** + * Handler to process license data. The handler is passed the license data; and returns the modified license data. + */ + licenseHandler?: BinaryHandler; + + /** + * A function to customize request to get a license. + */ + licenseRequestHandler?: RequestHandler; + + /** + * Url for acquiring the license. + */ + licenseUrl?: string; + + /** + * Handler to process manifest data. The handler is passed the manifest; and returns the modified manifest. + */ + manifestHandler?: (manifest: string) => string; + + /** + * A function to customize request to get a manifest. + */ + manifestRequestHandler?: RequestHandler; + + /** + * Preferred protection system to use for decrypting content. + */ + protectionSystem: ContentProtection; + + /** + * Handler to process segment data. The handler is passed the segment data; and returns the modified segment data. + */ + segmentHandler?: BinaryHandler; + + /** + * A function to customize request information to get a media segment. + */ + segmentRequestHandler?: RequestHandler; + + /** + * Maximum number of times to retry a network request for a segment. + */ + segmentRequestRetryLimit?: number; + } + /** + * HTTP(s) Request/Response information. + */ + export class NetworkRequestInfo { + /** + * The content of the request. Can be used to modify license request body. + */ + content: Uint8Array; + + /** + * An object containing properties that you would like to send in the header. + */ + headers: any; + + /** + * The URL requested. + */ + url: string; + + /** + * Indicates whether CORS Access-Control requests should be made using credentials such as cookies or authorization headers. + */ + withCredentials: boolean; + } + /** Cast receiver context options. All options are optionals. */ + export class CastReceiverOptions { + /** + * Optional map of custom messages namespaces to initialize and their types. + * Custom messages namespaces need to be initiated before the application started; + * so it is best to provide the namespaces in the receiver options. + * (The default type of a message bus is JSON; if not provided here). + */ + customNamespaces?: any; + + /** + * Sender id used for local requests. Default value is 'local'. + */ + localSenderId?: string; + + /** + * Maximum time in seconds before closing an idle sender connection. + * Setting this value enables a heartbeat message to keep the connection alive. + * Used to detect unresponsive senders faster than typical TCP timeouts. + * The minimum value is 5 seconds; there is no upper bound enforced but practically it's minutes before platform TCP timeouts come into play. + * Default value is 10 seconds. + */ + maxInactivity?: number; + + /** + * Optional media element to play content with. Default behavior is to use the first found media element in the page. + */ + mediaElement?: HTMLMediaElement; + + /** + * Optional playback configuration. + */ + playbackConfig?: PlaybackConfig; + + /** + * If this is true; the watched client stitching break will also be played. + */ + playWatchedBreak?: boolean; + + /** + * Preferred value for player playback rate. It is used if playback rate value is not provided in the load request. + */ + preferredPlaybackRate?: number; + + /** + * Preferred text track language. It is used if no active track is provided in the load request. + */ + preferredTextLanguage?: string; + + /** + * Optional queue implementation. + */ + queue?: QueueBase; + + /** + * Text that represents the application status. + * It should meet internationalization rules as may be displayed by the sender application. + */ + statusText?: string; + + /** + * A bitmask of media commands supported by the application. + * LOAD; PLAY; STOP; GET_STATUS must always be supported. + * If this value is not provided; then PAUSE; SEEK; STREAM_VOLUME; STREAM_MUTE are assumed to be supported too. + */ + supportedCommands?: number; + + /** + * Indicate that MPL should be used for DASH content. + */ + useLegacyDashSupport?: boolean; + + /** + * An integer used as an internal version number. + * This number is used only to distinguish between receiver releases and higher numbers do not necessarily have to represent newer releases. + */ + versionCode?: number; + } + + /** Manages loading of underlying libraries and initializes underlying cast receiver SDK. */ + export class CastReceiverContext { + /** Returns the CastReceiverContext singleton instance. */ + static getInstance(): CastReceiverContext; + + constructor(params: any); + + /** + * Sets message listener on custom message channel. + */ + addCustomMessageListener(namespace: string, listener: EventHandler): void; + + /** + * Add listener to cast system events. + */ + addEventListener(type: EventType, handler: EventHandler): void; + + /** + * Checks if the given media params of video or audio streams are supported by the platform. + */ + canDisplayType( + mimeType: string, + codecs?: string, + width?: number, + height?: number, + framerate?: number + ): boolean; + + /** + * Provides application information once the system is ready; otherwise it will be null. + */ + getApplicationData(): ApplicationData; + + /** + * Provides device capabilities information once the system is ready; otherwise it will be null. + * If an empty object is returned; the device does not expose any capabilities information. + */ + getDeviceCapabilities(): any; + + /** + * Get Player instance that can control and monitor media playback. + */ + getPlayerManager(): PlayerManager; + + /** + * Get a sender by sender id + */ + getSender(senderId: string): Sender; + + /** + * Gets a list of currently-connected senders. + */ + getSenders(): Sender[]; + + /** + * Reports if the cast application's HDMI input is in standby. + */ + getStandbyState(): StandbyState; + + /** + * Provides application information about the system state. + */ + getSystemState(): SystemState; + + /** + * Reports if the cast application is the HDMI active input. + */ + getVisibilityState(): VisibilityState; + + /** + * When the application calls start; the system will send the ready event to indicate + * that the application information is ready and the application can send messages as soon as there is one sender connected. + */ + isSystemReady(): boolean; + + /** + * Start loading player js. This can be used to start loading the players js code in early stage of starting the receiver before calling start. + * This function is a no-op if players were already loaded (start was called). + */ + loadPlayerLibraries(useLegacyDashSupport?: boolean): void; + + /** + * Remove a message listener on custom message channel. + */ + removeCustomMessageListener( + namespace: string, + listener: EventHandler + ): void; + + /** + * Remove listener to cast system events. + */ + removeEventListener(type: EventType, handler: EventHandler): void; + + /** + * Sends a message to a specific sender. + */ + sendCustomMessage(namespace: string, senderId: string, message: any): void; + + /** + * This function should be called in response to the feedbackstarted event if the application + * add debug state information to log in the feedback report. + * It takes in a parameter ‘message’ that is a string that represents the debug information that the application wants to log. + */ + sendFeedbackMessage(feedbackMessage: string): void; + + /** + * Sets the application state. The application should call this when its state changes. + * If undefined or set to an empty string; the value of the Application Name established during application + * registration is used for the application state by default. + */ + setApplicationState(statusText: string): void; + + /** + * Sets the receiver inactivity timeout. + * It is recommended to set the maximum inactivity value when calling Start and not changing it. + * This API is just provided for development/debugging purposes. + */ + setInactivityTimeout(maxInactivity: number): void; + + /** + * Sets the log verbosity level. + */ + setLoggerLevel(level: LoggerLevel): void; + + /** + * Initializes system manager and media manager; so that receiver app can receive requests from senders. + */ + start(options?: CastReceiverOptions): CastReceiverContext; + + /** + * Shutdown receiver application. + */ + stop(): void; + } + + /** Manages audio tracks. */ + export class AudioTracksManager { + constructor(params: any); + getActiveId(): number; + getActiveTrack(): Track; + getTrackById(id: number): Track; + getTracks(): Track[]; + getTracksByLanguage(language: string): Track[]; + setActiveById(id: number): void; + setActiveByLanguage(language: string): void; + } +} diff --git a/types/chromecast-caf-receiver/cast.framework.events.d.ts b/types/chromecast-caf-receiver/cast.framework.events.d.ts new file mode 100644 index 0000000000..c5e2e71771 --- /dev/null +++ b/types/chromecast-caf-receiver/cast.framework.events.d.ts @@ -0,0 +1,421 @@ +// Type definitions for chromecast-caf-receiver 3.x +// Project: https://developers.google.com/cast/docs/reference/caf_receiver/ +// Definitions by: Craig Bruce https://github.com/craigrbruce +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// +/// +/// +/// +/// +/// + +import { + RequestData, + MediaInformation, + Track, + MediaStatus, +} from './cast.framework.messages'; +export = cast.framework.events; + +declare namespace cast.framework.events { + export type EventType = + | 'ALL' + | 'ABORT' + | 'CAN_PLAY' + | 'CAN_PLAY_THROUGH' + | 'DURATION_CHANGE' + | 'EMPTIED' + | 'ENDED' + | 'LOADED_DATA' + | 'LOADED_METADATA' + | 'LOAD_START' + | 'PAUSE' + | 'PLAY' + | 'PLAYING' + | 'PROGRESS' + | 'RATE_CHANGE' + | 'SEEKED' + | 'SEEKING' + | 'STALLED' + | 'TIME_UPDATE' + | 'SUSPEND' + | 'WAITING' + | 'BITRATE_CHANGED' + | 'BREAK_STARTED' + | 'BREAK_ENDED' + | 'BREAK_CLIP_LOADING' + | 'BREAK_CLIP_STARTED' + | 'BREAK_CLIP_ENDED' + | 'BUFFERING' + | 'CACHE_LOADED' + | 'CACHE_HIT' + | 'CACHE_INSERTED' + | 'CLIP_STARTED' + | 'CLIP_ENDED' + | 'EMSG' + | 'ERROR' + | 'ID3' + | 'MEDIA_STATUS' + | 'MEDIA_FINISHED' + | 'PLAYER_PRELOADING' + | 'PLAYER_PRELOADING_CANCELLED' + | 'PLAYER_LOAD_COMPLETE' + | 'PLAYER_LOADING' + | 'SEGMENT_DOWNLOADED' + | 'REQUEST_SEEK' + | 'REQUEST_LOAD' + | 'REQUEST_STOP' + | 'REQUEST_PAUSE' + | 'REQUEST_PLAY' + | 'REQUEST_PLAY_AGAIN' + | 'REQUEST_PLAYBACK_RATE_CHANGE' + | 'REQUEST_SKIP_AD' + | 'REQUEST_VOLUME_CHANGE' + | 'REQUEST_EDIT_TRACKS_INFO' + | 'REQUEST_EDIT_AUDIO_TRACKS' + | 'REQUEST_SET_CREDENTIALS' + | 'REQUEST_LOAD_BY_ENTITY' + | 'REQUEST_USER_ACTION' + | 'REQUEST_DISPLAY_STATUS' + | 'REQUEST_CUSTOM_COMMAND' + | 'REQUEST_FOCUS_STATE' + | 'REQUEST_QUEUE_LOAD' + | 'REQUEST_QUEUE_INSERT' + | 'REQUEST_QUEUE_UPDATE' + | 'REQUEST_QUEUE_REMOVE' + | 'REQUEST_QUEUE_REORDER' + | 'REQUEST_QUEUE_GET_ITEM_RANGE' + | 'REQUEST_QUEUE_GET_ITEMS' + | 'REQUEST_QUEUE_GET_ITEM_IDS' + | 'REQUEST_PRECACHE'; + + export type DetailedErrorCode = + | 'MEDIA_UNKNOWN' + | 'MEDIA_ABORTED' + | 'MEDIA_DECODE' + | 'MEDIA_NETWORK' + | 'MEDIA_SRC_NOT_SUPPORTED' + | 'SOURCE_BUFFER_FAILURE' + | 'MEDIAKEYS_UNKNOWN' + | 'MEDIAKEYS_NETWORK' + | 'MEDIAKEYS_UNSUPPORTED' + | 'MEDIAKEYS_WEBCRYPTO' + | 'NETWORK_UNKNOWN' + | 'SEGMENT_NETWORK' + | 'HLS_NETWORK_MASTER_PLAYLIST' + | 'HLS_NETWORK_PLAYLIST' + | 'HLS_NETWORK_NO_KEY_RESPONSE' + | 'HLS_NETWORK_KEY_LOAD' + | 'HLS_NETWORK_INVALID_SEGMENT' + | 'HLS_SEGMENT_PARSING' + | 'DASH_NETWORK' + | 'DASH_NO_INIT' + | 'SMOOTH_NETWORK' + | 'SMOOTH_NO_MEDIA_DATA' + | 'MANIFEST_UNKNOWN' + | 'HLS_MANIFEST_MASTER' + | 'HLS_MANIFEST_PLAYLIST' + | 'DASH_MANIFEST_UNKNOWN' + | 'DASH_MANIFEST_NO_PERIODS' + | 'DASH_MANIFEST_NO_MIMETYPE' + | 'DASH_INVALID_SEGMENT_INFO' + | 'SMOOTH_MANIFEST' + | 'SEGMENT_UNKNOWN' + | 'TEXT_UNKNOWN' + | 'APP' + | 'BREAK_CLIP_LOADING_ERROR' + | 'BREAK_SEEK_INTERCEPTOR_ERROR' + | 'IMAGE_ERROR' + | 'LOAD_INTERRUPTED' + | 'GENERIC'; + + export type EndedReason = + | 'END_OF_STREAM' + | 'ERROR' + | 'STOPPED' + | 'INTERRUPTED' + | 'SKIPPED' + | 'BREAK_SWITCH'; + + /** + * Event data for @see{@link EventType.SEGMENT_DOWNLOADED} event. + */ + export class SegmentDownloadedEvent { + constructor(downloadTime?: number, size?: number); + + /** + * The time it took to download the segment; in milliseconds. + */ + downloadTime?: number; + + /** + * The number of bytes in the segment. + */ + size?: number; + } + + /** + * Event data for all events that represent requests made to the receiver. + */ + export class RequestEvent { + constructor(type: EventType, requestData?: RequestData, senderId?: string); + + /** + * The data that was sent with the request. + */ + requestData?: RequestData; + + /** + * The sender id the request came from. + */ + senderId?: string; + } + + /** + * Event data for @see{@link EventType.MEDIA_STATUS} event. + */ + export class MediaStatusEvent { + constructor(mediaStatus?: MediaStatus); + + /** + * The media status that was sent. + */ + mediaStatus?: MediaStatus; + } + /** + * Event data for pause events forwarded from the MediaElement. + */ + export class MediaPauseEvent { + constructor(currentMediaTime?: number, ended?: boolean); + + /** + * Indicate if the media ended (indicates the pause was fired due to stream reached the end). + */ + ended?: boolean; + } + /** + * Event data for @see{@link EventType.MEDIA_FINISHED} event. + */ + export class MediaFinishedEvent { + constructor(currentMediaTime?: number, endedReason?: EndedReason); + + /** + * The time when the media finished (in seconds). For an item in a queue; this value represents the time in the currently playing queue item ( where 0 means the queue item has just started). + */ + currentTime?: number; + + /** + * The reason the media finished. + */ + endedReason?: EndedReason; + } + /** + * Event data for all events forwarded from the MediaElement. + */ + export class MediaElementEvent { + constructor(type: EventType, currentMediaTime?: number); + + /** + * The time in the currently playing clip when the event was fired (in seconds). Undefined if playback has not started yet. + */ + currentMediaTime?: number; + } + /** + * Event data for all events pertaining to processing a load / preload request. made to the player. + */ + export class LoadEvent { + constructor(type: EventType, media?: MediaInformation); + + /** + * Information about the media being loaded. + */ + media: MediaInformation; + } + /** + * Event data for @see{@link EventType.INBAND_TRACK_ADDED} event. + */ + export class InbandTrackAddedEvent { + constructor(track: Track); + + /** + * Added track. + */ + track: Track; + } + + /** Event data for @see{@link EventType.ID3} event. */ + export class Id3Event { + constructor(segmentData: Uint8Array); + + /** + * The segment data. + */ + segmentData: Uint8Array; + } + /** + * Event data superclass for all events dispatched by @see{@link PlayerManager} + */ + export class Event { + constructor(type: EventType); + + /** + * Type of the event. + */ + type: EventType; + } + /** + * Event data for @see{@link EventType.EMSG} event. + */ + export class EmsgEvent { + constructor(emsgData: any); + + /** + * The time that the event ends (in presentation time). Undefined if using legacy Dash support. + */ + endTime: any; + + /** + * The duration of the event (in units of timescale). Undefined if using legacy Dash support. + */ + eventDuration: any; + + /** + * A field identifying this instance of the message. Undefined if using legacy Dash support. + */ + id: any; + + /** + * Body of the message. Undefined if using legacy Dash support. + */ + messageData: any; + + /** + * The offset that the event starts; relative to the start of the segment this is contained in (in units of timescale). Undefined if using legacy Dash support. + */ + presentationTimeDelta: any; + + /** + * Identifies the message scheme. Undefined if using legacy Dash support. + */ + schemeIdUri: any; + + /** + * The segment data. This is only defined if using legacy Dash support. + */ + segmentData: any; + + /** + * The time that the event starts (in presentation time). Undefined if using legacy Dash support. + */ + startTime: any; + + /** + * Provides the timescale; in ticks per second. Undefined if using legacy Dash support. + */ + timescale: any; + + /** + * Specifies the value for the event. Undefined if using legacy Dash support. + */ + value: any; + } + /** + * Event data for @see{@link EventType.CLIP_ENDED} event. + */ + export class ClipEndedEvent { + constructor(currentMediaTime: number, endedReason?: EndedReason); + + /** + * The time in media (in seconds) when clip ended. + */ + currentMediaTime: number; + + /** + * The reason the clip ended. + */ + endedReason?: EndedReason; + } + + /** + * Event data for @see{@link EventType.CACHE_LOADED} event. + */ + export class CacheLoadedEvent { + constructor(media?: MediaInformation); + + /** + * Information about the media being cached. + */ + media: MediaInformation; + } + + export class CacheItemEvent { + constructor(type: EventType, url: string); + + /** + * The URL of data fetched from cache + */ + url: string; + } + + export class BufferingEvent { + constructor(isBuffering: boolean); + + /** + * True if the player is entering a buffering state. + */ + isBuffering: boolean; + } + + export class BreaksEvent { + constructor( + type: EventType, + currentMediaTime?: number, + index?: number, + total?: number, + whenSkippable?: number, + endedReason?: EndedReason, + breakClipId?: string + ); + + /** + * The break clip's id. Refer to BreakClip.id + */ + breakClipId: string; + + /** + * The time in the currently playing media when the break event occurred. + */ + currentMediaTime: string; + + /** + * The reason the break clip ended. + */ + endedReason: EndedReason; + + /** + * Index of break clip; which starts from 1. + */ + index: number; + + /** + * Total number of break clips. + */ + total: number; + + /** + * When to skip current break clip in sec; after break clip begins to play. + */ + whenSkippable: number; + } + + /** + * Event data for @see {@link EventType.BITRATE_CHANGED} event. + */ + export class BitrateChangedEvent { + constructor(totalBitrate?: number); + + /** The bitrate of the media (audio and video) in bits per second. */ + totalBitrate: number; + } +} diff --git a/types/chromecast-caf-receiver/cast.framework.messages.d.ts b/types/chromecast-caf-receiver/cast.framework.messages.d.ts new file mode 100644 index 0000000000..dc5c1ac07b --- /dev/null +++ b/types/chromecast-caf-receiver/cast.framework.messages.d.ts @@ -0,0 +1,1777 @@ +// Type definitions for chromecast-caf-receiver 3.x +// Project: https://developers.google.com/cast/docs/reference/caf_receiver/ +// Definitions by: Craig Bruce https://github.com/craigrbruce +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// +/// +/// +/// +/// +/// + +import { DetailedErrorCode } from './cast.framework.events'; +export = cast.framework.messages; + +declare namespace cast.framework.messages { + export type UserAction = + | 'LIKE' + | 'DISLIKE' + | 'FOLLOW' + | 'UNFOLLOW' + | 'FLAG' + | 'SKIP_AD'; + + export type UserActionContext = + | 'UNKNOWN_CONTEXT' + | 'ALBUM' + | 'ARTIST' + | 'PLAYLIST' + | 'EPISODE' + | 'SERIES' + | 'MOVIE' + | 'CHANNEL' + | 'TEAM' + | 'PLAYER' + | 'COACH'; + + export type TextTrackType = + | 'SUBTITLES' + | 'CAPTIONS' + | 'DESCRIPTIONS' + | 'CHAPTERS' + | 'METADATA'; + + export type TextTrackWindowType = 'NONE' | 'NORMAL' | 'ROUNDED_CORNERS'; + + export type TrackType = 'TEXT' | 'AUDIO' | 'VIDEO'; + + export type TextTrackFontGenericFamily = + | 'SANS_SERIF' + | 'MONOSPACED_SANS_SERIF' + | 'SERIF' + | 'MONOSPACED_SERIF' + | 'CASUAL' + | 'CURSIVE' + | 'SMALL_CAPITALS'; + + export type TextTrackFontStyle = 'NORMAL' | 'BOLD' | 'BOLD_ITALIC' | 'ITALIC'; + + export type TextTrackEdgeType = + | 'NONE' + | 'OUTLINE' + | 'DROP_SHADOW' + | 'RAISED' + | 'DEPRESSED'; + + export type Command = + | 'PAUSE' + | 'SEEK' + | 'STREAM_VOLUME' + | 'STREAM_MUTE' + | 'ALL_BASIC_MEDIA' + | 'QUEUE_NEXT' + | 'QUEUE_PREV' + | 'QUEUE_SHUFFLE' + | 'SKIP_AD'; + + export type SeekResumeState = 'PLAYBACK_START' | 'PLAYBACK_PAUSE'; + + export type StreamingProtocolType = + | 'UNKNOWN' + | 'MPEG_DASH' + | 'HLS' + | 'SMOOTH_STREAMING'; + + export type StreamType = 'BUFFERED' | 'LIVE' | 'NONE'; + + export type FocusState = 'IN_FOCUS' | 'NOT_IN_FOCUS'; + + export type ExtendedPlayerState = 'LOADING'; + + export type ErrorType = + | 'INVALID_PLAYER_STATE' + | 'LOAD_FAILED' + | 'LOAD_CANCELLED' + | 'INVALID_REQUEST' + | 'ERROR'; + + export type ErrorReason = + | 'INVALID_COMMAND' + | 'INVALID_PARAMS' + | 'INVALID_MEDIA_SESSION_ID' + | 'SKIP_LIMIT_REACHED' + | 'NOT_SUPPORTED' + | 'LANGUAGE_NOT_SUPPORTED' + | 'END_OF_QUEUE' + | 'APP_ERROR' + | 'AUTHENTICATION_EXPIRED' + | 'PREMIUM_ACCOUNT_REQUIRED' + | 'CONCURRENT_STREAM_LIMIT' + | 'PARENTAL_CONTROL_RESTRICTED' + | 'NOT_AVAILABLE_IN_REGION' + | 'CONTENT_ALREADY_PLAYING' + | 'INVALID_REQUEST' + | 'GENERIC_LOAD_ERROR'; + + export type RepeatMode = + | 'REPEAT_OFF' + | 'REPEAT_ALL' + | 'REPEAT_SINGLE' + | 'REPEAT_ALL_AND_SHUFFLE'; + + export type IdleReason = 'CANCELLED' | 'INTERRUPTED' | 'FINISHED' | 'ERROR'; + + export type HlsSegmentFormat = 'AAC' | 'AC3' | 'MP3' | 'TS' | 'TS_AAC'; + + export type HdrType = 'SDR' | 'HDR' | 'DV'; + + export type PlayStringId = + | 'FREE_TRIAL_ABOUT_TO_EXPIRE' + | 'SUBSCRIPTION_ABOUT_TO_EXPIRE' + | 'STREAM_HIJACKED'; + + export type GetStatusOptions = 'NO_METADATA' | 'NO_QUEUE_ITEMS'; + + export type MessageType = + | 'MEDIA_STATUS' + | 'CLOUD_STATUS' + | 'QUEUE_CHANGE' + | 'QUEUE_ITEMS' + | 'QUEUE_ITEM_IDS' + | 'GET_STATUS' + | 'LOAD' + | 'PAUSE' + | 'STOP' + | 'PLAY' + | 'SKIP_AD' + | 'PLAY_AGAIN' + | 'SEEK' + | 'SET_PLAYBACK_RATE' + | 'SET_VOLUME' + | 'EDIT_TRACKS_INFO' + | 'EDIT_AUDIO_TRACKS' + | 'PRECACHE' + | 'PRELOAD' + | 'QUEUE_LOAD' + | 'QUEUE_INSERT' + | 'QUEUE_UPDATE' + | 'QUEUE_REMOVE' + | 'QUEUE_REORDER' + | 'QUEUE_NEXT' + | 'QUEUE_PREV' + | 'QUEUE_GET_ITEM_RANGE' + | 'QUEUE_GET_ITEMS' + | 'QUEUE_GET_ITEM_IDS' + | 'QUEUE_SHUFFLE' + | 'SET_CREDENTIALS' + | 'LOAD_BY_ENTITY' + | 'USER_ACTION' + | 'DISPLAY_STATUS' + | 'FOCUS_STATE' + | 'CUSTOM_COMMAND'; + + export type PlayerState = 'IDLE' | 'PLAYING' | 'PAUSED' | 'BUFFERING'; + + export type QueueChangeType = + | 'INSERT' + | 'REMOVE' + | 'ITEMS_CHANGE' + | 'UPDATE' + | 'NO_CHANGE'; + + export type QueueType = + | 'ALBUM' + | 'PLAYLIST' + | 'AUDIOBOOK' + | 'RADIO_STATION' + | 'PODCAST_SERIES' + | 'TV_SERIES' + | 'VIDEO_PLAYLIST' + | 'LIVE_TV' + | 'MOVIE'; + + export type MetadataType = + | 'GENERIC' + | 'MOVIE' + | 'TV_SHOW' + | 'MUSIC_TRACK' + | 'PHOTO'; + + /** + * RefreshCredentials request data. + */ + export interface RefreshCredentialsRequestData { } + + /** + * Media event SET_VOLUME request data. + */ + export interface VolumeRequestData extends RequestData { + /** + * The media stream volume + */ + volume?: Volume; + } + + /** + * Represents the volume of a media session stream. + */ + export interface Volume { + /** + * Value from 0 to 1 that represents the current stream volume level. + */ + level?: number; + + /** + * Whether the stream is muted. + */ + muted?: boolean; + } + + /** + * Video information such as video resolution and High Dynamic Range (HDR). + */ + export class VideoInformation { + constructor(width: number, height: number, hdrType: HdrType); + + /** + * + */ + width: number; + + /** + * + */ + height: number; + + /** + * + */ + hdrType: HdrType; + } + + /** + * VAST ad request configuration. + */ + export interface VastAdsRequest { + /** + * Specifies a VAST document to be used as the ads response instead of making a request via an ad tag url. This can be useful for debugging and other situations where a VAST response is already available. + */ + adsResponse?: string; + + /** + * URL for VAST file. + */ + adTagUrl?: string; + } + + /** + * UserAction request data. + */ + export interface UserActionRequestData { + /** + * Optional request source. It contain the assistent query that initiate the request. + */ + source?: string; + + /** + * User action to be handled by the application. + */ + userAction?: UserAction; + + /** + * Optional context information for the user action. + */ + userActionContext?: UserActionContext; + } + + /** + * A TV episode media description. + */ + export interface TvShowMediaMetadata { + /** + * TV episode number. A positive integer. + */ + episode?: number; + + /** + * @deprecated use episode instead + */ + episodeNumber?: number; + + /** + * @deprecated use episode instead + */ + episodeTitle?: string; + + /** + * Content images. Examples would include cover art or a thumbnail of the currently playing media. + */ + images?: Image[]; + + /** + * ISO 8601 date when the episode originally aired; e.g. 2014-02-10. + */ + originalAirdate?: string; + + /** + * @deprecated use originalAirdate instead. + */ + releaseYear?: number; + + /** + * TV episode season. A positive integer. + */ + season?: number; + + /** + * @deprecated use season instead. + */ + seasonNumber?: number; + + /** + * TV series title. + */ + seriesTitle?: string; + + /** + * TV episode title. + */ + title?: string; + } + /** + * Describes track metadata information. + */ + export class Track { + constructor(trackId: number, trackType: TrackType); + + /** + * Custom data set by the receiver application. + */ + customData?: string; + + /** + * Language tag as per RFC 5646 (If subtype is “SUBTITLES” it is mandatory). + */ + language?: string; + + /** + * A descriptive; human readable name for the track. For example "Spanish". + */ + name?: string; + + /** + * For text tracks; the type of text track. + */ + subtype?: string; + + /** + * It can be the url of the track or any other identifier that allows the receiver to find the content (when the track is not inband or included in the manifest). For example it can be the url of a vtt file. + */ + trackContentId?: string; + + /** + * It represents the MIME type of the track content. For example if the track is a vtt file it will be ‘text/vtt’. This field is needed for out of band tracks; so it is usually provided if a trackContentId has also been provided. It is not mandatory if the receiver has a way to identify the content from the trackContentId; but recommended. The track content type; if provided; must be consistent with the track type. + */ + trackContentType?: string; + + /** + * Unique identifier of the track within the context of a MediaInformation object. + */ + trackId?: number; + + /** + * The type of track. + */ + type: TrackType; + } + /** + * Describes style information for a text track. + */ + export interface TextTrackStyle { + /** + * The background 32 bit RGBA color. The alpha channel should be used for transparent backgrounds. + */ + backgroundColor?: string; + + /** + * Custom data set by the receiver application. + */ + customData?: any; + + /** + * RGBA color for the edge; this value will be ignored if edgeType is NONE. + */ + edgeColor?: string; + + /** + * + */ + edgeType?: TextTrackEdgeType; + + /** + * If the font is not available in the receiver the fontGenericFamily will be used. + */ + fontFamily?: string; + + /** + * The text track generic family. + */ + fontGenericFamily?: TextTrackFontGenericFamily; + + /** + * The font scaling factor for the text track (the default is 1). + */ + fontScale?: number; + + /** + * The text track font style. + */ + fontStyle?: TextTrackFontStyle; + + /** + * The foreground 32 bit RGBA color. + */ + foregroundColor?: string; + + /** + * 32 bit RGBA color for the window. This value will be ignored if windowType is NONE. + */ + windowColor?: string; + + /** + * Rounded corner radius absolute value in pixels (px). This value will be ignored if windowType is not ROUNDED_CORNERS. + */ + windowRoundedCornerRadius?: number; + + /** + * The window concept is defined in CEA-608 and CEA-708. In WebVTT is called a region. + */ + windowType?: TextTrackWindowType; + } + + /** + * Media event playback rate request data. + */ + export interface SetPlaybackRateRequestData extends RequestData { + /** + * New playback rate (>0). + */ + playbackRate?: number; + + /** + * New playback rate relative to current playback rate. New rate will be the result of multiplying the current rate with the value. For example a value of 1.1 will increase rate by 10%. (Only used if the playbackRate value is not provided). + */ + relativePlaybackRate?: number; + } + + /** + * SetCredentials request data. + */ + export interface SetCredentialsRequestData { + /** + * Credentials to use by receiver. + */ + credentials?: string; + + /** + * If it is a response for refresh credentials; it will indicate the request id of the refresh credentials request. + */ + forRequestId?: number; + + /** + * Optional request source. It contain the assistent query that initiate the request. + */ + source?: string; + } + + /** + * Media event SEEK request data. + */ + export interface SeekRequestData extends RequestData { + /** + * Seconds since beginning of content. + */ + currentTime?: number; + + /** + * Seconds relative to the current playback position. If this field is defined; the currentTime field will be ignored. + */ + relativeTime?: number; + + /** + * The playback state after a SEEK request. + */ + resumeState?: SeekResumeState; + } + + /** + * Provides seekable range in seconds. + */ + export class SeekableRange { + constructor(start?: number, end?: number); + + /** + * End of the seekable range in seconds. + */ + end?: number; + + /** + * Start of the seekable range in seconds. + */ + start?: number; + } + + /** + * Media event request data. + */ + export class RequestData { + constructor(type: MessageType); + + /** + * Application-specific data for this request. It enables the sender and receiver to easily extend the media protocol without having to use a new namespace with custom messages. + */ + customData?: any; + + /** + * Id of the media session that the request applies to. + */ + mediaSessionId?: number; + + /** + * Id of the request; used to correlate request/response. + */ + requestId: number; + } + + /** + * Media event UPDATE queue request data. + */ + export interface QueueUpdateRequestData { + /** + * ID of the current media Item after the deletion (if not provided; the currentItem value will be the same as before the deletion; if it does not exist because it has been deleted; the currentItem will point to the next logical item in the list). + */ + currentItemId?: number; + + /** + * Seconds since the beginning of content to start playback of the current item. If provided; this value will take precedence over the startTime value provided at the QueueItem level but only the first time the item is played. This is to cover the common case where the user jumps to the middle of an item so the currentTime does not apply to the item permanently like the QueueItem startTime does. It avoids having to reset the startTime dynamically (that may not be possible if the phone has gone to sleep). + */ + currentTime?: number; + + /** + * List of queue items to be updated. No reordering will happen; the items will retain the existing order. + */ + items?: QueueItem[]; + + /** + * Skip/Go back number of items with respect to the position of currentItem (it can be negative). If it is out of boundaries; the currentItem will be the next logical item in the queue wrapping around the boundaries. The new currentItem position will follow the rules of the queue repeat behavior. + */ + jump?: number; + + /** + * Behavior of the queue when all items have been played. + */ + repeatMode?: RepeatMode; + + /** + * Shuffle the queue items when the update is processed. After the queue items are shuffled; the item at the currentItem position will be loaded. + */ + shuffle?: boolean; + } + + /** + * Media event queue REORDER request data. + */ + export class QueueReorderRequestData extends RequestData { + constructor(itemIds: number[]); + + /** + * ID of the current media Item after the deletion (if not provided; the currentItem value will be the same as before the deletion; if it does not exist because it has been deleted; the currentItem will point to the next logical item in the list). + */ + currentItemId?: number; + + /** + * Seconds since the beginning of content to start playback of the current item. If provided; this value will take precedence over the startTime value provided at the QueueItem level but only the first time the item is played. This is to cover the common case where the user jumps to the middle of an item so the currentTime does not apply to the item permanently like the QueueItem startTime does. It avoids having to reset the startTime dynamically (that may not be possible if the phone has gone to sleep). + */ + currentTime?: number; + + /** + * ID of the item that will be located immediately after the reordered list. If the ID is not found or it is not provided; the reordered list will be appended at the end of the existing list. + */ + insertBefore?: number; + + /** + * IDs of the items to be reordered; in the new order. Items not provided will keep their existing order. The provided list will be inserted at the position determined by insertBefore. For example: + + If insertBefore is not specified Existing queue: “A”;”D”;”G”;”H”;”B”;”E” itemIds: “D”;”H”;”B” New Order: “A”;”G”;”E”;“D”;”H”;”B” + + If insertBefore is “A” Existing queue: “A”;”D”;”G”;”H”;”B” itemIds: “D”;”H”;”B” New Order: “D”;”H”;”B”;“A”;”G”;”E” + + If insertBefore is “G” Existing queue: “A”;”D”;”G”;”H”;”B” itemIds: “D”;”H”;”B” New Order: “A”;“D”;”H”;”B”;”G”;”E” + */ + itemIds: number[]; + } + + /** + * Media event queue REMOVE request data. + */ + export class QueueRemoveRequestData extends RequestData { + constructor(itemIds: number[]); + + /** + * ID of the current media Item after the deletion (if not provided; the currentItem value will be the same as before the deletion; if it does not exist because it has been deleted; the currentItem will point to the next logical item in the list). + */ + currentItemId?: number; + + /** + * Seconds since the beginning of content to start playback of the current item. If provided; this value will take precedence over the startTime value provided at the QueueItem level but only the first time the item is played. This is to cover the common case where the user jumps to the middle of an item so the currentTime does not apply to the item permanently like the QueueItem startTime does. It avoids having to reset the startTime dynamically (that may not be possible if the phone has gone to sleep). + */ + currentTime?: number; + + /** + * IDs of queue items to be deleted. + */ + itemIds?: number[]; + } + /** + * Media event queue LOAD request data. + */ + export interface QueueLoadRequestData extends RequestData { + constructor(items: QueueItem[]): QueueLoadRequestData; + + /** + * Seconds (since the beginning of content) to start playback of the first item to be played. If provided; this value will take precedence over the startTime value provided at the QueueItem level but only the first time the item is played. This is to cover the common case where the user casts the item that was playing locally so the currentTime does not apply to the item permanently like the QueueItem startTime does. It avoids having to reset the startTime dynamically (that may not be possible if the phone has gone to sleep). + */ + currentTime?: number; + + /** + * Behavior of the queue when all items have been played. + */ + items: QueueItem[]; + + /** + * Id of the request; used to correlate request/response. + */ + repeatMode?: RepeatMode; + + /** + * The index of the item in the items array that must be the first currentItem (the item that will be played first). Note this is the index of the array (starts at 0) and not the itemId (as it is not known until the queue is created). If repeatMode is REPEAT_OFF playback will end when the last item in the array is played (elements before the startIndex will not be played). This may be useful for continuation scenarios where the user was already using the sender app and in the middle decides to cast. In this way the sender app does not need to map between the local and remote queue positions or saves one extra QUEUE_UPDATE request. + */ + startIndex?: number; + } + + /** + * Queue item information. Application developers may need to create a QueueItem to insert a queue element using InsertQueueItems. In this case they should not provide an itemId (as the actual itemId will be assigned when the item is inserted in the queue). This prevents ID collisions with items added from a sender app. + */ + export class QueueItem { + constructor(opt_itemId?: number); + + /** + * Array of Track trackIds that are active. If the array is not provided; the default tracks will be active. + */ + activeTrackIds?: number[]; + + /** + * If the autoplay parameter is not specified or is true; the media player will begin playing the element in the queue when the item becomes the currentItem. + */ + autoplay?: boolean; + + /** + * The application can define any extra queue item information needed. + */ + customData?: any; + + /** + * Unique identifier of the item in the queue. The attribute is optional because for LOAD or INSERT should not be provided (as it will be assigned by the receiver when an item is first created/inserted). + */ + itemId?: number; + + /** + * Metadata (including contentId) of the playlist element. + */ + media?: MediaInformation; + + /** + * Playback duration of the item; if it is larger than the actual duration - startTime it will be ignored (default behavior). It can be negative; in such case the duration will be the actual asset duration minus the duration provided. It can be used for photo slideshows to control the duration the item should be presented or for live events to control the duration that the program should be played. It may be useful for autoplay scenarios to avoid displaying all the credits after an episode has ended. + */ + playbackDuration?: number; + + /** + * This parameter is a hint for the receiver to preload this media item before it is played. It allows for a smooth transition between items played from the queue. The time is expressed in seconds; relative to the beginning of this item playback (usually the end of the previous item playback). Only positive values are valid. For example; if the value is 10 seconds; this item will be preloaded 10 seconds before the previous item has finished. The receiver will try to honor this value but will not guarantee it; for example if the value is larger than the previous item duration the receiver may just preload this item shortly after the previous item has started playing (there will never be two items being preloaded in parallel). Also; if an item is inserted in the queue just after the currentItem and the time to preload is higher than the time left on the currentItem; the preload will just happen as soon as possible. + */ + preloadTime?: number; + + /** + * Seconds since beginning of content. If the content is live content; and startTime is not specified; the stream will start at the live position. + */ + startTime?: number; + } + + /** + * Media event queue INSERT request data. + */ + export class QueueInsertRequestData extends RequestData { + constructor(items: QueueItem[]); + + /** + * ID of the current media Item after the insertion (if not provided; the currentItem value will be the same as before the insertion). + */ + currentItemId?: number; + + /** + * Index (relative to the items array; starting with 0) of the new current media Item. For inserted items we use the index (similar to startIndex in QUEUE_LOAD) and not currentItemId; because the itemId is unknown until the items are inserted. If not provided; the currentItem value will be the same as before the insertion (unless currentItemId is provided). This param allows to make atomic the common use case of insert and play an item. + */ + currentItemIndex?: number; + + /** + * Seconds since the beginning of content to start playback of the current item. If provided; this value will take precedence over the startTime value provided at the QueueItem level but only the first time the item is played. This is to cover the common case where the user jumps to the middle of an item so the currentTime does not apply to the item permanently like the QueueItem startTime does. It avoids having to reset the startTime dynamically (that may not be possible if the phone has gone to sleep). + */ + currentTime?: number; + + /** + * ID of the item that will be located immediately after the inserted list. If the ID is not found or it is not provided; the list will be appended at the end of the existing list. + */ + insertBefore?: number; + + /** + * List of queue items. The itemId field of the items should be empty. It is sorted (first element will be played first). + */ + items: QueueItem[]; + } + + /** + * Represents a data message containing the full list of queue ids. + */ + export interface QueueIds { + /** + * List of queue item ids. + */ + itemIds?: number[]; + + /** + * The corresponding request id. + */ + requestId?: number; + + /** + * + */ + type: MessageType; + } + + /** + * Queue data as part of the LOAD request. + */ + export class QueueData { + constructor( + id?: string, + name?: string, + description?: string, + repeatMode?: RepeatMode, + items?: QueueItem[], + startIndex?: number, + startTime?: number + ); + + /** + * Description of the queue. + */ + description?: string; + + /** + * Optional Queue entity id; provide Google Assistant deep link. + */ + entity?: string; + + /** + * Id of the queue. + */ + id?: string; + + /** + * Array of queue items. It is sorted (first element will be played first). + */ + items?: QueueItem[]; + + /** + * Name of the queue. + */ + name?: string; + + /** + * Queue type; e.g. album; playlist; radio station; tv series; etc. + */ + queueType?: QueueType; + + /** + * Continuous playback behavior of the queue. + */ + repeatMode?: RepeatMode; + + /** + * The index of the item in the queue that should be used to start playback first. + */ + startIndex?: number; + + /** + * Seconds (since the beginning of content) to start playback of the first item. + */ + startTime?: number; + } + + /** + * Represents a queue change message; such as insert; remove; and update. + */ + export interface QueueChange { + /** + * The actual queue change type. + */ + changeType?: QueueChangeType; + + /** + * The id to insert the list of itemIds before. + */ + insertBefore?: number; + + /** + * List of changed itemIds. + */ + itemIds?: number[]; + + /** + * The corresponding request id. + */ + requestId?: number; + + /** + * The queue change sequence ID. Used to coordinate state sync between various senders and the receiver. + */ + sequenceNumber?: number; + + /** + * + */ + type: MessageType; + } + + /** + * Media event PRELOAD request data. + */ + export class PreloadRequestData implements LoadRequestData { + /** + * Array of trackIds that are active. If the array is not provided; the default tracks will be active. + */ + activeTrackIds: number[]; + /** + * If the autoplay parameter is specified; the media player will begin playing the content when it is loaded. Even if autoplay is not specified;the media player implementation may choose to begin playback immediately. + */ + autoplay?: boolean; + /** + * Optional user credentials. + */ + credentials?: string; + /** + * Optional credentials type. The type 'cloud' is a reserved type used by load requests that were originated by voice assistant commands. + */ + credentialsType?: string; + /** + * Seconds since beginning of content. If the content is live content; and currentTime is not specified; the stream will start at the live position. + */ + currentTime?: number; + /** + * If the autoplay parameter is specified; the media player will begin playing the content when it is loaded. Even if autoplay is not specified; the media player implementation may choose to begin playback immediately. + */ + media: MediaInformation; + /** + * The media playback rate. + */ + playbackRate?: number; + /** + * Queue data. + */ + queueData: QueueData; + /** + * Application-specific data for this request. It enables the sender and receiver to easily extend the media protocol without having to use a new namespace with custom messages. + */ + customData?: any; + /** + * Id of the media session that the request applies to. + */ + mediaSessionId?: number; + /** + * Id of the request; used to correlate request/response. + */ + requestId: number; + constructor(itemId: number); + + /** + * The ID of the queue item. + */ + itemId: number; + } + + /** + * Media event PRECACHE request data. (Some fields of the load request; like autoplay and queueData; are ignored). + */ + export class PrecacheRequestData implements LoadRequestData { + /** + * Array of trackIds that are active. If the array is not provided; the default tracks will be active. + */ + activeTrackIds: number[]; + /** + * If the autoplay parameter is specified; the media player will begin playing the content when it is loaded. Even if autoplay is not specified;the media player implementation may choose to begin playback immediately. + */ + autoplay?: boolean; + /** + * Optional user credentials. + */ + credentials?: string; + /** + * Optional credentials type. The type 'cloud' is a reserved type used by load requests that were originated by voice assistant commands. + */ + credentialsType?: string; + /** + * Seconds since beginning of content. If the content is live content; and currentTime is not specified; the stream will start at the live position. + */ + currentTime?: number; + /** + * If the autoplay parameter is specified; the media player will begin playing the content when it is loaded. Even if autoplay is not specified; the media player implementation may choose to begin playback immediately. + */ + media: MediaInformation; + /** + * The media playback rate. + */ + playbackRate?: number; + /** + * Queue data. + */ + queueData: QueueData; + /** + * Application-specific data for this request. It enables the sender and receiver to easily extend the media protocol without having to use a new namespace with custom messages. + */ + customData?: any; + /** + * Id of the media session that the request applies to. + */ + mediaSessionId?: number; + /** + * Id of the request; used to correlate request/response. + */ + requestId: number; + constructor(data?: string); + + /** + * Application precache data. + */ + precacheData?: string; + } + + /** + * PlayString request data. + */ + export class PlayStringRequestData { + constructor(stringId: PlayStringId, opt_arguments?: string[]); + + /** + * An optional array of string values to be filled into the text. + */ + arguments?: string[]; + + /** + * An identifier for the text to be played back. + */ + stringId: PlayStringId; + } + + /** + * A photo media description. + */ + export interface PhotoMediaMetadata { + /** + * Name of the photographer. + */ + artist?: string; + + /** + * ISO 8601 date and time the photo was taken; e.g. 2014-02-10T15:47:00Z. + */ + creationDateTime?: string; + + /** + * Photo height; in pixels. + */ + height?: number; + + /** + * Images associated with the content. Examples would include a photo thumbnail. + */ + images: Image[]; + + /** + * Latitude. + */ + latitude?: number; + + /** + * Location where the photo was taken. For example; "Seattle; Washington; USA". + */ + location?: string; + + /** + * Longitude. + */ + longitude?: number; + + /** + * Photo title. + */ + title?: string; + + /** + * Photo width; in pixels. + */ + width?: number; + } + + /** + * A music track media description. + */ + export interface MusicTrackMediaMetadata { + /** + * Album artist name. + */ + albumArtist?: string; + + /** + * Album name. + */ + albumName?: string; + + /** + * Track artist name. + */ + artist?: string; + + /** + * @deprecated: use @see{@link artist} instead + */ + artistName: string; + + /** + * Track composer name. + */ + composer?: string; + + /** + * Disc number. A positive integer. + */ + discNumber?: number; + + /** + * Content images. Examples would include cover art or a thumbnail of the currently playing media. + */ + images: Image[]; + + /** + * ISO 8601 date when the track was released; e.g. 2014-02-10. + */ + releaseDate?: string; + + /** + * @deprecated: Use @see{@link releaseDate} instead + */ + releaseYear?: string; + + /** + * Track name. + */ + songName?: string; + + /** + * Track title. + */ + title?: string; + + /** + * Track number in album. A positive integer. + */ + trackNumber?: number; + } + + /** + * A movie media description. + */ + export interface MovieMediaMetadata { + /** + * Content images. Examples would include cover art or a thumbnail of the currently playing media. + */ + images: Image[]; + + /** + * ISO 8601 date when the movie was released; e.g. 2014-02-10. + */ + releaseDate?: string; + + /** + * @deprecated: use @see{@link releaseDate} instead + */ + releaseYear?: number; + + /** + * Movie studio. + */ + studio?: string; + + /** + * Movie subtitle. + */ + subtitle?: string; + + /** + * Movie title. + */ + title?: string; + } + /** + * Represents the status of a media session. + */ + export interface MediaStatus { + /** + * List of IDs corresponding to the active tracks. + */ + activeTrackIds: number[]; + + /** + * Status of break; if receiver is playing break. This field will be defined only when receiver is playing break. + */ + breakStatus: BreakStatus; + + /** + * ID of this media item (the item that originated the status change). + */ + currentItemId?: number; + + /** + * The current playback position. + */ + currentTime: number; + + /** + * Application-specific media status. + */ + customData?: any; + + /** + * Extended media status information. + */ + extendedStatus: ExtendedMediaStatus; + + /** + * If the state is IDLE; the reason the player went to IDLE state. + */ + idleReason: IdleReason; + + /** + * List of media queue items. + */ + items: QueueItem[]; + + /** + * Seekable range of a live or event stream. It uses relative media time in seconds. It will be undefined for VOD streams. + */ + liveSeekableRange: LiveSeekableRange; + + /** + * ID of the media Item currently loading. If there is no item being loaded; it will be undefined. + */ + loadingItemId?: number; + + /** + * The media information. + */ + media: MediaInformation; + + /** + * Unique id for the session. + */ + mediaSessionId: number; + + /** + * The playback rate. + */ + playbackRate: number; + + /** + * The playback state. + */ + playerState: PlayerState; + + /** + * ID of the next Item; only available if it has been preloaded. Media items can be preloaded and cached temporarily in memory; so when they are loaded later on; the process is faster (as the media does not have to be fetched from the network). + */ + preloadedItemId?: number; + + /** + * Queue data. + */ + queueData: QueueData; + + /** + * The behavior of the queue when all items have been played. + */ + repeatMode: RepeatMode; + + /** + * The commands supported by this player. + */ + supportedMediaCommands: number; + + /** + * + */ + type: MessageType; + + /** + * The video information. + */ + videoInfo: VideoInformation; + + /** + * The current stream volume. + */ + volume: Volume; + } + /** + * Common media metadata used as part of MediaInformation + */ + export class MediaMetadata { + constructor(type: MetadataType); + + /** + * The type of metadata + */ + metadataType: MetadataType; + } + + /** + * Represents the media information. + */ + export interface MediaInformation { + /** + * Partial list of break clips that includes current break clip that receiver is playing or ones that receiver will play shortly after; instead of sending whole list of clips. This is to avoid overflow of MediaStatus message. + */ + breakClips: BreakClip[]; + + /** + * List of breaks. + */ + breaks: Break[]; + + /** + * Typically the url of the media. + */ + contentId: string; + + /** + * The content MIME type. + */ + contentType: string; + + /** + * Optional media url; to allow using contentId for real id. If contentUrl is provided; it will be used as media url; otherwise the contentId will be used as the media url. + */ + contentUrl?: string; + + /** + * Application-specific media information. + */ + customData?: any; + + /** + * The media duration. + */ + duration?: number; + + /** + * Optional Media entity; provide Google Assistant deep link. + */ + entity?: string; + + /** + * The format of the HLS media segment. + */ + hlsSegmentFormat: HlsSegmentFormat; + + /** + * The media metadata. + */ + metadata: MediaMetadata; + + /** + * The stream type. + */ + streamType: StreamType; + + /** + * The style of text track. + */ + textTrackStyle: TextTrackStyle; + + /** + * The media tracks. + */ + tracks: Track[]; + } + + /** + * Media event LOAD request data. + */ + export interface LoadRequestData extends RequestData { + /** + * Array of trackIds that are active. If the array is not provided; the default tracks will be active. + */ + activeTrackIds: number[]; + + /** + * If the autoplay parameter is specified; the media player will begin playing the content when it is loaded. Even if autoplay is not specified;the media player implementation may choose to begin playback immediately. + */ + autoplay?: boolean; + + /** + * Optional user credentials. + */ + credentials?: string; + + /** + * Optional credentials type. The type 'cloud' is a reserved type used by load requests that were originated by voice assistant commands. + */ + credentialsType?: string; + + /** + * Seconds since beginning of content. If the content is live content; and currentTime is not specified; the stream will start at the live position. + */ + currentTime?: number; + + /** + * If the autoplay parameter is specified; the media player will begin playing the content when it is loaded. Even if autoplay is not specified; the media player implementation may choose to begin playback immediately. + */ + media: MediaInformation; + + /** + * The media playback rate. + */ + playbackRate?: number; + + /** + * Queue data. + */ + queueData: QueueData; + } + + /** + * LoadByEntity request data. + */ + export interface LoadByEntityRequestData { + /** + * Content entity information; typically represented by a stringified JSON object + */ + entity: string; + + /** + * Shuffle the items to play. + */ + shuffle?: boolean; + + /** + * Optional request source. It contain the assistent query that initiate the request. + */ + source?: string; + } + + /** + * Provides live seekable range with start and end time in seconds and two more attributes. + */ + export class LiveSeekableRange { + constructor( + start?: number, + end?: number, + isMovingWindow?: boolean, + isLiveDone?: boolean + ); + + /** + * A boolean value indicates whether a live stream is ended. If it is done; the end of live seekable range should stop updating. + */ + isLiveDone?: boolean; + + /** + * A boolean value indicates whether the live seekable range is a moving window. If false; it will be either a expanding range or a fixed range meaning live has ended. + */ + isMovingWindow?: boolean; + } + + /** + * Represents a data message containing item information for each requested ids. + */ + export interface ItemsInfo { + /** + * List of changed itemIds. + */ + items: QueueItem[]; + + /** + * The corresponding request id. + */ + requestId?: number; + + /** + * + */ + type: MessageType; + } + + /** + * An image that describes a receiver application or media item. + * This could be an application icon; cover art; or a thumbnail. + */ + export class Image { + constructor(url: string); + + /** + * The height of the image. + */ + height?: number; + + /** + * the URL to the image + */ + url: string; + + /** + * The width of the image + */ + width?: number; + } + /** Media event GET_STATUS request data. */ + export interface GetStatusRequestData extends RequestData { + /** + * The options of a GET_STATUS request. + */ + options: GetStatusOptions; + } + + /** + * Get items info request data. + */ + export interface GetItemsInfoRequestData extends RequestData { + constructor(itemIds: number[]): GetItemsInfoRequestData; + + /** + * List of item ids to be requested. + */ + itemIds: number[]; + } + /** + * A generic media description. + */ + export interface GenericMediaMetadata { + /** + * Content images. Examples would include cover art or a thumbnail of the currently playing media. + */ + images: Image[]; + + /** + * ISO 8601 date and/or time when the content was released; e.g. 2014-02-10. + */ + releaseDate?: string; + + /** + *@deprecated - use @see{@link releaseDate} instead + */ + releaseYear?: number; + + /** + * Content subtitle. + */ + subtitle?: string; + + /** + * Content title. + */ + title?: string; + } + + /** + * Focus state change message. + */ + export interface FocusStateRequestData { + /** + * The focus state of the app. + */ + state: FocusState; + } + + /** Fetch items request data. */ + export class FetchItemsRequestData extends RequestData { + constructor(itemId: number, nextCount: number, prevCount: number); + + /** + * ID of the reference media item for fetching more items. + */ + itemId: number; + + /** + * Number of items after the reference item to be fetched. + */ + nextCount: number; + + /** + * Number of items before the reference item to be fetched. + */ + prevCount: number; + } + + /** + * Extended media status information + */ + export class ExtendedMediaStatus { + constructor(playerState: MediaInformation, opt_media?: MediaInformation); + + /** + * + */ + media: MediaInformation; + + /** + * + */ + playerState: ExtendedPlayerState; + } + + /** Event data for @see{@link EventType.ERROR} event. */ + export class ErrorEvent { + constructor(detailedErrorCode?: DetailedErrorCode, error?: any); + /** + * An error code representing the cause of the error. + */ + detailedErrorCode?: DetailedErrorCode; + + /** + * The error object. + * This could be an Error object (e.g.; if an Error was thrown in an event handler) + * or an object with error information (e.g.; if the receiver received an invalid command). + */ + error?: any; + } + + export class ErrorData { + constructor(type: ErrorType); + + /** + * Application-specific data for this request. + * It enables the sender and receiver to easily extend the media protocol without having to use a new namespace with custom messages. + */ + customData?: any; + + /** + Id of the request; used to correlate request/response. + */ + requestId?: number; + } + + /** Media event EDIT_TRACKS_INFO request data. */ + export interface EditTracksInfoRequestData extends RequestData { + /** + * Array of the Track trackIds that should be active. + * If it is not provided; the active tracks will not change. + * If the array is empty; no track will be active. + */ + activeTrackIds?: number[]; + + /** + * Flag to enable or disable text tracks. + * If false it will disable all text tracks; + * if true it will enable the first text track; or the previous active text tracks. + * This flag is ignored if activeTrackIds or language is provided. + */ + enableTextTracks?: boolean; + + /** + * Indicates that the provided language was not explicit user request; but rather inferred from used language in voice query. + * It allows receiver apps to use user saved preference instead of spoken language. + */ + isSuggestedLanguage?: boolean; + + /** + * Language for the tracks that should be active. The language field will take precedence over activeTrackIds if both are specified. + */ + language?: string; + + /** + * + */ + textTrackStyle?: TextTrackStyle; + } + + /** + * Media event EDIT_AUDIO_TRACKS request data. If language is not provided; the default audio track for the media will be enabled. + */ + export interface EditAudioTracksRequestData extends RequestData { + /** + * Indicates that the provided language was not explicit user request; but rather inferred from used language in voice query. + * It allows receiver apps to use user saved preference instead of spoken language. + */ + isSuggestedLanguage?: boolean; + + /** + * + */ + language?: string; + } + + /** DisplayStatus request data. */ + export interface DisplayStatusRequestData { + /** + * Optional request source. It contain the assistent query that initiate the request. + */ + source: string; + } + + /** CustomCommand request data. */ + export interface CustomCommandRequestData { + /** + * Custom Data; typically represented by a stringified JSON object. + */ + data: string; + + /** + * Optional request source. It contain the assistent query that initiate the request. + */ + source: string; + } + /** Cloud media status. Media status that is only sent to the cloud sender. */ + export class CloudMediaStatus { + constructor(); + } + + export class BreakStatus { + constructor(currentBreakTime: number, currentBreakClipTime: number); + + /** + * Id of current break clip. + */ + breakClipId: string; + + /** + * Id of current break. + */ + breakId: string; + + /** + * Time in sec elapsed after current break clip starts. + */ + currentBreakClipTime: number; + + /** + * Time in sec elapsed after current break starts. + */ + currentBreakTime: number; + + /** + * The time in sec when this break clip becomes skippable. + * 5 means that end user can skip this break clip after 5 seconds. + * If this field is not defined; it means that current break clip is not skippable. + */ + whenSkippable: number; + } + + /** + * Represents break clip (e.g. a clip of ad during ad break) + */ + export class BreakClip { + constructor(id: string); + + /** + * Url of page that sender will display; when end user clicks link on sender UI; while receiver is playing this clip. + */ + clickThroughUrl?: string; + /** + * Typically the url of the break media (playing on the receiver). + */ + contentId?: string; + /** + * The content MIME type. + */ + contentType?: string; + /** + * Optional break media url; to allow using contentId for real id. + * If contentUrl is provided; it will be used as media url; otherwise the contentId will be used as the media url. + */ + contentUrl?: string; + /** + * Application-specific break clip data. + */ + customData?: any; + /** + * Duration of break clip in sec. + */ + duration?: number; + /** + * The format of the HLS media segment. + */ + hlsSegmentFormat: HlsSegmentFormat; + /** + * Unique id of break clip. + */ + id: string; + /** + * Url of content that sender will display while receiver is playing this clip. + */ + posterUrl?: string; + /** + * Title of break clip. Sender might display this on its screen; if provided. + */ + title?: string; + /** + * VAST ad request configuration. Used if contentId or contentUrl is not provided. + */ + vastAdsRequest: VastAdsRequest; + /** + * The time in sec when this break clip becomes skippable. + * 5 means that end user can skip this break clip after 5 seconds. + * If this field is not defined; it means that current break clip is not skippable. + */ + whenSkippable?: number; + } + + /** Represents break (e.g. ad break) included in main video. */ + export class Break { + constructor(id: string, breakClipIds: string[], position: number); + /** + * List of ids of break clip that this break includes. + */ + breakClipIds: string[]; + /** + * Duration of break in sec. + */ + duration?: number; + /** + * Unique id of break. + */ + id: string; + /** + * If true; indicates this is embedded break in main stream. + */ + isEmbedded?: boolean; + /** + * Whether break is watched. + * Sender can change color of progress bar marker corresponding to this break once this field changes from false to true; + * denoting that the end-user already watched this break. + */ + isWatched: boolean; + /** + * Where the break is located inside main video. -1 represents the end of main video. + */ + position: number; + } +} diff --git a/types/chromecast-caf-receiver/cast.framework.system.d.ts b/types/chromecast-caf-receiver/cast.framework.system.d.ts new file mode 100644 index 0000000000..1f465761b0 --- /dev/null +++ b/types/chromecast-caf-receiver/cast.framework.system.d.ts @@ -0,0 +1,177 @@ +// Type definitions for chromecast-caf-receiver 3.x +// Project: https://developers.google.com/cast/docs/reference/caf_receiver/ +// Definitions by: Craig Bruce https://github.com/craigrbruce +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// +/// +/// +/// +/// +/// + +import { EventType } from './cast.framework.events'; +export = cast.framework.system; + +declare namespace cast.framework.system { + export type SystemState = + | 'NOT_STARTED' + | 'STARTING_IN_BACKGROUND' + | 'STARTING' + | 'READY' + | 'STOPPING_IN_BACKGROUND' + | 'STOPPING'; + + export type StandbyState = 'STANDBY' | 'NOT_STANDBY' | 'UNKNOWN'; + + export type DisconnectReason = 'REQUESTED_BY_SENDER' | 'ERROR' | 'UNKNOWN'; + + /** + * Event dispatched by @see{@link CastReceiverManager} when the visibility of the application changes (HDMI input change; TV is turned off). + */ + export class VisibilityChangedEvent { + constructor(isVisible: boolean); + + /** + * Whether the Cast device is the active input or not. + */ + isVisible: boolean; + } + + /** + * Represents the system volume data. + */ + export interface SystemVolumeData { + /** + * The level (from 0.0 to 1.0) of the system volume. + */ + level: number; + + /** + * Whether the system volume is muted or not. + */ + muted: boolean; + } + /** + * Event dispatched by @see{CastReceiverManager} when the system volume changes. + */ + export class SystemVolumeChangedEvent extends Event { + constructor(volume: SystemVolumeData); + + /** + * The system volume data + */ + data: SystemVolumeData; + } + /** + * Event dispatched by @see{@link CastReceiverManager} when the TV enters/leaves the standby state. + */ + export class StandbyChangedEvent { + constructor(isStandby: boolean); + + /** + * + */ + isStandby: boolean; + } + /** + * Whether the TV is in standby or not. + */ + export interface ShutdownEvent extends Event {} + + /** + * Event dispatched by @see{@link CastReceiverManager} when a sender is disconnected. + */ + export class SenderDisconnectedEvent extends Event { + constructor(senderId: string, userAgent: string); + /** + * The ID of the sender connected. + */ + senderId: string; + + /** + * The user agent of the sender. + */ + userAgent: string; + + /** + * The reason the sender was disconnected. + */ + reason?: DisconnectReason; + } + + /** + * Event dispatched by @see{@link CastReceiverManager} when a sender is connected. + */ + export class SenderConnectedEvent extends Event { + constructor(senderId: string, userAgent: string); + /** + * The ID of the sender connected. + */ + senderId: string; + + /** + * The user agent of the sender. + */ + userAgent: string; + } + + /** + * Represents the data of a connected sender device. + */ + export interface Sender { + /** + * The sender Id. + */ + id: string; + + /** + * Indicate the sender supports large messages (>64KB). + */ + largeMessageSupported?: boolean; + + /** + * The userAgent of the sender. + */ + userAgent?: string; + } + + /** + * Event dispatched by CastReceiverManager when the system is ready. + */ + export class ReadyEvent { + constructor(applicationData: ApplicationData); + + /** + * The application data + */ + data: ApplicationData; + } + + /** + * Event dispatched by @see{@link CastReceiverManager} when the system needs to update the restriction on maximum video resolution. + */ + export class MaxVideoResolutionChangedEvent extends Event { + constructor(height: number); + + /** + * Maximum video resolution requested by the system. The value of 0 means there is no restriction. + */ + height: number; + } + /** Event dispatched by @see{@link CastReceiverManager} when the systems starts to create feedback report. */ + export interface FeedbackStartedEvent extends Event {} + /** Event dispatched by @see{@link CastReceiverContext} which contains system information. */ + export class Event { + constructor(type: EventType, data?: any); + } + + /** Represents the data of the launched application. */ + export interface ApplicationData { + id(): string; + launchingSenderId(): string; + name(): string; + namespaces(): string[]; + sessionId(): number; + } +} diff --git a/types/chromecast-caf-receiver/cast.framework.ui.d.ts b/types/chromecast-caf-receiver/cast.framework.ui.d.ts new file mode 100644 index 0000000000..fbc61f56d0 --- /dev/null +++ b/types/chromecast-caf-receiver/cast.framework.ui.d.ts @@ -0,0 +1,194 @@ +// Type definitions for chromecast-caf-receiver 3.x +// Project: https://developers.google.com/cast/docs/reference/caf_receiver/ +// Definitions by: Craig Bruce https://github.com/craigrbruce +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// +/// +/// +/// +/// +/// + +import { PlayerDataEventType } from './cast.framework.ui'; +import { MediaMetadata } from './cast.framework.messages'; + +export = cast.framework.ui; + +declare namespace cast.framework.ui { + export type ContentType = 'VIDEO' | 'AUDIO' | 'IMAGE'; + + export type State = + | 'LAUNCHING' + | 'IDLE' + | 'LOADING' + | 'BUFFERING' + | 'PAUSED' + | 'PLAYING'; + + export type PlayerDataEventType = + | 'ANY_CHANGE' + | 'STATE_CHANGED' + | 'IS_SEEKING_CHANGED' + | 'DURATION_CHANGED' + | 'CURRENT_TIME_CHANGED' + | 'METADATA_CHANGED' + | 'TITLE_CHANGED' + | 'SUBTITLE_CHANGED' + | 'THUMBNAIL_URL_CHANGED' + | 'NEXT_TITLE_CHANGED' + | 'NEXT_SUBTITLE_CHANGED' + | 'NEXT_THUMBNAIL_URL_CHANGED' + | 'PRELOADING_NEXT_CHANGED' + | 'CONTENT_TYPE_CHANGED' + | 'IS_LIVE_CHANGED' + | 'BREAK_PERCENTAGE_POSITIONS_CHANGED' + | 'IS_PLAYING_BREAK_CHANGED' + | 'IS_BREAK_SKIPPABLE_CHANGED' + | 'WHEN_SKIPPABLE_CHANGED' + | 'NUMBER_BREAK_CLIPS_CHANGED' + | 'CURRENT_BREAK_CLIP_NUMBER_CHANGED' + | 'DISPLAY_STATUS_CHANGED'; + + /** + * Player data changed event. Provides the changed field (type); and new value. + */ + export class PlayerDataChangedEvent { + constructor(type: PlayerDataEventType, field: string, value: any); + + /** + * The field name that was changed. + */ + field: string; + + /** + * + */ + type: PlayerDataEventType; + + /** + * The new field value. + */ + value: any; + } + /** + * Player data binder. Bind a player data object to the player state. The player data will be updated to reflect correctly the current player state without firing any change event. + */ + export class PlayerDataBinder { + constructor(playerData: PlayerData | any); + + /** + * Add listener to player data changes. + */ + // addEventListener: (type: PlayerDataEventType; listener: PlayerDataChangedEventHandler); + + /** + * Remove listener to player data changes. + */ + // removeEventListener: (type: PlayerDataEventType; listener: PlayerDataChangedEventHandler); + } + /** + * Player data. Provide the player media and break state. + */ + export interface PlayerData { + /** + * Array of breaks positions in percentage. + */ + breakPercentagePositions: number[]; + + /** + * Content Type. + */ + contentType: ContentType; + + /** + * The number of the current playing break clip in the break. + */ + currentBreakClipNumber: number; + + /** + * Media current position in seconds; or break current position if playing break. + */ + currentTime: number; + + /** + * Whether the player metadata (ie: title; currentTime) should be displayed. This will be true if at least one field in the metadata should be displayed. In some cases; displayStatus will be true; but parts of the metadata should be hidden (ie: the media title while media is seeking). In these cases; additional css can be applied to hide those elements. For cases where the media is audio-only; this will almost always be true. In cases where the media is video; this will be true when: (1) the video is loading; buffering; or seeking (2) a play request was made in the last five seconds while media is already playing; (3) there is a request made to show the status in the last five seconds; or (4) the media was paused in the last five seconds. + */ + displayStatus: boolean; + + /** + * Media duration in seconds; Or break duration if playing break. + */ + duration: number; + + /** + * Indicate break clip can be skipped. + */ + isBreakSkippable: boolean; + + /** + * Indicate if the content is a live stream. + */ + isLive: boolean; + + /** + * Indicate that the receiver is playing a break. + */ + isPlayingBreak: boolean; + + /** + * Indicate the player is seeking (can be either during playing or pausing). + */ + isSeeking: boolean; + + /** + * Media metadata. + */ + metadata: MediaMetadata | any; + + /** + * Next Item subtitle. + */ + nextSubtitle: string; + + /** + * Next Item thumbnail url. + */ + nextThumbnailUrl: string; + + /** + * Next Item title. + */ + nextTitle: string; + + /** + * Number of break clips in current break. + */ + numberBreakClips: number; + + /** + * Flag to show/hide next item metadata. + */ + preloadingNext: boolean; + + /** + * Current player state. + */ + state: State; + + /** + * Content thumbnail url. + */ + thumbnailUrl: string; + + /** + * Content title. + */ + title: string; + + /** + * Provide the time a break is skipable - relative to current playback time. Undefined if not skippable. + */ + whenSkippable?: number; + } +} diff --git a/types/chromecast-caf-receiver/chromecast-caf-receiver-tests.ts b/types/chromecast-caf-receiver/chromecast-caf-receiver-tests.ts new file mode 100644 index 0000000000..a4f59bd985 --- /dev/null +++ b/types/chromecast-caf-receiver/chromecast-caf-receiver-tests.ts @@ -0,0 +1,66 @@ +// Type definitions for chromecast-caf-receiver 3.x +// Project: https://developers.google.com/cast/docs/reference/caf_receiver/ +// Definitions by: Craig Bruce https://github.com/craigrbruce +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// +/// +/// +/// +/// +/// +/// + +import { TextTracksManager } from "cast.framework"; +import { StandbyChangedEvent } from "cast.framework.system"; +import { PlayerData, ContentType } from "cast.framework.ui"; +import { BreakManager } from "cast.framework.breaks"; +import { MediaStatusEvent } from "cast.framework.events"; +import { Track, Break, MediaStatus, QueueData } from "cast.framework.messages"; + +const ct = ContentType.VIDEO; +// framework tests +const track = new Track(123, {}); +const ttm = new TextTracksManager({}); +ttm.addTracks(track); + +// $ExpectError +ttm.addTracks("should fail"); + +// system tests +const sce = new StandbyChangedEvent(true); +// $ExpectError +const wrongSce = new StandbyChangedEvent("error"); + +const result: boolean = sce.isStandby; +// $ExpectError +const failure: string = sce.isStandby; + +// ui tests +const pd = new PlayerData(); + +const cn: number = pd.currentBreakClipNumber; +// $ExpectError +const wrongCn: boolean = pd.currentBreakClipNumber; + +// breaks tests +const bm: BreakManager = new BreakManager(); +const brk1: Break = bm.getBreakById("123"); +// $ExpectError +const brk2: string = bm.getBreakById("123"); +// $ExpectError +const brk3: Break = bm.getBreakById(123); +// events tests + +const evt: MediaStatusEvent = new MediaStatusEvent(); +const ms: MediaStatus = evt.mediaStatus; +// $ExpectError +const ms: string = evt.mediaStatus; + +// messages tests +const qd = new QueueData("id", "name", "description", "mode"); +// $ExpectError +const wrongQd = new QueueData({}); +const name: string = qd.name; +// $ExpectError +const wrongName: number = qd.name; diff --git a/types/chromecast-caf-receiver/index.d.ts b/types/chromecast-caf-receiver/index.d.ts new file mode 100644 index 0000000000..5dc89456e6 --- /dev/null +++ b/types/chromecast-caf-receiver/index.d.ts @@ -0,0 +1,25 @@ +// Type definitions for chromecast-caf-receiver 3.x +// Project: https://developers.google.com/cast/docs/reference/caf_receiver/ +// Definitions by: Craig Bruce https://github.com/craigrbruce +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// +/// +/// +/// +/// +/// + +import { PlayerDataChangedEvent } from './cast.framework.ui'; +import { NetworkRequestInfo } from './cast.framework'; +import { Event } from './cast.framework.events'; + +export = cast; +declare namespace cast { + export type EventHandler = (event: Event) => void; + export type PlayerDataChangedEventHandler = ( + event: PlayerDataChangedEvent + ) => void; + export type RequestHandler = (request: NetworkRequestInfo) => void; + export type BinaryHandler = (data: Uint8Array) => Uint8Array; +} diff --git a/types/chromecast-caf-receiver/tsconfig.json b/types/chromecast-caf-receiver/tsconfig.json new file mode 100644 index 0000000000..5c13aa8765 --- /dev/null +++ b/types/chromecast-caf-receiver/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "chromecast-caf-receiver-tests.ts" + ] +} diff --git a/types/chromecast-caf-receiver/tslint.json b/types/chromecast-caf-receiver/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/chromecast-caf-receiver/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From fde76994561dd7151f8b002fd646690c176e85a3 Mon Sep 17 00:00:00 2001 From: Scott Jones Date: Thu, 19 Apr 2018 23:42:02 -0400 Subject: [PATCH 002/180] Fix up next/router types * add name to index.ts * update tests --- types/next/index.d.ts | 1 + types/next/router.d.ts | 8 +++-- types/next/test/next-router-tests.tsx | 46 +++++++++++++-------------- 3 files changed, 30 insertions(+), 25 deletions(-) diff --git a/types/next/index.d.ts b/types/next/index.d.ts index 036e9f58ce..e0ec456724 100644 --- a/types/next/index.d.ts +++ b/types/next/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/zeit/next.js // Definitions by: Drew Hays // Brice BERNARD +// Scott Jones // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.6 diff --git a/types/next/router.d.ts b/types/next/router.d.ts index 181208518f..a5cfb42c90 100644 --- a/types/next/router.d.ts +++ b/types/next/router.d.ts @@ -9,7 +9,7 @@ export interface EventChangeOptions { } export type RouterCallback = () => void; -export interface SingletonRouter { +export interface RouterProps { readyCallbacks: RouterCallback[]; ready(cb: RouterCallback): void; @@ -53,8 +53,12 @@ export interface SingletonRouter { onRouteChangeError?(error: any, url: string): void; } +export interface SingletonRouter { + router: RouterProps; +} + export function withRouter( - Component: React.ComponentType, + Component: React.ComponentType, ): React.ComponentType; export const Singleton: SingletonRouter; diff --git a/types/next/test/next-router-tests.tsx b/types/next/test/next-router-tests.tsx index fe82d6f0b2..7957f5e8a2 100644 --- a/types/next/test/next-router-tests.tsx +++ b/types/next/test/next-router-tests.tsx @@ -2,10 +2,10 @@ import Router, * as r from "next/router"; import * as React from "react"; import * as qs from "querystring"; -Router.readyCallbacks.push(() => { +Router.router.readyCallbacks.push(() => { console.log("I'll get called when the router initializes."); }); -Router.ready(() => { +Router.router.ready(() => { console.log( "I'll get called immediately if the router initializes, or when it eventually does.", ); @@ -13,8 +13,8 @@ Router.ready(() => { // Access readonly properties of the router. -Object.keys(Router.components).forEach(key => { - const c = Router.components[key]; +Object.keys(Router.router.components).forEach(key => { + const c = Router.router.components[key]; c.err.isAnAny; return ; @@ -26,51 +26,51 @@ function split(routeLike: string) { }); } -if (Router.asPath) { - split(Router.asPath); - split(Router.asPath); +if (Router.router.asPath) { + split(Router.router.asPath); + split(Router.router.asPath); } -split(Router.pathname); +split(Router.router.pathname); -const query = `?${qs.stringify(Router.query)}`; +const query = `?${qs.stringify(Router.router.query)}`; // Assign some callback methods. -Router.onAppUpdated = (nextRoute: string) => console.log(nextRoute); -Router.onRouteChangeStart = (url: string) => +Router.router.onAppUpdated = (nextRoute: string) => console.log(nextRoute); +Router.router.onRouteChangeStart = (url: string) => console.log("Route is starting to change.", url); -Router.onBeforeHistoryChange = (as: string) => +Router.router.onBeforeHistoryChange = (as: string) => console.log("History hasn't changed yet.", as); -Router.onRouteChangeComplete = (url: string) => +Router.router.onRouteChangeComplete = (url: string) => console.log("Route chaneg is complete.", url); -Router.onRouteChangeError = (err: any, url: string) => +Router.router.onRouteChangeError = (err: any, url: string) => console.log("Route is starting to change.", url, err); // Call methods on the router itself. -Router.reload("/route").then(() => console.log("route was reloaded")); -Router.back(); +Router.router.reload("/route").then(() => console.log("route was reloaded")); +Router.router.back(); -Router.push("/route").then((success: boolean) => +Router.router.push("/route").then((success: boolean) => console.log("route push success: ", success), ); -Router.push("/route", "/asRoute").then((success: boolean) => +Router.router.push("/route", "/asRoute").then((success: boolean) => console.log("route push success: ", success), ); -Router.push("/route", "/asRoute", { shallow: false }).then((success: boolean) => +Router.router.push("/route", "/asRoute", { shallow: false }).then((success: boolean) => console.log("route push success: ", success), ); -Router.replace("/route").then((success: boolean) => +Router.router.replace("/route").then((success: boolean) => console.log("route replace success: ", success), ); -Router.replace("/route", "/asRoute").then((success: boolean) => +Router.router.replace("/route", "/asRoute").then((success: boolean) => console.log("route replace success: ", success), ); -Router.replace("/route", "/asRoute", { +Router.router.replace("/route", "/asRoute", { shallow: false, }).then((success: boolean) => console.log("route replace success: ", success)); -Router.prefetch("/route").then(Component => { +Router.router.prefetch("/route").then(Component => { const element = ; }); From 107dce1caeeab4524dbe53e049f692dbd858eb5a Mon Sep 17 00:00:00 2001 From: Scott Jones Date: Fri, 20 Apr 2018 19:19:50 -0400 Subject: [PATCH 003/180] Update SingletonRouter type to include ready and readyCallback funcs --- types/next/router.d.ts | 5 ++--- types/next/test/next-router-tests.tsx | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/types/next/router.d.ts b/types/next/router.d.ts index a5cfb42c90..5a17bd2a53 100644 --- a/types/next/router.d.ts +++ b/types/next/router.d.ts @@ -10,9 +10,6 @@ export interface EventChangeOptions { export type RouterCallback = () => void; export interface RouterProps { - readyCallbacks: RouterCallback[]; - ready(cb: RouterCallback): void; - // router properties readonly components: { [key: string]: { Component: React.ComponentType; err: any }; @@ -55,6 +52,8 @@ export interface RouterProps { export interface SingletonRouter { router: RouterProps; + readyCallbacks: RouterCallback[]; + ready(cb: RouterCallback): void; } export function withRouter( diff --git a/types/next/test/next-router-tests.tsx b/types/next/test/next-router-tests.tsx index 7957f5e8a2..822b9b8e6f 100644 --- a/types/next/test/next-router-tests.tsx +++ b/types/next/test/next-router-tests.tsx @@ -2,10 +2,10 @@ import Router, * as r from "next/router"; import * as React from "react"; import * as qs from "querystring"; -Router.router.readyCallbacks.push(() => { +Router.readyCallbacks.push(() => { console.log("I'll get called when the router initializes."); }); -Router.router.ready(() => { +Router.ready(() => { console.log( "I'll get called immediately if the router initializes, or when it eventually does.", ); From 27f3db2d27e1a1e95784cffa1438b8557d4e7a17 Mon Sep 17 00:00:00 2001 From: Michael Dodge Date: Tue, 24 Apr 2018 12:10:34 -0600 Subject: [PATCH 004/180] Add definitions for okta-vue --- types/okta__okta-vue/index.d.ts | 36 ++++++++++++++ types/okta__okta-vue/okta__okta-vue-tests.ts | 50 ++++++++++++++++++++ types/okta__okta-vue/package.json | 7 +++ types/okta__okta-vue/tsconfig.json | 23 +++++++++ types/okta__okta-vue/tslint.json | 1 + 5 files changed, 117 insertions(+) create mode 100644 types/okta__okta-vue/index.d.ts create mode 100644 types/okta__okta-vue/okta__okta-vue-tests.ts create mode 100644 types/okta__okta-vue/package.json create mode 100644 types/okta__okta-vue/tsconfig.json create mode 100644 types/okta__okta-vue/tslint.json diff --git a/types/okta__okta-vue/index.d.ts b/types/okta__okta-vue/index.d.ts new file mode 100644 index 0000000000..75a3332c68 --- /dev/null +++ b/types/okta__okta-vue/index.d.ts @@ -0,0 +1,36 @@ +// Type definitions for okta-vue 1.0 +// Project: https://github.com/okta/okta-oidc-js/tree/master/packages/okta-vue +// Definitions by: Mike Dodge +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +import { VueConstructor, PluginFunction } from 'vue'; +import { NavigationGuard } from 'vue-router'; + +export interface OktaVueOptions { + issuer: string; + client_id: string; + redirect_uri: string; + scope: string; +} +export function OktaVuePlugin(vm: VueConstructor, options: OktaVueOptions): void; +export namespace OktaVuePlugin { + function handleCallback(): VueConstructor; +} +export default OktaVuePlugin; + +declare module 'vue/types/vue' { + interface Vue { + $auth: { + loginRedirect(): void; + logout(): Promise; + isAuthenticated(): Promise; + handleAuthentication(): Promise; + getFromUri(): string; + getIdToken(): Promise; + getAccessToken(): Promise; + getUser(): Promise; + authRedirectGuardd(): Promise; + }; + } +} diff --git a/types/okta__okta-vue/okta__okta-vue-tests.ts b/types/okta__okta-vue/okta__okta-vue-tests.ts new file mode 100644 index 0000000000..881726a9f0 --- /dev/null +++ b/types/okta__okta-vue/okta__okta-vue-tests.ts @@ -0,0 +1,50 @@ +import Vue from 'vue'; +import Router from 'vue-router'; +import Auth from 'okta__okta-vue'; + +Vue.use(Auth, { + issuer: 'https://{yourOktaDomain}.com/oauth2/default', + client_id: '{client_id}', + redirect_uri: 'http://localhost:{port}/implicit/callback', + scope: 'openid profile email' +}); + +Vue.use(Router); +const router = new Router({ + mode: 'history', + routes: [ + { path: '/implicit/callback', component: Auth.handleCallback() }, + { + path: '/protected', + component: { + name: 'protected', + template: '
Protected Route
' + }, + meta: { + requiresAuth: true + } + }, + ] +}); + +const redirectGuard = Vue.prototype.$auth.authRedirectGuard(); +router.beforeEach(redirectGuard); + +const component = Vue.extend({ + mounted() { + const authd = this.$auth.isAuthenticated(); + const userInfo = this.$auth.getUser(); + const handleAuth = this.$auth.handleAuthentication(); + const path = this.$auth.getFromUri(); + const idToken = this.$auth.getIdToken(); + const accessToken = this.$auth.getAccessToken(); + }, + methods: { + logout() { + const logoutPromise = this.$auth.logout(); + }, + redirect() { + this.$auth.loginRedirect(); + }, + }, +}); diff --git a/types/okta__okta-vue/package.json b/types/okta__okta-vue/package.json new file mode 100644 index 0000000000..fe98511c31 --- /dev/null +++ b/types/okta__okta-vue/package.json @@ -0,0 +1,7 @@ +{ + "private": true, + "dependencies": { + "vue": "^2.5.9", + "vue-router": "^3.0.1" + } +} diff --git a/types/okta__okta-vue/tsconfig.json b/types/okta__okta-vue/tsconfig.json new file mode 100644 index 0000000000..f114dc0fe8 --- /dev/null +++ b/types/okta__okta-vue/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "okta__okta-vue-tests.ts" + ] +} diff --git a/types/okta__okta-vue/tslint.json b/types/okta__okta-vue/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/okta__okta-vue/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 9bf9e4c95bbf8db44d08ce6a9aa01e726573758c Mon Sep 17 00:00:00 2001 From: Alex Maclean Date: Wed, 9 May 2018 15:11:26 +1000 Subject: [PATCH 005/180] Updated type definitions to 0.15.12 --- types/react-calendar-timeline/index.d.ts | 139 +++++++++++++---------- 1 file changed, 77 insertions(+), 62 deletions(-) diff --git a/types/react-calendar-timeline/index.d.ts b/types/react-calendar-timeline/index.d.ts index 69e5d037dc..649a301bb3 100644 --- a/types/react-calendar-timeline/index.d.ts +++ b/types/react-calendar-timeline/index.d.ts @@ -1,71 +1,86 @@ -// Type definitions for react-calendar-timeline v0.8.1 +// Type definitions for react-calendar-timeline v0.15.12 // Project: https://github.com/namespace-ee/react-calendar-timeline // Definitions by: Rajab Shakirov +// Alex Maclean // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.6 /// declare module "react-calendar-timeline" { - interface ReactCalendarTimeline { - groups: { - id: number; - title: any; // string | Element (React.ClassicComponentClass); - }[]; - items:{ - id: number; - group: number; - title?: any; // string | Element (React.ClassicComponentClass); - start_time: any; - end_time: any; - canMove?: boolean; - canResize?: boolean; - canChangeGroup?: boolean; - className?: string; - }[]; - keys?:{ - groupIdKey: string; - groupTitleKey: string; - itemIdKey: string; - itemTitleKey: string; - itemGroupKey: string; - itemTimeStartKey: string; - itemTimeEndKey: string; - }; - sidebarWidth?: number; - dragSnap?: number; - minResizeWidth?: number; - fixedHeader?: "fixed" | "none"; - zIndexStart?: number; - lineHeight?: number; - headerLabelGroupHeight?: number; - headerLabelHeight?: number; - itemHeightRatio?: number; - minZoom?: number; - maxZoom?: number; - canMove?: boolean; - canChangeGroup?: boolean; - canResize?: boolean; - useResizeHandle?: boolean; - stackItems?: boolean; - traditionalZoom?: boolean; - itemTouchSendsClick?: boolean; - onItemMove?(itemId:any, dragTime:any, newGroupOrder:any): any; - onItemResize?(itemId:any, newResizeEnd:any): any; - onItemSelect?(itemId:any): any; - onItemClick?(itemId:any): any; - onCanvasClick?(groupId:any, time:any, e:any): any; - onItemDoubleClick?(itemId:any): any; - moveResizeValidator?(action:any, itemId:any, time:any): any; - defaultTimeStart?: any; - defaultTimeEnd?: any; - visibleTimeStart?: number; - visibleTimeEnd?: number; - onTimeChange?(visibleTimeStart:any, visibleTimeEnd:any): any; - onTimeInit?(visibleTimeStart:any, visibleTimeEnd:any): any; - onBoundsChange?(canvasTimeStart:any, canvasTimeEnd:any): any; - children?: any; - } - let ReactCalendarTimeline : React.ClassicComponentClass; - export default ReactCalendarTimeline; + + export interface TimelineGroup { + id: number; + title: string | JSX.Element; + } + + export interface TimelineItem { + id: number; + group: number; + title?: string | JSX.Element; + start_time: any; + end_time: any; + canMove?: boolean; + canResize?: boolean; + canChangeGroup?: boolean; + className?: string; + } + + export interface TimelineContext { + visibletimeStart: number, + visibleTimeEnd: number, + timelineWidth: number + } + + export interface ReactCalendarTimelineProps { + groups: TimelineGroup[]; + items: TimelineItem[]; + keys?:{ + groupIdKey: string; + groupTitleKey: string; + itemIdKey: string; + itemTitleKey: string; + itemGroupKey: string; + itemTimeStartKey: string; + itemTimeEndKey: string; + }; + sidebarWidth?: number; + dragSnap?: number; + minResizeWidth?: number; + fixedHeader?: "fixed" | "none"; + zIndexStart?: number; + lineHeight?: number; + headerLabelGroupHeight?: number; + headerLabelHeight?: number; + itemHeightRatio?: number; + minZoom?: number; + maxZoom?: number; + canMove?: boolean; + canChangeGroup?: boolean; + canResize?: boolean; + useResizeHandle?: boolean; + stackItems?: boolean; + traditionalZoom?: boolean; + itemTouchSendsClick?: boolean; + onItemMove?(itemId:number, dragTime:number, newGroupOrder:number): any; + onItemResize?(itemId:number, newResizeEnd: number, edge: "left" | "right"): any; + onItemSelect?(itemId:number, e: any, time: number): any; + onItemClick?(itemId:number, e: any, time: number): any; + onCanvasClick?(groupId:number, time:number, e:any): any; + onItemDoubleClick?(itemId:number, e: any, time: number): any; + moveResizeValidator?(action:"move" | "resize", itemId:number, time:number, resizeEdge: "left" | "right"): any; + defaultTimeStart?: any; + defaultTimeEnd?: any; + visibleTimeStart?: number; + visibleTimeEnd?: number; + onTimeChange?(visibleTimeStart: number, visibleTimeEnd: number, updateScrollCanvas: (start: number, end: number) => void): any; + onTimeInit?(visibleTimeStart: number, visibleTimeEnd: number): any; + onBoundsChange?(canvasTimeStart: number, canvasTimeEnd: number): any; + children?: any; + fullUpdate?: boolean; + itemRenderer?: (item: TimelineItem, context: TimelineContext) => JSX.Element; + groupRenderer?: (group: TimelineGroup, isRightSidebar: boolean) => JSX.Element; + } + let ReactCalendarTimeline : React.ClassicComponentClass; + export default ReactCalendarTimeline; } From 449a5e2d87e20f1dc33944eee4debb473a15045d Mon Sep 17 00:00:00 2001 From: Jonas L Date: Wed, 9 May 2018 15:20:01 +0200 Subject: [PATCH 006/180] Add rolling rate limiter --- types/rolling-rate-limiter/index.d.ts | 38 +++++++++++++++++++ .../rolling-rate-limiter-tests.ts | 36 ++++++++++++++++++ types/rolling-rate-limiter/tsconfig.json | 23 +++++++++++ types/rolling-rate-limiter/tslint.json | 1 + 4 files changed, 98 insertions(+) create mode 100644 types/rolling-rate-limiter/index.d.ts create mode 100644 types/rolling-rate-limiter/rolling-rate-limiter-tests.ts create mode 100644 types/rolling-rate-limiter/tsconfig.json create mode 100644 types/rolling-rate-limiter/tslint.json diff --git a/types/rolling-rate-limiter/index.d.ts b/types/rolling-rate-limiter/index.d.ts new file mode 100644 index 0000000000..0de8235fc2 --- /dev/null +++ b/types/rolling-rate-limiter/index.d.ts @@ -0,0 +1,38 @@ +// Type definitions for rolling-rate-limiter 0.1 +// Project: https://github.com/peterkhayes/rolling-rate-limiter +// Definitions by: Jonas Lochmann +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = RollingRateLimiter; + +declare function RollingRateLimiter(options: RollingRateLimiter.InMemoryOptions): RollingRateLimiter.SyncOrAsyncLimiter; +declare function RollingRateLimiter(options: RollingRateLimiter.WithRedisOptions): RollingRateLimiter.AsyncLimiter; + +declare namespace RollingRateLimiter { + interface GeneralOptions { + interval: number; + maxInInterval: number; + minDifference?: number; + } + + interface RedisOptions { + redis: CompatibleRedisClient; + namespace?: string; + } + + interface CompatibleRedisClient { + multi: () => any; + } + + type InMemoryOptions = GeneralOptions; + type WithRedisOptions = GeneralOptions & RedisOptions; + + type AsyncLimiterWithToken = (token: string, callback: AsyncLimiterCallback) => void; + type AsyncLimiterWithoutToken = (callback: AsyncLimiterCallback) => void; + type AsyncLimiterCallback = (err: any, timeLeft: number, actionsLeft: number) => void; + type AsyncLimiter = AsyncLimiterWithToken & AsyncLimiterWithToken; + + type SyncLimiter = (token?: string) => number; + + type SyncOrAsyncLimiter = SyncLimiter & AsyncLimiter; +} diff --git a/types/rolling-rate-limiter/rolling-rate-limiter-tests.ts b/types/rolling-rate-limiter/rolling-rate-limiter-tests.ts new file mode 100644 index 0000000000..1318b8d425 --- /dev/null +++ b/types/rolling-rate-limiter/rolling-rate-limiter-tests.ts @@ -0,0 +1,36 @@ +import * as RateLimiter from 'rolling-rate-limiter'; + +/* + Setup: +*/ + +const limiter = RateLimiter({ + // in miliseconds + interval: 1000, + maxInInterval: 10, + // optional: the minimum time (in miliseconds) between any two actions + minDifference: 100 +}); + +/* + Action: +*/ + +function attemptAction(userId: string) { + // Argument should be a unique identifier for a user if one exists. + // If none is provided, the limiter will not differentiate between users. + const timeLeft = limiter(userId); + + if (timeLeft > 0) { + // limit was exceeded, action should not be allowed + // timeLeft is the number of ms until the next action will be allowed + // note that this can be treated as a boolean, since 0 is falsy + } else { + // limit was not exceeded, action should be allowed + } +} + +/* + Note that the in-memory version can also operate asynchronously. + The syntax is identical to the redis implementation below. +*/ diff --git a/types/rolling-rate-limiter/tsconfig.json b/types/rolling-rate-limiter/tsconfig.json new file mode 100644 index 0000000000..0b526f946e --- /dev/null +++ b/types/rolling-rate-limiter/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "rolling-rate-limiter-tests.ts" + ] +} diff --git a/types/rolling-rate-limiter/tslint.json b/types/rolling-rate-limiter/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/rolling-rate-limiter/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 173f530f62d5c5b3059db900a0a33cf504b447b8 Mon Sep 17 00:00:00 2001 From: Alex Maclean Date: Thu, 10 May 2018 14:04:08 +1000 Subject: [PATCH 007/180] Added missing api --- types/react-calendar-timeline/index.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/types/react-calendar-timeline/index.d.ts b/types/react-calendar-timeline/index.d.ts index 649a301bb3..013e652760 100644 --- a/types/react-calendar-timeline/index.d.ts +++ b/types/react-calendar-timeline/index.d.ts @@ -44,7 +44,11 @@ declare module "react-calendar-timeline" { itemTimeStartKey: string; itemTimeEndKey: string; }; + selected?: number[]; sidebarWidth?: number; + sidebarContent?: any; + rightSidebarWidth?: number; + rightSidebarContent?: any; dragSnap?: number; minResizeWidth?: number; fixedHeader?: "fixed" | "none"; From 5ba41a77899f4e665056ae17b2f8903e8af83a02 Mon Sep 17 00:00:00 2001 From: Jonas L Date: Thu, 10 May 2018 06:05:11 +0200 Subject: [PATCH 008/180] rolling-rate-limiter: replace intersection by extending interface --- types/rolling-rate-limiter/index.d.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/types/rolling-rate-limiter/index.d.ts b/types/rolling-rate-limiter/index.d.ts index 0de8235fc2..c81c8304d7 100644 --- a/types/rolling-rate-limiter/index.d.ts +++ b/types/rolling-rate-limiter/index.d.ts @@ -15,7 +15,7 @@ declare namespace RollingRateLimiter { minDifference?: number; } - interface RedisOptions { + interface WithRedisOptions extends GeneralOptions { redis: CompatibleRedisClient; namespace?: string; } @@ -25,7 +25,6 @@ declare namespace RollingRateLimiter { } type InMemoryOptions = GeneralOptions; - type WithRedisOptions = GeneralOptions & RedisOptions; type AsyncLimiterWithToken = (token: string, callback: AsyncLimiterCallback) => void; type AsyncLimiterWithoutToken = (callback: AsyncLimiterCallback) => void; From 9f85c6e169398dea19dae58ca0702906ebef5bba Mon Sep 17 00:00:00 2001 From: Alex Maclean Date: Thu, 10 May 2018 14:07:43 +1000 Subject: [PATCH 009/180] relaxed type safety --- types/react-calendar-timeline/index.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/types/react-calendar-timeline/index.d.ts b/types/react-calendar-timeline/index.d.ts index 013e652760..5726e08365 100644 --- a/types/react-calendar-timeline/index.d.ts +++ b/types/react-calendar-timeline/index.d.ts @@ -11,13 +11,13 @@ declare module "react-calendar-timeline" { export interface TimelineGroup { id: number; - title: string | JSX.Element; + title: any; } export interface TimelineItem { id: number; group: number; - title?: string | JSX.Element; + title?: any; start_time: any; end_time: any; canMove?: boolean; @@ -82,8 +82,8 @@ declare module "react-calendar-timeline" { onBoundsChange?(canvasTimeStart: number, canvasTimeEnd: number): any; children?: any; fullUpdate?: boolean; - itemRenderer?: (item: TimelineItem, context: TimelineContext) => JSX.Element; - groupRenderer?: (group: TimelineGroup, isRightSidebar: boolean) => JSX.Element; + itemRenderer?: (item: TimelineItem, context: TimelineContext) => any; + groupRenderer?: (group: TimelineGroup, isRightSidebar: boolean) => any; } let ReactCalendarTimeline : React.ClassicComponentClass; export default ReactCalendarTimeline; From 1b2c3539da5e40fd5aa720909074139ad0e07ca1 Mon Sep 17 00:00:00 2001 From: Alex Maclean Date: Thu, 10 May 2018 15:34:43 +1000 Subject: [PATCH 010/180] Added missing API. Fixed incorrect. --- types/react-calendar-timeline/index.d.ts | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/types/react-calendar-timeline/index.d.ts b/types/react-calendar-timeline/index.d.ts index 5726e08365..86c79ca7ae 100644 --- a/types/react-calendar-timeline/index.d.ts +++ b/types/react-calendar-timeline/index.d.ts @@ -8,16 +8,16 @@ /// declare module "react-calendar-timeline" { - - export interface TimelineGroup { + + export interface TimelineGroup { id: number; - title: any; + title: React.ReactNode; } export interface TimelineItem { id: number; group: number; - title?: any; + title?: React.ReactNode; start_time: any; end_time: any; canMove?: boolean; @@ -51,18 +51,21 @@ declare module "react-calendar-timeline" { rightSidebarContent?: any; dragSnap?: number; minResizeWidth?: number; - fixedHeader?: "fixed" | "none"; - zIndexStart?: number; + stickyOffset?: number; + stickyHeader?: boolean; + headerRef?: any; lineHeight?: number; headerLabelGroupHeight?: number; headerLabelHeight?: number; itemHeightRatio?: number; minZoom?: number; maxZoom?: number; + clickTolerance?: number; canMove?: boolean; canChangeGroup?: boolean; canResize?: boolean; useResizeHandle?: boolean; + showCursorLine?: boolean; stackItems?: boolean; traditionalZoom?: boolean; itemTouchSendsClick?: boolean; @@ -70,8 +73,9 @@ declare module "react-calendar-timeline" { onItemResize?(itemId:number, newResizeEnd: number, edge: "left" | "right"): any; onItemSelect?(itemId:number, e: any, time: number): any; onItemClick?(itemId:number, e: any, time: number): any; - onCanvasClick?(groupId:number, time:number, e:any): any; onItemDoubleClick?(itemId:number, e: any, time: number): any; + onCanvasClick?(groupId:number, time:number, e:any): any; + onCanvasDoubleClick?(groupId:number, time:number, e:any): any; moveResizeValidator?(action:"move" | "resize", itemId:number, time:number, resizeEdge: "left" | "right"): any; defaultTimeStart?: any; defaultTimeEnd?: any; @@ -80,10 +84,12 @@ declare module "react-calendar-timeline" { onTimeChange?(visibleTimeStart: number, visibleTimeEnd: number, updateScrollCanvas: (start: number, end: number) => void): any; onTimeInit?(visibleTimeStart: number, visibleTimeEnd: number): any; onBoundsChange?(canvasTimeStart: number, canvasTimeEnd: number): any; + onZoom?(timelineContext: TimelineContext): any; children?: any; fullUpdate?: boolean; - itemRenderer?: (item: TimelineItem, context: TimelineContext) => any; - groupRenderer?: (group: TimelineGroup, isRightSidebar: boolean) => any; + itemRenderer?: (props: {item: TimelineItem, context: TimelineContext}) => React.ReactNode; + groupRenderer?: (props: {group: TimelineGroup, isRightSidebar: boolean}) => React.ReactNode; + minimumWidthForItemContentVisibility?: number; } let ReactCalendarTimeline : React.ClassicComponentClass; export default ReactCalendarTimeline; From c5ac0628883e7dfbd78960289543df5831e10ec3 Mon Sep 17 00:00:00 2001 From: "skubarenko.andrey" Date: Tue, 8 May 2018 12:42:15 +0300 Subject: [PATCH 011/180] Add type definitions for the DevExpress Bootstrap ASP.NET Core Controls --- .../devexpress-aspnetcore-bootstrap-tests.ts | 13 + .../index.d.ts | 2495 +++++++++++++++++ .../tsconfig.json | 24 + .../tslint.json | 3 + 4 files changed, 2535 insertions(+) create mode 100644 types/devexpress-aspnetcore-bootstrap/devexpress-aspnetcore-bootstrap-tests.ts create mode 100644 types/devexpress-aspnetcore-bootstrap/index.d.ts create mode 100644 types/devexpress-aspnetcore-bootstrap/tsconfig.json create mode 100644 types/devexpress-aspnetcore-bootstrap/tslint.json diff --git a/types/devexpress-aspnetcore-bootstrap/devexpress-aspnetcore-bootstrap-tests.ts b/types/devexpress-aspnetcore-bootstrap/devexpress-aspnetcore-bootstrap-tests.ts new file mode 100644 index 0000000000..55eae3c27f --- /dev/null +++ b/types/devexpress-aspnetcore-bootstrap/devexpress-aspnetcore-bootstrap-tests.ts @@ -0,0 +1,13 @@ +declare let button: DevExpress.AspNetCore.BootstrapButton; +button.on('click', e => {}); +button.doClick(); +button.once('click', e => {}); + +declare let accordion: DevExpress.AspNetCore.BootstrapAccordion; +accordion.on('init', e => {}); +const firstGroup = accordion.getGroup(0); +if (firstGroup) { + const groupText = firstGroup.getText(); + const item = firstGroup.getItemByName('item10'); + item && item.getEnabled(); +} diff --git a/types/devexpress-aspnetcore-bootstrap/index.d.ts b/types/devexpress-aspnetcore-bootstrap/index.d.ts new file mode 100644 index 0000000000..9422ccd2f7 --- /dev/null +++ b/types/devexpress-aspnetcore-bootstrap/index.d.ts @@ -0,0 +1,2495 @@ +// Type definitions for DevExpress ASP.NET 181.3 +// Project: http://devexpress.com/ +// Definitions by: DevExpress Inc. +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 + +declare namespace DevExpress.AspNetCore { + enum BootstrapSchedulerGroupType { + Date = "Date", + None = "None", + Resource = "Resource", + } + enum BootstrapSchedulerViewType { + Day = "Day", + WorkWeek = "WorkWeek", + Week = "Week", + Month = "Month", + Timeline = "Timeline", + FullWeek = "FullWeek", + Agenda = "Agenda", + } + enum BootstrapSchedulerAppointmentType { + Normal = "Normal", + Pattern = "Pattern", + Occurrence = "Occurrence", + ChangedOccurrence = "ChangedOccurrence", + DeletedOccurrence = "DeletedOccurrence", + } + enum BootstrapSchedulerRecurrenceRange { + NoEndDate = "NoEndDate", + OccurrenceCount = "OccurrenceCount", + EndByDate = "EndByDate", + } + enum BootstrapSchedulerRecurrenceType { + Daily = "Daily", + Weekly = "Weekly", + Monthly = "Monthly", + Yearly = "Yearly", + Hourly = "Hourly", + } + enum WeekDays { + Sunday = 1, + Monday = 2, + Tuesday = 4, + Wednesday = 8, + Thursday = 16, + Friday = 32, + Saturday = 64, + WeekendDays = 65, + WorkDays = 62, + EveryDay = 127, + } + enum WeekOfMonth { + None = 0, + First = 1, + Second = 2, + Third = 3, + Fourth = 4, + Last = 5, + } + enum BootstrapPopupControlCloseReason { + API = "API", + CloseButton = "CloseButton", + OuterMouseClick = "OuterMouseClick", + MouseOut = "MouseOut", + Escape = "Escape", + } + + const Utils: { + getControls: () => Control[]; + getSerializedEditorValuesInContainer: (containerOrId: string | HTMLElement, processInvisibleEditors?: boolean) => any; + getEditorValuesInContainer: (containerOrId: string | HTMLElement, processInvisibleEditors?: boolean) => any; + }; + + interface EventArgs { + readonly sender: Control; + } + + interface CancelEventArgs extends EventArgs { + cancel: boolean; + } + + interface BeginCallbackEventArgs extends EventArgs { + readonly command: string; + } + + interface ProcessingModeEventArgs extends EventArgs { + processOnServer: boolean; + } + + interface ProcessingModeCancelEventArgs extends ProcessingModeEventArgs { + cancel: boolean; + } + + interface GlobalBeginCallbackEventArgs extends BeginCallbackEventArgs { + readonly control: Control; + } + + interface EndCallbackEventArgs extends EventArgs { // tslint:disable-line:no-empty-interface + } + + interface GlobalEndCallbackEventArgs extends EndCallbackEventArgs { + readonly control: Control; + } + + interface CustomDataCallbackEventArgs extends EventArgs { + result: string; + } + + interface CallbackErrorEventArgs extends EventArgs { + handled: boolean; + message: string; + } + + interface GlobalCallbackErrorEventArgs extends CallbackErrorEventArgs { + readonly control: Control; + } + + interface EditValidationEventArgs extends EventArgs { + errorText: string; + isValid: boolean; + value: string; + } + + interface ValidationCompletedEventArgs extends EventArgs { + readonly container: any; + readonly firstInvalidControl: Control; + readonly firstVisibleInvalidControl: Control; + readonly invisibleControlsValidated: boolean; + isValid: boolean; + readonly validationGroup: string; + } + + interface EditClickEventArgs extends EventArgs { + readonly htmlElement: any; + readonly htmlEvent: any; + } + + interface EditKeyEventArgs extends EventArgs { + readonly htmlEvent: any; + } + + class Control { + protected readonly instance: any; + protected constructor(instance: any); + readonly name: string; + adjustControl(): void; + getHeight(): number; + getMainElement(): any; + getParentControl(): any; + getVisible(): boolean; + getWidth(): number; + inCallback(): boolean; + sendMessageToAssistiveTechnology(message: string): void; + setHeight(height: number): void; + setVisible(visible: boolean): void; + setWidth(width: number): void; + on(eventName: K, callback: (this: Control, args?: ControlEventMap[K]) => void): this; + once(eventName: K, callback: (this: Control, args?: ControlEventMap[K]) => void): this; + off(): this; // tslint:disable-line:no-unnecessary-generics + off(eventName: K): this; // tslint:disable-line:unified-signatures no-unnecessary-generics + off(eventName: K, callback: (this: Control, args?: ControlEventMap[K]) => void): this; // tslint:disable-line:unified-signatures + } + interface ControlEventMap { + "init": EventArgs; + } + + class BootstrapClientEdit extends Control { + focus(): void; + getCaption(): string; + getEnabled(): boolean; + getErrorText(): string; + getInputElement(): any; + getIsValid(): boolean; + getReadOnly(): boolean; + getValue(): any; + setCaption(caption: string): void; + setEnabled(value: boolean): void; + setErrorText(errorText: string): void; + setIsValid(isValid: boolean): void; + setReadOnly(readOnly: boolean): void; + setValue(value: any): void; + validate(): void; + on(eventName: K, callback: (this: BootstrapClientEdit, args?: BootstrapClientEditEventMap[K]) => void): this; + once(eventName: K, callback: (this: BootstrapClientEdit, args?: BootstrapClientEditEventMap[K]) => void): this; + off(eventName?: K, callback?: (this: BootstrapClientEdit, args?: BootstrapClientEditEventMap[K]) => void): this; + } + interface BootstrapClientEditEventMap extends ControlEventMap { + "gotFocus": EventArgs; + "lostFocus": EventArgs; + "validation": EditValidationEventArgs; + "valueChanged": ProcessingModeEventArgs; + } + + interface AccordionItemEventArgs extends ProcessingModeEventArgs { + readonly htmlElement: object; + readonly htmlEvent: object; + readonly item: BootstrapAccordionItem; + } + + interface AccordionGroupEventArgs extends EventArgs { + readonly group: BootstrapAccordionGroup; + } + + interface AccordionGroupCancelEventArgs extends ProcessingModeCancelEventArgs { + readonly group: BootstrapAccordionGroup; + } + + interface AccordionGroupClickEventArgs extends AccordionGroupCancelEventArgs { + readonly htmlElement: object; + readonly htmlEvent: object; + } + + class BootstrapAccordion extends Control { + collapseAll(): void; + expandAll(): void; + getActiveGroup(): BootstrapAccordionGroup | null; + getGroup(index: number): BootstrapAccordionGroup | null; + getGroupByName(name: string): BootstrapAccordionGroup | null; + getGroupCount(): number; + getItemByName(name: string): BootstrapAccordionItem | null; + getSelectedItem(): BootstrapAccordionItem | null; + setActiveGroup(group: BootstrapAccordionGroup): void; + setSelectedItem(item: BootstrapAccordionItem): void; + on(eventName: K, callback: (this: BootstrapAccordion, args?: BootstrapAccordionEventMap[K]) => void): this; + once(eventName: K, callback: (this: BootstrapAccordion, args?: BootstrapAccordionEventMap[K]) => void): this; + off(eventName?: K, callback?: (this: BootstrapAccordion, args?: BootstrapAccordionEventMap[K]) => void): this; + } + interface BootstrapAccordionEventMap extends ControlEventMap { + "beginCallback": BeginCallbackEventArgs; + "callbackError": CallbackErrorEventArgs; + "endCallback": EndCallbackEventArgs; + "expandedChanged": AccordionGroupEventArgs; + "expandedChanging": AccordionGroupCancelEventArgs; + "headerClick": AccordionGroupClickEventArgs; + "itemClick": AccordionItemEventArgs; + } + + class BootstrapAccordionGroup { + protected readonly instance: any; + protected constructor(instance: any); + readonly index: number; + readonly name: string; + readonly navBar: BootstrapAccordion | null; + getEnabled(): boolean; + getExpanded(): boolean; + getHeaderBadgeIconCssClass(): string; + getHeaderBadgeText(): string; + getItem(index: number): BootstrapAccordionItem | null; + getItemByName(name: string): BootstrapAccordionItem | null; + getItemCount(): number; + getText(): string; + getVisible(): boolean; + setExpanded(value: boolean): void; + setHeaderBadgeIconCssClass(cssClass: string): void; + setHeaderBadgeText(text: string): void; + setText(text: string): void; + setVisible(value: boolean): void; + } + + class BootstrapAccordionItem { + protected readonly instance: any; + protected constructor(instance: any); + readonly group: BootstrapAccordionGroup | null; + readonly index: number; + readonly name: string; + readonly navBar: BootstrapAccordion | null; + getBadgeIconCssClass(): string; + getBadgeText(): string; + getEnabled(): boolean; + getIconCssClass(): string; + getImageUrl(): string; + getNavigateUrl(): string; + getText(): string; + getVisible(): boolean; + setBadgeIconCssClass(cssClass: string): void; + setBadgeText(text: string): void; + setEnabled(value: boolean): void; + setIconCssClass(cssClass: string): void; + setImageUrl(value: string): void; + setNavigateUrl(value: string): void; + setText(value: string): void; + setVisible(value: boolean): void; + } + + class BootstrapBinaryImage extends BootstrapClientEdit { + clear(): void; + getUploadedFileName(): string; + getValue(): any; + performCallback(data: any): Promise; + performCallback(data: any, onSuccess: () => void): void; + setSize(width: number, height: number): void; + setValue(value: any): void; + on(eventName: K, callback: (this: BootstrapBinaryImage, args?: BootstrapBinaryImageEventMap[K]) => void): this; + once(eventName: K, callback: (this: BootstrapBinaryImage, args?: BootstrapBinaryImageEventMap[K]) => void): this; + off(eventName?: K, callback?: (this: BootstrapBinaryImage, args?: BootstrapBinaryImageEventMap[K]) => void): this; + } + interface BootstrapBinaryImageEventMap extends BootstrapClientEditEventMap { + "beginCallback": BeginCallbackEventArgs; + "callbackError": CallbackErrorEventArgs; + "click": EditClickEventArgs; + "endCallback": EndCallbackEventArgs; + } + + interface ButtonClickEventArgs extends ProcessingModeEventArgs { + readonly cancelEventAndBubble: boolean; + } + + class BootstrapButton extends Control { + doClick(): void; + focus(): void; + getBadgeIconCssClass(): string; + getBadgeText(): string; + getChecked(): boolean; + getEnabled(): boolean; + getImageUrl(): string; + getText(): string; + setBadgeIconCssClass(cssClass: string): void; + setBadgeText(text: string): void; + setChecked(value: boolean): void; + setEnabled(value: boolean): void; + setImageUrl(value: string): void; + setText(value: string): void; + on(eventName: K, callback: (this: BootstrapButton, args?: BootstrapButtonEventMap[K]) => void): this; + once(eventName: K, callback: (this: BootstrapButton, args?: BootstrapButtonEventMap[K]) => void): this; + off(eventName?: K, callback?: (this: BootstrapButton, args?: BootstrapButtonEventMap[K]) => void): this; + } + interface BootstrapButtonEventMap extends ControlEventMap { + "checkedChanged": ProcessingModeEventArgs; + "click": ButtonClickEventArgs; + "gotFocus": EventArgs; + "lostFocus": EventArgs; + } + + interface CalendarCustomDisabledDateEventArgs extends EventArgs { + readonly date: Date; + isDisabled: boolean; + } + + class BootstrapCalendar extends BootstrapClientEdit { + clearSelection(): void; + deselectDate(date: Date): void; + deselectRange(start: Date, end: Date): void; + getEnabled(): boolean; + getMaxDate(): Date; + getMinDate(): Date; + getSelectedDate(): Date; + getSelectedDates(): Date[]; + getVisibleDate(): Date; + isDateSelected(date: Date): boolean; + selectDate(date: Date): void; + selectRange(start: Date, end: Date): void; + setEnabled(enabled: boolean): void; + setMaxDate(date: Date): void; + setMinDate(date: Date): void; + setSelectedDate(date: Date): void; + setVisibleDate(date: Date): void; + on(eventName: K, callback: (this: BootstrapCalendar, args?: BootstrapCalendarEventMap[K]) => void): this; + once(eventName: K, callback: (this: BootstrapCalendar, args?: BootstrapCalendarEventMap[K]) => void): this; + off(eventName?: K, callback?: (this: BootstrapCalendar, args?: BootstrapCalendarEventMap[K]) => void): this; + } + interface BootstrapCalendarEventMap extends BootstrapClientEditEventMap { + "beginCallback": BeginCallbackEventArgs; + "callbackError": CallbackErrorEventArgs; + "customDisabledDate": CalendarCustomDisabledDateEventArgs; + "endCallback": EndCallbackEventArgs; + "keyDown": EditKeyEventArgs; + "keyPress": EditKeyEventArgs; + "keyUp": EditKeyEventArgs; + "selectionChanged": ProcessingModeEventArgs; + "visibleMonthChanged": ProcessingModeEventArgs; + } + + interface GridToolbarItemClickEventArgs extends ProcessingModeEventArgs { + readonly item: BootstrapMenuItem; + readonly toolbarIndex: number; + readonly toolbarName: string; + usePostBack: boolean; + } + + class BootstrapGridBase extends Control { + getToolbar(index: number): BootstrapMenu | null; + getToolbarByName(name: string): BootstrapMenu | null; + on(eventName: K, callback: (this: BootstrapGridBase, args?: BootstrapGridBaseEventMap[K]) => void): this; + once(eventName: K, callback: (this: BootstrapGridBase, args?: BootstrapGridBaseEventMap[K]) => void): this; + off(eventName?: K, callback?: (this: BootstrapGridBase, args?: BootstrapGridBaseEventMap[K]) => void): this; + } + interface BootstrapGridBaseEventMap extends ControlEventMap { + "toolbarItemClick": GridToolbarItemClickEventArgs; + } + + interface CardViewColumnCancelEventArgs extends CancelEventArgs { + readonly column: BootstrapCardViewColumn; + } + + interface CardViewCardFocusingEventArgs extends CancelEventArgs { + readonly htmlEvent: any; + readonly visibleIndex: number; + } + + interface CardViewCardClickEventArgs extends CancelEventArgs { + readonly htmlEvent: any; + readonly visibleIndex: number; + } + + interface CardViewCustomButtonEventArgs extends ProcessingModeEventArgs { + readonly buttonID: string; + readonly visibleIndex: number; + } + + interface CardViewSelectionEventArgs extends ProcessingModeEventArgs { + readonly isAllRecordsOnPage: boolean; + readonly isChangedOnServer: boolean; + readonly isSelected: boolean; + readonly visibleIndex: number; + } + + interface CardViewFocusEventArgs extends ProcessingModeEventArgs { + readonly isChangedOnServer: boolean; + } + + interface CardViewBatchEditStartEditingEventArgs extends CancelEventArgs { + readonly cardValues: any; + focusedColumn: BootstrapCardViewColumn; + readonly visibleIndex: number; + } + + interface CardViewBatchEditEndEditingEventArgs extends CancelEventArgs { + readonly cardValues: any; + readonly visibleIndex: number; + } + + interface CardViewBatchEditCardValidatingEventArgs extends EventArgs { + readonly validationInfo: any; + readonly visibleIndex: number; + } + + interface CardViewBatchEditConfirmShowingEventArgs extends CancelEventArgs { + readonly requestTriggerID: string; + } + + interface CardViewBatchEditTemplateCellFocusedEventArgs extends EventArgs { + readonly column: BootstrapCardViewColumn; + handled: boolean; + } + + interface CardViewBatchEditChangesSavingEventArgs extends CancelEventArgs { + readonly deletedValues: any; + readonly insertedValues: any; + readonly updatedValues: any; + } + + interface CardViewBatchEditChangesCancelingEventArgs extends CancelEventArgs { + readonly deletedValues: any; + readonly insertedValues: any; + readonly updatedValues: any; + } + + interface CardViewBatchEditCardInsertingEventArgs extends CancelEventArgs { + readonly visibleIndex: number; + } + + interface CardViewBatchEditCardDeletingEventArgs extends CancelEventArgs { + readonly cardValues: any; + readonly visibleIndex: number; + } + + interface CardViewFocusedCellChangingEventArgs extends CancelEventArgs { + readonly cellInfo: BootstrapCardViewCellInfo; + } + + class BootstrapCardView extends BootstrapGridBase { + readonly batchEditApi: BootstrapCardViewBatchEditApi | null; + addNewCard(): void; + applyFilter(filterExpression: string): void; + applySearchPanelFilter(value: string): void; + cancelEdit(): void; + clearFilter(): void; + closeFilterControl(): void; + deleteCard(visibleIndex: number): void; + deleteCardByKey(key: any): void; + focus(): void; + focusEditor(column: BootstrapCardViewColumn): void; + focusEditor(columnIndex: number): void; // tslint:disable-line:unified-signatures + focusEditor(columnFieldNameOrId: string): void; // tslint:disable-line:unified-signatures unified-signatures + getCardKey(visibleIndex: number): string; + getColumn(columnIndex: number): BootstrapCardViewColumn | null; + getColumnByField(columnFieldName: string): BootstrapCardViewColumn | null; + getColumnById(columnId: string): BootstrapCardViewColumn | null; + getColumnCount(): number; + getEditValue(column: BootstrapCardViewColumn): string; + getEditValue(columnIndex: number): string; // tslint:disable-line:unified-signatures + getEditValue(columnFieldNameOrId: string): string; // tslint:disable-line:unified-signatures unified-signatures + getEditor(column: BootstrapCardViewColumn): BootstrapClientEdit; + getEditor(columnIndex: number): BootstrapClientEdit; // tslint:disable-line:unified-signatures + getEditor(columnFieldNameOrId: string): BootstrapClientEdit; // tslint:disable-line:unified-signatures unified-signatures + getFocusedCardIndex(): number; + getFocusedCell(): BootstrapCardViewCellInfo | null; + getPageCount(): number; + getPageIndex(): number; + getPopupEditForm(): BootstrapPopupControl | null; + getSelectedCardCount(): number; + getSelectedKeysOnPage(): any[]; + getTopVisibleIndex(): number; + getVerticalScrollPosition(): number; + getVisibleCardsOnPage(): number; + gotoPage(pageIndex: number): void; + hideCustomizationWindow(): void; + isCardSelectedOnPage(visibleIndex: number): boolean; + isCustomizationWindowVisible(): boolean; + isEditing(): boolean; + isNewCardEditing(): boolean; + moveColumn(column: BootstrapCardViewColumn): void; + moveColumn(columnIndex: number): void; // tslint:disable-line:unified-signatures + moveColumn(columnFieldNameOrId: string): void; // tslint:disable-line:unified-signatures unified-signatures + moveColumn(column: BootstrapCardViewColumn, moveToColumnVisibleIndex: number): void; // tslint:disable-line:unified-signatures + moveColumn(columnIndex: number, moveToColumnVisibleIndex: number): void; // tslint:disable-line:unified-signatures unified-signatures + moveColumn(columnFieldNameOrId: string, moveToColumnVisibleIndex: number): void; // tslint:disable-line:unified-signatures unified-signatures unified-signatures + moveColumn(column: BootstrapCardViewColumn, moveToColumnVisibleIndex: number, moveBefore: boolean): void; // tslint:disable-line:unified-signatures + moveColumn(columnIndex: number, moveToColumnVisibleIndex: number, moveBefore: boolean): void; // tslint:disable-line:unified-signatures unified-signatures + moveColumn(columnFieldNameOrId: string, moveToColumnVisibleIndex: number, moveBefore: boolean): void; // tslint:disable-line:unified-signatures unified-signatures unified-signatures + nextPage(): void; + performCallback(data: any): Promise; + performCallback(data: any, onSuccess: () => void): void; + prevPage(): void; + refresh(): void; + selectAllCardsOnPage(): void; + selectCardOnPage(visibleIndex: number): void; + selectCardOnPage(visibleIndex: number, selected: boolean): void; // tslint:disable-line:unified-signatures + selectCards(): void; + selectCardsByKey(keys: any[]): void; + selectCardsByKey(key: any): void; // tslint:disable-line:unified-signatures + selectCardsByKey(keys: any[], selected: boolean): void; // tslint:disable-line:unified-signatures + selectCardsByKey(key: any, selected: boolean): void; // tslint:disable-line:unified-signatures unified-signatures + setEditValue(column: BootstrapCardViewColumn, value: string): void; + setEditValue(columnIndex: number, value: string): void; // tslint:disable-line:unified-signatures + setEditValue(columnFieldNameOrId: string, value: string): void; // tslint:disable-line:unified-signatures unified-signatures + setFilterEnabled(isFilterEnabled: boolean): void; + setFocusedCardIndex(visibleIndex: number): void; + setFocusedCell(cardVisibleIndex: number, columnIndex: number): void; + setSearchPanelCustomEditor(editor: BootstrapClientEdit): void; + setVerticalScrollPosition(position: number): void; + showCustomizationWindow(): void; + showFilterControl(): void; + sortBy(column: BootstrapCardViewColumn): void; + sortBy(columnIndex: number): void; // tslint:disable-line:unified-signatures + sortBy(columnFieldNameOrId: string): void; // tslint:disable-line:unified-signatures unified-signatures + sortBy(column: BootstrapCardViewColumn, sortOrder: string): void; // tslint:disable-line:unified-signatures + sortBy(columnIndex: number, sortOrder: string): void; // tslint:disable-line:unified-signatures unified-signatures + sortBy(columnFieldNameOrId: string, sortOrder: string): void; // tslint:disable-line:unified-signatures unified-signatures unified-signatures + sortBy(column: BootstrapCardViewColumn, sortOrder: string, reset: boolean): void; // tslint:disable-line:unified-signatures + sortBy(columnIndex: number, sortOrder: string, reset: boolean): void; // tslint:disable-line:unified-signatures unified-signatures + sortBy(columnFieldNameOrId: string, sortOrder: string, reset: boolean): void; // tslint:disable-line:unified-signatures unified-signatures unified-signatures + sortBy(column: BootstrapCardViewColumn, sortOrder: string, reset: boolean, sortIndex: number): void; // tslint:disable-line:unified-signatures + sortBy(columnIndex: number, sortOrder: string, reset: boolean, sortIndex: number): void; // tslint:disable-line:unified-signatures unified-signatures + sortBy(columnFieldNameOrId: string, sortOrder: string, reset: boolean, sortIndex: number): void; // tslint:disable-line:unified-signatures unified-signatures unified-signatures + startEditCard(visibleIndex: number): void; + startEditCardByKey(key: any): void; + unselectAllCardsOnPage(): void; + unselectCardOnPage(visibleIndex: number): void; + unselectCards(): void; + unselectCardsByKey(keys: any[]): void; + unselectCardsByKey(key: any): void; // tslint:disable-line:unified-signatures + unselectFilteredCards(): void; + updateEdit(): void; + on(eventName: K, callback: (this: BootstrapCardView, args?: BootstrapCardViewEventMap[K]) => void): this; + once(eventName: K, callback: (this: BootstrapCardView, args?: BootstrapCardViewEventMap[K]) => void): this; + off(eventName?: K, callback?: (this: BootstrapCardView, args?: BootstrapCardViewEventMap[K]) => void): this; + } + interface BootstrapCardViewEventMap extends BootstrapGridBaseEventMap { + "batchEditCardDeleting": CardViewBatchEditCardDeletingEventArgs; + "batchEditCardInserting": CardViewBatchEditCardInsertingEventArgs; + "batchEditCardValidating": CardViewBatchEditCardValidatingEventArgs; + "batchEditChangesCanceling": CardViewBatchEditChangesCancelingEventArgs; + "batchEditChangesSaving": CardViewBatchEditChangesSavingEventArgs; + "batchEditConfirmShowing": CardViewBatchEditConfirmShowingEventArgs; + "batchEditEndEditing": CardViewBatchEditEndEditingEventArgs; + "batchEditStartEditing": CardViewBatchEditStartEditingEventArgs; + "batchEditTemplateCellFocused": CardViewBatchEditTemplateCellFocusedEventArgs; + "beginCallback": BeginCallbackEventArgs; + "callbackError": CallbackErrorEventArgs; + "cardClick": CardViewCardClickEventArgs; + "cardDblClick": CardViewCardClickEventArgs; + "cardFocusing": CardViewCardFocusingEventArgs; + "columnSorting": CardViewColumnCancelEventArgs; + "customButtonClick": CardViewCustomButtonEventArgs; + "customizationWindowCloseUp": EventArgs; + "endCallback": EndCallbackEventArgs; + "focusedCardChanged": CardViewFocusEventArgs; + "focusedCellChanging": CardViewFocusedCellChangingEventArgs; + "selectionChanged": CardViewSelectionEventArgs; + } + + class BootstrapCardViewBatchEditApi { + protected readonly instance: any; + protected constructor(instance: any); + addNewCard(): void; + deleteCard(visibleIndex: number): void; + deleteCardByKey(key: any): void; + getCardVisibleIndices(includeDeleted: boolean): number[]; + getDeletedCardIndices(): number[]; + getInsertedCardIndices(): number[]; + isDeletedCard(visibleIndex: number): boolean; + isNewCard(visibleIndex: number): boolean; + recoverCard(visibleIndex: number): void; + recoverCardByKey(key: any): void; + validateCard(visibleIndex: number): boolean; + validateCards(validateOnlyModified: boolean): boolean; + } + + class BootstrapCardViewColumn { + protected readonly instance: any; + protected constructor(instance: any); + } + + class BootstrapCardViewCellInfo { + protected readonly instance: any; + protected constructor(instance: any); + readonly cardVisibleIndex: number; + endEdit(): void; + getCellTextContainer(visibleIndex: number, columnFieldNameOrId: string): any; + getCellValue(visibleIndex: number, columnFieldNameOrId: string, initial: boolean): any; + getColumnDisplayText(columnFieldNameOrId: string, value: any): string; + getEditCellInfo(): BootstrapCardViewCellInfo | null; + hasChanges(): boolean; + moveFocusBackward(): boolean; + moveFocusForward(): boolean; + resetChanges(visibleIndex: number): void; + resetChanges(visibleIndex: number, columnIndex: number): void; // tslint:disable-line:unified-signatures + setCellValue(visibleIndex: number, columnFieldNameOrId: string, value: any): void; + setCellValue(visibleIndex: number, columnFieldNameOrId: string, value: any, displayText: string, cancelCellHighlighting: boolean): void; + startEdit(visibleIndex: number, columnIndex: number): void; + } + + interface BootstrapChartEventArgsBase extends EventArgs { + readonly component: any; + readonly element: any; + } + + interface BootstrapChartErrorEventArgs extends BootstrapChartEventArgsBase { + readonly target: any; + } + + interface BootstrapChartElementActionEventArgs extends BootstrapChartEventArgsBase { + readonly target: any; + } + + interface BootstrapChartElementClickEventArgs extends BootstrapChartElementActionEventArgs { + readonly jQueryEvent: any; + } + + interface BootstrapChartExportEventArgs extends BootstrapChartEventArgsBase { + cancel: boolean; + readonly data: any; + readonly fileName: string; + readonly format: string; + } + + interface BootstrapChartOptionChangedEventArgs extends BootstrapChartEventArgsBase { + readonly fullName: string; + readonly name: string; + readonly previousValue: any; + readonly value: any; + } + + interface BootstrapChartZoomEndEventArgs extends BootstrapChartEventArgsBase { + readonly rangeEnd: any; + readonly rangeStart: any; + } + + class BootstrapChart extends Control { + exportTo(format: string, fileName: string): void; + getDataSource(): any; + getInstance(): any; + print(): void; + setDataSource(dataSource: any): void; + setOptions(options: any): void; + on(eventName: K, callback: (this: BootstrapChart, args?: BootstrapChartEventMap[K]) => void): this; + once(eventName: K, callback: (this: BootstrapChart, args?: BootstrapChartEventMap[K]) => void): this; + off(eventName?: K, callback?: (this: BootstrapChart, args?: BootstrapChartEventMap[K]) => void): this; + } + interface BootstrapChartEventMap extends ControlEventMap { + "argumentAxisClick": BootstrapChartElementClickEventArgs; + "disposing": BootstrapChartEventArgsBase; + "done": BootstrapChartEventArgsBase; + "drawn": BootstrapChartEventArgsBase; + "exported": BootstrapChartEventArgsBase; + "exporting": BootstrapChartExportEventArgs; + "fileSaving": BootstrapChartExportEventArgs; + "incidentOccurred": BootstrapChartErrorEventArgs; + "init": BootstrapChartEventArgsBase; + "legendClick": BootstrapChartElementClickEventArgs; + "optionChanged": BootstrapChartOptionChangedEventArgs; + "pointClick": BootstrapChartElementClickEventArgs; + "pointHoverChanged": BootstrapChartElementActionEventArgs; + "pointSelectionChanged": BootstrapChartElementActionEventArgs; + "seriesClick": BootstrapChartElementClickEventArgs; + "seriesHoverChanged": BootstrapChartElementActionEventArgs; + "seriesSelectionChanged": BootstrapChartElementActionEventArgs; + "tooltipHidden": BootstrapChartElementActionEventArgs; + "tooltipShown": BootstrapChartElementActionEventArgs; + "zoomEnd": BootstrapChartZoomEndEventArgs; + "zoomStart": BootstrapChartEventArgsBase; + } + + class BootstrapPolarChart extends Control { + exportTo(format: string, fileName: string): void; + getDataSource(): any; + getInstance(): any; + print(): void; + setDataSource(dataSource: any): void; + setOptions(options: any): void; + on(eventName: K, callback: (this: BootstrapPolarChart, args?: BootstrapPolarChartEventMap[K]) => void): this; + once(eventName: K, callback: (this: BootstrapPolarChart, args?: BootstrapPolarChartEventMap[K]) => void): this; + off(eventName?: K, callback?: (this: BootstrapPolarChart, args?: BootstrapPolarChartEventMap[K]) => void): this; + } + interface BootstrapPolarChartEventMap extends ControlEventMap { + "argumentAxisClick": BootstrapChartElementClickEventArgs; + "disposing": BootstrapChartEventArgsBase; + "done": BootstrapChartEventArgsBase; + "drawn": BootstrapChartEventArgsBase; + "exported": BootstrapChartEventArgsBase; + "exporting": BootstrapChartExportEventArgs; + "fileSaving": BootstrapChartExportEventArgs; + "incidentOccurred": BootstrapChartErrorEventArgs; + "init": BootstrapChartEventArgsBase; + "legendClick": BootstrapChartElementClickEventArgs; + "optionChanged": BootstrapChartOptionChangedEventArgs; + "pointClick": BootstrapChartElementClickEventArgs; + "pointHoverChanged": BootstrapChartElementActionEventArgs; + "pointSelectionChanged": BootstrapChartElementActionEventArgs; + "seriesClick": BootstrapChartElementClickEventArgs; + "seriesHoverChanged": BootstrapChartElementActionEventArgs; + "seriesSelectionChanged": BootstrapChartElementActionEventArgs; + "tooltipHidden": BootstrapChartElementActionEventArgs; + "tooltipShown": BootstrapChartElementActionEventArgs; + } + + class BootstrapPieChart extends Control { + exportTo(format: string, fileName: string): void; + getDataSource(): any; + getInstance(): any; + print(): void; + setDataSource(dataSource: any): void; + setOptions(options: any): void; + on(eventName: K, callback: (this: BootstrapPieChart, args?: BootstrapPieChartEventMap[K]) => void): this; + once(eventName: K, callback: (this: BootstrapPieChart, args?: BootstrapPieChartEventMap[K]) => void): this; + off(eventName?: K, callback?: (this: BootstrapPieChart, args?: BootstrapPieChartEventMap[K]) => void): this; + } + interface BootstrapPieChartEventMap extends ControlEventMap { + "disposing": BootstrapChartEventArgsBase; + "done": BootstrapChartEventArgsBase; + "drawn": BootstrapChartEventArgsBase; + "exported": BootstrapChartEventArgsBase; + "exporting": BootstrapChartExportEventArgs; + "fileSaving": BootstrapChartExportEventArgs; + "incidentOccurred": BootstrapChartErrorEventArgs; + "init": BootstrapChartEventArgsBase; + "legendClick": BootstrapChartElementClickEventArgs; + "optionChanged": BootstrapChartOptionChangedEventArgs; + "pointClick": BootstrapChartElementClickEventArgs; + "pointHoverChanged": BootstrapChartElementActionEventArgs; + "pointSelectionChanged": BootstrapChartElementActionEventArgs; + "tooltipHidden": BootstrapChartElementActionEventArgs; + "tooltipShown": BootstrapChartElementActionEventArgs; + } + + class BootstrapCheckBox extends BootstrapClientEdit { + getCheckState(): string; + getChecked(): boolean; + getText(): string; + setCheckState(checkState: string): void; + setChecked(isChecked: boolean): void; + setText(text: string): void; + on(eventName: K, callback: (this: BootstrapCheckBox, args?: BootstrapCheckBoxEventMap[K]) => void): this; + once(eventName: K, callback: (this: BootstrapCheckBox, args?: BootstrapCheckBoxEventMap[K]) => void): this; + off(eventName?: K, callback?: (this: BootstrapCheckBox, args?: BootstrapCheckBoxEventMap[K]) => void): this; + } + interface BootstrapCheckBoxEventMap extends BootstrapClientEditEventMap { + "checkedChanged": ProcessingModeEventArgs; + } + + class BootstrapRadioButton extends BootstrapClientEdit { + getCheckState(): string; + getChecked(): boolean; + getText(): string; + setCheckState(checkState: string): void; + setChecked(isChecked: boolean): void; + setText(text: string): void; + on(eventName: K, callback: (this: BootstrapRadioButton, args?: BootstrapRadioButtonEventMap[K]) => void): this; + once(eventName: K, callback: (this: BootstrapRadioButton, args?: BootstrapRadioButtonEventMap[K]) => void): this; + off(eventName?: K, callback?: (this: BootstrapRadioButton, args?: BootstrapRadioButtonEventMap[K]) => void): this; + } + interface BootstrapRadioButtonEventMap extends BootstrapClientEditEventMap { + "checkedChanged": ProcessingModeEventArgs; + } + + class BootstrapComboBox extends BootstrapClientEdit { + addItem(texts: string[]): number; + addItem(text: string): number; // tslint:disable-line:unified-signatures + addItem(texts: string[], value: any): number; // tslint:disable-line:unified-signatures + addItem(text: string, value: any): number; // tslint:disable-line:unified-signatures unified-signatures + addItem(texts: string[], value: any, iconCssClass: string): number; // tslint:disable-line:unified-signatures + addItem(text: string, value: any, iconCssClass: string): number; // tslint:disable-line:unified-signatures unified-signatures + addItemCssClass(index: number, className: string): void; + addItemTextCellCssClass(itemIndex: number, textCellIndex: number, className: string): void; + adjustDropDownWindow(): void; + beginUpdate(): void; + clearItems(): void; + endUpdate(): void; + ensureDropDownLoaded(callbackFunction: any): void; + findItemByText(text: string): BootstrapListBoxItem | null; + findItemByValue(value: any): BootstrapListBoxItem | null; + getButtonVisible(number: number): boolean; + getCaretPosition(): number; + getItem(index: number): BootstrapListBoxItem | null; + getItemBadgeIconCssClass(index: number): string; + getItemBadgeText(index: number): string; + getItemCount(): number; + getSelectedIndex(): number; + getSelectedItem(): BootstrapListBoxItem | null; + getText(): string; + hideDropDown(): void; + insertItem(index: number, texts: string[]): void; + insertItem(index: number, text: string): void; // tslint:disable-line:unified-signatures + insertItem(index: number, texts: string[], value: any): void; // tslint:disable-line:unified-signatures + insertItem(index: number, text: string, value: any): void; // tslint:disable-line:unified-signatures unified-signatures + insertItem(index: number, texts: string[], value: any, iconCssClass: string): void; // tslint:disable-line:unified-signatures + insertItem(index: number, text: string, value: any, iconCssClass: string): void; // tslint:disable-line:unified-signatures unified-signatures + makeItemVisible(index: number): void; + performCallback(data: any): Promise; + performCallback(data: any, onSuccess: () => void): void; + removeItem(index: number): void; + removeItemCssClass(index: number, className: string): void; + removeItemTextCellCssClass(itemIndex: number, textCellIndex: number, className: string): void; + selectAll(): void; + setButtonVisible(number: number, value: boolean): void; + setCaretPosition(position: number): void; + setItemBadgeIconCssClass(index: number, cssClass: string): void; + setItemBadgeText(index: number, text: string): void; + setItemHtml(index: number, html: string): void; + setItemTextCellHtml(itemIndex: number, textCellIndex: number, html: string): void; + setItemTextCellTooltip(itemIndex: number, textCellIndex: number, tooltip: string): void; + setItemTooltip(index: number, tooltip: string): void; + setSelectedIndex(index: number): void; + setSelectedItem(item: BootstrapListBoxItem): void; + setSelection(startPos: number, endPos: number, scrollToSelection: boolean): void; + setText(text: string, applyFilter: boolean): void; + showDropDown(): void; + on(eventName: K, callback: (this: BootstrapComboBox, args?: BootstrapComboBoxEventMap[K]) => void): this; + once(eventName: K, callback: (this: BootstrapComboBox, args?: BootstrapComboBoxEventMap[K]) => void): this; + off(eventName?: K, callback?: (this: BootstrapComboBox, args?: BootstrapComboBoxEventMap[K]) => void): this; + } + interface BootstrapComboBoxEventMap extends BootstrapClientEditEventMap { + "beginCallback": BeginCallbackEventArgs; + "buttonClick": ButtonEditClickEventArgs; + "callbackError": CallbackErrorEventArgs; + "closeUp": EventArgs; + "customHighlighting": ListEditCustomHighlightingEventArgs; + "dropDown": EventArgs; + "endCallback": EndCallbackEventArgs; + "itemFiltering": ListEditItemFilteringEventArgs; + "keyDown": EditKeyEventArgs; + "keyPress": EditKeyEventArgs; + "keyUp": EditKeyEventArgs; + "queryCloseUp": CancelEventArgs; + "selectedIndexChanged": ProcessingModeEventArgs; + "textChanged": ProcessingModeEventArgs; + "userInput": EventArgs; + } + + interface ParseDateEventArgs extends EventArgs { + readonly date: Date; + readonly handled: boolean; + readonly value: string; + } + + class BootstrapDateEdit extends BootstrapClientEdit { + adjustDropDownWindow(): void; + getButtonVisible(number: number): boolean; + getCalendar(): BootstrapCalendar | null; + getCaretPosition(): number; + getDate(): Date; + getMaxDate(): Date; + getMinDate(): Date; + getRangeDayCount(): number; + getText(): string; + getTimeEdit(): BootstrapTimeEdit | null; + hideDropDown(): void; + selectAll(): void; + setButtonVisible(number: number, value: boolean): void; + setCaretPosition(position: number): void; + setDate(date: Date): void; + setMaxDate(date: Date): void; + setMinDate(date: Date): void; + setSelection(startPos: number, endPos: number, scrollToSelection: boolean): void; + setText(text: string): void; + showDropDown(): void; + on(eventName: K, callback: (this: BootstrapDateEdit, args?: BootstrapDateEditEventMap[K]) => void): this; + once(eventName: K, callback: (this: BootstrapDateEdit, args?: BootstrapDateEditEventMap[K]) => void): this; + off(eventName?: K, callback?: (this: BootstrapDateEdit, args?: BootstrapDateEditEventMap[K]) => void): this; + } + interface BootstrapDateEditEventMap extends BootstrapClientEditEventMap { + "buttonClick": ButtonEditClickEventArgs; + "calendarCustomDisabledDate": CalendarCustomDisabledDateEventArgs; + "closeUp": EventArgs; + "dateChanged": ProcessingModeEventArgs; + "dropDown": EventArgs; + "keyDown": EditKeyEventArgs; + "keyPress": EditKeyEventArgs; + "keyUp": EditKeyEventArgs; + "parseDate": ParseDateEventArgs; + "queryCloseUp": CancelEventArgs; + "textChanged": ProcessingModeEventArgs; + "userInput": EventArgs; + } + + class BootstrapDropDownEdit extends BootstrapClientEdit { + adjustDropDownWindow(): void; + getButtonVisible(number: number): boolean; + getCaretPosition(): number; + getKeyValue(): string; + getText(): string; + hideDropDown(): void; + selectAll(): void; + setButtonVisible(number: number, value: boolean): void; + setCaretPosition(position: number): void; + setKeyValue(keyValue: string): void; + setSelection(startPos: number, endPos: number, scrollToSelection: boolean): void; + setText(text: string): void; + showDropDown(): void; + on(eventName: K, callback: (this: BootstrapDropDownEdit, args?: BootstrapDropDownEditEventMap[K]) => void): this; + once(eventName: K, callback: (this: BootstrapDropDownEdit, args?: BootstrapDropDownEditEventMap[K]) => void): this; + off(eventName?: K, callback?: (this: BootstrapDropDownEdit, args?: BootstrapDropDownEditEventMap[K]) => void): this; + } + interface BootstrapDropDownEditEventMap extends BootstrapClientEditEventMap { + "buttonClick": ButtonEditClickEventArgs; + "closeUp": EventArgs; + "dropDown": EventArgs; + "keyDown": EditKeyEventArgs; + "keyPress": EditKeyEventArgs; + "keyUp": EditKeyEventArgs; + "queryCloseUp": CancelEventArgs; + "textChanged": ProcessingModeEventArgs; + "userInput": EventArgs; + } + + class BootstrapFormLayout extends Control { + getItemByName(name: string): BootstrapFormLayoutItem | null; + on(eventName: K, callback: (this: BootstrapFormLayout, args?: BootstrapFormLayoutEventMap[K]) => void): this; + once(eventName: K, callback: (this: BootstrapFormLayout, args?: BootstrapFormLayoutEventMap[K]) => void): this; + off(eventName?: K, callback?: (this: BootstrapFormLayout, args?: BootstrapFormLayoutEventMap[K]) => void): this; + } + interface BootstrapFormLayoutEventMap extends ControlEventMap { // tslint:disable-line:no-empty-interface + } + + class BootstrapFormLayoutItem { + protected readonly instance: any; + protected constructor(instance: any); + readonly formLayout: BootstrapFormLayout | null; + readonly name: string; + readonly parent: BootstrapFormLayoutItem | null; + getCaption(): string; + getItemByName(name: string): BootstrapFormLayoutItem | null; + getVisible(): boolean; + setCaption(caption: string): void; + setVisible(value: boolean): void; + } + + interface GridViewColumnCancelEventArgs extends CancelEventArgs { + readonly column: BootstrapGridViewColumn; + } + + interface GridViewColumnProcessingModeEventArgs extends ProcessingModeEventArgs { + readonly column: BootstrapGridViewColumn; + } + + interface GridViewRowCancelEventArgs extends CancelEventArgs { + readonly visibleIndex: number; + } + + interface GridViewSelectionEventArgs extends ProcessingModeEventArgs { + readonly isAllRecordsOnPage: boolean; + readonly isChangedOnServer: boolean; + readonly isSelected: boolean; + readonly visibleIndex: number; + } + + interface GridViewFocusEventArgs extends ProcessingModeEventArgs { + readonly isChangedOnServer: boolean; + } + + interface GridViewRowFocusingEventArgs extends GridViewRowCancelEventArgs { + readonly htmlEvent: any; + } + + interface GridViewRowClickEventArgs extends GridViewRowCancelEventArgs { + readonly htmlEvent: any; + } + + interface GridViewContextMenuEventArgs extends EventArgs { + readonly htmlEvent: any; + readonly index: number; + readonly menu: any; + readonly objectType: string; + showBrowserMenu: boolean; + } + + interface GridViewContextMenuItemClickEventArgs extends ProcessingModeEventArgs { + readonly elementIndex: number; + handled: boolean; + readonly item: BootstrapMenuItem; + readonly objectType: string; + usePostBack: boolean; + } + + interface GridViewCustomButtonEventArgs extends ProcessingModeEventArgs { + readonly buttonID: string; + readonly visibleIndex: number; + } + + interface GridViewColumnMovingEventArgs extends EventArgs { + allow: boolean; + readonly destinationColumn: BootstrapGridViewColumn; + readonly isDropBefore: boolean; + readonly isGroupPanel: boolean; + readonly sourceColumn: BootstrapGridViewColumn; + } + + interface GridViewBatchEditConfirmShowingEventArgs extends CancelEventArgs { + readonly requestTriggerID: string; + } + + interface GridViewBatchEditStartEditingEventArgs extends CancelEventArgs { + focusedColumn: BootstrapGridViewColumn; + readonly rowValues: any; + readonly visibleIndex: number; + } + + interface GridViewBatchEditEndEditingEventArgs extends CancelEventArgs { + readonly rowValues: any; + readonly visibleIndex: number; + } + + interface GridViewBatchEditRowValidatingEventArgs extends EventArgs { + readonly validationInfo: any; + readonly visibleIndex: number; + } + + interface GridViewBatchEditTemplateCellFocusedEventArgs extends EventArgs { + readonly column: BootstrapGridViewColumn; + handled: boolean; + } + + interface GridViewBatchEditChangesSavingEventArgs extends CancelEventArgs { + readonly deletedValues: any; + readonly insertedValues: any; + readonly updatedValues: any; + } + + interface GridViewBatchEditChangesCancelingEventArgs extends CancelEventArgs { + readonly deletedValues: any; + readonly insertedValues: any; + readonly updatedValues: any; + } + + interface GridViewBatchEditRowInsertingEventArgs extends CancelEventArgs { + readonly visibleIndex: number; + } + + interface GridViewBatchEditRowDeletingEventArgs extends CancelEventArgs { + readonly rowValues: any; + readonly visibleIndex: number; + } + + interface GridViewFocusedCellChangingEventArgs extends CancelEventArgs { + readonly cellInfo: BootstrapGridViewCellInfo; + } + + class BootstrapGridView extends BootstrapGridBase { + readonly batchEditApi: BootstrapGridViewBatchEditApi | null; + addNewRow(): void; + applyFilter(filterExpression: string): void; + applyOnClickRowFilter(): void; + applySearchPanelFilter(value: string): void; + autoFilterByColumn(column: BootstrapGridViewColumn, val: string): void; + autoFilterByColumn(columnIndex: number, val: string): void; // tslint:disable-line:unified-signatures + autoFilterByColumn(columnFieldNameOrId: string, val: string): void; // tslint:disable-line:unified-signatures unified-signatures + cancelEdit(): void; + clearFilter(): void; + closeFilterControl(): void; + collapseAll(): void; + collapseAllDetailRows(): void; + collapseDetailRow(visibleIndex: number): void; + collapseRow(visibleIndex: number): void; + collapseRow(visibleIndex: number, recursive: boolean): void; // tslint:disable-line:unified-signatures + deleteRow(visibleIndex: number): void; + deleteRowByKey(key: any): void; + expandAll(): void; + expandAllDetailRows(): void; + expandDetailRow(visibleIndex: number): void; + expandRow(visibleIndex: number): void; + expandRow(visibleIndex: number, recursive: boolean): void; // tslint:disable-line:unified-signatures + focus(): void; + focusEditor(column: BootstrapGridViewColumn): void; + focusEditor(columnIndex: number): void; // tslint:disable-line:unified-signatures + focusEditor(columnFieldNameOrId: string): void; // tslint:disable-line:unified-signatures unified-signatures + getAutoFilterEditor(column: BootstrapGridViewColumn): any; + getAutoFilterEditor(columnIndex: number): any; // tslint:disable-line:unified-signatures + getAutoFilterEditor(columnFieldNameOrId: string): any; // tslint:disable-line:unified-signatures unified-signatures + getColumn(columnIndex: number): BootstrapGridViewColumn | null; + getColumnByField(columnFieldName: string): BootstrapGridViewColumn | null; + getColumnById(columnId: string): BootstrapGridViewColumn | null; + getColumnCount(): number; + getColumnLayout(): any; + getEditValue(column: BootstrapGridViewColumn): string; + getEditValue(columnIndex: number): string; // tslint:disable-line:unified-signatures + getEditValue(columnFieldNameOrId: string): string; // tslint:disable-line:unified-signatures unified-signatures + getEditor(column: BootstrapGridViewColumn): BootstrapClientEdit; + getEditor(columnIndex: number): BootstrapClientEdit; // tslint:disable-line:unified-signatures + getEditor(columnFieldNameOrId: string): BootstrapClientEdit; // tslint:disable-line:unified-signatures unified-signatures + getFocusedCell(): BootstrapGridViewCellInfo | null; + getFocusedRowIndex(): number; + getHorizontalScrollPosition(): number; + getPageCount(): number; + getPageIndex(): number; + getPopupEditForm(): BootstrapPopupControl | null; + getRowIndicesVisibleInViewPort(includePartiallyVisible: boolean): number[]; + getRowKey(visibleIndex: number): string; + getSelectedKeysOnPage(): any[]; + getSelectedRowCount(): number; + getTopVisibleIndex(): number; + getVerticalScrollPosition(): number; + getVisibleRowsOnPage(): number; + gotoPage(pageIndex: number): void; + groupBy(column: BootstrapGridViewColumn): void; + groupBy(columnIndex: number): void; // tslint:disable-line:unified-signatures + groupBy(columnFieldNameOrId: string): void; // tslint:disable-line:unified-signatures unified-signatures + groupBy(column: BootstrapGridViewColumn, groupIndex: number): void; // tslint:disable-line:unified-signatures + groupBy(columnIndex: number, groupIndex: number): void; // tslint:disable-line:unified-signatures unified-signatures + groupBy(columnFieldNameOrId: string, groupIndex: number): void; // tslint:disable-line:unified-signatures unified-signatures unified-signatures + groupBy(column: BootstrapGridViewColumn, groupIndex: number, sortOrder: string): void; // tslint:disable-line:unified-signatures + groupBy(columnIndex: number, groupIndex: number, sortOrder: string): void; // tslint:disable-line:unified-signatures unified-signatures + groupBy(columnFieldNameOrId: string, groupIndex: number, sortOrder: string): void; // tslint:disable-line:unified-signatures unified-signatures unified-signatures + hideCustomizationWindow(): void; + isCustomizationWindowVisible(): boolean; + isDataRow(visibleIndex: number): boolean; + isEditing(): boolean; + isGroupRow(visibleIndex: number): boolean; + isGroupRowExpanded(visibleIndex: number): boolean; + isNewRowEditing(): boolean; + isRowSelectedOnPage(visibleIndex: number): boolean; + makeRowVisible(visibleIndex: number): void; + nextPage(): void; + performCallback(data: any): Promise; + performCallback(data: any, onSuccess: () => void): void; + prevPage(): void; + refresh(): void; + selectAllRowsOnPage(): void; + selectRowOnPage(visibleIndex: number): void; + selectRowOnPage(visibleIndex: number, selected: boolean): void; // tslint:disable-line:unified-signatures + selectRows(): void; + selectRowsByKey(keys: any[]): void; + selectRowsByKey(key: any): void; // tslint:disable-line:unified-signatures + selectRowsByKey(keys: any[], selected: boolean): void; // tslint:disable-line:unified-signatures + selectRowsByKey(key: any, selected: boolean): void; // tslint:disable-line:unified-signatures unified-signatures + setColumnLayout(columnLayout: any): void; + setEditValue(column: BootstrapGridViewColumn, value: string): void; + setEditValue(columnIndex: number, value: string): void; // tslint:disable-line:unified-signatures + setEditValue(columnFieldNameOrId: string, value: string): void; // tslint:disable-line:unified-signatures unified-signatures + setFilterEnabled(isFilterEnabled: boolean): void; + setFixedColumnScrollableRows(scrollableRowSettings: any): void; + setFocusedCell(rowVisibleIndex: number, columnIndex: number): void; + setFocusedRowIndex(visibleIndex: number): void; + setHorizontalScrollPosition(position: number): void; + setSearchPanelCustomEditor(editor: BootstrapClientEdit): void; + setVerticalScrollPosition(position: number): void; + showCustomizationDialog(): void; + showCustomizationWindow(): void; + showFilterControl(): void; + sortBy(column: BootstrapGridViewColumn): void; + sortBy(columnIndex: number): void; // tslint:disable-line:unified-signatures + sortBy(columnFieldNameOrId: string): void; // tslint:disable-line:unified-signatures unified-signatures + sortBy(column: BootstrapGridViewColumn, sortOrder: string): void; // tslint:disable-line:unified-signatures + sortBy(columnIndex: number, sortOrder: string): void; // tslint:disable-line:unified-signatures unified-signatures + sortBy(columnFieldNameOrId: string, sortOrder: string): void; // tslint:disable-line:unified-signatures unified-signatures unified-signatures + sortBy(column: BootstrapGridViewColumn, sortOrder: string, reset: boolean): void; // tslint:disable-line:unified-signatures + sortBy(columnIndex: number, sortOrder: string, reset: boolean): void; // tslint:disable-line:unified-signatures unified-signatures + sortBy(columnFieldNameOrId: string, sortOrder: string, reset: boolean): void; // tslint:disable-line:unified-signatures unified-signatures unified-signatures + sortBy(column: BootstrapGridViewColumn, sortOrder: string, reset: boolean, sortIndex: number): void; // tslint:disable-line:unified-signatures + sortBy(columnIndex: number, sortOrder: string, reset: boolean, sortIndex: number): void; // tslint:disable-line:unified-signatures unified-signatures + sortBy(columnFieldNameOrId: string, sortOrder: string, reset: boolean, sortIndex: number): void; // tslint:disable-line:unified-signatures unified-signatures unified-signatures + startEditRow(visibleIndex: number): void; + startEditRowByKey(key: any): void; + ungroup(column: BootstrapGridViewColumn): void; + ungroup(columnIndex: number): void; // tslint:disable-line:unified-signatures + ungroup(columnFieldNameOrId: string): void; // tslint:disable-line:unified-signatures unified-signatures + unselectAllRowsOnPage(): void; + unselectFilteredRows(): void; + unselectRowOnPage(visibleIndex: number): void; + unselectRows(): void; + unselectRowsByKey(keys: any[]): void; + unselectRowsByKey(key: any): void; // tslint:disable-line:unified-signatures + updateEdit(): void; + on(eventName: K, callback: (this: BootstrapGridView, args?: BootstrapGridViewEventMap[K]) => void): this; + once(eventName: K, callback: (this: BootstrapGridView, args?: BootstrapGridViewEventMap[K]) => void): this; + off(eventName?: K, callback?: (this: BootstrapGridView, args?: BootstrapGridViewEventMap[K]) => void): this; + } + interface BootstrapGridViewEventMap extends BootstrapGridBaseEventMap { + "batchEditChangesCanceling": GridViewBatchEditChangesCancelingEventArgs; + "batchEditChangesSaving": GridViewBatchEditChangesSavingEventArgs; + "batchEditConfirmShowing": GridViewBatchEditConfirmShowingEventArgs; + "batchEditEndEditing": GridViewBatchEditEndEditingEventArgs; + "batchEditRowDeleting": GridViewBatchEditRowDeletingEventArgs; + "batchEditRowInserting": GridViewBatchEditRowInsertingEventArgs; + "batchEditRowValidating": GridViewBatchEditRowValidatingEventArgs; + "batchEditStartEditing": GridViewBatchEditStartEditingEventArgs; + "batchEditTemplateCellFocused": GridViewBatchEditTemplateCellFocusedEventArgs; + "beginCallback": BeginCallbackEventArgs; + "callbackError": CallbackErrorEventArgs; + "columnGrouping": GridViewColumnCancelEventArgs; + "columnMoving": GridViewColumnMovingEventArgs; + "columnResized": GridViewColumnProcessingModeEventArgs; + "columnResizing": GridViewColumnCancelEventArgs; + "columnSorting": GridViewColumnCancelEventArgs; + "columnStartDragging": GridViewColumnCancelEventArgs; + "contextMenu": GridViewContextMenuEventArgs; + "contextMenuItemClick": GridViewContextMenuItemClickEventArgs; + "customButtonClick": GridViewCustomButtonEventArgs; + "customizationWindowCloseUp": EventArgs; + "detailRowCollapsing": GridViewRowCancelEventArgs; + "detailRowExpanding": GridViewRowCancelEventArgs; + "endCallback": EndCallbackEventArgs; + "focusedCellChanging": GridViewFocusedCellChangingEventArgs; + "focusedRowChanged": GridViewFocusEventArgs; + "rowClick": GridViewRowClickEventArgs; + "rowCollapsing": GridViewRowCancelEventArgs; + "rowDblClick": GridViewRowClickEventArgs; + "rowExpanding": GridViewRowCancelEventArgs; + "rowFocusing": GridViewRowFocusingEventArgs; + "selectionChanged": GridViewSelectionEventArgs; + } + + class BootstrapGridViewBatchEditApi { + protected readonly instance: any; + protected constructor(instance: any); + addNewRow(): void; + deleteRow(visibleIndex: number): void; + deleteRowByKey(key: any): void; + endEdit(): void; + getCellTextContainer(visibleIndex: number, columnFieldNameOrId: string): any; + getCellValue(visibleIndex: number, columnFieldNameOrId: string, initial: boolean): any; + getColumnDisplayText(columnFieldNameOrId: string, value: any): string; + getDeletedRowIndices(): number[]; + getEditCellInfo(): BootstrapGridViewCellInfo | null; + getInsertedRowIndices(): number[]; + getRowVisibleIndices(includeDeleted: boolean): number[]; + hasChanges(): boolean; + isDeletedRow(visibleIndex: number): boolean; + isNewRow(visibleIndex: number): boolean; + moveFocusBackward(): boolean; + moveFocusForward(): boolean; + recoverRow(visibleIndex: number): void; + recoverRowByKey(key: any): void; + resetChanges(visibleIndex: number): void; + resetChanges(visibleIndex: number, columnIndex: number): void; // tslint:disable-line:unified-signatures + setCellValue(visibleIndex: number, columnFieldNameOrId: string, value: any): void; + setCellValue(visibleIndex: number, columnFieldNameOrId: string, value: any, displayText: string, cancelCellHighlighting: boolean): void; + startEdit(visibleIndex: number, columnIndex: number): void; + validateRow(visibleIndex: number): boolean; + validateRows(validateOnlyModified: boolean): boolean; + } + + class BootstrapGridViewColumn { + protected readonly instance: any; + protected constructor(instance: any); + readonly fieldName: string; + readonly index: number; + readonly name: string; + readonly visible: boolean; + } + + class BootstrapGridViewCellInfo { + protected readonly instance: any; + protected constructor(instance: any); + readonly rowVisibleIndex: number; + } + + class BootstrapHyperLink extends Control { + getBadgeIconCssClass(): string; + getBadgeText(): string; + getCaption(): string; + getEnabled(): boolean; + getNavigateUrl(): string; + getText(): string; + getValue(): any; + setBadgeIconCssClass(cssClass: string): void; + setBadgeText(text: string): void; + setCaption(caption: string): void; + setEnabled(value: boolean): void; + setNavigateUrl(url: string): void; + setText(text: string): void; + setValue(value: any): void; + on(eventName: K, callback: (this: BootstrapHyperLink, args?: BootstrapHyperLinkEventMap[K]) => void): this; + once(eventName: K, callback: (this: BootstrapHyperLink, args?: BootstrapHyperLinkEventMap[K]) => void): this; + off(eventName?: K, callback?: (this: BootstrapHyperLink, args?: BootstrapHyperLinkEventMap[K]) => void): this; + } + interface BootstrapHyperLinkEventMap extends ControlEventMap { + "click": EditClickEventArgs; + } + + interface ListEditItemSelectedChangedEventArgs extends ProcessingModeEventArgs { + readonly index: number; + readonly isSelected: boolean; + } + + interface ListEditCustomHighlightingEventArgs extends EventArgs { + readonly filter: string; + highlighting: any; + } + + interface ListEditItemFilteringEventArgs extends EventArgs { + readonly filter: string; + isFit: boolean; + readonly item: BootstrapListBoxItem; + } + + class BootstrapListBox extends BootstrapClientEdit { + addItem(texts: string[]): number; + addItem(text: string): number; // tslint:disable-line:unified-signatures + addItem(texts: string[], value: any): number; // tslint:disable-line:unified-signatures + addItem(text: string, value: any): number; // tslint:disable-line:unified-signatures unified-signatures + addItem(texts: string[], value: any, iconCssClass: string): number; // tslint:disable-line:unified-signatures + addItem(text: string, value: any, iconCssClass: string): number; // tslint:disable-line:unified-signatures unified-signatures + addItemCssClass(index: number, className: string): void; + addItemTextCellCssClass(itemIndex: number, textCellIndex: number, className: string): void; + beginUpdate(): void; + clearItems(): void; + endUpdate(): void; + findItemByText(text: string): BootstrapListBoxItem | null; + findItemByValue(value: any): BootstrapListBoxItem | null; + getItem(index: number): BootstrapListBoxItem | null; + getItemBadgeIconCssClass(index: number): string; + getItemBadgeText(index: number): string; + getItemCount(): number; + getSelectedIndex(): number; + getSelectedIndices(): number[]; + getSelectedItem(): BootstrapListBoxItem | null; + getSelectedItems(): BootstrapListBoxItem[]; + getSelectedValues(): any[]; + insertItem(index: number, texts: string[]): void; + insertItem(index: number, text: string): void; // tslint:disable-line:unified-signatures + insertItem(index: number, texts: string[], value: any): void; // tslint:disable-line:unified-signatures + insertItem(index: number, text: string, value: any): void; // tslint:disable-line:unified-signatures unified-signatures + insertItem(index: number, texts: string[], value: any, iconCssClass: string): void; // tslint:disable-line:unified-signatures + insertItem(index: number, text: string, value: any, iconCssClass: string): void; // tslint:disable-line:unified-signatures unified-signatures + makeItemVisible(index: number): void; + performCallback(data: any): Promise; + performCallback(data: any, onSuccess: () => void): void; + removeItem(index: number): void; + removeItemCssClass(index: number, className: string): void; + removeItemTextCellCssClass(itemIndex: number, textCellIndex: number, className: string): void; + selectAll(): void; + selectIndices(indices: number[]): void; + selectItems(items: BootstrapListBoxItem[]): void; + selectValues(values: any[]): void; + setItemBadgeIconCssClass(index: number, cssClass: string): void; + setItemBadgeText(index: number, text: string): void; + setItemHtml(index: number, html: string): void; + setItemTextCellHtml(itemIndex: number, textCellIndex: number, html: string): void; + setItemTextCellTooltip(itemIndex: number, textCellIndex: number, tooltip: string): void; + setItemTooltip(index: number, tooltip: string): void; + setSelectedIndex(index: number): void; + setSelectedItem(item: BootstrapListBoxItem): void; + unselectAll(): void; + unselectIndices(indices: number[]): void; + unselectItems(items: BootstrapListBoxItem[]): void; + unselectValues(values: any[]): void; + on(eventName: K, callback: (this: BootstrapListBox, args?: BootstrapListBoxEventMap[K]) => void): this; + once(eventName: K, callback: (this: BootstrapListBox, args?: BootstrapListBoxEventMap[K]) => void): this; + off(eventName?: K, callback?: (this: BootstrapListBox, args?: BootstrapListBoxEventMap[K]) => void): this; + } + interface BootstrapListBoxEventMap extends BootstrapClientEditEventMap { + "beginCallback": BeginCallbackEventArgs; + "callbackError": CallbackErrorEventArgs; + "customHighlighting": ListEditCustomHighlightingEventArgs; + "endCallback": EndCallbackEventArgs; + "itemDoubleClick": EventArgs; + "itemFiltering": ListEditItemFilteringEventArgs; + "keyDown": EditKeyEventArgs; + "keyPress": EditKeyEventArgs; + "keyUp": EditKeyEventArgs; + "selectedIndexChanged": ProcessingModeEventArgs; + } + + class BootstrapListBoxItem { + protected readonly instance: any; + protected constructor(instance: any); + readonly iconCssClass: string; + readonly imageUrl: string; + readonly index: number; + readonly listEditBase: BootstrapListBox | null; + readonly text: string; + readonly value: any; + getColumnText(columnIndex: number): string; + getColumnText(columnName: string): string; // tslint:disable-line:unified-signatures + getFieldText(fieldIndex: number): string; + getFieldText(fieldName: string): string; // tslint:disable-line:unified-signatures + } + + class BootstrapCheckBoxList extends BootstrapListBox { + getItem(index: number): BootstrapListBoxItem | null; + getItemCount(): number; + getSelectedIndices(): number[]; + getSelectedItems(): BootstrapListBoxItem[]; + getSelectedValues(): any[]; + selectAll(): void; + selectIndices(indices: number[]): void; + selectItems(items: BootstrapListBoxItem[]): void; + selectValues(values: any[]): void; + unselectAll(): void; + unselectIndices(indices: number[]): void; + unselectItems(items: BootstrapListBoxItem[]): void; + unselectValues(values: any[]): void; + on(eventName: K, callback: (this: BootstrapCheckBoxList, args?: BootstrapCheckBoxListEventMap[K]) => void): this; + once(eventName: K, callback: (this: BootstrapCheckBoxList, args?: BootstrapCheckBoxListEventMap[K]) => void): this; + off(eventName?: K, callback?: (this: BootstrapCheckBoxList, args?: BootstrapCheckBoxListEventMap[K]) => void): this; + } + interface BootstrapCheckBoxListEventMap extends BootstrapListBoxEventMap { // tslint:disable-line:no-empty-interface + } + + class BootstrapRadioButtonList extends BootstrapListBox { + getItem(index: number): BootstrapListBoxItem | null; + getItemCount(): number; + on(eventName: K, callback: (this: BootstrapRadioButtonList, args?: BootstrapRadioButtonListEventMap[K]) => void): this; + once(eventName: K, callback: (this: BootstrapRadioButtonList, args?: BootstrapRadioButtonListEventMap[K]) => void): this; + off(eventName?: K, callback?: (this: BootstrapRadioButtonList, args?: BootstrapRadioButtonListEventMap[K]) => void): this; + } + interface BootstrapRadioButtonListEventMap extends BootstrapListBoxEventMap { // tslint:disable-line:no-empty-interface + } + + interface MenuItemEventArgs extends EventArgs { + readonly item: BootstrapMenuItem; + } + + interface MenuItemMouseEventArgs extends MenuItemEventArgs { // tslint:disable-line:no-empty-interface + } + + interface MenuItemClickEventArgs extends ProcessingModeEventArgs { + readonly htmlElement: object; + readonly htmlEvent: object; + readonly item: BootstrapMenuItem; + } + + class BootstrapMenu extends Control { + getItem(index: number): BootstrapMenuItem | null; + getItemByName(name: string): BootstrapMenuItem | null; + getItemCount(): number; + getOrientation(): string; + getRootItem(): BootstrapMenuItem | null; + getSelectedItem(): BootstrapMenuItem | null; + setOrientation(orientation: string): void; + setSelectedItem(item: BootstrapMenuItem): void; + on(eventName: K, callback: (this: BootstrapMenu, args?: BootstrapMenuEventMap[K]) => void): this; + once(eventName: K, callback: (this: BootstrapMenu, args?: BootstrapMenuEventMap[K]) => void): this; + off(eventName?: K, callback?: (this: BootstrapMenu, args?: BootstrapMenuEventMap[K]) => void): this; + } + interface BootstrapMenuEventMap extends ControlEventMap { + "closeUp": MenuItemEventArgs; + "itemClick": MenuItemClickEventArgs; + "itemMouseOut": MenuItemMouseEventArgs; + "itemMouseOver": MenuItemMouseEventArgs; + "popUp": MenuItemEventArgs; + } + + class BootstrapMenuItem { + protected readonly instance: any; + protected constructor(instance: any); + readonly index: number; + readonly indexPath: string; + readonly menu: BootstrapMenu | null; + readonly name: string; + readonly parent: BootstrapMenuItem | null; + getBadgeIconCssClass(): string; + getBadgeText(): string; + getChecked(): boolean; + getEnabled(): boolean; + getIconCssClass(): string; + getImageUrl(): string; + getItem(index: number): BootstrapMenuItem | null; + getItemByName(name: string): BootstrapMenuItem | null; + getItemCount(): number; + getNavigateUrl(): string; + getText(): string; + getVisible(): boolean; + setBadgeIconCssClass(cssClass: string): void; + setBadgeText(text: string): void; + setChecked(value: boolean): void; + setEnabled(value: boolean): void; + setIconCssClass(cssClass: string): void; + setImageUrl(value: string): void; + setNavigateUrl(value: string): void; + setText(value: string): void; + setVisible(value: boolean): void; + } + + interface PopupWindowEventArgs extends EventArgs { + readonly window: BootstrapPopupWindow; + } + + interface PopupWindowCloseUpEventArgs extends PopupWindowEventArgs { + readonly closeReason: BootstrapPopupControlCloseReason; + } + + interface PopupWindowCancelEventArgs extends CancelEventArgs { + readonly closeReason: BootstrapPopupControlCloseReason; + readonly window: BootstrapPopupWindow; + } + + interface PopupWindowPinnedChangedEventArgs extends PopupWindowEventArgs { + readonly pinned: boolean; + } + + interface PopupWindowResizeEventArgs extends PopupWindowEventArgs { + readonly resizeState: number; + } + + class BootstrapPopupControl extends Control { + adjustSize(): void; + bringToFront(): void; + bringWindowToFront(window: BootstrapPopupWindow): void; + getCollapsed(): boolean; + getContentHeight(): number; + getContentHtml(): string; + getContentIFrame(): any; + getContentIFrameWindow(): any; + getContentUrl(): string; + getContentWidth(): number; + getCurrentPopupElement(): any; + getCurrentPopupElementIndex(): number; + getFooterImageUrl(): string; + getFooterNavigateUrl(): string; + getFooterText(): string; + getHeaderImageUrl(): string; + getHeaderNavigateUrl(): string; + getHeaderText(): string; + getMainElement(): any; + getMaximized(): boolean; + getPinned(): boolean; + getPopUpReasonMouseEvent(): any; + getWindow(index: number): BootstrapPopupWindow | null; + getWindowByName(name: string): BootstrapPopupWindow | null; + getWindowCollapsed(window: BootstrapPopupWindow): boolean; + getWindowContentHeight(window: BootstrapPopupWindow): number; + getWindowContentHtml(window: BootstrapPopupWindow): string; + getWindowContentIFrame(window: BootstrapPopupWindow): any; + getWindowContentUrl(window: BootstrapPopupWindow): string; + getWindowContentWidth(window: BootstrapPopupWindow): number; + getWindowCount(): number; + getWindowCurrentPopupElement(window: BootstrapPopupWindow): any; + getWindowCurrentPopupElementIndex(window: BootstrapPopupWindow): number; + getWindowHeight(window: BootstrapPopupWindow): number; + getWindowMaximized(window: BootstrapPopupWindow): boolean; + getWindowPinned(window: BootstrapPopupWindow): boolean; + getWindowPopUpReasonMouseEvent(window: BootstrapPopupWindow): any; + getWindowWidth(window: BootstrapPopupWindow): number; + hide(): void; + hideWindow(window: BootstrapPopupWindow): void; + isVisible(): boolean; + isWindowVisible(window: BootstrapPopupWindow): boolean; + performCallback(data: any): Promise; + performCallback(data: any, onSuccess: () => void): void; + refreshContentUrl(): void; + refreshPopupElementConnection(): void; + refreshWindowContentUrl(window: BootstrapPopupWindow): void; + setAdaptiveMaxHeight(maxHeight: number): void; + setAdaptiveMaxHeight(maxHeight: string): void; // tslint:disable-line:unified-signatures + setAdaptiveMaxWidth(maxWidth: number): void; + setAdaptiveMaxWidth(maxWidth: string): void; // tslint:disable-line:unified-signatures + setAdaptiveMinHeight(minHeight: number): void; + setAdaptiveMinHeight(minHeight: string): void; // tslint:disable-line:unified-signatures + setAdaptiveMinWidth(minWidth: number): void; + setAdaptiveMinWidth(minWidth: string): void; // tslint:disable-line:unified-signatures + setCollapsed(value: boolean): void; + setContentHtml(html: string): void; + setContentUrl(url: string): void; + setFooterImageUrl(value: string): void; + setFooterNavigateUrl(value: string): void; + setFooterText(value: string): void; + setHeaderImageUrl(value: string): void; + setHeaderNavigateUrl(value: string): void; + setHeaderText(value: string): void; + setMaximized(value: boolean): void; + setPinned(value: boolean): void; + setPopupElementCssSelector(selector: string): void; + setPopupElementID(popupElementId: string): void; + setSize(width: number, height: number): void; + setWindowAdaptiveMaxHeight(window: BootstrapPopupWindow, maxHeight: number): void; + setWindowAdaptiveMaxHeight(window: BootstrapPopupWindow, maxHeight: string): void; // tslint:disable-line:unified-signatures + setWindowAdaptiveMaxWidth(window: BootstrapPopupWindow, maxWidth: number): void; + setWindowAdaptiveMaxWidth(window: BootstrapPopupWindow, maxWidth: string): void; // tslint:disable-line:unified-signatures + setWindowAdaptiveMinHeight(window: BootstrapPopupWindow, minHeight: number): void; + setWindowAdaptiveMinHeight(window: BootstrapPopupWindow, minHeight: string): void; // tslint:disable-line:unified-signatures + setWindowAdaptiveMinWidth(window: BootstrapPopupWindow, minWidth: number): void; + setWindowAdaptiveMinWidth(window: BootstrapPopupWindow, minWidth: string): void; // tslint:disable-line:unified-signatures + setWindowCollapsed(window: BootstrapPopupWindow, value: boolean): void; + setWindowContentHtml(window: BootstrapPopupWindow, html: string): void; + setWindowContentUrl(window: BootstrapPopupWindow, url: string): void; + setWindowMaximized(window: BootstrapPopupWindow, value: boolean): void; + setWindowPinned(window: BootstrapPopupWindow, value: boolean): void; + setWindowPopupElementID(window: BootstrapPopupWindow, popupElementId: string): void; + setWindowSize(window: BootstrapPopupWindow, width: number, height: number): void; + show(): void; + showAtElement(htmlElement: any): void; + showAtElementByID(id: string): void; + showAtPos(x: number, y: number): void; + showWindow(window: BootstrapPopupWindow): void; + showWindow(window: BootstrapPopupWindow, popupElementIndex: number): void; // tslint:disable-line:unified-signatures + showWindowAtElement(window: BootstrapPopupWindow, htmlElement: any): void; + showWindowAtElementByID(window: BootstrapPopupWindow, id: string): void; + showWindowAtPos(window: BootstrapPopupWindow, x: number, y: number): void; + stretchVertically(): void; + updatePosition(): void; + updatePositionAtElement(htmlElement: any): void; + updateWindowPosition(window: BootstrapPopupWindow): void; + updateWindowPositionAtElement(window: BootstrapPopupWindow, htmlElement: any): void; + windowStretchVertically(window: BootstrapPopupWindow): void; + on(eventName: K, callback: (this: BootstrapPopupControl, args?: BootstrapPopupControlEventMap[K]) => void): this; + once(eventName: K, callback: (this: BootstrapPopupControl, args?: BootstrapPopupControlEventMap[K]) => void): this; + off(eventName?: K, callback?: (this: BootstrapPopupControl, args?: BootstrapPopupControlEventMap[K]) => void): this; + } + interface BootstrapPopupControlEventMap extends ControlEventMap { + "afterResizing": PopupWindowEventArgs; + "beforeResizing": PopupWindowEventArgs; + "beginCallback": BeginCallbackEventArgs; + "callbackError": CallbackErrorEventArgs; + "closeUp": PopupWindowCloseUpEventArgs; + "closing": PopupWindowCancelEventArgs; + "endCallback": EndCallbackEventArgs; + "pinnedChanged": PopupWindowPinnedChangedEventArgs; + "popUp": PopupWindowEventArgs; + "resize": PopupWindowResizeEventArgs; + "shown": PopupWindowEventArgs; + } + + class BootstrapPopupWindow { + protected readonly instance: any; + protected constructor(instance: any); + readonly index: number; + readonly name: string; + readonly popupControl: BootstrapPopupControl | null; + getFooterImageUrl(): string; + getFooterNavigateUrl(): string; + getFooterText(): string; + getHeaderImageUrl(): string; + getHeaderNavigateUrl(): string; + getHeaderText(): string; + setFooterImageUrl(value: string): void; + setFooterNavigateUrl(value: string): void; + setFooterText(value: string): void; + setHeaderImageUrl(value: string): void; + setHeaderNavigateUrl(value: string): void; + setHeaderText(value: string): void; + } + + class BootstrapPopupMenu extends BootstrapMenu { + getCurrentPopupElement(): any; + getCurrentPopupElementIndex(): number; + getItem(index: number): BootstrapMenuItem | null; + getItemByName(name: string): BootstrapMenuItem | null; + getRootItem(): BootstrapMenuItem | null; + getSelectedItem(): BootstrapMenuItem | null; + hide(): void; + refreshPopupElementConnection(): void; + setPopupElementCssSelector(selector: string): void; + setPopupElementID(popupElementId: string): void; + setSelectedItem(item: BootstrapMenuItem): void; + show(): void; + showAtElement(htmlElement: any): void; + showAtElementByID(id: string): void; + showAtPos(x: number, y: number): void; + on(eventName: K, callback: (this: BootstrapPopupMenu, args?: BootstrapPopupMenuEventMap[K]) => void): this; + once(eventName: K, callback: (this: BootstrapPopupMenu, args?: BootstrapPopupMenuEventMap[K]) => void): this; + off(eventName?: K, callback?: (this: BootstrapPopupMenu, args?: BootstrapPopupMenuEventMap[K]) => void): this; + } + interface BootstrapPopupMenuEventMap extends BootstrapMenuEventMap { // tslint:disable-line:no-empty-interface + } + + class BootstrapProgressBar extends Control { + getCaption(): string; + getDisplayText(): string; + getEnabled(): boolean; + getMaximum(): number; + getMinimum(): number; + getPercent(): number; + getPosition(): number; + getValue(): any; + setCaption(caption: string): void; + setCustomDisplayFormat(text: string): void; + setEnabled(value: boolean): void; + setMaximum(max: number): void; + setMinMaxValues(minValue: number, maxValue: number): void; + setMinimum(min: number): void; + setPosition(position: number): void; + setValue(value: any): void; + on(eventName: K, callback: (this: BootstrapProgressBar, args?: BootstrapProgressBarEventMap[K]) => void): this; + once(eventName: K, callback: (this: BootstrapProgressBar, args?: BootstrapProgressBarEventMap[K]) => void): this; + off(eventName?: K, callback?: (this: BootstrapProgressBar, args?: BootstrapProgressBarEventMap[K]) => void): this; + } + interface BootstrapProgressBarEventMap extends ControlEventMap { // tslint:disable-line:no-empty-interface + } + + interface ActiveViewChangingEventArgs extends EventArgs { + cancel: boolean; + readonly newView: BootstrapSchedulerViewType; + readonly oldView: BootstrapSchedulerViewType; + } + + interface AppointmentClickEventArgs extends EventArgs { + readonly appointmentId: string; + readonly handled: boolean; + readonly htmlElement: object; + } + + interface AppointmentDeletingEventArgs extends CancelEventArgs { + readonly appointmentIds: object[]; + } + + interface AppointmentDragEventArgs extends EventArgs { + allow: boolean; + readonly dragInformation: BootstrapSchedulerAppointmentDragInfo[]; + readonly mouseEvent: any; + } + + interface AppointmentDropEventArgs extends EventArgs { + readonly dragInformation: BootstrapSchedulerAppointmentDragInfo[]; + handled: boolean; + readonly operation: BootstrapSchedulerAppointmentOperation; + } + + interface AppointmentResizeEventArgs extends EventArgs { + readonly appointmentId: string; + handled: boolean; + readonly newInterval: BootstrapTimeInterval; + readonly oldInterval: BootstrapTimeInterval; + readonly operation: BootstrapSchedulerAppointmentOperation; + } + + interface AppointmentResizingEventArgs extends EventArgs { + allow: boolean; + readonly appointmentId: string; + readonly mouseEvent: any; + readonly newInterval: BootstrapTimeInterval; + readonly oldInterval: BootstrapTimeInterval; + } + + interface AppointmentToolTipShowingEventArgs extends CancelEventArgs { + readonly appointment: BootstrapSchedulerAppointment; + } + + interface AppointmentsSelectionEventArgs extends EventArgs { + readonly appointmentIds: string[]; + } + + interface CellClickEventArgs extends EventArgs { + readonly htmlElement: object; + readonly interval: BootstrapTimeInterval; + readonly resource: string; + } + + interface MenuItemClickedEventArgs extends EventArgs { + handled: boolean; + readonly itemName: string; + } + + interface MoreButtonClickedEventArgs extends ProcessingModeEventArgs { + handled: boolean; + readonly interval: BootstrapTimeInterval; + readonly resource: string; + readonly targetDateTime: Date; + } + + interface ShortcutEventArgs extends EventArgs { + readonly commandName: string; + readonly handled: boolean; + readonly htmlEvent: object; + } + + class BootstrapScheduler extends Control { + appointmentFormCancel(): void; + appointmentFormDelete(): void; + appointmentFormSave(): void; + changeFormContainer(container: any): void; + changePopupMenuContainer(container: any): void; + changeTimeZoneId(timeZoneId: string): void; + changeToolTipContainer(container: any): void; + deleteAppointment(apt: BootstrapSchedulerAppointment): void; + deselectAppointmentById(aptId: any): void; + getActiveViewType(): BootstrapSchedulerViewType; + getAllDayAreaHeight(): number; + getAppointmentById(id: any): BootstrapSchedulerAppointment | null; + getAppointmentProperties(aptId: number, propertyNames: string[], onCallBack: any): string[]; + getGroupType(): BootstrapSchedulerGroupType; + getResourceNavigatorVisible(): boolean; + getScrollAreaHeight(): number; + getSelectedAppointmentIds(): string[]; + getSelectedInterval(): BootstrapTimeInterval | null; + getSelectedResource(): string; + getToolbarVisible(): boolean; + getTopRowTime(viewType: BootstrapSchedulerViewType): number; + getVisibleAppointments(): BootstrapSchedulerAppointment[]; + getVisibleIntervals(): BootstrapTimeInterval[]; + goToDateFormApply(): void; + goToDateFormCancel(): void; + gotoDate(date: Date): void; + gotoToday(): void; + hideLoadingPanel(): void; + inplaceEditFormCancel(): void; + inplaceEditFormSave(): void; + inplaceEditFormShowMore(): void; + insertAppointment(apt: BootstrapSchedulerAppointment): void; + navigateBackward(): void; + navigateForward(): void; + performCallback(parameter: string): void; + refresh(): void; + refreshClientAppointmentProperties(clientAppointment: BootstrapSchedulerAppointment, propertyNames: string[], onCallBack: any): void; + reminderFormCancel(): void; + reminderFormDismiss(): void; + reminderFormDismissAll(): void; + reminderFormSnooze(): void; + selectAppointmentById(aptId: any): void; + selectAppointmentById(aptId: any, scrollToSelection: boolean): void; // tslint:disable-line:unified-signatures + setActiveViewType(value: BootstrapSchedulerViewType): void; + setAllDayAreaHeight(height: number): void; + setGroupType(value: BootstrapSchedulerGroupType): void; + setHeight(height: number): void; + setResourceNavigatorVisible(visible: boolean): void; + setSelection(interval: BootstrapTimeInterval): void; + setSelection(interval: BootstrapTimeInterval, resourceId: string): void; // tslint:disable-line:unified-signatures + setSelection(interval: BootstrapTimeInterval, resourceId: string, scrollToSelection: boolean): void; // tslint:disable-line:unified-signatures + setToolbarVisible(visible: boolean): void; + setTopRowTime(duration: number): void; + setTopRowTime(duration: number, viewType: BootstrapSchedulerViewType): void; // tslint:disable-line:unified-signatures + setVisibleResources(resourceIds: string[]): void; + showAppointmentFormByClientId(aptClientId: string): void; + showAppointmentFormByServerId(aptServerId: string): void; + showInplaceEditor(start: Date, end: Date): void; + showInplaceEditor(start: Date, end: Date, resourceId: string): void; // tslint:disable-line:unified-signatures + showLoadingPanel(): void; + showSelectionToolTip(x: number, y: number): void; + updateAppointment(apt: BootstrapSchedulerAppointment): void; + on(eventName: K, callback: (this: BootstrapScheduler, args?: BootstrapSchedulerEventMap[K]) => void): this; + once(eventName: K, callback: (this: BootstrapScheduler, args?: BootstrapSchedulerEventMap[K]) => void): this; + off(eventName?: K, callback?: (this: BootstrapScheduler, args?: BootstrapSchedulerEventMap[K]) => void): this; + } + interface BootstrapSchedulerEventMap extends ControlEventMap { + "activeViewChanged": EventArgs; + "activeViewChanging": ActiveViewChangingEventArgs; + "appointmentClick": AppointmentClickEventArgs; + "appointmentDeleting": AppointmentDeletingEventArgs; + "appointmentDoubleClick": AppointmentClickEventArgs; + "appointmentDrag": AppointmentDragEventArgs; + "appointmentDrop": AppointmentDropEventArgs; + "appointmentResize": AppointmentResizeEventArgs; + "appointmentResizing": AppointmentResizingEventArgs; + "appointmentToolTipShowing": AppointmentToolTipShowingEventArgs; + "appointmentsSelectionChanged": AppointmentsSelectionEventArgs; + "beginCallback": BeginCallbackEventArgs; + "callbackError": CallbackErrorEventArgs; + "cellClick": CellClickEventArgs; + "cellDoubleClick": CellClickEventArgs; + "endCallback": EndCallbackEventArgs; + "menuItemClicked": MenuItemClickedEventArgs; + "moreButtonClicked": MoreButtonClickedEventArgs; + "selectionChanged": EventArgs; + "selectionChanging": EventArgs; + "shortcut": ShortcutEventArgs; + "visibleIntervalChanged": EventArgs; + } + + class BootstrapTimeInterval { + protected readonly instance: any; + protected constructor(instance: any); + contains(interval: BootstrapTimeInterval): boolean; + equals(interval: BootstrapTimeInterval): boolean; + getAllDay(): boolean; + getDuration(): number; + getEnd(): Date; + getStart(): Date; + intersectsWith(interval: BootstrapTimeInterval): boolean; + intersectsWithExcludingBounds(interval: BootstrapTimeInterval): boolean; + setAllDay(allDayValue: boolean): void; + setDuration(value: number): void; + setEnd(value: Date): void; + setStart(value: Date): void; + } + + class BootstrapSchedulerAppointment { + protected readonly instance: any; + protected constructor(instance: any); + readonly appointmentId: string; + readonly appointmentType: BootstrapSchedulerAppointmentType; + readonly interval: BootstrapTimeInterval | null; + readonly labelIndex: number; + readonly resources: string[]; + readonly statusIndex: number; + addResource(resourceId: object): void; + getAllDay(): boolean; + getAppointmentType(): BootstrapSchedulerAppointmentType; + getDescription(): string; + getDuration(): number; + getEnd(): Date; + getId(): any; + getLabelId(): number; + getLocation(): string; + getRecurrenceInfo(): BootstrapSchedulerRecurrenceInfo | null; + getRecurrencePattern(): BootstrapSchedulerAppointment | null; + getResource(index: number): any; + getStart(): Date; + getStatusId(): number; + getSubject(): string; + setAllDay(allDay: boolean): void; + setAppointmentType(type: BootstrapSchedulerAppointmentType): void; + setDescription(description: string): void; + setDuration(duration: number): void; + setEnd(end: Date): void; + setId(id: any): void; + setLabelId(statusId: number): void; + setLocation(location: string): void; + setRecurrenceInfo(recurrenceInfo: BootstrapSchedulerRecurrenceInfo): void; + setStart(start: Date): void; + setStatusId(statusId: number): void; + setSubject(subject: string): void; + } + + class BootstrapSchedulerAppointmentDragInfo { + protected readonly instance: any; + protected constructor(instance: any); + readonly appointmentId: string; + readonly newInterval: BootstrapTimeInterval | null; + readonly oldInterval: BootstrapTimeInterval | null; + } + + class BootstrapSchedulerAppointmentOperation { + protected readonly instance: any; + protected constructor(instance: any); + apply(): void; + cancel(): void; + } + + class BootstrapSchedulerRecurrenceInfo { + protected readonly instance: any; + protected constructor(instance: any); + getDayNumber(): number; + getDuration(): number; + getEnd(): Date; + getMonth(): number; + getOccurrenceCount(): number; + getPeriodicity(): number; + getRange(): BootstrapSchedulerRecurrenceRange; + getRecurrenceType(): BootstrapSchedulerRecurrenceType; + getStart(): Date; + getWeekDays(): WeekDays; + getWeekOfMonth(): WeekOfMonth; + setDayNumber(dayNumber: number): void; + setDuration(duration: number): void; + setEnd(end: Date): void; + setMonth(month: number): void; + setOccurrenceCount(occurrenceCount: number): void; + setPeriodicity(periodicity: number): void; + setRange(range: BootstrapSchedulerRecurrenceRange): void; + setRecurrenceType(type: BootstrapSchedulerRecurrenceType): void; + setStart(start: Date): void; + setWeekDays(weekDays: WeekDays): void; + setWeekOfMonth(weekOfMonth: WeekOfMonth): void; + } + + class BootstrapSparkline extends Control { + exportTo(fileName: string, format: string): void; + getDataSource(): any; + getInstance(): any; + print(): void; + setDataSource(dataSource: any): void; + setOptions(options: any): void; + on(eventName: K, callback: (this: BootstrapSparkline, args?: BootstrapSparklineEventMap[K]) => void): this; + once(eventName: K, callback: (this: BootstrapSparkline, args?: BootstrapSparklineEventMap[K]) => void): this; + off(eventName?: K, callback?: (this: BootstrapSparkline, args?: BootstrapSparklineEventMap[K]) => void): this; + } + interface BootstrapSparklineEventMap extends ControlEventMap { + "disposing": BootstrapChartEventArgsBase; + "drawn": BootstrapChartEventArgsBase; + "exported": BootstrapChartEventArgsBase; + "exporting": BootstrapChartExportEventArgs; + "fileSaving": BootstrapChartExportEventArgs; + "incidentOccurred": BootstrapChartErrorEventArgs; + "init": BootstrapChartEventArgsBase; + "optionChanged": BootstrapChartOptionChangedEventArgs; + "tooltipHidden": BootstrapChartEventArgsBase; + "tooltipShown": BootstrapChartEventArgsBase; + } + + class BootstrapTimeEdit extends BootstrapClientEdit { + getButtonVisible(number: number): boolean; + getCaretPosition(): number; + getDate(): Date; + getText(): string; + selectAll(): void; + setButtonVisible(number: number, value: boolean): void; + setCaretPosition(position: number): void; + setDate(date: Date): void; + setSelection(startPos: number, endPos: number, scrollToSelection: boolean): void; + setText(text: string): void; + on(eventName: K, callback: (this: BootstrapTimeEdit, args?: BootstrapTimeEditEventMap[K]) => void): this; + once(eventName: K, callback: (this: BootstrapTimeEdit, args?: BootstrapTimeEditEventMap[K]) => void): this; + off(eventName?: K, callback?: (this: BootstrapTimeEdit, args?: BootstrapTimeEditEventMap[K]) => void): this; + } + interface BootstrapTimeEditEventMap extends BootstrapClientEditEventMap { + "buttonClick": ButtonEditClickEventArgs; + "dateChanged": ProcessingModeEventArgs; + "keyDown": EditKeyEventArgs; + "keyPress": EditKeyEventArgs; + "keyUp": EditKeyEventArgs; + "textChanged": ProcessingModeEventArgs; + "userInput": EventArgs; + } + + class BootstrapSpinEdit extends BootstrapClientEdit { + getButtonVisible(number: number): boolean; + getCaretPosition(): number; + getMaxValue(): number; + getMinValue(): number; + getNumber(): number; + getText(): string; + selectAll(): void; + setButtonVisible(number: number, value: boolean): void; + setCaretPosition(position: number): void; + setMaxValue(value: number): void; + setMinValue(value: number): void; + setNumber(number: number): void; + setSelection(startPos: number, endPos: number, scrollToSelection: boolean): void; + setText(text: string): void; + setValue(number: number): void; + on(eventName: K, callback: (this: BootstrapSpinEdit, args?: BootstrapSpinEditEventMap[K]) => void): this; + once(eventName: K, callback: (this: BootstrapSpinEdit, args?: BootstrapSpinEditEventMap[K]) => void): this; + off(eventName?: K, callback?: (this: BootstrapSpinEdit, args?: BootstrapSpinEditEventMap[K]) => void): this; + } + interface BootstrapSpinEditEventMap extends BootstrapClientEditEventMap { + "buttonClick": ButtonEditClickEventArgs; + "keyDown": EditKeyEventArgs; + "keyPress": EditKeyEventArgs; + "keyUp": EditKeyEventArgs; + "numberChanged": ProcessingModeEventArgs; + "textChanged": ProcessingModeEventArgs; + "userInput": EventArgs; + } + + interface TabControlTabEventArgs extends EventArgs { + readonly tab: BootstrapTab; + } + + interface TabControlTabCancelEventArgs extends ProcessingModeCancelEventArgs { + reloadContentOnCallback: boolean; + readonly tab: BootstrapTab; + } + + interface TabControlTabClickEventArgs extends TabControlTabCancelEventArgs { + readonly htmlElement: object; + readonly htmlEvent: object; + } + + class BootstrapTabControl extends Control { + adjustSize(): void; + getActiveTab(): BootstrapTab | null; + getActiveTabIndex(): number; + getTab(index: number): BootstrapTab | null; + getTabByName(name: string): BootstrapTab | null; + getTabCount(): number; + setActiveTab(tab: BootstrapTab): void; + setActiveTabIndex(index: number): void; + on(eventName: K, callback: (this: BootstrapTabControl, args?: BootstrapTabControlEventMap[K]) => void): this; + once(eventName: K, callback: (this: BootstrapTabControl, args?: BootstrapTabControlEventMap[K]) => void): this; + off(eventName?: K, callback?: (this: BootstrapTabControl, args?: BootstrapTabControlEventMap[K]) => void): this; + } + interface BootstrapTabControlEventMap extends ControlEventMap { + "activeTabChanged": TabControlTabEventArgs; + "activeTabChanging": TabControlTabCancelEventArgs; + "beginCallback": BeginCallbackEventArgs; + "callbackError": CallbackErrorEventArgs; + "endCallback": EndCallbackEventArgs; + "tabClick": TabControlTabClickEventArgs; + } + + class BootstrapTab { + protected readonly instance: any; + protected constructor(instance: any); + readonly index: number; + readonly name: string; + readonly tabControl: BootstrapTabControl | null; + getActiveIconCssClass(): string; + getActiveImageUrl(): string; + getBadgeIconCssClass(): string; + getBadgeText(): string; + getEnabled(): boolean; + getIconCssClass(): string; + getImageUrl(): string; + getNavigateUrl(): string; + getText(): string; + getVisible(): boolean; + setActiveIconCssClass(cssClass: string): void; + setActiveImageUrl(value: string): void; + setBadgeIconCssClass(cssClass: string): void; + setBadgeText(text: string): void; + setEnabled(value: boolean): void; + setIconCssClass(cssClass: string): void; + setImageUrl(value: string): void; + setNavigateUrl(value: string): void; + setText(value: string): void; + setVisible(value: boolean): void; + } + + class BootstrapPageControl extends BootstrapTabControl { + getActiveTab(): BootstrapTab | null; + getTab(index: number): BootstrapTab | null; + getTabByName(name: string): BootstrapTab | null; + getTabContentHTML(tab: BootstrapTab): string; + performCallback(data: any): Promise; + performCallback(data: any, onSuccess: () => void): void; + setActiveTab(tab: BootstrapTab): void; + setTabContentHTML(tab: BootstrapTab, html: string): void; + on(eventName: K, callback: (this: BootstrapPageControl, args?: BootstrapPageControlEventMap[K]) => void): this; + once(eventName: K, callback: (this: BootstrapPageControl, args?: BootstrapPageControlEventMap[K]) => void): this; + off(eventName?: K, callback?: (this: BootstrapPageControl, args?: BootstrapPageControlEventMap[K]) => void): this; + } + interface BootstrapPageControlEventMap extends BootstrapTabControlEventMap { // tslint:disable-line:no-empty-interface + } + + class BootstrapTagBox extends BootstrapClientEdit { + addItem(texts: string[]): number; + addItem(text: string): number; // tslint:disable-line:unified-signatures + addItem(texts: string[], value: any): number; // tslint:disable-line:unified-signatures + addItem(text: string, value: any): number; // tslint:disable-line:unified-signatures unified-signatures + addItem(texts: string[], value: any, iconCssClass: string): number; // tslint:disable-line:unified-signatures + addItem(text: string, value: any, iconCssClass: string): number; // tslint:disable-line:unified-signatures unified-signatures + addItemCssClass(index: number, className: string): void; + addItemTextCellCssClass(itemIndex: number, textCellIndex: number, className: string): void; + addTag(text: string): void; + adjustDropDownWindow(): void; + beginUpdate(): void; + clearItems(): void; + clearTagCollection(): void; + endUpdate(): void; + ensureDropDownLoaded(callbackFunction: any): void; + findItemByText(text: string): BootstrapListBoxItem | null; + findItemByValue(value: any): BootstrapListBoxItem | null; + getButtonVisible(number: number): boolean; + getCaretPosition(): number; + getItem(index: number): BootstrapListBoxItem | null; + getItemBadgeIconCssClass(index: number): string; + getItemBadgeText(index: number): string; + getItemCount(): number; + getSelectedIndex(): number; + getSelectedItem(): BootstrapListBoxItem | null; + getTagCollection(): string[]; + getTagHtmlElement(index: number): any; + getTagIndexByText(text: string): number; + getTagRemoveButtonHtmlElement(index: number): any; + getTagTextHtmlElement(index: number): any; + getText(): string; + getValue(): string; + hideDropDown(): void; + insertItem(index: number, texts: string[]): void; + insertItem(index: number, text: string): void; // tslint:disable-line:unified-signatures + insertItem(index: number, texts: string[], value: any): void; // tslint:disable-line:unified-signatures + insertItem(index: number, text: string, value: any): void; // tslint:disable-line:unified-signatures unified-signatures + insertItem(index: number, texts: string[], value: any, iconCssClass: string): void; // tslint:disable-line:unified-signatures + insertItem(index: number, text: string, value: any, iconCssClass: string): void; // tslint:disable-line:unified-signatures unified-signatures + isCustomTag(text: string, caseSensitive: boolean): boolean; + makeItemVisible(index: number): void; + performCallback(data: any): Promise; + performCallback(data: any, onSuccess: () => void): void; + removeItem(index: number): void; + removeItemCssClass(index: number, className: string): void; + removeItemTextCellCssClass(itemIndex: number, textCellIndex: number, className: string): void; + removeTag(index: number): void; + removeTagByText(text: string): void; + selectAll(): void; + setButtonVisible(number: number, value: boolean): void; + setCaretPosition(position: number): void; + setItemBadgeIconCssClass(index: number, cssClass: string): void; + setItemBadgeText(index: number, text: string): void; + setItemHtml(index: number, html: string): void; + setItemTextCellHtml(itemIndex: number, textCellIndex: number, html: string): void; + setItemTextCellTooltip(itemIndex: number, textCellIndex: number, tooltip: string): void; + setItemTooltip(index: number, tooltip: string): void; + setSelectedIndex(index: number): void; + setSelectedItem(item: BootstrapListBoxItem): void; + setSelection(startPos: number, endPos: number, scrollToSelection: boolean): void; + setTagCollection(collection: string[]): void; + setText(text: string): void; + setValue(value: string): void; + showDropDown(): void; + on(eventName: K, callback: (this: BootstrapTagBox, args?: BootstrapTagBoxEventMap[K]) => void): this; + once(eventName: K, callback: (this: BootstrapTagBox, args?: BootstrapTagBoxEventMap[K]) => void): this; + off(eventName?: K, callback?: (this: BootstrapTagBox, args?: BootstrapTagBoxEventMap[K]) => void): this; + } + interface BootstrapTagBoxEventMap extends BootstrapClientEditEventMap { + "beginCallback": BeginCallbackEventArgs; + "buttonClick": ButtonEditClickEventArgs; + "callbackError": CallbackErrorEventArgs; + "closeUp": EventArgs; + "customHighlighting": ListEditCustomHighlightingEventArgs; + "dropDown": EventArgs; + "endCallback": EndCallbackEventArgs; + "itemFiltering": ListEditItemFilteringEventArgs; + "keyDown": EditKeyEventArgs; + "keyPress": EditKeyEventArgs; + "keyUp": EditKeyEventArgs; + "queryCloseUp": CancelEventArgs; + "selectedIndexChanged": ProcessingModeEventArgs; + "tagsChanged": EventArgs; + "textChanged": ProcessingModeEventArgs; + "userInput": EventArgs; + } + + interface ButtonEditClickEventArgs extends ProcessingModeEventArgs { + readonly buttonIndex: number; + } + + class BootstrapButtonEdit extends BootstrapClientEdit { + getButtonVisible(number: number): boolean; + getCaretPosition(): number; + getText(): string; + selectAll(): void; + setButtonVisible(number: number, value: boolean): void; + setCaretPosition(position: number): void; + setSelection(startPos: number, endPos: number, scrollToSelection: boolean): void; + setText(text: string): void; + on(eventName: K, callback: (this: BootstrapButtonEdit, args?: BootstrapButtonEditEventMap[K]) => void): this; + once(eventName: K, callback: (this: BootstrapButtonEdit, args?: BootstrapButtonEditEventMap[K]) => void): this; + off(eventName?: K, callback?: (this: BootstrapButtonEdit, args?: BootstrapButtonEditEventMap[K]) => void): this; + } + interface BootstrapButtonEditEventMap extends BootstrapClientEditEventMap { + "buttonClick": ButtonEditClickEventArgs; + "keyDown": EditKeyEventArgs; + "keyPress": EditKeyEventArgs; + "keyUp": EditKeyEventArgs; + "textChanged": ProcessingModeEventArgs; + "userInput": EventArgs; + } + + class BootstrapMemo extends BootstrapClientEdit { + getCaretPosition(): number; + getText(): string; + selectAll(): void; + setCaretPosition(position: number): void; + setSelection(startPos: number, endPos: number, scrollToSelection: boolean): void; + setText(text: string): void; + on(eventName: K, callback: (this: BootstrapMemo, args?: BootstrapMemoEventMap[K]) => void): this; + once(eventName: K, callback: (this: BootstrapMemo, args?: BootstrapMemoEventMap[K]) => void): this; + off(eventName?: K, callback?: (this: BootstrapMemo, args?: BootstrapMemoEventMap[K]) => void): this; + } + interface BootstrapMemoEventMap extends BootstrapClientEditEventMap { + "keyDown": EditKeyEventArgs; + "keyPress": EditKeyEventArgs; + "keyUp": EditKeyEventArgs; + "textChanged": ProcessingModeEventArgs; + "userInput": EventArgs; + } + + class BootstrapTextBox extends BootstrapClientEdit { + getCaretPosition(): number; + getText(): string; + selectAll(): void; + setCaretPosition(position: number): void; + setSelection(startPos: number, endPos: number, scrollToSelection: boolean): void; + setText(text: string): void; + on(eventName: K, callback: (this: BootstrapTextBox, args?: BootstrapTextBoxEventMap[K]) => void): this; + once(eventName: K, callback: (this: BootstrapTextBox, args?: BootstrapTextBoxEventMap[K]) => void): this; + off(eventName?: K, callback?: (this: BootstrapTextBox, args?: BootstrapTextBoxEventMap[K]) => void): this; + } + interface BootstrapTextBoxEventMap extends BootstrapClientEditEventMap { + "keyDown": EditKeyEventArgs; + "keyPress": EditKeyEventArgs; + "keyUp": EditKeyEventArgs; + "textChanged": ProcessingModeEventArgs; + "userInput": EventArgs; + } + + class BootstrapToolbar extends BootstrapMenu { + on(eventName: K, callback: (this: BootstrapToolbar, args?: BootstrapToolbarEventMap[K]) => void): this; + once(eventName: K, callback: (this: BootstrapToolbar, args?: BootstrapToolbarEventMap[K]) => void): this; + off(eventName?: K, callback?: (this: BootstrapToolbar, args?: BootstrapToolbarEventMap[K]) => void): this; + } + interface BootstrapToolbarEventMap extends BootstrapMenuEventMap { // tslint:disable-line:no-empty-interface + } + + interface TreeViewNodeProcessingModeEventArgs extends ProcessingModeEventArgs { + readonly node: BootstrapTreeViewNode; + } + + interface TreeViewNodeClickEventArgs extends TreeViewNodeProcessingModeEventArgs { + readonly htmlElement: any; + readonly htmlEvent: any; + } + + interface TreeViewNodeEventArgs extends EventArgs { + readonly node: BootstrapTreeViewNode; + } + + interface TreeViewNodeCancelEventArgs extends ProcessingModeCancelEventArgs { + readonly node: BootstrapTreeViewNode; + } + + class BootstrapTreeView extends Control { + collapseAll(): void; + expandAll(): void; + getNode(index: number): BootstrapTreeViewNode | null; + getNodeByName(name: string): BootstrapTreeViewNode | null; + getNodeByText(text: string): BootstrapTreeViewNode | null; + getNodeCount(): number; + getRootNode(): BootstrapTreeViewNode | null; + getSelectedNode(): BootstrapTreeViewNode | null; + setSelectedNode(node: BootstrapTreeViewNode): void; + on(eventName: K, callback: (this: BootstrapTreeView, args?: BootstrapTreeViewEventMap[K]) => void): this; + once(eventName: K, callback: (this: BootstrapTreeView, args?: BootstrapTreeViewEventMap[K]) => void): this; + off(eventName?: K, callback?: (this: BootstrapTreeView, args?: BootstrapTreeViewEventMap[K]) => void): this; + } + interface BootstrapTreeViewEventMap extends ControlEventMap { + "beginCallback": BeginCallbackEventArgs; + "callbackError": CallbackErrorEventArgs; + "checkedChanged": TreeViewNodeProcessingModeEventArgs; + "endCallback": EndCallbackEventArgs; + "expandedChanged": TreeViewNodeEventArgs; + "expandedChanging": TreeViewNodeCancelEventArgs; + "nodeClick": TreeViewNodeClickEventArgs; + } + + class BootstrapTreeViewNode extends Control { + readonly index: number; + readonly name: string; + readonly parent: BootstrapTreeViewNode | null; + readonly treeView: BootstrapTreeView | null; + getBadgeIconCssClass(): string; + getBadgeText(): string; + getCheckState(): string; + getChecked(): boolean; + getEnabled(): boolean; + getExpanded(): boolean; + getHtmlElement(): any; + getIconCssClass(): string; + getImageUrl(): string; + getNavigateUrl(): string; + getNode(index: number): BootstrapTreeViewNode | null; + getNodeByName(name: string): BootstrapTreeViewNode | null; + getNodeByText(text: string): BootstrapTreeViewNode | null; + getNodeCount(): number; + getText(): string; + getVisible(): boolean; + setBadgeIconCssClass(cssClass: string): void; + setBadgeText(text: string): void; + setChecked(value: boolean): void; + setEnabled(value: boolean): void; + setExpanded(value: boolean): void; + setIconCssClass(cssClass: string): void; + setImageUrl(value: string): void; + setNavigateUrl(value: string): void; + setText(value: string): void; + setVisible(value: boolean): void; + on(eventName: K, callback: (this: BootstrapTreeViewNode, args?: BootstrapTreeViewNodeEventMap[K]) => void): this; + once(eventName: K, callback: (this: BootstrapTreeViewNode, args?: BootstrapTreeViewNodeEventMap[K]) => void): this; + off(eventName?: K, callback?: (this: BootstrapTreeViewNode, args?: BootstrapTreeViewNodeEventMap[K]) => void): this; + } + interface BootstrapTreeViewNodeEventMap extends ControlEventMap { // tslint:disable-line:no-empty-interface + } + + interface UploadControlFilesUploadStartEventArgs extends EventArgs { + readonly cancel: boolean; + } + + interface UploadControlFileUploadCompleteEventArgs extends EventArgs { + readonly callbackData: string; + readonly errorText: string; + readonly inputIndex: number; + readonly isValid: boolean; + } + + interface UploadControlFilesUploadCompleteEventArgs extends EventArgs { + readonly callbackData: string; + readonly errorText: string; + } + + interface UploadControlTextChangedEventArgs extends EventArgs { + readonly inputIndex: number; + } + + interface UploadControlUploadingProgressChangedEventArgs extends EventArgs { + readonly currentFileContentLength: number; + readonly currentFileName: string; + readonly currentFileProgress: number; + readonly currentFileUploadedContentLength: number; + readonly fileCount: number; + readonly progress: number; + readonly totalContentLength: number; + readonly uploadedContentLength: number; + } + + interface UploadControlValidationErrorOccurredEventArgs extends EventArgs { + errorText: string; + readonly invalidFiles: BootstrapUploadControlInvalidFileInfo[]; + showAlert: boolean; + readonly validationSettings: BootstrapUploadControlValidationSettings; + } + + interface UploadControlDropZoneEnterEventArgs extends EventArgs { + readonly dropZone: any; + } + + interface UploadControlDropZoneLeaveEventArgs extends EventArgs { + readonly dropZone: any; + } + + class BootstrapUploadControl extends Control { + addFileInput(): void; + cancel(): void; + clearText(): void; + getAddButtonText(): string; + getEnabled(): boolean; + getFileInputCount(): number; + getSelectedFiles(inputIndex: number): BootstrapUploadControlFile[]; + getText(index: number): string; + getUploadButtonText(): string; + removeFileFromSelection(fileIndex: number): void; + removeFileFromSelection(file: BootstrapUploadControlFile): void; // tslint:disable-line:unified-signatures + removeFileInput(index: number): void; + setAddButtonText(text: string): void; + setDialogTriggerID(ids: string): void; + setEnabled(enabled: boolean): void; + setFileInputCount(count: number): void; + setUploadButtonText(text: string): void; + upload(): void; + on(eventName: K, callback: (this: BootstrapUploadControl, args?: BootstrapUploadControlEventMap[K]) => void): this; + once(eventName: K, callback: (this: BootstrapUploadControl, args?: BootstrapUploadControlEventMap[K]) => void): this; + off(eventName?: K, callback?: (this: BootstrapUploadControl, args?: BootstrapUploadControlEventMap[K]) => void): this; + } + interface BootstrapUploadControlEventMap extends ControlEventMap { + "dropZoneEnter": UploadControlDropZoneEnterEventArgs; + "dropZoneLeave": UploadControlDropZoneLeaveEventArgs; + "fileInputCountChanged": EventArgs; + "fileUploadComplete": UploadControlFileUploadCompleteEventArgs; + "filesUploadComplete": UploadControlFilesUploadCompleteEventArgs; + "filesUploadStart": UploadControlFilesUploadStartEventArgs; + "textChanged": UploadControlTextChangedEventArgs; + "uploadingProgressChanged": UploadControlUploadingProgressChangedEventArgs; + "validationErrorOccurred": UploadControlValidationErrorOccurredEventArgs; + } + + class BootstrapUploadControlFile extends Control { + readonly name: string; + readonly size: number; + readonly sourceFileObject: any; + on(eventName: K, callback: (this: BootstrapUploadControlFile, args?: BootstrapUploadControlFileEventMap[K]) => void): this; + once(eventName: K, callback: (this: BootstrapUploadControlFile, args?: BootstrapUploadControlFileEventMap[K]) => void): this; + off(eventName?: K, callback?: (this: BootstrapUploadControlFile, args?: BootstrapUploadControlFileEventMap[K]) => void): this; + } + interface BootstrapUploadControlFileEventMap extends ControlEventMap { // tslint:disable-line:no-empty-interface + } + + class BootstrapUploadControlInvalidFileInfo extends Control { + readonly fileName: string; + readonly fileSize: number; + on(eventName: K, callback: (this: BootstrapUploadControlInvalidFileInfo, args?: + BootstrapUploadControlInvalidFileInfoEventMap[K]) => void): this; + once(eventName: K, callback: (this: BootstrapUploadControlInvalidFileInfo, + args?: BootstrapUploadControlInvalidFileInfoEventMap[K]) => void): this; + off(eventName?: K, callback?: (this: BootstrapUploadControlInvalidFileInfo, + args?: BootstrapUploadControlInvalidFileInfoEventMap[K]) => void): this; + } + interface BootstrapUploadControlInvalidFileInfoEventMap extends ControlEventMap { // tslint:disable-line:no-empty-interface + } + + class BootstrapUploadControlValidationSettings extends Control { + readonly allowedFileExtensions: string[]; + readonly invalidFileNameCharacters: string[]; + readonly maxFileCount: number; + readonly maxFileSize: number; + on(eventName: K, callback: (this: BootstrapUploadControlValidationSettings, + args?: BootstrapUploadControlValidationSettingsEventMap[K]) => void): this; + once(eventName: K, callback: (this: + BootstrapUploadControlValidationSettings, args?: BootstrapUploadControlValidationSettingsEventMap[K]) => void): this; + off(eventName?: K, callback?: (this: + BootstrapUploadControlValidationSettings, args?: BootstrapUploadControlValidationSettingsEventMap[K]) => void): this; + } + interface BootstrapUploadControlValidationSettingsEventMap extends ControlEventMap { // tslint:disable-line:no-empty-interface + } +} diff --git a/types/devexpress-aspnetcore-bootstrap/tsconfig.json b/types/devexpress-aspnetcore-bootstrap/tsconfig.json new file mode 100644 index 0000000000..1131d37582 --- /dev/null +++ b/types/devexpress-aspnetcore-bootstrap/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "devexpress-aspnetcore-bootstrap-tests.ts" + ] +} \ No newline at end of file diff --git a/types/devexpress-aspnetcore-bootstrap/tslint.json b/types/devexpress-aspnetcore-bootstrap/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/devexpress-aspnetcore-bootstrap/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} From b4518ea734b64d0a486b07b8e5c68268834cc2f9 Mon Sep 17 00:00:00 2001 From: taoqf Date: Sat, 12 May 2018 15:30:51 +0800 Subject: [PATCH 012/180] upgrade jsreport-html-to-xlsx to 2.0 --- types/jsreport-html-to-xlsx/index.d.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/types/jsreport-html-to-xlsx/index.d.ts b/types/jsreport-html-to-xlsx/index.d.ts index 84b37480aa..83ac765c1f 100644 --- a/types/jsreport-html-to-xlsx/index.d.ts +++ b/types/jsreport-html-to-xlsx/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for jsreport-html-to-xlsx 1.4 +// Type definitions for jsreport-html-to-xlsx 2.0 // Project: https://github.com/jsreport/jsreport-html-to-xlsx // Definitions by: My Self // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -8,7 +8,9 @@ import { ExtensionDefinition } from 'jsreport-core'; import { Options as BaseOptions } from 'jsreport-xlsx'; declare module 'jsreport-core' { + type htmlEngine = 'phantom' | 'chrome'; interface Template { + htmlToXlsx: { htmlEngine: htmlEngine; }; recipe: 'html-to-xlsx' | string; } } From 92c29516cf7f91ffabe35199a411b46581038fef Mon Sep 17 00:00:00 2001 From: Gal Talmor Date: Mon, 14 May 2018 16:53:24 -0700 Subject: [PATCH 013/180] Fix stripe ICharge interface with missing fields and optional null values --- types/stripe/index.d.ts | 89 ++++++++++++++++++++++++++++++----------- 1 file changed, 65 insertions(+), 24 deletions(-) diff --git a/types/stripe/index.d.ts b/types/stripe/index.d.ts index 418525d38f..884cbacc06 100644 --- a/types/stripe/index.d.ts +++ b/types/stripe/index.d.ts @@ -8,6 +8,7 @@ // Kyle Kamperschroer // Kensuke Hoshikawa // Thomas Bruun +// Gal Talmor // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 @@ -737,12 +738,17 @@ declare namespace Stripe { * charge if a partial refund was issued), positive integer or zero. */ amount_refunded: number; + + /** + * ID of the Connect application that created the charge. [Expandable] + */ + application?: string | null; /** * The application fee (if any) for the charge. See the Connect documentation * for details. [Expandable] */ - application_fee?: string | applicationFees.IApplicationFee; + application_fee?: string | applicationFees.IApplicationFee | null; /** * ID of the balance transaction that describes the impact of this charge on @@ -767,25 +773,33 @@ declare namespace Stripe { /** * ID of the customer this charge is for if one exists. [Expandable] */ - customer: string | customers.ICustomer; + customer: string | customers.ICustomer | null; description?: string; + /** + * The account (if any) the charge was made on behalf of, with an automatic + * transfer. See the [Connect documentation] + * for details. + * [Expandable] + */ + destination?: string | null; + /** * Details about the dispute if the charge has been disputed. */ - dispute?: disputes.IDispute; + dispute?: disputes.IDispute | null; /** * Error code explaining reason for charge failure if available (see the errors section for a list of * codes: https://stripe.com/docs/api#errors). */ - failure_code: string; + failure_code: string | null; /** * Message to user further explaining reason for charge failure if available. */ - failure_message: string; + failure_message: string | null; /** * Hash with information on fraud assessments for the charge. @@ -805,16 +819,30 @@ declare namespace Stripe { /** * ID of the invoice this charge is for if one exists. [Expandable] */ - invoice: string | invoices.IInvoice; + invoice: string | invoices.IInvoice | null; livemode: boolean; metadata: IMetadata; + /** + * The Stripe account ID for which these funds are intended. Automatically + * set if you use the destination parameter. For details, see [Creating + * Separate Charges and Transfers] + * . + */ + on_behalf_of?: string | null; + /** * ID of the order this charge is for if one exists. [Expandable] */ - order: string | orders.IOrder; + order: string | orders.IOrder | null; + + /** + * Details about whether the payment was accepted, and why. See + * understanding declines for details. [Expandable] + */ + outcome?: any; /** * true if the charge succeeded, or was successfully authorized for later capture. @@ -824,12 +852,12 @@ declare namespace Stripe { /** * This is the email address that the receipt for this charge was sent to. */ - receipt_email: string; + receipt_email: string | null; /** * This is the transaction number that appears on email receipts sent for this charge. */ - receipt_number: string; + receipt_number: string | null; /** * Whether or not the charge has been fully refunded. If the charge is only partially refunded, @@ -842,10 +870,15 @@ declare namespace Stripe { */ refunds: IChargeRefunds; + /** + * ID of the review associated with this charge if one exists. [Expandable] + */ + review?: string | null; + /** * Shipping information for the charge. */ - shipping?: IShippingInformation; + shipping?: IShippingInformation | null; /** * For most Stripe users, the source of every charge is a credit or debit card. @@ -858,13 +891,13 @@ declare namespace Stripe { * from another Stripe account. See the Connect documentation for details. * [Expandable] */ - source_transfer: string | transfers.ITransfer; + source_transfer: string | transfers.ITransfer | null; /** * Extra information about a charge. This will appear on your customer’s * credit card statement. */ - statement_descriptor: string; + statement_descriptor: string | null; /** * The status of the payment is either "succeeded", "pending", or "failed". @@ -875,7 +908,15 @@ declare namespace Stripe { * ID of the transfer to the destination account (only applicable if the * charge was created using the destination parameter). [Expandable] */ - transfer: string | transfers.ITransfer; + transfer?: string | transfers.ITransfer; + + /** + * A string that identifies this transaction as part of a group. + * See the [Connect documentation] + * + * for details. + */ + transfer_group?: string | null; } interface IChargeCreationOptions extends IDataOptionsWithMetadata { @@ -1056,7 +1097,7 @@ declare namespace Stripe { } } - interface IChargeRefunds extends IList, resources.ChargeRefunds { } + interface IChargeRefunds extends IList { } } namespace coupons { @@ -4086,7 +4127,7 @@ declare namespace Stripe { * in the card object if the card belongs to an account or recipient * instead. */ - customer?: string | customers.ICustomer; + customer?: string | customers.ICustomer | null; /** * Only applicable on accounts (not customers or recipients). This @@ -4120,7 +4161,7 @@ declare namespace Stripe { /** * The card number */ - number: string; + number?: string; /** * Card brand. Can be Visa, American Express, MasterCard, Discover, JCB, Diners Club, or Unknown. @@ -4134,20 +4175,20 @@ declare namespace Stripe { */ funding: "credit" | "debit" | "prepaid" | "unknown"; last4: string; - address_city: string; + address_city: string | null; /** * Billing address country, if provided when creating card */ - address_country: string; - address_line1: string; + address_country: string | null; + address_line1: string | null; /** * If address_line1 was provided, results of the check: pass, fail, unavailable, or unchecked. */ - address_line1_check: string; - address_line2: string; - address_state: string; + address_line1_check: string | null; + address_line2: string | null; + address_state: string | null; address_zip: string; /** @@ -4169,7 +4210,7 @@ declare namespace Stripe { /** * (For Apple Pay integrations only.) The last four digits of the device account number. */ - dynamic_last4: string; + dynamic_last4: string | null; /** * Cardholder name @@ -4188,7 +4229,7 @@ declare namespace Stripe { * If the card number is tokenized, this is the method that was * used. Can be "apple_pay" or "android_pay". */ - tokenization_method: "apple_pay" | "android_pay"; + tokenization_method: "apple_pay" | "android_pay" | null; } interface ICardUpdateOptions extends IDataOptionsWithMetadata { From 06caab2123387d471212f59a470754da1b8e3a46 Mon Sep 17 00:00:00 2001 From: Gal Talmor Date: Mon, 14 May 2018 17:11:48 -0700 Subject: [PATCH 014/180] Fix stripe ICharge interface with missing fields and optional null values --- types/stripe/index.d.ts | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/types/stripe/index.d.ts b/types/stripe/index.d.ts index 884cbacc06..496ae404f0 100644 --- a/types/stripe/index.d.ts +++ b/types/stripe/index.d.ts @@ -1097,7 +1097,7 @@ declare namespace Stripe { } } - interface IChargeRefunds extends IList { } + interface IChargeRefunds extends IList, resources.ChargeRefunds { } } namespace coupons { @@ -5423,18 +5423,18 @@ declare namespace Stripe { * Once entirely refunded, a charge can't be refunded again. * This method will throw an error when called on an already-refunded charge, or when trying to refund more money than is left on a charge. */ - create(data: refunds.IRefundCreationOptions, options: HeaderOptions, response?: IResponseFn): Promise; - create(data: refunds.IRefundCreationOptions, response?: IResponseFn): Promise; - create(options: HeaderOptions, response?: IResponseFn): Promise; - create(response?: IResponseFn): Promise; + create?(data: refunds.IRefundCreationOptions, options: HeaderOptions, response?: IResponseFn): Promise; + create?(data: refunds.IRefundCreationOptions, response?: IResponseFn): Promise; + create?(options: HeaderOptions, response?: IResponseFn): Promise; + create?(response?: IResponseFn): Promise; /** * Retrieves the details of an existing refund. */ - retrieve(id: string, data: IDataOptions, options: HeaderOptions, response?: IResponseFn): Promise; - retrieve(id: string, data: IDataOptions, response?: IResponseFn): Promise; - retrieve(id: string, options: HeaderOptions, response?: IResponseFn): Promise; - retrieve(id: string, response?: IResponseFn): Promise; + retrieve?(id: string, data: IDataOptions, options: HeaderOptions, response?: IResponseFn): Promise; + retrieve?(id: string, data: IDataOptions, response?: IResponseFn): Promise; + retrieve?(id: string, options: HeaderOptions, response?: IResponseFn): Promise; + retrieve?(id: string, response?: IResponseFn): Promise; /** @@ -5443,18 +5443,18 @@ declare namespace Stripe { * * This request only accepts metadata as an argument. */ - update(id: string, data: IDataOptionsWithMetadata, options: HeaderOptions, response?: IResponseFn): Promise; - update(id: string, data: IDataOptionsWithMetadata, response?: IResponseFn): Promise; + update?(id: string, data: IDataOptionsWithMetadata, options: HeaderOptions, response?: IResponseFn): Promise; + update?(id: string, data: IDataOptionsWithMetadata, response?: IResponseFn): Promise; /** * Returns a list of all refunds you’ve previously created. The refunds are returned in sorted order, * with the most recent refunds appearing first. * For convenience, the 10 most recent refunds are always available by default on the charge object. */ - list(data: refunds.IRefundListOptions, options: HeaderOptions, response?: IResponseFn>): Promise>; - list(data: refunds.IRefundListOptions, response?: IResponseFn>): Promise>; - list(options: HeaderOptions, response?: IResponseFn>): Promise>; - list(response?: IResponseFn>): Promise>; + list?(data: refunds.IRefundListOptions, options: HeaderOptions, response?: IResponseFn>): Promise>; + list?(data: refunds.IRefundListOptions, response?: IResponseFn>): Promise>; + list?(options: HeaderOptions, response?: IResponseFn>): Promise>; + list?(response?: IResponseFn>): Promise>; } class Coupons extends StripeResource { From 20d62b5477c55888a6e22e7a6e56cfe0d4101aa7 Mon Sep 17 00:00:00 2001 From: Alex Maclean Date: Wed, 16 May 2018 11:12:01 +1000 Subject: [PATCH 015/180] Fixed indentation --- types/react-calendar-timeline/index.d.ts | 118 +++++++++++------------ 1 file changed, 59 insertions(+), 59 deletions(-) diff --git a/types/react-calendar-timeline/index.d.ts b/types/react-calendar-timeline/index.d.ts index 86c79ca7ae..26a3df52cd 100644 --- a/types/react-calendar-timeline/index.d.ts +++ b/types/react-calendar-timeline/index.d.ts @@ -1,7 +1,7 @@ // Type definitions for react-calendar-timeline v0.15.12 // Project: https://github.com/namespace-ee/react-calendar-timeline // Definitions by: Rajab Shakirov -// Alex Maclean +// Alex Maclean // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.6 @@ -9,7 +9,7 @@ declare module "react-calendar-timeline" { - export interface TimelineGroup { + export interface TimelineGroup { id: number; title: React.ReactNode; } @@ -33,63 +33,63 @@ declare module "react-calendar-timeline" { } export interface ReactCalendarTimelineProps { - groups: TimelineGroup[]; - items: TimelineItem[]; - keys?:{ - groupIdKey: string; - groupTitleKey: string; - itemIdKey: string; - itemTitleKey: string; - itemGroupKey: string; - itemTimeStartKey: string; - itemTimeEndKey: string; - }; - selected?: number[]; - sidebarWidth?: number; - sidebarContent?: any; - rightSidebarWidth?: number; - rightSidebarContent?: any; - dragSnap?: number; - minResizeWidth?: number; - stickyOffset?: number; - stickyHeader?: boolean; - headerRef?: any; - lineHeight?: number; - headerLabelGroupHeight?: number; - headerLabelHeight?: number; - itemHeightRatio?: number; - minZoom?: number; - maxZoom?: number; - clickTolerance?: number; - canMove?: boolean; - canChangeGroup?: boolean; - canResize?: boolean; - useResizeHandle?: boolean; - showCursorLine?: boolean; - stackItems?: boolean; - traditionalZoom?: boolean; - itemTouchSendsClick?: boolean; - onItemMove?(itemId:number, dragTime:number, newGroupOrder:number): any; - onItemResize?(itemId:number, newResizeEnd: number, edge: "left" | "right"): any; - onItemSelect?(itemId:number, e: any, time: number): any; - onItemClick?(itemId:number, e: any, time: number): any; - onItemDoubleClick?(itemId:number, e: any, time: number): any; - onCanvasClick?(groupId:number, time:number, e:any): any; - onCanvasDoubleClick?(groupId:number, time:number, e:any): any; - moveResizeValidator?(action:"move" | "resize", itemId:number, time:number, resizeEdge: "left" | "right"): any; - defaultTimeStart?: any; - defaultTimeEnd?: any; - visibleTimeStart?: number; - visibleTimeEnd?: number; - onTimeChange?(visibleTimeStart: number, visibleTimeEnd: number, updateScrollCanvas: (start: number, end: number) => void): any; - onTimeInit?(visibleTimeStart: number, visibleTimeEnd: number): any; - onBoundsChange?(canvasTimeStart: number, canvasTimeEnd: number): any; - onZoom?(timelineContext: TimelineContext): any; - children?: any; - fullUpdate?: boolean; - itemRenderer?: (props: {item: TimelineItem, context: TimelineContext}) => React.ReactNode; - groupRenderer?: (props: {group: TimelineGroup, isRightSidebar: boolean}) => React.ReactNode; - minimumWidthForItemContentVisibility?: number; + groups: TimelineGroup[]; + items: TimelineItem[]; + keys?:{ + groupIdKey: string; + groupTitleKey: string; + itemIdKey: string; + itemTitleKey: string; + itemGroupKey: string; + itemTimeStartKey: string; + itemTimeEndKey: string; + }; + selected?: number[]; + sidebarWidth?: number; + sidebarContent?: any; + rightSidebarWidth?: number; + rightSidebarContent?: any; + dragSnap?: number; + minResizeWidth?: number; + stickyOffset?: number; + stickyHeader?: boolean; + headerRef?: any; + lineHeight?: number; + headerLabelGroupHeight?: number; + headerLabelHeight?: number; + itemHeightRatio?: number; + minZoom?: number; + maxZoom?: number; + clickTolerance?: number; + canMove?: boolean; + canChangeGroup?: boolean; + canResize?: boolean; + useResizeHandle?: boolean; + showCursorLine?: boolean; + stackItems?: boolean; + traditionalZoom?: boolean; + itemTouchSendsClick?: boolean; + onItemMove?(itemId:number, dragTime:number, newGroupOrder:number): any; + onItemResize?(itemId:number, newResizeEnd: number, edge: "left" | "right"): any; + onItemSelect?(itemId:number, e: any, time: number): any; + onItemClick?(itemId:number, e: any, time: number): any; + onItemDoubleClick?(itemId:number, e: any, time: number): any; + onCanvasClick?(groupId:number, time:number, e:any): any; + onCanvasDoubleClick?(groupId:number, time:number, e:any): any; + moveResizeValidator?(action:"move" | "resize", itemId:number, time:number, resizeEdge: "left" | "right"): any; + defaultTimeStart?: any; + defaultTimeEnd?: any; + visibleTimeStart?: number; + visibleTimeEnd?: number; + onTimeChange?(visibleTimeStart: number, visibleTimeEnd: number, updateScrollCanvas: (start: number, end: number) => void): any; + onTimeInit?(visibleTimeStart: number, visibleTimeEnd: number): any; + onBoundsChange?(canvasTimeStart: number, canvasTimeEnd: number): any; + onZoom?(timelineContext: TimelineContext): any; + children?: any; + fullUpdate?: boolean; + itemRenderer?: (props: {item: TimelineItem, context: TimelineContext}) => React.ReactNode; + groupRenderer?: (props: {group: TimelineGroup, isRightSidebar: boolean}) => React.ReactNode; + minimumWidthForItemContentVisibility?: number; } let ReactCalendarTimeline : React.ClassicComponentClass; export default ReactCalendarTimeline; From 6b80387511b4e4ab007305dd1f8bc3eafb397796 Mon Sep 17 00:00:00 2001 From: Alex Maclean Date: Wed, 16 May 2018 16:03:37 +1000 Subject: [PATCH 016/180] Fixed typing. --- types/react-calendar-timeline/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/react-calendar-timeline/index.d.ts b/types/react-calendar-timeline/index.d.ts index 26a3df52cd..d5643d0e2a 100644 --- a/types/react-calendar-timeline/index.d.ts +++ b/types/react-calendar-timeline/index.d.ts @@ -87,8 +87,8 @@ declare module "react-calendar-timeline" { onZoom?(timelineContext: TimelineContext): any; children?: any; fullUpdate?: boolean; - itemRenderer?: (props: {item: TimelineItem, context: TimelineContext}) => React.ReactNode; - groupRenderer?: (props: {group: TimelineGroup, isRightSidebar: boolean}) => React.ReactNode; + itemRenderer?: (props: {item: TimelineItem, context: TimelineContext}) => React.ReactElement<{}>;; + groupRenderer?: (props: {group: TimelineGroup, isRightSidebar: boolean}) => React.ReactElement<{}>;; minimumWidthForItemContentVisibility?: number; } let ReactCalendarTimeline : React.ClassicComponentClass; From 6d9d52c150e170c5a5f2ed01d04c2d93022bf73f Mon Sep 17 00:00:00 2001 From: Alex Maclean Date: Wed, 16 May 2018 16:29:00 +1000 Subject: [PATCH 017/180] Fat fingers. --- types/react-calendar-timeline/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/react-calendar-timeline/index.d.ts b/types/react-calendar-timeline/index.d.ts index d5643d0e2a..8c523e68c6 100644 --- a/types/react-calendar-timeline/index.d.ts +++ b/types/react-calendar-timeline/index.d.ts @@ -87,8 +87,8 @@ declare module "react-calendar-timeline" { onZoom?(timelineContext: TimelineContext): any; children?: any; fullUpdate?: boolean; - itemRenderer?: (props: {item: TimelineItem, context: TimelineContext}) => React.ReactElement<{}>;; - groupRenderer?: (props: {group: TimelineGroup, isRightSidebar: boolean}) => React.ReactElement<{}>;; + itemRenderer?: (props: {item: TimelineItem, context: TimelineContext}) => React.ReactElement<{}>; + groupRenderer?: (props: {group: TimelineGroup, isRightSidebar: boolean}) => React.ReactElement<{}>; minimumWidthForItemContentVisibility?: number; } let ReactCalendarTimeline : React.ClassicComponentClass; From a1747548e69ab37d2a09e0f9bfeeee3c42e2dcd2 Mon Sep 17 00:00:00 2001 From: Nikolai Ommundsen Date: Wed, 16 May 2018 09:47:49 +0200 Subject: [PATCH 018/180] Name updates --- types/chrome/chrome-webview.d.ts | 4 ++-- types/chrome/test/chrome-webview.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/types/chrome/chrome-webview.d.ts b/types/chrome/chrome-webview.d.ts index e2e0b7c429..b358b5a07d 100644 --- a/types/chrome/chrome-webview.d.ts +++ b/types/chrome/chrome-webview.d.ts @@ -15,13 +15,13 @@ /** * Use the webview tag to actively load live content from the web over the network and embed it in your Chrome App. Your app can control the appearance of the webview and interact with the web content, initiate navigations in an embedded web page, react to error events that happen within it, and more (see Usage). */ -declare namespace chrome.webviewTag { +declare namespace chrome.webview { /** Options that determine what data should be cleared by `clearData`. */ export interface ClearDataOptions { /** Clear data accumulated on or after this date, represented in milliseconds since the epoch (accessible via the getTime method of the JavaScript Date object). If absent, defaults to 0 (which would remove all browsing data). */ since: number; } - export interface WindowEvent extends chrome.events.Event<() => void> {} + export interface WindowEvent extends chrome.events.Event<() => void> { } export interface ConsoleEvent extends Event { /** diff --git a/types/chrome/test/chrome-webview.ts b/types/chrome/test/chrome-webview.ts index 87ac8d606c..ff69f71d9b 100644 --- a/types/chrome/test/chrome-webview.ts +++ b/types/chrome/test/chrome-webview.ts @@ -1,4 +1,4 @@ -import webview = chrome.webviewTag; +import webview = chrome.webview; let element: webview.HTMLWebViewElement; From c7325ae6d19e077b19ed390d88719a9a57a17e86 Mon Sep 17 00:00:00 2001 From: Nikolai Ommundsen Date: Wed, 16 May 2018 11:01:25 +0200 Subject: [PATCH 019/180] Separate typings for chrome-apps --- .../chrome-webview.d.ts | 7 +- .../index.d.ts} | 29 +- .../test/chrome-webview.ts | 2 - .../test/index.ts} | 10 +- types/chrome-apps/tsconfig.json | 26 ++ types/chrome-apps/tslint.json | 79 +++++ types/chrome/index.d.ts | 274 +++++++++--------- types/chrome/tsconfig.json | 8 +- 8 files changed, 255 insertions(+), 180 deletions(-) rename types/{chrome => chrome-apps}/chrome-webview.d.ts (98%) rename types/{chrome/chrome-app.d.ts => chrome-apps/index.d.ts} (98%) rename types/{chrome => chrome-apps}/test/chrome-webview.ts (97%) rename types/{chrome/test/chrome-app.ts => chrome-apps/test/index.ts} (98%) create mode 100644 types/chrome-apps/tsconfig.json create mode 100644 types/chrome-apps/tslint.json diff --git a/types/chrome/chrome-webview.d.ts b/types/chrome-apps/chrome-webview.d.ts similarity index 98% rename from types/chrome/chrome-webview.d.ts rename to types/chrome-apps/chrome-webview.d.ts index b358b5a07d..b3ab9ced0c 100644 --- a/types/chrome/chrome-webview.d.ts +++ b/types/chrome-apps/chrome-webview.d.ts @@ -1,13 +1,8 @@ -/// - // Project: http://developer.chrome.com/apps/ // Definitions by: Nikolai Ommundsen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.4 -// // WebView ref: https://chromium.googlesource.com/chromium/src/+/64.0.3274.2/chrome/common/extensions/api/webview_tag.json -// - +// TypeScript Version: 2.3 /////////////////// // Tag diff --git a/types/chrome/chrome-app.d.ts b/types/chrome-apps/index.d.ts similarity index 98% rename from types/chrome/chrome-app.d.ts rename to types/chrome-apps/index.d.ts index 65d80f3290..e5511245d2 100644 --- a/types/chrome/chrome-app.d.ts +++ b/types/chrome-apps/index.d.ts @@ -1,7 +1,9 @@ +/// // Type definitions for Chrome packaged application development // Project: http://developer.chrome.com/apps/ // Definitions by: Adam Lay , MIZUNE Pine , MIZUSHIMA Junki , Ingvar Stepanyan , Adam Pyle , Nikolai Ommundsen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 /// /// @@ -21,29 +23,10 @@ declare namespace chrome.app { // App Runtime //////////////////// declare namespace chrome.app.runtime { - enum LaunchSource { - "untracked" = "untracked", - "app_launcher" = "app_launcher", - "new_tab_page" = "new_tab_page", - "reload" = "reload", - "restart" = "restart", - "load_and_launch" = "load_and_launch", - "command_line" = "command_line", - "file_handler" = "file_handler", - "url_handler" = "url_handler", - "system_tray" = "system_tray", - "about_page" = "about_page", - "keyboard" = "keyboard", - "extensions_page" = "extensions_page", - "management_api" = "management_api", - "ephemeral_app" = "ephemeral_app", - "background" = "background", - "kiosk" = "kiosk", - "chrome_internal" = "chrome_internal", - "test" = "test", - "installed_notification" = "installed_notification", - "context_menu" = "context_menu", - } + type LaunchSource = 'untracked' | 'app_launcher' | 'new_tab_page' | 'reload' | 'restart' | + 'load_and_launch' | 'command_line' | 'file_handler' | 'url_handler' | 'system_tray' | + 'about_page' | 'keyboard' | 'extensions_page' | 'management_api' | 'ephemeral_app' | + 'background' | 'kiosk' | 'chrome_internal' | 'test' | 'installed_notification' | 'context_menu'; interface LaunchData { id?: string; diff --git a/types/chrome/test/chrome-webview.ts b/types/chrome-apps/test/chrome-webview.ts similarity index 97% rename from types/chrome/test/chrome-webview.ts rename to types/chrome-apps/test/chrome-webview.ts index ff69f71d9b..f606486eb7 100644 --- a/types/chrome/test/chrome-webview.ts +++ b/types/chrome-apps/test/chrome-webview.ts @@ -1,4 +1,2 @@ import webview = chrome.webview; - let element: webview.HTMLWebViewElement; - diff --git a/types/chrome/test/chrome-app.ts b/types/chrome-apps/test/index.ts similarity index 98% rename from types/chrome/test/chrome-app.ts rename to types/chrome-apps/test/index.ts index 6dbd06d9e2..8dff00c11f 100644 --- a/types/chrome/test/chrome-app.ts +++ b/types/chrome-apps/test/index.ts @@ -1,5 +1,3 @@ - - import runtime = chrome.app.runtime; import cwindow = chrome.app.window; @@ -44,7 +42,7 @@ var visibleEverywhere: boolean = chrome.app.window.canSetVisibleOnAllWorkspaces( function test_fileSystem(): void { var accepts: chrome.fileSystem.AcceptOptions[] = [ - {mimeTypes: ["text/*"], extensions: ['js', 'css', 'txt', 'html', 'xml', 'tsv', 'csv', 'rtf']} + { mimeTypes: ["text/*"], extensions: ['js', 'css', 'txt', 'html', 'xml', 'tsv', 'csv', 'rtf'] } ]; var chooseOption: chrome.fileSystem.ChooseEntryOptions = { type: "openFile", @@ -58,13 +56,13 @@ function test_fileSystem(): void { var retainedId = chrome.fileSystem.retainEntry(entry); chrome.fileSystem.isRestorable(retainedId, (isRestorable: boolean) => { - if(isRestorable){ + if (isRestorable) { chrome.fileSystem.restoreEntry(retainedId, (restoredEntry: Entry) => { }); } }); - chrome.fileSystem.getWritableEntry(entry, (writableEntry: Entry) => {}); - chrome.fileSystem.isWritableEntry(entry, (isWritable: boolean) => {}); + chrome.fileSystem.getWritableEntry(entry, (writableEntry: Entry) => { }); + chrome.fileSystem.isWritableEntry(entry, (isWritable: boolean) => { }); }); } diff --git a/types/chrome-apps/tsconfig.json b/types/chrome-apps/tsconfig.json new file mode 100644 index 0000000000..5d8da04531 --- /dev/null +++ b/types/chrome-apps/tsconfig.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": false, + "noImplicitThis": false, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "chrome-webview.d.ts", + "test/index.ts", + "test/chrome-webview.ts" + ] +} diff --git a/types/chrome-apps/tslint.json b/types/chrome-apps/tslint.json new file mode 100644 index 0000000000..a41bf5d19a --- /dev/null +++ b/types/chrome-apps/tslint.json @@ -0,0 +1,79 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "adjacent-overload-signatures": false, + "array-type": false, + "arrow-return-shorthand": false, + "ban-types": false, + "callable-types": false, + "comment-format": false, + "dt-header": false, + "eofline": false, + "export-just-namespace": false, + "import-spacing": false, + "interface-name": false, + "interface-over-type-literal": false, + "jsdoc-format": false, + "max-line-length": false, + "member-access": false, + "new-parens": false, + "no-any-union": false, + "no-boolean-literal-compare": false, + "no-conditional-assignment": false, + "no-consecutive-blank-lines": false, + "no-construct": false, + "no-declare-current-package": false, + "no-duplicate-imports": false, + "no-duplicate-variable": false, + "no-empty-interface": false, + "no-for-in-array": false, + "no-inferrable-types": false, + "no-internal-module": false, + "no-irregular-whitespace": false, + "no-mergeable-namespace": false, + "no-misused-new": false, + "no-namespace": false, + "no-object-literal-type-assertion": false, + "no-padding": false, + "no-redundant-jsdoc": false, + "no-redundant-jsdoc-2": false, + "no-redundant-undefined": false, + "no-reference-import": false, + "no-relative-import-in-test": false, + "no-self-import": false, + "no-single-declare-module": false, + "no-string-throw": false, + "no-unnecessary-callback-wrapper": false, + "no-unnecessary-class": false, + "no-unnecessary-generics": false, + "no-unnecessary-qualifier": false, + "no-unnecessary-type-assertion": false, + "no-useless-files": false, + "no-var-keyword": false, + "no-var-requires": false, + "no-void-expression": false, + "no-trailing-whitespace": false, + "object-literal-key-quotes": false, + "object-literal-shorthand": false, + "one-line": false, + "one-variable-per-declaration": false, + "only-arrow-functions": false, + "prefer-conditional-expression": false, + "prefer-const": false, + "prefer-declare-function": false, + "prefer-for-of": false, + "prefer-method-signature": false, + "prefer-template": false, + "radix": false, + "semicolon": false, + "space-before-function-paren": false, + "space-within-parens": false, + "strict-export-declare-modifiers": false, + "trim-file": false, + "triple-equals": false, + "typedef-whitespace": false, + "unified-signatures": false, + "void-return": false, + "whitespace": false + } +} diff --git a/types/chrome/index.d.ts b/types/chrome/index.d.ts index d2b92e4b22..231812c946 100644 --- a/types/chrome/index.d.ts +++ b/types/chrome/index.d.ts @@ -135,7 +135,7 @@ declare namespace chrome.alarms { name: string; } - export interface AlarmEvent extends chrome.events.Event<(alarm: Alarm) => void> {} + export interface AlarmEvent extends chrome.events.Event<(alarm: Alarm) => void> { } /** * Creates an alarm. Near the time(s) specified by alarmInfo, the onAlarm event is fired. If there is another alarm with the same name (or no name if none is specified), it will be cancelled and replaced by this alarm. @@ -282,19 +282,19 @@ declare namespace chrome.bookmarks { childIds: string[]; } - export interface BookmarkRemovedEvent extends chrome.events.Event<(id: string, removeInfo: BookmarkRemoveInfo) => void> {} + export interface BookmarkRemovedEvent extends chrome.events.Event<(id: string, removeInfo: BookmarkRemoveInfo) => void> { } - export interface BookmarkImportEndedEvent extends chrome.events.Event<() => void> {} + export interface BookmarkImportEndedEvent extends chrome.events.Event<() => void> { } - export interface BookmarkMovedEvent extends chrome.events.Event<(id: string, moveInfo: BookmarkMoveInfo) => void> {} + export interface BookmarkMovedEvent extends chrome.events.Event<(id: string, moveInfo: BookmarkMoveInfo) => void> { } - export interface BookmarkImportBeganEvent extends chrome.events.Event<() => void> {} + export interface BookmarkImportBeganEvent extends chrome.events.Event<() => void> { } - export interface BookmarkChangedEvent extends chrome.events.Event<(id: string, changeInfo: BookmarkChangeInfo) => void> {} + export interface BookmarkChangedEvent extends chrome.events.Event<(id: string, changeInfo: BookmarkChangeInfo) => void> { } - export interface BookmarkCreatedEvent extends chrome.events.Event<(id: string, bookmark: BookmarkTreeNode) => void> {} + export interface BookmarkCreatedEvent extends chrome.events.Event<(id: string, bookmark: BookmarkTreeNode) => void> { } - export interface BookmarkChildrenReordered extends chrome.events.Event<(id: string, reorderInfo: BookmarkReorderInfo) => void> {} + export interface BookmarkChildrenReordered extends chrome.events.Event<(id: string, reorderInfo: BookmarkReorderInfo) => void> { } export interface BookmarkSearchQuery { query?: string; @@ -480,7 +480,7 @@ declare namespace chrome.browserAction { popup: string; } - export interface BrowserClickedEvent extends chrome.events.Event<(tab: chrome.tabs.Tab) => void> {} + export interface BrowserClickedEvent extends chrome.events.Event<(tab: chrome.tabs.Tab) => void> { } /** * Since Chrome 22. @@ -737,7 +737,7 @@ declare namespace chrome.commands { shortcut?: string; } - export interface CommandEvent extends chrome.events.Event<(command: string) => void> {} + export interface CommandEvent extends chrome.events.Event<(command: string) => void> { } /** * Returns all the registered extension commands for this extension and their shortcut (if active). @@ -1062,7 +1062,7 @@ declare namespace chrome.contextMenus { type?: string; } - export interface MenuClickedEvent extends chrome.events.Event<(info: OnClickData, tab?: chrome.tabs.Tab) => void> {} + export interface MenuClickedEvent extends chrome.events.Event<(info: OnClickData, tab?: chrome.tabs.Tab) => void> { } /** * Since Chrome 38. @@ -1223,7 +1223,7 @@ declare namespace chrome.cookies { cause: string; } - export interface CookieChangedEvent extends chrome.events.Event<(changeInfo: CookieChangeInfo) => void> {} + export interface CookieChangedEvent extends chrome.events.Event<(changeInfo: CookieChangeInfo) => void> { } /** * Lists all existing cookie stores. @@ -1327,9 +1327,9 @@ declare module chrome { faviconUrl?: string; } - export interface DebuggerDetachedEvent extends chrome.events.Event<(source: Debuggee, reason: string) => void> {} + export interface DebuggerDetachedEvent extends chrome.events.Event<(source: Debuggee, reason: string) => void> { } - export interface DebuggerEventEvent extends chrome.events.Event<(source: Debuggee, method: string, params?: Object) => void> {} + export interface DebuggerEventEvent extends chrome.events.Event<(source: Debuggee, method: string, params?: Object) => void> { } /** * Attaches debugger to the given target. @@ -1374,7 +1374,7 @@ declare module chrome { export var onEvent: DebuggerEventEvent; } - export {_debugger as debugger} + export { _debugger as debugger } } //////////////////// // Declarative Content @@ -1443,14 +1443,14 @@ declare namespace chrome.declarativeContent { /** Matches the state of a web page by various criteria. */ export class PageStateMatcher { - constructor(options: PageStateMatcherProperties); + constructor (options: PageStateMatcherProperties); } /** Declarative event action that shows the extension's page action while the corresponding conditions are met. */ - export class ShowPageAction {} + export class ShowPageAction { } /** Provides the Declarative Event API consisting of addRules, removeRules, and getRules. */ - export interface PageChangedEvent extends chrome.events.Event<() => void> {} + export interface PageChangedEvent extends chrome.events.Event<() => void> { } export var onPageChanged: PageChangedEvent; } @@ -1559,7 +1559,7 @@ declare namespace chrome.declarativeWebRequest { filter: RequestCookie; } - export interface RequestedEvent extends chrome.events.Event {} + export interface RequestedEvent extends chrome.events.Event { } export var onRequest: RequestedEvent; } @@ -1660,9 +1660,9 @@ declare namespace chrome.devtools.inspectedWindow { value: string; } - export interface ResourceAddedEvent extends chrome.events.Event<(resource: Resource) => void> {} + export interface ResourceAddedEvent extends chrome.events.Event<(resource: Resource) => void> { } - export interface ResourceContentCommittedEvent extends chrome.events.Event<(resource: Resource, content: string) => void> {} + export interface ResourceContentCommittedEvent extends chrome.events.Event<(resource: Resource, content: string) => void> { } /** The ID of the tab being inspected. This ID may be used with chrome.tabs.* API. */ export var tabId: number; @@ -1734,9 +1734,9 @@ declare namespace chrome.devtools.network { getContent(callback: (content: string, encoding: string) => void): void; } - export interface RequestFinishedEvent extends chrome.events.Event<(request: Request) => void> {} + export interface RequestFinishedEvent extends chrome.events.Event<(request: Request) => void> { } - export interface NavigatedEvent extends chrome.events.Event<(url: string) => void> {} + export interface NavigatedEvent extends chrome.events.Event<(url: string) => void> { } /** * Returns HAR log that contains all known network requests. @@ -1761,11 +1761,11 @@ declare namespace chrome.devtools.network { * Availability: Since Chrome 18. */ declare namespace chrome.devtools.panels { - export interface PanelShownEvent extends chrome.events.Event<(window: Window) => void> {} + export interface PanelShownEvent extends chrome.events.Event<(window: Window) => void> { } - export interface PanelHiddenEvent extends chrome.events.Event<() => void> {} + export interface PanelHiddenEvent extends chrome.events.Event<() => void> { } - export interface PanelSearchEvent extends chrome.events.Event<(action: string, queryString?: string) => void> {} + export interface PanelSearchEvent extends chrome.events.Event<(action: string, queryString?: string) => void> { } /** Represents a panel created by extension. */ export interface ExtensionPanel { @@ -1784,7 +1784,7 @@ declare namespace chrome.devtools.panels { onSearch: PanelSearchEvent; } - export interface ButtonClickedEvent extends chrome.events.Event<() => void> {} + export interface ButtonClickedEvent extends chrome.events.Event<() => void> { } /** A button created by the extension. */ export interface Button { @@ -1799,7 +1799,7 @@ declare namespace chrome.devtools.panels { onClicked: ButtonClickedEvent; } - export interface SelectionChangedEvent extends chrome.events.Event<() => void> {} + export interface SelectionChangedEvent extends chrome.events.Event<() => void> { } /** Represents the Elements panel. */ export interface ElementsPanel { @@ -1834,9 +1834,9 @@ declare namespace chrome.devtools.panels { onSelectionChanged: SelectionChangedEvent; } - export interface ExtensionSidebarPaneShownEvent extends chrome.events.Event<(window: chrome.windows.Window) => void> {} + export interface ExtensionSidebarPaneShownEvent extends chrome.events.Event<(window: chrome.windows.Window) => void> { } - export interface ExtensionSidebarPaneHiddenEvent extends chrome.events.Event<() => void> {} + export interface ExtensionSidebarPaneHiddenEvent extends chrome.events.Event<() => void> { } /** A sidebar created by the extension. */ export interface ExtensionSidebarPane { @@ -2152,13 +2152,13 @@ declare namespace chrome.downloads { conflictAction?: string; } - export interface DownloadChangedEvent extends chrome.events.Event<(downloadDelta: DownloadDelta) => void> {} + export interface DownloadChangedEvent extends chrome.events.Event<(downloadDelta: DownloadDelta) => void> { } - export interface DownloadCreatedEvent extends chrome.events.Event<(downloadItem: DownloadItem) => void> {} + export interface DownloadCreatedEvent extends chrome.events.Event<(downloadItem: DownloadItem) => void> { } - export interface DownloadErasedEvent extends chrome.events.Event<(downloadId: number) => void> {} + export interface DownloadErasedEvent extends chrome.events.Event<(downloadId: number) => void> { } - export interface DownloadDeterminingFilenameEvent extends chrome.events.Event<(downloadItem: DownloadItem, suggest: (suggestion?: DownloadFilenameSuggestion) => void) => void> {} + export interface DownloadDeterminingFilenameEvent extends chrome.events.Event<(downloadItem: DownloadItem, suggest: (suggestion?: DownloadFilenameSuggestion) => void) => void> { } /** * Find DownloadItem. Set query to the empty object to get all DownloadItem. To get a specific DownloadItem, set only the id field. To page through a large number of items, set orderBy: ['-startTime'], set limit to the number of items per page, and set startedAfter to the startTime of the last item from the last page. @@ -2507,7 +2507,7 @@ declare namespace chrome.extension { message: string; } - export interface OnRequestEvent extends chrome.events.Event<((request: any, sender: runtime.MessageSender, sendResponse: (response: any) => void) => void) | ((sender: runtime.MessageSender, sendResponse: (response: any) => void) => void)> {} + export interface OnRequestEvent extends chrome.events.Event<((request: any, sender: runtime.MessageSender, sendResponse: (response: any) => void) => void) | ((sender: runtime.MessageSender, sendResponse: (response: any) => void) => void)> { } /** * Since Chrome 7. @@ -2618,7 +2618,7 @@ declare namespace chrome.fileBrowserHandler { entries: any[]; } - export interface FileBrowserHandlerExecuteEvent extends chrome.events.Event<(id: string, details: FileHandlerExecuteEventDetails) => void> {} + export interface FileBrowserHandlerExecuteEvent extends chrome.events.Event<(id: string, details: FileHandlerExecuteEventDetails) => void> { } /** * Prompts user to select file path under which file should be saved. When the file is selected, file access permission required to use the file (read, write and create) are granted to the caller. The file will not actually get created during the function call, so function caller must ensure its existence before using it. The function has to be invoked with a user gesture. @@ -2864,33 +2864,33 @@ declare namespace chrome.fileSystemProvider { operationRequestId: number; } - export interface RequestedEvent extends chrome.events.Event<(options: RequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> {} + export interface RequestedEvent extends chrome.events.Event<(options: RequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> { } - export interface MetadataRequestedEvent extends chrome.events.Event<(options: MetadataRequestedEventOptions, successCallback: (metadata: EntryMetadata) => void, errorCallback: (error: string) => void) => void> {} + export interface MetadataRequestedEvent extends chrome.events.Event<(options: MetadataRequestedEventOptions, successCallback: (metadata: EntryMetadata) => void, errorCallback: (error: string) => void) => void> { } - export interface DirectoryPathRequestedEvent extends chrome.events.Event<(options: DirectoryPathRequestedEventOptions, successCallback: (entries: EntryMetadata[], hasMore: boolean) => void, errorCallback: (error: string) => void) => void> {} + export interface DirectoryPathRequestedEvent extends chrome.events.Event<(options: DirectoryPathRequestedEventOptions, successCallback: (entries: EntryMetadata[], hasMore: boolean) => void, errorCallback: (error: string) => void) => void> { } - export interface OpenFileRequestedEvent extends chrome.events.Event<(options: OpenFileRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> {} + export interface OpenFileRequestedEvent extends chrome.events.Event<(options: OpenFileRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> { } - export interface OpenedFileRequestedEvent extends chrome.events.Event<(options: OpenedFileRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> {} + export interface OpenedFileRequestedEvent extends chrome.events.Event<(options: OpenedFileRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> { } - export interface OpenedFileOffsetRequestedEvent extends chrome.events.Event<(options: OpenedFileOffsetRequestedEventOptions, successCallback: (data: ArrayBuffer, hasMore: boolean) => void, errorCallback: (error: string) => void) => void> {} + export interface OpenedFileOffsetRequestedEvent extends chrome.events.Event<(options: OpenedFileOffsetRequestedEventOptions, successCallback: (data: ArrayBuffer, hasMore: boolean) => void, errorCallback: (error: string) => void) => void> { } - export interface DirectoryPathRecursiveRequestedEvent extends chrome.events.Event<(options: DirectoryPathRecursiveRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> {} + export interface DirectoryPathRecursiveRequestedEvent extends chrome.events.Event<(options: DirectoryPathRecursiveRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> { } - export interface EntryPathRecursiveRequestedEvent extends chrome.events.Event<(options: EntryPathRecursiveRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> {} + export interface EntryPathRecursiveRequestedEvent extends chrome.events.Event<(options: EntryPathRecursiveRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> { } - export interface FilePathRequestedEvent extends chrome.events.Event<(options: FilePathRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> {} + export interface FilePathRequestedEvent extends chrome.events.Event<(options: FilePathRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> { } - export interface SourceTargetPathRequestedEvent extends chrome.events.Event<(options: SourceTargetPathRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> {} + export interface SourceTargetPathRequestedEvent extends chrome.events.Event<(options: SourceTargetPathRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> { } - export interface FilePathLengthRequestedEvent extends chrome.events.Event<(options: FilePathLengthRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> {} + export interface FilePathLengthRequestedEvent extends chrome.events.Event<(options: FilePathLengthRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> { } - export interface OpenedFileIoRequestedEvent extends chrome.events.Event<(options: OpenedFileIoRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> {} + export interface OpenedFileIoRequestedEvent extends chrome.events.Event<(options: OpenedFileIoRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> { } - export interface OperationRequestedEvent extends chrome.events.Event<(options: OperationRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> {} + export interface OperationRequestedEvent extends chrome.events.Event<(options: OperationRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> { } - export interface OptionlessRequestedEvent extends chrome.events.Event<(successCallback: Function, errorCallback: (error: string) => void) => void> {} + export interface OptionlessRequestedEvent extends chrome.events.Event<(successCallback: Function, errorCallback: (error: string) => void) => void> { } /** * Mounts a file system with the given fileSystemId and displayName. displayName will be shown in the left panel of Files.app. displayName can contain any characters including '/', but cannot be an empty string. displayName must be descriptive but doesn't have to be unique. The fileSystemId must not be an empty string. @@ -3051,13 +3051,13 @@ declare namespace chrome.fontSettings { fontId: string; } - export interface DefaultFixedFontSizeChangedEvent extends chrome.events.Event<(details: FontSizeDetails) => void> {} + export interface DefaultFixedFontSizeChangedEvent extends chrome.events.Event<(details: FontSizeDetails) => void> { } - export interface DefaultFontSizeChangedEvent extends chrome.events.Event<(details: FontSizeDetails) => void> {} + export interface DefaultFontSizeChangedEvent extends chrome.events.Event<(details: FontSizeDetails) => void> { } - export interface MinimumFontSizeChangedEvent extends chrome.events.Event<(details: FontSizeDetails) => void> {} + export interface MinimumFontSizeChangedEvent extends chrome.events.Event<(details: FontSizeDetails) => void> { } - export interface FontChangedEvent extends chrome.events.Event<(details: FullFontDetails) => void> {} + export interface FontChangedEvent extends chrome.events.Event<(details: FullFontDetails) => void> { } /** * Sets the default font size. @@ -3199,11 +3199,11 @@ declare namespace chrome.gcm { detail: Object; } - export interface MessageReceptionEvent extends chrome.events.Event<(message: IncomingMessage) => void> {} + export interface MessageReceptionEvent extends chrome.events.Event<(message: IncomingMessage) => void> { } - export interface MessageDeletionEvent extends chrome.events.Event<() => void> {} + export interface MessageDeletionEvent extends chrome.events.Event<() => void> { } - export interface GcmErrorEvent extends chrome.events.Event<(error: GcmError) => void> {} + export interface GcmErrorEvent extends chrome.events.Event<(error: GcmError) => void> { } /** The maximum size (in bytes) of all key/value pairs in a message. */ export var MAX_MESSAGE_SIZE: number; @@ -3311,9 +3311,9 @@ declare namespace chrome.history { urls?: string[]; } - export interface HistoryVisitedEvent extends chrome.events.Event<(result: HistoryItem) => void> {} + export interface HistoryVisitedEvent extends chrome.events.Event<(result: HistoryItem) => void> { } - export interface HistoryVisitRemovedEvent extends chrome.events.Event<(removed: RemovedResult) => void> {} + export interface HistoryVisitRemovedEvent extends chrome.events.Event<(removed: RemovedResult) => void> { } /** * Searches the history for the last visit time of each page matching the query. @@ -3473,7 +3473,7 @@ declare namespace chrome.identity { interactive?: boolean; } - export interface SignInChangeEvent extends chrome.events.Event<(account: AccountInfo, signedIn: boolean) => void> {} + export interface SignInChangeEvent extends chrome.events.Event<(account: AccountInfo, signedIn: boolean) => void> { } /** * Retrieves a list of AccountInfo objects describing the accounts present on the profile. @@ -3540,7 +3540,7 @@ declare namespace chrome.identity { * @since Chrome 6. */ declare namespace chrome.idle { - export interface IdleStateChangedEvent extends chrome.events.Event<(newState: string) => void> {} + export interface IdleStateChangedEvent extends chrome.events.Event<(newState: string) => void> { } /** * Returns "locked" if the system is locked, "idle" if the user has not generated any input for a specified number of seconds, or "active" otherwise. @@ -3829,25 +3829,25 @@ declare namespace chrome.input.ime { anchor: number; } - export interface BlurEvent extends chrome.events.Event<(contextID: number) => void> {} + export interface BlurEvent extends chrome.events.Event<(contextID: number) => void> { } - export interface CandidateClickedEvent extends chrome.events.Event<(engineID: string, candidateID: number, button: string) => void> {} + export interface CandidateClickedEvent extends chrome.events.Event<(engineID: string, candidateID: number, button: string) => void> { } - export interface KeyEventEvent extends chrome.events.Event<(engineID: string, keyData: KeyboardEvent) => void> {} + export interface KeyEventEvent extends chrome.events.Event<(engineID: string, keyData: KeyboardEvent) => void> { } - export interface DeactivatedEvent extends chrome.events.Event<(engineID: string) => void> {} + export interface DeactivatedEvent extends chrome.events.Event<(engineID: string) => void> { } - export interface InputContextUpdateEvent extends chrome.events.Event<(context: InputContext) => void> {} + export interface InputContextUpdateEvent extends chrome.events.Event<(context: InputContext) => void> { } - export interface ActivateEvent extends chrome.events.Event<(engineID: string, screen: string) => void> {} + export interface ActivateEvent extends chrome.events.Event<(engineID: string, screen: string) => void> { } - export interface FocusEvent extends chrome.events.Event<(context: InputContext) => void> {} + export interface FocusEvent extends chrome.events.Event<(context: InputContext) => void> { } - export interface MenuItemActivatedEvent extends chrome.events.Event<(engineID: string, name: string) => void> {} + export interface MenuItemActivatedEvent extends chrome.events.Event<(engineID: string, name: string) => void> { } - export interface SurroundingTextChangedEvent extends chrome.events.Event<(engineID: string, surroundingInfo: SurroundingTextInfo) => void> {} + export interface SurroundingTextChangedEvent extends chrome.events.Event<(engineID: string, surroundingInfo: SurroundingTextInfo) => void> { } - export interface InputResetEvent extends chrome.events.Event<(engineID: string) => void> {} + export interface InputResetEvent extends chrome.events.Event<(engineID: string) => void> { } /** * Adds the provided menu items to the language menu when this IME is active. @@ -4079,13 +4079,13 @@ declare namespace chrome.management { showConfirmDialog?: boolean; } - export interface ManagementDisabledEvent extends chrome.events.Event<(info: ExtensionInfo) => void> {} + export interface ManagementDisabledEvent extends chrome.events.Event<(info: ExtensionInfo) => void> { } - export interface ManagementUninstalledEvent extends chrome.events.Event<(id: string) => void> {} + export interface ManagementUninstalledEvent extends chrome.events.Event<(id: string) => void> { } - export interface ManagementInstalledEvent extends chrome.events.Event<(info: ExtensionInfo) => void> {} + export interface ManagementInstalledEvent extends chrome.events.Event<(info: ExtensionInfo) => void> { } - export interface ManagementEnabledEvent extends chrome.events.Event<(info: ExtensionInfo) => void> {} + export interface ManagementEnabledEvent extends chrome.events.Event<(info: ExtensionInfo) => void> { } /** * Enables or disables an app or extension. @@ -4232,7 +4232,7 @@ declare namespace chrome.networking.config { Security?: string; } - export interface CaptivePorttalDetectedEvent extends chrome.events.Event<(networkInfo: NetworkInfo) => void> {} + export interface CaptivePorttalDetectedEvent extends chrome.events.Event<(networkInfo: NetworkInfo) => void> { } /** * Allows an extension to define network filters for the networks it can handle. A call to this function will remove all filters previously installed by the extension before setting the new list. @@ -4337,15 +4337,15 @@ declare namespace chrome.notifications { requireInteraction?: boolean; } - export interface NotificationClosedEvent extends chrome.events.Event<(notificationId: string, byUser: boolean) => void> {} + export interface NotificationClosedEvent extends chrome.events.Event<(notificationId: string, byUser: boolean) => void> { } - export interface NotificationClickedEvent extends chrome.events.Event<(notificationId: string) => void> {} + export interface NotificationClickedEvent extends chrome.events.Event<(notificationId: string) => void> { } - export interface NotificationButtonClickedEvent extends chrome.events.Event<(notificationId: string, buttonIndex: number) => void> {} + export interface NotificationButtonClickedEvent extends chrome.events.Event<(notificationId: string, buttonIndex: number) => void> { } - export interface NotificationPermissionLevelChangedEvent extends chrome.events.Event<(level: string) => void> {} + export interface NotificationPermissionLevelChangedEvent extends chrome.events.Event<(level: string) => void> { } - export interface NotificationShowSettingsEvent extends chrome.events.Event<() => void> {} + export interface NotificationShowSettingsEvent extends chrome.events.Event<() => void> { } /** The notification closed, either by the system or by user action. */ export var onClosed: NotificationClosedEvent; @@ -4445,13 +4445,13 @@ declare namespace chrome.omnibox { description: string; } - export interface OmniboxInputEnteredEvent extends chrome.events.Event<(text: string) => void> {} + export interface OmniboxInputEnteredEvent extends chrome.events.Event<(text: string) => void> { } - export interface OmniboxInputChangedEvent extends chrome.events.Event<(text: string, suggest: (suggestResults: SuggestResult[]) => void) => void> {} + export interface OmniboxInputChangedEvent extends chrome.events.Event<(text: string, suggest: (suggestResults: SuggestResult[]) => void) => void> { } - export interface OmniboxInputStartedEvent extends chrome.events.Event<() => void> {} + export interface OmniboxInputStartedEvent extends chrome.events.Event<() => void> { } - export interface OmniboxInputCancelledEvent extends chrome.events.Event<() => void> {} + export interface OmniboxInputCancelledEvent extends chrome.events.Event<() => void> { } /** * Sets the description and styling for the default suggestion. The default suggestion is the text that is displayed in the first suggestion row underneath the URL bar. @@ -4478,7 +4478,7 @@ declare namespace chrome.omnibox { * @since Chrome 5. */ declare namespace chrome.pageAction { - export interface PageActionClickedEvent extends chrome.events.Event<(tab: chrome.tabs.Tab) => void> {} + export interface PageActionClickedEvent extends chrome.events.Event<(tab: chrome.tabs.Tab) => void> { } export interface TitleDetails { /** The id of the tab for which you want to modify the page action. */ @@ -4787,13 +4787,13 @@ declare namespace chrome.printerProvider { document: Blob; } - export interface PrinterRequestedEvent extends chrome.events.Event<(resultCallback: (printerInfo: PrinterInfo[]) => void) => void> {} + export interface PrinterRequestedEvent extends chrome.events.Event<(resultCallback: (printerInfo: PrinterInfo[]) => void) => void> { } - export interface PrinterInfoRequestedEvent extends chrome.events.Event<(device: any, resultCallback: (printerInfo?: PrinterInfo) => void) => void> {} + export interface PrinterInfoRequestedEvent extends chrome.events.Event<(device: any, resultCallback: (printerInfo?: PrinterInfo) => void) => void> { } - export interface CapabilityRequestedEvent extends chrome.events.Event<(printerId: string, resultCallback: (capabilities: PrinterCapabilities) => void) => void> {} + export interface CapabilityRequestedEvent extends chrome.events.Event<(printerId: string, resultCallback: (capabilities: PrinterCapabilities) => void) => void> { } - export interface PrintRequestedEvent extends chrome.events.Event<(printJob: PrintJob, resultCallback: (result: string) => void) => void> {} + export interface PrintRequestedEvent extends chrome.events.Event<(printJob: PrintJob, resultCallback: (result: string) => void) => void> { } /** Event fired when print manager requests printers provided by extensions. */ export var onGetPrintersRequested: PrinterRequestedEvent; @@ -4930,7 +4930,7 @@ declare namespace chrome.proxy { fatal: boolean; } - export interface ProxyErrorEvent extends chrome.events.Event<(details: ErrorDetails) => void> {} + export interface ProxyErrorEvent extends chrome.events.Event<(details: ErrorDetails) => void> { } export var settings: chrome.types.ChromeSetting; /** Notifies about proxy errors. */ @@ -5060,21 +5060,21 @@ declare namespace chrome.runtime { version: string; } - export interface PortDisconnectEvent extends chrome.events.Event<(port: Port) => void> {} + export interface PortDisconnectEvent extends chrome.events.Event<(port: Port) => void> { } - export interface PortMessageEvent extends chrome.events.Event<(message: any, port: Port) => void> {} + export interface PortMessageEvent extends chrome.events.Event<(message: any, port: Port) => void> { } - export interface ExtensionMessageEvent extends chrome.events.Event<(message: any, sender: MessageSender, sendResponse: (response: any) => void) => void> {} + export interface ExtensionMessageEvent extends chrome.events.Event<(message: any, sender: MessageSender, sendResponse: (response: any) => void) => void> { } - export interface ExtensionConnectEvent extends chrome.events.Event<(port: Port) => void> {} + export interface ExtensionConnectEvent extends chrome.events.Event<(port: Port) => void> { } - export interface RuntimeInstalledEvent extends chrome.events.Event<(details: InstalledDetails) => void> {} + export interface RuntimeInstalledEvent extends chrome.events.Event<(details: InstalledDetails) => void> { } - export interface RuntimeEvent extends chrome.events.Event<() => void> {} + export interface RuntimeEvent extends chrome.events.Event<() => void> { } - export interface RuntimeRestartRequiredEvent extends chrome.events.Event<(reason: string) => void> {} + export interface RuntimeRestartRequiredEvent extends chrome.events.Event<(reason: string) => void> { } - export interface RuntimeUpdateAvailableEvent extends chrome.events.Event<(details: UpdateAvailableDetails) => void> {} + export interface RuntimeUpdateAvailableEvent extends chrome.events.Event<(details: UpdateAvailableDetails) => void> { } export interface ManifestIcons { [size: number]: string; @@ -5462,7 +5462,7 @@ declare namespace chrome.scriptBadge { popup: string; } - export interface ScriptBadgeClickedEvent extends chrome.events.Event<(tab: chrome.tabs.Tab) => void> {} + export interface ScriptBadgeClickedEvent extends chrome.events.Event<(tab: chrome.tabs.Tab) => void> { } export function getPopup(details: GetPopupDetails, callback: Function): void; export function getAttention(details: AttentionDetails): void; @@ -5510,7 +5510,7 @@ declare namespace chrome.sessions { sessions: Session[]; } - export interface SessionChangedEvent extends chrome.events.Event<() => void> {} + export interface SessionChangedEvent extends chrome.events.Event<() => void> { } /** The maximum number of sessions.Session that will be included in a requested list. */ export var MAX_SESSION_RESULTS: number; @@ -5646,7 +5646,7 @@ declare namespace chrome.storage { MAX_WRITE_OPERATIONS_PER_MINUTE: number; } - export interface StorageChangedEvent extends chrome.events.Event<(changes: { [key: string]: StorageChange }, areaName: string) => void> {} + export interface StorageChangedEvent extends chrome.events.Event<(changes: { [key: string]: StorageChange }, areaName: string) => void> { } /** Items in the local storage area are local to each machine. */ export var local: LocalStorageArea; @@ -5820,9 +5820,9 @@ declare namespace chrome.system.storage { availableCapacity: number; } - export interface SystemStorageAttachedEvent extends chrome.events.Event<(info: StorageUnitInfo) => void> {} + export interface SystemStorageAttachedEvent extends chrome.events.Event<(info: StorageUnitInfo) => void> { } - export interface SystemStorageDetachedEvent extends chrome.events.Event<(id: string) => void> {} + export interface SystemStorageDetachedEvent extends chrome.events.Event<(id: string) => void> { } /** Get the storage information from the system. The argument passed to the callback is an array of StorageUnitInfo objects. */ export function getInfo(callback: (info: StorageUnitInfo[]) => void): void; @@ -5876,7 +5876,7 @@ declare namespace chrome.tabCapture { videoConstraints?: MediaStreamConstraints; } - export interface CaptureStatusChangedEvent extends chrome.events.Event<(info: CaptureInfo) => void> {} + export interface CaptureStatusChangedEvent extends chrome.events.Event<(info: CaptureInfo) => void> { } /** * Captures the visible area of the currently active tab. Capture can only be started on the currently active tab after the extension has been invoked. Capture is maintained across page navigations within the tab, and stops when the tab is closed, or the media stream is closed by the extension. @@ -6327,27 +6327,27 @@ declare namespace chrome.tabs { zoomSettings: ZoomSettings; } - export interface TabHighlightedEvent extends chrome.events.Event<(highlightInfo: HighlightInfo) => void> {} + export interface TabHighlightedEvent extends chrome.events.Event<(highlightInfo: HighlightInfo) => void> { } - export interface TabRemovedEvent extends chrome.events.Event<(tabId: number, removeInfo: TabRemoveInfo) => void> {} + export interface TabRemovedEvent extends chrome.events.Event<(tabId: number, removeInfo: TabRemoveInfo) => void> { } - export interface TabUpdatedEvent extends chrome.events.Event<(tabId: number, changeInfo: TabChangeInfo, tab: Tab) => void> {} + export interface TabUpdatedEvent extends chrome.events.Event<(tabId: number, changeInfo: TabChangeInfo, tab: Tab) => void> { } - export interface TabAttachedEvent extends chrome.events.Event<(tabId: number, attachInfo: TabAttachInfo) => void> {} + export interface TabAttachedEvent extends chrome.events.Event<(tabId: number, attachInfo: TabAttachInfo) => void> { } - export interface TabMovedEvent extends chrome.events.Event<(tabId: number, moveInfo: TabMoveInfo) => void> {} + export interface TabMovedEvent extends chrome.events.Event<(tabId: number, moveInfo: TabMoveInfo) => void> { } - export interface TabDetachedEvent extends chrome.events.Event<(tabId: number, detachInfo: TabDetachInfo) => void> {} + export interface TabDetachedEvent extends chrome.events.Event<(tabId: number, detachInfo: TabDetachInfo) => void> { } - export interface TabCreatedEvent extends chrome.events.Event<(tab: Tab) => void> {} + export interface TabCreatedEvent extends chrome.events.Event<(tab: Tab) => void> { } - export interface TabActivatedEvent extends chrome.events.Event<(activeInfo: TabActiveInfo) => void> {} + export interface TabActivatedEvent extends chrome.events.Event<(activeInfo: TabActiveInfo) => void> { } - export interface TabReplacedEvent extends chrome.events.Event<(addedTabId: number, removedTabId: number) => void> {} + export interface TabReplacedEvent extends chrome.events.Event<(addedTabId: number, removedTabId: number) => void> { } - export interface TabSelectedEvent extends chrome.events.Event<(tabId: number, selectInfo: TabWindowInfo) => void> {} + export interface TabSelectedEvent extends chrome.events.Event<(tabId: number, selectInfo: TabWindowInfo) => void> { } - export interface TabZoomChangeEvent extends chrome.events.Event<(ZoomChangeInfo: ZoomChangeInfo) => void> {} + export interface TabZoomChangeEvent extends chrome.events.Event<(ZoomChangeInfo: ZoomChangeInfo) => void> { } /** * Injects JavaScript code into a page. For details, see the programmatic injection section of the content scripts doc. @@ -6828,7 +6828,7 @@ declare namespace chrome.ttsEngine { pitch?: number; } - export interface TtsEngineSpeakEvent extends chrome.events.Event<(utterance: string, options: SpeakOptions, sendTtsEvent: (event: chrome.tts.TtsEvent) => void) => void> {} + export interface TtsEngineSpeakEvent extends chrome.events.Event<(utterance: string, options: SpeakOptions, sendTtsEvent: (event: chrome.tts.TtsEvent) => void) => void> { } /** Called when the user makes a call to tts.speak() and one of the voices from this extension's manifest is the first to match the options object. */ export var onSpeak: TtsEngineSpeakEvent; @@ -6912,7 +6912,7 @@ declare namespace chrome.types { incognitoSpecific?: boolean; } - export interface ChromeSettingChangedEvent extends chrome.events.Event {} + export interface ChromeSettingChangedEvent extends chrome.events.Event { } /** An interface that allows access to a Chrome browser setting. See accessibilityFeatures for an example. */ export interface ChromeSetting { @@ -6969,15 +6969,15 @@ declare namespace chrome.vpnProvider { dnsServer: string[]; } - export interface VpnPlatformMessageEvent extends chrome.events.Event<(id: string, message: string, error: string) => void> {} + export interface VpnPlatformMessageEvent extends chrome.events.Event<(id: string, message: string, error: string) => void> { } - export interface VpnPacketReceptionEvent extends chrome.events.Event<(data: ArrayBuffer) => void> {} + export interface VpnPacketReceptionEvent extends chrome.events.Event<(data: ArrayBuffer) => void> { } - export interface VpnConfigRemovalEvent extends chrome.events.Event<(id: string) => void> {} + export interface VpnConfigRemovalEvent extends chrome.events.Event<(id: string) => void> { } - export interface VpnConfigCreationEvent extends chrome.events.Event<(id: string, name: string, data: Object) => void> {} + export interface VpnConfigCreationEvent extends chrome.events.Event<(id: string, name: string, data: Object) => void> { } - export interface VpnUiEvent extends chrome.events.Event<(event: string, id?: string) => void> {} + export interface VpnUiEvent extends chrome.events.Event<(event: string, id?: string) => void> { } /** * Creates a new VPN configuration that persists across multiple login sessions of the user. @@ -7175,17 +7175,17 @@ declare namespace chrome.webNavigation { addListener(callback: (details: T) => void, filters?: WebNavigationEventFilter): void; } - export interface WebNavigationFramedEvent extends WebNavigationEvent {} + export interface WebNavigationFramedEvent extends WebNavigationEvent { } - export interface WebNavigationFramedErrorEvent extends WebNavigationEvent {} + export interface WebNavigationFramedErrorEvent extends WebNavigationEvent { } - export interface WebNavigationSourceEvent extends WebNavigationEvent {} + export interface WebNavigationSourceEvent extends WebNavigationEvent { } - export interface WebNavigationParentedEvent extends WebNavigationEvent {} + export interface WebNavigationParentedEvent extends WebNavigationEvent { } - export interface WebNavigationTransitionalEvent extends WebNavigationEvent {} + export interface WebNavigationTransitionalEvent extends WebNavigationEvent { } - export interface WebNavigationReplacementEvent extends WebNavigationEvent {} + export interface WebNavigationReplacementEvent extends WebNavigationEvent { } /** * Retrieves information about the given frame. A frame refers to an