Skip to content

Commit 465079a

Browse files
authored
Merge pull request #22 from hackmdio/feature/api-update
API Update
2 parents 2063504 + d48356d commit 465079a

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

nodejs/src/index.ts

Lines changed: 2 additions & 2 deletions
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

Lines changed: 3 additions & 2 deletions
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)