diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2021-11-11 22:49:16 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2021-11-11 22:49:16 +0900 |
| commit | 43d9149c8a79b39c89495f3a110e2f3d99293c5b (patch) | |
| tree | 3f3af0e2b5dac2d1000aeef49f9d8dfe7dc36320 | |
| parent | 0.0.9 (diff) | |
| download | misskey-43d9149c8a79b39c89495f3a110e2f3d99293c5b.tar.gz misskey-43d9149c8a79b39c89495f3a110e2f3d99293c5b.tar.bz2 misskey-43d9149c8a79b39c89495f3a110e2f3d99293c5b.zip | |
add consts
| -rw-r--r-- | CHANGELOG.md | 3 | ||||
| -rw-r--r-- | etc/misskey-js.api.md | 12 | ||||
| -rw-r--r-- | src/consts.ts (renamed from src/permissions.ts) | 8 | ||||
| -rw-r--r-- | src/index.ts | 9 |
4 files changed, 30 insertions, 2 deletions
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 @@ -2047,6 +2047,9 @@ type FetchLike = (input: string, init?: { }>; // @public (undocumented) +export const ffVisibility: readonly ["public", "followers", "private"]; + +// @public (undocumented) type Following = { id: ID; createdAt: DateString; @@ -2178,6 +2181,9 @@ type MessagingMessage = { }; // @public (undocumented) +export const mutedNoteReasons: readonly ["word", "manual", "spam", "other"]; + +// @public (undocumented) type Note = { id: ID; createdAt: DateString; @@ -2233,6 +2239,9 @@ type NoteReaction = { }; // @public (undocumented) +export const noteVisibilities: readonly ["public", "home", "followers", "specified"]; + +// @public (undocumented) type Notification_2 = { id: ID; createdAt: DateString; @@ -2293,6 +2302,9 @@ type Notification_2 = { }); // @public (undocumented) +export const notificationTypes: readonly ["follow", "mention", "reply", "renote", "quote", "reaction", "pollVote", "receiveFollowRequest", "followRequestAccepted", "groupInvited", "app"]; + +// @public (undocumented) type OriginType = 'combined' | 'local' | 'remote'; // @public (undocumented) diff --git a/src/permissions.ts b/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'; |