UNPKG

@atproto/api

Version:

Client library for atproto and Bluesky

1,917 lines (1,915 loc) 205 kB
/** * GENERATED CODE - DO NOT MODIFY */ import { LexiconDoc, Lexicons } from '@atproto/lexicon' export const schemaDict = { ComAtprotoAdminDefs: { lexicon: 1, id: 'com.atproto.admin.defs', defs: { statusAttr: { type: 'object', required: ['applied'], properties: { applied: { type: 'boolean', }, ref: { type: 'string', }, }, }, modEventView: { type: 'object', required: [ 'id', 'event', 'subject', 'subjectBlobCids', 'createdBy', 'createdAt', ], properties: { id: { type: 'integer', }, event: { type: 'union', refs: [ 'lex:com.atproto.admin.defs#modEventTakedown', 'lex:com.atproto.admin.defs#modEventReverseTakedown', 'lex:com.atproto.admin.defs#modEventComment', 'lex:com.atproto.admin.defs#modEventReport', 'lex:com.atproto.admin.defs#modEventLabel', 'lex:com.atproto.admin.defs#modEventAcknowledge', 'lex:com.atproto.admin.defs#modEventEscalate', 'lex:com.atproto.admin.defs#modEventMute', 'lex:com.atproto.admin.defs#modEventEmail', ], }, subject: { type: 'union', refs: [ 'lex:com.atproto.admin.defs#repoRef', 'lex:com.atproto.repo.strongRef', ], }, subjectBlobCids: { type: 'array', items: { type: 'string', }, }, createdBy: { type: 'string', format: 'did', }, createdAt: { type: 'string', format: 'datetime', }, creatorHandle: { type: 'string', }, subjectHandle: { type: 'string', }, }, }, modEventViewDetail: { type: 'object', required: [ 'id', 'event', 'subject', 'subjectBlobs', 'createdBy', 'createdAt', ], properties: { id: { type: 'integer', }, event: { type: 'union', refs: [ 'lex:com.atproto.admin.defs#modEventTakedown', 'lex:com.atproto.admin.defs#modEventReverseTakedown', 'lex:com.atproto.admin.defs#modEventComment', 'lex:com.atproto.admin.defs#modEventReport', 'lex:com.atproto.admin.defs#modEventLabel', 'lex:com.atproto.admin.defs#modEventAcknowledge', 'lex:com.atproto.admin.defs#modEventEscalate', 'lex:com.atproto.admin.defs#modEventMute', ], }, subject: { type: 'union', refs: [ 'lex:com.atproto.admin.defs#repoView', 'lex:com.atproto.admin.defs#repoViewNotFound', 'lex:com.atproto.admin.defs#recordView', 'lex:com.atproto.admin.defs#recordViewNotFound', ], }, subjectBlobs: { type: 'array', items: { type: 'ref', ref: 'lex:com.atproto.admin.defs#blobView', }, }, createdBy: { type: 'string', format: 'did', }, createdAt: { type: 'string', format: 'datetime', }, }, }, reportView: { type: 'object', required: [ 'id', 'reasonType', 'subject', 'reportedBy', 'createdAt', 'resolvedByActionIds', ], properties: { id: { type: 'integer', }, reasonType: { type: 'ref', ref: 'lex:com.atproto.moderation.defs#reasonType', }, comment: { type: 'string', }, subjectRepoHandle: { type: 'string', }, subject: { type: 'union', refs: [ 'lex:com.atproto.admin.defs#repoRef', 'lex:com.atproto.repo.strongRef', ], }, reportedBy: { type: 'string', format: 'did', }, createdAt: { type: 'string', format: 'datetime', }, resolvedByActionIds: { type: 'array', items: { type: 'integer', }, }, }, }, subjectStatusView: { type: 'object', required: ['id', 'subject', 'createdAt', 'updatedAt', 'reviewState'], properties: { id: { type: 'integer', }, subject: { type: 'union', refs: [ 'lex:com.atproto.admin.defs#repoRef', 'lex:com.atproto.repo.strongRef', ], }, subjectBlobCids: { type: 'array', items: { type: 'string', format: 'cid', }, }, subjectRepoHandle: { type: 'string', }, updatedAt: { type: 'string', format: 'datetime', description: 'Timestamp referencing when the last update was made to the moderation status of the subject', }, createdAt: { type: 'string', format: 'datetime', description: 'Timestamp referencing the first moderation status impacting event was emitted on the subject', }, reviewState: { type: 'ref', ref: 'lex:com.atproto.admin.defs#subjectReviewState', }, comment: { type: 'string', description: 'Sticky comment on the subject.', }, muteUntil: { type: 'string', format: 'datetime', }, lastReviewedBy: { type: 'string', format: 'did', }, lastReviewedAt: { type: 'string', format: 'datetime', }, lastReportedAt: { type: 'string', format: 'datetime', }, takendown: { type: 'boolean', }, suspendUntil: { type: 'string', format: 'datetime', }, }, }, reportViewDetail: { type: 'object', required: [ 'id', 'reasonType', 'subject', 'reportedBy', 'createdAt', 'resolvedByActions', ], properties: { id: { type: 'integer', }, reasonType: { type: 'ref', ref: 'lex:com.atproto.moderation.defs#reasonType', }, comment: { type: 'string', }, subject: { type: 'union', refs: [ 'lex:com.atproto.admin.defs#repoView', 'lex:com.atproto.admin.defs#repoViewNotFound', 'lex:com.atproto.admin.defs#recordView', 'lex:com.atproto.admin.defs#recordViewNotFound', ], }, subjectStatus: { type: 'ref', ref: 'lex:com.atproto.admin.defs#subjectStatusView', }, reportedBy: { type: 'string', format: 'did', }, createdAt: { type: 'string', format: 'datetime', }, resolvedByActions: { type: 'array', items: { type: 'ref', ref: 'lex:com.atproto.admin.defs#modEventView', }, }, }, }, repoView: { type: 'object', required: [ 'did', 'handle', 'relatedRecords', 'indexedAt', 'moderation', ], properties: { did: { type: 'string', format: 'did', }, handle: { type: 'string', format: 'handle', }, email: { type: 'string', }, relatedRecords: { type: 'array', items: { type: 'unknown', }, }, indexedAt: { type: 'string', format: 'datetime', }, moderation: { type: 'ref', ref: 'lex:com.atproto.admin.defs#moderation', }, invitedBy: { type: 'ref', ref: 'lex:com.atproto.server.defs#inviteCode', }, invitesDisabled: { type: 'boolean', }, inviteNote: { type: 'string', }, }, }, repoViewDetail: { type: 'object', required: [ 'did', 'handle', 'relatedRecords', 'indexedAt', 'moderation', ], properties: { did: { type: 'string', format: 'did', }, handle: { type: 'string', format: 'handle', }, email: { type: 'string', }, relatedRecords: { type: 'array', items: { type: 'unknown', }, }, indexedAt: { type: 'string', format: 'datetime', }, moderation: { type: 'ref', ref: 'lex:com.atproto.admin.defs#moderationDetail', }, labels: { type: 'array', items: { type: 'ref', ref: 'lex:com.atproto.label.defs#label', }, }, invitedBy: { type: 'ref', ref: 'lex:com.atproto.server.defs#inviteCode', }, invites: { type: 'array', items: { type: 'ref', ref: 'lex:com.atproto.server.defs#inviteCode', }, }, invitesDisabled: { type: 'boolean', }, inviteNote: { type: 'string', }, emailConfirmedAt: { type: 'string', format: 'datetime', }, }, }, accountView: { type: 'object', required: ['did', 'handle', 'indexedAt'], properties: { did: { type: 'string', format: 'did', }, handle: { type: 'string', format: 'handle', }, email: { type: 'string', }, indexedAt: { type: 'string', format: 'datetime', }, invitedBy: { type: 'ref', ref: 'lex:com.atproto.server.defs#inviteCode', }, invites: { type: 'array', items: { type: 'ref', ref: 'lex:com.atproto.server.defs#inviteCode', }, }, invitesDisabled: { type: 'boolean', }, emailConfirmedAt: { type: 'string', format: 'datetime', }, inviteNote: { type: 'string', }, }, }, repoViewNotFound: { type: 'object', required: ['did'], properties: { did: { type: 'string', format: 'did', }, }, }, repoRef: { type: 'object', required: ['did'], properties: { did: { type: 'string', format: 'did', }, }, }, repoBlobRef: { type: 'object', required: ['did', 'cid'], properties: { did: { type: 'string', format: 'did', }, cid: { type: 'string', format: 'cid', }, recordUri: { type: 'string', format: 'at-uri', }, }, }, recordView: { type: 'object', required: [ 'uri', 'cid', 'value', 'blobCids', 'indexedAt', 'moderation', 'repo', ], properties: { uri: { type: 'string', format: 'at-uri', }, cid: { type: 'string', format: 'cid', }, value: { type: 'unknown', }, blobCids: { type: 'array', items: { type: 'string', format: 'cid', }, }, indexedAt: { type: 'string', format: 'datetime', }, moderation: { type: 'ref', ref: 'lex:com.atproto.admin.defs#moderation', }, repo: { type: 'ref', ref: 'lex:com.atproto.admin.defs#repoView', }, }, }, recordViewDetail: { type: 'object', required: [ 'uri', 'cid', 'value', 'blobs', 'indexedAt', 'moderation', 'repo', ], properties: { uri: { type: 'string', format: 'at-uri', }, cid: { type: 'string', format: 'cid', }, value: { type: 'unknown', }, blobs: { type: 'array', items: { type: 'ref', ref: 'lex:com.atproto.admin.defs#blobView', }, }, labels: { type: 'array', items: { type: 'ref', ref: 'lex:com.atproto.label.defs#label', }, }, indexedAt: { type: 'string', format: 'datetime', }, moderation: { type: 'ref', ref: 'lex:com.atproto.admin.defs#moderationDetail', }, repo: { type: 'ref', ref: 'lex:com.atproto.admin.defs#repoView', }, }, }, recordViewNotFound: { type: 'object', required: ['uri'], properties: { uri: { type: 'string', format: 'at-uri', }, }, }, moderation: { type: 'object', properties: { subjectStatus: { type: 'ref', ref: 'lex:com.atproto.admin.defs#subjectStatusView', }, }, }, moderationDetail: { type: 'object', properties: { subjectStatus: { type: 'ref', ref: 'lex:com.atproto.admin.defs#subjectStatusView', }, }, }, blobView: { type: 'object', required: ['cid', 'mimeType', 'size', 'createdAt'], properties: { cid: { type: 'string', format: 'cid', }, mimeType: { type: 'string', }, size: { type: 'integer', }, createdAt: { type: 'string', format: 'datetime', }, details: { type: 'union', refs: [ 'lex:com.atproto.admin.defs#imageDetails', 'lex:com.atproto.admin.defs#videoDetails', ], }, moderation: { type: 'ref', ref: 'lex:com.atproto.admin.defs#moderation', }, }, }, imageDetails: { type: 'object', required: ['width', 'height'], properties: { width: { type: 'integer', }, height: { type: 'integer', }, }, }, videoDetails: { type: 'object', required: ['width', 'height', 'length'], properties: { width: { type: 'integer', }, height: { type: 'integer', }, length: { type: 'integer', }, }, }, subjectReviewState: { type: 'string', knownValues: [ 'lex:com.atproto.admin.defs#reviewOpen', 'lex:com.atproto.admin.defs#reviewEscalated', 'lex:com.atproto.admin.defs#reviewClosed', ], }, reviewOpen: { type: 'token', description: 'Moderator review status of a subject: Open. Indicates that the subject needs to be reviewed by a moderator', }, reviewEscalated: { type: 'token', description: 'Moderator review status of a subject: Escalated. Indicates that the subject was escalated for review by a moderator', }, reviewClosed: { type: 'token', description: 'Moderator review status of a subject: Closed. Indicates that the subject was already reviewed and resolved by a moderator', }, modEventTakedown: { type: 'object', description: 'Take down a subject permanently or temporarily', properties: { comment: { type: 'string', }, durationInHours: { type: 'integer', description: 'Indicates how long the takedown should be in effect before automatically expiring.', }, }, }, modEventReverseTakedown: { type: 'object', description: 'Revert take down action on a subject', properties: { comment: { type: 'string', description: 'Describe reasoning behind the reversal.', }, }, }, modEventComment: { type: 'object', description: 'Add a comment to a subject', required: ['comment'], properties: { comment: { type: 'string', }, sticky: { type: 'boolean', description: 'Make the comment persistent on the subject', }, }, }, modEventReport: { type: 'object', description: 'Report a subject', required: ['reportType'], properties: { comment: { type: 'string', }, reportType: { type: 'ref', ref: 'lex:com.atproto.moderation.defs#reasonType', }, }, }, modEventLabel: { type: 'object', description: 'Apply/Negate labels on a subject', required: ['createLabelVals', 'negateLabelVals'], properties: { comment: { type: 'string', }, createLabelVals: { type: 'array', items: { type: 'string', }, }, negateLabelVals: { type: 'array', items: { type: 'string', }, }, }, }, modEventAcknowledge: { type: 'object', properties: { comment: { type: 'string', }, }, }, modEventEscalate: { type: 'object', properties: { comment: { type: 'string', }, }, }, modEventMute: { type: 'object', description: 'Mute incoming reports on a subject', required: ['durationInHours'], properties: { comment: { type: 'string', }, durationInHours: { type: 'integer', description: 'Indicates how long the subject should remain muted.', }, }, }, modEventUnmute: { type: 'object', description: 'Unmute action on a subject', properties: { comment: { type: 'string', description: 'Describe reasoning behind the reversal.', }, }, }, modEventEmail: { type: 'object', description: 'Keep a log of outgoing email to a user', required: ['subjectLine'], properties: { subjectLine: { type: 'string', description: 'The subject line of the email sent to the user.', }, }, }, }, }, ComAtprotoAdminDeleteAccount: { lexicon: 1, id: 'com.atproto.admin.deleteAccount', defs: { main: { type: 'procedure', description: 'Delete a user account as an administrator.', input: { encoding: 'application/json', schema: { type: 'object', required: ['did'], properties: { did: { type: 'string', format: 'did', }, }, }, }, }, }, }, ComAtprotoAdminDisableAccountInvites: { lexicon: 1, id: 'com.atproto.admin.disableAccountInvites', defs: { main: { type: 'procedure', description: 'Disable an account from receiving new invite codes, but does not invalidate existing codes.', input: { encoding: 'application/json', schema: { type: 'object', required: ['account'], properties: { account: { type: 'string', format: 'did', }, note: { type: 'string', description: 'Optional reason for disabled invites.', }, }, }, }, }, }, }, ComAtprotoAdminDisableInviteCodes: { lexicon: 1, id: 'com.atproto.admin.disableInviteCodes', defs: { main: { type: 'procedure', description: 'Disable some set of codes and/or all codes associated with a set of users.', input: { encoding: 'application/json', schema: { type: 'object', properties: { codes: { type: 'array', items: { type: 'string', }, }, accounts: { type: 'array', items: { type: 'string', }, }, }, }, }, }, }, }, ComAtprotoAdminEmitModerationEvent: { lexicon: 1, id: 'com.atproto.admin.emitModerationEvent', defs: { main: { type: 'procedure', description: 'Take a moderation action on an actor.', input: { encoding: 'application/json', schema: { type: 'object', required: ['event', 'subject', 'createdBy'], properties: { event: { type: 'union', refs: [ 'lex:com.atproto.admin.defs#modEventTakedown', 'lex:com.atproto.admin.defs#modEventAcknowledge', 'lex:com.atproto.admin.defs#modEventEscalate', 'lex:com.atproto.admin.defs#modEventComment', 'lex:com.atproto.admin.defs#modEventLabel', 'lex:com.atproto.admin.defs#modEventReport', 'lex:com.atproto.admin.defs#modEventMute', 'lex:com.atproto.admin.defs#modEventReverseTakedown', 'lex:com.atproto.admin.defs#modEventUnmute', 'lex:com.atproto.admin.defs#modEventEmail', ], }, subject: { type: 'union', refs: [ 'lex:com.atproto.admin.defs#repoRef', 'lex:com.atproto.repo.strongRef', ], }, subjectBlobCids: { type: 'array', items: { type: 'string', format: 'cid', }, }, createdBy: { type: 'string', format: 'did', }, }, }, }, output: { encoding: 'application/json', schema: { type: 'ref', ref: 'lex:com.atproto.admin.defs#modEventView', }, }, errors: [ { name: 'SubjectHasAction', }, ], }, }, }, ComAtprotoAdminEnableAccountInvites: { lexicon: 1, id: 'com.atproto.admin.enableAccountInvites', defs: { main: { type: 'procedure', description: "Re-enable an account's ability to receive invite codes.", input: { encoding: 'application/json', schema: { type: 'object', required: ['account'], properties: { account: { type: 'string', format: 'did', }, note: { type: 'string', description: 'Optional reason for enabled invites.', }, }, }, }, }, }, }, ComAtprotoAdminGetAccountInfo: { lexicon: 1, id: 'com.atproto.admin.getAccountInfo', defs: { main: { type: 'query', description: 'Get details about an account.', parameters: { type: 'params', required: ['did'], properties: { did: { type: 'string', format: 'did', }, }, }, output: { encoding: 'application/json', schema: { type: 'ref', ref: 'lex:com.atproto.admin.defs#accountView', }, }, }, }, }, ComAtprotoAdminGetInviteCodes: { lexicon: 1, id: 'com.atproto.admin.getInviteCodes', defs: { main: { type: 'query', description: 'Get an admin view of invite codes.', parameters: { type: 'params', properties: { sort: { type: 'string', knownValues: ['recent', 'usage'], default: 'recent', }, limit: { type: 'integer', minimum: 1, maximum: 500, default: 100, }, cursor: { type: 'string', }, }, }, output: { encoding: 'application/json', schema: { type: 'object', required: ['codes'], properties: { cursor: { type: 'string', }, codes: { type: 'array', items: { type: 'ref', ref: 'lex:com.atproto.server.defs#inviteCode', }, }, }, }, }, }, }, }, ComAtprotoAdminGetModerationEvent: { lexicon: 1, id: 'com.atproto.admin.getModerationEvent', defs: { main: { type: 'query', description: 'Get details about a moderation event.', parameters: { type: 'params', required: ['id'], properties: { id: { type: 'integer', }, }, }, output: { encoding: 'application/json', schema: { type: 'ref', ref: 'lex:com.atproto.admin.defs#modEventViewDetail', }, }, }, }, }, ComAtprotoAdminGetRecord: { lexicon: 1, id: 'com.atproto.admin.getRecord', defs: { main: { type: 'query', description: 'Get details about a record.', parameters: { type: 'params', required: ['uri'], properties: { uri: { type: 'string', format: 'at-uri', }, cid: { type: 'string', format: 'cid', }, }, }, output: { encoding: 'application/json', schema: { type: 'ref', ref: 'lex:com.atproto.admin.defs#recordViewDetail', }, }, errors: [ { name: 'RecordNotFound', }, ], }, }, }, ComAtprotoAdminGetRepo: { lexicon: 1, id: 'com.atproto.admin.getRepo', defs: { main: { type: 'query', description: 'Get details about a repository.', parameters: { type: 'params', required: ['did'], properties: { did: { type: 'string', format: 'did', }, }, }, output: { encoding: 'application/json', schema: { type: 'ref', ref: 'lex:com.atproto.admin.defs#repoViewDetail', }, }, errors: [ { name: 'RepoNotFound', }, ], }, }, }, ComAtprotoAdminGetSubjectStatus: { lexicon: 1, id: 'com.atproto.admin.getSubjectStatus', defs: { main: { type: 'query', description: 'Get the service-specific admin status of a subject (account, record, or blob).', parameters: { type: 'params', properties: { did: { type: 'string', format: 'did', }, uri: { type: 'string', format: 'at-uri', }, blob: { type: 'string', format: 'cid', }, }, }, output: { encoding: 'application/json', schema: { type: 'object', required: ['subject'], properties: { subject: { type: 'union', refs: [ 'lex:com.atproto.admin.defs#repoRef', 'lex:com.atproto.repo.strongRef', 'lex:com.atproto.admin.defs#repoBlobRef', ], }, takedown: { type: 'ref', ref: 'lex:com.atproto.admin.defs#statusAttr', }, }, }, }, }, }, }, ComAtprotoAdminQueryModerationEvents: { lexicon: 1, id: 'com.atproto.admin.queryModerationEvents', defs: { main: { type: 'query', description: 'List moderation events related to a subject.', parameters: { type: 'params', properties: { types: { type: 'array', items: { type: 'string', }, description: 'The types of events (fully qualified string in the format of com.atproto.admin#modEvent<name>) to filter by. If not specified, all events are returned.', }, createdBy: { type: 'string', format: 'did', }, sortDirection: { type: 'string', default: 'desc', enum: ['asc', 'desc'], description: 'Sort direction for the events. Defaults to descending order of created at timestamp.', }, subject: { type: 'string', format: 'uri', }, includeAllUserRecords: { type: 'boolean', default: false, description: 'If true, events on all record types (posts, lists, profile etc.) owned by the did are returned', }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 50, }, cursor: { type: 'string', }, }, }, output: { encoding: 'application/json', schema: { type: 'object', required: ['events'], properties: { cursor: { type: 'string', }, events: { type: 'array', items: { type: 'ref', ref: 'lex:com.atproto.admin.defs#modEventView', }, }, }, }, }, }, }, }, ComAtprotoAdminQueryModerationStatuses: { lexicon: 1, id: 'com.atproto.admin.queryModerationStatuses', defs: { main: { type: 'query', description: 'View moderation statuses of subjects (record or repo).', parameters: { type: 'params', properties: { subject: { type: 'string', format: 'uri', }, comment: { type: 'string', description: 'Search subjects by keyword from comments', }, reportedAfter: { type: 'string', format: 'datetime', description: 'Search subjects reported after a given timestamp', }, reportedBefore: { type: 'string', format: 'datetime', description: 'Search subjects reported before a given timestamp', }, reviewedAfter: { type: 'string', format: 'datetime', description: 'Search subjects reviewed after a given timestamp', }, reviewedBefore: { type: 'string', format: 'datetime', description: 'Search subjects reviewed before a given timestamp', }, includeMuted: { type: 'boolean', description: "By default, we don't include muted subjects in the results. Set this to true to include them.", }, reviewState: { type: 'string', description: 'Specify when fetching subjects in a certain state', }, ignoreSubjects: { type: 'array', items: { type: 'string', format: 'uri', }, }, lastReviewedBy: { type: 'string', format: 'did', description: 'Get all subject statuses that were reviewed by a specific moderator', }, sortField: { type: 'string', default: 'lastReportedAt', enum: ['lastReviewedAt', 'lastReportedAt'], }, sortDirection: { type: 'string', default: 'desc', enum: ['asc', 'desc'], }, takendown: { type: 'boolean', description: 'Get subjects that were taken down', }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 50, }, cursor: { type: 'string', }, }, }, output: { encoding: 'application/json', schema: { type: 'object', required: ['subjectStatuses'], properties: { cursor: { type: 'string', }, subjectStatuses: { type: 'array', items: { type: 'ref', ref: 'lex:com.atproto.admin.defs#subjectStatusView', }, }, }, }, }, }, }, }, ComAtprotoAdminSearchRepos: { lexicon: 1, id: 'com.atproto.admin.searchRepos', defs: { main: { type: 'query', description: 'Find repositories based on a search term.', parameters: { type: 'params', properties: { term: { type: 'string', description: "DEPRECATED: use 'q' instead", }, q: { type: 'string', }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 50, }, cursor: { type: 'string', }, }, }, output: { encoding: 'application/json', schema: { type: 'object', required: ['repos'], properties: { cursor: { type: 'string', }, repos: { type: 'array', items: { type: 'ref', ref: 'lex:com.atproto.admin.defs#repoView', }, }, }, }, }, }, }, }, ComAtprotoAdminSendEmail: { lexicon: 1, id: 'com.atproto.admin.sendEmail', defs: { main: { type: 'procedure', description: "Send email to a user's account email address.", input: { encoding: 'application/json', schema: { type: 'object', required: ['recipientDid', 'content', 'senderDid'], properties: { recipientDid: { type: 'string', format: 'did', }, content: { type: 'string', }, subject: { type: 'string', }, senderDid: { type: 'string', format: 'did', }, }, }, }, output: { encoding: 'application/json', schema: { type: 'object', required: ['sent'], properties: { sent: { type: 'boolean', }, }, }, }, }, }, }, ComAtprotoAdminUpdateAccountEmail: { lexicon: 1, id: 'com.atproto.admin.updateAccountEmail', defs: { main: { type: 'procedure', description: "Administrative action to update an account's email.", input: { encoding: 'application/json', schema: { type: 'object', required: ['account', 'email'], properties: { account: { type: 'string', format: 'at-identifier', description: 'The handle or DID of the repo.', }, email: { type: 'string', }, }, }, }, }, }, }, ComAtprotoAdminUpdateAccountHandle: { lexicon: 1, id: 'com.atproto.admin.updateAccountHandle', defs: { main: { type: 'procedure', description: "Administrative action to update an account's handle.", input: { encoding: 'application/json', schema: { type: 'object', required: ['did', 'handle'], properties: { did: { type: 'string', format: 'did', }, handle: { type: 'string', format: 'handle', }, }, }, }, }, }, }, ComAtprotoAdminUpdateSubjectStatus: { lexicon: 1, id: 'com.atproto.admin.updateSubjectStatus', defs: { main: { type: 'procedure', description: 'Update the service-specific admin status of a subject (account, record, or blob).', input: { encoding: 'application/json', schema: { type: 'object', required: ['subject'], properties: { subject: { type: 'union', refs: [ 'lex:com.atproto.admin.defs#repoRef', 'lex:com.atproto.repo.strongRef', 'lex:com.atproto.admin.defs#repoBlobRef', ], }, takedown: { type: 'ref', ref: 'lex:com.atproto.admin.defs#statusAttr', }, }, }, }, output: { encoding: 'application/json', schema: { type: 'object', required: ['subject'], properties: { subject: { type: 'union', refs: [ 'lex:com.atproto.admin.defs#repoRef', 'lex:com.atproto.repo.strongRef', 'lex:com.atproto.admin.defs#repoBlobRef', ], }, takedown: { type: 'ref', ref: 'lex:com.atproto.admin.defs#statusAttr', }, }, }, }, }, }, }, ComAtprotoIdentityResolveHandle: { lexicon: 1, id: 'com.atproto.identity.resolveHandle', defs: { main: { type: 'query', description: 'Provides the DID of a repo.', parameters: { type: 'params', required: ['handle'], properties: { handle: { type: 'string', format: 'handle', description: 'The handle to resolve.', }, }, }, output: { encoding: 'application/json', schema: { type: 'object', required: ['did'], properties: { did: { type: 'string', format: 'did', }, }, }, }, }, }, }, ComAtprotoIdentityUpdateHandle: { lexicon: 1, id: 'com.atproto.identity.updateHandle', defs: { main: { type: 'procedure', description: 'Updates the handle of the account.', input: { encoding: 'application/json', schema: { type: 'object', required: ['handle'], properties: { handle: { type: 'string', format: 'handle', }, }, }, }, }, }, }, ComAtprotoLabelDefs: { lexicon: 1, id: 'com.atproto.label.defs', defs: { label: { type: 'object', description: 'Metadata tag on an atproto resource (eg, repo or record).', required: ['src', 'uri', 'val', 'cts'], properties: { src: { type: 'string', format: 'did', description: 'DID of the actor who created this label.', }, uri: { type: 'string', format: 'uri', description: 'AT URI of the record, repository (account), or other resource that this label applies to.', }, cid: { type: 'string', format: 'cid', description: "Optionally, CID specifying the specific version of 'uri' resource this label applies to.", }, val: { type: 'string', maxLength: 128, description: 'The short string name of the value or type of this label.', }, neg: { type: 'boolean', description: 'If true, this is a negation label, overwriting a previous label.', }, cts: { type: 'string', format: 'datetime', description: 'Timestamp when this label was created.', }, }, }, selfLabels: { type: 'object', description: 'Metadata tags on an atproto record, published by the author within the record.', required: ['values'], properties: { values: { type: 'array', items: { type: 'ref', ref: 'lex:com.atproto.label.defs#selfLabel', }, maxLength: 10, }, }, }, selfLabel: { type: 'object', description: 'Metadata tag on an atproto record, published by the author within the record. Note that schemas should use #selfLabels, not #selfLabel.', required: ['val'], properties: { val: { type: 'string', maxLength: 128, description: 'The short string name of the value or type of this label.', }, }, }, }, }, ComAtprotoLabelQueryLabels: { lexicon: 1, id: 'com.atproto.label.queryLabels', defs: { main: { type: 'query', description: 'Find labels relevant to the provided URI patterns.', parameters: { type: 'params', required: ['uriPatterns'], properties: { uriPatterns: { type: 'array', items: { type: 'string', }, description: "List of AT URI patterns to match (boolean 'OR'). Each may be a prefix (ending with '*'; will match inclusive of the string leading to '*'), or a full URI.", }, sources: { type: 'array', items: { type: 'string', format: 'did', }, description: 'Optional list of label sources (DIDs) to filter on.', }, limit: { type: 'integer', minimum: 1, maximum: 250, default: 50, }, cursor: { type: 'string', }, }, }, output: { encoding: 'application/json', schema: { type: 'object', required: ['labels'], properties: { cursor: { type: 'string', }, labels: { type: 'array', items: { type: 'ref', ref: 'lex:com.atproto.label.defs#label', }, }, }, }, }, }, }, }, ComAtprotoLabelSubscribeLabels: { lexicon: 1, id: 'com.atproto.label.subscribeLabels', defs: { main: { type: 'subscription', description: 'Subscribe to label updates.', parameters: { type: 'params', properties: { cursor: { type: 'integer', description: 'The last known event to backfill from.', }, }, }, message: { schema: { type: 'union', refs: [ 'lex:com.atproto.label.subscribeLabels#labels', 'lex:com.atproto.label.subscribeLabels#info', ], }, }, errors: [ { name: 'FutureCursor', }, ], }, labels: { type: 'object', required: ['seq', 'labels'], properties: { seq: { type: 'integer', }, labels: { type: 'array', items: { type: 'ref', ref: 'lex:com.atproto.label.defs#label', }, }, }, }, info: { type: 'object', required: ['name'], properties: { name: { type: 'string', knownValues: ['OutdatedCursor'], }, message: { type: 'string', }, }, }, }, }, ComAtprotoModerationCreateReport: { lexicon: 1, id: 'com.atproto.moderation.createReport', defs: { main: { type: 'procedure', description: 'Report a repo or a record.', input: { encoding: 'application/json', schema: { type: 'object', required: ['reasonType', 'subject'], properties: { reasonType: { type: 'ref', ref: 'lex:com.atproto.moderation.defs#reasonType', }, reason: { type: 'string', }, subject: { type: 'union', refs: [ 'lex:com.atproto.admin.defs#repoRef', 'lex:com.atproto.repo.strongRef', ], }, }, }, }, output: { encoding: 'application/json', schema: { type: 'object', required: [ 'id', 'reasonType', 'subject', 'reportedBy', 'createdAt', ], properties: { id: { type: 'integer', }, reasonType: { type: 'ref', ref: 'lex:com.atproto.moderation.defs#reasonType', }, reason: { type: 'string', maxGraphemes: 2000, maxLength: 20000, }, subject: { type: 'union', refs: [ 'lex:com.atproto.admin.defs#repoRef', 'lex:com.atproto.repo.strongRef', ], }, reportedBy: { type: 'string', format: 'did', },