FastComments.com

ืžืžืฉืง ื”-API ืฉืœ FastComments

FastComments ืžืกืคืงืช ืžืžืฉืง API ืœืื™ื ื˜ืจืืงืฆื™ื” ืขื ืžืฉืื‘ื™ื ืจื‘ื™ื. ืฆืจื• ืื™ื ื˜ื’ืจืฆื™ื•ืช ืขื ื”ืคืœื˜ืคื•ืจืžื” ืฉืœื ื•, ืื• ืืคื™ืœื• ืฆืจื• ืœืงื•ื—ื•ืช ืžืฉืœื›ื!

ื‘ืชื™ืขื•ื“ ื–ื” ืชืžืฆืื• ืืช ื›ืœ ื”ืžืฉืื‘ื™ื ื”ื ืชืžื›ื™ื ืขืœ ื™ื“ื™ ื”-API ืฉืชื•ืขื“ื• ืขื ืกื•ื’ื™ ื”ื‘ืงืฉื” ื•ื”ืชืฉื•ื‘ื” ืฉืœื”ื.

ืœืœืงื•ื—ื•ืช Enterprise, ื›ืœ ื”ื’ื™ืฉื” ืœ-API ื ืจืฉืžืช ื‘ื™ื•ืžืŸ ื‘ื™ืงื•ืจืช.

SDKs ืฉื ื•ืฆืจื•

FastComments ืžื™ื™ืฆืจืช ื›ืขืช ืžืคืจื˜ API ืžืชื•ืš ื”ืงื•ื“ ืฉืœื ื• (ื–ื” ืขื“ื™ื™ืŸ ืœื ืฉืœื, ืืš ื›ื•ืœืœ ืžืžืฉืงื™ API ืจื‘ื™ื).

ื™ืฉ ืœื ื• ื’ื SDKs ืœืฉืคื•ืช ื ืคื•ืฆื•ืช:

ืื™ืžื•ืช

ื”-API ืžืื•ืžืช ืขืœ ื™ื“ื™ ื”ืขื‘ืจืช ืžืคืชื— ื”-API ืฉืœืš ื›ื›ื•ืชืจืช X-API-KEY ืื• ื›ืคืจืžื˜ืจ ืฉืื™ืœืชื” API_KEY. ืชื–ื“ืงืงื• ื’ื ืœ-tenantId ื›ื“ื™ ืœื‘ืฆืข ืงืจื™ืื•ืช ืœ-API. ื ื™ืชืŸ ืœืงื‘ืœ ืื•ืชื• ืžืื•ืชื” ืขืžื•ื“ ืฉื‘ื• ื ืžืฆื ืžืคืชื— ื”-API ืฉืœื›ื.

ื”ืขืจืช ืื‘ื˜ื—ื”

ื ื™ืชื•ื‘ื™ื ืืœื” ืžื™ื•ืขื“ื™ื ืœื”ื™ืงืจื ืžืฉืจืช. ืืกื•ืจ ืœืงืจื•ื ืœื”ื ืžื“ืคื“ืคืŸ. ืคืขื•ืœื” ื›ื–ื• ืชื—ืฉื•ืฃ ืืช ืžืคืชื— ื”-API ืฉืœื›ื โ€” ื•ื–ื” ื™ื™ืชืŸ ื’ื™ืฉื” ืžืœืื” ืœื—ืฉื‘ื•ืŸ ืฉืœื›ื ืœื›ืœ ืžื™ ืฉื™ื›ื•ืœ ืœืฆืคื•ืช ื‘ืงื•ื“ ื”ืžืงื•ืจ ืฉืœ ื“ืฃ!

ืืคืฉืจื•ืช ืื™ืžื•ืช ืื—ืช - ื›ื•ืชืจื•ืช

  • ื›ื•ืชืจืช: X-API-KEY
  • ื›ื•ืชืจืช: X-TENANT-ID

ืืคืฉืจื•ืช ืื™ืžื•ืช ืฉื ื™ื™ื” - ืคืจืžื˜ืจื™ ืฉืื™ืœืชื”

  • ืคืจืžื˜ืจ ืฉืื™ืœืชื”: API_KEY
  • ืคืจืžื˜ืจ ืฉืื™ืœืชื”: tenantId

ืงืจื™ืื” ืฉืœ ื”ื›ืชื™ื‘ื•ืช ืฉืœืš

FastComments ืžืกืคืงืช ื–ืžื™ื ื•ืช Active-Active. ื‘ืงืฉื•ืช ืžืžืจื›ื– ื”ื ืชื•ื ื™ื ืฉืœื›ื ืžื ื•ืชื‘ื•ืช ืืœ ื ืงื•ื“ืช ื”ื ื•ื›ื—ื•ืช ื”ืงืจื•ื‘ื” ืืœื™ื›ื. ื–ื” ืื•ื˜ื•ืžื˜ื™, ื•ื‘ื“ืจืš ื›ืœืœ ืชื•ื›ืœื• ืœื”ื‘ื—ื™ืŸ ื‘ืกืžื ื˜ื™ืงื” ืฉืœ ืงืจื™ืื” ืื—ืจื™ ื›ืชื™ื‘ื”. ืื ื‘ืจืฆื•ื ื›ื ืœื”ื™ื•ืช ื‘ื˜ื•ื—ื™ื ืฉื ืงืจื ืืช ื”ื›ืชื™ื‘ื•ืช ืฉืœื›ื, ืชื•ื›ืœื• ืœืงื‘ืข ืืช ื”ื‘ืงืฉื•ืช ืœืื–ื•ืจ ืžืกื•ื™ื ืขืœ ื™ื“ื™ ืฉื™ืžื•ืฉ ื‘ืื–ื•ืจ ื–ื” ื›-host ืฉืœ ื”-API (ืขื ื–ืืช, ื‘ื“ืจืš ื›ืœืœ ื–ื” ืœื ื ื“ืจืฉ ืขื‘ื•ืจ ืจื•ื‘ ื”ืื™ื ื˜ื’ืจืฆื™ื•ืช):

  • gdc-oregon.fastcomments.com
  • gdc-virginia.fastcomments.com
  • gdc-singapore.fastcomments.com
  • gdc-falkenstein2.fastcomments.com
  • gdc-sao-paulo.fastcomments.com
  • eudc-helsinki2.fastcomments.com
  • eudc-limburg.fastcomments.com
  • eudc-france.fastcomments.com

ืฉื™ืžื• ืœื‘ ืฉืื ืชืขืฉื• ื–ืืช ื™ื™ืชื›ืŸ ืฉืชืจืฆื• ืœื”ื’ื“ื™ืจ ื ืงื•ื“ืช ื’ื™ื‘ื•ื™, ืฉื›ืŸ ื‘ืขื‘ืจ ื”ืกืจื ื• ืฆืžืชื™ื ืฉืœ ื ืงื•ื“ื•ืช ื›ื ื™ืกื” ื•ื”ืฉืชืžืฉื ื• ื‘ืฉืžื•ืช ื—ื“ืฉื™ื ื‘ืขืช ื”ืžืขื‘ืจ.

ืžื‘ื ื” ื™ื•ืžืŸ ื‘ื™ืงื•ืจืช Internal Link

ืื•ื‘ื™ื™ืงื˜ AuditLog ืžื™ื™ืฆื’ ืื™ืจื•ืข ืžื‘ื•ืงืจ ืขื‘ื•ืจ ืฉื•ื›ืจื™ื ืฉื™ืฉ ืœื”ื ื’ื™ืฉื” ืœืชื›ื•ื ื” ื–ื•.

ื”ืžื‘ื ื” ืขื‘ื•ืจ ืื•ื‘ื™ื™ืงื˜ AuditLog ื”ื•ื ื›ื“ืœืงืžืŸ:

ืžื‘ื ื” AuditLog
Copy Copy
1
2interface AuditLog {
3 id: string;
4 userId?: string;
5 username?: string;
6 resourceName: string;
7 crudType: 'c' | 'r' | 'u' | 'd' | 'login';
8 from: string;
9 url?: string;
10 ip?: string;
11 when: string;
12 description?: string;
13 serverStartDate: string;
14 objectDetails?: object;
15}
16

ื™ื•ืžืŸ ื”ื‘ื™ืงื•ืจืช ื”ื•ื ื‘ืœืชื™ ื ื™ืชืŸ ืœืฉื™ื ื•ื™. ื’ื ืœื ื ื™ืชืŸ ืœื›ืชื•ื‘ ืืœื™ื• ื™ื“ื ื™ืช. FastComments.com ืขืฉื•ื™ ืœื”ื—ืœื™ื˜ ืžืชื™ ืœื›ืชื•ื‘ ืœื™ื•ืžืŸ ื”ื‘ื™ืงื•ืจืช. ืขื ื–ืืช, ืืชื” ื™ื›ื•ืœ ืœืงืจื•ื ืžืžื ื• ื“ืจืš API ื–ื”.

ืื™ืจื•ืขื™ื ื‘ื™ื•ืžืŸ ื”ื‘ื™ืงื•ืจืช ืคื’ื™ื ืœืื—ืจ ืฉื ืชื™ื™ื.

ืžื‘ื ื” ืชื’ื•ื‘ื” Internal Link

ืื•ื‘ื™ื™ืงื˜ Comment ืžื™ื™ืฆื’ ืชื’ื•ื‘ื” ืฉื”ืฉืื™ืจ ืžืฉืชืžืฉ.

ื”ืงืฉืจ ื‘ื™ืŸ ืชื’ื•ื‘ื•ืช ืื‘ ื•ืฆืืฆื ืžื•ื’ื“ืจ ื‘ืืžืฆืขื•ืช parentId.

ื”ืžื‘ื ื” ืฉืœ ืื•ื‘ื™ื™ืงื˜ Comment ื”ื•ื ื›ื“ืœืงืžืŸ:

