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

View File

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

File diff suppressed because it is too large Load Diff