moderator-toolbox-nxg-for-reddit / modules/shared/modnotes/schema
modules/shared/modnotes/schema¶
Interfaces¶
ModNote¶
Defined in: extension/data/modules/shared/modnotes/schema.ts:81
A single mod note as returned by the Reddit API.
Properties¶
created_at¶
created_at:
number
Defined in: extension/data/modules/shared/modnotes/schema.ts:83
description¶
description:
string|null
Defined in: extension/data/modules/shared/modnotes/schema.ts:89
details¶
details:
string|null
Defined in: extension/data/modules/shared/modnotes/schema.ts:90
id¶
id:
string
Defined in: extension/data/modules/shared/modnotes/schema.ts:82
label¶
label:
string|null
Defined in: extension/data/modules/shared/modnotes/schema.ts:88
mod_action_data¶
mod_action_data:
ModNoteModActionData|null
Defined in: extension/data/modules/shared/modnotes/schema.ts:92
operator¶
operator:
string
Defined in: extension/data/modules/shared/modnotes/schema.ts:85
subreddit¶
subreddit:
string
Defined in: extension/data/modules/shared/modnotes/schema.ts:86
type¶
type:
string
Defined in: extension/data/modules/shared/modnotes/schema.ts:84
user¶
user:
string
Defined in: extension/data/modules/shared/modnotes/schema.ts:87
user_note_data¶
user_note_data:
ModNoteUserNoteData|null
Defined in: extension/data/modules/shared/modnotes/schema.ts:91
ModNoteModActionData¶
Defined in: extension/data/modules/shared/modnotes/schema.ts:71
Mod-action-specific fields on a mod note.
Properties¶
action¶
action:
string
Defined in: extension/data/modules/shared/modnotes/schema.ts:73
The mod action taken (e.g. 'removelink').
description¶
description:
string|null
Defined in: extension/data/modules/shared/modnotes/schema.ts:75
details¶
details:
string|null
Defined in: extension/data/modules/shared/modnotes/schema.ts:74
reddit_id¶
reddit_id:
string|null
Defined in: extension/data/modules/shared/modnotes/schema.ts:77
Fullname of the Reddit item the action was taken on, or null.
ModNoteUserNoteData¶
Defined in: extension/data/modules/shared/modnotes/schema.ts:61
User-note-specific fields on a mod note.
Properties¶
label¶
label:
string|null
Defined in: extension/data/modules/shared/modnotes/schema.ts:65
Label type string (e.g. 'BAN'), or null.
note¶
note:
string
Defined in: extension/data/modules/shared/modnotes/schema.ts:63
Free-text note body.
reddit_id¶
reddit_id:
string|null
Defined in: extension/data/modules/shared/modnotes/schema.ts:67
Fullname of the Reddit item this note is attached to, or null.
PendingNoteRequest¶
Defined in: extension/data/modules/shared/modnotes/schema.ts:96
An in-flight batch request for a user’s latest mod note, held in the deferred queue.
Properties¶
reject¶
reject: (
reason?) =>void
Defined in: extension/data/modules/shared/modnotes/schema.ts:101
Parameters¶
reason?¶
unknown
Returns¶
void
resolve¶
resolve: (
value) =>void
Defined in: extension/data/modules/shared/modnotes/schema.ts:100
Resolves the promise with the fetched note or null when none exists.
Parameters¶
value¶
ModNote | null
Returns¶
void
subreddit¶
subreddit:
string
Defined in: extension/data/modules/shared/modnotes/schema.ts:97
user¶
user:
string
Defined in: extension/data/modules/shared/modnotes/schema.ts:98
Variables¶
defaultNoteLabelValueToLabelType¶
constdefaultNoteLabelValueToLabelType:Record<string,string|undefined>
Defined in: extension/data/modules/shared/modnotes/schema.ts:48
Maps defaultNoteLabel setting values to API label type strings.
labelColors¶
constlabelColors:Record<string,string>
Defined in: extension/data/modules/shared/modnotes/schema.ts:17
Maps label type strings to CSS color values for display.
labelNames¶
constlabelNames:Record<string,string>
Defined in: extension/data/modules/shared/modnotes/schema.ts:30
Maps label type strings to human-readable display names.
selectableLabelNames¶
constselectableLabelNames:Record<string,string>
Defined in: extension/data/modules/shared/modnotes/schema.ts:43
Like labelNames but with the auto-generated USER_SUMMARY label excluded (not user-selectable).
typeNames¶
consttypeNames:Record<string,string>
Defined in: extension/data/modules/shared/modnotes/schema.ts:4
Maps API note type strings to human-readable display names.