ืžื‘ื ื” ืชื’ื•ื‘ื”
Copy Copy
1
2interface Comment {
3 /** ืœืงืจื™ืื” ื‘ืœื‘ื“: ื™ื•ื’ื“ืจ ืœ-true ืื ืžื ื•ืข ื”ืกืคืื ืงื‘ืข ืฉื”ืชื’ื•ื‘ื” ื”ื™ื ืกืคืื. **/
4 aiDeterminedSpam?: boolean
5 /** ื”ืื ื”ืชื’ื•ื‘ื” ืžืื•ืฉืจืช ืœื”ืฆื’ื”. ืชื•ื’ื“ืจ ืœ-true ื‘ืขืช ืฉืžื™ืจืช ื”ืชื’ื•ื‘ื”; ืื—ืจืช ื”ื™ื ืชื•ืกืชืจ. **/
6 approved?: boolean
7 /** ื”ืื•ื•ื˜ืืจ ืฉืœ ื”ืžืฉืชืžืฉ. **/
8 avatarSrc?: string
9 /** Child comments. Not populated in all scenarios. Used when asTree is set to true via the API. **/
10 children: Comment[]
11 /** ื”ื˜ืงืกื˜ ื”ื’ื•ืœืžื™ ืฉืœ ื”ืชื’ื•ื‘ื”. **/
12 comment: string
13 /** ืœืงืจื™ืื” ื‘ืœื‘ื“: ื”ื˜ืงืกื˜ ืฉืœ ื”ืชื’ื•ื‘ื” ืœืื—ืจ ืคื™ืจื•ืก ืœ-HTML. **/
14 commentHTML?: string
15 /** ื”ืื™ืžื™ื™ืœ ืฉืœ ื”ื›ื•ืชื‘. ื ื“ืจืฉ ืื ืชื’ื•ื‘ื•ืช ืื ื•ื ื™ืžื™ื•ืช ื›ื‘ื•ื™ื•ืช. **/
16 commenterEmail?: string
17 /** ื”ืงื™ืฉื•ืจ ืฉืœ ื”ื›ื•ืชื‘ (ืœืžืฉืœ ื”ื‘ืœื•ื’ ืฉืœื•). **/
18 commenterLink?: string
19 /** ื”ืฉื ืฉืœ ื”ื›ื•ืชื‘. ืชืžื™ื“ ื ื“ืจืฉ. ืื ืœื ื–ืžื™ืŸ, ืงื‘ืข ืขืจืš ื›ืžื• "Anonymous". **/
20 commenterName: string
21 /** ื”ืชืืจื™ืš ืฉื‘ื• ื ื›ืชื‘ื” ื”ืชื’ื•ื‘ื”, ื‘ื™ื—ื™ื“ืช ื–ืžืŸ epoch UTC. **/
22 date: number
23 /** ื”ืชื•ื•ื™ืช ืœืชืฆื•ื’ื” ืฉืœ ื”ืชื’ื•ื‘ื” - ืœื“ื•ื’ืžื” "Admin", "Moderator", ืื• ืžืฉื”ื• ื›ืžื• "VIP User". **/
24 displayLabel?: string
25 /** ื”ื“ื•ืžื™ื™ืŸ ืฉื‘ื• ืคื•ืจืกืžื” ื”ืชื’ื•ื‘ื”. **/
26 domain?: string
27 /** ืœืงืจื™ืื” ื‘ืœื‘ื“: ืžืกืคืจ ื”ืคืขืžื™ื ืฉื”ืชื’ื•ื‘ื” ืกื•ืžื ื”. **/
28 flagCount?: number
29 /** ื”ื”ืืฉื˜ืื’ื™ื (#) ืฉื ื›ืชื‘ื• ื‘ืชื’ื•ื‘ื” ื•ืคื•ืขื ื—ื• ื‘ื”ืฆืœื—ื”. ื ื™ืชืŸ ื’ื ืœื”ื•ืกื™ืฃ ื”ืืฉื˜ืื’ื™ื ื™ื“ื ื™ืช ืœืฆื•ืจืš ืฉืื™ืœืชื•ืช, ืืš ื”ื ืœื ื™ื•ืฆื’ื• ืื•ื˜ื•ืžื˜ื™ืช ื‘ื˜ืงืกื˜ ื”ืชื’ื•ื‘ื”. **/
30 hashTags?: CommentHashTag[]
31 /** ืœืงืจื™ืื” ื‘ืœื‘ื“: ื”ืื ื”ืชื’ื•ื‘ื” ืžื›ื™ืœื” ืชืžื•ื ื•ืช? **/
32 hasImages?: boolean
33 /** ืœืงืจื™ืื” ื‘ืœื‘ื“: ื”ืื ื”ืชื’ื•ื‘ื” ืžื›ื™ืœื” ืงื™ืฉื•ืจื™ื? **/
34 hasLinks?: boolean
35 /** ืœืงืจื™ืื” ื‘ืœื‘ื“: ื”ืžื–ื”ื” ื”ื™ื™ื—ื•ื“ื™ ืฉืœ ื”ืชื’ื•ื‘ื”. **/
36 id: string
37 /** ืจืง ื‘ืขืช ื™ืฆื™ืจื”! ืขืจืš ื–ื” ืžืขื•ื‘ื“ ื‘-hash ืœืฆื•ืจืš ืื—ืกื•ืŸ. **/
38 ip?: string
39 /** ืœืงืจื™ืื” ื‘ืœื‘ื“: ื”ืื ื”ืžืฉืชืžืฉ ื”ื ื•ื›ื—ื™ ื—ืกื ืืช ืžื™ ืฉื›ืชื‘ ืืช ื”ืชื’ื•ื‘ื”? **/
40 isBlocked?: boolean
41 /** ืœืงืจื™ืื” ื‘ืœื‘ื“: ื”ืื ื”ืชื’ื•ื‘ื” ื ื›ืชื‘ื” ืขืœ ื™ื“ื™ ืื“ืžื™ืŸ? ืžื•ื’ื“ืจ ืื•ื˜ื•ืžื˜ื™ืช ืขืœ ื‘ืกื™ืก userId. **/
42 isByAdmin?: boolean
43 /** ืœืงืจื™ืื” ื‘ืœื‘ื“: ื”ืื ื”ืชื’ื•ื‘ื” ื ื›ืชื‘ื” ืขืœ ื™ื“ื™ ืžื•ื“ืจืื˜ื•ืจ? ืžื•ื’ื“ืจ ืื•ื˜ื•ืžื˜ื™ืช ืขืœ ื‘ืกื™ืก userId. **/
44 isByModerator?: boolean
45 /** ื™ื•ื’ื“ืจ ืœ-true ืื ื”ืชื’ื•ื‘ื” ื ืžื—ืงื” ื‘ืื•ืคืŸ ืจืš (soft deleted) โ€” ื”ื•ืฉืืจ ืžืžืœื ืžืงื•ื ื‘ืฉืœ ืงื•ื ืคื™ื’ื•ืจืฆื™ื” ืื—ืจืช. **/
46 isDeleted?: boolean
47 /** ื™ื•ื’ื“ืจ ืœ-true ืื ื—ืฉื‘ื•ืŸ ื”ืžืฉืชืžืฉ ื ืžื—ืง ื•ื”ืชื’ื•ื‘ื” ื ื“ืจืฉื” ืœื”ื™ืฉืืจ. **/
48 isDeletedUser?: boolean
49 /** ืœืงืจื™ืื” ื‘ืœื‘ื“: ื”ืื ื”ืชื’ื•ื‘ื” ืกื•ืžื ื” ืขืœ ื™ื“ื™ ื”ืžืฉืชืžืฉ ื”ืžื—ื•ื‘ืจ ื›ืจื’ืข (contextUserId)? **/
50 isFlagged?: boolean
51 /** ื”ืื ื”ืชื’ื•ื‘ื” ืžื•ืฆืžื“ืช (pinned)? **/
52 isPinned?: boolean
53 /** ื”ืื ื”ืชื’ื•ื‘ื” ื ืขื•ืœื”? ื›ืืฉืจ true, ืืฃ ืื—ื“ (ื›ื•ืœืœ ืžื•ื“ืจืื˜ื•ืจื™ื) ืœื ื™ื›ื•ืœ ืœื”ืฉื™ื‘, ืœืขืจื•ืš ืื• ืœืžื—ื•ืง ืื•ืชื” ืขื“ ืฉืชื™ืคืชื—. **/
54 isLocked?: boolean
55 /** ื”ืื ื”ืชื’ื•ื‘ื” ื”ื™ื ืกืคืื? **/
56 isSpam?: boolean
57 /** ืœืงืจื™ืื” ื‘ืœื‘ื“: ื”ืื ื”ืžืฉืชืžืฉ ื”ื ื•ื›ื—ื™ (contextUserId) ื”ืฆื‘ื™ืข ื ื’ื“ ื”ืชื’ื•ื‘ื”? **/
58 isVotedDown?: boolean
59 /** ืœืงืจื™ืื” ื‘ืœื‘ื“: ื”ืื ื”ืžืฉืชืžืฉ ื”ื ื•ื›ื—ื™ (contextUserId) ื”ืฆื‘ื™ืข ื‘ืขื“ ื”ืชื’ื•ื‘ื”? **/
60 isVotedUp?: boolean
61 /** ื”ืฉืคื”/ืœื•ืงืœ ืฉืœ ื”ืชื’ื•ื‘ื”. ืื ืœื ืกื•ืคืง, ื”ื™ื ื ื’ื–ืจืช ืžื›ื•ืชืจืช ื”-HTTP ืฉืžืฆื™ื™ื ืช ืืช ืฉืคื•ืช ื”ื”ืขื“ืคื”. **/
62 locale?: 'de_de' | 'en_us' | 'es_es' | 'fr_fr' | 'it_it' | 'ja_jp' | 'ko_kr' | 'pl_pl' | 'pt_br' | 'ru_ru' | 'tr_tr' | 'zh_cn' | 'zh_tw'
63 /** ืœืงืจื™ืื” ื‘ืœื‘ื“: ื”-@mentions ืฉื ื›ืชื‘ื• ื‘ืชื’ื•ื‘ื” ื•ืคื•ืขื ื—ื• ื‘ื”ืฆืœื—ื”. **/
64 mentions?: CommentUserMention[]
65 /** ืžื˜ื”-ื ืชื•ื ื™ื ืื•ืคืฆื™ื•ื ืœื™ื™ื ื”ืžืฉื•ื™ื›ื™ื ืœืชื’ื•ื‘ื”. **/
66 meta?: Record<string, string | number | boolean>
67 /** The optional list of moderation group ids associated with this comment. **/
68 moderationGroupIds?: string[]|null
69 /** ืœืงืจื™ืื” ื‘ืœื‘ื“: ื”ืžื–ื”ื” ืฉืœ ืื•ื‘ื™ื™ืงื˜ ื”ื”ืฆื‘ืขื” ื”ืžืชืื™ื ืœื”ืฆื‘ืขืช ื”ืžืฉืชืžืฉ ื”ื ื•ื›ื—ื™ (contextUserId) ืขืœ ืชื’ื•ื‘ื” ื–ื•. **/
70 myVoteId?: string
71 /** ื”ืื ื ืฉืœื—ื• ื”ืชืจืื•ืช ืขืœ ืชื’ื•ื‘ื” ื–ื• ืœืžื’ื™ื‘ื™ื. ื›ื“ื™ ืœืžื ื•ืข ืฉืœื™ื—ืช ื”ืชืจืื•ืช ื‘ื™ื™ื‘ื•ื, ืงื‘ืข ืขืจืš ื–ื” ืœ-true. **/
72 notificationSentForParent?: boolean
73 /** ื”ืื ื ืฉืœื—ื• ื”ืชืจืื•ืช ืขืœ ืชื’ื•ื‘ื” ื–ื• ืœืžืฉืชืžืฉื™ ื”-tenant. ื›ื“ื™ ืœืžื ื•ืข ืฉืœื™ื—ืช ื”ืชืจืื•ืช ื‘ื™ื™ื‘ื•ื, ืงื‘ืข ืœ-true. **/
74 notificationSentForParentTenant?: boolean
75 /** ื”ื›ื•ืชืจืช ืฉืœ ื”ืขืžื•ื“ ืฉื‘ื• ื”ื•ืคื™ืขื” ื”ืชื’ื•ื‘ื”. **/
76 pageTitle?: string
77 /** ืื ืื ื• ืžืฉื™ื‘ื™ื ืœืชื’ื•ื‘ื”, ื–ื”ื• ื”ืžื–ื”ื” ืฉืืœื™ื• ืžืฉื™ื‘ื™ื. **/
78 parentId?: string|null
79 /** ื”ืื ื”ืชื’ื•ื‘ื” ืžืกื•ืžื ืช ื›ื ื’ื•ืขื” ื‘ื‘ื“ื™ืงื” (reviewed). **/
80 reviewed: boolean
81 /** ืžื–ื”ื” ื”-tenant ืฉืืœื™ื• ืฉื™ื™ื›ืช ื”ืชื’ื•ื‘ื”. **/
82 tenantId: string
83 /** ื”ืžืฉืชืžืฉ ืฉื›ืชื‘ ืืช ื”ืชื’ื•ื‘ื”. ื ื•ืฆืจ ืื•ื˜ื•ืžื˜ื™ืช ื›ืืฉืจ ืฉื•ืžืจื™ื ืชื’ื•ื‘ื” ืฉื›ื•ืœืœืช ืฉื/ืื™ืžื™ื™ืœ. **/
84 userId?: string|null
85 /** ื”-URL ืœืžื™ืงื•ื ืฉื‘ื• ื”ืชื’ื•ื‘ื” ื ืจืื™ืช, ืœื“ื•ื’ืžื” ืคื•ืกื˜ ื‘ื‘ืœื•ื’. **/
86 url: string
87 /** ื’ืจืกื” "ื ื•ืงื”" ืฉืœ ื”-urlId ืฉืกื™ืคืงืช. ื‘ืขืช ืฉืžื™ืจื”, ืืชื” ืžืฆื™ื™ืŸ ืฉื“ื” ื–ื”, ืืš ื›ืืฉืจ ืžืฉื—ื–ืจื™ื ืืช ื”ืชื’ื•ื‘ื” ื”ื•ื ื™ืขื•ื‘ื“ ื•ื”ืขืจืš ื”ืžืงื•ืจื™ ื™ื•ืขื‘ืจ ืœ-"urlIdRaw". **/
88 urlId: string
89 /** ืœืงืจื™ืื” ื‘ืœื‘ื“: ื”-urlId ื”ืžืงื•ืจื™ ืฉืกื™ืคืงืช. **/
90 urlIdRaw?: string
91 /** ื”ืื ื”ืžืฉืชืžืฉ ื•ื”ืชื’ื•ื‘ื” ืžืื•ืžืชื™ื? **/
92 verified: boolean
93 /** ืžืกืคืจ ื”ื”ืฆื‘ืขื•ืช ื‘ืขื“. **/
94 votesUp?: number
95 /** ืžืกืคืจ ื”ื”ืฆื‘ืขื•ืช ื ื’ื“. **/
96 votesDown?: number
97 /** "ื”ืงืจืžื”" ืฉืœ ื”ืชื’ื•ื‘ื” (= votes up - votes down). **/
98 votes?: number
99}
100

