@atproto/api 0.19.15 → 0.19.17

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 (143) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/client/index.d.ts +74 -3
  3. package/dist/client/index.d.ts.map +1 -1
  4. package/dist/client/index.js +178 -9
  5. package/dist/client/index.js.map +1 -1
  6. package/dist/client/lexicons.d.ts +11272 -8116
  7. package/dist/client/lexicons.d.ts.map +1 -1
  8. package/dist/client/lexicons.js +1800 -128
  9. package/dist/client/lexicons.js.map +1 -1
  10. package/dist/client/types/chat/bsky/convo/listConvos.d.ts +2 -0
  11. package/dist/client/types/chat/bsky/convo/listConvos.d.ts.map +1 -1
  12. package/dist/client/types/chat/bsky/convo/listConvos.js.map +1 -1
  13. package/dist/client/types/chat/bsky/group/defs.d.ts +6 -4
  14. package/dist/client/types/chat/bsky/group/defs.d.ts.map +1 -1
  15. package/dist/client/types/chat/bsky/group/defs.js +7 -7
  16. package/dist/client/types/chat/bsky/group/defs.js.map +1 -1
  17. package/dist/client/types/chat/bsky/group/{getGroupPublicInfo.d.ts → getJoinLinkPreview.d.ts} +2 -2
  18. package/dist/client/types/chat/bsky/group/getJoinLinkPreview.d.ts.map +1 -0
  19. package/dist/client/types/chat/bsky/group/{getGroupPublicInfo.js → getJoinLinkPreview.js} +2 -2
  20. package/dist/client/types/chat/bsky/group/{getGroupPublicInfo.js.map → getJoinLinkPreview.js.map} +1 -1
  21. package/dist/client/types/tools/ozone/moderation/emitEvent.d.ts +16 -0
  22. package/dist/client/types/tools/ozone/moderation/emitEvent.d.ts.map +1 -1
  23. package/dist/client/types/tools/ozone/moderation/emitEvent.js +9 -0
  24. package/dist/client/types/tools/ozone/moderation/emitEvent.js.map +1 -1
  25. package/dist/client/types/tools/ozone/queue/assignModerator.d.ts +29 -0
  26. package/dist/client/types/tools/ozone/queue/assignModerator.d.ts.map +1 -0
  27. package/dist/client/types/tools/ozone/queue/assignModerator.js +26 -0
  28. package/dist/client/types/tools/ozone/queue/assignModerator.js.map +1 -0
  29. package/dist/client/types/tools/ozone/queue/createQueue.d.ts +37 -0
  30. package/dist/client/types/tools/ozone/queue/createQueue.d.ts.map +1 -0
  31. package/dist/client/types/tools/ozone/queue/createQueue.js +26 -0
  32. package/dist/client/types/tools/ozone/queue/createQueue.js.map +1 -0
  33. package/dist/client/types/tools/ozone/queue/defs.d.ts +62 -0
  34. package/dist/client/types/tools/ozone/queue/defs.d.ts.map +1 -0
  35. package/dist/client/types/tools/ozone/queue/defs.js +34 -0
  36. package/dist/client/types/tools/ozone/queue/defs.js.map +1 -0
  37. package/dist/client/types/tools/ozone/queue/deleteQueue.d.ts +29 -0
  38. package/dist/client/types/tools/ozone/queue/deleteQueue.d.ts.map +1 -0
  39. package/dist/client/types/tools/ozone/queue/deleteQueue.js +11 -0
  40. package/dist/client/types/tools/ozone/queue/deleteQueue.js.map +1 -0
  41. package/dist/client/types/tools/ozone/queue/getAssignments.d.ts +31 -0
  42. package/dist/client/types/tools/ozone/queue/getAssignments.d.ts.map +1 -0
  43. package/dist/client/types/tools/ozone/queue/getAssignments.js +11 -0
  44. package/dist/client/types/tools/ozone/queue/getAssignments.js.map +1 -0
  45. package/dist/client/types/tools/ozone/queue/listQueues.d.ts +33 -0
  46. package/dist/client/types/tools/ozone/queue/listQueues.d.ts.map +1 -0
  47. package/dist/client/types/tools/ozone/queue/listQueues.js +11 -0
  48. package/dist/client/types/tools/ozone/queue/listQueues.js.map +1 -0
  49. package/dist/client/types/tools/ozone/queue/routeReports.d.ts +33 -0
  50. package/dist/client/types/tools/ozone/queue/routeReports.d.ts.map +1 -0
  51. package/dist/client/types/tools/ozone/queue/routeReports.js +26 -0
  52. package/dist/client/types/tools/ozone/queue/routeReports.js.map +1 -0
  53. package/dist/client/types/tools/ozone/queue/unassignModerator.d.ts +26 -0
  54. package/dist/client/types/tools/ozone/queue/unassignModerator.d.ts.map +1 -0
  55. package/dist/client/types/tools/ozone/queue/unassignModerator.js +26 -0
  56. package/dist/client/types/tools/ozone/queue/unassignModerator.js.map +1 -0
  57. package/dist/client/types/tools/ozone/queue/updateQueue.d.ts +32 -0
  58. package/dist/client/types/tools/ozone/queue/updateQueue.d.ts.map +1 -0
  59. package/dist/client/types/tools/ozone/queue/updateQueue.js +11 -0
  60. package/dist/client/types/tools/ozone/queue/updateQueue.js.map +1 -0
  61. package/dist/client/types/tools/ozone/report/assignModerator.d.ts +36 -0
  62. package/dist/client/types/tools/ozone/report/assignModerator.d.ts.map +1 -0
  63. package/dist/client/types/tools/ozone/report/assignModerator.js +34 -0
  64. package/dist/client/types/tools/ozone/report/assignModerator.js.map +1 -0
  65. package/dist/client/types/tools/ozone/report/createActivity.d.ts +45 -0
  66. package/dist/client/types/tools/ozone/report/createActivity.d.ts.map +1 -0
  67. package/dist/client/types/tools/ozone/report/createActivity.js +42 -0
  68. package/dist/client/types/tools/ozone/report/createActivity.js.map +1 -0
  69. package/dist/client/types/tools/ozone/report/defs.d.ts +185 -0
  70. package/dist/client/types/tools/ozone/report/defs.d.ts.map +1 -1
  71. package/dist/client/types/tools/ozone/report/defs.js +108 -0
  72. package/dist/client/types/tools/ozone/report/defs.js.map +1 -1
  73. package/dist/client/types/tools/ozone/report/getAssignments.d.ts +31 -0
  74. package/dist/client/types/tools/ozone/report/getAssignments.d.ts.map +1 -0
  75. package/dist/client/types/tools/ozone/report/getAssignments.js +11 -0
  76. package/dist/client/types/tools/ozone/report/getAssignments.js.map +1 -0
  77. package/dist/client/types/tools/ozone/report/getHistoricalStats.d.ts +37 -0
  78. package/dist/client/types/tools/ozone/report/getHistoricalStats.d.ts.map +1 -0
  79. package/dist/client/types/tools/ozone/report/getHistoricalStats.js +11 -0
  80. package/dist/client/types/tools/ozone/report/getHistoricalStats.js.map +1 -0
  81. package/dist/client/types/tools/ozone/report/getLatestReport.d.ts +24 -0
  82. package/dist/client/types/tools/ozone/report/getLatestReport.d.ts.map +1 -0
  83. package/dist/client/types/tools/ozone/report/getLatestReport.js +26 -0
  84. package/dist/client/types/tools/ozone/report/getLatestReport.js.map +1 -0
  85. package/dist/client/types/tools/ozone/report/getLiveStats.d.ts +28 -0
  86. package/dist/client/types/tools/ozone/report/getLiveStats.d.ts.map +1 -0
  87. package/dist/client/types/tools/ozone/report/getLiveStats.js +11 -0
  88. package/dist/client/types/tools/ozone/report/getLiveStats.js.map +1 -0
  89. package/dist/client/types/tools/ozone/report/getReport.d.ts +25 -0
  90. package/dist/client/types/tools/ozone/report/getReport.d.ts.map +1 -0
  91. package/dist/client/types/tools/ozone/report/getReport.js +26 -0
  92. package/dist/client/types/tools/ozone/report/getReport.js.map +1 -0
  93. package/dist/client/types/tools/ozone/report/listActivities.d.ts +27 -0
  94. package/dist/client/types/tools/ozone/report/listActivities.d.ts.map +1 -0
  95. package/dist/client/types/tools/ozone/report/listActivities.js +11 -0
  96. package/dist/client/types/tools/ozone/report/listActivities.js.map +1 -0
  97. package/dist/client/types/tools/ozone/report/queryReports.d.ts +49 -0
  98. package/dist/client/types/tools/ozone/report/queryReports.d.ts.map +1 -0
  99. package/dist/client/types/tools/ozone/report/queryReports.js +11 -0
  100. package/dist/client/types/tools/ozone/report/queryReports.js.map +1 -0
  101. package/dist/client/types/tools/ozone/report/reassignQueue.d.ts +45 -0
  102. package/dist/client/types/tools/ozone/report/reassignQueue.d.ts.map +1 -0
  103. package/dist/client/types/tools/ozone/report/reassignQueue.js +58 -0
  104. package/dist/client/types/tools/ozone/report/reassignQueue.js.map +1 -0
  105. package/dist/client/types/tools/ozone/report/refreshStats.d.ts +28 -0
  106. package/dist/client/types/tools/ozone/report/refreshStats.d.ts.map +1 -0
  107. package/dist/client/types/tools/ozone/report/refreshStats.js +11 -0
  108. package/dist/client/types/tools/ozone/report/refreshStats.js.map +1 -0
  109. package/dist/client/types/tools/ozone/report/unassignModerator.d.ts +27 -0
  110. package/dist/client/types/tools/ozone/report/unassignModerator.d.ts.map +1 -0
  111. package/dist/client/types/tools/ozone/report/unassignModerator.js +26 -0
  112. package/dist/client/types/tools/ozone/report/unassignModerator.js.map +1 -0
  113. package/package.json +1 -1
  114. package/src/client/index.ts +300 -8
  115. package/src/client/lexicons.ts +1920 -164
  116. package/src/client/types/chat/bsky/convo/listConvos.ts +2 -0
  117. package/src/client/types/chat/bsky/group/defs.ts +9 -7
  118. package/src/client/types/chat/bsky/group/{getGroupPublicInfo.ts → getJoinLinkPreview.ts} +2 -2
  119. package/src/client/types/tools/ozone/moderation/emitEvent.ts +24 -0
  120. package/src/client/types/tools/ozone/queue/assignModerator.ts +55 -0
  121. package/src/client/types/tools/ozone/queue/createQueue.ts +63 -0
  122. package/src/client/types/tools/ozone/queue/defs.ts +99 -0
  123. package/src/client/types/tools/ozone/queue/deleteQueue.ts +48 -0
  124. package/src/client/types/tools/ozone/queue/getAssignments.ts +49 -0
  125. package/src/client/types/tools/ozone/queue/listQueues.ts +51 -0
  126. package/src/client/types/tools/ozone/queue/routeReports.ts +59 -0
  127. package/src/client/types/tools/ozone/queue/unassignModerator.ts +51 -0
  128. package/src/client/types/tools/ozone/queue/updateQueue.ts +51 -0
  129. package/src/client/types/tools/ozone/report/assignModerator.ts +66 -0
  130. package/src/client/types/tools/ozone/report/createActivity.ts +85 -0
  131. package/src/client/types/tools/ozone/report/defs.ts +327 -0
  132. package/src/client/types/tools/ozone/report/getAssignments.ts +49 -0
  133. package/src/client/types/tools/ozone/report/getHistoricalStats.ts +55 -0
  134. package/src/client/types/tools/ozone/report/getLatestReport.ts +49 -0
  135. package/src/client/types/tools/ozone/report/getLiveStats.ts +46 -0
  136. package/src/client/types/tools/ozone/report/getReport.ts +49 -0
  137. package/src/client/types/tools/ozone/report/listActivities.ts +45 -0
  138. package/src/client/types/tools/ozone/report/queryReports.ts +73 -0
  139. package/src/client/types/tools/ozone/report/reassignQueue.ts +88 -0
  140. package/src/client/types/tools/ozone/report/refreshStats.ts +46 -0
  141. package/src/client/types/tools/ozone/report/unassignModerator.ts +53 -0
  142. package/tsconfig.build.tsbuildinfo +1 -1
  143. package/dist/client/types/chat/bsky/group/getGroupPublicInfo.d.ts.map +0 -1
