Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
5 changes: 3 additions & 2 deletions 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 Expand Up @@ -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 & {
Expand Down