diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c8fe7687e..013332ee91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# 0.0.10 +- add consts + # 0.0.9 - add list of api permission - Update Note type diff --git a/etc/misskey-js.api.md b/etc/misskey-js.api.md index 79a27d12cc..72b9dcf92b 100644 --- a/etc/misskey-js.api.md +++ b/etc/misskey-js.api.md @@ -2046,6 +2046,9 @@ type FetchLike = (input: string, init?: { json(): Promise; }>; +// @public (undocumented) +export const ffVisibility: readonly ["public", "followers", "private"]; + // @public (undocumented) type Following = { id: ID; @@ -2177,6 +2180,9 @@ type MessagingMessage = { groupId: UserGroup['id'] | null; }; +// @public (undocumented) +export const mutedNoteReasons: readonly ["word", "manual", "spam", "other"]; + // @public (undocumented) type Note = { id: ID; @@ -2232,6 +2238,9 @@ type NoteReaction = { type: string; }; +// @public (undocumented) +export const noteVisibilities: readonly ["public", "home", "followers", "specified"]; + // @public (undocumented) type Notification_2 = { id: ID; @@ -2292,6 +2301,9 @@ type Notification_2 = { icon?: string | null; }); +// @public (undocumented) +export const notificationTypes: readonly ["follow", "mention", "reply", "renote", "quote", "reaction", "pollVote", "receiveFollowRequest", "followRequestAccepted", "groupInvited", "app"]; + // @public (undocumented) type OriginType = 'combined' | 'local' | 'remote'; diff --git a/src/permissions.ts b/src/consts.ts similarity index 59% rename from src/permissions.ts rename to src/consts.ts index c7e4b9e5d0..ac2053b174 100644 --- a/src/permissions.ts +++ b/src/consts.ts @@ -1,3 +1,11 @@ +export const notificationTypes = ['follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote', 'receiveFollowRequest', 'followRequestAccepted', 'groupInvited', 'app'] as const; + +export const noteVisibilities = ['public', 'home', 'followers', 'specified'] as const; + +export const mutedNoteReasons = ['word', 'manual', 'spam', 'other'] as const; + +export const ffVisibility = ['public', 'followers', 'private'] as const; + export const permissions = [ 'read:account', 'write:account', diff --git a/src/index.ts b/src/index.ts index 13f2323132..60748ebe0b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,15 +1,20 @@ import { Endpoints } from './api.types'; import Stream from './streaming'; import { Acct } from './acct'; -import { permissions } from './permissions'; +import * as consts from './consts'; export { Endpoints, Stream, Acct, - permissions, }; +export const permissions = consts.permissions; +export const notificationTypes = consts.notificationTypes; +export const noteVisibilities = consts.noteVisibilities; +export const mutedNoteReasons = consts.mutedNoteReasons; +export const ffVisibility = consts.ffVisibility; + // api extractor not supported yet //export * as api from './api'; //export * as entities from './entities';