Skip to content

Commit b00e203

Browse files
authored
Merge pull request #23 from hackmdio/release/2.2.0
Release 2.2.0
2 parents f1625aa + 9c682e6 commit b00e203

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

nodejs/package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nodejs/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@hackmd/api",
3-
"version": "2.1.0",
3+
"version": "2.2.0",
44
"description": "HackMD Node.js API Client",
55
"main": "dist/index.js",
66
"declaration": "./dist/index.d.ts",

nodejs/src/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export default class API {
8282
await this.axios.patch<AxiosResponse>(`notes/${noteId}`, { content })
8383
}
8484

85-
async updateNote (noteId: string, options: Pick<SingleNote, 'content' | 'readPermission' | 'writePermission'>): Promise<AxiosResponse> {
85+
async updateNote (noteId: string, options: Pick<SingleNote, 'content' | 'readPermission' | 'writePermission' | 'permalink'>): Promise<AxiosResponse> {
8686
return await this.axios.patch<AxiosResponse>(`notes/${noteId}`, options)
8787
}
8888

@@ -109,7 +109,7 @@ export default class API {
109109
await this.axios.patch<AxiosResponse>(`teams/${teamPath}/notes/${noteId}`, { content })
110110
}
111111

112-
async updateTeamNote (teamPath: string, noteId: string, options: Pick<SingleNote, 'content' | 'readPermission' | 'writePermission'>): Promise<AxiosResponse> {
112+
async updateTeamNote (teamPath: string, noteId: string, options: Pick<SingleNote, 'content' | 'readPermission' | 'writePermission' | 'permalink'>): Promise<AxiosResponse> {
113113
return await this.axios.patch<AxiosResponse>(`teams/${teamPath}/notes/${noteId}`, options)
114114
}
115115

nodejs/src/type.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ export type CreateNoteOptions = {
2323
content?: string
2424
readPermission?: NotePermissionRole,
2525
writePermission?: NotePermissionRole,
26-
commentPermission?: CommentPermissionType
26+
commentPermission?: CommentPermissionType,
27+
permalink?: string
2728
}
2829

2930
export type Team = {
@@ -74,10 +75,10 @@ export type Note = {
7475
teamPath: string | null
7576
permalink: string | null
7677
shortId: string
78+
publishLink: string
7779

7880
readPermission: NotePermissionRole
7981
writePermission: NotePermissionRole
80-
8182
}
8283

8384
export type SingleNote = Note & {

0 commit comments

Comments
 (0)