There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.
TypeScript appcrdteditorelectronknowledge-basemarkdownmironotesnotionnotion-alternativerustrust-langrust-languagetabletableviewwhiteboardwikiworkspace
feat: auto generate tauri ipc interfaces
Lin Onetwo55f8f910fa04
diff --git a/packages/data-center/src/provider/tauri-ipc/ipc/types/blob.json b/packages/data-center/src/provider/tauri-ipc/ipc/types/blob.jsonnew file mode 100644index 0000000000..f136a8b4d7--- /dev/null+++ b/packages/data-center/src/provider/tauri-ipc/ipc/types/blob.json@@ -0,0 +1,61 @@+{+ "$schema": "http://json-schema.org/draft-07/schema#",+ "title": "IBlobParameters",+ "oneOf": [+ {+ "type": "object",+ "required": ["Put"],+ "properties": {+ "Put": {+ "$ref": "#/definitions/PutBlob"+ }+ },+ "additionalProperties": false+ },+ {+ "type": "object",+ "required": ["Get"],+ "properties": {+ "Get": {+ "$ref": "#/definitions/GetBlob"+ }+ },+ "additionalProperties": false+ }+ ],+ "definitions": {+ "GetBlob": {+ "type": "object",+ "required": ["id", "workspace_id"],+ "properties": {+ "id": {+ "type": "string"+ },+ "workspace_id": {+ "type": "integer",+ "format": "uint64",+ "minimum": 0.0+ }+ }+ },+ "PutBlob": {+ "type": "object",+ "required": ["blob", "workspace_id"],+ "properties": {+ "blob": {+ "type": "array",+ "items": {+ "type": "integer",+ "format": "uint8",+ "minimum": 0.0+ }+ },+ "workspace_id": {+ "type": "integer",+ "format": "uint64",+ "minimum": 0.0+ }+ }+ }+ }+}diff --git a/packages/data-center/src/provider/tauri-ipc/ipc/types/blob.ts b/packages/data-center/src/provider/tauri-ipc/ipc/types/blob.tsnew file mode 100644index 0000000000..388d1611dd--- /dev/null+++ b/packages/data-center/src/provider/tauri-ipc/ipc/types/blob.ts@@ -0,0 +1,25 @@+/* tslint:disable */+/**+ * This file was automatically generated by json-schema-to-typescript.+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,+ * and run json-schema-to-typescript to regenerate this file.+ */++export type IBlobParameters =+ | {+ Put: PutBlob;+ }+ | {+ Get: GetBlob;+ };++export interface PutBlob {+ blob: number[];+ workspace_id: number;+ [k: string]: unknown;+}+export interface GetBlob {+ id: string;+ workspace_id: number;+ [k: string]: unknown;+}diff --git a/packages/data-center/src/provider/tauri-ipc/ipc/types/document.json b/packages/data-center/src/provider/tauri-ipc/ipc/types/document.jsonnew file mode 100644index 0000000000..a5c2f8f122--- /dev/null+++ b/packages/data-center/src/provider/tauri-ipc/ipc/types/document.json@@ -0,0 +1,19 @@+{+ "$schema": "http://json-schema.org/draft-07/schema#",+ "title": "YDocumentUpdate",+ "type": "object",+ "required": ["room", "update"],+ "properties": {+ "room": {+ "type": "string"+ },+ "update": {+ "type": "array",+ "items": {+ "type": "integer",+ "format": "uint8",+ "minimum": 0.0+ }+ }+ }+}diff --git a/packages/data-center/src/provider/tauri-ipc/ipc/types/document.ts b/packages/data-center/src/provider/tauri-ipc/ipc/types/document.tsnew file mode 100644index 0000000000..fd6dd91608--- /dev/null+++ b/packages/data-center/src/provider/tauri-ipc/ipc/types/document.ts@@ -0,0 +1,12 @@+/* tslint:disable */+/**+ * This file was automatically generated by json-schema-to-typescript.+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,+ * and run json-schema-to-typescript to regenerate this file.+ */++export interface YDocumentUpdate {+ room: string;+ update: number[];+ [k: string]: unknown;+}diff --git a/packages/data-center/src/provider/tauri-ipc/ipc/types/workspace.json b/packages/data-center/src/provider/tauri-ipc/ipc/types/workspace.jsonnew file mode 100644index 0000000000..e73b360e07--- /dev/null+++ b/packages/data-center/src/provider/tauri-ipc/ipc/types/workspace.json@@ -0,0 +1,18 @@+{+ "$schema": "http://json-schema.org/draft-07/schema#",+ "title": "CreateWorkspace",+ "type": "object",+ "required": ["avatar", "id", "name"],+ "properties": {+ "avatar": {+ "type": "string"+ },+ "id": {+ "type": "integer",+ "format": "int64"+ },+ "name": {+ "type": "string"+ }+ }+}diff --git a/packages/data-center/src/provider/tauri-ipc/ipc/types/workspace.ts b/packages/data-center/src/provider/tauri-ipc/ipc/types/workspace.tsnew file mode 100644index 0000000000..cf60dcbd54--- /dev/null+++ b/packages/data-center/src/provider/tauri-ipc/ipc/types/workspace.ts@@ -0,0 +1,13 @@+/* tslint:disable */+/**+ * This file was automatically generated by json-schema-to-typescript.+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,+ * and run json-schema-to-typescript to regenerate this file.+ */++export interface CreateWorkspace {+ avatar: string;+ id: number;+ name: string;+ [k: string]: unknown;+}