···11+import "@tlex/emitter";
22+33+namespace tools.ozone.communication.createTemplate {
44+ model DuplicateTemplateName {}
55+66+ @doc("Administrative action to create a new, re-usable communication (email for now) template.")
77+ @procedure
88+ @errors(DuplicateTemplateName)
99+ op main(input: {
1010+ @doc("Subject of the message, used in emails.")
1111+ @required
1212+ subject: string;
1313+1414+ @doc("Content of the template, markdown supported, can contain variable placeholders.")
1515+ @required
1616+ contentMarkdown: string;
1717+1818+ @doc("Name of the template.")
1919+ @required
2020+ name: string;
2121+2222+ @doc("Message language.")
2323+ lang?: language;
2424+2525+ @doc("DID of the user who is creating the template.")
2626+ createdBy?: did;
2727+ }): tools.ozone.communication.defs.TemplateView;
2828+}
···11+import "@tlex/emitter";
22+33+namespace tools.ozone.communication.listTemplates {
44+ @doc("Get list of all communication templates.")
55+ @query
66+ op main(): {
77+ @required communicationTemplates: tools.ozone.communication.defs.TemplateView[];
88+ };
99+}
···11+import "@tlex/emitter";
22+33+namespace tools.ozone.communication.updateTemplate {
44+ model DuplicateTemplateName {}
55+66+ @doc("Administrative action to update an existing communication template. Allows passing partial fields to patch specific fields only.")
77+ @procedure
88+ @errors(DuplicateTemplateName)
99+ op main(input: {
1010+ @doc("ID of the template to be updated.")
1111+ @required
1212+ id: string;
1313+1414+ @doc("Name of the template.")
1515+ name?: string;
1616+1717+ @doc("Message language.")
1818+ lang?: language;
1919+2020+ @doc("Content of the template, markdown supported, can contain variable placeholders.")
2121+ contentMarkdown?: string;
2222+2323+ @doc("Subject of the message, used in emails.")
2424+ subject?: string;
2525+2626+ @doc("DID of the user who is updating the template.")
2727+ updatedBy?: did;
2828+2929+ disabled?: boolean;
3030+ }): tools.ozone.communication.defs.TemplateView;
3131+}
···11+import "@tlex/emitter";
22+33+namespace tools.ozone.moderation.defs {
44+ model ModEventView {
55+ @required id: int32;
66+77+ @required
88+ event:
99+ | ModEventTakedown
1010+ | ModEventReverseTakedown
1111+ | ModEventComment
1212+ | ModEventReport
1313+ | ModEventLabel
1414+ | ModEventAcknowledge
1515+ | ModEventEscalate
1616+ | ModEventMute
1717+ | ModEventUnmute
1818+ | ModEventMuteReporter
1919+ | ModEventUnmuteReporter
2020+ | ModEventEmail
2121+ | ModEventResolveAppeal
2222+ | ModEventDivert
2323+ | ModEventTag
2424+ | AccountEvent
2525+ | IdentityEvent
2626+ | RecordEvent
2727+ | ModEventPriorityScore
2828+ | AgeAssuranceEvent
2929+ | AgeAssuranceOverrideEvent
3030+ | RevokeAccountCredentialsEvent;
3131+3232+ @required
3333+ subject:
3434+ | com.atproto.admin.defs.RepoRef
3535+ | com.atproto.repo.strongRef.Main
3636+ | chat.bsky.convo.defs.MessageRef;
3737+3838+ @required subjectBlobCids: string[];
3939+ @required createdBy: did;
4040+ @required createdAt: datetime;
4141+ creatorHandle?: string;
4242+ subjectHandle?: string;
4343+ modTool?: ModTool;
4444+ }
4545+4646+ model ModEventViewDetail {
4747+ @required id: int32;
4848+4949+ @required
5050+ event:
5151+ | ModEventTakedown
5252+ | ModEventReverseTakedown
5353+ | ModEventComment
5454+ | ModEventReport
5555+ | ModEventLabel
5656+ | ModEventAcknowledge
5757+ | ModEventEscalate
5858+ | ModEventMute
5959+ | ModEventUnmute
6060+ | ModEventMuteReporter
6161+ | ModEventUnmuteReporter
6262+ | ModEventEmail
6363+ | ModEventResolveAppeal
6464+ | ModEventDivert
6565+ | ModEventTag
6666+ | AccountEvent
6767+ | IdentityEvent
6868+ | RecordEvent
6969+ | ModEventPriorityScore
7070+ | AgeAssuranceEvent
7171+ | AgeAssuranceOverrideEvent
7272+ | RevokeAccountCredentialsEvent;
7373+7474+ @required
7575+ subject: RepoView | RepoViewNotFound | RecordView | RecordViewNotFound;
7676+7777+ @required subjectBlobs: BlobView[];
7878+ @required createdBy: did;
7979+ @required createdAt: datetime;
8080+ modTool?: ModTool;
8181+ }
8282+8383+ model SubjectStatusView {
8484+ @required id: int32;
8585+8686+ @required
8787+ subject:
8888+ | com.atproto.admin.defs.RepoRef
8989+ | com.atproto.repo.strongRef.Main
9090+ | chat.bsky.convo.defs.MessageRef;
9191+9292+ hosting?: AccountHosting | RecordHosting;
9393+9494+ subjectBlobCids?: cid[];
9595+ subjectRepoHandle?: string;
9696+9797+ @doc("Timestamp referencing when the last update was made to the moderation status of the subject")
9898+ @required
9999+ updatedAt: datetime;
100100+101101+ @doc("Timestamp referencing the first moderation status impacting event was emitted on the subject")
102102+ @required
103103+ createdAt: datetime;
104104+105105+ @required reviewState: SubjectReviewState;
106106+107107+ @doc("Sticky comment on the subject.")
108108+ comment?: string;
109109+110110+ @doc("Numeric value representing the level of priority. Higher score means higher priority.")
111111+ @minValue(0)
112112+ @maxValue(100)
113113+ priorityScore?: int32;
114114+115115+ muteUntil?: datetime;
116116+ muteReportingUntil?: datetime;
117117+ lastReviewedBy?: did;
118118+ lastReviewedAt?: datetime;
119119+ lastReportedAt?: datetime;
120120+121121+ @doc("Timestamp referencing when the author of the subject appealed a moderation action")
122122+ lastAppealedAt?: datetime;
123123+124124+ takendown?: boolean;
125125+126126+ @doc("True indicates that the a previously taken moderator action was appealed against, by the author of the content. False indicates last appeal was resolved by moderators.")
127127+ appealed?: boolean;
128128+129129+ suspendUntil?: datetime;
130130+ tags?: string[];
131131+132132+ @doc("Statistics related to the account subject")
133133+ accountStats?: AccountStats;
134134+135135+ @doc("Statistics related to the record subjects authored by the subject's account")
136136+ recordsStats?: RecordsStats;
137137+138138+ @doc("Current age assurance state of the subject.")
139139+ ageAssuranceState?: "pending" | "assured" | "unknown" | "reset" | "blocked" | string;
140140+141141+ @doc("Whether or not the last successful update to age assurance was made by the user or admin.")
142142+ ageAssuranceUpdatedBy?: "admin" | "user" | string;
143143+ }
144144+145145+ @doc("Detailed view of a subject. For record subjects, the author's repo and profile will be returned.")
146146+ model SubjectView {
147147+ @required type: com.atproto.moderation.defs.SubjectType;
148148+ @required subject: string;
149149+ status?: SubjectStatusView;
150150+ repo?: RepoViewDetail;
151151+ profile?: unknown;
152152+ record?: RecordViewDetail;
153153+ }
154154+155155+ @doc("Statistics about a particular account subject")
156156+ model AccountStats {
157157+ @doc("Total number of reports on the account")
158158+ reportCount?: int32;
159159+160160+ @doc("Total number of appeals against a moderation action on the account")
161161+ appealCount?: int32;
162162+163163+ @doc("Number of times the account was suspended")
164164+ suspendCount?: int32;
165165+166166+ @doc("Number of times the account was escalated")
167167+ escalateCount?: int32;
168168+169169+ @doc("Number of times the account was taken down")
170170+ takedownCount?: int32;
171171+ }
172172+173173+ @doc("Statistics about a set of record subject items")
174174+ model RecordsStats {
175175+ @doc("Cumulative sum of the number of reports on the items in the set")
176176+ totalReports?: int32;
177177+178178+ @doc("Number of items that were reported at least once")
179179+ reportedCount?: int32;
180180+181181+ @doc("Number of items that were escalated at least once")
182182+ escalatedCount?: int32;
183183+184184+ @doc("Number of items that were appealed at least once")
185185+ appealedCount?: int32;
186186+187187+ @doc("Total number of item in the set")
188188+ subjectCount?: int32;
189189+190190+ @doc("Number of item currently in \"reviewOpen\" or \"reviewEscalated\" state")
191191+ pendingCount?: int32;
192192+193193+ @doc("Number of item currently in \"reviewNone\" or \"reviewClosed\" state")
194194+ processedCount?: int32;
195195+196196+ @doc("Number of item currently taken down")
197197+ takendownCount?: int32;
198198+ }
199199+200200+ union SubjectReviewState {
201201+ "#reviewOpen",
202202+ "#reviewEscalated",
203203+ "#reviewClosed",
204204+ "#reviewNone",
205205+ string,
206206+ }
207207+208208+ @doc("Moderator review status of a subject: Open. Indicates that the subject needs to be reviewed by a moderator")
209209+ @token
210210+ model ReviewOpen {}
211211+212212+ @doc("Moderator review status of a subject: Escalated. Indicates that the subject was escalated for review by a moderator")
213213+ @token
214214+ model ReviewEscalated {}
215215+216216+ @doc("Moderator review status of a subject: Closed. Indicates that the subject was already reviewed and resolved by a moderator")
217217+ @token
218218+ model ReviewClosed {}
219219+220220+ @doc("Moderator review status of a subject: Unnecessary. Indicates that the subject does not need a review at the moment but there is probably some moderation related metadata available for it")
221221+ @token
222222+ model ReviewNone {}
223223+224224+ @doc("Take down a subject permanently or temporarily")
225225+ model ModEventTakedown {
226226+ comment?: string;
227227+228228+ @doc("Indicates how long the takedown should be in effect before automatically expiring.")
229229+ durationInHours?: int32;
230230+231231+ @doc("If true, all other reports on content authored by this account will be resolved (acknowledged).")
232232+ acknowledgeAccountSubjects?: boolean;
233233+234234+ @doc("Names/Keywords of the policies that drove the decision.")
235235+ @maxItems(5)
236236+ policies?: string[];
237237+ }
238238+239239+ @doc("Revert take down action on a subject")
240240+ model ModEventReverseTakedown {
241241+ @doc("Describe reasoning behind the reversal.")
242242+ comment?: string;
243243+ }
244244+245245+ @doc("Resolve appeal on a subject")
246246+ model ModEventResolveAppeal {
247247+ @doc("Describe resolution.")
248248+ comment?: string;
249249+ }
250250+251251+ @doc("Add a comment to a subject. An empty comment will clear any previously set sticky comment.")
252252+ model ModEventComment {
253253+ comment?: string;
254254+255255+ @doc("Make the comment persistent on the subject")
256256+ sticky?: boolean;
257257+ }
258258+259259+ @doc("Report a subject")
260260+ model ModEventReport {
261261+ comment?: string;
262262+263263+ @doc("Set to true if the reporter was muted from reporting at the time of the event. These reports won't impact the reviewState of the subject.")
264264+ isReporterMuted?: boolean;
265265+266266+ @required reportType: com.atproto.moderation.defs.ReasonType;
267267+ }
268268+269269+ @doc("Apply/Negate labels on a subject")
270270+ model ModEventLabel {
271271+ comment?: string;
272272+ @required createLabelVals: string[];
273273+ @required negateLabelVals: string[];
274274+275275+ @doc("Indicates how long the label will remain on the subject. Only applies on labels that are being added.")
276276+ durationInHours?: int32;
277277+ }
278278+279279+ @doc("Set priority score of the subject. Higher score means higher priority.")
280280+ model ModEventPriorityScore {
281281+ comment?: string;
282282+283283+ @minValue(0)
284284+ @maxValue(100)
285285+ @required
286286+ score: int32;
287287+ }
288288+289289+ @doc("Age assurance info coming directly from users. Only works on DID subjects.")
290290+ model AgeAssuranceEvent {
291291+ @doc("The date and time of this write operation.")
292292+ @required
293293+ createdAt: datetime;
294294+295295+ @doc("The status of the age assurance process.")
296296+ @required
297297+ status: "unknown" | "pending" | "assured" | string;
298298+299299+ @doc("The unique identifier for this instance of the age assurance flow, in UUID format.")
300300+ @required
301301+ attemptId: string;
302302+303303+ @doc("The IP address used when initiating the AA flow.")
304304+ initIp?: string;
305305+306306+ @doc("The user agent used when initiating the AA flow.")
307307+ initUa?: string;
308308+309309+ @doc("The IP address used when completing the AA flow.")
310310+ completeIp?: string;
311311+312312+ @doc("The user agent used when completing the AA flow.")
313313+ completeUa?: string;
314314+ }
315315+316316+ @doc("Age assurance status override by moderators. Only works on DID subjects.")
317317+ model AgeAssuranceOverrideEvent {
318318+ @doc("Comment describing the reason for the override.")
319319+ @required
320320+ comment: string;
321321+322322+ @doc("The status to be set for the user decided by a moderator, overriding whatever value the user had previously. Use reset to default to original state.")
323323+ @required
324324+ status: "assured" | "reset" | "blocked" | string;
325325+ }
326326+327327+ @doc("Account credentials revocation by moderators. Only works on DID subjects.")
328328+ model RevokeAccountCredentialsEvent {
329329+ @doc("Comment describing the reason for the revocation.")
330330+ @required
331331+ comment: string;
332332+ }
333333+334334+ model ModEventAcknowledge {
335335+ comment?: string;
336336+337337+ @doc("If true, all other reports on content authored by this account will be resolved (acknowledged).")
338338+ acknowledgeAccountSubjects?: boolean;
339339+ }
340340+341341+ model ModEventEscalate {
342342+ comment?: string;
343343+ }
344344+345345+ @doc("Mute incoming reports on a subject")
346346+ model ModEventMute {
347347+ comment?: string;
348348+349349+ @doc("Indicates how long the subject should remain muted.")
350350+ @required
351351+ durationInHours: int32;
352352+ }
353353+354354+ @doc("Unmute action on a subject")
355355+ model ModEventUnmute {
356356+ @doc("Describe reasoning behind the reversal.")
357357+ comment?: string;
358358+ }
359359+360360+ @doc("Mute incoming reports from an account")
361361+ model ModEventMuteReporter {
362362+ comment?: string;
363363+364364+ @doc("Indicates how long the account should remain muted. Falsy value here means a permanent mute.")
365365+ durationInHours?: int32;
366366+ }
367367+368368+ @doc("Unmute incoming reports from an account")
369369+ model ModEventUnmuteReporter {
370370+ @doc("Describe reasoning behind the reversal.")
371371+ comment?: string;
372372+ }
373373+374374+ @doc("Keep a log of outgoing email to a user")
375375+ model ModEventEmail {
376376+ @doc("The subject line of the email sent to the user.")
377377+ @required
378378+ subjectLine: string;
379379+380380+ @doc("The content of the email sent to the user.")
381381+ content?: string;
382382+383383+ @doc("Additional comment about the outgoing comm.")
384384+ comment?: string;
385385+ }
386386+387387+ @doc("Divert a record's blobs to a 3rd party service for further scanning/tagging")
388388+ model ModEventDivert {
389389+ comment?: string;
390390+ }
391391+392392+ @doc("Add/Remove a tag on a subject")
393393+ model ModEventTag {
394394+ @doc("Tags to be added to the subject. If already exists, won't be duplicated.")
395395+ @required
396396+ add: string[];
397397+398398+ @doc("Tags to be removed to the subject. Ignores a tag If it doesn't exist, won't be duplicated.")
399399+ @required
400400+ remove: string[];
401401+402402+ @doc("Additional comment about added/removed tags.")
403403+ comment?: string;
404404+ }
405405+406406+ @doc("Logs account status related events on a repo subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking.")
407407+ model AccountEvent {
408408+ comment?: string;
409409+ @required timestamp: datetime;
410410+411411+ @doc("Indicates that the account has a repository which can be fetched from the host that emitted this event.")
412412+ @required
413413+ active: boolean;
414414+415415+ status?: "unknown" | "deactivated" | "deleted" | "takendown" | "suspended" | "tombstoned" | string;
416416+ }
417417+418418+ @doc("Logs identity related events on a repo subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking.")
419419+ model IdentityEvent {
420420+ comment?: string;
421421+ handle?: handle;
422422+ pdsHost?: uri;
423423+ tombstone?: boolean;
424424+ @required timestamp: datetime;
425425+ }
426426+427427+ @doc("Logs lifecycle event on a record subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking.")
428428+ model RecordEvent {
429429+ comment?: string;
430430+ @required timestamp: datetime;
431431+432432+ @required
433433+ `op`: "create" | "update" | "delete" | string;
434434+435435+ cid?: cid;
436436+ }
437437+438438+ model RepoView {
439439+ @required did: did;
440440+ @required handle: handle;
441441+ email?: string;
442442+ @required relatedRecords: unknown[];
443443+ @required indexedAt: datetime;
444444+ @required moderation: Moderation;
445445+ invitedBy?: com.atproto.server.defs.InviteCode;
446446+ invitesDisabled?: boolean;
447447+ inviteNote?: string;
448448+ deactivatedAt?: datetime;
449449+ threatSignatures?: com.atproto.admin.defs.ThreatSignature[];
450450+ }
451451+452452+ model RepoViewDetail {
453453+ @required did: did;
454454+ @required handle: handle;
455455+ email?: string;
456456+ @required relatedRecords: unknown[];
457457+ @required indexedAt: datetime;
458458+ @required moderation: ModerationDetail;
459459+ labels?: com.atproto.label.defs.Label[];
460460+ invitedBy?: com.atproto.server.defs.InviteCode;
461461+ invites?: com.atproto.server.defs.InviteCode[];
462462+ invitesDisabled?: boolean;
463463+ inviteNote?: string;
464464+ emailConfirmedAt?: datetime;
465465+ deactivatedAt?: datetime;
466466+ threatSignatures?: com.atproto.admin.defs.ThreatSignature[];
467467+ }
468468+469469+ model RepoViewNotFound {
470470+ @required did: did;
471471+ }
472472+473473+ model RecordView {
474474+ @required uri: atUri;
475475+ @required cid: cid;
476476+ @required value: unknown;
477477+ @required blobCids: cid[];
478478+ @required indexedAt: datetime;
479479+ @required moderation: Moderation;
480480+ @required repo: RepoView;
481481+ }
482482+483483+ model RecordViewDetail {
484484+ @required uri: atUri;
485485+ @required cid: cid;
486486+ @required value: unknown;
487487+ @required blobs: BlobView[];
488488+ labels?: com.atproto.label.defs.Label[];
489489+ @required indexedAt: datetime;
490490+ @required moderation: ModerationDetail;
491491+ @required repo: RepoView;
492492+ }
493493+494494+ model RecordViewNotFound {
495495+ @required uri: atUri;
496496+ }
497497+498498+ model Moderation {
499499+ subjectStatus?: SubjectStatusView;
500500+ }
501501+502502+ model ModerationDetail {
503503+ subjectStatus?: SubjectStatusView;
504504+ }
505505+506506+ model BlobView {
507507+ @required cid: cid;
508508+ @required mimeType: string;
509509+ @required size: int32;
510510+ @required createdAt: datetime;
511511+ details?: ImageDetails | VideoDetails;
512512+ moderation?: Moderation;
513513+ }
514514+515515+ model ImageDetails {
516516+ @required width: int32;
517517+ @required height: int32;
518518+ }
519519+520520+ model VideoDetails {
521521+ @required width: int32;
522522+ @required height: int32;
523523+ @required length: int32;
524524+ }
525525+526526+ model AccountHosting {
527527+ @required
528528+ status: "takendown" | "suspended" | "deleted" | "deactivated" | "unknown" | string;
529529+530530+ updatedAt?: datetime;
531531+ createdAt?: datetime;
532532+ deletedAt?: datetime;
533533+ deactivatedAt?: datetime;
534534+ reactivatedAt?: datetime;
535535+ }
536536+537537+ model RecordHosting {
538538+ @required
539539+ status: "deleted" | "unknown" | string;
540540+541541+ updatedAt?: datetime;
542542+ createdAt?: datetime;
543543+ deletedAt?: datetime;
544544+ }
545545+546546+ model ReporterStats {
547547+ @required did: did;
548548+549549+ @doc("The total number of reports made by the user on accounts.")
550550+ @required
551551+ accountReportCount: int32;
552552+553553+ @doc("The total number of reports made by the user on records.")
554554+ @required
555555+ recordReportCount: int32;
556556+557557+ @doc("The total number of accounts reported by the user.")
558558+ @required
559559+ reportedAccountCount: int32;
560560+561561+ @doc("The total number of records reported by the user.")
562562+ @required
563563+ reportedRecordCount: int32;
564564+565565+ @doc("The total number of accounts taken down as a result of the user's reports.")
566566+ @required
567567+ takendownAccountCount: int32;
568568+569569+ @doc("The total number of records taken down as a result of the user's reports.")
570570+ @required
571571+ takendownRecordCount: int32;
572572+573573+ @doc("The total number of accounts labeled as a result of the user's reports.")
574574+ @required
575575+ labeledAccountCount: int32;
576576+577577+ @doc("The total number of records labeled as a result of the user's reports.")
578578+ @required
579579+ labeledRecordCount: int32;
580580+ }
581581+582582+ @doc("Moderation tool information for tracing the source of the action")
583583+ model ModTool {
584584+ @doc("Name/identifier of the source (e.g., 'automod', 'ozone/workspace')")
585585+ @required
586586+ name: string;
587587+588588+ @doc("Additional arbitrary metadata about the source")
589589+ meta?: unknown;
590590+ }
591591+592592+ @doc("Moderation event timeline event for a PLC create operation")
593593+ @token
594594+ model TimelineEventPlcCreate {}
595595+596596+ @doc("Moderation event timeline event for generic PLC operation")
597597+ @token
598598+ model TimelineEventPlcOperation {}
599599+600600+ @doc("Moderation event timeline event for a PLC tombstone operation")
601601+ @token
602602+ model TimelineEventPlcTombstone {}
603603+}
···11+import "@tlex/emitter";
22+33+namespace tools.ozone.team.deleteMember {
44+ @doc("The member being deleted does not exist")
55+ model MemberNotFound {}
66+77+ @doc("You can not delete yourself from the team")
88+ model CannotDeleteSelf {}
99+1010+ @doc("Delete a member from ozone team. Requires admin role.")
1111+ @procedure
1212+ @errors(MemberNotFound, CannotDeleteSelf)
1313+ op main(input: {
1414+ @required did: did;
1515+ }): void;
1616+}
···11+import "@tlex/emitter";
22+33+namespace tools.ozone.verification.defs {
44+ @doc("Verification data for the associated subject.")
55+ model VerificationView {
66+ @doc("The user who issued this verification.")
77+ @required
88+ issuer: did;
99+1010+ @doc("The AT-URI of the verification record.")
1111+ @required
1212+ uri: atUri;
1313+1414+ @doc("The subject of the verification.")
1515+ @required
1616+ subject: did;
1717+1818+ @doc("Handle of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current handle matches the one at the time of verifying.")
1919+ @required
2020+ handle: handle;
2121+2222+ @doc("Display name of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current displayName matches the one at the time of verifying.")
2323+ @required
2424+ displayName: string;
2525+2626+ @doc("Timestamp when the verification was created.")
2727+ @required
2828+ createdAt: datetime;
2929+3030+ @doc("Describes the reason for revocation, also indicating that the verification is no longer valid.")
3131+ revokeReason?: string;
3232+3333+ @doc("Timestamp when the verification was revoked.")
3434+ revokedAt?: datetime;
3535+3636+ @doc("The user who revoked this verification.")
3737+ revokedBy?: did;
3838+3939+ subjectProfile?: (never | unknown);
4040+ issuerProfile?: (never | unknown);
4141+4242+ subjectRepo?: (
4343+ | tools.ozone.moderation.defs.RepoViewDetail
4444+ | tools.ozone.moderation.defs.RepoViewNotFound
4545+ | unknown
4646+ );
4747+4848+ issuerRepo?: (
4949+ | tools.ozone.moderation.defs.RepoViewDetail
5050+ | tools.ozone.moderation.defs.RepoViewNotFound
5151+ | unknown
5252+ );
5353+ }
5454+}
···11+import "@tlex/emitter";
22+33+namespace tools.ozone.verification.grantVerifications {
44+ @doc("Grant verifications to multiple subjects. Allows batch processing of up to 100 verifications at once.")
55+ @procedure
66+ op main(input: {
77+ @doc("Array of verification requests to process")
88+ @maxItems(100)
99+ @required
1010+ verifications: VerificationInput[];
1111+ }): {
1212+ @required verifications: tools.ozone.verification.defs.VerificationView[];
1313+ @required failedVerifications: GrantError[];
1414+ };
1515+1616+ model VerificationInput {
1717+ @doc("The did of the subject being verified")
1818+ @required
1919+ subject: did;
2020+2121+ @doc("Handle of the subject the verification applies to at the moment of verifying.")
2222+ @required
2323+ handle: handle;
2424+2525+ @doc("Display name of the subject the verification applies to at the moment of verifying.")
2626+ @required
2727+ displayName: string;
2828+2929+ @doc("Timestamp for verification record. Defaults to current time when not specified.")
3030+ createdAt?: datetime;
3131+ }
3232+3333+ @doc("Error object for failed verifications.")
3434+ model GrantError {
3535+ @doc("Error message describing the reason for failure.")
3636+ @required
3737+ error: string;
3838+3939+ @doc("The did of the subject being verified")
4040+ @required
4141+ subject: did;
4242+ }
4343+}
···11+import "@tlex/emitter";
22+33+namespace tools.ozone.verification.listVerifications {
44+ @doc("List verifications")
55+ @query
66+ op main(
77+ @doc("Pagination cursor")
88+ cursor?: string,
99+1010+ @doc("Maximum number of results to return")
1111+ @minValue(1)
1212+ @maxValue(100)
1313+ limit?: int32 = 50,
1414+1515+ @doc("Filter to verifications created after this timestamp")
1616+ createdAfter?: datetime,
1717+1818+ @doc("Filter to verifications created before this timestamp")
1919+ createdBefore?: datetime,
2020+2121+ @doc("Filter to verifications from specific issuers")
2222+ @maxItems(100)
2323+ issuers?: did[],
2424+2525+ @doc("Filter to specific verified DIDs")
2626+ @maxItems(100)
2727+ subjects?: did[],
2828+2929+ @doc("Sort direction for creation date")
3030+ sortDirection?: "asc" | "desc" | string = "desc",
3131+3232+ @doc("Filter to verifications that are revoked or not. By default, includes both.")
3333+ isRevoked?: boolean
3434+ ): {
3535+ cursor?: string;
3636+ @required verifications: tools.ozone.verification.defs.VerificationView[];
3737+ };
3838+}
···11+import "@tlex/emitter";
22+33+namespace tools.ozone.verification.revokeVerifications {
44+ @doc("Revoke previously granted verifications in batches of up to 100.")
55+ @procedure
66+ op main(input: {
77+ @doc("Array of verification record uris to revoke")
88+ @maxItems(100)
99+ @required
1010+ uris: atUri[];
1111+1212+ @doc("Reason for revoking the verification. This is optional and can be omitted if not needed.")
1313+ @maxLength(1000)
1414+ revokeReason?: string;
1515+ }): {
1616+ @doc("List of verification uris successfully revoked")
1717+ @required
1818+ revokedVerifications: atUri[];
1919+2020+ @doc("List of verification uris that couldn't be revoked, including failure reasons")
2121+ @required
2222+ failedRevocations: RevokeError[];
2323+ };
2424+2525+ @doc("Error object for failed revocations")
2626+ model RevokeError {
2727+ @doc("The AT-URI of the verification record that failed to revoke.")
2828+ @required
2929+ uri: atUri;
3030+3131+ @doc("Description of the error that occurred during revocation.")
3232+ @required
3333+ error: string;
3434+ }
3535+}