@atproto/api 0.6.23 → 0.6.24-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/client/index.d.ts +23 -25
  2. package/dist/client/lexicons.d.ts +441 -367
  3. package/dist/client/types/com/atproto/admin/defs.d.ts +114 -48
  4. package/dist/client/types/com/atproto/admin/{takeModerationAction.d.ts → emitModerationEvent.d.ts} +5 -6
  5. package/dist/client/types/com/atproto/admin/{getModerationAction.d.ts → getModerationEvent.d.ts} +1 -1
  6. package/dist/client/types/com/atproto/admin/{getModerationActions.d.ts → queryModerationEvents.d.ts} +5 -1
  7. package/dist/client/types/com/atproto/admin/{getModerationReports.d.ts → queryModerationStatuses.d.ts} +12 -6
  8. package/dist/client/types/com/atproto/admin/sendEmail.d.ts +1 -0
  9. package/dist/client/types/com/atproto/{admin/getModerationReport.d.ts → temp/fetchLabels.d.ts} +7 -3
  10. package/dist/index.js +1179 -1042
  11. package/dist/index.js.map +3 -3
  12. package/package.json +17 -14
  13. package/src/client/index.ts +68 -80
  14. package/src/client/lexicons.ts +664 -570
  15. package/src/client/types/app/bsky/actor/defs.ts +2 -2
  16. package/src/client/types/app/bsky/actor/searchActors.ts +2 -2
  17. package/src/client/types/app/bsky/actor/searchActorsTypeahead.ts +2 -2
  18. package/src/client/types/app/bsky/feed/searchPosts.ts +3 -3
  19. package/src/client/types/app/bsky/graph/defs.ts +2 -2
  20. package/src/client/types/app/bsky/unspecced/searchActorsSkeleton.ts +4 -4
  21. package/src/client/types/app/bsky/unspecced/searchPostsSkeleton.ts +3 -3
  22. package/src/client/types/com/atproto/admin/defs.ts +276 -84
  23. package/src/client/types/com/atproto/admin/disableAccountInvites.ts +1 -1
  24. package/src/client/types/com/atproto/admin/{takeModerationAction.ts → emitModerationEvent.ts} +13 -11
  25. package/src/client/types/com/atproto/admin/enableAccountInvites.ts +1 -1
  26. package/src/client/types/com/atproto/admin/{getModerationReport.ts → getModerationEvent.ts} +1 -1
  27. package/src/client/types/com/atproto/admin/{getModerationReports.ts → queryModerationEvents.ts} +8 -15
  28. package/src/client/types/com/atproto/admin/queryModerationStatuses.ts +60 -0
  29. package/src/client/types/com/atproto/admin/sendEmail.ts +1 -0
  30. package/src/client/types/com/atproto/label/defs.ts +9 -9
  31. package/src/client/types/com/atproto/label/queryLabels.ts +2 -2
  32. package/src/client/types/com/atproto/repo/applyWrites.ts +1 -1
  33. package/src/client/types/com/atproto/repo/createRecord.ts +2 -2
  34. package/src/client/types/com/atproto/repo/deleteRecord.ts +2 -2
  35. package/src/client/types/com/atproto/repo/listRecords.ts +1 -1
  36. package/src/client/types/com/atproto/repo/putRecord.ts +3 -3
  37. package/src/client/types/com/atproto/sync/listBlobs.ts +1 -1
  38. package/src/client/types/com/atproto/sync/subscribeRepos.ts +4 -4
  39. package/src/client/types/com/atproto/{admin/getModerationActions.ts → temp/fetchLabels.ts} +3 -5
  40. package/tests/rich-text-detection.test.ts +6 -0
  41. package/LICENSE.txt +0 -7
  42. package/dist/client/types/com/atproto/admin/resolveModerationReports.d.ts +0 -22
  43. package/dist/client/types/com/atproto/admin/reverseModerationAction.d.ts +0 -22
  44. package/src/client/types/com/atproto/admin/getModerationAction.ts +0 -32
  45. package/src/client/types/com/atproto/admin/resolveModerationReports.ts +0 -38
  46. package/src/client/types/com/atproto/admin/reverseModerationAction.ts +0 -38
