A fork of https://github.com/teal-fm/piper
at main 573 lines 30 kB view raw
1// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 3package bsky 4 5// schema: app.bsky.actor.defs 6 7import ( 8 "encoding/json" 9 "fmt" 10 11 comatprototypes "github.com/bluesky-social/indigo/api/atproto" 12 "github.com/bluesky-social/indigo/lex/util" 13) 14 15// ActorDefs_AdultContentPref is a "adultContentPref" in the app.bsky.actor.defs schema. 16// 17// RECORDTYPE: ActorDefs_AdultContentPref 18type ActorDefs_AdultContentPref struct { 19 LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#adultContentPref" cborgen:"$type,const=app.bsky.actor.defs#adultContentPref"` 20 Enabled bool `json:"enabled" cborgen:"enabled"` 21} 22 23// ActorDefs_BskyAppProgressGuide is a "bskyAppProgressGuide" in the app.bsky.actor.defs schema. 24// 25// If set, an active progress guide. Once completed, can be set to undefined. Should have unspecced fields tracking progress. 26type ActorDefs_BskyAppProgressGuide struct { 27 Guide string `json:"guide" cborgen:"guide"` 28} 29 30// ActorDefs_BskyAppStatePref is a "bskyAppStatePref" in the app.bsky.actor.defs schema. 31// 32// A grab bag of state that's specific to the bsky.app program. Third-party apps shouldn't use this. 33// 34// RECORDTYPE: ActorDefs_BskyAppStatePref 35type ActorDefs_BskyAppStatePref struct { 36 LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#bskyAppStatePref" cborgen:"$type,const=app.bsky.actor.defs#bskyAppStatePref"` 37 ActiveProgressGuide *ActorDefs_BskyAppProgressGuide `json:"activeProgressGuide,omitempty" cborgen:"activeProgressGuide,omitempty"` 38 // nuxs: Storage for NUXs the user has encountered. 39 Nuxs []*ActorDefs_Nux `json:"nuxs,omitempty" cborgen:"nuxs,omitempty"` 40 // queuedNudges: An array of tokens which identify nudges (modals, popups, tours, highlight dots) that should be shown to the user. 41 QueuedNudges []string `json:"queuedNudges,omitempty" cborgen:"queuedNudges,omitempty"` 42} 43 44// ActorDefs_ContentLabelPref is a "contentLabelPref" in the app.bsky.actor.defs schema. 45// 46// RECORDTYPE: ActorDefs_ContentLabelPref 47type ActorDefs_ContentLabelPref struct { 48 LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#contentLabelPref" cborgen:"$type,const=app.bsky.actor.defs#contentLabelPref"` 49 Label string `json:"label" cborgen:"label"` 50 // labelerDid: Which labeler does this preference apply to? If undefined, applies globally. 51 LabelerDid *string `json:"labelerDid,omitempty" cborgen:"labelerDid,omitempty"` 52 Visibility string `json:"visibility" cborgen:"visibility"` 53} 54 55// ActorDefs_FeedViewPref is a "feedViewPref" in the app.bsky.actor.defs schema. 56// 57// RECORDTYPE: ActorDefs_FeedViewPref 58type ActorDefs_FeedViewPref struct { 59 LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#feedViewPref" cborgen:"$type,const=app.bsky.actor.defs#feedViewPref"` 60 // feed: The URI of the feed, or an identifier which describes the feed. 61 Feed string `json:"feed" cborgen:"feed"` 62 // hideQuotePosts: Hide quote posts in the feed. 63 HideQuotePosts *bool `json:"hideQuotePosts,omitempty" cborgen:"hideQuotePosts,omitempty"` 64 // hideReplies: Hide replies in the feed. 65 HideReplies *bool `json:"hideReplies,omitempty" cborgen:"hideReplies,omitempty"` 66 // hideRepliesByLikeCount: Hide replies in the feed if they do not have this number of likes. 67 HideRepliesByLikeCount *int64 `json:"hideRepliesByLikeCount,omitempty" cborgen:"hideRepliesByLikeCount,omitempty"` 68 // hideRepliesByUnfollowed: Hide replies in the feed if they are not by followed users. 69 HideRepliesByUnfollowed *bool `json:"hideRepliesByUnfollowed,omitempty" cborgen:"hideRepliesByUnfollowed,omitempty"` 70 // hideReposts: Hide reposts in the feed. 71 HideReposts *bool `json:"hideReposts,omitempty" cborgen:"hideReposts,omitempty"` 72} 73 74// ActorDefs_HiddenPostsPref is a "hiddenPostsPref" in the app.bsky.actor.defs schema. 75// 76// RECORDTYPE: ActorDefs_HiddenPostsPref 77type ActorDefs_HiddenPostsPref struct { 78 LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#hiddenPostsPref" cborgen:"$type,const=app.bsky.actor.defs#hiddenPostsPref"` 79 // items: A list of URIs of posts the account owner has hidden. 80 Items []string `json:"items" cborgen:"items"` 81} 82 83// ActorDefs_InterestsPref is a "interestsPref" in the app.bsky.actor.defs schema. 84// 85// RECORDTYPE: ActorDefs_InterestsPref 86type ActorDefs_InterestsPref struct { 87 LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#interestsPref" cborgen:"$type,const=app.bsky.actor.defs#interestsPref"` 88 // tags: A list of tags which describe the account owner's interests gathered during onboarding. 89 Tags []string `json:"tags" cborgen:"tags"` 90} 91 92// ActorDefs_KnownFollowers is a "knownFollowers" in the app.bsky.actor.defs schema. 93// 94// The subject's followers whom you also follow 95type ActorDefs_KnownFollowers struct { 96 Count int64 `json:"count" cborgen:"count"` 97 Followers []*ActorDefs_ProfileViewBasic `json:"followers" cborgen:"followers"` 98} 99 100// ActorDefs_LabelerPrefItem is a "labelerPrefItem" in the app.bsky.actor.defs schema. 101type ActorDefs_LabelerPrefItem struct { 102 Did string `json:"did" cborgen:"did"` 103} 104 105// ActorDefs_LabelersPref is a "labelersPref" in the app.bsky.actor.defs schema. 106// 107// RECORDTYPE: ActorDefs_LabelersPref 108type ActorDefs_LabelersPref struct { 109 LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#labelersPref" cborgen:"$type,const=app.bsky.actor.defs#labelersPref"` 110 Labelers []*ActorDefs_LabelerPrefItem `json:"labelers" cborgen:"labelers"` 111} 112 113// ActorDefs_MutedWord is a "mutedWord" in the app.bsky.actor.defs schema. 114// 115// A word that the account owner has muted. 116type ActorDefs_MutedWord struct { 117 // actorTarget: Groups of users to apply the muted word to. If undefined, applies to all users. 118 ActorTarget *string `json:"actorTarget,omitempty" cborgen:"actorTarget,omitempty"` 119 // expiresAt: The date and time at which the muted word will expire and no longer be applied. 120 ExpiresAt *string `json:"expiresAt,omitempty" cborgen:"expiresAt,omitempty"` 121 Id *string `json:"id,omitempty" cborgen:"id,omitempty"` 122 // targets: The intended targets of the muted word. 123 Targets []*string `json:"targets" cborgen:"targets"` 124 // value: The muted word itself. 125 Value string `json:"value" cborgen:"value"` 126} 127 128// ActorDefs_MutedWordsPref is a "mutedWordsPref" in the app.bsky.actor.defs schema. 129// 130// RECORDTYPE: ActorDefs_MutedWordsPref 131type ActorDefs_MutedWordsPref struct { 132 LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#mutedWordsPref" cborgen:"$type,const=app.bsky.actor.defs#mutedWordsPref"` 133 // items: A list of words the account owner has muted. 134 Items []*ActorDefs_MutedWord `json:"items" cborgen:"items"` 135} 136 137// ActorDefs_Nux is a "nux" in the app.bsky.actor.defs schema. 138// 139// A new user experiences (NUX) storage object 140type ActorDefs_Nux struct { 141 Completed bool `json:"completed" cborgen:"completed"` 142 // data: Arbitrary data for the NUX. The structure is defined by the NUX itself. Limited to 300 characters. 143 Data *string `json:"data,omitempty" cborgen:"data,omitempty"` 144 // expiresAt: The date and time at which the NUX will expire and should be considered completed. 145 ExpiresAt *string `json:"expiresAt,omitempty" cborgen:"expiresAt,omitempty"` 146 Id string `json:"id" cborgen:"id"` 147} 148 149// ActorDefs_PersonalDetailsPref is a "personalDetailsPref" in the app.bsky.actor.defs schema. 150// 151// RECORDTYPE: ActorDefs_PersonalDetailsPref 152type ActorDefs_PersonalDetailsPref struct { 153 LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#personalDetailsPref" cborgen:"$type,const=app.bsky.actor.defs#personalDetailsPref"` 154 // birthDate: The birth date of account owner. 155 BirthDate *string `json:"birthDate,omitempty" cborgen:"birthDate,omitempty"` 156} 157 158// ActorDefs_PostInteractionSettingsPref is a "postInteractionSettingsPref" in the app.bsky.actor.defs schema. 159// 160// Default post interaction settings for the account. These values should be applied as default values when creating new posts. These refs should mirror the threadgate and postgate records exactly. 161// 162// RECORDTYPE: ActorDefs_PostInteractionSettingsPref 163type ActorDefs_PostInteractionSettingsPref struct { 164 LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#postInteractionSettingsPref" cborgen:"$type,const=app.bsky.actor.defs#postInteractionSettingsPref"` 165 // postgateEmbeddingRules: Matches postgate record. List of rules defining who can embed this users posts. If value is an empty array or is undefined, no particular rules apply and anyone can embed. 166 PostgateEmbeddingRules []*ActorDefs_PostInteractionSettingsPref_PostgateEmbeddingRules_Elem `json:"postgateEmbeddingRules,omitempty" cborgen:"postgateEmbeddingRules,omitempty"` 167 // threadgateAllowRules: Matches threadgate record. List of rules defining who can reply to this users posts. If value is an empty array, no one can reply. If value is undefined, anyone can reply. 168 ThreadgateAllowRules []*ActorDefs_PostInteractionSettingsPref_ThreadgateAllowRules_Elem `json:"threadgateAllowRules,omitempty" cborgen:"threadgateAllowRules,omitempty"` 169} 170 171type ActorDefs_PostInteractionSettingsPref_PostgateEmbeddingRules_Elem struct { 172 FeedPostgate_DisableRule *FeedPostgate_DisableRule 173} 174 175func (t *ActorDefs_PostInteractionSettingsPref_PostgateEmbeddingRules_Elem) MarshalJSON() ([]byte, error) { 176 if t.FeedPostgate_DisableRule != nil { 177 t.FeedPostgate_DisableRule.LexiconTypeID = "app.bsky.feed.postgate#disableRule" 178 return json.Marshal(t.FeedPostgate_DisableRule) 179 } 180 return nil, fmt.Errorf("cannot marshal empty enum") 181} 182func (t *ActorDefs_PostInteractionSettingsPref_PostgateEmbeddingRules_Elem) UnmarshalJSON(b []byte) error { 183 typ, err := util.TypeExtract(b) 184 if err != nil { 185 return err 186 } 187 188 switch typ { 189 case "app.bsky.feed.postgate#disableRule": 190 t.FeedPostgate_DisableRule = new(FeedPostgate_DisableRule) 191 return json.Unmarshal(b, t.FeedPostgate_DisableRule) 192 193 default: 194 return nil 195 } 196} 197 198type ActorDefs_PostInteractionSettingsPref_ThreadgateAllowRules_Elem struct { 199 FeedThreadgate_MentionRule *FeedThreadgate_MentionRule 200 FeedThreadgate_FollowerRule *FeedThreadgate_FollowerRule 201 FeedThreadgate_FollowingRule *FeedThreadgate_FollowingRule 202 FeedThreadgate_ListRule *FeedThreadgate_ListRule 203} 204 205func (t *ActorDefs_PostInteractionSettingsPref_ThreadgateAllowRules_Elem) MarshalJSON() ([]byte, error) { 206 if t.FeedThreadgate_MentionRule != nil { 207 t.FeedThreadgate_MentionRule.LexiconTypeID = "app.bsky.feed.threadgate#mentionRule" 208 return json.Marshal(t.FeedThreadgate_MentionRule) 209 } 210 if t.FeedThreadgate_FollowerRule != nil { 211 t.FeedThreadgate_FollowerRule.LexiconTypeID = "app.bsky.feed.threadgate#followerRule" 212 return json.Marshal(t.FeedThreadgate_FollowerRule) 213 } 214 if t.FeedThreadgate_FollowingRule != nil { 215 t.FeedThreadgate_FollowingRule.LexiconTypeID = "app.bsky.feed.threadgate#followingRule" 216 return json.Marshal(t.FeedThreadgate_FollowingRule) 217 } 218 if t.FeedThreadgate_ListRule != nil { 219 t.FeedThreadgate_ListRule.LexiconTypeID = "app.bsky.feed.threadgate#listRule" 220 return json.Marshal(t.FeedThreadgate_ListRule) 221 } 222 return nil, fmt.Errorf("cannot marshal empty enum") 223} 224func (t *ActorDefs_PostInteractionSettingsPref_ThreadgateAllowRules_Elem) UnmarshalJSON(b []byte) error { 225 typ, err := util.TypeExtract(b) 226 if err != nil { 227 return err 228 } 229 230 switch typ { 231 case "app.bsky.feed.threadgate#mentionRule": 232 t.FeedThreadgate_MentionRule = new(FeedThreadgate_MentionRule) 233 return json.Unmarshal(b, t.FeedThreadgate_MentionRule) 234 case "app.bsky.feed.threadgate#followerRule": 235 t.FeedThreadgate_FollowerRule = new(FeedThreadgate_FollowerRule) 236 return json.Unmarshal(b, t.FeedThreadgate_FollowerRule) 237 case "app.bsky.feed.threadgate#followingRule": 238 t.FeedThreadgate_FollowingRule = new(FeedThreadgate_FollowingRule) 239 return json.Unmarshal(b, t.FeedThreadgate_FollowingRule) 240 case "app.bsky.feed.threadgate#listRule": 241 t.FeedThreadgate_ListRule = new(FeedThreadgate_ListRule) 242 return json.Unmarshal(b, t.FeedThreadgate_ListRule) 243 244 default: 245 return nil 246 } 247} 248 249type ActorDefs_Preferences_Elem struct { 250 ActorDefs_AdultContentPref *ActorDefs_AdultContentPref 251 ActorDefs_ContentLabelPref *ActorDefs_ContentLabelPref 252 ActorDefs_SavedFeedsPref *ActorDefs_SavedFeedsPref 253 ActorDefs_SavedFeedsPrefV2 *ActorDefs_SavedFeedsPrefV2 254 ActorDefs_PersonalDetailsPref *ActorDefs_PersonalDetailsPref 255 ActorDefs_FeedViewPref *ActorDefs_FeedViewPref 256 ActorDefs_ThreadViewPref *ActorDefs_ThreadViewPref 257 ActorDefs_InterestsPref *ActorDefs_InterestsPref 258 ActorDefs_MutedWordsPref *ActorDefs_MutedWordsPref 259 ActorDefs_HiddenPostsPref *ActorDefs_HiddenPostsPref 260 ActorDefs_BskyAppStatePref *ActorDefs_BskyAppStatePref 261 ActorDefs_LabelersPref *ActorDefs_LabelersPref 262 ActorDefs_PostInteractionSettingsPref *ActorDefs_PostInteractionSettingsPref 263 ActorDefs_VerificationPrefs *ActorDefs_VerificationPrefs 264} 265 266func (t *ActorDefs_Preferences_Elem) MarshalJSON() ([]byte, error) { 267 if t.ActorDefs_AdultContentPref != nil { 268 t.ActorDefs_AdultContentPref.LexiconTypeID = "app.bsky.actor.defs#adultContentPref" 269 return json.Marshal(t.ActorDefs_AdultContentPref) 270 } 271 if t.ActorDefs_ContentLabelPref != nil { 272 t.ActorDefs_ContentLabelPref.LexiconTypeID = "app.bsky.actor.defs#contentLabelPref" 273 return json.Marshal(t.ActorDefs_ContentLabelPref) 274 } 275 if t.ActorDefs_SavedFeedsPref != nil { 276 t.ActorDefs_SavedFeedsPref.LexiconTypeID = "app.bsky.actor.defs#savedFeedsPref" 277 return json.Marshal(t.ActorDefs_SavedFeedsPref) 278 } 279 if t.ActorDefs_SavedFeedsPrefV2 != nil { 280 t.ActorDefs_SavedFeedsPrefV2.LexiconTypeID = "app.bsky.actor.defs#savedFeedsPrefV2" 281 return json.Marshal(t.ActorDefs_SavedFeedsPrefV2) 282 } 283 if t.ActorDefs_PersonalDetailsPref != nil { 284 t.ActorDefs_PersonalDetailsPref.LexiconTypeID = "app.bsky.actor.defs#personalDetailsPref" 285 return json.Marshal(t.ActorDefs_PersonalDetailsPref) 286 } 287 if t.ActorDefs_FeedViewPref != nil { 288 t.ActorDefs_FeedViewPref.LexiconTypeID = "app.bsky.actor.defs#feedViewPref" 289 return json.Marshal(t.ActorDefs_FeedViewPref) 290 } 291 if t.ActorDefs_ThreadViewPref != nil { 292 t.ActorDefs_ThreadViewPref.LexiconTypeID = "app.bsky.actor.defs#threadViewPref" 293 return json.Marshal(t.ActorDefs_ThreadViewPref) 294 } 295 if t.ActorDefs_InterestsPref != nil { 296 t.ActorDefs_InterestsPref.LexiconTypeID = "app.bsky.actor.defs#interestsPref" 297 return json.Marshal(t.ActorDefs_InterestsPref) 298 } 299 if t.ActorDefs_MutedWordsPref != nil { 300 t.ActorDefs_MutedWordsPref.LexiconTypeID = "app.bsky.actor.defs#mutedWordsPref" 301 return json.Marshal(t.ActorDefs_MutedWordsPref) 302 } 303 if t.ActorDefs_HiddenPostsPref != nil { 304 t.ActorDefs_HiddenPostsPref.LexiconTypeID = "app.bsky.actor.defs#hiddenPostsPref" 305 return json.Marshal(t.ActorDefs_HiddenPostsPref) 306 } 307 if t.ActorDefs_BskyAppStatePref != nil { 308 t.ActorDefs_BskyAppStatePref.LexiconTypeID = "app.bsky.actor.defs#bskyAppStatePref" 309 return json.Marshal(t.ActorDefs_BskyAppStatePref) 310 } 311 if t.ActorDefs_LabelersPref != nil { 312 t.ActorDefs_LabelersPref.LexiconTypeID = "app.bsky.actor.defs#labelersPref" 313 return json.Marshal(t.ActorDefs_LabelersPref) 314 } 315 if t.ActorDefs_PostInteractionSettingsPref != nil { 316 t.ActorDefs_PostInteractionSettingsPref.LexiconTypeID = "app.bsky.actor.defs#postInteractionSettingsPref" 317 return json.Marshal(t.ActorDefs_PostInteractionSettingsPref) 318 } 319 if t.ActorDefs_VerificationPrefs != nil { 320 t.ActorDefs_VerificationPrefs.LexiconTypeID = "app.bsky.actor.defs#verificationPrefs" 321 return json.Marshal(t.ActorDefs_VerificationPrefs) 322 } 323 return nil, fmt.Errorf("cannot marshal empty enum") 324} 325func (t *ActorDefs_Preferences_Elem) UnmarshalJSON(b []byte) error { 326 typ, err := util.TypeExtract(b) 327 if err != nil { 328 return err 329 } 330 331 switch typ { 332 case "app.bsky.actor.defs#adultContentPref": 333 t.ActorDefs_AdultContentPref = new(ActorDefs_AdultContentPref) 334 return json.Unmarshal(b, t.ActorDefs_AdultContentPref) 335 case "app.bsky.actor.defs#contentLabelPref": 336 t.ActorDefs_ContentLabelPref = new(ActorDefs_ContentLabelPref) 337 return json.Unmarshal(b, t.ActorDefs_ContentLabelPref) 338 case "app.bsky.actor.defs#savedFeedsPref": 339 t.ActorDefs_SavedFeedsPref = new(ActorDefs_SavedFeedsPref) 340 return json.Unmarshal(b, t.ActorDefs_SavedFeedsPref) 341 case "app.bsky.actor.defs#savedFeedsPrefV2": 342 t.ActorDefs_SavedFeedsPrefV2 = new(ActorDefs_SavedFeedsPrefV2) 343 return json.Unmarshal(b, t.ActorDefs_SavedFeedsPrefV2) 344 case "app.bsky.actor.defs#personalDetailsPref": 345 t.ActorDefs_PersonalDetailsPref = new(ActorDefs_PersonalDetailsPref) 346 return json.Unmarshal(b, t.ActorDefs_PersonalDetailsPref) 347 case "app.bsky.actor.defs#feedViewPref": 348 t.ActorDefs_FeedViewPref = new(ActorDefs_FeedViewPref) 349 return json.Unmarshal(b, t.ActorDefs_FeedViewPref) 350 case "app.bsky.actor.defs#threadViewPref": 351 t.ActorDefs_ThreadViewPref = new(ActorDefs_ThreadViewPref) 352 return json.Unmarshal(b, t.ActorDefs_ThreadViewPref) 353 case "app.bsky.actor.defs#interestsPref": 354 t.ActorDefs_InterestsPref = new(ActorDefs_InterestsPref) 355 return json.Unmarshal(b, t.ActorDefs_InterestsPref) 356 case "app.bsky.actor.defs#mutedWordsPref": 357 t.ActorDefs_MutedWordsPref = new(ActorDefs_MutedWordsPref) 358 return json.Unmarshal(b, t.ActorDefs_MutedWordsPref) 359 case "app.bsky.actor.defs#hiddenPostsPref": 360 t.ActorDefs_HiddenPostsPref = new(ActorDefs_HiddenPostsPref) 361 return json.Unmarshal(b, t.ActorDefs_HiddenPostsPref) 362 case "app.bsky.actor.defs#bskyAppStatePref": 363 t.ActorDefs_BskyAppStatePref = new(ActorDefs_BskyAppStatePref) 364 return json.Unmarshal(b, t.ActorDefs_BskyAppStatePref) 365 case "app.bsky.actor.defs#labelersPref": 366 t.ActorDefs_LabelersPref = new(ActorDefs_LabelersPref) 367 return json.Unmarshal(b, t.ActorDefs_LabelersPref) 368 case "app.bsky.actor.defs#postInteractionSettingsPref": 369 t.ActorDefs_PostInteractionSettingsPref = new(ActorDefs_PostInteractionSettingsPref) 370 return json.Unmarshal(b, t.ActorDefs_PostInteractionSettingsPref) 371 case "app.bsky.actor.defs#verificationPrefs": 372 t.ActorDefs_VerificationPrefs = new(ActorDefs_VerificationPrefs) 373 return json.Unmarshal(b, t.ActorDefs_VerificationPrefs) 374 375 default: 376 return nil 377 } 378} 379 380// ActorDefs_ProfileAssociated is a "profileAssociated" in the app.bsky.actor.defs schema. 381type ActorDefs_ProfileAssociated struct { 382 Chat *ActorDefs_ProfileAssociatedChat `json:"chat,omitempty" cborgen:"chat,omitempty"` 383 Feedgens *int64 `json:"feedgens,omitempty" cborgen:"feedgens,omitempty"` 384 Labeler *bool `json:"labeler,omitempty" cborgen:"labeler,omitempty"` 385 Lists *int64 `json:"lists,omitempty" cborgen:"lists,omitempty"` 386 StarterPacks *int64 `json:"starterPacks,omitempty" cborgen:"starterPacks,omitempty"` 387} 388 389// ActorDefs_ProfileAssociatedChat is a "profileAssociatedChat" in the app.bsky.actor.defs schema. 390type ActorDefs_ProfileAssociatedChat struct { 391 AllowIncoming string `json:"allowIncoming" cborgen:"allowIncoming"` 392} 393 394// ActorDefs_ProfileView is a "profileView" in the app.bsky.actor.defs schema. 395type ActorDefs_ProfileView struct { 396 Associated *ActorDefs_ProfileAssociated `json:"associated,omitempty" cborgen:"associated,omitempty"` 397 Avatar *string `json:"avatar,omitempty" cborgen:"avatar,omitempty"` 398 CreatedAt *string `json:"createdAt,omitempty" cborgen:"createdAt,omitempty"` 399 Description *string `json:"description,omitempty" cborgen:"description,omitempty"` 400 Did string `json:"did" cborgen:"did"` 401 DisplayName *string `json:"displayName,omitempty" cborgen:"displayName,omitempty"` 402 Handle string `json:"handle" cborgen:"handle"` 403 IndexedAt *string `json:"indexedAt,omitempty" cborgen:"indexedAt,omitempty"` 404 Labels []*comatprototypes.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` 405 Status *ActorDefs_StatusView `json:"status,omitempty" cborgen:"status,omitempty"` 406 Verification *ActorDefs_VerificationState `json:"verification,omitempty" cborgen:"verification,omitempty"` 407 Viewer *ActorDefs_ViewerState `json:"viewer,omitempty" cborgen:"viewer,omitempty"` 408} 409 410// ActorDefs_ProfileViewBasic is a "profileViewBasic" in the app.bsky.actor.defs schema. 411type ActorDefs_ProfileViewBasic struct { 412 Associated *ActorDefs_ProfileAssociated `json:"associated,omitempty" cborgen:"associated,omitempty"` 413 Avatar *string `json:"avatar,omitempty" cborgen:"avatar,omitempty"` 414 CreatedAt *string `json:"createdAt,omitempty" cborgen:"createdAt,omitempty"` 415 Did string `json:"did" cborgen:"did"` 416 DisplayName *string `json:"displayName,omitempty" cborgen:"displayName,omitempty"` 417 Handle string `json:"handle" cborgen:"handle"` 418 Labels []*comatprototypes.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` 419 Status *ActorDefs_StatusView `json:"status,omitempty" cborgen:"status,omitempty"` 420 Verification *ActorDefs_VerificationState `json:"verification,omitempty" cborgen:"verification,omitempty"` 421 Viewer *ActorDefs_ViewerState `json:"viewer,omitempty" cborgen:"viewer,omitempty"` 422} 423 424// ActorDefs_ProfileViewDetailed is a "profileViewDetailed" in the app.bsky.actor.defs schema. 425type ActorDefs_ProfileViewDetailed struct { 426 Associated *ActorDefs_ProfileAssociated `json:"associated,omitempty" cborgen:"associated,omitempty"` 427 Avatar *string `json:"avatar,omitempty" cborgen:"avatar,omitempty"` 428 Banner *string `json:"banner,omitempty" cborgen:"banner,omitempty"` 429 CreatedAt *string `json:"createdAt,omitempty" cborgen:"createdAt,omitempty"` 430 Description *string `json:"description,omitempty" cborgen:"description,omitempty"` 431 Did string `json:"did" cborgen:"did"` 432 DisplayName *string `json:"displayName,omitempty" cborgen:"displayName,omitempty"` 433 FollowersCount *int64 `json:"followersCount,omitempty" cborgen:"followersCount,omitempty"` 434 FollowsCount *int64 `json:"followsCount,omitempty" cborgen:"followsCount,omitempty"` 435 Handle string `json:"handle" cborgen:"handle"` 436 IndexedAt *string `json:"indexedAt,omitempty" cborgen:"indexedAt,omitempty"` 437 JoinedViaStarterPack *GraphDefs_StarterPackViewBasic `json:"joinedViaStarterPack,omitempty" cborgen:"joinedViaStarterPack,omitempty"` 438 Labels []*comatprototypes.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` 439 PinnedPost *comatprototypes.RepoStrongRef `json:"pinnedPost,omitempty" cborgen:"pinnedPost,omitempty"` 440 PostsCount *int64 `json:"postsCount,omitempty" cborgen:"postsCount,omitempty"` 441 Status *ActorDefs_StatusView `json:"status,omitempty" cborgen:"status,omitempty"` 442 Verification *ActorDefs_VerificationState `json:"verification,omitempty" cborgen:"verification,omitempty"` 443 Viewer *ActorDefs_ViewerState `json:"viewer,omitempty" cborgen:"viewer,omitempty"` 444} 445 446// ActorDefs_SavedFeed is a "savedFeed" in the app.bsky.actor.defs schema. 447type ActorDefs_SavedFeed struct { 448 Id string `json:"id" cborgen:"id"` 449 Pinned bool `json:"pinned" cborgen:"pinned"` 450 Type string `json:"type" cborgen:"type"` 451 Value string `json:"value" cborgen:"value"` 452} 453 454// ActorDefs_SavedFeedsPref is a "savedFeedsPref" in the app.bsky.actor.defs schema. 455// 456// RECORDTYPE: ActorDefs_SavedFeedsPref 457type ActorDefs_SavedFeedsPref struct { 458 LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#savedFeedsPref" cborgen:"$type,const=app.bsky.actor.defs#savedFeedsPref"` 459 Pinned []string `json:"pinned" cborgen:"pinned"` 460 Saved []string `json:"saved" cborgen:"saved"` 461 TimelineIndex *int64 `json:"timelineIndex,omitempty" cborgen:"timelineIndex,omitempty"` 462} 463 464// ActorDefs_SavedFeedsPrefV2 is a "savedFeedsPrefV2" in the app.bsky.actor.defs schema. 465// 466// RECORDTYPE: ActorDefs_SavedFeedsPrefV2 467type ActorDefs_SavedFeedsPrefV2 struct { 468 LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#savedFeedsPrefV2" cborgen:"$type,const=app.bsky.actor.defs#savedFeedsPrefV2"` 469 Items []*ActorDefs_SavedFeed `json:"items" cborgen:"items"` 470} 471 472// ActorDefs_StatusView is a "statusView" in the app.bsky.actor.defs schema. 473type ActorDefs_StatusView struct { 474 // embed: An optional embed associated with the status. 475 Embed *ActorDefs_StatusView_Embed `json:"embed,omitempty" cborgen:"embed,omitempty"` 476 // expiresAt: The date when this status will expire. The application might choose to no longer return the status after expiration. 477 ExpiresAt *string `json:"expiresAt,omitempty" cborgen:"expiresAt,omitempty"` 478 // isActive: True if the status is not expired, false if it is expired. Only present if expiration was set. 479 IsActive *bool `json:"isActive,omitempty" cborgen:"isActive,omitempty"` 480 Record *util.LexiconTypeDecoder `json:"record" cborgen:"record"` 481 // status: The status for the account. 482 Status string `json:"status" cborgen:"status"` 483} 484 485// An optional embed associated with the status. 486type ActorDefs_StatusView_Embed struct { 487 EmbedExternal_View *EmbedExternal_View 488} 489 490func (t *ActorDefs_StatusView_Embed) MarshalJSON() ([]byte, error) { 491 if t.EmbedExternal_View != nil { 492 t.EmbedExternal_View.LexiconTypeID = "app.bsky.embed.external#view" 493 return json.Marshal(t.EmbedExternal_View) 494 } 495 return nil, fmt.Errorf("cannot marshal empty enum") 496} 497func (t *ActorDefs_StatusView_Embed) UnmarshalJSON(b []byte) error { 498 typ, err := util.TypeExtract(b) 499 if err != nil { 500 return err 501 } 502 503 switch typ { 504 case "app.bsky.embed.external#view": 505 t.EmbedExternal_View = new(EmbedExternal_View) 506 return json.Unmarshal(b, t.EmbedExternal_View) 507 508 default: 509 return nil 510 } 511} 512 513// ActorDefs_ThreadViewPref is a "threadViewPref" in the app.bsky.actor.defs schema. 514// 515// RECORDTYPE: ActorDefs_ThreadViewPref 516type ActorDefs_ThreadViewPref struct { 517 LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#threadViewPref" cborgen:"$type,const=app.bsky.actor.defs#threadViewPref"` 518 // prioritizeFollowedUsers: Show followed users at the top of all replies. 519 PrioritizeFollowedUsers *bool `json:"prioritizeFollowedUsers,omitempty" cborgen:"prioritizeFollowedUsers,omitempty"` 520 // sort: Sorting mode for threads. 521 Sort *string `json:"sort,omitempty" cborgen:"sort,omitempty"` 522} 523 524// ActorDefs_VerificationPrefs is a "verificationPrefs" in the app.bsky.actor.defs schema. 525// 526// Preferences for how verified accounts appear in the app. 527// 528// RECORDTYPE: ActorDefs_VerificationPrefs 529type ActorDefs_VerificationPrefs struct { 530 LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#verificationPrefs" cborgen:"$type,const=app.bsky.actor.defs#verificationPrefs"` 531 // hideBadges: Hide the blue check badges for verified accounts and trusted verifiers. 532 HideBadges *bool `json:"hideBadges,omitempty" cborgen:"hideBadges,omitempty"` 533} 534 535// ActorDefs_VerificationState is a "verificationState" in the app.bsky.actor.defs schema. 536// 537// Represents the verification information about the user this object is attached to. 538type ActorDefs_VerificationState struct { 539 // trustedVerifierStatus: The user's status as a trusted verifier. 540 TrustedVerifierStatus string `json:"trustedVerifierStatus" cborgen:"trustedVerifierStatus"` 541 // verifications: All verifications issued by trusted verifiers on behalf of this user. Verifications by untrusted verifiers are not included. 542 Verifications []*ActorDefs_VerificationView `json:"verifications" cborgen:"verifications"` 543 // verifiedStatus: The user's status as a verified account. 544 VerifiedStatus string `json:"verifiedStatus" cborgen:"verifiedStatus"` 545} 546 547// ActorDefs_VerificationView is a "verificationView" in the app.bsky.actor.defs schema. 548// 549// An individual verification for an associated subject. 550type ActorDefs_VerificationView struct { 551 // createdAt: Timestamp when the verification was created. 552 CreatedAt string `json:"createdAt" cborgen:"createdAt"` 553 // isValid: True if the verification passes validation, otherwise false. 554 IsValid bool `json:"isValid" cborgen:"isValid"` 555 // issuer: The user who issued this verification. 556 Issuer string `json:"issuer" cborgen:"issuer"` 557 // uri: The AT-URI of the verification record. 558 Uri string `json:"uri" cborgen:"uri"` 559} 560 561// ActorDefs_ViewerState is a "viewerState" in the app.bsky.actor.defs schema. 562// 563// Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests. 564type ActorDefs_ViewerState struct { 565 BlockedBy *bool `json:"blockedBy,omitempty" cborgen:"blockedBy,omitempty"` 566 Blocking *string `json:"blocking,omitempty" cborgen:"blocking,omitempty"` 567 BlockingByList *GraphDefs_ListViewBasic `json:"blockingByList,omitempty" cborgen:"blockingByList,omitempty"` 568 FollowedBy *string `json:"followedBy,omitempty" cborgen:"followedBy,omitempty"` 569 Following *string `json:"following,omitempty" cborgen:"following,omitempty"` 570 KnownFollowers *ActorDefs_KnownFollowers `json:"knownFollowers,omitempty" cborgen:"knownFollowers,omitempty"` 571 Muted *bool `json:"muted,omitempty" cborgen:"muted,omitempty"` 572 MutedByList *GraphDefs_ListViewBasic `json:"mutedByList,omitempty" cborgen:"mutedByList,omitempty"` 573}