gdritter repos activitystreams-aeson / 1e901aa
Added extensive documentation to DynamicSchema module Getty Ritter 9 years ago
2 changed file(s) with 639 addition(s) and 108 deletion(s). Collapse all Expand all
11 {-# LANGUAGE Rank2Types #-}
22 {-# LANGUAGE OverloadedStrings #-}
3
4 {-|
5 Module : Codec.ActivityStream.DynamicSchema
6 Description : A (more dynamic) interface to the Activity Streams Base Schema
7 Copyright : (c) Getty Ritter, 2014
8 Maintainer : gdritter@galois.com
9
10 This is an interface to the extended ActivityStreams schema which defines
11 an extensive set of @verb@ values, additional @objectType@ values, and a
12 set of extended properties for 'Object's.
13
14 Most of the inline documentation is drawn directly from the
15 <https://github.com/activitystreams/activity-schema/blob/master/activity-schema.md Activity Base Schema draft>
16 specification, with minor modifications
17 to refer to the corresponding data types in this module and to clarify
18 certain aspects. This is not an approved draft, and as such may be
19 subject to changes which will be reflected in this module. In contrast to
20 "Codec.ActivityStream", the API in this module makes __no guarantees about
21 long-term stability__.
22 -}
323
424 module Codec.ActivityStream.DynamicSchema
525 ( module Codec.ActivityStream.Dynamic
1838 , bnMd5
1939 , bnMimeType
2040 -- ** Event
21 , evAttended
41 , evAttendedBy
2242 , evAttending
2343 , evEndTime
2444 , evInvited
5777 , getSource
5878 , getStartTime
5979 , getEndTime
80 , oTags
81 -- * Mood
6082 , Mood
6183 , moodRest
6284 , moodDisplayName
99121 bnCompression :: Lens' Object (Maybe Text)
100122 bnCompression = makeAesonLensMb "compression" oRest
101123
124 -- | The URL-Safe Base64-encoded representation of the binary data
102125 bnData :: Lens' Object (Maybe Text)
103126 bnData = makeAesonLensMb "data" oRest
104
127 -- | An optional IRI for the binary data described by this object.
105128 bnFileUrl :: Lens' Object (Maybe Text)
106129 bnFileUrl = makeAesonLensMb "fileUrl" oRest
107130
131 -- | The total number of unencoded, uncompressed octets contained
132 -- within the "data" field.
108133 bnLength :: Lens' Object (Maybe Text)
109134 bnLength = makeAesonLensMb "length" oRest
110135
136 -- | An optional MD5 checksum calculated over the unencoded,
137 -- uncompressed octets contained within the "data" field
111138 bnMd5 :: Lens' Object (Maybe Text)
112139 bnMd5 = makeAesonLensMb "md5" oRest
113140
141 -- | The MIME Media Type of the binary data contained within the object.
114142 bnMimeType :: Lens' Object (Maybe Text)
115143 bnMimeType = makeAesonLensMb "mimeType" oRest
116144
117145 -- event
118146
119 evAttended :: Lens' Object (Maybe Collection)
120 evAttended = makeAesonLensMb "attended" oRest
121
147 -- | A collection object as defined in Section 3.5 of the JSON
148 -- Activity Streams specification that provides information about
149 -- entities that attended the event.
150 evAttendedBy :: Lens' Object (Maybe Collection)
151 evAttendedBy = makeAesonLensMb "attendedBy" oRest
152
153 -- | A collection object as defined in Section 3.5 of the JSON
154 -- Activity Streams specification that provides information about
155 -- entities that intend to attend the event.
122156 evAttending :: Lens' Object (Maybe Collection)
123157 evAttending = makeAesonLensMb "attending" oRest
124158
159 -- | The date and time that the event ends represented as a String
160 -- conforming to the "date-time" production in [RFC3339].
125161 evEndTime :: Lens' Object (Maybe DateTime)
126162 evEndTime = makeAesonLensMb "endTime" oRest
127163
164 -- | A collection object as defined in Section 3.5 of the JSON
165 -- Activity Streams specification that provides information about
166 -- entities that have been invited to the event.
128167 evInvited :: Lens' Object (Maybe Collection)
129168 evInvited = makeAesonLensMb "invited" oRest
130169
170 -- | A collection object as defined in Section 3.5 of the JSON
171 -- Activity Streams specification that provides information about
172 -- entities that possibly may attend the event.
131173 evMaybeAttending :: Lens' Object (Maybe Collection)
132174 evMaybeAttending = makeAesonLensMb "maybeAttending" oRest
133175
176 -- | A collection object as defined in Section 3.5 of the JSON
177 -- Activity Streams specification that provides information about
178 -- entities that did not attend the event.
134179 evNotAttendedBy :: Lens' Object (Maybe Collection)
135180 evNotAttendedBy = makeAesonLensMb "notAttendedBy" oRest
136181
182 -- | A collection object as defined in Section 3.5 of the JSON
183 -- Activity Streams specification that provides information about
184 -- entities that do not intend to attend the event.
137185 evNotAttending :: Lens' Object (Maybe Collection)
138186 evNotAttending = makeAesonLensMb "notAttending" oRest
139187
188 -- | The date and time that the event begins represented as a String
189 -- confirming to the "date-time" production in RFC 3339.
140190 evStartTime :: Lens' Object (Maybe DateTime)
141191 evStartTime = makeAesonLensMb "startTime" oRest
142192
143193 -- issue
144194
195 -- | An array of one or more absolute IRI's that describe the type of
196 -- issue represented by the object. Note that the IRI's are intended
197 -- for use as identifiers and MAY or MAY NOT be dereferenceable.
145198 isTypes :: Lens' Object (Maybe [Text])
146199 isTypes = makeAesonLensMb "types" oRest
147200
148201 -- permission
149202
203 -- | A single Activity Streams Object, of any objectType, that
204 -- identifies the scope of the permission. For example, if the
205 -- permission objects describes write permissions for a given file,
206 -- the scope property would be a file object describing that file.
150207 pmScope :: Lens' Object (Maybe Object)
151208 pmScope = makeAesonLensMb "scope" oRest
152209
210 -- | An array of Strings that identify the specific actions associated
211 -- with the permission. The actions are application and scope
212 -- specific. No common, core set of actions is defined by this
213 -- specification.
153214 pmActions :: Lens' Object (Maybe [Text])
154215 pmActions = makeAesonLensMb "actions" oRest
155216
156217 -- place
157218
219 -- | The latitude, longitude and altitude of the place as a point on
220 -- Earth. Represented as a JSON Object as described below.
158221 plPosition :: Lens' Object (Maybe PlacePosition)
159222 plPosition = makeAesonLensMb "position" oRest
160223
224 -- | A physical address represented as a JSON object as described below.
161225 plAddress :: Lens' Object (Maybe PlaceAddress)
162226 plAddress = makeAesonLensMb "address" oRest
163227
192256
193257 -- role/group
194258
259 -- | An optional Activity Streams Collection object listing the
260 -- members of a group, or listing the entities assigned to a
261 -- particular role.
195262 rlMembers :: Lens' Object (Maybe [Object])
196263 rlMembers = makeAesonLensMb "members" oRest
197264
198265 -- Task
199266
267 -- | An Activity Streams Object that provides information about the
268 -- actor that is expected to complete the task.
200269 tsActor :: Lens' Object (Maybe Object)
201270 tsActor = makeAesonLensMb "actor" oRest
202271
272 -- | A RFC 3339 date-time specifying the date and time by which the
273 -- task is to be completed.
203274 tsBy :: Lens' Object (Maybe DateTime)
204275 tsBy = makeAesonLensMb "by" oRest
205276
277 -- | An Activity Streams object describing the object of the task.
206278 tsObject :: Lens' Object (Maybe Object)
207279 tsObject = makeAesonLensMb "object" oRest
208280
281 -- | An Array of other Task objects that are to be completed before
282 -- this task can be completed.
209283 tsPrerequisites :: Lens' Object (Maybe [Object])
210284 tsPrerequisites = makeAesonLensMb "prerequisites" oRest
211285
286 -- | A boolean value indicating whether completion of this task is
287 -- considered to be mandatory.
212288 tsRequired :: Lens' Object (Maybe Bool)
213289 tsRequired = makeAesonLensMb "required" oRest
214290
291 -- | An Array of other Task objects that are superseded by this task object.
215292 tsSupersedes :: Lens' Object (Maybe [Object])
216293 tsSupersedes = makeAesonLensMb "supersedes" oRest
217294
295 -- | A string indicating the verb for this task as defined in Section
296 -- 3.2 of [activitystreams].
218297 tsVerb :: Lens' Object (Maybe SchemaVerb)
219298 tsVerb = makeAesonLensMb "verb" oRest
220299
221300 -- extra properties
222301
302 -- | The additional @context@ property allows an 'Activity' to further
303 -- include information about why a particular action occurred by
304 -- providing details about the context within which a particular
305 -- Activity was performed. The value of the @context@ property is an
306 -- 'Object' of any @objectType@. The meaning of the @context@ property is
307 -- only defined when used within an 'Activity' object.
223308 acContext :: Lens' Activity (Maybe Object)
224309 acContext = makeAesonLensMb "context" acRest
225310
311 -- | When appearing within an activity, the location data indicates
312 -- the location where the activity occurred. When appearing within an
313 -- object, the location data indicates the location of that object at
314 -- the time the activity occurred.
226315 getLocation :: Lens' a Aeson.Object -> Lens' a (Maybe Object)
227316 getLocation = makeAesonLensMb "location"
228317
318 -- | Mood describes the mood of the user when the activity was
319 -- performed. This is usually collected via an extra field in the user
320 -- interface used to perform the activity. For the purpose of the
321 -- schema, a mood is a freeform, short mood keyword or phrase along
322 -- with an optional mood icon image.
229323 oMood :: Lens' Object (Maybe Mood)
230324 oMood = makeAesonLensMb "mood" oRest
231325
326 -- | A rating given as a number between 1.0 and 5.0 inclusive with one
327 -- decimal place of precision. Represented in JSON as a property
328 -- called @rating@ whose value is a JSON number giving the rating.
232329 oRating :: Lens' Object (Maybe Double)
233330 oRating = makeAesonLensMb "rating" oRest
234331
332 -- | The @result@ provides a description of the result of any particular
333 -- activity. The value of the @result@ property is an Object of any
334 -- objectType. The meaning of the @result@ property is only defined when
335 -- used within an 'Activity' object.
235336 acResult :: Lens' Activity (Maybe Object)
236337 acResult = makeAesonLensMb "result" acRest
237338
339 -- | The @source@ property provides a reference to the original source of
340 -- an object or activity. The value of the @source@ property is an
341 -- Object of any objectType.
342 --
343 -- The @source@ property is closely related to
344 -- the @generator@ and @provider@ properties but serves the distinct
345 -- purpose of identifying where the activity or object was originally
346 -- published as opposed to identifying the applications that generated
347 -- or published it.
238348 getSource :: Lens' a Aeson.Object -> Lens' a (Maybe Object)
239349 getSource = makeAesonLensMb "source"
240350
351 -- | When an long running Activity occurs over a distinct period of
352 -- time, or when an Object represents a long-running process or event,
353 -- the @startTime@ propertiy can be used to specify the
354 -- date and time at which the activity or object begins.
355 -- The values for each are represented as JSON Strings
356 -- conforming to the "date-time" production in RFC3339.
241357 getStartTime :: Lens' a Aeson.Object -> Lens' a (Maybe Text)
242358 getStartTime = makeAesonLensMb "startTime"
243359
360 -- | When an long running Activity occurs over a distinct period of
361 -- time, or when an Object represents a long-running process or event,
362 -- the @endTime@ propertiy can be used to specify the
363 -- date and time at which the activity or object concludes.
364 -- The values for each are represented as JSON Strings
365 -- conforming to the "date-time" production in RFC3339.
244366 getEndTime :: Lens' a Aeson.Object -> Lens' a (Maybe Text)
245367 getEndTime = makeAesonLensMb "endTime"
246368
369 -- | A listing of the objects that have been associated with a
370 -- particular object. Represented in JSON using a property named @tags@
371 -- whose value is an Array of objects.
372 oTags :: Lens' Object (Maybe [Object])
373 oTags = makeAesonLensMb "tags" oRest
374
247375 -- mood
248376
377 -- | Mood describes the mood of the user when the activity was
378 -- performed. This is usually collected via an extra field in the user
379 -- interface used to perform the activity. For the purpose of this
380 -- schema, a mood is a freeform, short mood keyword or phrase along
381 -- with an optional mood icon image.
249382 data Mood = Mood { fromMood :: Aeson.Object } deriving (Eq, Show)
250383
251384 instance FromJSON Mood where
258391 instance ToJSON Mood where
259392 toJSON = Aeson.Object . fromMood
260393
394 -- | Access to the underlying JSON object of a 'Mood'
261395 moodRest :: Lens' Mood Aeson.Object
262396 moodRest = makeLens fromMood (\ o' m -> m { fromMood = o' })
263397
398 -- | The natural-language, human-readable and plain-text keyword or
399 -- phrase describing the mood. HTML markup MUST NOT be included.
264400 moodDisplayName :: Lens' Mood Text
265401 moodDisplayName = makeAesonLens "displayName" moodRest
266402
403 -- | An optional image that provides a visual representation of the mood.
267404 moodImage :: Lens' Mood MediaLink
268405 moodImage = makeAesonLens "image" moodRest
1010 import Codec.ActivityStream.Internal
1111 import Codec.ActivityStream.Representation
1212
13 -- | The ActivityStreams Base Schema specification defines the
14 -- following core verbs in addition to the default post verb that is
15 -- defined in Section 6 of activitystreams:
1316 data SchemaVerb
14 = Accept -- ^ Indicates that that the actor has accepted the object.
15 -- For instance, a person accepting an award, or accepting
16 -- an assignment.
17 | Access -- ^ Indicates that the actor has accessed the object. For
18 -- instance, a person accessing a room, or accessing a file.
19 | Acknowledge -- ^ Indicates that the actor has acknowledged the object.
20 -- This effectively signals that the actor is aware of the
21 -- object's existence.
22 | Add -- ^ Indicates that the actor has added the object to the target.
23 -- For instance, adding a photo to an album.
24 | Agree -- ^ Indicates that the actor agrees with the object. For example,
25 -- a person agreeing with an argument, or expressing agreement
26 -- with a particular issue.
27 | Append -- ^ Indicates that the actor has appended the object to the
28 -- target. For instance, a person appending a new record
29 -- to a database.
30 | Approve -- ^ Indicates that the actor has approved the object. For
31 -- instance, a manager might approve a travel request.
32 | Archive -- ^ Indicates that the actor has archived the object.
33 | Assign -- ^ Indicates that the actor has assigned the object to the target.
34 | At -- ^ Indicates that the actor is currently located at the object.
35 -- For instance, a person being at a specific physical location.
36 | Attach -- ^ Indicates that the actor has attached the object to the
37 -- target. For instance, a person attaching a file to a wiki
38 -- page or an email.
39 | Attend -- ^
40 | Author -- ^
41 | Authorize -- ^
42 | Borrow -- ^
43 | Build -- ^
44 | Cancel -- ^
45 | Close -- ^
46 | Complete -- ^
47 | Confirm -- ^
48 | Consume -- ^
49 | Checkin -- ^
50 | Create -- ^
51 | Delete -- ^
52 | Deliver -- ^
53 | Deny -- ^
54 | Disagree -- ^
55 | Dislike -- ^
56 | Experience -- ^
57 | Favorite -- ^
58 | Find -- ^
59 | FlagAsInappropriate -- ^
60 | Follow -- ^
61 | Give -- ^
62 | Host -- ^
63 | Ignore -- ^
64 | Insert -- ^
65 | Install -- ^
66 | Interact -- ^
67 | Invite -- ^
68 | Join -- ^
69 | Leave -- ^
70 | Like -- ^
71 | Listen -- ^
72 | Lose -- ^
73 | MakeFriend -- ^
74 | Open -- ^
75 | Play -- ^
76 | Post -- ^
77 | Present -- ^
78 | Purchase -- ^
79 | Qualify -- ^
80 | Read -- ^
81 | Receive -- ^
82 | Reject -- ^
83 | Remove -- ^
84 | RemoveFriend -- ^
85 | Replace -- ^
86 | Request -- ^
87 | RequestFriend -- ^
88 | Resolve -- ^
89 | Return -- ^
90 | Retract -- ^
91 | RsvpMaybe -- ^
92 | RsvpNo -- ^
93 | RsvpYes -- ^
94 | Satisfy -- ^
95 | Save -- ^
96 | Schedule -- ^
97 | Search -- ^
98 | Sell -- ^
99 | Send -- ^
100 | Share -- ^
101 | Sponsor -- ^
102 | Start -- ^
103 | StopFollowing -- ^
104 | Submit -- ^
105 | Tag -- ^
106 | Terminate -- ^
107 | Tie -- ^
108 | Unfavorite -- ^
109 | Unlike -- ^
110 | Unsatisfy -- ^
111 | Unsave -- ^
112 | Unshare -- ^
113 | Update -- ^
114 | Use -- ^
115 | Watch -- ^
116 | Win -- ^ foo
17 = Accept
18 -- ^ Indicates that that the actor has accepted the object.
19 -- For instance, a person accepting an award, or accepting an assignment.
20 | Access
21 -- ^ Indicates that the actor has accessed the object. For
22 -- instance, a person accessing a room, or accessing a file.
23 | Acknowledge
24 -- ^ Indicates that the actor has acknowledged the object.
25 -- This effectively signals that the actor is aware of the
26 -- object's existence.
27 | Add
28 -- ^ Indicates that the actor has added the object to the target.
29 -- For instance, adding a photo to an album.
30 | Agree
31 -- ^ Indicates that the actor agrees with the object. For example,
32 -- a person agreeing with an argument, or expressing agreement
33 -- with a particular issue.
34 | Append
35 -- ^ Indicates that the actor has appended the object to the
36 -- target. For instance, a person appending a new record
37 -- to a database.
38 | Approve
39 -- ^ Indicates that the actor has approved the object. For
40 -- instance, a manager might approve a travel request.
41 | Archive
42 -- ^ Indicates that the actor has archived the object.
43 | Assign
44 -- ^ Indicates that the actor has assigned the object to the target.
45 | At
46 -- ^ Indicates that the actor is currently located at the object.
47 -- For instance, a person being at a specific physical location.
48 | Attach
49 -- ^ Indicates that the actor has attached the object to the
50 -- target. For instance, a person attaching a file to a wiki
51 -- page or an email.
52 | Attend
53 -- ^ Indicates that the actor has attended the object. For
54 -- instance, a person attending a meeting.
55 | Author
56 -- ^ Indicates that the actor has authored the object. Note that
57 -- this is a more specific form of the verb \"create\".
58 | Authorize
59 -- ^ Indicates that the actor has authorized the object. If
60 -- a target is specified, it means that the authorization is specifically
61 -- in regards to the target. For instance, a service can authorize a
62 -- person to access a given application; in which case the actor is
63 -- the service, the object is the person, and the target is the
64 -- application. In contrast, a person can authorize a request; in
65 -- which case the actor is the person and the object is the request
66 -- and there might be no explicit target.
67 | Borrow
68 -- ^ Indicates that the actor has borrowed the object. If a target
69 -- is specified, it identifies the entity from which the object was
70 -- borrowed. For instance, if a person borrows a book from a library,
71 -- the person is the actor, the book is the object and the library is
72 -- the target.
73 | Build
74 -- ^ Indicates that the actor has built the object. For example, if a
75 -- person builds a model or compiles code.
76 | Cancel
77 -- ^ Indicates that the actor has canceled the object. For instance,
78 -- canceling a calendar event.
79 | Close
80 -- ^ Indicates that the actor has closed the object. For instance, the
81 -- object could represent a ticket being tracked in an issue management
82 -- system.
83 | Complete
84 -- ^ Indicates that the actor has completed the object.
85 | Confirm
86 -- ^ Indicates that the actor has confirmed or agrees with the object.
87 -- For instance, a software developer might confirm an issue reported
88 -- against a product.
89 | Consume
90 -- ^ Indicates that the actor has consumed the object. The specific
91 -- meaning is dependent largely on the object's type. For instance,
92 -- an actor may \"consume\" an audio object, indicating that the actor
93 -- has listened to it; or an actor may \"consume\" a book, indicating
94 -- that the book has been read. As such, the \"consume\" verb is a
95 -- more generic form of other more specific verbs such as \"read\" and
96 -- \"play\".
97 | Checkin
98 -- ^ Indicates that the actor has checked-in to the object. For
99 -- instance, a person checking-in to a Place.
100 | Create
101 -- ^ Indicates that the actor has created the object.
102 | Delete
103 -- ^ Indicates that the actor has deleted the object. This implies,
104 -- but does not require, the permanent destruction of the object.
105 | Deliver
106 -- ^ Indicates that the actor has delivered the object. For example,
107 -- delivering a package.
108 | Deny
109 -- ^ Indicates that the actor has denied the object. For example, a
110 -- manager may deny a travel request.
111 | Disagree
112 -- ^ Indicates that the actor disagrees with the object.
113 | Dislike
114 -- ^ Indicates that the actor dislikes the object. Note that the
115 -- \"dislike\" verb is distinct from the \"unlike\" verb which assumes
116 -- that the object had been previously \"liked\".
117 | Experience
118 -- ^ Indicates that the actor has experienced the object in some
119 -- manner. Note that, depending on the specific object types used for
120 -- both the actor and object, the meaning of this verb can overlap
121 -- that of the \"consume\" and \"play\" verbs. For instance, a person
122 -- might \"experience\" a movie; or \"play\" the movie; or \"consume\"
123 -- the movie. The \"experience\" verb can be considered a more generic
124 -- form of other more specific verbs as \"consume\", \"play\", \"watch\",
125 -- \"listen\", and \"read\"
126 | Favorite
127 -- ^ Indicates that the actor marked the object as an item of special
128 -- interest.
129 | Find
130 -- ^ Indicates that the actor has found the object.
131 | FlagAsInappropriate
132 -- ^ Indicates that the actor has flagged the object as being
133 -- inappropriate for some reason. When using this verb, the context
134 -- property can be used to provide additional detail about why the
135 -- object has been flagged.
136 | Follow
137 -- ^ Indicates that the actor began following the activity of the
138 -- object. In most cases, the objectType will be a \"person\", but it
139 -- can potentially be of any type that can sensibly generate activity.
140 -- Processors MAY ignore (silently drop) successive identical \"follow\"
141 -- activities.
142 | Give -- ^ Indicates that the actor is giving an object to the
143 -- target. Examples include one person giving a badge object to another
144 -- person. The object identifies the object being given. The target
145 -- identifies the receiver.
146 | Host
147 -- ^ Indicates that the actor is hosting the object. As in hosting
148 -- an event, or hosting a service.
149 | Ignore
150 -- ^ Indicates that the actor has ignored the object. For
151 -- instance, this verb may be used when an actor has ignored a friend
152 -- request, in which case the object may be the request-friend activity.
153 | Insert
154 -- ^ Indicates that the actor has inserted the object into the target.
155 | Install
156 -- ^ Indicates that the actor has installed the object, as in installing
157 -- an application.
158 | Interact
159 -- ^ Indicates that the actor has interacted with the object. For
160 -- instance, when one person interacts with another.
161 | Invite
162 -- ^ Indicates that the actor has invited the object, typically a
163 -- person object, to join or participate in the object described
164 -- by the target. The target could, for instance, be an event,
165 -- group or a service.
166 | Join
167 -- ^ Indicates that the actor has become a member of the
168 -- object. This specification only defines the meaning of this
169 -- verb when the object of the Activity has an objectType of
170 -- group, though implementors need to be prepared to handle other
171 -- types of objects.
172 | Leave
173 -- ^ Indicates that the actor has left the object. For instance, a
174 -- Person leaving a Group or checking-out of a Place.
175 | Like
176 -- ^ Indicates that the actor marked the object as an item of
177 -- special interest. The \"like\" verb is considered to be an alias
178 -- of \"favorite\". The two verb are semantically identical.
179 | Listen
180 -- ^ Indicates that the actor has listened to the object. This is
181 -- typically only applicable for objects representing audio
182 -- content, such as music, an audio-book, or a radio
183 -- broadcast. The \"listen\" verb is a more specific form of the
184 -- \"consume\", \"experience\" and \"play\" verbs.
185 | Lose
186 -- ^ Indicates that the actor has lost the object. For instance,
187 -- if a person loses a game.
188 | MakeFriend
189 -- ^ Indicates the creation of a friendship that is reciprocated
190 -- by the object. Since this verb implies an activity on the part
191 -- of its object, processors MUST NOT accept activities with this
192 -- verb unless they are able to verify through some external means
193 -- that there is in fact a reciprocated connection. For example, a
194 -- processor may have received a guarantee from a particular
195 -- publisher that the publisher will only use this Verb in cases
196 -- where a reciprocal relationship exists.
197 | Open
198 -- ^ Indicates that the actor has opened the object. For instance,
199 -- the object could represent a ticket being tracked in an issue
200 -- management system.
201 | Play
202 -- ^ Indicates that the actor spent some time enjoying the
203 -- object. For example, if the object is a video this indicates
204 -- that the subject watched all or part of the video. The \"play\"
205 -- verb is a more specific form of the \"consume\" verb.
206 | Post
207 -- ^ The default action.
208 | Present
209 -- ^ Indicates that the actor has presented the object. For
210 -- instance, when a person gives a presentation at a conference.
211 | Purchase
212 -- ^ Indicates that the actor has purchased the object. If a
213 -- target is specified, in indicates the entity from which the
214 -- object was purchased.
215 | Qualify
216 -- ^ Indicates that the actor has qualified for the object. If a
217 -- target is specified, it indicates the context within which the
218 -- qualification applies.
219 | Read
220 -- ^ Indicates that the actor read the object. This is typically
221 -- only applicable for objects representing printed or written
222 -- content, such as a book, a message or a comment. The \"read\"
223 -- verb is a more specific form of the \"consume\", \"experience\" and
224 -- \"play\" verbs.
225 | Receive
226 -- ^ Indicates that the actor is receiving an object. Examples
227 -- include a person receiving a badge object. The object
228 -- identifies the object being received.
229 | Reject
230 -- ^ Indicates that the actor has rejected the object.
231 | Remove
232 -- ^ Indicates that the actor has removed the object from the target.
233 | RemoveFriend
234 -- ^ Indicates that the actor has removed the object from the
235 -- collection of friends.
236 | Replace
237 -- ^ Indicates that the actor has replaced the target with the object.
238 | Request
239 -- ^ Indicates that the actor has requested the object. If a
240 -- target is specified, it indicates the entity from which the
241 -- object is being requested.
242 | RequestFriend
243 -- ^ Indicates the creation of a friendship that has not yet been
244 -- reciprocated by the object.
245 | Resolve
246 -- ^ Indicates that the actor has resolved the object. For
247 -- instance, the object could represent a ticket being tracked in
248 -- an issue management system.
249 | Return
250 -- ^ Indicates that the actor has returned the object. If a target
251 -- is specified, it indicates the entity to which the object was
252 -- returned.
253 | Retract
254 -- ^ Indicates that the actor has retracted the object. For
255 -- instance, if an actor wishes to retract a previously published
256 -- activity, the object would be the previously published activity
257 -- that is being retracted.
258 | RsvpMaybe
259 -- ^ The \"possible RSVP\" verb indicates that the actor has made a
260 -- possible RSVP for the object. This specification only defines
261 -- the meaning of this verb when its object is an event, though
262 -- implementors need to be prepared to handle other object
263 -- types. The use of this verb is only appropriate when the RSVP
264 -- was created by an explicit action by the actor. It is not
265 -- appropriate to use this verb when a user has been added as an
266 -- attendee by an event organiser or administrator.
267 | RsvpNo
268 -- ^ The \"negative RSVP\" verb indicates that the actor has made a
269 -- negative RSVP for the object. This specification only defines
270 -- the meaning of this verb when its object is an event, though
271 -- implementors need to be prepared to handle other object
272 -- types. The use of this verb is only appropriate when the RSVP
273 -- was created by an explicit action by the actor. It is not
274 -- appropriate to use this verb when a user has been added as an
275 -- attendee by an event organiser or administrator.
276 | RsvpYes
277 -- ^ The \"positive RSVP\" verb indicates that the actor has made a
278 -- positive RSVP for an object. This specification only defines
279 -- the meaning of this verb when its object is an event, though
280 -- implementors need to be prepared to handle other object
281 -- types. The use of this verb is only appropriate when the RSVP
282 -- was created by an explicit action by the actor. It is not
283 -- appropriate to use this verb when a user has been added as an
284 -- attendee by an event organiser or administrator.
285 | Satisfy
286 -- ^ Indicates that the actor has satisfied the object. If a
287 -- target is specified, it indicate the context within which the
288 -- object was satisfied. For instance, if a person satisfies the
289 -- requirements for a particular challenge, the person is the
290 -- actor; the requirement is the object; and the challenge is the
291 -- target.
292 | Save
293 -- ^ Indicates that the actor has called out the object as being
294 -- of interest primarily to him- or herself. Though this action
295 -- MAY be shared publicly, the implication is that the object has
296 -- been saved primarily for the actor's own benefit rather than to
297 -- show it to others as would be indicated by the \"share\" verb.
298 | Schedule
299 -- ^ Indicates that the actor has scheduled the object. For
300 -- instance, scheduling a meeting.
301 | Search
302 -- ^ Indicates that the actor is or has searched for the
303 -- object. If a target is specified, it indicates the context
304 -- within which the search is or has been conducted.
305 | Sell
306 -- ^ Indicates that the actor has sold the object. If a target is
307 -- specified, it indicates the entity to which the object was
308 -- sold.
309 | Send
310 -- ^ Indicates that the actor has sent the object. If a target is
311 -- specified, it indicates the entity to which the object was
312 -- sent.
313 | Share
314 -- ^ Indicates that the actor has called out the object to
315 -- readers. In most cases, the actor did not create the object
316 -- being shared, but is instead drawing attention to it.
317 | Sponsor
318 -- ^ Indicates that the actor has sponsored the object. If a
319 -- target is specified, it indicates the context within which the
320 -- sponsorship is offered. For instance, a company can sponsor an
321 -- event; or an individual can sponsor a project; etc.
322 | Start
323 -- ^ Indicates that the actor has started the object. For
324 -- instance, when a person starts a project.
325 | StopFollowing
326 -- ^ Indicates that the actor has stopped following the object.
327 | Submit
328 -- ^ Indicates that the actor has submitted the object. If a
329 -- target is specified, it indicates the entity to which the
330 -- object was submitted.
331 | Tag
332 -- ^ Indicates that the actor has associated the object with the
333 -- target. For example, if the actor specifies that a particular
334 -- user appears in a photo. the object is the user and the target
335 -- is the photo.
336 | Terminate
337 -- ^ Indicates that the actor has terminated the object.
338 | Tie
339 -- ^ Indicates that the actor has neither won or lost the
340 -- object. This verb is generally only applicable when the object
341 -- represents some form of competition, such as a game.
342 | Unfavorite
343 -- ^ Indicates that the actor has removed the object from the
344 -- collection of favorited items.
345 | Unlike
346 -- ^ Indicates that the actor has removed the object from the
347 -- collection of liked items.
348 | Unsatisfy
349 -- ^ Indicates that the actor has not satisfied the object. If a
350 -- target is specified, it indicates the context within which the
351 -- object was not satisfied. For instance, if a person fails to
352 -- satisfy the requirements of some particular challenge, the
353 -- person is the actor; the requirement is the object and the
354 -- challenge is the target.
355 | Unsave
356 -- ^ Indicates that the actor has removed the object from the
357 -- collection of saved items.
358 | Unshare
359 -- ^ Indicates that the actor is no longer sharing the object. If
360 -- a target is specified, it indicates the entity with whom the
361 -- object is no longer being shared.
362 | Update
363 -- ^ The \"update\" verb indicates that the actor has modified the
364 -- object. Use of the \"update\" verb is generally reserved to
365 -- indicate modifications to existing objects or data such as
366 -- changing an existing user's profile information.
367 | Use
368 -- ^ Indicates that the actor has used the object in some manner.
369 | Watch
370 -- ^ Indicates that the actor has watched the object. This verb is
371 -- typically applicable only when the object represents dynamic,
372 -- visible content such as a movie, a television show or a public
373 -- performance. This verb is a more specific form of the verbs
374 -- \"experience\", \"play\" and \"consume\".
375 | Win
376 -- ^ Indicates that the actor has won the object. This verb is
377 -- typically applicable only when the object represents some form
378 -- of competition, such as a game.
117379 deriving (Eq, Show, Read)
118380
119381 deriveJSON (commonOptsCC "") ''SchemaVerb
120382
383 -- | This data type contains the core set of common objectTypes in addition
384 -- to the "activity" objectType defined in Section 7 of
385 -- activitystreams.
386 --
387 -- All Activity Stream Objects inherit the same
388 -- fundamental set of basic properties as defined in section 3.4 of
389 -- activitystreams. In addition to these, objects of any specific type
390 -- are permitted to introduce additional optional or required
391 -- properties that are meaningful to objects of that type.
121392 data SchemaObjectType
122393 = Alert
394 -- ^ Represents any kind of significant notification.
123395 | Application
396 -- ^ Represents any kind of software application.
124397 | Article
398 -- ^ Represents objects such as news articles, knowledge base
399 -- entries, or other similar construct. Such objects generally
400 -- consist of paragraphs of text, in some cases incorporating
401 -- embedded media such as photos and inline hyperlinks to other
402 -- resources.
125403 | Audio
404 -- ^ Represents audio content of any kind. Objects of this type
405 -- MAY contain an additional property as specified
406 -- <https://github.com/activitystreams/activity-schema/blob/master/activity-schema.md#audio-video here>.
126407 | Badge
408 -- ^ Represents a badge or award granted to an object (typically a
409 -- @person@ object)
127410 | Binary
411 -- ^ Objects of this type are used to carry arbirary
412 -- Base64-encoded binary data within an Activity Stream object. It
413 -- is primarily intended to attach binary data to other types of
414 -- objects through the use of the @attachments@ property. Objects
415 -- of this type will contain the additional properties specified
416 -- <https://github.com/activitystreams/activity-schema/blob/master/activity-schema.md#binary here>.
128417 | Bookmark
418 -- ^ Represents a pointer to some URL -- typically a web page. In
419 -- most cases, bookmarks are specific to a given user and contain
420 -- metadata chosen by that user. Bookmark Objects are similar in
421 -- principle to the concept of bookmarks or favorites in a web
422 -- browser. A bookmark represents a pointer to the URL, not the
423 -- URL or the associated resource itself. Objects of this type
424 -- SHOULD contain an additional @targetUrl@ property whose value
425 -- is a String containing the IRI of the target of the bookmark.
129426 | Collection
427 -- ^ Represents a generic collection of objects of any type. This
428 -- object type can be used, for instance, to represent a
429 -- collection of files like a folder; a collection of photos like
430 -- an album; and so forth. Objects of this type MAY contain an
431 -- additional @objectTypes@ property whose value is an Array of
432 -- Strings specifying the expected objectType of objects contained
433 -- within the collection.
130434 | Comment
435 -- ^ Represents a textual response to another object. Objects of
436 -- this type MAY contain an additional @inReplyTo@ property whose
437 -- value is an Array of one or more other Activity Stream Objects
438 -- for which the object is to be considered a response.
131439 | Device
440 -- ^ Represents a device of any type.
132441 | Event
442 -- ^ Represents an event that occurs at a certain location during
443 -- a particular period of time. Objects of this type MAY contain
444 -- the additional properties specified
445 -- <https://github.com/activitystreams/activity-schema/blob/master/activity-schema.md#event here>.
133446 | File
447 -- ^ Represents any form of document or file. Objects of this type
448 -- MAY contain an additional @fileUrl@ property whose value a
449 -- dereferenceable IRI that can be used to retrieve the file; and
450 -- an additional @mimeType@ property whose value is the MIME type
451 -- of the file described by the object.
134452 | Game
453 -- ^ Represents a game or competition of any kind.
135454 | Group
455 -- ^ Represents a grouping of objects in which member objects can
456 -- join or leave. Objects of this type MAY contain the additional
457 -- properties specified
458 -- <https://github.com/activitystreams/activity-schema/blob/master/activity-schema.md#roleGroup here>.
136459 | Image
460 -- ^ Represents a graphical image. Objects of this type MAY
461 -- contain an additional @fullImage@ property whose value is an
462 -- Activity Streams Media Link to a "full-sized" representation of
463 -- the image.
137464 | Issue
465 -- ^ Represents a report about a problem or situation that needs
466 -- to be resolved. For instance, the @issue@ object can be used to
467 -- represent reports detailing software defects, or reports of
468 -- acceptable use violations, and so forth. Objects of this type
469 -- MAY contain the additional properties specified
470 -- <https://github.com/activitystreams/activity-schema/blob/master/activity-schema.md#issue here>.
138471 | Job
472 -- ^ Represents information about a job or a job posting.
139473 | Note
474 -- ^ Represents a short-form text message. This object is intended
475 -- primarily for use in "micro-blogging" scenarios and in systems
476 -- where users are invited to publish short, often plain-text
477 -- messages whose useful lifespan is generally shorter than that
478 -- of an article of weblog entry. A note is similar in structure
479 -- to an article, but typically does not have a title or distinct
480 -- paragraphs and tends to be much shorter in length.
140481 | Offer
482 -- ^ Represents an offer of any kind.
141483 | Organization
484 -- ^ Represents an organization of any kind.
142485 | Page
486 -- ^ Represents an area, typically a web page, that is
487 -- representative of, and generally managed by a particular
488 -- entity. Such areas are usually dedicated to displaying
489 -- descriptive information about the entity and showcasing recent
490 -- content such as articles, photographs and videos. Most social
491 -- networking applications, for example, provide individual users
492 -- with their own dedicated "profile" pages. Several allow similar
493 -- types of pages to be created for commercial entities,
494 -- organizations or events. While the specific details of how
495 -- pages are implemented, their characteristics and use may vary,
496 -- the one unifying property is that they are typically "owned" by
497 -- a single entity that is represented by the content provided by
498 -- the page itself.
499 | Permission
500 -- ^ Represents a permission that can be granted to an
501 -- individual. For instance, a person can be granted permission to
502 -- modify a file. Objects of this type MAY contain the additional
503 -- properties specified
504 -- <https://github.com/activitystreams/activity-schema/blob/master/activity-schema.md#permissions here>.
143505 | Person
506 -- ^ Represents an individual person.
144507 | Place
508 -- ^ Represents a physical location. Locations can be represented
509 -- using geographic coordinates, a physical address, a free-form
510 -- location name, or any combination of these. Objects of this
511 -- type MAY contain the additional properties specified
512 -- <https://github.com/activitystreams/activity-schema/blob/master/activity-schema.md#place here>.
145513 | Process
514 -- ^ Represents any form of process. For instance, a long-running
515 -- task that is started and expected to continue operating for a
516 -- period of time.
146517 | Product
518 -- ^ Represents a commercial good or service. Objects of this type
519 -- MAY contain an additional @fullImage@ property whose value is
520 -- an Activity Streams Media Link to an image resource
521 -- representative of the product.
147522 | Question
523 -- ^ Represents a question or a poll. Objects of this type MAY
524 -- contain an additional @options@ property whose value is an
525 -- Array of possible answers to the question in the form of
526 -- Activity Stream objects of any type.
148527 | Review
528 -- ^ Represents a primarily prose-based commentary on another
529 -- object. Objects of this type MAY contain a @rating@ property as
530 -- specified
531 -- <https://github.com/activitystreams/activity-schema/blob/master/activity-schema.md#rating-property here>.
149532 | Service
533 -- ^ Represents any form of hosted or consumable service that
534 -- performs some kind of work or benefit for other
535 -- entities. Examples of such objects include websites,
536 -- businesses, etc.
150537 | Task
538 -- ^ Represents an activity that has yet to be completed. Objects
539 -- of this type can contain additional properties as specified
540 -- here.
541 | Team
542 -- ^ Represents a team of any type.
151543 | Video
544 -- ^ Represents video content of any kind. Objects of this type
545 -- MAY contain additional properties as specified here.
152546 deriving (Eq, Show, Read)
153547
154548 deriveJSON (commonOptsCC "") ''SchemaObjectType