@@ -169,7 +169,7 @@ export function validateSavedFeedsPref(v: unknown): ValidationResult {
169
169
  }
170
170
 
171
171
  export interface PersonalDetailsPref {
172
- /** The birth date of the owner of the account. */
172
+ /** The birth date of account owner. */
173
173
  birthDate?: string
174
174
  [k: string]: unknown
175
175
  }
@@ -215,7 +215,7 @@ export function validateFeedViewPref(v: unknown): ValidationResult {
215
215
  }
216
216
 
217
217
  export interface ThreadViewPref {
218
- /** Sorting mode. */
218
+ /** Sorting mode for threads. */
219
219
  sort?: 'oldest' | 'newest' | 'most-likes' | 'random' | (string & {})
220
220
  /** Show followed users at the top of all replies. */
221
221
  prioritizeFollowedUsers?: boolean
@@ -9,9 +9,9 @@ import { CID } from 'multiformats/cid'
9
9
  import * as AppBskyActorDefs from './defs'
10
10
 
11
11
  export interface QueryParams {
12
- /** DEPRECATED: use 'q' instead */
12
+ /** DEPRECATED: use 'q' instead. */
13
13
  term?: string
14
- /** search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended */
14
+ /** Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. */
15
15
  q?: string
16
16
  limit?: number
17
17
  cursor?: string
@@ -9,9 +9,9 @@ import { CID } from 'multiformats/cid'
9
9
  import * as AppBskyActorDefs from './defs'
10
10
 
11
11
  export interface QueryParams {
12
- /** DEPRECATED: use 'q' instead */
12
+ /** DEPRECATED: use 'q' instead. */
13
13
  term?: string
14
- /** search query prefix; not a full query string */
14
+ /** Search query prefix; not a full query string. */
15
15
  q?: string
16
16
  limit?: number
17
17
  }
@@ -9,10 +9,10 @@ import { CID } from 'multiformats/cid'
9
9
  import * as AppBskyFeedDefs from './defs'
10
10
 
11
11
  export interface QueryParams {
12
- /** search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended */
12
+ /** Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. */
13
13
  q: string
14
14
  limit?: number
15
- /** optional pagination mechanism; may not necessarily allow scrolling through entire result set */
15
+ /** Optional pagination mechanism; may not necessarily allow scrolling through entire result set. */
16
16
  cursor?: string
17
17
  }
18
18
 
@@ -20,7 +20,7 @@ export type InputSchema = undefined
20
20
 
21
21
  export interface OutputSchema {
22
22
  cursor?: string
23
- /** count of search hits. optional, may be rounded/truncated, and may not be possible to paginate through all hits */
23
+ /** Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits. */
24
24
  hitsTotal?: number
25
25
  posts: AppBskyFeedDefs.PostView[]
26
26
  [k: string]: unknown
@@ -79,9 +79,9 @@ export type ListPurpose =
79
79
  | 'app.bsky.graph.defs#curatelist'
80
80
  | (string & {})
81
81
 
82
- /** A list of actors to apply an aggregate moderation action (mute/block) on */
82
+ /** A list of actors to apply an aggregate moderation action (mute/block) on. */
83
83
  export const MODLIST = 'app.bsky.graph.defs#modlist'
84
- /** A list of actors used for curation purposes such as list feeds or interaction gating */
84
+ /** A list of actors used for curation purposes such as list feeds or interaction gating. */
85
85
  export const CURATELIST = 'app.bsky.graph.defs#curatelist'
86
86
 
87
87
  export interface ListViewerState {
@@ -9,12 +9,12 @@ import { CID } from 'multiformats/cid'
9
9
  import * as AppBskyUnspeccedDefs from './defs'
10
10
 
11
11
  export interface QueryParams {
12
- /** search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. For typeahead search, only simple term match is supported, not full syntax */
12
+ /** Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. For typeahead search, only simple term match is supported, not full syntax. */
13
13
  q: string
14
- /** if true, acts as fast/simple 'typeahead' query */
14
+ /** If true, acts as fast/simple 'typeahead' query. */
15
15
  typeahead?: boolean
16
16
  limit?: number
17
- /** optional pagination mechanism; may not necessarily allow scrolling through entire result set */
17
+ /** Optional pagination mechanism; may not necessarily allow scrolling through entire result set. */
18
18
  cursor?: string
19
19
  }
20
20
 
@@ -22,7 +22,7 @@ export type InputSchema = undefined
22
22
 
23
23
  export interface OutputSchema {
24
24
  cursor?: string
25
- /** count of search hits. optional, may be rounded/truncated, and may not be possible to paginate through all hits */
25
+ /** Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits. */
26
26
  hitsTotal?: number
27
27
  actors: AppBskyUnspeccedDefs.SkeletonSearchActor[]
28
28
  [k: string]: unknown
@@ -9,10 +9,10 @@ import { CID } from 'multiformats/cid'
9
9
  import * as AppBskyUnspeccedDefs from './defs'
10
10
 
11
11
  export interface QueryParams {
12
- /** search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended */
12
+ /** Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. */
13
13
  q: string
14
14
  limit?: number
15
- /** optional pagination mechanism; may not necessarily allow scrolling through entire result set */
15
+ /** Optional pagination mechanism; may not necessarily allow scrolling through entire result set. */
16
16
  cursor?: string
17
17
  }
18
18
 
@@ -20,7 +20,7 @@ export type InputSchema = undefined
20
20
 
21
21
  export interface OutputSchema {
22
22
  cursor?: string
23
- /** count of search hits. optional, may be rounded/truncated, and may not be possible to paginate through all hits */
23
+ /** Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits. */
24
24
  hitsTotal?: number
25
25
  posts: AppBskyUnspeccedDefs.SkeletonSearchPost[]
26
26
  [k: string]: unknown
@@ -28,43 +28,55 @@ export function validateStatusAttr(v: unknown): ValidationResult {
28
28
  return lexicons.validate('com.atproto.admin.defs#statusAttr', v)
29
29
  }
30
30
 
31
- export interface ActionView {
31
+ export interface ModEventView {
32
32
  id: number
33
- action: ActionType
34
- /** Indicates how long this action was meant to be in effect before automatically expiring. */
35
- durationInHours?: number
33
+ event:
34
+ | ModEventTakedown
35
+ | ModEventReverseTakedown
36
+ | ModEventComment
37
+ | ModEventReport
38
+ | ModEventLabel
39
+ | ModEventAcknowledge
40
+ | ModEventEscalate
41
+ | ModEventMute
42
+ | ModEventEmail
43
+ | { $type: string; [k: string]: unknown }
36
44
  subject:
37
45
  | RepoRef
38
46
  | ComAtprotoRepoStrongRef.Main
39
47
  | { $type: string; [k: string]: unknown }
40
48
  subjectBlobCids: string[]
41
- createLabelVals?: string[]
42
- negateLabelVals?: string[]
43
- reason: string
44
49
  createdBy: string
45
50
  createdAt: string
46
- reversal?: ActionReversal
47
- resolvedReportIds: number[]
51
+ creatorHandle?: string
52
+ subjectHandle?: string
48
53
  [k: string]: unknown
49
54
  }
50
55
 
51
- export function isActionView(v: unknown): v is ActionView {
56
+ export function isModEventView(v: unknown): v is ModEventView {
52
57
  return (
53
58
  isObj(v) &&
54
59
  hasProp(v, '$type') &&
55
- v.$type === 'com.atproto.admin.defs#actionView'
60
+ v.$type === 'com.atproto.admin.defs#modEventView'
56
61
  )
57
62
  }
58
63
 
59
- export function validateActionView(v: unknown): ValidationResult {
60
- return lexicons.validate('com.atproto.admin.defs#actionView', v)
64
+ export function validateModEventView(v: unknown): ValidationResult {
65
+ return lexicons.validate('com.atproto.admin.defs#modEventView', v)
61
66
  }
62
67
 
63
- export interface ActionViewDetail {
68
+ export interface ModEventViewDetail {
64
69
  id: number
65
- action: ActionType
66
- /** Indicates how long this action was meant to be in effect before automatically expiring. */
67
- durationInHours?: number
70
+ event:
71
+ | ModEventTakedown
72
+ | ModEventReverseTakedown
73
+ | ModEventComment
74
+ | ModEventReport
75
+ | ModEventLabel
76
+ | ModEventAcknowledge
77
+ | ModEventEscalate
78
+ | ModEventMute
79
+ | { $type: string; [k: string]: unknown }
68
80
  subject:
69
81
  | RepoView
70
82
  | RepoViewNotFound
@@ -72,123 +84,100 @@ export interface ActionViewDetail {
72
84
  | RecordViewNotFound
73
85
  | { $type: string; [k: string]: unknown }
74
86
  subjectBlobs: BlobView[]
75
- createLabelVals?: string[]
76
- negateLabelVals?: string[]
77
- reason: string
78
87
  createdBy: string
79
88
  createdAt: string
80
- reversal?: ActionReversal
81
- resolvedReports: ReportView[]
82
89
  [k: string]: unknown
83
90
  }
84
91
 
85
- export function isActionViewDetail(v: unknown): v is ActionViewDetail {
92
+ export function isModEventViewDetail(v: unknown): v is ModEventViewDetail {
86
93
  return (
87
94
  isObj(v) &&
88
95
  hasProp(v, '$type') &&
89
- v.$type === 'com.atproto.admin.defs#actionViewDetail'
96
+ v.$type === 'com.atproto.admin.defs#modEventViewDetail'
90
97
  )
91
98
  }
92
99
 
93
- export function validateActionViewDetail(v: unknown): ValidationResult {
94
- return lexicons.validate('com.atproto.admin.defs#actionViewDetail', v)
100
+ export function validateModEventViewDetail(v: unknown): ValidationResult {
101
+ return lexicons.validate('com.atproto.admin.defs#modEventViewDetail', v)
95
102
  }
96
103
 
97
- export interface ActionViewCurrent {
104
+ export interface ReportView {
98
105
  id: number
99
- action: ActionType
100
- /** Indicates how long this action was meant to be in effect before automatically expiring. */
101
- durationInHours?: number
102
- [k: string]: unknown
103
- }
104
-
105
- export function isActionViewCurrent(v: unknown): v is ActionViewCurrent {
106
- return (
107
- isObj(v) &&
108
- hasProp(v, '$type') &&
109
- v.$type === 'com.atproto.admin.defs#actionViewCurrent'
110
- )
111
- }
112
-
113
- export function validateActionViewCurrent(v: unknown): ValidationResult {
114
- return lexicons.validate('com.atproto.admin.defs#actionViewCurrent', v)
115
- }
116
-
117
- export interface ActionReversal {
118
- reason: string
119
- createdBy: string
106
+ reasonType: ComAtprotoModerationDefs.ReasonType
107
+ comment?: string
108
+ subjectRepoHandle?: string
109
+ subject:
110
+ | RepoRef
111
+ | ComAtprotoRepoStrongRef.Main
112
+ | { $type: string; [k: string]: unknown }
113
+ reportedBy: string
120
114
  createdAt: string
115
+ resolvedByActionIds: number[]
121
116
  [k: string]: unknown
122
117
  }
123
118
 
124
- export function isActionReversal(v: unknown): v is ActionReversal {
119
+ export function isReportView(v: unknown): v is ReportView {
125
120
  return (
126
121
  isObj(v) &&
127
122
  hasProp(v, '$type') &&
128
- v.$type === 'com.atproto.admin.defs#actionReversal'
123
+ v.$type === 'com.atproto.admin.defs#reportView'
129
124
  )
130
125
  }
131
126
 
132
- export function validateActionReversal(v: unknown): ValidationResult {
133
- return lexicons.validate('com.atproto.admin.defs#actionReversal', v)
127
+ export function validateReportView(v: unknown): ValidationResult {
128
+ return lexicons.validate('com.atproto.admin.defs#reportView', v)
134
129
  }
135
130
 
136
- export type ActionType =
137
- | 'lex:com.atproto.admin.defs#takedown'
138
- | 'lex:com.atproto.admin.defs#flag'
139
- | 'lex:com.atproto.admin.defs#acknowledge'
140
- | 'lex:com.atproto.admin.defs#escalate'
141
- | (string & {})
142
-
143
- /** Moderation action type: Takedown. Indicates that content should not be served by the PDS. */
144
- export const TAKEDOWN = 'com.atproto.admin.defs#takedown'
145
- /** Moderation action type: Flag. Indicates that the content was reviewed and considered to violate PDS rules, but may still be served. */
146
- export const FLAG = 'com.atproto.admin.defs#flag'
147
- /** Moderation action type: Acknowledge. Indicates that the content was reviewed and not considered to violate PDS rules. */
148
- export const ACKNOWLEDGE = 'com.atproto.admin.defs#acknowledge'
149
- /** Moderation action type: Escalate. Indicates that the content has been flagged for additional review. */
150
- export const ESCALATE = 'com.atproto.admin.defs#escalate'
151
-
152
- export interface ReportView {
131
+ export interface SubjectStatusView {
153
132
  id: number
154
- reasonType: ComAtprotoModerationDefs.ReasonType
155
- reason?: string
156
- subjectRepoHandle?: string
157
133
  subject:
158
134
  | RepoRef
159
135
  | ComAtprotoRepoStrongRef.Main
160
136
  | { $type: string; [k: string]: unknown }
161
- reportedBy: string
137
+ subjectBlobCids?: string[]
138
+ subjectRepoHandle?: string
139
+ /** Timestamp referencing when the last update was made to the moderation status of the subject */
140
+ updatedAt: string
141
+ /** Timestamp referencing the first moderation status impacting event was emitted on the subject */
162
142
  createdAt: string
163
- resolvedByActionIds: number[]
143
+ reviewState: SubjectReviewState
144
+ /** Sticky comment on the subject. */
145
+ comment?: string
146
+ muteUntil?: string
147
+ lastReviewedBy?: string
148
+ lastReviewedAt?: string
149
+ lastReportedAt?: string
150
+ takendown?: boolean
151
+ suspendUntil?: string
164
152
  [k: string]: unknown
165
153
  }
166
154
 
167
- export function isReportView(v: unknown): v is ReportView {
155
+ export function isSubjectStatusView(v: unknown): v is SubjectStatusView {
168
156
  return (
169
157
  isObj(v) &&
170
158
  hasProp(v, '$type') &&
171
- v.$type === 'com.atproto.admin.defs#reportView'
159
+ v.$type === 'com.atproto.admin.defs#subjectStatusView'
172
160
  )
173
161
  }
174
162
 
175
- export function validateReportView(v: unknown): ValidationResult {
176
- return lexicons.validate('com.atproto.admin.defs#reportView', v)
163
+ export function validateSubjectStatusView(v: unknown): ValidationResult {
164
+ return lexicons.validate('com.atproto.admin.defs#subjectStatusView', v)
177
165
  }
178
166
 
179
167
  export interface ReportViewDetail {
180
168
  id: number
181
169
  reasonType: ComAtprotoModerationDefs.ReasonType
182
- reason?: string
170
+ comment?: string
183
171
  subject:
184
172
  | RepoView
185
173
  | RepoViewNotFound
186
174
  | RecordView
187
175
  | RecordViewNotFound
188
176
  | { $type: string; [k: string]: unknown }
177
+ subjectStatus?: SubjectStatusView
189
178
  reportedBy: string
190
179
  createdAt: string
191
- resolvedByActions: ActionView[]
180
+ resolvedByActions: ModEventView[]
192
181
  [k: string]: unknown
193
182
  }
194
183
 
@@ -241,6 +230,7 @@ export interface RepoViewDetail {
241
230
  invites?: ComAtprotoServerDefs.InviteCode[]
242
231
  invitesDisabled?: boolean
243
232
  inviteNote?: string
233
+ emailConfirmedAt?: string
244
234
  [k: string]: unknown
245
235
  }
246
236
 
@@ -264,6 +254,7 @@ export interface AccountView {
264
254
  invitedBy?: ComAtprotoServerDefs.InviteCode
265
255
  invites?: ComAtprotoServerDefs.InviteCode[]
266
256
  invitesDisabled?: boolean
257
+ emailConfirmedAt?: string
267
258
  inviteNote?: string
268
259
  [k: string]: unknown
269
260
  }
@@ -398,7 +389,7 @@ export function validateRecordViewNotFound(v: unknown): ValidationResult {
398
389
  }
399
390
 
400
391
  export interface Moderation {
401
- currentAction?: ActionViewCurrent
392
+ subjectStatus?: SubjectStatusView
402
393
  [k: string]: unknown
403
394
  }
404
395
 
@@ -415,9 +406,7 @@ export function validateModeration(v: unknown): ValidationResult {
415
406
  }
416
407
 
417
408
  export interface ModerationDetail {
418
- currentAction?: ActionViewCurrent
419
- actions: ActionView[]
420
- reports: ReportView[]
409
+ subjectStatus?: SubjectStatusView
421
410
  [k: string]: unknown
422
411
  }
423
412
 
@@ -494,3 +483,206 @@ export function isVideoDetails(v: unknown): v is VideoDetails {
494
483
  export function validateVideoDetails(v: unknown): ValidationResult {
495
484
  return lexicons.validate('com.atproto.admin.defs#videoDetails', v)
496
485
  }
486
+
487
+ export type SubjectReviewState =
488
+ | 'lex:com.atproto.admin.defs#reviewOpen'
489
+ | 'lex:com.atproto.admin.defs#reviewEscalated'
490
+ | 'lex:com.atproto.admin.defs#reviewClosed'
491
+ | (string & {})
492
+
493
+ /** Moderator review status of a subject: Open. Indicates that the subject needs to be reviewed by a moderator */
494
+ export const REVIEWOPEN = 'com.atproto.admin.defs#reviewOpen'
495
+ /** Moderator review status of a subject: Escalated. Indicates that the subject was escalated for review by a moderator */
496
+ export const REVIEWESCALATED = 'com.atproto.admin.defs#reviewEscalated'
497
+ /** Moderator review status of a subject: Closed. Indicates that the subject was already reviewed and resolved by a moderator */
498
+ export const REVIEWCLOSED = 'com.atproto.admin.defs#reviewClosed'
499
+
500
+ /** Take down a subject permanently or temporarily */
501
+ export interface ModEventTakedown {
502
+ /** Indicates how long the takedown should be in effect before automatically expiring. */
503
+ durationInHours?: number
504
+ [k: string]: unknown
505
+ }
506
+
507
+ export function isModEventTakedown(v: unknown): v is ModEventTakedown {
508
+ return (
509
+ isObj(v) &&
510
+ hasProp(v, '$type') &&
511
+ v.$type === 'com.atproto.admin.defs#modEventTakedown'
512
+ )
513
+ }
514
+
515
+ export function validateModEventTakedown(v: unknown): ValidationResult {
516
+ return lexicons.validate('com.atproto.admin.defs#modEventTakedown', v)
517
+ }
518
+
519
+ /** Revert take down action on a subject */
520
+ export interface ModEventReverseTakedown {
521
+ /** Describe reasoning behind the reversal. */
522
+ comment?: string
523
+ [k: string]: unknown
524
+ }
525
+
526
+ export function isModEventReverseTakedown(
527
+ v: unknown,
528
+ ): v is ModEventReverseTakedown {
529
+ return (
530
+ isObj(v) &&
531
+ hasProp(v, '$type') &&
532
+ v.$type === 'com.atproto.admin.defs#modEventReverseTakedown'
533
+ )
534
+ }
535
+
536
+ export function validateModEventReverseTakedown(v: unknown): ValidationResult {
537
+ return lexicons.validate('com.atproto.admin.defs#modEventReverseTakedown', v)
538
+ }
539
+
540
+ /** Add a comment to a subject */
541
+ export interface ModEventComment {
542
+ comment: string
543
+ /** Make the comment persistent on the subject */
544
+ sticky?: boolean
545
+ [k: string]: unknown
546
+ }
547
+
548
+ export function isModEventComment(v: unknown): v is ModEventComment {
549
+ return (
550
+ isObj(v) &&
551
+ hasProp(v, '$type') &&
552
+ v.$type === 'com.atproto.admin.defs#modEventComment'
553
+ )
554
+ }
555
+
556
+ export function validateModEventComment(v: unknown): ValidationResult {
557
+ return lexicons.validate('com.atproto.admin.defs#modEventComment', v)
558
+ }
559
+
560
+ /** Report a subject */
561
+ export interface ModEventReport {
562
+ comment?: string
563
+ reportType: ComAtprotoModerationDefs.ReasonType
564
+ [k: string]: unknown
565
+ }
566
+
567
+ export function isModEventReport(v: unknown): v is ModEventReport {
568
+ return (
569
+ isObj(v) &&
570
+ hasProp(v, '$type') &&
571
+ v.$type === 'com.atproto.admin.defs#modEventReport'
572
+ )
573
+ }
574
+
575
+ export function validateModEventReport(v: unknown): ValidationResult {
576
+ return lexicons.validate('com.atproto.admin.defs#modEventReport', v)
577
+ }
578
+
579
+ /** Apply/Negate labels on a subject */
580
+ export interface ModEventLabel {
581
+ createLabelVals: string[]
582
+ negateLabelVals: string[]
583
+ [k: string]: unknown
584
+ }
585
+
586
+ export function isModEventLabel(v: unknown): v is ModEventLabel {
587
+ return (
588
+ isObj(v) &&
589
+ hasProp(v, '$type') &&
590
+ v.$type === 'com.atproto.admin.defs#modEventLabel'
591
+ )
592
+ }
593
+
594
+ export function validateModEventLabel(v: unknown): ValidationResult {
595
+ return lexicons.validate('com.atproto.admin.defs#modEventLabel', v)
596
+ }
597
+
598
+ export interface ModEventAcknowledge {
599
+ comment?: string
600
+ [k: string]: unknown
601
+ }
602
+
603
+ export function isModEventAcknowledge(v: unknown): v is ModEventAcknowledge {
604
+ return (
605
+ isObj(v) &&
606
+ hasProp(v, '$type') &&
607
+ v.$type === 'com.atproto.admin.defs#modEventAcknowledge'
608
+ )
609
+ }
610
+
611
+ export function validateModEventAcknowledge(v: unknown): ValidationResult {
612
+ return lexicons.validate('com.atproto.admin.defs#modEventAcknowledge', v)
613
+ }
614
+
615
+ export interface ModEventEscalate {
616
+ comment?: string
617
+ [k: string]: unknown
618
+ }
619
+
620
+ export function isModEventEscalate(v: unknown): v is ModEventEscalate {
621
+ return (
622
+ isObj(v) &&
623
+ hasProp(v, '$type') &&
624
+ v.$type === 'com.atproto.admin.defs#modEventEscalate'
625
+ )
626
+ }
627
+
628
+ export function validateModEventEscalate(v: unknown): ValidationResult {
629
+ return lexicons.validate('com.atproto.admin.defs#modEventEscalate', v)
630
+ }
631
+
632
+ /** Mute incoming reports on a subject */
633
+ export interface ModEventMute {
634
+ comment?: string
635
+ /** Indicates how long the subject should remain muted. */
636
+ durationInHours: number
637
+ [k: string]: unknown
638
+ }
639
+
640
+ export function isModEventMute(v: unknown): v is ModEventMute {
641
+ return (
642
+ isObj(v) &&
643
+ hasProp(v, '$type') &&
644
+ v.$type === 'com.atproto.admin.defs#modEventMute'
645
+ )
646
+ }
647
+
648
+ export function validateModEventMute(v: unknown): ValidationResult {
649
+ return lexicons.validate('com.atproto.admin.defs#modEventMute', v)
650
+ }
651
+
652
+ /** Unmute action on a subject */
653
+ export interface ModEventUnmute {
654
+ /** Describe reasoning behind the reversal. */
655
+ comment?: string
656
+ [k: string]: unknown
657
+ }
658
+
659
+ export function isModEventUnmute(v: unknown): v is ModEventUnmute {
660
+ return (
661
+ isObj(v) &&
662
+ hasProp(v, '$type') &&
663
+ v.$type === 'com.atproto.admin.defs#modEventUnmute'
664
+ )
665
+ }
666
+
667
+ export function validateModEventUnmute(v: unknown): ValidationResult {
668
+ return lexicons.validate('com.atproto.admin.defs#modEventUnmute', v)
669
+ }
670
+
671
+ /** Keep a log of outgoing email to a user */
672
+ export interface ModEventEmail {
673
+ /** The subject line of the email sent to the user. */
674
+ subjectLine: string
675
+ [k: string]: unknown
676
+ }
677
+
678
+ export function isModEventEmail(v: unknown): v is ModEventEmail {
679
+ return (
680
+ isObj(v) &&
681
+ hasProp(v, '$type') &&
682
+ v.$type === 'com.atproto.admin.defs#modEventEmail'
683
+ )
684
+ }
685
+
686
+ export function validateModEventEmail(v: unknown): ValidationResult {
687
+ return lexicons.validate('com.atproto.admin.defs#modEventEmail', v)
688
+ }
@@ -11,7 +11,7 @@ export interface QueryParams {}
11
11
 
12
12
  export interface InputSchema {
13
13
  account: string
14
- /** Additionally add a note describing why the invites were disabled */
14
+ /** Optional reason for disabled invites. */
15
15
  note?: string
16
16
  [k: string]: unknown
17
17
  }
@@ -12,26 +12,28 @@ import * as ComAtprotoRepoStrongRef from '../repo/strongRef'
12
12
  export interface QueryParams {}
13
13
 
14
14
  export interface InputSchema {
15
- action:
16
- | 'com.atproto.admin.defs#takedown'
17
- | 'com.atproto.admin.defs#flag'
18
- | 'com.atproto.admin.defs#acknowledge'
19
- | (string & {})
15
+ event:
16
+ | ComAtprotoAdminDefs.ModEventTakedown
17
+ | ComAtprotoAdminDefs.ModEventAcknowledge
18
+ | ComAtprotoAdminDefs.ModEventEscalate
19
+ | ComAtprotoAdminDefs.ModEventComment
20
+ | ComAtprotoAdminDefs.ModEventLabel
21
+ | ComAtprotoAdminDefs.ModEventReport
22
+ | ComAtprotoAdminDefs.ModEventMute
23
+ | ComAtprotoAdminDefs.ModEventReverseTakedown
24
+ | ComAtprotoAdminDefs.ModEventUnmute
25
+ | ComAtprotoAdminDefs.ModEventEmail
26
+ | { $type: string; [k: string]: unknown }
20
27
  subject:
21
28
  | ComAtprotoAdminDefs.RepoRef
22
29
  | ComAtprotoRepoStrongRef.Main
23
30
  | { $type: string; [k: string]: unknown }
24
31
  subjectBlobCids?: string[]
25
- createLabelVals?: string[]
26
- negateLabelVals?: string[]
27
- reason: string
28
- /** Indicates how long this action was meant to be in effect before automatically expiring. */
29
- durationInHours?: number
30
32
  createdBy: string
31
33
  [k: string]: unknown
32
34
  }
33
35
 
34
- export type OutputSchema = ComAtprotoAdminDefs.ActionView
36
+ export type OutputSchema = ComAtprotoAdminDefs.ModEventView
35
37
 
36
38
  export interface CallOptions {
37
39
  headers?: Headers
@@ -11,7 +11,7 @@ export interface QueryParams {}
11
11
 
12
12
  export interface InputSchema {
13
13
  account: string
14
- /** Additionally add a note describing why the invites were enabled */
14
+ /** Optional reason for enabled invites. */
15
15
  note?: string
16
16
  [k: string]: unknown
17
17
  }
@@ -13,7 +13,7 @@ export interface QueryParams {
13
13
  }
14
14
 
15
15
  export type InputSchema = undefined
16
- export type OutputSchema = ComAtprotoAdminDefs.ReportViewDetail
16
+ export type OutputSchema = ComAtprotoAdminDefs.ModEventViewDetail
17
17
 
18
18
  export interface CallOptions {
19
19
  headers?: Headers