ื—ืœืง ืžื”ืฉื“ื•ืช ื”ืœืœื• ืžืกื•ืžื ื™ื ื›-READONLY - ืืœื” ืžื•ื—ื–ืจื™ื ืขืœ ื™ื“ื™ ื”-API ืืš ืœื ื™ื›ื•ืœื™ื ืœื”ื™ื•ืช ืžื•ื’ื“ืจื™ื.

Comment Text Structure

ืชื’ื•ื‘ื•ืช ื ื›ืชื‘ื•ืช ื‘ื’ื™ืจืกื” ืฉืœ Markdown ืฉืžื•ืชืืžืช ืœ-FastComments, ืฉื”ื™ื Markdown ื‘ืชื•ืกืคืช ืชื’ื™ื ื‘ืกื’ื ื•ืŸ bbcode ืขื‘ื•ืจ ืชืžื•ื ื•ืช, ื›ืžื• [img]path[/img].

ื”ื˜ืงืกื˜ ื ืฉืžืจ ื‘ืฉื ื™ ืฉื“ื•ืช. ื”ื˜ืงืกื˜ ืฉื”ืžืฉืชืžืฉ ื”ื–ื™ืŸ ื ืฉืžืจ ืœืœื ืฉื™ื ื•ื™ ื‘ืฉื“ื” comment. ื–ื” ืžื•ืจื ื“ืจ ื•ื ืฉืžืจ ื‘ืฉื“ื” commentHTML.

ืชื’ื™ ื”-HTML ื”ืžื•ืชืจื™ื ื”ื b, u, i, strike, pre, span, code, img, a, strong, ul, ol, li, and br.

ืžื•ืžืœืฅ ืœื”ืฆื™ื’ ืืช ื”-HTML, ืžื›ื™ื•ื•ืŸ ืฉืžื“ื•ื‘ืจ ื‘ืชืช-ืงื‘ื•ืฆื” ืžืื•ื“ ืงื˜ื ื” ืฉืœ HTML, ื•ื‘ื ื™ื™ืช ืžื ืจื“ืจืจ ื”ื™ื ื™ื—ืกื™ืช ืคืฉื•ื˜ื”. ืงื™ื™ืžื•ืช ืกืคืจื™ื•ืช ืจื‘ื•ืช ืขื‘ื•ืจ React Native ื•-Flutter, ืœืžืฉืœ, ืฉืขื•ื–ืจื•ืช ื‘ื›ืš.

ืืชื” ืจืฉืื™ ืœื‘ื—ื•ืจ ืœื”ืฆื™ื’ ืืช ื”ืขืจืš ื”ืœื-ื ื•ืจืžืœื™ื–ืฆื™ื•ื ื™ ืฉืœ ื”ืฉื“ื” comment. An example parser is here..

ื ื™ืชืŸ ื’ื ืœื”ืชืื™ื ืืช ืžืคืขื ื— ื”ื“ื•ื’ืžื” ืœืขื‘ื•ื“ื” ืขื HTML, ื•ืœื”ืžื™ืจ ืืช ืชื•ื•ื™ ื”-HTML ืœืืœืžื ื˜ื™ื ื”ืฆืคื•ื™ื™ื ืœื”ืฆื’ื” ื‘ืคืœื˜ืคื•ืจืžื” ืฉืœืš.

Tagging

ื›ืืฉืจ ืžืฉืชืžืฉื™ื ืžืกื•ืžื ื™ื ื‘ืชื’ื•ื‘ื”, ื”ืžื™ื“ืข ืžืื•ื—ืกืŸ ื‘ืจืฉื™ืžื” ืฉื ืงืจืืช mentions. ื›ืœ ืื•ื‘ื™ื™ืงื˜ ื‘ืจืฉื™ืžื” ื–ื• ื™ืฉ ืืช ื”ืžื‘ื ื” ื”ื‘ื.

ืื•ื‘ื™ื™ืงื˜ ืื–ื›ื•ืจื™ ื”ืชื’ื•ื‘ื”
Copy CopyRun External Link
1
2interface CommentUserMention {
3 /** ืžื–ื”ื” ื”ืžืฉืชืžืฉ. ืขื‘ื•ืจ ืžืฉืชืžืฉื™ SSO, ื™ื”ื™ื” ืขื ืงื™ื“ื•ืžืช ืฉืœ ืžื–ื”ื” ื”-tenant ืฉืœื›ื. **/
4 id: string
5 /** ื”ื˜ืงืกื˜ ื”ืกื•ืคื™ ืฉืœ ืชื’ื™ืช ื”-@mention, ื›ื•ืœืœ ื”ืกื™ืžืŸ @. **/
6 tag: string
7 /** ื”ื˜ืงืกื˜ ื”ืžืงื•ืจื™ ืฉืœ ื”-@mention, ื›ื•ืœืœ ื”ืกื™ืžืŸ @. **/
8 rawTag: string
9 /** ืกื•ื’ ื”ืžืฉืชืžืฉ ืฉื”ื•ื–ื›ืจ. user = FastComments.com account. sso = SSOUser. **/
10 type: 'user'|'sso'
11 /** ื’ื ืื ื”ืžืฉืชืžืฉ ืžื‘ื˜ืœ ืงื‘ืœืช ื”ืชืจืื•ืช, ืขืจืš ื–ื” ืขื“ื™ื™ืŸ ื™ื”ื™ื” true. **/
12 sent: boolean
13}
14

HashTags

ื›ืืฉืจ ืžืฉืชืžืฉื™ื ื‘ื”ืืฉื˜ืื’ื™ื ื•ื”ื ืคื•ืขื ื—ื• ื‘ื”ืฆืœื—ื”, ื”ืžื™ื“ืข ืžืื•ื—ืกืŸ ื‘ืจืฉื™ืžื” ืฉื ืงืจืืช hashTags. ื›ืœ ืื•ื‘ื™ื™ืงื˜ ื‘ืจืฉื™ืžื” ื–ื• ื™ืฉ ืืช ื”ืžื‘ื ื” ื”ื‘ื. ื ื™ืชืŸ ื’ื ืœื”ื•ืกื™ืฃ ื”ืืฉื˜ืื’ื™ื ื™ื“ื ื™ืช ืœืžืขืจืš hashTags ืฉืœ ื”ืชื’ื•ื‘ื” ืœืฆื•ืจืš ืฉืื™ืœืชื•ืช, ืื retain ืžื•ื’ื“ืจ.

ืื•ื‘ื™ื™ืงื˜ ื”ืืฉื˜ืื’ ืฉืœ ื”ืชื’ื•ื‘ื”
Copy CopyRun External Link
1
2interface CommentHashTag {
3 /** ื”ืžื–ื”ื” ืฉืœ ื”ื”ืืฉื˜ืื’. **/
4 id: string
5 /** ื”ื˜ืงืกื˜ ื”ืกื•ืคื™ ืฉืœ ืชื’ื™ืช ื”-#hashtag, ื›ื•ืœืœ ื”ืกื™ืžืŸ #. **/
6 tag: string
7 /** ืื ืœืืฉื˜ืื’ ืžืงื•ืฉืจ ืœ-URL ืžื•ืชืื ืื™ืฉื™ืช, ื–ื” ื™ื”ื™ื” ืžื•ื’ื“ืจ. **/
8 url?: string
9 /** ื”ืื ืœืฉืžื•ืจ ืืช ื”ื”ืืฉื˜ืื’ ื’ื ืื ื”ื•ื ืœื ืงื™ื™ื ื‘ื˜ืงืกื˜ ื”ืชื’ื•ื‘ื” ื›ืืฉืจ ื”ืชื’ื•ื‘ื” ืžืขื•ื“ื›ื ืช. ืฉื™ืžื•ืฉื™ ืœืชื™ื•ื’ ืชื’ื•ื‘ื•ืช ืžื‘ืœื™ ืœืฉื ื•ืช ืืช ื˜ืงืกื˜ ื”ืชื’ื•ื‘ื”. **/
10 retain?: boolean
11}
12

ืžื‘ื ื” ืชื‘ื ื™ืช ื“ื•ืืดืœ Internal Link

ืื•ื‘ื™ื™ืงื˜ EmailTemplate ืžื™ื™ืฆื’ ืงื•ื ืคื™ื’ื•ืจืฆื™ื” ืœืชื‘ื ื™ืช ืื™ืžื™ื™ืœ ืžื•ืชืืžืช ืื™ืฉื™ืช, ืขื‘ื•ืจ ืฉื•ื›ืจ.

ื”ืžืขืจื›ืช ืชื‘ื—ืจ ืืช ืชื‘ื ื™ืช ื”ืื™ืžื™ื™ืœ ืœืฉื™ืžื•ืฉ ื‘ืืžืฆืขื•ืช:

  • ืžื–ื”ื” ื”ืกื•ื’ ืฉืœื”, ืื ื—ื ื• ืงื•ืจืื™ื ืœื–ื” emailTemplateId. ืืœื” ืงื‘ื•ืขื™ื.
  • ื”-domain. ืื ื—ื ื• ืงื•ื“ื ื ื ืกื” ืœืžืฆื•ื ืชื‘ื ื™ืช ืขื‘ื•ืจ ื”ื“ื•ืžื™ื™ืŸ ืฉื”ืื•ื‘ื™ื™ืงื˜ ื”ืงืฉื•ืจ (ื›ืžื• Comment) ืงืฉื•ืจ ืืœื™ื•, ื•ืื ืœื ื ืžืฆืื” ื”ืชืืžื” ืื– ื ื ืกื” ืœืžืฆื•ื ืชื‘ื ื™ืช ืฉื‘ื” domain ื”ื•ื null ืื• *.

ื”ืžื‘ื ื” ืขื‘ื•ืจ ืื•ื‘ื™ื™ืงื˜ EmailTemplate ื”ื•ื ื›ื“ืœืงืžืŸ:

ืžื‘ื ื” ืชื‘ื ื™ืช ืื™ืžื™ื™ืœ
Copy Copy
1
2interface EmailTemplate {
3 id: string
4 tenantId: string
5 emailTemplateId: string
6 displayName: string
7 /** READONLY **/
8 createdAt: string
9 /** READONLY **/
10 updatedAt: string
11 /** READONLY **/
12 updatedByUserId: string
13 /** The domain the template should be associated with. **/
14 domain?: string | '*' | null
15 /** The email template content in EJS syntax. **/
16 ejs: string
17 /** A map of overridden translation keys to values, for each supported locale. **/
18 translationOverridesByLocale: Record<string, Record<string, string>>
19 /** An object that represents the render context of the template. **/
20 testData: object
21}
22

