use crate::{
actor::Actor,
endpoint::EndpointProperties,
ext::Extension,
primitives::{XsdAnyUri, XsdString},
properties,
};
impl<T> Extension<T> for ApActorProperties where T: Actor {}
properties! {
ApActor {
docs [
"Define activitypub properties for the Actor type as described by the Activity Pub vocabulary."
],
inbox {
docs [
"A reference to an [[ActivityStreams](https://www.w3.org/ns/activitystreams)]",
"OrderedCollection comprised of all the messages received by the actor.",
"",
"- Range: `xsd:anyUri`",
"- Functional: true",
],
types [ XsdAnyUri ],
functional,
required,
},
outbox {
docs [
"An [ActivityStreams](https://www.w3.org/ns/activitystreams)] OrderedCollection comprised of",
"all the messages produced by the actor.",
"",
"- Range: `xsd:anyUri`",
"- Functional: true",
],
types [ XsdAnyUri ],
functional,
required,
},
following {
docs [
"A link to an [[ActivityStreams](https://www.w3.org/ns/activitystreams)] collection of the",
"actors that this actor is following.",
"",
"- Range: `xsd:anyUri`",
"- Functional: true",
],
types [ XsdAnyUri ],
functional,
},
followers {
docs [
"A link to an [[ActivityStreams](https://www.w3.org/ns/activitystreams)] collection of the",
"actors that follow this actor.",
"",
"- Range: `xsd:anyUri`",
"- Functional: true",
],
types [ XsdAnyUri ],
functional,
},
liked {
docs [
"A link to an [[ActivityStreams](https://www.w3.org/ns/activitystreams)] collection of",
"objects this actor has liked.",
"",
"- Range: `xsd:anyUri`",
"- Functional: true",
],
types [ XsdAnyUri ],
functional,
},
streams {
docs [
"A list of supplementary Collections which may be of interest.",
"",
"- Range: `xsd:anyUri`",
"- Functional: false",
],
types [ XsdAnyUri ],
},
preferred_username {
docs [
"A short username which may be used to refer to the actor, with no uniqueness guarantees.",
"",
"- Range: `xsd:string`",
"- Functional: true",
],
types [ XsdString ],
functional,
},
endpoints {
docs [
"A json object which maps additional (typically server/domain-wide) endpoints which may be",
"useful either for this actor or someone referencing this actor.",
"",
"This mapping may be nested inside the actor document as the value or may be a link to a",
"JSON-LD document with these properties.",
"",
"- Range: `Endpoint`",
"- Functional: true",
],
types [ EndpointProperties ],
functional,
},
}
}