mirror of
https://github.com/penxio/penx.git
synced 2026-04-19 03:03:06 -04:00
feat: init sdk pkg
This commit is contained in:
24
packages/sdk/package.json
Normal file
24
packages/sdk/package.json
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"name": "@penx/sdk",
|
||||
"version": "0.0.0",
|
||||
"main": "./src/index.ts",
|
||||
"types": "./src/index.ts",
|
||||
"scripts": {
|
||||
"lint": "eslint \"**/*.ts*\""
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^18.2.22",
|
||||
"@types/react-dom": "^18.2.7",
|
||||
"eslint": "^8.42.0",
|
||||
"eslint-config-custom": "workspace:*",
|
||||
"react": "^18.2.0",
|
||||
"tsconfig": "workspace:*",
|
||||
"typescript": "^5.1.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@penx/local-db": "workspace:*",
|
||||
"@penx/types": "workspace:*",
|
||||
"@penx/constants": "workspace:*",
|
||||
"@penx/model": "workspace:*"
|
||||
}
|
||||
}
|
||||
13
packages/sdk/src/client.ts
Normal file
13
packages/sdk/src/client.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { Inbox } from './inbox'
|
||||
|
||||
interface Options {
|
||||
spaceId: string
|
||||
}
|
||||
|
||||
export class Client {
|
||||
inbox: Inbox
|
||||
|
||||
constructor(options: Options) {
|
||||
this.inbox = new Inbox(this)
|
||||
}
|
||||
}
|
||||
13
packages/sdk/src/inbox.ts
Normal file
13
packages/sdk/src/inbox.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import type { Client } from './client'
|
||||
|
||||
export class Inbox {
|
||||
constructor(client: Client) {}
|
||||
|
||||
addMarkdown(text: string) {
|
||||
//
|
||||
}
|
||||
|
||||
addTextNode(text: string) {
|
||||
//
|
||||
}
|
||||
}
|
||||
1
packages/sdk/src/index.ts
Normal file
1
packages/sdk/src/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from './client'
|
||||
8
packages/sdk/tsconfig.json
Normal file
8
packages/sdk/tsconfig.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"extends": "tsconfig/react-library.json",
|
||||
"compilerOptions": {
|
||||
"lib": ["ESNext", "DOM"]
|
||||
},
|
||||
"include": ["."],
|
||||
"exclude": ["dist", "build", "node_modules"]
|
||||
}
|
||||
Reference in New Issue
Block a user