···155155 BirthDate *string `json:"birthDate,omitempty" cborgen:"birthDate,omitempty"`
156156}
157157158158+// ActorDefs_PostInteractionSettingsPref is a "postInteractionSettingsPref" in the app.bsky.actor.defs schema.
159159+//
160160+// 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.
161161+//
162162+// RECORDTYPE: ActorDefs_PostInteractionSettingsPref
163163+type ActorDefs_PostInteractionSettingsPref struct {
164164+ LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#postInteractionSettingsPref" cborgen:"$type,const=app.bsky.actor.defs#postInteractionSettingsPref"`
165165+ // 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.
166166+ PostgateEmbeddingRules []*ActorDefs_PostInteractionSettingsPref_PostgateEmbeddingRules_Elem `json:"postgateEmbeddingRules,omitempty" cborgen:"postgateEmbeddingRules,omitempty"`
167167+ // 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.
168168+ ThreadgateAllowRules []*ActorDefs_PostInteractionSettingsPref_ThreadgateAllowRules_Elem `json:"threadgateAllowRules,omitempty" cborgen:"threadgateAllowRules,omitempty"`
169169+}
170170+171171+type ActorDefs_PostInteractionSettingsPref_PostgateEmbeddingRules_Elem struct {
172172+ FeedPostgate_DisableRule *FeedPostgate_DisableRule
173173+}
174174+175175+func (t *ActorDefs_PostInteractionSettingsPref_PostgateEmbeddingRules_Elem) MarshalJSON() ([]byte, error) {
176176+ if t.FeedPostgate_DisableRule != nil {
177177+ t.FeedPostgate_DisableRule.LexiconTypeID = "app.bsky.feed.postgate#disableRule"
178178+ return json.Marshal(t.FeedPostgate_DisableRule)
179179+ }
180180+ return nil, fmt.Errorf("cannot marshal empty enum")
181181+}
182182+func (t *ActorDefs_PostInteractionSettingsPref_PostgateEmbeddingRules_Elem) UnmarshalJSON(b []byte) error {
183183+ typ, err := util.TypeExtract(b)
184184+ if err != nil {
185185+ return err
186186+ }
187187+188188+ switch typ {
189189+ case "app.bsky.feed.postgate#disableRule":
190190+ t.FeedPostgate_DisableRule = new(FeedPostgate_DisableRule)
191191+ return json.Unmarshal(b, t.FeedPostgate_DisableRule)
192192+193193+ default:
194194+ return nil
195195+ }
196196+}
197197+198198+type ActorDefs_PostInteractionSettingsPref_ThreadgateAllowRules_Elem struct {
199199+ FeedThreadgate_MentionRule *FeedThreadgate_MentionRule
200200+ FeedThreadgate_FollowerRule *FeedThreadgate_FollowerRule
201201+ FeedThreadgate_FollowingRule *FeedThreadgate_FollowingRule
202202+ FeedThreadgate_ListRule *FeedThreadgate_ListRule
203203+}
204204+205205+func (t *ActorDefs_PostInteractionSettingsPref_ThreadgateAllowRules_Elem) MarshalJSON() ([]byte, error) {
206206+ if t.FeedThreadgate_MentionRule != nil {
207207+ t.FeedThreadgate_MentionRule.LexiconTypeID = "app.bsky.feed.threadgate#mentionRule"
208208+ return json.Marshal(t.FeedThreadgate_MentionRule)
209209+ }
210210+ if t.FeedThreadgate_FollowerRule != nil {
211211+ t.FeedThreadgate_FollowerRule.LexiconTypeID = "app.bsky.feed.threadgate#followerRule"
212212+ return json.Marshal(t.FeedThreadgate_FollowerRule)
213213+ }
214214+ if t.FeedThreadgate_FollowingRule != nil {
215215+ t.FeedThreadgate_FollowingRule.LexiconTypeID = "app.bsky.feed.threadgate#followingRule"
216216+ return json.Marshal(t.FeedThreadgate_FollowingRule)
217217+ }
218218+ if t.FeedThreadgate_ListRule != nil {
219219+ t.FeedThreadgate_ListRule.LexiconTypeID = "app.bsky.feed.threadgate#listRule"
220220+ return json.Marshal(t.FeedThreadgate_ListRule)
221221+ }
222222+ return nil, fmt.Errorf("cannot marshal empty enum")
223223+}
224224+func (t *ActorDefs_PostInteractionSettingsPref_ThreadgateAllowRules_Elem) UnmarshalJSON(b []byte) error {
225225+ typ, err := util.TypeExtract(b)
226226+ if err != nil {
227227+ return err
228228+ }
229229+230230+ switch typ {
231231+ case "app.bsky.feed.threadgate#mentionRule":
232232+ t.FeedThreadgate_MentionRule = new(FeedThreadgate_MentionRule)
233233+ return json.Unmarshal(b, t.FeedThreadgate_MentionRule)
234234+ case "app.bsky.feed.threadgate#followerRule":
235235+ t.FeedThreadgate_FollowerRule = new(FeedThreadgate_FollowerRule)
236236+ return json.Unmarshal(b, t.FeedThreadgate_FollowerRule)
237237+ case "app.bsky.feed.threadgate#followingRule":
238238+ t.FeedThreadgate_FollowingRule = new(FeedThreadgate_FollowingRule)
239239+ return json.Unmarshal(b, t.FeedThreadgate_FollowingRule)
240240+ case "app.bsky.feed.threadgate#listRule":
241241+ t.FeedThreadgate_ListRule = new(FeedThreadgate_ListRule)
242242+ return json.Unmarshal(b, t.FeedThreadgate_ListRule)
243243+244244+ default:
245245+ return nil
246246+ }
247247+}
248248+158249type ActorDefs_Preferences_Elem struct {
159159- ActorDefs_AdultContentPref *ActorDefs_AdultContentPref
160160- ActorDefs_ContentLabelPref *ActorDefs_ContentLabelPref
161161- ActorDefs_SavedFeedsPref *ActorDefs_SavedFeedsPref
162162- ActorDefs_SavedFeedsPrefV2 *ActorDefs_SavedFeedsPrefV2
163163- ActorDefs_PersonalDetailsPref *ActorDefs_PersonalDetailsPref
164164- ActorDefs_FeedViewPref *ActorDefs_FeedViewPref
165165- ActorDefs_ThreadViewPref *ActorDefs_ThreadViewPref
166166- ActorDefs_InterestsPref *ActorDefs_InterestsPref
167167- ActorDefs_MutedWordsPref *ActorDefs_MutedWordsPref
168168- ActorDefs_HiddenPostsPref *ActorDefs_HiddenPostsPref
169169- ActorDefs_BskyAppStatePref *ActorDefs_BskyAppStatePref
170170- ActorDefs_LabelersPref *ActorDefs_LabelersPref
250250+ ActorDefs_AdultContentPref *ActorDefs_AdultContentPref
251251+ ActorDefs_ContentLabelPref *ActorDefs_ContentLabelPref
252252+ ActorDefs_SavedFeedsPref *ActorDefs_SavedFeedsPref
253253+ ActorDefs_SavedFeedsPrefV2 *ActorDefs_SavedFeedsPrefV2
254254+ ActorDefs_PersonalDetailsPref *ActorDefs_PersonalDetailsPref
255255+ ActorDefs_FeedViewPref *ActorDefs_FeedViewPref
256256+ ActorDefs_ThreadViewPref *ActorDefs_ThreadViewPref
257257+ ActorDefs_InterestsPref *ActorDefs_InterestsPref
258258+ ActorDefs_MutedWordsPref *ActorDefs_MutedWordsPref
259259+ ActorDefs_HiddenPostsPref *ActorDefs_HiddenPostsPref
260260+ ActorDefs_BskyAppStatePref *ActorDefs_BskyAppStatePref
261261+ ActorDefs_LabelersPref *ActorDefs_LabelersPref
262262+ ActorDefs_PostInteractionSettingsPref *ActorDefs_PostInteractionSettingsPref
171263}
172264173265func (t *ActorDefs_Preferences_Elem) MarshalJSON() ([]byte, error) {
···219311 t.ActorDefs_LabelersPref.LexiconTypeID = "app.bsky.actor.defs#labelersPref"
220312 return json.Marshal(t.ActorDefs_LabelersPref)
221313 }
314314+ if t.ActorDefs_PostInteractionSettingsPref != nil {
315315+ t.ActorDefs_PostInteractionSettingsPref.LexiconTypeID = "app.bsky.actor.defs#postInteractionSettingsPref"
316316+ return json.Marshal(t.ActorDefs_PostInteractionSettingsPref)
317317+ }
222318 return nil, fmt.Errorf("cannot marshal empty enum")
223319}
224320func (t *ActorDefs_Preferences_Elem) UnmarshalJSON(b []byte) error {
···264360 case "app.bsky.actor.defs#labelersPref":
265361 t.ActorDefs_LabelersPref = new(ActorDefs_LabelersPref)
266362 return json.Unmarshal(b, t.ActorDefs_LabelersPref)
363363+ case "app.bsky.actor.defs#postInteractionSettingsPref":
364364+ t.ActorDefs_PostInteractionSettingsPref = new(ActorDefs_PostInteractionSettingsPref)
365365+ return json.Unmarshal(b, t.ActorDefs_PostInteractionSettingsPref)
267366268367 default:
269368 return nil
+3-2
api/bsky/feedpostgate.go
···2222 LexiconTypeID string `json:"$type,const=app.bsky.feed.postgate" cborgen:"$type,const=app.bsky.feed.postgate"`
2323 CreatedAt string `json:"createdAt" cborgen:"createdAt"`
2424 // detachedEmbeddingUris: List of AT-URIs embedding this post that the author has detached from.
2525- DetachedEmbeddingUris []string `json:"detachedEmbeddingUris,omitempty" cborgen:"detachedEmbeddingUris,omitempty"`
2626- EmbeddingRules []*FeedPostgate_EmbeddingRules_Elem `json:"embeddingRules,omitempty" cborgen:"embeddingRules,omitempty"`
2525+ DetachedEmbeddingUris []string `json:"detachedEmbeddingUris,omitempty" cborgen:"detachedEmbeddingUris,omitempty"`
2626+ // embeddingRules: List of rules defining who can embed this post. If value is an empty array or is undefined, no particular rules apply and anyone can embed.
2727+ EmbeddingRules []*FeedPostgate_EmbeddingRules_Elem `json:"embeddingRules,omitempty" cborgen:"embeddingRules,omitempty"`
2728 // post: Reference (AT-URI) to the post record.
2829 Post string `json:"post" cborgen:"post"`
2930}
+4-3
api/bsky/feedthreadgate.go
···1919} //
2020// RECORDTYPE: FeedThreadgate
2121type FeedThreadgate struct {
2222- LexiconTypeID string `json:"$type,const=app.bsky.feed.threadgate" cborgen:"$type,const=app.bsky.feed.threadgate"`
2323- Allow []*FeedThreadgate_Allow_Elem `json:"allow,omitempty" cborgen:"allow,omitempty"`
2424- CreatedAt string `json:"createdAt" cborgen:"createdAt"`
2222+ LexiconTypeID string `json:"$type,const=app.bsky.feed.threadgate" cborgen:"$type,const=app.bsky.feed.threadgate"`
2323+ // allow: List of rules defining who can reply to this post. If value is an empty array, no one can reply. If value is undefined, anyone can reply.
2424+ Allow []*FeedThreadgate_Allow_Elem `json:"allow,omitempty" cborgen:"allow,omitempty"`
2525+ CreatedAt string `json:"createdAt" cborgen:"createdAt"`
2526 // hiddenReplies: List of hidden reply URIs.
2627 HiddenReplies []string `json:"hiddenReplies,omitempty" cborgen:"hiddenReplies,omitempty"`
2728 // post: Reference (AT-URI) to the post record.