ื”ืขืจื•ืช

  • ืืชื” ื™ื›ื•ืœ ืœืงื‘ืœ ืืช ืขืจื›ื™ emailTemplateId ื”ื—ื•ืงื™ื™ื ืžื ืงื•ื“ืช ื”ืงืฆื” /definitions.
  • ื ืงื•ื“ืช ื”ืงืฆื” /definitions ื›ื•ืœืœืช ื’ื ืืช ื”ืชืจื’ื•ืžื™ื ื‘ืจื™ืจืช ื”ืžื—ื“ืœ ื•ื ืชื•ื ื™ ื”ื‘ื“ื™ืงื”.
  • ืชื‘ื ื™ื•ืช ื™ื™ื›ืฉืœื• ื‘ืฉืžื™ืจื” ืขื ืžื‘ื ื” ืื• ื ืชื•ื ื™ ื‘ื“ื™ืงื” ืœื ื—ื•ืงื™ื™ื.

ืžื‘ื ื” ืชื’ื™ืช Internal Link

ืื•ื‘ื™ื™ืงื˜ HashTag ืžื™ื™ืฆื’ ืชื’ื™ืช ืฉื™ื›ื•ืœื” ืœื”ื™ื•ืช ืžื•ืฉืืจืช ืขืœ ื™ื“ื™ ืžืฉืชืžืฉ. ื”ืืฉื˜ืื’ื™ื ื™ื›ื•ืœื™ื ืœืฉืžืฉ ืœืงื™ืฉื•ืจ ืœืชื•ื›ืŸ ื—ื™ืฆื•ื ื™ ืื• ืœืงืฉืจ ืชื’ื•ื‘ื•ืช ืงืฉื•ืจื•ืช ื™ื—ื“.

ื”ืžื‘ื ื” ืขื‘ื•ืจ ืื•ื‘ื™ื™ืงื˜ HashTag ื”ื•ื ื›ื“ืœืงืžืŸ:

ืžื‘ื ื” ื”ืืฉื˜ืื’
Copy Copy
1
2interface HashTag {
3 /** Should start with the "#" or desired character. **/
4 tag: string
5 /** An optional URL that the hashtag can point to. Instead of filtering comments by hashtag, the UI will redirect to this upon click. **/
6 url?: string
7 /** READONLY **/
8 createdAt: string
9}
10

ื”ืขืจื•ืช:

  • ื‘ื—ืœืง ืžื ืงื•ื“ื•ืช ื”ืงืฆื” ืฉืœ ื”-API ืชืจืื” ืฉื”ื”ืืฉื˜ืื’ ืžืฉืžืฉ ื‘-URL. ื–ื›ื•ืจ ืœืงื•ื“ื“ URI ืืช ื”ืขืจื›ื™ื. ืœื“ื•ื’ืžื”, # ืฆืจื™ืš ืœื”ื™ื•ืช ืžื™ื•ืฆื’ ื›-%23.
  • ื—ืœืง ืžื”ืฉื“ื•ืช ื”ืœืœื• ืžืกื•ืžื ื™ื ื›-READONLY - ืืœื” ืžื•ื—ื–ืจื™ื ืขืœ ื™ื“ื™ ื”-API ืื‘ืœ ืœื ื ื™ืชืŸ ืœื”ื’ื“ื™ืจ ืื•ืชื.

ืžื‘ื ื” ืกืคื™ืจืช ื”ืชืจืื•ืช Internal Link

ืื•ื‘ื™ื™ืงื˜ NotificationCount ืžื™ื™ืฆื’ ืืช ืกืคื™ืจืช ื”ื”ืชืจืื•ืช ืฉืœื ื ืงืจืื• ื•ืžื˜ื-ื ืชื•ื ื™ื ืขื‘ื•ืจ ืžืฉืชืžืฉ.

ืื ืื™ืŸ ื”ืชืจืื•ืช ืฉืœื ื ืงืจืื•, ืœื ื™ื”ื™ื” NotificationCount ืขื‘ื•ืจ ื”ืžืฉืชืžืฉ.

ืื•ื‘ื™ื™ืงื˜ื™ NotificationCount ื ื•ืฆืจื™ื ืื•ื˜ื•ืžื˜ื™ืช ื•ืœื ื ื™ืชืŸ ืœื™ืฆื•ืจ ืื•ืชื ื“ืจืš ื”-API. ื”ื ื’ื ืคื’ื™ื ืœืื—ืจ ืฉื ื” ืื—ืช.

ืืชื” ื™ื›ื•ืœ ืœื ืงื•ืช ืืช ืกืคื™ืจืช ื”ื”ืชืจืื•ืช ืฉืœื ื ืงืจืื• ืฉืœ ืžืฉืชืžืฉ ืขืœ ื™ื“ื™ ืžื—ื™ืงืช ื”-NotificationCount ืฉืœื•.

ื”ืžื‘ื ื” ืขื‘ื•ืจ ืื•ื‘ื™ื™ืงื˜ NotificationCount ื”ื•ื ื›ื“ืœืงืžืŸ:

ืžื‘ื ื” NotificationCount
Copy Copy
1
2interface NotificationCount {
3 id: string // user id
4 count: number
5 createdAt: string // date string
6 expireAt: string // date string
7}
8

ืžื‘ื ื” ื”ืชืจืื” Internal Link

ืื•ื‘ื™ื™ืงื˜ Notification ืžื™ื™ืฆื’ ื”ืชืจืื” ืขื‘ื•ืจ ืžืฉืชืžืฉ.

ืื•ื‘ื™ื™ืงื˜ื™ Notification ื ื•ืฆืจื™ื ืื•ื˜ื•ืžื˜ื™ืช ื•ืœื ื ื™ืชืŸ ืœื™ืฆื•ืจ ืื•ืชื ื“ืจืš ื”-API. ื”ื ื’ื ืคื’ื™ื ืœืื—ืจ ืฉื ื” ืื—ืช. ืœื ื ื™ืชืŸ ืœืžื—ื•ืง ื”ืชืจืื•ืช. ืขื ื–ืืช, ื ื™ืชืŸ ืœืขื“ื›ืŸ ืื•ืชืŸ ื›ื“ื™ ืœื”ื’ื“ื™ืจ ืืช viewed ืœ-false, ื•ื ื™ืชืŸ ืœื‘ืฆืข ืฉืื™ืœืชื” ืœืคื™ viewed.

ืžืฉืชืžืฉ ื™ื›ื•ืœ ื’ื ืœื‘ื—ื•ืจ ืœืฆืืช ืžื”ืชืจืื•ืช ืขื‘ื•ืจ ืชื’ื•ื‘ื” ืกืคืฆื™ืคื™ืช ืขืœ ื™ื“ื™ ื”ื’ื“ืจืช optedOut ื‘ื”ืชืจืื” ืœ-true. ื ื™ืชืŸ ืœื”ืฆื˜ืจืฃ ืžื—ื“ืฉ ืขืœ ื™ื“ื™ ื”ื’ื“ืจืชื• ืœ-false.

ื™ืฉื ื ืกื•ื’ื™ ื”ืชืจืื•ืช ืฉื•ื ื™ื - ื‘ื“ื•ืง ืืช relatedObjectType ื•-type.

ื”ื“ืจื›ื™ื ืœื™ืฆื™ืจืช ื”ืชืจืื•ืช ื”ืŸ ื“ื™ ื’ืžื™ืฉื•ืช ื•ื ื™ืชื ื•ืช ืœื”ืคืขืœื” ืขืœ ื™ื“ื™ ืชืจื—ื™ืฉื™ื ืจื‘ื™ื (ืจืื” NotificationType).

ื ื›ื•ืŸ ืœื”ื™ื•ื, ืงื™ื•ื Notification ืœื ื‘ืืžืช ืžืจืžื– ืฉืื™ืžื™ื™ืœ ื ืฉืœื— ืื• ืฆืจื™ืš ืœื”ื™ืฉืœื—. ื‘ืžืงื•ื ื–ืืช, ื”ื”ืชืจืื•ืช ืžืฉืžืฉื•ืช ืœืคื™ื“ ื”ื”ืชืจืื•ืช ื•ืื™ื ื˜ื’ืจืฆื™ื•ืช ืงืฉื•ืจื•ืช.

ื”ืžื‘ื ื” ืขื‘ื•ืจ ืื•ื‘ื™ื™ืงื˜ Notification ื”ื•ื ื›ื“ืœืงืžืŸ:

ืžื‘ื ื” ื”ืชืจืื”
Copy Copy
1
2enum NotificationObjectType {
3 Comment = 0,
4 Profile = 1,
5 Tenant = 2
6}
7
8enum NotificationType {
9 /** If someone replied to you. **/
10 RepliedToMe = 0,
11 /** If someone replied anywhere in a thread (even children of children) of a thread you commented on. **/
12 RepliedTransientChild = 1,
13 /** If your comment was up-voted. **/
14 VotedMyComment = 2,
15 /** If a new comment is left on the root of a page you're subscribed to. **/
16 SubscriptionReplyRoot = 3,
17 /** If someone commented on your profile. **/
18 CommentedOnProfile = 4,
19 /** If you have a DM. **/
20 DirectMessage = 5,
21 /** TrialLimits is for tenant users only. **/
22 TrialLimits = 6,
23 /** If you were @mentioned. **/
24 Mentioned = 7
25}
26
27interface Notification {
28 id: string
29 tenantId: string
30 /** With SSO, the user id is in the format `<tenant id>:<user id>`. **/
31 userId?: string
32 /** When working with SSO, you only have to worry about `userId`. **/
33 anonUserId?: string
34 /** urlId is almost always defined. It is only optional for tenant-level notifications, which are infrequent. **/
35 urlId?: string
36 /** URL is cached for quick navigation to the source of the notification. **/
37 url?: string
38 /** Page Title is cached for quick reading of notification source. **/
39 pageTitle?: string
40 relatedObjectType: NotificationObjectType
41 /** For example, comment id. **/
42 relatedObjectId: string
43 viewed: boolean
44 createdAt: string // date string
45 type: NotificationType
46 fromCommentId?: string
47 fromVoteId?: string
48 /** fromUserName and fromUserAvatarSrc are cached here for quick displaying of the notification. They are updated when the user is updated. **/
49 fromUserName: string
50 fromUserId: string
51 fromUserAvatarSrc?: string
52 /** Set this to true to stop getting notifications for this object. **/
53 optedOut?: boolean
54}
55

ืžื‘ื ื” ืขืžื•ื“ Internal Link

ืื•ื‘ื™ื™ืงื˜ Page ืžื™ื™ืฆื’ ืืช ื”ืขืžื•ื“ ืฉืชื’ื•ื‘ื•ืช ืจื‘ื•ืช ื™ื›ื•ืœื•ืช ืœื”ืฉืชื™ื™ืš ืืœื™ื•. ื™ื—ืก ื–ื” ืžื•ื’ื“ืจ ืขืœ ื™ื“ื™ urlId.

Page ืžืื—ืกืŸ ืžื™ื“ืข ื›ื’ื•ืŸ ื›ื•ืชืจืช ื”ืขืžื•ื“, ืžืกืคืจ ื”ืชื’ื•ื‘ื•ืช, ื•-urlId.

ื”ืžื‘ื ื” ืขื‘ื•ืจ ืื•ื‘ื™ื™ืงื˜ Page ื”ื•ื ื›ื“ืœืงืžืŸ:

