diff --git a/nodejs/package-lock.json b/nodejs/package-lock.json index 4521dd4..558eaaa 100644 --- a/nodejs/package-lock.json +++ b/nodejs/package-lock.json @@ -1,12 +1,12 @@ { "name": "@hackmd/api", - "version": "2.1.0", + "version": "2.2.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@hackmd/api", - "version": "2.1.0", + "version": "2.2.0", "license": "MIT", "dependencies": { "axios": "^0.25.0", diff --git a/nodejs/package.json b/nodejs/package.json index bfcf203..946c850 100644 --- a/nodejs/package.json +++ b/nodejs/package.json @@ -1,6 +1,6 @@ { "name": "@hackmd/api", - "version": "2.1.0", + "version": "2.2.0", "description": "HackMD Node.js API Client", "main": "dist/index.js", "declaration": "./dist/index.d.ts", diff --git a/nodejs/src/index.ts b/nodejs/src/index.ts index 421767c..5715e55 100644 --- a/nodejs/src/index.ts +++ b/nodejs/src/index.ts @@ -82,7 +82,7 @@ export default class API { await this.axios.patch(`notes/${noteId}`, { content }) } - async updateNote (noteId: string, options: Pick): Promise { + async updateNote (noteId: string, options: Pick): Promise { return await this.axios.patch(`notes/${noteId}`, options) } @@ -109,7 +109,7 @@ export default class API { await this.axios.patch(`teams/${teamPath}/notes/${noteId}`, { content }) } - async updateTeamNote (teamPath: string, noteId: string, options: Pick): Promise { + async updateTeamNote (teamPath: string, noteId: string, options: Pick): Promise { return await this.axios.patch(`teams/${teamPath}/notes/${noteId}`, options) } diff --git a/nodejs/src/type.ts b/nodejs/src/type.ts index 8d148be..766b292 100644 --- a/nodejs/src/type.ts +++ b/nodejs/src/type.ts @@ -23,7 +23,8 @@ export type CreateNoteOptions = { content?: string readPermission?: NotePermissionRole, writePermission?: NotePermissionRole, - commentPermission?: CommentPermissionType + commentPermission?: CommentPermissionType, + permalink?: string } export type Team = { @@ -74,10 +75,10 @@ export type Note = { teamPath: string | null permalink: string | null shortId: string + publishLink: string readPermission: NotePermissionRole writePermission: NotePermissionRole - } export type SingleNote = Note & {