Compare commits

..

4 Commits

Author SHA1 Message Date
1Step621 8d0021d6bb
Merge 12a0e1e433 into fe38115883 2025-10-06 22:03:30 +09:00
syuilo fe38115883 lint 2025-10-06 20:01:19 +09:00
syuilo 6fba73ca13 Update pnpm-lock.yaml 2025-10-06 19:21:21 +09:00
syuilo 0d33e1f839 fix notes\drafts\create param defs 2025-10-06 19:21:17 +09:00
3 changed files with 234 additions and 678 deletions

View File

@ -192,7 +192,7 @@ export const paramDef = {
scheduledAt: { type: 'integer', nullable: true }, scheduledAt: { type: 'integer', nullable: true },
isActuallyScheduled: { type: 'boolean', default: false }, isActuallyScheduled: { type: 'boolean', default: false },
}, },
required: ['visibility', 'visibleUserIds', 'cw', 'hashtag', 'localOnly', 'reactionAcceptance', 'replyId', 'renoteId', 'channelId', 'text', 'fileIds', 'poll', 'scheduledAt', 'isActuallyScheduled'], required: [],
} as const; } as const;
@Injectable() @Injectable()
@ -203,22 +203,22 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const draft = await this.noteDraftService.create(me, { const draft = await this.noteDraftService.create(me, {
fileIds: ps.fileIds, fileIds: ps.fileIds ?? [],
pollChoices: ps.poll?.choices ?? [], pollChoices: ps.poll?.choices ?? [],
pollMultiple: ps.poll?.multiple ?? false, pollMultiple: ps.poll?.multiple ?? false,
pollExpiresAt: ps.poll?.expiresAt ? new Date(ps.poll.expiresAt) : null, pollExpiresAt: ps.poll?.expiresAt ? new Date(ps.poll.expiresAt) : null,
pollExpiredAfter: ps.poll?.expiredAfter ?? null, pollExpiredAfter: ps.poll?.expiredAfter ?? null,
hasPoll: ps.poll != null, hasPoll: ps.poll != null,
text: ps.text, text: ps.text ?? null,
replyId: ps.replyId, replyId: ps.replyId ?? null,
renoteId: ps.renoteId, renoteId: ps.renoteId ?? null,
cw: ps.cw, cw: ps.cw ?? null,
hashtag: ps.hashtag, hashtag: ps.hashtag ?? null,
localOnly: ps.localOnly, localOnly: ps.localOnly,
reactionAcceptance: ps.reactionAcceptance, reactionAcceptance: ps.reactionAcceptance,
visibility: ps.visibility, visibility: ps.visibility,
visibleUserIds: ps.visibleUserIds, visibleUserIds: ps.visibleUserIds ?? [],
channelId: ps.channelId, channelId: ps.channelId ?? null,
scheduledAt: ps.scheduledAt ? new Date(ps.scheduledAt) : null, scheduledAt: ps.scheduledAt ? new Date(ps.scheduledAt) : null,
isActuallyScheduled: ps.isActuallyScheduled, isActuallyScheduled: ps.isActuallyScheduled,
}).catch((err) => { }).catch((err) => {

View File

@ -29205,34 +29205,34 @@ export interface operations {
* @default public * @default public
* @enum {string} * @enum {string}
*/ */
visibility: 'public' | 'home' | 'followers' | 'specified'; visibility?: 'public' | 'home' | 'followers' | 'specified';
visibleUserIds: string[]; visibleUserIds?: string[];
cw: string | null; cw?: string | null;
hashtag: string | null; hashtag?: string | null;
/** @default false */ /** @default false */
localOnly: boolean; localOnly?: boolean;
/** /**
* @default null * @default null
* @enum {string|null} * @enum {string|null}
*/ */
reactionAcceptance: null | 'likeOnly' | 'likeOnlyForRemote' | 'nonSensitiveOnly' | 'nonSensitiveOnlyForLocalLikeOnlyForRemote'; reactionAcceptance?: null | 'likeOnly' | 'likeOnlyForRemote' | 'nonSensitiveOnly' | 'nonSensitiveOnlyForLocalLikeOnlyForRemote';
/** Format: misskey:id */ /** Format: misskey:id */
replyId: string | null; replyId?: string | null;
/** Format: misskey:id */ /** Format: misskey:id */
renoteId: string | null; renoteId?: string | null;
/** Format: misskey:id */ /** Format: misskey:id */
channelId: string | null; channelId?: string | null;
text: string | null; text?: string | null;
fileIds: string[]; fileIds?: string[];
poll: { poll?: {
choices: string[]; choices: string[];
multiple?: boolean; multiple?: boolean;
expiresAt?: number | null; expiresAt?: number | null;
expiredAfter?: number | null; expiredAfter?: number | null;
} | null; } | null;
scheduledAt: number | null; scheduledAt?: number | null;
/** @default false */ /** @default false */
isActuallyScheduled: boolean; isActuallyScheduled?: boolean;
}; };
}; };
}; };

File diff suppressed because it is too large Load Diff