ืžื‘ื ื” ืขืžื•ื“
Copy Copy
1
2interface Page {
3 id: string
4 urlId: string
5 url: string
6 title?: string
7 createdAt: string
8 commentCount: number
9 rootCommentCount: number
10 /** Setting this to null means all SSO users can see the page. An empty list means it is closed to all users. **/
11 accessibleByGroupIds?: string[] | null
12 /** Is this page closed for new comments? **/
13 isClosed?: boolean
14}
15

ืžื‘ื ื” ืื™ืจื•ืข Webhook ืžืžืชื™ืŸ Internal Link

ืื•ื‘ื™ื™ืงื˜ PendingWebhookEvent ืžื™ื™ืฆื’ ืื™ืจื•ืข webhook ื‘ืชื•ืจ ืฉืžืžืชื™ืŸ.

ืื•ื‘ื™ื™ืงื˜ื™ PendingWebhookEvent ื ื•ืฆืจื™ื ืื•ื˜ื•ืžื˜ื™ืช ื•ืœื ื ื™ืชืŸ ืœื™ืฆื•ืจ ืื•ืชื ื™ื“ื ื™ืช ื“ืจืš ื”-API. ื”ื ื’ื ืคื’ื™ื ืœืื—ืจ ืฉื ื” ืื—ืช. ื ื™ืชืŸ ืœืžื—ื•ืง ืื•ืชื ืžื” ืฉืžืกื™ืจ ืืช ื”ืžืฉื™ืžื” ืžื”ืชื•ืจ.

ื™ืฉ ืกื•ื’ื™ ืื™ืจื•ืขื™ื ืฉื•ื ื™ื - ื‘ื“ื•ืง eventType (OutboundSyncEventType) ื•-type (OutboundSyncType).

ืžืงืจื” ืฉื™ืžื•ืฉ ื ืคื•ืฅ ืœ-API ื–ื” ื”ื•ื ืœื™ื™ืฉื ื ื™ื˜ื•ืจ ืžื•ืชืื ืื™ืฉื™ืช. ื™ื™ืชื›ืŸ ืฉืชืจืฆื” ืœืงืจื•ื ืœื ืงื•ื“ืช ื”ืงืฆื” /count ืžืขืช ืœืขืช ื›ื“ื™ ืœื‘ื“ื•ืง ืืช ื”ืกืคื™ืจื” ื”ืžืžืชื™ื ื” ืขื‘ื•ืจ ืžืกื ื ื™ื ื ืชื•ื ื™ื.

ื”ืžื‘ื ื” ืขื‘ื•ืจ ืื•ื‘ื™ื™ืงื˜ PendingWebhookEvent ื”ื•ื ื›ื“ืœืงืžืŸ:

ืžื‘ื ื” PendingWebhookEvent
Copy Copy
1
2enum OutboundSyncEventType {
3 Create: 0,
4 Delete: 1,
5 Update: 2
6}
7
8enum OutboundSyncType {
9 /** WordPress-specific sync task. **/
10 WP: 0,
11 Webhook: 1
12}
13
14interface PendingWebhookEvent {
15 id: string
16 /** The comment id associated with the event. **/
17 commentId: string
18 /** The comment object for the event at the time of the event. We started adding these in Nov 2023. **/
19 comment: Comment
20 /** An external id that may be associated with the comment. **/
21 externalId: string | null
22 createdAt: Date
23 tenantId: string
24 attemptCount: number
25 /** Set before first attempt, and after every failure. **/
26 nextAttemptAt: Date
27 /** Whether this is a creation, deletion, or update event... **/
28 eventType: OutboundSyncEventType
29 /** The type of sync to perform (WordPress, call API, etc). **/
30 type: OutboundSyncType
31 /** The domain that matched the comment. We use this domain to pick the API key. **/
32 domain: string
33 /** The last error that occurred. This type is untyped and is a "dump" of whatever happened. Usually it contains an object with statusCode, body, and a headers map. **/
34 lastError: object | null
35}
36

ืžื‘ื ื” ืžืฉืชืžืฉ SSO Internal Link

FastComments ืžืกืคืง ืคืชืจื•ืŸ SSO ืงืœ ืœืฉื™ืžื•ืฉ. ืขื“ื›ื•ืŸ ื”ืžื™ื“ืข ืฉืœ ืžืฉืชืžืฉ ื‘ืขื–ืจืช ื”ืื™ื ื˜ื’ืจืฆื™ื” ืžื‘ื•ืกืกืช HMAC ื”ื•ื ืคืฉื•ื˜ ื›ืžื• ืœื’ืจื•ื ืœืžืฉืชืžืฉ ืœื˜ืขื•ืŸ ืืช ื”ื“ืฃ ืขื ืžื˜ืขืŸ ืžืขื•ื“ื›ืŸ.

ืขื ื–ืืช, ื™ื™ืชื›ืŸ ื•ืชืจืฆื• ืœื ื”ืœ ืžืฉืชืžืฉ ืžื—ื•ืฅ ืœื–ืจื™ืžื” ื–ื•, ื›ื“ื™ ืœืฉืคืจ ืืช ื”ืขืงื‘ื™ื•ืช ืฉืœ ื”ื™ื™ืฉื•ื ืฉืœื›ื.

ืžืžืฉืง ื”-SSO User API ืžืกืคืง ื“ืจืš ืœื‘ืฆืข CRUD ืขืœ ืื•ื‘ื™ื™ืงื˜ื™ื ืฉืื ื• ืงื•ืจืื™ื ืœื”ื SSOUsers. ืื•ื‘ื™ื™ืงื˜ื™ื ืืœื” ืฉื•ื ื™ื ืžืžืฉืชืžืฉื™ื ืจื’ื™ืœื™ื ื•ื ืฉืžืจื™ื ื‘ื ืคืจื“ ืœืžืขืŸ ื‘ื˜ื™ื—ื•ืช ื˜ื™ืคื•ืกื™ื.

ื”ืžื‘ื ื” ืฉืœ ืื•ื‘ื™ื™ืงื˜ SSOUser ื”ื•ื ื›ื“ืœืงืžืŸ:

ืžื‘ื ื” SSOUser
Copy Copy
1
2interface SSOUser {
3 id: string
4 username: string
5 email?: string
6 websiteUrl?: string
7 signUpDate: number
8 createdFromUrlId?: string
9 loginCount?: number
10 avatarSrc?: string
11 optedInNotifications?: boolean
12 optedInSubscriptionNotifications?: boolean
13 displayLabel?: string
14 displayName?: string
15 isAccountOwner?: boolean // ื”ืจืฉืืช ืžื ื”ืœ - ืžืฉืชืžืฉื™ SSO ืขื ื“ื’ืœ ื–ื” ื™ื—ื•ื™ื‘ื• ื›-SSO Admins (ื ืคืจื“ื™ื ืžืžืฉืชืžืฉื™ SSO ืจื’ื™ืœื™ื)
16 isAdminAdmin?: boolean // ื”ืจืฉืืช ืžื ื”ืœ - ืžืฉืชืžืฉื™ SSO ืขื ื“ื’ืœ ื–ื” ื™ื—ื•ื™ื‘ื• ื›-SSO Admins (ื ืคืจื“ื™ื ืžืžืฉืชืžืฉื™ SSO ืจื’ื™ืœื™ื)
17 isCommentModeratorAdmin?: boolean // ื”ืจืฉืืช ืžื•ื“ืจืฆื™ื” - ืžืฉืชืžืฉื™ SSO ืขื ื“ื’ืœ ื–ื” ื™ื—ื•ื™ื‘ื• ื›-SSO Moderators (ื ืคืจื“ื™ื ืžืžืฉืชืžืฉื™ SSO ืจื’ื™ืœื™ื)
18 /** ืื null, ื‘ืงืจืช ื’ื™ืฉื” ืœื ืชื™ื•ืฉื ืขืœ ื”ืžืฉืชืžืฉ. ืื ืจืฉื™ืžื” ืจื™ืงื”, ืžืฉืชืžืฉ ื–ื” ืœื ื™ื•ื›ืœ ืœืจืื•ืช ืฉื•ื ื“ืคื™ื ืื• @mention ืžืฉืชืžืฉื™ื ืื—ืจื™ื. **/
19 groupIds?: string[] | null
20 createdFromSimpleSSO?: boolean
21 /** ืืœ ืชืืคืฉืจ ืœืžืฉืชืžืฉื™ื ืื—ืจื™ื ืœืจืื•ืช ืืช ืคืขื™ืœื•ืช ื”ืžืฉืชืžืฉ ื”ื–ื”, ื›ื•ืœืœ ืชื’ื•ื‘ื•ืช, ื‘ืคืจื•ืคื™ืœ ืฉืœื•. ื‘ืจื™ืจืช ื”ืžื—ื“ืœ ื”ื™ื true ื›ื“ื™ ืœืกืคืง ืคืจื•ืคื™ืœื™ื ืžืื•ื‘ื˜ื—ื™ื ื›ื‘ืจื™ืจืช ืžื—ื“ืœ. **/
22 isProfileActivityPrivate?: boolean
23 /** ืืœ ืชืืคืฉืจ ืœืžืฉืชืžืฉื™ื ืื—ืจื™ื ืœื”ืฉืื™ืจ ืชื’ื•ื‘ื•ืช ื‘ืคืจื•ืคื™ืœ ืฉืœ ื”ืžืฉืชืžืฉ, ืื• ืœืจืื•ืช ืชื’ื•ื‘ื•ืช ืคืจื•ืคื™ืœ ืงื™ื™ืžื•ืช. ื‘ืจื™ืจืช ื”ืžื—ื“ืœ false. **/
24 isProfileCommentsPrivate?: boolean
25 /** ืืœ ืชืืคืฉืจ ืœืžืฉืชืžืฉื™ื ืื—ืจื™ื ืœืฉืœื•ื— ื”ื•ื“ืขื•ืช ื™ืฉื™ืจื•ืช ืœืžืฉืชืžืฉ ื–ื”. ื‘ืจื™ืจืช ื”ืžื—ื“ืœ false. **/
26 isProfileDMDisabled?: boolean
27 karma?: number
28 /** ืชืฆื•ืจื” ืื•ืคืฆื™ื•ื ืœื™ืช ืœืกืžืœื™ ื”ืžืฉืชืžืฉ. **/
29 badgeConfig?: {
30 /** ืžืขืจืš ืžื–ื”ื™ ืกืžืœื™ื ืฉื™ื•ืงืฆื• ืœืžืฉืชืžืฉ. ืžื•ื’ื‘ืœ ืœ-30 ืกืžืœื™ื. ื”ืกื“ืจ ื ืฉืžืจ. ืืœื• ืกืžืœื™ื ื’ืœื•ื‘ืœื™ื™ื ื”ื ืจืื™ื ื‘ื›ืœ ื”ื“ืคื™ื. **/
31 badgeIds: string[]
32 /** ืžืขืจืš ืžื–ื”ื™ ืกืžืœื™ื ื”ืžื•ื’ื“ืจื™ื ืœื“ืฃ ื”ื ื•ื›ื—ื™ (urlId). ืกืžืœื™ื ืืœื• ืžื•ืฆื’ื™ื ืจืง ื‘ืขืžื•ื“ ืฉื‘ื• ื”ื•ืงืฆื•. **/
33 pageBadgeIds?: string[]
34 /** ืื true, ืžื—ืœื™ืฃ ืืช ื›ืœ ื”ืกืžืœื™ื ื”ืžื•ืฆื’ื™ื ื”ืงื™ื™ืžื™ื ื‘ืืœื• ืฉืกื•ืคืงื•. ืกืžืœื™ื ื’ืœื•ื‘ืœื™ื™ื ื•ืกืžืœื™ื ืกืคืฆื™ืคื™ื™ื ืœื“ืฃ ืžื•ื—ืœืคื™ื ื‘ืื•ืคืŸ ืขืฆืžืื™. ืื false, ืžื•ืกื™ืฃ ืœืกืžืœื™ื ื”ืงื™ื™ืžื™ื. **/
35 override?: boolean
36 /** ืื true, ืžืขื“ื›ืŸ ืชื›ื•ื ื•ืช ืชืฆื•ื’ืช ื”ืกืžืœ ืžืชืฆื•ืจืช ื”ืฉื•ื›ืจ. **/
37 update?: boolean
38 }
39}
40

