Skip to content

Commit

Permalink
feat: support permalink in create/update note
Browse files Browse the repository at this point in the history
  • Loading branch information
Yukaii committed Aug 22, 2022
1 parent 2063504 commit ae317b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions nodejs/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export default class API {
await this.axios.patch<AxiosResponse>(`notes/${noteId}`, { content })
}

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

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

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

Expand Down
3 changes: 2 additions & 1 deletion nodejs/src/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ export type CreateNoteOptions = {
content?: string
readPermission?: NotePermissionRole,
writePermission?: NotePermissionRole,
commentPermission?: CommentPermissionType
commentPermission?: CommentPermissionType,
permalink?: string
}

export type Team = {
Expand Down

0 comments on commit ae317b7

Please sign in to comment.