@@ -24,6 +24,8 @@ export type QueryParams = {
24
24
  status?: 'request' | 'accepted' | (string & {})
25
25
  /** Filter by conversation kind. */
26
26
  kind?: 'direct' | 'group' | (string & {})
27
+ /** Filter by conversation lock status. Values follow chat.bsky.convo.defs#convoLockStatus. */
28
+ lockStatus?: 'unlocked' | 'locked' | 'locked-permanently' | (string & {})
27
29
  }
28
30
  export type InputSchema = undefined
29
31
 
@@ -10,6 +10,7 @@ import {
10
10
  type OmitKey,
11
11
  } from '../../../../util'
12
12
  import type * as ChatBskyActorDefs from '../actor/defs.js'
13
+ import type * as ChatBskyConvoDefs from '../convo/defs.js'
13
14
 
14
15
  const is$typed = _is$typed,
15
16
  validate = _validate
@@ -37,22 +38,23 @@ export function validateJoinLinkView<V>(v: V) {
37
38
  return validate<JoinLinkView & V>(v, id, hashJoinLinkView)
38
39
  }
39
40
 
40
- export interface GroupPublicView {
41
- $type?: 'chat.bsky.group.defs#groupPublicView'
41
+ export interface JoinLinkPreviewView {
42
+ $type?: 'chat.bsky.group.defs#joinLinkPreviewView'
42
43
  name: string
43
44
  owner: ChatBskyActorDefs.ProfileViewBasic
44
45
  memberCount: number
45
46
  requireApproval: boolean
47
+ convo?: ChatBskyConvoDefs.ConvoView
46
48
  }
47
49
 
48
- const hashGroupPublicView = 'groupPublicView'
50
+ const hashJoinLinkPreviewView = 'joinLinkPreviewView'
49
51
 
50
- export function isGroupPublicView<V>(v: V) {
51
- return is$typed(v, id, hashGroupPublicView)
52
+ export function isJoinLinkPreviewView<V>(v: V) {
53
+ return is$typed(v, id, hashJoinLinkPreviewView)
52
54
  }
53
55
 
54
- export function validateGroupPublicView<V>(v: V) {
55
- return validate<GroupPublicView & V>(v, id, hashGroupPublicView)
56
+ export function validateJoinLinkPreviewView<V>(v: V) {
57
+ return validate<JoinLinkPreviewView & V>(v, id, hashJoinLinkPreviewView)
56
58
  }
57
59
 
58
60
  export interface JoinRequestView {
@@ -14,7 +14,7 @@ import type * as ChatBskyGroupDefs from './defs.js'
14
14
 
15
15
  const is$typed = _is$typed,
16
16
  validate = _validate
17
- const id = 'chat.bsky.group.getGroupPublicInfo'
17
+ const id = 'chat.bsky.group.getJoinLinkPreview'
18
18
 
19
19
  export type QueryParams = {
20
20
  code: string
@@ -22,7 +22,7 @@ export type QueryParams = {
22
22
  export type InputSchema = undefined
23
23
 
24
24
  export interface OutputSchema {
25
- group: ChatBskyGroupDefs.GroupPublicView
25
+ joinLinkPreview: ChatBskyGroupDefs.JoinLinkPreviewView
26
26
  }
27
27
 
28
28
  export interface CallOptions {
@@ -57,6 +57,7 @@ export interface InputSchema {
57
57
  modTool?: ToolsOzoneModerationDefs.ModTool
58
58
  /** An optional external ID for the event, used to deduplicate events from external systems. Fails when an event of same type with the same external ID exists for the same subject. */
59
59
  externalId?: string
60
+ reportAction?: ReportAction
60
61
  }
61
62
 
62
63
  export type OutputSchema = ToolsOzoneModerationDefs.ModEventView
@@ -95,3 +96,26 @@ export function toKnownErr(e: any) {
95
96
 
96
97
  return e
97
98
  }
99
+
100
+ /** Target specific reports when emitting a moderation event */
101
+ export interface ReportAction {
102
+ $type?: 'tools.ozone.moderation.emitEvent#reportAction'
103
+ /** Target specific report IDs */
104
+ ids?: number[]
105
+ /** Target reports matching these report types on the subject (fully qualified NSIDs) */
106
+ types?: string[]
107
+ /** Target ALL reports on the subject */
108
+ all?: boolean
109
+ /** Note to send to reporter(s) when actioning their report */
110
+ note?: string
111
+ }
112
+
113
+ const hashReportAction = 'reportAction'
114
+
115
+ export function isReportAction<V>(v: V) {
116
+ return is$typed(v, id, hashReportAction)
117
+ }
118
+
119
+ export function validateReportAction<V>(v: V) {
120
+ return validate<ReportAction & V>(v, id, hashReportAction)
121
+ }
@@ -0,0 +1,55 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { HeadersMap, XRPCError } from '@atproto/xrpc'
5
+ import { type ValidationResult, BlobRef } from '@atproto/lexicon'
6
+ import { CID } from 'multiformats/cid'
7
+ import { validate as _validate } from '../../../../lexicons'
8
+ import {
9
+ type $Typed,
10
+ is$typed as _is$typed,
11
+ type OmitKey,
12
+ } from '../../../../util'
13
+ import type * as ToolsOzoneQueueDefs from './defs.js'
14
+
15
+ const is$typed = _is$typed,
16
+ validate = _validate
17
+ const id = 'tools.ozone.queue.assignModerator'
18
+
19
+ export type QueryParams = {}
20
+
21
+ export interface InputSchema {
22
+ /** The ID of the queue to assign the user to. */
23
+ queueId: number
24
+ /** DID to be assigned. */
25
+ did: string
26
+ }
27
+
28
+ export type OutputSchema = ToolsOzoneQueueDefs.AssignmentView
29
+
30
+ export interface CallOptions {
31
+ signal?: AbortSignal
32
+ headers?: HeadersMap
33
+ qp?: QueryParams
34
+ encoding?: 'application/json'
35
+ }
36
+
37
+ export interface Response {
38
+ success: boolean
39
+ headers: HeadersMap
40
+ data: OutputSchema
41
+ }
42
+
43
+ export class InvalidAssignmentError extends XRPCError {
44
+ constructor(src: XRPCError) {
45
+ super(src.status, src.error, src.message, src.headers, { cause: src })
46
+ }
47
+ }
48
+
49
+ export function toKnownErr(e: any) {
50
+ if (e instanceof XRPCError) {
51
+ if (e.error === 'InvalidAssignment') return new InvalidAssignmentError(e)
52
+ }
53
+
54
+ return e
55
+ }
@@ -0,0 +1,63 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { HeadersMap, XRPCError } from '@atproto/xrpc'
5
+ import { type ValidationResult, BlobRef } from '@atproto/lexicon'
6
+ import { CID } from 'multiformats/cid'
7
+ import { validate as _validate } from '../../../../lexicons'
8
+ import {
9
+ type $Typed,
10
+ is$typed as _is$typed,
11
+ type OmitKey,
12
+ } from '../../../../util'
13
+ import type * as ToolsOzoneQueueDefs from './defs.js'
14
+
15
+ const is$typed = _is$typed,
16
+ validate = _validate
17
+ const id = 'tools.ozone.queue.createQueue'
18
+
19
+ export type QueryParams = {}
20
+
21
+ export interface InputSchema {
22
+ /** Display name for the queue (must be unique) */
23
+ name: string
24
+ /** Subject types this queue accepts */
25
+ subjectTypes: ('account' | 'record' | 'message' | (string & {}))[]
26
+ /** Collection name for record subjects. Required if subjectTypes includes 'record'. */
27
+ collection?: string
28
+ /** Report reason types (fully qualified NSIDs) */
29
+ reportTypes: string[]
30
+ /** Optional description of the queue */
31
+ description?: string
32
+ }
33
+
34
+ export interface OutputSchema {
35
+ queue: ToolsOzoneQueueDefs.QueueView
36
+ }
37
+
38
+ export interface CallOptions {
39
+ signal?: AbortSignal
40
+ headers?: HeadersMap
41
+ qp?: QueryParams
42
+ encoding?: 'application/json'
43
+ }
44
+
45
+ export interface Response {
46
+ success: boolean
47
+ headers: HeadersMap
48
+ data: OutputSchema
49
+ }
50
+
51
+ export class ConflictingQueueError extends XRPCError {
52
+ constructor(src: XRPCError) {
53
+ super(src.status, src.error, src.message, src.headers, { cause: src })
54
+ }
55
+ }
56
+
57
+ export function toKnownErr(e: any) {
58
+ if (e instanceof XRPCError) {
59
+ if (e.error === 'ConflictingQueue') return new ConflictingQueueError(e)
60
+ }
61
+
62
+ return e
63
+ }
@@ -0,0 +1,99 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { type ValidationResult, BlobRef } from '@atproto/lexicon'
5
+ import { CID } from 'multiformats/cid'
6
+ import { validate as _validate } from '../../../../lexicons'
7
+ import {
8
+ type $Typed,
9
+ is$typed as _is$typed,
10
+ type OmitKey,
11
+ } from '../../../../util'
12
+ import type * as ToolsOzoneTeamDefs from '../team/defs.js'
13
+
14
+ const is$typed = _is$typed,
15
+ validate = _validate
16
+ const id = 'tools.ozone.queue.defs'
17
+
18
+ export interface QueueView {
19
+ $type?: 'tools.ozone.queue.defs#queueView'
20
+ /** Queue ID */
21
+ id: number
22
+ /** Display name of the queue */
23
+ name: string
24
+ /** Subject types this queue accepts. */
25
+ subjectTypes: ('account' | 'record' | 'message' | (string & {}))[]
26
+ /** Collection name for record subjects (e.g., 'app.bsky.feed.post') */
27
+ collection?: string
28
+ /** Report reason types this queue accepts (fully qualified NSIDs) */
29
+ reportTypes: string[]
30
+ /** Optional description of the queue */
31
+ description?: string
32
+ /** DID of moderator who created this queue */
33
+ createdBy: string
34
+ createdAt: string
35
+ updatedAt: string
36
+ /** Whether this queue is currently active */
37
+ enabled: boolean
38
+ /** When the queue was deleted, if applicable */
39
+ deletedAt?: string
40
+ stats: QueueStats
41
+ }
42
+
43
+ const hashQueueView = 'queueView'
44
+
45
+ export function isQueueView<V>(v: V) {
46
+ return is$typed(v, id, hashQueueView)
47
+ }
48
+
49
+ export function validateQueueView<V>(v: V) {
50
+ return validate<QueueView & V>(v, id, hashQueueView)
51
+ }
52
+
53
+ export interface QueueStats {
54
+ $type?: 'tools.ozone.queue.defs#queueStats'
55
+ /** Number of reports in 'open' status */
56
+ pendingCount?: number
57
+ /** Number of reports in 'closed' status */
58
+ actionedCount?: number
59
+ /** Number of reports in 'escalated' status */
60
+ escalatedCount?: number
61
+ /** Reports received in this queue in the last 24 hours. */
62
+ inboundCount?: number
63
+ /** Percentage of reports actioned (actionedCount / inboundCount * 100), rounded to nearest integer. Absent when inboundCount is 0. */
64
+ actionRate?: number
65
+ /** Average time in seconds from report creation to close, for reports closed in this period. */
66
+ avgHandlingTimeSec?: number
67
+ /** When these statistics were last computed */
68
+ lastUpdated?: string
69
+ }
70
+
71
+ const hashQueueStats = 'queueStats'
72
+
73
+ export function isQueueStats<V>(v: V) {
74
+ return is$typed(v, id, hashQueueStats)
75
+ }
76
+
77
+ export function validateQueueStats<V>(v: V) {
78
+ return validate<QueueStats & V>(v, id, hashQueueStats)
79
+ }
80
+
81
+ export interface AssignmentView {
82
+ $type?: 'tools.ozone.queue.defs#assignmentView'
83
+ id: number
84
+ did: string
85
+ moderator?: ToolsOzoneTeamDefs.Member
86
+ queue: QueueView
87
+ startAt: string
88
+ endAt?: string
89
+ }
90
+
91
+ const hashAssignmentView = 'assignmentView'
92
+
93
+ export function isAssignmentView<V>(v: V) {
94
+ return is$typed(v, id, hashAssignmentView)
95
+ }
96
+
97
+ export function validateAssignmentView<V>(v: V) {
98
+ return validate<AssignmentView & V>(v, id, hashAssignmentView)
99
+ }
@@ -0,0 +1,48 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { HeadersMap, XRPCError } from '@atproto/xrpc'
5
+ import { type ValidationResult, BlobRef } from '@atproto/lexicon'
6
+ import { CID } from 'multiformats/cid'
7
+ import { validate as _validate } from '../../../../lexicons'
8
+ import {
9
+ type $Typed,
10
+ is$typed as _is$typed,
11
+ type OmitKey,
12
+ } from '../../../../util'
13
+
14
+ const is$typed = _is$typed,
15
+ validate = _validate
16
+ const id = 'tools.ozone.queue.deleteQueue'
17
+
18
+ export type QueryParams = {}
19
+
20
+ export interface InputSchema {
21
+ /** ID of the queue to delete */
22
+ queueId: number
23
+ /** Optional: migrate all reports to this queue. If not specified, reports will be set to unassigned (-1). */
24
+ migrateToQueueId?: number
25
+ }
26
+
27
+ export interface OutputSchema {
28
+ deleted: boolean
29
+ /** Number of reports that were migrated (if migration occurred) */
30
+ reportsMigrated?: number
31
+ }
32
+
33
+ export interface CallOptions {
34
+ signal?: AbortSignal
35
+ headers?: HeadersMap
36
+ qp?: QueryParams
37
+ encoding?: 'application/json'
38
+ }
39
+
40
+ export interface Response {
41
+ success: boolean
42
+ headers: HeadersMap
43
+ data: OutputSchema
44
+ }
45
+
46
+ export function toKnownErr(e: any) {
47
+ return e
48
+ }
@@ -0,0 +1,49 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { HeadersMap, XRPCError } from '@atproto/xrpc'
5
+ import { type ValidationResult, BlobRef } from '@atproto/lexicon'
6
+ import { CID } from 'multiformats/cid'
7
+ import { validate as _validate } from '../../../../lexicons'
8
+ import {
9
+ type $Typed,
10
+ is$typed as _is$typed,
11
+ type OmitKey,
12
+ } from '../../../../util'
13
+ import type * as ToolsOzoneQueueDefs from './defs.js'
14
+
15
+ const is$typed = _is$typed,
16
+ validate = _validate
17
+ const id = 'tools.ozone.queue.getAssignments'
18
+
19
+ export type QueryParams = {
20
+ /** When true, only returns active assignments. */
21
+ onlyActive?: boolean
22
+ /** If specified, returns assignments for these queues only. */
23
+ queueIds?: number[]
24
+ /** If specified, returns assignments for these moderators only. */
25
+ dids?: string[]
26
+ limit?: number
27
+ cursor?: string
28
+ }
29
+ export type InputSchema = undefined
30
+
31
+ export interface OutputSchema {
32
+ cursor?: string
33
+ assignments: ToolsOzoneQueueDefs.AssignmentView[]
34
+ }
35
+
36
+ export interface CallOptions {
37
+ signal?: AbortSignal
38
+ headers?: HeadersMap
39
+ }
40
+
41
+ export interface Response {
42
+ success: boolean
43
+ headers: HeadersMap
44
+ data: OutputSchema
45
+ }
46
+
47
+ export function toKnownErr(e: any) {
48
+ return e
49
+ }
@@ -0,0 +1,51 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { HeadersMap, XRPCError } from '@atproto/xrpc'
5
+ import { type ValidationResult, BlobRef } from '@atproto/lexicon'
6
+ import { CID } from 'multiformats/cid'
7
+ import { validate as _validate } from '../../../../lexicons'
8
+ import {
9
+ type $Typed,
10
+ is$typed as _is$typed,
11
+ type OmitKey,
12
+ } from '../../../../util'
13
+ import type * as ToolsOzoneQueueDefs from './defs.js'
14
+
15
+ const is$typed = _is$typed,
16
+ validate = _validate
17
+ const id = 'tools.ozone.queue.listQueues'
18
+
19
+ export type QueryParams = {
20
+ /** Filter by enabled status. If not specified, returns all queues. */
21
+ enabled?: boolean
22
+ /** Filter queues that handle this subject type ('account' or 'record'). */
23
+ subjectType?: string
24
+ /** Filter queues by collection name (e.g. 'app.bsky.feed.post'). */
25
+ collection?: string
26
+ /** Filter queues that handle any of these report reason types. */
27
+ reportTypes?: string[]
28
+ limit?: number
29
+ cursor?: string
30
+ }
31
+ export type InputSchema = undefined
32
+
33
+ export interface OutputSchema {
34
+ cursor?: string
35
+ queues: ToolsOzoneQueueDefs.QueueView[]
36
+ }
37
+
38
+ export interface CallOptions {
39
+ signal?: AbortSignal
40
+ headers?: HeadersMap
41
+ }
42
+
43
+ export interface Response {
44
+ success: boolean
45
+ headers: HeadersMap
46
+ data: OutputSchema
47
+ }
48
+
49
+ export function toKnownErr(e: any) {
50
+ return e
51
+ }
@@ -0,0 +1,59 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { HeadersMap, XRPCError } from '@atproto/xrpc'
5
+ import { type ValidationResult, BlobRef } from '@atproto/lexicon'
6
+ import { CID } from 'multiformats/cid'
7
+ import { validate as _validate } from '../../../../lexicons'
8
+ import {
9
+ type $Typed,
10
+ is$typed as _is$typed,
11
+ type OmitKey,
12
+ } from '../../../../util'
13
+
14
+ const is$typed = _is$typed,
15
+ validate = _validate
16
+ const id = 'tools.ozone.queue.routeReports'
17
+
18
+ export type QueryParams = {}
19
+
20
+ export interface InputSchema {
21
+ /** Start of report ID range (inclusive). */
22
+ startReportId: number
23
+ /** End of report ID range (inclusive). Difference between start and end must be less than 5,000. */
24
+ endReportId: number
25
+ }
26
+
27
+ export interface OutputSchema {
28
+ /** The number of reports assigned to a queue. */
29
+ assigned: number
30
+ /** The number of reports with no matching queue. */
31
+ unmatched: number
32
+ }
33
+
34
+ export interface CallOptions {
35
+ signal?: AbortSignal
36
+ headers?: HeadersMap
37
+ qp?: QueryParams
38
+ encoding?: 'application/json'
39
+ }
40
+
41
+ export interface Response {
42
+ success: boolean
43
+ headers: HeadersMap
44
+ data: OutputSchema
45
+ }
46
+
47
+ export class OutOfRangeError extends XRPCError {
48
+ constructor(src: XRPCError) {
49
+ super(src.status, src.error, src.message, src.headers, { cause: src })
50
+ }
51
+ }
52
+
53
+ export function toKnownErr(e: any) {
54
+ if (e instanceof XRPCError) {
55
+ if (e.error === 'OutOfRange') return new OutOfRangeError(e)
56
+ }
57
+
58
+ return e
59
+ }
@@ -0,0 +1,51 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { HeadersMap, XRPCError } from '@atproto/xrpc'
5
+ import { type ValidationResult, BlobRef } from '@atproto/lexicon'
6
+ import { CID } from 'multiformats/cid'
7
+ import { validate as _validate } from '../../../../lexicons'
8
+ import {
9
+ type $Typed,
10
+ is$typed as _is$typed,
11
+ type OmitKey,
12
+ } from '../../../../util'
13
+
14
+ const is$typed = _is$typed,
15
+ validate = _validate
16
+ const id = 'tools.ozone.queue.unassignModerator'
17
+
18
+ export type QueryParams = {}
19
+
20
+ export interface InputSchema {
21
+ /** The ID of the queue to unassign the user from. */
22
+ queueId: number
23
+ /** DID to be unassigned. */
24
+ did: string
25
+ }
26
+
27
+ export interface CallOptions {
28
+ signal?: AbortSignal
29
+ headers?: HeadersMap
30
+ qp?: QueryParams
31
+ encoding?: 'application/json'
32
+ }
33
+
34
+ export interface Response {
35
+ success: boolean
36
+ headers: HeadersMap
37
+ }
38
+
39
+ export class InvalidAssignmentError extends XRPCError {
40
+ constructor(src: XRPCError) {
41
+ super(src.status, src.error, src.message, src.headers, { cause: src })
42
+ }
43
+ }
44
+
45
+ export function toKnownErr(e: any) {
46
+ if (e instanceof XRPCError) {
47
+ if (e.error === 'InvalidAssignment') return new InvalidAssignmentError(e)
48
+ }
49
+
50
+ return e
51
+ }
@@ -0,0 +1,51 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { HeadersMap, XRPCError } from '@atproto/xrpc'
5
+ import { type ValidationResult, BlobRef } from '@atproto/lexicon'
6
+ import { CID } from 'multiformats/cid'
7
+ import { validate as _validate } from '../../../../lexicons'
8
+ import {
9
+ type $Typed,
10
+ is$typed as _is$typed,
11
+ type OmitKey,
12
+ } from '../../../../util'
13
+ import type * as ToolsOzoneQueueDefs from './defs.js'
14
+
15
+ const is$typed = _is$typed,
16
+ validate = _validate
17
+ const id = 'tools.ozone.queue.updateQueue'
18
+
19
+ export type QueryParams = {}
20
+
21
+ export interface InputSchema {
22
+ /** ID of the queue to update */
23
+ queueId: number
24
+ /** New display name for the queue */
25
+ name?: string
26
+ /** Enable or disable the queue */
27
+ enabled?: boolean
28
+ /** Optional description of the queue */
29
+ description?: string
30
+ }
31
+
32
+ export interface OutputSchema {
33
+ queue: ToolsOzoneQueueDefs.QueueView
34
+ }
35
+
36
+ export interface CallOptions {
37
+ signal?: AbortSignal
38
+ headers?: HeadersMap
39
+ qp?: QueryParams
40
+ encoding?: 'application/json'
41
+ }
42
+
43
+ export interface Response {
44
+ success: boolean
45
+ headers: HeadersMap
46
+ data: OutputSchema
47
+ }
48
+
49
+ export function toKnownErr(e: any) {
50
+ return e
51
+ }