Memindahkan model guest-js ke index
This commit is contained in:
1 parent
05d845521f
commit
0617c1eb83
3 files changed
+15
-15
No files matched your search
+14
-1
@@ -1,5 +1,13 @@
|
||||
import { invoke } from "@tauri-apps/api/core";
|
||||
import { SBlueclasMuatanKirim, SBlueclasResponDaftarPerangkat } from "./models";
|
||||
|
||||
export type SDaftarPerangkatBlueclasResponDaftarPerangkat = {
|
||||
nama: string;
|
||||
alamat: string;
|
||||
};
|
||||
|
||||
export type SBlueclasResponDaftarPerangkat = {
|
||||
data: SDaftarPerangkatBlueclasResponDaftarPerangkat[];
|
||||
};
|
||||
|
||||
export async function daftarPerangkat(): Promise<
|
||||
SBlueclasResponDaftarPerangkat[]
|
||||
@@ -9,6 +17,11 @@ export async function daftarPerangkat(): Promise<
|
||||
).then((res: SBlueclasResponDaftarPerangkat[]) => res);
|
||||
}
|
||||
|
||||
export type SBlueclasMuatanKirim = {
|
||||
alamat: string;
|
||||
data: number[];
|
||||
};
|
||||
|
||||
export async function kirim(value: SBlueclasMuatanKirim): Promise<null> {
|
||||
return await invoke<null>("plugin:bluclas|kirim", {
|
||||
payload: {
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
type SDaftarPerangkatBlueclasResponDaftarPerangkat = {
|
||||
nama: string,
|
||||
alamat: string
|
||||
}
|
||||
|
||||
export type SBlueclasResponDaftarPerangkat = {
|
||||
data: SDaftarPerangkatBlueclasResponDaftarPerangkat[]
|
||||
}
|
||||
|
||||
export type SBlueclasMuatanKirim = {
|
||||
alamat: string,
|
||||
data: number[],
|
||||
};
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@segubi/tauri-plugin-bluclas-api",
|
||||
"version": "0.1.6",
|
||||
"version": "0.1.7",
|
||||
"author": "Rizky Denianto",
|
||||
"description": "",
|
||||
"type": "module",
|
||||
|
||||
Reference in new issue
Block a user