`/api/notes/` -> `/api/notes/schedule/`

This commit is contained in:
kakkokari-gtyih 2023-11-09 19:12:49 +09:00
parent 8a735c23e7
commit 4406af58f1
10 changed files with 42 additions and 19 deletions

View File

@ -263,10 +263,10 @@ import * as ep___notes_children from './endpoints/notes/children.js';
import * as ep___notes_clips from './endpoints/notes/clips.js';
import * as ep___notes_conversation from './endpoints/notes/conversation.js';
import * as ep___notes_create from './endpoints/notes/create.js';
import * as ep___notes_schedule_create from './endpoints/notes/create-schedule.js';
import * as ep___notes_schedule_list from './endpoints/notes/list-schedule.js';
import * as ep___notes_schedule_create from './endpoints/notes/schedule/create.js';
import * as ep___notes_schedule_delete from './endpoints/notes/schedule/delete.js';
import * as ep___notes_schedule_list from './endpoints/notes/schedule/list.js';
import * as ep___notes_delete from './endpoints/notes/delete.js';
import * as ep___notes_schedule_delete from './endpoints/notes/delete-schedule.js';
import * as ep___notes_favorites_create from './endpoints/notes/favorites/create.js';
import * as ep___notes_favorites_delete from './endpoints/notes/favorites/delete.js';
import * as ep___notes_featured from './endpoints/notes/featured.js';
@ -624,10 +624,10 @@ const $notes_children: Provider = { provide: 'ep:notes/children', useClass: ep__
const $notes_clips: Provider = { provide: 'ep:notes/clips', useClass: ep___notes_clips.default };
const $notes_conversation: Provider = { provide: 'ep:notes/conversation', useClass: ep___notes_conversation.default };
const $notes_create: Provider = { provide: 'ep:notes/create', useClass: ep___notes_create.default };
const $notes_schedule_create: Provider = { provide: 'ep:notes/create-schedule', useClass: ep___notes_schedule_create.default };
const $notes_schedule_list: Provider = { provide: 'ep:notes/list-schedule', useClass: ep___notes_schedule_list.default };
const $notes_schedule_create: Provider = { provide: 'ep:notes/schedule/create', useClass: ep___notes_schedule_create.default };
const $notes_schedule_delete: Provider = { provide: 'ep:notes/schedule/delete', useClass: ep___notes_schedule_delete.default };
const $notes_schedule_list: Provider = { provide: 'ep:notes/schedule/list', useClass: ep___notes_schedule_list.default };
const $notes_delete: Provider = { provide: 'ep:notes/delete', useClass: ep___notes_delete.default };
const $notes_schedule_delete: Provider = { provide: 'ep:notes/delete-schedule', useClass: ep___notes_schedule_delete.default };
const $notes_favorites_create: Provider = { provide: 'ep:notes/favorites/create', useClass: ep___notes_favorites_create.default };
const $notes_favorites_delete: Provider = { provide: 'ep:notes/favorites/delete', useClass: ep___notes_favorites_delete.default };
const $notes_featured: Provider = { provide: 'ep:notes/featured', useClass: ep___notes_featured.default };
@ -990,9 +990,9 @@ const $retention: Provider = { provide: 'ep:retention', useClass: ep___retention
$notes_conversation,
$notes_create,
$notes_schedule_create,
$notes_schedule_delete,
$notes_schedule_list,
$notes_delete,
$notes_schedule_delete,
$notes_favorites_create,
$notes_favorites_delete,
$notes_featured,
@ -1349,9 +1349,9 @@ const $retention: Provider = { provide: 'ep:retention', useClass: ep___retention
$notes_conversation,
$notes_create,
$notes_schedule_create,
$notes_schedule_delete,
$notes_schedule_list,
$notes_delete,
$notes_schedule_delete,
$notes_favorites_create,
$notes_favorites_delete,
$notes_featured,

View File

@ -263,10 +263,10 @@ import * as ep___notes_children from './endpoints/notes/children.js';
import * as ep___notes_clips from './endpoints/notes/clips.js';
import * as ep___notes_conversation from './endpoints/notes/conversation.js';
import * as ep___notes_create from './endpoints/notes/create.js';
import * as ep___notes_schedule_create from './endpoints/notes/create-schedule.js';
import * as ep___notes_schedule_list from './endpoints/notes/list-schedule.js';
import * as ep___notes_schedule_create from './endpoints/notes/schedule/create.js';
import * as ep___notes_schedule_delete from './endpoints/notes/schedule/delete.js';
import * as ep___notes_schedule_list from './endpoints/notes/schedule/list.js';
import * as ep___notes_delete from './endpoints/notes/delete.js';
import * as ep___notes_schedule_delete from './endpoints/notes/delete-schedule.js';
import * as ep___notes_favorites_create from './endpoints/notes/favorites/create.js';
import * as ep___notes_favorites_delete from './endpoints/notes/favorites/delete.js';
import * as ep___notes_featured from './endpoints/notes/featured.js';
@ -622,10 +622,10 @@ const eps = [
['notes/clips', ep___notes_clips],
['notes/conversation', ep___notes_conversation],
['notes/create', ep___notes_create],
['notes/create-schedule', ep___notes_schedule_create],
['notes/list-schedule', ep___notes_schedule_list],
['notes/schedule/create', ep___notes_schedule_create],
['notes/schedule/delete', ep___notes_schedule_delete],
['notes/schedule/list', ep___notes_schedule_list],
['notes/delete', ep___notes_delete],
['notes/delete-schedule', ep___notes_schedule_delete],
['notes/favorites/create', ep___notes_favorites_create],
['notes/favorites/delete', ep___notes_favorites_delete],
['notes/featured', ep___notes_featured],

View File

@ -27,7 +27,7 @@ import { isPureRenote } from '@/misc/is-pure-renote.js';
import { QueueService } from '@/core/QueueService.js';
import { MiNoteSchedule } from '@/models/_.js';
import { IdService } from '@/core/IdService.js';
import { ApiError } from '../../error.js';
import { ApiError } from '../../../error.js';
export const meta = {
tags: ['notes'],

View File

@ -40,7 +40,7 @@ const props = defineProps<{
}>();
async function deleteScheduleNote() {
await os.apiWithDialog('notes/delete-schedule', { noteId: props.note.id })
await os.apiWithDialog('notes/schedule/delete', { noteId: props.note.id })
.then(() => {
isDeleted.value = true;
});

View File

@ -786,7 +786,7 @@ async function post(ev?: MouseEvent) {
}
posting = true;
os.api(postData.schedule ? 'notes/create-schedule' : 'notes/create', postData, token).then(() => {
os.api(postData.schedule ? 'notes/schedule/create' : 'notes/create', postData, token).then(() => {
if (props.freezeAfterPosted) {
posted = true;
} else {

View File

@ -41,7 +41,7 @@ const cancel = () => {
};
onMounted(async () => {
notes.value = await os.api('notes/list-schedule');
notes.value = await os.api('notes/schedule/list');
});
</script>

View File

@ -1759,6 +1759,26 @@ export type Endpoints = {
};
res: null;
};
'notes/schedule/create': {
req: Partial<Note> & {
schedule: {
expiresAt: number;
};
};
res: {
createdNote: Note;
};
};
'notes/schedule/delete': {
req: {
noteId: Note['id'];
};
res: null;
};
'notes/schedule/list': {
req: TODO;
res: Note[];
};
'notes/favorites/create': {
req: {
noteId: Note['id'];
@ -3035,7 +3055,7 @@ type UserSorting = '+follower' | '-follower' | '+createdAt' | '-createdAt' | '+u
//
// src/api.types.ts:16:32 - (ae-forgotten-export) The symbol "TODO" needs to be exported by the entry point index.d.ts
// src/api.types.ts:18:25 - (ae-forgotten-export) The symbol "NoParams" needs to be exported by the entry point index.d.ts
// src/api.types.ts:632:18 - (ae-forgotten-export) The symbol "ShowUserReq" needs to be exported by the entry point index.d.ts
// src/api.types.ts:635:18 - (ae-forgotten-export) The symbol "ShowUserReq" needs to be exported by the entry point index.d.ts
// src/entities.ts:116:2 - (ae-forgotten-export) The symbol "notificationTypes_2" needs to be exported by the entry point index.d.ts
// src/entities.ts:627:2 - (ae-forgotten-export) The symbol "ModerationLogPayloads" needs to be exported by the entry point index.d.ts
// src/streaming.types.ts:33:4 - (ae-forgotten-export) The symbol "FIXME" needs to be exported by the entry point index.d.ts

View File

@ -509,6 +509,9 @@ export type Endpoints = {
};
}; res: { createdNote: Note }; };
'notes/delete': { req: { noteId: Note['id']; }; res: null; };
'notes/schedule/create': { req: Partial<Note> & { schedule: { expiresAt: number; } }; res: { createdNote: Note }; };
'notes/schedule/delete': { req: { noteId: Note['id']; }; res: null; };
'notes/schedule/list': { req: TODO; res: Note[]; };
'notes/favorites/create': { req: { noteId: Note['id']; }; res: null; };
'notes/favorites/delete': { req: { noteId: Note['id']; }; res: null; };
'notes/featured': { req: TODO; res: Note[]; };