server: add v2 routes to notes endpoints

This commit is contained in:
Johann150 2022-12-13 18:36:54 +01:00
parent 0d15b74193
commit 94182876c6
Signed by untrusted user: Johann150
GPG key ID: 9EE6577A2A06F8F1
13 changed files with 64 additions and 0 deletions

View file

@ -21,6 +21,11 @@ export const meta = {
ref: 'Note',
},
},
v2: {
method: 'get',
alias: 'notes/:noteId/children',
},
} as const;
export const paramDef = {

View file

@ -19,6 +19,11 @@ export const meta = {
},
},
v2: {
method: 'get',
alias: 'notes/:noteId/clips',
},
errors: ['NO_SUCH_NOTE'],
} as const;

View file

@ -19,6 +19,11 @@ export const meta = {
},
},
v2: {
method: 'get',
alias: 'notes/:noteId/conversation',
},
errors: ['NO_SUCH_NOTE'],
} as const;

View file

@ -37,6 +37,11 @@ export const meta = {
},
},
v2: {
method: 'post',
alias: 'notes',
},
errors: ['NO_SUCH_NOTE', 'PURE_RENOTE', 'EXPIRED_POLL', 'NO_SUCH_CHANNEL', 'BLOCKED', 'LESS_RESTRICTIVE_VISIBILITY'],
} as const;

View file

@ -18,6 +18,11 @@ export const meta = {
minInterval: SECOND,
},
v2: {
method: 'delete',
alias: 'notes/:noteId',
},
errors: ['ACCESS_DENIED', 'NO_SUCH_NOTE'],
} as const;

View file

@ -18,6 +18,10 @@ export const meta = {
ref: 'Note',
},
},
v2: {
method: 'get',
}
} as const;
export const paramDef = {

View file

@ -23,6 +23,11 @@ export const meta = {
},
},
v2: {
method: 'get',
alias: 'notes/:noteId/reactions/:type?',
},
errors: ['NO_SUCH_NOTE'],
} as const;

View file

@ -22,6 +22,11 @@ export const meta = {
},
},
v2: {
method: 'get',
alias: 'notes/:noteId/renotes',
},
errors: ['NO_SUCH_NOTE'],
} as const;

View file

@ -21,6 +21,11 @@ export const meta = {
},
},
v2: {
method: 'get',
alias: 'notes/:noteId/replies',
},
errors: ['NO_SUCH_NOTE'],
} as const;

View file

@ -14,6 +14,11 @@ export const meta = {
ref: 'Note',
},
v2: {
method: 'get',
alias: 'notes/:noteId',
},
errors: ['NO_SUCH_NOTE'],
} as const;

View file

@ -27,6 +27,11 @@ export const meta = {
},
},
v2: {
method: 'get',
alias: 'notes/:noteId/status',
},
errors: ['NO_SUCH_NOTE'],
} as const;

View file

@ -56,6 +56,11 @@ export const meta = {
},
},
v2: {
method: 'get',
alias: 'notes/:noteId/translate/:targetLang/:sourceLang?',
},
errors: ['NO_SUCH_NOTE'],
} as const;

View file

@ -18,6 +18,11 @@ export const meta = {
minInterval: SECOND,
},
v2: {
method: 'delete',
alias: 'notes/:noteId/renotes',
},
errors: ['NO_SUCH_NOTE'],
} as const;