this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Lexgen Notification Preferences Types (#1092)

Runs `make lexgen` for
https://github.com/bluesky-social/atproto/pull/3901 and only keeps what
was needed for notification preferences.

authored by

Jim Calabro and committed by
GitHub
fa0e9d00 008e4ed9

+107
+36
api/bsky/notificationdefs.go
··· 4 4 5 5 // schema: app.bsky.notification.defs 6 6 7 + // NotificationDefs_ChatPreference is a "chatPreference" in the app.bsky.notification.defs schema. 8 + type NotificationDefs_ChatPreference struct { 9 + Filter string `json:"filter" cborgen:"filter"` 10 + Push bool `json:"push" cborgen:"push"` 11 + } 12 + 13 + // NotificationDefs_FilterablePreference is a "filterablePreference" in the app.bsky.notification.defs schema. 14 + type NotificationDefs_FilterablePreference struct { 15 + Filter string `json:"filter" cborgen:"filter"` 16 + List bool `json:"list" cborgen:"list"` 17 + Push bool `json:"push" cborgen:"push"` 18 + } 19 + 20 + // NotificationDefs_Preference is a "preference" in the app.bsky.notification.defs schema. 21 + type NotificationDefs_Preference struct { 22 + List bool `json:"list" cborgen:"list"` 23 + Push bool `json:"push" cborgen:"push"` 24 + } 25 + 26 + // NotificationDefs_Preferences is a "preferences" in the app.bsky.notification.defs schema. 27 + type NotificationDefs_Preferences struct { 28 + Chat *NotificationDefs_ChatPreference `json:"chat" cborgen:"chat"` 29 + Follow *NotificationDefs_FilterablePreference `json:"follow" cborgen:"follow"` 30 + Like *NotificationDefs_FilterablePreference `json:"like" cborgen:"like"` 31 + LikeViaRepost *NotificationDefs_FilterablePreference `json:"likeViaRepost" cborgen:"likeViaRepost"` 32 + Mention *NotificationDefs_FilterablePreference `json:"mention" cborgen:"mention"` 33 + Quote *NotificationDefs_FilterablePreference `json:"quote" cborgen:"quote"` 34 + Reply *NotificationDefs_FilterablePreference `json:"reply" cborgen:"reply"` 35 + Repost *NotificationDefs_FilterablePreference `json:"repost" cborgen:"repost"` 36 + RepostViaRepost *NotificationDefs_FilterablePreference `json:"repostViaRepost" cborgen:"repostViaRepost"` 37 + StarterpackJoined *NotificationDefs_Preference `json:"starterpackJoined" cborgen:"starterpackJoined"` 38 + SubscribedPost *NotificationDefs_Preference `json:"subscribedPost" cborgen:"subscribedPost"` 39 + Unverified *NotificationDefs_Preference `json:"unverified" cborgen:"unverified"` 40 + Verified *NotificationDefs_Preference `json:"verified" cborgen:"verified"` 41 + } 42 + 7 43 // NotificationDefs_RecordDeleted is a "recordDeleted" in the app.bsky.notification.defs schema. 8 44 type NotificationDefs_RecordDeleted struct { 9 45 }
+28
api/bsky/notificationgetPreferences.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.notification.getPreferences 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/lex/util" 11 + ) 12 + 13 + // NotificationGetPreferences_Output is the output of a app.bsky.notification.getPreferences call. 14 + type NotificationGetPreferences_Output struct { 15 + Preferences *NotificationDefs_Preferences `json:"preferences" cborgen:"preferences"` 16 + } 17 + 18 + // NotificationGetPreferences calls the XRPC method "app.bsky.notification.getPreferences". 19 + func NotificationGetPreferences(ctx context.Context, c util.LexClient) (*NotificationGetPreferences_Output, error) { 20 + var out NotificationGetPreferences_Output 21 + 22 + params := map[string]interface{}{} 23 + if err := c.LexDo(ctx, util.Query, "", "app.bsky.notification.getPreferences", params, nil, &out); err != nil { 24 + return nil, err 25 + } 26 + 27 + return &out, nil 28 + }
+43
api/bsky/notificationputPreferencesV2.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.notification.putPreferencesV2 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/lex/util" 11 + ) 12 + 13 + // NotificationPutPreferencesV2_Input is the input argument to a app.bsky.notification.putPreferencesV2 call. 14 + type NotificationPutPreferencesV2_Input struct { 15 + Chat *NotificationDefs_ChatPreference `json:"chat,omitempty" cborgen:"chat,omitempty"` 16 + Follow *NotificationDefs_FilterablePreference `json:"follow,omitempty" cborgen:"follow,omitempty"` 17 + Like *NotificationDefs_FilterablePreference `json:"like,omitempty" cborgen:"like,omitempty"` 18 + LikeViaRepost *NotificationDefs_FilterablePreference `json:"likeViaRepost,omitempty" cborgen:"likeViaRepost,omitempty"` 19 + Mention *NotificationDefs_FilterablePreference `json:"mention,omitempty" cborgen:"mention,omitempty"` 20 + Quote *NotificationDefs_FilterablePreference `json:"quote,omitempty" cborgen:"quote,omitempty"` 21 + Reply *NotificationDefs_FilterablePreference `json:"reply,omitempty" cborgen:"reply,omitempty"` 22 + Repost *NotificationDefs_FilterablePreference `json:"repost,omitempty" cborgen:"repost,omitempty"` 23 + RepostViaRepost *NotificationDefs_FilterablePreference `json:"repostViaRepost,omitempty" cborgen:"repostViaRepost,omitempty"` 24 + StarterpackJoined *NotificationDefs_Preference `json:"starterpackJoined,omitempty" cborgen:"starterpackJoined,omitempty"` 25 + SubscribedPost *NotificationDefs_Preference `json:"subscribedPost,omitempty" cborgen:"subscribedPost,omitempty"` 26 + Unverified *NotificationDefs_Preference `json:"unverified,omitempty" cborgen:"unverified,omitempty"` 27 + Verified *NotificationDefs_Preference `json:"verified,omitempty" cborgen:"verified,omitempty"` 28 + } 29 + 30 + // NotificationPutPreferencesV2_Output is the output of a app.bsky.notification.putPreferencesV2 call. 31 + type NotificationPutPreferencesV2_Output struct { 32 + Preferences *NotificationDefs_Preferences `json:"preferences" cborgen:"preferences"` 33 + } 34 + 35 + // NotificationPutPreferencesV2 calls the XRPC method "app.bsky.notification.putPreferencesV2". 36 + func NotificationPutPreferencesV2(ctx context.Context, c util.LexClient, input *NotificationPutPreferencesV2_Input) (*NotificationPutPreferencesV2_Output, error) { 37 + var out NotificationPutPreferencesV2_Output 38 + if err := c.LexDo(ctx, util.Procedure, "application/json", "app.bsky.notification.putPreferencesV2", nil, input, &out); err != nil { 39 + return nil, err 40 + } 41 + 42 + return &out, nil 43 + }