Skip to content

Commit

Permalink
Update lexicons fetched from cf36b36 committed 2023-05-18T22:57:59Z (#28
Browse files Browse the repository at this point in the history
)
  • Loading branch information
MarshalX authored May 19, 2023
1 parent e233257 commit b3b61f2
Show file tree
Hide file tree
Showing 7 changed files with 75 additions and 9 deletions.
44 changes: 42 additions & 2 deletions atproto/xrpc_client/models/com/atproto/admin/defs.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,13 @@ class ActionViewDetail(base.ModelBase):
id: int
reason: str
resolvedReports: List['models.ComAtprotoAdminDefs.ReportView']
subject: Union['models.ComAtprotoAdminDefs.RepoView', 'models.ComAtprotoAdminDefs.RecordView', 'Dict[str, Any]']
subject: Union[
'models.ComAtprotoAdminDefs.RepoView',
'models.ComAtprotoAdminDefs.RepoViewNotFound',
'models.ComAtprotoAdminDefs.RecordView',
'models.ComAtprotoAdminDefs.RecordViewNotFound',
'Dict[str, Any]',
]
subjectBlobs: List['models.ComAtprotoAdminDefs.BlobView']
createLabelVals: Optional[List[str]] = None
negateLabelVals: Optional[List[str]] = None
Expand Down Expand Up @@ -173,7 +179,13 @@ class ReportViewDetail(base.ModelBase):
reasonType: 'models.ComAtprotoModerationDefs.ReasonType'
reportedBy: str
resolvedByActions: List['models.ComAtprotoAdminDefs.ActionView']
subject: Union['models.ComAtprotoAdminDefs.RepoView', 'models.ComAtprotoAdminDefs.RecordView', 'Dict[str, Any]']
subject: Union[
'models.ComAtprotoAdminDefs.RepoView',
'models.ComAtprotoAdminDefs.RepoViewNotFound',
'models.ComAtprotoAdminDefs.RecordView',
'models.ComAtprotoAdminDefs.RecordViewNotFound',
'Dict[str, Any]',
]
reason: Optional[str] = None

_type: str = 'com.atproto.admin.defs#reportViewDetail'
Expand Down Expand Up @@ -239,6 +251,20 @@ class RepoViewDetail(base.ModelBase):
_type: str = 'com.atproto.admin.defs#repoViewDetail'


@dataclass
class RepoViewNotFound(base.ModelBase):

"""Definition model for :obj:`com.atproto.admin.defs`.
Attributes:
did: Did.
"""

did: str

_type: str = 'com.atproto.admin.defs#repoViewNotFound'


@dataclass
class RepoRef(base.ModelBase):

Expand Down Expand Up @@ -307,6 +333,20 @@ class RecordViewDetail(base.ModelBase):
_type: str = 'com.atproto.admin.defs#recordViewDetail'


@dataclass
class RecordViewNotFound(base.ModelBase):

"""Definition model for :obj:`com.atproto.admin.defs`.
Attributes:
uri: Uri.
"""

uri: str

_type: str = 'com.atproto.admin.defs#recordViewNotFound'


@dataclass
class Moderation(base.ModelBase):

Expand Down
22 changes: 20 additions & 2 deletions lexicons/com.atproto.admin.defs.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@
"type": "union",
"refs": [
"#repoView",
"#recordView"
"#repoViewNotFound",
"#recordView",
"#recordViewNotFound"
]
},
"subjectBlobs": {"type": "array", "items": {"type": "ref", "ref": "#blobView"}},
Expand Down Expand Up @@ -120,7 +122,9 @@
"type": "union",
"refs": [
"#repoView",
"#recordView"
"#repoViewNotFound",
"#recordView",
"#recordViewNotFound"
]
},
"reportedBy": {"type": "string", "format": "did"},
Expand Down Expand Up @@ -164,6 +168,13 @@
"invitesDisabled": {"type": "boolean"}
}
},
"repoViewNotFound": {
"type": "object",
"required": ["did"],
"properties": {
"did": {"type": "string", "format": "did"}
}
},
"repoRef": {
"type": "object",
"required": ["did"],
Expand Down Expand Up @@ -201,6 +212,13 @@
"repo": {"type": "ref", "ref": "#repoView"}
}
},
"recordViewNotFound": {
"type": "object",
"required": ["uri"],
"properties": {
"uri": {"type": "string", "format": "at-uri"}
}
},
"moderation": {
"type": "object",
"required": [],
Expand Down
5 changes: 4 additions & 1 deletion lexicons/com.atproto.admin.getRecord.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
"output": {
"encoding": "application/json",
"schema": {"type": "ref", "ref": "com.atproto.admin.defs#recordViewDetail"}
}
},
"errors": [
{"name": "RecordNotFound"}
]
}
}
}
5 changes: 4 additions & 1 deletion lexicons/com.atproto.admin.getRepo.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
"output": {
"encoding": "application/json",
"schema": {"type": "ref", "ref": "com.atproto.admin.defs#repoViewDetail"}
}
},
"errors": [
{"name": "RepoNotFound"}
]
}
}
}
2 changes: 1 addition & 1 deletion lexicons/com.atproto.repo.applyWrites.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"required": ["action", "collection", "value"],
"properties": {
"collection": {"type": "string", "format": "nsid"},
"rkey": {"type": "string"},
"rkey": {"type": "string", "maxLength": 15},
"value": {"type": "unknown"}
}
},
Expand Down
3 changes: 2 additions & 1 deletion lexicons/com.atproto.repo.createRecord.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
},
"rkey": {
"type": "string",
"description": "The key of the record."
"description": "The key of the record.",
"maxLength": 15
},
"validate": {
"type": "boolean",
Expand Down
3 changes: 2 additions & 1 deletion lexicons/com.atproto.repo.putRecord.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
},
"rkey": {
"type": "string",
"description": "The key of the record."
"description": "The key of the record.",
"maxLength": 15
},
"validate": {
"type": "boolean",
Expand Down

0 comments on commit b3b61f2

Please sign in to comment.