ื—ื™ื•ื‘ ืขื‘ื•ืจ ืžืฉืชืžืฉื™ SSO

ืžืฉืชืžืฉื™ SSO ืžื—ื•ื™ื™ื‘ื™ื ื‘ืื•ืคืŸ ืฉื•ื ื” ื‘ื”ืชืื ืœื“ื’ืœื™ ื”ื”ืจืฉืื” ืฉืœื”ื:

  • ืžืฉืชืžืฉื™ SSO ืจื’ื™ืœื™ื: ืžืฉืชืžืฉื™ื ืœืœื ื”ืจืฉืื•ืช ืžื ื”ืœ ืื• ืžื•ื“ืจืฆื™ื” ืžื—ื•ื™ื™ื‘ื™ื ื›ืžืฉืชืžืฉื™ SSO ืจื’ื™ืœื™ื
  • ืžื ื”ืœื™ SSO: ืžืฉืชืžืฉื™ื ืขื ื”ื“ื’ืœื™ื isAccountOwner ืื• isAdminAdmin ืžื—ื•ื™ื™ื‘ื™ื ื‘ื ืคืจื“ ื›-ืžื ื”ืœื™ SSO (ืื•ืชื• ืฉื™ืขื•ืจ ื›ืžื• ืžื ื”ืœื™ ืฉื•ื›ืจ ืจื’ื™ืœื™ื)
  • ืžื•ื“ืจื˜ื•ืจื™ื ืฉืœ SSO: ืžืฉืชืžืฉื™ื ืขื ื”ื“ื’ืœ isCommentModeratorAdmin ืžื—ื•ื™ื™ื‘ื™ื ื‘ื ืคืจื“ ื›-ืžื•ื“ืจื˜ื•ืจื™ื ืฉืœ SSO (ืื•ืชื• ืฉื™ืขื•ืจ ื›ืžื• ืžื•ื“ืจื˜ื•ืจื™ื ืจื’ื™ืœื™ื)

ื—ืฉื•ื‘: ื›ื“ื™ ืœืžื ื•ืข ื—ื™ื•ื‘ ื›ืคื•ืœ, ื”ืžืขืจื›ืช ืžื‘ื˜ืœืช ื›ืคื™ืœื•ื™ื•ืช ืื•ื˜ื•ืžื˜ื™ืช ื‘ื™ืŸ ืžืฉืชืžืฉื™ SSO ืœื‘ื™ืŸ ืžืฉืชืžืฉื™ ืฉื•ื›ืจ ืจื’ื™ืœื™ื ื•ืžื•ื“ืจื˜ื•ืจื™ื ืขืœ ื‘ืกื™ืก ื›ืชื•ื‘ืช ืื™ืžื™ื™ืœ. ืื ืœืžืฉืชืžืฉ SSO ื™ืฉ ืืช ืื•ืชื” ื›ืชื•ื‘ืช ืื™ืžื™ื™ืœ ื›ืžื• ืžืฉืชืžืฉ ืฉื•ื›ืจ ืจื’ื™ืœ ืื• ืžื•ื“ืจื˜ื•ืจ, ื”ื•ื ืœื ื™ื—ื•ื™ื‘ ืคืขืžื™ื™ื.

ื‘ืงืจืช ื’ื™ืฉื”

ืžืฉืชืžืฉื™ื ื™ื›ื•ืœื™ื ืœื”ื™ื•ืช ืžื—ื•ืœืงื™ื ืœืงื‘ื•ืฆื•ืช. ืœื–ื” ืžื™ื•ืขื“ ื”ืฉื“ื” groupIds, ื•ื”ื•ื ืื•ืคืฆื™ื•ื ืœื™.

@ืื–ื›ื•ืจื™ื

ื‘ืจื™ืจืช ื”ืžื—ื“ืœ @mentions ื™ืฉืชืžืฉ ื‘-username ื›ื“ื™ ืœื—ืคืฉ ืžืฉืชืžืฉื™ SSO ืื—ืจื™ื ื›ืืฉืจ ืžืงืœื™ื“ื™ื ืืช ื”ืชื• @. ืื ืžืฉืชืžืฉื™ื ื‘-displayName, ืื– ืชื•ืฆืื•ืช ื”ืชื•ืืžื•ืช ืœ-username ื™ื™ื“ื—ื• ื›ืืฉืจ ื™ืฉ ื”ืชืืžื” ืœ-displayName, ื•ืชื•ืฆืื•ืช ื”ื—ื™ืคื•ืฉ ืฉืœ ื”-@mention ื™ืฉืชืžืฉื• ื‘-displayName.

ืžื ื•ื™ื™ื

ื‘-FastComments, ืžืฉืชืžืฉื™ื ื™ื›ื•ืœื™ื ืœื”ื™ืจืฉื ืœื“ืฃ ืขืœ ื™ื“ื™ ืœื—ื™ืฆื” ืขืœ ืกืžืœ ื”ืคืขืžื•ืŸ ื‘ื•ื•ื™ื“ื’'ื˜ ื”ืชื’ื•ื‘ื•ืช ื•ืœื—ื™ืฆื” ืขืœ ื”ืจืฉืžื”.

ืขื ืžืฉืชืžืฉ ืจื’ื™ืœ, ืื ื• ืฉื•ืœื—ื™ื ืœื• ืื™ืžื™ื™ืœื™ ื”ืชืจืื•ืช ืขืœ ื‘ืกื™ืก ื”ื’ื“ืจื•ืช ื”ื”ืชืจืื•ืช ืฉืœื•.

ืขื ืžืฉืชืžืฉื™ SSO, ืื ื• ืžืคืฆืœื™ื ื–ืืช ืœืชืื™ืžื•ืช ืœืื—ื•ืจ. ืžืฉืชืžืฉื™ื ื™ืงื‘ืœื• ื”ื•ื“ืขื•ืช ืื™ืžื™ื™ืœ ื ื•ืกืคื•ืช ืืœื” ืจืง ืื ืชื’ื“ื™ืจื• ืืช optedInSubscriptionNotifications ืœ-true.

ืกืžืœื™ื

ื ื™ืชืŸ ืœื”ืงืฆื•ืช ืกืžืœื™ื ืœืžืฉืชืžืฉื™ SSO ื‘ืืžืฆืขื•ืช ื”ืฉื“ื” badgeConfig. ืกืžืœื™ื ื”ื ืื™ื ื“ื™ืงื˜ื•ืจื™ื ื•ื™ื–ื•ืืœื™ื™ื ื”ืžื•ืคื™ืขื™ื ืœืฆื“ ืฉื ื”ืžืฉืชืžืฉ ื‘ืชื’ื•ื‘ื•ืช.

  • badgeIds - ืžืขืจืš ืžื–ื”ื™ ืกืžืœื™ื ืฉื™ื•ืงืฆื• ืœืžืฉืชืžืฉ. ืืœื” ืกืžืœื™ื ื’ืœื•ื‘ืœื™ื™ื ื”ื ืจืื™ื ื‘ื›ืœ ื”ื“ืคื™ื. ื—ื™ื™ื‘ื™ื ืœื”ื™ื•ืช ืžื–ื”ื™ ืกืžืœื™ื ืชืงืคื™ื ืฉื ื•ืฆืจื• ื‘ื—ืฉื‘ื•ืŸ FastComments ืฉืœืš. ืžื•ื’ื‘ืœื™ื ืœ-30 ืกืžืœื™ื.
  • pageBadgeIds - ืžืขืจืš ืžื–ื”ื™ ืกืžืœื™ื ืื•ืคืฆื™ื•ื ืœื™ ื”ืžื•ื’ื“ืจ ืœื“ืฃ ื”ื ื•ื›ื—ื™ (urlId). ืกืžืœื™ื ืืœื” ืžื•ืฆื’ื™ื ืจืง ื‘ื“ืฃ ืฉื‘ื• ื”ื•ืงืฆื•. ื“ืคื™ื ืฉื•ื ื™ื ื™ื›ื•ืœื™ื ืœื”ื›ื™ืœ ืกืžืœื™ื ืกืคืฆื™ืคื™ื™ื ืœื“ืฃ ืฉื•ื ื™ื ืขื‘ื•ืจ ืื•ืชื• ืžืฉืชืžืฉ.
  • override - ืื true, ื›ืœ ื”ืกืžืœื™ื ื”ืžื•ืฆื’ื™ื ื”ืงื™ื™ืžื™ื ื™ื•ื—ืœืคื• ื‘ืืœื• ืฉืกื•ืคืงื•. ืกืžืœื™ื ื’ืœื•ื‘ืœื™ื™ื ื•ืกืคืฆื™ืคื™ื™ื ืœื“ืฃ ืžื•ื—ืœืคื™ื ื‘ืื•ืคืŸ ืขืฆืžืื™ โ€” ื”ื—ืœืคื” ืฉืœ ืกืžืœื™ื ื’ืœื•ื‘ืœื™ื™ื ืœื ืžืฉืคื™ืขื” ืขืœ ืกืžืœื™ื ืกืคืฆื™ืคื™ื™ื ืœื“ืฃ, ื•ืœื”ืคืš. ืื false ืื• ืœื ืฆื•ื™ื™ืŸ, ื”ืกืžืœื™ื ืฉืกื•ืคืงื• ื™ืชื•ื•ืกืคื• ืœืกืžืœื™ื ื”ืงื™ื™ืžื™ื.
  • update - ืื true, ืชื›ื•ื ื•ืช ืชืฆื•ื’ืช ื”ืกืžืœ ื™ืขื•ื“ื›ื ื• ืžืชื•ืš ืชืฆื•ืจืช ื”ืฉื•ื›ืจ ื›ืœ ืคืขื ืฉื”ืžืฉืชืžืฉ ื™ื™ื›ื ืก.

ืžื‘ื ื” ืžื ื•ื™ Internal Link

ืื•ื‘ื™ื™ืงื˜ Subscription ืžื™ื™ืฆื’ ืžื ื•ื™ ืขื‘ื•ืจ ืžืฉืชืžืฉ.

ืื•ื‘ื™ื™ืงื˜ื™ Subscription ื ื•ืฆืจื™ื ื›ืืฉืจ ืžืฉืชืžืฉ ืœื•ื—ืฅ ืขืœ ืคืขืžื•ืŸ ื”ื”ืชืจืื•ืช ื‘ื•ื•ื™ื“ื’'ื˜ ื”ืชื’ื•ื‘ื•ืช ื•ืœื•ื—ืฅ ืขืœ "ื”ื™ืจืฉื ืœืขืžื•ื“ ื–ื”".

ื ื™ืชืŸ ื’ื ืœื™ืฆื•ืจ ืžื ื•ื™ื™ื ื“ืจืš ื”-API.

