You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tauri-plugins-workspace/plugins/push-notifications/guest-js/index.ts

12 lines
329 B

import { invoke } from "@tauri-apps/api/core"
export type PushTokenResponse = {
value?: string;
}
export async function pushToken(): Promise<string | null> {
return await invoke<{value?: string}>('plugin:push-notifications|push_token', {
payload: {},
}).then((r: PushTokenResponse) => (r.value ? r.value : null));
}