|
1 | | -import type { AppInfo, AppTheme, Column, ConnectionInfo, JsonValue, OpenQueryTabOptions, OpenTableStructureTabOptions, OpenTableTableTabOptions, PluginErrorObject, PluginViewContext, PrimaryKey, QueryResult, RequestFileSaveOptions, RunQueryResult, Table, TableIndex, TableKey, WindowEventObject } from "./types"; |
| 1 | +import type { AppInfo, AppTheme, Column, ConfirmOptions, ConnectionInfo, JsonValue, OpenQueryTabOptions, OpenTableStructureTabOptions, OpenTableTableTabOptions, PluginErrorObject, PluginViewContext, PrimaryKey, QueryResult, RequestFileSaveOptions, RunQueryResult, Table, TableIndex, TableKey, WindowEventObject } from "./types"; |
2 | 2 | import type { RequestMap } from "./internal"; |
3 | 3 |
|
4 | 4 | export * from "./types"; |
@@ -241,10 +241,16 @@ export async function hideStatusBarUI(): Promise<void> { |
241 | 241 | return await request({ name: "toggleStatusBarUI", args: { force: false } }); |
242 | 242 | } |
243 | 243 |
|
| 244 | +/** @since Beekeeper Studio 5.5.? */ |
244 | 245 | export async function toggleStatusBarUI(): Promise<void> { |
245 | 246 | return await request({ name: "toggleStatusBarUI", args: void 0 }); |
246 | 247 | } |
247 | 248 |
|
| 249 | +/** @since Beekeeper Studio 5.5.? */ |
| 250 | +export async function confirm(title?: string, message?: string, options?: ConfirmOptions): Promise<boolean> { |
| 251 | + return await request({ name: "confirm", args: { title, message, options } }); |
| 252 | +} |
| 253 | + |
248 | 254 | /** @since Beekeeper Studio 5.4.0 */ |
249 | 255 | export const broadcast = { |
250 | 256 | post<T extends JsonValue = JsonValue>(message: T): void { |
@@ -305,6 +311,34 @@ export const clipboard = { |
305 | 311 | // async read() {}, |
306 | 312 | }; |
307 | 313 |
|
| 314 | +/** @since Beekeeper Studio 5.5.? */ |
| 315 | +export const noty = { |
| 316 | + async success(message: string): Promise<void> { |
| 317 | + return await request({ |
| 318 | + name: "noty.success", |
| 319 | + args: { message }, |
| 320 | + }); |
| 321 | + }, |
| 322 | + async info(message: string): Promise<void> { |
| 323 | + return await request({ |
| 324 | + name: "noty.info", |
| 325 | + args: { message }, |
| 326 | + }); |
| 327 | + }, |
| 328 | + async warning(message: string): Promise<void> { |
| 329 | + return await request({ |
| 330 | + name: "noty.warning", |
| 331 | + args: { message }, |
| 332 | + }); |
| 333 | + }, |
| 334 | + async error(message: string): Promise<void> { |
| 335 | + return await request({ |
| 336 | + name: "noty.error", |
| 337 | + args: { message }, |
| 338 | + }); |
| 339 | + }, |
| 340 | +} |
| 341 | + |
308 | 342 | let debugComms = false; |
309 | 343 |
|
310 | 344 | export function setDebugComms(enabled: boolean) { |
|
0 commit comments