ืงื™ื•ื ืื•ื‘ื™ื™ืงื˜ Subscription ื’ื•ืจื ืœื™ืฆื™ืจืช ืื•ื‘ื™ื™ืงื˜ื™ Notification, ื•ืฉืœื™ื—ืช ืื™ืžื™ื™ืœื™ื, ื›ืืฉืจ ืชื’ื•ื‘ื•ืช ื—ื“ืฉื•ืช ื ืฉืืจื•ืช ื‘ืฉื•ืจืฉ ื”ืขืžื•ื“ ื”ืžืฉื•ื™ืš ืฉื”-Subscription ื”ื•ื ืขื‘ื•ืจื•. ืฉืœื™ื—ืช ืื™ืžื™ื™ืœื™ื ืชืœื•ื™ื” ื‘ืกื•ื’ ื”ืžืฉืชืžืฉ. ืœืžืฉืชืžืฉื™ื ืจื’ื™ืœื™ื ื–ื” ืชืœื•ื™ ื‘-optedInNotifications. ืœืžืฉืชืžืฉื™ SSO ื–ื” ืชืœื•ื™ ื‘-optedInSubscriptionNotifications. ืฉื™ื ืœื‘ ืฉืœื—ืœืง ืžื”ืืคืœื™ืงืฆื™ื•ืช ืื•ืœื™ ืื™ืŸ ืืช ื”ืจืขื™ื•ืŸ ืฉืœ ืขืžื•ื“ ื ื’ื™ืฉ ืœืื™ื ื˜ืจื ื˜, ื‘ืžืงืจื” ื–ื” ืคืฉื•ื˜ ื”ื’ื“ืจ ืืช urlId ืœ- ืžื–ื”ื” ื”ืคืจื™ื˜ ืฉืืชื” ื ืจืฉื ืืœื™ื• (ืื•ืชื• ืขืจืš ืขื‘ื•ืจ urlId ืฉื”ื™ื™ืช ืžืขื‘ื™ืจ ืœื•ื•ื™ื“ื’'ื˜ ื”ืชื’ื•ื‘ื•ืช).

ื”ืžื‘ื ื” ืขื‘ื•ืจ ืื•ื‘ื™ื™ืงื˜ Subscription ื”ื•ื ื›ื“ืœืงืžืŸ:

ืžื‘ื ื” ืžื ื•ื™
Copy Copy
1
2interface Subscription {
3 id: string
4 tenantId: string
5 /** With SSO, the user id is in the format `<tenant id>:<user id>`. **/
6 userId: string
7 anonUserId?: string
8 urlId: string
9 url?: string
10 pageTitle?: string
11 createdAt: string // date string
12}
13

ืžื‘ื ื” ืฉื™ืžื•ืฉ ื™ื•ืžื™ ืฉืœ ืฉื•ื›ืจ Internal Link

ืื•ื‘ื™ื™ืงื˜ TenantDailyUsage ืžื™ื™ืฆื’ ืืช ื”ืฉื™ืžื•ืฉ ืฉืœ ืฉื•ื›ืจ ื‘ื™ื•ื ื ืชื•ืŸ. ืื ืœื ื”ื™ื™ืชื” ืคืขื™ืœื•ืช ืœืฉื•ื›ืจ ื ืชื•ืŸ ื‘ื™ื•ื ื ืชื•ืŸ, ืื•ืชื• ื™ื•ื ืœื ื™ื”ื™ื” ืœื• ืื•ื‘ื™ื™ืงื˜ TenantDailyUsage.

ืื•ื‘ื™ื™ืงื˜ TenantDailyUsage ืื™ื ื• ื‘ื–ืžืŸ ืืžืช ื•ืขืฉื•ื™ ืœื”ื™ื•ืช ืžืกืคืจ ื“ืงื•ืช ืžืื—ื•ืจื™ ื”ืฉื™ืžื•ืฉ ื‘ืคื•ืขืœ.

ื”ืžื‘ื ื” ืขื‘ื•ืจ ืื•ื‘ื™ื™ืงื˜ TenantDailyUsage ื”ื•ื ื›ื“ืœืงืžืŸ:

ืžื‘ื ื” TenantDailyUsage
Copy Copy
1
2export interface TenantDailyUsage {
3 yearNumber: number
4 monthNumber: number
5 dayNumber: number
6 commentFetchCount?: number
7 commentCreateCount?: number
8 conversationCreateCount?: number
9 voteCount?: number
10 accountCreatedCount?: number
11 userMentionSearch?: number
12 hashTagSearch?: number
13 gifSearchTrending?: number
14 gifSearch?: number
15 apiCreditsUsed?: number
16 createdAt: string
17 billed: boolean
18 /** Ignored for billing. **/
19 ignored: boolean
20}
21

ืžื‘ื ื” ืฉื•ื›ืจ Internal Link

Tenant ืžื’ื“ื™ืจ ืœืงื•ื— ืฉืœ FastComments.com. ื ื™ืชืŸ ืœื™ืฆื•ืจ ืื•ืชื ื“ืจืš ื”-API ืขืœ ื™ื“ื™ ืฉื•ื›ืจื™ื ืขื ื’ื™ืฉืช white labeling. ืฉื•ื›ืจื™ white labeled ืœื ื™ื›ื•ืœื™ื ืœื™ืฆื•ืจ ืฉื•ื›ืจื™ white labeled ืื—ืจื™ื (ืจืง ืจืžื” ืื—ืช ืฉืœ ืงื™ื ื•ืŸ ืžื•ืชืจืช).

ื”ืžื‘ื ื” ืขื‘ื•ืจ ืื•ื‘ื™ื™ืงื˜ Tenant ื”ื•ื ื›ื“ืœืงืžืŸ:

ืžื‘ื ื” ืฉื•ื›ืจ
Copy Copy
1
2export enum SiteType {
3 Unknown = 0,
4 WordPress = 1
5}
6
7/** This can also be handled via the DomainConfig API. **/
8export interface TenantDomainConfig {
9 domain: string
10 emailFromName?: string
11 emailFromEmail?: string
12 createdAt?: string,
13 siteType?: FastCommentsSiteType, // you probably want Unknown
14 logoSrc?: string, // raw image path
15 logoSrc100px?: string, // resized for thumbnails
16 footerUnsubscribeURL?: string,
17 emailHeaders?: Record<string, string>,
18 disableUnsubscribeLinks?: boolean,
19 dkim?: {
20 domainName: string,
21 keySelector: string,
22 privateKey: string
23 }
24}
25
26export interface TenantBillingInfo {
27 name: string
28 address: string
29 city: string
30 state: string
31 zip: string
32 country: string
33}
34
35export enum TenantPaymentFrequency {
36 Monthly = 0,
37 Annually = 1
38}
39
40export interface Tenant {
41 id: string
42 name: string
43 email?: string
44 signUpDate: number; // number due to "legacy" reasons
45 packageId?: string | null
46 paymentFrequency?: TenantPaymentFrequency
47 billingInfoValid?: boolean
48 billingHandledExternally?: boolean
49 createdBy?: string
50 isSetup?: boolean
51 domainConfiguration: FastCommentsAPITenantDomainConfig[]
52 billingInfo?: FastCommentsAPITenantBillingInfo
53 stripeCustomerId?: string
54 stripeSubscriptionId?: string
55 stripePlanId?: string
56 enableProfanityFilter?: boolean
57 enableSpamFilter?: boolean
58 lastBillingIssueReminderDate?: string
59 removeUnverifiedComments?: boolean
60 unverifiedCommentsTTLms?: number
61 commentsRequireApproval?: boolean
62 autoApproveCommentOnVerification?: boolean
63 sendProfaneToSpam?: boolean
64 /** @readonly - Is calculated based on packageId. **/
65 hasFlexPricing?: boolean
66 /** @readonly **/
67 flexLastBilledAmount?: number
68 /** @readonly - Is calculated based on packageId. **/
69 hasAuditing?: boolean
70 /** You can store a key value pair with the tenant which you can use to query. Keys cannot contain "." or "$", or be longer than 100 chars. Values may not be longer than 2k chars. **/
71 meta?: Record<string, string | null>
72}
73

ืžื‘ื ื” ืžืฉืชืžืฉ Internal Link

User ื”ื•ื ืื•ื‘ื™ื™ืงื˜ ื”ืžื™ื™ืฆื’ ืžื›ื ื” ืžืฉื•ืชืฃ ืฉืœ ื›ืœ ื”ืžืฉืชืžืฉื™ื.

ื–ื›ื•ืจ ืฉื‘-FastComments ื™ืฉ ืœื ื• ืžืกืคืจ ืžืงืจื™ ืฉื™ืžื•ืฉ ืฉื•ื ื™ื ืœืžืฉืชืžืฉื™ื:

  • SSO ืžืื•ื‘ื˜ื—
  • SSO ืคืฉื•ื˜
  • ืžืฉืชืžืฉื™ ืฉื•ื›ืจ (ืœื“ื•ื’ืžื”: ืžื ื”ืœื™ื)
  • ืžื’ื™ื‘ื™ื

API ื–ื” ืžื™ื•ืขื“ ืœืžื’ื™ื‘ื™ื ื•ืœืžืฉืชืžืฉื™ื ืฉื ื•ืฆืจื• ื“ืจืš SSO ืคืฉื•ื˜. ื‘ืขืฆื, ื›ืœ ืžืฉืชืžืฉ ืฉื ื•ืฆืจ ื“ืจืš ื”ืืชืจ ืฉืœืš ื ื™ืชืŸ ืœื’ื™ืฉื” ื“ืจืš API ื–ื”. ื ื™ืชืŸ ืœืื—ื–ืจ ื’ื ืžืฉืชืžืฉื™ ืฉื•ื›ืจ ื‘ื“ืจืš ื–ื•, ืืš ืชืงื‘ืœ ืžื™ื“ืข ื ื•ืกืฃ ืขืœ ื™ื“ื™ ืื™ื ื˜ืจืืงืฆื™ื” ืขื ื”-API /tenant-users/.

ืขื‘ื•ืจ SSO ืžืื•ื‘ื˜ื— ืื ื ื”ืฉืชืžืฉ ื‘-API /sso-users/.

ืœื ื ื™ืชืŸ ืœืขื“ื›ืŸ ืกื•ื’ื™ื ืืœื” ืฉืœ ืžืฉืชืžืฉื™ื. ื”ื ื™ืฆืจื• ืืช ื”ื—ืฉื‘ื•ืŸ ืฉืœื”ื ื“ืจืš ื”ืืชืจ ืฉืœืš, ืื– ืื ื• ืžืกืคืงื™ื ื’ื™ืฉื” ื‘ืกื™ืกื™ืช ืœืงืจื™ืื” ื‘ืœื‘ื“, ืื‘ืœ ืœื ื ื™ืชืŸ ืœื‘ืฆืข ืฉื™ื ื•ื™ื™ื. ืื ืืชื” ืจื•ืฆื” ืœืงื‘ืœ ื–ืจื™ืžื” ื›ื–ื• - ืืชื” ืฆืจื™ืš ืœื”ื’ื“ื™ืจ SSO ืžืื•ื‘ื˜ื—.

ื”ืžื‘ื ื” ืขื‘ื•ืจ ืื•ื‘ื™ื™ืงื˜ User ื”ื•ื ื›ื“ืœืงืžืŸ:

ืžื‘ื ื” User
Copy Copy
1
2export interface User {
3 /** This is also the id used as userId on comment objects. **/
4 id: string
5 username: string
6 /** A link to the commenter's blog, for example. **/
7 websiteUrl?: string
8 email: string
9 signUpDate: number
10 createdFromUrlId: string
11 createdFromTenantId: string
12 avatarSrc?: string
13 locale: FastCommentsLocale
14 displayLabel?: string
15 karma?: number
16}
17

ืžื‘ื ื” ื”ืฆื‘ืขื” Internal Link

ืื•ื‘ื™ื™ืงื˜ Vote ืžื™ื™ืฆื’ ื”ืฆื‘ืขื” ืฉื”ื•ืฉืืจื” ืขืœ ื™ื“ื™ ืžืฉืชืžืฉ.

ื”ื™ื—ืก ื‘ื™ืŸ ืชื’ื•ื‘ื•ืช ืœื”ืฆื‘ืขื” ืžื•ื’ื“ืจ ื‘ืืžืฆืขื•ืช commentId.

ื”ืžื‘ื ื” ืขื‘ื•ืจ ืื•ื‘ื™ื™ืงื˜ Vote ื”ื•ื ื›ื“ืœืงืžืŸ:

ืžื‘ื ื” ื”ืฆื‘ืขื”
Copy Copy
1
2interface Vote {
3 id: string
4 urlId: string
5 commentId: string
6 userId: string
7 direction: 1 | -1
8 createdAt: string
9}
10

ืžื‘ื ื” ื”ื’ื“ืจื•ืช ืฉืืœื” Internal Link

FastComments ืžืกืคืง ื“ืจืš ืœื‘ื ื•ืช ืฉืืœื•ืช ื•ืœืื’ื•ืจ ืืช ืชื•ืฆืื•ืชื™ื”ืŸ. ื“ื•ื’ืžื” ืœืฉืืœื” (ืœื”ืœืŸ ื ืงืจืืช QuestionConfig) ื™ื›ื•ืœื” ืœื”ื™ื•ืช ื“ื™ืจื•ื’ ื›ื•ื›ื‘ื™ื, ืžื—ื•ื•ืŸ, ืื• ืฉืืœืช NPS (ื ืงื‘ืข ื‘ืืžืฆืขื•ืช type).

ื ื™ืชืŸ ืœืื’ื•ืจ ื ืชื•ื ื™ ืฉืืœื•ืช ื‘ื ืคืจื“, ื™ื—ื“, ืœืื•ืจืš ื–ืžืŸ, ื‘ืื•ืคืŸ ื›ื•ืœืœ, ืœืคื™ ืขืžื•ื“, ื•ื›ืŸ ื”ืœืื”.

ืœืžืกื’ืจืช ื™ืฉ ืืช ื›ืœ ื”ื™ื›ื•ืœื•ืช ื”ื ื“ืจืฉื•ืช ืœื‘ื ื™ื™ืช ื•ื•ื™ื“ื’'ื˜ื™ื ื‘ืฆื“ ื”ืœืงื•ื— (ืขื ื”ืฉืจืช ืฉืœืš ืžื•ืœ API ื–ื”), ื“ืฉื‘ื•ืจื“ื™ื ืœืžื ื”ืœื™ื, ื•ื›ืœื™ ื“ื™ื•ื•ื—.

ืจืืฉื™ืช, ืขืœื™ื ื• ืœื”ื’ื“ื™ืจ QuestionConfig. ื”ืžื‘ื ื” ื”ื•ื ื›ื“ืœืงืžืŸ:

ืžื‘ื ื” QuestionConfig
Copy Copy
1
2type QuestionConfigType = 'nps' | 'slider' | 'star' | 'thumbs';
3
4interface QuestionConfig {
5 id: string
6 tenantId: string
7 name: string
8 question: string
9 helpText?: string
10 createdAt: string
11 createdBy: string
12 /** READONLY - incremented for each new response. **/
13 usedCount: number
14 /** A date string for when the configuration was last used (result left). **/
15 lastUsed?: string
16 type: QuestionConfigType
17 numStars?: number
18 min?: number
19 max?: number
20 defaultValue?: number
21 labelNegative?: string
22 labelPositive?: string
23 subQuestionIds?: string[]
24 alwaysShowSubQuestions?: boolean
25 reportingOrder: number
26}
27

ืžื‘ื ื” ืชื•ืฆืืช ืฉืืœื” Internal Link

ื›ื“ื™ ืœืฉืžื•ืจ ืชื•ืฆืื•ืช ืœืฉืืœื•ืช, ืืชื” ื™ื•ืฆืจ QuestionResult. ืœืื—ืจ ืžื›ืŸ ืชื•ื›ืœ ืœืื’ื•ืจ ืชื•ืฆืื•ืช ืฉืืœื•ืช, ื•ื’ื ืœืงืฉืจ ืื•ืชืŸ ืœืชื’ื•ื‘ื•ืช ืœืžื˜ืจื•ืช ื“ื™ื•ื•ื—.

ืžื‘ื ื” QuestionResult
Copy Copy
1
2interface QuestionResultMeta {
3 name: string
4 values: string[]
5}
6
7interface QuestionResult {
8 id: string
9 tenantId: string
10 urlId: string
11 anonUserId?: string
12 userId?: string
13 createdAt?: string
14 value: number
15 commentId?: string
16 questionId: string
17 meta?: QuestionResultMeta[]
18}
19

ืžื‘ื ื” ืชื’ ืžืฉืชืžืฉ Internal Link


UserBadge ื”ื•ื ืื•ื‘ื™ื™ืงื˜ ืฉืžื™ื™ืฆื’ ืชื’ ืฉืžื•ืงืฆื” ืœืžืฉืชืžืฉ ื‘ืžืขืจื›ืช FastComments.

ืชื’ื™ื ื™ื›ื•ืœื™ื ืœื”ื™ื•ืช ืžื•ืงืฆื™ื ืœืžืฉืชืžืฉื™ื ื‘ืื•ืคืŸ ืื•ื˜ื•ืžื˜ื™ ืขืœ ื‘ืกื™ืก ื”ืคืขื™ืœื•ืช ืฉืœื”ื (ื›ื’ื•ืŸ ืžืกืคืจ ืชื’ื•ื‘ื•ืช, ื–ืžืŸ ืชื’ื•ื‘ื”, ืกื˜ื˜ื•ืก ื•ื•ืชืง) ืื• ื‘ืื•ืคืŸ ื™ื“ื ื™ ืขืœ ื™ื“ื™ ืžื ื”ืœื™ ื”ืืชืจ.

ื”ืžื‘ื ื” ืฉืœ ื”ืื•ื‘ื™ื™ืงื˜ UserBadge ื”ื•ื ื›ื“ืœืงืžืŸ:

ืžื‘ื ื” UserBadge
Copy Copy
1
2export interface UserBadge {
3 /** ืžื–ื”ื” ื™ื™ื—ื•ื“ื™ ืœื”ืงืฆืืช ืชื’ ื”ืžืฉืชืžืฉ ื”ื–ื• */
4 id: string
5 /** ID of the user this badge is assigned to */
6 userId: string
7 /** ID of the badge definition from the tenant's badge catalog */
8 badgeId: string
9 /** ID of the tenant that created/assigned this badge */
10 fromTenantId: string
11 /** When this badge was created (milliseconds since epoch) */
12 createdAt?: number
13 /** When this badge was received by the user (milliseconds since epoch) */
14 receivedAt?: number
15 /**
16 * ืกื•ื’ ื”ืชื’:
17 * 0=CommentCount, 1=CommentUpVotes, 2=CommentReplies, 3=CommentsPinned,
18 * 4=Veteran, 5=NightOwl, 6=FastReplyTime, 7=ModeratorCommentsDeleted,
19 * 8=ModeratorCommentsApproved, 9=ModeratorCommentsUnapproved, 10=ModeratorCommentsReviewed,
20 * 11=ModeratorCommentsMarkedSpam, 12=ModeratorCommentsMarkedNotSpam, 13=RepliedToSpecificPage,
21 * 14=Manual
22 */
23 type: number
24 /** For threshold-based badges, the threshold value */
25 threshold?: number
26 /** The name/label of the badge */
27 name?: string
28 /** Detailed description of the badge */
29 description?: string
30 /** The text shown on the badge */
31 displayLabel?: string
32 /** URL to an image shown on the badge */
33 displaySrc?: string
34 /** Background color for the badge (hex code) */
35 backgroundColor?: string
36 /** Border color for the badge (hex code) */
37 borderColor?: string
38 /** Text color for the badge (hex code) */
39 textColor?: string
40 /** Additional CSS class for styling */
41 cssClass?: string
42 /** For veteran badges, the time threshold in milliseconds */
43 veteranUserThresholdMillis?: number
44 /** Whether this badge is displayed on the user's comments */
45 displayedOnComments: boolean
46 /** The display order of the badge */
47 order?: number
48 /** If set, this badge is only displayed on the page with the matching urlId. Null for global badges. */
49 urlId?: string | null
50}
51
---

ืžื‘ื ื” ื”ืชืงื“ืžื•ืช ืชื’ื™ ืžืฉืชืžืฉ Internal Link

UserBadgeProgress ื”ื•ื ืื•ื‘ื™ื™ืงื˜ ื”ืžื™ื™ืฆื’ ืืช ื”ื”ืชืงื“ืžื•ืช ืฉืœ ืžืฉืชืžืฉ ืœืงืจืืช ืงื‘ืœืช ืชื’ื™ื ืฉื•ื ื™ื ื‘ืžืขืจื›ืช FastComments.

ืžืขืงื‘ ื–ื” ืขื•ื–ืจ ืœืงื‘ื•ืข ืžืชื™ ืžืฉืชืžืฉื™ื ืฆืจื™ื›ื™ื ืœืงื‘ืœ ืชื’ื™ื ืื•ื˜ื•ืžื˜ื™ื™ื ื‘ื”ืชื‘ืกืก ืขืœ ื”ืคืขื™ืœื•ืช ื•ื”ื”ืฉืชืชืคื•ืช ืฉืœื”ื ื‘ืงื”ื™ืœื” ืฉืœืš.

ื”ืžื‘ื ื” ืขื‘ื•ืจ ืื•ื‘ื™ื™ืงื˜ UserBadgeProgress ื”ื•ื ื›ื“ืœืงืžืŸ:

ืžื‘ื ื” UserBadgeProgress
Copy Copy
1
2export interface UserBadgeProgress {
3 /** Unique identifier for this progress record */
4 id: string
5 /** ID of the tenant this progress record belongs to */
6 tenantId: string
7 /** ID of the user this progress record tracks */
8 userId: string
9 /** ID of the user's first comment in the system */
10 firstCommentId?: string
11 /** Date of the user's first comment (milliseconds since epoch) */
12 firstCommentDate?: number
13 /** Automatically calculated trust factor based on user activity */
14 autoTrustFactor?: number
15 /** Manually set trust factor by administrators */
16 manualTrustFactor?: number
17 /** Detailed progress object with various metrics, keys match BadgeType enum */
18 progress: {
19 /** 0: CommentCount - Count of comments the user has made */
20 '0'?: number
21 /** 1: CommentUpVotes - Count of upvotes the user has received */
22 '1'?: number
23 /** 2: CommentReplies - Count of replies the user has made */
24 '2'?: number
25 /** 3: CommentsPinned - Count of pinned comments the user has */
26 '3'?: number
27 /** 4: Veteran - User's account age */
28 '4'?: number
29 /** 5: NightOwl - Times user has posted during nighttime hours */
30 '5'?: number
31 /** 6: FastReplyTime - Average reply time in milliseconds */
32 '6'?: number
33 /** 7: ModeratorCommentsDeleted - For moderator badges, comments deleted count */
34 '7'?: number
35 /** 8: ModeratorCommentsApproved - For moderator badges, comments approved count */
36 '8'?: number
37 /** 9: ModeratorCommentsUnapproved - For moderator badges, comments unapproved count */
38 '9'?: number
39 /** 10: ModeratorCommentsReviewed - For moderator badges, comments reviewed count */
40 '10'?: number
41 /** 11: ModeratorCommentsMarkedSpam - For moderator badges, comments marked as spam count */
42 '11'?: number
43 /** 12: ModeratorCommentsMarkedNotSpam - For moderator badges, comments marked as not spam count */
44 '12'?: number
45 /** 13: RepliedToSpecificPage - For each page, count of replies */
46 '13'?: Record<string, number>
47 }
48}
49

ืœืกื™ื›ื•ื

ืื ื• ืžืงื•ื•ื™ื ืฉืžืฆืืชื ืืช ืชื™ืขื•ื“ ื”-API ืฉืœื ื• ืžืงื™ืฃ ื•ืงืœ ืœื”ื‘ื ื”. ืื ืžืฆืืชื ืคืขืจื™ื, ืื ื ืขื“ื›ื ื• ืื•ืชื ื• ืœืžื˜ื”.