import type OpenFin from '@openfin/core'; import type { AttachedPage, CopyPagePayload, DetachPagesFromWindowPayload, ExtendedAttachPagesToWindowPayload, HandlePagesAndWindowClosePayload, HandlePagesAndWindowCloseResult, HandleSaveModalOnPageClosePayload, ReorderPagesForWindowPayload, SaveModalOnPageCloseResult, SetActivePageForWindowPayload, ShouldPageClosePayload, ShouldPageCloseResult, UpdatePageForWindowPayload } from '../../../../common/src/api/pages/shapes'; import type { CreateSavedPageRequest, HandlePageChangesPayload, ModifiedPageState, Page, UpdateSavedPageRequest, WorkspacePlatformProvider } from '../../../../client-api-platform/src/shapes'; /** * Get all open pages in which are attached to a window. * @returns the list of attached pages. */ export declare const getAllAttachedPages: () => Promise; export declare const createSavedPageInternal: ({ page }: CreateSavedPageRequest) => Promise; export declare const deleteSavedPageInternal: (id: string) => Promise; export declare const updateSavedPageInternal: ({ pageId, page }: UpdateSavedPageRequest) => Promise; export declare const savePage: (page: Page) => Promise; export declare const attachPagesToWindow: (payload: ExtendedAttachPagesToWindowPayload) => Promise; export declare const updatePageForWindow: (payload: UpdatePageForWindowPayload) => Promise; export declare const detachPagesFromWindow: (payload: DetachPagesFromWindowPayload) => Promise; export declare const setActivePage: (payload: SetActivePageForWindowPayload) => Promise; export declare const getPagesForWindow: (identity: OpenFin.Identity) => Promise; export declare const getPageForWindow: ({ identity, pageId }: { identity: OpenFin.Identity; pageId: string; }) => Promise; export declare const reorderPagesForWindow: (payload: ReorderPagesForWindowPayload) => Promise; export declare const getActivePageIdForWindow: (identity: OpenFin.Identity) => Promise; /** * Checks if a given page name is unique. * * If the name is not unique, it will append a number to the end of the name. * * When `BrowserInitConfig.allowDuplicatePageTitles` is `true`, this function * short-circuits and returns the supplied name (or the default title) as-is, * without appending a numeric suffix. * * @param initialName The initial name to test * @param allowDuplicatePageTitles Whether duplicate page titles are permitted * @returns string: a unique page name (or the input unchanged when duplicates are allowed) */ export declare function getUniquePageTitle(initialName?: string, allowDuplicatePageTitles?: boolean): Promise; export declare function handleSaveModalOnPageClose({ page }: HandleSaveModalOnPageClosePayload): Promise; /** * Default implementation of shouldPageClose. If enableBeforeUnload isn't set to true, always returns True (proceed with close). * If beforeunload handling is enabled, will return False if any views in the page are determined not to close. */ export declare function shouldPageClose(this: WorkspacePlatformProvider, { page, identity }: ShouldPageClosePayload): Promise; /** * Internal function to broker closing of the window. It needs to live here to call multiple overrides directly instead of via channels. * @param payload Accepts pages and window identity * @returns a flag indicating whether to continue closing the window * @internal */ export declare function shouldWindowClose(this: WorkspacePlatformProvider, { pages, identity }: { pages: AttachedPage[]; identity: OpenFin.Identity; }): Promise<{ shouldWindowClose: boolean; }>; /** * Default implementation of handlePagesAndWindowClose. Will abort closing of the window if any of the pages within it are prevented from closing. * @param payload Contains pages that were prevented from closing, pages that weren't, and identity of the window * @returns {shouldWindowClose: boolean} which determines whether closing of the window will proceed */ export declare function handlePagesAndWindowClose(this: WorkspacePlatformProvider, { pagesPreventingClose, pagesNotPreventingClose, identity }: HandlePagesAndWindowClosePayload): Promise; export declare function copyPageOverride({ page }: CopyPagePayload): Promise; export declare function handlePageChanges(payload: HandlePageChangesPayload): Promise; /** * Mark all unsaved pages as saved. */ export declare const markUnsavedPagesAsSavedInternal: () => Promise;