@zturnlibs/ztron-api


app

Enumerations

BundleType

Defined in: app.ts:42

Installer format of the current distribution — mirrors Tauri's BundleType (App when running inside an .app bundle or in dev).

Enumeration Members

App

App: "App"

Defined in: app.ts:48

AppImage

AppImage: "AppImage"

Defined in: app.ts:47

Deb

Deb: "Deb"

Defined in: app.ts:45

Msi

Msi: "Msi"

Defined in: app.ts:44

Nsis

Nsis: "Nsis"

Defined in: app.ts:43

Rpm

Rpm: "Rpm"

Defined in: app.ts:46

Interfaces

AppInfo

Defined in: app.ts:22

Properties

appName?

optional appName?: string

Defined in: app.ts:24

identifier

identifier: string

Defined in: app.ts:23

version?

optional version?: string

Defined in: app.ts:25

Variables

app

const app: object

Defined in: app.ts:91

Type Declaration

defaultWindowIcon

defaultWindowIcon: () => Promise<null>

The registered default window icon (null when none set).

Returns

Promise<null>

fetchDataStoreIdentifiers

fetchDataStoreIdentifiers: () => Promise<string[]>

Android-only upstream: known data-store identifiers (empty on desktop).

Returns

Promise<string[]>

getBundleType

getBundleType: () => Promise<string>

The distribution format this build was packaged into.

Returns

Promise<string>

getConfig

getConfig: () => Promise<AppInfo & Record<string, unknown>>

The app configuration (identifier/name/version; secrets are stripped).

Returns

Promise<AppInfo & Record<string, unknown>>

getIdentifier

getIdentifier: () => Promise<string>

The configured bundle identifier (e.g. com.example.app).

Returns

Promise<string>

getName

getName: () => Promise<string>

The configured app name (falls back to the bundle identifier).

Returns

Promise<string>

getTauriVersion

getTauriVersion: () => Promise<string>

The Ztron API version (mirrors Tauri's getTauriVersion).

Returns

Promise<string>

getVersion

getVersion: () => Promise<string>

The configured app version.

Returns

Promise<string>

hide

hide: () => Promise<void> = hideApplication

Hides the whole application and all its windows (macOS NSApp hide:).

Returns

Promise<void>

removeDataStore

removeDataStore: (id) => Promise<{ removed: boolean; }>

Android-only upstream: removes one data store (no-op on desktop).

Parameters
id

string

Returns

Promise<{ removed: boolean; }>

setDockVisibility

setDockVisibility: (visible) => Promise<void>

Toggles the macOS Dock icon for the running application.

Parameters
visible

boolean

Returns

Promise<void>

show

show: () => Promise<void> = showApplication

Shows the whole application (macOS: unhide + activate).

Returns

Promise<void>

supportsMultipleWindows

supportsMultipleWindows: () => Promise<boolean>

Whether the runtime supports creating further windows at run time.

Returns

Promise<boolean>

Functions

defaultWindowIcon()

defaultWindowIcon(): Promise<null>

Defined in: app.ts:72

The registered default window icon (null when none set).

Returns

Promise<null>


fetchDataStoreIdentifiers()

fetchDataStoreIdentifiers(): Promise<string[]>

Defined in: app.ts:77

Android-only upstream: known data-store identifiers (empty on desktop).

Returns

Promise<string[]>


getBundleType()

getBundleType(): Promise<string>

Defined in: app.ts:52

The distribution format this build was packaged into.

Returns

Promise<string>


getConfig()

getConfig(): Promise<AppInfo & Record<string, unknown>>

Defined in: app.ts:29

The app configuration (identifier/name/version; secrets are stripped).

Returns

Promise<AppInfo & Record<string, unknown>>


getIdentifier()

getIdentifier(): Promise<string>

Defined in: app.ts:34

The configured bundle identifier (e.g. com.example.app).

Returns

Promise<string>


getName()

getName(): Promise<string>

Defined in: app.ts:8

The configured app name (falls back to the bundle identifier).

Returns

Promise<string>


getTauriVersion()

getTauriVersion(): Promise<string>

Defined in: app.ts:18

The Ztron API version (mirrors Tauri's getTauriVersion).

Returns

Promise<string>


getVersion()

getVersion(): Promise<string>

Defined in: app.ts:13

The configured app version.

Returns

Promise<string>


hideApplication()

hideApplication(): Promise<void>

Defined in: app.ts:67

Hides the whole application and all its windows (macOS NSApp hide:).

Returns

Promise<void>


removeDataStore()

removeDataStore(id): Promise<{ removed: boolean; }>

Defined in: app.ts:82

Android-only upstream: removes one data store (no-op on desktop).

Parameters

id

string

Returns

Promise<{ removed: boolean; }>


setDockVisibility()

setDockVisibility(visible): Promise<void>

Defined in: app.ts:87

Toggles the macOS Dock icon for the running application.

Parameters

visible

boolean

Returns

Promise<void>


showApplication()

showApplication(): Promise<void>

Defined in: app.ts:62

Shows the whole application (macOS: unhide + activate).

Returns

Promise<void>


supportsMultipleWindows()

supportsMultipleWindows(): Promise<boolean>

Defined in: app.ts:57

Whether the runtime supports creating further windows at run time.

Returns

Promise<boolean>